Skip to content

OIA-241: bundle omnia-tinymce 0.3.0 from npm instead of git submodule#1

Open
duchenean wants to merge 1 commit into
masterfrom
OIA-241-oauth2-sso-apps
Open

OIA-241: bundle omnia-tinymce 0.3.0 from npm instead of git submodule#1
duchenean wants to merge 1 commit into
masterfrom
OIA-241-oauth2-sso-apps

Conversation

@duchenean

@duchenean duchenean commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Companion to IMIO/imio.omnia.core#2 (OIA-241).

  • Switch the TinyMCE plugin bundle from git-submodule vendoring to the published npm package @imiobe/omnia-tinymce 0.3.0 (browser/resources/package.json + lockfile; make build-js copies the npm dist into browser/static/).
  • Same static filenames — no GenericSetup changes needed.

Tests: 247, 0 failures.

Summary by CodeRabbit

  • New Features
    • Updated the TinyMCE integration to use the published Omnia TinyMCE package.
    • Added refreshed plugin assets, localization data, configuration handling, and AI service connectivity.
  • Bug Fixes
    • Improved streaming response processing and error handling.
  • Chores
    • Simplified plugin asset installation and removed the previous submodule-based setup.
    • Updated build instructions and release documentation.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR replaces the TinyMCE git submodule with the pinned @imiobe/omnia-tinymce npm package, updates the build process and documentation, and regenerates the bundled JavaScript and CSS assets.

Changes

TinyMCE npm bundle

Layer / File(s) Summary
Bundle source and build wiring
src/imio/omnia/tinymce/browser/resources/package.json, Makefile, CLAUDE.md, .gitignore, CHANGES.rst
Pins @imiobe/omnia-tinymce to 0.3.0, copies its distribution files into browser/static/, updates rebuild instructions, ignores installed npm dependencies, and records the change in the changelog.
Bundled plugin update
src/imio/omnia/tinymce/browser/static/omnia-tinymce.js, src/imio/omnia/tinymce/browser/static/omnia-tinymce.css
Regenerates the plugin bundle with updated API streaming, agent endpoints, localization, options, menu wiring, embedded icons, and CSS utility definitions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant TinyMCE
  participant OmniaPlugin as omnia-tinymce.js
  participant OmniaAPI as Omnia agent API
  TinyMCE->>OmniaPlugin: invoke configured feature
  OmniaPlugin->>OmniaAPI: request /v1/agents/* endpoint
  OmniaAPI-->>OmniaPlugin: stream response chunks
  OmniaPlugin-->>TinyMCE: parse response and update UI
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: replacing the git submodule with the npm-bundled omnia-tinymce package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch OIA-241-oauth2-sso-apps

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.1)
src/imio/omnia/tinymce/browser/static/omnia-tinymce.js

ast-grep timed out on this file


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/imio/omnia/tinymce/browser/static/omnia-tinymce.css`:
- Line 1: Update the upstream source defining the omnia-blink and omnia-typing
keyframes to use 100% instead of to for the final keyframe selector, then
regenerate the committed omnia-tinymce.css artifact. Do not edit the minified
CSS directly, and preserve all other generated styles unchanged.
- Line 1: Regenerate the built stylesheet so every Omnia plugin rule is scoped
beneath [data-omnia], including :root/:host variables, all .om utility
selectors, animation-related rules, and TinyMCE selectors such as
.tox-editor-container and .tox-collection__item--active. Preserve the existing
scoped reset while ensuring no plugin styles can affect unrelated page markup or
TinyMCE instances.

In `@src/imio/omnia/tinymce/browser/static/omnia-tinymce.js`:
- Line 14: Sanitize all API-provided HTML before it reaches any
dangerouslySetInnerHTML usage in the floating panel, streaming preview, and side
panel. Apply a strict HTML allowlist, or convert the content to plain text, in
the shared rendering path so both preview and final insertion receive sanitized
content; do not render raw API output.
- Line 14: Move authToken handling from Ha.#c URL construction into Ha.#u
request headers using the X-CSRF-TOKEN header. Remove the _authenticator
query-parameter logic so both `#e` and `#f` POST requests keep the token out of URLs
while preserving existing headers.
- Around line 11-14: Update the async generator $a to normalize SSE lines by
removing trailing carriage returns before evaluating event data, ensuring [DONE]
is recognized for CRLF responses. When the reader reports done, process the
remaining buffered content once before exiting so the final event is yielded
instead of discarded.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 631d220f-9858-4ff4-a773-6a83ad84eb5e

📥 Commits

Reviewing files that changed from the base of the PR and between 564ee10 and 9969ee4.

⛔ Files ignored due to path filters (1)
  • src/imio/omnia/tinymce/browser/resources/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • .gitignore
  • .gitmodules
  • CHANGES.rst
  • CLAUDE.md
  • Makefile
  • src/imio/omnia/tinymce/browser/resources
  • src/imio/omnia/tinymce/browser/resources/package.json
  • src/imio/omnia/tinymce/browser/static/omnia-tinymce.css
  • src/imio/omnia/tinymce/browser/static/omnia-tinymce.js
💤 Files with no reviewable changes (2)
  • .gitmodules
  • src/imio/omnia/tinymce/browser/resources

@@ -1 +1 @@
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}:root,:host{--om-font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--om-color-red-600:oklch(57.7% .245 27.325);--om-color-gray-50:oklch(98.5% .002 247.839);--om-color-gray-100:oklch(96.7% .003 264.542);--om-color-gray-200:oklch(92.8% .006 264.531);--om-color-gray-300:oklch(87.2% .01 258.338);--om-color-gray-400:oklch(70.7% .022 261.325);--om-color-gray-500:oklch(55.1% .027 264.364);--om-color-gray-600:oklch(44.6% .03 256.802);--om-color-gray-700:oklch(37.3% .034 259.733);--om-color-gray-800:oklch(27.8% .033 256.848);--om-color-black:#000;--om-color-white:#fff;--om-spacing:.25rem;--om-text-xs:.75rem;--om-text-xs--line-height:calc(1 / .75);--om-text-sm:.875rem;--om-text-sm--line-height:calc(1.25 / .875);--om-font-weight-medium:500;--om-font-weight-semibold:600;--om-font-weight-bold:700;--om-tracking-wide:.025em;--om-leading-snug:1.375;--om-leading-normal:1.5;--om-leading-relaxed:1.625;--om-radius-md:.375rem;--om-radius-lg:.5rem;--om-default-transition-duration:.15s;--om-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}.om\:absolute{position:absolute}.om\:fixed{position:fixed}.om\:relative{position:relative}.om\:inset-0{inset:calc(var(--om-spacing) * 0)}.om\:top-0{top:calc(var(--om-spacing) * 0)}.om\:right-0{right:calc(var(--om-spacing) * 0)}.om\:bottom-0{bottom:calc(var(--om-spacing) * 0)}.om\:z-\[10000\]{z-index:10000}.om\:z-\[10001\]{z-index:10001}.om\:mt-2{margin-top:calc(var(--om-spacing) * 2)}.om\:mt-3{margin-top:calc(var(--om-spacing) * 3)}.om\:mt-auto{margin-top:auto}.om\:mb-0{margin-bottom:calc(var(--om-spacing) * 0)}.om\:mb-0\.5{margin-bottom:calc(var(--om-spacing) * .5)}.om\:mb-1\.5{margin-bottom:calc(var(--om-spacing) * 1.5)}.om\:mb-2{margin-bottom:calc(var(--om-spacing) * 2)}.om\:mb-\[1px\]{margin-bottom:1px}.om\:ml-2{margin-left:calc(var(--om-spacing) * 2)}.om\:ml-\[5px\]{margin-left:5px}.om\:box-border{box-sizing:border-box}.om\:block{display:block}.om\:flex{display:flex}.om\:inline-block{display:inline-block}.om\:inline-flex{display:inline-flex}.om\:h-1\.5{height:calc(var(--om-spacing) * 1.5)}.om\:h-6{height:calc(var(--om-spacing) * 6)}.om\:h-8{height:calc(var(--om-spacing) * 8)}.om\:h-\[1\.3em\]{height:1.3em}.om\:h-screen{height:100vh}.om\:max-h-\[50vh\]{max-height:50vh}.om\:max-h-\[300px\]{max-height:300px}.om\:min-h-0{min-height:calc(var(--om-spacing) * 0)}.om\:min-h-\[60px\]{min-height:60px}.om\:w-1\.5{width:calc(var(--om-spacing) * 1.5)}.om\:w-6{width:calc(var(--om-spacing) * 6)}.om\:w-8{width:calc(var(--om-spacing) * 8)}.om\:w-\[3px\]{width:3px}.om\:w-\[340px\]{width:340px}.om\:w-full{width:100%}.om\:max-w-\[calc\(100vw-16px\)\]{max-width:calc(100vw - 16px)}.om\:max-w-full{max-width:100%}.om\:flex-1{flex:1}.om\:flex-shrink-0,.om\:shrink-0{flex-shrink:0}.om\:animate-\[omnia-blink_0\.8s_step-end_infinite\]{animation:.8s step-end infinite omnia-blink}.om\:animate-\[omnia-typing_1\.1s_ease-in-out_infinite\]{animation:1.1s ease-in-out infinite omnia-typing}.om\:cursor-grab{cursor:grab}.om\:cursor-nwse-resize{cursor:nwse-resize}.om\:cursor-pointer{cursor:pointer}.om\:resize-y{resize:vertical}.om\:flex-col{flex-direction:column}.om\:items-center{align-items:center}.om\:items-end{align-items:flex-end}.om\:justify-between{justify-content:space-between}.om\:justify-center{justify-content:center}.om\:justify-end{justify-content:flex-end}.om\:gap-1{gap:calc(var(--om-spacing) * 1)}.om\:gap-1\.5{gap:calc(var(--om-spacing) * 1.5)}.om\:gap-2{gap:calc(var(--om-spacing) * 2)}.om\:gap-3{gap:calc(var(--om-spacing) * 3)}.om\:overflow-hidden{overflow:hidden}.om\:overflow-y-auto{overflow-y:auto}.om\:rounded{border-radius:.25rem}.om\:rounded-full{border-radius:3.40282e38px}.om\:rounded-lg{border-radius:var(--om-radius-lg)}.om\:rounded-md{border-radius:var(--om-radius-md)}.om\:rounded-none{border-radius:0}.om\:border{border-style:var(--tw-border-style);border-width:1px}.om\:border-t,.om\:border-t-1{border-top-style:var(--tw-border-style);border-top-width:1px}.om\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.om\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.om\:border-none{--tw-border-style:none;border-style:none}.om\:border-\[\#E6007E\]{border-color:#e6007e}.om\:border-\[\#E6007E\]\/30{border-color:#e6007e4d}.om\:border-gray-100{border-color:var(--om-color-gray-100)}.om\:border-gray-200{border-color:var(--om-color-gray-200)}.om\:border-gray-300{border-color:var(--om-color-gray-300)}.om\:border-transparent{border-color:#0000}.om\:bg-\[\#E6007E\]{background-color:#e6007e}.om\:bg-\[\#E6007E\]\/5{background-color:#e6007e0d}.om\:bg-black\/5{background-color:var(--om-color-black)}@supports (color:color-mix(in lab,red,red)){.om\:bg-black\/5{background-color:color-mix(in oklab,var(--om-color-black) 5%,transparent)}}.om\:bg-black\/15{background-color:var(--om-color-black)}@supports (color:color-mix(in lab,red,red)){.om\:bg-black\/15{background-color:color-mix(in oklab,var(--om-color-black) 15%,transparent)}}.om\:bg-gray-100{background-color:var(--om-color-gray-100)}.om\:bg-transparent{background-color:#0000}.om\:bg-white{background-color:var(--om-color-white)}.om\:p-1{padding:calc(var(--om-spacing) * 1)}.om\:p-2{padding:calc(var(--om-spacing) * 2)}.om\:p-3{padding:calc(var(--om-spacing) * 3)}.om\:px-2{padding-inline:calc(var(--om-spacing) * 2)}.om\:px-2\.5{padding-inline:calc(var(--om-spacing) * 2.5)}.om\:px-3{padding-inline:calc(var(--om-spacing) * 3)}.om\:px-3\.5{padding-inline:calc(var(--om-spacing) * 3.5)}.om\:py-0\.5{padding-block:calc(var(--om-spacing) * .5)}.om\:py-1{padding-block:calc(var(--om-spacing) * 1)}.om\:py-1\.5{padding-block:calc(var(--om-spacing) * 1.5)}.om\:py-2\.5{padding-block:calc(var(--om-spacing) * 2.5)}.om\:py-4{padding-block:calc(var(--om-spacing) * 4)}.om\:py-6{padding-block:calc(var(--om-spacing) * 6)}.om\:pt-0\.5{padding-top:calc(var(--om-spacing) * .5)}.om\:pt-2{padding-top:calc(var(--om-spacing) * 2)}.om\:pt-3{padding-top:calc(var(--om-spacing) * 3)}.om\:text-center{text-align:center}.om\:text-left{text-align:left}.om\:align-text-bottom{vertical-align:text-bottom}.om\:font-\[inherit\]{font-family:inherit}.om\:font-sans{font-family:var(--om-font-sans)}.om\:text-sm{font-size:var(--om-text-sm);line-height:var(--tw-leading,var(--om-text-sm--line-height))}.om\:text-xs{font-size:var(--om-text-xs);line-height:var(--tw-leading,var(--om-text-xs--line-height))}.om\:text-\[10px\]{font-size:10px}.om\:text-\[11px\]{font-size:11px}.om\:text-\[13px\]{font-size:13px}.om\:text-\[14px\]{font-size:14px}.om\:leading-none{--tw-leading:1;line-height:1}.om\:leading-normal{--tw-leading:var(--om-leading-normal);line-height:var(--om-leading-normal)}.om\:leading-relaxed{--tw-leading:var(--om-leading-relaxed);line-height:var(--om-leading-relaxed)}.om\:leading-snug{--tw-leading:var(--om-leading-snug);line-height:var(--om-leading-snug)}.om\:font-bold{--tw-font-weight:var(--om-font-weight-bold);font-weight:var(--om-font-weight-bold)}.om\:font-medium{--tw-font-weight:var(--om-font-weight-medium);font-weight:var(--om-font-weight-medium)}.om\:font-semibold{--tw-font-weight:var(--om-font-weight-semibold);font-weight:var(--om-font-weight-semibold)}.om\:tracking-wide{--tw-tracking:var(--om-tracking-wide);letter-spacing:var(--om-tracking-wide)}.om\:break-words{overflow-wrap:break-word}.om\:text-ellipsis{text-overflow:ellipsis}.om\:whitespace-nowrap{white-space:nowrap}.om\:text-gray-400{color:var(--om-color-gray-400)}.om\:text-gray-500{color:var(--om-color-gray-500)}.om\:text-gray-600{color:var(--om-color-gray-600)}.om\:text-gray-700{color:var(--om-color-gray-700)}.om\:text-gray-800{color:var(--om-color-gray-800)}.om\:text-red-600{color:var(--om-color-red-600)}.om\:text-white{color:var(--om-color-white)}.om\:uppercase{text-transform:uppercase}.om\:opacity-30{opacity:.3}.om\:opacity-60{opacity:.6}.om\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.om\:backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.om\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--om-default-transition-timing-function));transition-duration:var(--tw-duration,var(--om-default-transition-duration))}.om\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--om-default-transition-timing-function));transition-duration:var(--tw-duration,var(--om-default-transition-duration))}.om\:\[animation-delay\:0\.3s\]{animation-delay:.3s}.om\:\[animation-delay\:0\.15s\]{animation-delay:.15s}@media(hover:hover){.om\:hover\:border-\[\#CF0071\]:hover{border-color:#cf0071}.om\:hover\:border-\[\#E6007E\]\/20:hover{border-color:#e6007e33}.om\:hover\:border-gray-400:hover{border-color:var(--om-color-gray-400)}.om\:hover\:bg-\[\#CF0071\]:hover{background-color:#cf0071}.om\:hover\:bg-\[\#E6007E\]\/5:hover{background-color:#e6007e0d}.om\:hover\:bg-black\/5:hover{background-color:var(--om-color-black)}@supports (color:color-mix(in lab,red,red)){.om\:hover\:bg-black\/5:hover{background-color:color-mix(in oklab,var(--om-color-black) 5%,transparent)}}.om\:hover\:bg-gray-50:hover{background-color:var(--om-color-gray-50)}.om\:hover\:text-gray-800:hover{color:var(--om-color-gray-800)}}.om\:focus\:border-\[\#E6007E\]:focus{border-color:#e6007e}.om\:focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.om\:focus\:ring-\[\#E6007E\]\/15:focus{--tw-ring-color:oklab(60.0368% .244074 -.00584677/.15)}.om\:focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.om\:focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.om\:focus-visible\:ring-\[\#E6007E\]:focus-visible{--tw-ring-color:#e6007e}.om\:focus-visible\:ring-gray-400:focus-visible{--tw-ring-color:var(--om-color-gray-400)}.om\:focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.om\:active\:cursor-grabbing:active{cursor:grabbing}.om\:disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.om\:disabled\:opacity-50:disabled{opacity:.5}[data-omnia] *,[data-omnia] :before,[data-omnia] :after{box-sizing:border-box}@keyframes omnia-blink{50%{opacity:0}}@keyframes omnia-typing{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}@keyframes omnia-chunk-in{0%{opacity:0}to{opacity:1}}.omnia-stream-preview__new{animation:.3s ease-out both omnia-chunk-in}.tox-editor-container .tox-promotion{display:none!important}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}:root,:host{--om-font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--om-color-red-600:oklch(57.7% .245 27.325);--om-color-gray-50:oklch(98.5% .002 247.839);--om-color-gray-100:oklch(96.7% .003 264.542);--om-color-gray-200:oklch(92.8% .006 264.531);--om-color-gray-300:oklch(87.2% .01 258.338);--om-color-gray-400:oklch(70.7% .022 261.325);--om-color-gray-500:oklch(55.1% .027 264.364);--om-color-gray-600:oklch(44.6% .03 256.802);--om-color-gray-700:oklch(37.3% .034 259.733);--om-color-gray-800:oklch(27.8% .033 256.848);--om-color-black:#000;--om-color-white:#fff;--om-spacing:.25rem;--om-text-xs:.75rem;--om-text-xs--line-height:calc(1 / .75);--om-text-sm:.875rem;--om-text-sm--line-height:calc(1.25 / .875);--om-font-weight-medium:500;--om-font-weight-semibold:600;--om-font-weight-bold:700;--om-tracking-wide:.025em;--om-leading-snug:1.375;--om-leading-normal:1.5;--om-leading-relaxed:1.625;--om-radius-md:.375rem;--om-radius-lg:.5rem;--om-default-transition-duration:.15s;--om-default-transition-timing-function:cubic-bezier(.4, 0, .2, 1)}.om\:absolute{position:absolute}.om\:fixed{position:fixed}.om\:relative{position:relative}.om\:inset-0{inset:calc(var(--om-spacing) * 0)}.om\:top-0{top:calc(var(--om-spacing) * 0)}.om\:right-0{right:calc(var(--om-spacing) * 0)}.om\:bottom-0{bottom:calc(var(--om-spacing) * 0)}.om\:z-\[10000\]{z-index:10000}.om\:z-\[10001\]{z-index:10001}.om\:mt-2{margin-top:calc(var(--om-spacing) * 2)}.om\:mt-3{margin-top:calc(var(--om-spacing) * 3)}.om\:mb-0{margin-bottom:calc(var(--om-spacing) * 0)}.om\:mb-0\.5{margin-bottom:calc(var(--om-spacing) * .5)}.om\:mb-1\.5{margin-bottom:calc(var(--om-spacing) * 1.5)}.om\:mb-2{margin-bottom:calc(var(--om-spacing) * 2)}.om\:ml-2{margin-left:calc(var(--om-spacing) * 2)}.om\:box-border{box-sizing:border-box}.om\:block{display:block}.om\:flex{display:flex}.om\:inline-block{display:inline-block}.om\:inline-flex{display:inline-flex}.om\:h-1\.5{height:calc(var(--om-spacing) * 1.5)}.om\:h-6{height:calc(var(--om-spacing) * 6)}.om\:h-8{height:calc(var(--om-spacing) * 8)}.om\:h-screen{height:100vh}.om\:max-h-\[50vh\]{max-height:50vh}.om\:max-h-\[300px\]{max-height:300px}.om\:min-h-0{min-height:calc(var(--om-spacing) * 0)}.om\:min-h-\[60px\]{min-height:60px}.om\:w-1\.5{width:calc(var(--om-spacing) * 1.5)}.om\:w-6{width:calc(var(--om-spacing) * 6)}.om\:w-8{width:calc(var(--om-spacing) * 8)}.om\:w-\[3px\]{width:3px}.om\:w-\[340px\]{width:340px}.om\:w-full{width:100%}.om\:max-w-\[calc\(100vw-16px\)\]{max-width:calc(100vw - 16px)}.om\:max-w-full{max-width:100%}.om\:flex-1{flex:1}.om\:flex-shrink-0,.om\:shrink-0{flex-shrink:0}.om\:animate-\[omnia-blink_0\.8s_step-end_infinite\]{animation:.8s step-end infinite omnia-blink}.om\:animate-\[omnia-typing_1\.1s_ease-in-out_infinite\]{animation:1.1s ease-in-out infinite omnia-typing}.om\:cursor-grab{cursor:grab}.om\:cursor-nwse-resize{cursor:nwse-resize}.om\:cursor-pointer{cursor:pointer}.om\:resize-y{resize:vertical}.om\:flex-col{flex-direction:column}.om\:items-center{align-items:center}.om\:items-end{align-items:flex-end}.om\:justify-between{justify-content:space-between}.om\:justify-center{justify-content:center}.om\:justify-end{justify-content:flex-end}.om\:gap-1{gap:calc(var(--om-spacing) * 1)}.om\:gap-1\.5{gap:calc(var(--om-spacing) * 1.5)}.om\:gap-2{gap:calc(var(--om-spacing) * 2)}.om\:gap-3{gap:calc(var(--om-spacing) * 3)}.om\:overflow-hidden{overflow:hidden}.om\:overflow-y-auto{overflow-y:auto}.om\:rounded{border-radius:.25rem}.om\:rounded-full{border-radius:3.40282e38px}.om\:rounded-lg{border-radius:var(--om-radius-lg)}.om\:rounded-md{border-radius:var(--om-radius-md)}.om\:rounded-none{border-radius:0}.om\:border{border-style:var(--tw-border-style);border-width:1px}.om\:border-t,.om\:border-t-1{border-top-style:var(--tw-border-style);border-top-width:1px}.om\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.om\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.om\:border-none{--tw-border-style:none;border-style:none}.om\:border-\[\#E6007E\]{border-color:#e6007e}.om\:border-\[\#E6007E\]\/30{border-color:#e6007e4d}.om\:border-gray-100{border-color:var(--om-color-gray-100)}.om\:border-gray-200{border-color:var(--om-color-gray-200)}.om\:border-gray-300{border-color:var(--om-color-gray-300)}.om\:border-transparent{border-color:#0000}.om\:bg-\[\#E6007E\]{background-color:#e6007e}.om\:bg-\[\#E6007E\]\/5{background-color:#e6007e0d}.om\:bg-black\/5{background-color:var(--om-color-black)}@supports (color:color-mix(in lab,red,red)){.om\:bg-black\/5{background-color:color-mix(in oklab,var(--om-color-black) 5%,transparent)}}.om\:bg-black\/15{background-color:var(--om-color-black)}@supports (color:color-mix(in lab,red,red)){.om\:bg-black\/15{background-color:color-mix(in oklab,var(--om-color-black) 15%,transparent)}}.om\:bg-gray-100{background-color:var(--om-color-gray-100)}.om\:bg-transparent{background-color:#0000}.om\:bg-white{background-color:var(--om-color-white)}.om\:p-1{padding:calc(var(--om-spacing) * 1)}.om\:p-2{padding:calc(var(--om-spacing) * 2)}.om\:p-3{padding:calc(var(--om-spacing) * 3)}.om\:px-2{padding-inline:calc(var(--om-spacing) * 2)}.om\:px-2\.5{padding-inline:calc(var(--om-spacing) * 2.5)}.om\:px-3{padding-inline:calc(var(--om-spacing) * 3)}.om\:px-3\.5{padding-inline:calc(var(--om-spacing) * 3.5)}.om\:py-0\.5{padding-block:calc(var(--om-spacing) * .5)}.om\:py-1{padding-block:calc(var(--om-spacing) * 1)}.om\:py-1\.5{padding-block:calc(var(--om-spacing) * 1.5)}.om\:py-2\.5{padding-block:calc(var(--om-spacing) * 2.5)}.om\:py-4{padding-block:calc(var(--om-spacing) * 4)}.om\:py-6{padding-block:calc(var(--om-spacing) * 6)}.om\:pt-0\.5{padding-top:calc(var(--om-spacing) * .5)}.om\:pt-2{padding-top:calc(var(--om-spacing) * 2)}.om\:pt-3{padding-top:calc(var(--om-spacing) * 3)}.om\:text-center{text-align:center}.om\:text-left{text-align:left}.om\:font-\[inherit\]{font-family:inherit}.om\:font-sans{font-family:var(--om-font-sans)}.om\:text-sm{font-size:var(--om-text-sm);line-height:var(--tw-leading,var(--om-text-sm--line-height))}.om\:text-xs{font-size:var(--om-text-xs);line-height:var(--tw-leading,var(--om-text-xs--line-height))}.om\:text-\[10px\]{font-size:10px}.om\:text-\[11px\]{font-size:11px}.om\:text-\[13px\]{font-size:13px}.om\:text-\[14px\]{font-size:14px}.om\:leading-none{--tw-leading:1;line-height:1}.om\:leading-normal{--tw-leading:var(--om-leading-normal);line-height:var(--om-leading-normal)}.om\:leading-relaxed{--tw-leading:var(--om-leading-relaxed);line-height:var(--om-leading-relaxed)}.om\:leading-snug{--tw-leading:var(--om-leading-snug);line-height:var(--om-leading-snug)}.om\:font-bold{--tw-font-weight:var(--om-font-weight-bold);font-weight:var(--om-font-weight-bold)}.om\:font-medium{--tw-font-weight:var(--om-font-weight-medium);font-weight:var(--om-font-weight-medium)}.om\:font-semibold{--tw-font-weight:var(--om-font-weight-semibold);font-weight:var(--om-font-weight-semibold)}.om\:tracking-wide{--tw-tracking:var(--om-tracking-wide);letter-spacing:var(--om-tracking-wide)}.om\:break-words{overflow-wrap:break-word}.om\:text-ellipsis{text-overflow:ellipsis}.om\:whitespace-nowrap{white-space:nowrap}.om\:text-gray-400{color:var(--om-color-gray-400)}.om\:text-gray-500{color:var(--om-color-gray-500)}.om\:text-gray-600{color:var(--om-color-gray-600)}.om\:text-gray-700{color:var(--om-color-gray-700)}.om\:text-gray-800{color:var(--om-color-gray-800)}.om\:text-red-600{color:var(--om-color-red-600)}.om\:text-white{color:var(--om-color-white)}.om\:uppercase{text-transform:uppercase}.om\:opacity-30{opacity:.3}.om\:opacity-60{opacity:.6}.om\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.om\:backdrop-blur-\[2px\]{--tw-backdrop-blur:blur(2px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.om\:transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--om-default-transition-timing-function));transition-duration:var(--tw-duration,var(--om-default-transition-duration))}.om\:transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--om-default-transition-timing-function));transition-duration:var(--tw-duration,var(--om-default-transition-duration))}.om\:\[animation-delay\:0\.3s\]{animation-delay:.3s}.om\:\[animation-delay\:0\.15s\]{animation-delay:.15s}@media(hover:hover){.om\:hover\:border-\[\#CF0071\]:hover{border-color:#cf0071}.om\:hover\:border-\[\#E6007E\]\/20:hover{border-color:#e6007e33}.om\:hover\:border-gray-400:hover{border-color:var(--om-color-gray-400)}.om\:hover\:bg-\[\#CF0071\]:hover{background-color:#cf0071}.om\:hover\:bg-\[\#E6007E\]\/5:hover{background-color:#e6007e0d}.om\:hover\:bg-black\/5:hover{background-color:var(--om-color-black)}@supports (color:color-mix(in lab,red,red)){.om\:hover\:bg-black\/5:hover{background-color:color-mix(in oklab,var(--om-color-black) 5%,transparent)}}.om\:hover\:bg-gray-50:hover{background-color:var(--om-color-gray-50)}.om\:hover\:text-gray-800:hover{color:var(--om-color-gray-800)}}.om\:focus\:border-\[\#E6007E\]:focus{border-color:#e6007e}.om\:focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.om\:focus\:ring-\[\#E6007E\]\/15:focus{--tw-ring-color:oklab(60.0368% .244074 -.00584677/.15)}.om\:focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.om\:focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.om\:focus-visible\:ring-\[\#E6007E\]:focus-visible{--tw-ring-color:#e6007e}.om\:focus-visible\:ring-gray-400:focus-visible{--tw-ring-color:var(--om-color-gray-400)}.om\:focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.om\:active\:cursor-grabbing:active{cursor:grabbing}.om\:disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.om\:disabled\:opacity-50:disabled{opacity:.5}[data-omnia] *,[data-omnia] :before,[data-omnia] :after{box-sizing:border-box}@keyframes omnia-blink{50%{opacity:0}}@keyframes omnia-typing{0%,80%,to{opacity:.3;transform:translateY(0)}40%{opacity:1;transform:translateY(-4px)}}@keyframes omnia-chunk-in{0%{opacity:0}to{opacity:1}}.omnia-stream-preview__new{animation:.3s ease-out both omnia-chunk-in}.tox-editor-container .tox-promotion{display:none!important}.tox-collection__item--active svg{color:#fff}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Regenerate CSS with valid keyframe notation.

The generated stylesheet uses to instead of 100% in two keyframes, matching the reported Stylelint errors. Update the upstream source and regenerate the committed artifact rather than editing the minified output manually.

🧰 Tools
🪛 Stylelint (17.14.0)

[error] 1-1: Expected "to" to be "100%" (keyframe-selector-notation)

(keyframe-selector-notation)


[error] 1-1: Expected "to" to be "100%" (keyframe-selector-notation)

(keyframe-selector-notation)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/imio/omnia/tinymce/browser/static/omnia-tinymce.css` at line 1, Update
the upstream source defining the omnia-blink and omnia-typing keyframes to use
100% instead of to for the final keyframe selector, then regenerate the
committed omnia-tinymce.css artifact. Do not edit the minified CSS directly, and
preserve all other generated styles unchanged.

Source: Linters/SAST tools


🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Scope every plugin rule under [data-omnia].

Line 1 emits global selectors such as :root, .omnia-stream-preview__new, .tox-editor-container .tox-promotion, .tox-collection__item--active svg, and all .om: utilities. Only the reset is scoped, allowing unrelated page markup and TinyMCE instances to be affected. Regenerate the package output with the required scoping.

As per coding guidelines, built CSS must remain scoped to [data-omnia].

🧰 Tools
🪛 Stylelint (17.14.0)

[error] 1-1: Expected "to" to be "100%" (keyframe-selector-notation)

(keyframe-selector-notation)


[error] 1-1: Expected "to" to be "100%" (keyframe-selector-notation)

(keyframe-selector-notation)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/imio/omnia/tinymce/browser/static/omnia-tinymce.css` at line 1,
Regenerate the built stylesheet so every Omnia plugin rule is scoped beneath
[data-omnia], including :root/:host variables, all .om utility selectors,
animation-related rules, and TinyMCE selectors such as .tox-editor-container and
.tox-collection__item--active. Preserve the existing scoped reset while ensuring
no plugin styles can affect unrelated page markup or TinyMCE instances.

Source: Coding guidelines

Comment on lines +11 to +14
`,Ia='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 100 96" fill="none"><path fill="currentColor" d="M33.458 51.85H4.042C1.81 51.85 0 50.033 0 47.79v-2.468c0-2.242 1.81-4.06 4.042-4.06h29.416c2.233 0 4.042 1.818 4.042 4.06v2.469c0 2.242-1.81 4.06-4.042 4.06M70.958 73.402H4.042C1.81 73.402 0 71.585 0 69.342v-2.468c0-2.242 1.81-4.06 4.042-4.06h66.916c2.233 0 4.042 1.818 4.042 4.06v2.469c0 2.242-1.81 4.059-4.042 4.059M95.958 96H4.042C1.81 96 0 94.183 0 91.94v-2.468c0-2.242 1.81-4.06 4.042-4.06h91.916c2.233 0 4.042 1.818 4.042 4.06v2.469C100 94.183 98.19 96 95.958 96"/><path fill="#e6007e" d="M77.406 46.535c-.542.126-.75-.293-1.084-.67-1.458-5.481-3.208-11.424-7.5-15.358-3.375-3.096-8.125-4.728-12.458-5.984-.75-.21-2.875-.377-2.25-1.674.292-.628 1.583-.711 2.125-.879 4.208-1.255 8.833-2.762 12.167-5.65 4.166-3.556 6.166-9.248 7.583-14.395.083-.377.125-.962.292-1.255 0-.042.416-.544.458-.586.5-.335 1.083 0 1.292.544.125.293.25.753.333 1.088 1.958 7.072 4.083 13.14 10.833 16.907 3.25 1.799 6.625 2.51 10.125 3.64.667.21 1.375.754.834 1.465-.417.586-1.625.628-2.25.837-4.917 1.507-9.959 3.222-13.542 7.156-3 3.348-4.583 7.993-5.833 12.22-.167.67-.417 2.385-1.167 2.552z"/></svg>',Fa='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 100 102" fill="none"><path fill="currentColor" fill-rule="evenodd" d="M67.393 22.079a5.843 5.843 0 0 0-8.175 0L1.402 80.414a5.83 5.83 0 0 0 0 7.583l12.263 12.249c2.336 2.334 5.838 2.334 8.177 0l58.4-57.752c1.752-1.751 1.752-5.832 0-8.166l-12.476-11.87-.37-.38zm8.177 16.333L63.89 26.745 46.907 43.031l11.612 12.304 17.05-16.92z" clip-rule="evenodd"/><path fill="#e6007e" d="M87.74 53.697c.285-.065.401.15.557.34.762 2.853 1.673 5.964 3.925 8.004 1.775 1.615 4.255 2.458 6.537 3.11.397.117 1.498.188 1.19.88-.148.326-.822.374-1.124.462-2.218.647-4.621 1.448-6.377 2.938-2.194 1.859-3.236 4.82-3.984 7.515-.05.195-.074.498-.147.662-.014.028-.221.28-.24.294-.273.181-.567 0-.675-.274a6 6 0 0 1-.175-.563c-1.034-3.697-2.144-6.845-5.686-8.81-1.702-.945-3.477-1.318-5.32-1.901-.36-.116-.711-.396-.434-.772.227-.311.853-.331 1.19-.433 2.582-.778 5.232-1.672 7.101-3.73 1.577-1.737 2.407-4.164 3.052-6.384.097-.34.213-1.253.618-1.34h-.006zM87.74.011c.285-.065.401.15.557.34.762 2.854 1.673 5.965 3.925 8.004 1.775 1.615 4.255 2.458 6.537 3.111.397.116 1.498.187 1.19.88-.148.325-.822.373-1.124.461-2.218.648-4.621 1.448-6.377 2.939-2.194 1.858-3.236 4.82-3.984 7.515-.05.195-.074.498-.147.662-.014.028-.221.28-.24.294-.273.18-.567 0-.675-.275a6 6 0 0 1-.175-.562c-1.034-3.697-2.144-6.845-5.686-8.81-1.702-.946-3.477-1.319-5.32-1.902-.36-.116-.711-.396-.434-.772.227-.31.853-.33 1.19-.433 2.582-.777 5.232-1.671 7.101-3.73 1.577-1.737 2.407-4.164 3.052-6.384.097-.34.213-1.253.618-1.34h-.006zM36.628.011c.286-.065.402.15.558.34.761 2.854 1.673 5.965 3.924 8.004 1.776 1.615 4.256 2.458 6.538 3.111.396.116 1.498.187 1.19.88-.148.325-.822.373-1.125.461-2.217.648-4.62 1.448-6.376 2.939-2.195 1.858-3.237 4.82-3.984 7.515-.051.195-.074.498-.148.662-.014.028-.22.28-.24.294-.272.18-.567 0-.674-.275a6 6 0 0 1-.176-.562c-1.033-3.697-2.143-6.845-5.685-8.81-1.702-.946-3.477-1.319-5.32-1.902-.36-.116-.711-.396-.434-.772.227-.31.852-.33 1.19-.433 2.582-.777 5.232-1.671 7.1-3.73 1.578-1.737 2.407-4.164 3.053-6.384.096-.34.212-1.253.617-1.34h-.005z"/></svg>',Ba='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 100 96" fill="none"><path fill="currentColor" d="M33.458 44.15H4.042C1.81 44.15 0 45.967 0 48.21v2.468c0 2.242 1.81 4.06 4.042 4.06h29.416c2.233 0 4.042-1.818 4.042-4.06V48.21c0-2.242-1.81-4.06-4.042-4.06M70.958 22.598H4.042C1.81 22.598 0 24.416 0 26.658v2.468c0 2.242 1.81 4.06 4.042 4.06h66.916c2.233 0 4.042-1.818 4.042-4.06v-2.469c0-2.241-1.81-4.059-4.042-4.059M95.958 0H4.042C1.81 0 0 1.817 0 4.06v2.468c0 2.242 1.81 4.06 4.042 4.06h91.916A4.05 4.05 0 0 0 100 6.528V4.06A4.05 4.05 0 0 0 95.958 0"/><path fill="#e6007e" d="M74.792 49.465c.541-.126.75.293 1.083.67 1.458 5.481 3.208 11.424 7.5 15.358 3.375 3.096 8.125 4.728 12.458 5.984.75.21 2.875.376 2.25 1.674-.291.627-1.583.711-2.125.879-4.208 1.255-8.833 2.762-12.166 5.65-4.167 3.556-6.167 9.248-7.584 14.395-.083.376-.125.962-.291 1.255 0 .042-.417.544-.459.586-.5.335-1.083 0-1.291-.544-.125-.293-.25-.753-.334-1.088C71.875 87.212 69.75 81.144 63 77.377c-3.25-1.799-6.625-2.51-10.125-3.64-.667-.21-1.375-.754-.833-1.465.416-.586 1.625-.628 2.25-.837 4.916-1.507 9.958-3.222 13.541-7.156 3-3.348 4.584-7.993 5.834-12.22.166-.67.416-2.385 1.166-2.552z"/></svg>',Oa='<svg xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" width="24" height="24" viewBox="0 0 100 90.54"><circle cx="44.95" cy="45.59" r="44.95" style="fill:currentColor"/><path d="M55.25 81.24c-.99.18-2.7-.24-3.38-.82s-.94-1.52-1.16-2.37l-.59-2.29-1.51-5.6-.4-1.44-.99-3.74-.32-1.1-.33-1.19-.64-2.49-.71-2.6-.07-.25c-.02-.06-.2.1-.22.17l-.39 1.42-.17.65-.47 1.75-.63 2.34-.36 1.41-.13.56-.38 1.31-.48 1.7-1.44 5.42-.41 1.64-.58 2.01-.22.86c-.29 1.14-1.07 1.97-2.21 2.34-.35.11-.73.31-1.08.33-.6.03-1.2.07-1.77 0-1.27-.16-2.45-.63-3.43-1.43-.18-.14-.39-.5-.5-.71-.34-.58-.26-1.72-.09-2.37l.24-.91.2-.78.7-3.07.17-.74.61-2.77.23-.83.17-.74.19-.87.24-1.01.19-.8.18-.78.41-1.71.22-.85.44-1.87.45-1.84.16-.65c.07-.28.11-.58.18-.87l.24-1 .21-1.05c.05-.25.15-.63.22-.9V41.16l-.03-2.78-5.23-.03c-.38 0-.78-.23-1.19-.19-.45.04-2.27-.19-2.76-.28l-1.52-.28-.81-.16c-.29-.06-.55-.12-.82-.19l-.71-.18c-.84-.21-1.65-.38-2.47-.66l-2.3-.8c-1.57-.55-3.04-1.03-4.14-2.24-1.23-1.36-.5-4.54 1.82-5.48.76-.31 1.13-.4 1.84-.25l1.78.39.81.18.71.18.81.18 2.78.57.66.13 3.1.47 1.32.18 2.17.15 2.53.12 1.18.13 2.22.23c.28.03.52.13.82.15l.85.08c.51.05.94.14 1.45.2l2.02.24c.45.05.9.14 1.36.14l2.59-.02c.65 0 1.3-.17 1.96-.27l1.15-.17 1.32-.22.81-.15c.9-.17 1.77-.19 2.68-.26l.98-.08 2.31-.08c.7-.02 1.34-.23 2.05-.14.39.05.79-.12 1.16-.16l1.96-.2 1.21-.15 1-.18.89-.17.96-.2 1.25-.26.72-.16.71-.19 1.7-.43.71-.17c.68-.16 1.29-.24 1.97.02.16.06.5.14.62.23.58.42 1.11.84 1.47 1.46.2.35.46.84.52 1.22.07.5.1 1.13 0 1.59-.38 1.69-2.39 2.53-3.89 3.08l-1.95.71c-1.02.37-2.02.66-3.06.89l-2.28.52c-.83.19-1.61.36-2.48.46l-1.43.16c-.17.02-.43.11-.62.16-.86-.12-1.66.13-2.52.14l-4.15.06v10.58c0 1.9-.42 2.54.13 4.78l1.3 5.33.2.87.18.72.95 4.25 1.59 6.49 1.11 4.92.18.91c.08.41.1 1.03-.01 1.44-.29.99-1.17 1.64-2.11 1.94-.55.18-1.09.35-1.65.45l-1 .18Z" style="fill:#fff"/><circle cx="45.07" cy="20.66" r="8.46" style="fill:#fff"/><path d="M78.96.02c.49-.11.67.26.97.6 1.31 4.93 2.88 10.27 6.74 13.81 3.03 2.78 7.3 4.25 11.2 5.38.67.19 2.58.34 2.02 1.5-.26.56-1.42.64-1.91.79-3.78 1.13-7.94 2.48-10.94 5.08-3.75 3.2-5.54 8.31-6.82 12.94-.07.34-.11.86-.26 1.13 0 .04-.37.49-.41.53-.45.3-.97 0-1.16-.49-.11-.26-.22-.68-.3-.98-1.76-6.36-3.67-11.81-9.74-15.2-2.92-1.62-5.96-2.26-9.1-3.27-.6-.19-1.24-.68-.75-1.32.37-.53 1.46-.56 2.02-.75 4.42-1.35 8.95-2.9 12.17-6.43 2.7-3.01 4.12-7.19 5.24-10.99.15-.6.37-2.14 1.05-2.29l-.04-.04Z" style="fill:#e6007e"/></svg>',ja='<svg xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" width="24" height="24" viewBox="0 0 24.04 24.04"><path d="M8.32 13.85c-.13.03-.18-.07-.26-.16-.35-1.32-.77-2.74-1.8-3.69-.81-.74-1.95-1.13-2.99-1.44-.18-.05-.69-.09-.54-.4.07-.15.38-.17.51-.21 1.01-.3 2.12-.66 2.92-1.36 1-.85 1.48-2.22 1.82-3.45.02-.09.03-.23.07-.3 0-.01.1-.13.11-.14.12-.08.26 0 .31.13.03.07.06.18.08.26.47 1.7.98 3.15 2.6 4.06.78.43 1.59.6 2.43.87.16.05.33.18.2.35-.1.14-.39.15-.54.2-1.18.36-2.39.77-3.25 1.72-.72.8-1.1 1.92-1.4 2.93-.04.16-.1.57-.28.61h.01Z" style="fill:#e6007e"/><path d="M0 3c0-1.65 1.35-3 3-3h10.52c1.66 0 3 1.35 3 3v4.51h4.51c1.66 0 3 1.35 3 3v10.52c0 1.66-1.35 3-3 3H10.51c-1.66 0-3-1.35-3-3v-4.51H3c-1.66 0-3-1.35-3-3zm3-1.5c-.83 0-1.5.67-1.5 1.5v10.52c0 .83.67 1.5 1.5 1.5h10.52c.83 0 1.5-.67 1.5-1.5V3c0-.83-.67-1.5-1.5-1.5zm10.73 15.02c.29.45.6.88.95 1.27-1.12.86-2.51 1.5-4.16 1.94.27.33.68.95.83 1.3 1.69-.54 3.12-1.27 4.34-2.24 1.17 1 2.61 1.75 4.4 2.21.2-.38.62-1.01.94-1.34-1.69-.38-3.09-1.04-4.24-1.93 1.02-1.12 1.84-2.48 2.44-4.14h1.8v-1.57h-4.51v1.57h1.15c-.48 1.27-1.11 2.32-1.91 3.2-.22-.24-.43-.48-.62-.74-.42.27-.91.43-1.41.47" style="fill:currentColor"/></svg>',Na='<svg xmlns="http://www.w3.org/2000/svg" data-name="Calque 1" width="24" height="24" viewBox="0 0 24 13.91"><path d="M6.41 8.34c-.09-.28-.19-.57-.29-.87s-.21-.6-.31-.89H2.63c-.1.3-.21.59-.31.89s-.2.59-.29.87H.12q.465-1.32.87-2.43c.28-.74.54-1.45.81-2.1.26-.66.52-1.28.78-1.88.26-.59.52-1.17.8-1.73h1.74c.27.56.53 1.14.79 1.73s.52 1.22.79 1.88.53 1.36.81 2.1q.42 1.125.87 2.43H6.42ZM4.2 2.03q-.06.18-.18.48c-.08.2-.17.44-.27.71s-.21.56-.34.88c-.12.32-.25.66-.38 1.01h2.33c-.12-.35-.25-.69-.36-1.01-.12-.32-.23-.62-.33-.88-.11-.27-.2-.5-.28-.71-.08-.2-.14-.36-.19-.48M12.13 8.44c-.45 0-.89-.01-1.33-.04s-.9-.09-1.38-.19V.31A13.7 13.7 0 0 1 11.9.1c.52 0 .99.04 1.43.11s.81.2 1.12.38.56.42.73.71c.18.29.27.66.27 1.09 0 .65-.31 1.16-.94 1.54.52.2.87.46 1.06.8s.28.72.28 1.14c0 .85-.31 1.5-.94 1.93-.62.43-1.55.65-2.78.65Zm-.92-5.05h.89c.56 0 .97-.07 1.21-.22s.37-.38.37-.7-.12-.56-.38-.69c-.25-.13-.62-.2-1.11-.2h-.51q-.27 0-.48.03v1.78Zm0 1.4v2.1c.13.02.28.03.44.04s.33.01.52.01c.55 0 .99-.08 1.33-.24q.51-.24.51-.87c0-.38-.14-.64-.42-.81-.28-.16-.69-.24-1.21-.24h-1.15ZM21.04 8.5q-1.98 0-3.03-1.11c-.69-.74-1.04-1.78-1.04-3.14 0-.67.11-1.28.32-1.81s.5-.98.87-1.34.81-.64 1.32-.83 1.06-.28 1.66-.28c.34 0 .66.03.94.08s.53.11.74.18.39.13.53.21c.14.07.24.13.31.16l-.53 1.48a4.25 4.25 0 0 0-2.01-.48c-.28 0-.56.05-.83.14s-.51.25-.72.45c-.21.21-.37.48-.5.81-.12.33-.19.73-.19 1.2q0 .57.12 1.05c.08.33.22.61.4.84.18.24.42.42.72.56q.45.21 1.08.21a5 5 0 0 0 1.28-.16c.17-.04.31-.09.44-.15.12-.05.24-.11.34-.15l.51 1.47c-.26.16-.62.3-1.09.42s-1.02.19-1.63.19Z" style="fill:currentColor"/><path d="M0 11.01c1.71 0 1.71 2.4 3.43 2.4s1.71-2.4 3.42-2.4 1.71 2.4 3.43 2.4 1.71-2.4 3.43-2.4 1.71 2.4 3.43 2.4 1.72-2.4 3.43-2.4 1.72 2.4 3.43 2.4" style="fill:none;stroke:#e6007e;stroke-miterlimit:10"/></svg>';async function*$a(t,e){const n=t.body.getReader(),i=new TextDecoder;let s="";try{for(;!e?.aborted;){const{done:r,value:o}=await n.read();if(r)break;s+=i.decode(o,{stream:!0});const a=s.split(`

`);s=a.pop()||"";for(const u of a)for(const l of u.split(`
`))if(l.startsWith("data: ")){const c=l.slice(6);if(c==="[DONE]")return;try{const f=JSON.parse(c);f.chunk!=null&&(yield f.chunk)}catch{c.trim()&&(yield c)}}}}finally{n.releaseLock()}}class ka{#i;#s;#o;#r;#n;#a;constructor({baseUrl:e,application:n,municipality:i,authToken:s,onError:r,endpoints:o}){this.#i=e.replace(/\/+$/,""),this.#s=n||null,this.#o=i||null,this.#r=s||null,this.#n=r||null,this.#a=o||{}}#l(e){let n;if(/^https?:\/\//.test(e)?n=e:e.startsWith("/")?n=`${this.#i}${e}`:n=`${this.#i}/${e}`,this.#r){const i=n.includes("?")?"&":"?";n+=`${i}_authenticator=${encodeURIComponent(this.#r)}`}return n}#t(e,n){return this.#a[e]||n}#c(e={}){const n={"Content-Type":"application/json",...e};return this.#s&&(n["x-imio-application"]=this.#s),this.#o&&(n["x-imio-municipality"]=this.#o),n}async#e(e,n,i){const s=this.#l(e),r=this.#c();let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=new Error(`Omnia API error: ${o.status} ${o.statusText}`);throw a.status=o.status,this.#n?.(a),a}return o.json()}async*#u(e,n,i){const s=this.#l(e),r=this.#c({Accept:"text/event-stream"});let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=new Error(`Omnia API error: ${o.status} ${o.statusText}`);throw a.status=o.status,this.#n?.(a),a}yield*Va(o,i)}async*generate(e,n={}){const{signal:i,...s}=n;yield*this.#u(this.#t("generate","/generate"),{prompt:e,...s},i)}async expandText(e,n={}){const{signal:i,expansionTarget:s,...r}=n,o={input:e,...r};return s!==void 0&&(o.expansion_target=s),(await this.#e(this.#t("expand-text","/v1/agents/expand-text"),o,i)).result}async improveText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("improve-text","/v1/agents/improve-text"),{input:e},i)).result}async reduceText(e,n={}){const{signal:i,reductionTarget:s}=n,r={input:e};return s!==void 0&&(r.reduction_target=s),(await this.#e(this.#t("reduce-text","/v1/agents/reduce-text"),r,i)).result}async correctText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("correct-text","/v1/agents/correct-text"),{input:e},i)).result}async makeAccessible(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("make-accessible","/v1/agents/make-accessible"),{input:e},i)).result}async translateText(e,n,i={}){const{signal:s}=i;return(await this.#e(this.#t("translate-text","/v1/agents/translate-text"),{input:e,target_language:n},s)).result}}const Jt=[{id:"generate",label:"Générer du contenu",menu:"panel",shortcut:"g",menuItem:{id:"omnia-generate",text:"Générer"}},{id:"expand-text",label:"Développer la sélection",menu:"floating",shortcut:"d",menuItem:{id:"omnia-expand-text",text:"Développer"}},{id:"improve-text",label:"Améliorer",menu:"floating",shortcut:"a",menuItem:{id:"omnia-improve-text",text:"Améliorer"}},{id:"reduce-text",label:"Réduire",menu:"floating",shortcut:"r",menuItem:{id:"omnia-reduce-text",text:"Réduire"}},{id:"correct-text",label:"Corriger",menu:"floating",shortcut:"c",menuItem:{id:"omnia-correct-text",text:"Corriger"}},{id:"make-accessible",label:"Rendre accessible",menu:"floating",shortcut:"x",menuItem:{id:"omnia-make-accessible",text:"Rendre accessible"}},{id:"translate-text",label:"Traduire",menu:"floating",shortcut:"t",menuItem:{id:"omnia-translate-text",text:"Traduire"}}],Ii=Jt.map(t=>t.id),Da=Ii.filter(t=>t!=="generate"),_e=[{code:"fr",label:"Français"},{code:"nl",label:"Nederlands"},{code:"de",label:"Deutsch"},{code:"en",label:"English"},{code:"es",label:"Español"},{code:"it",label:"Italiano"}],Ra={generate:"/generate","expand-text":"/v1/agents/expand-text","improve-text":"/v1/agents/improve-text","reduce-text":"/v1/agents/reduce-text","correct-text":"/v1/agents/correct-text","make-accessible":"/v1/agents/make-accessible","translate-text":"/v1/agents/translate-text"};function Fi(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")?{value:t,valid:!0}:typeof t=="string"?{value:t.split(",").map(e=>e.trim()).filter(Boolean),valid:!0}:{valid:!1,message:"Expected a string or an array of strings."}}function Bi(t){return t&&typeof t=="object"&&!Array.isArray(t)?{value:t,valid:!0}:{valid:!1,message:"Expected an object."}}function La(t){return typeof t=="boolean"?{value:t,valid:!0}:Bi(t)}function Ia(t){t.options.register("omnia_base_url",{processor:"string",default:""}),t.options.register("omnia_auth_token",{processor:"string",default:""}),t.options.register("omnia_application",{processor:"string",default:""}),t.options.register("omnia_municipality",{processor:"string",default:""}),t.options.register("omnia_default_translate_language",{processor:"string",default:"fr"}),t.options.register("omnia_enabled_features",{processor:Fi,default:Da}),t.options.register("omnia_endpoints",{processor:Bi,default:{}}),t.options.register("omnia_shortcuts",{processor:La,default:!0}),t.options.register("omnia_toolbar",{processor:"boolean",default:!0}),t.options.register("omnia_context_menu",{processor:"boolean",default:!0}),t.options.register("omnia_translate_languages",{processor:Fi,default:_e.map(e=>e.code)}),t.options.register("omnia_history_limit",{processor:"number",default:5}),t.options.register("omnia_floating_panel_mode",{processor:e=>e==="inline"||e==="blur"?{value:e,valid:!0}:{valid:!1,message:'Expected "inline" or "blur".'},default:"inline"}),t.options.register("omnia_floating_panel_width",{processor:e=>e==="full"?{value:e,valid:!0}:typeof e=="number"&&e>0?{value:e,valid:!0}:{valid:!1,message:'Expected a positive number or "full".'},default:500})}function Fa(t){const e=new Set(Ii);return t.filter(n=>e.has(n))}function Ba(t,e){const n=new Map(_e.map(o=>[o.code,o])),i=t.filter(o=>n.has(o)).map(o=>n.get(o)),s=i.length>0?i:_e,r=new Set(s.map(o=>o.code));return{languages:s,defaultLanguage:r.has(e)?e:s[0].code}}function Oa(t,e){if(t===!1)return{enabled:!1,prefix:"o",timeoutMs:1500,bindings:{}};t===!0&&(t={});const n=new Set(e),i={};for(const s of Jt){const r=t.bindings?.[s.id],o=typeof r=="string"?r.toLowerCase():s.shortcut;n.has(s.id)&&o&&(i[s.id]=o)}return{enabled:t.enabled!==!1,prefix:typeof t.prefix=="string"&&t.prefix.length===1?t.prefix.toLowerCase():"o",timeoutMs:Number.isFinite(t.timeoutMs)?t.timeoutMs:1500,bindings:i}}function ja(t){const e=Fa(t.options.get("omnia_enabled_features")),{languages:n,defaultLanguage:i}=Ba(t.options.get("omnia_translate_languages"),t.options.get("omnia_default_translate_language"));return{enabledFeatures:e,endpoints:{...Ra,...t.options.get("omnia_endpoints")},shortcuts:Oa(t.options.get("omnia_shortcuts"),e),toolbar:t.options.get("omnia_toolbar"),contextMenu:t.options.get("omnia_context_menu"),defaultLanguage:i,languages:n,historyLimit:Math.max(1,t.options.get("omnia_history_limit")),floatingPanelMode:t.options.get("omnia_floating_panel_mode"),floatingPanelWidth:t.options.get("omnia_floating_panel_width"),authToken:t.options.get("omnia_auth_token"),application:t.options.get("omnia_application"),municipality:t.options.get("omnia_municipality")}}var Qt,M,Oi,yt,ji,Ni,$i,Ui,en,nn,sn,Wi,ve={},xe=[],Na=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,te=Array.isArray;function ft(t,e){for(var n in e)t[n]=e[n];return t}function on(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function et(t,e,n){var i,s,r,o={};for(r in e)r=="key"?i=e[r]:r=="ref"?s=e[r]:o[r]=e[r];if(arguments.length>2&&(o.children=arguments.length>3?Qt.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)o[r]===void 0&&(o[r]=t.defaultProps[r]);return ee(t,o,i,s,null)}function ee(t,e,n,i,s){var r={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Oi,__i:-1,__u:0};return s==null&&M.vnode!=null&&M.vnode(r),r}function $a(){return{current:null}}function rt(t){return t.children}function at(t,e){this.props=t,this.context=e}function It(t,e){if(e==null)return t.__?It(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?It(t):null}function Ua(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,i=[],s=[],r=ft({},e);r.__v=e.__v+1,M.vnode&&M.vnode(r),an(t.__P,r,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,i,n??It(e),!!(32&e.__u),s),r.__v=e.__v,r.__.__k[r.__i]=r,Yi(i,r,s),e.__e=e.__=null,r.__e!=n&&Hi(r)}}function Hi(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Hi(t)}function rn(t){(!t.__d&&(t.__d=!0)&&yt.push(t)&&!be.__r++||ji!=M.debounceRendering)&&((ji=M.debounceRendering)||Ni)(be)}function be(){try{for(var t,e=1;yt.length;)yt.length>e&&yt.sort($i),t=yt.shift(),e=yt.length,Ua(t)}finally{yt.length=be.__r=0}}function Ki(t,e,n,i,s,r,o,a,u,l,c){var f,h,d,m,_,g,p,y=i&&i.__k||xe,v=e.length;for(u=Wa(n,e,y,u,v),f=0;f<v;f++)(d=n.__k[f])!=null&&(h=d.__i!=-1&&y[d.__i]||ve,d.__i=f,g=an(t,d,h,s,r,o,a,u,l,c),m=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&cn(h.ref,null,d),c.push(d.ref,d.__c||m,d)),_==null&&m!=null&&(_=m),(p=!!(4&d.__u))||h.__k===d.__k?u=zi(d,u,t,p):typeof d.type=="function"&&g!==void 0?u=g:m&&(u=m.nextSibling),d.__u&=-7);return n.__e=_,u}function Wa(t,e,n,i,s){var r,o,a,u,l,c=n.length,f=c,h=0;for(t.__k=new Array(s),r=0;r<s;r++)(o=e[r])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=t.__k[r]=ee(null,o,null,null,null):te(o)?o=t.__k[r]=ee(rt,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=t.__k[r]=ee(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):t.__k[r]=o,u=r+h,o.__=t,o.__b=t.__b+1,a=null,(l=o.__i=Ha(o,n,u,f))!=-1&&(f--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(s>c?h--:s<c&&h++),typeof o.type!="function"&&(o.__u|=4)):l!=u&&(l==u-1?h--:l==u+1?h++:(l>u?h--:h++,o.__u|=4))):t.__k[r]=null;if(f)for(r=0;r<c;r++)(a=n[r])!=null&&(2&a.__u)==0&&(a.__e==i&&(i=It(a)),Zi(a,a));return i}function zi(t,e,n,i){var s,r;if(typeof t.type=="function"){for(s=t.__k,r=0;s&&r<s.length;r++)s[r]&&(s[r].__=t,e=zi(s[r],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=It(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function pt(t,e){return e=e||[],t==null||typeof t=="boolean"||(te(t)?t.some(function(n){pt(n,e)}):e.push(t)),e}function Ha(t,e,n,i){var s,r,o,a=t.key,u=t.type,l=e[n],c=l!=null&&(2&l.__u)==0;if(l===null&&a==null||c&&a==l.key&&u==l.type)return n;if(i>(c?1:0)){for(s=n-1,r=n+1;s>=0||r<e.length;)if((l=e[o=s>=0?s--:r++])!=null&&(2&l.__u)==0&&a==l.key&&u==l.type)return o}return-1}function Gi(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Na.test(e)?n:n+"px"}function we(t,e,n,i,s){var r,o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||Gi(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||Gi(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(Ui,"$1")),o=e.toLowerCase(),e=o in t||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=en,t.addEventListener(e,r?sn:nn,r)):t.removeEventListener(e,r?sn:nn,r);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Xi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=en++;else if(e.t<n.u)return;return n(M.event?M.event(e):e)}}}function an(t,e,n,i,s,r,o,a,u,l){var c,f,h,d,m,_,g,p,y,v,w,C,V,D,S,A=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),r=[a=e.__e=n.__e]),(c=M.__b)&&c(e);t:if(typeof A=="function")try{if(p=e.props,y=A.prototype&&A.prototype.render,v=(c=A.contextType)&&i[c.__c],w=c?v?v.props.value:c.__:i,n.__c?g=(f=e.__c=n.__c).__=f.__E:(y?e.__c=f=new A(p,w):(e.__c=f=new at(p,w),f.constructor=A,f.render=za),v&&v.sub(f),f.state||(f.state={}),f.__n=i,h=f.__d=!0,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&A.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ft({},f.__s)),ft(f.__s,A.getDerivedStateFromProps(p,f.__s))),d=f.props,m=f.state,f.__v=e,h)y&&A.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&A.getDerivedStateFromProps==null&&p!==d&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(p,w),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(p,f.__s,w)===!1){e.__v!=n.__v&&(f.props=p,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(P){P&&(P.__=e)}),xe.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(p,f.__s,w),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(d,m,_)})}if(f.context=w,f.props=p,f.__P=t,f.__e=!1,C=M.__r,V=0,y)f.state=f.__s,f.__d=!1,C&&C(e),c=f.render(f.props,f.state,f.context),xe.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,C&&C(e),c=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++V<25);f.state=f.__s,f.getChildContext!=null&&(i=ft(ft({},i),f.getChildContext())),y&&!h&&f.getSnapshotBeforeUpdate!=null&&(_=f.getSnapshotBeforeUpdate(d,m)),D=c!=null&&c.type===rt&&c.key==null?qi(c.props.children):c,a=Ki(t,te(D)?D:[D],e,n,i,s,r,o,a,u,l),f.base=e.__e,e.__u&=-161,f.__h.length&&o.push(f),g&&(f.__E=f.__=null)}catch(P){if(e.__v=null,u||r!=null)if(P.then){for(e.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;r[r.indexOf(a)]=null,e.__e=a}else{for(S=r.length;S--;)on(r[S]);ln(e)}else e.__e=n.__e,e.__k=n.__k,P.then||ln(e);M.__e(P,e,n)}else r==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Ka(n.__e,e,n,i,s,r,o,u,l);return(c=M.diffed)&&c(e),128&e.__u?void 0:a}function ln(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(ln))}function Yi(t,e,n){for(var i=0;i<n.length;i++)cn(n[i],n[++i],n[++i]);M.__c&&M.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(r){r.call(s)})}catch(r){M.__e(r,s.__v)}})}function qi(t){return typeof t!="object"||t==null||t.__b>0?t:te(t)?t.map(qi):ft({},t)}function Ka(t,e,n,i,s,r,o,a,u){var l,c,f,h,d,m,_,g=n.props||ve,p=e.props,y=e.type;if(y=="svg"?s="http://www.w3.org/2000/svg":y=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),r!=null){for(l=0;l<r.length;l++)if((d=r[l])&&"setAttribute"in d==!!y&&(y?d.localName==y:d.nodeType==3)){t=d,r[l]=null;break}}if(t==null){if(y==null)return document.createTextNode(p);t=document.createElementNS(s,y,p.is&&p),a&&(M.__m&&M.__m(e,r),a=!1),r=null}if(y==null)g===p||a&&t.data==p||(t.data=p);else{if(r=r&&Qt.call(t.childNodes),!a&&r!=null)for(g={},l=0;l<t.attributes.length;l++)g[(d=t.attributes[l]).name]=d.value;for(l in g)d=g[l],l=="dangerouslySetInnerHTML"?f=d:l=="children"||l in p||l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p||we(t,l,null,d,s);for(l in p)d=p[l],l=="children"?h=d:l=="dangerouslySetInnerHTML"?c=d:l=="value"?m=d:l=="checked"?_=d:a&&typeof d!="function"||g[l]===d||we(t,l,d,g[l],s);if(c)a||f&&(c.__html==f.__html||c.__html==t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(f&&(t.innerHTML=""),Ki(e.type=="template"?t.content:t,te(h)?h:[h],e,n,i,y=="foreignObject"?"http://www.w3.org/1999/xhtml":s,r,o,r?r[0]:n.__k&&It(n,0),a,u),r!=null)for(l=r.length;l--;)on(r[l]);a||(l="value",y=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||y=="progress"&&!m||y=="option"&&m!=g[l])&&we(t,l,m,g[l],s),l="checked",_!=null&&_!=t[l]&&we(t,l,_,g[l],s))}return t}function cn(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(s){M.__e(s,n)}}function Zi(t,e,n){var i,s;if(M.unmount&&M.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||cn(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(r){M.__e(r,e)}i.base=i.__P=null}if(i=t.__k)for(s=0;s<i.length;s++)i[s]&&Zi(i[s],e,n||typeof t.type!="function");n||on(t.__e),t.__c=t.__=t.__e=void 0}function za(t,e,n){return this.constructor(t,n)}function Ji(t,e,n){var i,s,r,o;e==document&&(e=document.documentElement),M.__&&M.__(t,e),s=(i=!1)?null:e.__k,r=[],o=[],an(e,t=e.__k=et(rt,null,[t]),s||ve,ve,e.namespaceURI,s?null:e.firstChild?Qt.call(e.childNodes):null,r,s?s.__e:e.firstChild,i,o),Yi(r,t,o)}function Ga(t,e,n){var i,s,r,o,a=ft({},t.props);for(r in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)r=="key"?i=e[r]:r=="ref"?s=e[r]:a[r]=e[r]===void 0&&o!=null?o[r]:e[r];return arguments.length>2&&(a.children=arguments.length>3?Qt.call(arguments,2):n),ee(t.type,a,i||t.key,s||t.ref,null)}function Ft(t){function e(n){var i,s;return this.getChildContext||(i=new Set,(s={})[e.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(r){this.props.value!=r.value&&i.forEach(function(o){o.__e=!0,rn(o)})},this.sub=function(r){i.add(r);var o=r.componentWillUnmount;r.componentWillUnmount=function(){i&&i.delete(r),o&&o.call(r)}}),n.children}return e.__c="__cC"+Wi++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,i){return n.children(i)}).contextType=e,e}Qt=xe.slice,M={__e:function(t,e,n,i){for(var s,r,o;e=e.__;)if((s=e.__c)&&!s.__)try{if((r=s.constructor)&&r.getDerivedStateFromError!=null&&(s.setState(r.getDerivedStateFromError(t)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,i||{}),o=s.__d),o)return s.__E=s}catch(a){t=a}throw t}},Oi=0,at.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ft({},this.state),typeof t=="function"&&(t=t(ft({},n),this.props)),t&&ft(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),rn(this))},at.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),rn(this))},at.prototype.render=rt,yt=[],Ni=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$i=function(t,e){return t.__v.__b-e.__v.__b},be.__r=0,Ui=/(PointerCapture)$|Capture$/i,en=0,nn=Xi(!1),sn=Xi(!0),Wi=0;var Xa=0;function b(t,e,n,i,s,r){e||(e={});var o,a,u=e;if("ref"in u)for(a in u={},e)a=="ref"?o=e[a]:u[a]=e[a];var l={type:t,props:u,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Xa,__i:-1,__u:0,__source:s,__self:r};if(typeof t=="function"&&(o=t.defaultProps))for(a in o)u[a]===void 0&&(u[a]=o[a]);return M.vnode&&M.vnode(l),l}var _t,I,un,Qi,Bt=0,ts=[],N=M,es=N.__b,ns=N.__r,is=N.diffed,ss=N.__c,os=N.unmount,rs=N.__;function Ot(t,e){N.__h&&N.__h(I,t,Bt||e),Bt=0;var n=I.__H||(I.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function $(t){return Bt=1,Ya(ls,t)}function Ya(t,e,n){var i=Ot(_t++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):ls(void 0,e),function(a){var u=i.__N?i.__N[0]:i.__[0],l=i.t(u,a);u!==l&&(i.__N=[l,i.__[1]],i.__c.setState({}))}],i.__c=I,!I.__f)){var s=function(a,u,l){if(!i.__c.__H)return!0;var c=i.__c.__H.__.filter(function(h){return h.__c});if(c.every(function(h){return!h.__N}))return!r||r.call(this,a,u,l);var f=i.__c.props!==a;return c.some(function(h){if(h.__N){var d=h.__[0];h.__=h.__N,h.__N=void 0,d!==h.__[0]&&(f=!0)}}),r&&r.call(this,a,u,l)||f};I.__f=!0;var r=I.shouldComponentUpdate,o=I.componentWillUpdate;I.componentWillUpdate=function(a,u,l){if(this.__e){var c=r;r=void 0,s(a,u,l),r=c}o&&o.call(this,a,u,l)},I.shouldComponentUpdate=s}return i.__N||i.__}function q(t,e){var n=Ot(_t++,3);!N.__s&&mn(n.__H,e)&&(n.__=t,n.u=e,I.__H.__h.push(n))}function fn(t,e){var n=Ot(_t++,4);!N.__s&&mn(n.__H,e)&&(n.__=t,n.u=e,I.__h.push(n))}function F(t){return Bt=5,gt(function(){return{current:t}},[])}function qa(t,e,n){Bt=6,fn(function(){if(typeof t=="function"){var i=t(e());return function(){t(null),i&&typeof i=="function"&&i()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function gt(t,e){var n=Ot(_t++,7);return mn(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function jt(t,e){return Bt=8,gt(function(){return t},e)}function H(t){var e=I.context[t.__c],n=Ot(_t++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(I)),e.props.value):t.__}function hn(){var t=Ot(_t++,11);if(!t.__){for(var e=I.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Za(){for(var t;t=ts.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Te),e.__h.some(dn),e.__h=[]}catch(n){e.__h=[],N.__e(n,t.__v)}}}N.__b=function(t){I=null,es&&es(t)},N.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rs&&rs(t,e)},N.__r=function(t){ns&&ns(t),_t=0;var e=(I=t.__c).__H;e&&(un===I?(e.__h=[],I.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Te),e.__h.some(dn),e.__h=[],_t=0)),un=I},N.diffed=function(t){is&&is(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ts.push(e)!==1&&Qi===N.requestAnimationFrame||((Qi=N.requestAnimationFrame)||Ja)(Za)),e.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),un=I=null},N.__c=function(t,e){e.some(function(n){try{n.__h.some(Te),n.__h=n.__h.filter(function(i){return!i.__||dn(i)})}catch(i){e.some(function(s){s.__h&&(s.__h=[])}),e=[],N.__e(i,n.__v)}}),ss&&ss(t,e)},N.unmount=function(t){os&&os(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(i){try{Te(i)}catch(s){e=s}}),n.__H=void 0,e&&N.__e(e,n.__v))};var as=typeof requestAnimationFrame=="function";function Ja(t){var e,n=function(){clearTimeout(i),as&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);as&&(e=requestAnimationFrame(n))}function Te(t){var e=I,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),I=e}function dn(t){var e=I;t.__c=t.__(),I=e}function mn(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function ls(t,e){return typeof e=="function"?e(t):e}function cs(t,e){for(var n in e)t[n]=e[n];return t}function us(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var i in e)if(i!=="__source"&&t[i]!==e[i])return!0;return!1}var pn=fn;function fs(t,e){this.props=t,this.context=e}(fs.prototype=new at).isPureReactComponent=!0,fs.prototype.shouldComponentUpdate=function(t,e){return us(this.props,t)||us(this.state,e)};var hs=M.__b;M.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),hs&&hs(t)};var Qa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function gn(t){function e(n){var i=cs({},n);return delete i.ref,t(i,n.ref||null)}return e.$$typeof=Qa,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ds=function(t,e){return t==null?null:pt(pt(t).map(e))},tl={map:ds,forEach:ds,count:function(t){return t?pt(t).length:0},only:function(t){var e=pt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:pt},el=M.__e;M.__e=function(t,e,n,i){if(t.then){for(var s,r=e;r=r.__;)if((s=r.__c)&&s.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),s.__c(t,e)}el(t,e,n,i)};var ms=M.unmount;function ps(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),t.__c.__H=null),(t=cs({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(i){return ps(i,e,n)})),t}function gs(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(i){return gs(i,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function yn(){this.__u=0,this.o=null,this.__b=null}function ys(t){var e=t.__&&t.__.__c;return e&&e.__a&&e.__a(t)}function Ce(){this.i=null,this.l=null}M.unmount=function(t){var e=t.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ms&&ms(t)},(yn.prototype=new at).__c=function(t,e){var n=e.__c,i=this;i.o==null&&(i.o=[]),i.o.push(n);var s=ys(i.__v),r=!1,o=function(){r||i.__z||(r=!0,n.__R=null,s?s(u):u())};n.__R=o;var a=n.__P;n.__P=null;var u=function(){if(!--i.__u){if(i.state.__a){var l=i.state.__a;i.__v.__k[0]=gs(l,l.__c.__P,l.__c.__O)}var c;for(i.setState({__a:i.__b=null});c=i.o.pop();)c.__P=a,c.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(o,o)},yn.prototype.componentWillUnmount=function(){this.o=[]},yn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=ps(this.__b,n,i.__O=i.__P)}this.__b=null}var s=e.__a&&et(rt,null,t.fallback);return s&&(s.__u&=-33),[et(rt,null,e.__a?null:t.children),s]};var _s=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};(Ce.prototype=new at).__a=function(t){var e=this,n=ys(e.__v),i=e.l.get(t);return i[0]++,function(s){var r=function(){e.props.revealOrder?(i.push(s),_s(e,t,i)):s()};n?n(r):r()}},Ce.prototype.render=function(t){this.i=null,this.l=new Map;var e=pt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Ce.prototype.componentDidUpdate=Ce.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){_s(t,n,e)})};var vs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,nl=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,il=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,sl=/[A-Z0-9]/g,ol=typeof document<"u",rl=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};at.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(at.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var xs=M.event;M.event=function(t){return xs&&(t=xs(t)),t.persist=function(){},t.isPropagationStopped=function(){return this.cancelBubble},t.isDefaultPrevented=function(){return this.defaultPrevented},t.nativeEvent=t};var al={configurable:!0,get:function(){return this.class}},bs=M.vnode;M.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,i=e.type,s={},r=i.indexOf("-")==-1;for(var o in n){var a=n[o];if(!(o==="value"&&"defaultValue"in n&&a==null||ol&&o==="children"&&i==="noscript"||o==="class"||o==="className")){var u=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":u==="translate"&&a==="no"?a=!1:u[0]==="o"&&u[1]==="n"?u==="ondoubleclick"?o="ondblclick":u!=="onchange"||i!=="input"&&i!=="textarea"||rl(n.type)?u==="onfocus"?o="onfocusin":u==="onblur"?o="onfocusout":il.test(o)&&(o=u):u=o="oninput":r&&nl.test(o)?o=o.replace(sl,"-$&").toLowerCase():a===null&&(a=void 0),u==="oninput"&&s[o=u]&&(o="oninputCapture"),s[o]=a}}i=="select"&&(s.multiple&&Array.isArray(s.value)&&(s.value=pt(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),s.defaultValue!=null&&(s.value=pt(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value}))),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",al)):n.className&&(s.class=s.className=n.className),e.props=s})(t),t.$$typeof=vs,bs&&bs(t)};var ws=M.__r;M.__r=function(t){ws&&ws(t),t.__c};var Ts=M.diffed;M.diffed=function(t){Ts&&Ts(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value)};function Cs(t){return!!t&&t.$$typeof===vs}function ll(t){return Cs(t)?Ga.apply(null,arguments):t}const _n=Ft({});function ne(t){const e=F(null);return e.current===null&&(e.current=t()),e.current}const Ps=typeof window<"u"?fn:q,Pe=Ft(null);function vn(t,e){t.indexOf(e)===-1&&t.push(e)}function Se(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ht=(t,e,n)=>n>e?e:n<t?t:n;let xn=()=>{};const vt={},Ss=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function As(t){return typeof t=="object"&&t!==null}const Es=t=>/^0[^.\s]+$/u.test(t);function Ms(t){let e;return()=>(e===void 0&&(e=t()),e)}const st=t=>t,cl=(t,e)=>n=>e(t(n)),ie=(...t)=>t.reduce(cl),se=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};class bn{constructor(){this.subscriptions=[]}add(e){return vn(this.subscriptions,e),()=>Se(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const nt=t=>t*1e3,ot=t=>t/1e3;function Vs(t,e){return e?t*(1e3/e):0}const ks=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ul=1e-7,fl=12;function hl(t,e,n,i,s){let r,o,a=0;do o=e+(n-e)/2,r=ks(o,i,s)-t,r>0?n=o:e=o;while(Math.abs(r)>ul&&++a<fl);return o}function oe(t,e,n,i){if(t===e&&n===i)return st;const s=r=>hl(r,0,1,t,n);return r=>r===0||r===1?r:ks(s(r),e,i)}const Ds=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Rs=t=>e=>1-t(1-e),Ls=oe(.33,1.53,.69,.99),wn=Rs(Ls),Is=Ds(wn),Fs=t=>t>=1?1:(t*=2)<1?.5*wn(t):.5*(2-Math.pow(2,-10*(t-1))),Tn=t=>1-Math.sin(Math.acos(t)),Bs=Rs(Tn),Os=Ds(Tn),dl=oe(.42,0,1,1),ml=oe(0,0,.58,1),js=oe(.42,0,.58,1),pl=t=>Array.isArray(t)&&typeof t[0]!="number",Ns=t=>Array.isArray(t)&&typeof t[0]=="number",gl={linear:st,easeIn:dl,easeInOut:js,easeOut:ml,circIn:Tn,circInOut:Os,circOut:Bs,backIn:wn,backInOut:Is,backOut:Ls,anticipate:Fs},yl=t=>typeof t=="string",$s=t=>{if(Ns(t)){xn(t.length===4);const[e,n,i,s]=t;return oe(e,n,i,s)}else if(yl(t))return gl[t];return t},Ae=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function _l(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(c){o.has(c)&&(l.schedule(c),t()),c(a)}const l={schedule:(c,f=!1,h=!1)=>{const m=h&&s?n:i;return f&&o.add(c),m.add(c),c},cancel:c=>{i.delete(c),o.delete(c)},process:c=>{if(a=c,s){r=!0;return}s=!0;const f=n;n=i,i=f,n.forEach(u),n.clear(),s=!1,r&&(r=!1,l.process(c))}};return l}const vl=40;function Us(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Ae.reduce((v,w)=>(v[w]=_l(r),v),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:f,preRender:h,render:d,postRender:m}=o,_=()=>{const v=vt.useManualTiming,w=v?s.timestamp:performance.now();n=!1,v||(s.delta=i?1e3/60:Math.max(Math.min(w-s.timestamp,vl),1)),s.timestamp=w,s.isProcessing=!0,a.process(s),u.process(s),l.process(s),c.process(s),f.process(s),h.process(s),d.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(_))},g=()=>{n=!0,i=!0,s.isProcessing||t(_)};return{schedule:Ae.reduce((v,w)=>{const C=o[w];return v[w]=(V,D=!1,S=!1)=>(n||g(),C.schedule(V,D,S)),v},{}),cancel:v=>{for(let w=0;w<Ae.length;w++)o[Ae[w]].cancel(v)},state:s,steps:o}}const{schedule:L,cancel:xt,state:K,steps:Cn}=Us(typeof requestAnimationFrame<"u"?requestAnimationFrame:st,!0);let Ee;function xl(){Ee=void 0}const Z={now:()=>(Ee===void 0&&Z.set(K.isProcessing||vt.useManualTiming?K.timestamp:performance.now()),Ee),set:t=>{Ee=t,queueMicrotask(xl)}},Ws=t=>e=>typeof e=="string"&&e.startsWith(t),Hs=Ws("--"),bl=Ws("var(--"),Pn=t=>bl(t)?wl.test(t.split("/*")[0].trim()):!1,wl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ks(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Nt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},re={...Nt,transform:t=>ht(0,1,t)},Me={...Nt,default:1},ae=t=>Math.round(t*1e5)/1e5,Sn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Tl(t){return t==null}const Cl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,An=(t,e)=>n=>!!(typeof n=="string"&&Cl.test(n)&&n.startsWith(t)||e&&!Tl(n)&&Object.prototype.hasOwnProperty.call(n,e)),zs=(t,e,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(Sn);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Pl=t=>ht(0,255,t),En={...Nt,transform:t=>Math.round(Pl(t))},Pt={test:An("rgb","red"),parse:zs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+En.transform(t)+", "+En.transform(e)+", "+En.transform(n)+", "+ae(re.transform(i))+")"};function Sl(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Mn={test:An("#"),parse:Sl,transform:Pt.transform},le=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),bt=le("deg"),dt=le("%"),T=le("px"),Al=le("vh"),El=le("vw"),Gs={...dt,parse:t=>dt.parse(t)/100,transform:t=>dt.transform(t*100)},$t={test:An("hsl","hue"),parse:zs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+dt.transform(ae(e))+", "+dt.transform(ae(n))+", "+ae(re.transform(i))+")"},U={test:t=>Pt.test(t)||Mn.test(t)||$t.test(t),parse:t=>Pt.test(t)?Pt.parse(t):$t.test(t)?$t.parse(t):Mn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Pt.transform(t):$t.transform(t),getAnimatableNone:t=>{const e=U.parse(t);return e.alpha=0,U.transform(e)}},Ml=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vl(t){return isNaN(t)&&typeof t=="string"&&(t.match(Sn)?.length||0)+(t.match(Ml)?.length||0)>0}const Xs="number",Ys="color",kl="var",Dl="var(",qs="${}",Rl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ut(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(Rl,u=>(U.test(u)?(i.color.push(r),s.push(Ys),n.push(U.parse(u))):u.startsWith(Dl)?(i.var.push(r),s.push(kl),n.push(u)):(i.number.push(r),s.push(Xs),n.push(parseFloat(u))),++r,qs)).split(qs);return{values:n,split:a,indexes:i,types:s}}function Ll(t){return Ut(t).values}function Zs({split:t,types:e}){const n=t.length;return i=>{let s="";for(let r=0;r<n;r++)if(s+=t[r],i[r]!==void 0){const o=e[r];o===Xs?s+=ae(i[r]):o===Ys?s+=U.transform(i[r]):s+=i[r]}return s}}function Il(t){return Zs(Ut(t))}const Fl=t=>typeof t=="number"?0:U.test(t)?U.getAnimatableNone(t):t,Bl=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Fl(t);function Ol(t){const e=Ut(t);return Zs(e)(e.values.map((i,s)=>Bl(i,e.split[s])))}const lt={test:Vl,parse:Ll,createTransformer:Il,getAnimatableNone:Ol};function Vn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function jl({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,r=0,o=0;if(!e)s=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;s=Vn(u,a,t+1/3),r=Vn(u,a,t),o=Vn(u,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function Ve(t,e){return n=>n>0?e:t}const B=(t,e,n)=>t+(e-t)*n,kn=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Nl=[Mn,Pt,$t],$l=t=>Nl.find(e=>e.test(t));function Js(t){const e=$l(t);if(!e)return!1;let n=e.parse(t);return e===$t&&(n=jl(n)),n}const Qs=(t,e)=>{const n=Js(t),i=Js(e);if(!n||!i)return Ve(t,e);const s={...n};return r=>(s.red=kn(n.red,i.red,r),s.green=kn(n.green,i.green,r),s.blue=kn(n.blue,i.blue,r),s.alpha=B(n.alpha,i.alpha,r),Pt.transform(s))},Dn=new Set(["none","hidden"]);function Ul(t,e){return Dn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Wl(t,e){return n=>B(t,e,n)}function Rn(t){return typeof t=="number"?Wl:typeof t=="string"?Pn(t)?Ve:U.test(t)?Qs:zl:Array.isArray(t)?to:typeof t=="object"?U.test(t)?Qs:Hl:Ve}function to(t,e){const n=[...t],i=n.length,s=t.map((r,o)=>Rn(r)(r,e[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function Hl(t,e){const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=Rn(t[s])(t[s],e[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function Kl(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}const zl=(t,e)=>{const n=lt.createTransformer(e),i=Ut(t),s=Ut(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Dn.has(t)&&!s.values.length||Dn.has(e)&&!i.values.length?Ul(t,e):ie(to(Kl(i,s),s.values),n):Ve(t,e)};function eo(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?B(t,e,n):Rn(t)(t,e)}const Gl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>xt(e),now:()=>K.isProcessing?K.timestamp:Z.now()}},no=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let r=0;r<s;r++)i+=Math.round(t(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ke=2e4;function Ln(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<ke;)e+=n,i=t.next(e);return e>=ke?1/0:e}function Xl(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Ln(i),ke);return{type:"keyframes",ease:r=>i.next(s*r).value/e,duration:ot(s)}}const j={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function In(t,e){return t*Math.sqrt(1-e*e)}const Yl=12;function ql(t,e,n){let i=n;for(let s=1;s<Yl;s++)i=i-t(i)/e(i);return i}const Fn=.001;function Zl({duration:t=j.duration,bounce:e=j.bounce,velocity:n=j.velocity,mass:i=j.mass}){let s,r,o=1-e;o=ht(j.minDamping,j.maxDamping,o),t=ht(j.minDuration,j.maxDuration,ot(t)),o<1?(s=l=>{const c=l*o,f=c*t,h=c-n,d=In(l,o),m=Math.exp(-f);return Fn-h/d*m},r=l=>{const f=l*o*t,h=f*n+n,d=Math.pow(o,2)*Math.pow(l,2)*t,m=Math.exp(-f),_=In(Math.pow(l,2),o);return(-s(l)+Fn>0?-1:1)*((h-d)*m)/_}):(s=l=>{const c=Math.exp(-l*t),f=(l-n)*t+1;return-Fn+c*f},r=l=>{const c=Math.exp(-l*t),f=(n-l)*(t*t);return c*f});const a=5/t,u=ql(s,r,a);if(t=nt(t),isNaN(u))return{stiffness:j.stiffness,damping:j.damping,duration:t};{const l=Math.pow(u,2)*i;return{stiffness:l,damping:o*2*Math.sqrt(i*l),duration:t}}}const Jl=["duration","bounce"],Ql=["stiffness","damping","mass"];function io(t,e){return e.some(n=>t[n]!==void 0)}function tc(t){let e={velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1,...t};if(!io(t,Ql)&&io(t,Jl))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*ht(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:j.mass,stiffness:s,damping:r}}else{const n=Zl({...t,velocity:0});e={...e,...n,mass:j.mass},e.isResolvedFromDuration=!0}return e}function De(t=j.visualDuration,e=j.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:l,mass:c,duration:f,velocity:h,isResolvedFromDuration:d}=tc({...n,velocity:-ot(n.velocity||0)}),m=h||0,_=l/(2*Math.sqrt(u*c)),g=o-r,p=ot(Math.sqrt(u/c)),y=Math.abs(g)<5;i||(i=y?j.restSpeed.granular:j.restSpeed.default),s||(s=y?j.restDelta.granular:j.restDelta.default);let v,w,C,V,D,S;if(_<1)C=In(p,_),V=(m+_*p*g)/C,v=P=>{const k=Math.exp(-_*p*P);return o-k*(V*Math.sin(C*P)+g*Math.cos(C*P))},D=_*p*V+g*C,S=_*p*g-V*C,w=P=>Math.exp(-_*p*P)*(D*Math.sin(C*P)+S*Math.cos(C*P));else if(_===1){v=k=>o-Math.exp(-p*k)*(g+(m+p*g)*k);const P=m+p*g;w=k=>Math.exp(-p*k)*(p*P*k-m)}else{const P=p*Math.sqrt(_*_-1);v=G=>{const X=Math.exp(-_*p*G),tt=Math.min(P*G,300);return o-X*((m+_*p*g)*Math.sinh(tt)+P*g*Math.cosh(tt))/P};const k=(m+_*p*g)/P,O=_*p*k-g*P,Y=_*p*g-k*P;w=G=>{const X=Math.exp(-_*p*G),tt=Math.min(P*G,300);return X*(O*Math.sinh(tt)+Y*Math.cosh(tt))}}const A={calculatedDuration:d&&f||null,velocity:P=>nt(w(P)),next:P=>{if(!d&&_<1){const O=Math.exp(-_*p*P),Y=Math.sin(C*P),G=Math.cos(C*P),X=o-O*(V*Y+g*G),tt=nt(O*(D*Y+S*G));return a.done=Math.abs(tt)<=i&&Math.abs(o-X)<=s,a.value=a.done?o:X,a}const k=v(P);if(d)a.done=P>=f;else{const O=nt(w(P));a.done=Math.abs(O)<=i&&Math.abs(o-k)<=s}return a.value=a.done?o:k,a},toString:()=>{const P=Math.min(Ln(A),ke),k=no(O=>A.next(P*O).value,P,30);return P+"ms "+k},toTransition:()=>{}};return A}De.applyToOptions=t=>{const e=Xl(t,100,De);return t.ease=e.ease,t.duration=nt(e.duration),t.type="keyframes",t};const ec=5;function so(t,e,n){const i=Math.max(e-ec,0);return Vs(n-t(i),e-i)}function Bn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const f=t[0],h={done:!1,value:f},d=S=>a!==void 0&&S<a||u!==void 0&&S>u,m=S=>a===void 0?u:u===void 0||Math.abs(a-S)<Math.abs(u-S)?a:u;let _=n*e;const g=f+_,p=o===void 0?g:o(g);p!==g&&(_=p-f);const y=S=>-_*Math.exp(-S/i),v=S=>p+y(S),w=S=>{const A=y(S),P=v(S);h.done=Math.abs(A)<=l,h.value=h.done?p:P};let C,V;const D=S=>{d(h.value)&&(C=S,V=De({keyframes:[h.value,m(h.value)],velocity:so(v,S,h.value),damping:s,stiffness:r,restDelta:l,restSpeed:c}))};return D(0),{calculatedDuration:null,next:S=>{let A=!1;return!V&&C===void 0&&(A=!0,w(S),D(S)),C!==void 0&&S>=C?V.next(S-C):(!A&&w(S),h)}}}function nc(t,e,n){const i=[],s=n||vt.mix||eo,r=t.length-1;for(let o=0;o<r;o++){let a=s(t[o],t[o+1]);if(e){const u=Array.isArray(e)?e[o]||st:e;a=ie(u,a)}i.push(a)}return i}function ic(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(xn(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=nc(e,i,s),u=a.length,l=c=>{if(o&&c<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const h=se(t[f],t[f+1],c);return a[f](h)};return n?c=>l(ht(t[0],t[r-1],c)):l}function sc(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=se(0,e,i);t.push(B(n,1,s))}}function oc(t){const e=[0];return sc(e,t.length-1),e}function rc(t,e){return t.map(n=>n*e)}function ac(t,e){return t.map(()=>e||js).splice(0,t.length-1)}function ce({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=pl(i)?i.map($s):$s(i),r={done:!1,value:e[0]},o=rc(n&&n.length===e.length?n:oc(e),t),a=ic(o,e,{ease:Array.isArray(s)?s:ac(e,s)});return{calculatedDuration:t,next:u=>(r.value=a(u),r.done=u>=t,r)}}const lc=t=>t!==null;function On(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(lc),a=s<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const cc={decay:Bn,inertia:Bn,tween:ce,keyframes:ce,spring:De};function oo(t){typeof t.type=="string"&&(t.type=cc[t.type])}class jn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const uc=t=>t/100;class Nn extends jn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Z.now()&&this.tick(Z.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;oo(e);const{type:n=ce,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const u=n||ce;u!==ce&&typeof a[0]!="number"&&(this.mixKeyframes=ie(uc,eo(a[0],a[1])),a=[0,100]);const l=u({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=Ln(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return i.next(0);const{delay:l=0,keyframes:c,repeat:f,repeatType:h,repeatDelay:d,type:m,onUpdate:_,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,w=i;if(f){const S=Math.min(this.currentTime,s)/a;let A=Math.floor(S),P=S%1;!P&&S>=1&&(P=1),P===1&&A--,A=Math.min(A,f+1),A%2&&(h==="reverse"?(P=1-P,d&&(P-=d/a)):h==="mirror"&&(w=o)),v=ht(0,1,P)*a}const C=y?{done:!1,value:c[0]}:w.next(v);r&&!y&&(C.value=r(C.value));let{done:V}=C;!y&&u!==null&&(V=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return D&&m!==Bn&&(C.value=On(c,this.options,g,this.speed)),_&&_(C.value),D&&this.finish(),C}then(e,n){return this.finished.then(e,n)}get duration(){return ot(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ot(e)}get time(){return ot(this.currentTime)}set time(e){e=nt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return so(i=>this.generator.next(i).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(Z.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=ot(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Gl,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Z.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function fc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const St=t=>t*180/Math.PI,$n=t=>{const e=St(Math.atan2(t[1],t[0]));return Un(e)},hc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$n,rotateZ:$n,skewX:t=>St(Math.atan(t[1])),skewY:t=>St(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Un=t=>(t=t%360,t<0&&(t+=360),t),ro=$n,ao=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),lo=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),dc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ao,scaleY:lo,scale:t=>(ao(t)+lo(t))/2,rotateX:t=>Un(St(Math.atan2(t[6],t[5]))),rotateY:t=>Un(St(Math.atan2(-t[2],t[0]))),rotateZ:ro,rotate:ro,skewX:t=>St(Math.atan(t[4])),skewY:t=>St(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Wn(t){return t.includes("scale")?1:0}function Hn(t,e){if(!t||t==="none")return Wn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=dc,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=hc,s=a}if(!s)return Wn(e);const r=i[e],o=s[1].split(",").map(pc);return typeof r=="function"?r(o):o[r]}const mc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Hn(n,e)};function pc(t){return parseFloat(t.trim())}const Wt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ht=new Set(Wt),co=t=>t===Nt||t===T,gc=new Set(["x","y","z"]),yc=Wt.filter(t=>!gc.has(t));function _c(t){const e=[];return yc.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const wt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Hn(e,"x"),y:(t,{transform:e})=>Hn(e,"y")};wt.translateX=wt.x,wt.translateY=wt.y;const At=new Set;let Kn=!1,zn=!1,Gn=!1;function uo(){if(zn){const t=Array.from(At).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const s=_c(i);s.length&&(n.set(i,s),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{i.getValue(r)?.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}zn=!1,Kn=!1,At.forEach(t=>t.complete(Gn)),At.clear()}function fo(){At.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(zn=!0)})}function vc(){Gn=!0,fo(),uo(),Gn=!1}class Xn{constructor(e,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(At.add(this),Kn||(Kn=!0,L.read(fo),L.resolveKeyframes(uo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:s}=this;if(e[0]===null){const r=s?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&r===void 0&&s.set(e[0])}fc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),At.delete(this)}cancel(){this.state==="scheduled"&&(At.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xc=t=>t.startsWith("--");function ho(t,e,n){xc(e)?t.style.setProperty(e,n):t.style[e]=n}const bc={};function mo(t,e){const n=Ms(t);return()=>bc[e]??n()}const wc=mo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),po=mo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ue=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,go={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ue([0,.65,.55,1]),circOut:ue([.55,0,1,.45]),backIn:ue([.31,.01,.66,-.59]),backOut:ue([.33,1.53,.69,.99])};function yo(t,e){if(t)return typeof t=="function"?po()?no(t,e):"ease-out":Ns(t)?ue(t):Array.isArray(t)?t.map(n=>yo(n,e)||go.easeOut):go[t]}function Tc(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const f=yo(a,s);Array.isArray(f)&&(c.easing=f);const h={delay:i,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),t.animate(c,h)}function _o(t){return typeof t=="function"&&"applyToOptions"in t}function Cc({type:t,...e}){return _o(t)&&po()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class vo extends jn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,xn(typeof e.type!="string");const l=Cc(e);this.animation=Tc(n,i,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=On(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),ho(n,i,c),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ot(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ot(e)}get time(){return ot(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=nt(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&wc()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),st):s(this)}}const xo={anticipate:Fs,backInOut:Is,circInOut:Os};function Pc(t){return t in xo}function Sc(t){typeof t.ease=="string"&&Pc(t.ease)&&(t.ease=xo[t.ease])}const Yn=10;class Ac extends vo{constructor(e){Sc(e),oo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Nn({...o,autoplay:!1}),u=Math.max(Yn,Z.now()-this.startTime),l=ht(0,Yn,u-Yn),c=a.sample(u).value,{name:f}=this.options;r&&f&&ho(r,f,c),n.setWithVelocity(a.sample(Math.max(0,u-l)).value,c,l),a.stop()}}const bo=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(lt.test(t)||t==="0")&&!t.startsWith("url("));function Ec(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Mc(t,e,n,i){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=bo(s,e),a=bo(r,e);return!o||!a?!1:Ec(t)||(n==="spring"||_o(n))&&i}function qn(t){t.duration=0,t.type="keyframes"}const Vc=new Set(["opacity","clipPath","filter","transform"]),kc=Ms(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Dc(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return kc()&&n&&Vc.has(n)&&(n!=="transform"||!l)&&!u&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Rc=40;class Lc extends jn{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:u,motionValue:l,element:c,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Z.now();const h={autoplay:e,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:u,motionValue:l,element:c,...f},d=c?.KeyframeResolver||Xn;this.keyframeResolver=new d(a,(m,_,g)=>this.onKeyframesResolved(m,_,h,!g),u,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:u,isHandoff:l,onUpdate:c}=i;this.resolvedAt=Z.now();let f=!0;Mc(e,r,o,a)||(f=!1,(vt.instantAnimations||!u)&&c?.(On(e,i,n)),e[0]=e[e.length-1],qn(i),i.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Rc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=f&&!l&&Dc(d),_=d.motionValue?.owner?.current,g=m?new Ac({...d,element:_}):new Nn(d);g.finished.then(()=>{this.notifyFinished()}).catch(st),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),vc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function wo(t,e,n,i=0,s=1){const r=Array.from(t).sort((l,c)=>l.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const Ic=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fc(t){const e=Ic.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function To(t,e,n=1){const[i,s]=Fc(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const o=r.trim();return Ss(o)?parseFloat(o):o}return Pn(s)?To(s,e,n+1):s}const Bc={type:"spring",stiffness:500,damping:25,restSpeed:10},Oc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),jc={type:"keyframes",duration:.8},Nc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$c=(t,{keyframes:e})=>e.length>2?jc:Ht.has(t)?t.startsWith("scale")?Oc(e[1]):Bc:Nc,Uc=t=>t!==null;function Wc(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Uc),r=e&&n!=="loop"&&e%2===1?0:s.length-1;return s[r]}function Co(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Zn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Co(n,t):n}function Hc({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const Jn=(t,e,n,i={},s,r)=>o=>{const a=Zn(i,t)||{},u=a.delay||i.delay||0;let{elapsed:l=0}=i;l=l-nt(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};Hc(a)||Object.assign(c,$c(t,c)),c.duration&&(c.duration=nt(c.duration)),c.repeatDelay&&(c.repeatDelay=nt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(qn(c),c.delay===0&&(f=!0)),(vt.instantAnimations||vt.skipAnimations||s?.shouldSkipAnimations)&&(f=!0,qn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!r&&e.get()!==void 0){const h=Wc(c.keyframes,a);if(h!==void 0){L.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new Nn(c):new Lc(c)};function Po(t){const e=[{},{}];return t?.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function Qn(t,e,n,i){if(typeof e=="function"){const[s,r]=Po(i);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=Po(i);e=e(n!==void 0?n:t.custom,s,r)}return e}function Et(t,e,n){const i=t.getProps();return Qn(i,e,n!==void 0?n:i.custom,t)}const So=new Set(["width","height","top","left","right","bottom",...Wt]),Ao=30,Kc=t=>!isNaN(parseFloat(t));class zc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=Z.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Kc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new bn);const i=this.events[e].add(n);return e==="change"?()=>{i(),L.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ao)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ao);return Vs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Mt(t,e){return new zc(t,e)}const ti=t=>Array.isArray(t);function Gc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Mt(n))}function Xc(t){return ti(t)?t[t.length-1]||0:t}function Yc(t,e){const n=Et(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=Xc(r[o]);Gc(t,o,a)}}const z=t=>!!(t&&t.getVelocity);function qc(t){return!!(z(t)&&t.add)}function ei(t,e){const n=t.getValue("willChange");if(qc(n))return n.add(e);if(!n&&vt.WillChange){const i=new vt.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function ni(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Eo="data-"+ni("framerAppearId");function Mo(t){return t.props[Eo]}function Zc({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Vo(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?Co(r,u):u;const l=r?.reduceMotion;i&&(r=i);const c=[],f=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const d=t.getValue(h,t.latestValues[h]??null),m=a[h];if(m===void 0||f&&Zc(f,h))continue;const _={delay:n,...Zn(r||{},h)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===g&&!_.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const w=Mo(t);if(w){const C=window.MotionHandoffAnimation(w,h,L);C!==null&&(_.startTime=C,p=!0)}}ei(t,h);const y=l??t.shouldReduceMotion;d.start(Jn(h,d,m,y&&So.has(h)?{type:!1}:_,t,p));const v=d.animation;v&&c.push(v)}if(o){const h=()=>L.update(()=>{o&&Yc(t,o)});c.length?Promise.all(c).then(h):h()}return c}function ii(t,e,n={}){const i=Et(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Vo(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:c,staggerDirection:f}=s;return Jc(t,e,u,l,c,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,l]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function Jc(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(ii(u,e,{...o,delay:n+(typeof i=="function"?0:i)+wo(t.variantChildren,u,i,s,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function Qc(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(r=>ii(t,r,n));i=Promise.all(s)}else if(typeof e=="string")i=ii(t,e,n);else{const s=typeof e=="function"?Et(t,e,n.custom):e;i=Promise.all(Vo(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const tu={test:t=>t==="auto",parse:t=>t},ko=t=>e=>e.test(t),Do=[Nt,T,dt,bt,El,Al,tu],Ro=t=>Do.find(ko(t));function eu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Es(t):!0}const nu=new Set(["brightness","contrast","saturate","opacity"]);function iu(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(Sn)||[];if(!i)return t;const s=n.replace(i,"");let r=nu.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const su=/\b([a-z-]*)\(.*?\)/gu,si={...lt,getAnimatableNone:t=>{const e=t.match(su);return e?e.map(iu).join(" "):t}},oi={...lt,getAnimatableNone:t=>{const e=lt.parse(t);return lt.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Lo={...Nt,transform:Math.round},ri={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...{rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:Me,scaleX:Me,scaleY:Me,scaleZ:Me,skew:bt,skewX:bt,skewY:bt,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:re,originX:Gs,originY:Gs,originZ:T},zIndex:Lo,fillOpacity:re,strokeOpacity:re,numOctaves:Lo},ou={...ri,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:si,WebkitFilter:si,mask:oi,WebkitMask:oi},Io=t=>ou[t],ru=new Set([si,oi]);function Fo(t,e){let n=Io(t);return ru.has(n)||(n=lt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const au=new Set(["auto","none","0"]);function lu(t,e,n){let i=0,s;for(;i<t.length&&!s;){const r=t[i];typeof r=="string"&&!au.has(r)&&Ut(r).values.length&&(s=t[i]),i++}if(s&&n)for(const r of e)t[r]=Fo(n,s)}class cu extends Xn{constructor(e,n,i,s,r){super(e,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let f=e[c];if(typeof f=="string"&&(f=f.trim(),Pn(f))){const h=To(f,n.current);h!==void 0&&(e[c]=h),c===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!So.has(i)||e.length!==2)return;const[s,r]=e,o=Ro(s),a=Ro(r),u=Ks(s),l=Ks(r);if(u!==l&&wt[i]){this.needsMeasurement=!0;return}if(o!==a)if(co(o)&&co(a))for(let c=0;c<e.length;c++){const f=e[c];typeof f=="string"&&(e[c]=parseFloat(f))}else wt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||eu(e[s]))&&i.push(s);i.length&&lu(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=wt[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=wt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u)}),this.resolveNoneKeyframes()}}const uu=new Set(["opacity","clipPath","filter","transform"]);function Bo(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}const Oo=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Re(t){return As(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:ai}=Us(queueMicrotask,!1),ct={x:!1,y:!1};function jo(){return ct.x||ct.y}function fu(t){return t==="x"||t==="y"?ct[t]?null:(ct[t]=!0,()=>{ct[t]=!1}):ct.x||ct.y?null:(ct.x=ct.y=!0,()=>{ct.x=ct.y=!1})}function No(t,e){const n=Bo(t),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[n,s,()=>i.abort()]}function hu(t){return!(t.pointerType==="touch"||jo())}function du(t,e,n={}){const[i,s,r]=No(t,n);return i.forEach(o=>{let a=!1,u=!1,l;const c=()=>{o.removeEventListener("pointerleave",m)},f=g=>{l&&(l(g),l=void 0),c()},h=g=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),u&&(u=!1,f(g))},d=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},m=g=>{if(g.pointerType!=="touch"){if(a){u=!0;return}f(g)}},_=g=>{if(!hu(g))return;u=!1;const p=e(o,g);typeof p=="function"&&(l=p,o.addEventListener("pointerleave",m,s))};o.addEventListener("pointerenter",_,s),o.addEventListener("pointerdown",d,s)}),r}const $o=(t,e)=>e?t===e?!0:$o(t,e.parentElement):!1,li=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,mu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pu(t){return mu.has(t.tagName)||t.isContentEditable===!0}const gu=new Set(["INPUT","SELECT","TEXTAREA"]);function yu(t){return gu.has(t.tagName)||t.isContentEditable===!0}const Le=new WeakSet;function Uo(t){return e=>{e.key==="Enter"&&t(e)}}function ci(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const _u=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=Uo(()=>{if(Le.has(n))return;ci(n,"down");const s=Uo(()=>{ci(n,"up")}),r=()=>ci(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function Wo(t){return li(t)&&!jo()}const Ho=new WeakSet;function vu(t,e,n={}){const[i,s,r]=No(t,n),o=a=>{const u=a.currentTarget;if(!Wo(a)||Ho.has(a))return;Le.add(u),n.stopPropagation&&Ho.add(a);const l=e(u,a),c=(d,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Le.has(u)&&Le.delete(u),Wo(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{c(d,u===window||u===document||n.useGlobalTarget||$o(u,d.target))},h=d=>{c(d,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Re(a)&&(a.addEventListener("focus",l=>_u(l,s)),!pu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function ui(t){return As(t)&&"ownerSVGElement"in t}const Ie=new WeakMap;let Fe;const Ko=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:ui(i)&&"getBBox"in i?i.getBBox()[e]:i[n],xu=Ko("inline","width","offsetWidth"),bu=Ko("block","height","offsetHeight");function wu({target:t,borderBoxSize:e}){Ie.get(t)?.forEach(n=>{n(t,{get width(){return xu(t,e)},get height(){return bu(t,e)}})})}function Tu(t){t.forEach(wu)}function Cu(){typeof ResizeObserver>"u"||(Fe=new ResizeObserver(Tu))}function Pu(t,e){Fe||Cu();const n=Bo(t);return n.forEach(i=>{let s=Ie.get(i);s||(s=new Set,Ie.set(i,s)),s.add(e),Fe?.observe(i)}),()=>{n.forEach(i=>{const s=Ie.get(i);s?.delete(e),s?.size||Fe?.unobserve(i)})}}const Be=new Set;let Kt;function Su(){Kt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Be.forEach(e=>e(t))},window.addEventListener("resize",Kt)}function Au(t){return Be.add(t),Kt||Su(),()=>{Be.delete(t),!Be.size&&typeof Kt=="function"&&(window.removeEventListener("resize",Kt),Kt=void 0)}}function zo(t,e){return typeof t=="function"?Au(t):Pu(t,e)}function Eu(t){return ui(t)&&t.tagName==="svg"}const Mu=[...Do,U,lt],Vu=t=>Mu.find(ko(t)),Go=()=>({translate:0,scale:1,origin:0,originPoint:0}),zt=()=>({x:Go(),y:Go()}),Xo=()=>({min:0,max:0}),W=()=>({x:Xo(),y:Xo()}),ku=new WeakMap;function Oe(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function fe(t){return typeof t=="string"||Array.isArray(t)}const fi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hi=["initial",...fi];function je(t){return Oe(t.animate)||hi.some(e=>fe(t[e]))}function Yo(t){return!!(je(t)||t.variants)}function Du(t,e,n){for(const i in e){const s=e[i],r=n[i];if(z(s))t.addValue(i,s);else if(z(r))t.addValue(i,Mt(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,Mt(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const di={current:null},qo={current:!1},Ru=typeof window<"u";function Lu(){if(qo.current=!0,!!Ru)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>di.current=t.matches;t.addEventListener("change",e),e()}else di.current=!1}const Zo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ne={};function Jo(t){Ne=t}function Iu(){return Ne}class Fu{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Xn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Z.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,L.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=je(n),this.isVariantNode=Yo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const m=h[d];l[d]!==void 0&&z(m)&&m.set(l[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,ku.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(qo.current||Lu(),this.shouldReduceMotion=di.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),xt(this.notifyUpdate),xt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&uu.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:l,duration:c}=n.accelerate,f=new vo({element:this.current,name:e,keyframes:a,times:u,ease:l,duration:nt(c)}),h=o(f);this.valueSubscriptions.set(e,()=>{h(),f.cancel()});return}const i=Ht.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&L.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ne){const n=Ne[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):W()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Zo.length;i++){const s=Zo[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=e[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Du(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Mt(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Ss(i)||Es(i))?i=parseFloat(i):!Vu(i)&&lt.test(n)&&(i=Fo(e,n)),this.setBaseTarget(e,z(i)?i.get():i)),z(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const r=Qn(this.props,n,this.presenceContext?.custom);r&&(i=r[e])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!z(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new bn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ai.render(this.render)}}class Qo extends Fu{constructor(){super(...arguments),this.KeyframeResolver=cu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;z(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function tr({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Bu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ou(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function mi(t){return t===void 0||t===1}function pi({scale:t,scaleX:e,scaleY:n}){return!mi(t)||!mi(e)||!mi(n)}function Vt(t){return pi(t)||er(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function er(t){return nr(t.x)||nr(t.y)}function nr(t){return t&&t!=="0%"}function $e(t,e,n){const i=t-n,s=e*i;return n+s}function ir(t,e,n,i,s){return s!==void 0&&(t=$e(t,s,i)),$e(t,n,i)+e}function gi(t,e=0,n=1,i,s){t.min=ir(t.min,e,n,i,s),t.max=ir(t.max,e,n,i,s)}function sr(t,{x:e,y:n}){gi(t.x,e.translate,e.scale,e.originPoint),gi(t.y,n.translate,n.scale,n.originPoint)}const or=.999999999999,rr=1.0000000000001;function ju(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Xt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,sr(t,o)),i&&Vt(r.latestValues)&&Xt(t,r.latestValues,r.layout?.layoutBox))}e.x<rr&&e.x>or&&(e.x=1),e.y<rr&&e.y>or&&(e.y=1)}function Gt(t,e){t.min=t.min+e,t.max=t.max+e}function ar(t,e,n,i,s=.5){const r=B(t.min,t.max,s);gi(t,e,n,r,i)}function lr(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Xt(t,e,n){const i=n??t;ar(t.x,lr(e.x,i.x),e.scaleX,e.scale,e.originX),ar(t.y,lr(e.y,i.y),e.scaleY,e.scale,e.originY)}function cr(t,e){return tr(Ou(t.getBoundingClientRect(),e))}function Nu(t,e,n){const i=cr(t,n),{scroll:s}=e;return s&&(Gt(i.x,s.offset.x),Gt(i.y,s.offset.y)),i}const $u={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Uu=Wt.length;function Wu(t,e,n){let i="",s=!0;for(let r=0;r<Uu;r++){const o=Wt[r],a=t[o];if(a===void 0)continue;let u=!0;if(typeof a=="number")u=a===(o.startsWith("scale")?1:0);else{const l=parseFloat(a);u=o.startsWith("scale")?l===1:l===0}if(!u||n){const l=Oo(a,ri[o]);if(!u){s=!1;const c=$u[o]||o;i+=`${c}(${l}) `}n&&(e[o]=l)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function yi(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const u in e){const l=e[u];if(Ht.has(u)){o=!0;continue}else if(Hs(u)){s[u]=l;continue}else{const c=Oo(l,ri[u]);u.startsWith("origin")?(a=!0,r[u]=c):i[u]=c}}if(e.transform||(o||n?i.transform=Wu(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:u="50%",originY:l="50%",originZ:c=0}=r;i.transformOrigin=`${u} ${l} ${c}`}}function ur(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];s?.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function fr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const he={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=fr(t,e.target.x),i=fr(t,e.target.y);return`${n}% ${i}%`}},Hu={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=lt.parse(t);if(s.length>5)return i;const r=lt.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=u;const l=B(a,u,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),r(s)}},_i={borderRadius:{...he,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomLeftRadius:he,borderBottomRightRadius:he,boxShadow:Hu};function hr(t,{layout:e,layoutId:n}){return Ht.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_i[t]||t==="opacity")}function vi(t,e,n){const i=t.style,s=e?.style,r={};if(!i)return r;for(const o in i)(z(i[o])||s&&z(s[o])||hr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=i[o]);return r}function Ku(t){return window.getComputedStyle(t)}class zu extends Qo{constructor(){super(...arguments),this.type="html",this.renderInstance=ur}readValueFromInstance(e,n){if(Ht.has(n))return this.projection?.isProjecting?Wn(n):mc(e,n);{const i=Ku(e),s=(Hs(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return cr(e,n)}build(e,n,i){yi(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return vi(e,n,i)}}const Gu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xu={offset:"strokeDashoffset",array:"strokeDasharray"};function Yu(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?Gu:Xu;t[r.offset]=`${-i}`,t[r.array]=`${e} ${n}`}const qu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},u,l,c){if(yi(t,a,l),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h}=t;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete f.transformBox);for(const d of qu)f[d]!==void 0&&(h[d]=f[d],delete f[d]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),s!==void 0&&Yu(f,s,r,o,!1)}const mr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),pr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Zu(t,e,n,i){ur(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(mr.has(s)?s:ni(s),e.attrs[s])}function gr(t,e,n){const i=vi(t,e,n);for(const s in t)if(z(t[s])||z(e[s])){const r=Wt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=t[s]}return i}class Ju extends Qo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ht.has(n)){const i=Io(n);return i&&i.default||0}return n=mr.has(n)?n:ni(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return gr(e,n,i)}build(e,n,i){dr(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){Zu(e,n,i,s)}mount(e){this.isSVGTag=pr(e.tagName),super.mount(e)}}const Qu=hi.length;function yr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?yr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Qu;n++){const i=hi[n],s=t.props[i];(fe(s)||s===!1)&&(e[i]=s)}return e}function _r(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const tf=[...fi].reverse(),ef=fi.length;function nf(t){return e=>Promise.all(e.map(({animation:n,options:i})=>Qc(t,n,i)))}function sf(t){let e=nf(t),n=vr(),i=!0,s=!1;const r=l=>(c,f)=>{const h=Et(t,f,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:d,transitionEnd:m,..._}=h;c={...c,..._,...m}}return c};function o(l){e=l(t)}function a(l){const{props:c}=t,f=yr(t.parent)||{},h=[],d=new Set;let m={},_=1/0;for(let p=0;p<ef;p++){const y=tf[p],v=n[y],w=c[y]!==void 0?c[y]:f[y],C=fe(w),V=y===l?v.isActive:null;V===!1&&(_=p);let D=w===f[y]&&w!==c[y]&&C;if(D&&(i||s)&&t.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...m},!v.isActive&&V===null||!w&&!v.prevProp||Oe(w)||typeof w=="boolean")continue;if(y==="exit"&&v.isActive&&V!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const S=of(v.prevProp,w);let A=S||y===l&&v.isActive&&!D&&C||p>_&&C,P=!1;const k=Array.isArray(w)?w:[w];let O=k.reduce(r(y),{});V===!1&&(O={});const{prevResolvedValues:Y={}}=v,G={...Y,...O},X=x=>{A=!0,d.has(x)&&(P=!0,d.delete(x)),v.needsAnimating[x]=!0;const E=t.getValue(x);E&&(E.liveStyle=!1)};for(const x in G){const E=O[x],R=Y[x];if(m.hasOwnProperty(x))continue;let it=!1;ti(E)&&ti(R)?it=!_r(E,R):it=E!==R,it?E!=null?X(x):d.add(x):E!==void 0&&d.has(x)?X(x):v.protectedKeys[x]=!0}v.prevProp=w,v.prevResolvedValues=O,v.isActive&&(m={...m,...O}),(i||s)&&t.blockInitialAnimation&&(A=!1);const tt=D&&S;A&&(!tt||P)&&h.push(...k.map(x=>{const E={type:y};if(typeof x=="string"&&(i||s)&&!tt&&t.manuallyAnimateOnMount&&t.parent){const{parent:R}=t,it=Et(R,x);if(R.enteringChildren&&it){const{delayChildren:Je}=it.transition||{};E.delay=wo(R.enteringChildren,t,Je)}}return{animation:x,options:E}}))}if(d.size){const p={};if(typeof c.initial!="boolean"){const y=Et(t,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(p.transition=y.transition)}d.forEach(y=>{const v=t.getBaseTarget(y),w=t.getValue(y);w&&(w.liveStyle=!0),p[y]=v??null}),h.push({animation:p})}let g=!!h.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),i=!1,s=!1,g?e(h):Promise.resolve()}function u(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,c)),n[l].isActive=c;const f=a(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=vr(),s=!0}}}function of(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!_r(e,t):!1}function kt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vr(){return{animate:kt(!0),whileInView:kt(),whileHover:kt(),whileTap:kt(),whileDrag:kt(),whileFocus:kt(),exit:kt()}}function xi(t,e){t.min=e.min,t.max=e.max}function ut(t,e){xi(t.x,e.x),xi(t.y,e.y)}function xr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const br=1e-4,rf=1-br,af=1+br,wr=.01,lf=0-wr,cf=0+wr;function J(t){return t.max-t.min}function uf(t,e,n){return Math.abs(t-e)<=n}function Tr(t,e,n,i=.5){t.origin=i,t.originPoint=B(e.min,e.max,t.origin),t.scale=J(n)/J(e),t.translate=B(n.min,n.max,t.origin)-t.originPoint,(t.scale>=rf&&t.scale<=af||isNaN(t.scale))&&(t.scale=1),(t.translate>=lf&&t.translate<=cf||isNaN(t.translate))&&(t.translate=0)}function de(t,e,n,i){Tr(t.x,e.x,n.x,i?i.originX:void 0),Tr(t.y,e.y,n.y,i?i.originY:void 0)}function Cr(t,e,n){t.min=n.min+e.min,t.max=t.min+J(e)}function ff(t,e,n){Cr(t.x,e.x,n.x),Cr(t.y,e.y,n.y)}function Pr(t,e,n){t.min=e.min-n.min,t.max=t.min+J(e)}function Ue(t,e,n){Pr(t.x,e.x,n.x),Pr(t.y,e.y,n.y)}function Sr(t,e,n,i,s){return t-=e,t=$e(t,1/n,i),s!==void 0&&(t=$e(t,1/s,i)),t}function hf(t,e=0,n=1,i=.5,s,r=t,o=t){if(dt.test(e)&&(e=parseFloat(e),e=B(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=B(r.min,r.max,i);t===r&&(a-=e),t.min=Sr(t.min,e,n,a,s),t.max=Sr(t.max,e,n,a,s)}function Ar(t,e,[n,i,s],r,o){hf(t,e[n],e[i],e[s],e.scale,r,o)}const df=["x","scaleX","originX"],mf=["y","scaleY","originY"];function Er(t,e,n,i){Ar(t.x,e,df,n?n.x:void 0,i?i.x:void 0),Ar(t.y,e,mf,n?n.y:void 0,i?i.y:void 0)}function Mr(t){return t.translate===0&&t.scale===1}function Vr(t){return Mr(t.x)&&Mr(t.y)}function kr(t,e){return t.min===e.min&&t.max===e.max}function pf(t,e){return kr(t.x,e.x)&&kr(t.y,e.y)}function Dr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Rr(t,e){return Dr(t.x,e.x)&&Dr(t.y,e.y)}function Lr(t){return J(t.x)/J(t.y)}function Ir(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function mt(t){return[t("x"),t("y")]}function gf(t,e,n){let i="";const s=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:f,rotateY:h,skewX:d,skewY:m}=n;l&&(i=`perspective(${l}px) ${i}`),c&&(i+=`rotate(${c}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(i+=`scale(${a}, ${u})`),i||"none"}const Fr=["TopLeft","TopRight","BottomLeft","BottomRight"],yf=Fr.length,Br=t=>typeof t=="string"?parseFloat(t):t,Or=t=>typeof t=="number"||T.test(t);function _f(t,e,n,i,s,r){s?(t.opacity=B(0,n.opacity??1,vf(i)),t.opacityExit=B(e.opacity??1,0,xf(i))):r&&(t.opacity=B(e.opacity??1,n.opacity??1,i));for(let o=0;o<yf;o++){const a=`border${Fr[o]}Radius`;let u=jr(e,a),l=jr(n,a);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||Or(u)===Or(l)?(t[a]=Math.max(B(Br(u),Br(l),i),0),(dt.test(l)||dt.test(u))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=B(e.rotate||0,n.rotate||0,i))}function jr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const vf=Nr(0,.5,Bs),xf=Nr(.5,.95,st);function Nr(t,e,n){return i=>i<t?0:i>e?1:n(se(t,e,i))}function bf(t,e,n){const i=z(t)?t:Mt(t);return i.start(Jn("",i,e,n)),i.animation}function me(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const wf=(t,e)=>t.depth-e.depth;class Tf{constructor(){this.children=[],this.isDirty=!1}add(e){vn(this.children,e),this.isDirty=!0}remove(e){Se(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(wf),this.isDirty=!1,this.children.forEach(e)}}function Cf(t,e){const n=Z.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(xt(i),t(r-e))};return L.setup(i,!0),()=>xt(i)}function We(t){return z(t)?t.get():t}class Pf{constructor(){this.members=[]}add(e){vn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(Se(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(Se(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:r}=e.options;(s===void 0||s!==r)&&(e.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const He={hasAnimatedSinceResize:!0,hasEverUpdated:!1},bi=["","X","Y","Z"],Sf=1e3;let Af=0;function wi(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function $r(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Mo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(s||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&$r(i)}function Ur({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=e?.()){this.id=Af++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Vf),this.nodes.forEach(Lf),this.nodes.forEach(If),this.nodes.forEach(kf)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Tf)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new bn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const u=this.eventHandlers.get(o);u&&u.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=ui(o)&&!Eu(o),this.instance=o;const{layoutId:a,layout:u,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let c,f=0;const h=()=>this.root.updateBlockedByResize=!1;L.read(()=>{f=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,c&&c(),c=Cf(h,250),He.hasAnimatedSinceResize&&(He.hasAnimatedSinceResize=!1,this.nodes.forEach(Kr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||l.getDefaultTransition()||Nf,{onLayoutAnimationStart:_,onLayoutAnimationComplete:g}=l.getProps(),p=!this.targetLayout||!Rr(this.targetLayout,d),y=!f&&h;if(this.options.layoutRoot||this.resumeFrom||y||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Zn(m,"layout"),onPlay:_,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,y)}else f||Kr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ff),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&$r(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Wr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Hr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Rf),this.nodes.forEach(Ef),this.nodes.forEach(Mf)):this.nodes.forEach(Hr),this.clearAllSnapshots();const a=Z.now();K.delta=ht(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,Cn.update.process(K),Cn.preRender.process(K),Cn.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ai.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Df),this.sharedNodes.forEach(Bf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!J(this.snapshot.measuredBox.x)&&!J(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=W(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const u=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Vr(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||Vt(this.latestValues)||c)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return o&&(u=this.removeTransform(u)),$f(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return W();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Uf))){const{scroll:l}=this.root;l&&(Gt(a.x,l.offset.x),Gt(a.y,l.offset.y))}return a}removeElementScroll(o){const a=W();if(ut(a,o),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const l=this.path[u],{scroll:c,options:f}=l;l!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&ut(a,o),Gt(a.x,c.offset.x),Gt(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const u=W();ut(u,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Xt(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Vt(c.latestValues)&&Xt(u,c.latestValues,c.layout?.layoutBox)}return Vt(this.latestValues)&&Xt(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(o){const a=W();ut(a,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!Vt(l.latestValues))continue;let c;l.instance&&(pi(l.latestValues)&&l.updateSnapshot(),c=W(),ut(c,l.measurePageBox())),Er(a,l.latestValues,l.snapshot?.layoutBox,c)}return Vt(this.latestValues)&&Er(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==K.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!this.layout||!(c||f))return;this.resolvedRelativeTargetAt=K.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ff(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ut(this.target,this.layout.layoutBox),sr(this.target,this.targetDelta)):ut(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pi(this.parent.latestValues)||er(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,u){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Ue(this.relativeTargetOrigin,a,u),ut(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===K.timestamp&&(u=!1),u)return;const{layout:l,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||c))return;ut(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;ju(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=W());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xr(this.prevProjectionDelta.x,this.projectionDelta.x),xr(this.prevProjectionDelta.y,this.projectionDelta.y)),de(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Ir(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ir(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zt(),this.projectionDelta=zt(),this.projectionDeltaWithTransform=zt()}setAnimationOrigin(o,a=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},f=zt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=W(),d=u?u.source:void 0,m=this.layout?this.layout.source:void 0,_=d!==m,g=this.getStack(),p=!g||g.members.length<=1,y=!!(_&&!p&&this.options.crossfade===!0&&!this.path.some(jf));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const C=w/1e3;zr(f.x,o.x,C),zr(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ue(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Of(this.relativeTarget,this.relativeTargetOrigin,h,C),v&&pf(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=W()),ut(v,this.relativeTarget)),_&&(this.animationValues=c,_f(c,l,this.latestValues,C,y,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{He.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Mt(0)),this.motionValue.jump(0,!1),this.currentAnimation=bf(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:u,layout:l,latestValues:c}=o;if(!(!a||!u||!l)){if(this!==o&&this.layout&&l&&Zr(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||W();const f=J(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+f;const h=J(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+h}ut(a,u),Xt(a,c),de(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Pf),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const l={};u.z&&wi("z",o,l,this.animationValues);for(let c=0;c<bi.length;c++)wi(`rotate${bi[c]}`,o,l,this.animationValues),wi(`skew${bi[c]}`,o,l,this.animationValues);o.render();for(const c in l)o.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=We(a?.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=We(a?.pointerEvents)||""),this.hasProjected&&!Vt(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=gf(this.projectionDeltaWithTransform,this.treeScale,c);u&&(f=u(c,f)),o.transform=f;const{x:h,y:d}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${d.origin*100}% 0`,l.animationValues?o.opacity=l===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=l===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in _i){if(c[m]===void 0)continue;const{correct:_,applyTo:g,isCSSVariable:p}=_i[m],y=f==="none"?c[m]:_(c[m],l);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=y}else p?this.options.visualElement.renderState.vars[m]=y:o[m]=y}this.options.layoutId&&(o.pointerEvents=l===this?We(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Wr),this.root.sharedNodes.clear()}}}function Ef(t){t.updateLayout()}function Mf(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;if(s==="size")mt(c=>{const f=r?e.measuredBox[c]:e.layoutBox[c],h=J(f);f.min=n[c].min,f.max=f.min+h});else if(s==="x"||s==="y"){const c=s==="x"?"y":"x";xi(r?e.measuredBox[c]:e.layoutBox[c],n[c])}else Zr(s,e.layoutBox,n)&&mt(c=>{const f=r?e.measuredBox[c]:e.layoutBox[c],h=J(n[c]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+h)});const o=zt();de(o,n,e.layoutBox);const a=zt();r?de(a,t.applyTransform(i,!0),e.measuredBox):de(a,n,e.layoutBox);const u=!Vr(o);let l=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:h}=c;if(f&&h){const d=W();Ue(d,e.layoutBox,f.layoutBox);const m=W();Ue(m,n,h.layoutBox),Rr(d,m)||(l=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Vf(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function kf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Df(t){t.clearSnapshot()}function Wr(t){t.clearMeasurements()}function Hr(t){t.isLayoutDirty=!1}function Rf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Kr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Lf(t){t.resolveTargetDelta()}function If(t){t.calcProjection()}function Ff(t){t.resetSkewAndRotation()}function Bf(t){t.removeLeadSnapshot()}function zr(t,e,n){t.translate=B(e.translate,0,n),t.scale=B(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Gr(t,e,n,i){t.min=B(e.min,n.min,i),t.max=B(e.max,n.max,i)}function Of(t,e,n,i){Gr(t.x,e.x,n.x,i),Gr(t.y,e.y,n.y,i)}function jf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Nf={duration:.45,ease:[.4,0,.1,1]},Xr=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Yr=Xr("applewebkit/")&&!Xr("chrome/")?Math.round:st;function qr(t){t.min=Yr(t.min),t.max=Yr(t.max)}function $f(t){qr(t.x),qr(t.y)}function Zr(t,e,n){return t==="position"||t==="preserve-aspect"&&!uf(Lr(e),Lr(n),.2)}function Uf(t){return t!==t.root&&t.scroll?.wasRoot}const Wf=Ur({attachResizeListener:(t,e)=>me(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ti={current:void 0},Jr=Ur({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ti.current){const t=new Wf({});t.mount(window),t.setOptions({layoutScroll:!0}),Ti.current=t}return Ti.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ke=Ft({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Qr(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Hf(...t){return e=>{let n=!1;const i=t.map(s=>{const r=Qr(s,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<i.length;s++){const r=i[s];typeof r=="function"?r():Qr(t[s],null)}}}}function Kf(...t){return jt(Hf(...t),t)}class zf extends at{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(Re(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=Re(i)&&i.offsetWidth||0,r=Re(i)&&i.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Gf({children:t,isPresent:e,anchorX:n,anchorY:i,root:s,pop:r}){const o=hn(),a=F(null),u=F({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=H(Ke),c=t.props?.ref??t?.ref,f=Kf(a,c);return pn(()=>{const{width:h,height:d,top:m,left:_,right:g,bottom:p}=u.current;if(e||r===!1||!a.current||!h||!d)return;const y=n==="left"?`left: ${_}`:`right: ${g}`,v=i==="bottom"?`bottom: ${p}`:`top: ${m}`;a.current.dataset.motionPopId=o;const w=document.createElement("style");l&&(w.nonce=l);const C=s??document.head;return C.appendChild(w),w.sheet&&w.sheet.insertRule(`
`);s=a.pop()||"";for(const c of a)for(const l of c.split(`
`))if(l.startsWith("data: ")){const u=l.slice(6);if(u==="[DONE]")return;try{const f=JSON.parse(u);f.chunk!=null&&(yield f.chunk)}catch{u.trim()&&(yield u)}}}}finally{n.releaseLock()}}class ve extends Error{constructor(e,n,i){super(e),this.name="OmniaApiError",this.status=n,this.retryable=i}}function Ua(t,e){for(const n of t)if(n.type==="string_too_short"&&n.loc?.includes("input")){const i=n.ctx?.min_length;return i?e("error.text_too_short",{min:i}):e("error.text_too_short_generic")}return e("error.validation")}async function Bi(t,e){const{status:n,statusText:i}=t;if(n===422)try{const s=await t.json();return Array.isArray(s.detail)?new ve(Ua(s.detail,e),n,!1):typeof s.detail=="string"?new ve(s.detail,n,!1):new ve(e("error.validation"),n,!1)}catch{}return new ve(`Omnia API error: ${n} ${i}`,n,!0)}class Ha{#i;#s;#o;#r;#n;#l;#a;constructor({baseUrl:e,application:n,municipality:i,authToken:s,onError:r,endpoints:o,t:a}){this.#i=e.replace(/\/+$/,""),this.#s=n||null,this.#o=i||null,this.#r=s||null,this.#n=r||null,this.#l=o||{},this.#a=a||(c=>c)}#c(e){let n;if(/^https?:\/\//.test(e)?n=e:e.startsWith("/")?n=`${this.#i}${e}`:n=`${this.#i}/${e}`,this.#r){const i=n.includes("?")?"&":"?";n+=`${i}_authenticator=${encodeURIComponent(this.#r)}`}return n}#t(e,n){return this.#l[e]||n}#u(e={}){const n={"Content-Type":"application/json",...e};return this.#s&&(n["x-imio-application"]=this.#s),this.#o&&(n["x-imio-municipality"]=this.#o),n}async#e(e,n,i){const s=this.#c(e),r=this.#u();let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=await Bi(o,this.#a);throw this.#n?.(a),a}return o.json()}async*#f(e,n,i){const s=this.#c(e),r=this.#u({Accept:"text/event-stream"});let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=await Bi(o,this.#a);throw this.#n?.(a),a}yield*$a(o,i)}async*generate(e,n={}){const{signal:i,...s}=n;yield*this.#f(this.#t("generate","/v1/agents/generate-content"),{prompt:e,...s},i)}async expandText(e,n={}){const{signal:i,expansionTarget:s,...r}=n,o={input:e,...r};return s!==void 0&&(o.expansion_target=s),(await this.#e(this.#t("expand-text","/v1/agents/expand-text"),o,i)).result}async improveText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("improve-text","/v1/agents/improve-text"),{input:e},i)).result}async reduceText(e,n={}){const{signal:i,reductionTarget:s}=n,r={input:e};return s!==void 0&&(r.reduction_target=s),(await this.#e(this.#t("reduce-text","/v1/agents/reduce-text"),r,i)).result}async correctText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("correct-text","/v1/agents/correct-text"),{input:e},i)).result}async makeAccessible(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("make-accessible","/v1/agents/make-accessible"),{input:e},i)).result}async translateText(e,n,i={}){const{signal:s}=i;return(await this.#e(this.#t("translate-text","/v1/agents/translate-text"),{input:e,target_language:n},s)).result}}const Oi={"action.generate":"Generate content","action.expand-text":"Expand","action.improve-text":"Improve","action.reduce-text":"Reduce","action.correct-text":"Correct","action.make-accessible":"Make accessible","action.translate-text":"Translate","menu.generate":"Generate content","menu.expand-text":"Expand selection","menu.improve-text":"Improve","menu.reduce-text":"Reduce","menu.correct-text":"Correct","menu.make-accessible":"Make accessible","menu.translate-text":"Translate","tone.default":"None (default)","tone.formal":"Formal","tone.casual":"Casual","tone.bullet_points":"Key points","tone.concise":"Concise","button.retry":"Retry","button.cancel":"Cancel","button.accept":"Accept","button.generate":"Generate","button.stop":"Stop","button.insert":"Insert","button.copy":"Copy","button.back":"Back","button.translate":"Translate","button.close":"Close","panel.generate_title":"Generate text","panel.subtitle":"Omnia – iMio's AI assistant","panel.history":"History","placeholder.prompt":"Describe the content to generate…","tooltip.omnia":"iMio's Omnia Assistant","tooltip.omnia_no_selection":"Please select some text first",loading:"Loading…",disclaimer:"Artificial intelligence can make mistakes, please verify important information.","error.generic":"An error occurred","error.text_too_short":"The selected text is too short (minimum {min} characters).","error.text_too_short_generic":"The selected text is too short.","error.validation":"Validation error."},ji={en:Oi,fr:{"action.generate":"Générer du contenu","action.expand-text":"Développer","action.improve-text":"Améliorer","action.reduce-text":"Réduire","action.correct-text":"Corriger","action.make-accessible":"Rendre accessible","action.translate-text":"Traduire","menu.generate":"Générer du contenu","menu.expand-text":"Développer la sélection","menu.improve-text":"Améliorer","menu.reduce-text":"Réduire","menu.correct-text":"Corriger","menu.make-accessible":"Rendre accessible","menu.translate-text":"Traduire","tone.default":"Aucun (par défaut)","tone.formal":"Formel","tone.casual":"Informel","tone.bullet_points":"Points clés","tone.concise":"Concis","button.retry":"Réessayer","button.cancel":"Annuler","button.accept":"Accepter","button.generate":"Générer","button.stop":"Stop","button.insert":"Insérer","button.copy":"Copier","button.back":"Retour","button.translate":"Traduire","button.close":"Fermer","panel.generate_title":"Générer du texte","panel.subtitle":"Omnia – L'assistant IA d'iMio","panel.history":"Historique","placeholder.prompt":"Décrivez le contenu à générer…","tooltip.omnia":"Assistant Omnia d'iMio","tooltip.omnia_no_selection":"Sélectionnez préalablement du texte",loading:"Chargement…",disclaimer:"L'intelligence artificielle peut commettre des erreurs, vérifiez les informations importantes.","error.generic":"Une erreur est survenue","error.text_too_short":"Le texte sélectionné est trop court (minimum {min} caractères).","error.text_too_short_generic":"Le texte sélectionné est trop court.","error.validation":"Erreur de validation."},nl:{"action.generate":"Inhoud genereren","action.expand-text":"Uitbreiden","action.improve-text":"Verbeteren","action.reduce-text":"Inkorten","action.correct-text":"Corrigeren","action.make-accessible":"Toegankelijk maken","action.translate-text":"Vertalen","menu.generate":"Inhoud genereren","menu.expand-text":"Selectie uitbreiden","menu.improve-text":"Verbeteren","menu.reduce-text":"Inkorten","menu.correct-text":"Corrigeren","menu.make-accessible":"Toegankelijk maken","menu.translate-text":"Vertalen","tone.default":"Geen (standaard)","tone.formal":"Formeel","tone.casual":"Informeel","tone.bullet_points":"Kernpunten","tone.concise":"Beknopt","button.retry":"Opnieuw proberen","button.cancel":"Annuleren","button.accept":"Accepteren","button.generate":"Genereren","button.stop":"Stop","button.insert":"Invoegen","button.copy":"Kopiëren","button.back":"Terug","button.translate":"Vertalen","button.close":"Sluiten","panel.generate_title":"Tekst genereren","panel.subtitle":"Omnia – de AI-assistent van iMio","panel.history":"Geschiedenis","placeholder.prompt":"Beschrijf de te genereren inhoud…","tooltip.omnia":"Omnia-assistent van iMio","tooltip.omnia_no_selection":"Selecteer eerst tekst",loading:"Laden…",disclaimer:"Kunstmatige intelligentie kan fouten maken, controleer belangrijke informatie.","error.generic":"Er is een fout opgetreden","error.text_too_short":"De geselecteerde tekst is te kort (minimaal {min} tekens).","error.text_too_short_generic":"De geselecteerde tekst is te kort.","error.validation":"Validatiefout."},de:{"action.generate":"Inhalt generieren","action.expand-text":"Erweitern","action.improve-text":"Verbessern","action.reduce-text":"Kürzen","action.correct-text":"Korrigieren","action.make-accessible":"Barrierefrei machen","action.translate-text":"Übersetzen","menu.generate":"Inhalt generieren","menu.expand-text":"Auswahl erweitern","menu.improve-text":"Verbessern","menu.reduce-text":"Kürzen","menu.correct-text":"Korrigieren","menu.make-accessible":"Barrierefrei machen","menu.translate-text":"Übersetzen","tone.default":"Keiner (Standard)","tone.formal":"Formell","tone.casual":"Informell","tone.bullet_points":"Kernpunkte","tone.concise":"Prägnant","button.retry":"Wiederholen","button.cancel":"Abbrechen","button.accept":"Übernehmen","button.generate":"Generieren","button.stop":"Stopp","button.insert":"Einfügen","button.copy":"Kopieren","button.back":"Zurück","button.translate":"Übersetzen","button.close":"Schließen","panel.generate_title":"Text generieren","panel.subtitle":"Omnia – der KI-Assistent von iMio","panel.history":"Verlauf","placeholder.prompt":"Beschreiben Sie den zu generierenden Inhalt…","tooltip.omnia":"Omnia-Assistent von iMio","tooltip.omnia_no_selection":"Bitte zuerst Text auswählen",loading:"Wird geladen…",disclaimer:"Künstliche Intelligenz kann Fehler machen, bitte überprüfen Sie wichtige Informationen.","error.generic":"Ein Fehler ist aufgetreten","error.text_too_short":"Der ausgewählte Text ist zu kurz (mindestens {min} Zeichen).","error.text_too_short_generic":"Der ausgewählte Text ist zu kurz.","error.validation":"Validierungsfehler."}};function Wa(t="fr"){const e=ji[t]||ji.fr;return function(i,s){let r=e[i]||Oi[i]||i;if(s)for(const[o,a]of Object.entries(s))r=r.replace(`{${o}}`,a);return r}}const te=[{id:"generate",menu:"panel",shortcut:"g",icon:"omnia",menuItemId:"omnia-generate"},{id:"expand-text",menu:"floating",shortcut:"d",icon:"omnia-expand-text",menuItemId:"omnia-expand-text"},{id:"improve-text",menu:"floating",shortcut:"a",icon:"omnia-improve-text",menuItemId:"omnia-improve-text"},{id:"reduce-text",menu:"floating",shortcut:"r",icon:"omnia-reduce-text",menuItemId:"omnia-reduce-text"},{id:"correct-text",menu:"floating",shortcut:"c",icon:"omnia-correct-text",menuItemId:"omnia-correct-text"},{id:"make-accessible",menu:"floating",shortcut:"x",icon:"omnia-make-accessible",menuItemId:"omnia-make-accessible"},{id:"translate-text",menu:"floating",shortcut:"t",icon:"omnia-translate-text",menuItemId:"omnia-translate-text"}],Ni=te.map(t=>t.id),za=Ni,xe=[{code:"fr",label:"Français"},{code:"nl",label:"Nederlands"},{code:"de",label:"Deutsch"},{code:"en",label:"English"},{code:"es",label:"Español"},{code:"it",label:"Italiano"}],Ka={generate:"/v1/agents/generate-content","expand-text":"/v1/agents/expand-text","improve-text":"/v1/agents/improve-text","reduce-text":"/v1/agents/reduce-text","correct-text":"/v1/agents/correct-text","make-accessible":"/v1/agents/make-accessible","translate-text":"/v1/agents/translate-text"};function $i(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")?{value:t,valid:!0}:typeof t=="string"?{value:t.split(",").map(e=>e.trim()).filter(Boolean),valid:!0}:{valid:!1,message:"Expected a string or an array of strings."}}function Ui(t){return t&&typeof t=="object"&&!Array.isArray(t)?{value:t,valid:!0}:{valid:!1,message:"Expected an object."}}function Ga(t){return typeof t=="boolean"?{value:t,valid:!0}:Ui(t)}function qa(t){t.options.register("omnia_base_url",{processor:"string",default:""}),t.options.register("omnia_auth_token",{processor:"string",default:""}),t.options.register("omnia_application",{processor:"string",default:""}),t.options.register("omnia_municipality",{processor:"string",default:""}),t.options.register("omnia_default_translate_language",{processor:"string",default:"fr"}),t.options.register("omnia_enabled_features",{processor:$i,default:za}),t.options.register("omnia_endpoints",{processor:Ui,default:{}}),t.options.register("omnia_shortcuts",{processor:Ga,default:!0}),t.options.register("omnia_toolbar",{processor:"boolean",default:!0}),t.options.register("omnia_context_menu",{processor:"boolean",default:!0}),t.options.register("omnia_translate_languages",{processor:$i,default:xe.map(e=>e.code)}),t.options.register("omnia_history_limit",{processor:"number",default:5}),t.options.register("omnia_floating_panel_mode",{processor:e=>e==="inline"||e==="blur"?{value:e,valid:!0}:{valid:!1,message:'Expected "inline" or "blur".'},default:"inline"}),t.options.register("omnia_floating_panel_width",{processor:e=>e==="full"?{value:e,valid:!0}:typeof e=="number"&&e>0?{value:e,valid:!0}:{valid:!1,message:'Expected a positive number or "full".'},default:500}),t.options.register("omnia_locale",{processor:"string",default:"fr"})}function Xa(t){const e=new Set(Ni);return t.filter(n=>e.has(n))}function Ya(t,e){const n=new Map(xe.map(o=>[o.code,o])),i=t.filter(o=>n.has(o)).map(o=>n.get(o)),s=i.length>0?i:xe,r=new Set(s.map(o=>o.code));return{languages:s,defaultLanguage:r.has(e)?e:s[0].code}}function Za(t,e){if(t===!1)return{enabled:!1,prefix:"o",timeoutMs:1500,bindings:{}};t===!0&&(t={});const n=new Set(e),i={};for(const s of te){const r=t.bindings?.[s.id],o=typeof r=="string"?r.toLowerCase():s.shortcut;n.has(s.id)&&o&&(i[s.id]=o)}return{enabled:t.enabled!==!1,prefix:typeof t.prefix=="string"&&t.prefix.length===1?t.prefix.toLowerCase():"o",timeoutMs:Number.isFinite(t.timeoutMs)?t.timeoutMs:1500,bindings:i}}function Ja(t){const e=Xa(t.options.get("omnia_enabled_features")),{languages:n,defaultLanguage:i}=Ya(t.options.get("omnia_translate_languages"),t.options.get("omnia_default_translate_language")),s=t.options.get("omnia_locale"),r=Wa(s);return{enabledFeatures:e,endpoints:{...Ka,...t.options.get("omnia_endpoints")},shortcuts:Za(t.options.get("omnia_shortcuts"),e),toolbar:t.options.get("omnia_toolbar"),contextMenu:t.options.get("omnia_context_menu"),defaultLanguage:i,languages:n,locale:s,t:r,historyLimit:Math.max(1,t.options.get("omnia_history_limit")),floatingPanelMode:t.options.get("omnia_floating_panel_mode"),floatingPanelWidth:t.options.get("omnia_floating_panel_width"),authToken:t.options.get("omnia_auth_token"),application:t.options.get("omnia_application"),municipality:t.options.get("omnia_municipality")}}var ee,k,Hi,_t,Wi,zi,Ki,Gi,sn,on,rn,qi,be={},we=[],Qa=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ne=Array.isArray;function ht(t,e){for(var n in e)t[n]=e[n];return t}function an(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function it(t,e,n){var i,s,r,o={};for(r in e)r=="key"?i=e[r]:r=="ref"?s=e[r]:o[r]=e[r];if(arguments.length>2&&(o.children=arguments.length>3?ee.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)o[r]===void 0&&(o[r]=t.defaultProps[r]);return ie(t,o,i,s,null)}function ie(t,e,n,i,s){var r={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Hi,__i:-1,__u:0};return s==null&&k.vnode!=null&&k.vnode(r),r}function tl(){return{current:null}}function at(t){return t.children}function lt(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Bt(t):null}function el(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,i=[],s=[],r=ht({},e);r.__v=e.__v+1,k.vnode&&k.vnode(r),cn(t.__P,r,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,i,n??Bt(e),!!(32&e.__u),s),r.__v=e.__v,r.__.__k[r.__i]=r,ts(i,r,s),e.__e=e.__=null,r.__e!=n&&Xi(r)}}function Xi(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Xi(t)}function ln(t){(!t.__d&&(t.__d=!0)&&_t.push(t)&&!Te.__r++||Wi!=k.debounceRendering)&&((Wi=k.debounceRendering)||zi)(Te)}function Te(){try{for(var t,e=1;_t.length;)_t.length>e&&_t.sort(Ki),t=_t.shift(),e=_t.length,el(t)}finally{_t.length=Te.__r=0}}function Yi(t,e,n,i,s,r,o,a,c,l,u){var f,h,d,m,y,g,p,_=i&&i.__k||we,v=e.length;for(c=nl(n,e,_,c,v),f=0;f<v;f++)(d=n.__k[f])!=null&&(h=d.__i!=-1&&_[d.__i]||be,d.__i=f,g=cn(t,d,h,s,r,o,a,c,l,u),m=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&fn(h.ref,null,d),u.push(d.ref,d.__c||m,d)),y==null&&m!=null&&(y=m),(p=!!(4&d.__u))||h.__k===d.__k?c=Zi(d,c,t,p):typeof d.type=="function"&&g!==void 0?c=g:m&&(c=m.nextSibling),d.__u&=-7);return n.__e=y,c}function nl(t,e,n,i,s){var r,o,a,c,l,u=n.length,f=u,h=0;for(t.__k=new Array(s),r=0;r<s;r++)(o=e[r])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=t.__k[r]=ie(null,o,null,null,null):ne(o)?o=t.__k[r]=ie(at,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=t.__k[r]=ie(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):t.__k[r]=o,c=r+h,o.__=t,o.__b=t.__b+1,a=null,(l=o.__i=il(o,n,c,f))!=-1&&(f--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(s>u?h--:s<u&&h++),typeof o.type!="function"&&(o.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,o.__u|=4))):t.__k[r]=null;if(f)for(r=0;r<u;r++)(a=n[r])!=null&&(2&a.__u)==0&&(a.__e==i&&(i=Bt(a)),ns(a,a));return i}function Zi(t,e,n,i){var s,r;if(typeof t.type=="function"){for(s=t.__k,r=0;s&&r<s.length;r++)s[r]&&(s[r].__=t,e=Zi(s[r],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=Bt(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function gt(t,e){return e=e||[],t==null||typeof t=="boolean"||(ne(t)?t.some(function(n){gt(n,e)}):e.push(t)),e}function il(t,e,n,i){var s,r,o,a=t.key,c=t.type,l=e[n],u=l!=null&&(2&l.__u)==0;if(l===null&&a==null||u&&a==l.key&&c==l.type)return n;if(i>(u?1:0)){for(s=n-1,r=n+1;s>=0||r<e.length;)if((l=e[o=s>=0?s--:r++])!=null&&(2&l.__u)==0&&a==l.key&&c==l.type)return o}return-1}function Ji(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Qa.test(e)?n:n+"px"}function Ce(t,e,n,i,s){var r,o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||Ji(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||Ji(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(Gi,"$1")),o=e.toLowerCase(),e=o in t||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=sn,t.addEventListener(e,r?rn:on,r)):t.removeEventListener(e,r?rn:on,r);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Qi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=sn++;else if(e.t<n.u)return;return n(k.event?k.event(e):e)}}}function cn(t,e,n,i,s,r,o,a,c,l){var u,f,h,d,m,y,g,p,_,v,b,w,M,D,P,E=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),r=[a=e.__e=n.__e]),(u=k.__b)&&u(e);t:if(typeof E=="function")try{if(p=e.props,_=E.prototype&&E.prototype.render,v=(u=E.contextType)&&i[u.__c],b=u?v?v.props.value:u.__:i,n.__c?g=(f=e.__c=n.__c).__=f.__E:(_?e.__c=f=new E(p,b):(e.__c=f=new lt(p,b),f.constructor=E,f.render=ol),v&&v.sub(f),f.state||(f.state={}),f.__n=i,h=f.__d=!0,f.__h=[],f._sb=[]),_&&f.__s==null&&(f.__s=f.state),_&&E.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ht({},f.__s)),ht(f.__s,E.getDerivedStateFromProps(p,f.__s))),d=f.props,m=f.state,f.__v=e,h)_&&E.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),_&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_&&E.getDerivedStateFromProps==null&&p!==d&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(p,b),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(p,f.__s,b)===!1){e.__v!=n.__v&&(f.props=p,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(T){T&&(T.__=e)}),we.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(p,f.__s,b),_&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(d,m,y)})}if(f.context=b,f.props=p,f.__P=t,f.__e=!1,w=k.__r,M=0,_)f.state=f.__s,f.__d=!1,w&&w(e),u=f.render(f.props,f.state,f.context),we.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,w&&w(e),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++M<25);f.state=f.__s,f.getChildContext!=null&&(i=ht(ht({},i),f.getChildContext())),_&&!h&&f.getSnapshotBeforeUpdate!=null&&(y=f.getSnapshotBeforeUpdate(d,m)),D=u!=null&&u.type===at&&u.key==null?es(u.props.children):u,a=Yi(t,ne(D)?D:[D],e,n,i,s,r,o,a,c,l),f.base=e.__e,e.__u&=-161,f.__h.length&&o.push(f),g&&(f.__E=f.__=null)}catch(T){if(e.__v=null,c||r!=null)if(T.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;r[r.indexOf(a)]=null,e.__e=a}else{for(P=r.length;P--;)an(r[P]);un(e)}else e.__e=n.__e,e.__k=n.__k,T.then||un(e);k.__e(T,e,n)}else r==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=sl(n.__e,e,n,i,s,r,o,c,l);return(u=k.diffed)&&u(e),128&e.__u?void 0:a}function un(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(un))}function ts(t,e,n){for(var i=0;i<n.length;i++)fn(n[i],n[++i],n[++i]);k.__c&&k.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(r){r.call(s)})}catch(r){k.__e(r,s.__v)}})}function es(t){return typeof t!="object"||t==null||t.__b>0?t:ne(t)?t.map(es):ht({},t)}function sl(t,e,n,i,s,r,o,a,c){var l,u,f,h,d,m,y,g=n.props||be,p=e.props,_=e.type;if(_=="svg"?s="http://www.w3.org/2000/svg":_=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),r!=null){for(l=0;l<r.length;l++)if((d=r[l])&&"setAttribute"in d==!!_&&(_?d.localName==_:d.nodeType==3)){t=d,r[l]=null;break}}if(t==null){if(_==null)return document.createTextNode(p);t=document.createElementNS(s,_,p.is&&p),a&&(k.__m&&k.__m(e,r),a=!1),r=null}if(_==null)g===p||a&&t.data==p||(t.data=p);else{if(r=r&&ee.call(t.childNodes),!a&&r!=null)for(g={},l=0;l<t.attributes.length;l++)g[(d=t.attributes[l]).name]=d.value;for(l in g)d=g[l],l=="dangerouslySetInnerHTML"?f=d:l=="children"||l in p||l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p||Ce(t,l,null,d,s);for(l in p)d=p[l],l=="children"?h=d:l=="dangerouslySetInnerHTML"?u=d:l=="value"?m=d:l=="checked"?y=d:a&&typeof d!="function"||g[l]===d||Ce(t,l,d,g[l],s);if(u)a||f&&(u.__html==f.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(f&&(t.innerHTML=""),Yi(e.type=="template"?t.content:t,ne(h)?h:[h],e,n,i,_=="foreignObject"?"http://www.w3.org/1999/xhtml":s,r,o,r?r[0]:n.__k&&Bt(n,0),a,c),r!=null)for(l=r.length;l--;)an(r[l]);a||(l="value",_=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||_=="progress"&&!m||_=="option"&&m!=g[l])&&Ce(t,l,m,g[l],s),l="checked",y!=null&&y!=t[l]&&Ce(t,l,y,g[l],s))}return t}function fn(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(s){k.__e(s,n)}}function ns(t,e,n){var i,s;if(k.unmount&&k.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||fn(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(r){k.__e(r,e)}i.base=i.__P=null}if(i=t.__k)for(s=0;s<i.length;s++)i[s]&&ns(i[s],e,n||typeof t.type!="function");n||an(t.__e),t.__c=t.__=t.__e=void 0}function ol(t,e,n){return this.constructor(t,n)}function is(t,e,n){var i,s,r,o;e==document&&(e=document.documentElement),k.__&&k.__(t,e),s=(i=!1)?null:e.__k,r=[],o=[],cn(e,t=e.__k=it(at,null,[t]),s||be,be,e.namespaceURI,s?null:e.firstChild?ee.call(e.childNodes):null,r,s?s.__e:e.firstChild,i,o),ts(r,t,o)}function rl(t,e,n){var i,s,r,o,a=ht({},t.props);for(r in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)r=="key"?i=e[r]:r=="ref"?s=e[r]:a[r]=e[r]===void 0&&o!=null?o[r]:e[r];return arguments.length>2&&(a.children=arguments.length>3?ee.call(arguments,2):n),ie(t.type,a,i||t.key,s||t.ref,null)}function Ot(t){function e(n){var i,s;return this.getChildContext||(i=new Set,(s={})[e.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(r){this.props.value!=r.value&&i.forEach(function(o){o.__e=!0,ln(o)})},this.sub=function(r){i.add(r);var o=r.componentWillUnmount;r.componentWillUnmount=function(){i&&i.delete(r),o&&o.call(r)}}),n.children}return e.__c="__cC"+qi++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,i){return n.children(i)}).contextType=e,e}ee=we.slice,k={__e:function(t,e,n,i){for(var s,r,o;e=e.__;)if((s=e.__c)&&!s.__)try{if((r=s.constructor)&&r.getDerivedStateFromError!=null&&(s.setState(r.getDerivedStateFromError(t)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,i||{}),o=s.__d),o)return s.__E=s}catch(a){t=a}throw t}},Hi=0,lt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ht({},this.state),typeof t=="function"&&(t=t(ht({},n),this.props)),t&&ht(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),ln(this))},lt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),ln(this))},lt.prototype.render=at,_t=[],zi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ki=function(t,e){return t.__v.__b-e.__v.__b},Te.__r=0,Gi=/(PointerCapture)$|Capture$/i,sn=0,on=Qi(!1),rn=Qi(!0),qi=0;var al=0;function x(t,e,n,i,s,r){e||(e={});var o,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?o=e[a]:c[a]=e[a];var l={type:t,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--al,__i:-1,__u:0,__source:s,__self:r};if(typeof t=="function"&&(o=t.defaultProps))for(a in o)c[a]===void 0&&(c[a]=o[a]);return k.vnode&&k.vnode(l),l}var vt,F,hn,ss,jt=0,os=[],$=k,rs=$.__b,as=$.__r,ls=$.diffed,cs=$.__c,us=$.unmount,fs=$.__;function Nt(t,e){$.__h&&$.__h(F,t,jt||e),jt=0;var n=F.__H||(F.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function U(t){return jt=1,ll(ds,t)}function ll(t,e,n){var i=Nt(vt++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):ds(void 0,e),function(a){var c=i.__N?i.__N[0]:i.__[0],l=i.t(c,a);c!==l&&(i.__N=[l,i.__[1]],i.__c.setState({}))}],i.__c=F,!F.__f)){var s=function(a,c,l){if(!i.__c.__H)return!0;var u=i.__c.__H.__.filter(function(h){return h.__c});if(u.every(function(h){return!h.__N}))return!r||r.call(this,a,c,l);var f=i.__c.props!==a;return u.some(function(h){if(h.__N){var d=h.__[0];h.__=h.__N,h.__N=void 0,d!==h.__[0]&&(f=!0)}}),r&&r.call(this,a,c,l)||f};F.__f=!0;var r=F.shouldComponentUpdate,o=F.componentWillUpdate;F.componentWillUpdate=function(a,c,l){if(this.__e){var u=r;r=void 0,s(a,c,l),r=u}o&&o.call(this,a,c,l)},F.shouldComponentUpdate=s}return i.__N||i.__}function Z(t,e){var n=Nt(vt++,3);!$.__s&&gn(n.__H,e)&&(n.__=t,n.u=e,F.__H.__h.push(n))}function dn(t,e){var n=Nt(vt++,4);!$.__s&&gn(n.__H,e)&&(n.__=t,n.u=e,F.__h.push(n))}function B(t){return jt=5,yt(function(){return{current:t}},[])}function cl(t,e,n){jt=6,dn(function(){if(typeof t=="function"){var i=t(e());return function(){t(null),i&&typeof i=="function"&&i()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function yt(t,e){var n=Nt(vt++,7);return gn(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function $t(t,e){return jt=8,yt(function(){return t},e)}function G(t){var e=F.context[t.__c],n=Nt(vt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(F)),e.props.value):t.__}function mn(){var t=Nt(vt++,11);if(!t.__){for(var e=F.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function ul(){for(var t;t=os.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Se),e.__h.some(pn),e.__h=[]}catch(n){e.__h=[],$.__e(n,t.__v)}}}$.__b=function(t){F=null,rs&&rs(t)},$.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),fs&&fs(t,e)},$.__r=function(t){as&&as(t),vt=0;var e=(F=t.__c).__H;e&&(hn===F?(e.__h=[],F.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Se),e.__h.some(pn),e.__h=[],vt=0)),hn=F},$.diffed=function(t){ls&&ls(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(os.push(e)!==1&&ss===$.requestAnimationFrame||((ss=$.requestAnimationFrame)||fl)(ul)),e.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),hn=F=null},$.__c=function(t,e){e.some(function(n){try{n.__h.some(Se),n.__h=n.__h.filter(function(i){return!i.__||pn(i)})}catch(i){e.some(function(s){s.__h&&(s.__h=[])}),e=[],$.__e(i,n.__v)}}),cs&&cs(t,e)},$.unmount=function(t){us&&us(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(i){try{Se(i)}catch(s){e=s}}),n.__H=void 0,e&&$.__e(e,n.__v))};var hs=typeof requestAnimationFrame=="function";function fl(t){var e,n=function(){clearTimeout(i),hs&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);hs&&(e=requestAnimationFrame(n))}function Se(t){var e=F,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),F=e}function pn(t){var e=F;t.__c=t.__(),F=e}function gn(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function ds(t,e){return typeof e=="function"?e(t):e}function ms(t,e){for(var n in e)t[n]=e[n];return t}function ps(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var i in e)if(i!=="__source"&&t[i]!==e[i])return!0;return!1}var yn=dn;function gs(t,e){this.props=t,this.context=e}(gs.prototype=new lt).isPureReactComponent=!0,gs.prototype.shouldComponentUpdate=function(t,e){return ps(this.props,t)||ps(this.state,e)};var ys=k.__b;k.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ys&&ys(t)};var hl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _n(t){function e(n){var i=ms({},n);return delete i.ref,t(i,n.ref||null)}return e.$$typeof=hl,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var _s=function(t,e){return t==null?null:gt(gt(t).map(e))},dl={map:_s,forEach:_s,count:function(t){return t?gt(t).length:0},only:function(t){var e=gt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:gt},ml=k.__e;k.__e=function(t,e,n,i){if(t.then){for(var s,r=e;r=r.__;)if((s=r.__c)&&s.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),s.__c(t,e)}ml(t,e,n,i)};var vs=k.unmount;function xs(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),t.__c.__H=null),(t=ms({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(i){return xs(i,e,n)})),t}function bs(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(i){return bs(i,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function vn(){this.__u=0,this.o=null,this.__b=null}function ws(t){var e=t.__&&t.__.__c;return e&&e.__a&&e.__a(t)}function Pe(){this.i=null,this.l=null}k.unmount=function(t){var e=t.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),vs&&vs(t)},(vn.prototype=new lt).__c=function(t,e){var n=e.__c,i=this;i.o==null&&(i.o=[]),i.o.push(n);var s=ws(i.__v),r=!1,o=function(){r||i.__z||(r=!0,n.__R=null,s?s(c):c())};n.__R=o;var a=n.__P;n.__P=null;var c=function(){if(!--i.__u){if(i.state.__a){var l=i.state.__a;i.__v.__k[0]=bs(l,l.__c.__P,l.__c.__O)}var u;for(i.setState({__a:i.__b=null});u=i.o.pop();)u.__P=a,u.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(o,o)},vn.prototype.componentWillUnmount=function(){this.o=[]},vn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=xs(this.__b,n,i.__O=i.__P)}this.__b=null}var s=e.__a&&it(at,null,t.fallback);return s&&(s.__u&=-33),[it(at,null,e.__a?null:t.children),s]};var Ts=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};(Pe.prototype=new lt).__a=function(t){var e=this,n=ws(e.__v),i=e.l.get(t);return i[0]++,function(s){var r=function(){e.props.revealOrder?(i.push(s),Ts(e,t,i)):s()};n?n(r):r()}},Pe.prototype.render=function(t){this.i=null,this.l=new Map;var e=gt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Pe.prototype.componentDidUpdate=Pe.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ts(t,n,e)})};var Cs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,pl=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,gl=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,yl=/[A-Z0-9]/g,_l=typeof document<"u",vl=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};lt.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(lt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ss=k.event;k.event=function(t){return Ss&&(t=Ss(t)),t.persist=function(){},t.isPropagationStopped=function(){return this.cancelBubble},t.isDefaultPrevented=function(){return this.defaultPrevented},t.nativeEvent=t};var xl={configurable:!0,get:function(){return this.class}},Ps=k.vnode;k.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,i=e.type,s={},r=i.indexOf("-")==-1;for(var o in n){var a=n[o];if(!(o==="value"&&"defaultValue"in n&&a==null||_l&&o==="children"&&i==="noscript"||o==="class"||o==="className")){var c=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":c==="translate"&&a==="no"?a=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?o="ondblclick":c!=="onchange"||i!=="input"&&i!=="textarea"||vl(n.type)?c==="onfocus"?o="onfocusin":c==="onblur"?o="onfocusout":gl.test(o)&&(o=c):c=o="oninput":r&&pl.test(o)?o=o.replace(yl,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&s[o=c]&&(o="oninputCapture"),s[o]=a}}i=="select"&&(s.multiple&&Array.isArray(s.value)&&(s.value=gt(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),s.defaultValue!=null&&(s.value=gt(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value}))),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",xl)):n.className&&(s.class=s.className=n.className),e.props=s})(t),t.$$typeof=Cs,Ps&&Ps(t)};var As=k.__r;k.__r=function(t){As&&As(t),t.__c};var Es=k.diffed;k.diffed=function(t){Es&&Es(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value)};function ks(t){return!!t&&t.$$typeof===Cs}function bl(t){return ks(t)?rl.apply(null,arguments):t}const xn=Ot({});function se(t){const e=B(null);return e.current===null&&(e.current=t()),e.current}const Ms=typeof window<"u"?dn:Z,Ae=Ot(null);function bn(t,e){t.indexOf(e)===-1&&t.push(e)}function Ee(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const dt=(t,e,n)=>n>e?e:n<t?t:n;let wn=()=>{};const xt={},Vs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ds(t){return typeof t=="object"&&t!==null}const Rs=t=>/^0[^.\s]+$/u.test(t);function Ls(t){let e;return()=>(e===void 0&&(e=t()),e)}const ot=t=>t,wl=(t,e)=>n=>e(t(n)),oe=(...t)=>t.reduce(wl),re=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};class Tn{constructor(){this.subscriptions=[]}add(e){return bn(this.subscriptions,e),()=>Ee(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const st=t=>t*1e3,rt=t=>t/1e3;function Is(t,e){return e?t*(1e3/e):0}const Fs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Tl=1e-7,Cl=12;function Sl(t,e,n,i,s){let r,o,a=0;do o=e+(n-e)/2,r=Fs(o,i,s)-t,r>0?n=o:e=o;while(Math.abs(r)>Tl&&++a<Cl);return o}function ae(t,e,n,i){if(t===e&&n===i)return ot;const s=r=>Sl(r,0,1,t,n);return r=>r===0||r===1?r:Fs(s(r),e,i)}const Bs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Os=t=>e=>1-t(1-e),js=ae(.33,1.53,.69,.99),Cn=Os(js),Ns=Bs(Cn),$s=t=>t>=1?1:(t*=2)<1?.5*Cn(t):.5*(2-Math.pow(2,-10*(t-1))),Sn=t=>1-Math.sin(Math.acos(t)),Us=Os(Sn),Hs=Bs(Sn),Pl=ae(.42,0,1,1),Al=ae(0,0,.58,1),Ws=ae(.42,0,.58,1),El=t=>Array.isArray(t)&&typeof t[0]!="number",zs=t=>Array.isArray(t)&&typeof t[0]=="number",kl={linear:ot,easeIn:Pl,easeInOut:Ws,easeOut:Al,circIn:Sn,circInOut:Hs,circOut:Us,backIn:Cn,backInOut:Ns,backOut:js,anticipate:$s},Ml=t=>typeof t=="string",Ks=t=>{if(zs(t)){wn(t.length===4);const[e,n,i,s]=t;return ae(e,n,i,s)}else if(Ml(t))return kl[t];return t},ke=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Vl(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(l.schedule(u),t()),u(a)}const l={schedule:(u,f=!1,h=!1)=>{const m=h&&s?n:i;return f&&o.add(u),m.add(u),u},cancel:u=>{i.delete(u),o.delete(u)},process:u=>{if(a=u,s){r=!0;return}s=!0;const f=n;n=i,i=f,n.forEach(c),n.clear(),s=!1,r&&(r=!1,l.process(u))}};return l}const Dl=40;function Gs(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=ke.reduce((v,b)=>(v[b]=Vl(r),v),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:h,render:d,postRender:m}=o,y=()=>{const v=xt.useManualTiming,b=v?s.timestamp:performance.now();n=!1,v||(s.delta=i?1e3/60:Math.max(Math.min(b-s.timestamp,Dl),1)),s.timestamp=b,s.isProcessing=!0,a.process(s),c.process(s),l.process(s),u.process(s),f.process(s),h.process(s),d.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))},g=()=>{n=!0,i=!0,s.isProcessing||t(y)};return{schedule:ke.reduce((v,b)=>{const w=o[b];return v[b]=(M,D=!1,P=!1)=>(n||g(),w.schedule(M,D,P)),v},{}),cancel:v=>{for(let b=0;b<ke.length;b++)o[ke[b]].cancel(v)},state:s,steps:o}}const{schedule:L,cancel:bt,state:q,steps:Pn}=Gs(typeof requestAnimationFrame<"u"?requestAnimationFrame:ot,!0);let Me;function Rl(){Me=void 0}const J={now:()=>(Me===void 0&&J.set(q.isProcessing||xt.useManualTiming?q.timestamp:performance.now()),Me),set:t=>{Me=t,queueMicrotask(Rl)}},qs=t=>e=>typeof e=="string"&&e.startsWith(t),Xs=qs("--"),Ll=qs("var(--"),An=t=>Ll(t)?Il.test(t.split("/*")[0].trim()):!1,Il=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ys(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Ut={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},le={...Ut,transform:t=>dt(0,1,t)},Ve={...Ut,default:1},ce=t=>Math.round(t*1e5)/1e5,En=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fl(t){return t==null}const Bl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kn=(t,e)=>n=>!!(typeof n=="string"&&Bl.test(n)&&n.startsWith(t)||e&&!Fl(n)&&Object.prototype.hasOwnProperty.call(n,e)),Zs=(t,e,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(En);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ol=t=>dt(0,255,t),Mn={...Ut,transform:t=>Math.round(Ol(t))},At={test:kn("rgb","red"),parse:Zs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Mn.transform(t)+", "+Mn.transform(e)+", "+Mn.transform(n)+", "+ce(le.transform(i))+")"};function jl(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Vn={test:kn("#"),parse:jl,transform:At.transform},ue=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),wt=ue("deg"),mt=ue("%"),S=ue("px"),Nl=ue("vh"),$l=ue("vw"),Js={...mt,parse:t=>mt.parse(t)/100,transform:t=>mt.transform(t*100)},Ht={test:kn("hsl","hue"),parse:Zs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+mt.transform(ce(e))+", "+mt.transform(ce(n))+", "+ce(le.transform(i))+")"},W={test:t=>At.test(t)||Vn.test(t)||Ht.test(t),parse:t=>At.test(t)?At.parse(t):Ht.test(t)?Ht.parse(t):Vn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?At.transform(t):Ht.transform(t),getAnimatableNone:t=>{const e=W.parse(t);return e.alpha=0,W.transform(e)}},Ul=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hl(t){return isNaN(t)&&typeof t=="string"&&(t.match(En)?.length||0)+(t.match(Ul)?.length||0)>0}const Qs="number",to="color",Wl="var",zl="var(",eo="${}",Kl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Wt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(Kl,c=>(W.test(c)?(i.color.push(r),s.push(to),n.push(W.parse(c))):c.startsWith(zl)?(i.var.push(r),s.push(Wl),n.push(c)):(i.number.push(r),s.push(Qs),n.push(parseFloat(c))),++r,eo)).split(eo);return{values:n,split:a,indexes:i,types:s}}function Gl(t){return Wt(t).values}function no({split:t,types:e}){const n=t.length;return i=>{let s="";for(let r=0;r<n;r++)if(s+=t[r],i[r]!==void 0){const o=e[r];o===Qs?s+=ce(i[r]):o===to?s+=W.transform(i[r]):s+=i[r]}return s}}function ql(t){return no(Wt(t))}const Xl=t=>typeof t=="number"?0:W.test(t)?W.getAnimatableNone(t):t,Yl=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Xl(t);function Zl(t){const e=Wt(t);return no(e)(e.values.map((i,s)=>Yl(i,e.split[s])))}const ct={test:Hl,parse:Gl,createTransformer:ql,getAnimatableNone:Zl};function Dn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Jl({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,r=0,o=0;if(!e)s=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;s=Dn(c,a,t+1/3),r=Dn(c,a,t),o=Dn(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function De(t,e){return n=>n>0?e:t}const j=(t,e,n)=>t+(e-t)*n,Rn=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ql=[Vn,At,Ht],tc=t=>Ql.find(e=>e.test(t));function io(t){const e=tc(t);if(!e)return!1;let n=e.parse(t);return e===Ht&&(n=Jl(n)),n}const so=(t,e)=>{const n=io(t),i=io(e);if(!n||!i)return De(t,e);const s={...n};return r=>(s.red=Rn(n.red,i.red,r),s.green=Rn(n.green,i.green,r),s.blue=Rn(n.blue,i.blue,r),s.alpha=j(n.alpha,i.alpha,r),At.transform(s))},Ln=new Set(["none","hidden"]);function ec(t,e){return Ln.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function nc(t,e){return n=>j(t,e,n)}function In(t){return typeof t=="number"?nc:typeof t=="string"?An(t)?De:W.test(t)?so:oc:Array.isArray(t)?oo:typeof t=="object"?W.test(t)?so:ic:De}function oo(t,e){const n=[...t],i=n.length,s=t.map((r,o)=>In(r)(r,e[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function ic(t,e){const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=In(t[s])(t[s],e[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function sc(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}const oc=(t,e)=>{const n=ct.createTransformer(e),i=Wt(t),s=Wt(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ln.has(t)&&!s.values.length||Ln.has(e)&&!i.values.length?ec(t,e):oe(oo(sc(i,s),s.values),n):De(t,e)};function ro(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?j(t,e,n):In(t)(t,e)}const rc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>bt(e),now:()=>q.isProcessing?q.timestamp:J.now()}},ao=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let r=0;r<s;r++)i+=Math.round(t(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Re=2e4;function Fn(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<Re;)e+=n,i=t.next(e);return e>=Re?1/0:e}function ac(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Fn(i),Re);return{type:"keyframes",ease:r=>i.next(s*r).value/e,duration:rt(s)}}const N={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Bn(t,e){return t*Math.sqrt(1-e*e)}const lc=12;function cc(t,e,n){let i=n;for(let s=1;s<lc;s++)i=i-t(i)/e(i);return i}const On=.001;function uc({duration:t=N.duration,bounce:e=N.bounce,velocity:n=N.velocity,mass:i=N.mass}){let s,r,o=1-e;o=dt(N.minDamping,N.maxDamping,o),t=dt(N.minDuration,N.maxDuration,rt(t)),o<1?(s=l=>{const u=l*o,f=u*t,h=u-n,d=Bn(l,o),m=Math.exp(-f);return On-h/d*m},r=l=>{const f=l*o*t,h=f*n+n,d=Math.pow(o,2)*Math.pow(l,2)*t,m=Math.exp(-f),y=Bn(Math.pow(l,2),o);return(-s(l)+On>0?-1:1)*((h-d)*m)/y}):(s=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-On+u*f},r=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=cc(s,r,a);if(t=st(t),isNaN(c))return{stiffness:N.stiffness,damping:N.damping,duration:t};{const l=Math.pow(c,2)*i;return{stiffness:l,damping:o*2*Math.sqrt(i*l),duration:t}}}const fc=["duration","bounce"],hc=["stiffness","damping","mass"];function lo(t,e){return e.some(n=>t[n]!==void 0)}function dc(t){let e={velocity:N.velocity,stiffness:N.stiffness,damping:N.damping,mass:N.mass,isResolvedFromDuration:!1,...t};if(!lo(t,hc)&&lo(t,fc))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*dt(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:N.mass,stiffness:s,damping:r}}else{const n=uc({...t,velocity:0});e={...e,...n,mass:N.mass},e.isResolvedFromDuration=!0}return e}function Le(t=N.visualDuration,e=N.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:l,mass:u,duration:f,velocity:h,isResolvedFromDuration:d}=dc({...n,velocity:-rt(n.velocity||0)}),m=h||0,y=l/(2*Math.sqrt(c*u)),g=o-r,p=rt(Math.sqrt(c/u)),_=Math.abs(g)<5;i||(i=_?N.restSpeed.granular:N.restSpeed.default),s||(s=_?N.restDelta.granular:N.restDelta.default);let v,b,w,M,D,P;if(y<1)w=Bn(p,y),M=(m+y*p*g)/w,v=T=>{const R=Math.exp(-y*p*T);return o-R*(M*Math.sin(w*T)+g*Math.cos(w*T))},D=y*p*M+g*w,P=y*p*g-M*w,b=T=>Math.exp(-y*p*T)*(D*Math.sin(w*T)+P*Math.cos(w*T));else if(y===1){v=R=>o-Math.exp(-p*R)*(g+(m+p*g)*R);const T=m+p*g;b=R=>Math.exp(-p*R)*(p*T*R-m)}else{const T=p*Math.sqrt(y*y-1);v=K=>{const Y=Math.exp(-y*p*K),tt=Math.min(T*K,300);return o-Y*((m+y*p*g)*Math.sinh(tt)+T*g*Math.cosh(tt))/T};const R=(m+y*p*g)/T,H=y*p*R-g*T,nt=y*p*g-R*T;b=K=>{const Y=Math.exp(-y*p*K),tt=Math.min(T*K,300);return Y*(H*Math.sinh(tt)+nt*Math.cosh(tt))}}const E={calculatedDuration:d&&f||null,velocity:T=>st(b(T)),next:T=>{if(!d&&y<1){const H=Math.exp(-y*p*T),nt=Math.sin(w*T),K=Math.cos(w*T),Y=o-H*(M*nt+g*K),tt=st(H*(D*nt+P*K));return a.done=Math.abs(tt)<=i&&Math.abs(o-Y)<=s,a.value=a.done?o:Y,a}const R=v(T);if(d)a.done=T>=f;else{const H=st(b(T));a.done=Math.abs(H)<=i&&Math.abs(o-R)<=s}return a.value=a.done?o:R,a},toString:()=>{const T=Math.min(Fn(E),Re),R=ao(H=>E.next(T*H).value,T,30);return T+"ms "+R},toTransition:()=>{}};return E}Le.applyToOptions=t=>{const e=ac(t,100,Le);return t.ease=e.ease,t.duration=st(e.duration),t.type="keyframes",t};const mc=5;function co(t,e,n){const i=Math.max(e-mc,0);return Is(n-t(i),e-i)}function jn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],h={done:!1,value:f},d=P=>a!==void 0&&P<a||c!==void 0&&P>c,m=P=>a===void 0?c:c===void 0||Math.abs(a-P)<Math.abs(c-P)?a:c;let y=n*e;const g=f+y,p=o===void 0?g:o(g);p!==g&&(y=p-f);const _=P=>-y*Math.exp(-P/i),v=P=>p+_(P),b=P=>{const E=_(P),T=v(P);h.done=Math.abs(E)<=l,h.value=h.done?p:T};let w,M;const D=P=>{d(h.value)&&(w=P,M=Le({keyframes:[h.value,m(h.value)],velocity:co(v,P,h.value),damping:s,stiffness:r,restDelta:l,restSpeed:u}))};return D(0),{calculatedDuration:null,next:P=>{let E=!1;return!M&&w===void 0&&(E=!0,b(P),D(P)),w!==void 0&&P>=w?M.next(P-w):(!E&&b(P),h)}}}function pc(t,e,n){const i=[],s=n||xt.mix||ro,r=t.length-1;for(let o=0;o<r;o++){let a=s(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||ot:e;a=oe(c,a)}i.push(a)}return i}function gc(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(wn(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=pc(e,i,s),c=a.length,l=u=>{if(o&&u<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const h=re(t[f],t[f+1],u);return a[f](h)};return n?u=>l(dt(t[0],t[r-1],u)):l}function yc(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=re(0,e,i);t.push(j(n,1,s))}}function _c(t){const e=[0];return yc(e,t.length-1),e}function vc(t,e){return t.map(n=>n*e)}function xc(t,e){return t.map(()=>e||Ws).splice(0,t.length-1)}function fe({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=El(i)?i.map(Ks):Ks(i),r={done:!1,value:e[0]},o=vc(n&&n.length===e.length?n:_c(e),t),a=gc(o,e,{ease:Array.isArray(s)?s:xc(e,s)});return{calculatedDuration:t,next:c=>(r.value=a(c),r.done=c>=t,r)}}const bc=t=>t!==null;function Nn(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(bc),a=s<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const wc={decay:jn,inertia:jn,tween:fe,keyframes:fe,spring:Le};function uo(t){typeof t.type=="string"&&(t.type=wc[t.type])}class $n{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Tc=t=>t/100;class Un extends $n{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==J.now()&&this.tick(J.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;uo(e);const{type:n=fe,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const c=n||fe;c!==fe&&typeof a[0]!="number"&&(this.mixKeyframes=oe(Tc,ro(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=Fn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return i.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:d,type:m,onUpdate:y,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,b=i;if(f){const P=Math.min(this.currentTime,s)/a;let E=Math.floor(P),T=P%1;!T&&P>=1&&(T=1),T===1&&E--,E=Math.min(E,f+1),E%2&&(h==="reverse"?(T=1-T,d&&(T-=d/a)):h==="mirror"&&(b=o)),v=dt(0,1,T)*a}const w=_?{done:!1,value:u[0]}:b.next(v);r&&!_&&(w.value=r(w.value));let{done:M}=w;!_&&c!==null&&(M=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return D&&m!==jn&&(w.value=Nn(u,this.options,g,this.speed)),y&&y(w.value),D&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return rt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+rt(e)}get time(){return rt(this.currentTime)}set time(e){e=st(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return co(i=>this.generator.next(i).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(J.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=rt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=rc,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(J.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Cc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Et=t=>t*180/Math.PI,Hn=t=>{const e=Et(Math.atan2(t[1],t[0]));return Wn(e)},Sc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Hn,rotateZ:Hn,skewX:t=>Et(Math.atan(t[1])),skewY:t=>Et(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Wn=t=>(t=t%360,t<0&&(t+=360),t),fo=Hn,ho=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),mo=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Pc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ho,scaleY:mo,scale:t=>(ho(t)+mo(t))/2,rotateX:t=>Wn(Et(Math.atan2(t[6],t[5]))),rotateY:t=>Wn(Et(Math.atan2(-t[2],t[0]))),rotateZ:fo,rotate:fo,skewX:t=>Et(Math.atan(t[4])),skewY:t=>Et(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function zn(t){return t.includes("scale")?1:0}function Kn(t,e){if(!t||t==="none")return zn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Pc,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Sc,s=a}if(!s)return zn(e);const r=i[e],o=s[1].split(",").map(Ec);return typeof r=="function"?r(o):o[r]}const Ac=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Kn(n,e)};function Ec(t){return parseFloat(t.trim())}const zt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Kt=new Set(zt),po=t=>t===Ut||t===S,kc=new Set(["x","y","z"]),Mc=zt.filter(t=>!kc.has(t));function Vc(t){const e=[];return Mc.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const Tt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Kn(e,"x"),y:(t,{transform:e})=>Kn(e,"y")};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const kt=new Set;let Gn=!1,qn=!1,Xn=!1;function go(){if(qn){const t=Array.from(kt).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const s=Vc(i);s.length&&(n.set(i,s),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{i.getValue(r)?.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}qn=!1,Gn=!1,kt.forEach(t=>t.complete(Xn)),kt.clear()}function yo(){kt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(qn=!0)})}function Dc(){Xn=!0,yo(),go(),Xn=!1}class Yn{constructor(e,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(kt.add(this),Gn||(Gn=!0,L.read(yo),L.resolveKeyframes(go))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:s}=this;if(e[0]===null){const r=s?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&r===void 0&&s.set(e[0])}Cc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),kt.delete(this)}cancel(){this.state==="scheduled"&&(kt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rc=t=>t.startsWith("--");function _o(t,e,n){Rc(e)?t.style.setProperty(e,n):t.style[e]=n}const Lc={};function vo(t,e){const n=Ls(t);return()=>Lc[e]??n()}const Ic=vo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),xo=vo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),he=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,bo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:he([0,.65,.55,1]),circOut:he([.55,0,1,.45]),backIn:he([.31,.01,.66,-.59]),backOut:he([.33,1.53,.69,.99])};function wo(t,e){if(t)return typeof t=="function"?xo()?ao(t,e):"ease-out":zs(t)?he(t):Array.isArray(t)?t.map(n=>wo(n,e)||bo.easeOut):bo[t]}function Fc(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const f=wo(a,s);Array.isArray(f)&&(u.easing=f);const h={delay:i,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),t.animate(u,h)}function To(t){return typeof t=="function"&&"applyToOptions"in t}function Bc({type:t,...e}){return To(t)&&xo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Co extends $n{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,wn(typeof e.type!="string");const l=Bc(e);this.animation=Fc(n,i,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=Nn(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),_o(n,i,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return rt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+rt(e)}get time(){return rt(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=st(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Ic()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),ot):s(this)}}const So={anticipate:$s,backInOut:Ns,circInOut:Hs};function Oc(t){return t in So}function jc(t){typeof t.ease=="string"&&Oc(t.ease)&&(t.ease=So[t.ease])}const Zn=10;class Nc extends Co{constructor(e){jc(e),uo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Un({...o,autoplay:!1}),c=Math.max(Zn,J.now()-this.startTime),l=dt(0,Zn,c-Zn),u=a.sample(c).value,{name:f}=this.options;r&&f&&_o(r,f,u),n.setWithVelocity(a.sample(Math.max(0,c-l)).value,u,l),a.stop()}}const Po=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ct.test(t)||t==="0")&&!t.startsWith("url("));function $c(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Uc(t,e,n,i){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Po(s,e),a=Po(r,e);return!o||!a?!1:$c(t)||(n==="spring"||To(n))&&i}function Jn(t){t.duration=0,t.type="keyframes"}const Hc=new Set(["opacity","clipPath","filter","transform"]),Wc=Ls(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function zc(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return Wc()&&n&&Hc.has(n)&&(n!=="transform"||!l)&&!c&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Kc=40;class Gc extends $n{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:l,element:u,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=J.now();const h={autoplay:e,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:c,motionValue:l,element:u,...f},d=u?.KeyframeResolver||Yn;this.keyframeResolver=new d(a,(m,y,g)=>this.onKeyframesResolved(m,y,h,!g),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=i;this.resolvedAt=J.now();let f=!0;Uc(e,r,o,a)||(f=!1,(xt.instantAnimations||!c)&&u?.(Nn(e,i,n)),e[0]=e[e.length-1],Jn(i),i.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Kc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=f&&!l&&zc(d),y=d.motionValue?.owner?.current,g=m?new Nc({...d,element:y}):new Un(d);g.finished.then(()=>{this.notifyFinished()}).catch(ot),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Dc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Ao(t,e,n,i=0,s=1){const r=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const qc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Xc(t){const e=qc.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Eo(t,e,n=1){const[i,s]=Xc(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const o=r.trim();return Vs(o)?parseFloat(o):o}return An(s)?Eo(s,e,n+1):s}const Yc={type:"spring",stiffness:500,damping:25,restSpeed:10},Zc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Jc={type:"keyframes",duration:.8},Qc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tu=(t,{keyframes:e})=>e.length>2?Jc:Kt.has(t)?t.startsWith("scale")?Zc(e[1]):Yc:Qc,eu=t=>t!==null;function nu(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(eu),r=e&&n!=="loop"&&e%2===1?0:s.length-1;return s[r]}function ko(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Qn(t,e){const n=t?.[e]??t?.default??t;return n!==t?ko(n,t):n}function iu({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const ti=(t,e,n,i={},s,r)=>o=>{const a=Qn(i,t)||{},c=a.delay||i.delay||0;let{elapsed:l=0}=i;l=l-st(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};iu(a)||Object.assign(u,tu(t,u)),u.duration&&(u.duration=st(u.duration)),u.repeatDelay&&(u.repeatDelay=st(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Jn(u),u.delay===0&&(f=!0)),(xt.instantAnimations||xt.skipAnimations||s?.shouldSkipAnimations)&&(f=!0,Jn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!r&&e.get()!==void 0){const h=nu(u.keyframes,a);if(h!==void 0){L.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Un(u):new Gc(u)};function Mo(t){const e=[{},{}];return t?.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function ei(t,e,n,i){if(typeof e=="function"){const[s,r]=Mo(i);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=Mo(i);e=e(n!==void 0?n:t.custom,s,r)}return e}function Mt(t,e,n){const i=t.getProps();return ei(i,e,n!==void 0?n:i.custom,t)}const Vo=new Set(["width","height","top","left","right","bottom",...zt]),Do=30,su=t=>!isNaN(parseFloat(t));class ou{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=J.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=J.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=su(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Tn);const i=this.events[e].add(n);return e==="change"?()=>{i(),L.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=J.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Do)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Do);return Is(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new ou(t,e)}const ni=t=>Array.isArray(t);function ru(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function au(t){return ni(t)?t[t.length-1]||0:t}function lu(t,e){const n=Mt(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=au(r[o]);ru(t,o,a)}}const X=t=>!!(t&&t.getVelocity);function cu(t){return!!(X(t)&&t.add)}function ii(t,e){const n=t.getValue("willChange");if(cu(n))return n.add(e);if(!n&&xt.WillChange){const i=new xt.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function si(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Ro="data-"+si("framerAppearId");function Lo(t){return t.props[Ro]}function uu({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Io(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const c=t.getDefaultTransition();r=r?ko(r,c):c;const l=r?.reduceMotion;i&&(r=i);const u=[],f=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const d=t.getValue(h,t.latestValues[h]??null),m=a[h];if(m===void 0||f&&uu(f,h))continue;const y={delay:n,...Qn(r||{},h)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===g&&!y.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const b=Lo(t);if(b){const w=window.MotionHandoffAnimation(b,h,L);w!==null&&(y.startTime=w,p=!0)}}ii(t,h);const _=l??t.shouldReduceMotion;d.start(ti(h,d,m,_&&Vo.has(h)?{type:!1}:y,t,p));const v=d.animation;v&&u.push(v)}if(o){const h=()=>L.update(()=>{o&&lu(t,o)});u.length?Promise.all(u).then(h):h()}return u}function oi(t,e,n={}){const i=Mt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Io(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=s;return fu(t,e,c,l,u,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,l]=a==="beforeChildren"?[r,o]:[o,r];return c().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function fu(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(oi(c,e,{...o,delay:n+(typeof i=="function"?0:i)+Ao(t.variantChildren,c,i,s,r)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function hu(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(r=>oi(t,r,n));i=Promise.all(s)}else if(typeof e=="string")i=oi(t,e,n);else{const s=typeof e=="function"?Mt(t,e,n.custom):e;i=Promise.all(Io(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const du={test:t=>t==="auto",parse:t=>t},Fo=t=>e=>e.test(t),Bo=[Ut,S,mt,wt,$l,Nl,du],Oo=t=>Bo.find(Fo(t));function mu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Rs(t):!0}const pu=new Set(["brightness","contrast","saturate","opacity"]);function gu(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(En)||[];if(!i)return t;const s=n.replace(i,"");let r=pu.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const yu=/\b([a-z-]*)\(.*?\)/gu,ri={...ct,getAnimatableNone:t=>{const e=t.match(yu);return e?e.map(gu).join(" "):t}},ai={...ct,getAnimatableNone:t=>{const e=ct.parse(t);return ct.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},jo={...Ut,transform:Math.round},li={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,fontSize:S,backgroundPositionX:S,backgroundPositionY:S,...{rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:Ve,scaleX:Ve,scaleY:Ve,scaleZ:Ve,skew:wt,skewX:wt,skewY:wt,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:le,originX:Js,originY:Js,originZ:S},zIndex:jo,fillOpacity:le,strokeOpacity:le,numOctaves:jo},_u={...li,color:W,backgroundColor:W,outlineColor:W,fill:W,stroke:W,borderColor:W,borderTopColor:W,borderRightColor:W,borderBottomColor:W,borderLeftColor:W,filter:ri,WebkitFilter:ri,mask:ai,WebkitMask:ai},No=t=>_u[t],vu=new Set([ri,ai]);function $o(t,e){let n=No(t);return vu.has(n)||(n=ct),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xu=new Set(["auto","none","0"]);function bu(t,e,n){let i=0,s;for(;i<t.length&&!s;){const r=t[i];typeof r=="string"&&!xu.has(r)&&Wt(r).values.length&&(s=t[i]),i++}if(s&&n)for(const r of e)t[r]=$o(n,s)}class wu extends Yn{constructor(e,n,i,s,r){super(e,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let f=e[u];if(typeof f=="string"&&(f=f.trim(),An(f))){const h=Eo(f,n.current);h!==void 0&&(e[u]=h),u===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Vo.has(i)||e.length!==2)return;const[s,r]=e,o=Oo(s),a=Oo(r),c=Ys(s),l=Ys(r);if(c!==l&&Tt[i]){this.needsMeasurement=!0;return}if(o!==a)if(po(o)&&po(a))for(let u=0;u<e.length;u++){const f=e[u];typeof f=="string"&&(e[u]=parseFloat(f))}else Tt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||mu(e[s]))&&i.push(s);i.length&&bu(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tt[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=Tt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const Tu=new Set(["opacity","clipPath","filter","transform"]);function Uo(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}const Ho=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ie(t){return Ds(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:ci}=Gs(queueMicrotask,!1),ut={x:!1,y:!1};function Wo(){return ut.x||ut.y}function Cu(t){return t==="x"||t==="y"?ut[t]?null:(ut[t]=!0,()=>{ut[t]=!1}):ut.x||ut.y?null:(ut.x=ut.y=!0,()=>{ut.x=ut.y=!1})}function zo(t,e){const n=Uo(t),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[n,s,()=>i.abort()]}function Su(t){return!(t.pointerType==="touch"||Wo())}function Pu(t,e,n={}){const[i,s,r]=zo(t,n);return i.forEach(o=>{let a=!1,c=!1,l;const u=()=>{o.removeEventListener("pointerleave",m)},f=g=>{l&&(l(g),l=void 0),u()},h=g=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(g))},d=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},m=g=>{if(g.pointerType!=="touch"){if(a){c=!0;return}f(g)}},y=g=>{if(!Su(g))return;c=!1;const p=e(o,g);typeof p=="function"&&(l=p,o.addEventListener("pointerleave",m,s))};o.addEventListener("pointerenter",y,s),o.addEventListener("pointerdown",d,s)}),r}const Ko=(t,e)=>e?t===e?!0:Ko(t,e.parentElement):!1,ui=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Au=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Eu(t){return Au.has(t.tagName)||t.isContentEditable===!0}const ku=new Set(["INPUT","SELECT","TEXTAREA"]);function Mu(t){return ku.has(t.tagName)||t.isContentEditable===!0}const Fe=new WeakSet;function Go(t){return e=>{e.key==="Enter"&&t(e)}}function fi(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Vu=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=Go(()=>{if(Fe.has(n))return;fi(n,"down");const s=Go(()=>{fi(n,"up")}),r=()=>fi(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function qo(t){return ui(t)&&!Wo()}const Xo=new WeakSet;function Du(t,e,n={}){const[i,s,r]=zo(t,n),o=a=>{const c=a.currentTarget;if(!qo(a)||Xo.has(a))return;Fe.add(c),n.stopPropagation&&Xo.add(a);const l=e(c,a),u=(d,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Fe.has(c)&&Fe.delete(c),qo(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{u(d,c===window||c===document||n.useGlobalTarget||Ko(c,d.target))},h=d=>{u(d,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Ie(a)&&(a.addEventListener("focus",l=>Vu(l,s)),!Eu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function hi(t){return Ds(t)&&"ownerSVGElement"in t}const Be=new WeakMap;let Oe;const Yo=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:hi(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Ru=Yo("inline","width","offsetWidth"),Lu=Yo("block","height","offsetHeight");function Iu({target:t,borderBoxSize:e}){Be.get(t)?.forEach(n=>{n(t,{get width(){return Ru(t,e)},get height(){return Lu(t,e)}})})}function Fu(t){t.forEach(Iu)}function Bu(){typeof ResizeObserver>"u"||(Oe=new ResizeObserver(Fu))}function Ou(t,e){Oe||Bu();const n=Uo(t);return n.forEach(i=>{let s=Be.get(i);s||(s=new Set,Be.set(i,s)),s.add(e),Oe?.observe(i)}),()=>{n.forEach(i=>{const s=Be.get(i);s?.delete(e),s?.size||Oe?.unobserve(i)})}}const je=new Set;let Gt;function ju(){Gt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};je.forEach(e=>e(t))},window.addEventListener("resize",Gt)}function Nu(t){return je.add(t),Gt||ju(),()=>{je.delete(t),!je.size&&typeof Gt=="function"&&(window.removeEventListener("resize",Gt),Gt=void 0)}}function Zo(t,e){return typeof t=="function"?Nu(t):Ou(t,e)}function $u(t){return hi(t)&&t.tagName==="svg"}const Uu=[...Bo,W,ct],Hu=t=>Uu.find(Fo(t)),Jo=()=>({translate:0,scale:1,origin:0,originPoint:0}),qt=()=>({x:Jo(),y:Jo()}),Qo=()=>({min:0,max:0}),z=()=>({x:Qo(),y:Qo()}),Wu=new WeakMap;function Ne(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function de(t){return typeof t=="string"||Array.isArray(t)}const di=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mi=["initial",...di];function $e(t){return Ne(t.animate)||mi.some(e=>de(t[e]))}function tr(t){return!!($e(t)||t.variants)}function zu(t,e,n){for(const i in e){const s=e[i],r=n[i];if(X(s))t.addValue(i,s);else if(X(r))t.addValue(i,Vt(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,Vt(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const pi={current:null},er={current:!1},Ku=typeof window<"u";function Gu(){if(er.current=!0,!!Ku)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>pi.current=t.matches;t.addEventListener("change",e),e()}else pi.current=!1}const nr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ue={};function ir(t){Ue=t}function qu(){return Ue}class Xu{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Yn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=J.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=$e(n),this.isVariantNode=tr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const m=h[d];l[d]!==void 0&&X(m)&&m.set(l[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,Wu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(er.current||Gu(),this.shouldReduceMotion=pi.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),bt(this.notifyUpdate),bt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Tu.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,f=new Co({element:this.current,name:e,keyframes:a,times:c,ease:l,duration:st(u)}),h=o(f);this.valueSubscriptions.set(e,()=>{h(),f.cancel()});return}const i=Kt.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&L.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ue){const n=Ue[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<nr.length;i++){const s=nr[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=e[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=zu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Vt(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Vs(i)||Rs(i))?i=parseFloat(i):!Hu(i)&&ct.test(n)&&(i=$o(e,n)),this.setBaseTarget(e,X(i)?i.get():i)),X(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const r=ei(this.props,n,this.presenceContext?.custom);r&&(i=r[e])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!X(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ci.render(this.render)}}class sr extends Xu{constructor(){super(...arguments),this.KeyframeResolver=wu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;X(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ct{constructor(e){this.isMounted=!1,this.node=e}update(){}}function or({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Yu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Zu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function gi(t){return t===void 0||t===1}function yi({scale:t,scaleX:e,scaleY:n}){return!gi(t)||!gi(e)||!gi(n)}function Dt(t){return yi(t)||rr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function rr(t){return ar(t.x)||ar(t.y)}function ar(t){return t&&t!=="0%"}function He(t,e,n){const i=t-n,s=e*i;return n+s}function lr(t,e,n,i,s){return s!==void 0&&(t=He(t,s,i)),He(t,n,i)+e}function _i(t,e=0,n=1,i,s){t.min=lr(t.min,e,n,i,s),t.max=lr(t.max,e,n,i,s)}function cr(t,{x:e,y:n}){_i(t.x,e.translate,e.scale,e.originPoint),_i(t.y,n.translate,n.scale,n.originPoint)}const ur=.999999999999,fr=1.0000000000001;function Ju(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Yt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,cr(t,o)),i&&Dt(r.latestValues)&&Yt(t,r.latestValues,r.layout?.layoutBox))}e.x<fr&&e.x>ur&&(e.x=1),e.y<fr&&e.y>ur&&(e.y=1)}function Xt(t,e){t.min=t.min+e,t.max=t.max+e}function hr(t,e,n,i,s=.5){const r=j(t.min,t.max,s);_i(t,e,n,r,i)}function dr(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Yt(t,e,n){const i=n??t;hr(t.x,dr(e.x,i.x),e.scaleX,e.scale,e.originX),hr(t.y,dr(e.y,i.y),e.scaleY,e.scale,e.originY)}function mr(t,e){return or(Zu(t.getBoundingClientRect(),e))}function Qu(t,e,n){const i=mr(t,n),{scroll:s}=e;return s&&(Xt(i.x,s.offset.x),Xt(i.y,s.offset.y)),i}const tf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ef=zt.length;function nf(t,e,n){let i="",s=!0;for(let r=0;r<ef;r++){const o=zt[r],a=t[o];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(o.startsWith("scale")?1:0);else{const l=parseFloat(a);c=o.startsWith("scale")?l===1:l===0}if(!c||n){const l=Ho(a,li[o]);if(!c){s=!1;const u=tf[o]||o;i+=`${u}(${l}) `}n&&(e[o]=l)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function vi(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const c in e){const l=e[c];if(Kt.has(c)){o=!0;continue}else if(Xs(c)){s[c]=l;continue}else{const u=Ho(l,li[c]);c.startsWith("origin")?(a=!0,r[c]=u):i[c]=u}}if(e.transform||(o||n?i.transform=nf(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=r;i.transformOrigin=`${c} ${l} ${u}`}}function pr(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];s?.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function gr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const me={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=gr(t,e.target.x),i=gr(t,e.target.y);return`${n}% ${i}%`}},sf={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ct.parse(t);if(s.length>5)return i;const r=ct.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=c;const l=j(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),r(s)}},xi={borderRadius:{...me,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomLeftRadius:me,borderBottomRightRadius:me,boxShadow:sf};function yr(t,{layout:e,layoutId:n}){return Kt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!xi[t]||t==="opacity")}function bi(t,e,n){const i=t.style,s=e?.style,r={};if(!i)return r;for(const o in i)(X(i[o])||s&&X(s[o])||yr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=i[o]);return r}function of(t){return window.getComputedStyle(t)}class rf extends sr{constructor(){super(...arguments),this.type="html",this.renderInstance=pr}readValueFromInstance(e,n){if(Kt.has(n))return this.projection?.isProjecting?zn(n):Ac(e,n);{const i=of(e),s=(Xs(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return mr(e,n)}build(e,n,i){vi(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return bi(e,n,i)}}const af={offset:"stroke-dashoffset",array:"stroke-dasharray"},lf={offset:"strokeDashoffset",array:"strokeDasharray"};function cf(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?af:lf;t[r.offset]=`${-i}`,t[r.array]=`${e} ${n}`}const uf=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function _r(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},c,l,u){if(vi(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h}=t;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete f.transformBox);for(const d of uf)f[d]!==void 0&&(h[d]=f[d],delete f[d]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),s!==void 0&&cf(f,s,r,o,!1)}const vr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),xr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ff(t,e,n,i){pr(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(vr.has(s)?s:si(s),e.attrs[s])}function br(t,e,n){const i=bi(t,e,n);for(const s in t)if(X(t[s])||X(e[s])){const r=zt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=t[s]}return i}class hf extends sr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Kt.has(n)){const i=No(n);return i&&i.default||0}return n=vr.has(n)?n:si(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return br(e,n,i)}build(e,n,i){_r(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){ff(e,n,i,s)}mount(e){this.isSVGTag=xr(e.tagName),super.mount(e)}}const df=mi.length;function wr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?wr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<df;n++){const i=mi[n],s=t.props[i];(de(s)||s===!1)&&(e[i]=s)}return e}function Tr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const mf=[...di].reverse(),pf=di.length;function gf(t){return e=>Promise.all(e.map(({animation:n,options:i})=>hu(t,n,i)))}function yf(t){let e=gf(t),n=Cr(),i=!0,s=!1;const r=l=>(u,f)=>{const h=Mt(t,f,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:d,transitionEnd:m,...y}=h;u={...u,...y,...m}}return u};function o(l){e=l(t)}function a(l){const{props:u}=t,f=wr(t.parent)||{},h=[],d=new Set;let m={},y=1/0;for(let p=0;p<pf;p++){const _=mf[p],v=n[_],b=u[_]!==void 0?u[_]:f[_],w=de(b),M=_===l?v.isActive:null;M===!1&&(y=p);let D=b===f[_]&&b!==u[_]&&w;if(D&&(i||s)&&t.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...m},!v.isActive&&M===null||!b&&!v.prevProp||Ne(b)||typeof b=="boolean")continue;if(_==="exit"&&v.isActive&&M!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const P=_f(v.prevProp,b);let E=P||_===l&&v.isActive&&!D&&w||p>y&&w,T=!1;const R=Array.isArray(b)?b:[b];let H=R.reduce(r(_),{});M===!1&&(H={});const{prevResolvedValues:nt={}}=v,K={...nt,...H},Y=O=>{E=!0,d.has(O)&&(T=!0,d.delete(O)),v.needsAnimating[O]=!0;const A=t.getValue(O);A&&(A.liveStyle=!1)};for(const O in K){const A=H[O],V=nt[O];if(m.hasOwnProperty(O))continue;let C=!1;ni(A)&&ni(V)?C=!Tr(A,V):C=A!==V,C?A!=null?Y(O):d.add(O):A!==void 0&&d.has(O)?Y(O):v.protectedKeys[O]=!0}v.prevProp=b,v.prevResolvedValues=H,v.isActive&&(m={...m,...H}),(i||s)&&t.blockInitialAnimation&&(E=!1);const tt=D&&P;E&&(!tt||T)&&h.push(...R.map(O=>{const A={type:_};if(typeof O=="string"&&(i||s)&&!tt&&t.manuallyAnimateOnMount&&t.parent){const{parent:V}=t,C=Mt(V,O);if(V.enteringChildren&&C){const{delayChildren:I}=C.transition||{};A.delay=Ao(V.enteringChildren,t,I)}}return{animation:O,options:A}}))}if(d.size){const p={};if(typeof u.initial!="boolean"){const _=Mt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);_&&_.transition&&(p.transition=_.transition)}d.forEach(_=>{const v=t.getBaseTarget(_),b=t.getValue(_);b&&(b.liveStyle=!0),p[_]=v??null}),h.push({animation:p})}let g=!!h.length;return i&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),i=!1,s=!1,g?e(h):Promise.resolve()}function c(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const f=a(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Cr(),s=!0}}}function _f(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Tr(e,t):!1}function Rt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cr(){return{animate:Rt(!0),whileInView:Rt(),whileHover:Rt(),whileTap:Rt(),whileDrag:Rt(),whileFocus:Rt(),exit:Rt()}}function wi(t,e){t.min=e.min,t.max=e.max}function ft(t,e){wi(t.x,e.x),wi(t.y,e.y)}function Sr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Pr=1e-4,vf=1-Pr,xf=1+Pr,Ar=.01,bf=0-Ar,wf=0+Ar;function Q(t){return t.max-t.min}function Tf(t,e,n){return Math.abs(t-e)<=n}function Er(t,e,n,i=.5){t.origin=i,t.originPoint=j(e.min,e.max,t.origin),t.scale=Q(n)/Q(e),t.translate=j(n.min,n.max,t.origin)-t.originPoint,(t.scale>=vf&&t.scale<=xf||isNaN(t.scale))&&(t.scale=1),(t.translate>=bf&&t.translate<=wf||isNaN(t.translate))&&(t.translate=0)}function pe(t,e,n,i){Er(t.x,e.x,n.x,i?i.originX:void 0),Er(t.y,e.y,n.y,i?i.originY:void 0)}function kr(t,e,n){t.min=n.min+e.min,t.max=t.min+Q(e)}function Cf(t,e,n){kr(t.x,e.x,n.x),kr(t.y,e.y,n.y)}function Mr(t,e,n){t.min=e.min-n.min,t.max=t.min+Q(e)}function We(t,e,n){Mr(t.x,e.x,n.x),Mr(t.y,e.y,n.y)}function Vr(t,e,n,i,s){return t-=e,t=He(t,1/n,i),s!==void 0&&(t=He(t,1/s,i)),t}function Sf(t,e=0,n=1,i=.5,s,r=t,o=t){if(mt.test(e)&&(e=parseFloat(e),e=j(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=j(r.min,r.max,i);t===r&&(a-=e),t.min=Vr(t.min,e,n,a,s),t.max=Vr(t.max,e,n,a,s)}function Dr(t,e,[n,i,s],r,o){Sf(t,e[n],e[i],e[s],e.scale,r,o)}const Pf=["x","scaleX","originX"],Af=["y","scaleY","originY"];function Rr(t,e,n,i){Dr(t.x,e,Pf,n?n.x:void 0,i?i.x:void 0),Dr(t.y,e,Af,n?n.y:void 0,i?i.y:void 0)}function Lr(t){return t.translate===0&&t.scale===1}function Ir(t){return Lr(t.x)&&Lr(t.y)}function Fr(t,e){return t.min===e.min&&t.max===e.max}function Ef(t,e){return Fr(t.x,e.x)&&Fr(t.y,e.y)}function Br(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Or(t,e){return Br(t.x,e.x)&&Br(t.y,e.y)}function jr(t){return Q(t.x)/Q(t.y)}function Nr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function pt(t){return[t("x"),t("y")]}function kf(t,e,n){let i="";const s=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:m}=n;l&&(i=`perspective(${l}px) ${i}`),u&&(i+=`rotate(${u}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(i+=`scale(${a}, ${c})`),i||"none"}const $r=["TopLeft","TopRight","BottomLeft","BottomRight"],Mf=$r.length,Ur=t=>typeof t=="string"?parseFloat(t):t,Hr=t=>typeof t=="number"||S.test(t);function Vf(t,e,n,i,s,r){s?(t.opacity=j(0,n.opacity??1,Df(i)),t.opacityExit=j(e.opacity??1,0,Rf(i))):r&&(t.opacity=j(e.opacity??1,n.opacity??1,i));for(let o=0;o<Mf;o++){const a=`border${$r[o]}Radius`;let c=Wr(e,a),l=Wr(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||Hr(c)===Hr(l)?(t[a]=Math.max(j(Ur(c),Ur(l),i),0),(mt.test(l)||mt.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=j(e.rotate||0,n.rotate||0,i))}function Wr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Df=zr(0,.5,Us),Rf=zr(.5,.95,ot);function zr(t,e,n){return i=>i<t?0:i>e?1:n(re(t,e,i))}function Lf(t,e,n){const i=X(t)?t:Vt(t);return i.start(ti("",i,e,n)),i.animation}function ge(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const If=(t,e)=>t.depth-e.depth;class Ff{constructor(){this.children=[],this.isDirty=!1}add(e){bn(this.children,e),this.isDirty=!0}remove(e){Ee(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(If),this.isDirty=!1,this.children.forEach(e)}}function Bf(t,e){const n=J.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(bt(i),t(r-e))};return L.setup(i,!0),()=>bt(i)}function ze(t){return X(t)?t.get():t}class Of{constructor(){this.members=[]}add(e){bn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(Ee(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(Ee(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:r}=e.options;(s===void 0||s!==r)&&(e.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Ke={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ti=["","X","Y","Z"],jf=1e3;let Nf=0;function Ci(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Kr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Lo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(s||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Kr(i)}function Gr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=e?.()){this.id=Nf++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Hf),this.nodes.forEach(Gf),this.nodes.forEach(qf),this.nodes.forEach(Wf)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ff)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Tn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=hi(o)&&!$u(o),this.instance=o;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const h=()=>this.root.updateBlockedByResize=!1;L.read(()=>{f=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,u&&u(),u=Bf(h,250),Ke.hasAnimatedSinceResize&&(Ke.hasAnimatedSinceResize=!1,this.nodes.forEach(Yr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||l.getDefaultTransition()||Qf,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=l.getProps(),p=!this.targetLayout||!Or(this.targetLayout,d),_=!f&&h;if(this.options.layoutRoot||this.resumeFrom||_||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Qn(m,"layout"),onPlay:y,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,_)}else f||Yr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),bt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Xf),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Kr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(qr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Xr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Kf),this.nodes.forEach($f),this.nodes.forEach(Uf)):this.nodes.forEach(Xr),this.clearAllSnapshots();const a=J.now();q.delta=dt(0,1e3/60,a-q.timestamp),q.timestamp=a,q.isProcessing=!0,Pn.update.process(q),Pn.preRender.process(q),Pn.render.process(q),q.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ci.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zf),this.sharedNodes.forEach(Yf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=z(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ir(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||Dt(this.latestValues)||u)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),th(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return z();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(eh))){const{scroll:l}=this.root;l&&(Xt(a.x,l.offset.x),Xt(a.y,l.offset.y))}return a}removeElementScroll(o){const a=z();if(ft(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:f}=l;l!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&ft(a,o),Xt(a.x,u.offset.x),Xt(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const c=z();ft(c,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Yt(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Dt(u.latestValues)&&Yt(c,u.latestValues,u.layout?.layoutBox)}return Dt(this.latestValues)&&Yt(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const a=z();ft(a,o);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!Dt(l.latestValues))continue;let u;l.instance&&(yi(l.latestValues)&&l.updateSnapshot(),u=z(),ft(u,l.measurePageBox())),Rr(a,l.latestValues,l.snapshot?.layoutBox,u)}return Dt(this.latestValues)&&Rr(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==q.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=q.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ft(this.target,this.layout.layoutBox),cr(this.target,this.targetDelta)):ft(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||yi(this.parent.latestValues)||rr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),We(this.relativeTargetOrigin,a,c),ft(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===q.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;ft(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Ju(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=z());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sr(this.prevProjectionDelta.x,this.projectionDelta.x),Sr(this.prevProjectionDelta.y,this.projectionDelta.y)),pe(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Nr(this.projectionDelta.x,this.prevProjectionDelta.x)||!Nr(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=qt(),this.projectionDelta=qt(),this.projectionDeltaWithTransform=qt()}setAnimationOrigin(o,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=qt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=z(),d=c?c.source:void 0,m=this.layout?this.layout.source:void 0,y=d!==m,g=this.getStack(),p=!g||g.members.length<=1,_=!!(y&&!p&&this.options.crossfade===!0&&!this.path.some(Jf));this.animationProgress=0;let v;this.mixTargetDelta=b=>{const w=b/1e3;Zr(f.x,o.x,w),Zr(f.y,o.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(We(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Zf(this.relativeTarget,this.relativeTargetOrigin,h,w),v&&Ef(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=z()),ft(v,this.relativeTarget)),y&&(this.animationValues=u,Vf(u,l,this.latestValues,w,_,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(bt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{Ke.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Vt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Lf(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&na(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||z();const f=Q(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=Q(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}ft(a,c),Yt(a,u),pe(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Of),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Ci("z",o,l,this.animationValues);for(let u=0;u<Ti.length;u++)Ci(`rotate${Ti[u]}`,o,l,this.animationValues),Ci(`skew${Ti[u]}`,o,l,this.animationValues);o.render();for(const u in l)o.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ze(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ze(a?.pointerEvents)||""),this.hasProjected&&!Dt(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=kf(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),o.transform=f;const{x:h,y:d}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${d.origin*100}% 0`,l.animationValues?o.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in xi){if(u[m]===void 0)continue;const{correct:y,applyTo:g,isCSSVariable:p}=xi[m],_=f==="none"?u[m]:y(u[m],l);if(g){const v=g.length;for(let b=0;b<v;b++)o[g[b]]=_}else p?this.options.visualElement.renderState.vars[m]=_:o[m]=_}this.options.layoutId&&(o.pointerEvents=l===this?ze(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(qr),this.root.sharedNodes.clear()}}}function $f(t){t.updateLayout()}function Uf(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;if(s==="size")pt(u=>{const f=r?e.measuredBox[u]:e.layoutBox[u],h=Q(f);f.min=n[u].min,f.max=f.min+h});else if(s==="x"||s==="y"){const u=s==="x"?"y":"x";wi(r?e.measuredBox[u]:e.layoutBox[u],n[u])}else na(s,e.layoutBox,n)&&pt(u=>{const f=r?e.measuredBox[u]:e.layoutBox[u],h=Q(n[u]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+h)});const o=qt();pe(o,n,e.layoutBox);const a=qt();r?pe(a,t.applyTransform(i,!0),e.measuredBox):pe(a,n,e.layoutBox);const c=!Ir(o);let l=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:h}=u;if(f&&h){const d=z();We(d,e.layoutBox,f.layoutBox);const m=z();We(m,n,h.layoutBox),Or(d,m)||(l=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Hf(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Wf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function zf(t){t.clearSnapshot()}function qr(t){t.clearMeasurements()}function Xr(t){t.isLayoutDirty=!1}function Kf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Yr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gf(t){t.resolveTargetDelta()}function qf(t){t.calcProjection()}function Xf(t){t.resetSkewAndRotation()}function Yf(t){t.removeLeadSnapshot()}function Zr(t,e,n){t.translate=j(e.translate,0,n),t.scale=j(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Jr(t,e,n,i){t.min=j(e.min,n.min,i),t.max=j(e.max,n.max,i)}function Zf(t,e,n,i){Jr(t.x,e.x,n.x,i),Jr(t.y,e.y,n.y,i)}function Jf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Qf={duration:.45,ease:[.4,0,.1,1]},Qr=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ta=Qr("applewebkit/")&&!Qr("chrome/")?Math.round:ot;function ea(t){t.min=ta(t.min),t.max=ta(t.max)}function th(t){ea(t.x),ea(t.y)}function na(t,e,n){return t==="position"||t==="preserve-aspect"&&!Tf(jr(e),jr(n),.2)}function eh(t){return t!==t.root&&t.scroll?.wasRoot}const nh=Gr({attachResizeListener:(t,e)=>ge(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Si={current:void 0},ia=Gr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

python3 - <<'PY'
from pathlib import Path
import re

path = Path("src/imio/omnia/tinymce/browser/static/omnia-tinymce.js")
text = path.read_text(encoding="utf-8")
m = re.search(r"async function\*\$a\(t,e\)\{(.+?)\}class ve extends Error", text, re.S)
print("found", bool(m))
if m:
    body = m.group(1)
    print(body[:1200])
PY

Repository: IMIO/imio.omnia.tinymce

Length of output: 585


Handle CRLF SSE lines and the final buffered event.
Trim trailing \r before checking for [DONE], and drain the leftover buffer after read() returns done so the last chunk isn't dropped.

🧰 Tools
🪛 OpenGrep (1.25.0)

[ERROR] 14-14: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.

(coderabbit.command-injection.exec-js)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/imio/omnia/tinymce/browser/static/omnia-tinymce.js` around lines 11 - 14,
Update the async generator $a to normalize SSE lines by removing trailing
carriage returns before evaluating event data, ensuring [DONE] is recognized for
CRLF responses. When the reader reports done, process the remaining buffered
content once before exiting so the final event is yielded instead of discarded.

`);s=a.pop()||"";for(const u of a)for(const l of u.split(`
`))if(l.startsWith("data: ")){const c=l.slice(6);if(c==="[DONE]")return;try{const f=JSON.parse(c);f.chunk!=null&&(yield f.chunk)}catch{c.trim()&&(yield c)}}}}finally{n.releaseLock()}}class ka{#i;#s;#o;#r;#n;#a;constructor({baseUrl:e,application:n,municipality:i,authToken:s,onError:r,endpoints:o}){this.#i=e.replace(/\/+$/,""),this.#s=n||null,this.#o=i||null,this.#r=s||null,this.#n=r||null,this.#a=o||{}}#l(e){let n;if(/^https?:\/\//.test(e)?n=e:e.startsWith("/")?n=`${this.#i}${e}`:n=`${this.#i}/${e}`,this.#r){const i=n.includes("?")?"&":"?";n+=`${i}_authenticator=${encodeURIComponent(this.#r)}`}return n}#t(e,n){return this.#a[e]||n}#c(e={}){const n={"Content-Type":"application/json",...e};return this.#s&&(n["x-imio-application"]=this.#s),this.#o&&(n["x-imio-municipality"]=this.#o),n}async#e(e,n,i){const s=this.#l(e),r=this.#c();let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=new Error(`Omnia API error: ${o.status} ${o.statusText}`);throw a.status=o.status,this.#n?.(a),a}return o.json()}async*#u(e,n,i){const s=this.#l(e),r=this.#c({Accept:"text/event-stream"});let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=new Error(`Omnia API error: ${o.status} ${o.statusText}`);throw a.status=o.status,this.#n?.(a),a}yield*Va(o,i)}async*generate(e,n={}){const{signal:i,...s}=n;yield*this.#u(this.#t("generate","/generate"),{prompt:e,...s},i)}async expandText(e,n={}){const{signal:i,expansionTarget:s,...r}=n,o={input:e,...r};return s!==void 0&&(o.expansion_target=s),(await this.#e(this.#t("expand-text","/v1/agents/expand-text"),o,i)).result}async improveText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("improve-text","/v1/agents/improve-text"),{input:e},i)).result}async reduceText(e,n={}){const{signal:i,reductionTarget:s}=n,r={input:e};return s!==void 0&&(r.reduction_target=s),(await this.#e(this.#t("reduce-text","/v1/agents/reduce-text"),r,i)).result}async correctText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("correct-text","/v1/agents/correct-text"),{input:e},i)).result}async makeAccessible(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("make-accessible","/v1/agents/make-accessible"),{input:e},i)).result}async translateText(e,n,i={}){const{signal:s}=i;return(await this.#e(this.#t("translate-text","/v1/agents/translate-text"),{input:e,target_language:n},s)).result}}const Jt=[{id:"generate",label:"Générer du contenu",menu:"panel",shortcut:"g",menuItem:{id:"omnia-generate",text:"Générer"}},{id:"expand-text",label:"Développer la sélection",menu:"floating",shortcut:"d",menuItem:{id:"omnia-expand-text",text:"Développer"}},{id:"improve-text",label:"Améliorer",menu:"floating",shortcut:"a",menuItem:{id:"omnia-improve-text",text:"Améliorer"}},{id:"reduce-text",label:"Réduire",menu:"floating",shortcut:"r",menuItem:{id:"omnia-reduce-text",text:"Réduire"}},{id:"correct-text",label:"Corriger",menu:"floating",shortcut:"c",menuItem:{id:"omnia-correct-text",text:"Corriger"}},{id:"make-accessible",label:"Rendre accessible",menu:"floating",shortcut:"x",menuItem:{id:"omnia-make-accessible",text:"Rendre accessible"}},{id:"translate-text",label:"Traduire",menu:"floating",shortcut:"t",menuItem:{id:"omnia-translate-text",text:"Traduire"}}],Ii=Jt.map(t=>t.id),Da=Ii.filter(t=>t!=="generate"),_e=[{code:"fr",label:"Français"},{code:"nl",label:"Nederlands"},{code:"de",label:"Deutsch"},{code:"en",label:"English"},{code:"es",label:"Español"},{code:"it",label:"Italiano"}],Ra={generate:"/generate","expand-text":"/v1/agents/expand-text","improve-text":"/v1/agents/improve-text","reduce-text":"/v1/agents/reduce-text","correct-text":"/v1/agents/correct-text","make-accessible":"/v1/agents/make-accessible","translate-text":"/v1/agents/translate-text"};function Fi(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")?{value:t,valid:!0}:typeof t=="string"?{value:t.split(",").map(e=>e.trim()).filter(Boolean),valid:!0}:{valid:!1,message:"Expected a string or an array of strings."}}function Bi(t){return t&&typeof t=="object"&&!Array.isArray(t)?{value:t,valid:!0}:{valid:!1,message:"Expected an object."}}function La(t){return typeof t=="boolean"?{value:t,valid:!0}:Bi(t)}function Ia(t){t.options.register("omnia_base_url",{processor:"string",default:""}),t.options.register("omnia_auth_token",{processor:"string",default:""}),t.options.register("omnia_application",{processor:"string",default:""}),t.options.register("omnia_municipality",{processor:"string",default:""}),t.options.register("omnia_default_translate_language",{processor:"string",default:"fr"}),t.options.register("omnia_enabled_features",{processor:Fi,default:Da}),t.options.register("omnia_endpoints",{processor:Bi,default:{}}),t.options.register("omnia_shortcuts",{processor:La,default:!0}),t.options.register("omnia_toolbar",{processor:"boolean",default:!0}),t.options.register("omnia_context_menu",{processor:"boolean",default:!0}),t.options.register("omnia_translate_languages",{processor:Fi,default:_e.map(e=>e.code)}),t.options.register("omnia_history_limit",{processor:"number",default:5}),t.options.register("omnia_floating_panel_mode",{processor:e=>e==="inline"||e==="blur"?{value:e,valid:!0}:{valid:!1,message:'Expected "inline" or "blur".'},default:"inline"}),t.options.register("omnia_floating_panel_width",{processor:e=>e==="full"?{value:e,valid:!0}:typeof e=="number"&&e>0?{value:e,valid:!0}:{valid:!1,message:'Expected a positive number or "full".'},default:500})}function Fa(t){const e=new Set(Ii);return t.filter(n=>e.has(n))}function Ba(t,e){const n=new Map(_e.map(o=>[o.code,o])),i=t.filter(o=>n.has(o)).map(o=>n.get(o)),s=i.length>0?i:_e,r=new Set(s.map(o=>o.code));return{languages:s,defaultLanguage:r.has(e)?e:s[0].code}}function Oa(t,e){if(t===!1)return{enabled:!1,prefix:"o",timeoutMs:1500,bindings:{}};t===!0&&(t={});const n=new Set(e),i={};for(const s of Jt){const r=t.bindings?.[s.id],o=typeof r=="string"?r.toLowerCase():s.shortcut;n.has(s.id)&&o&&(i[s.id]=o)}return{enabled:t.enabled!==!1,prefix:typeof t.prefix=="string"&&t.prefix.length===1?t.prefix.toLowerCase():"o",timeoutMs:Number.isFinite(t.timeoutMs)?t.timeoutMs:1500,bindings:i}}function ja(t){const e=Fa(t.options.get("omnia_enabled_features")),{languages:n,defaultLanguage:i}=Ba(t.options.get("omnia_translate_languages"),t.options.get("omnia_default_translate_language"));return{enabledFeatures:e,endpoints:{...Ra,...t.options.get("omnia_endpoints")},shortcuts:Oa(t.options.get("omnia_shortcuts"),e),toolbar:t.options.get("omnia_toolbar"),contextMenu:t.options.get("omnia_context_menu"),defaultLanguage:i,languages:n,historyLimit:Math.max(1,t.options.get("omnia_history_limit")),floatingPanelMode:t.options.get("omnia_floating_panel_mode"),floatingPanelWidth:t.options.get("omnia_floating_panel_width"),authToken:t.options.get("omnia_auth_token"),application:t.options.get("omnia_application"),municipality:t.options.get("omnia_municipality")}}var Qt,M,Oi,yt,ji,Ni,$i,Ui,en,nn,sn,Wi,ve={},xe=[],Na=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,te=Array.isArray;function ft(t,e){for(var n in e)t[n]=e[n];return t}function on(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function et(t,e,n){var i,s,r,o={};for(r in e)r=="key"?i=e[r]:r=="ref"?s=e[r]:o[r]=e[r];if(arguments.length>2&&(o.children=arguments.length>3?Qt.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)o[r]===void 0&&(o[r]=t.defaultProps[r]);return ee(t,o,i,s,null)}function ee(t,e,n,i,s){var r={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Oi,__i:-1,__u:0};return s==null&&M.vnode!=null&&M.vnode(r),r}function $a(){return{current:null}}function rt(t){return t.children}function at(t,e){this.props=t,this.context=e}function It(t,e){if(e==null)return t.__?It(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?It(t):null}function Ua(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,i=[],s=[],r=ft({},e);r.__v=e.__v+1,M.vnode&&M.vnode(r),an(t.__P,r,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,i,n??It(e),!!(32&e.__u),s),r.__v=e.__v,r.__.__k[r.__i]=r,Yi(i,r,s),e.__e=e.__=null,r.__e!=n&&Hi(r)}}function Hi(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Hi(t)}function rn(t){(!t.__d&&(t.__d=!0)&&yt.push(t)&&!be.__r++||ji!=M.debounceRendering)&&((ji=M.debounceRendering)||Ni)(be)}function be(){try{for(var t,e=1;yt.length;)yt.length>e&&yt.sort($i),t=yt.shift(),e=yt.length,Ua(t)}finally{yt.length=be.__r=0}}function Ki(t,e,n,i,s,r,o,a,u,l,c){var f,h,d,m,_,g,p,y=i&&i.__k||xe,v=e.length;for(u=Wa(n,e,y,u,v),f=0;f<v;f++)(d=n.__k[f])!=null&&(h=d.__i!=-1&&y[d.__i]||ve,d.__i=f,g=an(t,d,h,s,r,o,a,u,l,c),m=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&cn(h.ref,null,d),c.push(d.ref,d.__c||m,d)),_==null&&m!=null&&(_=m),(p=!!(4&d.__u))||h.__k===d.__k?u=zi(d,u,t,p):typeof d.type=="function"&&g!==void 0?u=g:m&&(u=m.nextSibling),d.__u&=-7);return n.__e=_,u}function Wa(t,e,n,i,s){var r,o,a,u,l,c=n.length,f=c,h=0;for(t.__k=new Array(s),r=0;r<s;r++)(o=e[r])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=t.__k[r]=ee(null,o,null,null,null):te(o)?o=t.__k[r]=ee(rt,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=t.__k[r]=ee(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):t.__k[r]=o,u=r+h,o.__=t,o.__b=t.__b+1,a=null,(l=o.__i=Ha(o,n,u,f))!=-1&&(f--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(s>c?h--:s<c&&h++),typeof o.type!="function"&&(o.__u|=4)):l!=u&&(l==u-1?h--:l==u+1?h++:(l>u?h--:h++,o.__u|=4))):t.__k[r]=null;if(f)for(r=0;r<c;r++)(a=n[r])!=null&&(2&a.__u)==0&&(a.__e==i&&(i=It(a)),Zi(a,a));return i}function zi(t,e,n,i){var s,r;if(typeof t.type=="function"){for(s=t.__k,r=0;s&&r<s.length;r++)s[r]&&(s[r].__=t,e=zi(s[r],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=It(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function pt(t,e){return e=e||[],t==null||typeof t=="boolean"||(te(t)?t.some(function(n){pt(n,e)}):e.push(t)),e}function Ha(t,e,n,i){var s,r,o,a=t.key,u=t.type,l=e[n],c=l!=null&&(2&l.__u)==0;if(l===null&&a==null||c&&a==l.key&&u==l.type)return n;if(i>(c?1:0)){for(s=n-1,r=n+1;s>=0||r<e.length;)if((l=e[o=s>=0?s--:r++])!=null&&(2&l.__u)==0&&a==l.key&&u==l.type)return o}return-1}function Gi(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Na.test(e)?n:n+"px"}function we(t,e,n,i,s){var r,o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||Gi(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||Gi(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(Ui,"$1")),o=e.toLowerCase(),e=o in t||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=en,t.addEventListener(e,r?sn:nn,r)):t.removeEventListener(e,r?sn:nn,r);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Xi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=en++;else if(e.t<n.u)return;return n(M.event?M.event(e):e)}}}function an(t,e,n,i,s,r,o,a,u,l){var c,f,h,d,m,_,g,p,y,v,w,C,V,D,S,A=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),r=[a=e.__e=n.__e]),(c=M.__b)&&c(e);t:if(typeof A=="function")try{if(p=e.props,y=A.prototype&&A.prototype.render,v=(c=A.contextType)&&i[c.__c],w=c?v?v.props.value:c.__:i,n.__c?g=(f=e.__c=n.__c).__=f.__E:(y?e.__c=f=new A(p,w):(e.__c=f=new at(p,w),f.constructor=A,f.render=za),v&&v.sub(f),f.state||(f.state={}),f.__n=i,h=f.__d=!0,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&A.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ft({},f.__s)),ft(f.__s,A.getDerivedStateFromProps(p,f.__s))),d=f.props,m=f.state,f.__v=e,h)y&&A.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&A.getDerivedStateFromProps==null&&p!==d&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(p,w),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(p,f.__s,w)===!1){e.__v!=n.__v&&(f.props=p,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(P){P&&(P.__=e)}),xe.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(p,f.__s,w),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(d,m,_)})}if(f.context=w,f.props=p,f.__P=t,f.__e=!1,C=M.__r,V=0,y)f.state=f.__s,f.__d=!1,C&&C(e),c=f.render(f.props,f.state,f.context),xe.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,C&&C(e),c=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++V<25);f.state=f.__s,f.getChildContext!=null&&(i=ft(ft({},i),f.getChildContext())),y&&!h&&f.getSnapshotBeforeUpdate!=null&&(_=f.getSnapshotBeforeUpdate(d,m)),D=c!=null&&c.type===rt&&c.key==null?qi(c.props.children):c,a=Ki(t,te(D)?D:[D],e,n,i,s,r,o,a,u,l),f.base=e.__e,e.__u&=-161,f.__h.length&&o.push(f),g&&(f.__E=f.__=null)}catch(P){if(e.__v=null,u||r!=null)if(P.then){for(e.__u|=u?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;r[r.indexOf(a)]=null,e.__e=a}else{for(S=r.length;S--;)on(r[S]);ln(e)}else e.__e=n.__e,e.__k=n.__k,P.then||ln(e);M.__e(P,e,n)}else r==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Ka(n.__e,e,n,i,s,r,o,u,l);return(c=M.diffed)&&c(e),128&e.__u?void 0:a}function ln(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(ln))}function Yi(t,e,n){for(var i=0;i<n.length;i++)cn(n[i],n[++i],n[++i]);M.__c&&M.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(r){r.call(s)})}catch(r){M.__e(r,s.__v)}})}function qi(t){return typeof t!="object"||t==null||t.__b>0?t:te(t)?t.map(qi):ft({},t)}function Ka(t,e,n,i,s,r,o,a,u){var l,c,f,h,d,m,_,g=n.props||ve,p=e.props,y=e.type;if(y=="svg"?s="http://www.w3.org/2000/svg":y=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),r!=null){for(l=0;l<r.length;l++)if((d=r[l])&&"setAttribute"in d==!!y&&(y?d.localName==y:d.nodeType==3)){t=d,r[l]=null;break}}if(t==null){if(y==null)return document.createTextNode(p);t=document.createElementNS(s,y,p.is&&p),a&&(M.__m&&M.__m(e,r),a=!1),r=null}if(y==null)g===p||a&&t.data==p||(t.data=p);else{if(r=r&&Qt.call(t.childNodes),!a&&r!=null)for(g={},l=0;l<t.attributes.length;l++)g[(d=t.attributes[l]).name]=d.value;for(l in g)d=g[l],l=="dangerouslySetInnerHTML"?f=d:l=="children"||l in p||l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p||we(t,l,null,d,s);for(l in p)d=p[l],l=="children"?h=d:l=="dangerouslySetInnerHTML"?c=d:l=="value"?m=d:l=="checked"?_=d:a&&typeof d!="function"||g[l]===d||we(t,l,d,g[l],s);if(c)a||f&&(c.__html==f.__html||c.__html==t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(f&&(t.innerHTML=""),Ki(e.type=="template"?t.content:t,te(h)?h:[h],e,n,i,y=="foreignObject"?"http://www.w3.org/1999/xhtml":s,r,o,r?r[0]:n.__k&&It(n,0),a,u),r!=null)for(l=r.length;l--;)on(r[l]);a||(l="value",y=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||y=="progress"&&!m||y=="option"&&m!=g[l])&&we(t,l,m,g[l],s),l="checked",_!=null&&_!=t[l]&&we(t,l,_,g[l],s))}return t}function cn(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(s){M.__e(s,n)}}function Zi(t,e,n){var i,s;if(M.unmount&&M.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||cn(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(r){M.__e(r,e)}i.base=i.__P=null}if(i=t.__k)for(s=0;s<i.length;s++)i[s]&&Zi(i[s],e,n||typeof t.type!="function");n||on(t.__e),t.__c=t.__=t.__e=void 0}function za(t,e,n){return this.constructor(t,n)}function Ji(t,e,n){var i,s,r,o;e==document&&(e=document.documentElement),M.__&&M.__(t,e),s=(i=!1)?null:e.__k,r=[],o=[],an(e,t=e.__k=et(rt,null,[t]),s||ve,ve,e.namespaceURI,s?null:e.firstChild?Qt.call(e.childNodes):null,r,s?s.__e:e.firstChild,i,o),Yi(r,t,o)}function Ga(t,e,n){var i,s,r,o,a=ft({},t.props);for(r in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)r=="key"?i=e[r]:r=="ref"?s=e[r]:a[r]=e[r]===void 0&&o!=null?o[r]:e[r];return arguments.length>2&&(a.children=arguments.length>3?Qt.call(arguments,2):n),ee(t.type,a,i||t.key,s||t.ref,null)}function Ft(t){function e(n){var i,s;return this.getChildContext||(i=new Set,(s={})[e.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(r){this.props.value!=r.value&&i.forEach(function(o){o.__e=!0,rn(o)})},this.sub=function(r){i.add(r);var o=r.componentWillUnmount;r.componentWillUnmount=function(){i&&i.delete(r),o&&o.call(r)}}),n.children}return e.__c="__cC"+Wi++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,i){return n.children(i)}).contextType=e,e}Qt=xe.slice,M={__e:function(t,e,n,i){for(var s,r,o;e=e.__;)if((s=e.__c)&&!s.__)try{if((r=s.constructor)&&r.getDerivedStateFromError!=null&&(s.setState(r.getDerivedStateFromError(t)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,i||{}),o=s.__d),o)return s.__E=s}catch(a){t=a}throw t}},Oi=0,at.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ft({},this.state),typeof t=="function"&&(t=t(ft({},n),this.props)),t&&ft(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),rn(this))},at.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),rn(this))},at.prototype.render=rt,yt=[],Ni=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,$i=function(t,e){return t.__v.__b-e.__v.__b},be.__r=0,Ui=/(PointerCapture)$|Capture$/i,en=0,nn=Xi(!1),sn=Xi(!0),Wi=0;var Xa=0;function b(t,e,n,i,s,r){e||(e={});var o,a,u=e;if("ref"in u)for(a in u={},e)a=="ref"?o=e[a]:u[a]=e[a];var l={type:t,props:u,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Xa,__i:-1,__u:0,__source:s,__self:r};if(typeof t=="function"&&(o=t.defaultProps))for(a in o)u[a]===void 0&&(u[a]=o[a]);return M.vnode&&M.vnode(l),l}var _t,I,un,Qi,Bt=0,ts=[],N=M,es=N.__b,ns=N.__r,is=N.diffed,ss=N.__c,os=N.unmount,rs=N.__;function Ot(t,e){N.__h&&N.__h(I,t,Bt||e),Bt=0;var n=I.__H||(I.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function $(t){return Bt=1,Ya(ls,t)}function Ya(t,e,n){var i=Ot(_t++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):ls(void 0,e),function(a){var u=i.__N?i.__N[0]:i.__[0],l=i.t(u,a);u!==l&&(i.__N=[l,i.__[1]],i.__c.setState({}))}],i.__c=I,!I.__f)){var s=function(a,u,l){if(!i.__c.__H)return!0;var c=i.__c.__H.__.filter(function(h){return h.__c});if(c.every(function(h){return!h.__N}))return!r||r.call(this,a,u,l);var f=i.__c.props!==a;return c.some(function(h){if(h.__N){var d=h.__[0];h.__=h.__N,h.__N=void 0,d!==h.__[0]&&(f=!0)}}),r&&r.call(this,a,u,l)||f};I.__f=!0;var r=I.shouldComponentUpdate,o=I.componentWillUpdate;I.componentWillUpdate=function(a,u,l){if(this.__e){var c=r;r=void 0,s(a,u,l),r=c}o&&o.call(this,a,u,l)},I.shouldComponentUpdate=s}return i.__N||i.__}function q(t,e){var n=Ot(_t++,3);!N.__s&&mn(n.__H,e)&&(n.__=t,n.u=e,I.__H.__h.push(n))}function fn(t,e){var n=Ot(_t++,4);!N.__s&&mn(n.__H,e)&&(n.__=t,n.u=e,I.__h.push(n))}function F(t){return Bt=5,gt(function(){return{current:t}},[])}function qa(t,e,n){Bt=6,fn(function(){if(typeof t=="function"){var i=t(e());return function(){t(null),i&&typeof i=="function"&&i()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function gt(t,e){var n=Ot(_t++,7);return mn(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function jt(t,e){return Bt=8,gt(function(){return t},e)}function H(t){var e=I.context[t.__c],n=Ot(_t++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(I)),e.props.value):t.__}function hn(){var t=Ot(_t++,11);if(!t.__){for(var e=I.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Za(){for(var t;t=ts.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Te),e.__h.some(dn),e.__h=[]}catch(n){e.__h=[],N.__e(n,t.__v)}}}N.__b=function(t){I=null,es&&es(t)},N.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),rs&&rs(t,e)},N.__r=function(t){ns&&ns(t),_t=0;var e=(I=t.__c).__H;e&&(un===I?(e.__h=[],I.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Te),e.__h.some(dn),e.__h=[],_t=0)),un=I},N.diffed=function(t){is&&is(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(ts.push(e)!==1&&Qi===N.requestAnimationFrame||((Qi=N.requestAnimationFrame)||Ja)(Za)),e.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),un=I=null},N.__c=function(t,e){e.some(function(n){try{n.__h.some(Te),n.__h=n.__h.filter(function(i){return!i.__||dn(i)})}catch(i){e.some(function(s){s.__h&&(s.__h=[])}),e=[],N.__e(i,n.__v)}}),ss&&ss(t,e)},N.unmount=function(t){os&&os(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(i){try{Te(i)}catch(s){e=s}}),n.__H=void 0,e&&N.__e(e,n.__v))};var as=typeof requestAnimationFrame=="function";function Ja(t){var e,n=function(){clearTimeout(i),as&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);as&&(e=requestAnimationFrame(n))}function Te(t){var e=I,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),I=e}function dn(t){var e=I;t.__c=t.__(),I=e}function mn(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function ls(t,e){return typeof e=="function"?e(t):e}function cs(t,e){for(var n in e)t[n]=e[n];return t}function us(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var i in e)if(i!=="__source"&&t[i]!==e[i])return!0;return!1}var pn=fn;function fs(t,e){this.props=t,this.context=e}(fs.prototype=new at).isPureReactComponent=!0,fs.prototype.shouldComponentUpdate=function(t,e){return us(this.props,t)||us(this.state,e)};var hs=M.__b;M.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),hs&&hs(t)};var Qa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function gn(t){function e(n){var i=cs({},n);return delete i.ref,t(i,n.ref||null)}return e.$$typeof=Qa,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var ds=function(t,e){return t==null?null:pt(pt(t).map(e))},tl={map:ds,forEach:ds,count:function(t){return t?pt(t).length:0},only:function(t){var e=pt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:pt},el=M.__e;M.__e=function(t,e,n,i){if(t.then){for(var s,r=e;r=r.__;)if((s=r.__c)&&s.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),s.__c(t,e)}el(t,e,n,i)};var ms=M.unmount;function ps(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),t.__c.__H=null),(t=cs({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(i){return ps(i,e,n)})),t}function gs(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(i){return gs(i,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function yn(){this.__u=0,this.o=null,this.__b=null}function ys(t){var e=t.__&&t.__.__c;return e&&e.__a&&e.__a(t)}function Ce(){this.i=null,this.l=null}M.unmount=function(t){var e=t.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ms&&ms(t)},(yn.prototype=new at).__c=function(t,e){var n=e.__c,i=this;i.o==null&&(i.o=[]),i.o.push(n);var s=ys(i.__v),r=!1,o=function(){r||i.__z||(r=!0,n.__R=null,s?s(u):u())};n.__R=o;var a=n.__P;n.__P=null;var u=function(){if(!--i.__u){if(i.state.__a){var l=i.state.__a;i.__v.__k[0]=gs(l,l.__c.__P,l.__c.__O)}var c;for(i.setState({__a:i.__b=null});c=i.o.pop();)c.__P=a,c.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(o,o)},yn.prototype.componentWillUnmount=function(){this.o=[]},yn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=ps(this.__b,n,i.__O=i.__P)}this.__b=null}var s=e.__a&&et(rt,null,t.fallback);return s&&(s.__u&=-33),[et(rt,null,e.__a?null:t.children),s]};var _s=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};(Ce.prototype=new at).__a=function(t){var e=this,n=ys(e.__v),i=e.l.get(t);return i[0]++,function(s){var r=function(){e.props.revealOrder?(i.push(s),_s(e,t,i)):s()};n?n(r):r()}},Ce.prototype.render=function(t){this.i=null,this.l=new Map;var e=pt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Ce.prototype.componentDidUpdate=Ce.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){_s(t,n,e)})};var vs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,nl=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,il=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,sl=/[A-Z0-9]/g,ol=typeof document<"u",rl=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};at.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(at.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var xs=M.event;M.event=function(t){return xs&&(t=xs(t)),t.persist=function(){},t.isPropagationStopped=function(){return this.cancelBubble},t.isDefaultPrevented=function(){return this.defaultPrevented},t.nativeEvent=t};var al={configurable:!0,get:function(){return this.class}},bs=M.vnode;M.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,i=e.type,s={},r=i.indexOf("-")==-1;for(var o in n){var a=n[o];if(!(o==="value"&&"defaultValue"in n&&a==null||ol&&o==="children"&&i==="noscript"||o==="class"||o==="className")){var u=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":u==="translate"&&a==="no"?a=!1:u[0]==="o"&&u[1]==="n"?u==="ondoubleclick"?o="ondblclick":u!=="onchange"||i!=="input"&&i!=="textarea"||rl(n.type)?u==="onfocus"?o="onfocusin":u==="onblur"?o="onfocusout":il.test(o)&&(o=u):u=o="oninput":r&&nl.test(o)?o=o.replace(sl,"-$&").toLowerCase():a===null&&(a=void 0),u==="oninput"&&s[o=u]&&(o="oninputCapture"),s[o]=a}}i=="select"&&(s.multiple&&Array.isArray(s.value)&&(s.value=pt(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),s.defaultValue!=null&&(s.value=pt(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value}))),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",al)):n.className&&(s.class=s.className=n.className),e.props=s})(t),t.$$typeof=vs,bs&&bs(t)};var ws=M.__r;M.__r=function(t){ws&&ws(t),t.__c};var Ts=M.diffed;M.diffed=function(t){Ts&&Ts(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value)};function Cs(t){return!!t&&t.$$typeof===vs}function ll(t){return Cs(t)?Ga.apply(null,arguments):t}const _n=Ft({});function ne(t){const e=F(null);return e.current===null&&(e.current=t()),e.current}const Ps=typeof window<"u"?fn:q,Pe=Ft(null);function vn(t,e){t.indexOf(e)===-1&&t.push(e)}function Se(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const ht=(t,e,n)=>n>e?e:n<t?t:n;let xn=()=>{};const vt={},Ss=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function As(t){return typeof t=="object"&&t!==null}const Es=t=>/^0[^.\s]+$/u.test(t);function Ms(t){let e;return()=>(e===void 0&&(e=t()),e)}const st=t=>t,cl=(t,e)=>n=>e(t(n)),ie=(...t)=>t.reduce(cl),se=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};class bn{constructor(){this.subscriptions=[]}add(e){return vn(this.subscriptions,e),()=>Se(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const nt=t=>t*1e3,ot=t=>t/1e3;function Vs(t,e){return e?t*(1e3/e):0}const ks=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ul=1e-7,fl=12;function hl(t,e,n,i,s){let r,o,a=0;do o=e+(n-e)/2,r=ks(o,i,s)-t,r>0?n=o:e=o;while(Math.abs(r)>ul&&++a<fl);return o}function oe(t,e,n,i){if(t===e&&n===i)return st;const s=r=>hl(r,0,1,t,n);return r=>r===0||r===1?r:ks(s(r),e,i)}const Ds=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Rs=t=>e=>1-t(1-e),Ls=oe(.33,1.53,.69,.99),wn=Rs(Ls),Is=Ds(wn),Fs=t=>t>=1?1:(t*=2)<1?.5*wn(t):.5*(2-Math.pow(2,-10*(t-1))),Tn=t=>1-Math.sin(Math.acos(t)),Bs=Rs(Tn),Os=Ds(Tn),dl=oe(.42,0,1,1),ml=oe(0,0,.58,1),js=oe(.42,0,.58,1),pl=t=>Array.isArray(t)&&typeof t[0]!="number",Ns=t=>Array.isArray(t)&&typeof t[0]=="number",gl={linear:st,easeIn:dl,easeInOut:js,easeOut:ml,circIn:Tn,circInOut:Os,circOut:Bs,backIn:wn,backInOut:Is,backOut:Ls,anticipate:Fs},yl=t=>typeof t=="string",$s=t=>{if(Ns(t)){xn(t.length===4);const[e,n,i,s]=t;return oe(e,n,i,s)}else if(yl(t))return gl[t];return t},Ae=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function _l(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function u(c){o.has(c)&&(l.schedule(c),t()),c(a)}const l={schedule:(c,f=!1,h=!1)=>{const m=h&&s?n:i;return f&&o.add(c),m.add(c),c},cancel:c=>{i.delete(c),o.delete(c)},process:c=>{if(a=c,s){r=!0;return}s=!0;const f=n;n=i,i=f,n.forEach(u),n.clear(),s=!1,r&&(r=!1,l.process(c))}};return l}const vl=40;function Us(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=Ae.reduce((v,w)=>(v[w]=_l(r),v),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:f,preRender:h,render:d,postRender:m}=o,_=()=>{const v=vt.useManualTiming,w=v?s.timestamp:performance.now();n=!1,v||(s.delta=i?1e3/60:Math.max(Math.min(w-s.timestamp,vl),1)),s.timestamp=w,s.isProcessing=!0,a.process(s),u.process(s),l.process(s),c.process(s),f.process(s),h.process(s),d.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(_))},g=()=>{n=!0,i=!0,s.isProcessing||t(_)};return{schedule:Ae.reduce((v,w)=>{const C=o[w];return v[w]=(V,D=!1,S=!1)=>(n||g(),C.schedule(V,D,S)),v},{}),cancel:v=>{for(let w=0;w<Ae.length;w++)o[Ae[w]].cancel(v)},state:s,steps:o}}const{schedule:L,cancel:xt,state:K,steps:Cn}=Us(typeof requestAnimationFrame<"u"?requestAnimationFrame:st,!0);let Ee;function xl(){Ee=void 0}const Z={now:()=>(Ee===void 0&&Z.set(K.isProcessing||vt.useManualTiming?K.timestamp:performance.now()),Ee),set:t=>{Ee=t,queueMicrotask(xl)}},Ws=t=>e=>typeof e=="string"&&e.startsWith(t),Hs=Ws("--"),bl=Ws("var(--"),Pn=t=>bl(t)?wl.test(t.split("/*")[0].trim()):!1,wl=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ks(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Nt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},re={...Nt,transform:t=>ht(0,1,t)},Me={...Nt,default:1},ae=t=>Math.round(t*1e5)/1e5,Sn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Tl(t){return t==null}const Cl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,An=(t,e)=>n=>!!(typeof n=="string"&&Cl.test(n)&&n.startsWith(t)||e&&!Tl(n)&&Object.prototype.hasOwnProperty.call(n,e)),zs=(t,e,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(Sn);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Pl=t=>ht(0,255,t),En={...Nt,transform:t=>Math.round(Pl(t))},Pt={test:An("rgb","red"),parse:zs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+En.transform(t)+", "+En.transform(e)+", "+En.transform(n)+", "+ae(re.transform(i))+")"};function Sl(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Mn={test:An("#"),parse:Sl,transform:Pt.transform},le=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),bt=le("deg"),dt=le("%"),T=le("px"),Al=le("vh"),El=le("vw"),Gs={...dt,parse:t=>dt.parse(t)/100,transform:t=>dt.transform(t*100)},$t={test:An("hsl","hue"),parse:zs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+dt.transform(ae(e))+", "+dt.transform(ae(n))+", "+ae(re.transform(i))+")"},U={test:t=>Pt.test(t)||Mn.test(t)||$t.test(t),parse:t=>Pt.test(t)?Pt.parse(t):$t.test(t)?$t.parse(t):Mn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Pt.transform(t):$t.transform(t),getAnimatableNone:t=>{const e=U.parse(t);return e.alpha=0,U.transform(e)}},Ml=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Vl(t){return isNaN(t)&&typeof t=="string"&&(t.match(Sn)?.length||0)+(t.match(Ml)?.length||0)>0}const Xs="number",Ys="color",kl="var",Dl="var(",qs="${}",Rl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Ut(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(Rl,u=>(U.test(u)?(i.color.push(r),s.push(Ys),n.push(U.parse(u))):u.startsWith(Dl)?(i.var.push(r),s.push(kl),n.push(u)):(i.number.push(r),s.push(Xs),n.push(parseFloat(u))),++r,qs)).split(qs);return{values:n,split:a,indexes:i,types:s}}function Ll(t){return Ut(t).values}function Zs({split:t,types:e}){const n=t.length;return i=>{let s="";for(let r=0;r<n;r++)if(s+=t[r],i[r]!==void 0){const o=e[r];o===Xs?s+=ae(i[r]):o===Ys?s+=U.transform(i[r]):s+=i[r]}return s}}function Il(t){return Zs(Ut(t))}const Fl=t=>typeof t=="number"?0:U.test(t)?U.getAnimatableNone(t):t,Bl=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Fl(t);function Ol(t){const e=Ut(t);return Zs(e)(e.values.map((i,s)=>Bl(i,e.split[s])))}const lt={test:Vl,parse:Ll,createTransformer:Il,getAnimatableNone:Ol};function Vn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function jl({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,r=0,o=0;if(!e)s=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;s=Vn(u,a,t+1/3),r=Vn(u,a,t),o=Vn(u,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function Ve(t,e){return n=>n>0?e:t}const B=(t,e,n)=>t+(e-t)*n,kn=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Nl=[Mn,Pt,$t],$l=t=>Nl.find(e=>e.test(t));function Js(t){const e=$l(t);if(!e)return!1;let n=e.parse(t);return e===$t&&(n=jl(n)),n}const Qs=(t,e)=>{const n=Js(t),i=Js(e);if(!n||!i)return Ve(t,e);const s={...n};return r=>(s.red=kn(n.red,i.red,r),s.green=kn(n.green,i.green,r),s.blue=kn(n.blue,i.blue,r),s.alpha=B(n.alpha,i.alpha,r),Pt.transform(s))},Dn=new Set(["none","hidden"]);function Ul(t,e){return Dn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Wl(t,e){return n=>B(t,e,n)}function Rn(t){return typeof t=="number"?Wl:typeof t=="string"?Pn(t)?Ve:U.test(t)?Qs:zl:Array.isArray(t)?to:typeof t=="object"?U.test(t)?Qs:Hl:Ve}function to(t,e){const n=[...t],i=n.length,s=t.map((r,o)=>Rn(r)(r,e[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function Hl(t,e){const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=Rn(t[s])(t[s],e[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function Kl(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}const zl=(t,e)=>{const n=lt.createTransformer(e),i=Ut(t),s=Ut(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Dn.has(t)&&!s.values.length||Dn.has(e)&&!i.values.length?Ul(t,e):ie(to(Kl(i,s),s.values),n):Ve(t,e)};function eo(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?B(t,e,n):Rn(t)(t,e)}const Gl=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>xt(e),now:()=>K.isProcessing?K.timestamp:Z.now()}},no=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let r=0;r<s;r++)i+=Math.round(t(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},ke=2e4;function Ln(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<ke;)e+=n,i=t.next(e);return e>=ke?1/0:e}function Xl(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Ln(i),ke);return{type:"keyframes",ease:r=>i.next(s*r).value/e,duration:ot(s)}}const j={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function In(t,e){return t*Math.sqrt(1-e*e)}const Yl=12;function ql(t,e,n){let i=n;for(let s=1;s<Yl;s++)i=i-t(i)/e(i);return i}const Fn=.001;function Zl({duration:t=j.duration,bounce:e=j.bounce,velocity:n=j.velocity,mass:i=j.mass}){let s,r,o=1-e;o=ht(j.minDamping,j.maxDamping,o),t=ht(j.minDuration,j.maxDuration,ot(t)),o<1?(s=l=>{const c=l*o,f=c*t,h=c-n,d=In(l,o),m=Math.exp(-f);return Fn-h/d*m},r=l=>{const f=l*o*t,h=f*n+n,d=Math.pow(o,2)*Math.pow(l,2)*t,m=Math.exp(-f),_=In(Math.pow(l,2),o);return(-s(l)+Fn>0?-1:1)*((h-d)*m)/_}):(s=l=>{const c=Math.exp(-l*t),f=(l-n)*t+1;return-Fn+c*f},r=l=>{const c=Math.exp(-l*t),f=(n-l)*(t*t);return c*f});const a=5/t,u=ql(s,r,a);if(t=nt(t),isNaN(u))return{stiffness:j.stiffness,damping:j.damping,duration:t};{const l=Math.pow(u,2)*i;return{stiffness:l,damping:o*2*Math.sqrt(i*l),duration:t}}}const Jl=["duration","bounce"],Ql=["stiffness","damping","mass"];function io(t,e){return e.some(n=>t[n]!==void 0)}function tc(t){let e={velocity:j.velocity,stiffness:j.stiffness,damping:j.damping,mass:j.mass,isResolvedFromDuration:!1,...t};if(!io(t,Ql)&&io(t,Jl))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*ht(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:j.mass,stiffness:s,damping:r}}else{const n=Zl({...t,velocity:0});e={...e,...n,mass:j.mass},e.isResolvedFromDuration=!0}return e}function De(t=j.visualDuration,e=j.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:l,mass:c,duration:f,velocity:h,isResolvedFromDuration:d}=tc({...n,velocity:-ot(n.velocity||0)}),m=h||0,_=l/(2*Math.sqrt(u*c)),g=o-r,p=ot(Math.sqrt(u/c)),y=Math.abs(g)<5;i||(i=y?j.restSpeed.granular:j.restSpeed.default),s||(s=y?j.restDelta.granular:j.restDelta.default);let v,w,C,V,D,S;if(_<1)C=In(p,_),V=(m+_*p*g)/C,v=P=>{const k=Math.exp(-_*p*P);return o-k*(V*Math.sin(C*P)+g*Math.cos(C*P))},D=_*p*V+g*C,S=_*p*g-V*C,w=P=>Math.exp(-_*p*P)*(D*Math.sin(C*P)+S*Math.cos(C*P));else if(_===1){v=k=>o-Math.exp(-p*k)*(g+(m+p*g)*k);const P=m+p*g;w=k=>Math.exp(-p*k)*(p*P*k-m)}else{const P=p*Math.sqrt(_*_-1);v=G=>{const X=Math.exp(-_*p*G),tt=Math.min(P*G,300);return o-X*((m+_*p*g)*Math.sinh(tt)+P*g*Math.cosh(tt))/P};const k=(m+_*p*g)/P,O=_*p*k-g*P,Y=_*p*g-k*P;w=G=>{const X=Math.exp(-_*p*G),tt=Math.min(P*G,300);return X*(O*Math.sinh(tt)+Y*Math.cosh(tt))}}const A={calculatedDuration:d&&f||null,velocity:P=>nt(w(P)),next:P=>{if(!d&&_<1){const O=Math.exp(-_*p*P),Y=Math.sin(C*P),G=Math.cos(C*P),X=o-O*(V*Y+g*G),tt=nt(O*(D*Y+S*G));return a.done=Math.abs(tt)<=i&&Math.abs(o-X)<=s,a.value=a.done?o:X,a}const k=v(P);if(d)a.done=P>=f;else{const O=nt(w(P));a.done=Math.abs(O)<=i&&Math.abs(o-k)<=s}return a.value=a.done?o:k,a},toString:()=>{const P=Math.min(Ln(A),ke),k=no(O=>A.next(P*O).value,P,30);return P+"ms "+k},toTransition:()=>{}};return A}De.applyToOptions=t=>{const e=Xl(t,100,De);return t.ease=e.ease,t.duration=nt(e.duration),t.type="keyframes",t};const ec=5;function so(t,e,n){const i=Math.max(e-ec,0);return Vs(n-t(i),e-i)}function Bn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const f=t[0],h={done:!1,value:f},d=S=>a!==void 0&&S<a||u!==void 0&&S>u,m=S=>a===void 0?u:u===void 0||Math.abs(a-S)<Math.abs(u-S)?a:u;let _=n*e;const g=f+_,p=o===void 0?g:o(g);p!==g&&(_=p-f);const y=S=>-_*Math.exp(-S/i),v=S=>p+y(S),w=S=>{const A=y(S),P=v(S);h.done=Math.abs(A)<=l,h.value=h.done?p:P};let C,V;const D=S=>{d(h.value)&&(C=S,V=De({keyframes:[h.value,m(h.value)],velocity:so(v,S,h.value),damping:s,stiffness:r,restDelta:l,restSpeed:c}))};return D(0),{calculatedDuration:null,next:S=>{let A=!1;return!V&&C===void 0&&(A=!0,w(S),D(S)),C!==void 0&&S>=C?V.next(S-C):(!A&&w(S),h)}}}function nc(t,e,n){const i=[],s=n||vt.mix||eo,r=t.length-1;for(let o=0;o<r;o++){let a=s(t[o],t[o+1]);if(e){const u=Array.isArray(e)?e[o]||st:e;a=ie(u,a)}i.push(a)}return i}function ic(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(xn(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=nc(e,i,s),u=a.length,l=c=>{if(o&&c<t[0])return e[0];let f=0;if(u>1)for(;f<t.length-2&&!(c<t[f+1]);f++);const h=se(t[f],t[f+1],c);return a[f](h)};return n?c=>l(ht(t[0],t[r-1],c)):l}function sc(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=se(0,e,i);t.push(B(n,1,s))}}function oc(t){const e=[0];return sc(e,t.length-1),e}function rc(t,e){return t.map(n=>n*e)}function ac(t,e){return t.map(()=>e||js).splice(0,t.length-1)}function ce({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=pl(i)?i.map($s):$s(i),r={done:!1,value:e[0]},o=rc(n&&n.length===e.length?n:oc(e),t),a=ic(o,e,{ease:Array.isArray(s)?s:ac(e,s)});return{calculatedDuration:t,next:u=>(r.value=a(u),r.done=u>=t,r)}}const lc=t=>t!==null;function On(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(lc),a=s<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const cc={decay:Bn,inertia:Bn,tween:ce,keyframes:ce,spring:De};function oo(t){typeof t.type=="string"&&(t.type=cc[t.type])}class jn{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const uc=t=>t/100;class Nn extends jn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==Z.now()&&this.tick(Z.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;oo(e);const{type:n=ce,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const u=n||ce;u!==ce&&typeof a[0]!="number"&&(this.mixKeyframes=ie(uc,eo(a[0],a[1])),a=[0,100]);const l=u({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=Ln(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return i.next(0);const{delay:l=0,keyframes:c,repeat:f,repeatType:h,repeatDelay:d,type:m,onUpdate:_,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,w=i;if(f){const S=Math.min(this.currentTime,s)/a;let A=Math.floor(S),P=S%1;!P&&S>=1&&(P=1),P===1&&A--,A=Math.min(A,f+1),A%2&&(h==="reverse"?(P=1-P,d&&(P-=d/a)):h==="mirror"&&(w=o)),v=ht(0,1,P)*a}const C=y?{done:!1,value:c[0]}:w.next(v);r&&!y&&(C.value=r(C.value));let{done:V}=C;!y&&u!==null&&(V=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&V);return D&&m!==Bn&&(C.value=On(c,this.options,g,this.speed)),_&&_(C.value),D&&this.finish(),C}then(e,n){return this.finished.then(e,n)}get duration(){return ot(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ot(e)}get time(){return ot(this.currentTime)}set time(e){e=nt(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return so(i=>this.generator.next(i).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(Z.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=ot(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Gl,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Z.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function fc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const St=t=>t*180/Math.PI,$n=t=>{const e=St(Math.atan2(t[1],t[0]));return Un(e)},hc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$n,rotateZ:$n,skewX:t=>St(Math.atan(t[1])),skewY:t=>St(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Un=t=>(t=t%360,t<0&&(t+=360),t),ro=$n,ao=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),lo=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),dc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ao,scaleY:lo,scale:t=>(ao(t)+lo(t))/2,rotateX:t=>Un(St(Math.atan2(t[6],t[5]))),rotateY:t=>Un(St(Math.atan2(-t[2],t[0]))),rotateZ:ro,rotate:ro,skewX:t=>St(Math.atan(t[4])),skewY:t=>St(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Wn(t){return t.includes("scale")?1:0}function Hn(t,e){if(!t||t==="none")return Wn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=dc,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=hc,s=a}if(!s)return Wn(e);const r=i[e],o=s[1].split(",").map(pc);return typeof r=="function"?r(o):o[r]}const mc=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Hn(n,e)};function pc(t){return parseFloat(t.trim())}const Wt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ht=new Set(Wt),co=t=>t===Nt||t===T,gc=new Set(["x","y","z"]),yc=Wt.filter(t=>!gc.has(t));function _c(t){const e=[];return yc.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const wt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Hn(e,"x"),y:(t,{transform:e})=>Hn(e,"y")};wt.translateX=wt.x,wt.translateY=wt.y;const At=new Set;let Kn=!1,zn=!1,Gn=!1;function uo(){if(zn){const t=Array.from(At).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const s=_c(i);s.length&&(n.set(i,s),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{i.getValue(r)?.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}zn=!1,Kn=!1,At.forEach(t=>t.complete(Gn)),At.clear()}function fo(){At.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(zn=!0)})}function vc(){Gn=!0,fo(),uo(),Gn=!1}class Xn{constructor(e,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(At.add(this),Kn||(Kn=!0,L.read(fo),L.resolveKeyframes(uo))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:s}=this;if(e[0]===null){const r=s?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&r===void 0&&s.set(e[0])}fc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),At.delete(this)}cancel(){this.state==="scheduled"&&(At.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const xc=t=>t.startsWith("--");function ho(t,e,n){xc(e)?t.style.setProperty(e,n):t.style[e]=n}const bc={};function mo(t,e){const n=Ms(t);return()=>bc[e]??n()}const wc=mo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),po=mo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ue=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,go={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ue([0,.65,.55,1]),circOut:ue([.55,0,1,.45]),backIn:ue([.31,.01,.66,-.59]),backOut:ue([.33,1.53,.69,.99])};function yo(t,e){if(t)return typeof t=="function"?po()?no(t,e):"ease-out":Ns(t)?ue(t):Array.isArray(t)?t.map(n=>yo(n,e)||go.easeOut):go[t]}function Tc(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const f=yo(a,s);Array.isArray(f)&&(c.easing=f);const h={delay:i,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),t.animate(c,h)}function _o(t){return typeof t=="function"&&"applyToOptions"in t}function Cc({type:t,...e}){return _o(t)&&po()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class vo extends jn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,xn(typeof e.type!="string");const l=Cc(e);this.animation=Tc(n,i,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=On(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),ho(n,i,c),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return ot(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ot(e)}get time(){return ot(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=nt(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&wc()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),st):s(this)}}const xo={anticipate:Fs,backInOut:Is,circInOut:Os};function Pc(t){return t in xo}function Sc(t){typeof t.ease=="string"&&Pc(t.ease)&&(t.ease=xo[t.ease])}const Yn=10;class Ac extends vo{constructor(e){Sc(e),oo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Nn({...o,autoplay:!1}),u=Math.max(Yn,Z.now()-this.startTime),l=ht(0,Yn,u-Yn),c=a.sample(u).value,{name:f}=this.options;r&&f&&ho(r,f,c),n.setWithVelocity(a.sample(Math.max(0,u-l)).value,c,l),a.stop()}}const bo=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(lt.test(t)||t==="0")&&!t.startsWith("url("));function Ec(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Mc(t,e,n,i){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=bo(s,e),a=bo(r,e);return!o||!a?!1:Ec(t)||(n==="spring"||_o(n))&&i}function qn(t){t.duration=0,t.type="keyframes"}const Vc=new Set(["opacity","clipPath","filter","transform"]),kc=Ms(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Dc(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:l}=e.owner.getProps();return kc()&&n&&Vc.has(n)&&(n!=="transform"||!l)&&!u&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Rc=40;class Lc extends jn{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:u,motionValue:l,element:c,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Z.now();const h={autoplay:e,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:u,motionValue:l,element:c,...f},d=c?.KeyframeResolver||Xn;this.keyframeResolver=new d(a,(m,_,g)=>this.onKeyframesResolved(m,_,h,!g),u,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:u,isHandoff:l,onUpdate:c}=i;this.resolvedAt=Z.now();let f=!0;Mc(e,r,o,a)||(f=!1,(vt.instantAnimations||!u)&&c?.(On(e,i,n)),e[0]=e[e.length-1],qn(i),i.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Rc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=f&&!l&&Dc(d),_=d.motionValue?.owner?.current,g=m?new Ac({...d,element:_}):new Nn(d);g.finished.then(()=>{this.notifyFinished()}).catch(st),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),vc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function wo(t,e,n,i=0,s=1){const r=Array.from(t).sort((l,c)=>l.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const Ic=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fc(t){const e=Ic.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function To(t,e,n=1){const[i,s]=Fc(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const o=r.trim();return Ss(o)?parseFloat(o):o}return Pn(s)?To(s,e,n+1):s}const Bc={type:"spring",stiffness:500,damping:25,restSpeed:10},Oc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),jc={type:"keyframes",duration:.8},Nc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},$c=(t,{keyframes:e})=>e.length>2?jc:Ht.has(t)?t.startsWith("scale")?Oc(e[1]):Bc:Nc,Uc=t=>t!==null;function Wc(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Uc),r=e&&n!=="loop"&&e%2===1?0:s.length-1;return s[r]}function Co(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Zn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Co(n,t):n}function Hc({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:u,elapsed:l,...c}){return!!Object.keys(c).length}const Jn=(t,e,n,i={},s,r)=>o=>{const a=Zn(i,t)||{},u=a.delay||i.delay||0;let{elapsed:l=0}=i;l=l-nt(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};Hc(a)||Object.assign(c,$c(t,c)),c.duration&&(c.duration=nt(c.duration)),c.repeatDelay&&(c.repeatDelay=nt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let f=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(qn(c),c.delay===0&&(f=!0)),(vt.instantAnimations||vt.skipAnimations||s?.shouldSkipAnimations)&&(f=!0,qn(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,f&&!r&&e.get()!==void 0){const h=Wc(c.keyframes,a);if(h!==void 0){L.update(()=>{c.onUpdate(h),c.onComplete()});return}}return a.isSync?new Nn(c):new Lc(c)};function Po(t){const e=[{},{}];return t?.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function Qn(t,e,n,i){if(typeof e=="function"){const[s,r]=Po(i);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=Po(i);e=e(n!==void 0?n:t.custom,s,r)}return e}function Et(t,e,n){const i=t.getProps();return Qn(i,e,n!==void 0?n:i.custom,t)}const So=new Set(["width","height","top","left","right","bottom",...Wt]),Ao=30,Kc=t=>!isNaN(parseFloat(t));class zc{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=Z.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=Z.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Kc(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new bn);const i=this.events[e].add(n);return e==="change"?()=>{i(),L.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=Z.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Ao)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ao);return Vs(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Mt(t,e){return new zc(t,e)}const ti=t=>Array.isArray(t);function Gc(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Mt(n))}function Xc(t){return ti(t)?t[t.length-1]||0:t}function Yc(t,e){const n=Et(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=Xc(r[o]);Gc(t,o,a)}}const z=t=>!!(t&&t.getVelocity);function qc(t){return!!(z(t)&&t.add)}function ei(t,e){const n=t.getValue("willChange");if(qc(n))return n.add(e);if(!n&&vt.WillChange){const i=new vt.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function ni(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Eo="data-"+ni("framerAppearId");function Mo(t){return t.props[Eo]}function Zc({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Vo(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?Co(r,u):u;const l=r?.reduceMotion;i&&(r=i);const c=[],f=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const d=t.getValue(h,t.latestValues[h]??null),m=a[h];if(m===void 0||f&&Zc(f,h))continue;const _={delay:n,...Zn(r||{},h)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===g&&!_.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const w=Mo(t);if(w){const C=window.MotionHandoffAnimation(w,h,L);C!==null&&(_.startTime=C,p=!0)}}ei(t,h);const y=l??t.shouldReduceMotion;d.start(Jn(h,d,m,y&&So.has(h)?{type:!1}:_,t,p));const v=d.animation;v&&c.push(v)}if(o){const h=()=>L.update(()=>{o&&Yc(t,o)});c.length?Promise.all(c).then(h):h()}return c}function ii(t,e,n={}){const i=Et(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Vo(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:c,staggerDirection:f}=s;return Jc(t,e,u,l,c,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[u,l]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function Jc(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(ii(u,e,{...o,delay:n+(typeof i=="function"?0:i)+wo(t.variantChildren,u,i,s,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function Qc(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(r=>ii(t,r,n));i=Promise.all(s)}else if(typeof e=="string")i=ii(t,e,n);else{const s=typeof e=="function"?Et(t,e,n.custom):e;i=Promise.all(Vo(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const tu={test:t=>t==="auto",parse:t=>t},ko=t=>e=>e.test(t),Do=[Nt,T,dt,bt,El,Al,tu],Ro=t=>Do.find(ko(t));function eu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Es(t):!0}const nu=new Set(["brightness","contrast","saturate","opacity"]);function iu(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(Sn)||[];if(!i)return t;const s=n.replace(i,"");let r=nu.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const su=/\b([a-z-]*)\(.*?\)/gu,si={...lt,getAnimatableNone:t=>{const e=t.match(su);return e?e.map(iu).join(" "):t}},oi={...lt,getAnimatableNone:t=>{const e=lt.parse(t);return lt.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},Lo={...Nt,transform:Math.round},ri={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...{rotate:bt,rotateX:bt,rotateY:bt,rotateZ:bt,scale:Me,scaleX:Me,scaleY:Me,scaleZ:Me,skew:bt,skewX:bt,skewY:bt,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:re,originX:Gs,originY:Gs,originZ:T},zIndex:Lo,fillOpacity:re,strokeOpacity:re,numOctaves:Lo},ou={...ri,color:U,backgroundColor:U,outlineColor:U,fill:U,stroke:U,borderColor:U,borderTopColor:U,borderRightColor:U,borderBottomColor:U,borderLeftColor:U,filter:si,WebkitFilter:si,mask:oi,WebkitMask:oi},Io=t=>ou[t],ru=new Set([si,oi]);function Fo(t,e){let n=Io(t);return ru.has(n)||(n=lt),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const au=new Set(["auto","none","0"]);function lu(t,e,n){let i=0,s;for(;i<t.length&&!s;){const r=t[i];typeof r=="string"&&!au.has(r)&&Ut(r).values.length&&(s=t[i]),i++}if(s&&n)for(const r of e)t[r]=Fo(n,s)}class cu extends Xn{constructor(e,n,i,s,r){super(e,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let f=e[c];if(typeof f=="string"&&(f=f.trim(),Pn(f))){const h=To(f,n.current);h!==void 0&&(e[c]=h),c===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!So.has(i)||e.length!==2)return;const[s,r]=e,o=Ro(s),a=Ro(r),u=Ks(s),l=Ks(r);if(u!==l&&wt[i]){this.needsMeasurement=!0;return}if(o!==a)if(co(o)&&co(a))for(let c=0;c<e.length;c++){const f=e[c];typeof f=="string"&&(e[c]=parseFloat(f))}else wt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||eu(e[s]))&&i.push(s);i.length&&lu(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=wt[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=wt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u)}),this.resolveNoneKeyframes()}}const uu=new Set(["opacity","clipPath","filter","transform"]);function Bo(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}const Oo=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Re(t){return As(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:ai}=Us(queueMicrotask,!1),ct={x:!1,y:!1};function jo(){return ct.x||ct.y}function fu(t){return t==="x"||t==="y"?ct[t]?null:(ct[t]=!0,()=>{ct[t]=!1}):ct.x||ct.y?null:(ct.x=ct.y=!0,()=>{ct.x=ct.y=!1})}function No(t,e){const n=Bo(t),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[n,s,()=>i.abort()]}function hu(t){return!(t.pointerType==="touch"||jo())}function du(t,e,n={}){const[i,s,r]=No(t,n);return i.forEach(o=>{let a=!1,u=!1,l;const c=()=>{o.removeEventListener("pointerleave",m)},f=g=>{l&&(l(g),l=void 0),c()},h=g=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),u&&(u=!1,f(g))},d=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},m=g=>{if(g.pointerType!=="touch"){if(a){u=!0;return}f(g)}},_=g=>{if(!hu(g))return;u=!1;const p=e(o,g);typeof p=="function"&&(l=p,o.addEventListener("pointerleave",m,s))};o.addEventListener("pointerenter",_,s),o.addEventListener("pointerdown",d,s)}),r}const $o=(t,e)=>e?t===e?!0:$o(t,e.parentElement):!1,li=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,mu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function pu(t){return mu.has(t.tagName)||t.isContentEditable===!0}const gu=new Set(["INPUT","SELECT","TEXTAREA"]);function yu(t){return gu.has(t.tagName)||t.isContentEditable===!0}const Le=new WeakSet;function Uo(t){return e=>{e.key==="Enter"&&t(e)}}function ci(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const _u=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=Uo(()=>{if(Le.has(n))return;ci(n,"down");const s=Uo(()=>{ci(n,"up")}),r=()=>ci(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function Wo(t){return li(t)&&!jo()}const Ho=new WeakSet;function vu(t,e,n={}){const[i,s,r]=No(t,n),o=a=>{const u=a.currentTarget;if(!Wo(a)||Ho.has(a))return;Le.add(u),n.stopPropagation&&Ho.add(a);const l=e(u,a),c=(d,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Le.has(u)&&Le.delete(u),Wo(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{c(d,u===window||u===document||n.useGlobalTarget||$o(u,d.target))},h=d=>{c(d,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Re(a)&&(a.addEventListener("focus",l=>_u(l,s)),!pu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function ui(t){return As(t)&&"ownerSVGElement"in t}const Ie=new WeakMap;let Fe;const Ko=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:ui(i)&&"getBBox"in i?i.getBBox()[e]:i[n],xu=Ko("inline","width","offsetWidth"),bu=Ko("block","height","offsetHeight");function wu({target:t,borderBoxSize:e}){Ie.get(t)?.forEach(n=>{n(t,{get width(){return xu(t,e)},get height(){return bu(t,e)}})})}function Tu(t){t.forEach(wu)}function Cu(){typeof ResizeObserver>"u"||(Fe=new ResizeObserver(Tu))}function Pu(t,e){Fe||Cu();const n=Bo(t);return n.forEach(i=>{let s=Ie.get(i);s||(s=new Set,Ie.set(i,s)),s.add(e),Fe?.observe(i)}),()=>{n.forEach(i=>{const s=Ie.get(i);s?.delete(e),s?.size||Fe?.unobserve(i)})}}const Be=new Set;let Kt;function Su(){Kt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};Be.forEach(e=>e(t))},window.addEventListener("resize",Kt)}function Au(t){return Be.add(t),Kt||Su(),()=>{Be.delete(t),!Be.size&&typeof Kt=="function"&&(window.removeEventListener("resize",Kt),Kt=void 0)}}function zo(t,e){return typeof t=="function"?Au(t):Pu(t,e)}function Eu(t){return ui(t)&&t.tagName==="svg"}const Mu=[...Do,U,lt],Vu=t=>Mu.find(ko(t)),Go=()=>({translate:0,scale:1,origin:0,originPoint:0}),zt=()=>({x:Go(),y:Go()}),Xo=()=>({min:0,max:0}),W=()=>({x:Xo(),y:Xo()}),ku=new WeakMap;function Oe(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function fe(t){return typeof t=="string"||Array.isArray(t)}const fi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hi=["initial",...fi];function je(t){return Oe(t.animate)||hi.some(e=>fe(t[e]))}function Yo(t){return!!(je(t)||t.variants)}function Du(t,e,n){for(const i in e){const s=e[i],r=n[i];if(z(s))t.addValue(i,s);else if(z(r))t.addValue(i,Mt(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,Mt(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const di={current:null},qo={current:!1},Ru=typeof window<"u";function Lu(){if(qo.current=!0,!!Ru)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>di.current=t.matches;t.addEventListener("change",e),e()}else di.current=!1}const Zo=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ne={};function Jo(t){Ne=t}function Iu(){return Ne}class Fu{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Xn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=Z.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,L.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=je(n),this.isVariantNode=Yo(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const m=h[d];l[d]!==void 0&&z(m)&&m.set(l[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,ku.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(qo.current||Lu(),this.shouldReduceMotion=di.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),xt(this.notifyUpdate),xt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&uu.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:l,duration:c}=n.accelerate,f=new vo({element:this.current,name:e,keyframes:a,times:u,ease:l,duration:nt(c)}),h=o(f);this.valueSubscriptions.set(e,()=>{h(),f.cancel()});return}const i=Ht.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&L.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ne){const n=Ne[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):W()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<Zo.length;i++){const s=Zo[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=e[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=Du(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Mt(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Ss(i)||Es(i))?i=parseFloat(i):!Vu(i)&&lt.test(n)&&(i=Fo(e,n)),this.setBaseTarget(e,z(i)?i.get():i)),z(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const r=Qn(this.props,n,this.presenceContext?.custom);r&&(i=r[e])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!z(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new bn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ai.render(this.render)}}class Qo extends Fu{constructor(){super(...arguments),this.KeyframeResolver=cu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;z(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Tt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function tr({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Bu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Ou(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function mi(t){return t===void 0||t===1}function pi({scale:t,scaleX:e,scaleY:n}){return!mi(t)||!mi(e)||!mi(n)}function Vt(t){return pi(t)||er(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function er(t){return nr(t.x)||nr(t.y)}function nr(t){return t&&t!=="0%"}function $e(t,e,n){const i=t-n,s=e*i;return n+s}function ir(t,e,n,i,s){return s!==void 0&&(t=$e(t,s,i)),$e(t,n,i)+e}function gi(t,e=0,n=1,i,s){t.min=ir(t.min,e,n,i,s),t.max=ir(t.max,e,n,i,s)}function sr(t,{x:e,y:n}){gi(t.x,e.translate,e.scale,e.originPoint),gi(t.y,n.translate,n.scale,n.originPoint)}const or=.999999999999,rr=1.0000000000001;function ju(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Xt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,sr(t,o)),i&&Vt(r.latestValues)&&Xt(t,r.latestValues,r.layout?.layoutBox))}e.x<rr&&e.x>or&&(e.x=1),e.y<rr&&e.y>or&&(e.y=1)}function Gt(t,e){t.min=t.min+e,t.max=t.max+e}function ar(t,e,n,i,s=.5){const r=B(t.min,t.max,s);gi(t,e,n,r,i)}function lr(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Xt(t,e,n){const i=n??t;ar(t.x,lr(e.x,i.x),e.scaleX,e.scale,e.originX),ar(t.y,lr(e.y,i.y),e.scaleY,e.scale,e.originY)}function cr(t,e){return tr(Ou(t.getBoundingClientRect(),e))}function Nu(t,e,n){const i=cr(t,n),{scroll:s}=e;return s&&(Gt(i.x,s.offset.x),Gt(i.y,s.offset.y)),i}const $u={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Uu=Wt.length;function Wu(t,e,n){let i="",s=!0;for(let r=0;r<Uu;r++){const o=Wt[r],a=t[o];if(a===void 0)continue;let u=!0;if(typeof a=="number")u=a===(o.startsWith("scale")?1:0);else{const l=parseFloat(a);u=o.startsWith("scale")?l===1:l===0}if(!u||n){const l=Oo(a,ri[o]);if(!u){s=!1;const c=$u[o]||o;i+=`${c}(${l}) `}n&&(e[o]=l)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function yi(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const u in e){const l=e[u];if(Ht.has(u)){o=!0;continue}else if(Hs(u)){s[u]=l;continue}else{const c=Oo(l,ri[u]);u.startsWith("origin")?(a=!0,r[u]=c):i[u]=c}}if(e.transform||(o||n?i.transform=Wu(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:u="50%",originY:l="50%",originZ:c=0}=r;i.transformOrigin=`${u} ${l} ${c}`}}function ur(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];s?.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function fr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const he={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=fr(t,e.target.x),i=fr(t,e.target.y);return`${n}% ${i}%`}},Hu={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=lt.parse(t);if(s.length>5)return i;const r=lt.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=u;const l=B(a,u,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),r(s)}},_i={borderRadius:{...he,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomLeftRadius:he,borderBottomRightRadius:he,boxShadow:Hu};function hr(t,{layout:e,layoutId:n}){return Ht.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!_i[t]||t==="opacity")}function vi(t,e,n){const i=t.style,s=e?.style,r={};if(!i)return r;for(const o in i)(z(i[o])||s&&z(s[o])||hr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=i[o]);return r}function Ku(t){return window.getComputedStyle(t)}class zu extends Qo{constructor(){super(...arguments),this.type="html",this.renderInstance=ur}readValueFromInstance(e,n){if(Ht.has(n))return this.projection?.isProjecting?Wn(n):mc(e,n);{const i=Ku(e),s=(Hs(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return cr(e,n)}build(e,n,i){yi(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return vi(e,n,i)}}const Gu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Xu={offset:"strokeDashoffset",array:"strokeDasharray"};function Yu(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?Gu:Xu;t[r.offset]=`${-i}`,t[r.array]=`${e} ${n}`}const qu=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dr(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},u,l,c){if(yi(t,a,l),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h}=t;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=c?.transformBox??"fill-box",delete f.transformBox);for(const d of qu)f[d]!==void 0&&(h[d]=f[d],delete f[d]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),s!==void 0&&Yu(f,s,r,o,!1)}const mr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),pr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Zu(t,e,n,i){ur(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(mr.has(s)?s:ni(s),e.attrs[s])}function gr(t,e,n){const i=vi(t,e,n);for(const s in t)if(z(t[s])||z(e[s])){const r=Wt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=t[s]}return i}class Ju extends Qo{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=W}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ht.has(n)){const i=Io(n);return i&&i.default||0}return n=mr.has(n)?n:ni(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return gr(e,n,i)}build(e,n,i){dr(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){Zu(e,n,i,s)}mount(e){this.isSVGTag=pr(e.tagName),super.mount(e)}}const Qu=hi.length;function yr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?yr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Qu;n++){const i=hi[n],s=t.props[i];(fe(s)||s===!1)&&(e[i]=s)}return e}function _r(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const tf=[...fi].reverse(),ef=fi.length;function nf(t){return e=>Promise.all(e.map(({animation:n,options:i})=>Qc(t,n,i)))}function sf(t){let e=nf(t),n=vr(),i=!0,s=!1;const r=l=>(c,f)=>{const h=Et(t,f,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:d,transitionEnd:m,..._}=h;c={...c,..._,...m}}return c};function o(l){e=l(t)}function a(l){const{props:c}=t,f=yr(t.parent)||{},h=[],d=new Set;let m={},_=1/0;for(let p=0;p<ef;p++){const y=tf[p],v=n[y],w=c[y]!==void 0?c[y]:f[y],C=fe(w),V=y===l?v.isActive:null;V===!1&&(_=p);let D=w===f[y]&&w!==c[y]&&C;if(D&&(i||s)&&t.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...m},!v.isActive&&V===null||!w&&!v.prevProp||Oe(w)||typeof w=="boolean")continue;if(y==="exit"&&v.isActive&&V!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const S=of(v.prevProp,w);let A=S||y===l&&v.isActive&&!D&&C||p>_&&C,P=!1;const k=Array.isArray(w)?w:[w];let O=k.reduce(r(y),{});V===!1&&(O={});const{prevResolvedValues:Y={}}=v,G={...Y,...O},X=x=>{A=!0,d.has(x)&&(P=!0,d.delete(x)),v.needsAnimating[x]=!0;const E=t.getValue(x);E&&(E.liveStyle=!1)};for(const x in G){const E=O[x],R=Y[x];if(m.hasOwnProperty(x))continue;let it=!1;ti(E)&&ti(R)?it=!_r(E,R):it=E!==R,it?E!=null?X(x):d.add(x):E!==void 0&&d.has(x)?X(x):v.protectedKeys[x]=!0}v.prevProp=w,v.prevResolvedValues=O,v.isActive&&(m={...m,...O}),(i||s)&&t.blockInitialAnimation&&(A=!1);const tt=D&&S;A&&(!tt||P)&&h.push(...k.map(x=>{const E={type:y};if(typeof x=="string"&&(i||s)&&!tt&&t.manuallyAnimateOnMount&&t.parent){const{parent:R}=t,it=Et(R,x);if(R.enteringChildren&&it){const{delayChildren:Je}=it.transition||{};E.delay=wo(R.enteringChildren,t,Je)}}return{animation:x,options:E}}))}if(d.size){const p={};if(typeof c.initial!="boolean"){const y=Et(t,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(p.transition=y.transition)}d.forEach(y=>{const v=t.getBaseTarget(y),w=t.getValue(y);w&&(w.liveStyle=!0),p[y]=v??null}),h.push({animation:p})}let g=!!h.length;return i&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),i=!1,s=!1,g?e(h):Promise.resolve()}function u(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,c)),n[l].isActive=c;const f=a(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=vr(),s=!0}}}function of(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!_r(e,t):!1}function kt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vr(){return{animate:kt(!0),whileInView:kt(),whileHover:kt(),whileTap:kt(),whileDrag:kt(),whileFocus:kt(),exit:kt()}}function xi(t,e){t.min=e.min,t.max=e.max}function ut(t,e){xi(t.x,e.x),xi(t.y,e.y)}function xr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const br=1e-4,rf=1-br,af=1+br,wr=.01,lf=0-wr,cf=0+wr;function J(t){return t.max-t.min}function uf(t,e,n){return Math.abs(t-e)<=n}function Tr(t,e,n,i=.5){t.origin=i,t.originPoint=B(e.min,e.max,t.origin),t.scale=J(n)/J(e),t.translate=B(n.min,n.max,t.origin)-t.originPoint,(t.scale>=rf&&t.scale<=af||isNaN(t.scale))&&(t.scale=1),(t.translate>=lf&&t.translate<=cf||isNaN(t.translate))&&(t.translate=0)}function de(t,e,n,i){Tr(t.x,e.x,n.x,i?i.originX:void 0),Tr(t.y,e.y,n.y,i?i.originY:void 0)}function Cr(t,e,n){t.min=n.min+e.min,t.max=t.min+J(e)}function ff(t,e,n){Cr(t.x,e.x,n.x),Cr(t.y,e.y,n.y)}function Pr(t,e,n){t.min=e.min-n.min,t.max=t.min+J(e)}function Ue(t,e,n){Pr(t.x,e.x,n.x),Pr(t.y,e.y,n.y)}function Sr(t,e,n,i,s){return t-=e,t=$e(t,1/n,i),s!==void 0&&(t=$e(t,1/s,i)),t}function hf(t,e=0,n=1,i=.5,s,r=t,o=t){if(dt.test(e)&&(e=parseFloat(e),e=B(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=B(r.min,r.max,i);t===r&&(a-=e),t.min=Sr(t.min,e,n,a,s),t.max=Sr(t.max,e,n,a,s)}function Ar(t,e,[n,i,s],r,o){hf(t,e[n],e[i],e[s],e.scale,r,o)}const df=["x","scaleX","originX"],mf=["y","scaleY","originY"];function Er(t,e,n,i){Ar(t.x,e,df,n?n.x:void 0,i?i.x:void 0),Ar(t.y,e,mf,n?n.y:void 0,i?i.y:void 0)}function Mr(t){return t.translate===0&&t.scale===1}function Vr(t){return Mr(t.x)&&Mr(t.y)}function kr(t,e){return t.min===e.min&&t.max===e.max}function pf(t,e){return kr(t.x,e.x)&&kr(t.y,e.y)}function Dr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Rr(t,e){return Dr(t.x,e.x)&&Dr(t.y,e.y)}function Lr(t){return J(t.x)/J(t.y)}function Ir(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function mt(t){return[t("x"),t("y")]}function gf(t,e,n){let i="";const s=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:c,rotateX:f,rotateY:h,skewX:d,skewY:m}=n;l&&(i=`perspective(${l}px) ${i}`),c&&(i+=`rotate(${c}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(i+=`scale(${a}, ${u})`),i||"none"}const Fr=["TopLeft","TopRight","BottomLeft","BottomRight"],yf=Fr.length,Br=t=>typeof t=="string"?parseFloat(t):t,Or=t=>typeof t=="number"||T.test(t);function _f(t,e,n,i,s,r){s?(t.opacity=B(0,n.opacity??1,vf(i)),t.opacityExit=B(e.opacity??1,0,xf(i))):r&&(t.opacity=B(e.opacity??1,n.opacity??1,i));for(let o=0;o<yf;o++){const a=`border${Fr[o]}Radius`;let u=jr(e,a),l=jr(n,a);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||Or(u)===Or(l)?(t[a]=Math.max(B(Br(u),Br(l),i),0),(dt.test(l)||dt.test(u))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=B(e.rotate||0,n.rotate||0,i))}function jr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const vf=Nr(0,.5,Bs),xf=Nr(.5,.95,st);function Nr(t,e,n){return i=>i<t?0:i>e?1:n(se(t,e,i))}function bf(t,e,n){const i=z(t)?t:Mt(t);return i.start(Jn("",i,e,n)),i.animation}function me(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const wf=(t,e)=>t.depth-e.depth;class Tf{constructor(){this.children=[],this.isDirty=!1}add(e){vn(this.children,e),this.isDirty=!0}remove(e){Se(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(wf),this.isDirty=!1,this.children.forEach(e)}}function Cf(t,e){const n=Z.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(xt(i),t(r-e))};return L.setup(i,!0),()=>xt(i)}function We(t){return z(t)?t.get():t}class Pf{constructor(){this.members=[]}add(e){vn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(Se(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(Se(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:r}=e.options;(s===void 0||s!==r)&&(e.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const He={hasAnimatedSinceResize:!0,hasEverUpdated:!1},bi=["","X","Y","Z"],Sf=1e3;let Af=0;function wi(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function $r(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Mo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(s||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&$r(i)}function Ur({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=e?.()){this.id=Af++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Vf),this.nodes.forEach(Lf),this.nodes.forEach(If),this.nodes.forEach(kf)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new Tf)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new bn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const u=this.eventHandlers.get(o);u&&u.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=ui(o)&&!Eu(o),this.instance=o;const{layoutId:a,layout:u,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let c,f=0;const h=()=>this.root.updateBlockedByResize=!1;L.read(()=>{f=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,c&&c(),c=Cf(h,250),He.hasAnimatedSinceResize&&(He.hasAnimatedSinceResize=!1,this.nodes.forEach(Kr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||l.getDefaultTransition()||Nf,{onLayoutAnimationStart:_,onLayoutAnimationComplete:g}=l.getProps(),p=!this.targetLayout||!Rr(this.targetLayout,d),y=!f&&h;if(this.options.layoutRoot||this.resumeFrom||y||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Zn(m,"layout"),onPlay:_,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,y)}else f||Kr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ff),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&$r(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const f=this.path[c];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Wr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Hr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Rf),this.nodes.forEach(Ef),this.nodes.forEach(Mf)):this.nodes.forEach(Hr),this.clearAllSnapshots();const a=Z.now();K.delta=ht(0,1e3/60,a-K.timestamp),K.timestamp=a,K.isProcessing=!0,Cn.update.process(K),Cn.preRender.process(K),Cn.render.process(K),K.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ai.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Df),this.sharedNodes.forEach(Bf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!J(this.snapshot.measuredBox.x)&&!J(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=W(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const u=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Vr(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||Vt(this.latestValues)||c)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return o&&(u=this.removeTransform(u)),$f(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return W();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Uf))){const{scroll:l}=this.root;l&&(Gt(a.x,l.offset.x),Gt(a.y,l.offset.y))}return a}removeElementScroll(o){const a=W();if(ut(a,o),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const l=this.path[u],{scroll:c,options:f}=l;l!==this.root&&c&&f.layoutScroll&&(c.wasRoot&&ut(a,o),Gt(a.x,c.offset.x),Gt(a.y,c.offset.y))}return a}applyTransform(o,a=!1){const u=W();ut(u,o);for(let l=0;l<this.path.length;l++){const c=this.path[l];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Xt(u,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Vt(c.latestValues)&&Xt(u,c.latestValues,c.layout?.layoutBox)}return Vt(this.latestValues)&&Xt(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(o){const a=W();ut(a,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!Vt(l.latestValues))continue;let c;l.instance&&(pi(l.latestValues)&&l.updateSnapshot(),c=W(),ut(c,l.measurePageBox())),Er(a,l.latestValues,l.snapshot?.layoutBox,c)}return Vt(this.latestValues)&&Er(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==K.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:f}=this.options;if(!this.layout||!(c||f))return;this.resolvedRelativeTargetAt=K.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=W(),this.targetWithTransforms=W()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ff(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ut(this.target,this.layout.layoutBox),sr(this.target,this.targetDelta)):ut(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||pi(this.parent.latestValues)||er(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,u){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=W(),this.relativeTargetOrigin=W(),Ue(this.relativeTargetOrigin,a,u),ut(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===K.timestamp&&(u=!1),u)return;const{layout:l,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||c))return;ut(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;ju(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=W());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xr(this.prevProjectionDelta.x,this.projectionDelta.x),xr(this.prevProjectionDelta.y,this.projectionDelta.y)),de(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Ir(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ir(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zt(),this.projectionDelta=zt(),this.projectionDeltaWithTransform=zt()}setAnimationOrigin(o,a=!1){const u=this.snapshot,l=u?u.latestValues:{},c={...this.latestValues},f=zt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=W(),d=u?u.source:void 0,m=this.layout?this.layout.source:void 0,_=d!==m,g=this.getStack(),p=!g||g.members.length<=1,y=!!(_&&!p&&this.options.crossfade===!0&&!this.path.some(jf));this.animationProgress=0;let v;this.mixTargetDelta=w=>{const C=w/1e3;zr(f.x,o.x,C),zr(f.y,o.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ue(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Of(this.relativeTarget,this.relativeTargetOrigin,h,C),v&&pf(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=W()),ut(v,this.relativeTarget)),_&&(this.animationValues=c,_f(c,l,this.latestValues,C,y,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{He.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Mt(0)),this.motionValue.jump(0,!1),this.currentAnimation=bf(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Sf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:u,layout:l,latestValues:c}=o;if(!(!a||!u||!l)){if(this!==o&&this.layout&&l&&Zr(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||W();const f=J(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+f;const h=J(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+h}ut(a,u),Xt(a,c),de(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Pf),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const l={};u.z&&wi("z",o,l,this.animationValues);for(let c=0;c<bi.length;c++)wi(`rotate${bi[c]}`,o,l,this.animationValues),wi(`skew${bi[c]}`,o,l,this.animationValues);o.render();for(const c in l)o.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=We(a?.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=We(a?.pointerEvents)||""),this.hasProjected&&!Vt(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=gf(this.projectionDeltaWithTransform,this.treeScale,c);u&&(f=u(c,f)),o.transform=f;const{x:h,y:d}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${d.origin*100}% 0`,l.animationValues?o.opacity=l===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=l===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const m in _i){if(c[m]===void 0)continue;const{correct:_,applyTo:g,isCSSVariable:p}=_i[m],y=f==="none"?c[m]:_(c[m],l);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=y}else p?this.options.visualElement.renderState.vars[m]=y:o[m]=y}this.options.layoutId&&(o.pointerEvents=l===this?We(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Wr),this.root.sharedNodes.clear()}}}function Ef(t){t.updateLayout()}function Mf(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;if(s==="size")mt(c=>{const f=r?e.measuredBox[c]:e.layoutBox[c],h=J(f);f.min=n[c].min,f.max=f.min+h});else if(s==="x"||s==="y"){const c=s==="x"?"y":"x";xi(r?e.measuredBox[c]:e.layoutBox[c],n[c])}else Zr(s,e.layoutBox,n)&&mt(c=>{const f=r?e.measuredBox[c]:e.layoutBox[c],h=J(n[c]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+h)});const o=zt();de(o,n,e.layoutBox);const a=zt();r?de(a,t.applyTransform(i,!0),e.measuredBox):de(a,n,e.layoutBox);const u=!Vr(o);let l=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:f,layout:h}=c;if(f&&h){const d=W();Ue(d,e.layoutBox,f.layoutBox);const m=W();Ue(m,n,h.layoutBox),Rr(d,m)||(l=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Vf(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function kf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Df(t){t.clearSnapshot()}function Wr(t){t.clearMeasurements()}function Hr(t){t.isLayoutDirty=!1}function Rf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Kr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Lf(t){t.resolveTargetDelta()}function If(t){t.calcProjection()}function Ff(t){t.resetSkewAndRotation()}function Bf(t){t.removeLeadSnapshot()}function zr(t,e,n){t.translate=B(e.translate,0,n),t.scale=B(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Gr(t,e,n,i){t.min=B(e.min,n.min,i),t.max=B(e.max,n.max,i)}function Of(t,e,n,i){Gr(t.x,e.x,n.x,i),Gr(t.y,e.y,n.y,i)}function jf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Nf={duration:.45,ease:[.4,0,.1,1]},Xr=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Yr=Xr("applewebkit/")&&!Xr("chrome/")?Math.round:st;function qr(t){t.min=Yr(t.min),t.max=Yr(t.max)}function $f(t){qr(t.x),qr(t.y)}function Zr(t,e,n){return t==="position"||t==="preserve-aspect"&&!uf(Lr(e),Lr(n),.2)}function Uf(t){return t!==t.root&&t.scroll?.wasRoot}const Wf=Ur({attachResizeListener:(t,e)=>me(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Ti={current:void 0},Jr=Ur({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ti.current){const t=new Wf({});t.mount(window),t.setOptions({layoutScroll:!0}),Ti.current=t}return Ti.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Ke=Ft({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Qr(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Hf(...t){return e=>{let n=!1;const i=t.map(s=>{const r=Qr(s,e);return!n&&typeof r=="function"&&(n=!0),r});if(n)return()=>{for(let s=0;s<i.length;s++){const r=i[s];typeof r=="function"?r():Qr(t[s],null)}}}}function Kf(...t){return jt(Hf(...t),t)}class zf extends at{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(Re(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,s=Re(i)&&i.offsetWidth||0,r=Re(i)&&i.offsetHeight||0,o=getComputedStyle(n),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=n.offsetTop,a.left=n.offsetLeft,a.right=s-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Gf({children:t,isPresent:e,anchorX:n,anchorY:i,root:s,pop:r}){const o=hn(),a=F(null),u=F({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:l}=H(Ke),c=t.props?.ref??t?.ref,f=Kf(a,c);return pn(()=>{const{width:h,height:d,top:m,left:_,right:g,bottom:p}=u.current;if(e||r===!1||!a.current||!h||!d)return;const y=n==="left"?`left: ${_}`:`right: ${g}`,v=i==="bottom"?`bottom: ${p}`:`top: ${m}`;a.current.dataset.motionPopId=o;const w=document.createElement("style");l&&(w.nonce=l);const C=s??document.head;return C.appendChild(w),w.sheet&&w.sheet.insertRule(`
`);s=a.pop()||"";for(const c of a)for(const l of c.split(`
`))if(l.startsWith("data: ")){const u=l.slice(6);if(u==="[DONE]")return;try{const f=JSON.parse(u);f.chunk!=null&&(yield f.chunk)}catch{u.trim()&&(yield u)}}}}finally{n.releaseLock()}}class ve extends Error{constructor(e,n,i){super(e),this.name="OmniaApiError",this.status=n,this.retryable=i}}function Ua(t,e){for(const n of t)if(n.type==="string_too_short"&&n.loc?.includes("input")){const i=n.ctx?.min_length;return i?e("error.text_too_short",{min:i}):e("error.text_too_short_generic")}return e("error.validation")}async function Bi(t,e){const{status:n,statusText:i}=t;if(n===422)try{const s=await t.json();return Array.isArray(s.detail)?new ve(Ua(s.detail,e),n,!1):typeof s.detail=="string"?new ve(s.detail,n,!1):new ve(e("error.validation"),n,!1)}catch{}return new ve(`Omnia API error: ${n} ${i}`,n,!0)}class Ha{#i;#s;#o;#r;#n;#l;#a;constructor({baseUrl:e,application:n,municipality:i,authToken:s,onError:r,endpoints:o,t:a}){this.#i=e.replace(/\/+$/,""),this.#s=n||null,this.#o=i||null,this.#r=s||null,this.#n=r||null,this.#l=o||{},this.#a=a||(c=>c)}#c(e){let n;if(/^https?:\/\//.test(e)?n=e:e.startsWith("/")?n=`${this.#i}${e}`:n=`${this.#i}/${e}`,this.#r){const i=n.includes("?")?"&":"?";n+=`${i}_authenticator=${encodeURIComponent(this.#r)}`}return n}#t(e,n){return this.#l[e]||n}#u(e={}){const n={"Content-Type":"application/json",...e};return this.#s&&(n["x-imio-application"]=this.#s),this.#o&&(n["x-imio-municipality"]=this.#o),n}async#e(e,n,i){const s=this.#c(e),r=this.#u();let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=await Bi(o,this.#a);throw this.#n?.(a),a}return o.json()}async*#f(e,n,i){const s=this.#c(e),r=this.#u({Accept:"text/event-stream"});let o;try{o=await fetch(s,{method:"POST",headers:r,body:JSON.stringify(n),signal:i})}catch(a){throw a.name!=="AbortError"&&this.#n?.(a),a}if(!o.ok){const a=await Bi(o,this.#a);throw this.#n?.(a),a}yield*$a(o,i)}async*generate(e,n={}){const{signal:i,...s}=n;yield*this.#f(this.#t("generate","/v1/agents/generate-content"),{prompt:e,...s},i)}async expandText(e,n={}){const{signal:i,expansionTarget:s,...r}=n,o={input:e,...r};return s!==void 0&&(o.expansion_target=s),(await this.#e(this.#t("expand-text","/v1/agents/expand-text"),o,i)).result}async improveText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("improve-text","/v1/agents/improve-text"),{input:e},i)).result}async reduceText(e,n={}){const{signal:i,reductionTarget:s}=n,r={input:e};return s!==void 0&&(r.reduction_target=s),(await this.#e(this.#t("reduce-text","/v1/agents/reduce-text"),r,i)).result}async correctText(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("correct-text","/v1/agents/correct-text"),{input:e},i)).result}async makeAccessible(e,n={}){const{signal:i}=n;return(await this.#e(this.#t("make-accessible","/v1/agents/make-accessible"),{input:e},i)).result}async translateText(e,n,i={}){const{signal:s}=i;return(await this.#e(this.#t("translate-text","/v1/agents/translate-text"),{input:e,target_language:n},s)).result}}const Oi={"action.generate":"Generate content","action.expand-text":"Expand","action.improve-text":"Improve","action.reduce-text":"Reduce","action.correct-text":"Correct","action.make-accessible":"Make accessible","action.translate-text":"Translate","menu.generate":"Generate content","menu.expand-text":"Expand selection","menu.improve-text":"Improve","menu.reduce-text":"Reduce","menu.correct-text":"Correct","menu.make-accessible":"Make accessible","menu.translate-text":"Translate","tone.default":"None (default)","tone.formal":"Formal","tone.casual":"Casual","tone.bullet_points":"Key points","tone.concise":"Concise","button.retry":"Retry","button.cancel":"Cancel","button.accept":"Accept","button.generate":"Generate","button.stop":"Stop","button.insert":"Insert","button.copy":"Copy","button.back":"Back","button.translate":"Translate","button.close":"Close","panel.generate_title":"Generate text","panel.subtitle":"Omnia – iMio's AI assistant","panel.history":"History","placeholder.prompt":"Describe the content to generate…","tooltip.omnia":"iMio's Omnia Assistant","tooltip.omnia_no_selection":"Please select some text first",loading:"Loading…",disclaimer:"Artificial intelligence can make mistakes, please verify important information.","error.generic":"An error occurred","error.text_too_short":"The selected text is too short (minimum {min} characters).","error.text_too_short_generic":"The selected text is too short.","error.validation":"Validation error."},ji={en:Oi,fr:{"action.generate":"Générer du contenu","action.expand-text":"Développer","action.improve-text":"Améliorer","action.reduce-text":"Réduire","action.correct-text":"Corriger","action.make-accessible":"Rendre accessible","action.translate-text":"Traduire","menu.generate":"Générer du contenu","menu.expand-text":"Développer la sélection","menu.improve-text":"Améliorer","menu.reduce-text":"Réduire","menu.correct-text":"Corriger","menu.make-accessible":"Rendre accessible","menu.translate-text":"Traduire","tone.default":"Aucun (par défaut)","tone.formal":"Formel","tone.casual":"Informel","tone.bullet_points":"Points clés","tone.concise":"Concis","button.retry":"Réessayer","button.cancel":"Annuler","button.accept":"Accepter","button.generate":"Générer","button.stop":"Stop","button.insert":"Insérer","button.copy":"Copier","button.back":"Retour","button.translate":"Traduire","button.close":"Fermer","panel.generate_title":"Générer du texte","panel.subtitle":"Omnia – L'assistant IA d'iMio","panel.history":"Historique","placeholder.prompt":"Décrivez le contenu à générer…","tooltip.omnia":"Assistant Omnia d'iMio","tooltip.omnia_no_selection":"Sélectionnez préalablement du texte",loading:"Chargement…",disclaimer:"L'intelligence artificielle peut commettre des erreurs, vérifiez les informations importantes.","error.generic":"Une erreur est survenue","error.text_too_short":"Le texte sélectionné est trop court (minimum {min} caractères).","error.text_too_short_generic":"Le texte sélectionné est trop court.","error.validation":"Erreur de validation."},nl:{"action.generate":"Inhoud genereren","action.expand-text":"Uitbreiden","action.improve-text":"Verbeteren","action.reduce-text":"Inkorten","action.correct-text":"Corrigeren","action.make-accessible":"Toegankelijk maken","action.translate-text":"Vertalen","menu.generate":"Inhoud genereren","menu.expand-text":"Selectie uitbreiden","menu.improve-text":"Verbeteren","menu.reduce-text":"Inkorten","menu.correct-text":"Corrigeren","menu.make-accessible":"Toegankelijk maken","menu.translate-text":"Vertalen","tone.default":"Geen (standaard)","tone.formal":"Formeel","tone.casual":"Informeel","tone.bullet_points":"Kernpunten","tone.concise":"Beknopt","button.retry":"Opnieuw proberen","button.cancel":"Annuleren","button.accept":"Accepteren","button.generate":"Genereren","button.stop":"Stop","button.insert":"Invoegen","button.copy":"Kopiëren","button.back":"Terug","button.translate":"Vertalen","button.close":"Sluiten","panel.generate_title":"Tekst genereren","panel.subtitle":"Omnia – de AI-assistent van iMio","panel.history":"Geschiedenis","placeholder.prompt":"Beschrijf de te genereren inhoud…","tooltip.omnia":"Omnia-assistent van iMio","tooltip.omnia_no_selection":"Selecteer eerst tekst",loading:"Laden…",disclaimer:"Kunstmatige intelligentie kan fouten maken, controleer belangrijke informatie.","error.generic":"Er is een fout opgetreden","error.text_too_short":"De geselecteerde tekst is te kort (minimaal {min} tekens).","error.text_too_short_generic":"De geselecteerde tekst is te kort.","error.validation":"Validatiefout."},de:{"action.generate":"Inhalt generieren","action.expand-text":"Erweitern","action.improve-text":"Verbessern","action.reduce-text":"Kürzen","action.correct-text":"Korrigieren","action.make-accessible":"Barrierefrei machen","action.translate-text":"Übersetzen","menu.generate":"Inhalt generieren","menu.expand-text":"Auswahl erweitern","menu.improve-text":"Verbessern","menu.reduce-text":"Kürzen","menu.correct-text":"Korrigieren","menu.make-accessible":"Barrierefrei machen","menu.translate-text":"Übersetzen","tone.default":"Keiner (Standard)","tone.formal":"Formell","tone.casual":"Informell","tone.bullet_points":"Kernpunkte","tone.concise":"Prägnant","button.retry":"Wiederholen","button.cancel":"Abbrechen","button.accept":"Übernehmen","button.generate":"Generieren","button.stop":"Stopp","button.insert":"Einfügen","button.copy":"Kopieren","button.back":"Zurück","button.translate":"Übersetzen","button.close":"Schließen","panel.generate_title":"Text generieren","panel.subtitle":"Omnia – der KI-Assistent von iMio","panel.history":"Verlauf","placeholder.prompt":"Beschreiben Sie den zu generierenden Inhalt…","tooltip.omnia":"Omnia-Assistent von iMio","tooltip.omnia_no_selection":"Bitte zuerst Text auswählen",loading:"Wird geladen…",disclaimer:"Künstliche Intelligenz kann Fehler machen, bitte überprüfen Sie wichtige Informationen.","error.generic":"Ein Fehler ist aufgetreten","error.text_too_short":"Der ausgewählte Text ist zu kurz (mindestens {min} Zeichen).","error.text_too_short_generic":"Der ausgewählte Text ist zu kurz.","error.validation":"Validierungsfehler."}};function Wa(t="fr"){const e=ji[t]||ji.fr;return function(i,s){let r=e[i]||Oi[i]||i;if(s)for(const[o,a]of Object.entries(s))r=r.replace(`{${o}}`,a);return r}}const te=[{id:"generate",menu:"panel",shortcut:"g",icon:"omnia",menuItemId:"omnia-generate"},{id:"expand-text",menu:"floating",shortcut:"d",icon:"omnia-expand-text",menuItemId:"omnia-expand-text"},{id:"improve-text",menu:"floating",shortcut:"a",icon:"omnia-improve-text",menuItemId:"omnia-improve-text"},{id:"reduce-text",menu:"floating",shortcut:"r",icon:"omnia-reduce-text",menuItemId:"omnia-reduce-text"},{id:"correct-text",menu:"floating",shortcut:"c",icon:"omnia-correct-text",menuItemId:"omnia-correct-text"},{id:"make-accessible",menu:"floating",shortcut:"x",icon:"omnia-make-accessible",menuItemId:"omnia-make-accessible"},{id:"translate-text",menu:"floating",shortcut:"t",icon:"omnia-translate-text",menuItemId:"omnia-translate-text"}],Ni=te.map(t=>t.id),za=Ni,xe=[{code:"fr",label:"Français"},{code:"nl",label:"Nederlands"},{code:"de",label:"Deutsch"},{code:"en",label:"English"},{code:"es",label:"Español"},{code:"it",label:"Italiano"}],Ka={generate:"/v1/agents/generate-content","expand-text":"/v1/agents/expand-text","improve-text":"/v1/agents/improve-text","reduce-text":"/v1/agents/reduce-text","correct-text":"/v1/agents/correct-text","make-accessible":"/v1/agents/make-accessible","translate-text":"/v1/agents/translate-text"};function $i(t){return Array.isArray(t)&&t.every(e=>typeof e=="string")?{value:t,valid:!0}:typeof t=="string"?{value:t.split(",").map(e=>e.trim()).filter(Boolean),valid:!0}:{valid:!1,message:"Expected a string or an array of strings."}}function Ui(t){return t&&typeof t=="object"&&!Array.isArray(t)?{value:t,valid:!0}:{valid:!1,message:"Expected an object."}}function Ga(t){return typeof t=="boolean"?{value:t,valid:!0}:Ui(t)}function qa(t){t.options.register("omnia_base_url",{processor:"string",default:""}),t.options.register("omnia_auth_token",{processor:"string",default:""}),t.options.register("omnia_application",{processor:"string",default:""}),t.options.register("omnia_municipality",{processor:"string",default:""}),t.options.register("omnia_default_translate_language",{processor:"string",default:"fr"}),t.options.register("omnia_enabled_features",{processor:$i,default:za}),t.options.register("omnia_endpoints",{processor:Ui,default:{}}),t.options.register("omnia_shortcuts",{processor:Ga,default:!0}),t.options.register("omnia_toolbar",{processor:"boolean",default:!0}),t.options.register("omnia_context_menu",{processor:"boolean",default:!0}),t.options.register("omnia_translate_languages",{processor:$i,default:xe.map(e=>e.code)}),t.options.register("omnia_history_limit",{processor:"number",default:5}),t.options.register("omnia_floating_panel_mode",{processor:e=>e==="inline"||e==="blur"?{value:e,valid:!0}:{valid:!1,message:'Expected "inline" or "blur".'},default:"inline"}),t.options.register("omnia_floating_panel_width",{processor:e=>e==="full"?{value:e,valid:!0}:typeof e=="number"&&e>0?{value:e,valid:!0}:{valid:!1,message:'Expected a positive number or "full".'},default:500}),t.options.register("omnia_locale",{processor:"string",default:"fr"})}function Xa(t){const e=new Set(Ni);return t.filter(n=>e.has(n))}function Ya(t,e){const n=new Map(xe.map(o=>[o.code,o])),i=t.filter(o=>n.has(o)).map(o=>n.get(o)),s=i.length>0?i:xe,r=new Set(s.map(o=>o.code));return{languages:s,defaultLanguage:r.has(e)?e:s[0].code}}function Za(t,e){if(t===!1)return{enabled:!1,prefix:"o",timeoutMs:1500,bindings:{}};t===!0&&(t={});const n=new Set(e),i={};for(const s of te){const r=t.bindings?.[s.id],o=typeof r=="string"?r.toLowerCase():s.shortcut;n.has(s.id)&&o&&(i[s.id]=o)}return{enabled:t.enabled!==!1,prefix:typeof t.prefix=="string"&&t.prefix.length===1?t.prefix.toLowerCase():"o",timeoutMs:Number.isFinite(t.timeoutMs)?t.timeoutMs:1500,bindings:i}}function Ja(t){const e=Xa(t.options.get("omnia_enabled_features")),{languages:n,defaultLanguage:i}=Ya(t.options.get("omnia_translate_languages"),t.options.get("omnia_default_translate_language")),s=t.options.get("omnia_locale"),r=Wa(s);return{enabledFeatures:e,endpoints:{...Ka,...t.options.get("omnia_endpoints")},shortcuts:Za(t.options.get("omnia_shortcuts"),e),toolbar:t.options.get("omnia_toolbar"),contextMenu:t.options.get("omnia_context_menu"),defaultLanguage:i,languages:n,locale:s,t:r,historyLimit:Math.max(1,t.options.get("omnia_history_limit")),floatingPanelMode:t.options.get("omnia_floating_panel_mode"),floatingPanelWidth:t.options.get("omnia_floating_panel_width"),authToken:t.options.get("omnia_auth_token"),application:t.options.get("omnia_application"),municipality:t.options.get("omnia_municipality")}}var ee,k,Hi,_t,Wi,zi,Ki,Gi,sn,on,rn,qi,be={},we=[],Qa=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,ne=Array.isArray;function ht(t,e){for(var n in e)t[n]=e[n];return t}function an(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function it(t,e,n){var i,s,r,o={};for(r in e)r=="key"?i=e[r]:r=="ref"?s=e[r]:o[r]=e[r];if(arguments.length>2&&(o.children=arguments.length>3?ee.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)o[r]===void 0&&(o[r]=t.defaultProps[r]);return ie(t,o,i,s,null)}function ie(t,e,n,i,s){var r={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Hi,__i:-1,__u:0};return s==null&&k.vnode!=null&&k.vnode(r),r}function tl(){return{current:null}}function at(t){return t.children}function lt(t,e){this.props=t,this.context=e}function Bt(t,e){if(e==null)return t.__?Bt(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?Bt(t):null}function el(t){if(t.__P&&t.__d){var e=t.__v,n=e.__e,i=[],s=[],r=ht({},e);r.__v=e.__v+1,k.vnode&&k.vnode(r),cn(t.__P,r,e,t.__n,t.__P.namespaceURI,32&e.__u?[n]:null,i,n??Bt(e),!!(32&e.__u),s),r.__v=e.__v,r.__.__k[r.__i]=r,ts(i,r,s),e.__e=e.__=null,r.__e!=n&&Xi(r)}}function Xi(t){if((t=t.__)!=null&&t.__c!=null)return t.__e=t.__c.base=null,t.__k.some(function(e){if(e!=null&&e.__e!=null)return t.__e=t.__c.base=e.__e}),Xi(t)}function ln(t){(!t.__d&&(t.__d=!0)&&_t.push(t)&&!Te.__r++||Wi!=k.debounceRendering)&&((Wi=k.debounceRendering)||zi)(Te)}function Te(){try{for(var t,e=1;_t.length;)_t.length>e&&_t.sort(Ki),t=_t.shift(),e=_t.length,el(t)}finally{_t.length=Te.__r=0}}function Yi(t,e,n,i,s,r,o,a,c,l,u){var f,h,d,m,y,g,p,_=i&&i.__k||we,v=e.length;for(c=nl(n,e,_,c,v),f=0;f<v;f++)(d=n.__k[f])!=null&&(h=d.__i!=-1&&_[d.__i]||be,d.__i=f,g=cn(t,d,h,s,r,o,a,c,l,u),m=d.__e,d.ref&&h.ref!=d.ref&&(h.ref&&fn(h.ref,null,d),u.push(d.ref,d.__c||m,d)),y==null&&m!=null&&(y=m),(p=!!(4&d.__u))||h.__k===d.__k?c=Zi(d,c,t,p):typeof d.type=="function"&&g!==void 0?c=g:m&&(c=m.nextSibling),d.__u&=-7);return n.__e=y,c}function nl(t,e,n,i,s){var r,o,a,c,l,u=n.length,f=u,h=0;for(t.__k=new Array(s),r=0;r<s;r++)(o=e[r])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=t.__k[r]=ie(null,o,null,null,null):ne(o)?o=t.__k[r]=ie(at,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=t.__k[r]=ie(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):t.__k[r]=o,c=r+h,o.__=t,o.__b=t.__b+1,a=null,(l=o.__i=il(o,n,c,f))!=-1&&(f--,(a=n[l])&&(a.__u|=2)),a==null||a.__v==null?(l==-1&&(s>u?h--:s<u&&h++),typeof o.type!="function"&&(o.__u|=4)):l!=c&&(l==c-1?h--:l==c+1?h++:(l>c?h--:h++,o.__u|=4))):t.__k[r]=null;if(f)for(r=0;r<u;r++)(a=n[r])!=null&&(2&a.__u)==0&&(a.__e==i&&(i=Bt(a)),ns(a,a));return i}function Zi(t,e,n,i){var s,r;if(typeof t.type=="function"){for(s=t.__k,r=0;s&&r<s.length;r++)s[r]&&(s[r].__=t,e=Zi(s[r],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=Bt(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function gt(t,e){return e=e||[],t==null||typeof t=="boolean"||(ne(t)?t.some(function(n){gt(n,e)}):e.push(t)),e}function il(t,e,n,i){var s,r,o,a=t.key,c=t.type,l=e[n],u=l!=null&&(2&l.__u)==0;if(l===null&&a==null||u&&a==l.key&&c==l.type)return n;if(i>(u?1:0)){for(s=n-1,r=n+1;s>=0||r<e.length;)if((l=e[o=s>=0?s--:r++])!=null&&(2&l.__u)==0&&a==l.key&&c==l.type)return o}return-1}function Ji(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Qa.test(e)?n:n+"px"}function Ce(t,e,n,i,s){var r,o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof i=="string"&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||Ji(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||Ji(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")r=e!=(e=e.replace(Gi,"$1")),o=e.toLowerCase(),e=o in t||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=sn,t.addEventListener(e,r?rn:on,r)):t.removeEventListener(e,r?rn:on,r);else{if(s=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Qi(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=sn++;else if(e.t<n.u)return;return n(k.event?k.event(e):e)}}}function cn(t,e,n,i,s,r,o,a,c,l){var u,f,h,d,m,y,g,p,_,v,b,w,M,D,P,E=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),r=[a=e.__e=n.__e]),(u=k.__b)&&u(e);t:if(typeof E=="function")try{if(p=e.props,_=E.prototype&&E.prototype.render,v=(u=E.contextType)&&i[u.__c],b=u?v?v.props.value:u.__:i,n.__c?g=(f=e.__c=n.__c).__=f.__E:(_?e.__c=f=new E(p,b):(e.__c=f=new lt(p,b),f.constructor=E,f.render=ol),v&&v.sub(f),f.state||(f.state={}),f.__n=i,h=f.__d=!0,f.__h=[],f._sb=[]),_&&f.__s==null&&(f.__s=f.state),_&&E.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ht({},f.__s)),ht(f.__s,E.getDerivedStateFromProps(p,f.__s))),d=f.props,m=f.state,f.__v=e,h)_&&E.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),_&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(_&&E.getDerivedStateFromProps==null&&p!==d&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(p,b),e.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(p,f.__s,b)===!1){e.__v!=n.__v&&(f.props=p,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(T){T&&(T.__=e)}),we.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(p,f.__s,b),_&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(d,m,y)})}if(f.context=b,f.props=p,f.__P=t,f.__e=!1,w=k.__r,M=0,_)f.state=f.__s,f.__d=!1,w&&w(e),u=f.render(f.props,f.state,f.context),we.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,w&&w(e),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++M<25);f.state=f.__s,f.getChildContext!=null&&(i=ht(ht({},i),f.getChildContext())),_&&!h&&f.getSnapshotBeforeUpdate!=null&&(y=f.getSnapshotBeforeUpdate(d,m)),D=u!=null&&u.type===at&&u.key==null?es(u.props.children):u,a=Yi(t,ne(D)?D:[D],e,n,i,s,r,o,a,c,l),f.base=e.__e,e.__u&=-161,f.__h.length&&o.push(f),g&&(f.__E=f.__=null)}catch(T){if(e.__v=null,c||r!=null)if(T.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;r[r.indexOf(a)]=null,e.__e=a}else{for(P=r.length;P--;)an(r[P]);un(e)}else e.__e=n.__e,e.__k=n.__k,T.then||un(e);k.__e(T,e,n)}else r==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=sl(n.__e,e,n,i,s,r,o,c,l);return(u=k.diffed)&&u(e),128&e.__u?void 0:a}function un(t){t&&(t.__c&&(t.__c.__e=!0),t.__k&&t.__k.some(un))}function ts(t,e,n){for(var i=0;i<n.length;i++)fn(n[i],n[++i],n[++i]);k.__c&&k.__c(e,t),t.some(function(s){try{t=s.__h,s.__h=[],t.some(function(r){r.call(s)})}catch(r){k.__e(r,s.__v)}})}function es(t){return typeof t!="object"||t==null||t.__b>0?t:ne(t)?t.map(es):ht({},t)}function sl(t,e,n,i,s,r,o,a,c){var l,u,f,h,d,m,y,g=n.props||be,p=e.props,_=e.type;if(_=="svg"?s="http://www.w3.org/2000/svg":_=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),r!=null){for(l=0;l<r.length;l++)if((d=r[l])&&"setAttribute"in d==!!_&&(_?d.localName==_:d.nodeType==3)){t=d,r[l]=null;break}}if(t==null){if(_==null)return document.createTextNode(p);t=document.createElementNS(s,_,p.is&&p),a&&(k.__m&&k.__m(e,r),a=!1),r=null}if(_==null)g===p||a&&t.data==p||(t.data=p);else{if(r=r&&ee.call(t.childNodes),!a&&r!=null)for(g={},l=0;l<t.attributes.length;l++)g[(d=t.attributes[l]).name]=d.value;for(l in g)d=g[l],l=="dangerouslySetInnerHTML"?f=d:l=="children"||l in p||l=="value"&&"defaultValue"in p||l=="checked"&&"defaultChecked"in p||Ce(t,l,null,d,s);for(l in p)d=p[l],l=="children"?h=d:l=="dangerouslySetInnerHTML"?u=d:l=="value"?m=d:l=="checked"?y=d:a&&typeof d!="function"||g[l]===d||Ce(t,l,d,g[l],s);if(u)a||f&&(u.__html==f.__html||u.__html==t.innerHTML)||(t.innerHTML=u.__html),e.__k=[];else if(f&&(t.innerHTML=""),Yi(e.type=="template"?t.content:t,ne(h)?h:[h],e,n,i,_=="foreignObject"?"http://www.w3.org/1999/xhtml":s,r,o,r?r[0]:n.__k&&Bt(n,0),a,c),r!=null)for(l=r.length;l--;)an(r[l]);a||(l="value",_=="progress"&&m==null?t.removeAttribute("value"):m!=null&&(m!==t[l]||_=="progress"&&!m||_=="option"&&m!=g[l])&&Ce(t,l,m,g[l],s),l="checked",y!=null&&y!=t[l]&&Ce(t,l,y,g[l],s))}return t}function fn(t,e,n){try{if(typeof t=="function"){var i=typeof t.__u=="function";i&&t.__u(),i&&e==null||(t.__u=t(e))}else t.current=e}catch(s){k.__e(s,n)}}function ns(t,e,n){var i,s;if(k.unmount&&k.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||fn(i,null,e)),(i=t.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(r){k.__e(r,e)}i.base=i.__P=null}if(i=t.__k)for(s=0;s<i.length;s++)i[s]&&ns(i[s],e,n||typeof t.type!="function");n||an(t.__e),t.__c=t.__=t.__e=void 0}function ol(t,e,n){return this.constructor(t,n)}function is(t,e,n){var i,s,r,o;e==document&&(e=document.documentElement),k.__&&k.__(t,e),s=(i=!1)?null:e.__k,r=[],o=[],cn(e,t=e.__k=it(at,null,[t]),s||be,be,e.namespaceURI,s?null:e.firstChild?ee.call(e.childNodes):null,r,s?s.__e:e.firstChild,i,o),ts(r,t,o)}function rl(t,e,n){var i,s,r,o,a=ht({},t.props);for(r in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)r=="key"?i=e[r]:r=="ref"?s=e[r]:a[r]=e[r]===void 0&&o!=null?o[r]:e[r];return arguments.length>2&&(a.children=arguments.length>3?ee.call(arguments,2):n),ie(t.type,a,i||t.key,s||t.ref,null)}function Ot(t){function e(n){var i,s;return this.getChildContext||(i=new Set,(s={})[e.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(r){this.props.value!=r.value&&i.forEach(function(o){o.__e=!0,ln(o)})},this.sub=function(r){i.add(r);var o=r.componentWillUnmount;r.componentWillUnmount=function(){i&&i.delete(r),o&&o.call(r)}}),n.children}return e.__c="__cC"+qi++,e.__=t,e.Provider=e.__l=(e.Consumer=function(n,i){return n.children(i)}).contextType=e,e}ee=we.slice,k={__e:function(t,e,n,i){for(var s,r,o;e=e.__;)if((s=e.__c)&&!s.__)try{if((r=s.constructor)&&r.getDerivedStateFromError!=null&&(s.setState(r.getDerivedStateFromError(t)),o=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(t,i||{}),o=s.__d),o)return s.__E=s}catch(a){t=a}throw t}},Hi=0,lt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=ht({},this.state),typeof t=="function"&&(t=t(ht({},n),this.props)),t&&ht(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),ln(this))},lt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),ln(this))},lt.prototype.render=at,_t=[],zi=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ki=function(t,e){return t.__v.__b-e.__v.__b},Te.__r=0,Gi=/(PointerCapture)$|Capture$/i,sn=0,on=Qi(!1),rn=Qi(!0),qi=0;var al=0;function x(t,e,n,i,s,r){e||(e={});var o,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?o=e[a]:c[a]=e[a];var l={type:t,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--al,__i:-1,__u:0,__source:s,__self:r};if(typeof t=="function"&&(o=t.defaultProps))for(a in o)c[a]===void 0&&(c[a]=o[a]);return k.vnode&&k.vnode(l),l}var vt,F,hn,ss,jt=0,os=[],$=k,rs=$.__b,as=$.__r,ls=$.diffed,cs=$.__c,us=$.unmount,fs=$.__;function Nt(t,e){$.__h&&$.__h(F,t,jt||e),jt=0;var n=F.__H||(F.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function U(t){return jt=1,ll(ds,t)}function ll(t,e,n){var i=Nt(vt++,2);if(i.t=t,!i.__c&&(i.__=[n?n(e):ds(void 0,e),function(a){var c=i.__N?i.__N[0]:i.__[0],l=i.t(c,a);c!==l&&(i.__N=[l,i.__[1]],i.__c.setState({}))}],i.__c=F,!F.__f)){var s=function(a,c,l){if(!i.__c.__H)return!0;var u=i.__c.__H.__.filter(function(h){return h.__c});if(u.every(function(h){return!h.__N}))return!r||r.call(this,a,c,l);var f=i.__c.props!==a;return u.some(function(h){if(h.__N){var d=h.__[0];h.__=h.__N,h.__N=void 0,d!==h.__[0]&&(f=!0)}}),r&&r.call(this,a,c,l)||f};F.__f=!0;var r=F.shouldComponentUpdate,o=F.componentWillUpdate;F.componentWillUpdate=function(a,c,l){if(this.__e){var u=r;r=void 0,s(a,c,l),r=u}o&&o.call(this,a,c,l)},F.shouldComponentUpdate=s}return i.__N||i.__}function Z(t,e){var n=Nt(vt++,3);!$.__s&&gn(n.__H,e)&&(n.__=t,n.u=e,F.__H.__h.push(n))}function dn(t,e){var n=Nt(vt++,4);!$.__s&&gn(n.__H,e)&&(n.__=t,n.u=e,F.__h.push(n))}function B(t){return jt=5,yt(function(){return{current:t}},[])}function cl(t,e,n){jt=6,dn(function(){if(typeof t=="function"){var i=t(e());return function(){t(null),i&&typeof i=="function"&&i()}}if(t)return t.current=e(),function(){return t.current=null}},n==null?n:n.concat(t))}function yt(t,e){var n=Nt(vt++,7);return gn(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function $t(t,e){return jt=8,yt(function(){return t},e)}function G(t){var e=F.context[t.__c],n=Nt(vt++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(F)),e.props.value):t.__}function mn(){var t=Nt(vt++,11);if(!t.__){for(var e=F.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function ul(){for(var t;t=os.shift();){var e=t.__H;if(t.__P&&e)try{e.__h.some(Se),e.__h.some(pn),e.__h=[]}catch(n){e.__h=[],$.__e(n,t.__v)}}}$.__b=function(t){F=null,rs&&rs(t)},$.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),fs&&fs(t,e)},$.__r=function(t){as&&as(t),vt=0;var e=(F=t.__c).__H;e&&(hn===F?(e.__h=[],F.__h=[],e.__.some(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(e.__h.some(Se),e.__h.some(pn),e.__h=[],vt=0)),hn=F},$.diffed=function(t){ls&&ls(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(os.push(e)!==1&&ss===$.requestAnimationFrame||((ss=$.requestAnimationFrame)||fl)(ul)),e.__H.__.some(function(n){n.u&&(n.__H=n.u),n.u=void 0})),hn=F=null},$.__c=function(t,e){e.some(function(n){try{n.__h.some(Se),n.__h=n.__h.filter(function(i){return!i.__||pn(i)})}catch(i){e.some(function(s){s.__h&&(s.__h=[])}),e=[],$.__e(i,n.__v)}}),cs&&cs(t,e)},$.unmount=function(t){us&&us(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.some(function(i){try{Se(i)}catch(s){e=s}}),n.__H=void 0,e&&$.__e(e,n.__v))};var hs=typeof requestAnimationFrame=="function";function fl(t){var e,n=function(){clearTimeout(i),hs&&cancelAnimationFrame(e),setTimeout(t)},i=setTimeout(n,35);hs&&(e=requestAnimationFrame(n))}function Se(t){var e=F,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),F=e}function pn(t){var e=F;t.__c=t.__(),F=e}function gn(t,e){return!t||t.length!==e.length||e.some(function(n,i){return n!==t[i]})}function ds(t,e){return typeof e=="function"?e(t):e}function ms(t,e){for(var n in e)t[n]=e[n];return t}function ps(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var i in e)if(i!=="__source"&&t[i]!==e[i])return!0;return!1}var yn=dn;function gs(t,e){this.props=t,this.context=e}(gs.prototype=new lt).isPureReactComponent=!0,gs.prototype.shouldComponentUpdate=function(t,e){return ps(this.props,t)||ps(this.state,e)};var ys=k.__b;k.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ys&&ys(t)};var hl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _n(t){function e(n){var i=ms({},n);return delete i.ref,t(i,n.ref||null)}return e.$$typeof=hl,e.render=t,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var _s=function(t,e){return t==null?null:gt(gt(t).map(e))},dl={map:_s,forEach:_s,count:function(t){return t?gt(t).length:0},only:function(t){var e=gt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:gt},ml=k.__e;k.__e=function(t,e,n,i){if(t.then){for(var s,r=e;r=r.__;)if((s=r.__c)&&s.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),s.__c(t,e)}ml(t,e,n,i)};var vs=k.unmount;function xs(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(i){typeof i.__c=="function"&&i.__c()}),t.__c.__H=null),(t=ms({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(i){return xs(i,e,n)})),t}function bs(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(i){return bs(i,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function vn(){this.__u=0,this.o=null,this.__b=null}function ws(t){var e=t.__&&t.__.__c;return e&&e.__a&&e.__a(t)}function Pe(){this.i=null,this.l=null}k.unmount=function(t){var e=t.__c;e&&(e.__z=!0),e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),vs&&vs(t)},(vn.prototype=new lt).__c=function(t,e){var n=e.__c,i=this;i.o==null&&(i.o=[]),i.o.push(n);var s=ws(i.__v),r=!1,o=function(){r||i.__z||(r=!0,n.__R=null,s?s(c):c())};n.__R=o;var a=n.__P;n.__P=null;var c=function(){if(!--i.__u){if(i.state.__a){var l=i.state.__a;i.__v.__k[0]=bs(l,l.__c.__P,l.__c.__O)}var u;for(i.setState({__a:i.__b=null});u=i.o.pop();)u.__P=a,u.forceUpdate()}};i.__u++||32&e.__u||i.setState({__a:i.__b=i.__v.__k[0]}),t.then(o,o)},vn.prototype.componentWillUnmount=function(){this.o=[]},vn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=xs(this.__b,n,i.__O=i.__P)}this.__b=null}var s=e.__a&&it(at,null,t.fallback);return s&&(s.__u&=-33),[it(at,null,e.__a?null:t.children),s]};var Ts=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};(Pe.prototype=new lt).__a=function(t){var e=this,n=ws(e.__v),i=e.l.get(t);return i[0]++,function(s){var r=function(){e.props.revealOrder?(i.push(s),Ts(e,t,i)):s()};n?n(r):r()}},Pe.prototype.render=function(t){this.i=null,this.l=new Map;var e=gt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Pe.prototype.componentDidUpdate=Pe.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Ts(t,n,e)})};var Cs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,pl=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,gl=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,yl=/[A-Z0-9]/g,_l=typeof document<"u",vl=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};lt.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(lt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ss=k.event;k.event=function(t){return Ss&&(t=Ss(t)),t.persist=function(){},t.isPropagationStopped=function(){return this.cancelBubble},t.isDefaultPrevented=function(){return this.defaultPrevented},t.nativeEvent=t};var xl={configurable:!0,get:function(){return this.class}},Ps=k.vnode;k.vnode=function(t){typeof t.type=="string"&&(function(e){var n=e.props,i=e.type,s={},r=i.indexOf("-")==-1;for(var o in n){var a=n[o];if(!(o==="value"&&"defaultValue"in n&&a==null||_l&&o==="children"&&i==="noscript"||o==="class"||o==="className")){var c=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&a===!0?a="":c==="translate"&&a==="no"?a=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?o="ondblclick":c!=="onchange"||i!=="input"&&i!=="textarea"||vl(n.type)?c==="onfocus"?o="onfocusin":c==="onblur"?o="onfocusout":gl.test(o)&&(o=c):c=o="oninput":r&&pl.test(o)?o=o.replace(yl,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&s[o=c]&&(o="oninputCapture"),s[o]=a}}i=="select"&&(s.multiple&&Array.isArray(s.value)&&(s.value=gt(n.children).forEach(function(l){l.props.selected=s.value.indexOf(l.props.value)!=-1})),s.defaultValue!=null&&(s.value=gt(n.children).forEach(function(l){l.props.selected=s.multiple?s.defaultValue.indexOf(l.props.value)!=-1:s.defaultValue==l.props.value}))),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",xl)):n.className&&(s.class=s.className=n.className),e.props=s})(t),t.$$typeof=Cs,Ps&&Ps(t)};var As=k.__r;k.__r=function(t){As&&As(t),t.__c};var Es=k.diffed;k.diffed=function(t){Es&&Es(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value)};function ks(t){return!!t&&t.$$typeof===Cs}function bl(t){return ks(t)?rl.apply(null,arguments):t}const xn=Ot({});function se(t){const e=B(null);return e.current===null&&(e.current=t()),e.current}const Ms=typeof window<"u"?dn:Z,Ae=Ot(null);function bn(t,e){t.indexOf(e)===-1&&t.push(e)}function Ee(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const dt=(t,e,n)=>n>e?e:n<t?t:n;let wn=()=>{};const xt={},Vs=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Ds(t){return typeof t=="object"&&t!==null}const Rs=t=>/^0[^.\s]+$/u.test(t);function Ls(t){let e;return()=>(e===void 0&&(e=t()),e)}const ot=t=>t,wl=(t,e)=>n=>e(t(n)),oe=(...t)=>t.reduce(wl),re=(t,e,n)=>{const i=e-t;return i===0?1:(n-t)/i};class Tn{constructor(){this.subscriptions=[]}add(e){return bn(this.subscriptions,e),()=>Ee(this.subscriptions,e)}notify(e,n,i){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](e,n,i);else for(let r=0;r<s;r++){const o=this.subscriptions[r];o&&o(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const st=t=>t*1e3,rt=t=>t/1e3;function Is(t,e){return e?t*(1e3/e):0}const Fs=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Tl=1e-7,Cl=12;function Sl(t,e,n,i,s){let r,o,a=0;do o=e+(n-e)/2,r=Fs(o,i,s)-t,r>0?n=o:e=o;while(Math.abs(r)>Tl&&++a<Cl);return o}function ae(t,e,n,i){if(t===e&&n===i)return ot;const s=r=>Sl(r,0,1,t,n);return r=>r===0||r===1?r:Fs(s(r),e,i)}const Bs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Os=t=>e=>1-t(1-e),js=ae(.33,1.53,.69,.99),Cn=Os(js),Ns=Bs(Cn),$s=t=>t>=1?1:(t*=2)<1?.5*Cn(t):.5*(2-Math.pow(2,-10*(t-1))),Sn=t=>1-Math.sin(Math.acos(t)),Us=Os(Sn),Hs=Bs(Sn),Pl=ae(.42,0,1,1),Al=ae(0,0,.58,1),Ws=ae(.42,0,.58,1),El=t=>Array.isArray(t)&&typeof t[0]!="number",zs=t=>Array.isArray(t)&&typeof t[0]=="number",kl={linear:ot,easeIn:Pl,easeInOut:Ws,easeOut:Al,circIn:Sn,circInOut:Hs,circOut:Us,backIn:Cn,backInOut:Ns,backOut:js,anticipate:$s},Ml=t=>typeof t=="string",Ks=t=>{if(zs(t)){wn(t.length===4);const[e,n,i,s]=t;return ae(e,n,i,s)}else if(Ml(t))return kl[t];return t},ke=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function Vl(t,e){let n=new Set,i=new Set,s=!1,r=!1;const o=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(u){o.has(u)&&(l.schedule(u),t()),u(a)}const l={schedule:(u,f=!1,h=!1)=>{const m=h&&s?n:i;return f&&o.add(u),m.add(u),u},cancel:u=>{i.delete(u),o.delete(u)},process:u=>{if(a=u,s){r=!0;return}s=!0;const f=n;n=i,i=f,n.forEach(c),n.clear(),s=!1,r&&(r=!1,l.process(u))}};return l}const Dl=40;function Gs(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=ke.reduce((v,b)=>(v[b]=Vl(r),v),{}),{setup:a,read:c,resolveKeyframes:l,preUpdate:u,update:f,preRender:h,render:d,postRender:m}=o,y=()=>{const v=xt.useManualTiming,b=v?s.timestamp:performance.now();n=!1,v||(s.delta=i?1e3/60:Math.max(Math.min(b-s.timestamp,Dl),1)),s.timestamp=b,s.isProcessing=!0,a.process(s),c.process(s),l.process(s),u.process(s),f.process(s),h.process(s),d.process(s),m.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(y))},g=()=>{n=!0,i=!0,s.isProcessing||t(y)};return{schedule:ke.reduce((v,b)=>{const w=o[b];return v[b]=(M,D=!1,P=!1)=>(n||g(),w.schedule(M,D,P)),v},{}),cancel:v=>{for(let b=0;b<ke.length;b++)o[ke[b]].cancel(v)},state:s,steps:o}}const{schedule:L,cancel:bt,state:q,steps:Pn}=Gs(typeof requestAnimationFrame<"u"?requestAnimationFrame:ot,!0);let Me;function Rl(){Me=void 0}const J={now:()=>(Me===void 0&&J.set(q.isProcessing||xt.useManualTiming?q.timestamp:performance.now()),Me),set:t=>{Me=t,queueMicrotask(Rl)}},qs=t=>e=>typeof e=="string"&&e.startsWith(t),Xs=qs("--"),Ll=qs("var(--"),An=t=>Ll(t)?Il.test(t.split("/*")[0].trim()):!1,Il=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ys(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const Ut={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},le={...Ut,transform:t=>dt(0,1,t)},Ve={...Ut,default:1},ce=t=>Math.round(t*1e5)/1e5,En=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Fl(t){return t==null}const Bl=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kn=(t,e)=>n=>!!(typeof n=="string"&&Bl.test(n)&&n.startsWith(t)||e&&!Fl(n)&&Object.prototype.hasOwnProperty.call(n,e)),Zs=(t,e,n)=>i=>{if(typeof i!="string")return i;const[s,r,o,a]=i.match(En);return{[t]:parseFloat(s),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Ol=t=>dt(0,255,t),Mn={...Ut,transform:t=>Math.round(Ol(t))},At={test:kn("rgb","red"),parse:Zs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Mn.transform(t)+", "+Mn.transform(e)+", "+Mn.transform(n)+", "+ce(le.transform(i))+")"};function jl(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}}const Vn={test:kn("#"),parse:jl,transform:At.transform},ue=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),wt=ue("deg"),mt=ue("%"),S=ue("px"),Nl=ue("vh"),$l=ue("vw"),Js={...mt,parse:t=>mt.parse(t)/100,transform:t=>mt.transform(t*100)},Ht={test:kn("hsl","hue"),parse:Zs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+mt.transform(ce(e))+", "+mt.transform(ce(n))+", "+ce(le.transform(i))+")"},W={test:t=>At.test(t)||Vn.test(t)||Ht.test(t),parse:t=>At.test(t)?At.parse(t):Ht.test(t)?Ht.parse(t):Vn.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?At.transform(t):Ht.transform(t),getAnimatableNone:t=>{const e=W.parse(t);return e.alpha=0,W.transform(e)}},Ul=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Hl(t){return isNaN(t)&&typeof t=="string"&&(t.match(En)?.length||0)+(t.match(Ul)?.length||0)>0}const Qs="number",to="color",Wl="var",zl="var(",eo="${}",Kl=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Wt(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let r=0;const a=e.replace(Kl,c=>(W.test(c)?(i.color.push(r),s.push(to),n.push(W.parse(c))):c.startsWith(zl)?(i.var.push(r),s.push(Wl),n.push(c)):(i.number.push(r),s.push(Qs),n.push(parseFloat(c))),++r,eo)).split(eo);return{values:n,split:a,indexes:i,types:s}}function Gl(t){return Wt(t).values}function no({split:t,types:e}){const n=t.length;return i=>{let s="";for(let r=0;r<n;r++)if(s+=t[r],i[r]!==void 0){const o=e[r];o===Qs?s+=ce(i[r]):o===to?s+=W.transform(i[r]):s+=i[r]}return s}}function ql(t){return no(Wt(t))}const Xl=t=>typeof t=="number"?0:W.test(t)?W.getAnimatableNone(t):t,Yl=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Xl(t);function Zl(t){const e=Wt(t);return no(e)(e.values.map((i,s)=>Yl(i,e.split[s])))}const ct={test:Hl,parse:Gl,createTransformer:ql,getAnimatableNone:Zl};function Dn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Jl({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let s=0,r=0,o=0;if(!e)s=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;s=Dn(c,a,t+1/3),r=Dn(c,a,t),o=Dn(c,a,t-1/3)}return{red:Math.round(s*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:i}}function De(t,e){return n=>n>0?e:t}const j=(t,e,n)=>t+(e-t)*n,Rn=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Ql=[Vn,At,Ht],tc=t=>Ql.find(e=>e.test(t));function io(t){const e=tc(t);if(!e)return!1;let n=e.parse(t);return e===Ht&&(n=Jl(n)),n}const so=(t,e)=>{const n=io(t),i=io(e);if(!n||!i)return De(t,e);const s={...n};return r=>(s.red=Rn(n.red,i.red,r),s.green=Rn(n.green,i.green,r),s.blue=Rn(n.blue,i.blue,r),s.alpha=j(n.alpha,i.alpha,r),At.transform(s))},Ln=new Set(["none","hidden"]);function ec(t,e){return Ln.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function nc(t,e){return n=>j(t,e,n)}function In(t){return typeof t=="number"?nc:typeof t=="string"?An(t)?De:W.test(t)?so:oc:Array.isArray(t)?oo:typeof t=="object"?W.test(t)?so:ic:De}function oo(t,e){const n=[...t],i=n.length,s=t.map((r,o)=>In(r)(r,e[o]));return r=>{for(let o=0;o<i;o++)n[o]=s[o](r);return n}}function ic(t,e){const n={...t,...e},i={};for(const s in n)t[s]!==void 0&&e[s]!==void 0&&(i[s]=In(t[s])(t[s],e[s]));return s=>{for(const r in i)n[r]=i[r](s);return n}}function sc(t,e){const n=[],i={color:0,var:0,number:0};for(let s=0;s<e.values.length;s++){const r=e.types[s],o=t.indexes[r][i[r]],a=t.values[o]??0;n[s]=a,i[r]++}return n}const oc=(t,e)=>{const n=ct.createTransformer(e),i=Wt(t),s=Wt(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Ln.has(t)&&!s.values.length||Ln.has(e)&&!i.values.length?ec(t,e):oe(oo(sc(i,s),s.values),n):De(t,e)};function ro(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?j(t,e,n):In(t)(t,e)}const rc=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>L.update(e,n),stop:()=>bt(e),now:()=>q.isProcessing?q.timestamp:J.now()}},ao=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let r=0;r<s;r++)i+=Math.round(t(r/(s-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},Re=2e4;function Fn(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<Re;)e+=n,i=t.next(e);return e>=Re?1/0:e}function ac(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(Fn(i),Re);return{type:"keyframes",ease:r=>i.next(s*r).value/e,duration:rt(s)}}const N={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Bn(t,e){return t*Math.sqrt(1-e*e)}const lc=12;function cc(t,e,n){let i=n;for(let s=1;s<lc;s++)i=i-t(i)/e(i);return i}const On=.001;function uc({duration:t=N.duration,bounce:e=N.bounce,velocity:n=N.velocity,mass:i=N.mass}){let s,r,o=1-e;o=dt(N.minDamping,N.maxDamping,o),t=dt(N.minDuration,N.maxDuration,rt(t)),o<1?(s=l=>{const u=l*o,f=u*t,h=u-n,d=Bn(l,o),m=Math.exp(-f);return On-h/d*m},r=l=>{const f=l*o*t,h=f*n+n,d=Math.pow(o,2)*Math.pow(l,2)*t,m=Math.exp(-f),y=Bn(Math.pow(l,2),o);return(-s(l)+On>0?-1:1)*((h-d)*m)/y}):(s=l=>{const u=Math.exp(-l*t),f=(l-n)*t+1;return-On+u*f},r=l=>{const u=Math.exp(-l*t),f=(n-l)*(t*t);return u*f});const a=5/t,c=cc(s,r,a);if(t=st(t),isNaN(c))return{stiffness:N.stiffness,damping:N.damping,duration:t};{const l=Math.pow(c,2)*i;return{stiffness:l,damping:o*2*Math.sqrt(i*l),duration:t}}}const fc=["duration","bounce"],hc=["stiffness","damping","mass"];function lo(t,e){return e.some(n=>t[n]!==void 0)}function dc(t){let e={velocity:N.velocity,stiffness:N.stiffness,damping:N.damping,mass:N.mass,isResolvedFromDuration:!1,...t};if(!lo(t,hc)&&lo(t,fc))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),s=i*i,r=2*dt(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:N.mass,stiffness:s,damping:r}}else{const n=uc({...t,velocity:0});e={...e,...n,mass:N.mass},e.isResolvedFromDuration=!0}return e}function Le(t=N.visualDuration,e=N.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:c,damping:l,mass:u,duration:f,velocity:h,isResolvedFromDuration:d}=dc({...n,velocity:-rt(n.velocity||0)}),m=h||0,y=l/(2*Math.sqrt(c*u)),g=o-r,p=rt(Math.sqrt(c/u)),_=Math.abs(g)<5;i||(i=_?N.restSpeed.granular:N.restSpeed.default),s||(s=_?N.restDelta.granular:N.restDelta.default);let v,b,w,M,D,P;if(y<1)w=Bn(p,y),M=(m+y*p*g)/w,v=T=>{const R=Math.exp(-y*p*T);return o-R*(M*Math.sin(w*T)+g*Math.cos(w*T))},D=y*p*M+g*w,P=y*p*g-M*w,b=T=>Math.exp(-y*p*T)*(D*Math.sin(w*T)+P*Math.cos(w*T));else if(y===1){v=R=>o-Math.exp(-p*R)*(g+(m+p*g)*R);const T=m+p*g;b=R=>Math.exp(-p*R)*(p*T*R-m)}else{const T=p*Math.sqrt(y*y-1);v=K=>{const Y=Math.exp(-y*p*K),tt=Math.min(T*K,300);return o-Y*((m+y*p*g)*Math.sinh(tt)+T*g*Math.cosh(tt))/T};const R=(m+y*p*g)/T,H=y*p*R-g*T,nt=y*p*g-R*T;b=K=>{const Y=Math.exp(-y*p*K),tt=Math.min(T*K,300);return Y*(H*Math.sinh(tt)+nt*Math.cosh(tt))}}const E={calculatedDuration:d&&f||null,velocity:T=>st(b(T)),next:T=>{if(!d&&y<1){const H=Math.exp(-y*p*T),nt=Math.sin(w*T),K=Math.cos(w*T),Y=o-H*(M*nt+g*K),tt=st(H*(D*nt+P*K));return a.done=Math.abs(tt)<=i&&Math.abs(o-Y)<=s,a.value=a.done?o:Y,a}const R=v(T);if(d)a.done=T>=f;else{const H=st(b(T));a.done=Math.abs(H)<=i&&Math.abs(o-R)<=s}return a.value=a.done?o:R,a},toString:()=>{const T=Math.min(Fn(E),Re),R=ao(H=>E.next(T*H).value,T,30);return T+"ms "+R},toTransition:()=>{}};return E}Le.applyToOptions=t=>{const e=ac(t,100,Le);return t.ease=e.ease,t.duration=st(e.duration),t.type="keyframes",t};const mc=5;function co(t,e,n){const i=Math.max(e-mc,0);return Is(n-t(i),e-i)}function jn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:c,restDelta:l=.5,restSpeed:u}){const f=t[0],h={done:!1,value:f},d=P=>a!==void 0&&P<a||c!==void 0&&P>c,m=P=>a===void 0?c:c===void 0||Math.abs(a-P)<Math.abs(c-P)?a:c;let y=n*e;const g=f+y,p=o===void 0?g:o(g);p!==g&&(y=p-f);const _=P=>-y*Math.exp(-P/i),v=P=>p+_(P),b=P=>{const E=_(P),T=v(P);h.done=Math.abs(E)<=l,h.value=h.done?p:T};let w,M;const D=P=>{d(h.value)&&(w=P,M=Le({keyframes:[h.value,m(h.value)],velocity:co(v,P,h.value),damping:s,stiffness:r,restDelta:l,restSpeed:u}))};return D(0),{calculatedDuration:null,next:P=>{let E=!1;return!M&&w===void 0&&(E=!0,b(P),D(P)),w!==void 0&&P>=w?M.next(P-w):(!E&&b(P),h)}}}function pc(t,e,n){const i=[],s=n||xt.mix||ro,r=t.length-1;for(let o=0;o<r;o++){let a=s(t[o],t[o+1]);if(e){const c=Array.isArray(e)?e[o]||ot:e;a=oe(c,a)}i.push(a)}return i}function gc(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const r=t.length;if(wn(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=pc(e,i,s),c=a.length,l=u=>{if(o&&u<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(u<t[f+1]);f++);const h=re(t[f],t[f+1],u);return a[f](h)};return n?u=>l(dt(t[0],t[r-1],u)):l}function yc(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=re(0,e,i);t.push(j(n,1,s))}}function _c(t){const e=[0];return yc(e,t.length-1),e}function vc(t,e){return t.map(n=>n*e)}function xc(t,e){return t.map(()=>e||Ws).splice(0,t.length-1)}function fe({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=El(i)?i.map(Ks):Ks(i),r={done:!1,value:e[0]},o=vc(n&&n.length===e.length?n:_c(e),t),a=gc(o,e,{ease:Array.isArray(s)?s:xc(e,s)});return{calculatedDuration:t,next:c=>(r.value=a(c),r.done=c>=t,r)}}const bc=t=>t!==null;function Nn(t,{repeat:e,repeatType:n="loop"},i,s=1){const r=t.filter(bc),a=s<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||i===void 0?r[a]:i}const wc={decay:jn,inertia:jn,tween:fe,keyframes:fe,spring:Le};function uo(t){typeof t.type=="string"&&(t.type=wc[t.type])}class $n{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Tc=t=>t/100;class Un extends $n{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==J.now()&&this.tick(J.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;uo(e);const{type:n=fe,repeat:i=0,repeatDelay:s=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const c=n||fe;c!==fe&&typeof a[0]!="number"&&(this.mixKeyframes=oe(Tc,ro(a[0],a[1])),a=[0,100]);const l=c({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=Fn(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+s,this.totalDuration=this.resolvedDuration*(i+1)-s,this.generator=l}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:s,mixKeyframes:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return i.next(0);const{delay:l=0,keyframes:u,repeat:f,repeatType:h,repeatDelay:d,type:m,onUpdate:y,finalKeyframe:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-s/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const p=this.currentTime-l*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?p<0:p>s;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let v=this.currentTime,b=i;if(f){const P=Math.min(this.currentTime,s)/a;let E=Math.floor(P),T=P%1;!T&&P>=1&&(T=1),T===1&&E--,E=Math.min(E,f+1),E%2&&(h==="reverse"?(T=1-T,d&&(T-=d/a)):h==="mirror"&&(b=o)),v=dt(0,1,T)*a}const w=_?{done:!1,value:u[0]}:b.next(v);r&&!_&&(w.value=r(w.value));let{done:M}=w;!_&&c!==null&&(M=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const D=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return D&&m!==jn&&(w.value=Nn(u,this.options,g,this.speed)),y&&y(w.value),D&&this.finish(),w}then(e,n){return this.finished.then(e,n)}get duration(){return rt(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+rt(e)}get time(){return rt(this.currentTime)}set time(e){e=st(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return co(i=>this.generator.next(i).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(J.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=rt(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=rc,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(J.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function Cc(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Et=t=>t*180/Math.PI,Hn=t=>{const e=Et(Math.atan2(t[1],t[0]));return Wn(e)},Sc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Hn,rotateZ:Hn,skewX:t=>Et(Math.atan(t[1])),skewY:t=>Et(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Wn=t=>(t=t%360,t<0&&(t+=360),t),fo=Hn,ho=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),mo=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Pc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:ho,scaleY:mo,scale:t=>(ho(t)+mo(t))/2,rotateX:t=>Wn(Et(Math.atan2(t[6],t[5]))),rotateY:t=>Wn(Et(Math.atan2(-t[2],t[0]))),rotateZ:fo,rotate:fo,skewX:t=>Et(Math.atan(t[4])),skewY:t=>Et(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function zn(t){return t.includes("scale")?1:0}function Kn(t,e){if(!t||t==="none")return zn(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Pc,s=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=Sc,s=a}if(!s)return zn(e);const r=i[e],o=s[1].split(",").map(Ec);return typeof r=="function"?r(o):o[r]}const Ac=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Kn(n,e)};function Ec(t){return parseFloat(t.trim())}const zt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Kt=new Set(zt),po=t=>t===Ut||t===S,kc=new Set(["x","y","z"]),Mc=zt.filter(t=>!kc.has(t));function Vc(t){const e=[];return Mc.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const Tt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const s=t.max-t.min;return i==="border-box"?s:s-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Kn(e,"x"),y:(t,{transform:e})=>Kn(e,"y")};Tt.translateX=Tt.x,Tt.translateY=Tt.y;const kt=new Set;let Gn=!1,qn=!1,Xn=!1;function go(){if(qn){const t=Array.from(kt).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const s=Vc(i);s.length&&(n.set(i,s),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const s=n.get(i);s&&s.forEach(([r,o])=>{i.getValue(r)?.set(o)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}qn=!1,Gn=!1,kt.forEach(t=>t.complete(Xn)),kt.clear()}function yo(){kt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(qn=!0)})}function Dc(){Xn=!0,yo(),go(),Xn=!1}class Yn{constructor(e,n,i,s,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=s,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(kt.add(this),Gn||(Gn=!0,L.read(yo),L.resolveKeyframes(go))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:s}=this;if(e[0]===null){const r=s?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(i&&n){const a=i.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),s&&r===void 0&&s.set(e[0])}Cc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),kt.delete(this)}cancel(){this.state==="scheduled"&&(kt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Rc=t=>t.startsWith("--");function _o(t,e,n){Rc(e)?t.style.setProperty(e,n):t.style[e]=n}const Lc={};function vo(t,e){const n=Ls(t);return()=>Lc[e]??n()}const Ic=vo(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),xo=vo(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),he=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,bo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:he([0,.65,.55,1]),circOut:he([.55,0,1,.45]),backIn:he([.31,.01,.66,-.59]),backOut:he([.33,1.53,.69,.99])};function wo(t,e){if(t)return typeof t=="function"?xo()?ao(t,e):"ease-out":zs(t)?he(t):Array.isArray(t)?t.map(n=>wo(n,e)||bo.easeOut):bo[t]}function Fc(t,e,n,{delay:i=0,duration:s=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:c}={},l=void 0){const u={[e]:n};c&&(u.offset=c);const f=wo(a,s);Array.isArray(f)&&(u.easing=f);const h={delay:i,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(h.pseudoElement=l),t.animate(u,h)}function To(t){return typeof t=="function"&&"applyToOptions"in t}function Bc({type:t,...e}){return To(t)&&xo()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Co extends $n{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:s,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:c}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,wn(typeof e.type!="string");const l=Bc(e);this.animation=Fc(n,i,s,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const u=Nn(s,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(u),_o(n,i,u),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return rt(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+rt(e)}get time(){return rt(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=st(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:i,observe:s}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Ic()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),ot):s(this)}}const So={anticipate:$s,backInOut:Ns,circInOut:Hs};function Oc(t){return t in So}function jc(t){typeof t.ease=="string"&&Oc(t.ease)&&(t.ease=So[t.ease])}const Zn=10;class Nc extends Co{constructor(e){jc(e),uo(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:s,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new Un({...o,autoplay:!1}),c=Math.max(Zn,J.now()-this.startTime),l=dt(0,Zn,c-Zn),u=a.sample(c).value,{name:f}=this.options;r&&f&&_o(r,f,u),n.setWithVelocity(a.sample(Math.max(0,c-l)).value,u,l),a.stop()}}const Po=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ct.test(t)||t==="0")&&!t.startsWith("url("));function $c(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Uc(t,e,n,i){const s=t[0];if(s===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=Po(s,e),a=Po(r,e);return!o||!a?!1:$c(t)||(n==="spring"||To(n))&&i}function Jn(t){t.duration=0,t.type="keyframes"}const Hc=new Set(["opacity","clipPath","filter","transform"]),Wc=Ls(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function zc(t){const{motionValue:e,name:n,repeatDelay:i,repeatType:s,damping:r,type:o}=t;if(!(e?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:l}=e.owner.getProps();return Wc()&&n&&Hc.has(n)&&(n!=="transform"||!l)&&!c&&!i&&s!=="mirror"&&r!==0&&o!=="inertia"}const Kc=40;class Gc extends $n{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:s=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:c,motionValue:l,element:u,...f}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=J.now();const h={autoplay:e,delay:n,type:i,repeat:s,repeatDelay:r,repeatType:o,name:c,motionValue:l,element:u,...f},d=u?.KeyframeResolver||Yn;this.keyframeResolver=new d(a,(m,y,g)=>this.onKeyframesResolved(m,y,h,!g),c,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,i,s){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:c,isHandoff:l,onUpdate:u}=i;this.resolvedAt=J.now();let f=!0;Uc(e,r,o,a)||(f=!1,(xt.instantAnimations||!c)&&u?.(Nn(e,i,n)),e[0]=e[e.length-1],Jn(i),i.repeat=0);const d={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>Kc?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},m=f&&!l&&zc(d),y=d.motionValue?.owner?.current,g=m?new Nc({...d,element:y}):new Un(d);g.finished.then(()=>{this.notifyFinished()}).catch(ot),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Dc()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function Ao(t,e,n,i=0,s=1){const r=Array.from(t).sort((l,u)=>l.sortNodePosition(u)).indexOf(e),o=t.size,a=(o-1)*i;return typeof n=="function"?n(r,o):s===1?r*i:a-r*i}const qc=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Xc(t){const e=qc.exec(t);if(!e)return[,];const[,n,i,s]=e;return[`--${n??i}`,s]}function Eo(t,e,n=1){const[i,s]=Xc(t);if(!i)return;const r=window.getComputedStyle(e).getPropertyValue(i);if(r){const o=r.trim();return Vs(o)?parseFloat(o):o}return An(s)?Eo(s,e,n+1):s}const Yc={type:"spring",stiffness:500,damping:25,restSpeed:10},Zc=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Jc={type:"keyframes",duration:.8},Qc={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tu=(t,{keyframes:e})=>e.length>2?Jc:Kt.has(t)?t.startsWith("scale")?Zc(e[1]):Yc:Qc,eu=t=>t!==null;function nu(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(eu),r=e&&n!=="loop"&&e%2===1?0:s.length-1;return s[r]}function ko(t,e){if(t?.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function Qn(t,e){const n=t?.[e]??t?.default??t;return n!==t?ko(n,t):n}function iu({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:r,repeatType:o,repeatDelay:a,from:c,elapsed:l,...u}){return!!Object.keys(u).length}const ti=(t,e,n,i={},s,r)=>o=>{const a=Qn(i,t)||{},c=a.delay||i.delay||0;let{elapsed:l=0}=i;l=l-st(c);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:h=>{e.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:s};iu(a)||Object.assign(u,tu(t,u)),u.duration&&(u.duration=st(u.duration)),u.repeatDelay&&(u.repeatDelay=st(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Jn(u),u.delay===0&&(f=!0)),(xt.instantAnimations||xt.skipAnimations||s?.shouldSkipAnimations)&&(f=!0,Jn(u),u.delay=0),u.allowFlatten=!a.type&&!a.ease,f&&!r&&e.get()!==void 0){const h=nu(u.keyframes,a);if(h!==void 0){L.update(()=>{u.onUpdate(h),u.onComplete()});return}}return a.isSync?new Un(u):new Gc(u)};function Mo(t){const e=[{},{}];return t?.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function ei(t,e,n,i){if(typeof e=="function"){const[s,r]=Mo(i);e=e(n!==void 0?n:t.custom,s,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[s,r]=Mo(i);e=e(n!==void 0?n:t.custom,s,r)}return e}function Mt(t,e,n){const i=t.getProps();return ei(i,e,n!==void 0?n:i.custom,t)}const Vo=new Set(["width","height","top","left","right","bottom",...zt]),Do=30,su=t=>!isNaN(parseFloat(t));class ou{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const s=J.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=J.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=su(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Tn);const i=this.events[e].add(n);return e==="change"?()=>{i(),L.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=J.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Do)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Do);return Is(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Vt(t,e){return new ou(t,e)}const ni=t=>Array.isArray(t);function ru(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function au(t){return ni(t)?t[t.length-1]||0:t}function lu(t,e){const n=Mt(t,e);let{transitionEnd:i={},transition:s={},...r}=n||{};r={...r,...i};for(const o in r){const a=au(r[o]);ru(t,o,a)}}const X=t=>!!(t&&t.getVelocity);function cu(t){return!!(X(t)&&t.add)}function ii(t,e){const n=t.getValue("willChange");if(cu(n))return n.add(e);if(!n&&xt.WillChange){const i=new xt.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function si(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Ro="data-"+si("framerAppearId");function Lo(t){return t.props[Ro]}function uu({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function Io(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:r,transitionEnd:o,...a}=e;const c=t.getDefaultTransition();r=r?ko(r,c):c;const l=r?.reduceMotion;i&&(r=i);const u=[],f=s&&t.animationState&&t.animationState.getState()[s];for(const h in a){const d=t.getValue(h,t.latestValues[h]??null),m=a[h];if(m===void 0||f&&uu(f,h))continue;const y={delay:n,...Qn(r||{},h)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===g&&!y.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const b=Lo(t);if(b){const w=window.MotionHandoffAnimation(b,h,L);w!==null&&(y.startTime=w,p=!0)}}ii(t,h);const _=l??t.shouldReduceMotion;d.start(ti(h,d,m,_&&Vo.has(h)?{type:!1}:y,t,p));const v=d.animation;v&&u.push(v)}if(o){const h=()=>L.update(()=>{o&&lu(t,o)});u.length?Promise.all(u).then(h):h()}return u}function oi(t,e,n={}){const i=Mt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const r=i?()=>Promise.all(Io(t,i,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:u,staggerDirection:f}=s;return fu(t,e,c,l,u,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,l]=a==="beforeChildren"?[r,o]:[o,r];return c().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function fu(t,e,n=0,i=0,s=0,r=1,o){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(oi(c,e,{...o,delay:n+(typeof i=="function"?0:i)+Ao(t.variantChildren,c,i,s,r)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function hu(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const s=e.map(r=>oi(t,r,n));i=Promise.all(s)}else if(typeof e=="string")i=oi(t,e,n);else{const s=typeof e=="function"?Mt(t,e,n.custom):e;i=Promise.all(Io(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const du={test:t=>t==="auto",parse:t=>t},Fo=t=>e=>e.test(t),Bo=[Ut,S,mt,wt,$l,Nl,du],Oo=t=>Bo.find(Fo(t));function mu(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Rs(t):!0}const pu=new Set(["brightness","contrast","saturate","opacity"]);function gu(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(En)||[];if(!i)return t;const s=n.replace(i,"");let r=pu.has(e)?1:0;return i!==n&&(r*=100),e+"("+r+s+")"}const yu=/\b([a-z-]*)\(.*?\)/gu,ri={...ct,getAnimatableNone:t=>{const e=t.match(yu);return e?e.map(gu).join(" "):t}},ai={...ct,getAnimatableNone:t=>{const e=ct.parse(t);return ct.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},jo={...Ut,transform:Math.round},li={borderWidth:S,borderTopWidth:S,borderRightWidth:S,borderBottomWidth:S,borderLeftWidth:S,borderRadius:S,borderTopLeftRadius:S,borderTopRightRadius:S,borderBottomRightRadius:S,borderBottomLeftRadius:S,width:S,maxWidth:S,height:S,maxHeight:S,top:S,right:S,bottom:S,left:S,inset:S,insetBlock:S,insetBlockStart:S,insetBlockEnd:S,insetInline:S,insetInlineStart:S,insetInlineEnd:S,padding:S,paddingTop:S,paddingRight:S,paddingBottom:S,paddingLeft:S,paddingBlock:S,paddingBlockStart:S,paddingBlockEnd:S,paddingInline:S,paddingInlineStart:S,paddingInlineEnd:S,margin:S,marginTop:S,marginRight:S,marginBottom:S,marginLeft:S,marginBlock:S,marginBlockStart:S,marginBlockEnd:S,marginInline:S,marginInlineStart:S,marginInlineEnd:S,fontSize:S,backgroundPositionX:S,backgroundPositionY:S,...{rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:Ve,scaleX:Ve,scaleY:Ve,scaleZ:Ve,skew:wt,skewX:wt,skewY:wt,distance:S,translateX:S,translateY:S,translateZ:S,x:S,y:S,z:S,perspective:S,transformPerspective:S,opacity:le,originX:Js,originY:Js,originZ:S},zIndex:jo,fillOpacity:le,strokeOpacity:le,numOctaves:jo},_u={...li,color:W,backgroundColor:W,outlineColor:W,fill:W,stroke:W,borderColor:W,borderTopColor:W,borderRightColor:W,borderBottomColor:W,borderLeftColor:W,filter:ri,WebkitFilter:ri,mask:ai,WebkitMask:ai},No=t=>_u[t],vu=new Set([ri,ai]);function $o(t,e){let n=No(t);return vu.has(n)||(n=ct),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xu=new Set(["auto","none","0"]);function bu(t,e,n){let i=0,s;for(;i<t.length&&!s;){const r=t[i];typeof r=="string"&&!xu.has(r)&&Wt(r).values.length&&(s=t[i]),i++}if(s&&n)for(const r of e)t[r]=$o(n,s)}class wu extends Yn{constructor(e,n,i,s,r){super(e,n,i,s,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<e.length;u++){let f=e[u];if(typeof f=="string"&&(f=f.trim(),An(f))){const h=Eo(f,n.current);h!==void 0&&(e[u]=h),u===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!Vo.has(i)||e.length!==2)return;const[s,r]=e,o=Oo(s),a=Oo(r),c=Ys(s),l=Ys(r);if(c!==l&&Tt[i]){this.needsMeasurement=!0;return}if(o!==a)if(po(o)&&po(a))for(let u=0;u<e.length;u++){const f=e[u];typeof f=="string"&&(e[u]=parseFloat(f))}else Tt[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let s=0;s<e.length;s++)(e[s]===null||mu(e[s]))&&i.push(s);i.length&&bu(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Tt[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&e.getValue(i,s).jump(s,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const r=i.length-1,o=i[r];i[r]=Tt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{e.getValue(a).set(c)}),this.resolveNoneKeyframes()}}const Tu=new Set(["opacity","clipPath","filter","transform"]);function Uo(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const s=n?.[t]??i.querySelectorAll(t);return s?Array.from(s):[]}return Array.from(t).filter(i=>i!=null)}const Ho=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Ie(t){return Ds(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:ci}=Gs(queueMicrotask,!1),ut={x:!1,y:!1};function Wo(){return ut.x||ut.y}function Cu(t){return t==="x"||t==="y"?ut[t]?null:(ut[t]=!0,()=>{ut[t]=!1}):ut.x||ut.y?null:(ut.x=ut.y=!0,()=>{ut.x=ut.y=!1})}function zo(t,e){const n=Uo(t),i=new AbortController,s={passive:!0,...e,signal:i.signal};return[n,s,()=>i.abort()]}function Su(t){return!(t.pointerType==="touch"||Wo())}function Pu(t,e,n={}){const[i,s,r]=zo(t,n);return i.forEach(o=>{let a=!1,c=!1,l;const u=()=>{o.removeEventListener("pointerleave",m)},f=g=>{l&&(l(g),l=void 0),u()},h=g=>{a=!1,window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",h),c&&(c=!1,f(g))},d=()=>{a=!0,window.addEventListener("pointerup",h,s),window.addEventListener("pointercancel",h,s)},m=g=>{if(g.pointerType!=="touch"){if(a){c=!0;return}f(g)}},y=g=>{if(!Su(g))return;c=!1;const p=e(o,g);typeof p=="function"&&(l=p,o.addEventListener("pointerleave",m,s))};o.addEventListener("pointerenter",y,s),o.addEventListener("pointerdown",d,s)}),r}const Ko=(t,e)=>e?t===e?!0:Ko(t,e.parentElement):!1,ui=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Au=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Eu(t){return Au.has(t.tagName)||t.isContentEditable===!0}const ku=new Set(["INPUT","SELECT","TEXTAREA"]);function Mu(t){return ku.has(t.tagName)||t.isContentEditable===!0}const Fe=new WeakSet;function Go(t){return e=>{e.key==="Enter"&&t(e)}}function fi(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Vu=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=Go(()=>{if(Fe.has(n))return;fi(n,"down");const s=Go(()=>{fi(n,"up")}),r=()=>fi(n,"cancel");n.addEventListener("keyup",s,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function qo(t){return ui(t)&&!Wo()}const Xo=new WeakSet;function Du(t,e,n={}){const[i,s,r]=zo(t,n),o=a=>{const c=a.currentTarget;if(!qo(a)||Xo.has(a))return;Fe.add(c),n.stopPropagation&&Xo.add(a);const l=e(c,a),u=(d,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Fe.has(c)&&Fe.delete(c),qo(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{u(d,c===window||c===document||n.useGlobalTarget||Ko(c,d.target))},h=d=>{u(d,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return i.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,s),Ie(a)&&(a.addEventListener("focus",l=>Vu(l,s)),!Eu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function hi(t){return Ds(t)&&"ownerSVGElement"in t}const Be=new WeakMap;let Oe;const Yo=(t,e,n)=>(i,s)=>s&&s[0]?s[0][t+"Size"]:hi(i)&&"getBBox"in i?i.getBBox()[e]:i[n],Ru=Yo("inline","width","offsetWidth"),Lu=Yo("block","height","offsetHeight");function Iu({target:t,borderBoxSize:e}){Be.get(t)?.forEach(n=>{n(t,{get width(){return Ru(t,e)},get height(){return Lu(t,e)}})})}function Fu(t){t.forEach(Iu)}function Bu(){typeof ResizeObserver>"u"||(Oe=new ResizeObserver(Fu))}function Ou(t,e){Oe||Bu();const n=Uo(t);return n.forEach(i=>{let s=Be.get(i);s||(s=new Set,Be.set(i,s)),s.add(e),Oe?.observe(i)}),()=>{n.forEach(i=>{const s=Be.get(i);s?.delete(e),s?.size||Oe?.unobserve(i)})}}const je=new Set;let Gt;function ju(){Gt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};je.forEach(e=>e(t))},window.addEventListener("resize",Gt)}function Nu(t){return je.add(t),Gt||ju(),()=>{je.delete(t),!je.size&&typeof Gt=="function"&&(window.removeEventListener("resize",Gt),Gt=void 0)}}function Zo(t,e){return typeof t=="function"?Nu(t):Ou(t,e)}function $u(t){return hi(t)&&t.tagName==="svg"}const Uu=[...Bo,W,ct],Hu=t=>Uu.find(Fo(t)),Jo=()=>({translate:0,scale:1,origin:0,originPoint:0}),qt=()=>({x:Jo(),y:Jo()}),Qo=()=>({min:0,max:0}),z=()=>({x:Qo(),y:Qo()}),Wu=new WeakMap;function Ne(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function de(t){return typeof t=="string"||Array.isArray(t)}const di=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],mi=["initial",...di];function $e(t){return Ne(t.animate)||mi.some(e=>de(t[e]))}function tr(t){return!!($e(t)||t.variants)}function zu(t,e,n){for(const i in e){const s=e[i],r=n[i];if(X(s))t.addValue(i,s);else if(X(r))t.addValue(i,Vt(s,{owner:t}));else if(r!==s)if(t.hasValue(i)){const o=t.getValue(i);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=t.getStaticValue(i);t.addValue(i,Vt(o!==void 0?o:s,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const pi={current:null},er={current:!1},Ku=typeof window<"u";function Gu(){if(er.current=!0,!!Ku)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>pi.current=t.matches;t.addEventListener("change",e),e()}else pi.current=!1}const nr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ue={};function ir(t){Ue=t}function qu(){return Ue}class Xu{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:s,skipAnimations:r,blockInitialAnimation:o,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Yn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const d=J.now();this.renderScheduledAt<d&&(this.renderScheduledAt=d,L.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=a;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=s,this.skipAnimationsConfig=r,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=$e(n),this.isVariantNode=tr(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const d in h){const m=h[d];l[d]!==void 0&&X(m)&&m.set(l[d])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,Wu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,i)=>this.bindToMotionValue(i,n)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(er.current||Gu(),this.shouldReduceMotion=pi.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),bt(this.notifyUpdate),bt(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&Tu.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:c,ease:l,duration:u}=n.accelerate,f=new Co({element:this.current,name:e,keyframes:a,times:c,ease:l,duration:st(u)}),h=o(f);this.valueSubscriptions.set(e,()=>{h(),f.cancel()});return}const i=Kt.has(e);i&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&L.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{s(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Ue){const n=Ue[e];if(!n)continue;const{isEnabled:i,Feature:s}=n;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){const r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):z()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<nr.length;i++){const s=nr[i];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const r="on"+s,o=e[r];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=zu(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Vt(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(Vs(i)||Rs(i))?i=parseFloat(i):!Hu(i)&&ct.test(n)&&(i=$o(e,n)),this.setBaseTarget(e,X(i)?i.get():i)),X(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const r=ei(this.props,n,this.presenceContext?.custom);r&&(i=r[e])}if(n&&i!==void 0)return i;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!X(s)?s:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Tn),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){ci.render(this.render)}}class sr extends Xu{constructor(){super(...arguments),this.KeyframeResolver=wu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;X(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Ct{constructor(e){this.isMounted=!1,this.node=e}update(){}}function or({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Yu({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Zu(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function gi(t){return t===void 0||t===1}function yi({scale:t,scaleX:e,scaleY:n}){return!gi(t)||!gi(e)||!gi(n)}function Dt(t){return yi(t)||rr(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function rr(t){return ar(t.x)||ar(t.y)}function ar(t){return t&&t!=="0%"}function He(t,e,n){const i=t-n,s=e*i;return n+s}function lr(t,e,n,i,s){return s!==void 0&&(t=He(t,s,i)),He(t,n,i)+e}function _i(t,e=0,n=1,i,s){t.min=lr(t.min,e,n,i,s),t.max=lr(t.max,e,n,i,s)}function cr(t,{x:e,y:n}){_i(t.x,e.translate,e.scale,e.originPoint),_i(t.y,n.translate,n.scale,n.originPoint)}const ur=.999999999999,fr=1.0000000000001;function Ju(t,e,n,i=!1){const s=n.length;if(!s)return;e.x=e.y=1;let r,o;for(let a=0;a<s;a++){r=n[a],o=r.projectionDelta;const{visualElement:c}=r.options;c&&c.props.style&&c.props.style.display==="contents"||(i&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Yt(t,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),o&&(e.x*=o.x.scale,e.y*=o.y.scale,cr(t,o)),i&&Dt(r.latestValues)&&Yt(t,r.latestValues,r.layout?.layoutBox))}e.x<fr&&e.x>ur&&(e.x=1),e.y<fr&&e.y>ur&&(e.y=1)}function Xt(t,e){t.min=t.min+e,t.max=t.max+e}function hr(t,e,n,i,s=.5){const r=j(t.min,t.max,s);_i(t,e,n,r,i)}function dr(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function Yt(t,e,n){const i=n??t;hr(t.x,dr(e.x,i.x),e.scaleX,e.scale,e.originX),hr(t.y,dr(e.y,i.y),e.scaleY,e.scale,e.originY)}function mr(t,e){return or(Zu(t.getBoundingClientRect(),e))}function Qu(t,e,n){const i=mr(t,n),{scroll:s}=e;return s&&(Xt(i.x,s.offset.x),Xt(i.y,s.offset.y)),i}const tf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ef=zt.length;function nf(t,e,n){let i="",s=!0;for(let r=0;r<ef;r++){const o=zt[r],a=t[o];if(a===void 0)continue;let c=!0;if(typeof a=="number")c=a===(o.startsWith("scale")?1:0);else{const l=parseFloat(a);c=o.startsWith("scale")?l===1:l===0}if(!c||n){const l=Ho(a,li[o]);if(!c){s=!1;const u=tf[o]||o;i+=`${u}(${l}) `}n&&(e[o]=l)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function vi(t,e,n){const{style:i,vars:s,transformOrigin:r}=t;let o=!1,a=!1;for(const c in e){const l=e[c];if(Kt.has(c)){o=!0;continue}else if(Xs(c)){s[c]=l;continue}else{const u=Ho(l,li[c]);c.startsWith("origin")?(a=!0,r[c]=u):i[c]=u}}if(e.transform||(o||n?i.transform=nf(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:c="50%",originY:l="50%",originZ:u=0}=r;i.transformOrigin=`${c} ${l} ${u}`}}function pr(t,{style:e,vars:n},i,s){const r=t.style;let o;for(o in e)r[o]=e[o];s?.applyProjectionStyles(r,i);for(o in n)r.setProperty(o,n[o])}function gr(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const me={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(S.test(t))t=parseFloat(t);else return t;const n=gr(t,e.target.x),i=gr(t,e.target.y);return`${n}% ${i}%`}},sf={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ct.parse(t);if(s.length>5)return i;const r=ct.createTransformer(t),o=typeof s[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;s[0+o]/=a,s[1+o]/=c;const l=j(a,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=l),typeof s[3+o]=="number"&&(s[3+o]/=l),r(s)}},xi={borderRadius:{...me,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:me,borderTopRightRadius:me,borderBottomLeftRadius:me,borderBottomRightRadius:me,boxShadow:sf};function yr(t,{layout:e,layoutId:n}){return Kt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!xi[t]||t==="opacity")}function bi(t,e,n){const i=t.style,s=e?.style,r={};if(!i)return r;for(const o in i)(X(i[o])||s&&X(s[o])||yr(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=i[o]);return r}function of(t){return window.getComputedStyle(t)}class rf extends sr{constructor(){super(...arguments),this.type="html",this.renderInstance=pr}readValueFromInstance(e,n){if(Kt.has(n))return this.projection?.isProjecting?zn(n):Ac(e,n);{const i=of(e),s=(Xs(n)?i.getPropertyValue(n):i[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return mr(e,n)}build(e,n,i){vi(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return bi(e,n,i)}}const af={offset:"stroke-dashoffset",array:"stroke-dasharray"},lf={offset:"strokeDashoffset",array:"strokeDasharray"};function cf(t,e,n=1,i=0,s=!0){t.pathLength=1;const r=s?af:lf;t[r.offset]=`${-i}`,t[r.array]=`${e} ${n}`}const uf=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function _r(t,{attrX:e,attrY:n,attrScale:i,pathLength:s,pathSpacing:r=1,pathOffset:o=0,...a},c,l,u){if(vi(t,a,l),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:h}=t;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=u?.transformBox??"fill-box",delete f.transformBox);for(const d of uf)f[d]!==void 0&&(h[d]=f[d],delete f[d]);e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),i!==void 0&&(f.scale=i),s!==void 0&&cf(f,s,r,o,!1)}const vr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),xr=t=>typeof t=="string"&&t.toLowerCase()==="svg";function ff(t,e,n,i){pr(t,e,void 0,i);for(const s in e.attrs)t.setAttribute(vr.has(s)?s:si(s),e.attrs[s])}function br(t,e,n){const i=bi(t,e,n);for(const s in t)if(X(t[s])||X(e[s])){const r=zt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;i[r]=t[s]}return i}class hf extends sr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=z}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Kt.has(n)){const i=No(n);return i&&i.default||0}return n=vr.has(n)?n:si(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return br(e,n,i)}build(e,n,i){_r(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,s){ff(e,n,i,s)}mount(e){this.isSVGTag=xr(e.tagName),super.mount(e)}}const df=mi.length;function wr(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?wr(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<df;n++){const i=mi[n],s=t.props[i];(de(s)||s===!1)&&(e[i]=s)}return e}function Tr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const mf=[...di].reverse(),pf=di.length;function gf(t){return e=>Promise.all(e.map(({animation:n,options:i})=>hu(t,n,i)))}function yf(t){let e=gf(t),n=Cr(),i=!0,s=!1;const r=l=>(u,f)=>{const h=Mt(t,f,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:d,transitionEnd:m,...y}=h;u={...u,...y,...m}}return u};function o(l){e=l(t)}function a(l){const{props:u}=t,f=wr(t.parent)||{},h=[],d=new Set;let m={},y=1/0;for(let p=0;p<pf;p++){const _=mf[p],v=n[_],b=u[_]!==void 0?u[_]:f[_],w=de(b),M=_===l?v.isActive:null;M===!1&&(y=p);let D=b===f[_]&&b!==u[_]&&w;if(D&&(i||s)&&t.manuallyAnimateOnMount&&(D=!1),v.protectedKeys={...m},!v.isActive&&M===null||!b&&!v.prevProp||Ne(b)||typeof b=="boolean")continue;if(_==="exit"&&v.isActive&&M!==!0){v.prevResolvedValues&&(m={...m,...v.prevResolvedValues});continue}const P=_f(v.prevProp,b);let E=P||_===l&&v.isActive&&!D&&w||p>y&&w,T=!1;const R=Array.isArray(b)?b:[b];let H=R.reduce(r(_),{});M===!1&&(H={});const{prevResolvedValues:nt={}}=v,K={...nt,...H},Y=O=>{E=!0,d.has(O)&&(T=!0,d.delete(O)),v.needsAnimating[O]=!0;const A=t.getValue(O);A&&(A.liveStyle=!1)};for(const O in K){const A=H[O],V=nt[O];if(m.hasOwnProperty(O))continue;let C=!1;ni(A)&&ni(V)?C=!Tr(A,V):C=A!==V,C?A!=null?Y(O):d.add(O):A!==void 0&&d.has(O)?Y(O):v.protectedKeys[O]=!0}v.prevProp=b,v.prevResolvedValues=H,v.isActive&&(m={...m,...H}),(i||s)&&t.blockInitialAnimation&&(E=!1);const tt=D&&P;E&&(!tt||T)&&h.push(...R.map(O=>{const A={type:_};if(typeof O=="string"&&(i||s)&&!tt&&t.manuallyAnimateOnMount&&t.parent){const{parent:V}=t,C=Mt(V,O);if(V.enteringChildren&&C){const{delayChildren:I}=C.transition||{};A.delay=Ao(V.enteringChildren,t,I)}}return{animation:O,options:A}}))}if(d.size){const p={};if(typeof u.initial!="boolean"){const _=Mt(t,Array.isArray(u.initial)?u.initial[0]:u.initial);_&&_.transition&&(p.transition=_.transition)}d.forEach(_=>{const v=t.getBaseTarget(_),b=t.getValue(_);b&&(b.liveStyle=!0),p[_]=v??null}),h.push({animation:p})}let g=!!h.length;return i&&(u.initial===!1||u.initial===u.animate)&&!t.manuallyAnimateOnMount&&(g=!1),i=!1,s=!1,g?e(h):Promise.resolve()}function c(l,u){if(n[l].isActive===u)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,u)),n[l].isActive=u;const f=a(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Cr(),s=!0}}}function _f(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Tr(e,t):!1}function Rt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Cr(){return{animate:Rt(!0),whileInView:Rt(),whileHover:Rt(),whileTap:Rt(),whileDrag:Rt(),whileFocus:Rt(),exit:Rt()}}function wi(t,e){t.min=e.min,t.max=e.max}function ft(t,e){wi(t.x,e.x),wi(t.y,e.y)}function Sr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Pr=1e-4,vf=1-Pr,xf=1+Pr,Ar=.01,bf=0-Ar,wf=0+Ar;function Q(t){return t.max-t.min}function Tf(t,e,n){return Math.abs(t-e)<=n}function Er(t,e,n,i=.5){t.origin=i,t.originPoint=j(e.min,e.max,t.origin),t.scale=Q(n)/Q(e),t.translate=j(n.min,n.max,t.origin)-t.originPoint,(t.scale>=vf&&t.scale<=xf||isNaN(t.scale))&&(t.scale=1),(t.translate>=bf&&t.translate<=wf||isNaN(t.translate))&&(t.translate=0)}function pe(t,e,n,i){Er(t.x,e.x,n.x,i?i.originX:void 0),Er(t.y,e.y,n.y,i?i.originY:void 0)}function kr(t,e,n){t.min=n.min+e.min,t.max=t.min+Q(e)}function Cf(t,e,n){kr(t.x,e.x,n.x),kr(t.y,e.y,n.y)}function Mr(t,e,n){t.min=e.min-n.min,t.max=t.min+Q(e)}function We(t,e,n){Mr(t.x,e.x,n.x),Mr(t.y,e.y,n.y)}function Vr(t,e,n,i,s){return t-=e,t=He(t,1/n,i),s!==void 0&&(t=He(t,1/s,i)),t}function Sf(t,e=0,n=1,i=.5,s,r=t,o=t){if(mt.test(e)&&(e=parseFloat(e),e=j(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=j(r.min,r.max,i);t===r&&(a-=e),t.min=Vr(t.min,e,n,a,s),t.max=Vr(t.max,e,n,a,s)}function Dr(t,e,[n,i,s],r,o){Sf(t,e[n],e[i],e[s],e.scale,r,o)}const Pf=["x","scaleX","originX"],Af=["y","scaleY","originY"];function Rr(t,e,n,i){Dr(t.x,e,Pf,n?n.x:void 0,i?i.x:void 0),Dr(t.y,e,Af,n?n.y:void 0,i?i.y:void 0)}function Lr(t){return t.translate===0&&t.scale===1}function Ir(t){return Lr(t.x)&&Lr(t.y)}function Fr(t,e){return t.min===e.min&&t.max===e.max}function Ef(t,e){return Fr(t.x,e.x)&&Fr(t.y,e.y)}function Br(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Or(t,e){return Br(t.x,e.x)&&Br(t.y,e.y)}function jr(t){return Q(t.x)/Q(t.y)}function Nr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function pt(t){return[t("x"),t("y")]}function kf(t,e,n){let i="";const s=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((s||r||o)&&(i=`translate3d(${s}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:u,rotateX:f,rotateY:h,skewX:d,skewY:m}=n;l&&(i=`perspective(${l}px) ${i}`),u&&(i+=`rotate(${u}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `),d&&(i+=`skewX(${d}deg) `),m&&(i+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(i+=`scale(${a}, ${c})`),i||"none"}const $r=["TopLeft","TopRight","BottomLeft","BottomRight"],Mf=$r.length,Ur=t=>typeof t=="string"?parseFloat(t):t,Hr=t=>typeof t=="number"||S.test(t);function Vf(t,e,n,i,s,r){s?(t.opacity=j(0,n.opacity??1,Df(i)),t.opacityExit=j(e.opacity??1,0,Rf(i))):r&&(t.opacity=j(e.opacity??1,n.opacity??1,i));for(let o=0;o<Mf;o++){const a=`border${$r[o]}Radius`;let c=Wr(e,a),l=Wr(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||Hr(c)===Hr(l)?(t[a]=Math.max(j(Ur(c),Ur(l),i),0),(mt.test(l)||mt.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=j(e.rotate||0,n.rotate||0,i))}function Wr(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Df=zr(0,.5,Us),Rf=zr(.5,.95,ot);function zr(t,e,n){return i=>i<t?0:i>e?1:n(re(t,e,i))}function Lf(t,e,n){const i=X(t)?t:Vt(t);return i.start(ti("",i,e,n)),i.animation}function ge(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const If=(t,e)=>t.depth-e.depth;class Ff{constructor(){this.children=[],this.isDirty=!1}add(e){bn(this.children,e),this.isDirty=!0}remove(e){Ee(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(If),this.isDirty=!1,this.children.forEach(e)}}function Bf(t,e){const n=J.now(),i=({timestamp:s})=>{const r=s-n;r>=e&&(bt(i),t(r-e))};return L.setup(i,!0),()=>bt(i)}function ze(t){return X(t)?t.get():t}class Of{constructor(){this.members=[]}add(e){bn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const s=i.instance;(!s||s.isConnected===!1)&&!i.snapshot&&(Ee(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(Ee(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){for(let n=this.members.indexOf(e)-1;n>=0;n--){const i=this.members[n];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,n){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:r}=e.options;(s===void 0||s!==r)&&(e.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Ke={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ti=["","X","Y","Z"],jf=1e3;let Nf=0;function Ci(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Kr(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Lo(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",L,!(s||r))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Kr(i)}function Gr({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(o={},a=e?.()){this.id=Nf++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Hf),this.nodes.forEach(Gf),this.nodes.forEach(qf),this.nodes.forEach(Wf)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ff)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Tn),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const c=this.eventHandlers.get(o);c&&c.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=hi(o)&&!$u(o),this.instance=o;const{layoutId:a,layout:c,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let u,f=0;const h=()=>this.root.updateBlockedByResize=!1;L.read(()=>{f=window.innerWidth}),t(o,()=>{const d=window.innerWidth;d!==f&&(f=d,this.root.updateBlockedByResize=!0,u&&u(),u=Bf(h,250),Ke.hasAnimatedSinceResize&&(Ke.hasAnimatedSinceResize=!1,this.nodes.forEach(Yr)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||c)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||l.getDefaultTransition()||Qf,{onLayoutAnimationStart:y,onLayoutAnimationComplete:g}=l.getProps(),p=!this.targetLayout||!Or(this.targetLayout,d),_=!f&&h;if(this.options.layoutRoot||this.resumeFrom||_||f&&(p||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...Qn(m,"layout"),onPlay:y,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(u,_)}else f||Yr(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),bt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Xf),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Kr(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,(typeof f.latestValues.x=="string"||typeof f.latestValues.y=="string")&&(f.isLayoutDirty=!0),f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(qr);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Xr);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Kf),this.nodes.forEach($f),this.nodes.forEach(Uf)):this.nodes.forEach(Xr),this.clearAllSnapshots();const a=J.now();q.delta=dt(0,1e3/60,a-q.timestamp),q.timestamp=a,q.isProcessing=!0,Pn.update.process(q),Pn.preRender.process(q),Pn.render.process(q),q.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ci.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(zf),this.sharedNodes.forEach(Yf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,L.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){L.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected=z(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const c=i(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ir(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,u=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||Dt(this.latestValues)||u)&&(s(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return o&&(c=this.removeTransform(c)),th(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return z();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(eh))){const{scroll:l}=this.root;l&&(Xt(a.x,l.offset.x),Xt(a.y,l.offset.y))}return a}removeElementScroll(o){const a=z();if(ft(a,o),this.scroll?.wasRoot)return a;for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:u,options:f}=l;l!==this.root&&u&&f.layoutScroll&&(u.wasRoot&&ft(a,o),Xt(a.x,u.offset.x),Xt(a.y,u.offset.y))}return a}applyTransform(o,a=!1){const c=z();ft(c,o);for(let l=0;l<this.path.length;l++){const u=this.path[l];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Yt(c,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),Dt(u.latestValues)&&Yt(c,u.latestValues,u.layout?.layoutBox)}return Dt(this.latestValues)&&Yt(c,this.latestValues,this.layout?.layoutBox),c}removeTransform(o){const a=z();ft(a,o);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!Dt(l.latestValues))continue;let u;l.instance&&(yi(l.latestValues)&&l.updateSnapshot(),u=z(),ft(u,l.measurePageBox())),Rr(a,l.latestValues,l.snapshot?.layoutBox,u)}return Dt(this.latestValues)&&Rr(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==q.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==a;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:f}=this.options;if(!this.layout||!(u||f))return;this.resolvedRelativeTargetAt=q.timestamp;const h=this.getClosestProjectingParent();h&&this.linkedParentVersion!==h.layoutVersion&&!h.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(h&&h.layout?this.createRelativeTarget(h,this.layout.layoutBox,h.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=z(),this.targetWithTransforms=z()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Cf(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ft(this.target,this.layout.layoutBox),cr(this.target,this.targetDelta)):ft(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?this.createRelativeTarget(h,this.target,h.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||yi(this.parent.latestValues)||rr(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,c){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=z(),this.relativeTargetOrigin=z(),We(this.relativeTargetOrigin,a,c),ft(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===q.timestamp&&(c=!1),c)return;const{layout:l,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||u))return;ft(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Ju(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=z());const{target:d}=o;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sr(this.prevProjectionDelta.x,this.projectionDelta.x),Sr(this.prevProjectionDelta.y,this.projectionDelta.y)),pe(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!Nr(this.projectionDelta.x,this.prevProjectionDelta.x)||!Nr(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=qt(),this.projectionDelta=qt(),this.projectionDeltaWithTransform=qt()}setAnimationOrigin(o,a=!1){const c=this.snapshot,l=c?c.latestValues:{},u={...this.latestValues},f=qt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=z(),d=c?c.source:void 0,m=this.layout?this.layout.source:void 0,y=d!==m,g=this.getStack(),p=!g||g.members.length<=1,_=!!(y&&!p&&this.options.crossfade===!0&&!this.path.some(Jf));this.animationProgress=0;let v;this.mixTargetDelta=b=>{const w=b/1e3;Zr(f.x,o.x,w),Zr(f.y,o.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(We(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Zf(this.relativeTarget,this.relativeTargetOrigin,h,w),v&&Ef(this.relativeTarget,v)&&(this.isProjectionDirty=!1),v||(v=z()),ft(v,this.relativeTarget)),y&&(this.animationValues=u,Vf(u,l,this.latestValues,w,_,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(bt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=L.update(()=>{Ke.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Vt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Lf(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(jf),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:u}=o;if(!(!a||!c||!l)){if(this!==o&&this.layout&&l&&na(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||z();const f=Q(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=Q(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}ft(a,c),Yt(a,u),pe(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Of),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const l={};c.z&&Ci("z",o,l,this.animationValues);for(let u=0;u<Ti.length;u++)Ci(`rotate${Ti[u]}`,o,l,this.animationValues),Ci(`skew${Ti[u]}`,o,l,this.animationValues);o.render();for(const u in l)o.setStaticValue(u,l[u]),this.animationValues&&(this.animationValues[u]=l[u]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=ze(a?.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=ze(a?.pointerEvents)||""),this.hasProjected&&!Dt(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const u=l.animationValues||l.latestValues;this.applyTransformsToTarget();let f=kf(this.projectionDeltaWithTransform,this.treeScale,u);c&&(f=c(u,f)),o.transform=f;const{x:h,y:d}=this.projectionDelta;o.transformOrigin=`${h.origin*100}% ${d.origin*100}% 0`,l.animationValues?o.opacity=l===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:o.opacity=l===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const m in xi){if(u[m]===void 0)continue;const{correct:y,applyTo:g,isCSSVariable:p}=xi[m],_=f==="none"?u[m]:y(u[m],l);if(g){const v=g.length;for(let b=0;b<v;b++)o[g[b]]=_}else p?this.options.visualElement.renderState.vars[m]=_:o[m]=_}this.options.layoutId&&(o.pointerEvents=l===this?ze(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(qr),this.root.sharedNodes.clear()}}}function $f(t){t.updateLayout()}function Uf(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:i}=t.layout,{animationType:s}=t.options,r=e.source!==t.layout.source;if(s==="size")pt(u=>{const f=r?e.measuredBox[u]:e.layoutBox[u],h=Q(f);f.min=n[u].min,f.max=f.min+h});else if(s==="x"||s==="y"){const u=s==="x"?"y":"x";wi(r?e.measuredBox[u]:e.layoutBox[u],n[u])}else na(s,e.layoutBox,n)&&pt(u=>{const f=r?e.measuredBox[u]:e.layoutBox[u],h=Q(n[u]);f.max=f.min+h,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+h)});const o=qt();pe(o,n,e.layoutBox);const a=qt();r?pe(a,t.applyTransform(i,!0),e.measuredBox):pe(a,n,e.layoutBox);const c=!Ir(o);let l=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:f,layout:h}=u;if(f&&h){const d=z();We(d,e.layoutBox,f.layoutBox);const m=z();We(m,n,h.layoutBox),Or(d,m)||(l=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Hf(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Wf(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function zf(t){t.clearSnapshot()}function qr(t){t.clearMeasurements()}function Xr(t){t.isLayoutDirty=!1}function Kf(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Yr(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Gf(t){t.resolveTargetDelta()}function qf(t){t.calcProjection()}function Xf(t){t.resetSkewAndRotation()}function Yf(t){t.removeLeadSnapshot()}function Zr(t,e,n){t.translate=j(e.translate,0,n),t.scale=j(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Jr(t,e,n,i){t.min=j(e.min,n.min,i),t.max=j(e.max,n.max,i)}function Zf(t,e,n,i){Jr(t.x,e.x,n.x,i),Jr(t.y,e.y,n.y,i)}function Jf(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Qf={duration:.45,ease:[.4,0,.1,1]},Qr=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ta=Qr("applewebkit/")&&!Qr("chrome/")?Math.round:ot;function ea(t){t.min=ta(t.min),t.max=ta(t.max)}function th(t){ea(t.x),ea(t.y)}function na(t,e,n){return t==="position"||t==="preserve-aspect"&&!Tf(jr(e),jr(n),.2)}function eh(t){return t!==t.root&&t.scroll?.wasRoot}const nh=Gr({attachResizeListener:(t,e)=>ge(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Si={current:void 0},ia=Gr({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Sanitize API HTML before rendering it.

The API output is inserted directly with dangerouslySetInnerHTML in the floating panel, streaming preview, and side panel. A compromised or misconfigured API can inject executable markup into the host page. Sanitize with a strict allowlist, or render plain text, before both preview and insertion.

🧰 Tools
🪛 OpenGrep (1.25.0)

[ERROR] 14-14: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.

(coderabbit.command-injection.exec-js)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/imio/omnia/tinymce/browser/static/omnia-tinymce.js` at line 14, Sanitize
all API-provided HTML before it reaches any dangerouslySetInnerHTML usage in the
floating panel, streaming preview, and side panel. Apply a strict HTML
allowlist, or convert the content to plain text, in the shared rendering path so
both preview and final insertion receive sanitized content; do not render raw
API output.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '--- relevant source files ---\n'
git ls-files | rg 'src/imio/omnia|test_viewlet|omnia-tinymce|viewlet' || true

printf '\n--- token/url references ---\n'
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'omnia_auth_token|_authenticator|authenticator|Authorization|x-imio|csrf|CSRF|token' \
  src tests .

printf '\n--- file sizes ---\n'
for f in src/imio/omnia/tinymce/browser/static/omnia-tinymce.js src/imio/omnia/tinymce/tests/test_viewlet.py; do
  if [ -f "$f" ]; then wc -l "$f"; fi
done

Repository: IMIO/imio.omnia.tinymce

Length of output: 252


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Narrow inspection of the JS URL builder and configuration tests.
sed -n '1,120p' src/imio/omnia/tinymce/browser/static/omnia-tinymce.js
printf '\n---\n'
sed -n '1,180p' src/imio/omnia/tinymce/tests/test_viewlet.py

Repository: IMIO/imio.omnia.tinymce

Length of output: 50380


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for the backend auth/CSRF contract and the test configuration.
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  '_authenticator|X-CSRF|CSRF|authenticator|omnia_auth_token|omnia_base_url|omnia_endpoints' \
  src tests .

printf '\n--- test_viewlet excerpt ---\n'
sed -n '1,220p' src/imio/omnia/tinymce/tests/test_viewlet.py

printf '\n--- js constructor excerpt ---\n'
python3 - <<'PY'
from pathlib import Path
p = Path('src/imio/omnia/tinymce/browser/static/omnia-tinymce.js')
text = p.read_text(encoding='utf-8', errors='replace')
for needle in ['class Ha', '`#c`(e)', '`#u`(e)', 'omnia_auth_token']:
    idx = text.find(needle)
    print(f'\n### {needle} @ {idx}')
    if idx != -1:
        start = max(0, idx - 200)
        end = min(len(text), idx + 700)
        print(text[start:end])
PY

Repository: IMIO/imio.omnia.tinymce

Length of output: 50380


🌐 Web query:

Plone _authenticator header CSRF token request header support

💡 Result:

Plone supports CSRF protection via an authenticator token that can be passed in several ways, including through a specific HTTP request header [1]. To perform CSRF-protected requests in Plone—particularly for AJAX requests—you can include the token in an HTTP header named X-CSRF-TOKEN [2][1][3]. Plone recognizes the CSRF token from the following sources: 1. HTTP Header: X-CSRF-TOKEN (recommended for AJAX) [1][3]. 2. Form Field: A form input field named _authenticator [2][1]. 3. GET Parameter: A URL query parameter named _authenticator [1]. The token itself can be generated programmatically using the createToken function from the plone.protect.authenticator module [2][1]. For many internal forms, Plone's plone.protect package provides automatic protection by including the token when a user is logged in [2]. For custom views or client-side code, you must retrieve the token (often via the authenticator view) and include it in your request as described above [1][4].

Citations:


Keep the CSRF token out of the URL. Plone accepts X-CSRF-TOKEN for these POSTs, so authToken can be sent in a header instead of _authenticator, avoiding leaks through logs and referrers.

🧰 Tools
🪛 OpenGrep (1.25.0)

[ERROR] 14-14: Dynamic command passed to child_process.exec/execSync. Use child_process.execFile or spawn with an argument array instead.

(coderabbit.command-injection.exec-js)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/imio/omnia/tinymce/browser/static/omnia-tinymce.js` at line 14, Move
authToken handling from Ha.#c URL construction into Ha.#u request headers using
the X-CSRF-TOKEN header. Remove the _authenticator query-parameter logic so both
`#e` and `#f` POST requests keep the token out of URLs while preserving existing
headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant