manifest-editor 2.2.1-next.0.eefc2e3 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,287 @@
1
+ <p align="center">
2
+ <a href="https://github.com/digirati-co-uk/iiif-manifest-editor"><img src="https://raw.githubusercontent.com/digirati-co-uk/iiif-manifest-editor/main/apps/docs/content/img/logo.svg" width="360" alt="Manifest Editor"></a>
3
+ </p>
4
+ <p align="center">
5
+ <a href="https://www.npmjs.com/package/manifest-editor"><img src="https://img.shields.io/npm/v/manifest-editor" alt="npm version"></a>
6
+ <a href="https://github.com/digirati-co-uk/iiif-manifest-editor/actions/workflows/build-test.yml"><img src="https://img.shields.io/github/actions/workflow/status/digirati-co-uk/iiif-manifest-editor/build-test.yml?branch=main&amp;label=build" alt="Build status"></a>
7
+ <a href="https://manifest-editor-docs.netlify.app/"><img src="https://img.shields.io/badge/docs-Manifest_Editor-blue" alt="Documentation"></a>
8
+ </p>
9
+
10
+ # manifest-editor
11
+
12
+ ## Getting started with Manifest Editor
13
+
14
+ For the complete editor, start with [`manifest-editor`](https://www.npmjs.com/package/manifest-editor) and its [installation and integration guide](https://github.com/digirati-co-uk/iiif-manifest-editor/tree/main/packages/manifest-editor#readme). It combines the editor UI, presets, creators, and editing APIs. This package is one part of that workspace.
15
+
16
+ ## About
17
+
18
+ An open-source IIIF editing tool for creating, editing, and updating manifests and collections. Embed it in your React application, use the browser runtime from a CDN, or assemble a custom editor from its presets and component APIs.
19
+
20
+ ## Install and use the ESM package
21
+
22
+ ```sh
23
+ npm install manifest-editor react@19 react-dom@19
24
+ ```
25
+
26
+ Use an ESM-aware bundler with CSS support, such as Vite. Import the component and styles:
27
+
28
+ ```js
29
+ import { ManifestEditor } from "manifest-editor";
30
+ import "manifest-editor/index.css";
31
+ ```
32
+
33
+ `manifest-editor/reset.css` is an optional global reset. Import it **before** `index.css` if your host application needs it. The editor is browser UI: in an SSR framework, mount it in a client-only boundary with server rendering disabled for the editor.
34
+
35
+ ### Embed in a React application
36
+
37
+ ```tsx
38
+ import { ManifestEditor } from "manifest-editor";
39
+ import "manifest-editor/index.css";
40
+
41
+ export default function App() {
42
+ return (
43
+ <div style={{ height: "100vh" }}>
44
+ <ManifestEditor resource="https://wellcomelibrary.org/iiif/b18035723/manifest" />
45
+ </div>
46
+ );
47
+ }
48
+ ```
49
+
50
+ The component loads the resource and selects the manifest preset. For a collection, pass an explicit reference:
51
+
52
+ ```tsx
53
+ <ManifestEditor resource={{ id: "https://example.org/collection.json", type: "Collection" }} />
54
+ ```
55
+
56
+ To manage state and export edited JSON yourself, create a Vault once and pass it in:
57
+
58
+ ```tsx
59
+ import { useState } from "react";
60
+ import { ManifestEditor } from "manifest-editor";
61
+ import { Vault } from "manifest-editor/helpers";
62
+ import "manifest-editor/index.css";
63
+
64
+ const resource = {
65
+ id: "https://wellcomelibrary.org/iiif/b18035723/manifest",
66
+ type: "Manifest" as const,
67
+ };
68
+
69
+ export default function App() {
70
+ const [vault] = useState(() => new Vault());
71
+
72
+ function exportManifest() {
73
+ if (!vault.get(resource.id)) return;
74
+ console.log(vault.toPresentation3(resource));
75
+ }
76
+
77
+ return (
78
+ <div style={{ height: "100vh", display: "flex", flexDirection: "column" }}>
79
+ <header><button onClick={exportManifest}>Export JSON to console</button></header>
80
+ <div style={{ flex: 1, minHeight: 0 }}>
81
+ <ManifestEditor vault={vault} resource={resource} />
82
+ </div>
83
+ </div>
84
+ );
85
+ }
86
+ ```
87
+
88
+ Edits live in the Vault. Persist exported JSON through your application's own save mechanism; there is no `onSave` or `onChange` component prop in this release. The optional `data` prop supplies a Manifest or Collection you already have instead of fetching it.
89
+
90
+ ## Use the CDN browser runtime
91
+
92
+ The browser runtime is a classic script plus CSS, published under `dist/browser/`. The examples below target **2.2.1** (available once this release is published); use an exact published version with the runtime API, and keep script and stylesheet versions together.
93
+
94
+ ### Automatically load React
95
+
96
+ Save this as an HTML file and serve it over HTTP. No bundler or JSX transformation is needed:
97
+
98
+ ```html
99
+ <!doctype html>
100
+ <html lang="en">
101
+ <head>
102
+ <meta charset="utf-8">
103
+ <meta name="viewport" content="width=device-width, initial-scale=1">
104
+ <title>Manifest Editor</title>
105
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/manifest-editor@2.2.1/dist/browser/runtime.css" crossorigin="anonymous">
106
+ <style>
107
+ html, body { margin: 0; height: 100%; }
108
+ body { display: flex; flex-direction: column; }
109
+ header { padding: 12px; border-bottom: 1px solid #ddd; font: 16px system-ui; }
110
+ #editor { flex: 1; min-height: 0; }
111
+ </style>
112
+ </head>
113
+ <body>
114
+ <header>Manifest Editor</header>
115
+ <main id="editor"></main>
116
+ <script src="https://cdn.jsdelivr.net/npm/manifest-editor@2.2.1/dist/browser/runtime.js" crossorigin="anonymous"></script>
117
+ <script type="module">
118
+ const { React, ReactDOMClient, ManifestEditor, Vault } =
119
+ await window.ManifestEditor.automaticRuntime();
120
+ const vault = new Vault();
121
+ const resource = {
122
+ id: "https://wellcomelibrary.org/iiif/b18035723/manifest",
123
+ type: "Manifest",
124
+ };
125
+ await vault.loadManifest(resource.id);
126
+ ReactDOMClient.createRoot(document.getElementById("editor")).render(
127
+ React.createElement(ManifestEditor, { vault, resource })
128
+ );
129
+ </script>
130
+ </body>
131
+ </html>
132
+ ```
133
+
134
+ `automaticRuntime()` asynchronously imports the runtime's pinned React 19 dependencies from esm.sh, caches the result, and returns the editor exports plus `React`, `ReactDOM`, and `ReactDOMClient`. Use this for a standalone editor page. In an existing React app, inject that app's React environment instead, so there is one React instance.
135
+
136
+ ### Inject an existing React environment
137
+
138
+ Keep the runtime script and CSS tags above. In your application's bundled client module:
139
+
140
+ ```sh
141
+ npm install react@19.2.8 react-dom@19.2.8 react-reconciler@0.33.0
142
+ ```
143
+
144
+ ```tsx
145
+ import * as React from "react";
146
+ import * as ReactDOM from "react-dom";
147
+ import * as ReactDOMClient from "react-dom/client";
148
+ import * as ReactDOMServer from "react-dom/server";
149
+ import * as jsxRuntime from "react/jsx-runtime";
150
+ import ReactReconciler from "react-reconciler";
151
+ // Optional types when manifest-editor is installed:
152
+ // import type {} from "manifest-editor/remote";
153
+
154
+ // Run after the runtime.js script has loaded.
155
+ const { ManifestEditor, Vault } = window.ManifestEditor.createRuntime({
156
+ React,
157
+ ReactDOM,
158
+ ReactDOMClient,
159
+ ReactDOMServer,
160
+ jsxRuntime,
161
+ ReactReconciler,
162
+ });
163
+
164
+ const vault = new Vault();
165
+ const resource = {
166
+ id: "https://wellcomelibrary.org/iiif/b18035723/manifest",
167
+ type: "Manifest" as const,
168
+ };
169
+ await vault.loadManifest(resource.id);
170
+
171
+ ReactDOMClient.createRoot(document.getElementById("editor")!).render(
172
+ <ManifestEditor vault={vault} resource={resource} />
173
+ );
174
+ ```
175
+
176
+ All six dependencies are required by `createRuntime()` in runtime API 1. `ReactDOMServer` is used in the browser to serialize rich-text content; it does not mean a Node server is required. `ReactReconciler` supports the Atlas canvas renderer. Keep the reconciler compatible with the React version you supply. If using TypeScript, the `manifest-editor/remote` entry point declares the browser runtime types (including `window.ManifestEditor`); it can be included with `import type {} from "manifest-editor/remote"` when the package is installed.
177
+
178
+ ### Integrity and version selection
179
+
180
+ The minimal HTML above pins versions but omits integrity hashes. For deployment, obtain the matching `dist/browser/release.json` from your trusted release process and copy its `script.integrity` and `stylesheet.integrity` values onto the corresponding tags as `integrity="sha384-…"`. Retain `crossorigin="anonymous"`. Do not reuse a hash from a different build. These hashes cover the editor script and CSS; they do not cover the esm.sh modules fetched by `automaticRuntime()`.
181
+
182
+ For application-managed version selection, `manifest-editor/remote` exports `resolveRelease`, `validateCatalog`, and `loadManifestEditor`. Selections can be an exact version, a minor line such as `2.2.x` (the highest catalogued stable patch), or `latest` (the catalog’s designated stable release). Prereleases require an exact version. Resolve a release from your trusted catalog, then pass that descriptor and the host dependencies to the loader. It verifies script/CSS integrity, checks runtime compatibility, and returns `{ runtime, release, dispose }`. `dispose()` removes the loaded stylesheet; the host must unmount its React root separately. See the [remote API source](https://github.com/digirati-co-uk/iiif-manifest-editor/tree/main/packages/manifest-editor/src/remote) for catalog and host types.
183
+
184
+ ## Presets, plugins, and configuration
185
+
186
+ `ManifestEditor` selects the manifest or collection preset from `resource.type`. Use `config` for editor preferences and `saveConfig` to persist them. Register additional plugin **modules**, not just their default metadata exports:
187
+
188
+ ```tsx
189
+ import * as translation from "@manifest-editor/translation";
190
+
191
+ <ManifestEditor
192
+ resource="https://wellcomelibrary.org/iiif/b18035723/manifest"
193
+ plugins={[translation]}
194
+ enabledPlugins={["@manifest-editor/translation"]}
195
+ />
196
+ ```
197
+
198
+ Install the plugin separately. Plugin-specific service/runtime settings may also be required. The manifest preset already includes annotations and the canvas-label generator; enable or disable those by ID without registering duplicates.
199
+
200
+ For custom layouts or the exhibition preset, compose the providers from `manifest-editor/shell`. There is no `preset` prop on the combined component. See the [shell guide](https://github.com/digirati-co-uk/iiif-manifest-editor/tree/main/packages/shell#quick-start).
201
+
202
+ ## API overview
203
+
204
+ ### Component props
205
+
206
+ | Prop | Purpose |
207
+ | --- | --- |
208
+ | `resource` | Required manifest URL or `{ id, type: "Manifest" \| "Collection" }`. |
209
+ | `data` | Optional source JSON to load instead of fetching. |
210
+ | `vault` | Host-owned Vault; otherwise the component uses an existing context or its fallback Vault. |
211
+ | `config`, `saveConfig` | Editor preferences and their persistence callback. |
212
+ | `plugins` | Additional plugin modules or mapped/lazy plugin inputs. |
213
+ | `enabledPlugins`, `disabledPlugins` | Plugin IDs to enable or disable. |
214
+ | `globalPluginConfig`, `saveGlobalPluginConfig` | Shared plugin settings and persistence callback. |
215
+ | `layoutMode` | `"default"` or `"focused"`. |
216
+
217
+ ### Package entry points
218
+
219
+ | Import | Exports |
220
+ | --- | --- |
221
+ | `manifest-editor` | `ManifestEditor`, its props, and selected config/plugin types. |
222
+ | `manifest-editor/shell` | Providers, layouts, plugin APIs, and host configuration. |
223
+ | `manifest-editor/components` | Reusable UI components and icons. |
224
+ | `manifest-editor/editor-api`, `manifest-editor/creator-api` | Editing and resource-creation APIs. |
225
+ | `manifest-editor/editors`, `manifest-editor/creators` | Built-in editor and creator definitions. |
226
+ | `manifest-editor/manifest-preset` | Manifest preset module; use `mapApp` for shell composition. |
227
+ | `manifest-editor/collection-preset`, `manifest-editor/exhibition-preset` | Mapped collection/exhibition app definitions. |
228
+ | `manifest-editor/vault` | `react-iiif-vault` providers and hooks. |
229
+ | `manifest-editor/helpers` | `@iiif/helpers`, including `Vault`. |
230
+ | `manifest-editor/parser` | `@iiif/parser` exports. |
231
+ | `manifest-editor/remote` | Release catalog, resolver, integrity loader, and browser runtime types. |
232
+ | `manifest-editor/index.css`, `manifest-editor/reset.css` | Editor stylesheet and optional global reset. |
233
+
234
+ The CDN runtime returns `ManifestEditor`, `Vault`, `runtimeApiVersion`, and namespaces named `shell`, `components`, `creators`, `creatorApi`, `editorApi`, `manifestPreset`, `collectionPreset`, `exhibitionPreset`, and `vault`. Its namespace layout differs from npm subpath imports.
235
+
236
+ ![Manifest Editor screenshot](https://raw.githubusercontent.com/digirati-co-uk/iiif-manifest-editor/main/apps/docs/content/img/manifest-editor.png)
237
+
238
+ ## What is the Digirati IIIF Manifest Editor?
239
+
240
+ The Manifest Editor is an open-source web based editor, built from the ground up using IIIF, JS and HTML. At its core it allows users to view IIIF manifests in an intuitive way, without the need to understand JSON, supporting learning and exploration of IIIF Manifests and how these are assembled by institutes and organisations to deliver rich, engaging online viewing experiences.
241
+
242
+ You can use it to create new IIIF manifests, adding metadata, creating and managing canvases for simple and complex IIIF manifest requirements. You can preview your work in progress in a range of configured IIIF viewers, whilst you can share your work in progress or completed manifests with other users using the sharing options.
243
+
244
+ You can enhance manifests using the editor to add and edit annotations, create IIIF ranges (Table of Contents), change manifest behaviours and add geographic coordinates data (via navPlace) to support enriching your manifest with map-based interfaces.
245
+
246
+ You can also create IIIF Collections, adding metadata and selecting and adding existing IIIF Manifests to your collection.
247
+
248
+ The Manifest Editor provides an exhibition building workbench, enabling users to curate their IIIF Manifests for display as an exhibition or learning resource using the Exhibition Viewer.
249
+
250
+ ## Standard Features
251
+
252
+ - Simple, intuitive user interface supporting comprehensive IIIF Manifest and IIIF Collection creation and editing
253
+ - Ability to browse and search existing IIIF content to select and edit items, or select or edit IIIF content directly from disk or via specific URL
254
+ - Support for curating complex, mixed content canvases enabling the assembly of multi-image or image and A/V content as needed
255
+ - Comprehensive support for creating and managing simple or complex IIIF ranges (table of contents)
256
+ - Ability to annotate IIIF resources
257
+ - Exhibition editing tools to support curating and enhancing IIIF content for story telling or exhibition display
258
+ - Extensible application enabling further customisation and configuration specific to institute or organisational use cases and workflows
259
+
260
+ ## Audience
261
+
262
+ The Manifest Editor has been developed to support users creating and editing IIIF content; with a focus on usability to enable those wishing to learn or already familiar with the IIIF standard.
263
+
264
+ There are a whole range of use cases for visually editing IIIF Manifests; from within the context of museums, libraries, archives and their workflows to research and education.
265
+
266
+ The Manifest Editor can be used as is, or it can be further configured and customised to support specific requirements including integrating it into your workflows in ways that fit your organisational processes.
267
+
268
+ ## Background
269
+
270
+ In 2017 we started working on [IIIF Manifest-driven narratives](https://medium.com/digirati-ch/reaching-into-collections-to-tell-stories-3dc32a1772af) for the V&A, and in 2018 for [Delft University of Technology Library](https://drive.google.com/file/d/1ZRXJaOYNbOD0jsOF79maKhxl5re4-2Kt/view). These were based on the first iteration of our [Canvas Panel](https://iiif-canvas-panel.netlify.app/) component.
271
+
272
+ In 2018 we developed an experimental [IIIF Workbench](https://www.youtube.com/watch?v=HHQdQ8Ti5eI&t=12s) for assembling complex canvases in a visual environment (like PowerPoint).
273
+
274
+ These combined to make a [IIIF Manifest Editor](https://www.youtube.com/watch?v=D8oA3rHbvPM) that in normal, default mode produces IIIF Presentation 3 Manifests, but can be extended with plugins to produce IIIF Manifests with particular structures and custom `behavior` properties, to drive custom viewing experiences - slideshows, guided viewing and the complex digital exhibition layouts seen in the Delft examples. Development of branches of the Manifest Editor for different clients went hand in hand with new viewers and static site generators.
275
+
276
+ ## Join the discussion
277
+
278
+ If you have a question or want to explore ideas with how the Manifest Editor can be extended or improved, you can contact us at Digirati (contact@digirati.com) or use GitHub discussions.
279
+
280
+ ## Acknowledgements
281
+
282
+ The development of the IIIF Manifest Editor has been supported by:
283
+
284
+ - [Canadian Research Knowledge Network](https://www.crkn-rcdr.ca/en)
285
+ - [Delft University of Technology Library](https://www.tudelft.nl/library)
286
+ - [The National Gallery](https://www.nationalgallery.org.uk/), [Practical applications of IIIF](https://tanc-ahrc.github.io/IIIF-TNC/) project funded by [AHRC](https://ahrc.ukri.org/) as a [Foundation Project](https://www.nationalcollection.org.uk/Foundation-Projects) within the [Towards a National Collection](https://www.nationalcollection.org.uk/) programme. [Dec 2021 - Apr 2022]
287
+ - [Canadian Research Knowledge Network](https://www.crkn-rcdr.ca/en)
@@ -1,14 +1,14 @@
1
1
  {
2
- "version": "2.2.1-next.0.eefc2e3",
3
- "buildId": "6089d49fae8d80d6167bed1defa85bc5",
2
+ "version": "2.2.1",
3
+ "buildId": "415ef70f8c1597f4abddf47fea2f2325",
4
4
  "runtimeApiVersion": 1,
5
5
  "reactMajor": 19,
6
6
  "script": {
7
- "url": "https://cdn.jsdelivr.net/npm/manifest-editor@2.2.1-next.0.eefc2e3/dist/browser/runtime.js",
8
- "integrity": "sha384-CvjF1ggktwoZyEf5F68Entxu7OOmPqEhg15t0klAhrnF9vwwQUtkQeGvvuE+oX2v"
7
+ "url": "https://cdn.jsdelivr.net/npm/manifest-editor@2.2.1/dist/browser/runtime.js",
8
+ "integrity": "sha384-9NDC41p+RAm6XGwUebay+3V2dThXrAlBZEIj0OpzWchELBEQx4BkzOZaM+13qr3c"
9
9
  },
10
10
  "stylesheet": {
11
- "url": "https://cdn.jsdelivr.net/npm/manifest-editor@2.2.1-next.0.eefc2e3/dist/browser/runtime.css",
11
+ "url": "https://cdn.jsdelivr.net/npm/manifest-editor@2.2.1/dist/browser/runtime.css",
12
12
  "integrity": "sha384-PYni9lrMjv1oRf/jPYj5Du8NgGDjDPCA/ivMbgqlc4UtDZEtXGW/8mTsTzhBtAk0"
13
13
  }
14
14
  }
@@ -43,7 +43,7 @@
43
43
  },
44
44
  });
45
45
  target.ManifestEditor = api;
46
- })(globalThis, "6089d49fae8d80d6167bed1defa85bc5", "2.2.1-next.0.eefc2e3", function(host) {
46
+ })(globalThis, "415ef70f8c1597f4abddf47fea2f2325", "2.2.1", function(host) {
47
47
  const exports = {}; const module = { exports };
48
48
  const require = (id) => { if (!Object.hasOwn(host, id)) throw new Error("Missing host dependency: " + id); return host[id]; };
49
49
  Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));let d=require("react"),f=u(d,1);d=u(d);let p=require("react-dom"),m=u(p,1);p=u(p);let h=require("react/jsx-runtime"),g=require("react-dom/client");g=u(g,1);let _=require("react-reconciler");_=u(_,1);let v=require("react-dom/server");v=u(v);var y,b,x=o((()=>{y=(0,f.createContext)(null),(0,f.createContext)(null),(0,f.createContext)(null),(0,f.createContext)(null),(0,f.createContext)(null),b=(0,f.createContext)({})})),S,C,w=o((()=>{S=(0,f.createContext)(null),C=(0,f.createContext)(null)})),T,E=o((()=>{T=typeof document<`u`?f.default.useLayoutEffect:()=>{}}));function D(e){let t=(0,f.useRef)(null);return O(()=>{t.current=e},[e]),(0,f.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}var O,k=o((()=>{E(),O=f.default.useInsertionEffect??T}));function A(e){let[t,n]=(0,f.useState)(e),r=(0,f.useRef)(null),i=D(()=>{if(!r.current)return;let e=r.current.next();if(e.done){r.current=null;return}t===e.value?i():n(e.value)});return T(()=>{r.current&&i()}),[t,D(e=>{r.current=e(t),i()})]}var j=o((()=>{k(),E()}));function M(e=!1){let t=(0,f.useContext)(V),n=(0,f.useRef)(null);if(n.current===null&&!e){let e=f.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=H.get(e);n==null?H.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,H.delete(e))}n.current=++t.current}return n.current}function N(e){let t=(0,f.useContext)(V),n=M(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function P(e){let t=f.default.useId(),[n]=(0,f.useState)(z()),r=n?`react-aria`:`react-aria${B.prefix}`;return e||`${r}-${t}`}function F(){return!1}function I(){return!0}function R(e){return()=>{}}function z(){return typeof f.default.useSyncExternalStore==`function`?f.default.useSyncExternalStore(R,F,I):(0,f.useContext)(ee)}var B,V,ee,H,U,te=o((()=>{B={prefix:String(Math.round(Math.random()*1e10)),current:0},V=f.default.createContext(B),ee=f.default.createContext(!1),typeof window<`u`&&window.document&&window.document.createElement,H=new WeakMap,U=typeof f.default.useId==`function`?P:N})),ne=o((()=>{te()}));function re(e){let[t,n]=(0,f.useState)(e),r=(0,f.useRef)(null),i=U(t),a=(0,f.useRef)(null);if(ce&&ce.register(a,i),oe){let e=se.get(i);e&&!e.includes(r)?e.push(r):se.set(i,[r])}return T(()=>{let e=i;return()=>{ce&&ce.unregister(a),se.delete(e)}},[i]),(0,f.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function ie(e,t){if(e===t)return e;let n=se.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=se.get(t);return r?(r.forEach(t=>t.current=e),e):t}function ae(e=[]){let t=re(),[n,r]=A(t),i=(0,f.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return T(i,[t,i,...e]),n}var oe,se,ce,le=o((()=>{E(),j(),ne(),oe=!!(typeof window<`u`&&window.document&&window.document.createElement),se=new Map,typeof FinalizationRegistry<`u`&&(ce=new FinalizationRegistry(e=>{se.delete(e)}))}));function ue(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var de=o((()=>{}));function fe(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function pe(e){return fe(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}var me,he,ge=o((()=>{me=e=>e?.ownerDocument??document,he=e=>e&&`window`in e&&e.window===e?e:me(e).defaultView||window}));function _e(){return ve}var ve,ye=o((()=>{ve=!1}));function be(e,t){if(!_e())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:pe(n)?n.host:n.parentNode}return!1}function xe(e){return _e()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}var Se,Ce=o((()=>{ge(),ye(),Se=(e=document)=>{if(!_e())return e.activeElement;let t=e.activeElement;for(;t&&`shadowRoot`in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}}));function we(e,t,n,r){return _e()?new Te(e,t,n,r):e.createTreeWalker(t,n,r)}var Te,Ee=o((()=>{Ce(),ye(),Te=class{get currentNode(){return this._currentNode}set currentNode(e){if(!be(this.root,e))throw Error(`Cannot set currentNode to a node that is not contained by the root node.`);let t=[],n=e,r=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=n,i=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),n=r=e.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();return be(e,t)?(t&&(this.currentNode=t),t):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let t;if(typeof this.filter==`function`?t=this.filter(e):this.filter?.acceptNode&&(t=this.filter.acceptNode(e)),t===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let n=this.nextNode();return n&&(this.currentNode=n),n}return e&&(this.currentNode=e),e}if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e)){if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}return null}return null}let t=e.previousNode();if(t){if(t.shadowRoot){let e;if(typeof this.filter==`function`?e=this.filter(t):this.filter?.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let n=this.lastChild();return n&&(this.currentNode=n),n}return t&&(this.currentNode=t),t}if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.shadowRoot;if(t){let e=this._doc.createTreeWalker(t,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}if(typeof this.filter==`function`)return this.filter(e);if(this.filter?.acceptNode)return this.filter.acceptNode(e);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}}}));function De(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=De(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Oe(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=De(e))&&(r&&(r+=` `),r+=t);return r}var ke=o((()=>{}));function Ae(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];typeof n==`function`&&typeof i==`function`&&e[0]===`o`&&e[1]===`n`&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=ue(n,i):(e===`className`||e===`UNSAFE_className`)&&typeof n==`string`&&typeof i==`string`?t[e]=Oe(n,i):e===`id`&&n&&i?t.id=ie(n,i):t[e]=i===void 0?n:i}}return t}var je=o((()=>{de(),le(),ke()}));function Me(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=Ne(e,t);return n||=typeof r==`function`,r});if(n)return()=>{r.forEach((t,n)=>{typeof t==`function`?t():Ne(e[n],null)})}}}function Ne(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}var Pe=o((()=>{}));function Fe(e,t={}){let{labelable:n,isLink:r,global:i,events:a=i,propNames:o}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(Ie.has(t)||n&&Le.has(t)||r&&Re.has(t)||i&&W.has(t)||a&&ze.has(t)||t.endsWith(`Capture`)&&ze.has(t.slice(0,-7))||o?.has(t)||Be.test(t))&&(s[t]=e[t]);return s}var Ie,Le,Re,W,ze,Be,Ve=o((()=>{Ie=new Set([`id`]),Le=new Set([`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-details`]),Re=new Set([`href`,`hrefLang`,`target`,`rel`,`download`,`ping`,`referrerPolicy`]),W=new Set([`dir`,`lang`,`hidden`,`inert`,`translate`]),ze=new Set(`onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart`.split(`.`)),Be=/^(data-.*)$/}));function He(e){if(Ue())e.focus({preventScroll:!0});else{let t=We(e);e.focus(),Ge(t)}}function Ue(){if(Ke==null){Ke=!1;try{document.createElement(`div`).focus({get preventScroll(){return Ke=!0,!0}})}catch{}}return Ke}function We(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Ge(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Ke,qe=o((()=>{Ke=null}));function Je(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function Ye(e){return typeof window<`u`&&window.navigator!=null&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function Xe(e){let t=null;return()=>(t??=e(),t)}var Ze,Qe,$e,et,tt,nt,rt,it,at,ot=o((()=>{Ze=Xe(function(){return Ye(/^Mac/i)}),Qe=Xe(function(){return Ye(/^iPhone/i)}),$e=Xe(function(){return Ye(/^iPad/i)||Ze()&&navigator.maxTouchPoints>1}),et=Xe(function(){return Qe()||$e()}),tt=Xe(function(){return Ze()||et()}),nt=Xe(function(){return Je(/AppleWebKit/i)&&!rt()}),rt=Xe(function(){return Je(/Chrome/i)}),it=Xe(function(){return Je(/Android/i)}),at=Xe(function(){return Je(/Firefox/i)})}));function st(){return(0,f.useContext)(ht)}function ct(e,t){let n=e.getAttribute(`target`);return(!n||n===`_self`)&&e.origin===location.origin&&!e.hasAttribute(`download`)&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function lt(e,t,n=!0){var r;let{metaKey:i,ctrlKey:a,altKey:o,shiftKey:s}=t;at()&&(r=window.event)!=null&&r.type?.startsWith(`key`)&&e.target===`_blank`&&(Ze()?i=!0:a=!0);let c=nt()&&Ze()&&!$e()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:i,ctrlKey:a,altKey:o,shiftKey:s}):new MouseEvent(`click`,{metaKey:i,ctrlKey:a,altKey:o,shiftKey:s,bubbles:!0,cancelable:!0});lt.isOpening=n,He(e),e.dispatchEvent(c),lt.isOpening=!1}function ut(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute(`data-href`)){let n=document.createElement(`a`);n.href=e.getAttribute(`data-href`),e.hasAttribute(`data-target`)&&(n.target=e.getAttribute(`data-target`)),e.hasAttribute(`data-rel`)&&(n.rel=e.getAttribute(`data-rel`)),e.hasAttribute(`data-download`)&&(n.download=e.getAttribute(`data-download`)),e.hasAttribute(`data-ping`)&&(n.ping=e.getAttribute(`data-ping`)),e.hasAttribute(`data-referrer-policy`)&&(n.referrerPolicy=e.getAttribute(`data-referrer-policy`)),e.appendChild(n),t(n),e.removeChild(n)}}function dt(e,t){ut(e,e=>lt(e,t))}function ft(e){let t=st().useHref(e.href??``);return{"data-href":e.href?t:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function pt(e){let t=st().useHref(e?.href??``);return{href:e?.href?t:void 0,target:e?.target,rel:e?.rel,download:e?.download,ping:e?.ping,referrerPolicy:e?.referrerPolicy}}function mt(e,t,n,r){!t.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&ct(e.currentTarget,e)&&n&&(e.preventDefault(),t.open(e.currentTarget,e,n,r))}var ht,gt=o((()=>{qe(),ot(),ht=(0,f.createContext)({isNative:!0,open:dt,useHref:e=>e}),lt.isOpening=!1}));function _t(){if(typeof window>`u`)return;function e(e){return`propertyName`in e}let t=t=>{if(!e(t)||!t.target)return;let r=bt.get(t.target);r||(r=new Set,bt.set(t.target,r),t.target.addEventListener(`transitioncancel`,n,{once:!0})),r.add(t.propertyName)},n=t=>{if(!e(t)||!t.target)return;let r=bt.get(t.target);if(r&&(r.delete(t.propertyName),r.size===0&&(t.target.removeEventListener(`transitioncancel`,n),bt.delete(t.target)),bt.size===0)){for(let e of xt)e();xt.clear()}};document.body.addEventListener(`transitionrun`,t),document.body.addEventListener(`transitionend`,n)}function vt(){for(let[e]of bt)`isConnected`in e&&!e.isConnected&&bt.delete(e)}function yt(e){requestAnimationFrame(()=>{vt(),bt.size===0?e():xt.add(e)})}var bt,xt,St=o((()=>{bt=new Map,xt=new Set,typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,_t):_t())}));function Ct(){let e=(0,f.useRef)(new Map),t=(0,f.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,f.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,f.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,f.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}var wt=o((()=>{}));function Tt(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=re(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(` `):i&&=i.trim().split(/\s+/).join(` `),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}var Et=o((()=>{le()}));function Dt(e){let t=(0,f.useRef)(null),n=(0,f.useRef)(void 0),r=(0,f.useCallback)(t=>{if(typeof e==`function`){let n=e,r=n(t);return()=>{typeof r==`function`?r():n(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,f.useMemo)(()=>({get current(){return t.current},set current(e){t.current=e,n.current&&=(n.current(),void 0),e!=null&&(n.current=r(e))}}),[r])}var Ot=o((()=>{}));function kt(e,t){let n=(0,f.useRef)(!0),r=(0,f.useRef)(null);(0,f.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,f.useEffect)(()=>{let i=r.current;n.current?n.current=!1:(!i||t.some((e,t)=>!Object.is(e,i[t])))&&e(),r.current=t},t)}var At=o((()=>{}));function jt(e,t){let n=(0,f.useRef)(!0),r=(0,f.useRef)(null);T(()=>(n.current=!0,()=>{n.current=!1}),[]),T(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}var Mt=o((()=>{E()}));function Nt(){return window.ResizeObserver!==void 0}function Pt(e){let{ref:t,box:n,onResize:r}=e;(0,f.useEffect)(()=>{let e=t?.current;if(e){if(Nt()){let t=new window.ResizeObserver(e=>{e.length&&r()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}return window.addEventListener(`resize`,r,!1),()=>{window.removeEventListener(`resize`,r,!1)}}},[r,t,n])}var Ft=o((()=>{}));function It(e,t){T(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}var Lt=o((()=>{E()}));function Rt(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}var zt=o((()=>{}));function Bt(e,t){let n=e;for(Rt(n,t)&&(n=n.parentElement);n&&!Rt(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}var Vt=o((()=>{zt()}));function Ht(e,t){let n=[];for(;e&&e!==document.documentElement;)Rt(e,t)&&n.push(e),e=e.parentElement;return n}var Ut=o((()=>{zt()}));function Wt(){let e=z(),[t,n]=(0,f.useState)(()=>e?{width:0,height:0}:Gt());return(0,f.useEffect)(()=>{let e=()=>{n(e=>{let t=Gt();return t.width===e.width&&t.height===e.height?e:t})};return Kt?Kt.addEventListener(`resize`,e):window.addEventListener(`resize`,e),()=>{Kt?Kt.removeEventListener(`resize`,e):window.removeEventListener(`resize`,e)}},[]),t}function Gt(){return{width:Kt&&Kt?.width||window.innerWidth,height:Kt&&Kt?.height||window.innerHeight}}var Kt,qt=o((()=>{ne(),Kt=typeof document<`u`&&window.visualViewport}));function Jt(e){let[t,n]=(0,f.useState)();return T(()=>{if(!e)return;let t=Xt.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${Yt++}`;n(r);let i=document.createElement(`div`);i.id=r,i.style.display=`none`,i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},Xt.set(e,t)}return t.refCount++,()=>{t&&--t.refCount===0&&(t.element.remove(),Xt.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}var Yt,Xt,Zt=o((()=>{E(),Yt=0,Xt=new Map}));function Qt(e,t,n,r){let i=D(n),a=n==null;(0,f.useEffect)(()=>{if(a||!e.current)return;let n=e.current;return n.addEventListener(t,i,r),()=>{n.removeEventListener(t,i,r)}},[e,t,r,a,i])}var $t=o((()=>{k()}));function en(e,t){let n=tn(e,t,`left`),r=tn(e,t,`top`),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:c,borderLeftWidth:l,scrollPaddingTop:u,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),m=o+parseInt(l,10),h=s+parseInt(c,10),g=m+e.clientWidth,_=h+e.clientHeight,v=parseInt(u,10)||0,y=parseInt(f,10)||0,b=parseInt(d,10)||0,x=parseInt(p,10)||0;n<=o+x?o=n-parseInt(l,10)-x:n+i>g-b&&(o+=n+i-g+b),r<=h+v?s=r-parseInt(c,10)-v:r+a>_-y&&(s+=r+a-_+y),e.scrollLeft=o,e.scrollTop=s}function tn(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function nn(e,t){if(e&&document.contains(e)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow!==`hidden`){var n;let{left:o,top:s}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)==null||n.call(e,{block:`nearest`});let{left:c,top:l}=e.getBoundingClientRect();if(Math.abs(o-c)>1||Math.abs(s-l)>1){var r,i,a;t==null||(i=t.containingElement)==null||(r=i.scrollIntoView)==null||r.call(i,{block:`center`,inline:`center`}),(a=e.scrollIntoView)==null||a.call(e,{block:`nearest`})}}else{let t=Ht(e);for(let n of t)en(n,e)}}}var rn=o((()=>{Ut()}));function an(e){return e.pointerType===``&&e.isTrusted?!0:it()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function on(e){return!it()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`}var sn=o((()=>{ot()}));function cn(e,t,n){let r=D(()=>{n&&n(t)});(0,f.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener(`reset`,r),()=>{t?.removeEventListener(`reset`,r)}},[e,r])}var ln=o((()=>{k()}));function un(e,t){let{collection:n,onLoadMore:r,scrollOffset:i=1}=e,a=(0,f.useRef)(null),o=D(e=>{for(let t of e)t.isIntersecting&&r&&r()});T(()=>(t.current&&(a.current=new IntersectionObserver(o,{root:Bt(t?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),a.current.observe(t.current)),()=>{a.current&&a.current.disconnect()}),[n,o,t,i])}var dn=o((()=>{Vt(),k(),E()}));function fn(e){let t=f.version.split(`.`);return parseInt(t[0],10)>=19?e:e?`true`:void 0}var eee=o((()=>{})),pn,mn,hn=o((()=>{pn=`react-aria-clear-focus`,mn=`react-aria-focus`}));function gn(e){return Ze()?e.metaKey:e.ctrlKey}var _n=o((()=>{ot()}));function vn(e,t=!0){let[n,r]=(0,f.useState)(!0),i=n&&t;return T(()=>{if(i&&e.current&&`getAnimations`in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,i]),bn(e,i,(0,f.useCallback)(()=>r(!1),[])),i}function yn(e,t){let[n,r]=(0,f.useState)(t?`open`:`closed`);switch(n){case`open`:t||r(`exiting`);break;case`closed`:case`exiting`:t&&r(`open`)}let i=n===`exiting`;return bn(e,i,(0,f.useCallback)(()=>{r(e=>e===`exiting`?`closed`:e)},[])),i}function bn(e,t,n){T(()=>{if(t&&e.current){if(!(`getAnimations`in e.current)){n();return}let t=e.current.getAnimations();if(t.length===0){n();return}let r=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{r||(0,m.flushSync)(()=>{n()})}).catch(()=>{}),()=>{r=!0}}},[e,t,n])}var xn=o((()=>{E()}));function Sn(e){let t=he(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!==`none`&&r!==`hidden`&&r!==`collapse`;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);i=n!==`none`&&r!==`hidden`&&r!==`collapse`}return i}function Cn(e,t){return!e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-react-aria-prevent-focus`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function wn(e,t){return Tn?e.checkVisibility()&&!e.closest(`[data-react-aria-prevent-focus]`):e.nodeName!==`#comment`&&Sn(e)&&Cn(e,t)&&(!e.parentElement||wn(e.parentElement,e))}var Tn,En=o((()=>{ge(),Tn=typeof Element<`u`&&`checkVisibility`in Element.prototype}));function Dn(e){return e.matches(jn)&&wn(e)&&!kn(e)}function On(e){return e.matches(Mn)&&wn(e)&&!kn(e)}function kn(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}var An,jn,Mn,Nn=o((()=>{En(),An=[`input:not([disabled]):not([type=hidden])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable^="false"])`,`permission`],jn=An.join(`:not([hidden]),`)+`,[tabindex]:not([disabled]):not([hidden])`,An.push(`[tabindex]:not([tabindex="-1"]):not([disabled])`),Mn=An.join(`:not([hidden]):not([tabindex="-1"]),`)}));function Pn(e,t,n){let[r,i]=(0,f.useState)(e||t),a=(0,f.useRef)(e!==void 0),o=e!==void 0;(0,f.useEffect)(()=>{a.current,a.current=o},[o]);let s=o?e:r,c=(0,f.useCallback)((e,...t)=>{let r=(e,...t)=>{n&&(Object.is(s,e)||n(e,...t)),o||(s=e)};typeof e==`function`?i((n,...i)=>{let a=e(o?s:n,...i);return r(a,...t),o?n:a}):(o||i(e),r(e,...t))},[o,s,n]);return[s,c]}var tee=o((()=>{}));function Fn(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}var nee=o((()=>{})),In=o((()=>{tee(),nee()})),Ln=o((()=>{le(),de(),Ee(),Ce(),ge(),je(),Pe(),Ve(),qe(),gt(),St(),wt(),Et(),Ot(),At(),Mt(),E(),Ft(),Lt(),Vt(),zt(),qt(),Zt(),ot(),$t(),rn(),sn(),k(),ln(),dn(),eee(),hn(),_n(),xn(),Nn(),In()}));function Rn({values:e,children:t}){for(let[n,r]of e)t=f.default.createElement(n.Provider,{value:r},t);return t}function zn(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s}=e;return(0,f.useMemo)(()=>{let e,c,l;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,l=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:l??a,"data-rac":``}},[t,n,r,i,a,o,s])}function Bn(e,t){let n=(0,f.useContext)(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||Wn;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function Vn(e,t,n){let{ref:r,...i}=Bn(n,e.slot)||{},a=Dt((0,f.useMemo)(()=>Me(t,r),[t,r])),o=Ae(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(o.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[o,a]}function Hn(e=!0){let[t,n]=(0,f.useState)(e),r=(0,f.useRef)(!1),i=(0,f.useCallback)(e=>{r.current=!0,n(!!e)},[]);return T(()=>{r.current||n(!1)},[]),[i,t]}function Un(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}var Wn,Gn=o((()=>{Ln(),Wn=Symbol(`default`)}));function Kn(e,t=`assertive`,n=qn){Jn?Jn.announce(e,t,n):(Jn=new Yn,(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`)?Jn.announce(e,t,n):setTimeout(()=>{Jn?.isAttached()&&Jn?.announce(e,t,n)},100))}var qn,Jn,Yn,Xn=o((()=>{qn=7e3,Jn=null,Yn=class{isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement(`div`);return t.setAttribute(`role`,`log`),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-relevant`,`additions`),t}destroy(){this.node&&=(document.body.removeChild(this.node),null)}announce(e,t=`assertive`,n=qn){var r,i;if(!this.node)return;let a=document.createElement(`div`);typeof e==`object`?(a.setAttribute(`role`,`img`),a.setAttribute(`aria-labelledby`,e[`aria-labelledby`])):a.textContent=e,t===`assertive`?(r=this.assertiveLog)==null||r.appendChild(a):(i=this.politeLog)==null||i.appendChild(a),e!==``&&setTimeout(()=>{a.remove()},n)}clear(e){this.node&&((!e||e===`assertive`)&&this.assertiveLog&&(this.assertiveLog.innerHTML=``),(!e||e===`polite`)&&this.politeLog&&(this.politeLog.innerHTML=``))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<`u`&&(this.node=document.createElement(`div`),this.node.dataset.liveAnnouncer=`true`,Object.assign(this.node.style,{border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`}),this.assertiveLog=this.createLog(`assertive`),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog(`polite`),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}})),Zn=o((()=>{Xn()}));function Qn(e){let t=0,n=0,r=0,i=0,a=0,o=0,s={},c=(_r?.scale??1)>1;if(e.tagName===`BODY`){let c=document.documentElement;r=c.clientWidth,i=c.clientHeight,t=_r?.width??r,n=_r?.height??i,s.top=c.scrollTop||e.scrollTop,s.left=c.scrollLeft||e.scrollLeft,_r&&(a=_r.offsetTop,o=_r.offsetLeft)}else({width:t,height:n,top:a,left:o}=cr(e,!1)),s.top=e.scrollTop,s.left=e.scrollLeft,r=t,i=n;return nt()&&(e.tagName===`BODY`||e.tagName===`HTML`)&&c&&(s.top=0,s.left=0,a=_r?.pageTop??0,o=_r?.pageLeft??0),{width:t,height:n,totalWidth:r,totalHeight:i,scroll:s,top:a,left:o}}function $n(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function er(e,t,n,r,i,a,o){let s=i.scroll[e]??0,c=r[mr[e]],l=r.scroll[dr[e]]+a,u=c+r.scroll[dr[e]]-a,d=t-s+o[e]-r[dr[e]],f=t-s+n+o[e]-r[dr[e]];return d<l?l-d:f>u?Math.max(u-f,l-d):0}function tr(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function nr(e){if(gr[e])return gr[e];let[t,n]=e.split(` `),r=dr[t]||`right`,i=pr[r];dr[n]||(n=`center`);let a=mr[r],o=mr[i];return gr[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:a,crossSize:o},gr[e]}function rr(e,t,n,r,i,a,o,s,c,l){let{placement:u,crossPlacement:d,axis:f,crossAxis:p,size:m,crossSize:h}=r,g={};g[p]=e[p]??0,d===`center`?g[p]+=((e[h]??0)-(n[h]??0))/2:d!==p&&(g[p]+=(e[h]??0)-(n[h]??0)),g[p]+=a;let _=e[p]-n[h]+c+l,v=e[p]+e[h]-c-l;if(g[p]=Fn(g[p],_,v),u===f){let n=s?o[m]:t[hr[m]];g[fr[f]]=Math.floor(n-e[f]+i)}else g[f]=Math.floor(e[f]+e[m]+i);return g}function ir(e,t,n,r,i,a,o,s){let c=r?n.height:t[hr.height],l=e.top==null?n.top+(c-(e.bottom??0)-o):n.top+e.top,u=s===`top`?Math.max(0,l+o-(t.top+(t.scroll.top??0))-((i.top??0)+(i.bottom??0)+a)):Math.max(0,t.height+t.top+(t.scroll.top??0)-l-((i.top??0)+(i.bottom??0)+a));return Math.min(t.height-a*2,u)}function ar(e,t,n,r,i,a){let{placement:o,axis:s,size:c}=a;return o===s?Math.max(0,n[s]-e[s]-(e.scroll[s]??0)+t[s]-(r[s]??0)-r[fr[s]]-i):Math.max(0,e[c]+e[s]+e.scroll[s]-t[s]-n[s]-n[c]-(r[s]??0)-r[fr[s]]-i)}function ree(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=nr(e),{size:_,crossAxis:v,crossSize:y,placement:b,crossPlacement:x}=g,S=rr(t,s,n,g,u,d,l,f,m,h),C=u,w=ar(s,l,t,i,a+u,g);if(o&&r[_]>w){let e=nr(`${fr[b]} ${x}`),r=rr(t,s,n,e,u,d,l,f,m,h);ar(s,l,t,i,a+u,e)>w&&(g=e,S=r,C=u)}let T=`bottom`;g.axis===`top`?g.placement===`top`?T=`top`:g.placement===`bottom`&&(T=`bottom`):g.crossAxis===`top`&&(g.crossPlacement===`top`?T=`bottom`:g.crossPlacement===`bottom`&&(T=`top`));let E=er(v,S[v],n[y],s,c,a,l);S[v]+=E;let D=ir(S,s,l,f,i,a,n.height,T);p&&p<D&&(D=p),n.height=Math.min(n.height,D),S=rr(t,s,n,g,C,d,l,f,m,h),E=er(v,S[v],n[y],s,c,a,l),S[v]+=E;let O={},k=t[v]-S[v]-i[dr[v]],A=k+.5*t[y],j=m/2+h,M=dr[v]===`left`?(i.left??0)+(i.right??0):(i.top??0)+(i.bottom??0),N=n[y]-M-m/2-h;O[v]=Fn(Fn(A,t[v]+m/2-(S[v]+i[dr[v]]),t[v]+t[y]-m/2-(S[v]+i[dr[v]])),j,N),{placement:b,crossPlacement:x}=g,m?k=O[v]:x===`right`?k+=t[y]:x===`center`&&(k+=t[y]/2);let P=b===`left`||b===`top`?n[_]:0,F={x:b===`top`||b===`bottom`?k:P,y:b===`left`||b===`right`?k:P};return{position:S,maxHeight:D,arrowOffsetLeft:O.left,arrowOffsetTop:O.top,placement:b,triggerAnchorPoint:F}}function or(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:i,padding:a,shouldFlip:o,boundaryElement:s,offset:c,crossOffset:l,maxHeight:u,arrowSize:d=0,arrowBoundaryOffset:f=0}=e,p=r instanceof HTMLElement?iee(r):document.documentElement,m=p===document.documentElement,h=window.getComputedStyle(p).position,g=!!h&&h!==`static`,_=m?cr(n,!1):lr(n,p,!1);if(!m){let{marginTop:e,marginLeft:t}=window.getComputedStyle(n);_.top+=parseInt(e,10)||0,_.left+=parseInt(t,10)||0}let v=cr(r,!0),y=tr(r);v.width+=(y.left??0)+(y.right??0),v.height+=(y.top??0)+(y.bottom??0);let b=$n(i),x=Qn(s),S=Qn(p),C=s.tagName===`BODY`?cr(p,!1):lr(p,s,!1);return p.tagName===`HTML`&&s.tagName===`BODY`&&(S.scroll.top=0,S.scroll.left=0),ree(t,_,v,b,y,a,o,x,S,C,c,l,g,u,d,f)}function sr(e,t){let{top:n,left:r,width:i,height:a}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(i=e.offsetWidth,a=e.offsetHeight),{top:n,left:r,width:i,height:a}}function cr(e,t){let{top:n,left:r,width:i,height:a}=sr(e,t),{scrollTop:o,scrollLeft:s,clientTop:c,clientLeft:l}=document.documentElement;return{top:n+o-c,left:r+s-l,width:i,height:a}}function lr(e,t,n){let r=window.getComputedStyle(e),i;if(r.position===`fixed`)i=sr(e,n);else{i=cr(e,n);let r=cr(t,n),a=window.getComputedStyle(t);r.top+=(parseInt(a.borderTopWidth,10)||0)-t.scrollTop,r.left+=(parseInt(a.borderLeftWidth,10)||0)-t.scrollLeft,i.top-=r.top,i.left-=r.left}return i.top-=parseInt(r.marginTop,10)||0,i.left-=parseInt(r.marginLeft,10)||0,i}function iee(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position===`static`&&!ur(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!ur(t);)t=t.parentElement;return t||document.documentElement}function ur(e){let t=window.getComputedStyle(e);return t.transform!==`none`||/transform|perspective/.test(t.willChange)||t.filter!==`none`||t.contain===`paint`||`backdropFilter`in t&&t.backdropFilter!==`none`||`WebkitBackdropFilter`in t&&t.WebkitBackdropFilter!==`none`}var dr,fr,pr,mr,hr,gr,_r,vr=o((()=>{Ln(),dr={top:`top`,bottom:`top`,left:`left`,right:`left`},fr={top:`bottom`,bottom:`top`,left:`right`,right:`left`},pr={top:`left`,left:`top`},mr={top:`height`,left:`width`},hr={width:`totalWidth`,height:`totalHeight`},gr={},_r=typeof document<`u`?window.visualViewport:null}));function yr(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,f.useEffect)(()=>{if(!n||r===null)return;let e=e=>{let n=e.target;if(!t.current||n instanceof Node&&!n.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let i=r||br.get(t.current);i&&i()};return window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`scroll`,e,!0)}},[n,r,t])}var br,xr=o((()=>{br=new WeakMap}));function Sr(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n=typeof t.getTextInfo==`function`?t.getTextInfo():t.textInfo;if(n)return n.direction===`rtl`;if(t.script)return Cr.has(t.script)}let t=e.split(`-`)[0];return aee.has(t)}var Cr,aee,oee=o((()=>{Cr=new Set([`Arab`,`Syrc`,`Samr`,`Mand`,`Thaa`,`Mend`,`Nkoo`,`Adlm`,`Rohg`,`Hebr`]),aee=new Set([`ae`,`ar`,`arc`,`bcc`,`bqi`,`ckb`,`dv`,`fa`,`glk`,`he`,`ku`,`mzn`,`nqo`,`pnb`,`ps`,`sd`,`ug`,`ur`,`yi`])}));function wr(){let e=typeof window<`u`&&window[lee]||typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return{locale:e,direction:Sr(e)?`rtl`:`ltr`}}function see(){Tr=wr();for(let e of Er)e(Tr)}function cee(){let e=z(),[t,n]=(0,f.useState)(Tr);return(0,f.useEffect)(()=>(Er.size===0&&window.addEventListener(`languagechange`,see),Er.add(n),()=>{Er.delete(n),Er.size===0&&window.removeEventListener(`languagechange`,see)}),[]),e?{locale:`en-US`,direction:`ltr`}:t}var lee,Tr,Er,Dr=o((()=>{oee(),ne(),lee=Symbol.for(`react-aria.i18n.locale`),Tr=wr(),Er=new Set}));function Or(){let e=cee();return(0,f.useContext)(uee)||e}var uee,kr=o((()=>{Dr(),uee=f.default.createContext(null)}));function dee(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function fee(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ar,jr=o((()=>{Ar=function(){return Ar=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Ar.apply(this,arguments)}}));function pee(e,t,n=`en-US`){if(t[e])return t[e];let r=Mr(e),i=mee(e);if(i&&t[`${r}-${i}`])return t[`${r}-${i}`];if(t[r])return t[r];for(let e in t)if(e.startsWith(r+`-`))return t[e];return t[n]}function Mr(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}function mee(e){if(Intl.Locale)return new Intl.Locale(e).script}var hee,gee,Nr,Pr,_ee=o((()=>{hee=Symbol.for(`react-aria.i18n.locale`),gee=Symbol.for(`react-aria.i18n.strings`),Nr=void 0,Pr=class e{constructor(e,t=`en-US`){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=pee(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(t){if(typeof window>`u`)return null;let n=window[hee];if(Nr===void 0){let t=window[gee];if(!t)return null;Nr={};for(let r in t)Nr[r]=new e({[n]:t[r]},n)}let r=Nr?.[t];if(!r)throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}}})),Fr,Ir,Lr,Rr=o((()=>{Fr=new Map,Ir=new Map,Lr=class{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==`function`?n(t,this):n}plural(e,t,n=`cardinal`){let r=t[`=`+e];if(r)return typeof r==`function`?r():r;let i=this.locale+`:`+n,a=Fr.get(i);return a||(a=new Intl.PluralRules(this.locale,{type:n}),Fr.set(i,a)),r=t[a.select(e)]||t.other,typeof r==`function`?r():r}number(e){let t=Ir.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),Ir.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==`function`?n():n}}})),vee=o((()=>{_ee(),Rr()}));function yee(e){let t=Br.get(e);return t||(t=new Pr(e),Br.set(e,t)),t}function bee(e,t){return t&&Pr.getGlobalDictionaryForPackage(t)||yee(e)}function zr(e,t){let{locale:n}=Or(),r=bee(e,t);return(0,f.useMemo)(()=>new Lr(n,r),[n,r])}var Br,xee=o((()=>{kr(),vee(),Br=new WeakMap}));function Vr(e){let{locale:t}=Or(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(Hr.has(n))return Hr.get(n);let r=new Intl.Collator(t,e);return Hr.set(n,r),r}var Hr,See=o((()=>{kr(),Hr=new Map})),Ur=o((()=>{kr(),xee(),See()}));function Cee(e){let{direction:t}=Or(),{arrowSize:n,targetRef:r,overlayRef:i,arrowRef:a,scrollRef:o=i,placement:s=`bottom`,containerPadding:c=12,shouldFlip:l=!0,boundaryElement:u=typeof document<`u`?document.body:null,offset:d=0,crossOffset:p=0,shouldUpdatePosition:m=!0,isOpen:h=!0,onClose:g,maxHeight:_,arrowBoundaryOffset:v=0}=e,[y,b]=(0,f.useState)(null),x=[m,s,i.current,r.current,a?.current,o.current,c,l,u,d,p,h,t,_,v,n],S=(0,f.useRef)(Wr?.scale);(0,f.useEffect)(()=>{h&&(S.current=Wr?.scale)},[h]);let C=(0,f.useCallback)(()=>{if(m===!1||!h||!i.current||!r.current||!u||Wr?.scale!==S.current)return;let e=null;if(o.current&&o.current.contains(document.activeElement)){let t=document.activeElement?.getBoundingClientRect(),n=o.current.getBoundingClientRect();e={type:`top`,offset:(t?.top??0)-n.top},e.offset>n.height/2&&(e.type=`bottom`,e.offset=(t?.bottom??0)-n.bottom)}let f=i.current;!_&&i.current&&(f.style.top=`0px`,f.style.bottom=``,f.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+`px`);let g=or({placement:Tee(s,t),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:c,shouldFlip:l,boundaryElement:u,offset:d,crossOffset:p,maxHeight:_,arrowSize:n??(a?.current?sr(a.current,!0).width:0),arrowBoundaryOffset:v});if(g.position){if(f.style.top=``,f.style.bottom=``,f.style.left=``,f.style.right=``,Object.keys(g.position).forEach(e=>f.style[e]=g.position[e]+`px`),f.style.maxHeight=g.maxHeight==null?``:g.maxHeight+`px`,e&&document.activeElement&&o.current){let t=document.activeElement.getBoundingClientRect(),n=o.current.getBoundingClientRect(),r=t[e.type]-n[e.type];o.current.scrollTop+=r-e.offset}b(g)}},x);T(C,x),wee(C),Pt({ref:i,onResize:C}),Pt({ref:r,onResize:C});let w=(0,f.useRef)(!1);T(()=>{let e,t=()=>{w.current=!0,clearTimeout(e),e=setTimeout(()=>{w.current=!1},500),C()},n=()=>{w.current&&t()};return Wr?.addEventListener(`resize`,t),Wr?.addEventListener(`scroll`,n),()=>{Wr?.removeEventListener(`resize`,t),Wr?.removeEventListener(`scroll`,n)}},[C]);let E=(0,f.useCallback)(()=>{w.current||g?.()},[g,w]);return yr({triggerRef:r,isOpen:h,onClose:g&&E}),{overlayProps:{style:{position:y?`absolute`:`fixed`,top:y?void 0:0,left:y?void 0:0,zIndex:1e5,...y?.position,maxHeight:y?.maxHeight??`100vh`}},placement:y?.placement??null,triggerAnchorPoint:y?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":`true`,role:`presentation`,style:{left:y?.arrowOffsetLeft,top:y?.arrowOffsetTop}},updatePosition:C}}function wee(e){T(()=>(window.addEventListener(`resize`,e,!1),()=>{window.removeEventListener(`resize`,e,!1)}),[e])}function Tee(e,t){return t===`rtl`?e.replace(`start`,`right`).replace(`end`,`left`):e.replace(`start`,`left`).replace(`end`,`right`)}var Wr,Eee=o((()=>{vr(),xr(),Ln(),Ur(),Wr=typeof document<`u`?window.visualViewport:null}));function Dee(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Oee(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function kee(e){let t=(0,f.useRef)({isFocused:!1,observer:null});T(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]);let n=D(t=>{e?.(t)});return(0,f.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener(`focusout`,e=>{if(t.current.isFocused=!1,r.disabled){let t=Dee(e);n(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;(e=t.current.observer)==null||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:n})),r.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:[`disabled`]})}},[n])}function Aee(e){for(;e&&!Dn(e);)e=e.parentElement;let t=he(e),n=t.document.activeElement;if(!n||n===e)return;Gr=!0;let r=!1,i=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},a=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),!e&&!r&&(r=!0,He(n),c()))},o=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,He(n),c()))};t.addEventListener(`blur`,i,!0),t.addEventListener(`focusout`,a,!0),t.addEventListener(`focusin`,s,!0),t.addEventListener(`focus`,o,!0);let c=()=>{cancelAnimationFrame(l),t.removeEventListener(`blur`,i,!0),t.removeEventListener(`focusout`,a,!0),t.removeEventListener(`focusin`,s,!0),t.removeEventListener(`focus`,o,!0),Gr=!1,r=!1},l=requestAnimationFrame(c);return c}var Gr,jee=o((()=>{Ln(),Gr=!1}));function Mee(e){if(et()){if(Kr==="default"){let t=me(e);Pee=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect=`none`}Kr=`disabled`}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;qr.set(e,e.style[t]),e.style[t]=`none`}}function Nee(e){if(et()){if(Kr!==`disabled`)return;Kr=`restoring`,setTimeout(()=>{yt(()=>{if(Kr===`restoring`){let t=me(e);t.documentElement.style.webkitUserSelect===`none`&&(t.documentElement.style.webkitUserSelect=Pee||``),Pee=``,Kr=`default`}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&qr.has(e)){let t=qr.get(e),n=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;e.style[n]===`none`&&(e.style[n]=t),e.getAttribute(`style`)===``&&e.removeAttribute(`style`),qr.delete(e)}}var Kr,Pee,qr,Fee=o((()=>{Ln(),Kr=`default`,Pee=``,qr=new WeakMap})),Jr,Iee=o((()=>{Jr=f.default.createContext({register:()=>{}}),Jr.displayName=`PressResponderContext`}));function Lee(e,t){return t.get?t.get.call(e):t.value}var Ree=o((()=>{}));function zee(e,t,n){if(!t.has(e))throw TypeError(`attempted to `+n+` private field on non-instance`);return t.get(e)}var Bee=o((()=>{}));function Vee(e,t){return Lee(e,zee(e,t,`get`))}var Hee=o((()=>{Ree(),Bee()}));function Uee(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}var Wee=o((()=>{}));function Gee(e,t,n){Uee(e,t),t.set(e,n)}var Kee=o((()=>{Wee()}));function qee(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError(`attempted to set read only private field`);t.value=n}}var Jee=o((()=>{}));function Yr(e,t,n){return qee(e,zee(e,t,`set`),n),n}var Yee=o((()=>{Jee(),Bee()}));function Xee(e){let t=(0,f.useContext)(Jr);if(t){let{register:n,...r}=t;e=Ae(r,e),n()}return It(t,e.ref),e}function Xr(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,onClick:o,isDisabled:s,isPressed:c,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:p,...m}=Xee(e),[h,g]=(0,f.useState)(!1),_=(0,f.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:v,removeAllGlobalListeners:y}=Ct(),b=D((e,t)=>{let i=_.current;if(s||i.didFirePressStart)return!1;let a=!0;if(i.isTriggeringEvent=!0,r){let n=new $r(`pressstart`,t,e);r(n),a=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,g(!0),a}),x=D((e,r,a=!0)=>{let o=_.current;if(!o.didFirePressStart)return!1;o.didFirePressStart=!1,o.isTriggeringEvent=!0;let c=!0;if(i){let t=new $r(`pressend`,r,e);i(t),c=t.shouldStopPropagation}if(n&&n(!1),g(!1),t&&a&&!s){let n=new $r(`press`,r,e);t(n),c&&=n.shouldStopPropagation}return o.isTriggeringEvent=!1,c}),S=D((e,t)=>{let n=_.current;if(s)return!1;if(a){n.isTriggeringEvent=!0;let r=new $r(`pressup`,t,e);return a(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),C=D(e=>{let t=_.current;if(t.isPressed&&t.target){t.didFirePressStart&&t.pointerType!=null&&x(Zr(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,y(),d||Nee(t.target);for(let e of t.disposables)e();t.disposables=[]}}),w=D(e=>{u&&C(e)}),T=D(e=>{o?.(e)}),E=D((e,t)=>{if(o){let n=new MouseEvent(`click`,e);Oee(n,t),o(Dee(n))}}),O=(0,f.useMemo)(()=>{let e=_.current,t={onKeyDown(t){if(Qee(t.nativeEvent,t.currentTarget)&&be(t.currentTarget,xe(t.nativeEvent))){var r;ete(xe(t.nativeEvent),t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType=`keyboard`,i=b(t,`keyboard`);let r=t.currentTarget;v(me(t.currentTarget),`keyup`,ue(t=>{Qee(t,r)&&!t.repeat&&be(r,xe(t))&&e.target&&S(Zr(e.target,t),`keyboard`)},n),!0)}i&&t.stopPropagation(),t.metaKey&&Ze()&&((r=e.metaKeyEvents)==null||r.set(t.key,t.nativeEvent))}else t.key===`Meta`&&(e.metaKeyEvents=new Map)},onClick(t){if(!(t&&!be(t.currentTarget,xe(t.nativeEvent)))&&t&&t.button===0&&!e.isTriggeringEvent&&!lt.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType===`virtual`||an(t.nativeEvent))){let e=b(t,`virtual`),r=S(t,`virtual`),i=x(t,`virtual`);T(t),n=e&&r&&i}else if(e.isPressed&&e.pointerType!==`keyboard`){let r=e.pointerType||t.nativeEvent.pointerType||`virtual`,i=S(Zr(t.currentTarget,t),r),a=x(Zr(t.currentTarget,t),r,!0);n=i&&a,e.isOverTarget=!1,T(t),C(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{if(e.isPressed&&e.target&&Qee(t,e.target)){var n;ete(xe(t),t.key)&&t.preventDefault();let r=xe(t),i=be(e.target,xe(t));x(Zr(e.target,t),`keyboard`,i),i&&E(t,e.target),y(),t.key!==`Enter`&&Zee(e.target)&&be(e.target,r)&&!t[nte]&&(t[nte]=!0,lt(e.target,t,!1)),e.isPressed=!1,(n=e.metaKeyEvents)==null||n.delete(t.key)}else if(t.key===`Meta`&&e.metaKeyEvents?.size){var r;let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())(r=e.target)==null||r.dispatchEvent(new KeyboardEvent(`keyup`,n))}};if(typeof PointerEvent<`u`){t.onPointerDown=t=>{if(t.button!==0||!be(t.currentTarget,xe(t.nativeEvent)))return;if(on(t.nativeEvent)){e.pointerType=`virtual`;return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||Mee(e.target),i=b(t,e.pointerType);let a=xe(t.nativeEvent);`releasePointerCapture`in a&&a.releasePointerCapture(t.pointerId),v(me(t.currentTarget),`pointerup`,n,!1),v(me(t.currentTarget),`pointercancel`,r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(be(t.currentTarget,xe(t.nativeEvent))&&t.button===0){if(l){let n=Aee(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{!be(t.currentTarget,xe(t.nativeEvent))||e.pointerType===`virtual`||t.button===0&&!e.isPressed&&S(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,b(Zr(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,x(Zr(e.target,t),e.pointerType,!1),w(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target){if(be(e.target,xe(t))&&e.pointerType!=null){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?C(t):(He(e.target),e.target.click()))},80);v(t.currentTarget,`click`,()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else C(t);e.isOverTarget=!1}},r=e=>{C(e)};t.onDragStart=e=>{be(e.currentTarget,xe(e.nativeEvent))&&C(e)}}return t},[v,s,l,y,d,C,w,x,b,S,T,E]);return(0,f.useEffect)(()=>{if(!p)return;let e=me(p.current);if(!e||!e.head||e.getElementById(rte))return;let t=e.createElement(`style`);t.id=rte,t.textContent=`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manifest-editor",
3
- "version": "2.2.1-next.0.eefc2e3",
3
+ "version": "2.2.1",
4
4
  "type": "module",
5
5
  "bugs": "https://github.com/digirati-co-uk/iiif-manifest-editor/issues",
6
6
  "repository": {
@@ -99,15 +99,15 @@
99
99
  "@iiif/parser": "4.0.1",
100
100
  "@iiif/presentation-3": "^2.2.3",
101
101
  "@iiif/presentation-3-normalized": "^0.9.7",
102
- "@manifest-editor/collection-preset": "2.2.1-next.0.eefc2e3",
103
- "@manifest-editor/components": "2.2.1-next.0.eefc2e3",
104
- "@manifest-editor/creator-api": "2.2.1-next.0.eefc2e3",
105
- "@manifest-editor/creators": "2.2.1-next.0.eefc2e3",
106
- "@manifest-editor/editor-api": "2.2.1-next.0.eefc2e3",
107
- "@manifest-editor/editors": "2.2.1-next.0.eefc2e3",
108
- "@manifest-editor/exhibition-preset": "2.2.1-next.0.eefc2e3",
109
- "@manifest-editor/manifest-preset": "2.2.1-next.0.eefc2e3",
110
- "@manifest-editor/shell": "2.2.1-next.0.eefc2e3",
102
+ "@manifest-editor/collection-preset": "2.2.1",
103
+ "@manifest-editor/components": "2.2.1",
104
+ "@manifest-editor/creator-api": "2.2.1",
105
+ "@manifest-editor/creators": "2.2.1",
106
+ "@manifest-editor/editor-api": "2.2.1",
107
+ "@manifest-editor/editors": "2.2.1",
108
+ "@manifest-editor/exhibition-preset": "2.2.1",
109
+ "@manifest-editor/manifest-preset": "2.2.1",
110
+ "@manifest-editor/shell": "2.2.1",
111
111
  "@mdxeditor/editor": "^4.0.4",
112
112
  "iiif-browser": "https://pkg.pr.new/digirati-co-uk/iiif-browser/iiif-browser@4934ee2",
113
113
  "react": "19.2.8",
@@ -115,7 +115,7 @@
115
115
  "react-iiif-vault": "4.0.0"
116
116
  },
117
117
  "devDependencies": {
118
- "@manifest-editor/ui": "2.2.0",
118
+ "@manifest-editor/ui": "2.2.1",
119
119
  "@tailwindcss/typography": "0.5.20",
120
120
  "@tsdown/css": "0.22.14",
121
121
  "@types/react": "19.2.18",
@@ -135,5 +135,5 @@
135
135
  "publishConfig": {
136
136
  "access": "public"
137
137
  },
138
- "gitHead": "eefc2e321c6da5d194285621f4d26376088f2bb2"
138
+ "gitHead": "903673e7c35feed673fc100cb0efe34733057c91"
139
139
  }