diff --git a/dist/assets/AboutPage-DwEinoFu.js b/dist/assets/AboutPage-DwEinoFu.js deleted file mode 100644 index 4ace540f..00000000 --- a/dist/assets/AboutPage-DwEinoFu.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,L as i}from"./index-D-wwVRoV.js";import{M as l}from"./MarketingShell-BgYQ8Cfp.js";import{P as o}from"./PublicPrimaryButton-FdcHLbCt.js";import{A as s}from"./arrow-right-lAzDeT03.js";function a({kicker:r,title:n,children:c}){return e.jsxs("div",{className:"mt-10 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:r}),e.jsx("h2",{className:"public-section-title mt-3",children:n}),e.jsx("div",{className:"public-body mt-4 space-y-4 leading-relaxed",children:c})]})}function t({title:r,children:n}){return e.jsxs("div",{className:"mt-6 public-card-raised rounded-xl p-5",children:[e.jsx("h3",{className:"public-card-title mb-2",children:r}),e.jsx("div",{className:"public-body space-y-3 leading-relaxed",children:n})]})}function m(){return e.jsx(l,{children:e.jsxs("section",{className:"mx-auto max-w-4xl px-6 pb-20 pt-14 lg:px-8",children:[e.jsxs("div",{className:"public-hero-shell p-8 md:p-12",children:[e.jsx("p",{className:"public-shell-kicker",children:"About ScriptoriumAI"}),e.jsx("h1",{className:"public-page-title mt-4",children:"A Publishing System, Not Just an Editor"}),e.jsx("p",{className:"public-lead mt-5 max-w-3xl",children:"ScriptoriumAI was built around a single conviction: that serious technical and scientific writing deserves infrastructure, not just tooling. It is the only platform that combines native LaTeX compile orchestration, real MuPDF rendering with bidirectional source navigation, cross-document comparison, Git-native local history, structured AI Memory, citation intelligence, Memory Domain intelligence, workspace visualization, autonomous research-agent workflows, provider routing, and specialist studio surfaces in one unified architecture — running identically on desktop and web."}),e.jsxs("div",{className:"mt-8 flex flex-wrap gap-4",children:[e.jsx(o,{asChild:!0,children:e.jsxs(i,{to:"/register",children:[e.jsx(s,{size:14}),"Get Started Free"]})}),e.jsx(i,{to:"/pricing",children:e.jsx("button",{type:"button",className:"public-btn-secondary",children:"View Pricing"})})]})]}),e.jsxs(a,{kicker:"Vision",title:"What ScriptoriumAI is building",children:[e.jsx("p",{children:"Scientific publishing has long suffered a tooling mismatch. Researchers spend their careers working in LaTeX — a system engineered for deterministic, semantically structured document output — but they piece together a fragile chain of separate tools: a text editor, a compile script, a PDF viewer, a citation manager, a diff utility, and a version control workflow all held together manually. When any part of that chain breaks, work stops. When documents grow large, the chain becomes a liability."}),e.jsx("p",{children:"ScriptoriumAI collapses that chain into a single coherent surface. Every component — the compile pipeline, the PDF viewer, the history system, the comparison engine, the AI layer — is designed to know about the others. A compile artifact knows its SyncTeX index. The PDF viewer knows which source line each page region maps to. The comparison engine knows which compilation produced each diff. The AI Memory layer knows the document's structure and the operator's prior decisions. This integration is not cosmetic; it changes what is possible in a single working session."}),e.jsx("p",{children:"The long-term goal is to become the publishing backbone for technical, mathematical, and theoretical corpora — multi-volume works, structured knowledge systems, and high-stakes archival manuscripts — where consistency, reproducibility, and cross-referencing integrity matter as much as the appearance of the final page."})]}),e.jsxs(a,{kicker:"Foundation",title:"Why LaTeX — and why it matters",children:[e.jsxs("p",{children:["LaTeX is not primarily a text editor. It is a document programming and typesetting system. The key distinction is that you do not tell LaTeX how something should look on a given page; you declare what something ",e.jsx("em",{children:"is"})," — a chapter, a theorem, a figure, a citation, an equation — and the system renders those semantic objects consistently according to rules you define once. That single shift — from appearance manipulation to semantic declaration — produces most of LaTeX's structural advantages over conventional word processors."]}),e.jsx("p",{children:"In a word processor, long documents are vulnerable to formatting drift. Styles exist, but the typical workflow continuously intermixes content meaning and local appearance state. Section breaks quietly mutate formatting. Numbering breaks under structural edits. Hidden overrides accumulate. What starts as a clean document gradually becomes a layered state machine that resists change. LaTeX's central enforcement mechanism — the class and preamble as a compile-time rule set — makes consistency not a best effort but a structural property of the system."}),e.jsx("p",{children:"For mathematics and formal notation, the advantage is foundational rather than incremental. LaTeX provides a symbolic grammar with typographically correct spacing, delimiter scaling, multi-line alignment, and consistent equation numbering. A theorem environment, once defined, appears identically everywhere it is used. Cross-references to equations update automatically as the document grows. This is not possible to replicate reliably in a layout-first tool because those tools treat mathematics as positioned artwork rather than as structured semantic content."}),e.jsx("p",{children:"Plain text as source also confers permanent practical advantages. A LaTeX manuscript can be version-controlled with Git, diffed line by line, branched and merged across contributors, and processed by scripts and build pipelines. A binary word-processor document cannot. For multi-volume corpora or any project that will evolve over years, the difference between a text-based and a binary-based authoring format is the difference between manageable and fragile."}),e.jsx("p",{children:"Finally, LaTeX is programmable in a way that word processors are not. You can build reusable class files, custom environments for theorems, definitions, proofs, and concept blocks, consistent notation registries, and automated cross-referencing systems. As a corpus grows, these abstractions become infrastructure. Your formatting and structural governance stop being manual labor and become compiled policy that the system enforces."}),e.jsx("p",{children:"ScriptoriumAI's choice of LaTeX as its primary authoring language is therefore not a nod to academic convention. It is a technical architecture decision. The platform is designed to amplify exactly the capabilities that make LaTeX powerful at scale: deterministic compilation, semantic structure, plain-text version control, programmatic abstraction, and cross-reference integrity."})]}),e.jsxs(a,{kicker:"Platform Capabilities",title:"How each feature works",children:[e.jsx("p",{children:"ScriptoriumAI's feature set is integrated by design. The sections below explain each major capability and how it connects to the others."}),e.jsxs(t,{title:"Native Compile Orchestration",children:[e.jsx("p",{children:"Every project in ScriptoriumAI compiles through a dedicated orchestration layer rather than through a simple shell invocation. Each project holds a compile lock and a persistent build directory. Concurrent projects never corrupt each other's build state. The orchestrator manages retry semantics with deterministic backoff, so a transient LaTeX error on a large document does not require manual intervention to recover."}),e.jsx("p",{children:"When a compile completes, the system delivers a full artifact manifest: output file paths, log paths, the SyncTeX index URI, and artifact entry counts. You are never left wondering whether the compile succeeded or which output files are current. The diagnostics panel surfaces log output with severity buckets and actionable error-to-source navigation so that the path from a LaTeX error to the responsible source line is immediate."})]}),e.jsxs(t,{title:"Real PDF Rendering with Bidirectional SyncTeX Navigation",children:[e.jsx("p",{children:"The PDF viewer in ScriptoriumAI uses genuine MuPDF-grade page rendering — not a browser PDF fallback or a canvas approximation. Pages are rendered from cached bytes via the native engine adapter. For large documents, a virtual page-range contract with LRU-eviction byte caching keeps rendering responsive without preloading the entire manuscript."}),e.jsx("p",{children:"Bidirectional SyncTeX navigation is what makes the compile and the viewer a single integrated surface rather than two separate tools. Click a source line in the editor and the PDF scrolls to the corresponding page position. Click a region of a rendered PDF page and the editor jumps to the source line responsible for that output. This feedback loop — which requires the SyncTeX index from the compile manifest, normalized path matching, and coordinate-aware bounding-box ranking — is wired through the same compile artifact system that produces the build output. It is accurate immediately after every compile."})]}),e.jsxs(t,{title:"Git-Native Local History",children:[e.jsx("p",{children:"Every project in ScriptoriumAI maintains a Git-backed snapshot history. You can create labeled checkpoints at any point in your working session — before a structural refactor, before applying AI-generated changes, before a major section reorganization. Each checkpoint supports diff, restore, and content hydration: restoring a snapshot immediately reloads the editor to the state of that commit."}),e.jsx("p",{children:"The history is local, versioned, and entirely yours. There is no cloud dependency for checkpointing. This is the same plain-text Git infrastructure that makes LaTeX a superior long-term archival format — extended directly into the editing surface so that the version control model is always one action away rather than a separate terminal command."})]}),e.jsxs(t,{title:"Cross-Document Comparison and Remediation",children:[e.jsx("p",{children:"Large corpora often involve comparing documents across versions, contributors, or submission rounds. ScriptoriumAI's cross-document comparison engine runs a PDF visual diff, producing a changed-page heatmap and jump navigation so that reviewers can orient quickly to what changed and where."}),e.jsx("p",{children:"The remediation routing engine is what distinguishes this from a simple diff tool. When integrity issues or diff results are found, the engine automatically routes them to the most appropriate next action — compile, citation review, entity inspection — based on issue subtype. Line-level accept/reject/clear controls allow individual diff chunks to be accepted or discarded, and the apply-accepted flow rewrites the active draft atomically from the accepted chunks. Multi-author review workflows are supported through per-line assignee metadata, bulk assignment, and assignment queue counters visible across the team."})]}),e.jsxs(t,{title:"AI Integration — AI Memory",children:[e.jsx("p",{children:"ScriptoriumAI's AI layer is built around a different premise than a simple AI assistant. The platform maintains structured per-project AI Memory sessions: persistent trees of checkpointed decisions, open questions, and model context that accumulate over the lifetime of a project rather than disappearing between sessions."}),e.jsx("p",{children:"Each session checkpoint is a node in a visual lineage tree. You can fork from any prior decision point and explore a different reasoning path, then restore an earlier node as the active head. The current session mode — head, mounted, or forked — is surfaced as a live badge in the editor toolbar so you always know which reasoning context is active."}),e.jsx("p",{children:"At high-stakes execution points — compilation verification, advanced integrity checks, remediation gates — the system automatically captures a reasoning checkpoint without requiring manual action. The session tree accumulates automatically as work proceeds."})]}),e.jsxs(t,{title:"AI Integration — Source-Grounded Agent Memory",children:[e.jsx("p",{children:"The platform also maintains a source-grounded agent memory layer: a scope-partitioned memory system where every stored fact carries provenance — the document identifier, section pointer, and source quote or hash from which it was derived. Nothing floats free of its origin."}),e.jsx("p",{children:"Memory is partitioned into session, project, workspace, and user-global tiers with strict read/write boundary enforcement. A write-policy gate separates low-risk automatic writes from higher-risk writes that enter a reviewable approval queue. Retention is managed through TTL, pin/unpin, archive tiering, and hard-delete controls."}),e.jsx("p",{children:"Quality scoring tracks confidence, freshness decay, and last-verified timestamps. Retrieval supports two modes: strict-cited (only source-anchored memories that can be traced back to a document passage) and assistive (broader context). A PII and secrets redaction pipeline executes before any write. Contradictions between stored facts are surfaced for explicit resolution rather than silently overwriting earlier conclusions."}),e.jsx("p",{children:"Because the memory layer is bound to the corpus graph — attaching to canonical entities, citations, projects, and commands rather than free-form text — the AI's working knowledge grows with the project in a structured and auditable way."})]}),e.jsxs(t,{title:"AI Integration — Flexible LLM Provider Routing",children:[e.jsx("p",{children:"ScriptoriumAI's AI generation tasks are not locked to a single LLM provider. The platform supports OpenAI, Anthropic, Google Gemini, OpenRouter, Alibaba Cloud Qwen (DashScope), and custom proprietary endpoints — switchable per task through the Settings panel without any code changes."}),e.jsx("p",{children:"Tasks include content rephrasing, equation generation, table generation, and animation scripting. Each task can carry a provider, model, and base URL override in its payload, along with an ordered fallback chain: if the primary provider fails, the system retries automatically through the fallback sequence before reporting an error. Budget governance allows optional per-provider prompt-budget enforcement at the operator level. Task telemetry surfaces provider, model, duration, and any skipped-budget-attempt data for observability."}),e.jsx("p",{children:"For self-hosted deployments, API keys remain server-side environment configuration. The browser stores routing preferences locally, and Scholar+ plan holders can supply personal BYOK keys through the Environment Vault in OpenAPI Routing. In the current activation slice, those BYOK keys remain browser-local and are only forwarded to compatible direct-chat and queued AI assistant requests through a bounded request bridge; they are not persisted by the server."}),e.jsxs("p",{children:[e.jsx("strong",{children:"Current deployment posture:"})," The live product currently exposes managed provider routes rather than public local-model infrastructure. ",e.jsx("em",{children:"Qwen 3.6 Plus"})," remains available as a managed route inside the same provider-neutral control plane, while any future local-model activation is held in documentation until it is deliberately reintroduced into the product contract."]})]}),e.jsxs(t,{title:"Autonomous Research Agent and Studio Surfaces",children:[e.jsx("p",{children:"ScriptoriumAI extends beyond a single inline assistant. The autonomous Research Agent surface launches multi-perspective swarm sessions that explore a topic from different angles, synthesise findings, and keep the resulting work reviewable inside the same routed shell."}),e.jsx("p",{children:"The Skills Manager exposes model-agnostic capability modules, while OpenAPI Routing controls provider tiers, environment-vault status, and BYOK-aware overrides. Together they turn AI behavior into an operator-visible system instead of an opaque background service."}),e.jsx("p",{children:"Whiteboard, MindMap, PDF Intake, AI Diagram Studio, Video Studio, and Manim Visuals Studio are not separate novelty tools. They are routed studio surfaces that preserve handoff context back into the editor, graph, Runboard, and project intelligence layers."})]}),e.jsxs(t,{title:"Collaboration and Review Workflows",children:[e.jsx("p",{children:"ScriptoriumAI supports real-time collaborative editing with presence, cursors, and in-document chat. Structured review threads allow comments to be anchored to specific document regions, with @mention routing to specific collaborators. Follow-mode lets one author track another's cursor in real time. Session handoff transfers active edit authority cleanly when an editor hands off to a reviewer or co-author."}),e.jsx("p",{children:"Role-based access control governs what each participant can read, write, review, or approve across all collaboration and project API surfaces. The patch review queue provides diff previews and approval/reject controls for AI-generated or externally submitted change sets before they are applied to the document."})]}),e.jsxs(t,{title:"Citation Intelligence and Graph Memory",children:[e.jsx("p",{children:"ScriptoriumAI treats citations as first-class tracked entities, not just text strings. BibTeX auto-completion resolves entries from DOI, ArXiv, or URL through CrossRef content negotiation and the ArXiv Atom feed — with automatic DOI upgrade paths when available. The result is always a complete, well-formed BibTeX record, not a best-guess paste."}),e.jsx("p",{children:"Citation graph memory records every addition and removal of cite-keys across your project files, building a timestamped event history that surfaces your most-cited keys and most volatile files. Over time, the citation integrity forecasting engine uses this history to identify which keys are at risk of breakage before your next submission — assigning risk levels based on churn patterns and recorded breakage events."}),e.jsx("p",{children:"LaTeX compile errors are enriched with a plain-English knowledge base covering undefined references, missing packages, math-mode mismatches, and other common categories, with machine-readable fix actions (insert / replace / recompile / install) surfaced directly in the diagnostics panel."})]}),e.jsxs(t,{title:"Memory Domain Intelligence",children:[e.jsx("p",{children:"ScriptoriumAI's Memory Domain intelligence layer extends per-project intelligence across eight domain modules, each backed by an atomic filesystem store with full event history, cap enforcement, and API access."}),e.jsxs("p",{children:[e.jsx("strong",{children:"Governance Drift Memory"})," records a configuration baseline and detects cumulative policy drift across your corpus governance rules — scoring changes as minor, moderate, or severe and surfacing the exact keys that changed. This catches unintentional rule erosion that is invisible in any single diff but significant across hundreds of incremental sessions."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Integration Boundary Memory"})," logs every external tool interaction — PDF Intake, the PDF visual diff engine, Remotion, SimpleMindMap, Zotero, and others — with direction (outbound / inbound / internal), operation type, and timestamp. The summary view shows top-used tools and direction counts so you have an auditable record of every cross-boundary call a project has made."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Provenance and Explainability Ledger"})," links every insight, recommendation, or AI-generated result to its evidence sources — source document references, transformation chain, confidence level, and explanation text. The Explain Insight function retrieves the full chain for any stored insight ID so no AI-driven conclusion is a black box."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Cost-Aware Adaptive Analysis"})," manages a per-project credit budget and adjusts analysis depth (full / standard / shallow) automatically based on remaining credits, repository size, and activity velocity — preventing runaway resource use without manual tuning."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Offline-First Session Memory Capture"})," queues memory events locally when connectivity is degraded and provides a bulk reconciliation path when connectivity is restored, so no session intelligence is silently lost during network interruptions."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Submission Readiness Memory"})," computes a weighted four-dimension score — compile stability (35%), section churn (25%), citation stability (25%), and task density (15%) — and tracks it as a timestamped series. The readiness trend indicator (improving / stable / declining) gives you a data-backed answer to whether your manuscript is moving toward or away from submission-ready status."]})]}),e.jsxs(t,{title:"Workspace Visualization System",children:[e.jsx("p",{children:"The visualization system is a seven-layer architecture for organizing and navigating a complex corpus workspace. Each layer adds a distinct capability without requiring the previous layers to be active."}),e.jsx("p",{children:"Layout presets (V1) provide four curated pane arrangements — Writing, Triage, Graph, and Governance — switchable without losing document context, with pane synchronization that links active selection across panels. Working-set tabs (V2) add a persistent tab bar with pin, reorder, dirty-marking, bulk close, and jump-back/forward navigation. Graph mode heatmaps and cluster expansion (V3) overlay entity density, activity recency, or citation weight onto the corpus graph and let you progressively reveal subgraph structure. Corpus glyph packs (V4) extend the editor glyph system with project-scoped packs of notation shorthand and LaTeX fragments. The governance cockpit (V5) centralizes policy compliance indicators in one operator-facing view. Discovery and collaboration surfaces (V6) integrate search, social proof, and cross-project handoff directly into the visualization shell. External capability surfaces (V7) bring PDF Intake, PDF visual diff, Remotion, SimpleMindMap, and AI Diagram Studio into the visualization layer with stable routed handoffs."})]}),e.jsxs(t,{title:"Corpus Integrity and Governance",children:[e.jsx("p",{children:"At the corpus level, ScriptoriumAI maintains a continuously sealed integrity artifact — a 62-point automated check matrix covering citation integrity, bibliography consistency, cross-reference validity, structural conformance, and governance rule compliance. The governance seal is regenerated after every significant operation and is surfaced in the operator control plane."}),e.jsx("p",{children:"The export conformance matrix runs preflight checks before any publication or archive export, surfacing explicit publish-blockers that must be resolved before the release can proceed. Migration tooling supports deterministic snapshot export with manifest checksums, rollback plan synthesis with risk classification, and irreversible-cutover rehearsal validation."})]}),e.jsxs(t,{title:"Scientific Runtime and Desktop/Web Parity",children:[e.jsx("p",{children:"The scientific runtime lane includes a built-in uv and venv environment manager: probe, install, activate, deactivate, and query runtime status without leaving the editor. Project-scoped runtime preferences persist across sessions, eliminating the environment drift between authoring, data analysis, and figure generation that plagues multi-tool workflows."}),e.jsx("p",{children:"The entire platform runs identically on desktop and web via Tauri. The desktop build is not a wrapper around a web view of reduced capability; it is the same application with the same feature surface, compiled natively. Offline-first enforcement ensures that compile, history, and PDF operations remain fully local unless cloud operations are explicitly invoked. This is a deliberate architectural property, not a fallback mode."})]})]}),e.jsxs(a,{kicker:"Comparative Context",title:"Why not a word processor or a design tool?",children:[e.jsx("p",{children:"The question of why ScriptoriumAI is built on LaTeX rather than on a word processor or a layout tool comes down to the distinction between interactive appearance editing and semantic document programming. Word processors and design editors are optimized for the former. LaTeX is the canonical example of the latter."}),e.jsx("p",{children:"Word processors — including Google Docs and LibreOffice Writer — are excellent for low-barrier drafting, quick collaboration, and short or structurally simple documents. Their weakness emerges at scale: styles coexist with inline overrides, section formatting mutates unpredictably, equation referencing is fragile, and binary document formats make meaningful version control impossible. These are not configuration problems; they are structural properties of the interactive-appearance model."}),e.jsx("p",{children:"Design tools like Affinity Publisher are stronger for visual stability in long layout-heavy documents and excel at hand-crafted, art-directed print work. But their conceptual center is still the page as a designed artifact. If your internal logic — cross-references, equation numbering, bibliography integrity, symbolic consistency — matters as much as the appearance of the page, a design tool is not the right backbone."}),e.jsx("p",{children:"LaTeX's output quality is also not an aesthetic claim. Its line-breaking algorithms, justification logic, math spacing, and float placement are the product of decades of typographic engineering. For text-dense technical manuscripts where consistency, rhythm, and repeatable policy matter, LaTeX's rule-based approach typically produces superior results without requiring per-page human judgment."}),e.jsx("p",{children:'The correct framing is not "LaTeX versus the rest" but "semantic programmable publishing versus interactive layout." ScriptoriumAI is built for the former. For ordinary prose collaboration, a word processor is often the right tool. For visual luxury layout, a design editor is often the right tool. For large, technical, symbolic, recursively structured, long-horizon work — where your internal architecture and cross-referencing integrity are as important as the final page — LaTeX remains the strongest backbone, and ScriptoriumAI is the platform built to make that backbone productive.'})]}),e.jsxs("div",{className:"mt-10 public-card rounded-2xl p-6 text-center",children:[e.jsx("p",{className:"public-section-title",children:"Ready to build on the right foundation?"}),e.jsx("p",{className:"public-body mt-3 max-w-xl mx-auto",children:"Start with the Scholar plan — no commitment required. Or contact us to discuss Studio and enterprise deployment options."}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-center gap-4",children:[e.jsx(o,{asChild:!0,children:e.jsxs(i,{to:"/register",children:[e.jsx(s,{size:14}),"Get Started Free"]})}),e.jsx(i,{to:"/pricing",children:e.jsx("button",{type:"button",className:"public-btn-secondary",children:"View Plans"})})]})]})]})})}export{m as AboutPage}; diff --git a/dist/assets/AffiliateProgramPage-DccP8xMz.js b/dist/assets/AffiliateProgramPage-DccP8xMz.js deleted file mode 100644 index ce9be6ae..00000000 --- a/dist/assets/AffiliateProgramPage-DccP8xMz.js +++ /dev/null @@ -1,6 +0,0 @@ -import{j as e,L as s}from"./index-D-wwVRoV.js";import{c as d,M as o,b as t}from"./MarketingShell-BgYQ8Cfp.js";import{P as r}from"./PublicPrimaryButton-FdcHLbCt.js";import{A as i}from"./arrow-right-lAzDeT03.js";import{U as c}from"./users-B0OVFCFN.js";import{L as p,S as m}from"./shield-check-DmMPB5ob.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const h=d("LineChart",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]),u=[{icon:c,title:"Broad marketplace entry",body:"This launch is open to creators, educators, reviewers, consultants, and technical operators. There is no separate agency or formal-partner lane at launch."},{icon:p,title:"First-party attribution",body:"The target model is first-party plus server-side tracking with affiliate IDs, click IDs, optional sub-IDs, coupon-code fallback, and clean direct URLs."},{icon:h,title:"Auditable reporting",body:"The marketplace is built to explain later why a conversion was credited or denied. Revenue quality matters more than vanity click volume."},{icon:m,title:"Disclosure and compliance",body:"Affiliate content must disclose the material connection clearly and follow privacy-aware tracking, brand-usage, and fraud-control rules."}],x=["LaTeX educators, course creators, and technical publishing trainers","Research-tool reviewers and technical YouTube or newsletter operators","Documentation and scientific-writing consultants joining as standard affiliates","Community operators, template makers, and workflow explainers","Academic productivity channels and technical AI-workflow reviewers","Independent creators who can explain ScriptoriumAI accurately with clear disclosure"],b=[{step:"1",title:"Join the marketplace",body:"Enter through the public onboarding path and declare the channels you plan to use. This is a broad marketplace launch, not a closed formal-partner program."},{step:"2",title:"Use links, codes, and approved copy",body:"Use the marketplace link pack, direct URLs, or coupon-code fallback where links are weak. Pair that with clear disclosure and accurate product framing."},{step:"3",title:"Publish with explicit disclosure",body:"Referral content must make the relationship obvious, keep claims technically accurate, and link readers into the right public route for their use case."},{step:"4",title:"Track, review, and get paid",body:"Attribution, payout eligibility, reversals, and fraud controls are reviewed against auditable events instead of generic click counts."}],f=[{title:"Pricing and plan explainers",description:"Use when the audience needs package, plan, or capability comparisons before trying the product.",to:"/pricing",label:"Open pricing"},{title:"Documentation and feature depth",description:"Use when the audience cares about technical scope, AI-assisted surfaces, or implementation detail.",to:"/docs",label:"Open docs"},{title:"Affiliate resources and brand kit rules",description:"Use when the audience needs disclosure, tracking, asset, payout, or brand-usage guidance.",to:"/affiliate-resources",label:"Open affiliate resources"},{title:"Help center and operational support",description:"Use when the partner context is onboarding, migration questions, or rollout assistance.",to:"/help",label:"Open help center"}],g=["State clearly that the link is part of a partner or affiliate relationship.","Do not present sponsored recommendations as neutral editorial rankings.","Keep claims specific to real shipped capabilities and documented plan scope.","Avoid intrusive popups, coupon-spam surfaces, trademark bidding, or unrelated mass-market ad placements."],k=["Stable affiliate identity plus click-level attribution","Optional sub-IDs for channel and campaign breakdowns","Coupon-code fallback where links are weak or unavailable","Monthly payout review with reversal and fraud controls"];function F(){const l=`${t.contact.emailHref}?subject=Affiliate%20Marketplace%20Onboarding`;return e.jsx(o,{children:e.jsxs("section",{className:"mx-auto max-w-7xl px-6 py-16 lg:px-8",children:[e.jsxs("div",{className:"public-card rounded-3xl p-8 md:p-10",children:[e.jsx("p",{className:"public-shell-kicker",children:"Affiliate Marketplace"}),e.jsx("h1",{className:"public-page-title mt-3 max-w-4xl",children:"Open affiliate onboarding for technical audiences"}),e.jsx("p",{className:"public-lead mt-4 max-w-3xl",children:"ScriptoriumAI is launching its affiliate lane as a broad marketplace. Anyone with a relevant technical audience can join the onboarding path, provided the marketplace rules are followed: clear disclosure, accurate claims, privacy-aware tracking, and no low-intent promotion spam."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(r,{asChild:!0,children:e.jsxs("a",{href:l,children:["Start affiliate onboarding",e.jsx(i,{size:13})]})}),e.jsxs(s,{to:"/affiliate-resources",className:"public-btn-secondary inline-flex items-center gap-2",children:["Open affiliate resources",e.jsx(i,{size:13})]})]}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-2",children:[e.jsx("span",{className:"public-format-pill rounded-full border border-white/20 bg-black/25 px-3 py-1 text-xs leading-5 text-[#F4F6F8]",children:"Open marketplace"}),e.jsx("span",{className:"public-format-pill rounded-full border border-white/20 bg-black/25 px-3 py-1 text-xs leading-5 text-[#F4F6F8]",children:"Attribution-ready"}),e.jsx("span",{className:"public-format-pill rounded-full border border-white/20 bg-black/25 px-3 py-1 text-xs leading-5 text-[#F4F6F8]",children:"Disclosure-first"})]})]}),e.jsx("div",{className:"mt-8 grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:u.map(a=>{const n=a.icon;return e.jsxs("div",{className:"public-card rounded-2xl p-6",children:[e.jsx(n,{size:20,className:"text-[#D8CBAF]"}),e.jsx("h2",{className:"public-card-title mt-4",children:a.title}),e.jsx("p",{className:"public-body mt-2",children:a.body})]},a.title)})}),e.jsxs("div",{className:"mt-8 grid gap-5 lg:grid-cols-[1.1fr_0.9fr]",children:[e.jsxs("div",{className:"public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Marketplace Profiles"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Who this launch is meant for"}),e.jsx("div",{className:"mt-5 grid gap-3 md:grid-cols-2",children:x.map(a=>e.jsx("div",{className:"public-card-raised rounded-xl p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(c,{size:16,className:"mt-1 shrink-0 text-[#D8CBAF]"}),e.jsx("p",{className:"public-body",children:a})]})},a))})]}),e.jsxs("div",{className:"public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Disclosure Rules"}),e.jsx("h2",{className:"public-section-title mt-3",children:"What every marketplace placement must do"}),e.jsx("div",{className:"mt-5 space-y-3",children:g.map(a=>e.jsx("div",{className:"public-card-raised rounded-xl p-4",children:e.jsx("p",{className:"public-body",children:a})},a))})]})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Marketplace Flow"}),e.jsx("h2",{className:"public-section-title mt-3",children:"How the affiliate lane works at launch"}),e.jsx("div",{className:"mt-6 grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:b.map(a=>e.jsxs("div",{className:"public-card-raised rounded-2xl p-5",children:[e.jsxs("p",{className:"text-sm font-semibold text-[#D8CBAF]",children:["Step ",a.step]}),e.jsx("h3",{className:"public-card-title mt-3",children:a.title}),e.jsx("p",{className:"public-body mt-2",children:a.body})]},a.step))})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Tracking and payout"}),e.jsx("h2",{className:"public-section-title mt-3",children:"What the marketplace records and why"}),e.jsx("div",{className:"mt-6 grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:k.map(a=>e.jsx("div",{className:"public-card-raised rounded-2xl p-5",children:e.jsx("p",{className:"public-body",children:a})},a))})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Recommended Destinations"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Use the right landing page for the right audience"}),e.jsx("div",{className:"mt-6 grid gap-4 md:grid-cols-2",children:f.map(a=>e.jsxs("div",{className:"public-card-raised rounded-2xl p-5",children:[e.jsx("h3",{className:"public-card-title",children:a.title}),e.jsx("p",{className:"public-body mt-2",children:a.description}),e.jsx("div",{className:"mt-4",children:e.jsxs(s,{to:a.to,className:"public-btn-secondary inline-flex items-center gap-2",children:[a.label,e.jsx(i,{size:13})]})})]},a.to))})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Marketplace Operations"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Need asset help, a placement review, or a tracking clarification?"}),e.jsx("p",{className:"public-body mt-3 max-w-3xl",children:"Use the support intake if you need a placement review, updated copy, or help with tracking and payout edge cases. For direct marketplace conversations, email the address below. The affiliate resources page holds the current asset and policy baseline."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(r,{asChild:!0,children:e.jsxs(s,{to:"/support#support-request",children:["Open support intake",e.jsx(i,{size:13})]})}),e.jsxs("a",{href:l,className:"public-btn-secondary inline-flex items-center gap-2",children:[t.contact.email,e.jsx(i,{size:13})]})]})]})]})})}export{F as AffiliateProgramPage}; diff --git a/dist/assets/AffiliateResourcesPage-DtWyke4f.js b/dist/assets/AffiliateResourcesPage-DtWyke4f.js deleted file mode 100644 index d650343f..00000000 --- a/dist/assets/AffiliateResourcesPage-DtWyke4f.js +++ /dev/null @@ -1,16 +0,0 @@ -import{j as e,L as i}from"./index-D-wwVRoV.js";import{c as l,M as m,b as t}from"./MarketingShell-BgYQ8Cfp.js";import{P as n}from"./PublicPrimaryButton-FdcHLbCt.js";import{A as a}from"./arrow-right-lAzDeT03.js";import{L as u,S as h}from"./shield-check-DmMPB5ob.js";import{F as x}from"./file-text-Boy8OvW2.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const o=l("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const b=l("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const f=l("Wallet",[["path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4",key:"195gfw"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5",key:"195n9w"}],["path",{d:"M18 12a2 2 0 0 0 0 4h4v-4Z",key:"vllfpd"}]]),g=[{icon:u,title:"Tracking model",body:"Use first-party plus server-side attribution with affiliate IDs, click IDs, optional sub-IDs, coupon-code fallback, and clean direct URLs. The point is auditability, not black-box credit assignment.",bullets:["Stable affiliate identity","Click-level attribution","Coupon fallback","Direct URL support","Server-side conversion events"]},{icon:h,title:"Disclosure and privacy",body:"Marketplace content must disclose the affiliate relationship clearly. Tracking should stay privacy-aware and minimize unnecessary third-party dependence.",bullets:["Visible disclosure near the recommendation","Privacy-aware tracking and consent handling","No hidden endorsements","No dark-pattern distribution"]},{icon:o,title:"Brand and press kit",body:"Use official logos, screenshots, workflow visuals, and approved copy instead of improvising product claims or editing the brand arbitrarily.",bullets:["Primary and monochrome logos","Current screenshots","Approved product descriptions","Usage restrictions","Do-not-say guidance"]},{icon:f,title:"Payout and compliance",body:"Payout unlocks only after identity and tax details are in place. Suspicious behavior can pause approval while attribution and fraud signals are reviewed.",bullets:["Monthly payout cadence","Refund and reversal controls","Identity and tax collection","Fraud review holds","Program suspension for policy breach"]}],j=["Blog posts, newsletters, videos, podcasts, and technical tutorials with explicit disclosure","Course material, documentation breakdowns, and workflow walkthroughs","Clean links, coupon codes, and direct URLs tied to real product context"],k=["Hidden or buried affiliate disclosures","Misleading claims, fake rankings, or unearned badge/status claims","Trademark bidding, confusing domain names, or impersonation","Coupon-site spam, adware, toolbar installs, or generic low-intent traffic floods"],y=["Approved applicants / total applicants","Active affiliates / total approved affiliates","Clicks -> activation -> paid conversion","Net revenue, reversals, and retention by affiliate","Time from conversion to payout approval","Share of volume from top affiliates versus program median"];function D(){const r="/support#support-request",d=`${t.contact.emailHref}?subject=Affiliate%20Marketplace%20Resources`;return e.jsx(m,{children:e.jsxs("section",{className:"mx-auto max-w-7xl px-6 py-16 lg:px-8",children:[e.jsxs("div",{className:"public-hero-shell p-8 md:p-10",children:[e.jsx("p",{className:"public-shell-kicker",children:"Affiliate Resources"}),e.jsx("h1",{className:"public-page-title mt-3 max-w-4xl",children:"Tracking, disclosure, brand-kit, and payout guidance for the open marketplace"}),e.jsx("p",{className:"public-lead mt-4 max-w-3xl",children:"This page is the operating reference for ScriptoriumAI’s broad affiliate marketplace. It covers how attribution works, what assets to use, what disclosures are required, and how payout and fraud controls are handled."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(n,{asChild:!0,children:e.jsxs(i,{to:"/affiliate-program",children:["Open affiliate onboarding",e.jsx(a,{size:13})]})}),e.jsxs(i,{to:r,className:"public-btn-secondary inline-flex items-center gap-2",children:["Open support intake",e.jsx(a,{size:13})]})]})]}),e.jsx("div",{className:"mt-8 grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:g.map(s=>{const p=s.icon;return e.jsxs("div",{className:"public-card rounded-2xl p-6",children:[e.jsx(p,{size:20,className:"text-[#D8CBAF]"}),e.jsx("h2",{className:"public-card-title mt-4",children:s.title}),e.jsx("p",{className:"public-body mt-2",children:s.body}),e.jsx("ul",{className:"mt-4 space-y-1",children:s.bullets.map(c=>e.jsxs("li",{className:"flex items-start gap-2 public-microcopy",children:[e.jsx("span",{className:"mt-[7px] h-1 w-1 shrink-0 rounded-full bg-[#D8CBAF]/60"}),e.jsx("span",{children:c})]},c))})]},s.title)})}),e.jsxs("div",{className:"mt-8 grid gap-5 lg:grid-cols-2",children:[e.jsxs("div",{className:"public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Allowed channels"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Use the marketplace in context-rich surfaces"}),e.jsx("div",{className:"mt-5 space-y-3",children:j.map(s=>e.jsx("div",{className:"public-card-raised rounded-xl p-4",children:e.jsx("p",{className:"public-body",children:s})},s))})]}),e.jsxs("div",{className:"public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Disallowed practices"}),e.jsx("h2",{className:"public-section-title mt-3",children:"What gets a placement rejected or a payout held"}),e.jsx("div",{className:"mt-5 space-y-3",children:k.map(s=>e.jsx("div",{className:"public-card-raised rounded-xl p-4",children:e.jsx("p",{className:"public-body",children:s})},s))})]})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Brand and proof materials"}),e.jsx("h2",{className:"public-section-title mt-3",children:"What the brand kit should include"}),e.jsxs("div",{className:"mt-5 grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"public-card-raised rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(o,{size:18,className:"text-[#D8CBAF]"}),e.jsx("h3",{className:"public-card-title",children:"Visual asset pack"})]}),e.jsx("p",{className:"public-body mt-3",children:"Current logos, monochrome variants, screenshots, workflow crops, and optional motion assets. Use official assets only and do not reshape or recolor the mark to imply unofficial variants."})]}),e.jsxs("div",{className:"public-card-raised rounded-xl p-5",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(x,{size:18,className:"text-[#D8CBAF]"}),e.jsx("h3",{className:"public-card-title",children:"Message library"})]}),e.jsx("p",{className:"public-body mt-3",children:"Short and long product descriptions, use-case blocks, approved comparison guardrails, and explicit wording for AI-assisted features such as AI Memory and AI Diagram Studio."})]})]})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"KPI dashboard"}),e.jsx("h2",{className:"public-section-title mt-3",children:"What the marketplace should actually measure"}),e.jsx("div",{className:"mt-5 grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:y.map(s=>e.jsx("div",{className:"public-card-raised rounded-xl p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(b,{size:16,className:"mt-1 shrink-0 text-[#D8CBAF]"}),e.jsx("p",{className:"public-body",children:s})]})},s))})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Need something else?"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Use support for asset requests, edge-case tracking questions, or payout issues"}),e.jsx("p",{className:"public-body mt-3 max-w-3xl",children:"The marketplace is open at launch, but operational controls still apply. If you need a review on a planned placement, a clarified claim, or help with a tracking edge case, use support or email directly."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(n,{asChild:!0,children:e.jsxs(i,{to:r,children:["Open support intake",e.jsx(a,{size:13})]})}),e.jsxs("a",{href:d,className:"public-btn-secondary inline-flex items-center gap-2",children:[t.contact.email,e.jsx(a,{size:13})]})]})]})]})})}export{D as AffiliateResourcesPage}; diff --git a/dist/assets/ChangelogPage-DgB9RcIb.js b/dist/assets/ChangelogPage-DgB9RcIb.js deleted file mode 100644 index 6897b650..00000000 --- a/dist/assets/ChangelogPage-DgB9RcIb.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./index-D-wwVRoV.js";import{M as r}from"./MarketingShell-BgYQ8Cfp.js";const o=[{date:"2026-06-12",version:"v1.5.4",category:"Deployment Repair & AI Surface Retrenchment",notes:["Repaired the Woodpecker checkout lane so the deploy workflow now clones the intended branch, validates the expected commit SHA, and stops silently drifting onto the wrong revision before build and publish.","Removed public local-model exposure from Home, About, Pricing, Docs, Help Center, the editor chat selector, and OpenAPI Routing; the live product now describes managed provider routing rather than Ollama or local Llama activation.","Added a canonical local-model deployment reference to the repository docs and Writerside set so future self-hosted model rollout can be reintroduced deliberately instead of being reconstructed from stale marketing copy."]},{date:"2026-06-11",version:"v1.5.3",category:"Documentation & Workflow Alignment",notes:["Writerside, Help Center, Docs, Home, Pricing, and Changelog now reflect the Scriptorium front-door workflow canon: operator workbench continuity, bounded memory lanes, provider-neutral routing + BYOK custody, and artifact-retention rules.","Public docs now frame the product as one routed workbench spanning editor, Runboard, search, graph, and studio surfaces instead of a pile of disconnected feature pages.","Landing and pricing copy now call out provider-neutral OpenAPI routing, retention-aware publication bundles, and the difference between meaningful generated artifacts and rebuildable cache residue.","Home-page header branding restored to the larger legacy footprint and expanded for the requested oversized top-left logo treatment."]},{date:"2026-06-09",version:"v1.5.2",category:"Canonical Manual Pack & Product Truth",notes:["Placed the v6.5 deep manual pack into the active Scriptorium documentation tree and added Writerside backfill sequencing rules so feature registry, deep-manual, and public-doc surfaces stop drifting independently.","Retired more legacy Overleaf-facing product language in favor of the current Scriptorium/Claude Prism posture across docs, routes, and compatibility shims.","Closed a wide bug-hunt sweep with passing TypeScript, successful UI build validation, and verified Docker compose syntax after the documentation and naming migration."]},{date:"2026-06-01",version:"v1.5.1",category:"Provider Routing & BYOK Hardening",notes:["Implemented orchestrator contract follow-through so routed AI work has explicit contract coverage instead of ad hoc queue semantics.","Added browser-local BYOK storage plus bounded request-bridge forwarding for compatible direct chat and queued AI assistant tasks.","Expanded server, UI, and live-auth test coverage around provider resolution, routing-tier enforcement, compile artifacts, and the OpenAPI Routing surface."]},{date:"2026-05-31",version:"v1.5.0",category:"Access, Parity & Tier Enforcement",notes:["Landed academic email verification/reminder operations, governance seal, reference sync, compile-storage quota handling, and wider parity closure across gated research, collaboration, and studio surfaces.","Expanded routed tier-enforcement coverage across AI Memory, citation intelligence, Memory Domain, Runboard, PDF Intake, PDF visual diff, research agent, collaboration, and workspace visualization.","Pricing, routing, and authenticated-shell surfaces were updated to match the broadened plan-aware product contract."]},{date:"2026-04-23",version:"v1.4.2",category:"Validation & Surface Sync",notes:["Resolved the P1-P3 UI test-suite breakage wave by restoring missing mocks, replacing stale assertions, and removing orphaned assumptions across public and authenticated surfaces.","Added the internal Scriptorium feature manual so public docs, Help Center, Writerside, Home, Pricing, and Changelog can be kept in sync from one capability baseline.","Stabilized tutorial-mode coverage, app-menu wiring, right-pane guidance, and related regression surfaces without regressing TypeScript or the broader server test posture."]},{date:"2026-04-22",version:"v1.4.1",category:"Editor & Access UX",notes:["Subscription gates now keep their entitlement notice centered on blocked surfaces instead of relying on corner placement or hover-only reveal.","Editor compile now opens the standard Preview tab first so successful output appears in the expected PDF preview lane.","View menu split clarified: PDF Preview Tab and Native PDF Tab now route to distinct editor tabs.","Help Center and editor preference copy updated to reflect the preview-first compile flow and the separate Native PDF inspection lane."]},{date:"2026-04-12",version:"v1.4.0",category:"AI Orchestration & Collaboration",notes:["Research Agent dashboard — launch and track multi-perspective AI research swarm sessions backed by live corpus runs carrying research-agent provenance.","New Research Topic form — configure depth strategy (quick synopsis, standard literature review, deep knowledge graph synthesis), pass context and known URLs, and submit a live research run queue entry.","Skills Manager — browse, search, filter, and toggle model-agnostic AI capability modules; optimistic local overrides persist across sessions.","OpenAPI Routing — configure LLM provider and model per tier (Tier 1/2/3), inspect live API key vault status from the capabilities handshake, and override base URLs for BYOK deployments.","Manim Sandbox — AI-assisted Manim animation authoring with storyboard gallery populated from server artifacts and localStorage, plus render preview with download.","Collaboration production-ready closure (Batch 134): sinceVersion server filter on document state, 5 s remote-change polling loop, useCollaborationPresence heartbeat hook, and Monaco deltaDecorations remote cursor overlays with 8-colour palette and name labels.","LissajousDriftLoader replaces QuantumPulseLoader as the global page loader — Lissajous curve particle trail animation.","Help Center updated with AI Orchestration category covering all five new surfaces."]},{date:"2026-04-07",version:"v1.3.0",category:"Breathe-Memory & Visualization",notes:["Breathe-memory domain — all 8 intelligence modules complete: governance drift detection, integration boundary memory (14 tools), provenance and explainability ledger, cost-aware adaptive analysis depth, offline-first session memory capture, citation integrity forecasting, submission readiness memory (4 dimensions, trend signal), and section churn memory.","Workspace visualization system V1–V7: layout presets, working-set tabs, graph heatmaps and cluster expansion, glyph palette and corpus packs, governance cockpit polish, discovery and collaboration surfaces, external capability surfaces.","Citation intelligence complete: BibTeX auto-completion (DOI/ArXiv/URL), citation graph memory, LaTeX error context knowledge base with 12 patterns and 4 fix action types, and citation integrity forecasting.","Smriti Expansion: cherry-pick decisions, auto-retention compaction, redacted share bundles, offline air-gapped bundle mode, and reasoning quality telemetry opt-in.","Runboard operator surface enhancements FBR-01 through FBR-04: checkpoint-resume posture, stage-oriented visibility, approval-verify cue, and retrospective surface.","Runboard test monolith decomposed across 28 focused thematic suites.","Pricing: 30% volume discount for 50+ seats, self-serve only (no Contact Sales), real-time collaboration included at Student and Scholar tiers."]},{date:"2026-03-28",version:"v1.2.0",category:"External Integration Activation",notes:["MindMap pivots: selected-node handoffs into Search, Corpus Graph, Editor, and Runboard with receiver-side banners and return routes.","Video Studio workflow presets (Corpus Walkthrough, Governance Recap, Remediation Brief) with post-preflight handoff into the routed editor and Runboard.","Diagram Studio workflow presets with stable receiver-side Excalidraw scene review handoff and Runboard receiver banners.","PDF Intake operator surface: pdfmd probe/benchmark, triage buckets, remediation bundles, PDFdelta handoff links, and search-first remediation pivots.","Authenticated shell: real account menu, responsive sidebar collapse, Ctrl+Shift+E explorer toggle, formatting row owns preview visibility.","B2B SaaS paywall: SubscriptionGate component applied across all gated features; tier enforcement middleware with per-plan compile timeout, project cap, and storage quota.","Mirror and submodule integration for iflytek/skillhub, HKUDS/OpenSpace, supermemoryai/supermemory, and litellm."]},{date:"2026-03-20",version:"v1.0.0",category:"General Availability",notes:["Native LaTeX compile orchestration — per-project locking, persistent build directories, retry semantics, and full artifact manifests with SyncTeX index URIs.","Real MuPDF PDF rendering with large-document lazy caching and bidirectional SyncTeX navigation — click a PDF page to jump to source, edit source to scroll the PDF.","Cross-document comparison intelligence — PDFdelta visual diff, remediation routing engine, and line-level proposal accept/reject with multi-author assignee management.","Git-native local history — full checkpoint control with label, diff, restore, and content hydration per project.","AI Memory — persistent session tree with fork/restore operations and live mode tracking in the editor toolbar.","Source-grounded agent memory — scope-partitioned, PII-redacted, quality-scored agent memory with entity-graph binding and contradiction detection.","Real-time collaboration — presence cursors, review threads, mention routing, follow-mode, and session handoff.","Scientific Python runtime — uv/venv environment manager with project-scoped preference persistence and Python version management.","Operator Runboard — stage-oriented run visibility, checkpoint/resume posture, approval/verify transitions, and post-run retrospectives.","Monaco-powered editor with LaTeX syntax, protected regions, document outline navigation, and glyph picker.","Paper2All export pipeline — multi-format publication from a single LaTeX source.","Desktop + web via Tauri — identical experience offline-first on macOS, Windows, and Linux, and in browser."]}];function s(){return e.jsx(r,{children:e.jsxs("section",{className:"mx-auto max-w-5xl px-6 py-16 lg:px-8",children:[e.jsxs("div",{className:"public-hero-shell p-8 md:p-10",children:[e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-[#D8CBAF]",children:"Release Notes"}),e.jsx("h1",{className:"mt-3 text-4xl font-semibold md:text-5xl",children:"Changelog"}),e.jsx("p",{className:"mt-4 max-w-3xl text-sm text-[#8A9099] md:text-base",children:"What's new in ScriptoriumAI — features, improvements, and fixes across the editor, compiler, collaboration, and intelligence surfaces."})]}),e.jsx("div",{className:"mt-8 space-y-0",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-4 top-0 bottom-0 w-px bg-gradient-to-b from-[#D8CBAF]/40 via-[#D8CBAF]/20 to-transparent","aria-hidden":"true"}),e.jsx("div",{className:"space-y-8 pl-12",children:o.map(a=>e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute -left-[2.35rem] top-4 flex h-3 w-3 items-center justify-center",children:e.jsx("span",{className:"h-3 w-3 rounded-full bg-[#D8CBAF]/60 ring-2 ring-[#D8CBAF]/20"})}),e.jsxs("div",{className:"public-card rounded-2xl p-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("h2",{className:"public-section-title",children:a.version}),"category"in a?e.jsx("span",{className:"rounded-full border border-[#D8CBAF]/30 bg-[#D8CBAF]/10 px-2 py-1 text-[10px] uppercase tracking-[0.14em] text-[#D8CBAF]",children:a.category}):null]}),e.jsx("p",{className:"public-microcopy uppercase tracking-[0.14em]",children:a.date})]}),e.jsx("ul",{className:"mt-4 space-y-2",children:a.notes.map(t=>e.jsxs("li",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-[#D8CBAF]/60","aria-hidden":"true"}),e.jsx("span",{className:"public-body",children:t})]},t))})]})]},a.version))})]})})]})})}export{s as ChangelogPage}; diff --git a/dist/assets/DocsPage-DVm6ovlc.js b/dist/assets/DocsPage-DVm6ovlc.js deleted file mode 100644 index 9a97f50c..00000000 --- a/dist/assets/DocsPage-DVm6ovlc.js +++ /dev/null @@ -1,16 +0,0 @@ -import{j as e,L as t}from"./index-D-wwVRoV.js";import{c as n,M as u}from"./MarketingShell-BgYQ8Cfp.js";import{P as m}from"./PublicPrimaryButton-FdcHLbCt.js";import{A as r}from"./arrow-right-lAzDeT03.js";import{B as l}from"./bot-Dw4nx5z7.js";import{C as d,W as o,G as b,N as g,S as p,B as x}from"./workflow-DutrKdOb.js";import{F as f}from"./file-text-Boy8OvW2.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y=n("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c=n("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const h=n("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),k=[{icon:c,title:"Getting Started",href:"/help#getting-started",description:"Sign in, create a project, open the editor, and learn the single-workbench route model.",articles:["Account access","Project creation","Workbench route model","First compile"]},{icon:f,title:"Editor Workspace",href:"/help#editor-compile",description:"Explorer, LaTeX authoring, formatting controls, preview lanes, and artifact-backed compile outputs.",articles:["Three-pane layout","Explorer toggle","Formatting row","Preview, Native PDF, and artifacts"]},{icon:b,title:"History and AI Memory",href:"/help#history-review",description:"Local history, AI Memory, collaboration continuity, and the difference between raw and derived memory lanes.",articles:["Local history","AI Memory","Memory lane boundaries","Real-time collaboration"]},{icon:g,title:"Search and Graph",href:"/help#search-graph-runboard",description:"Search, Corpus Graph, explicit handoffs, and entity inspection workflows.",articles:["Search handoffs","Corpus Graph roots","Entity pivots","Context return routes"]},{icon:h,title:"Runboard and Operations",href:"/help#search-graph-runboard",description:"Operator workbench execution, verification, remediation routing, patch queue, and AI Kanban.",articles:["Runboard purpose","Verification surfaces","Workbench handoffs","AI Kanban"]},{icon:o,title:"Studios and Optional Surfaces",href:"/help#studios",description:"Whiteboard, MindMap, PDF Intake, AI Diagram Studio, Video Studio, and Manim Visuals Studio.",articles:["Whiteboard","MindMap","PDF-to-Markdown intake","Diagram, video, and Manim workflows"]},{icon:d,title:"AI and Integrations",href:"/help#ai-settings",description:"AI Memory, autonomous research-agent workflows, provider-neutral routing, BYOK controls, and Tutorial Mode.",articles:["AI orientation","AI Chat Panel (Qwen/GPT/Claude/Gemini)","Provider-neutral routing + BYOK","Tutorial Mode"]},{icon:p,title:"Citation Intelligence",href:"/help#citation-intelligence",description:"BibTeX auto-completion, citation graph memory, LaTeX error context, and citation integrity forecasting.",articles:["BibTeX from DOI/ArXiv","Citation graph events","Error context + fix suggestions","Integrity forecasting"]},{icon:c,title:"Memory Domain Intelligence",href:"/help#breathe-memory",description:"Governance drift detection, integration boundary memory, provenance ledger, cost-adaptive analysis, offline queue, and submission readiness.",articles:["Governance drift","Provenance explainability","Cost-aware depth","Readiness trend"]},{icon:o,title:"Visualization System",href:"/help#visualization",description:"Layout presets, working-set tabs, graph heatmaps, glyph packs, governance cockpit, and workbench continuity.",articles:["Layout presets V1","Working-set tabs V2","Heatmaps + clusters V3","Governance cockpit V5"]},{icon:l,title:"AI Orchestration",href:"/help#ai-orchestration",description:"Research agent swarms, Skills Manager, OpenAPI routing with BYOK, and Manim animation sandbox.",articles:["Research Agent sessions","Skills catalog + toggle","LLM tier routing","Manim storyboard gallery"]},{icon:y,title:"Self-Hosting and Ops",href:"/help#ops",description:"Where to look for runbooks, architecture docs, and deployment references.",articles:["Runbook","Cutover checklist","Architecture docs","API docs"]}],j=[{label:"Command palette",value:"Ctrl + K",note:"Open global command search"},{label:"Explorer pane",value:"Ctrl + Shift + E",note:"Hide/Show explorer pane"},{label:"Preview pane",value:"Ctrl + P",note:"Hide/Show preview pane"},{label:"Save document",value:"Ctrl + S",note:"Persist current editor state"}],v=[{icon:h,title:"Operator Workbench",body:"Dashboard, editor, search, graph, Runboard, and studios are routed as one workbench with reversible handoffs instead of isolated mini-apps."},{icon:l,title:"Memory Continuity",body:"Local history, AI Memory, collaboration continuity, and durable Memory Domain signals stay distinct so raw authority remains recoverable."},{icon:d,title:"Provider-Neutral AI",body:"OpenAPI Routing exposes tier, provider, model, and BYOK state without locking the product contract to one vendor worldview."},{icon:o,title:"Artifact Lifecycle",body:"Compile bundles, SyncTeX outputs, exports, and publication artifacts are treated differently from rebuildable cache residue and cleanup-only byproducts."}],w=[["Projects","Project dashboard and entry surface"],["Editor","Primary LaTeX workspace"],["Corpus Graph","Entity and relationship exploration"],["Search","Search and inspection with handoff context"],["Runboard","Operational execution and remediation surface"],["Patch Queue","Patch review flow"],["AI Kanban","Board-oriented AI workflow tracking"],["Whiteboard","Whiteboard and scene review surface"],["MindMap","Projection and routed pivots"],["PDF Intake","PDF-to-Markdown intake QA, benchmarking, and remediation handoff"],["AI Diagram Studio","AI-assisted diagram planning, validation, and routed handoff surface"],["Video Studio","Render orchestration, preflight, and handoff surface"],["Memory Domain Panel","Citation graph, governance drift, integration boundary, provenance, cost budget, offline queue, and readiness intelligence — all per-project"],["Layout Presets","Four workspace layout presets (writing / triage / graph / governance) with pane synchronization"],["Research Agent","Multi-perspective AI research swarm sessions — launch, track, and review synthesised topic drafts"],["Skills Manager","Enable and configure model-agnostic AI capability modules across providers"],["OpenAPI Routing","LLM provider routing by tier, environment vault key status, BYOK (Scholar+), and base URL overrides"],["AI Chat Assistant","Inline chat panel in the editor — model selector (GPT-5.4, Claude 4.6, Gemini 3.1, Qwen 3.6 Plus), assistant and coding-agent modes"],["Manim Sandbox","AI-assisted Manim animation authoring with storyboard gallery and render preview"],["Settings","Preferences and integration-facing controls"]];function R(){return e.jsx(u,{children:e.jsxs("section",{className:"mx-auto max-w-7xl px-6 pb-20 pt-14 lg:px-8",children:[e.jsxs("div",{className:"public-hero-shell p-8 md:p-12",children:[e.jsx("p",{className:"public-shell-kicker",children:"Documentation"}),e.jsx("h1",{className:"public-page-title mt-3",children:"ScriptoriumAI Docs"}),e.jsx("p",{className:"public-lead mt-4 max-w-3xl",children:"Product-level documentation for the cross-corpus LaTeX workspace: projects, editor, compile, search, graph, Runboard, AI Memory, citation intelligence, Memory Domain intelligence, provider-neutral AI routing, artifact-backed outputs, and the optional studio surfaces that all remain connected to the same operator workbench."}),e.jsxs("p",{className:"public-body mt-4 max-w-3xl",children:["The repository-maintained canonical capability inventory lives in ",e.jsx("code",{children:"docs/ops/SCRIPTORIUMAI_FEATURE_MANUAL.md"}),". The front-door workflow canon for operator behavior now lives in ",e.jsx("code",{children:"docs/consolidated_workflows/scriptorium/README.md"}),", and both are used to keep this page, the Help Center, and Writerside aligned."]}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(m,{asChild:!0,children:e.jsxs(t,{to:"/help#getting-started",children:["Start with the Help Center ",e.jsx(r,{size:13})]})}),e.jsx(t,{to:"/support#support-request",children:e.jsx("button",{type:"button",className:"public-btn-secondary",children:"Request deeper guidance"})})]})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-5",children:[e.jsx("p",{className:"public-shell-kicker",children:"Quick Reference"}),e.jsx("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:j.map(i=>e.jsxs("div",{className:"public-card-raised rounded-xl p-4",children:[e.jsx("p",{className:"public-microcopy uppercase tracking-[0.1em]",children:i.label}),e.jsx("p",{className:"public-card-title mt-1 text-base",children:e.jsx("kbd",{className:"font-mono text-sm",children:i.value})}),e.jsx("p",{className:"public-microcopy mt-1",children:i.note})]},i.label))})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Current Operating Principles"}),e.jsx("div",{className:"mt-4 grid gap-4 md:grid-cols-2 xl:grid-cols-4",children:v.map(i=>{const a=i.icon;return e.jsxs("div",{className:"public-card-raised rounded-xl p-4",children:[e.jsx(a,{size:18,className:"text-[#D8CBAF]"}),e.jsx("h2",{className:"public-card-title mt-3 text-base",children:i.title}),e.jsx("p",{className:"public-body mt-2",children:i.body})]},i.title)})})]}),e.jsx("div",{className:"mt-8 grid gap-5 md:grid-cols-2 lg:grid-cols-4",children:k.map(i=>{const a=i.icon;return e.jsxs(t,{to:i.href,className:"public-card rounded-2xl p-6 block transition hover:brightness-110",children:[e.jsx(a,{size:20,className:"text-[#D8CBAF]"}),e.jsx("h2",{className:"public-card-title mt-4",children:i.title}),e.jsx("p",{className:"public-body mt-2",children:i.description}),e.jsx("ul",{className:"mt-4 space-y-1",children:i.articles.map(s=>e.jsxs("li",{className:"flex items-center gap-2 public-microcopy",children:[e.jsx("span",{className:"h-1 w-1 rounded-full bg-[#D8CBAF]/50 shrink-0"}),s]},s))})]},i.title)})}),e.jsxs("div",{className:"mt-10 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Authenticated Surface Map"}),e.jsx("h2",{className:"public-section-title mt-3",children:"How the app shell is organized"}),e.jsx("p",{className:"public-body mt-3 max-w-3xl",children:"Once signed in, ScriptoriumAI keeps projects, authoring, inspection, operations, and intelligence in one routed shell. The point is continuity: you should be able to move from a document to a run, from a run to a graph entity, from a graph entity back into the editor, or from a citation integrity alert into a readiness dashboard — without losing context."}),e.jsx("div",{className:"mt-5 grid gap-3 md:grid-cols-2 xl:grid-cols-3",children:w.map(([i,a])=>e.jsxs("div",{className:"public-card-raised rounded-xl p-4",children:[e.jsx("h3",{className:"public-card-title text-base",children:i}),e.jsx("p",{className:"public-body mt-2",children:a})]},i))})]}),e.jsxs("div",{className:"mt-10 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Documentation Scope"}),e.jsxs("div",{className:"mt-4 grid gap-6 md:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"public-card-title",children:"What this public docs page covers"}),e.jsx("p",{className:"public-body mt-2",children:"Product orientation, core surface map, and where to go next if you are evaluating or onboarding into ScriptoriumAI."})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"public-card-title",children:"What lives elsewhere"}),e.jsxs("p",{className:"public-body mt-2",children:["Deep operational references remain in the dedicated runbooks and architecture docs. The public Help Center is the first-stop user-facing reference, while the repository documentation, ",e.jsx("code",{children:"docs/ops/SCRIPTORIUMAI_FEATURE_MANUAL.md"}),", and the Scriptorium workflow pack under ",e.jsx("code",{children:"docs/consolidated_workflows/scriptorium/"})," remain the fuller technical canon."]})]})]}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(t,{to:"/help",children:e.jsxs("button",{type:"button",className:"public-btn-secondary inline-flex items-center gap-2",children:["Open Help Center ",e.jsx(r,{size:13})]})}),e.jsx(t,{to:"/about",children:e.jsxs("button",{type:"button",className:"public-btn-secondary inline-flex items-center gap-2",children:["Read product framing ",e.jsx(x,{size:13})]})}),e.jsx(t,{to:"/affiliate-resources",children:e.jsxs("button",{type:"button",className:"public-btn-secondary inline-flex items-center gap-2",children:["Affiliate resources ",e.jsx(r,{size:13})]})}),e.jsx(t,{to:"/support",children:e.jsxs("button",{type:"button",className:"public-btn-secondary inline-flex items-center gap-2",children:["Contact support ",e.jsx(p,{size:13})]})})]})]})]})})}export{R as DocsPage}; diff --git a/dist/assets/HelpCenterPage-Dq9CNrOI.js b/dist/assets/HelpCenterPage-Dq9CNrOI.js deleted file mode 100644 index e7ad7961..00000000 --- a/dist/assets/HelpCenterPage-Dq9CNrOI.js +++ /dev/null @@ -1,6 +0,0 @@ -import{r as l,j as e,L as i}from"./index-D-wwVRoV.js";import{c as h,M as p,C as u}from"./MarketingShell-BgYQ8Cfp.js";import{P as m}from"./PublicPrimaryButton-FdcHLbCt.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const g=h("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),c=[{id:"getting-started",title:"Getting Started",description:"Account access, project creation, and first-use orientation.",articles:[{id:"account-access",title:"Signing in and entering the workspace",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Use the public ",e.jsx(i,{to:"/login",className:"text-[#D8CBAF] underline underline-offset-2",children:"login"})," or ",e.jsx(i,{to:"/register",className:"text-[#D8CBAF] underline underline-offset-2",children:"register"})," routes. After authentication, ScriptoriumAI routes you into the authenticated shell at ",e.jsx("code",{children:"/app"}),"."]}),e.jsx("p",{className:"mt-2",children:"The shell keeps the project dashboard, editor, graph/search tools, Runboard, and the optional studio surfaces under one authenticated navigation frame."})]})},{id:"new-project",title:"Creating your first project",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Start in the dashboard and choose ",e.jsx("strong",{children:"New Project"}),". ScriptoriumAI uses the native corpus project service, not a legacy backend project path."]}),e.jsx("p",{className:"mt-2",children:"A newly created project opens directly in the editor workspace, where the project file tree, authoring surface, and preview lanes are already connected."})]})},{id:"route-map",title:"Understanding the main app routes",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"The most important authenticated routes are:"}),e.jsxs("ul",{className:"mt-2 list-disc pl-5 space-y-1",children:[e.jsxs("li",{children:[e.jsx("code",{children:"/app"})," for Projects"]}),e.jsxs("li",{children:[e.jsx("code",{children:"/app/editor/:projectId"})," for authoring"]}),e.jsxs("li",{children:[e.jsx("code",{children:"/app/search"})," and ",e.jsx("code",{children:"/app/corpus-graph"})," for inspection"]}),e.jsxs("li",{children:[e.jsx("code",{children:"/app/runboard"})," for operational workflows"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Whiteboard"}),", ",e.jsx("strong",{children:"MindMap"}),", ",e.jsx("strong",{children:"PDF Intake"}),", ",e.jsx("strong",{children:"AI Diagram Studio"}),", and ",e.jsx("strong",{children:"Video Studio"})," for optional studio surfaces"]}),e.jsxs("li",{children:[e.jsx("code",{children:"/app/research-agent"})," and ",e.jsx("code",{children:"/app/research-topic/new"})," for AI research swarm sessions"]}),e.jsxs("li",{children:[e.jsx("code",{children:"/app/skills-manager"})," for enabling model-agnostic AI capabilities"]}),e.jsxs("li",{children:[e.jsx("code",{children:"/app/openapi-routing"})," for LLM provider routing, tier configuration, and environment vault"]}),e.jsxs("li",{children:[e.jsx("code",{children:"/app/manim-sandbox"})," for AI-driven Manim animation authoring and storyboard gallery"]})]})]})},{id:"workbench-model",title:"How the operator workbench is supposed to feel",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"ScriptoriumAI is designed as one editor-centered workbench. The dashboard, editor, search, Corpus Graph, Runboard, and optional studios are routed surfaces inside one shared shell rather than separate products with disconnected state."}),e.jsx("p",{className:"mt-2",children:"In practice, that means you should be able to move from a document to Runboard verification, into Search or Graph inspection, then back into the editor without losing project context or handoff provenance."})]})}]},{id:"editor-compile",title:"Editor and Compile",description:"Explorer, authoring controls, compile flow, preview, and Native PDF.",articles:[{id:"editor-layout",title:"How the editor workspace is laid out",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"The editor is a three-zone workspace:"}),e.jsxs("ul",{className:"mt-2 list-disc pl-5 space-y-1",children:[e.jsx("li",{children:"left: explorer, context, and outline"}),e.jsx("li",{children:"center: LaTeX authoring surface"}),e.jsx("li",{children:"right: Preview, Native PDF, Insights, AI Memory, and Collaboration"})]}),e.jsxs("p",{className:"mt-2",children:["The explorer can be hidden or shown with ",e.jsx("kbd",{className:"rounded bg-white/10 px-1.5 py-0.5 font-mono text-xs",children:"Ctrl + Shift + E"}),". The preview pane can be hidden or shown with ",e.jsx("kbd",{className:"rounded bg-white/10 px-1.5 py-0.5 font-mono text-xs",children:"Ctrl + P"}),"."]})]})},{id:"editor-controls",title:"What the formatting row is for",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"The formatting row is the main high-frequency authoring control area. It now owns the preview visibility control and supports both basic and advanced authoring actions rather than scattering those controls across the shell."}),e.jsx("p",{className:"mt-2",children:"Use it for common text structure, insertion, and workspace visibility tasks while keeping the document title, glyph tools, save, and compile actions in the shared editor chrome."})]})},{id:"compile-preview",title:"Compiling and inspecting output",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["The compile action generates real served project artifacts, including ",e.jsx("code",{children:"bundle.pdf"})," and ",e.jsx("code",{children:"bundle.synctex.gz"}),". Preview and Native PDF both depend on that artifact contract."]}),e.jsx("p",{className:"mt-2",children:"Current editor content is forwarded in compile requests, so the system is no longer limited to stale saved state when generating preview output."}),e.jsxs("p",{className:"mt-2",children:["A normal compile now opens the standard ",e.jsx("strong",{children:"Preview"})," tab first so the result appears in the expected authoring lane. ",e.jsx("strong",{children:"Native PDF"})," remains available as a separate tab for deeper inspection after the compile completes."]})]})},{id:"sync-surfaces",title:"Preview vs Native PDF",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Preview"})," is the fast embedded output lane for normal authoring flow. ",e.jsx("strong",{children:"Native PDF"})," is the deeper PDF-oriented lane for higher-fidelity inspection and SyncTeX-oriented workflows."]}),e.jsxs("p",{className:"mt-2",children:["Use the View menu to switch directly to either ",e.jsx("strong",{children:"PDF Preview Tab"})," or ",e.jsx("strong",{children:"Native PDF Tab"}),". Both are first-class panes in the editor rather than separate external tools."]})]})},{id:"artifact-backed-outputs",title:"Compile artifacts, retained outputs, and disposable cache",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"ScriptoriumAI treats generated outputs in three different ways: authoritative source files, user-facing artifacts, and rebuildable cache residue. Generated does not automatically mean disposable."}),e.jsx("p",{className:"mt-2",children:"Compile bundles, SyncTeX outputs, exported publication artifacts, and saved visualizations should be treated as meaningful project outputs when they are still referenced by the workflow. Temporary cache directories and invalidation-only byproducts are the parts that are safe to rebuild or clear."})]})}]},{id:"history-review",title:"History, AI Memory, and Collaboration",description:"Local history, AI Memory, and multi-user review behavior.",articles:[{id:"local-history",title:"Local history and checkpoints",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Local history is the project-state continuity layer. Use it for checkpoint creation, comparison, and restore. It is meant for document history and recovery, not only for AI state."}),e.jsx("p",{className:"mt-2",children:"Restore flows are designed to preserve reversibility by keeping prior state available through checkpointing rather than destructively replacing your working context."})]})},{id:"ai-memory",title:"AI Memory and checkpoint restore",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"The AI Memory surface stores structured checkpoint history for reasoning, review, and operator continuity. It supports preview-before-restore, checkpoint restore, comments, and lineage-aware state continuity."}),e.jsx("p",{className:"mt-2",children:"Use this when you need to preserve the decision trail around a document workflow, not only the raw file contents."})]})},{id:"memory-lanes",title:"How local history, AI Memory, collaboration, and Memory Domain differ",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Local history"})," is the authoritative lane for project and document checkpoints. ",e.jsx("strong",{children:"AI Memory"})," is the reasoning-continuity lane. ",e.jsx("strong",{children:"Collaboration"})," tracks shared live-session state such as presence, threads, and reconnect-aware save replay. ",e.jsx("strong",{children:"Memory Domain Intelligence"})," stores durable risk and readiness signals such as drift, provenance, and submission-readiness snapshots."]}),e.jsx("p",{className:"mt-2",children:"Assistive summaries or convenience overlays can sit on top of those lanes, but they should remain optional and never silently replace the raw history or evidence-bearing state underneath."})]})},{id:"collaboration",title:"Real-time collaboration",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"ScriptoriumAI supports production-ready concurrent editing. The key user-facing behaviours are:"}),e.jsxs("ul",{className:"mt-2 list-disc pl-5 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Remote cursor decorations"})," — each collaborator's cursor appears as a coloured line highlight inside the Monaco editor with a name label. Up to 8 distinct colours are cycled."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Remote-change application"})," — the editor polls the server every 5 s and applies any newer document version automatically. You will see your collaborators' changes appear without a manual refresh."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Presence heartbeat"})," — the collaboration panel shows who is active and refreshes the collaborator list every 5 s."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Review threads"})," — inline review threads can be anchored to document sections and shared across the team."]})]}),e.jsx("p",{className:"mt-2",children:"Unsafe overlapping edit cases (asymmetric replacement conflicts) are intentionally left explicit instead of auto-merged, because preserving document integrity is more important than speculative merge automation."})]})},{id:"queued-save-replay",title:"What happens if connectivity drops",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"The collaboration layer supports bounded queued-save replay for reconnect scenarios. In practical terms, the system can preserve pending save intent and replay it after connectivity returns, instead of silently pretending a remote save succeeded."})})}]},{id:"search-graph-runboard",title:"Search, Graph, and Runboard",description:"Inspection and operational surfaces beyond the editor.",articles:[{id:"search",title:"What Search is for",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"Search is the main receiver surface for many cross-tool pivots. It is where you inspect document or entity matches, preserve handoff context, and decide whether to move into Corpus Graph, Runboard, or back into the editor."})})},{id:"graph",title:"What Corpus Graph is for",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"Corpus Graph is the entity and relationship exploration surface. It now respects explicit-root handoff context when entered from other routed tools, which keeps graph inspection tied to the exact entity or provenance that sent you there."})})},{id:"runboard",title:"What Runboard is for",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"Runboard is the operator surface for execution, diagnostics, verification, and remediation routing. It is where you inspect run state, queue health, verify-suite surfaces, and action-oriented follow-up rather than treating execution as a background black box."})})},{id:"patches-kanban",title:"Patch Queue and AI Kanban",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"Patch Queue is the review-oriented change lane. AI Kanban is the board-oriented organization lane for agentic workflow, triage, and remediation follow-through. They complement Runboard and the editor rather than replacing them."})})},{id:"paper2all",title:"Paper2All export and publication delivery",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Paper2All is the publication-delivery lane for packaging document outputs beyond a single editor compile. It keeps export-oriented handoff work inside the same operator context as compile, review, and readiness assessment."}),e.jsx("p",{className:"mt-2",children:"Treat it as the final-mile delivery surface once a manuscript is stable enough to leave the drafting loop and enter publication-oriented packaging."})]})}]},{id:"studios",title:"Studios and Optional Surfaces",description:"The specialized routed surfaces beyond the core editor.",articles:[{id:"whiteboard",title:"Whiteboard",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Whiteboard is the product-facing name for the Excalidraw-backed lane. It now fails soft when no stable scene context is available, instead of trapping you behind a hard crash state."}),e.jsx("p",{className:"mt-2",children:"If no scene is available, use a project-aware route or enter through AI Diagram Studio when scene review is the real goal."})]})},{id:"mindmap",title:"MindMap",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"MindMap is no longer a read-only novelty view. It is a routed projection surface with selected-node pivots into Search, Corpus Graph, Editor, and Runboard where stable metadata exists."})})},{id:"pdf-intake",title:"PDF Intake",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"PDF Intake is the PDF-to-Markdown intake and QA surface. It probes adapter readiness, benchmarks canonical PDF source manifests, inspects provenance-heavy results, and supports triage, remediation exports, search-first investigation, and Runboard/PDF compare handoff."})})},{id:"diagram-video",title:"AI Diagram Studio and Video Studio",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"AI Diagram Studio is the product-facing name for the `next-ai-draw-io` lane. It is an AI-assisted diagram surface for planning, enhancing, validating, and routing diagram work through natural-language-driven workflows."}),e.jsx("p",{className:"mt-2",children:"Video Studio is the Remotion-backed orchestration and preflight surface. It prepares template, timing, render-profile, and handoff work, but it does not yet include a model-driven text-to-video or image-to-video generation backend."}),e.jsx("p",{className:"mt-2",children:"Both support explicit routed handoffs instead of ending at isolated summary states. That means they can hand you into Whiteboard, Runboard, or the editor while preserving provenance."})]})}]},{id:"ai-settings",title:"AI, Settings, and Account",description:"Configuration-oriented user questions.",articles:[{id:"ai-orientation",title:"How AI fits into the product",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"AI in ScriptoriumAI is part of the workspace, not a bolt-on chatbot. The important concepts are provider routing, reasoning continuity, source-grounded memory direction, optional assistive overlays, and user/operator control over the environment."}),e.jsx("p",{className:"mt-2",children:"Current AI-enabled surfaces include the AI assistant, AI Memory, AI Diagram Studio, AI Kanban, provider-routed generation tasks, and AI-aware execution or verification flows that preserve model context through the workspace."}),e.jsxs("p",{className:"mt-2",children:["For deeper integration references, use ",e.jsx("code",{children:"docs/CROSS_CORPUS_CANONICAL_CONSOLIDATED.md"})," and ",e.jsx("code",{children:"docs/references/integrations/OPTIONAL_EXTERNAL_REPO_USAGE.md"}),"."]})]})},{id:"provider-neutral-routing",title:"Provider-neutral routing and BYOK at a glance",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"OpenAPI Routing is designed as a provider-neutral control surface. It lets you inspect tier, provider, model, and base-URL choices without treating any single model vendor as the product's default worldview."}),e.jsx("p",{className:"mt-2",children:"Bring Your Own Key is the same way: Scholar+ users can supply personal provider credentials for compatible routes, but those keys remain under first-party Scriptorium controls and are currently forwarded through a bounded request-scoped bridge rather than becoming a hidden server-side black box."})]})},{id:"settings",title:"What Settings controls",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"Settings is the environment-facing preferences surface. Use it for preferences, configuration choices, and integration-facing controls. It is not meant to replace Runboard or editor-level workflow controls."})})},{id:"account-menu",title:"What the account menu is for",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"The top-right avatar area is now a real account menu. Use it for identity glance, account/session actions, and fast pivots such as settings or sign-out rather than treating it as a decorative placeholder."})})},{id:"pricing",title:"Where pricing and subscription details live",body:e.jsx(e.Fragment,{children:e.jsxs("p",{children:["The public ",e.jsx(i,{to:"/pricing",className:"text-[#D8CBAF] underline underline-offset-2",children:"pricing"})," page is the live packaging reference. This Help Center intentionally avoids freezing plan/billing details into a static FAQ when those details may change more often than product surface behavior."]})})},{id:"tutorial-mode",title:"Tutorial Mode and help flags",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Tutorial Mode adds instructional overlay flags to the annotated menu bar entries, account-menu actions, editor chrome controls, formatting-toolbar groups, and right-side workspace controls. When active, hovering over a supported UI element shows a small ",e.jsx("strong",{children:"Tutorial"})," badge with a plain-English description of what that element does."]}),e.jsx("p",{className:"mt-2",children:"To toggle Tutorial Mode:"}),e.jsxs("ol",{className:"mt-2 list-decimal pl-5 space-y-1",children:[e.jsx("li",{children:"Click your avatar/account icon in the top-right of the application shell."}),e.jsxs("li",{children:["Select ",e.jsx("strong",{children:"Enable Tutorial Mode"})," from the account menu."]}),e.jsxs("li",{children:["The mode persists in your browser across refreshes (stored under ",e.jsx("code",{children:"scriptorium.tutorial-mode.v1"}),")."]})]}),e.jsx("p",{className:"mt-2",children:"Tutorial Mode is designed for onboarding. It adds no runtime overhead when disabled — the tooltip wrapper renders children directly without any additional DOM nodes."}),e.jsxs("p",{className:"mt-2",children:["The current canonical feature inventory that public docs and Writerside should mirror is maintained in ",e.jsx("code",{children:"docs/ops/SCRIPTORIUMAI_FEATURE_MANUAL.md"}),"."]}),e.jsxs("p",{className:"mt-2",children:["To deactivate, open the account menu again and select ",e.jsx("strong",{children:"Disable Tutorial Mode"}),"."]})]})}]},{id:"affiliate-marketplace",title:"Affiliate Marketplace",description:"Open-marketplace onboarding, disclosure, tracking, and assets.",articles:[{id:"affiliate-open-marketplace",title:"How the affiliate marketplace works",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"ScriptoriumAI is launching its affiliate lane as a broad marketplace. There is no separate agency or formal partner tier at launch. Creators, educators, reviewers, consultants, and workflow operators all enter through the same public marketplace path."}),e.jsxs("p",{className:"mt-2",children:["Use ",e.jsx(i,{to:"/affiliate-program",className:"text-[#D8CBAF] underline underline-offset-2",children:"Affiliate Program"})," for onboarding and ",e.jsx(i,{to:"/affiliate-resources",className:"text-[#D8CBAF] underline underline-offset-2",children:"Affiliate Resources"})," for assets, rules, and tracking guidance."]})]})},{id:"affiliate-tracking",title:"What the affiliate tracking model includes",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"The target model is first-party plus server-side attribution with affiliate IDs, click IDs, optional sub-IDs, coupon-code fallback, and clean direct URLs. The goal is to keep attribution explainable later instead of treating affiliate credit as a black box."})})},{id:"affiliate-compliance",title:"Disclosure and compliance expectations",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"Affiliate content must clearly disclose the material connection. Channel rules, privacy-aware tracking, allowed placements, and fraud controls are part of the program specification, not optional fine print."})})}]},{id:"citation-intelligence",title:"Citation Intelligence",description:"BibTeX auto-completion, citation graph memory, LaTeX error context, and integrity forecasting.",articles:[{id:"bibtex-autocomplete",title:"BibTeX auto-completion from DOI and ArXiv",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"ScriptoriumAI can look up and generate a complete BibTeX entry from a DOI, ArXiv ID, or URL. Use the citation lookup route in the editor or Runboard to retrieve properly formatted entries without leaving the workspace."}),e.jsx("p",{className:"mt-2",children:"DOI resolution uses CrossRef content negotiation. ArXiv IDs resolve to the Atom feed and upgrade to a DOI-linked entry when available. Arbitrary URLs are dispatched through the best available resolver."})]})},{id:"citation-graph-memory",title:"Citation graph memory and event tracking",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Every time cite-keys are added or removed from a LaTeX file, ScriptoriumAI can record a citation graph event — capturing which keys appeared, which disappeared, and the net delta for that commit or session. Over time this builds a per-project citation history."}),e.jsx("p",{className:"mt-2",children:"The citation summary surfaces your top-cited keys and most volatile files, giving you an empirical picture of how citation dependencies are evolving across the manuscript."})]})},{id:"reference-sync",title:"Reference sync and bibliography continuity",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Reference sync keeps your bibliography workflow connected to the writing surface instead of forcing manual export-import loops. It is intended for citation continuity: keeping libraries, cite-keys, and project-local bibliography state from drifting apart."}),e.jsx("p",{className:"mt-2",children:"Use it when you need bibliographic updates to stay traceable inside the same corpus and review workflow as the manuscript itself."})]})},{id:"latex-error-context",title:"LaTeX error context and fix suggestions",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"The compile diagnostics panel enriches raw LaTeX errors with plain-English explanations and actionable fix suggestions from a built-in knowledge base covering undefined references, missing packages, math mode mismatches, and other common failure categories."}),e.jsx("p",{className:"mt-2",children:"Each enriched error includes a broken-versus-fixed code example and machine-readable fix actions (insert / replace / recompile / install) so remediation can be applied directly from the panel."})]})},{id:"citation-forecast",title:"Citation integrity forecasting",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"The citation integrity forecast analyzes your citation graph event history to predict which cite-keys are at risk of breakage before your next submission. High-churn keys — those frequently added and removed across sessions — are flagged with a risk level (low / medium / high)."}),e.jsx("p",{className:"mt-2",children:"Citation breakages (undefined citations, missing BibTeX entries, key renames, moved files) can also be recorded explicitly so the forecast model improves over time."})]})}]},{id:"breathe-memory",title:"Memory Domain Intelligence",description:"Governance drift, integration boundary, provenance ledger, cost-adaptive analysis, offline queue, section churn, and submission readiness.",articles:[{id:"governance-drift",title:"Governance drift detection",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"ScriptoriumAI can record a governance configuration baseline for your project and then detect drift as your corpus governance rules evolve. When a detect-drift check is run, the system compares the current configuration against the baseline and returns a drift score (minor / moderate / severe) along with the specific keys that changed."}),e.jsx("p",{className:"mt-2",children:"This is useful for catching unintentional rule erosion in long-horizon projects where policy changes are made incrementally and the total cumulative drift is not obvious from any single diff."})]})},{id:"integration-boundary",title:"Integration boundary memory",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Every tool that ScriptoriumAI integrates with — PDF Intake, the PDF visual diff engine, SimpleMindMap, AI Diagram Studio, Remotion, Zotero, and others — can emit integration boundary events. These events record which tool was called, what operation was performed, the call direction, and when it happened."}),e.jsx("p",{className:"mt-2",children:"The integration boundary summary shows your top-used tools, direction counts (outbound / inbound / internal), and a full timestamped event log — giving you an auditable record of every external interaction a project has had."})]})},{id:"provenance-ledger",title:"Provenance and explainability ledger",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Every insight, suggestion, or AI-generated result in ScriptoriumAI can be linked to a provenance entry that records where it came from: which source references were used, what transformations were applied, what confidence level was assigned, and how the conclusion was reached."}),e.jsxs("p",{className:"mt-2",children:["Use the ",e.jsx("em",{children:"Explain Insight"})," function to retrieve the full provenance chain for any stored insight ID — so any AI-driven recommendation can be traced back to its evidence sources rather than treated as a black-box assertion."]})]})},{id:"cost-adaptive-analysis",title:"Cost-aware adaptive analysis depth",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"For resource-intensive analysis operations, ScriptoriumAI tracks a per-project credit budget. The adaptive depth engine automatically adjusts analysis depth — full, standard, or shallow — based on remaining credits, repository size, and recent activity velocity."}),e.jsx("p",{className:"mt-2",children:"Operators can view the current budget, update the depth policy, and monitor adaptive depth recommendations from the Memory Domain panel. Credits replenish according to the configured policy cycle."})]})},{id:"offline-queue",title:"Offline-first session memory capture",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"When a session is offline or connectivity is degraded, ScriptoriumAI queues memory events locally rather than silently dropping them. When connectivity is restored, queued events can be reconciled in a single bulk operation."}),e.jsx("p",{className:"mt-2",children:"The offline queue is visible in the Memory Domain panel so you always know how many events are pending reconciliation and can trigger reconciliation manually when needed."})]})},{id:"submission-readiness",title:"Submission readiness memory and trend tracking",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"ScriptoriumAI computes a per-project submission readiness score across four weighted dimensions: compile stability (35%), section churn (25%), citation stability (25%), and task density (15%). Scores map to status levels: high risk, moderate risk, approaching ready, or ready."}),e.jsx("p",{className:"mt-2",children:"Readiness snapshots are recorded over time so you can track whether your manuscript is improving or declining in submission-readiness. The trend indicator — improving, stable, or declining — is based on the delta between your most recent and oldest recorded snapshots."})]})}]},{id:"visualization",title:"Workspace Visualization System",description:"Layout presets, working-set tabs, graph heatmaps, glyph packs, governance cockpit, and external capability surfaces.",articles:[{id:"layout-presets",title:"Layout presets and pane synchronization",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"ScriptoriumAI ships four workspace layout presets — Writing, Triage, Graph, and Governance — each configuring a curated pane arrangement optimized for that workflow. Switch between presets from the layout bar without losing your current document context."}),e.jsx("p",{className:"mt-2",children:"Pane synchronization links the active selection across panels so that selecting an entity in Corpus Graph, for example, also highlights it in the Search or Editor surface."})]})},{id:"working-set-tabs",title:"Working-set tabs and jump history",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"The working-set tab bar tracks the documents and surfaces you have open in the current session. Tabs can be pinned (persisted across sessions), reordered, marked dirty, and closed individually or in bulk (close all unpinned)."}),e.jsx("p",{className:"mt-2",children:"Jump back and forward navigation lets you retrace your path through the session without relying on browser history. The maximum working set enforces a reasonable open-tab cap to keep the shell performant."})]})},{id:"graph-heatmaps",title:"Graph heatmaps and cluster expansion",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"Graph mode in the Corpus Graph surface supports heatmap overlays that visualize entity density, activity recency, or citation weight. Cluster expansion lets you progressively reveal subgraph structure without rendering the full graph at once."})})},{id:"glyph-packs",title:"Glyph palette and corpus glyph packs",body:e.jsx(e.Fragment,{children:e.jsx("p",{children:"The editor glyph system supports corpus-aware glyph packs — structured collections of frequently used symbols, notation shorthand, or domain-specific LaTeX fragments. Glyph bootstrap respects the live server cap. Packs can be switched or extended per project."})})}]},{id:"ai-orchestration",title:"AI Orchestration and Agent Tools",description:"Autonomous research-agent swarms, Skills Manager, OpenAPI routing configuration, and Manim animation sandbox.",articles:[{id:"research-agent-overview",title:"What the autonomous Research Agent is and how it works",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["The Research Agent surface at ",e.jsx("code",{children:"/app/research-agent"})," manages multi-perspective research swarm sessions. Each session launches a coordinated batch of sub-agents that explore a topic from different academic angles, synthesise findings, and store results as corpus runs."]}),e.jsxs("p",{className:"mt-2",children:["Sessions are created as live corpus runs via ",e.jsx("code",{children:"/api/corpus/runs"})," using ",e.jsx("code",{children:"kind=research_agent"})," plus a structured provenance payload. Pending sessions remain visible on the dashboard until a worker claims and executes them."]}),e.jsxs("p",{className:"mt-2",children:["Session status badges reflect the live state returned by the server: ",e.jsx("strong",{children:"active"})," (swarm in progress), ",e.jsx("strong",{children:"completed"})," (results ready), ",e.jsx("strong",{children:"failed"})," (swarm error), and ",e.jsx("strong",{children:"pending"})," (queued but not yet started). The dashboard separates active and completed sessions into tabs and shows aggregate counters at the top."]})]})},{id:"new-research-topic",title:"Launching a new research swarm",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Use ",e.jsx("code",{children:"/app/research-topic/new"})," to configure and launch a new research session. You must provide a topic title. Optionally supply background context or known URLs and choose a depth strategy:"]}),e.jsxs("ul",{className:"mt-2 list-disc pl-5 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Quick synopsis"})," — fast semantic sweep for first-pass orientation"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Standard literature review"})," — broader synthesis with citation graph context"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Deep knowledge graph synthesis"})," — multi-pass deep dive with contradiction detection and structured synthesis"]})]}),e.jsx("p",{className:"mt-2",children:"Known URLs and research constraints are passed through the run provenance so the orchestration layer can recover the operator intent when the queued run is picked up."})]})},{id:"skills-manager",title:"Skills Manager — enabling and disabling AI capabilities",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["The Skills Manager at ",e.jsx("code",{children:"/app/skills-manager"})," shows the full catalog of model-agnostic AI capabilities available in your installation. Skills are provider-neutral building blocks — they work across different LLM backends and can be enabled or disabled without restarting the system."]}),e.jsxs("p",{className:"mt-2",children:["Use the search bar to filter by name and the category dropdown to narrow by domain (for example ",e.jsx("em",{children:"formatting"}),", ",e.jsx("em",{children:"compilation"}),", or ",e.jsx("em",{children:"exploration"}),"). The enabled count badge at the top reflects the current local override state."]}),e.jsxs("p",{className:"mt-2",children:["Toggles write an optimistic local override immediately so you see the change without waiting for a server round-trip. The override is persisted to ",e.jsx("code",{children:"localStorage"})," under the key ",e.jsx("code",{children:"scriptorium.skills.enabled-overrides.v1"})," and reconciled with the live catalog when the backend is available."]})]})},{id:"openapi-routing",title:"OpenAPI Routing — LLM providers, tiers, and environment vault",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["The OpenAPI Routing surface at ",e.jsx("code",{children:"/app/openapi-routing"})," controls which LLM provider and model is used for each analysis tier. ScriptoriumAI uses three tiers:"]}),e.jsxs("ul",{className:"mt-2 list-disc pl-5 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Tier 1"})," — high-priority tasks requiring maximum capability (complex reasoning, long-context synthesis)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Tier 2"})," — standard analysis tasks (citations, entity extraction, inline suggestions)"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Tier 3"})," — background and lightweight tasks (spell check, formatting hints, quick lookups)"]})]}),e.jsxs("p",{className:"mt-2",children:["For each tier, choose from the supported provider/model options. The ",e.jsx("strong",{children:"Sync from Server"})," button fetches the current capabilities handshake and updates the key vault status badges — showing whether each provider currently has a live API key configured in the server environment."]}),e.jsx("p",{className:"mt-2",children:"If the server policy locks base URL overrides, the base URL field will be read-only. Otherwise, you can supply a custom base URL to point a provider at a local or proxied endpoint. Tier/provider preferences remain local in this checkout; the active server bridge currently applies to compatible Scholar+ BYOK direct-chat requests and queued AI assistant tasks."})]})},{id:"manim-sandbox",title:"Manim Sandbox — AI animation authoring and storyboard gallery",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["The Manim Sandbox at ",e.jsx("code",{children:"/app/manim-sandbox"})," is a two-panel surface: the left side is the interactive Manim authoring panel (code + prompt input for AI-assisted scene generation) and the right side is the storyboard gallery showing rendered visualization artifacts."]}),e.jsx("p",{className:"mt-2",children:"The gallery is populated from two sources in order of preference:"}),e.jsxs("ol",{className:"mt-2 list-decimal pl-5 space-y-1",children:[e.jsxs("li",{children:["Server artifacts returned by ",e.jsx("code",{children:"listCorpusArtifacts"})," filtered to ",e.jsx("code",{children:"type=manim"}),", ",e.jsx("code",{children:"visualization"}),", and ",e.jsx("code",{children:"animation"})]}),e.jsxs("li",{children:["Locally rendered entries stored in ",e.jsx("code",{children:"localStorage"})," under ",e.jsx("code",{children:"scriptorium.visualizations.local-renders.v1"})]})]}),e.jsxs("p",{className:"mt-2",children:["Selecting a gallery entry opens the ",e.jsx("strong",{children:"Render Preview"})," panel, which displays the video or image artifact and provides a direct download link. The ",e.jsx("strong",{children:"View All Visualizations"})," link at the bottom of the gallery navigates to the full Visualizations surface at ",e.jsx("code",{children:"/app/visualizations"}),"."]}),e.jsxs("p",{className:"mt-2",children:["The AI Visualizer backend (",e.jsx("code",{children:"LaTeX-OCR-Service"})," render endpoint) must be running for new renders to be submitted. Existing local renders are always accessible regardless of server availability."]})]})},{id:"ai-chat-panel",title:"Using the AI Chat Panel",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"The AI Chat Panel lives inside the editor workspace as a collapsible right-hand pane. Open it by clicking the chat icon in the editor toolbar or pressing the shortcut key configured in your workspace settings."}),e.jsx("p",{className:"mt-2",children:"The panel has two operating modes:"}),e.jsxs("ul",{className:"mt-2 list-disc pl-5 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Assistant mode"})," — general academic writing help, rephrasing, summaries, and Q&A against your document context."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Coding Agent mode"})," — sends full file context and requests structured code or LaTeX edits. Replies include proposed diffs or replacement blocks."]})]}),e.jsx("p",{className:"mt-2",children:"Supported models (selectable from the dropdown in the panel header):"}),e.jsxs("ul",{className:"mt-2 list-disc pl-5 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"ChatGPT 5.4"})," — OpenAI cloud (requires ",e.jsx("code",{children:"OPENAI_API_KEY"}),")"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Claude 4.6 Sonnet"})," — Anthropic cloud (requires ",e.jsx("code",{children:"ANTHROPIC_API_KEY"}),")"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Gemini 3.1"})," — Google cloud (requires ",e.jsx("code",{children:"GEMINI_API_KEY"}),")"]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Qwen 3.6 Plus"})," — managed DashScope-backed route (requires ",e.jsx("code",{children:"QWEN_API_KEY"})," if you are using your own quota)"]})]}),e.jsxs("p",{className:"mt-2",children:["Responses stream token by token. Click the ",e.jsx("strong",{children:"×"})," button to cancel a running request. The abort is clean — partial tokens are discarded and the panel returns to its ready state."]})]})},{id:"byok-guide",title:"BYOK — Bring Your Own API Key (Scholar+)",body:e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Scholar and higher plan holders can supply personal provider API keys through the ",e.jsx("strong",{children:"Environment Vault"})," section of ",e.jsx(i,{to:"/app/openapi-routing",className:"text-[#D8CBAF] underline underline-offset-2",children:"OpenAPI Routing"}),". This lets you use your own billing accounts for OpenAI, Anthropic, Google, Qwen, or OpenRouter instead of server-provisioned keys."]}),e.jsx("p",{className:"mt-2",children:"How to use it:"}),e.jsxs("ol",{className:"mt-2 list-decimal pl-5 space-y-1",children:[e.jsxs("li",{children:["Open ",e.jsx("code",{children:"/app/openapi-routing"})," and scroll to ",e.jsx("strong",{children:"OpenAPI (BYOK) — Bring Your Own Key"})," in the Environment Vault card."]}),e.jsxs("li",{children:["Paste your key into the corresponding field (e.g. ",e.jsx("code",{children:"OPENAI_API_KEY"})," for OpenAI, ",e.jsx("code",{children:"QWEN_API_KEY"})," for Qwen/DashScope)."]}),e.jsxs("li",{children:["Keys are stored locally in your browser and are sent in request headers — they are ",e.jsx("strong",{children:"never stored on the server"}),"."]})]}),e.jsx("p",{className:"mt-2 text-yellow-300/80",children:"⚠️ The current activation slice is request-scoped, not fully persisted server-side. Compatible direct chat and queued AI assistant tasks now forward OpenAI/OpenRouter/Qwen BYOK keys through explicit request headers, while broader provider adapters, deeper persistence, and non-LLM worker families remain future work."}),e.jsxs("p",{className:"mt-2",children:["For Qwen, the default base URL is ",e.jsx("code",{children:"https://dashscope.aliyuncs.com/compatible-mode/v1"}),". Local-model deployment is intentionally not part of the live product surface at this time."]})]})},{id:"qwen-managed-route",title:"Qwen 3.6 Plus — managed route",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"Qwen 3.6 Plus is available as a managed provider route inside ScriptoriumAI's provider-neutral orchestration layer."}),e.jsxs("ul",{className:"mt-2 list-disc pl-5 space-y-1",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Managed product route"})," — use the platform-managed DashScope-backed route when it is available for your plan."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"BYOK route"})," — attach your own ",e.jsx("code",{children:"QWEN_API_KEY"})," in OpenAPI Routing if you want to use your own quota instead of the managed pool."]})]}),e.jsxs("p",{className:"mt-2",children:["To select Qwen in the editor, open the AI Chat Panel and choose ",e.jsx("strong",{children:"Qwen 3.6 Plus"})," from the model dropdown. For routing-level use, set Tier 3 to ",e.jsx("strong",{children:"Qwen 3.6 Plus"})," in OpenAPI Routing."]}),e.jsx("p",{className:"mt-2",children:"Local-model deployment is not currently exposed on the live product. Operational planning for any future local-model activation is kept in repository documentation rather than presented as a live end-user feature today."})]})}]},{id:"ops",title:"Ops and Self-Hosting References",description:"Where to go for technical and operational references.",articles:[{id:"ops-docs",title:"Operational source of truth",body:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"If you are self-hosting or operating ScriptoriumAI, the main references are the repository docs, especially:"}),e.jsxs("ul",{className:"mt-2 list-disc pl-5 space-y-1",children:[e.jsx("li",{children:e.jsx("code",{children:"docs/ops/RUNBOOK.md"})}),e.jsx("li",{children:e.jsx("code",{children:"docs/ops/PRODUCTION_CUTOVER_AND_ROLLBACK_CHECKLIST.md"})}),e.jsx("li",{children:e.jsx("code",{children:"docs/ops/SCRIPTORIUMAI_LOCAL_MODEL_DEPLOYMENT_REFERENCE.md"})}),e.jsx("li",{children:e.jsx("code",{children:"docs/STACK_SETUP_CANONICAL_CONSOLIDATED.md"})}),e.jsx("li",{children:e.jsx("code",{children:"docs/CROSS_CORPUS_CANONICAL_CONSOLIDATED.md"})}),e.jsx("li",{children:e.jsx("code",{children:"docs/TEST_SUITE_STATUS.md"})})]})]})},{id:"support-path",title:"When to use Support instead",body:e.jsx(e.Fragment,{children:e.jsxs("p",{children:["Use the ",e.jsx(i,{to:"/support",className:"text-[#D8CBAF] underline underline-offset-2",children:"Support"})," page when you need deployment help, product clarification, or guidance that is not already covered in the public help content."]})})}]}];function x({article:r}){const[s,a]=l.useState(!1);return e.jsxs("div",{className:"border-b border-white/5 last:border-0",children:[e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between gap-3 py-3.5 text-left",onClick:()=>a(n=>!n),children:[e.jsx("span",{className:"public-card-title text-base",children:r.title}),e.jsx(u,{size:15,className:`shrink-0 text-[#8A9099] transition-transform ${s?"rotate-180":""}`})]}),s&&e.jsx("div",{className:"public-body space-y-2 pb-5 leading-relaxed",children:r.body})]})}function f({category:r}){const[s,a]=l.useState(!1);return e.jsxs("div",{className:"public-card rounded-2xl p-6",children:[e.jsxs("button",{type:"button",className:"flex w-full items-start justify-between gap-4 text-left",onClick:()=>a(n=>!n),children:[e.jsxs("div",{children:[e.jsx("h2",{className:"public-section-title text-xl",children:r.title}),e.jsx("p",{className:"public-body mt-1",children:r.description})]}),e.jsx(g,{size:18,className:`mt-1 shrink-0 text-[#8A9099] transition-transform ${s?"rotate-90":""}`})]}),s&&e.jsx("div",{className:"mt-5 divide-y divide-white/5",children:r.articles.map(n=>e.jsx(x,{article:n},n.id))})]})}function v(){const[r,s]=l.useState(""),a=l.useMemo(()=>{const t=r.trim().toLowerCase();return t?c.map(o=>({...o,articles:o.articles.filter(d=>d.title.toLowerCase().includes(t))})).filter(o=>o.articles.length>0):c},[r]),n=[{label:"Getting Started",href:"#getting-started"},{label:"Editor and Compile",href:"#editor-compile"},{label:"Search, Graph, and Runboard",href:"#search-graph-runboard"},{label:"Studios",href:"#studios"},{label:"Citation Intelligence",href:"#citation-intelligence"},{label:"Memory Domain",href:"#breathe-memory"},{label:"Visualization System",href:"#visualization"},{label:"AI Orchestration",href:"#ai-orchestration"},{label:"Affiliate Marketplace",href:"#affiliate-marketplace"}];return e.jsx(p,{children:e.jsxs("section",{className:"mx-auto max-w-4xl px-6 pb-20 pt-14 lg:px-8",children:[e.jsxs("div",{className:"public-hero-shell p-8 md:p-10",children:[e.jsx("p",{className:"public-shell-kicker",children:"Help Center"}),e.jsx("h1",{className:"public-page-title mt-3",children:"How ScriptoriumAI works"}),e.jsx("p",{className:"public-lead mt-4 max-w-2xl",children:"Use this page when you need route-level orientation, workflow answers, and the main operating rules around workbench continuity, memory lanes, provider routing, and artifact-backed outputs without reading the deeper repository docs."}),e.jsxs("div",{className:"mt-6 flex max-w-lg items-center gap-3 rounded-xl border border-white/15 bg-black/25 px-4 py-3 focus-within:border-[#D8CBAF]/50 transition-colors",children:[e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"shrink-0 text-[#8A9099]","aria-hidden":"true",children:[e.jsx("circle",{cx:"11",cy:"11",r:"8"}),e.jsx("path",{d:"m21 21-4.35-4.35"})]}),e.jsx("input",{type:"search",placeholder:"Search articles",value:r,onChange:t=>s(t.target.value),className:"flex-1 bg-transparent text-sm outline-none placeholder:text-[#8A9099]"})]})]}),e.jsx("div",{className:"mt-6 grid gap-3 sm:grid-cols-2 lg:grid-cols-4",children:n.map(t=>e.jsx("a",{href:t.href,className:"public-card rounded-xl p-4 transition hover:brightness-110",children:e.jsx("span",{className:"public-card-title text-sm",children:t.label})},t.label))}),e.jsx("div",{className:"mt-8 space-y-4",children:a.length===0?e.jsxs("div",{className:"public-card rounded-2xl p-8 text-center",children:[e.jsxs("p",{className:"public-lead",children:["No help articles matched ",e.jsx("strong",{children:r}),"."]}),e.jsx("button",{type:"button",onClick:()=>s(""),className:"mt-3 text-sm text-[#D8CBAF] underline underline-offset-2",children:"Clear search"})]}):a.map(t=>e.jsx("div",{id:t.id,children:e.jsx(f,{category:t})},t.id))}),e.jsxs("div",{className:"mt-10 public-card rounded-2xl p-6 text-center",children:[e.jsx("p",{className:"public-section-title",children:"Still need help?"}),e.jsx("p",{className:"public-body mt-2",children:"Use the support surface for questions that need operator follow-up, deployment help, or product clarification beyond this public help content."}),e.jsxs("div",{className:"mt-5 flex flex-wrap justify-center gap-3",children:[e.jsx(m,{asChild:!0,children:e.jsx(i,{to:"/support#support-request",children:"Submit a Request"})}),e.jsx(i,{to:"/docs",children:e.jsx("button",{type:"button",className:"public-btn-secondary",children:"Back to Docs"})})]})]})]})})}export{v as HelpCenterPage}; diff --git a/dist/assets/HomeLanding-CMrIE0Xa.js b/dist/assets/HomeLanding-CMrIE0Xa.js deleted file mode 100644 index 7a69bae6..00000000 --- a/dist/assets/HomeLanding-CMrIE0Xa.js +++ /dev/null @@ -1,29 +0,0 @@ -import{j as e,u as w,r as k,L as r}from"./index-D-wwVRoV.js";import{c as s,M as j,I as N,a as A}from"./MarketingShell-BgYQ8Cfp.js";import{c as S,P as d}from"./PublicPrimaryButton-FdcHLbCt.js";import{A as l}from"./arrow-right-lAzDeT03.js";import{W as m,G as u,B as p,S as M,C as h,N as D}from"./workflow-DutrKdOb.js";import{U as I}from"./users-B0OVFCFN.js";import{B as b}from"./bot-Dw4nx5z7.js";import{G as C}from"./graduation-cap-BmClC3T4.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const T=s("FileScan",[["path",{d:"M20 10V7l-5-5H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4",key:"1rdf37"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M16 14a2 2 0 0 0-2 2",key:"ceaadl"}],["path",{d:"M20 14a2 2 0 0 1 2 2",key:"1ny6zw"}],["path",{d:"M20 22a2 2 0 0 0 2-2",key:"1l9q4k"}],["path",{d:"M16 22a2 2 0 0 1-2-2",key:"1wqh5n"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const P=s("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const F=s("MonitorSmartphone",[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const x=s("ScanSearch",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]]),g=[{label:"MIT Libraries",sub:"Massachusetts Institute of Technology"},{label:"arXiv",sub:"Cornell University"},{label:"Nature Portfolio",sub:"Springer Nature"},{label:"IEEE",sub:"Spectrum & Xplore"},{label:"Elsevier",sub:"ScienceDirect"},{label:"Springer",sub:"SpringerLink"},{label:"ResearchGate",sub:"Academic Network"},{label:"CERN",sub:"Document Server"},{label:"ETH Zürich",sub:"Research Collections"},{label:"Max Planck",sub:"eDoc Repository"}];function B({label:i,sub:a}){return e.jsxs("div",{className:"flex shrink-0 flex-col items-center justify-center rounded-xl border border-white/10 bg-[#0A0E19]/70 px-5 py-3 backdrop-blur-sm",children:[e.jsx("span",{className:"whitespace-nowrap text-sm font-semibold tracking-wide text-[#D8CBAF]/80",children:i}),a&&e.jsx("span",{className:"mt-0.5 whitespace-nowrap text-[10px] text-[#8A9099]/60",children:a})]})}function R(){const i=[...g,...g];return e.jsxs("section",{className:"mx-auto max-w-7xl px-6 py-12 lg:px-8",children:[e.jsx("p",{className:"text-center text-xs uppercase tracking-widest text-[#8A9099]",children:"Workflow-compatible with leading academic publishers & repositories"}),e.jsxs("div",{className:"relative mt-8 overflow-hidden",children:[e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 left-0 z-10 w-20",style:{background:"linear-gradient(to right, #0A0E19 0%, transparent 100%)"}}),e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-y-0 right-0 z-10 w-20",style:{background:"linear-gradient(to left, #0A0E19 0%, transparent 100%)"}}),e.jsx("div",{className:"flex gap-4",style:{animation:"logos-scroll 32s linear infinite",width:"max-content"},children:i.map((a,n)=>e.jsx(B,{label:a.label,sub:a.sub},n))})]}),e.jsx("style",{children:` - @keyframes logos-scroll { - 0% { transform: translateX(0); } - 100% { transform: translateX(-50%); } - } - @media (prefers-reduced-motion: reduce) { - [style*="logos-scroll"] { animation: none; } - } - `})]})}const y=[{quote:"ScriptoriumAI completely transformed how our lab manages collaborative LaTeX projects. The bidirectional SyncTeX alone saves hours every week.",name:"Dr. Sarah Chen",role:"Associate Professor",institution:"MIT CSAIL",initials:"SC"},{quote:"I tried other LaTeX editors and IDEs — nothing comes close to the compile reliability and PDF navigation here.",name:"James Okoye",role:"PhD Candidate",institution:"ETH Zürich",initials:"JO"},{quote:"The cross-document comparison engine is something we needed for years. Running a visual diff across 40 corpus documents is extraordinary.",name:"Dr. Miriam Hoffmann",role:"Research Director",institution:"Max Planck Institute",initials:"MH"},{quote:"The Git-native local history gave us exactly what we needed — full checkpoint control without ever leaving the writing environment.",name:"Prof. Antonio Reyes",role:"Faculty of Theoretical Physics",institution:"Universidad Complutense",initials:"AR"},{quote:"The structured AI Memory doesn't hallucinate citations. That alone made it our team's standard tool within two weeks of trial.",name:"Yuki Tanaka",role:"Technical Writer",institution:"CERN Documentation Team",initials:"YT"}];function L(){return e.jsx("div",{className:"flex gap-0.5","aria-label":"5 stars",children:Array.from({length:5}).map((i,a)=>e.jsx("svg",{viewBox:"0 0 16 16",className:"h-3.5 w-3.5 fill-[#C4A96B]","aria-hidden":"true",children:e.jsx("path",{d:"M8 1l1.85 3.75L14 5.5l-3 2.92.71 4.14L8 10.4l-3.71 2.16L5 8.42 2 5.5l4.15-.75Z"})},a))})}function f({t:i,className:a}){return e.jsxs("div",{className:S("flex flex-col gap-4 rounded-2xl border border-white/10 bg-[#0A0E19]/60 p-6 backdrop-blur-sm",a),children:[e.jsx(L,{}),e.jsxs("p",{className:"text-sm leading-relaxed text-[#C0B49A]/85",children:["“",i.quote,"”"]}),e.jsxs("div",{className:"mt-auto flex items-center gap-3",children:[e.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-[#C4A96B]/30 bg-[#C4A96B]/10 text-xs font-semibold tracking-wide text-[#D8CBAF]",children:i.initials}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-[#D8CBAF]",children:i.name}),e.jsxs("p",{className:"text-xs text-[#8A9099]",children:[i.role," · ",i.institution]})]})]})]})}function E(){return e.jsxs("section",{className:"mx-auto max-w-7xl px-6 py-16 lg:px-8",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"public-shell-kicker",children:"Testimonials"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Trusted by Researchers & Writers"}),e.jsx("p",{className:"public-lead mx-auto mt-4 max-w-2xl",children:"From PhD labs to documentation teams — the platform built for the most demanding publishing workflows."})]}),e.jsx("div",{className:"mt-10 grid gap-5 sm:grid-cols-2 lg:grid-cols-3",children:y.slice(0,3).map(i=>e.jsx(f,{t:i},i.name))}),e.jsx("div",{className:"mt-5 grid gap-5 sm:grid-cols-2 lg:mx-auto lg:max-w-3xl",children:y.slice(3).map(i=>e.jsx(f,{t:i},i.name))})]})}const X=[{name:"Free",monthly:0,annual:0,note:"Get started, no credit card",isFree:!0},{name:"Student",monthly:10,annual:89,note:"Full power · academic email required"},{name:"Scholar",monthly:15,annual:149,note:"Solo researchers & authors"},{name:"Groups",monthly:22,annual:199,note:"Research groups & doc teams",isGroup:!0},{name:"Enterprise",monthly:0,annual:0,note:"Labs & regulated environments",isEnterprise:!0}];function c(i,a=0){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:a,maximumFractionDigits:a}).format(i)}function O(i){return i/12}const G=["LaTeX","PDF","Markdown","RST","HTML","Plain Text","BibTeX","CSV","JSON","YAML","XML","SVG","PNG / JPEG / WebP","MP4 / WebM","ZIP / TAR.GZ","SyncTeX"],z=[{metric:"16+",label:"supported file formats"},{metric:"Native Compile Orchestration",label:"per-project locking + artifact manifests"},{metric:"Real MuPDF",label:"native PDF rendering"},{metric:"Bidirectional SyncTeX",label:"source-to-PDF continuity"},{metric:"Desktop + Web",label:"identical via Tauri + browser"},{metric:"Git-Native Local History",label:"checkpoints, diff, and restore"},{metric:"AI Memory",label:"bounded reasoning continuity + recoverable checkpoints"},{metric:"Real-Time Collaboration",label:"presence, cursors, review threads"},{metric:"Citation Intelligence",label:"DOI/ArXiv BibTeX + integrity forecasting"},{metric:"Reference Sync",label:"library-aware citation continuity"},{metric:"Memory Domain Intelligence",label:"governance, provenance, and readiness"},{metric:"Workspace Visualization",label:"layout presets, working sets, heatmaps, and cockpit views"},{metric:"Operator Runboard",label:"verification, remediation, and reversible workbench handoffs"},{metric:"Autonomous Research Agent",label:"swarm-style research synthesis"},{metric:"Skills Manager",label:"model-agnostic capability modules"},{metric:"OpenAPI Routing",label:"provider-neutral routing + BYOK custody"},{metric:"Provider Governance",label:"BYOK custody + routed fallback policy"},{metric:"Scientific Runtime",label:"uv + venv project lanes"},{metric:"Paper2All Export",label:"retention-aware publication bundles"},{metric:"PDF Intake QA",label:"probe, benchmark, triage, and handoff pipeline"},{metric:"Manim Visuals Studio",label:"AI-assisted math and physics animation"},{metric:"Tutorial Mode",label:"guided help flags across menus, editor chrome, and core workspace controls"},{metric:"Assistive Optionality",label:"AI helpers stay optional while raw authority remains recoverable"},{metric:"Whiteboard + MindMap",label:"ideation surfaces wired to the document graph"},{metric:"AI Diagram Studio",label:"figure generation from prompt to LaTeX-ready output"},{metric:"Video Studio",label:"scripted video production inside the same workspace"}],q=[{icon:m,title:"Native Compile Orchestration",body:"Per-project locking, persistent build directories, retry semantics, incremental compilation with dependency-aware caching, and full artifact manifests with SyncTeX index URIs keep source, retained outputs, and disposable cache residue clearly separated."},{icon:x,title:"Real MuPDF + Bidirectional SyncTeX",body:"Genuine MuPDF page rendering with large-document lazy caching, compile-artifact-backed routing, and bidirectional SyncTeX navigation — click a PDF page, jump to source; edit source, scroll the PDF."},{icon:u,title:"Git-Native Local History",body:"Full checkpoint control with label, diff, restore, and content hydration. Your entire writing history is yours — local, versioned, and always recoverable."},{icon:p,title:"Cross-Document Comparison + PDF Visual Diff",body:"Side-by-side PDF visual diff, a remediation routing engine, and line-level proposal accept/reject with multi-author assignee management. Compare revisions, track structural drift, and surface changes no inline diff tool can catch."},{icon:I,title:"Real-Time Collaboration",body:"Presence, remote cursors, anchored review threads, follow-mode, queued-save replay, and session handoff keep multi-author work continuous instead of brittle."},{icon:b,title:"AI Memory and Reasoning Continuity",body:"Checkpoint lineage, preview-before-restore, decision trails, open-question tracking, comments, and restorable AI state keep raw history, derived memory, and optional assistive summaries distinct instead of collapsing them into one opaque blob."},{icon:m,title:"Citation Intelligence",body:"BibTeX auto-completion from DOI and ArXiv, citation graph memory, LaTeX error-context enrichment, and integrity forecasting that predicts at-risk citations before submission."},{icon:p,title:"Reference Sync and Corpus Imports",body:"Reference synchronization, DOI/ArXiv/BibTeX normalization, and import-friendly corpus plumbing keep citations, bibliographies, and supporting materials aligned instead of drifting across tools."},{icon:x,title:"Memory Domain Intelligence",body:"Governance drift detection, integration boundary tracking, provenance and explainability ledger, cost-adaptive analysis depth, offline queue capture, section churn memory, and submission readiness — all scoped per project."},{icon:u,title:"Operator Workbench and Visualization System",body:"An editor-centered workbench with layout presets, working-set tabs, graph heatmaps, corpus glyph packs, governance cockpit views, and routed handoffs between editor, Runboard, search, graph, and studio surfaces."},{icon:M,title:"Operator Runboard and Verification",body:"Queue health, verify-suite surfaces, remediation routing, patch review, AI Kanban follow-through, and post-run retrospectives keep execution visible and reversible instead of burying it in background jobs."},{icon:h,title:"Scientific Runtime and Provider Control",body:"Project-scoped uv and venv runtime lanes, provider-neutral OpenAPI routing, BYOK-aware profile custody, managed Qwen access, and governed provider policies keep advanced workflows operator-controlled instead of vendor-locked."},{icon:b,title:"Research Agent and AI Orchestration",body:"Research-agent swarm sessions, skills modules, routed provider strategy, and reviewable AI outputs extend the workspace beyond a single inline assistant. Bring your own LLM key (Scholar+) for direct, unmetered inference."},{icon:P,title:"Studio Surfaces — Whiteboard, MindMap, Video, AI Diagram",body:"Whiteboard for spatial ideation, MindMap for structured brainstorming, AI Diagram Studio for prompt-to-LaTeX figure generation, and Video Studio for scripted production — all routed back into the same document, graph, and operator context."},{icon:T,title:"PDF Intake QA Pipeline",body:"Import any PDF, probe its structural integrity, run benchmark comparisons against reference documents, triage quality issues, and hand off a clean annotated version directly into the compiler or research-agent workflow — no manual copy-paste."},{icon:D,title:"Manim Visuals Studio",body:"AI-assisted mathematical and physics animation directly inside the workspace. Describe the visualization you need, generate Manim scenes, preview the animation, and embed the output in your document without switching tools."},{icon:h,title:"Paper2All and Publication Delivery",body:"Paper2All export, readiness-aware packaging, retained publication bundles, and operator-visible publish blockers keep final-mile delivery inside the same platform as authoring, review, and artifact governance."},{icon:C,title:"Tutorial Mode",body:"Enable Tutorial Mode from your account menu to surface contextual help flags across the menu bar, account menu, editor chrome, formatting toolbar groups, and right-side workspace controls. Each flag explains what the control does and when to use it without forcing you to leave the current workflow."},{icon:F,title:"Desktop + Web Continuity",body:'The same routed product architecture runs in both Tauri desktop and the browser, so compile workflows, review systems, research-agent surfaces, runtime controls, and publication delivery stay consistent instead of splitting into separate "lite" tools.'}];function J(){const{isAuthenticated:i}=w(),[a,n]=k.useState("annual");return e.jsxs(j,{children:[e.jsxs("section",{className:"relative mx-auto max-w-7xl px-6 pb-16 pt-16 lg:px-8 lg:pt-24",children:[e.jsx("div",{className:"pointer-events-none absolute inset-x-8 -top-12 bottom-0 -z-10 rounded-[2.75rem] bg-[radial-gradient(circle_at_top,rgba(216,203,175,0.22),transparent_38%),radial-gradient(circle_at_85%_18%,rgba(121,144,255,0.18),transparent_30%)] blur-3xl"}),e.jsxs("div",{className:"public-hero-shell p-8 md:p-12",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-[#D8CBAF]/40 bg-[#BFAE8C]/10 px-4 py-1 public-shell-kicker",children:[e.jsx(N,{size:14}),"ScriptoriumAI Platform"]}),e.jsxs("div",{className:"relative mt-6 overflow-hidden rounded-3xl border border-white/15 bg-black/25 px-6 py-8 public-hero-inner md:px-10 md:py-12",children:[e.jsx("div",{className:"pointer-events-none absolute inset-x-24 top-0 h-px bg-gradient-to-r from-transparent via-[#D8CBAF]/70 to-transparent"}),e.jsx("div",{className:"pointer-events-none absolute inset-x-32 top-0 h-[4px] bg-gradient-to-r from-transparent via-[#BFAE8C]/40 to-transparent blur-sm"}),e.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_0%,rgba(216,203,175,0.22),transparent_54%),linear-gradient(180deg,rgba(11,12,15,0.08)_0%,rgba(11,12,15,0.28)_100%)]"}),e.jsxs("div",{className:"relative z-10 mx-auto flex w-fit max-w-full flex-col items-center",children:[e.jsx("h1",{className:"public-page-title text-center",children:"ScriptoriumAI"}),e.jsx("div",{className:"mt-3 h-[3px] w-full rounded-full bg-gradient-to-r from-transparent via-[#D8CBAF] to-transparent shadow-[0_0_16px_rgba(216,203,175,0.45)]"})]}),e.jsx("p",{className:"public-lead relative z-10 mt-5 text-center max-w-3xl mx-auto",children:"The editor-centered technical writing and scientific publishing workbench that combines native LaTeX compile orchestration, artifact-backed preview and SyncTeX, Git-native local history, bounded AI Memory, real-time collaboration, citation and Memory Domain intelligence, operator-grade workbench routing, provider-neutral AI controls with BYOK support, and specialist studio surfaces in one unified architecture running identically on desktop and web."})]}),e.jsxs("div",{className:"mt-8 flex flex-wrap items-center gap-4",children:[e.jsx(d,{asChild:!0,children:e.jsxs(r,{to:i?"/app":"/register",children:[e.jsx(l,{size:14}),i?"Open Dashboard":"Get Started Free"]})}),e.jsx(r,{to:"/pricing",children:e.jsxs("button",{type:"button",className:"public-btn-secondary",children:[e.jsx(A,{size:14}),"View Pricing"]})})]}),e.jsx("div",{className:"mt-8 grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:z.map(t=>e.jsxs("div",{className:"public-card-raised rounded-2xl px-4 py-4",children:[e.jsx("p",{className:"text-lg font-semibold public-card-title",children:t.metric}),e.jsx("p",{className:"public-stat-label",children:t.label})]},t.label))}),e.jsxs("div",{className:"mt-10 public-card-raised rounded-2xl p-5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsxs("p",{className:"public-shell-kicker",children:["Pricing — ",e.jsx(r,{to:"/pricing",className:"text-[#D8CBAF]",children:"See full plans"})]}),e.jsxs("div",{className:"inline-flex items-center rounded-full border border-white/15 bg-white/5 p-1",children:[e.jsx("button",{type:"button",onClick:()=>n("monthly"),className:`rounded-full px-3 py-1 text-xs transition-colors ${a==="monthly"?"bg-[#D8CBAF]/20 text-[#D8CBAF]":"text-[#8A9099]"}`,children:"Monthly"}),e.jsxs("button",{type:"button",onClick:()=>n("annual"),className:`rounded-full px-3 py-1 text-xs transition-colors ${a==="annual"?"bg-[#D8CBAF]/20 text-[#D8CBAF]":"text-[#8A9099]"}`,children:["Annual",a==="annual"&&e.jsx("span",{className:"ml-1 text-[#D8CBAF]",children:"— save ~20%"})]})]})]}),e.jsx("div",{className:"mt-4 grid gap-3 sm:grid-cols-2 lg:grid-cols-5",children:X.map(t=>{const o=a==="annual"?c(O(t.annual),2):c(t.monthly),v=t.isGroup?"/ seat / mo":"/ mo";return e.jsxs("div",{className:"public-card rounded-2xl p-5",children:[e.jsx("p",{className:"public-card-title",children:t.name}),e.jsxs("p",{className:"mt-2 text-2xl font-semibold leading-tight",children:[t.isEnterprise?"Custom":t.isFree?"Free":o,!t.isEnterprise&&!t.isFree?e.jsx("span",{className:"ml-1 text-xs text-[#8A9099] align-middle",children:v}):null]}),e.jsxs("p",{className:"public-microcopy mt-1",children:[t.note,a==="annual"&&!t.isEnterprise&&!t.isFree?` · billed annually at ${c(t.annual)}${t.isGroup?"/seat/yr":"/yr"}`:""]})]},t.name)})})]})]})]}),e.jsxs("section",{id:"about",className:"mx-auto max-w-7xl px-6 py-8 lg:px-8",children:[e.jsxs("div",{className:"mb-6 public-card rounded-2xl p-5",children:[e.jsx("p",{className:"public-shell-kicker",children:"Supported Formats"}),e.jsx("p",{className:"public-body mt-2 max-w-2xl",children:"Every format your research workflow touches — ingested, rendered, compared, reasoned over, and exported from one surface."}),e.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:G.map(t=>e.jsx("span",{className:"public-format-pill rounded-full border border-white/20 bg-black/25 px-3 py-1 text-xs leading-5 text-[#F4F6F8]",children:t},t))})]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:q.map(t=>{const o=t.icon;return e.jsxs("div",{className:"public-card rounded-2xl p-6",children:[e.jsx(o,{className:"text-[#D8CBAF]",size:20}),e.jsx("h3",{className:"public-section-title mt-4",children:t.title}),e.jsx("p",{className:"public-body mt-2",children:t.body})]},t.title)})})]}),e.jsx(R,{}),e.jsx(E,{}),e.jsx("section",{className:"mx-auto max-w-7xl px-6 pb-10 lg:px-8",children:e.jsxs("div",{className:"public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Why ScriptoriumAI"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Beyond editor parity"}),e.jsx("p",{className:"public-body mt-3 max-w-3xl",children:"ScriptoriumAI delivers a complete next-generation scientific writing system. Native compile orchestration with incremental caching, artifact manifests, and retention-aware output handling. Real MuPDF rendering with bidirectional SyncTeX and compile-artifact-backed routing. Cross-document comparison with PDF visual diff and remediation workflows. Git-backed local history, bounded AI Memory, and collaboration continuity kept distinct instead of flattened into one ambiguous history lane. Citation intelligence and Memory Domain signals make readiness, provenance, and drift visible. The editor, Runboard, search, graph, and studio surfaces operate as one routed workbench. Provider-neutral AI routing, BYOK custody, managed-model governance, Scientific Runtime control, PDF Intake QA, Tutorial Mode, Whiteboard, MindMap, AI Diagram Studio, Video Studio, and Manim all stay inside that same desktop-and-web architecture."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(d,{asChild:!0,children:e.jsx(r,{to:"/pricing",children:"Explore Plans"})}),e.jsxs(r,{to:"/affiliate-program",className:"public-btn-secondary inline-flex items-center gap-2",children:["Join the affiliate marketplace",e.jsx(l,{size:13})]}),e.jsxs(r,{to:"/support",className:"public-btn-secondary inline-flex items-center gap-2",children:["Talk to us",e.jsx(l,{size:13})]})]})]})})]})}export{J as HomeLanding}; diff --git a/dist/assets/ImpressumPage-Df0oO5Hs.js b/dist/assets/ImpressumPage-Df0oO5Hs.js deleted file mode 100644 index 8796de0f..00000000 --- a/dist/assets/ImpressumPage-Df0oO5Hs.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./index-D-wwVRoV.js";import{b as t}from"./MarketingShell-BgYQ8Cfp.js";import{L as s}from"./LegalPageLayout-B12TU0j9.js";function i(){return e.jsxs(s,{badge:"Legal Notice",title:"Legal Notice / Impressum",description:`Information pursuant to § 5 Digitale-Dienste-Gesetz (DDG). This page provides provider identification for ${t.brandName}.`,panelTitle:"Contact / Kontakt",panelItems:[t.contact.email,t.contact.phoneDisplay,`${t.address.street}, ${t.address.postalCodeCity}`],children:[e.jsxs("article",{className:"rounded-2xl border border-white/15 bg-white/5 p-6 backdrop-blur-2xl md:p-8",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:"Legal Notice / Imprint (English)"}),e.jsx("p",{className:"mt-2 text-sm text-[#8A9099]",children:"Note: This is a template based on the provided data and not individual legal advice."}),e.jsxs("div",{className:"mt-5 space-y-4 text-sm text-[#8A9099]",children:[e.jsx("p",{children:"Information pursuant to § 5 Digitale-Dienste-Gesetz (DDG)"}),e.jsxs("p",{children:[t.brandName,e.jsx("br",{}),t.address.street,e.jsx("br",{}),t.address.postalCodeCity,e.jsx("br",{}),t.address.countryEN]}),e.jsxs("p",{children:["Represented by the Managing Director:",e.jsx("br",{}),t.management.managingDirector]}),e.jsxs("p",{children:["VAT identification number in accordance with § 27a UStG:",e.jsx("br",{}),t.tax.vatId]}),e.jsxs("p",{children:["Contact:",e.jsx("br",{}),"Phone: ",e.jsx("a",{href:t.contact.phoneHref,children:t.contact.phoneDisplay}),e.jsx("br",{}),"E-mail: ",e.jsx("a",{href:t.contact.emailHref,children:t.contact.email})]}),e.jsxs("p",{children:["Commercial register:",e.jsx("br",{}),"No entry in the commercial register.",e.jsx("br",{}),"Register court: Not applicable."]}),e.jsxs("p",{children:["Competent supervisory authority:",e.jsx("br",{}),"Not applicable."]}),e.jsxs("p",{children:["Person responsible for content pursuant to § 18 para. 2 Medienstaatsvertrag (MStV):",e.jsx("br",{}),t.management.managingDirector," (address and contact see above)."]})]})]}),e.jsxs("article",{className:"rounded-2xl border border-white/15 bg-white/5 p-6 backdrop-blur-2xl md:p-8",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:"Impressum (Deutsch)"}),e.jsx("p",{className:"mt-2 text-sm text-[#8A9099]",children:"Hinweis: Dies ist ein Mustertext auf Basis der bereitgestellten Daten und keine individuelle Rechtsberatung."}),e.jsxs("div",{className:"mt-5 space-y-4 text-sm text-[#8A9099]",children:[e.jsx("p",{children:"Angaben gemäß § 5 Digitale-Dienste-Gesetz (DDG)"}),e.jsxs("p",{children:[t.brandName,e.jsx("br",{}),t.address.street,e.jsx("br",{}),t.address.postalCodeCity,e.jsx("br",{}),t.address.countryDE]}),e.jsxs("p",{children:["Vertreten durch den Geschäftsführer:",e.jsx("br",{}),t.management.managingDirector]}),e.jsxs("p",{children:["Umsatzsteuer-Identifikationsnummer gemäß § 27a UStG:",e.jsx("br",{}),t.tax.vatId]}),e.jsxs("p",{children:["Kontakt:",e.jsx("br",{}),"Telefon: ",e.jsx("a",{href:t.contact.phoneHref,children:t.contact.phoneDisplay}),e.jsx("br",{}),"E-Mail: ",e.jsx("a",{href:t.contact.emailHref,children:t.contact.email})]}),e.jsxs("p",{children:["Handelsregister:",e.jsx("br",{}),"Kein Eintrag im Handelsregister.",e.jsx("br",{}),"Registergericht: Nicht anwendbar."]}),e.jsxs("p",{children:["Zuständige Aufsichtsbehörde:",e.jsx("br",{}),"Nicht anwendbar."]}),e.jsxs("p",{children:["Inhaltlich Verantwortlicher gemäß § 18 Abs. 2 Medienstaatsvertrag (MStV):",e.jsx("br",{}),t.management.managingDirector," (Anschrift und Kontakt siehe oben)."]})]})]})]})}export{i as ImpressumPage}; diff --git a/dist/assets/LegalPageLayout-B12TU0j9.js b/dist/assets/LegalPageLayout-B12TU0j9.js deleted file mode 100644 index e5a0d03b..00000000 --- a/dist/assets/LegalPageLayout-B12TU0j9.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./index-D-wwVRoV.js";import{M as o,b as s}from"./MarketingShell-BgYQ8Cfp.js";function m({badge:l,title:r,description:a,panelTitle:d,panelItems:i,children:x}){return e.jsxs(o,{children:[e.jsx("section",{className:"mx-auto max-w-7xl px-6 py-14 lg:px-8",children:e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[1.4fr_0.6fr]",children:[e.jsxs("div",{className:"rounded-2xl border border-white/15 bg-white/5 p-6 backdrop-blur-2xl md:p-8",children:[e.jsx("span",{className:"inline-flex rounded-full border border-[#D8CBAF]/45 bg-[#D8CBAF]/10 px-3 py-1 text-xs uppercase tracking-[0.2em] text-[#D8CBAF]",children:l}),e.jsx("h1",{className:"mt-4 text-3xl font-semibold md:text-4xl",children:r}),e.jsx("p",{className:"mt-3 text-sm text-[#8A9099] md:text-base",children:a})]}),e.jsxs("div",{className:"rounded-2xl border border-white/15 bg-white/5 p-6 backdrop-blur-2xl",children:[e.jsx("h2",{className:"text-lg font-semibold",children:d}),e.jsx("ul",{className:"mt-3 space-y-2 text-sm text-[#8A9099]",children:i.map(t=>e.jsx("li",{children:t},t))}),e.jsxs("div",{className:"mt-5 border-t border-white/10 pt-4 text-sm text-[#8A9099]",children:[e.jsx("p",{className:"text-[#F4F6F8] font-medium",children:"Contact"}),e.jsxs("p",{className:"mt-2",children:[s.contact.email,e.jsx("br",{}),s.address.street,e.jsx("br",{}),`${s.address.postalCodeCity}, ${s.address.countryEN}`]})]})]})]})}),e.jsxs("section",{className:"mx-auto max-w-7xl space-y-8 px-6 pb-8 lg:px-8",children:[x,e.jsxs("article",{className:"rounded-2xl border border-white/15 bg-white/5 p-6 backdrop-blur-2xl md:p-8",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:"Minion Pro License Notice"}),e.jsx("p",{className:"mt-3 text-sm text-[#8A9099]",children:"This publication uses the Minion Pro font family: Regular, Italic, Semi-Bold, Bold, and Bold Italic, lawfully licensed under the Adobe Desktop EULA with extended rights for use in Electronic Documents and eBooks."})]})]})]})}export{m as L}; diff --git a/dist/assets/LoginPage-C958rnep.js b/dist/assets/LoginPage-C958rnep.js deleted file mode 100644 index 8b011d44..00000000 --- a/dist/assets/LoginPage-C958rnep.js +++ /dev/null @@ -1 +0,0 @@ -import{a as H,b as M,u as P,r as s,c as L,j as e,N as O,L as g,i as _,d as I,p as R}from"./index-D-wwVRoV.js";import{M as G,X as q}from"./MarketingShell-BgYQ8Cfp.js";import{n}from"./notifications-BfjEGrJX.js";import{E as V,a as W,K}from"./key-round-BLVtnvIK.js";function Y(){return e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l3.66-2.84z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function T(){return e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 256 256","aria-hidden":"true",children:[e.jsx("circle",{cx:"128",cy:"128",r:"128",fill:"#A6CE39"}),e.jsx("path",{fill:"#fff",d:"M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h25.8c27.9 0 40.6-18.5 40.6-39.7 0-18.5-10.7-39.7-41.1-39.7h-25.3v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.5 10.1 10.1z"})]})}function Q(){const[j]=H(),w=M(),{isAuthenticated:y,isLoading:A,login:v,loginWithProvider:N}=P(),r=j.get("next")||"/app",[o,F]=s.useState(""),[c,C]=s.useState(""),[d,k]=s.useState(!1),[u,x]=s.useState(!1),[i,m]=s.useState(null),[a,E]=s.useState(L),b=_(),p=I(),B=b||p;s.useEffect(()=>{let t=!0;return(async()=>{const z=await R({timeoutMs:400});t&&E(z)})(),()=>{t=!1}},[]);const h=a.fallbackEnabled,D=h?"email":"supertokens";if(A)return null;if(y)return e.jsx(O,{to:r,replace:!0});const S=async t=>{if(t==="email"&&!h){n.error("Email fallback login is disabled on this deployment.");return}x(!0);try{const l=await v({method:t,email:o,password:c,returnTo:r});if(!l.ok){n.error(l.error||"Login failed.");return}n.success("Signed in successfully."),w(r,{replace:!0})}finally{x(!1)}},f=async t=>{m(t);try{await N(t)}catch(l){n.error(l instanceof Error?l.message:`${t} sign-in failed.`),m(null)}};return e.jsx(G,{children:e.jsx("section",{className:"flex min-h-[calc(100vh-5rem)] flex-col items-center justify-center px-4 py-12",children:e.jsxs("div",{className:"relative w-full max-w-md rounded-3xl border border-[#D8CBAF]/15 bg-[#0A0E19]/80 p-8 shadow-[0_24px_80px_rgba(2,6,23,0.64),0_0_0_1px_rgba(148,163,184,0.06)] backdrop-blur-2xl md:p-10",children:[e.jsx(g,{to:"/","aria-label":"Go back to home",className:"absolute right-4 top-4 flex h-8 w-8 items-center justify-center rounded-full border border-[#D8CBAF]/20 bg-[#0A0E19]/60 text-[#8A9099] transition-colors hover:border-[#D8CBAF]/50 hover:text-[#D8CBAF]",children:e.jsx(q,{size:14})}),e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-[#D8CBAF]",children:"Sign In"}),e.jsx("h1",{className:"mt-3 text-3xl font-semibold md:text-4xl",children:"Welcome back"}),e.jsx("p",{className:"mt-3 text-sm text-[#8A9099]",children:"Your documents, history, and collaboration tools are waiting."}),h?null:e.jsx("p",{className:"mt-1 text-xs text-amber-300","data-testid":"login-email-fallback-disabled-note",children:"Email fallback is disabled on this deployment. Use password sign-in."}),a.loaded&&a.reachable&&a.source==="config_json"?e.jsx("p",{className:"mt-1 text-xs text-amber-300","data-testid":"login-auth-health-config-fallback-note",children:"Auth policy loaded from config snapshot. Live auth health endpoint was not reachable."}):null,a.loaded&&!a.reachable?e.jsx("p",{className:"mt-1 text-xs text-amber-300","data-testid":"login-auth-health-unreachable-note",children:"Auth runtime health endpoint is currently unreachable. Fallback defaults are in effect."}):null,e.jsxs("form",{className:"mt-8 space-y-4",onSubmit:t=>{t.preventDefault(),S(D)},children:[B&&e.jsxs("div",{className:"space-y-3 pb-2",children:[b&&e.jsxs("button",{type:"button",onClick:()=>void f("google"),disabled:i!==null,className:"inline-flex w-full items-center justify-center gap-3 rounded-xl border border-white/20 bg-white/5 px-4 py-3 text-sm font-medium text-[#F4F6F8] transition hover:bg-white/10 disabled:opacity-60",children:[e.jsx(Y,{}),i==="google"?"Redirecting…":"Continue with Google"]}),p&&e.jsxs("button",{type:"button",onClick:()=>void f("orcid"),disabled:i!==null,className:"inline-flex w-full items-center justify-center gap-3 rounded-xl border border-white/20 bg-white/5 px-4 py-3 text-sm font-medium text-[#F4F6F8] transition hover:bg-white/10 disabled:opacity-60",children:[e.jsx(T,{}),i==="orcid"?"Redirecting…":"Continue with ORCID"]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1 bg-white/10"}),e.jsx("span",{className:"text-xs text-[#8A9099]",children:"or sign in with email"}),e.jsx("div",{className:"h-px flex-1 bg-white/10"})]})]}),e.jsxs("label",{className:"block",children:[e.jsxs("span",{className:"mb-2 block text-sm text-[#8A9099]",children:["Work email ",e.jsx("span",{className:"text-[#D8CBAF]",children:"*"})]}),e.jsx("input",{type:"email",value:o,onChange:t=>F(t.target.value),required:!0,className:"w-full rounded-xl border border-white/20 bg-black/20 px-4 py-3 text-sm outline-none transition focus:border-[#D8CBAF]/70",placeholder:"you@company.com"})]}),e.jsxs("label",{className:"block",children:[e.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[e.jsxs("span",{className:"text-sm text-[#8A9099]",children:["Password ",e.jsx("span",{className:"text-[#D8CBAF]",children:"*"})]}),e.jsx("a",{href:"mailto:inquiries@scriptoriumai.io",className:"text-xs text-[#8A9099] hover:text-[#D8CBAF] transition-colors",children:"Forgot password?"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:d?"text":"password",value:c,onChange:t=>C(t.target.value),required:!0,className:"w-full rounded-xl border border-white/20 bg-black/20 px-4 py-3 pr-10 text-sm outline-none transition focus:border-[#D8CBAF]/70",placeholder:"Your password"}),e.jsx("button",{type:"button",onClick:()=>k(t=>!t),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#8A9099] hover:text-[#D8CBAF] transition-colors","aria-label":d?"Hide password":"Show password",children:d?e.jsx(V,{size:16}):e.jsx(W,{size:16})})]})]}),e.jsxs("button",{type:"submit",disabled:u||!o||!c,className:"inline-flex w-full items-center justify-center gap-2 rounded-xl border border-[#D8CBAF]/50 bg-[#D8CBAF]/15 px-4 py-3 text-sm font-medium text-[#F4F6F8] transition hover:bg-[#D8CBAF]/25 disabled:opacity-60",children:[e.jsx(K,{size:16}),u?"Signing in...":"Sign In"]}),e.jsxs("p",{className:"text-center text-xs text-[#8A9099]",children:["Don't have an account?"," ",e.jsx(g,{to:"/register",className:"text-[#D8CBAF] hover:underline",children:"Sign up"})]})]})]})})})}export{Q as LoginPage}; diff --git a/dist/assets/MarketingShell-BgYQ8Cfp.js b/dist/assets/MarketingShell-BgYQ8Cfp.js deleted file mode 100644 index 219d0b18..00000000 --- a/dist/assets/MarketingShell-BgYQ8Cfp.js +++ /dev/null @@ -1,4137 +0,0 @@ -import{r as Yt,j,f as Ko,u as Zo,L as it}from"./index-D-wwVRoV.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var Jo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Qo=i=>i.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),Cn=(i,e)=>{const t=Yt.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:o="",children:c,...l},h)=>Yt.createElement("svg",{ref:h,...Jo,width:r,height:r,stroke:n,strokeWidth:a?Number(s)*24/Number(r):s,className:["lucide",`lucide-${Qo(i)}`,o].join(" "),...l},[...e.map(([m,u])=>Yt.createElement(m,u)),...Array.isArray(c)?c:[c]]));return t.displayName=`${i}`,t};/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const el=Cn("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tl=Cn("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nl=Cn("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const il=Cn("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rl=Cn("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sl=Cn("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const al=Cn("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ol=Cn("Youtube",[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]]);function oo(i){const{size:e=24,color:t="currentColor",strokeWidth:n=2,className:r,...s}=i;return{size:e,color:t,strokeWidth:n,className:r,rest:s}}function Ap(i){const{size:e,color:t,strokeWidth:n,className:r,rest:s}=oo(i);return j.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,...s,children:[j.jsx("path",{d:"M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06"}),j.jsx("path",{d:"M15 19l2 2l4 -4"})]})}function ll(i){const{size:e,color:t,strokeWidth:n,className:r,rest:s}=oo(i);return j.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round",className:r,...s,children:[j.jsx("path",{d:"M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6"}),j.jsx("path",{d:"M11 13l9 -9"}),j.jsx("path",{d:"M15 4h5v5"})]})}const It={brandName:"ScriptoriumAI",legalName:"ScriptoriumAI Labs",tagline:"AI-Native Research & Scientific Publication Suite",contact:{email:"inquiries@scriptoriumai.io",emailHref:"mailto:inquiries@scriptoriumai.io",phoneDisplay:"+49 000 000 000",phoneHref:"tel:+49000000000"},address:{street:"Kolonnenstraße 8",postalCodeCity:"10827 Berlin",countryEN:"DE",countryDE:"DE"},management:{managingDirector:"[Managing Director Placeholder]"},tax:{vatId:"[VAT-ID Placeholder]"},payment:{provider:"Paddle"}},Rp=`${It.address.street}, ${It.address.postalCodeCity}, ${It.address.countryEN}`,wp=`${It.address.street}, ${It.address.postalCodeCity}, ${It.address.countryDE}`;/** - * @license - * Copyright 2010-2026 Three.js Authors - * SPDX-License-Identifier: MIT - */const Ws="183",cl=0,da=1,ul=2,ir=1,dl=2,bi=3,wn=0,At=1,cn=2,dn=0,ai=1,ha=2,fa=3,pa=4,hl=5,zn=100,fl=101,pl=102,ml=103,gl=104,_l=200,xl=201,vl=202,Ml=203,Jr=204,Qr=205,Sl=206,El=207,bl=208,Tl=209,yl=210,Al=211,Rl=212,wl=213,Cl=214,es=0,ts=1,ns=2,li=3,is=4,rs=5,ss=6,as=7,lo=0,Pl=1,Dl=2,Kt=0,co=1,uo=2,ho=3,fo=4,po=5,mo=6,go=7,_o=300,Hn=301,ci=302,vr=303,Mr=304,fr=306,os=1e3,un=1001,ls=1002,xt=1003,Ll=1004,Ui=1005,Et=1006,Sr=1007,Gn=1008,Ut=1009,xo=1010,vo=1011,yi=1012,Xs=1013,Qt=1014,jt=1015,pn=1016,qs=1017,Ys=1018,Ai=1020,Mo=35902,So=35899,Eo=1021,bo=1022,Gt=1023,mn=1026,kn=1027,To=1028,js=1029,ui=1030,$s=1031,Ks=1033,rr=33776,sr=33777,ar=33778,or=33779,cs=35840,us=35841,ds=35842,hs=35843,fs=36196,ps=37492,ms=37496,gs=37488,_s=37489,xs=37490,vs=37491,Ms=37808,Ss=37809,Es=37810,bs=37811,Ts=37812,ys=37813,As=37814,Rs=37815,ws=37816,Cs=37817,Ps=37818,Ds=37819,Ls=37820,Is=37821,Us=36492,Ns=36494,Fs=36495,Os=36283,Bs=36284,zs=36285,Vs=36286,Il=3200,Ul=0,Nl=1,An="",Lt="srgb",di="srgb-linear",cr="linear",Ye="srgb",qn=7680,ma=519,Fl=512,Ol=513,Bl=514,Zs=515,zl=516,Vl=517,Js=518,Gl=519,ga=35044,_a="300 es",$t=2e3,ur=2001;function kl(i){for(let e=i.length-1;e>=0;--e)if(i[e]>=65535)return!0;return!1}function dr(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Hl(){const i=dr("canvas");return i.style.display="block",i}const xa={};function va(...i){const e="THREE."+i.shift();console.log(e,...i)}function yo(i){const e=i[0];if(typeof e=="string"&&e.startsWith("TSL:")){const t=i[1];t&&t.isStackTrace?i[0]+=" "+t.getLocation():i[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return i}function Pe(...i){i=yo(i);const e="THREE."+i.shift();{const t=i[0];t&&t.isStackTrace?console.warn(t.getError(e)):console.warn(e,...i)}}function He(...i){i=yo(i);const e="THREE."+i.shift();{const t=i[0];t&&t.isStackTrace?console.error(t.getError(e)):console.error(e,...i)}}function hr(...i){const e=i.join(" ");e in xa||(xa[e]=!0,Pe(...i))}function Wl(i,e,t){return new Promise(function(n,r){function s(){switch(i.clientWaitSync(e,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:n()}}setTimeout(s,t)})}const Xl={[es]:ts,[ns]:ss,[is]:as,[li]:rs,[ts]:es,[ss]:ns,[as]:is,[rs]:li};class fi{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const r=n[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const r=n.slice(0);for(let s=0,a=r.length;s>8&255]+Mt[i>>16&255]+Mt[i>>24&255]+"-"+Mt[e&255]+Mt[e>>8&255]+"-"+Mt[e>>16&15|64]+Mt[e>>24&255]+"-"+Mt[t&63|128]+Mt[t>>8&255]+"-"+Mt[t>>16&255]+Mt[t>>24&255]+Mt[n&255]+Mt[n>>8&255]+Mt[n>>16&255]+Mt[n>>24&255]).toLowerCase()}function ze(i,e,t){return Math.max(e,Math.min(t,i))}function ql(i,e){return(i%e+e)%e}function br(i,e,t){return(1-t)*i+t*e}function gi(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function yt(i,e){switch(e.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}class je{constructor(e=0,t=0){je.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=ze(this.x,e.x,t.x),this.y=ze(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=ze(this.x,e,t),this.y=ze(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(ze(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(ze(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*n-a*r+e.x,this.y=s*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class pi{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,s,a,o){let c=n[r+0],l=n[r+1],h=n[r+2],m=n[r+3],u=s[a+0],p=s[a+1],_=s[a+2],M=s[a+3];if(m!==M||c!==u||l!==p||h!==_){let f=c*u+l*p+h*_+m*M;f<0&&(u=-u,p=-p,_=-_,M=-M,f=-f);let d=1-o;if(f<.9995){const S=Math.acos(f),y=Math.sin(S);d=Math.sin(d*S)/y,o=Math.sin(o*S)/y,c=c*d+u*o,l=l*d+p*o,h=h*d+_*o,m=m*d+M*o}else{c=c*d+u*o,l=l*d+p*o,h=h*d+_*o,m=m*d+M*o;const S=1/Math.sqrt(c*c+l*l+h*h+m*m);c*=S,l*=S,h*=S,m*=S}}e[t]=c,e[t+1]=l,e[t+2]=h,e[t+3]=m}static multiplyQuaternionsFlat(e,t,n,r,s,a){const o=n[r],c=n[r+1],l=n[r+2],h=n[r+3],m=s[a],u=s[a+1],p=s[a+2],_=s[a+3];return e[t]=o*_+h*m+c*p-l*u,e[t+1]=c*_+h*u+l*m-o*p,e[t+2]=l*_+h*p+o*u-c*m,e[t+3]=h*_-o*m-c*u-l*p,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,r=e._y,s=e._z,a=e._order,o=Math.cos,c=Math.sin,l=o(n/2),h=o(r/2),m=o(s/2),u=c(n/2),p=c(r/2),_=c(s/2);switch(a){case"XYZ":this._x=u*h*m+l*p*_,this._y=l*p*m-u*h*_,this._z=l*h*_+u*p*m,this._w=l*h*m-u*p*_;break;case"YXZ":this._x=u*h*m+l*p*_,this._y=l*p*m-u*h*_,this._z=l*h*_-u*p*m,this._w=l*h*m+u*p*_;break;case"ZXY":this._x=u*h*m-l*p*_,this._y=l*p*m+u*h*_,this._z=l*h*_+u*p*m,this._w=l*h*m-u*p*_;break;case"ZYX":this._x=u*h*m-l*p*_,this._y=l*p*m+u*h*_,this._z=l*h*_-u*p*m,this._w=l*h*m+u*p*_;break;case"YZX":this._x=u*h*m+l*p*_,this._y=l*p*m+u*h*_,this._z=l*h*_-u*p*m,this._w=l*h*m-u*p*_;break;case"XZY":this._x=u*h*m-l*p*_,this._y=l*p*m-u*h*_,this._z=l*h*_+u*p*m,this._w=l*h*m+u*p*_;break;default:Pe("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],s=t[8],a=t[1],o=t[5],c=t[9],l=t[2],h=t[6],m=t[10],u=n+o+m;if(u>0){const p=.5/Math.sqrt(u+1);this._w=.25/p,this._x=(h-c)*p,this._y=(s-l)*p,this._z=(a-r)*p}else if(n>o&&n>m){const p=2*Math.sqrt(1+n-o-m);this._w=(h-c)/p,this._x=.25*p,this._y=(r+a)/p,this._z=(s+l)/p}else if(o>m){const p=2*Math.sqrt(1+o-n-m);this._w=(s-l)/p,this._x=(r+a)/p,this._y=.25*p,this._z=(c+h)/p}else{const p=2*Math.sqrt(1+m-n-o);this._w=(a-r)/p,this._x=(s+l)/p,this._y=(c+h)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(ze(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,s=e._z,a=e._w,o=t._x,c=t._y,l=t._z,h=t._w;return this._x=n*h+a*o+r*l-s*c,this._y=r*h+a*c+s*o-n*l,this._z=s*h+a*l+n*c-r*o,this._w=a*h-n*o-r*c-s*l,this._onChangeCallback(),this}slerp(e,t){let n=e._x,r=e._y,s=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,r=-r,s=-s,a=-a,o=-o);let c=1-t;if(o<.9995){const l=Math.acos(o),h=Math.sin(l);c=Math.sin(c*l)/h,t=Math.sin(t*l)/h,this._x=this._x*c+n*t,this._y=this._y*c+r*t,this._z=this._z*c+s*t,this._w=this._w*c+a*t,this._onChangeCallback()}else this._x=this._x*c+n*t,this._y=this._y*c+r*t,this._z=this._z*c+s*t,this._w=this._w*c+a*t,this.normalize();return this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(t),s*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class B{constructor(e=0,t=0,n=0){B.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(Ma.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Ma.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*n+s[6]*r,this.y=s[1]*t+s[4]*n+s[7]*r,this.z=s[2]*t+s[5]*n+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,s=e.elements,a=1/(s[3]*t+s[7]*n+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*n+s[8]*r+s[12])*a,this.y=(s[1]*t+s[5]*n+s[9]*r+s[13])*a,this.z=(s[2]*t+s[6]*n+s[10]*r+s[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,s=e.x,a=e.y,o=e.z,c=e.w,l=2*(a*r-o*n),h=2*(o*t-s*r),m=2*(s*n-a*t);return this.x=t+c*l+a*m-o*h,this.y=n+c*h+o*l-s*m,this.z=r+c*m+s*h-a*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r,this.y=s[1]*t+s[5]*n+s[9]*r,this.z=s[2]*t+s[6]*n+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=ze(this.x,e.x,t.x),this.y=ze(this.y,e.y,t.y),this.z=ze(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=ze(this.x,e,t),this.y=ze(this.y,e,t),this.z=ze(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(ze(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,s=e.z,a=t.x,o=t.y,c=t.z;return this.x=r*c-s*o,this.y=s*a-n*c,this.z=n*o-r*a,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Tr.copy(this).projectOnVector(e),this.sub(Tr)}reflect(e){return this.sub(Tr.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(ze(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Tr=new B,Ma=new pi;class Ie{constructor(e,t,n,r,s,a,o,c,l){Ie.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,r,s,a,o,c,l)}set(e,t,n,r,s,a,o,c,l){const h=this.elements;return h[0]=e,h[1]=r,h[2]=o,h[3]=t,h[4]=s,h[5]=c,h[6]=n,h[7]=a,h[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,s=this.elements,a=n[0],o=n[3],c=n[6],l=n[1],h=n[4],m=n[7],u=n[2],p=n[5],_=n[8],M=r[0],f=r[3],d=r[6],S=r[1],y=r[4],T=r[7],C=r[2],R=r[5],D=r[8];return s[0]=a*M+o*S+c*C,s[3]=a*f+o*y+c*R,s[6]=a*d+o*T+c*D,s[1]=l*M+h*S+m*C,s[4]=l*f+h*y+m*R,s[7]=l*d+h*T+m*D,s[2]=u*M+p*S+_*C,s[5]=u*f+p*y+_*R,s[8]=u*d+p*T+_*D,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],s=e[3],a=e[4],o=e[5],c=e[6],l=e[7],h=e[8];return t*a*h-t*o*l-n*s*h+n*o*c+r*s*l-r*a*c}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],s=e[3],a=e[4],o=e[5],c=e[6],l=e[7],h=e[8],m=h*a-o*l,u=o*c-h*s,p=l*s-a*c,_=t*m+n*u+r*p;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);const M=1/_;return e[0]=m*M,e[1]=(r*l-h*n)*M,e[2]=(o*n-r*a)*M,e[3]=u*M,e[4]=(h*t-r*c)*M,e[5]=(r*s-o*t)*M,e[6]=p*M,e[7]=(n*c-l*t)*M,e[8]=(a*t-n*s)*M,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,s,a,o){const c=Math.cos(s),l=Math.sin(s);return this.set(n*c,n*l,-n*(c*a+l*o)+a+e,-r*l,r*c,-r*(-l*a+c*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(yr.makeScale(e,t)),this}rotate(e){return this.premultiply(yr.makeRotation(-e)),this}translate(e,t){return this.premultiply(yr.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const yr=new Ie,Sa=new Ie().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Ea=new Ie().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function Yl(){const i={enabled:!0,workingColorSpace:di,spaces:{},convert:function(r,s,a){return this.enabled===!1||s===a||!s||!a||(this.spaces[s].transfer===Ye&&(r.r=hn(r.r),r.g=hn(r.g),r.b=hn(r.b)),this.spaces[s].primaries!==this.spaces[a].primaries&&(r.applyMatrix3(this.spaces[s].toXYZ),r.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===Ye&&(r.r=oi(r.r),r.g=oi(r.g),r.b=oi(r.b))),r},workingToColorSpace:function(r,s){return this.convert(r,this.workingColorSpace,s)},colorSpaceToWorking:function(r,s){return this.convert(r,s,this.workingColorSpace)},getPrimaries:function(r){return this.spaces[r].primaries},getTransfer:function(r){return r===An?cr:this.spaces[r].transfer},getToneMappingMode:function(r){return this.spaces[r].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(r,s=this.workingColorSpace){return r.fromArray(this.spaces[s].luminanceCoefficients)},define:function(r){Object.assign(this.spaces,r)},_getMatrix:function(r,s,a){return r.copy(this.spaces[s].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(r){return this.spaces[r].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(r=this.workingColorSpace){return this.spaces[r].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(r,s){return hr("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),i.workingToColorSpace(r,s)},toWorkingColorSpace:function(r,s){return hr("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),i.colorSpaceToWorking(r,s)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return i.define({[di]:{primaries:e,whitePoint:n,transfer:cr,toXYZ:Sa,fromXYZ:Ea,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Lt},outputColorSpaceConfig:{drawingBufferColorSpace:Lt}},[Lt]:{primaries:e,whitePoint:n,transfer:Ye,toXYZ:Sa,fromXYZ:Ea,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Lt}}}),i}const Ge=Yl();function hn(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function oi(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}let Yn;class jl{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Yn===void 0&&(Yn=dr("canvas")),Yn.width=e.width,Yn.height=e.height;const r=Yn.getContext("2d");e instanceof ImageData?r.putImageData(e,0,0):r.drawImage(e,0,0,e.width,e.height),n=Yn}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=dr("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),s=r.data;for(let a=0;a1),this.pmremVersion=0}get width(){return this.source.getSize(Rr).x}get height(){return this.source.getSize(Rr).y}get depth(){return this.source.getSize(Rr).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){Pe(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){Pe(`Texture.setValues(): property '${t}' does not exist.`);continue}r&&n&&r.isVector2&&n.isVector2||r&&n&&r.isVector3&&n.isVector3||r&&n&&r.isMatrix3&&n.isMatrix3?r.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==_o)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case os:e.x=e.x-Math.floor(e.x);break;case un:e.x=e.x<0?0:1;break;case ls:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case os:e.y=e.y-Math.floor(e.y);break;case un:e.y=e.y<0?0:1;break;case ls:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Tt.DEFAULT_IMAGE=null;Tt.DEFAULT_MAPPING=_o;Tt.DEFAULT_ANISOTROPY=1;class lt{constructor(e=0,t=0,n=0,r=1){lt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*s,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*s,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*s,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*s,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,s;const c=e.elements,l=c[0],h=c[4],m=c[8],u=c[1],p=c[5],_=c[9],M=c[2],f=c[6],d=c[10];if(Math.abs(h-u)<.01&&Math.abs(m-M)<.01&&Math.abs(_-f)<.01){if(Math.abs(h+u)<.1&&Math.abs(m+M)<.1&&Math.abs(_+f)<.1&&Math.abs(l+p+d-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const y=(l+1)/2,T=(p+1)/2,C=(d+1)/2,R=(h+u)/4,D=(m+M)/4,x=(_+f)/4;return y>T&&y>C?y<.01?(n=0,r=.707106781,s=.707106781):(n=Math.sqrt(y),r=R/n,s=D/n):T>C?T<.01?(n=.707106781,r=0,s=.707106781):(r=Math.sqrt(T),n=R/r,s=x/r):C<.01?(n=.707106781,r=.707106781,s=0):(s=Math.sqrt(C),n=D/s,r=x/s),this.set(n,r,s,t),this}let S=Math.sqrt((f-_)*(f-_)+(m-M)*(m-M)+(u-h)*(u-h));return Math.abs(S)<.001&&(S=1),this.x=(f-_)/S,this.y=(m-M)/S,this.z=(u-h)/S,this.w=Math.acos((l+p+d-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=ze(this.x,e.x,t.x),this.y=ze(this.y,e.y,t.y),this.z=ze(this.z,e.z,t.z),this.w=ze(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=ze(this.x,e,t),this.y=ze(this.y,e,t),this.z=ze(this.z,e,t),this.w=ze(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(ze(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Zl extends fi{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Et,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new lt(0,0,e,t),this.scissorTest=!1,this.viewport=new lt(0,0,e,t),this.textures=[];const r={width:e,height:t,depth:n.depth},s=new Tt(r),a=n.count;for(let o=0;o1);this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let n=0;n0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.pivot!==null&&(r.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(r.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(r.morphTargetInfluences=this.morphTargetInfluences.slice()),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),r.instanceInfo=this._instanceInfo.map(o=>({...o})),r.availableInstanceIds=this._availableInstanceIds.slice(),r.availableGeometryIds=this._availableGeometryIds.slice(),r.nextIndexStart=this._nextIndexStart,r.nextVertexStart=this._nextVertexStart,r.geometryCount=this._geometryCount,r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.matricesTexture=this._matricesTexture.toJSON(e),r.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(r.boundingBox=this.boundingBox.toJSON()));function s(o,c){return o[c.uuid]===void 0&&(o[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const c=o.shapes;if(Array.isArray(c))for(let l=0,h=c.length;l0){r.children=[];for(let o=0;o0){r.animations=[];for(let o=0;o0&&(n.geometries=o),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),h.length>0&&(n.images=h),m.length>0&&(n.shapes=m),u.length>0&&(n.skeletons=u),p.length>0&&(n.animations=p),_.length>0&&(n.nodes=_)}return n.object=r,n;function a(o){const c=[];for(const l in o){const h=o[l];delete h.metadata,c.push(h)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),e.pivot!==null&&(this.pivot=e.pivot.clone()),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.static=e.static,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;np+_?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&u<=p-_&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,n),s!==null&&(c.matrix.fromArray(s.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,s.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(s.linearVelocity)):c.hasLinearVelocity=!1,s.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(s.angularVelocity)):c.hasAngularVelocity=!1));o!==null&&(r=t.getPose(e.targetRaySpace,n),r===null&&s!==null&&(r=s),r!==null&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(sc)))}return o!==null&&(o.visible=r!==null),c!==null&&(c.visible=s!==null),l!==null&&(l.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Oi;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}const wo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Sn={h:0,s:0,l:0},Bi={h:0,s:0,l:0};function Pr(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}class Ze{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Lt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Ge.colorSpaceToWorking(this,t),this}setRGB(e,t,n,r=Ge.workingColorSpace){return this.r=e,this.g=t,this.b=n,Ge.colorSpaceToWorking(this,r),this}setHSL(e,t,n,r=Ge.workingColorSpace){if(e=ql(e,1),t=ze(t,0,1),n=ze(n,0,1),t===0)this.r=this.g=this.b=n;else{const s=n<=.5?n*(1+t):n+t-n*t,a=2*n-s;this.r=Pr(a,s,e+1/3),this.g=Pr(a,s,e),this.b=Pr(a,s,e-1/3)}return Ge.colorSpaceToWorking(this,r),this}setStyle(e,t=Lt){function n(s){s!==void 0&&parseFloat(s)<1&&Pe("Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=r[1],o=r[2];switch(a){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return n(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:Pe("Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],a=s.length;if(a===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(a===6)return this.setHex(parseInt(s,16),t);Pe("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Lt){const n=wo[e.toLowerCase()];return n!==void 0?this.setHex(n,t):Pe("Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=hn(e.r),this.g=hn(e.g),this.b=hn(e.b),this}copyLinearToSRGB(e){return this.r=oi(e.r),this.g=oi(e.g),this.b=oi(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Lt){return Ge.workingToColorSpace(St.copy(this),e),Math.round(ze(St.r*255,0,255))*65536+Math.round(ze(St.g*255,0,255))*256+Math.round(ze(St.b*255,0,255))}getHexString(e=Lt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ge.workingColorSpace){Ge.workingToColorSpace(St.copy(this),t);const n=St.r,r=St.g,s=St.b,a=Math.max(n,r,s),o=Math.min(n,r,s);let c,l;const h=(o+a)/2;if(o===a)c=0,l=0;else{const m=a-o;switch(l=h<=.5?m/(a+o):m/(2-a-o),a){case n:c=(r-s)/m+(r0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}const Ot=new B,sn=new B,Dr=new B,an=new B,Zn=new B,Jn=new B,Pa=new B,Lr=new B,Ir=new B,Ur=new B,Nr=new lt,Fr=new lt,Or=new lt;class Vt{constructor(e=new B,t=new B,n=new B){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Ot.subVectors(e,t),r.cross(Ot);const s=r.lengthSq();return s>0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,n,r,s){Ot.subVectors(r,t),sn.subVectors(n,t),Dr.subVectors(e,t);const a=Ot.dot(Ot),o=Ot.dot(sn),c=Ot.dot(Dr),l=sn.dot(sn),h=sn.dot(Dr),m=a*l-o*o;if(m===0)return s.set(0,0,0),null;const u=1/m,p=(l*c-o*h)*u,_=(a*h-o*c)*u;return s.set(1-p-_,_,p)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,an)===null?!1:an.x>=0&&an.y>=0&&an.x+an.y<=1}static getInterpolation(e,t,n,r,s,a,o,c){return this.getBarycoord(e,t,n,r,an)===null?(c.x=0,c.y=0,"z"in c&&(c.z=0),"w"in c&&(c.w=0),null):(c.setScalar(0),c.addScaledVector(s,an.x),c.addScaledVector(a,an.y),c.addScaledVector(o,an.z),c)}static getInterpolatedAttribute(e,t,n,r,s,a){return Nr.setScalar(0),Fr.setScalar(0),Or.setScalar(0),Nr.fromBufferAttribute(e,t),Fr.fromBufferAttribute(e,n),Or.fromBufferAttribute(e,r),a.setScalar(0),a.addScaledVector(Nr,s.x),a.addScaledVector(Fr,s.y),a.addScaledVector(Or,s.z),a}static isFrontFacing(e,t,n,r){return Ot.subVectors(n,t),sn.subVectors(e,t),Ot.cross(sn).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ot.subVectors(this.c,this.b),sn.subVectors(this.a,this.b),Ot.cross(sn).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Vt.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Vt.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,r,s){return Vt.getInterpolation(e,this.a,this.b,this.c,t,n,r,s)}containsPoint(e){return Vt.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Vt.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,s=this.c;let a,o;Zn.subVectors(r,n),Jn.subVectors(s,n),Lr.subVectors(e,n);const c=Zn.dot(Lr),l=Jn.dot(Lr);if(c<=0&&l<=0)return t.copy(n);Ir.subVectors(e,r);const h=Zn.dot(Ir),m=Jn.dot(Ir);if(h>=0&&m<=h)return t.copy(r);const u=c*m-h*l;if(u<=0&&c>=0&&h<=0)return a=c/(c-h),t.copy(n).addScaledVector(Zn,a);Ur.subVectors(e,s);const p=Zn.dot(Ur),_=Jn.dot(Ur);if(_>=0&&p<=_)return t.copy(s);const M=p*l-c*_;if(M<=0&&l>=0&&_<=0)return o=l/(l-_),t.copy(n).addScaledVector(Jn,o);const f=h*_-p*m;if(f<=0&&m-h>=0&&p-_>=0)return Pa.subVectors(s,r),o=(m-h)/(m-h+(p-_)),t.copy(r).addScaledVector(Pa,o);const d=1/(f+M+u);return a=M*d,o=u*d,t.copy(n).addScaledVector(Zn,a).addScaledVector(Jn,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}class Ci{constructor(e=new B(1/0,1/0,1/0),t=new B(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Bt),Bt.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(xi),Vi.subVectors(this.max,xi),Qn.subVectors(e.a,xi),ei.subVectors(e.b,xi),ti.subVectors(e.c,xi),En.subVectors(ei,Qn),bn.subVectors(ti,ei),Ln.subVectors(Qn,ti);let t=[0,-En.z,En.y,0,-bn.z,bn.y,0,-Ln.z,Ln.y,En.z,0,-En.x,bn.z,0,-bn.x,Ln.z,0,-Ln.x,-En.y,En.x,0,-bn.y,bn.x,0,-Ln.y,Ln.x,0];return!Br(t,Qn,ei,ti,Vi)||(t=[1,0,0,0,1,0,0,0,1],!Br(t,Qn,ei,ti,Vi))?!1:(Gi.crossVectors(En,bn),t=[Gi.x,Gi.y,Gi.z],Br(t,Qn,ei,ti,Vi))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Bt).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Bt).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(on[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),on[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),on[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),on[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),on[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),on[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),on[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),on[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(on),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const on=[new B,new B,new B,new B,new B,new B,new B,new B],Bt=new B,zi=new Ci,Qn=new B,ei=new B,ti=new B,En=new B,bn=new B,Ln=new B,xi=new B,Vi=new B,Gi=new B,In=new B;function Br(i,e,t,n,r){for(let s=0,a=i.length-3;s<=a;s+=3){In.fromArray(i,s);const o=r.x*Math.abs(In.x)+r.y*Math.abs(In.y)+r.z*Math.abs(In.z),c=e.dot(In),l=t.dot(In),h=n.dot(In);if(Math.max(-Math.max(c,l,h),Math.min(c,l,h))>o)return!1}return!0}const ut=new B,ki=new je;let oc=0;class Jt{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:oc++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=ga,this.updateRanges=[],this.gpuType=jt,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,s=this.itemSize;rthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;vi.subVectors(e,this.center);const t=vi.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.addScaledVector(vi,r/n),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(zr.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(vi.copy(e.center).add(zr)),this.expandByPoint(vi.copy(e.center).sub(zr))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}let cc=0;const Dt=new dt,Vr=new Pt,ni=new B,Ct=new Ci,Mi=new Ci,gt=new B;class _n extends fi{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:cc++}),this.uuid=wi(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(kl(e)?Po:Co)(e,1):this.index=e,this}setIndirect(e,t=0){return this.indirect=e,this.indirectOffset=t,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const s=new Ie().getNormalMatrix(e);n.applyNormalMatrix(s),n.needsUpdate=!0}const r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(e),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Dt.makeRotationFromQuaternion(e),this.applyMatrix4(Dt),this}rotateX(e){return Dt.makeRotationX(e),this.applyMatrix4(Dt),this}rotateY(e){return Dt.makeRotationY(e),this.applyMatrix4(Dt),this}rotateZ(e){return Dt.makeRotationZ(e),this.applyMatrix4(Dt),this}translate(e,t,n){return Dt.makeTranslation(e,t,n),this.applyMatrix4(Dt),this}scale(e,t,n){return Dt.makeScale(e,t,n),this.applyMatrix4(Dt),this}lookAt(e){return Vr.lookAt(e),Vr.updateMatrix(),this.applyMatrix4(Vr.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ni).negate(),this.translate(ni.x,ni.y,ni.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let r=0,s=e.length;rt.count&&Pe("BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Ci);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){He("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new B(-1/0,-1/0,-1/0),new B(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,r=t.length;n0&&(e.userData=this.userData),this.parameters!==void 0){const c=this.parameters;for(const l in c)c[l]!==void 0&&(e[l]=c[l]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const c in n){const l=n[c];e.data.attributes[c]=l.toJSON(e.data)}const r={};let s=!1;for(const c in this.morphAttributes){const l=this.morphAttributes[c],h=[];for(let m=0,u=l.length;m0&&(r[c]=h,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return o!==null&&(e.data.boundingSphere=o.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone());const r=e.attributes;for(const l in r){const h=r[l];this.setAttribute(l,h.clone(t))}const s=e.morphAttributes;for(const l in s){const h=[],m=s[l];for(let u=0,p=m.length;u0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){Pe(`Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){Pe(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==ai&&(n.blending=this.blending),this.side!==wn&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==Jr&&(n.blendSrc=this.blendSrc),this.blendDst!==Qr&&(n.blendDst=this.blendDst),this.blendEquation!==zn&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==li&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==ma&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==qn&&(n.stencilFail=this.stencilFail),this.stencilZFail!==qn&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==qn&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.allowOverride===!1&&(n.allowOverride=!1),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(s){const a=[];for(const o in s){const c=s[o];delete c.metadata,a.push(c)}return a}if(t){const s=r(e.textures),a=r(e.images);s.length>0&&(n.textures=s),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const r=t.length;n=new Array(r);for(let s=0;s!==r;++s)n[s]=t[s].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.allowOverride=e.allowOverride,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const ln=new B,Gr=new B,Hi=new B,Tn=new B,kr=new B,Wi=new B,Hr=new B;class dc{constructor(e=new B,t=new B(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ln)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ln.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ln.copy(this.origin).addScaledVector(this.direction,t),ln.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Gr.copy(e).add(t).multiplyScalar(.5),Hi.copy(t).sub(e).normalize(),Tn.copy(this.origin).sub(Gr);const s=e.distanceTo(t)*.5,a=-this.direction.dot(Hi),o=Tn.dot(this.direction),c=-Tn.dot(Hi),l=Tn.lengthSq(),h=Math.abs(1-a*a);let m,u,p,_;if(h>0)if(m=a*c-o,u=a*o-c,_=s*h,m>=0)if(u>=-_)if(u<=_){const M=1/h;m*=M,u*=M,p=m*(m+a*u+2*o)+u*(a*m+u+2*c)+l}else u=s,m=Math.max(0,-(a*u+o)),p=-m*m+u*(u+2*c)+l;else u=-s,m=Math.max(0,-(a*u+o)),p=-m*m+u*(u+2*c)+l;else u<=-_?(m=Math.max(0,-(-a*s+o)),u=m>0?-s:Math.min(Math.max(-s,-c),s),p=-m*m+u*(u+2*c)+l):u<=_?(m=0,u=Math.min(Math.max(-s,-c),s),p=u*(u+2*c)+l):(m=Math.max(0,-(a*s+o)),u=m>0?s:Math.min(Math.max(-s,-c),s),p=-m*m+u*(u+2*c)+l);else u=a>0?-s:s,m=Math.max(0,-(a*u+o)),p=-m*m+u*(u+2*c)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,m),r&&r.copy(Gr).addScaledVector(Hi,u),p}intersectSphere(e,t){ln.subVectors(e.center,this.origin);const n=ln.dot(this.direction),r=ln.dot(ln)-n*n,s=e.radius*e.radius;if(r>s)return null;const a=Math.sqrt(s-r),o=n-a,c=n+a;return c<0?null:o<0?this.at(c,t):this.at(o,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,s,a,o,c;const l=1/this.direction.x,h=1/this.direction.y,m=1/this.direction.z,u=this.origin;return l>=0?(n=(e.min.x-u.x)*l,r=(e.max.x-u.x)*l):(n=(e.max.x-u.x)*l,r=(e.min.x-u.x)*l),h>=0?(s=(e.min.y-u.y)*h,a=(e.max.y-u.y)*h):(s=(e.max.y-u.y)*h,a=(e.min.y-u.y)*h),n>a||s>r||((s>n||isNaN(n))&&(n=s),(a=0?(o=(e.min.z-u.z)*m,c=(e.max.z-u.z)*m):(o=(e.max.z-u.z)*m,c=(e.min.z-u.z)*m),n>c||o>r)||((o>n||n!==n)&&(n=o),(c=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,ln)!==null}intersectTriangle(e,t,n,r,s){kr.subVectors(t,e),Wi.subVectors(n,e),Hr.crossVectors(kr,Wi);let a=this.direction.dot(Hr),o;if(a>0){if(r)return null;o=1}else if(a<0)o=-1,a=-a;else return null;Tn.subVectors(this.origin,e);const c=o*this.direction.dot(Wi.crossVectors(Tn,Wi));if(c<0)return null;const l=o*this.direction.dot(kr.cross(Tn));if(l<0||c+l>a)return null;const h=-o*Tn.dot(Hr);return h<0?null:this.at(h/a,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Do extends pr{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ze(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new gn,this.combine=lo,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Da=new dt,Un=new dc,Xi=new ea,La=new B,qi=new B,Yi=new B,ji=new B,Wr=new B,$i=new B,Ia=new B,Ki=new B;class en extends Pt{constructor(e=new _n,t=new Do){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=r.length;s(e.far-e.near)**2))&&(Da.copy(s).invert(),Un.copy(e.ray).applyMatrix4(Da),!(n.boundingBox!==null&&Un.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Un)))}_computeIntersections(e,t,n){let r;const s=this.geometry,a=this.material,o=s.index,c=s.attributes.position,l=s.attributes.uv,h=s.attributes.uv1,m=s.attributes.normal,u=s.groups,p=s.drawRange;if(o!==null)if(Array.isArray(a))for(let _=0,M=u.length;_t.far?null:{distance:l,point:Ki.clone(),object:i}}function Zi(i,e,t,n,r,s,a,o,c,l){i.getVertexPosition(o,qi),i.getVertexPosition(c,Yi),i.getVertexPosition(l,ji);const h=hc(i,e,t,n,qi,Yi,ji,Ia);if(h){const m=new B;Vt.getBarycoord(Ia,qi,Yi,ji,m),r&&(h.uv=Vt.getInterpolatedAttribute(r,o,c,l,m,new je)),s&&(h.uv1=Vt.getInterpolatedAttribute(s,o,c,l,m,new je)),a&&(h.normal=Vt.getInterpolatedAttribute(a,o,c,l,m,new B),h.normal.dot(n.direction)>0&&h.normal.multiplyScalar(-1));const u={a:o,b:c,c:l,normal:new B,materialIndex:0};Vt.getNormal(qi,Yi,ji,u.normal),h.face=u,h.barycoord=m}return h}class fc extends Tt{constructor(e=null,t=1,n=1,r,s,a,o,c,l=xt,h=xt,m,u){super(null,a,o,c,l,h,r,s,m,u),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Xr=new B,pc=new B,mc=new Ie;class Bn{constructor(e=new B(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=Xr.subVectors(n,t).cross(pc.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(Xr),r=this.normal.dot(n);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(n,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||mc.getNormalMatrix(e),r=this.coplanarPoint(Xr).applyMatrix4(e),s=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Nn=new ea,gc=new je(.5,.5),Ji=new B;class Lo{constructor(e=new Bn,t=new Bn,n=new Bn,r=new Bn,s=new Bn,a=new Bn){this.planes=[e,t,n,r,s,a]}set(e,t,n,r,s,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(s),o[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=$t,n=!1){const r=this.planes,s=e.elements,a=s[0],o=s[1],c=s[2],l=s[3],h=s[4],m=s[5],u=s[6],p=s[7],_=s[8],M=s[9],f=s[10],d=s[11],S=s[12],y=s[13],T=s[14],C=s[15];if(r[0].setComponents(l-a,p-h,d-_,C-S).normalize(),r[1].setComponents(l+a,p+h,d+_,C+S).normalize(),r[2].setComponents(l+o,p+m,d+M,C+y).normalize(),r[3].setComponents(l-o,p-m,d-M,C-y).normalize(),n)r[4].setComponents(c,u,f,T).normalize(),r[5].setComponents(l-c,p-u,d-f,C-T).normalize();else if(r[4].setComponents(l-c,p-u,d-f,C-T).normalize(),t===$t)r[5].setComponents(l+c,p+u,d+f,C+T).normalize();else if(t===ur)r[5].setComponents(c,u,f,T).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Nn.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Nn.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Nn)}intersectsSprite(e){Nn.center.set(0,0,0);const t=gc.distanceTo(e.center);return Nn.radius=.7071067811865476+t,Nn.applyMatrix4(e.matrixWorld),this.intersectsSphere(Nn)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(n)0?e.max.x:e.min.x,Ji.y=r.normal.y>0?e.max.y:e.min.y,Ji.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Ji)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class Io extends Tt{constructor(e=[],t=Hn,n,r,s,a,o,c,l,h){super(e,t,n,r,s,a,o,c,l,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Ri extends Tt{constructor(e,t,n=Qt,r,s,a,o=xt,c=xt,l,h=mn,m=1){if(h!==mn&&h!==kn)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const u={width:e,height:t,depth:m};super(u,r,s,a,o,c,h,n,l),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Qs(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class _c extends Ri{constructor(e,t=Qt,n=Hn,r,s,a=xt,o=xt,c,l=mn){const h={width:e,height:e,depth:1},m=[h,h,h,h,h,h];super(e,e,t,n,r,s,a,o,c,l),this.image=m,this.isCubeDepthTexture=!0,this.isCubeTexture=!0}get images(){return this.image}set images(e){this.image=e}}class Uo extends Tt{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class Pi extends _n{constructor(e=1,t=1,n=1,r=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:s,depthSegments:a};const o=this;r=Math.floor(r),s=Math.floor(s),a=Math.floor(a);const c=[],l=[],h=[],m=[];let u=0,p=0;_("z","y","x",-1,-1,n,t,e,a,s,0),_("z","y","x",1,-1,n,t,-e,a,s,1),_("x","z","y",1,1,e,n,t,r,a,2),_("x","z","y",1,-1,e,n,-t,r,a,3),_("x","y","z",1,-1,e,t,n,r,s,4),_("x","y","z",-1,-1,e,t,-n,r,s,5),this.setIndex(c),this.setAttribute("position",new fn(l,3)),this.setAttribute("normal",new fn(h,3)),this.setAttribute("uv",new fn(m,2));function _(M,f,d,S,y,T,C,R,D,x,E){const q=T/D,A=C/x,z=T/2,F=C/2,V=R/2,k=D+1,G=x+1;let O=0,ee=0;const Z=new B;for(let ue=0;ue0?1:-1,h.push(Z.x,Z.y,Z.z),m.push(he/D),m.push(1-ue/x),O+=1}}for(let ue=0;ue0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const r in this.extensions)this.extensions[r]===!0&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class Ec extends kt{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class bc extends pr{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Il,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Tc extends pr{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const Qi=new B,er=new pi,Wt=new B;class ta extends Pt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new dt,this.projectionMatrix=new dt,this.projectionMatrixInverse=new dt,this.coordinateSystem=$t,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorld.decompose(Qi,er,Wt),Wt.x===1&&Wt.y===1&&Wt.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Qi,er,Wt.set(1,1,1)).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorld.decompose(Qi,er,Wt),Wt.x===1&&Wt.y===1&&Wt.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Qi,er,Wt.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}}const yn=new B,Ua=new je,Na=new je;class zt extends ta{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Gs*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Er*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Gs*2*Math.atan(Math.tan(Er*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){yn.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(yn.x,yn.y).multiplyScalar(-e/yn.z),yn.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(yn.x,yn.y).multiplyScalar(-e/yn.z)}getViewSize(e,t){return this.getViewBounds(e,Ua,Na),t.subVectors(Na,Ua)}setViewOffset(e,t,n,r,s,a){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Er*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,s=-.5*r;const a=this.view;if(this.view!==null&&this.view.enabled){const c=a.fullWidth,l=a.fullHeight;s+=a.offsetX*r/c,t-=a.offsetY*n/l,r*=a.width/c,n*=a.height/l}const o=this.filmOffset;o!==0&&(s+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class Fo extends ta{constructor(e=-1,t=1,n=1,r=-1,s=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=s,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,s,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=s,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=n-e,a=n+e,o=r+t,c=r-t;if(this.view!==null&&this.view.enabled){const l=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=l*this.view.offsetX,a=s+l*this.view.width,o-=h*this.view.offsetY,c=o-h*this.view.height}this.projectionMatrix.makeOrthographic(s,a,o,c,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const ii=-90,ri=1;class yc extends Pt{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new zt(ii,ri,e,t);r.layers=this.layers,this.add(r);const s=new zt(ii,ri,e,t);s.layers=this.layers,this.add(s);const a=new zt(ii,ri,e,t);a.layers=this.layers,this.add(a);const o=new zt(ii,ri,e,t);o.layers=this.layers,this.add(o);const c=new zt(ii,ri,e,t);c.layers=this.layers,this.add(c);const l=new zt(ii,ri,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,s,a,o,c]=t;for(const l of t)this.remove(l);if(e===$t)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===ur)n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),c.up.set(0,-1,0),c.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const l of t)this.add(l),l.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,a,o,c,l,h]=this.children,m=e.getRenderTarget(),u=e.getActiveCubeFace(),p=e.getActiveMipmapLevel(),_=e.xr.enabled;e.xr.enabled=!1;const M=n.texture.generateMipmaps;n.texture.generateMipmaps=!1;let f=!1;e.isWebGLRenderer===!0?f=e.state.buffers.depth.getReversed():f=e.reversedDepthBuffer,e.setRenderTarget(n,0,r),f&&e.autoClear===!1&&e.clearDepth(),e.render(t,s),e.setRenderTarget(n,1,r),f&&e.autoClear===!1&&e.clearDepth(),e.render(t,a),e.setRenderTarget(n,2,r),f&&e.autoClear===!1&&e.clearDepth(),e.render(t,o),e.setRenderTarget(n,3,r),f&&e.autoClear===!1&&e.clearDepth(),e.render(t,c),e.setRenderTarget(n,4,r),f&&e.autoClear===!1&&e.clearDepth(),e.render(t,l),n.texture.generateMipmaps=M,e.setRenderTarget(n,5,r),f&&e.autoClear===!1&&e.clearDepth(),e.render(t,h),e.setRenderTarget(m,u,p),e.xr.enabled=_,n.texture.needsPMREMUpdate=!0}}class Ac extends zt{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}function Fa(i,e,t,n){const r=Rc(n);switch(t){case Eo:return i*e;case To:return i*e/r.components*r.byteLength;case js:return i*e/r.components*r.byteLength;case ui:return i*e*2/r.components*r.byteLength;case $s:return i*e*2/r.components*r.byteLength;case bo:return i*e*3/r.components*r.byteLength;case Gt:return i*e*4/r.components*r.byteLength;case Ks:return i*e*4/r.components*r.byteLength;case rr:case sr:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*8;case ar:case or:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*16;case us:case hs:return Math.max(i,16)*Math.max(e,8)/4;case cs:case ds:return Math.max(i,8)*Math.max(e,8)/2;case fs:case ps:case gs:case _s:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*8;case ms:case xs:case vs:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*16;case Ms:return Math.floor((i+3)/4)*Math.floor((e+3)/4)*16;case Ss:return Math.floor((i+4)/5)*Math.floor((e+3)/4)*16;case Es:return Math.floor((i+4)/5)*Math.floor((e+4)/5)*16;case bs:return Math.floor((i+5)/6)*Math.floor((e+4)/5)*16;case Ts:return Math.floor((i+5)/6)*Math.floor((e+5)/6)*16;case ys:return Math.floor((i+7)/8)*Math.floor((e+4)/5)*16;case As:return Math.floor((i+7)/8)*Math.floor((e+5)/6)*16;case Rs:return Math.floor((i+7)/8)*Math.floor((e+7)/8)*16;case ws:return Math.floor((i+9)/10)*Math.floor((e+4)/5)*16;case Cs:return Math.floor((i+9)/10)*Math.floor((e+5)/6)*16;case Ps:return Math.floor((i+9)/10)*Math.floor((e+7)/8)*16;case Ds:return Math.floor((i+9)/10)*Math.floor((e+9)/10)*16;case Ls:return Math.floor((i+11)/12)*Math.floor((e+9)/10)*16;case Is:return Math.floor((i+11)/12)*Math.floor((e+11)/12)*16;case Us:case Ns:case Fs:return Math.ceil(i/4)*Math.ceil(e/4)*16;case Os:case Bs:return Math.ceil(i/4)*Math.ceil(e/4)*8;case zs:case Vs:return Math.ceil(i/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function Rc(i){switch(i){case Ut:case xo:return{byteLength:1,components:1};case yi:case vo:case pn:return{byteLength:2,components:1};case qs:case Ys:return{byteLength:2,components:4};case Qt:case Xs:case jt:return{byteLength:4,components:1};case Mo:case So:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${i}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Ws}}));typeof window<"u"&&(window.__THREE__?Pe("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Ws);/** - * @license - * Copyright 2010-2026 Three.js Authors - * SPDX-License-Identifier: MIT - */function Oo(){let i=null,e=!1,t=null,n=null;function r(s,a){t(s,a),n=i.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(n=i.requestAnimationFrame(r),e=!0)},stop:function(){i.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){i=s}}}function wc(i){const e=new WeakMap;function t(o,c){const l=o.array,h=o.usage,m=l.byteLength,u=i.createBuffer();i.bindBuffer(c,u),i.bufferData(c,l,h),o.onUploadCallback();let p;if(l instanceof Float32Array)p=i.FLOAT;else if(typeof Float16Array<"u"&&l instanceof Float16Array)p=i.HALF_FLOAT;else if(l instanceof Uint16Array)o.isFloat16BufferAttribute?p=i.HALF_FLOAT:p=i.UNSIGNED_SHORT;else if(l instanceof Int16Array)p=i.SHORT;else if(l instanceof Uint32Array)p=i.UNSIGNED_INT;else if(l instanceof Int32Array)p=i.INT;else if(l instanceof Int8Array)p=i.BYTE;else if(l instanceof Uint8Array)p=i.UNSIGNED_BYTE;else if(l instanceof Uint8ClampedArray)p=i.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+l);return{buffer:u,type:p,bytesPerElement:l.BYTES_PER_ELEMENT,version:o.version,size:m}}function n(o,c,l){const h=c.array,m=c.updateRanges;if(i.bindBuffer(l,o),m.length===0)i.bufferSubData(l,0,h);else{m.sort((p,_)=>p.start-_.start);let u=0;for(let p=1;p 0 - vec4 plane; - #ifdef ALPHA_TO_COVERAGE - float distanceToPlane, distanceGradient; - float clipOpacity = 1.0; - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; - distanceGradient = fwidth( distanceToPlane ) / 2.0; - clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); - if ( clipOpacity == 0.0 ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - float unionClipOpacity = 1.0; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; - distanceGradient = fwidth( distanceToPlane ) / 2.0; - unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); - } - #pragma unroll_loop_end - clipOpacity *= 1.0 - unionClipOpacity; - #endif - diffuseColor.a *= clipOpacity; - if ( diffuseColor.a == 0.0 ) discard; - #else - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - bool clipped = true; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; - } - #pragma unroll_loop_end - if ( clipped ) discard; - #endif - #endif -#endif`,Xc=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,qc=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif`,Yc=`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif`,jc=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#endif`,$c=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#endif`,Kc=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) - varying vec4 vColor; -#endif`,Zc=`#if defined( USE_COLOR ) || defined( USE_COLOR_ALPHA ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) - vColor = vec4( 1.0 ); -#endif -#ifdef USE_COLOR_ALPHA - vColor *= color; -#elif defined( USE_COLOR ) - vColor.rgb *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.rgb *= instanceColor.rgb; -#endif -#ifdef USE_BATCHING_COLOR - vColor *= getBatchingColor( getIndirectIndex( gl_DrawID ) ); -#endif`,Jc=`#define PI 3.141592653589793 -#define PI2 6.283185307179586 -#define PI_HALF 1.5707963267948966 -#define RECIPROCAL_PI 0.3183098861837907 -#define RECIPROCAL_PI2 0.15915494309189535 -#define EPSILON 1e-6 -#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -#define whiteComplement( a ) ( 1.0 - saturate( a ) ) -float pow2( const in float x ) { return x*x; } -vec3 pow2( const in vec3 x ) { return x*x; } -float pow3( const in float x ) { return x*x*x; } -float pow4( const in float x ) { float x2 = x*x; return x2*x2; } -float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } -float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } -highp float rand( const in vec2 uv ) { - const highp float a = 12.9898, b = 78.233, c = 43758.5453; - highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); - return fract( sin( sn ) * c ); -} -#ifdef HIGH_PRECISION - float precisionSafeLength( vec3 v ) { return length( v ); } -#else - float precisionSafeLength( vec3 v ) { - float maxComponent = max3( abs( v ) ); - return length( v / maxComponent ) * maxComponent; - } -#endif -struct IncidentLight { - vec3 color; - vec3 direction; - bool visible; -}; -struct ReflectedLight { - vec3 directDiffuse; - vec3 directSpecular; - vec3 indirectDiffuse; - vec3 indirectSpecular; -}; -#ifdef USE_ALPHAHASH - varying vec3 vPosition; -#endif -vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); -} -vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); -} -bool isPerspectiveMatrix( mat4 m ) { - return m[ 2 ][ 3 ] == - 1.0; -} -vec2 equirectUv( in vec3 dir ) { - float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; - float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; - return vec2( u, v ); -} -vec3 BRDF_Lambert( const in vec3 diffuseColor ) { - return RECIPROCAL_PI * diffuseColor; -} -vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { - float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); - return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} -float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { - float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); - return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,Qc=`#ifdef ENVMAP_TYPE_CUBE_UV - #define cubeUV_minMipLevel 4.0 - #define cubeUV_minTileSize 16.0 - float getFace( vec3 direction ) { - vec3 absDirection = abs( direction ); - float face = - 1.0; - if ( absDirection.x > absDirection.z ) { - if ( absDirection.x > absDirection.y ) - face = direction.x > 0.0 ? 0.0 : 3.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } else { - if ( absDirection.z > absDirection.y ) - face = direction.z > 0.0 ? 2.0 : 5.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } - return face; - } - vec2 getUV( vec3 direction, float face ) { - vec2 uv; - if ( face == 0.0 ) { - uv = vec2( direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 1.0 ) { - uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); - } else if ( face == 2.0 ) { - uv = vec2( - direction.x, direction.y ) / abs( direction.z ); - } else if ( face == 3.0 ) { - uv = vec2( - direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 4.0 ) { - uv = vec2( - direction.x, direction.z ) / abs( direction.y ); - } else { - uv = vec2( direction.x, direction.y ) / abs( direction.z ); - } - return 0.5 * ( uv + 1.0 ); - } - vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { - float face = getFace( direction ); - float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); - mipInt = max( mipInt, cubeUV_minMipLevel ); - float faceSize = exp2( mipInt ); - highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; - if ( face > 2.0 ) { - uv.y += faceSize; - face -= 3.0; - } - uv.x += face * faceSize; - uv.x += filterInt * 3.0 * cubeUV_minTileSize; - uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); - uv.x *= CUBEUV_TEXEL_WIDTH; - uv.y *= CUBEUV_TEXEL_HEIGHT; - #ifdef texture2DGradEXT - return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; - #else - return texture2D( envMap, uv ).rgb; - #endif - } - #define cubeUV_r0 1.0 - #define cubeUV_m0 - 2.0 - #define cubeUV_r1 0.8 - #define cubeUV_m1 - 1.0 - #define cubeUV_r4 0.4 - #define cubeUV_m4 2.0 - #define cubeUV_r5 0.305 - #define cubeUV_m5 3.0 - #define cubeUV_r6 0.21 - #define cubeUV_m6 4.0 - float roughnessToMip( float roughness ) { - float mip = 0.0; - if ( roughness >= cubeUV_r1 ) { - mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; - } else if ( roughness >= cubeUV_r4 ) { - mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; - } else if ( roughness >= cubeUV_r5 ) { - mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; - } else if ( roughness >= cubeUV_r6 ) { - mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; - } else { - mip = - 2.0 * log2( 1.16 * roughness ); } - return mip; - } - vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { - float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); - float mipF = fract( mip ); - float mipInt = floor( mip ); - vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); - if ( mipF == 0.0 ) { - return vec4( color0, 1.0 ); - } else { - vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); - return vec4( mix( color0, color1, mipF ), 1.0 ); - } - } -#endif`,eu=`vec3 transformedNormal = objectNormal; -#ifdef USE_TANGENT - vec3 transformedTangent = objectTangent; -#endif -#ifdef USE_BATCHING - mat3 bm = mat3( batchingMatrix ); - transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); - transformedNormal = bm * transformedNormal; - #ifdef USE_TANGENT - transformedTangent = bm * transformedTangent; - #endif -#endif -#ifdef USE_INSTANCING - mat3 im = mat3( instanceMatrix ); - transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); - transformedNormal = im * transformedNormal; - #ifdef USE_TANGENT - transformedTangent = im * transformedTangent; - #endif -#endif -transformedNormal = normalMatrix * transformedNormal; -#ifdef FLIP_SIDED - transformedNormal = - transformedNormal; -#endif -#ifdef USE_TANGENT - transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; - #ifdef FLIP_SIDED - transformedTangent = - transformedTangent; - #endif -#endif`,tu=`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif`,nu=`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,iu=`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); - #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE - emissiveColor = sRGBTransferEOTF( emissiveColor ); - #endif - totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,ru=`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif`,su="gl_FragColor = linearToOutputTexel( gl_FragColor );",au=`vec4 LinearTransferOETF( in vec4 value ) { - return value; -} -vec4 sRGBTransferEOTF( in vec4 value ) { - return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); -} -vec4 sRGBTransferOETF( in vec4 value ) { - return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}`,ou=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vec3 cameraToFrag; - if ( isOrthographic ) { - cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToFrag = normalize( vWorldPosition - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( cameraToFrag, worldNormal ); - #else - vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); - #endif - #else - vec3 reflectVec = vReflect; - #endif - #ifdef ENVMAP_TYPE_CUBE - vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); - #ifdef ENVMAP_BLENDING_MULTIPLY - outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_MIX ) - outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_ADD ) - outgoingLight += envColor.xyz * specularStrength * reflectivity; - #endif - #endif -#endif`,lu=`#ifdef USE_ENVMAP - uniform float envMapIntensity; - uniform float flipEnvMap; - uniform mat3 envMapRotation; - #ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; - #else - uniform sampler2D envMap; - #endif -#endif`,cu=`#ifdef USE_ENVMAP - uniform float reflectivity; - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - varying vec3 vWorldPosition; - uniform float refractionRatio; - #else - varying vec3 vReflect; - #endif -#endif`,uu=`#ifdef USE_ENVMAP - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - - varying vec3 vWorldPosition; - #else - varying vec3 vReflect; - uniform float refractionRatio; - #endif -#endif`,du=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vWorldPosition = worldPosition.xyz; - #else - vec3 cameraToVertex; - if ( isOrthographic ) { - cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vReflect = reflect( cameraToVertex, worldNormal ); - #else - vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); - #endif - #endif -#endif`,hu=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif`,fu=`#ifdef USE_FOG - varying float vFogDepth; -#endif`,pu=`#ifdef USE_FOG - #ifdef FOG_EXP2 - float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); - #else - float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); - #endif - gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,mu=`#ifdef USE_FOG - uniform vec3 fogColor; - varying float vFogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif`,gu=`#ifdef USE_GRADIENTMAP - uniform sampler2D gradientMap; -#endif -vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { - float dotNL = dot( normal, lightDirection ); - vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); - #ifdef USE_GRADIENTMAP - return vec3( texture2D( gradientMap, coord ).r ); - #else - vec2 fw = fwidth( coord ) * 0.5; - return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); - #endif -}`,_u=`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif`,xu=`LambertMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,vu=`varying vec3 vViewPosition; -struct LambertMaterial { - vec3 diffuseColor; - float specularStrength; -}; -void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,Mu=`uniform bool receiveShadow; -uniform vec3 ambientLightColor; -#if defined( USE_LIGHT_PROBES ) - uniform vec3 lightProbe[ 9 ]; -#endif -vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { - float x = normal.x, y = normal.y, z = normal.z; - vec3 result = shCoefficients[ 0 ] * 0.886227; - result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; - result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; - result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; - result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; - result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; - result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); - result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; - result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); - return result; -} -vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); - return irradiance; -} -vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { - vec3 irradiance = ambientLightColor; - return irradiance; -} -float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { - float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); - if ( cutoffDistance > 0.0 ) { - distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); - } - return distanceFalloff; -} -float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { - return smoothstep( coneCosine, penumbraCosine, angleCosine ); -} -#if NUM_DIR_LIGHTS > 0 - struct DirectionalLight { - vec3 direction; - vec3 color; - }; - uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; - void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { - light.color = directionalLight.color; - light.direction = directionalLight.direction; - light.visible = true; - } -#endif -#if NUM_POINT_LIGHTS > 0 - struct PointLight { - vec3 position; - vec3 color; - float distance; - float decay; - }; - uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; - void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { - vec3 lVector = pointLight.position - geometryPosition; - light.direction = normalize( lVector ); - float lightDistance = length( lVector ); - light.color = pointLight.color; - light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } -#endif -#if NUM_SPOT_LIGHTS > 0 - struct SpotLight { - vec3 position; - vec3 direction; - vec3 color; - float distance; - float decay; - float coneCos; - float penumbraCos; - }; - uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; - void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { - vec3 lVector = spotLight.position - geometryPosition; - light.direction = normalize( lVector ); - float angleCos = dot( light.direction, spotLight.direction ); - float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); - if ( spotAttenuation > 0.0 ) { - float lightDistance = length( lVector ); - light.color = spotLight.color * spotAttenuation; - light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } else { - light.color = vec3( 0.0 ); - light.visible = false; - } - } -#endif -#if NUM_RECT_AREA_LIGHTS > 0 - struct RectAreaLight { - vec3 color; - vec3 position; - vec3 halfWidth; - vec3 halfHeight; - }; - uniform sampler2D ltc_1; uniform sampler2D ltc_2; - uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; -#endif -#if NUM_HEMI_LIGHTS > 0 - struct HemisphereLight { - vec3 direction; - vec3 skyColor; - vec3 groundColor; - }; - uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; - vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { - float dotNL = dot( normal, hemiLight.direction ); - float hemiDiffuseWeight = 0.5 * dotNL + 0.5; - vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); - return irradiance; - } -#endif`,Su=`#ifdef USE_ENVMAP - vec3 getIBLIrradiance( const in vec3 normal ) { - #ifdef ENVMAP_TYPE_CUBE_UV - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); - return PI * envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { - #ifdef ENVMAP_TYPE_CUBE_UV - vec3 reflectVec = reflect( - viewDir, normal ); - reflectVec = normalize( mix( reflectVec, normal, pow4( roughness ) ) ); - reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); - return envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - #ifdef USE_ANISOTROPY - vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { - #ifdef ENVMAP_TYPE_CUBE_UV - vec3 bentNormal = cross( bitangent, viewDir ); - bentNormal = normalize( cross( bentNormal, bitangent ) ); - bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); - return getIBLRadiance( viewDir, bentNormal, roughness ); - #else - return vec3( 0.0 ); - #endif - } - #endif -#endif`,Eu=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,bu=`varying vec3 vViewPosition; -struct ToonMaterial { - vec3 diffuseColor; -}; -void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Tu=`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;`,yu=`varying vec3 vViewPosition; -struct BlinnPhongMaterial { - vec3 diffuseColor; - vec3 specularColor; - float specularShininess; - float specularStrength; -}; -void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); - reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; -} -void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,Au=`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.diffuseContribution = diffuseColor.rgb * ( 1.0 - metalnessFactor ); -material.metalness = metalnessFactor; -vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); -float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); -material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; -material.roughness = min( material.roughness, 1.0 ); -#ifdef IOR - material.ior = ior; - #ifdef USE_SPECULAR - float specularIntensityFactor = specularIntensity; - vec3 specularColorFactor = specularColor; - #ifdef USE_SPECULAR_COLORMAP - specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; - #endif - #ifdef USE_SPECULAR_INTENSITYMAP - specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; - #endif - material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); - #else - float specularIntensityFactor = 1.0; - vec3 specularColorFactor = vec3( 1.0 ); - material.specularF90 = 1.0; - #endif - material.specularColor = min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor; - material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = vec3( 0.04 ); - material.specularColorBlended = mix( material.specularColor, diffuseColor.rgb, metalnessFactor ); - material.specularF90 = 1.0; -#endif -#ifdef USE_CLEARCOAT - material.clearcoat = clearcoat; - material.clearcoatRoughness = clearcoatRoughness; - material.clearcoatF0 = vec3( 0.04 ); - material.clearcoatF90 = 1.0; - #ifdef USE_CLEARCOATMAP - material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; - #endif - #ifdef USE_CLEARCOAT_ROUGHNESSMAP - material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; - #endif - material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); - material.clearcoatRoughness += geometryRoughness; - material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); -#endif -#ifdef USE_DISPERSION - material.dispersion = dispersion; -#endif -#ifdef USE_IRIDESCENCE - material.iridescence = iridescence; - material.iridescenceIOR = iridescenceIOR; - #ifdef USE_IRIDESCENCEMAP - material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; - #endif - #ifdef USE_IRIDESCENCE_THICKNESSMAP - material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; - #else - material.iridescenceThickness = iridescenceThicknessMaximum; - #endif -#endif -#ifdef USE_SHEEN - material.sheenColor = sheenColor; - #ifdef USE_SHEEN_COLORMAP - material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; - #endif - material.sheenRoughness = clamp( sheenRoughness, 0.0001, 1.0 ); - #ifdef USE_SHEEN_ROUGHNESSMAP - material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; - #endif -#endif -#ifdef USE_ANISOTROPY - #ifdef USE_ANISOTROPYMAP - mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); - vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; - vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; - #else - vec2 anisotropyV = anisotropyVector; - #endif - material.anisotropy = length( anisotropyV ); - if( material.anisotropy == 0.0 ) { - anisotropyV = vec2( 1.0, 0.0 ); - } else { - anisotropyV /= material.anisotropy; - material.anisotropy = saturate( material.anisotropy ); - } - material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); - material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; - material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,Ru=`uniform sampler2D dfgLUT; -struct PhysicalMaterial { - vec3 diffuseColor; - vec3 diffuseContribution; - vec3 specularColor; - vec3 specularColorBlended; - float roughness; - float metalness; - float specularF90; - float dispersion; - #ifdef USE_CLEARCOAT - float clearcoat; - float clearcoatRoughness; - vec3 clearcoatF0; - float clearcoatF90; - #endif - #ifdef USE_IRIDESCENCE - float iridescence; - float iridescenceIOR; - float iridescenceThickness; - vec3 iridescenceFresnel; - vec3 iridescenceF0; - vec3 iridescenceFresnelDielectric; - vec3 iridescenceFresnelMetallic; - #endif - #ifdef USE_SHEEN - vec3 sheenColor; - float sheenRoughness; - #endif - #ifdef IOR - float ior; - #endif - #ifdef USE_TRANSMISSION - float transmission; - float transmissionAlpha; - float thickness; - float attenuationDistance; - vec3 attenuationColor; - #endif - #ifdef USE_ANISOTROPY - float anisotropy; - float alphaT; - vec3 anisotropyT; - vec3 anisotropyB; - #endif -}; -vec3 clearcoatSpecularDirect = vec3( 0.0 ); -vec3 clearcoatSpecularIndirect = vec3( 0.0 ); -vec3 sheenSpecularDirect = vec3( 0.0 ); -vec3 sheenSpecularIndirect = vec3(0.0 ); -vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { - float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); - float x2 = x * x; - float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); - return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); -} -float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { - float a2 = pow2( alpha ); - float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); - float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); - return 0.5 / max( gv + gl, EPSILON ); -} -float D_GGX( const in float alpha, const in float dotNH ) { - float a2 = pow2( alpha ); - float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; - return RECIPROCAL_PI * a2 / pow2( denom ); -} -#ifdef USE_ANISOTROPY - float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { - float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); - float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); - float v = 0.5 / ( gv + gl ); - return v; - } - float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { - float a2 = alphaT * alphaB; - highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); - highp float v2 = dot( v, v ); - float w2 = a2 / v2; - return RECIPROCAL_PI * a2 * pow2 ( w2 ); - } -#endif -#ifdef USE_CLEARCOAT - vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { - vec3 f0 = material.clearcoatF0; - float f90 = material.clearcoatF90; - float roughness = material.clearcoatRoughness; - float alpha = pow2( roughness ); - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( f0, f90, dotVH ); - float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); - float D = D_GGX( alpha, dotNH ); - return F * ( V * D ); - } -#endif -vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { - vec3 f0 = material.specularColorBlended; - float f90 = material.specularF90; - float roughness = material.roughness; - float alpha = pow2( roughness ); - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( f0, f90, dotVH ); - #ifdef USE_IRIDESCENCE - F = mix( F, material.iridescenceFresnel, material.iridescence ); - #endif - #ifdef USE_ANISOTROPY - float dotTL = dot( material.anisotropyT, lightDir ); - float dotTV = dot( material.anisotropyT, viewDir ); - float dotTH = dot( material.anisotropyT, halfDir ); - float dotBL = dot( material.anisotropyB, lightDir ); - float dotBV = dot( material.anisotropyB, viewDir ); - float dotBH = dot( material.anisotropyB, halfDir ); - float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); - float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); - #else - float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); - float D = D_GGX( alpha, dotNH ); - #endif - return F * ( V * D ); -} -vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { - const float LUT_SIZE = 64.0; - const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; - const float LUT_BIAS = 0.5 / LUT_SIZE; - float dotNV = saturate( dot( N, V ) ); - vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); - uv = uv * LUT_SCALE + LUT_BIAS; - return uv; -} -float LTC_ClippedSphereFormFactor( const in vec3 f ) { - float l = length( f ); - return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); -} -vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { - float x = dot( v1, v2 ); - float y = abs( x ); - float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; - float b = 3.4175940 + ( 4.1616724 + y ) * y; - float v = a / b; - float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; - return cross( v1, v2 ) * theta_sintheta; -} -vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { - vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; - vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; - vec3 lightNormal = cross( v1, v2 ); - if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); - vec3 T1, T2; - T1 = normalize( V - N * dot( V, N ) ); - T2 = - cross( N, T1 ); - mat3 mat = mInv * transpose( mat3( T1, T2, N ) ); - vec3 coords[ 4 ]; - coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); - coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); - coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); - coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); - coords[ 0 ] = normalize( coords[ 0 ] ); - coords[ 1 ] = normalize( coords[ 1 ] ); - coords[ 2 ] = normalize( coords[ 2 ] ); - coords[ 3 ] = normalize( coords[ 3 ] ); - vec3 vectorFormFactor = vec3( 0.0 ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); - float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); - return vec3( result ); -} -#if defined( USE_SHEEN ) -float D_Charlie( float roughness, float dotNH ) { - float alpha = pow2( roughness ); - float invAlpha = 1.0 / alpha; - float cos2h = dotNH * dotNH; - float sin2h = max( 1.0 - cos2h, 0.0078125 ); - return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); -} -float V_Neubelt( float dotNV, float dotNL ) { - return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); -} -vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float D = D_Charlie( sheenRoughness, dotNH ); - float V = V_Neubelt( dotNV, dotNL ); - return sheenColor * ( D * V ); -} -#endif -float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - float r2 = roughness * roughness; - float rInv = 1.0 / ( roughness + 0.1 ); - float a = -1.9362 + 1.0678 * roughness + 0.4573 * r2 - 0.8469 * rInv; - float b = -0.6014 + 0.5538 * roughness - 0.4670 * r2 - 0.1255 * rInv; - float DG = exp( a * dotNV + b ); - return saturate( DG ); -} -vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; - return specularColor * fab.x + specularF90 * fab.y; -} -#ifdef USE_IRIDESCENCE -void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#else -void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { -#endif - float dotNV = saturate( dot( normal, viewDir ) ); - vec2 fab = texture2D( dfgLUT, vec2( roughness, dotNV ) ).rg; - #ifdef USE_IRIDESCENCE - vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); - #else - vec3 Fr = specularColor; - #endif - vec3 FssEss = Fr * fab.x + specularF90 * fab.y; - float Ess = fab.x + fab.y; - float Ems = 1.0 - Ess; - vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); - singleScatter += FssEss; - multiScatter += Fms * Ems; -} -vec3 BRDF_GGX_Multiscatter( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { - vec3 singleScatter = BRDF_GGX( lightDir, viewDir, normal, material ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - vec2 dfgV = texture2D( dfgLUT, vec2( material.roughness, dotNV ) ).rg; - vec2 dfgL = texture2D( dfgLUT, vec2( material.roughness, dotNL ) ).rg; - vec3 FssEss_V = material.specularColorBlended * dfgV.x + material.specularF90 * dfgV.y; - vec3 FssEss_L = material.specularColorBlended * dfgL.x + material.specularF90 * dfgL.y; - float Ess_V = dfgV.x + dfgV.y; - float Ess_L = dfgL.x + dfgL.y; - float Ems_V = 1.0 - Ess_V; - float Ems_L = 1.0 - Ess_L; - vec3 Favg = material.specularColorBlended + ( 1.0 - material.specularColorBlended ) * 0.047619; - vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg + EPSILON ); - float compensationFactor = Ems_V * Ems_L; - vec3 multiScatter = Fms * compensationFactor; - return singleScatter + multiScatter; -} -#if NUM_RECT_AREA_LIGHTS > 0 - void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 normal = geometryNormal; - vec3 viewDir = geometryViewDir; - vec3 position = geometryPosition; - vec3 lightPos = rectAreaLight.position; - vec3 halfWidth = rectAreaLight.halfWidth; - vec3 halfHeight = rectAreaLight.halfHeight; - vec3 lightColor = rectAreaLight.color; - float roughness = material.roughness; - vec3 rectCoords[ 4 ]; - rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; - rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; - rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; - vec2 uv = LTC_Uv( normal, viewDir, roughness ); - vec4 t1 = texture2D( ltc_1, uv ); - vec4 t2 = texture2D( ltc_2, uv ); - mat3 mInv = mat3( - vec3( t1.x, 0, t1.y ), - vec3( 0, 1, 0 ), - vec3( t1.z, 0, t1.w ) - ); - vec3 fresnel = ( material.specularColorBlended * t2.x + ( material.specularF90 - material.specularColorBlended ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseContribution * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - #ifdef USE_CLEARCOAT - vec3 Ncc = geometryClearcoatNormal; - vec2 uvClearcoat = LTC_Uv( Ncc, viewDir, material.clearcoatRoughness ); - vec4 t1Clearcoat = texture2D( ltc_1, uvClearcoat ); - vec4 t2Clearcoat = texture2D( ltc_2, uvClearcoat ); - mat3 mInvClearcoat = mat3( - vec3( t1Clearcoat.x, 0, t1Clearcoat.y ), - vec3( 0, 1, 0 ), - vec3( t1Clearcoat.z, 0, t1Clearcoat.w ) - ); - vec3 fresnelClearcoat = material.clearcoatF0 * t2Clearcoat.x + ( material.clearcoatF90 - material.clearcoatF0 ) * t2Clearcoat.y; - clearcoatSpecularDirect += lightColor * fresnelClearcoat * LTC_Evaluate( Ncc, viewDir, position, mInvClearcoat, rectCoords ); - #endif - } -#endif -void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifdef USE_CLEARCOAT - float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); - vec3 ccIrradiance = dotNLcc * directLight.color; - clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); - #endif - #ifdef USE_SHEEN - - sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); - - float sheenAlbedoV = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); - float sheenAlbedoL = IBLSheenBRDF( geometryNormal, directLight.direction, material.sheenRoughness ); - - float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * max( sheenAlbedoV, sheenAlbedoL ); - - irradiance *= sheenEnergyComp; - - #endif - reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseContribution ); -} -void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 diffuse = irradiance * BRDF_Lambert( material.diffuseContribution ); - #ifdef USE_SHEEN - float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); - float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; - diffuse *= sheenEnergyComp; - #endif - reflectedLight.indirectDiffuse += diffuse; -} -void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { - #ifdef USE_CLEARCOAT - clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ) * RECIPROCAL_PI; - #endif - vec3 singleScatteringDielectric = vec3( 0.0 ); - vec3 multiScatteringDielectric = vec3( 0.0 ); - vec3 singleScatteringMetallic = vec3( 0.0 ); - vec3 multiScatteringMetallic = vec3( 0.0 ); - #ifdef USE_IRIDESCENCE - computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnelDielectric, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); - computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.iridescence, material.iridescenceFresnelMetallic, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); - #else - computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScatteringDielectric, multiScatteringDielectric ); - computeMultiscattering( geometryNormal, geometryViewDir, material.diffuseColor, material.specularF90, material.roughness, singleScatteringMetallic, multiScatteringMetallic ); - #endif - vec3 singleScattering = mix( singleScatteringDielectric, singleScatteringMetallic, material.metalness ); - vec3 multiScattering = mix( multiScatteringDielectric, multiScatteringMetallic, material.metalness ); - vec3 totalScatteringDielectric = singleScatteringDielectric + multiScatteringDielectric; - vec3 diffuse = material.diffuseContribution * ( 1.0 - totalScatteringDielectric ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - vec3 indirectSpecular = radiance * singleScattering; - indirectSpecular += multiScattering * cosineWeightedIrradiance; - vec3 indirectDiffuse = diffuse * cosineWeightedIrradiance; - #ifdef USE_SHEEN - float sheenAlbedo = IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); - float sheenEnergyComp = 1.0 - max3( material.sheenColor ) * sheenAlbedo; - indirectSpecular *= sheenEnergyComp; - indirectDiffuse *= sheenEnergyComp; - #endif - reflectedLight.indirectSpecular += indirectSpecular; - reflectedLight.indirectDiffuse += indirectDiffuse; -} -#define RE_Direct RE_Direct_Physical -#define RE_Direct_RectArea RE_Direct_RectArea_Physical -#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical -#define RE_IndirectSpecular RE_IndirectSpecular_Physical -float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { - return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,wu=` -vec3 geometryPosition = - vViewPosition; -vec3 geometryNormal = normal; -vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); -vec3 geometryClearcoatNormal = vec3( 0.0 ); -#ifdef USE_CLEARCOAT - geometryClearcoatNormal = clearcoatNormal; -#endif -#ifdef USE_IRIDESCENCE - float dotNVi = saturate( dot( normal, geometryViewDir ) ); - if ( material.iridescenceThickness == 0.0 ) { - material.iridescence = 0.0; - } else { - material.iridescence = saturate( material.iridescence ); - } - if ( material.iridescence > 0.0 ) { - material.iridescenceFresnelDielectric = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); - material.iridescenceFresnelMetallic = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.diffuseColor ); - material.iridescenceFresnel = mix( material.iridescenceFresnelDielectric, material.iridescenceFresnelMetallic, material.metalness ); - material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); - } -#endif -IncidentLight directLight; -#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) - PointLight pointLight; - #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - pointLight = pointLights[ i ]; - getPointLightInfo( pointLight, geometryPosition, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) - pointLightShadow = pointLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; - #endif - RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) - SpotLight spotLight; - vec4 spotColor; - vec3 spotLightCoord; - bool inSpotLightMap; - #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - spotLight = spotLights[ i ]; - getSpotLightInfo( spotLight, geometryPosition, directLight ); - #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX - #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS - #else - #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #endif - #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) - spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; - inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); - spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); - directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; - #endif - #undef SPOT_LIGHT_MAP_INDEX - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - spotLightShadow = spotLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) - DirectionalLight directionalLight; - #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - directionalLight = directionalLights[ i ]; - getDirectionalLightInfo( directionalLight, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) - directionalLightShadow = directionalLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) - RectAreaLight rectAreaLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { - rectAreaLight = rectAreaLights[ i ]; - RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if defined( RE_IndirectDiffuse ) - vec3 iblIrradiance = vec3( 0.0 ); - vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); - #if defined( USE_LIGHT_PROBES ) - irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); - #endif - #if ( NUM_HEMI_LIGHTS > 0 ) - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); - } - #pragma unroll_loop_end - #endif -#endif -#if defined( RE_IndirectSpecular ) - vec3 radiance = vec3( 0.0 ); - vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,Cu=`#if defined( RE_IndirectDiffuse ) - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - irradiance += lightMapIrradiance; - #endif - #if defined( USE_ENVMAP ) && defined( ENVMAP_TYPE_CUBE_UV ) - #if defined( STANDARD ) || defined( LAMBERT ) || defined( PHONG ) - iblIrradiance += getIBLIrradiance( geometryNormal ); - #endif - #endif -#endif -#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) - #ifdef USE_ANISOTROPY - radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); - #else - radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); - #endif - #ifdef USE_CLEARCOAT - clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); - #endif -#endif`,Pu=`#if defined( RE_IndirectDiffuse ) - #if defined( LAMBERT ) || defined( PHONG ) - irradiance += iblIrradiance; - #endif - RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif -#if defined( RE_IndirectSpecular ) - RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,Du=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) - gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,Lu=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif`,Iu=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER - varying float vFragDepth; - varying float vIsPerspective; -#endif`,Uu=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,Nu=`#ifdef USE_MAP - vec4 sampledDiffuseColor = texture2D( map, vMapUv ); - #ifdef DECODE_VIDEO_TEXTURE - sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); - #endif - diffuseColor *= sampledDiffuseColor; -#endif`,Fu=`#ifdef USE_MAP - uniform sampler2D map; -#endif`,Ou=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - #if defined( USE_POINTS_UV ) - vec2 uv = vUv; - #else - vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; - #endif -#endif -#ifdef USE_MAP - diffuseColor *= texture2D( map, uv ); -#endif -#ifdef USE_ALPHAMAP - diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,Bu=`#if defined( USE_POINTS_UV ) - varying vec2 vUv; -#else - #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - uniform mat3 uvTransform; - #endif -#endif -#ifdef USE_MAP - uniform sampler2D map; -#endif -#ifdef USE_ALPHAMAP - uniform sampler2D alphaMap; -#endif`,zu=`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); - metalnessFactor *= texelMetalness.b; -#endif`,Vu=`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif`,Gu=`#ifdef USE_INSTANCING_MORPH - float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; - } -#endif`,ku=`#if defined( USE_MORPHCOLORS ) - vColor *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - #if defined( USE_COLOR_ALPHA ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; - #elif defined( USE_COLOR ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; - #endif - } -#endif`,Hu=`#ifdef USE_MORPHNORMALS - objectNormal *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; - } -#endif`,Wu=`#ifdef USE_MORPHTARGETS - #ifndef USE_INSTANCING_MORPH - uniform float morphTargetBaseInfluence; - uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - #endif - uniform sampler2DArray morphTargetsTexture; - uniform ivec2 morphTargetsTextureSize; - vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { - int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; - int y = texelIndex / morphTargetsTextureSize.x; - int x = texelIndex - y * morphTargetsTextureSize.x; - ivec3 morphUV = ivec3( x, y, morphTargetIndex ); - return texelFetch( morphTargetsTexture, morphUV, 0 ); - } -#endif`,Xu=`#ifdef USE_MORPHTARGETS - transformed *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; - } -#endif`,qu=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; -#ifdef FLAT_SHADED - vec3 fdx = dFdx( vViewPosition ); - vec3 fdy = dFdy( vViewPosition ); - vec3 normal = normalize( cross( fdx, fdy ) ); -#else - vec3 normal = normalize( vNormal ); - #ifdef DOUBLE_SIDED - normal *= faceDirection; - #endif -#endif -#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) - #ifdef USE_TANGENT - mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); - #else - mat3 tbn = getTangentFrame( - vViewPosition, normal, - #if defined( USE_NORMALMAP ) - vNormalMapUv - #elif defined( USE_CLEARCOAT_NORMALMAP ) - vClearcoatNormalMapUv - #else - vUv - #endif - ); - #endif - #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) - tbn[0] *= faceDirection; - tbn[1] *= faceDirection; - #endif -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - #ifdef USE_TANGENT - mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); - #else - mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); - #endif - #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) - tbn2[0] *= faceDirection; - tbn2[1] *= faceDirection; - #endif -#endif -vec3 nonPerturbedNormal = normal;`,Yu=`#ifdef USE_NORMALMAP_OBJECTSPACE - normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; - #ifdef FLIP_SIDED - normal = - normal; - #endif - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - normal = normalize( normalMatrix * normal ); -#elif defined( USE_NORMALMAP_TANGENTSPACE ) - vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; - mapN.xy *= normalScale; - normal = normalize( tbn * mapN ); -#elif defined( USE_BUMPMAP ) - normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,ju=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,$u=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,Ku=`#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif`,Zu=`#ifdef USE_NORMALMAP - uniform sampler2D normalMap; - uniform vec2 normalScale; -#endif -#ifdef USE_NORMALMAP_OBJECTSPACE - uniform mat3 normalMatrix; -#endif -#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) - mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { - vec3 q0 = dFdx( eye_pos.xyz ); - vec3 q1 = dFdy( eye_pos.xyz ); - vec2 st0 = dFdx( uv.st ); - vec2 st1 = dFdy( uv.st ); - vec3 N = surf_norm; - vec3 q1perp = cross( q1, N ); - vec3 q0perp = cross( N, q0 ); - vec3 T = q1perp * st0.x + q0perp * st1.x; - vec3 B = q1perp * st0.y + q0perp * st1.y; - float det = max( dot( T, T ), dot( B, B ) ); - float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); - return mat3( T * scale, B * scale, N ); - } -#endif`,Ju=`#ifdef USE_CLEARCOAT - vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,Qu=`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,ed=`#ifdef USE_CLEARCOATMAP - uniform sampler2D clearcoatMap; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform sampler2D clearcoatNormalMap; - uniform vec2 clearcoatNormalScale; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform sampler2D clearcoatRoughnessMap; -#endif`,td=`#ifdef USE_IRIDESCENCEMAP - uniform sampler2D iridescenceMap; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform sampler2D iridescenceThicknessMap; -#endif`,nd=`#ifdef OPAQUE -diffuseColor.a = 1.0; -#endif -#ifdef USE_TRANSMISSION -diffuseColor.a *= material.transmissionAlpha; -#endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,id=`vec3 packNormalToRGB( const in vec3 normal ) { - return normalize( normal ) * 0.5 + 0.5; -} -vec3 unpackRGBToNormal( const in vec3 rgb ) { - return 2.0 * rgb.xyz - 1.0; -} -const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; -const float Inv255 = 1. / 255.; -const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); -const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); -const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); -const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); -vec4 packDepthToRGBA( const in float v ) { - if( v <= 0.0 ) - return vec4( 0., 0., 0., 0. ); - if( v >= 1.0 ) - return vec4( 1., 1., 1., 1. ); - float vuf; - float af = modf( v * PackFactors.a, vuf ); - float bf = modf( vuf * ShiftRight8, vuf ); - float gf = modf( vuf * ShiftRight8, vuf ); - return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); -} -vec3 packDepthToRGB( const in float v ) { - if( v <= 0.0 ) - return vec3( 0., 0., 0. ); - if( v >= 1.0 ) - return vec3( 1., 1., 1. ); - float vuf; - float bf = modf( v * PackFactors.b, vuf ); - float gf = modf( vuf * ShiftRight8, vuf ); - return vec3( vuf * Inv255, gf * PackUpscale, bf ); -} -vec2 packDepthToRG( const in float v ) { - if( v <= 0.0 ) - return vec2( 0., 0. ); - if( v >= 1.0 ) - return vec2( 1., 1. ); - float vuf; - float gf = modf( v * 256., vuf ); - return vec2( vuf * Inv255, gf ); -} -float unpackRGBAToDepth( const in vec4 v ) { - return dot( v, UnpackFactors4 ); -} -float unpackRGBToDepth( const in vec3 v ) { - return dot( v, UnpackFactors3 ); -} -float unpackRGToDepth( const in vec2 v ) { - return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; -} -vec4 pack2HalfToRGBA( const in vec2 v ) { - vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); - return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); -} -vec2 unpackRGBATo2Half( const in vec4 v ) { - return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); -} -float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { - return ( viewZ + near ) / ( near - far ); -} -float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { - #ifdef USE_REVERSED_DEPTH_BUFFER - - return depth * ( far - near ) - far; - #else - return depth * ( near - far ) - near; - #endif -} -float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { - return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); -} -float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { - - #ifdef USE_REVERSED_DEPTH_BUFFER - return ( near * far ) / ( ( near - far ) * depth - near ); - #else - return ( near * far ) / ( ( far - near ) * depth - far ); - #endif -}`,rd=`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif`,sd=`vec4 mvPosition = vec4( transformed, 1.0 ); -#ifdef USE_BATCHING - mvPosition = batchingMatrix * mvPosition; -#endif -#ifdef USE_INSTANCING - mvPosition = instanceMatrix * mvPosition; -#endif -mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,ad=`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,od=`#ifdef DITHERING - vec3 dithering( vec3 color ) { - float grid_position = rand( gl_FragCoord.xy ); - vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); - dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); - return color + dither_shift_RGB; - } -#endif`,ld=`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); - roughnessFactor *= texelRoughness.g; -#endif`,cd=`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif`,ud=`#if NUM_SPOT_LIGHT_COORDS > 0 - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#if NUM_SPOT_LIGHT_MAPS > 0 - uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - #if defined( SHADOWMAP_TYPE_PCF ) - uniform sampler2DShadow directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - #else - uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - #if defined( SHADOWMAP_TYPE_PCF ) - uniform sampler2DShadow spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - #else - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - struct SpotLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #if defined( SHADOWMAP_TYPE_PCF ) - uniform samplerCubeShadow pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - #elif defined( SHADOWMAP_TYPE_BASIC ) - uniform samplerCube pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - #if defined( SHADOWMAP_TYPE_PCF ) - float interleavedGradientNoise( vec2 position ) { - return fract( 52.9829189 * fract( dot( position, vec2( 0.06711056, 0.00583715 ) ) ) ); - } - vec2 vogelDiskSample( int sampleIndex, int samplesCount, float phi ) { - const float goldenAngle = 2.399963229728653; - float r = sqrt( ( float( sampleIndex ) + 0.5 ) / float( samplesCount ) ); - float theta = float( sampleIndex ) * goldenAngle + phi; - return vec2( cos( theta ), sin( theta ) ) * r; - } - #endif - #if defined( SHADOWMAP_TYPE_PCF ) - float getShadow( sampler2DShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - shadowCoord.z += shadowBias; - bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; - bool frustumTest = inFrustum && shadowCoord.z <= 1.0; - if ( frustumTest ) { - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float radius = shadowRadius * texelSize.x; - float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; - shadow = ( - texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 0, 5, phi ) * radius, shadowCoord.z ) ) + - texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 1, 5, phi ) * radius, shadowCoord.z ) ) + - texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 2, 5, phi ) * radius, shadowCoord.z ) ) + - texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 3, 5, phi ) * radius, shadowCoord.z ) ) + - texture( shadowMap, vec3( shadowCoord.xy + vogelDiskSample( 4, 5, phi ) * radius, shadowCoord.z ) ) - ) * 0.2; - } - return mix( 1.0, shadow, shadowIntensity ); - } - #elif defined( SHADOWMAP_TYPE_VSM ) - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - #ifdef USE_REVERSED_DEPTH_BUFFER - shadowCoord.z -= shadowBias; - #else - shadowCoord.z += shadowBias; - #endif - bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; - bool frustumTest = inFrustum && shadowCoord.z <= 1.0; - if ( frustumTest ) { - vec2 distribution = texture2D( shadowMap, shadowCoord.xy ).rg; - float mean = distribution.x; - float variance = distribution.y * distribution.y; - #ifdef USE_REVERSED_DEPTH_BUFFER - float hard_shadow = step( mean, shadowCoord.z ); - #else - float hard_shadow = step( shadowCoord.z, mean ); - #endif - - if ( hard_shadow == 1.0 ) { - shadow = 1.0; - } else { - variance = max( variance, 0.0000001 ); - float d = shadowCoord.z - mean; - float p_max = variance / ( variance + d * d ); - p_max = clamp( ( p_max - 0.3 ) / 0.65, 0.0, 1.0 ); - shadow = max( hard_shadow, p_max ); - } - } - return mix( 1.0, shadow, shadowIntensity ); - } - #else - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - #ifdef USE_REVERSED_DEPTH_BUFFER - shadowCoord.z -= shadowBias; - #else - shadowCoord.z += shadowBias; - #endif - bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; - bool frustumTest = inFrustum && shadowCoord.z <= 1.0; - if ( frustumTest ) { - float depth = texture2D( shadowMap, shadowCoord.xy ).r; - #ifdef USE_REVERSED_DEPTH_BUFFER - shadow = step( depth, shadowCoord.z ); - #else - shadow = step( shadowCoord.z, depth ); - #endif - } - return mix( 1.0, shadow, shadowIntensity ); - } - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #if defined( SHADOWMAP_TYPE_PCF ) - float getPointShadow( samplerCubeShadow shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - float shadow = 1.0; - vec3 lightToPosition = shadowCoord.xyz; - vec3 bd3D = normalize( lightToPosition ); - vec3 absVec = abs( lightToPosition ); - float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); - if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { - #ifdef USE_REVERSED_DEPTH_BUFFER - float dp = ( shadowCameraNear * ( shadowCameraFar - viewSpaceZ ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); - dp -= shadowBias; - #else - float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); - dp += shadowBias; - #endif - float texelSize = shadowRadius / shadowMapSize.x; - vec3 absDir = abs( bd3D ); - vec3 tangent = absDir.x > absDir.z ? vec3( 0.0, 1.0, 0.0 ) : vec3( 1.0, 0.0, 0.0 ); - tangent = normalize( cross( bd3D, tangent ) ); - vec3 bitangent = cross( bd3D, tangent ); - float phi = interleavedGradientNoise( gl_FragCoord.xy ) * PI2; - vec2 sample0 = vogelDiskSample( 0, 5, phi ); - vec2 sample1 = vogelDiskSample( 1, 5, phi ); - vec2 sample2 = vogelDiskSample( 2, 5, phi ); - vec2 sample3 = vogelDiskSample( 3, 5, phi ); - vec2 sample4 = vogelDiskSample( 4, 5, phi ); - shadow = ( - texture( shadowMap, vec4( bd3D + ( tangent * sample0.x + bitangent * sample0.y ) * texelSize, dp ) ) + - texture( shadowMap, vec4( bd3D + ( tangent * sample1.x + bitangent * sample1.y ) * texelSize, dp ) ) + - texture( shadowMap, vec4( bd3D + ( tangent * sample2.x + bitangent * sample2.y ) * texelSize, dp ) ) + - texture( shadowMap, vec4( bd3D + ( tangent * sample3.x + bitangent * sample3.y ) * texelSize, dp ) ) + - texture( shadowMap, vec4( bd3D + ( tangent * sample4.x + bitangent * sample4.y ) * texelSize, dp ) ) - ) * 0.2; - } - return mix( 1.0, shadow, shadowIntensity ); - } - #elif defined( SHADOWMAP_TYPE_BASIC ) - float getPointShadow( samplerCube shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - float shadow = 1.0; - vec3 lightToPosition = shadowCoord.xyz; - vec3 absVec = abs( lightToPosition ); - float viewSpaceZ = max( max( absVec.x, absVec.y ), absVec.z ); - if ( viewSpaceZ - shadowCameraFar <= 0.0 && viewSpaceZ - shadowCameraNear >= 0.0 ) { - float dp = ( shadowCameraFar * ( viewSpaceZ - shadowCameraNear ) ) / ( viewSpaceZ * ( shadowCameraFar - shadowCameraNear ) ); - dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - float depth = textureCube( shadowMap, bd3D ).r; - #ifdef USE_REVERSED_DEPTH_BUFFER - depth = 1.0 - depth; - #endif - shadow = step( dp, depth ); - } - return mix( 1.0, shadow, shadowIntensity ); - } - #endif - #endif -#endif`,dd=`#if NUM_SPOT_LIGHT_COORDS > 0 - uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - struct SpotLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif -#endif`,hd=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) - vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - vec4 shadowWorldPosition; -#endif -#if defined( USE_SHADOWMAP ) - #if NUM_DIR_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); - vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); - vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif -#endif -#if NUM_SPOT_LIGHT_COORDS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { - shadowWorldPosition = worldPosition; - #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; - #endif - vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end -#endif`,fd=`float getShadowMask() { - float shadow = 1.0; - #ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - directionalLight = directionalLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - spotLight = spotLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 && ( defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_BASIC ) ) - PointLightShadow pointLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - pointLight = pointLightShadows[ i ]; - shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; - } - #pragma unroll_loop_end - #endif - #endif - return shadow; -}`,pd=`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,md=`#ifdef USE_SKINNING - uniform mat4 bindMatrix; - uniform mat4 bindMatrixInverse; - uniform highp sampler2D boneTexture; - mat4 getBoneMatrix( const in float i ) { - int size = textureSize( boneTexture, 0 ).x; - int j = int( i ) * 4; - int x = j % size; - int y = j / size; - vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); - vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); - vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); - vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); - return mat4( v1, v2, v3, v4 ); - } -#endif`,gd=`#ifdef USE_SKINNING - vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); - vec4 skinned = vec4( 0.0 ); - skinned += boneMatX * skinVertex * skinWeight.x; - skinned += boneMatY * skinVertex * skinWeight.y; - skinned += boneMatZ * skinVertex * skinWeight.z; - skinned += boneMatW * skinVertex * skinWeight.w; - transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,_d=`#ifdef USE_SKINNING - mat4 skinMatrix = mat4( 0.0 ); - skinMatrix += skinWeight.x * boneMatX; - skinMatrix += skinWeight.y * boneMatY; - skinMatrix += skinWeight.z * boneMatZ; - skinMatrix += skinWeight.w * boneMatW; - skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; - objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; - #ifdef USE_TANGENT - objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #endif -#endif`,xd=`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif`,vd=`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif`,Md=`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,Sd=`#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -uniform float toneMappingExposure; -vec3 LinearToneMapping( vec3 color ) { - return saturate( toneMappingExposure * color ); -} -vec3 ReinhardToneMapping( vec3 color ) { - color *= toneMappingExposure; - return saturate( color / ( vec3( 1.0 ) + color ) ); -} -vec3 CineonToneMapping( vec3 color ) { - color *= toneMappingExposure; - color = max( vec3( 0.0 ), color - 0.004 ); - return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); -} -vec3 RRTAndODTFit( vec3 v ) { - vec3 a = v * ( v + 0.0245786 ) - 0.000090537; - vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; - return a / b; -} -vec3 ACESFilmicToneMapping( vec3 color ) { - const mat3 ACESInputMat = mat3( - vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), - vec3( 0.04823, 0.01566, 0.83777 ) - ); - const mat3 ACESOutputMat = mat3( - vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), - vec3( -0.07367, -0.00605, 1.07602 ) - ); - color *= toneMappingExposure / 0.6; - color = ACESInputMat * color; - color = RRTAndODTFit( color ); - color = ACESOutputMat * color; - return saturate( color ); -} -const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( - vec3( 1.6605, - 0.1246, - 0.0182 ), - vec3( - 0.5876, 1.1329, - 0.1006 ), - vec3( - 0.0728, - 0.0083, 1.1187 ) -); -const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( - vec3( 0.6274, 0.0691, 0.0164 ), - vec3( 0.3293, 0.9195, 0.0880 ), - vec3( 0.0433, 0.0113, 0.8956 ) -); -vec3 agxDefaultContrastApprox( vec3 x ) { - vec3 x2 = x * x; - vec3 x4 = x2 * x2; - return + 15.5 * x4 * x2 - - 40.14 * x4 * x - + 31.96 * x4 - - 6.868 * x2 * x - + 0.4298 * x2 - + 0.1191 * x - - 0.00232; -} -vec3 AgXToneMapping( vec3 color ) { - const mat3 AgXInsetMatrix = mat3( - vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), - vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), - vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) - ); - const mat3 AgXOutsetMatrix = mat3( - vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), - vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), - vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) - ); - const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; - color *= toneMappingExposure; - color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; - color = AgXInsetMatrix * color; - color = max( color, 1e-10 ); color = log2( color ); - color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); - color = clamp( color, 0.0, 1.0 ); - color = agxDefaultContrastApprox( color ); - color = AgXOutsetMatrix * color; - color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); - color = LINEAR_REC2020_TO_LINEAR_SRGB * color; - color = clamp( color, 0.0, 1.0 ); - return color; -} -vec3 NeutralToneMapping( vec3 color ) { - const float StartCompression = 0.8 - 0.04; - const float Desaturation = 0.15; - color *= toneMappingExposure; - float x = min( color.r, min( color.g, color.b ) ); - float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; - color -= offset; - float peak = max( color.r, max( color.g, color.b ) ); - if ( peak < StartCompression ) return color; - float d = 1. - StartCompression; - float newPeak = 1. - d * d / ( peak + d - StartCompression ); - color *= newPeak / peak; - float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); - return mix( color, vec3( newPeak ), g ); -} -vec3 CustomToneMapping( vec3 color ) { return color; }`,Ed=`#ifdef USE_TRANSMISSION - material.transmission = transmission; - material.transmissionAlpha = 1.0; - material.thickness = thickness; - material.attenuationDistance = attenuationDistance; - material.attenuationColor = attenuationColor; - #ifdef USE_TRANSMISSIONMAP - material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; - #endif - #ifdef USE_THICKNESSMAP - material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; - #endif - vec3 pos = vWorldPosition; - vec3 v = normalize( cameraPosition - pos ); - vec3 n = inverseTransformDirection( normal, viewMatrix ); - vec4 transmitted = getIBLVolumeRefraction( - n, v, material.roughness, material.diffuseContribution, material.specularColorBlended, material.specularF90, - pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, - material.attenuationColor, material.attenuationDistance ); - material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); - totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,bd=`#ifdef USE_TRANSMISSION - uniform float transmission; - uniform float thickness; - uniform float attenuationDistance; - uniform vec3 attenuationColor; - #ifdef USE_TRANSMISSIONMAP - uniform sampler2D transmissionMap; - #endif - #ifdef USE_THICKNESSMAP - uniform sampler2D thicknessMap; - #endif - uniform vec2 transmissionSamplerSize; - uniform sampler2D transmissionSamplerMap; - uniform mat4 modelMatrix; - uniform mat4 projectionMatrix; - varying vec3 vWorldPosition; - float w0( float a ) { - return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); - } - float w1( float a ) { - return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); - } - float w2( float a ){ - return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); - } - float w3( float a ) { - return ( 1.0 / 6.0 ) * ( a * a * a ); - } - float g0( float a ) { - return w0( a ) + w1( a ); - } - float g1( float a ) { - return w2( a ) + w3( a ); - } - float h0( float a ) { - return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); - } - float h1( float a ) { - return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); - } - vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { - uv = uv * texelSize.zw + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - float g0x = g0( fuv.x ); - float g1x = g1( fuv.x ); - float h0x = h0( fuv.x ); - float h1x = h1( fuv.x ); - float h0y = h0( fuv.y ); - float h1y = h1( fuv.y ); - vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; - vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; - vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; - vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; - return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + - g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); - } - vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { - vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); - vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); - vec2 fLodSizeInv = 1.0 / fLodSize; - vec2 cLodSizeInv = 1.0 / cLodSize; - vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); - vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); - return mix( fSample, cSample, fract( lod ) ); - } - vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { - vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); - vec3 modelScale; - modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); - modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); - modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); - return normalize( refractionVector ) * thickness * modelScale; - } - float applyIorToRoughness( const in float roughness, const in float ior ) { - return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); - } - vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { - float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); - return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); - } - vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { - if ( isinf( attenuationDistance ) ) { - return vec3( 1.0 ); - } else { - vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; - vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; - } - } - vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, - const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, - const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, - const in vec3 attenuationColor, const in float attenuationDistance ) { - vec4 transmittedLight; - vec3 transmittance; - #ifdef USE_DISPERSION - float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; - vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); - for ( int i = 0; i < 3; i ++ ) { - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); - transmittedLight[ i ] = transmissionSample[ i ]; - transmittedLight.a += transmissionSample.a; - transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; - } - transmittedLight.a /= 3.0; - #else - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); - transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); - #endif - vec3 attenuatedColor = transmittance * transmittedLight.rgb; - vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); - float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; - return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); - } -#endif`,Td=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) - varying vec2 vUv; -#endif -#ifdef USE_MAP - varying vec2 vMapUv; -#endif -#ifdef USE_ALPHAMAP - varying vec2 vAlphaMapUv; -#endif -#ifdef USE_LIGHTMAP - varying vec2 vLightMapUv; -#endif -#ifdef USE_AOMAP - varying vec2 vAoMapUv; -#endif -#ifdef USE_BUMPMAP - varying vec2 vBumpMapUv; -#endif -#ifdef USE_NORMALMAP - varying vec2 vNormalMapUv; -#endif -#ifdef USE_EMISSIVEMAP - varying vec2 vEmissiveMapUv; -#endif -#ifdef USE_METALNESSMAP - varying vec2 vMetalnessMapUv; -#endif -#ifdef USE_ROUGHNESSMAP - varying vec2 vRoughnessMapUv; -#endif -#ifdef USE_ANISOTROPYMAP - varying vec2 vAnisotropyMapUv; -#endif -#ifdef USE_CLEARCOATMAP - varying vec2 vClearcoatMapUv; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - varying vec2 vClearcoatNormalMapUv; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - varying vec2 vClearcoatRoughnessMapUv; -#endif -#ifdef USE_IRIDESCENCEMAP - varying vec2 vIridescenceMapUv; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - varying vec2 vIridescenceThicknessMapUv; -#endif -#ifdef USE_SHEEN_COLORMAP - varying vec2 vSheenColorMapUv; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - varying vec2 vSheenRoughnessMapUv; -#endif -#ifdef USE_SPECULARMAP - varying vec2 vSpecularMapUv; -#endif -#ifdef USE_SPECULAR_COLORMAP - varying vec2 vSpecularColorMapUv; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - varying vec2 vSpecularIntensityMapUv; -#endif -#ifdef USE_TRANSMISSIONMAP - uniform mat3 transmissionMapTransform; - varying vec2 vTransmissionMapUv; -#endif -#ifdef USE_THICKNESSMAP - uniform mat3 thicknessMapTransform; - varying vec2 vThicknessMapUv; -#endif`,yd=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) - varying vec2 vUv; -#endif -#ifdef USE_MAP - uniform mat3 mapTransform; - varying vec2 vMapUv; -#endif -#ifdef USE_ALPHAMAP - uniform mat3 alphaMapTransform; - varying vec2 vAlphaMapUv; -#endif -#ifdef USE_LIGHTMAP - uniform mat3 lightMapTransform; - varying vec2 vLightMapUv; -#endif -#ifdef USE_AOMAP - uniform mat3 aoMapTransform; - varying vec2 vAoMapUv; -#endif -#ifdef USE_BUMPMAP - uniform mat3 bumpMapTransform; - varying vec2 vBumpMapUv; -#endif -#ifdef USE_NORMALMAP - uniform mat3 normalMapTransform; - varying vec2 vNormalMapUv; -#endif -#ifdef USE_DISPLACEMENTMAP - uniform mat3 displacementMapTransform; - varying vec2 vDisplacementMapUv; -#endif -#ifdef USE_EMISSIVEMAP - uniform mat3 emissiveMapTransform; - varying vec2 vEmissiveMapUv; -#endif -#ifdef USE_METALNESSMAP - uniform mat3 metalnessMapTransform; - varying vec2 vMetalnessMapUv; -#endif -#ifdef USE_ROUGHNESSMAP - uniform mat3 roughnessMapTransform; - varying vec2 vRoughnessMapUv; -#endif -#ifdef USE_ANISOTROPYMAP - uniform mat3 anisotropyMapTransform; - varying vec2 vAnisotropyMapUv; -#endif -#ifdef USE_CLEARCOATMAP - uniform mat3 clearcoatMapTransform; - varying vec2 vClearcoatMapUv; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform mat3 clearcoatNormalMapTransform; - varying vec2 vClearcoatNormalMapUv; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform mat3 clearcoatRoughnessMapTransform; - varying vec2 vClearcoatRoughnessMapUv; -#endif -#ifdef USE_SHEEN_COLORMAP - uniform mat3 sheenColorMapTransform; - varying vec2 vSheenColorMapUv; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - uniform mat3 sheenRoughnessMapTransform; - varying vec2 vSheenRoughnessMapUv; -#endif -#ifdef USE_IRIDESCENCEMAP - uniform mat3 iridescenceMapTransform; - varying vec2 vIridescenceMapUv; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform mat3 iridescenceThicknessMapTransform; - varying vec2 vIridescenceThicknessMapUv; -#endif -#ifdef USE_SPECULARMAP - uniform mat3 specularMapTransform; - varying vec2 vSpecularMapUv; -#endif -#ifdef USE_SPECULAR_COLORMAP - uniform mat3 specularColorMapTransform; - varying vec2 vSpecularColorMapUv; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - uniform mat3 specularIntensityMapTransform; - varying vec2 vSpecularIntensityMapUv; -#endif -#ifdef USE_TRANSMISSIONMAP - uniform mat3 transmissionMapTransform; - varying vec2 vTransmissionMapUv; -#endif -#ifdef USE_THICKNESSMAP - uniform mat3 thicknessMapTransform; - varying vec2 vThicknessMapUv; -#endif`,Ad=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) - vUv = vec3( uv, 1 ).xy; -#endif -#ifdef USE_MAP - vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ALPHAMAP - vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_LIGHTMAP - vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_AOMAP - vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_BUMPMAP - vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_NORMALMAP - vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_DISPLACEMENTMAP - vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_EMISSIVEMAP - vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_METALNESSMAP - vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ROUGHNESSMAP - vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ANISOTROPYMAP - vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOATMAP - vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_IRIDESCENCEMAP - vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SHEEN_COLORMAP - vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULARMAP - vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULAR_COLORMAP - vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_TRANSMISSIONMAP - vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_THICKNESSMAP - vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,Rd=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 - vec4 worldPosition = vec4( transformed, 1.0 ); - #ifdef USE_BATCHING - worldPosition = batchingMatrix * worldPosition; - #endif - #ifdef USE_INSTANCING - worldPosition = instanceMatrix * worldPosition; - #endif - worldPosition = modelMatrix * worldPosition; -#endif`;const wd=`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,Cd=`uniform sampler2D t2D; -uniform float backgroundIntensity; -varying vec2 vUv; -void main() { - vec4 texColor = texture2D( t2D, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,Pd=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,Dd=`#ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; -#elif defined( ENVMAP_TYPE_CUBE_UV ) - uniform sampler2D envMap; -#endif -uniform float flipEnvMap; -uniform float backgroundBlurriness; -uniform float backgroundIntensity; -uniform mat3 backgroundRotation; -varying vec3 vWorldDirection; -#include -void main() { - #ifdef ENVMAP_TYPE_CUBE - vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); - #else - vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,Ld=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,Id=`uniform samplerCube tCube; -uniform float tFlip; -uniform float opacity; -varying vec3 vWorldDirection; -void main() { - vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); - gl_FragColor = texColor; - gl_FragColor.a *= opacity; - #include - #include -}`,Ud=`#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - #include - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vHighPrecisionZW = gl_Position.zw; -}`,Nd=`#if DEPTH_PACKING == 3200 - uniform float opacity; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - vec4 diffuseColor = vec4( 1.0 ); - #include - #if DEPTH_PACKING == 3200 - diffuseColor.a = opacity; - #endif - #include - #include - #include - #include - #include - #ifdef USE_REVERSED_DEPTH_BUFFER - float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ]; - #else - float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5; - #endif - #if DEPTH_PACKING == 3200 - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); - #elif DEPTH_PACKING == 3201 - gl_FragColor = packDepthToRGBA( fragCoordZ ); - #elif DEPTH_PACKING == 3202 - gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); - #elif DEPTH_PACKING == 3203 - gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); - #endif -}`,Fd=`#define DISTANCE -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vWorldPosition = worldPosition.xyz; -}`,Od=`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -void main () { - vec4 diffuseColor = vec4( 1.0 ); - #include - #include - #include - #include - #include - float dist = length( vWorldPosition - referencePosition ); - dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); - dist = saturate( dist ); - gl_FragColor = vec4( dist, 0.0, 0.0, 1.0 ); -}`,Bd=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}`,zd=`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - gl_FragColor = texture2D( tEquirect, sampleUV ); - #include - #include -}`,Vd=`uniform float scale; -attribute float lineDistance; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -#include -void main() { - vLineDistance = scale * lineDistance; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Gd=`uniform vec3 diffuse; -uniform float opacity; -uniform float dashSize; -uniform float totalSize; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - if ( mod( vLineDistance, totalSize ) > dashSize ) { - discard; - } - vec3 outgoingLight = vec3( 0.0 ); - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,kd=`#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Hd=`uniform vec3 diffuse; -uniform float opacity; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; - #else - reflectedLight.indirectDiffuse += vec3( 1.0 ); - #endif - #include - reflectedLight.indirectDiffuse *= diffuseColor.rgb; - vec3 outgoingLight = reflectedLight.indirectDiffuse; - #include - #include - #include - #include - #include - #include - #include -}`,Wd=`#define LAMBERT -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,Xd=`#define LAMBERT -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,qd=`#define MATCAP -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; -}`,Yd=`#define MATCAP -uniform vec3 diffuse; -uniform float opacity; -uniform sampler2D matcap; -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 viewDir = normalize( vViewPosition ); - vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); - vec3 y = cross( viewDir, x ); - vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; - #ifdef USE_MATCAP - vec4 matcapColor = texture2D( matcap, uv ); - #else - vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); - #endif - vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; - #include - #include - #include - #include - #include - #include -}`,jd=`#define NORMAL -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - vViewPosition = - mvPosition.xyz; -#endif -}`,$d=`#define NORMAL -uniform float opacity; -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); - #include - #include - #include - #include - gl_FragColor = vec4( normalize( normal ) * 0.5 + 0.5, diffuseColor.a ); - #ifdef OPAQUE - gl_FragColor.a = 1.0; - #endif -}`,Kd=`#define PHONG -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,Zd=`#define PHONG -uniform vec3 diffuse; -uniform vec3 emissive; -uniform vec3 specular; -uniform float shininess; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,Jd=`#define STANDARD -varying vec3 vViewPosition; -#ifdef USE_TRANSMISSION - varying vec3 vWorldPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -#ifdef USE_TRANSMISSION - vWorldPosition = worldPosition.xyz; -#endif -}`,Qd=`#define STANDARD -#ifdef PHYSICAL - #define IOR - #define USE_SPECULAR -#endif -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float roughness; -uniform float metalness; -uniform float opacity; -#ifdef IOR - uniform float ior; -#endif -#ifdef USE_SPECULAR - uniform float specularIntensity; - uniform vec3 specularColor; - #ifdef USE_SPECULAR_COLORMAP - uniform sampler2D specularColorMap; - #endif - #ifdef USE_SPECULAR_INTENSITYMAP - uniform sampler2D specularIntensityMap; - #endif -#endif -#ifdef USE_CLEARCOAT - uniform float clearcoat; - uniform float clearcoatRoughness; -#endif -#ifdef USE_DISPERSION - uniform float dispersion; -#endif -#ifdef USE_IRIDESCENCE - uniform float iridescence; - uniform float iridescenceIOR; - uniform float iridescenceThicknessMinimum; - uniform float iridescenceThicknessMaximum; -#endif -#ifdef USE_SHEEN - uniform vec3 sheenColor; - uniform float sheenRoughness; - #ifdef USE_SHEEN_COLORMAP - uniform sampler2D sheenColorMap; - #endif - #ifdef USE_SHEEN_ROUGHNESSMAP - uniform sampler2D sheenRoughnessMap; - #endif -#endif -#ifdef USE_ANISOTROPY - uniform vec2 anisotropyVector; - #ifdef USE_ANISOTROPYMAP - uniform sampler2D anisotropyMap; - #endif -#endif -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; - vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; - #include - vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; - #ifdef USE_SHEEN - - outgoingLight = outgoingLight + sheenSpecularDirect + sheenSpecularIndirect; - - #endif - #ifdef USE_CLEARCOAT - float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); - vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); - outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; - #endif - #include - #include - #include - #include - #include - #include -}`,eh=`#define TOON -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}`,th=`#define TOON -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include -}`,nh=`uniform float size; -uniform float scale; -#include -#include -#include -#include -#include -#include -#ifdef USE_POINTS_UV - varying vec2 vUv; - uniform mat3 uvTransform; -#endif -void main() { - #ifdef USE_POINTS_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - #endif - #include - #include - #include - #include - #include - #include - gl_PointSize = size; - #ifdef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); - #endif - #include - #include - #include - #include -}`,ih=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - vec3 outgoingLight = vec3( 0.0 ); - #include - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,rh=`#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,sh=`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include - #include -}`,ah=`uniform float rotation; -uniform vec2 center; -#include -#include -#include -#include -#include -void main() { - #include - vec4 mvPosition = modelViewMatrix[ 3 ]; - vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); - #ifndef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - #endif - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - gl_Position = projectionMatrix * mvPosition; - #include - #include - #include -}`,oh=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - vec3 outgoingLight = vec3( 0.0 ); - #include - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include -}`,Ne={alphahash_fragment:Cc,alphahash_pars_fragment:Pc,alphamap_fragment:Dc,alphamap_pars_fragment:Lc,alphatest_fragment:Ic,alphatest_pars_fragment:Uc,aomap_fragment:Nc,aomap_pars_fragment:Fc,batching_pars_vertex:Oc,batching_vertex:Bc,begin_vertex:zc,beginnormal_vertex:Vc,bsdfs:Gc,iridescence_fragment:kc,bumpmap_pars_fragment:Hc,clipping_planes_fragment:Wc,clipping_planes_pars_fragment:Xc,clipping_planes_pars_vertex:qc,clipping_planes_vertex:Yc,color_fragment:jc,color_pars_fragment:$c,color_pars_vertex:Kc,color_vertex:Zc,common:Jc,cube_uv_reflection_fragment:Qc,defaultnormal_vertex:eu,displacementmap_pars_vertex:tu,displacementmap_vertex:nu,emissivemap_fragment:iu,emissivemap_pars_fragment:ru,colorspace_fragment:su,colorspace_pars_fragment:au,envmap_fragment:ou,envmap_common_pars_fragment:lu,envmap_pars_fragment:cu,envmap_pars_vertex:uu,envmap_physical_pars_fragment:Su,envmap_vertex:du,fog_vertex:hu,fog_pars_vertex:fu,fog_fragment:pu,fog_pars_fragment:mu,gradientmap_pars_fragment:gu,lightmap_pars_fragment:_u,lights_lambert_fragment:xu,lights_lambert_pars_fragment:vu,lights_pars_begin:Mu,lights_toon_fragment:Eu,lights_toon_pars_fragment:bu,lights_phong_fragment:Tu,lights_phong_pars_fragment:yu,lights_physical_fragment:Au,lights_physical_pars_fragment:Ru,lights_fragment_begin:wu,lights_fragment_maps:Cu,lights_fragment_end:Pu,logdepthbuf_fragment:Du,logdepthbuf_pars_fragment:Lu,logdepthbuf_pars_vertex:Iu,logdepthbuf_vertex:Uu,map_fragment:Nu,map_pars_fragment:Fu,map_particle_fragment:Ou,map_particle_pars_fragment:Bu,metalnessmap_fragment:zu,metalnessmap_pars_fragment:Vu,morphinstance_vertex:Gu,morphcolor_vertex:ku,morphnormal_vertex:Hu,morphtarget_pars_vertex:Wu,morphtarget_vertex:Xu,normal_fragment_begin:qu,normal_fragment_maps:Yu,normal_pars_fragment:ju,normal_pars_vertex:$u,normal_vertex:Ku,normalmap_pars_fragment:Zu,clearcoat_normal_fragment_begin:Ju,clearcoat_normal_fragment_maps:Qu,clearcoat_pars_fragment:ed,iridescence_pars_fragment:td,opaque_fragment:nd,packing:id,premultiplied_alpha_fragment:rd,project_vertex:sd,dithering_fragment:ad,dithering_pars_fragment:od,roughnessmap_fragment:ld,roughnessmap_pars_fragment:cd,shadowmap_pars_fragment:ud,shadowmap_pars_vertex:dd,shadowmap_vertex:hd,shadowmask_pars_fragment:fd,skinbase_vertex:pd,skinning_pars_vertex:md,skinning_vertex:gd,skinnormal_vertex:_d,specularmap_fragment:xd,specularmap_pars_fragment:vd,tonemapping_fragment:Md,tonemapping_pars_fragment:Sd,transmission_fragment:Ed,transmission_pars_fragment:bd,uv_pars_fragment:Td,uv_pars_vertex:yd,uv_vertex:Ad,worldpos_vertex:Rd,background_vert:wd,background_frag:Cd,backgroundCube_vert:Pd,backgroundCube_frag:Dd,cube_vert:Ld,cube_frag:Id,depth_vert:Ud,depth_frag:Nd,distance_vert:Fd,distance_frag:Od,equirect_vert:Bd,equirect_frag:zd,linedashed_vert:Vd,linedashed_frag:Gd,meshbasic_vert:kd,meshbasic_frag:Hd,meshlambert_vert:Wd,meshlambert_frag:Xd,meshmatcap_vert:qd,meshmatcap_frag:Yd,meshnormal_vert:jd,meshnormal_frag:$d,meshphong_vert:Kd,meshphong_frag:Zd,meshphysical_vert:Jd,meshphysical_frag:Qd,meshtoon_vert:eh,meshtoon_frag:th,points_vert:nh,points_frag:ih,shadow_vert:rh,shadow_frag:sh,sprite_vert:ah,sprite_frag:oh},oe={common:{diffuse:{value:new Ze(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ie},alphaMap:{value:null},alphaMapTransform:{value:new Ie},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ie}},envmap:{envMap:{value:null},envMapRotation:{value:new Ie},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},dfgLUT:{value:null}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ie}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ie}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ie},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ie},normalScale:{value:new je(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ie},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ie}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ie}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ie}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ze(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Ze(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ie},alphaTest:{value:0},uvTransform:{value:new Ie}},sprite:{diffuse:{value:new Ze(16777215)},opacity:{value:1},center:{value:new je(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ie},alphaMap:{value:null},alphaMapTransform:{value:new Ie},alphaTest:{value:0}}},qt={basic:{uniforms:bt([oe.common,oe.specularmap,oe.envmap,oe.aomap,oe.lightmap,oe.fog]),vertexShader:Ne.meshbasic_vert,fragmentShader:Ne.meshbasic_frag},lambert:{uniforms:bt([oe.common,oe.specularmap,oe.envmap,oe.aomap,oe.lightmap,oe.emissivemap,oe.bumpmap,oe.normalmap,oe.displacementmap,oe.fog,oe.lights,{emissive:{value:new Ze(0)},envMapIntensity:{value:1}}]),vertexShader:Ne.meshlambert_vert,fragmentShader:Ne.meshlambert_frag},phong:{uniforms:bt([oe.common,oe.specularmap,oe.envmap,oe.aomap,oe.lightmap,oe.emissivemap,oe.bumpmap,oe.normalmap,oe.displacementmap,oe.fog,oe.lights,{emissive:{value:new Ze(0)},specular:{value:new Ze(1118481)},shininess:{value:30},envMapIntensity:{value:1}}]),vertexShader:Ne.meshphong_vert,fragmentShader:Ne.meshphong_frag},standard:{uniforms:bt([oe.common,oe.envmap,oe.aomap,oe.lightmap,oe.emissivemap,oe.bumpmap,oe.normalmap,oe.displacementmap,oe.roughnessmap,oe.metalnessmap,oe.fog,oe.lights,{emissive:{value:new Ze(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ne.meshphysical_vert,fragmentShader:Ne.meshphysical_frag},toon:{uniforms:bt([oe.common,oe.aomap,oe.lightmap,oe.emissivemap,oe.bumpmap,oe.normalmap,oe.displacementmap,oe.gradientmap,oe.fog,oe.lights,{emissive:{value:new Ze(0)}}]),vertexShader:Ne.meshtoon_vert,fragmentShader:Ne.meshtoon_frag},matcap:{uniforms:bt([oe.common,oe.bumpmap,oe.normalmap,oe.displacementmap,oe.fog,{matcap:{value:null}}]),vertexShader:Ne.meshmatcap_vert,fragmentShader:Ne.meshmatcap_frag},points:{uniforms:bt([oe.points,oe.fog]),vertexShader:Ne.points_vert,fragmentShader:Ne.points_frag},dashed:{uniforms:bt([oe.common,oe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ne.linedashed_vert,fragmentShader:Ne.linedashed_frag},depth:{uniforms:bt([oe.common,oe.displacementmap]),vertexShader:Ne.depth_vert,fragmentShader:Ne.depth_frag},normal:{uniforms:bt([oe.common,oe.bumpmap,oe.normalmap,oe.displacementmap,{opacity:{value:1}}]),vertexShader:Ne.meshnormal_vert,fragmentShader:Ne.meshnormal_frag},sprite:{uniforms:bt([oe.sprite,oe.fog]),vertexShader:Ne.sprite_vert,fragmentShader:Ne.sprite_frag},background:{uniforms:{uvTransform:{value:new Ie},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ne.background_vert,fragmentShader:Ne.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ie}},vertexShader:Ne.backgroundCube_vert,fragmentShader:Ne.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ne.cube_vert,fragmentShader:Ne.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ne.equirect_vert,fragmentShader:Ne.equirect_frag},distance:{uniforms:bt([oe.common,oe.displacementmap,{referencePosition:{value:new B},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ne.distance_vert,fragmentShader:Ne.distance_frag},shadow:{uniforms:bt([oe.lights,oe.fog,{color:{value:new Ze(0)},opacity:{value:1}}]),vertexShader:Ne.shadow_vert,fragmentShader:Ne.shadow_frag}};qt.physical={uniforms:bt([qt.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ie},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ie},clearcoatNormalScale:{value:new je(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ie},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ie},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ie},sheen:{value:0},sheenColor:{value:new Ze(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ie},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ie},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ie},transmissionSamplerSize:{value:new je},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ie},attenuationDistance:{value:0},attenuationColor:{value:new Ze(0)},specularColor:{value:new Ze(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ie},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ie},anisotropyVector:{value:new je},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ie}}]),vertexShader:Ne.meshphysical_vert,fragmentShader:Ne.meshphysical_frag};const tr={r:0,b:0,g:0},Fn=new gn,lh=new dt;function ch(i,e,t,n,r,s){const a=new Ze(0);let o=r===!0?0:1,c,l,h=null,m=0,u=null;function p(S){let y=S.isScene===!0?S.background:null;if(y&&y.isTexture){const T=S.backgroundBlurriness>0;y=e.get(y,T)}return y}function _(S){let y=!1;const T=p(S);T===null?f(a,o):T&&T.isColor&&(f(T,1),y=!0);const C=i.xr.getEnvironmentBlendMode();C==="additive"?t.buffers.color.setClear(0,0,0,1,s):C==="alpha-blend"&&t.buffers.color.setClear(0,0,0,0,s),(i.autoClear||y)&&(t.buffers.depth.setTest(!0),t.buffers.depth.setMask(!0),t.buffers.color.setMask(!0),i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil))}function M(S,y){const T=p(y);T&&(T.isCubeTexture||T.mapping===fr)?(l===void 0&&(l=new en(new Pi(1,1,1),new kt({name:"BackgroundCubeMaterial",uniforms:hi(qt.backgroundCube.uniforms),vertexShader:qt.backgroundCube.vertexShader,fragmentShader:qt.backgroundCube.fragmentShader,side:At,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(C,R,D){this.matrixWorld.copyPosition(D.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(l)),Fn.copy(y.backgroundRotation),Fn.x*=-1,Fn.y*=-1,Fn.z*=-1,T.isCubeTexture&&T.isRenderTargetTexture===!1&&(Fn.y*=-1,Fn.z*=-1),l.material.uniforms.envMap.value=T,l.material.uniforms.flipEnvMap.value=T.isCubeTexture&&T.isRenderTargetTexture===!1?-1:1,l.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,l.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,l.material.uniforms.backgroundRotation.value.setFromMatrix4(lh.makeRotationFromEuler(Fn)),l.material.toneMapped=Ge.getTransfer(T.colorSpace)!==Ye,(h!==T||m!==T.version||u!==i.toneMapping)&&(l.material.needsUpdate=!0,h=T,m=T.version,u=i.toneMapping),l.layers.enableAll(),S.unshift(l,l.geometry,l.material,0,0,null)):T&&T.isTexture&&(c===void 0&&(c=new en(new Di(2,2),new kt({name:"BackgroundMaterial",uniforms:hi(qt.background.uniforms),vertexShader:qt.background.vertexShader,fragmentShader:qt.background.fragmentShader,side:wn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(c)),c.material.uniforms.t2D.value=T,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=Ge.getTransfer(T.colorSpace)!==Ye,T.matrixAutoUpdate===!0&&T.updateMatrix(),c.material.uniforms.uvTransform.value.copy(T.matrix),(h!==T||m!==T.version||u!==i.toneMapping)&&(c.material.needsUpdate=!0,h=T,m=T.version,u=i.toneMapping),c.layers.enableAll(),S.unshift(c,c.geometry,c.material,0,0,null))}function f(S,y){S.getRGB(tr,No(i)),t.buffers.color.setClear(tr.r,tr.g,tr.b,y,s)}function d(){l!==void 0&&(l.geometry.dispose(),l.material.dispose(),l=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return a},setClearColor:function(S,y=1){a.set(S),o=y,f(a,o)},getClearAlpha:function(){return o},setClearAlpha:function(S){o=S,f(a,o)},render:_,addToRenderList:M,dispose:d}}function uh(i,e){const t=i.getParameter(i.MAX_VERTEX_ATTRIBS),n={},r=u(null);let s=r,a=!1;function o(A,z,F,V,k){let G=!1;const O=m(A,V,F,z);s!==O&&(s=O,l(s.object)),G=p(A,V,F,k),G&&_(A,V,F,k),k!==null&&e.update(k,i.ELEMENT_ARRAY_BUFFER),(G||a)&&(a=!1,T(A,z,F,V),k!==null&&i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,e.get(k).buffer))}function c(){return i.createVertexArray()}function l(A){return i.bindVertexArray(A)}function h(A){return i.deleteVertexArray(A)}function m(A,z,F,V){const k=V.wireframe===!0;let G=n[z.id];G===void 0&&(G={},n[z.id]=G);const O=A.isInstancedMesh===!0?A.id:0;let ee=G[O];ee===void 0&&(ee={},G[O]=ee);let Z=ee[F.id];Z===void 0&&(Z={},ee[F.id]=Z);let ue=Z[k];return ue===void 0&&(ue=u(c()),Z[k]=ue),ue}function u(A){const z=[],F=[],V=[];for(let k=0;k=0){const me=k[Z];let he=G[Z];if(he===void 0&&(Z==="instanceMatrix"&&A.instanceMatrix&&(he=A.instanceMatrix),Z==="instanceColor"&&A.instanceColor&&(he=A.instanceColor)),me===void 0||me.attribute!==he||he&&me.data!==he.data)return!0;O++}return s.attributesNum!==O||s.index!==V}function _(A,z,F,V){const k={},G=z.attributes;let O=0;const ee=F.getAttributes();for(const Z in ee)if(ee[Z].location>=0){let me=G[Z];me===void 0&&(Z==="instanceMatrix"&&A.instanceMatrix&&(me=A.instanceMatrix),Z==="instanceColor"&&A.instanceColor&&(me=A.instanceColor));const he={};he.attribute=me,me&&me.data&&(he.data=me.data),k[Z]=he,O++}s.attributes=k,s.attributesNum=O,s.index=V}function M(){const A=s.newAttributes;for(let z=0,F=A.length;z=0){let ue=k[ee];if(ue===void 0&&(ee==="instanceMatrix"&&A.instanceMatrix&&(ue=A.instanceMatrix),ee==="instanceColor"&&A.instanceColor&&(ue=A.instanceColor)),ue!==void 0){const me=ue.normalized,he=ue.itemSize,Ue=e.get(ue);if(Ue===void 0)continue;const rt=Ue.buffer,nt=Ue.type,$=Ue.bytesPerElement,ie=nt===i.INT||nt===i.UNSIGNED_INT||ue.gpuType===Xs;if(ue.isInterleavedBufferAttribute){const ae=ue.data,Le=ae.stride,Ae=ue.offset;if(ae.isInstancedInterleavedBuffer){for(let we=0;we0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision>0)return"highp";D="mediump"}return D==="mediump"&&i.getShaderPrecisionFormat(i.VERTEX_SHADER,i.MEDIUM_FLOAT).precision>0&&i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let l=t.precision!==void 0?t.precision:"highp";const h=c(l);h!==l&&(Pe("WebGLRenderer:",l,"not supported, using",h,"instead."),l=h);const m=t.logarithmicDepthBuffer===!0,u=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control"),p=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),_=i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS),M=i.getParameter(i.MAX_TEXTURE_SIZE),f=i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE),d=i.getParameter(i.MAX_VERTEX_ATTRIBS),S=i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS),y=i.getParameter(i.MAX_VARYING_VECTORS),T=i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS),C=i.getParameter(i.MAX_SAMPLES),R=i.getParameter(i.SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:c,textureFormatReadable:a,textureTypeReadable:o,precision:l,logarithmicDepthBuffer:m,reversedDepthBuffer:u,maxTextures:p,maxVertexTextures:_,maxTextureSize:M,maxCubemapSize:f,maxAttributes:d,maxVertexUniforms:S,maxVaryings:y,maxFragmentUniforms:T,maxSamples:C,samples:R}}function fh(i){const e=this;let t=null,n=0,r=!1,s=!1;const a=new Bn,o=new Ie,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(m,u){const p=m.length!==0||u||n!==0||r;return r=u,n=m.length,p},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(m,u){t=h(m,u,0)},this.setState=function(m,u,p){const _=m.clippingPlanes,M=m.clipIntersection,f=m.clipShadows,d=i.get(m);if(!r||_===null||_.length===0||s&&!f)s?h(null):l();else{const S=s?0:n,y=S*4;let T=d.clippingState||null;c.value=T,T=h(_,u,y,p);for(let C=0;C!==y;++C)T[C]=t[C];d.clippingState=T,this.numIntersection=M?this.numPlanes:0,this.numPlanes+=S}};function l(){c.value!==t&&(c.value=t,c.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function h(m,u,p,_){const M=m!==null?m.length:0;let f=null;if(M!==0){if(f=c.value,_!==!0||f===null){const d=p+M*4,S=u.matrixWorldInverse;o.getNormalMatrix(S),(f===null||f.length0&&this._blur(c,0,0,t),this._applyPMREM(c),this._cleanup(c),c}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=ka(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Ga(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose(),this._backgroundBox!==null&&(this._backgroundBox.geometry.dispose(),this._backgroundBox.material.dispose())}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._ggxMaterial!==null&&this._ggxMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?C:0,C,C),m.setRenderTarget(r),d&&m.render(M,c),m.render(e,c)}m.toneMapping=p,m.autoClear=u,e.background=S}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===Hn||e.mapping===ci;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=ka()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Ga());const s=r?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=s;const o=s.uniforms;o.envMap.value=e;const c=this._cubeSize;si(t,0,0,3*c,2*c),n.setRenderTarget(t),n.render(a,Si)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const r=this._lodMeshes.length;for(let s=1;s_-Rn?n-_+Rn:0),d=4*(this._cubeSize-M);c.envMap.value=e.texture,c.roughness.value=p,c.mipInt.value=_-t,si(s,f,d,3*M,2*M),r.setRenderTarget(s),r.render(o,Si),c.envMap.value=s.texture,c.roughness.value=0,c.mipInt.value=_-n,si(e,f,d,3*M,2*M),r.setRenderTarget(e),r.render(o,Si)}_blur(e,t,n,r,s){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,"latitudinal",s),this._halfBlur(a,e,n,n,r,"longitudinal",s)}_halfBlur(e,t,n,r,s,a,o){const c=this._renderer,l=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&He("blur direction must be either latitudinal or longitudinal!");const h=3,m=this._lodMeshes[r];m.material=l;const u=l.uniforms,p=this._sizeLods[n]-1,_=isFinite(s)?Math.PI/(2*p):2*Math.PI/(2*Vn-1),M=s/_,f=isFinite(s)?1+Math.floor(h*M):Vn;f>Vn&&Pe(`sigmaRadians, ${s}, is too large and will clip, as it requested ${f} samples when the maximum is set to ${Vn}`);const d=[];let S=0;for(let D=0;Dy-Rn?r-y+Rn:0),R=4*(this._cubeSize-T);si(t,C,R,3*T,2*T),c.setRenderTarget(t),c.render(m,Si)}}function gh(i){const e=[],t=[],n=[];let r=i;const s=i-Rn+1+Oa.length;for(let a=0;ai-Rn?c=Oa[a-i+Rn-1]:a===0&&(c=0),t.push(c);const l=1/(o-2),h=-l,m=1+l,u=[h,h,m,h,m,m,h,h,m,m,h,m],p=6,_=6,M=3,f=2,d=1,S=new Float32Array(M*_*p),y=new Float32Array(f*_*p),T=new Float32Array(d*_*p);for(let R=0;R2?0:-1,E=[D,x,0,D+2/3,x,0,D+2/3,x+1,0,D,x,0,D+2/3,x+1,0,D,x+1,0];S.set(E,M*_*R),y.set(u,f*_*R);const q=[R,R,R,R,R,R];T.set(q,d*_*R)}const C=new _n;C.setAttribute("position",new Jt(S,M)),C.setAttribute("uv",new Jt(y,f)),C.setAttribute("faceIndex",new Jt(T,d)),n.push(new en(C,null)),r>Rn&&r--}return{lodMeshes:n,sizeLods:e,sigmas:t}}function Va(i,e,t){const n=new Zt(i,e,t);return n.texture.mapping=fr,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function si(i,e,t,n,r){i.viewport.set(e,t,n,r),i.scissor.set(e,t,n,r)}function _h(i,e,t){return new kt({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:ph,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:mr(),fragmentShader:` - - precision highp float; - precision highp int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform float roughness; - uniform float mipInt; - - #define ENVMAP_TYPE_CUBE_UV - #include - - #define PI 3.14159265359 - - // Van der Corput radical inverse - float radicalInverse_VdC(uint bits) { - bits = (bits << 16u) | (bits >> 16u); - bits = ((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); - bits = ((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); - bits = ((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); - bits = ((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); - return float(bits) * 2.3283064365386963e-10; // / 0x100000000 - } - - // Hammersley sequence - vec2 hammersley(uint i, uint N) { - return vec2(float(i) / float(N), radicalInverse_VdC(i)); - } - - // GGX VNDF importance sampling (Eric Heitz 2018) - // "Sampling the GGX Distribution of Visible Normals" - // https://jcgt.org/published/0007/04/01/ - vec3 importanceSampleGGX_VNDF(vec2 Xi, vec3 V, float roughness) { - float alpha = roughness * roughness; - - // Section 4.1: Orthonormal basis - vec3 T1 = vec3(1.0, 0.0, 0.0); - vec3 T2 = cross(V, T1); - - // Section 4.2: Parameterization of projected area - float r = sqrt(Xi.x); - float phi = 2.0 * PI * Xi.y; - float t1 = r * cos(phi); - float t2 = r * sin(phi); - float s = 0.5 * (1.0 + V.z); - t2 = (1.0 - s) * sqrt(1.0 - t1 * t1) + s * t2; - - // Section 4.3: Reprojection onto hemisphere - vec3 Nh = t1 * T1 + t2 * T2 + sqrt(max(0.0, 1.0 - t1 * t1 - t2 * t2)) * V; - - // Section 3.4: Transform back to ellipsoid configuration - return normalize(vec3(alpha * Nh.x, alpha * Nh.y, max(0.0, Nh.z))); - } - - void main() { - vec3 N = normalize(vOutputDirection); - vec3 V = N; // Assume view direction equals normal for pre-filtering - - vec3 prefilteredColor = vec3(0.0); - float totalWeight = 0.0; - - // For very low roughness, just sample the environment directly - if (roughness < 0.001) { - gl_FragColor = vec4(bilinearCubeUV(envMap, N, mipInt), 1.0); - return; - } - - // Tangent space basis for VNDF sampling - vec3 up = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0); - vec3 tangent = normalize(cross(up, N)); - vec3 bitangent = cross(N, tangent); - - for(uint i = 0u; i < uint(GGX_SAMPLES); i++) { - vec2 Xi = hammersley(i, uint(GGX_SAMPLES)); - - // For PMREM, V = N, so in tangent space V is always (0, 0, 1) - vec3 H_tangent = importanceSampleGGX_VNDF(Xi, vec3(0.0, 0.0, 1.0), roughness); - - // Transform H back to world space - vec3 H = normalize(tangent * H_tangent.x + bitangent * H_tangent.y + N * H_tangent.z); - vec3 L = normalize(2.0 * dot(V, H) * H - V); - - float NdotL = max(dot(N, L), 0.0); - - if(NdotL > 0.0) { - // Sample environment at fixed mip level - // VNDF importance sampling handles the distribution filtering - vec3 sampleColor = bilinearCubeUV(envMap, L, mipInt); - - // Weight by NdotL for the split-sum approximation - // VNDF PDF naturally accounts for the visible microfacet distribution - prefilteredColor += sampleColor * NdotL; - totalWeight += NdotL; - } - } - - if (totalWeight > 0.0) { - prefilteredColor = prefilteredColor / totalWeight; - } - - gl_FragColor = vec4(prefilteredColor, 1.0); - } - `,blending:dn,depthTest:!1,depthWrite:!1})}function xh(i,e,t){const n=new Float32Array(Vn),r=new B(0,1,0);return new kt({name:"SphericalGaussianBlur",defines:{n:Vn,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${i}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:mr(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - } - `,blending:dn,depthTest:!1,depthWrite:!1})}function Ga(){return new kt({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:mr(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - - #include - - void main() { - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); - - } - `,blending:dn,depthTest:!1,depthWrite:!1})}function ka(){return new kt({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:mr(),fragmentShader:` - - precision mediump float; - precision mediump int; - - uniform float flipEnvMap; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - void main() { - - gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); - - } - `,blending:dn,depthTest:!1,depthWrite:!1})}function mr(){return` - - precision mediump float; - precision mediump int; - - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - `}class Bo extends Zt{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new Io(r),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `,fragmentShader:` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - `},r=new Pi(5,5,5),s=new kt({name:"CubemapFromEquirect",uniforms:hi(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:At,blending:dn});s.uniforms.tEquirect.value=t;const a=new en(r,s),o=t.minFilter;return t.minFilter===Gn&&(t.minFilter=Et),new yc(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,r=!0){const s=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,r);e.setRenderTarget(s)}}function vh(i){let e=new WeakMap,t=new WeakMap,n=null;function r(u,p=!1){return u==null?null:p?a(u):s(u)}function s(u){if(u&&u.isTexture){const p=u.mapping;if(p===vr||p===Mr)if(e.has(u)){const _=e.get(u).texture;return o(_,u.mapping)}else{const _=u.image;if(_&&_.height>0){const M=new Bo(_.height);return M.fromEquirectangularTexture(i,u),e.set(u,M),u.addEventListener("dispose",l),o(M.texture,u.mapping)}else return null}}return u}function a(u){if(u&&u.isTexture){const p=u.mapping,_=p===vr||p===Mr,M=p===Hn||p===ci;if(_||M){let f=t.get(u);const d=f!==void 0?f.texture.pmremVersion:0;if(u.isRenderTargetTexture&&u.pmremVersion!==d)return n===null&&(n=new za(i)),f=_?n.fromEquirectangular(u,f):n.fromCubemap(u,f),f.texture.pmremVersion=u.pmremVersion,t.set(u,f),f.texture;if(f!==void 0)return f.texture;{const S=u.image;return _&&S&&S.height>0||M&&S&&c(S)?(n===null&&(n=new za(i)),f=_?n.fromEquirectangular(u):n.fromCubemap(u),f.texture.pmremVersion=u.pmremVersion,t.set(u,f),u.addEventListener("dispose",h),f.texture):null}}}return u}function o(u,p){return p===vr?u.mapping=Hn:p===Mr&&(u.mapping=ci),u}function c(u){let p=0;const _=6;for(let M=0;M<_;M++)u[M]!==void 0&&p++;return p===_}function l(u){const p=u.target;p.removeEventListener("dispose",l);const _=e.get(p);_!==void 0&&(e.delete(p),_.dispose())}function h(u){const p=u.target;p.removeEventListener("dispose",h);const _=t.get(p);_!==void 0&&(t.delete(p),_.dispose())}function m(){e=new WeakMap,t=new WeakMap,n!==null&&(n.dispose(),n=null)}return{get:r,dispose:m}}function Mh(i){const e={};function t(n){if(e[n]!==void 0)return e[n];const r=i.getExtension(n);return e[n]=r,r}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){const r=t(n);return r===null&&hr("WebGLRenderer: "+n+" extension not supported."),r}}}function Sh(i,e,t,n){const r={},s=new WeakMap;function a(m){const u=m.target;u.index!==null&&e.remove(u.index);for(const _ in u.attributes)e.remove(u.attributes[_]);u.removeEventListener("dispose",a),delete r[u.id];const p=s.get(u);p&&(e.remove(p),s.delete(u)),n.releaseStatesOfGeometry(u),u.isInstancedBufferGeometry===!0&&delete u._maxInstanceCount,t.memory.geometries--}function o(m,u){return r[u.id]===!0||(u.addEventListener("dispose",a),r[u.id]=!0,t.memory.geometries++),u}function c(m){const u=m.attributes;for(const p in u)e.update(u[p],i.ARRAY_BUFFER)}function l(m){const u=[],p=m.index,_=m.attributes.position;let M=0;if(_===void 0)return;if(p!==null){const S=p.array;M=p.version;for(let y=0,T=S.length;y=65535?Po:Co)(u,1);f.version=M;const d=s.get(m);d&&e.remove(d),s.set(m,f)}function h(m){const u=s.get(m);if(u){const p=m.index;p!==null&&u.versione.maxTextureSize&&(C=Math.ceil(T/e.maxTextureSize),T=e.maxTextureSize);const R=new Float32Array(T*C*4*m),D=new Ao(R,T,C,m);D.type=jt,D.needsUpdate=!0;const x=y*4;for(let q=0;q - #include - - void main() { - gl_FragColor = texture2D( tDiffuse, vUv ); - - #ifdef LINEAR_TONE_MAPPING - gl_FragColor.rgb = LinearToneMapping( gl_FragColor.rgb ); - #elif defined( REINHARD_TONE_MAPPING ) - gl_FragColor.rgb = ReinhardToneMapping( gl_FragColor.rgb ); - #elif defined( CINEON_TONE_MAPPING ) - gl_FragColor.rgb = CineonToneMapping( gl_FragColor.rgb ); - #elif defined( ACES_FILMIC_TONE_MAPPING ) - gl_FragColor.rgb = ACESFilmicToneMapping( gl_FragColor.rgb ); - #elif defined( AGX_TONE_MAPPING ) - gl_FragColor.rgb = AgXToneMapping( gl_FragColor.rgb ); - #elif defined( NEUTRAL_TONE_MAPPING ) - gl_FragColor.rgb = NeutralToneMapping( gl_FragColor.rgb ); - #elif defined( CUSTOM_TONE_MAPPING ) - gl_FragColor.rgb = CustomToneMapping( gl_FragColor.rgb ); - #endif - - #ifdef SRGB_TRANSFER - gl_FragColor = sRGBTransferOETF( gl_FragColor ); - #endif - }`,depthTest:!1,depthWrite:!1}),l=new en(o,c),h=new Fo(-1,1,1,-1,0,1);let m=null,u=null,p=!1,_,M=null,f=[],d=!1;this.setSize=function(S,y){s.setSize(S,y),a.setSize(S,y);for(let T=0;T0&&f[0].isRenderPass===!0;const y=s.width,T=s.height;for(let C=0;C0)return i;const r=e*t;let s=Ha[r];if(s===void 0&&(s=new Float32Array(r),Ha[r]=s),e!==0){n.toArray(s,0);for(let a=1,o=0;a!==e;++a)o+=t,i[a].toArray(s,o)}return s}function ht(i,e){if(i.length!==e.length)return!1;for(let t=0,n=i.length;t0&&(this.seq=r.concat(s))}setValue(e,t,n,r){const s=this.map[t];s!==void 0&&s.setValue(e,n,r)}setOptional(e,t,n){const r=t[n];r!==void 0&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let s=0,a=t.length;s!==a;++s){const o=t[s],c=n[o.id];c.needsUpdate!==!1&&o.setValue(e,c.value,r)}}static seqWithValue(e,t){const n=[];for(let r=0,s=e.length;r!==s;++r){const a=e[r];a.id in t&&n.push(a)}return n}}function $a(i,e,t){const n=i.createShader(e);return i.shaderSource(n,t),i.compileShader(n),n}const vf=37297;let Mf=0;function Sf(i,e){const t=i.split(` -`),n=[],r=Math.max(e-6,0),s=Math.min(e+6,t.length);for(let a=r;a":" "} ${o}: ${t[a]}`)}return n.join(` -`)}const Ka=new Ie;function Ef(i){Ge._getMatrix(Ka,Ge.workingColorSpace,i);const e=`mat3( ${Ka.elements.map(t=>t.toFixed(4))} )`;switch(Ge.getTransfer(i)){case cr:return[e,"LinearTransferOETF"];case Ye:return[e,"sRGBTransferOETF"];default:return Pe("WebGLProgram: Unsupported color space: ",i),[e,"LinearTransferOETF"]}}function Za(i,e,t){const n=i.getShaderParameter(e,i.COMPILE_STATUS),s=(i.getShaderInfoLog(e)||"").trim();if(n&&s==="")return"";const a=/ERROR: 0:(\d+)/.exec(s);if(a){const o=parseInt(a[1]);return t.toUpperCase()+` - -`+s+` - -`+Sf(i.getShaderSource(e),o)}else return s}function bf(i,e){const t=Ef(e);return[`vec4 ${i}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(` -`)}const Tf={[co]:"Linear",[uo]:"Reinhard",[ho]:"Cineon",[fo]:"ACESFilmic",[mo]:"AgX",[go]:"Neutral",[po]:"Custom"};function yf(i,e){const t=Tf[e];return t===void 0?(Pe("WebGLProgram: Unsupported toneMapping:",e),"vec3 "+i+"( vec3 color ) { return LinearToneMapping( color ); }"):"vec3 "+i+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const nr=new B;function Af(){Ge.getLuminanceCoefficients(nr);const i=nr.x.toFixed(4),e=nr.y.toFixed(4),t=nr.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${i}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` -`)}function Rf(i){return[i.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",i.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Ti).join(` -`)}function wf(i){const e=[];for(const t in i){const n=i[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(` -`)}function Cf(i,e){const t={},n=i.getProgramParameter(e,i.ACTIVE_ATTRIBUTES);for(let r=0;r/gm;function Hs(i){return i.replace(Pf,Lf)}const Df=new Map;function Lf(i,e){let t=Ne[e];if(t===void 0){const n=Df.get(e);if(n!==void 0)t=Ne[n],Pe('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return Hs(t)}const If=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function eo(i){return i.replace(If,Uf)}function Uf(i,e,t,n){let r="";for(let s=parseInt(e);s0&&(f+=` -`),d=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_].filter(Ti).join(` -`),d.length>0&&(d+=` -`)):(f=[to(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(Ti).join(` -`),d=[to(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,_,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+l:"",t.envMap?"#define "+h:"",t.envMap?"#define "+m:"",u?"#define CUBEUV_TEXEL_WIDTH "+u.texelWidth:"",u?"#define CUBEUV_TEXEL_HEIGHT "+u.texelHeight:"",u?"#define CUBEUV_MAX_MIP "+u.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas||t.batchingColor?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Kt?"#define TONE_MAPPING":"",t.toneMapping!==Kt?Ne.tonemapping_pars_fragment:"",t.toneMapping!==Kt?yf("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Ne.colorspace_pars_fragment,bf("linearToOutputTexel",t.outputColorSpace),Af(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(Ti).join(` -`)),a=Hs(a),a=Ja(a,t),a=Qa(a,t),o=Hs(o),o=Ja(o,t),o=Qa(o,t),a=eo(a),o=eo(o),t.isRawShaderMaterial!==!0&&(S=`#version 300 es -`,f=[p,"#define attribute in","#define varying out","#define texture2D texture"].join(` -`)+` -`+f,d=["#define varying in",t.glslVersion===_a?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===_a?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` -`)+` -`+d);const y=S+f+a,T=S+d+o,C=$a(r,r.VERTEX_SHADER,y),R=$a(r,r.FRAGMENT_SHADER,T);r.attachShader(M,C),r.attachShader(M,R),t.index0AttributeName!==void 0?r.bindAttribLocation(M,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(M,0,"position"),r.linkProgram(M);function D(A){if(i.debug.checkShaderErrors){const z=r.getProgramInfoLog(M)||"",F=r.getShaderInfoLog(C)||"",V=r.getShaderInfoLog(R)||"",k=z.trim(),G=F.trim(),O=V.trim();let ee=!0,Z=!0;if(r.getProgramParameter(M,r.LINK_STATUS)===!1)if(ee=!1,typeof i.debug.onShaderError=="function")i.debug.onShaderError(r,M,C,R);else{const ue=Za(r,C,"vertex"),me=Za(r,R,"fragment");He("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(M,r.VALIDATE_STATUS)+` - -Material Name: `+A.name+` -Material Type: `+A.type+` - -Program Info Log: `+k+` -`+ue+` -`+me)}else k!==""?Pe("WebGLProgram: Program Info Log:",k):(G===""||O==="")&&(Z=!1);Z&&(A.diagnostics={runnable:ee,programLog:k,vertexShader:{log:G,prefix:f},fragmentShader:{log:O,prefix:d}})}r.deleteShader(C),r.deleteShader(R),x=new lr(r,M),E=Cf(r,M)}let x;this.getUniforms=function(){return x===void 0&&D(this),x};let E;this.getAttributes=function(){return E===void 0&&D(this),E};let q=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return q===!1&&(q=r.getProgramParameter(M,vf)),q},this.destroy=function(){n.releaseStatesOfProgram(this),r.deleteProgram(M),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=Mf++,this.cacheKey=e,this.usedTimes=1,this.program=M,this.vertexShader=C,this.fragmentShader=R,this}let Xf=0;class qf{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(r)===!1&&(a.add(r),r.usedTimes++),a.has(s)===!1&&(a.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new Yf(e),t.set(e,n)),n}}class Yf{constructor(e){this.id=Xf++,this.code=e,this.usedTimes=0}}function jf(i,e,t,n,r,s){const a=new Ro,o=new qf,c=new Set,l=[],h=new Map,m=n.logarithmicDepthBuffer;let u=n.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distance",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(x){return c.add(x),x===0?"uv":`uv${x}`}function M(x,E,q,A,z){const F=A.fog,V=z.geometry,k=x.isMeshStandardMaterial||x.isMeshLambertMaterial||x.isMeshPhongMaterial?A.environment:null,G=x.isMeshStandardMaterial||x.isMeshLambertMaterial&&!x.envMap||x.isMeshPhongMaterial&&!x.envMap,O=e.get(x.envMap||k,G),ee=O&&O.mapping===fr?O.image.height:null,Z=p[x.type];x.precision!==null&&(u=n.getMaxPrecision(x.precision),u!==x.precision&&Pe("WebGLProgram.getParameters:",x.precision,"not supported, using",u,"instead."));const ue=V.morphAttributes.position||V.morphAttributes.normal||V.morphAttributes.color,me=ue!==void 0?ue.length:0;let he=0;V.morphAttributes.position!==void 0&&(he=1),V.morphAttributes.normal!==void 0&&(he=2),V.morphAttributes.color!==void 0&&(he=3);let Ue,rt,nt,$;if(Z){const qe=qt[Z];Ue=qe.vertexShader,rt=qe.fragmentShader}else Ue=x.vertexShader,rt=x.fragmentShader,o.update(x),nt=o.getVertexShaderID(x),$=o.getFragmentShaderID(x);const ie=i.getRenderTarget(),ae=i.state.buffers.depth.getReversed(),Le=z.isInstancedMesh===!0,Ae=z.isBatchedMesh===!0,we=!!x.map,pt=!!x.matcap,Ve=!!O,Xe=!!x.aoMap,Je=!!x.lightMap,Fe=!!x.bumpMap,at=!!x.normalMap,w=!!x.displacementMap,ct=!!x.emissiveMap,We=!!x.metalnessMap,et=!!x.roughnessMap,Se=x.anisotropy>0,b=x.clearcoat>0,g=x.dispersion>0,L=x.iridescence>0,Y=x.sheen>0,K=x.transmission>0,X=Se&&!!x.anisotropyMap,ge=b&&!!x.clearcoatMap,re=b&&!!x.clearcoatNormalMap,ye=b&&!!x.clearcoatRoughnessMap,Re=L&&!!x.iridescenceMap,J=L&&!!x.iridescenceThicknessMap,te=Y&&!!x.sheenColorMap,_e=Y&&!!x.sheenRoughnessMap,ve=!!x.specularMap,de=!!x.specularColorMap,Oe=!!x.specularIntensityMap,P=K&&!!x.transmissionMap,se=K&&!!x.thicknessMap,ne=!!x.gradientMap,pe=!!x.alphaMap,Q=x.alphaTest>0,W=!!x.alphaHash,xe=!!x.extensions;let Ce=Kt;x.toneMapped&&(ie===null||ie.isXRRenderTarget===!0)&&(Ce=i.toneMapping);const tt={shaderID:Z,shaderType:x.type,shaderName:x.name,vertexShader:Ue,fragmentShader:rt,defines:x.defines,customVertexShaderID:nt,customFragmentShaderID:$,isRawShaderMaterial:x.isRawShaderMaterial===!0,glslVersion:x.glslVersion,precision:u,batching:Ae,batchingColor:Ae&&z._colorsTexture!==null,instancing:Le,instancingColor:Le&&z.instanceColor!==null,instancingMorph:Le&&z.morphTexture!==null,outputColorSpace:ie===null?i.outputColorSpace:ie.isXRRenderTarget===!0?ie.texture.colorSpace:di,alphaToCoverage:!!x.alphaToCoverage,map:we,matcap:pt,envMap:Ve,envMapMode:Ve&&O.mapping,envMapCubeUVHeight:ee,aoMap:Xe,lightMap:Je,bumpMap:Fe,normalMap:at,displacementMap:w,emissiveMap:ct,normalMapObjectSpace:at&&x.normalMapType===Nl,normalMapTangentSpace:at&&x.normalMapType===Ul,metalnessMap:We,roughnessMap:et,anisotropy:Se,anisotropyMap:X,clearcoat:b,clearcoatMap:ge,clearcoatNormalMap:re,clearcoatRoughnessMap:ye,dispersion:g,iridescence:L,iridescenceMap:Re,iridescenceThicknessMap:J,sheen:Y,sheenColorMap:te,sheenRoughnessMap:_e,specularMap:ve,specularColorMap:de,specularIntensityMap:Oe,transmission:K,transmissionMap:P,thicknessMap:se,gradientMap:ne,opaque:x.transparent===!1&&x.blending===ai&&x.alphaToCoverage===!1,alphaMap:pe,alphaTest:Q,alphaHash:W,combine:x.combine,mapUv:we&&_(x.map.channel),aoMapUv:Xe&&_(x.aoMap.channel),lightMapUv:Je&&_(x.lightMap.channel),bumpMapUv:Fe&&_(x.bumpMap.channel),normalMapUv:at&&_(x.normalMap.channel),displacementMapUv:w&&_(x.displacementMap.channel),emissiveMapUv:ct&&_(x.emissiveMap.channel),metalnessMapUv:We&&_(x.metalnessMap.channel),roughnessMapUv:et&&_(x.roughnessMap.channel),anisotropyMapUv:X&&_(x.anisotropyMap.channel),clearcoatMapUv:ge&&_(x.clearcoatMap.channel),clearcoatNormalMapUv:re&&_(x.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ye&&_(x.clearcoatRoughnessMap.channel),iridescenceMapUv:Re&&_(x.iridescenceMap.channel),iridescenceThicknessMapUv:J&&_(x.iridescenceThicknessMap.channel),sheenColorMapUv:te&&_(x.sheenColorMap.channel),sheenRoughnessMapUv:_e&&_(x.sheenRoughnessMap.channel),specularMapUv:ve&&_(x.specularMap.channel),specularColorMapUv:de&&_(x.specularColorMap.channel),specularIntensityMapUv:Oe&&_(x.specularIntensityMap.channel),transmissionMapUv:P&&_(x.transmissionMap.channel),thicknessMapUv:se&&_(x.thicknessMap.channel),alphaMapUv:pe&&_(x.alphaMap.channel),vertexTangents:!!V.attributes.tangent&&(at||Se),vertexColors:x.vertexColors,vertexAlphas:x.vertexColors===!0&&!!V.attributes.color&&V.attributes.color.itemSize===4,pointsUvs:z.isPoints===!0&&!!V.attributes.uv&&(we||pe),fog:!!F,useFog:x.fog===!0,fogExp2:!!F&&F.isFogExp2,flatShading:x.wireframe===!1&&(x.flatShading===!0||V.attributes.normal===void 0&&at===!1&&(x.isMeshLambertMaterial||x.isMeshPhongMaterial||x.isMeshStandardMaterial||x.isMeshPhysicalMaterial)),sizeAttenuation:x.sizeAttenuation===!0,logarithmicDepthBuffer:m,reversedDepthBuffer:ae,skinning:z.isSkinnedMesh===!0,morphTargets:V.morphAttributes.position!==void 0,morphNormals:V.morphAttributes.normal!==void 0,morphColors:V.morphAttributes.color!==void 0,morphTargetsCount:me,morphTextureStride:he,numDirLights:E.directional.length,numPointLights:E.point.length,numSpotLights:E.spot.length,numSpotLightMaps:E.spotLightMap.length,numRectAreaLights:E.rectArea.length,numHemiLights:E.hemi.length,numDirLightShadows:E.directionalShadowMap.length,numPointLightShadows:E.pointShadowMap.length,numSpotLightShadows:E.spotShadowMap.length,numSpotLightShadowsWithMaps:E.numSpotLightShadowsWithMaps,numLightProbes:E.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:x.dithering,shadowMapEnabled:i.shadowMap.enabled&&q.length>0,shadowMapType:i.shadowMap.type,toneMapping:Ce,decodeVideoTexture:we&&x.map.isVideoTexture===!0&&Ge.getTransfer(x.map.colorSpace)===Ye,decodeVideoTextureEmissive:ct&&x.emissiveMap.isVideoTexture===!0&&Ge.getTransfer(x.emissiveMap.colorSpace)===Ye,premultipliedAlpha:x.premultipliedAlpha,doubleSided:x.side===cn,flipSided:x.side===At,useDepthPacking:x.depthPacking>=0,depthPacking:x.depthPacking||0,index0AttributeName:x.index0AttributeName,extensionClipCullDistance:xe&&x.extensions.clipCullDistance===!0&&t.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(xe&&x.extensions.multiDraw===!0||Ae)&&t.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:t.has("KHR_parallel_shader_compile"),customProgramCacheKey:x.customProgramCacheKey()};return tt.vertexUv1s=c.has(1),tt.vertexUv2s=c.has(2),tt.vertexUv3s=c.has(3),c.clear(),tt}function f(x){const E=[];if(x.shaderID?E.push(x.shaderID):(E.push(x.customVertexShaderID),E.push(x.customFragmentShaderID)),x.defines!==void 0)for(const q in x.defines)E.push(q),E.push(x.defines[q]);return x.isRawShaderMaterial===!1&&(d(E,x),S(E,x),E.push(i.outputColorSpace)),E.push(x.customProgramCacheKey),E.join()}function d(x,E){x.push(E.precision),x.push(E.outputColorSpace),x.push(E.envMapMode),x.push(E.envMapCubeUVHeight),x.push(E.mapUv),x.push(E.alphaMapUv),x.push(E.lightMapUv),x.push(E.aoMapUv),x.push(E.bumpMapUv),x.push(E.normalMapUv),x.push(E.displacementMapUv),x.push(E.emissiveMapUv),x.push(E.metalnessMapUv),x.push(E.roughnessMapUv),x.push(E.anisotropyMapUv),x.push(E.clearcoatMapUv),x.push(E.clearcoatNormalMapUv),x.push(E.clearcoatRoughnessMapUv),x.push(E.iridescenceMapUv),x.push(E.iridescenceThicknessMapUv),x.push(E.sheenColorMapUv),x.push(E.sheenRoughnessMapUv),x.push(E.specularMapUv),x.push(E.specularColorMapUv),x.push(E.specularIntensityMapUv),x.push(E.transmissionMapUv),x.push(E.thicknessMapUv),x.push(E.combine),x.push(E.fogExp2),x.push(E.sizeAttenuation),x.push(E.morphTargetsCount),x.push(E.morphAttributeCount),x.push(E.numDirLights),x.push(E.numPointLights),x.push(E.numSpotLights),x.push(E.numSpotLightMaps),x.push(E.numHemiLights),x.push(E.numRectAreaLights),x.push(E.numDirLightShadows),x.push(E.numPointLightShadows),x.push(E.numSpotLightShadows),x.push(E.numSpotLightShadowsWithMaps),x.push(E.numLightProbes),x.push(E.shadowMapType),x.push(E.toneMapping),x.push(E.numClippingPlanes),x.push(E.numClipIntersection),x.push(E.depthPacking)}function S(x,E){a.disableAll(),E.instancing&&a.enable(0),E.instancingColor&&a.enable(1),E.instancingMorph&&a.enable(2),E.matcap&&a.enable(3),E.envMap&&a.enable(4),E.normalMapObjectSpace&&a.enable(5),E.normalMapTangentSpace&&a.enable(6),E.clearcoat&&a.enable(7),E.iridescence&&a.enable(8),E.alphaTest&&a.enable(9),E.vertexColors&&a.enable(10),E.vertexAlphas&&a.enable(11),E.vertexUv1s&&a.enable(12),E.vertexUv2s&&a.enable(13),E.vertexUv3s&&a.enable(14),E.vertexTangents&&a.enable(15),E.anisotropy&&a.enable(16),E.alphaHash&&a.enable(17),E.batching&&a.enable(18),E.dispersion&&a.enable(19),E.batchingColor&&a.enable(20),E.gradientMap&&a.enable(21),x.push(a.mask),a.disableAll(),E.fog&&a.enable(0),E.useFog&&a.enable(1),E.flatShading&&a.enable(2),E.logarithmicDepthBuffer&&a.enable(3),E.reversedDepthBuffer&&a.enable(4),E.skinning&&a.enable(5),E.morphTargets&&a.enable(6),E.morphNormals&&a.enable(7),E.morphColors&&a.enable(8),E.premultipliedAlpha&&a.enable(9),E.shadowMapEnabled&&a.enable(10),E.doubleSided&&a.enable(11),E.flipSided&&a.enable(12),E.useDepthPacking&&a.enable(13),E.dithering&&a.enable(14),E.transmission&&a.enable(15),E.sheen&&a.enable(16),E.opaque&&a.enable(17),E.pointsUvs&&a.enable(18),E.decodeVideoTexture&&a.enable(19),E.decodeVideoTextureEmissive&&a.enable(20),E.alphaToCoverage&&a.enable(21),x.push(a.mask)}function y(x){const E=p[x.type];let q;if(E){const A=qt[E];q=vc.clone(A.uniforms)}else q=x.uniforms;return q}function T(x,E){let q=h.get(E);return q!==void 0?++q.usedTimes:(q=new Wf(i,E,x,r),l.push(q),h.set(E,q)),q}function C(x){if(--x.usedTimes===0){const E=l.indexOf(x);l[E]=l[l.length-1],l.pop(),h.delete(x.cacheKey),x.destroy()}}function R(x){o.remove(x)}function D(){o.dispose()}return{getParameters:M,getProgramCacheKey:f,getUniforms:y,acquireProgram:T,releaseProgram:C,releaseShaderCache:R,programs:l,dispose:D}}function $f(){let i=new WeakMap;function e(a){return i.has(a)}function t(a){let o=i.get(a);return o===void 0&&(o={},i.set(a,o)),o}function n(a){i.delete(a)}function r(a,o,c){i.get(a)[o]=c}function s(){i=new WeakMap}return{has:e,get:t,remove:n,update:r,dispose:s}}function Kf(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.material.id!==e.material.id?i.material.id-e.material.id:i.materialVariant!==e.materialVariant?i.materialVariant-e.materialVariant:i.z!==e.z?i.z-e.z:i.id-e.id}function no(i,e){return i.groupOrder!==e.groupOrder?i.groupOrder-e.groupOrder:i.renderOrder!==e.renderOrder?i.renderOrder-e.renderOrder:i.z!==e.z?e.z-i.z:i.id-e.id}function io(){const i=[];let e=0;const t=[],n=[],r=[];function s(){e=0,t.length=0,n.length=0,r.length=0}function a(u){let p=0;return u.isInstancedMesh&&(p+=2),u.isSkinnedMesh&&(p+=1),p}function o(u,p,_,M,f,d){let S=i[e];return S===void 0?(S={id:u.id,object:u,geometry:p,material:_,materialVariant:a(u),groupOrder:M,renderOrder:u.renderOrder,z:f,group:d},i[e]=S):(S.id=u.id,S.object=u,S.geometry=p,S.material=_,S.materialVariant=a(u),S.groupOrder=M,S.renderOrder=u.renderOrder,S.z=f,S.group=d),e++,S}function c(u,p,_,M,f,d){const S=o(u,p,_,M,f,d);_.transmission>0?n.push(S):_.transparent===!0?r.push(S):t.push(S)}function l(u,p,_,M,f,d){const S=o(u,p,_,M,f,d);_.transmission>0?n.unshift(S):_.transparent===!0?r.unshift(S):t.unshift(S)}function h(u,p){t.length>1&&t.sort(u||Kf),n.length>1&&n.sort(p||no),r.length>1&&r.sort(p||no)}function m(){for(let u=e,p=i.length;u=s.length?(a=new io,s.push(a)):a=s[r],a}function t(){i=new WeakMap}return{get:e,dispose:t}}function Jf(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new B,color:new Ze};break;case"SpotLight":t={position:new B,direction:new B,color:new Ze,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new B,color:new Ze,distance:0,decay:0};break;case"HemisphereLight":t={direction:new B,skyColor:new Ze,groundColor:new Ze};break;case"RectAreaLight":t={color:new Ze,position:new B,halfWidth:new B,halfHeight:new B};break}return i[e.id]=t,t}}}function Qf(){const i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new je};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new je};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new je,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[e.id]=t,t}}}let ep=0;function tp(i,e){return(e.castShadow?2:0)-(i.castShadow?2:0)+(e.map?1:0)-(i.map?1:0)}function np(i){const e=new Jf,t=Qf(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let l=0;l<9;l++)n.probe.push(new B);const r=new B,s=new dt,a=new dt;function o(l){let h=0,m=0,u=0;for(let E=0;E<9;E++)n.probe[E].set(0,0,0);let p=0,_=0,M=0,f=0,d=0,S=0,y=0,T=0,C=0,R=0,D=0;l.sort(tp);for(let E=0,q=l.length;E0&&(i.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=oe.LTC_FLOAT_1,n.rectAreaLTC2=oe.LTC_FLOAT_2):(n.rectAreaLTC1=oe.LTC_HALF_1,n.rectAreaLTC2=oe.LTC_HALF_2)),n.ambient[0]=h,n.ambient[1]=m,n.ambient[2]=u;const x=n.hash;(x.directionalLength!==p||x.pointLength!==_||x.spotLength!==M||x.rectAreaLength!==f||x.hemiLength!==d||x.numDirectionalShadows!==S||x.numPointShadows!==y||x.numSpotShadows!==T||x.numSpotMaps!==C||x.numLightProbes!==D)&&(n.directional.length=p,n.spot.length=M,n.rectArea.length=f,n.point.length=_,n.hemi.length=d,n.directionalShadow.length=S,n.directionalShadowMap.length=S,n.pointShadow.length=y,n.pointShadowMap.length=y,n.spotShadow.length=T,n.spotShadowMap.length=T,n.directionalShadowMatrix.length=S,n.pointShadowMatrix.length=y,n.spotLightMatrix.length=T+C-R,n.spotLightMap.length=C,n.numSpotLightShadowsWithMaps=R,n.numLightProbes=D,x.directionalLength=p,x.pointLength=_,x.spotLength=M,x.rectAreaLength=f,x.hemiLength=d,x.numDirectionalShadows=S,x.numPointShadows=y,x.numSpotShadows=T,x.numSpotMaps=C,x.numLightProbes=D,n.version=ep++)}function c(l,h){let m=0,u=0,p=0,_=0,M=0;const f=h.matrixWorldInverse;for(let d=0,S=l.length;d=a.length?(o=new ro(i),a.push(o)):o=a[s],o}function n(){e=new WeakMap}return{get:t,dispose:n}}const rp=`void main() { - gl_Position = vec4( position, 1.0 ); -}`,sp=`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -void main() { - const float samples = float( VSM_SAMPLES ); - float mean = 0.0; - float squared_mean = 0.0; - float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); - float uvStart = samples <= 1.0 ? 0.0 : - 1.0; - for ( float i = 0.0; i < samples; i ++ ) { - float uvOffset = uvStart + i * uvStride; - #ifdef HORIZONTAL_PASS - vec2 distribution = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ).rg; - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ).r; - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) ); - gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 ); -}`,ap=[new B(1,0,0),new B(-1,0,0),new B(0,1,0),new B(0,-1,0),new B(0,0,1),new B(0,0,-1)],op=[new B(0,-1,0),new B(0,-1,0),new B(0,0,1),new B(0,0,-1),new B(0,-1,0),new B(0,-1,0)],so=new dt,Ei=new B,Zr=new B;function lp(i,e,t){let n=new Lo;const r=new je,s=new je,a=new lt,o=new bc,c=new Tc,l={},h=t.maxTextureSize,m={[wn]:At,[At]:wn,[cn]:cn},u=new kt({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new je},radius:{value:4}},vertexShader:rp,fragmentShader:sp}),p=u.clone();p.defines.HORIZONTAL_PASS=1;const _=new _n;_.setAttribute("position",new Jt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const M=new en(_,u),f=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=ir;let d=this.type;this.render=function(R,D,x){if(f.enabled===!1||f.autoUpdate===!1&&f.needsUpdate===!1||R.length===0)return;this.type===dl&&(Pe("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."),this.type=ir);const E=i.getRenderTarget(),q=i.getActiveCubeFace(),A=i.getActiveMipmapLevel(),z=i.state;z.setBlending(dn),z.buffers.depth.getReversed()===!0?z.buffers.color.setClear(0,0,0,0):z.buffers.color.setClear(1,1,1,1),z.buffers.depth.setTest(!0),z.setScissorTest(!1);const F=d!==this.type;F&&D.traverse(function(V){V.material&&(Array.isArray(V.material)?V.material.forEach(k=>k.needsUpdate=!0):V.material.needsUpdate=!0)});for(let V=0,k=R.length;Vh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/ee.x),r.x=s.x*ee.x,O.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/ee.y),r.y=s.y*ee.y,O.mapSize.y=s.y));const Z=i.state.buffers.depth.getReversed();if(O.camera._reversedDepth=Z,O.map===null||F===!0){if(O.map!==null&&(O.map.depthTexture!==null&&(O.map.depthTexture.dispose(),O.map.depthTexture=null),O.map.dispose()),this.type===bi){if(G.isPointLight){Pe("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");continue}O.map=new Zt(r.x,r.y,{format:ui,type:pn,minFilter:Et,magFilter:Et,generateMipmaps:!1}),O.map.texture.name=G.name+".shadowMap",O.map.depthTexture=new Ri(r.x,r.y,jt),O.map.depthTexture.name=G.name+".shadowMapDepth",O.map.depthTexture.format=mn,O.map.depthTexture.compareFunction=null,O.map.depthTexture.minFilter=xt,O.map.depthTexture.magFilter=xt}else G.isPointLight?(O.map=new Bo(r.x),O.map.depthTexture=new _c(r.x,Qt)):(O.map=new Zt(r.x,r.y),O.map.depthTexture=new Ri(r.x,r.y,Qt)),O.map.depthTexture.name=G.name+".shadowMap",O.map.depthTexture.format=mn,this.type===ir?(O.map.depthTexture.compareFunction=Z?Js:Zs,O.map.depthTexture.minFilter=Et,O.map.depthTexture.magFilter=Et):(O.map.depthTexture.compareFunction=null,O.map.depthTexture.minFilter=xt,O.map.depthTexture.magFilter=xt);O.camera.updateProjectionMatrix()}const ue=O.map.isWebGLCubeRenderTarget?6:1;for(let me=0;me0||D.map&&D.alphaTest>0||D.alphaToCoverage===!0){const z=q.uuid,F=D.uuid;let V=l[z];V===void 0&&(V={},l[z]=V);let k=V[F];k===void 0&&(k=q.clone(),V[F]=k,D.addEventListener("dispose",C)),q=k}if(q.visible=D.visible,q.wireframe=D.wireframe,E===bi?q.side=D.shadowSide!==null?D.shadowSide:D.side:q.side=D.shadowSide!==null?D.shadowSide:m[D.side],q.alphaMap=D.alphaMap,q.alphaTest=D.alphaToCoverage===!0?.5:D.alphaTest,q.map=D.map,q.clipShadows=D.clipShadows,q.clippingPlanes=D.clippingPlanes,q.clipIntersection=D.clipIntersection,q.displacementMap=D.displacementMap,q.displacementScale=D.displacementScale,q.displacementBias=D.displacementBias,q.wireframeLinewidth=D.wireframeLinewidth,q.linewidth=D.linewidth,x.isPointLight===!0&&q.isMeshDistanceMaterial===!0){const z=i.properties.get(q);z.light=x}return q}function T(R,D,x,E,q){if(R.visible===!1)return;if(R.layers.test(D.layers)&&(R.isMesh||R.isLine||R.isPoints)&&(R.castShadow||R.receiveShadow&&q===bi)&&(!R.frustumCulled||n.intersectsObject(R))){R.modelViewMatrix.multiplyMatrices(x.matrixWorldInverse,R.matrixWorld);const F=e.update(R),V=R.material;if(Array.isArray(V)){const k=F.groups;for(let G=0,O=k.length;G=1):ee.indexOf("OpenGL ES")!==-1&&(O=parseFloat(/^OpenGL ES (\d)/.exec(ee)[1]),G=O>=2);let Z=null,ue={};const me=i.getParameter(i.SCISSOR_BOX),he=i.getParameter(i.VIEWPORT),Ue=new lt().fromArray(me),rt=new lt().fromArray(he);function nt(P,se,ne,pe){const Q=new Uint8Array(4),W=i.createTexture();i.bindTexture(P,W),i.texParameteri(P,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(P,i.TEXTURE_MAG_FILTER,i.NEAREST);for(let xe=0;xe"u"?!1:/OculusBrowser/g.test(navigator.userAgent),l=new je,h=new WeakMap;let m;const u=new WeakMap;let p=!1;try{p=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(b,g){return p?new OffscreenCanvas(b,g):dr("canvas")}function M(b,g,L){let Y=1;const K=Se(b);if((K.width>L||K.height>L)&&(Y=L/Math.max(K.width,K.height)),Y<1)if(typeof HTMLImageElement<"u"&&b instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&b instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&b instanceof ImageBitmap||typeof VideoFrame<"u"&&b instanceof VideoFrame){const X=Math.floor(Y*K.width),ge=Math.floor(Y*K.height);m===void 0&&(m=_(X,ge));const re=g?_(X,ge):m;return re.width=X,re.height=ge,re.getContext("2d").drawImage(b,0,0,X,ge),Pe("WebGLRenderer: Texture has been resized from ("+K.width+"x"+K.height+") to ("+X+"x"+ge+")."),re}else return"data"in b&&Pe("WebGLRenderer: Image in DataTexture is too big ("+K.width+"x"+K.height+")."),b;return b}function f(b){return b.generateMipmaps}function d(b){i.generateMipmap(b)}function S(b){return b.isWebGLCubeRenderTarget?i.TEXTURE_CUBE_MAP:b.isWebGL3DRenderTarget?i.TEXTURE_3D:b.isWebGLArrayRenderTarget||b.isCompressedArrayTexture?i.TEXTURE_2D_ARRAY:i.TEXTURE_2D}function y(b,g,L,Y,K=!1){if(b!==null){if(i[b]!==void 0)return i[b];Pe("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+b+"'")}let X=g;if(g===i.RED&&(L===i.FLOAT&&(X=i.R32F),L===i.HALF_FLOAT&&(X=i.R16F),L===i.UNSIGNED_BYTE&&(X=i.R8)),g===i.RED_INTEGER&&(L===i.UNSIGNED_BYTE&&(X=i.R8UI),L===i.UNSIGNED_SHORT&&(X=i.R16UI),L===i.UNSIGNED_INT&&(X=i.R32UI),L===i.BYTE&&(X=i.R8I),L===i.SHORT&&(X=i.R16I),L===i.INT&&(X=i.R32I)),g===i.RG&&(L===i.FLOAT&&(X=i.RG32F),L===i.HALF_FLOAT&&(X=i.RG16F),L===i.UNSIGNED_BYTE&&(X=i.RG8)),g===i.RG_INTEGER&&(L===i.UNSIGNED_BYTE&&(X=i.RG8UI),L===i.UNSIGNED_SHORT&&(X=i.RG16UI),L===i.UNSIGNED_INT&&(X=i.RG32UI),L===i.BYTE&&(X=i.RG8I),L===i.SHORT&&(X=i.RG16I),L===i.INT&&(X=i.RG32I)),g===i.RGB_INTEGER&&(L===i.UNSIGNED_BYTE&&(X=i.RGB8UI),L===i.UNSIGNED_SHORT&&(X=i.RGB16UI),L===i.UNSIGNED_INT&&(X=i.RGB32UI),L===i.BYTE&&(X=i.RGB8I),L===i.SHORT&&(X=i.RGB16I),L===i.INT&&(X=i.RGB32I)),g===i.RGBA_INTEGER&&(L===i.UNSIGNED_BYTE&&(X=i.RGBA8UI),L===i.UNSIGNED_SHORT&&(X=i.RGBA16UI),L===i.UNSIGNED_INT&&(X=i.RGBA32UI),L===i.BYTE&&(X=i.RGBA8I),L===i.SHORT&&(X=i.RGBA16I),L===i.INT&&(X=i.RGBA32I)),g===i.RGB&&(L===i.UNSIGNED_INT_5_9_9_9_REV&&(X=i.RGB9_E5),L===i.UNSIGNED_INT_10F_11F_11F_REV&&(X=i.R11F_G11F_B10F)),g===i.RGBA){const ge=K?cr:Ge.getTransfer(Y);L===i.FLOAT&&(X=i.RGBA32F),L===i.HALF_FLOAT&&(X=i.RGBA16F),L===i.UNSIGNED_BYTE&&(X=ge===Ye?i.SRGB8_ALPHA8:i.RGBA8),L===i.UNSIGNED_SHORT_4_4_4_4&&(X=i.RGBA4),L===i.UNSIGNED_SHORT_5_5_5_1&&(X=i.RGB5_A1)}return(X===i.R16F||X===i.R32F||X===i.RG16F||X===i.RG32F||X===i.RGBA16F||X===i.RGBA32F)&&e.get("EXT_color_buffer_float"),X}function T(b,g){let L;return b?g===null||g===Qt||g===Ai?L=i.DEPTH24_STENCIL8:g===jt?L=i.DEPTH32F_STENCIL8:g===yi&&(L=i.DEPTH24_STENCIL8,Pe("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):g===null||g===Qt||g===Ai?L=i.DEPTH_COMPONENT24:g===jt?L=i.DEPTH_COMPONENT32F:g===yi&&(L=i.DEPTH_COMPONENT16),L}function C(b,g){return f(b)===!0||b.isFramebufferTexture&&b.minFilter!==xt&&b.minFilter!==Et?Math.log2(Math.max(g.width,g.height))+1:b.mipmaps!==void 0&&b.mipmaps.length>0?b.mipmaps.length:b.isCompressedTexture&&Array.isArray(b.image)?g.mipmaps.length:1}function R(b){const g=b.target;g.removeEventListener("dispose",R),x(g),g.isVideoTexture&&h.delete(g)}function D(b){const g=b.target;g.removeEventListener("dispose",D),q(g)}function x(b){const g=n.get(b);if(g.__webglInit===void 0)return;const L=b.source,Y=u.get(L);if(Y){const K=Y[g.__cacheKey];K.usedTimes--,K.usedTimes===0&&E(b),Object.keys(Y).length===0&&u.delete(L)}n.remove(b)}function E(b){const g=n.get(b);i.deleteTexture(g.__webglTexture);const L=b.source,Y=u.get(L);delete Y[g.__cacheKey],a.memory.textures--}function q(b){const g=n.get(b);if(b.depthTexture&&(b.depthTexture.dispose(),n.remove(b.depthTexture)),b.isWebGLCubeRenderTarget)for(let Y=0;Y<6;Y++){if(Array.isArray(g.__webglFramebuffer[Y]))for(let K=0;K=r.maxTextures&&Pe("WebGLTextures: Trying to use "+b+" texture units while this GPU supports only "+r.maxTextures),A+=1,b}function V(b){const g=[];return g.push(b.wrapS),g.push(b.wrapT),g.push(b.wrapR||0),g.push(b.magFilter),g.push(b.minFilter),g.push(b.anisotropy),g.push(b.internalFormat),g.push(b.format),g.push(b.type),g.push(b.generateMipmaps),g.push(b.premultiplyAlpha),g.push(b.flipY),g.push(b.unpackAlignment),g.push(b.colorSpace),g.join()}function k(b,g){const L=n.get(b);if(b.isVideoTexture&&We(b),b.isRenderTargetTexture===!1&&b.isExternalTexture!==!0&&b.version>0&&L.__version!==b.version){const Y=b.image;if(Y===null)Pe("WebGLRenderer: Texture marked for update but no image data found.");else if(Y.complete===!1)Pe("WebGLRenderer: Texture marked for update but image is incomplete");else{$(L,b,g);return}}else b.isExternalTexture&&(L.__webglTexture=b.sourceTexture?b.sourceTexture:null);t.bindTexture(i.TEXTURE_2D,L.__webglTexture,i.TEXTURE0+g)}function G(b,g){const L=n.get(b);if(b.isRenderTargetTexture===!1&&b.version>0&&L.__version!==b.version){$(L,b,g);return}else b.isExternalTexture&&(L.__webglTexture=b.sourceTexture?b.sourceTexture:null);t.bindTexture(i.TEXTURE_2D_ARRAY,L.__webglTexture,i.TEXTURE0+g)}function O(b,g){const L=n.get(b);if(b.isRenderTargetTexture===!1&&b.version>0&&L.__version!==b.version){$(L,b,g);return}t.bindTexture(i.TEXTURE_3D,L.__webglTexture,i.TEXTURE0+g)}function ee(b,g){const L=n.get(b);if(b.isCubeDepthTexture!==!0&&b.version>0&&L.__version!==b.version){ie(L,b,g);return}t.bindTexture(i.TEXTURE_CUBE_MAP,L.__webglTexture,i.TEXTURE0+g)}const Z={[os]:i.REPEAT,[un]:i.CLAMP_TO_EDGE,[ls]:i.MIRRORED_REPEAT},ue={[xt]:i.NEAREST,[Ll]:i.NEAREST_MIPMAP_NEAREST,[Ui]:i.NEAREST_MIPMAP_LINEAR,[Et]:i.LINEAR,[Sr]:i.LINEAR_MIPMAP_NEAREST,[Gn]:i.LINEAR_MIPMAP_LINEAR},me={[Fl]:i.NEVER,[Gl]:i.ALWAYS,[Ol]:i.LESS,[Zs]:i.LEQUAL,[Bl]:i.EQUAL,[Js]:i.GEQUAL,[zl]:i.GREATER,[Vl]:i.NOTEQUAL};function he(b,g){if(g.type===jt&&e.has("OES_texture_float_linear")===!1&&(g.magFilter===Et||g.magFilter===Sr||g.magFilter===Ui||g.magFilter===Gn||g.minFilter===Et||g.minFilter===Sr||g.minFilter===Ui||g.minFilter===Gn)&&Pe("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),i.texParameteri(b,i.TEXTURE_WRAP_S,Z[g.wrapS]),i.texParameteri(b,i.TEXTURE_WRAP_T,Z[g.wrapT]),(b===i.TEXTURE_3D||b===i.TEXTURE_2D_ARRAY)&&i.texParameteri(b,i.TEXTURE_WRAP_R,Z[g.wrapR]),i.texParameteri(b,i.TEXTURE_MAG_FILTER,ue[g.magFilter]),i.texParameteri(b,i.TEXTURE_MIN_FILTER,ue[g.minFilter]),g.compareFunction&&(i.texParameteri(b,i.TEXTURE_COMPARE_MODE,i.COMPARE_REF_TO_TEXTURE),i.texParameteri(b,i.TEXTURE_COMPARE_FUNC,me[g.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(g.magFilter===xt||g.minFilter!==Ui&&g.minFilter!==Gn||g.type===jt&&e.has("OES_texture_float_linear")===!1)return;if(g.anisotropy>1||n.get(g).__currentAnisotropy){const L=e.get("EXT_texture_filter_anisotropic");i.texParameterf(b,L.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(g.anisotropy,r.getMaxAnisotropy())),n.get(g).__currentAnisotropy=g.anisotropy}}}function Ue(b,g){let L=!1;b.__webglInit===void 0&&(b.__webglInit=!0,g.addEventListener("dispose",R));const Y=g.source;let K=u.get(Y);K===void 0&&(K={},u.set(Y,K));const X=V(g);if(X!==b.__cacheKey){K[X]===void 0&&(K[X]={texture:i.createTexture(),usedTimes:0},a.memory.textures++,L=!0),K[X].usedTimes++;const ge=K[b.__cacheKey];ge!==void 0&&(K[b.__cacheKey].usedTimes--,ge.usedTimes===0&&E(g)),b.__cacheKey=X,b.__webglTexture=K[X].texture}return L}function rt(b,g,L){return Math.floor(Math.floor(b/L)/g)}function nt(b,g,L,Y){const X=b.updateRanges;if(X.length===0)t.texSubImage2D(i.TEXTURE_2D,0,0,0,g.width,g.height,L,Y,g.data);else{X.sort((J,te)=>J.start-te.start);let ge=0;for(let J=1;J0){P&&se&&t.texStorage2D(i.TEXTURE_2D,pe,ve,Oe[0].width,Oe[0].height);for(let Q=0,W=Oe.length;Q0){const xe=Fa(de.width,de.height,g.format,g.type);for(const Ce of g.layerUpdates){const tt=de.data.subarray(Ce*xe/de.data.BYTES_PER_ELEMENT,(Ce+1)*xe/de.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Q,0,0,Ce,de.width,de.height,1,te,tt)}g.clearLayerUpdates()}else t.compressedTexSubImage3D(i.TEXTURE_2D_ARRAY,Q,0,0,0,de.width,de.height,J.depth,te,de.data)}else t.compressedTexImage3D(i.TEXTURE_2D_ARRAY,Q,ve,de.width,de.height,J.depth,0,de.data,0,0);else Pe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else P?ne&&t.texSubImage3D(i.TEXTURE_2D_ARRAY,Q,0,0,0,de.width,de.height,J.depth,te,_e,de.data):t.texImage3D(i.TEXTURE_2D_ARRAY,Q,ve,de.width,de.height,J.depth,0,te,_e,de.data)}else{P&&se&&t.texStorage2D(i.TEXTURE_2D,pe,ve,Oe[0].width,Oe[0].height);for(let Q=0,W=Oe.length;Q0){const Q=Fa(J.width,J.height,g.format,g.type);for(const W of g.layerUpdates){const xe=J.data.subarray(W*Q/J.data.BYTES_PER_ELEMENT,(W+1)*Q/J.data.BYTES_PER_ELEMENT);t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,W,J.width,J.height,1,te,_e,xe)}g.clearLayerUpdates()}else t.texSubImage3D(i.TEXTURE_2D_ARRAY,0,0,0,0,J.width,J.height,J.depth,te,_e,J.data)}else t.texImage3D(i.TEXTURE_2D_ARRAY,0,ve,J.width,J.height,J.depth,0,te,_e,J.data);else if(g.isData3DTexture)P?(se&&t.texStorage3D(i.TEXTURE_3D,pe,ve,J.width,J.height,J.depth),ne&&t.texSubImage3D(i.TEXTURE_3D,0,0,0,0,J.width,J.height,J.depth,te,_e,J.data)):t.texImage3D(i.TEXTURE_3D,0,ve,J.width,J.height,J.depth,0,te,_e,J.data);else if(g.isFramebufferTexture){if(se)if(P)t.texStorage2D(i.TEXTURE_2D,pe,ve,J.width,J.height);else{let Q=J.width,W=J.height;for(let xe=0;xe>=1,W>>=1}}else if(Oe.length>0){if(P&&se){const Q=Se(Oe[0]);t.texStorage2D(i.TEXTURE_2D,pe,ve,Q.width,Q.height)}for(let Q=0,W=Oe.length;Q0&&pe++;const W=Se(te[0]);t.texStorage2D(i.TEXTURE_CUBE_MAP,pe,Oe,W.width,W.height)}for(let W=0;W<6;W++)if(J){P?ne&&t.texSubImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+W,0,0,0,te[W].width,te[W].height,ve,de,te[W].data):t.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+W,0,Oe,te[W].width,te[W].height,0,ve,de,te[W].data);for(let xe=0;xe>X),_e=Math.max(1,g.height>>X);K===i.TEXTURE_3D||K===i.TEXTURE_2D_ARRAY?t.texImage3D(K,X,ye,te,_e,g.depth,0,ge,re,null):t.texImage2D(K,X,ye,te,_e,0,ge,re,null)}t.bindFramebuffer(i.FRAMEBUFFER,b),ct(g)?o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER,Y,K,J.__webglTexture,0,w(g)):(K===i.TEXTURE_2D||K>=i.TEXTURE_CUBE_MAP_POSITIVE_X&&K<=i.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&i.framebufferTexture2D(i.FRAMEBUFFER,Y,K,J.__webglTexture,X),t.bindFramebuffer(i.FRAMEBUFFER,null)}function Le(b,g,L){if(i.bindRenderbuffer(i.RENDERBUFFER,b),g.depthBuffer){const Y=g.depthTexture,K=Y&&Y.isDepthTexture?Y.type:null,X=T(g.stencilBuffer,K),ge=g.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT;ct(g)?o.renderbufferStorageMultisampleEXT(i.RENDERBUFFER,w(g),X,g.width,g.height):L?i.renderbufferStorageMultisample(i.RENDERBUFFER,w(g),X,g.width,g.height):i.renderbufferStorage(i.RENDERBUFFER,X,g.width,g.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,ge,i.RENDERBUFFER,b)}else{const Y=g.textures;for(let K=0;K{delete g.__boundDepthTexture,delete g.__depthDisposeCallback,Y.removeEventListener("dispose",K)};Y.addEventListener("dispose",K),g.__depthDisposeCallback=K}g.__boundDepthTexture=Y}if(b.depthTexture&&!g.__autoAllocateDepthBuffer)if(L)for(let Y=0;Y<6;Y++)Ae(g.__webglFramebuffer[Y],b,Y);else{const Y=b.texture.mipmaps;Y&&Y.length>0?Ae(g.__webglFramebuffer[0],b,0):Ae(g.__webglFramebuffer,b,0)}else if(L){g.__webglDepthbuffer=[];for(let Y=0;Y<6;Y++)if(t.bindFramebuffer(i.FRAMEBUFFER,g.__webglFramebuffer[Y]),g.__webglDepthbuffer[Y]===void 0)g.__webglDepthbuffer[Y]=i.createRenderbuffer(),Le(g.__webglDepthbuffer[Y],b,!1);else{const K=b.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,X=g.__webglDepthbuffer[Y];i.bindRenderbuffer(i.RENDERBUFFER,X),i.framebufferRenderbuffer(i.FRAMEBUFFER,K,i.RENDERBUFFER,X)}}else{const Y=b.texture.mipmaps;if(Y&&Y.length>0?t.bindFramebuffer(i.FRAMEBUFFER,g.__webglFramebuffer[0]):t.bindFramebuffer(i.FRAMEBUFFER,g.__webglFramebuffer),g.__webglDepthbuffer===void 0)g.__webglDepthbuffer=i.createRenderbuffer(),Le(g.__webglDepthbuffer,b,!1);else{const K=b.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,X=g.__webglDepthbuffer;i.bindRenderbuffer(i.RENDERBUFFER,X),i.framebufferRenderbuffer(i.FRAMEBUFFER,K,i.RENDERBUFFER,X)}}t.bindFramebuffer(i.FRAMEBUFFER,null)}function pt(b,g,L){const Y=n.get(b);g!==void 0&&ae(Y.__webglFramebuffer,b,b.texture,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,0),L!==void 0&&we(b)}function Ve(b){const g=b.texture,L=n.get(b),Y=n.get(g);b.addEventListener("dispose",D);const K=b.textures,X=b.isWebGLCubeRenderTarget===!0,ge=K.length>1;if(ge||(Y.__webglTexture===void 0&&(Y.__webglTexture=i.createTexture()),Y.__version=g.version,a.memory.textures++),X){L.__webglFramebuffer=[];for(let re=0;re<6;re++)if(g.mipmaps&&g.mipmaps.length>0){L.__webglFramebuffer[re]=[];for(let ye=0;ye0){L.__webglFramebuffer=[];for(let re=0;re0&&ct(b)===!1){L.__webglMultisampledFramebuffer=i.createFramebuffer(),L.__webglColorRenderbuffer=[],t.bindFramebuffer(i.FRAMEBUFFER,L.__webglMultisampledFramebuffer);for(let re=0;re0)for(let ye=0;ye0)for(let ye=0;ye0){if(ct(b)===!1){const g=b.textures,L=b.width,Y=b.height;let K=i.COLOR_BUFFER_BIT;const X=b.stencilBuffer?i.DEPTH_STENCIL_ATTACHMENT:i.DEPTH_ATTACHMENT,ge=n.get(b),re=g.length>1;if(re)for(let Re=0;Re0?t.bindFramebuffer(i.DRAW_FRAMEBUFFER,ge.__webglFramebuffer[0]):t.bindFramebuffer(i.DRAW_FRAMEBUFFER,ge.__webglFramebuffer);for(let Re=0;Re0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&g.__useRenderToTexture!==!1}function We(b){const g=a.render.frame;h.get(b)!==g&&(h.set(b,g),b.update())}function et(b,g){const L=b.colorSpace,Y=b.format,K=b.type;return b.isCompressedTexture===!0||b.isVideoTexture===!0||L!==di&&L!==An&&(Ge.getTransfer(L)===Ye?(Y!==Gt||K!==Ut)&&Pe("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):He("WebGLTextures: Unsupported texture color space:",L)),g}function Se(b){return typeof HTMLImageElement<"u"&&b instanceof HTMLImageElement?(l.width=b.naturalWidth||b.width,l.height=b.naturalHeight||b.height):typeof VideoFrame<"u"&&b instanceof VideoFrame?(l.width=b.displayWidth,l.height=b.displayHeight):(l.width=b.width,l.height=b.height),l}this.allocateTextureUnit=F,this.resetTextureUnits=z,this.setTexture2D=k,this.setTexture2DArray=G,this.setTexture3D=O,this.setTextureCube=ee,this.rebindTextures=pt,this.setupRenderTarget=Ve,this.updateRenderTargetMipmap=Xe,this.updateMultisampleRenderTarget=at,this.setupDepthRenderbuffer=we,this.setupFrameBufferTexture=ae,this.useMultisampledRTT=ct,this.isReversedDepthBuffer=function(){return t.buffers.depth.getReversed()}}function dp(i,e){function t(n,r=An){let s;const a=Ge.getTransfer(r);if(n===Ut)return i.UNSIGNED_BYTE;if(n===qs)return i.UNSIGNED_SHORT_4_4_4_4;if(n===Ys)return i.UNSIGNED_SHORT_5_5_5_1;if(n===Mo)return i.UNSIGNED_INT_5_9_9_9_REV;if(n===So)return i.UNSIGNED_INT_10F_11F_11F_REV;if(n===xo)return i.BYTE;if(n===vo)return i.SHORT;if(n===yi)return i.UNSIGNED_SHORT;if(n===Xs)return i.INT;if(n===Qt)return i.UNSIGNED_INT;if(n===jt)return i.FLOAT;if(n===pn)return i.HALF_FLOAT;if(n===Eo)return i.ALPHA;if(n===bo)return i.RGB;if(n===Gt)return i.RGBA;if(n===mn)return i.DEPTH_COMPONENT;if(n===kn)return i.DEPTH_STENCIL;if(n===To)return i.RED;if(n===js)return i.RED_INTEGER;if(n===ui)return i.RG;if(n===$s)return i.RG_INTEGER;if(n===Ks)return i.RGBA_INTEGER;if(n===rr||n===sr||n===ar||n===or)if(a===Ye)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===rr)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===sr)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===ar)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===or)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===rr)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===sr)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===ar)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===or)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===cs||n===us||n===ds||n===hs)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===cs)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===us)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===ds)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===hs)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===fs||n===ps||n===ms||n===gs||n===_s||n===xs||n===vs)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(n===fs||n===ps)return a===Ye?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===ms)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC;if(n===gs)return s.COMPRESSED_R11_EAC;if(n===_s)return s.COMPRESSED_SIGNED_R11_EAC;if(n===xs)return s.COMPRESSED_RG11_EAC;if(n===vs)return s.COMPRESSED_SIGNED_RG11_EAC}else return null;if(n===Ms||n===Ss||n===Es||n===bs||n===Ts||n===ys||n===As||n===Rs||n===ws||n===Cs||n===Ps||n===Ds||n===Ls||n===Is)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(n===Ms)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Ss)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Es)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===bs)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===Ts)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===ys)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===As)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===Rs)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===ws)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Cs)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Ps)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===Ds)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Ls)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===Is)return a===Ye?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===Us||n===Ns||n===Fs)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(n===Us)return a===Ye?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===Ns)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Fs)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Os||n===Bs||n===zs||n===Vs)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(n===Os)return s.COMPRESSED_RED_RGTC1_EXT;if(n===Bs)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===zs)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Vs)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===Ai?i.UNSIGNED_INT_24_8:i[n]!==void 0?i[n]:null}return{convert:t}}const hp=` -void main() { - - gl_Position = vec4( position, 1.0 ); - -}`,fp=` -uniform sampler2DArray depthColor; -uniform float depthWidth; -uniform float depthHeight; - -void main() { - - vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); - - if ( coord.x >= 1.0 ) { - - gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; - - } else { - - gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; - - } - -}`;class pp{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const n=new Uo(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new kt({vertexShader:hp,fragmentShader:fp,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new en(new Di(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class mp extends fi{constructor(e,t){super();const n=this;let r=null,s=1,a=null,o="local-floor",c=1,l=null,h=null,m=null,u=null,p=null,_=null;const M=typeof XRWebGLBinding<"u",f=new pp,d={},S=t.getContextAttributes();let y=null,T=null;const C=[],R=[],D=new je;let x=null;const E=new zt;E.viewport=new lt;const q=new zt;q.viewport=new lt;const A=[E,q],z=new Ac;let F=null,V=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function($){let ie=C[$];return ie===void 0&&(ie=new Cr,C[$]=ie),ie.getTargetRaySpace()},this.getControllerGrip=function($){let ie=C[$];return ie===void 0&&(ie=new Cr,C[$]=ie),ie.getGripSpace()},this.getHand=function($){let ie=C[$];return ie===void 0&&(ie=new Cr,C[$]=ie),ie.getHandSpace()};function k($){const ie=R.indexOf($.inputSource);if(ie===-1)return;const ae=C[ie];ae!==void 0&&(ae.update($.inputSource,$.frame,l||a),ae.dispatchEvent({type:$.type,data:$.inputSource}))}function G(){r.removeEventListener("select",k),r.removeEventListener("selectstart",k),r.removeEventListener("selectend",k),r.removeEventListener("squeeze",k),r.removeEventListener("squeezestart",k),r.removeEventListener("squeezeend",k),r.removeEventListener("end",G),r.removeEventListener("inputsourceschange",O);for(let $=0;$=0&&(R[Le]=null,C[Le].disconnect(ae))}for(let ie=0;ie<$.added.length;ie++){const ae=$.added[ie];let Le=R.indexOf(ae);if(Le===-1){for(let we=0;we=R.length){R.push(ae),Le=we;break}else if(R[we]===null){R[we]=ae,Le=we;break}if(Le===-1)break}const Ae=C[Le];Ae&&Ae.connect(ae)}}const ee=new B,Z=new B;function ue($,ie,ae){ee.setFromMatrixPosition(ie.matrixWorld),Z.setFromMatrixPosition(ae.matrixWorld);const Le=ee.distanceTo(Z),Ae=ie.projectionMatrix.elements,we=ae.projectionMatrix.elements,pt=Ae[14]/(Ae[10]-1),Ve=Ae[14]/(Ae[10]+1),Xe=(Ae[9]+1)/Ae[5],Je=(Ae[9]-1)/Ae[5],Fe=(Ae[8]-1)/Ae[0],at=(we[8]+1)/we[0],w=pt*Fe,ct=pt*at,We=Le/(-Fe+at),et=We*-Fe;if(ie.matrixWorld.decompose($.position,$.quaternion,$.scale),$.translateX(et),$.translateZ(We),$.matrixWorld.compose($.position,$.quaternion,$.scale),$.matrixWorldInverse.copy($.matrixWorld).invert(),Ae[10]===-1)$.projectionMatrix.copy(ie.projectionMatrix),$.projectionMatrixInverse.copy(ie.projectionMatrixInverse);else{const Se=pt+We,b=Ve+We,g=w-et,L=ct+(Le-et),Y=Xe*Ve/b*Se,K=Je*Ve/b*Se;$.projectionMatrix.makePerspective(g,L,Y,K,Se,b),$.projectionMatrixInverse.copy($.projectionMatrix).invert()}}function me($,ie){ie===null?$.matrixWorld.copy($.matrix):$.matrixWorld.multiplyMatrices(ie.matrixWorld,$.matrix),$.matrixWorldInverse.copy($.matrixWorld).invert()}this.updateCamera=function($){if(r===null)return;let ie=$.near,ae=$.far;f.texture!==null&&(f.depthNear>0&&(ie=f.depthNear),f.depthFar>0&&(ae=f.depthFar)),z.near=q.near=E.near=ie,z.far=q.far=E.far=ae,(F!==z.near||V!==z.far)&&(r.updateRenderState({depthNear:z.near,depthFar:z.far}),F=z.near,V=z.far),z.layers.mask=$.layers.mask|6,E.layers.mask=z.layers.mask&-5,q.layers.mask=z.layers.mask&-3;const Le=$.parent,Ae=z.cameras;me(z,Le);for(let we=0;we0&&(f.alphaTest.value=d.alphaTest);const S=e.get(d),y=S.envMap,T=S.envMapRotation;y&&(f.envMap.value=y,On.copy(T),On.x*=-1,On.y*=-1,On.z*=-1,y.isCubeTexture&&y.isRenderTargetTexture===!1&&(On.y*=-1,On.z*=-1),f.envMapRotation.value.setFromMatrix4(gp.makeRotationFromEuler(On)),f.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,f.reflectivity.value=d.reflectivity,f.ior.value=d.ior,f.refractionRatio.value=d.refractionRatio),d.lightMap&&(f.lightMap.value=d.lightMap,f.lightMapIntensity.value=d.lightMapIntensity,t(d.lightMap,f.lightMapTransform)),d.aoMap&&(f.aoMap.value=d.aoMap,f.aoMapIntensity.value=d.aoMapIntensity,t(d.aoMap,f.aoMapTransform))}function a(f,d){f.diffuse.value.copy(d.color),f.opacity.value=d.opacity,d.map&&(f.map.value=d.map,t(d.map,f.mapTransform))}function o(f,d){f.dashSize.value=d.dashSize,f.totalSize.value=d.dashSize+d.gapSize,f.scale.value=d.scale}function c(f,d,S,y){f.diffuse.value.copy(d.color),f.opacity.value=d.opacity,f.size.value=d.size*S,f.scale.value=y*.5,d.map&&(f.map.value=d.map,t(d.map,f.uvTransform)),d.alphaMap&&(f.alphaMap.value=d.alphaMap,t(d.alphaMap,f.alphaMapTransform)),d.alphaTest>0&&(f.alphaTest.value=d.alphaTest)}function l(f,d){f.diffuse.value.copy(d.color),f.opacity.value=d.opacity,f.rotation.value=d.rotation,d.map&&(f.map.value=d.map,t(d.map,f.mapTransform)),d.alphaMap&&(f.alphaMap.value=d.alphaMap,t(d.alphaMap,f.alphaMapTransform)),d.alphaTest>0&&(f.alphaTest.value=d.alphaTest)}function h(f,d){f.specular.value.copy(d.specular),f.shininess.value=Math.max(d.shininess,1e-4)}function m(f,d){d.gradientMap&&(f.gradientMap.value=d.gradientMap)}function u(f,d){f.metalness.value=d.metalness,d.metalnessMap&&(f.metalnessMap.value=d.metalnessMap,t(d.metalnessMap,f.metalnessMapTransform)),f.roughness.value=d.roughness,d.roughnessMap&&(f.roughnessMap.value=d.roughnessMap,t(d.roughnessMap,f.roughnessMapTransform)),d.envMap&&(f.envMapIntensity.value=d.envMapIntensity)}function p(f,d,S){f.ior.value=d.ior,d.sheen>0&&(f.sheenColor.value.copy(d.sheenColor).multiplyScalar(d.sheen),f.sheenRoughness.value=d.sheenRoughness,d.sheenColorMap&&(f.sheenColorMap.value=d.sheenColorMap,t(d.sheenColorMap,f.sheenColorMapTransform)),d.sheenRoughnessMap&&(f.sheenRoughnessMap.value=d.sheenRoughnessMap,t(d.sheenRoughnessMap,f.sheenRoughnessMapTransform))),d.clearcoat>0&&(f.clearcoat.value=d.clearcoat,f.clearcoatRoughness.value=d.clearcoatRoughness,d.clearcoatMap&&(f.clearcoatMap.value=d.clearcoatMap,t(d.clearcoatMap,f.clearcoatMapTransform)),d.clearcoatRoughnessMap&&(f.clearcoatRoughnessMap.value=d.clearcoatRoughnessMap,t(d.clearcoatRoughnessMap,f.clearcoatRoughnessMapTransform)),d.clearcoatNormalMap&&(f.clearcoatNormalMap.value=d.clearcoatNormalMap,t(d.clearcoatNormalMap,f.clearcoatNormalMapTransform),f.clearcoatNormalScale.value.copy(d.clearcoatNormalScale),d.side===At&&f.clearcoatNormalScale.value.negate())),d.dispersion>0&&(f.dispersion.value=d.dispersion),d.iridescence>0&&(f.iridescence.value=d.iridescence,f.iridescenceIOR.value=d.iridescenceIOR,f.iridescenceThicknessMinimum.value=d.iridescenceThicknessRange[0],f.iridescenceThicknessMaximum.value=d.iridescenceThicknessRange[1],d.iridescenceMap&&(f.iridescenceMap.value=d.iridescenceMap,t(d.iridescenceMap,f.iridescenceMapTransform)),d.iridescenceThicknessMap&&(f.iridescenceThicknessMap.value=d.iridescenceThicknessMap,t(d.iridescenceThicknessMap,f.iridescenceThicknessMapTransform))),d.transmission>0&&(f.transmission.value=d.transmission,f.transmissionSamplerMap.value=S.texture,f.transmissionSamplerSize.value.set(S.width,S.height),d.transmissionMap&&(f.transmissionMap.value=d.transmissionMap,t(d.transmissionMap,f.transmissionMapTransform)),f.thickness.value=d.thickness,d.thicknessMap&&(f.thicknessMap.value=d.thicknessMap,t(d.thicknessMap,f.thicknessMapTransform)),f.attenuationDistance.value=d.attenuationDistance,f.attenuationColor.value.copy(d.attenuationColor)),d.anisotropy>0&&(f.anisotropyVector.value.set(d.anisotropy*Math.cos(d.anisotropyRotation),d.anisotropy*Math.sin(d.anisotropyRotation)),d.anisotropyMap&&(f.anisotropyMap.value=d.anisotropyMap,t(d.anisotropyMap,f.anisotropyMapTransform))),f.specularIntensity.value=d.specularIntensity,f.specularColor.value.copy(d.specularColor),d.specularColorMap&&(f.specularColorMap.value=d.specularColorMap,t(d.specularColorMap,f.specularColorMapTransform)),d.specularIntensityMap&&(f.specularIntensityMap.value=d.specularIntensityMap,t(d.specularIntensityMap,f.specularIntensityMapTransform))}function _(f,d){d.matcap&&(f.matcap.value=d.matcap)}function M(f,d){const S=e.get(d).light;f.referencePosition.value.setFromMatrixPosition(S.matrixWorld),f.nearDistance.value=S.shadow.camera.near,f.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:r}}function xp(i,e,t,n){let r={},s={},a=[];const o=i.getParameter(i.MAX_UNIFORM_BUFFER_BINDINGS);function c(S,y){const T=y.program;n.uniformBlockBinding(S,T)}function l(S,y){let T=r[S.id];T===void 0&&(_(S),T=h(S),r[S.id]=T,S.addEventListener("dispose",f));const C=y.program;n.updateUBOMapping(S,C);const R=e.render.frame;s[S.id]!==R&&(u(S),s[S.id]=R)}function h(S){const y=m();S.__bindingPointIndex=y;const T=i.createBuffer(),C=S.__size,R=S.usage;return i.bindBuffer(i.UNIFORM_BUFFER,T),i.bufferData(i.UNIFORM_BUFFER,C,R),i.bindBuffer(i.UNIFORM_BUFFER,null),i.bindBufferBase(i.UNIFORM_BUFFER,y,T),T}function m(){for(let S=0;S0&&(T+=C-R),S.__size=T,S.__cache={},this}function M(S){const y={boundary:0,storage:0};return typeof S=="number"||typeof S=="boolean"?(y.boundary=4,y.storage=4):S.isVector2?(y.boundary=8,y.storage=8):S.isVector3||S.isColor?(y.boundary=16,y.storage=12):S.isVector4?(y.boundary=16,y.storage=16):S.isMatrix3?(y.boundary=48,y.storage=48):S.isMatrix4?(y.boundary=64,y.storage=64):S.isTexture?Pe("WebGLRenderer: Texture samplers can not be part of an uniforms group."):Pe("WebGLRenderer: Unsupported uniform value type.",S),y}function f(S){const y=S.target;y.removeEventListener("dispose",f);const T=a.indexOf(y.__bindingPointIndex);a.splice(T,1),i.deleteBuffer(r[y.id]),delete r[y.id],delete s[y.id]}function d(){for(const S in r)i.deleteBuffer(r[S]);a=[],r={},s={}}return{bind:c,update:l,dispose:d}}const vp=new Uint16Array([12469,15057,12620,14925,13266,14620,13807,14376,14323,13990,14545,13625,14713,13328,14840,12882,14931,12528,14996,12233,15039,11829,15066,11525,15080,11295,15085,10976,15082,10705,15073,10495,13880,14564,13898,14542,13977,14430,14158,14124,14393,13732,14556,13410,14702,12996,14814,12596,14891,12291,14937,11834,14957,11489,14958,11194,14943,10803,14921,10506,14893,10278,14858,9960,14484,14039,14487,14025,14499,13941,14524,13740,14574,13468,14654,13106,14743,12678,14818,12344,14867,11893,14889,11509,14893,11180,14881,10751,14852,10428,14812,10128,14765,9754,14712,9466,14764,13480,14764,13475,14766,13440,14766,13347,14769,13070,14786,12713,14816,12387,14844,11957,14860,11549,14868,11215,14855,10751,14825,10403,14782,10044,14729,9651,14666,9352,14599,9029,14967,12835,14966,12831,14963,12804,14954,12723,14936,12564,14917,12347,14900,11958,14886,11569,14878,11247,14859,10765,14828,10401,14784,10011,14727,9600,14660,9289,14586,8893,14508,8533,15111,12234,15110,12234,15104,12216,15092,12156,15067,12010,15028,11776,14981,11500,14942,11205,14902,10752,14861,10393,14812,9991,14752,9570,14682,9252,14603,8808,14519,8445,14431,8145,15209,11449,15208,11451,15202,11451,15190,11438,15163,11384,15117,11274,15055,10979,14994,10648,14932,10343,14871,9936,14803,9532,14729,9218,14645,8742,14556,8381,14461,8020,14365,7603,15273,10603,15272,10607,15267,10619,15256,10631,15231,10614,15182,10535,15118,10389,15042,10167,14963,9787,14883,9447,14800,9115,14710,8665,14615,8318,14514,7911,14411,7507,14279,7198,15314,9675,15313,9683,15309,9712,15298,9759,15277,9797,15229,9773,15166,9668,15084,9487,14995,9274,14898,8910,14800,8539,14697,8234,14590,7790,14479,7409,14367,7067,14178,6621,15337,8619,15337,8631,15333,8677,15325,8769,15305,8871,15264,8940,15202,8909,15119,8775,15022,8565,14916,8328,14804,8009,14688,7614,14569,7287,14448,6888,14321,6483,14088,6171,15350,7402,15350,7419,15347,7480,15340,7613,15322,7804,15287,7973,15229,8057,15148,8012,15046,7846,14933,7611,14810,7357,14682,7069,14552,6656,14421,6316,14251,5948,14007,5528,15356,5942,15356,5977,15353,6119,15348,6294,15332,6551,15302,6824,15249,7044,15171,7122,15070,7050,14949,6861,14818,6611,14679,6349,14538,6067,14398,5651,14189,5311,13935,4958,15359,4123,15359,4153,15356,4296,15353,4646,15338,5160,15311,5508,15263,5829,15188,6042,15088,6094,14966,6001,14826,5796,14678,5543,14527,5287,14377,4985,14133,4586,13869,4257,15360,1563,15360,1642,15358,2076,15354,2636,15341,3350,15317,4019,15273,4429,15203,4732,15105,4911,14981,4932,14836,4818,14679,4621,14517,4386,14359,4156,14083,3795,13808,3437,15360,122,15360,137,15358,285,15355,636,15344,1274,15322,2177,15281,2765,15215,3223,15120,3451,14995,3569,14846,3567,14681,3466,14511,3305,14344,3121,14037,2800,13753,2467,15360,0,15360,1,15359,21,15355,89,15346,253,15325,479,15287,796,15225,1148,15133,1492,15008,1749,14856,1882,14685,1886,14506,1783,14324,1608,13996,1398,13702,1183]);let Xt=null;function Mp(){return Xt===null&&(Xt=new fc(vp,16,16,ui,pn),Xt.name="DFG_LUT",Xt.minFilter=Et,Xt.magFilter=Et,Xt.wrapS=un,Xt.wrapT=un,Xt.generateMipmaps=!1,Xt.needsUpdate=!0),Xt}class Sp{constructor(e={}){const{canvas:t=Hl(),context:n=null,depth:r=!0,stencil:s=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:c=!0,preserveDrawingBuffer:l=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:m=!1,reversedDepthBuffer:u=!1,outputBufferType:p=Ut}=e;this.isWebGLRenderer=!0;let _;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");_=n.getContextAttributes().alpha}else _=a;const M=p,f=new Set([Ks,$s,js]),d=new Set([Ut,Qt,yi,Ai,qs,Ys]),S=new Uint32Array(4),y=new Int32Array(4);let T=null,C=null;const R=[],D=[];let x=null;this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=Kt,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const E=this;let q=!1;this._outputColorSpace=Lt;let A=0,z=0,F=null,V=-1,k=null;const G=new lt,O=new lt;let ee=null;const Z=new Ze(0);let ue=0,me=t.width,he=t.height,Ue=1,rt=null,nt=null;const $=new lt(0,0,me,he),ie=new lt(0,0,me,he);let ae=!1;const Le=new Lo;let Ae=!1,we=!1;const pt=new dt,Ve=new B,Xe=new lt,Je={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Fe=!1;function at(){return F===null?Ue:1}let w=n;function ct(v,I){return t.getContext(v,I)}try{const v={alpha:!0,depth:r,stencil:s,antialias:o,premultipliedAlpha:c,preserveDrawingBuffer:l,powerPreference:h,failIfMajorPerformanceCaveat:m};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Ws}`),t.addEventListener("webglcontextlost",xe,!1),t.addEventListener("webglcontextrestored",Ce,!1),t.addEventListener("webglcontextcreationerror",tt,!1),w===null){const I="webgl2";if(w=ct(I,v),w===null)throw ct(I)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(v){throw He("WebGLRenderer: "+v.message),v}let We,et,Se,b,g,L,Y,K,X,ge,re,ye,Re,J,te,_e,ve,de,Oe,P,se,ne,pe;function Q(){We=new Mh(w),We.init(),se=new dp(w,We),et=new hh(w,We,e,se),Se=new cp(w,We),et.reversedDepthBuffer&&u&&Se.buffers.depth.setReversed(!0),b=new bh(w),g=new $f,L=new up(w,We,Se,g,et,se,b),Y=new vh(E),K=new wc(w),ne=new uh(w,K),X=new Sh(w,K,b,ne),ge=new yh(w,X,K,ne,b),de=new Th(w,et,L),te=new fh(g),re=new jf(E,Y,We,et,ne,te),ye=new _p(E,g),Re=new Zf,J=new ip(We),ve=new ch(E,Y,Se,ge,_,c),_e=new lp(E,ge,et),pe=new xp(w,b,et,Se),Oe=new dh(w,We,b),P=new Eh(w,We,b),b.programs=re.programs,E.capabilities=et,E.extensions=We,E.properties=g,E.renderLists=Re,E.shadowMap=_e,E.state=Se,E.info=b}Q(),M!==Ut&&(x=new Rh(M,t.width,t.height,r,s));const W=new mp(E,w);this.xr=W,this.getContext=function(){return w},this.getContextAttributes=function(){return w.getContextAttributes()},this.forceContextLoss=function(){const v=We.get("WEBGL_lose_context");v&&v.loseContext()},this.forceContextRestore=function(){const v=We.get("WEBGL_lose_context");v&&v.restoreContext()},this.getPixelRatio=function(){return Ue},this.setPixelRatio=function(v){v!==void 0&&(Ue=v,this.setSize(me,he,!1))},this.getSize=function(v){return v.set(me,he)},this.setSize=function(v,I,H=!0){if(W.isPresenting){Pe("WebGLRenderer: Can't change size while VR device is presenting.");return}me=v,he=I,t.width=Math.floor(v*Ue),t.height=Math.floor(I*Ue),H===!0&&(t.style.width=v+"px",t.style.height=I+"px"),x!==null&&x.setSize(t.width,t.height),this.setViewport(0,0,v,I)},this.getDrawingBufferSize=function(v){return v.set(me*Ue,he*Ue).floor()},this.setDrawingBufferSize=function(v,I,H){me=v,he=I,Ue=H,t.width=Math.floor(v*H),t.height=Math.floor(I*H),this.setViewport(0,0,v,I)},this.setEffects=function(v){if(M===Ut){console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");return}if(v){for(let I=0;I{function le(){if(N.forEach(function(fe){g.get(fe).currentProgram.isReady()&&N.delete(fe)}),N.size===0){U(v);return}setTimeout(le,10)}We.get("KHR_parallel_shader_compile")!==null?le():setTimeout(le,10)})};let _r=null;function Ho(v){_r&&_r(v)}function ia(){Pn.stop()}function ra(){Pn.start()}const Pn=new Oo;Pn.setAnimationLoop(Ho),typeof self<"u"&&Pn.setContext(self),this.setAnimationLoop=function(v){_r=v,W.setAnimationLoop(v),v===null?Pn.stop():Pn.start()},W.addEventListener("sessionstart",ia),W.addEventListener("sessionend",ra),this.render=function(v,I){if(I!==void 0&&I.isCamera!==!0){He("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(q===!0)return;const H=W.enabled===!0&&W.isPresenting===!0,N=x!==null&&(F===null||H)&&x.begin(E,F);if(v.matrixWorldAutoUpdate===!0&&v.updateMatrixWorld(),I.parent===null&&I.matrixWorldAutoUpdate===!0&&I.updateMatrixWorld(),W.enabled===!0&&W.isPresenting===!0&&(x===null||x.isCompositing()===!1)&&(W.cameraAutoUpdate===!0&&W.updateCamera(I),I=W.getCamera()),v.isScene===!0&&v.onBeforeRender(E,v,I,F),C=J.get(v,D.length),C.init(I),D.push(C),pt.multiplyMatrices(I.projectionMatrix,I.matrixWorldInverse),Le.setFromProjectionMatrix(pt,$t,I.reversedDepth),we=this.localClippingEnabled,Ae=te.init(this.clippingPlanes,we),T=Re.get(v,R.length),T.init(),R.push(T),W.enabled===!0&&W.isPresenting===!0){const fe=E.xr.getDepthSensingMesh();fe!==null&&xr(fe,I,-1/0,E.sortObjects)}xr(v,I,0,E.sortObjects),T.finish(),E.sortObjects===!0&&T.sort(rt,nt),Fe=W.enabled===!1||W.isPresenting===!1||W.hasDepthSensing()===!1,Fe&&ve.addToRenderList(T,v),this.info.render.frame++,Ae===!0&&te.beginShadows();const U=C.state.shadowsArray;if(_e.render(U,v,I),Ae===!0&&te.endShadows(),this.info.autoReset===!0&&this.info.reset(),(N&&x.hasRenderPass())===!1){const fe=T.opaque,ce=T.transmissive;if(C.setupLights(),I.isArrayCamera){const Me=I.cameras;if(ce.length>0)for(let be=0,De=Me.length;be0&&aa(fe,ce,v,I),Fe&&ve.render(v),sa(T,v,I)}F!==null&&z===0&&(L.updateMultisampleRenderTarget(F),L.updateRenderTargetMipmap(F)),N&&x.end(E),v.isScene===!0&&v.onAfterRender(E,v,I),ne.resetDefaultState(),V=-1,k=null,D.pop(),D.length>0?(C=D[D.length-1],Ae===!0&&te.setGlobalState(E.clippingPlanes,C.state.camera)):C=null,R.pop(),R.length>0?T=R[R.length-1]:T=null};function xr(v,I,H,N){if(v.visible===!1)return;if(v.layers.test(I.layers)){if(v.isGroup)H=v.renderOrder;else if(v.isLOD)v.autoUpdate===!0&&v.update(I);else if(v.isLight)C.pushLight(v),v.castShadow&&C.pushShadow(v);else if(v.isSprite){if(!v.frustumCulled||Le.intersectsSprite(v)){N&&Xe.setFromMatrixPosition(v.matrixWorld).applyMatrix4(pt);const fe=ge.update(v),ce=v.material;ce.visible&&T.push(v,fe,ce,H,Xe.z,null)}}else if((v.isMesh||v.isLine||v.isPoints)&&(!v.frustumCulled||Le.intersectsObject(v))){const fe=ge.update(v),ce=v.material;if(N&&(v.boundingSphere!==void 0?(v.boundingSphere===null&&v.computeBoundingSphere(),Xe.copy(v.boundingSphere.center)):(fe.boundingSphere===null&&fe.computeBoundingSphere(),Xe.copy(fe.boundingSphere.center)),Xe.applyMatrix4(v.matrixWorld).applyMatrix4(pt)),Array.isArray(ce)){const Me=fe.groups;for(let be=0,De=Me.length;be0&&Li(U,I,H),le.length>0&&Li(le,I,H),fe.length>0&&Li(fe,I,H),Se.buffers.depth.setTest(!0),Se.buffers.depth.setMask(!0),Se.buffers.color.setMask(!0),Se.setPolygonOffset(!1)}function aa(v,I,H,N){if((H.isScene===!0?H.overrideMaterial:null)!==null)return;if(C.state.transmissionRenderTarget[N.id]===void 0){const Te=We.has("EXT_color_buffer_half_float")||We.has("EXT_color_buffer_float");C.state.transmissionRenderTarget[N.id]=new Zt(1,1,{generateMipmaps:!0,type:Te?pn:Ut,minFilter:Gn,samples:Math.max(4,et.samples),stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Ge.workingColorSpace})}const le=C.state.transmissionRenderTarget[N.id],fe=N.viewport||G;le.setSize(fe.z*E.transmissionResolutionScale,fe.w*E.transmissionResolutionScale);const ce=E.getRenderTarget(),Me=E.getActiveCubeFace(),be=E.getActiveMipmapLevel();E.setRenderTarget(le),E.getClearColor(Z),ue=E.getClearAlpha(),ue<1&&E.setClearColor(16777215,.5),E.clear(),Fe&&ve.render(H);const De=E.toneMapping;E.toneMapping=Kt;const Be=N.viewport;if(N.viewport!==void 0&&(N.viewport=void 0),C.setupLightsView(N),Ae===!0&&te.setGlobalState(E.clippingPlanes,N),Li(v,H,N),L.updateMultisampleRenderTarget(le),L.updateRenderTargetMipmap(le),We.has("WEBGL_multisampled_render_to_texture")===!1){let Te=!1;for(let $e=0,ot=I.length;$e0),Te=!!H.morphAttributes.position,$e=!!H.morphAttributes.normal,ot=!!H.morphAttributes.color;let st=Kt;N.toneMapped&&(F===null||F.isXRRenderTarget===!0)&&(st=E.toneMapping);const Ke=H.morphAttributes.position||H.morphAttributes.normal||H.morphAttributes.color,vt=Ke!==void 0?Ke.length:0,Ee=g.get(N),Rt=C.state.lights;if(Ae===!0&&(we===!0||v!==k)){const mt=v===k&&N.id===V;te.setState(N,v,mt)}let ke=!1;N.version===Ee.__version?(Ee.needsLights&&Ee.lightsStateVersion!==Rt.state.version||Ee.outputColorSpace!==ce||U.isBatchedMesh&&Ee.batching===!1||!U.isBatchedMesh&&Ee.batching===!0||U.isBatchedMesh&&Ee.batchingColor===!0&&U.colorTexture===null||U.isBatchedMesh&&Ee.batchingColor===!1&&U.colorTexture!==null||U.isInstancedMesh&&Ee.instancing===!1||!U.isInstancedMesh&&Ee.instancing===!0||U.isSkinnedMesh&&Ee.skinning===!1||!U.isSkinnedMesh&&Ee.skinning===!0||U.isInstancedMesh&&Ee.instancingColor===!0&&U.instanceColor===null||U.isInstancedMesh&&Ee.instancingColor===!1&&U.instanceColor!==null||U.isInstancedMesh&&Ee.instancingMorph===!0&&U.morphTexture===null||U.isInstancedMesh&&Ee.instancingMorph===!1&&U.morphTexture!==null||Ee.envMap!==be||N.fog===!0&&Ee.fog!==le||Ee.numClippingPlanes!==void 0&&(Ee.numClippingPlanes!==te.numPlanes||Ee.numIntersection!==te.numIntersection)||Ee.vertexAlphas!==De||Ee.vertexTangents!==Be||Ee.morphTargets!==Te||Ee.morphNormals!==$e||Ee.morphColors!==ot||Ee.toneMapping!==st||Ee.morphTargetsCount!==vt)&&(ke=!0):(ke=!0,Ee.__version=N.version);let Nt=Ee.currentProgram;ke===!0&&(Nt=Ii(N,I,U));let Ht=!1,Dn=!1,Wn=!1;const Qe=Nt.getUniforms(),_t=Ee.uniforms;if(Se.useProgram(Nt.program)&&(Ht=!0,Dn=!0,Wn=!0),N.id!==V&&(V=N.id,Dn=!0),Ht||k!==v){Se.buffers.depth.getReversed()&&v.reversedDepth!==!0&&(v._reversedDepth=!0,v.updateProjectionMatrix()),Qe.setValue(w,"projectionMatrix",v.projectionMatrix),Qe.setValue(w,"viewMatrix",v.matrixWorldInverse);const vn=Qe.map.cameraPosition;vn!==void 0&&vn.setValue(w,Ve.setFromMatrixPosition(v.matrixWorld)),et.logarithmicDepthBuffer&&Qe.setValue(w,"logDepthBufFC",2/(Math.log(v.far+1)/Math.LN2)),(N.isMeshPhongMaterial||N.isMeshToonMaterial||N.isMeshLambertMaterial||N.isMeshBasicMaterial||N.isMeshStandardMaterial||N.isShaderMaterial)&&Qe.setValue(w,"isOrthographic",v.isOrthographicCamera===!0),k!==v&&(k=v,Dn=!0,Wn=!0)}if(Ee.needsLights&&(Rt.state.directionalShadowMap.length>0&&Qe.setValue(w,"directionalShadowMap",Rt.state.directionalShadowMap,L),Rt.state.spotShadowMap.length>0&&Qe.setValue(w,"spotShadowMap",Rt.state.spotShadowMap,L),Rt.state.pointShadowMap.length>0&&Qe.setValue(w,"pointShadowMap",Rt.state.pointShadowMap,L)),U.isSkinnedMesh){Qe.setOptional(w,U,"bindMatrix"),Qe.setOptional(w,U,"bindMatrixInverse");const mt=U.skeleton;mt&&(mt.boneTexture===null&&mt.computeBoneTexture(),Qe.setValue(w,"boneTexture",mt.boneTexture,L))}U.isBatchedMesh&&(Qe.setOptional(w,U,"batchingTexture"),Qe.setValue(w,"batchingTexture",U._matricesTexture,L),Qe.setOptional(w,U,"batchingIdTexture"),Qe.setValue(w,"batchingIdTexture",U._indirectTexture,L),Qe.setOptional(w,U,"batchingColorTexture"),U._colorsTexture!==null&&Qe.setValue(w,"batchingColorTexture",U._colorsTexture,L));const xn=H.morphAttributes;if((xn.position!==void 0||xn.normal!==void 0||xn.color!==void 0)&&de.update(U,H,Nt),(Dn||Ee.receiveShadow!==U.receiveShadow)&&(Ee.receiveShadow=U.receiveShadow,Qe.setValue(w,"receiveShadow",U.receiveShadow)),(N.isMeshStandardMaterial||N.isMeshLambertMaterial||N.isMeshPhongMaterial)&&N.envMap===null&&I.environment!==null&&(_t.envMapIntensity.value=I.environmentIntensity),_t.dfgLUT!==void 0&&(_t.dfgLUT.value=Mp()),Dn&&(Qe.setValue(w,"toneMappingExposure",E.toneMappingExposure),Ee.needsLights&&Xo(_t,Wn),le&&N.fog===!0&&ye.refreshFogUniforms(_t,le),ye.refreshMaterialUniforms(_t,N,Ue,he,C.state.transmissionRenderTarget[v.id]),lr.upload(w,la(Ee),_t,L)),N.isShaderMaterial&&N.uniformsNeedUpdate===!0&&(lr.upload(w,la(Ee),_t,L),N.uniformsNeedUpdate=!1),N.isSpriteMaterial&&Qe.setValue(w,"center",U.center),Qe.setValue(w,"modelViewMatrix",U.modelViewMatrix),Qe.setValue(w,"normalMatrix",U.normalMatrix),Qe.setValue(w,"modelMatrix",U.matrixWorld),N.isShaderMaterial||N.isRawShaderMaterial){const mt=N.uniformsGroups;for(let vn=0,Xn=mt.length;vn0&&L.useMultisampledRTT(v)===!1?N=g.get(v).__webglMultisampledFramebuffer:Array.isArray(be)?N=be[H]:N=be,G.copy(v.viewport),O.copy(v.scissor),ee=v.scissorTest}else G.copy($).multiplyScalar(Ue).floor(),O.copy(ie).multiplyScalar(Ue).floor(),ee=ae;if(H!==0&&(N=Yo),Se.bindFramebuffer(w.FRAMEBUFFER,N)&&Se.drawBuffers(v,N),Se.viewport(G),Se.scissor(O),Se.setScissorTest(ee),U){const ce=g.get(v.texture);w.framebufferTexture2D(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,w.TEXTURE_CUBE_MAP_POSITIVE_X+I,ce.__webglTexture,H)}else if(le){const ce=I;for(let Me=0;Me1&&w.readBuffer(w.COLOR_ATTACHMENT0+ce),!et.textureFormatReadable(De)){He("WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!et.textureTypeReadable(Be)){He("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}I>=0&&I<=v.width-N&&H>=0&&H<=v.height-U&&w.readPixels(I,H,N,U,se.convert(De),se.convert(Be),le)}finally{const be=F!==null?g.get(F).__webglFramebuffer:null;Se.bindFramebuffer(w.FRAMEBUFFER,be)}}},this.readRenderTargetPixelsAsync=async function(v,I,H,N,U,le,fe,ce=0){if(!(v&&v.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Me=g.get(v).__webglFramebuffer;if(v.isWebGLCubeRenderTarget&&fe!==void 0&&(Me=Me[fe]),Me)if(I>=0&&I<=v.width-N&&H>=0&&H<=v.height-U){Se.bindFramebuffer(w.FRAMEBUFFER,Me);const be=v.textures[ce],De=be.format,Be=be.type;if(v.textures.length>1&&w.readBuffer(w.COLOR_ATTACHMENT0+ce),!et.textureFormatReadable(De))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!et.textureTypeReadable(Be))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const Te=w.createBuffer();w.bindBuffer(w.PIXEL_PACK_BUFFER,Te),w.bufferData(w.PIXEL_PACK_BUFFER,le.byteLength,w.STREAM_READ),w.readPixels(I,H,N,U,se.convert(De),se.convert(Be),0);const $e=F!==null?g.get(F).__webglFramebuffer:null;Se.bindFramebuffer(w.FRAMEBUFFER,$e);const ot=w.fenceSync(w.SYNC_GPU_COMMANDS_COMPLETE,0);return w.flush(),await Wl(w,ot,4),w.bindBuffer(w.PIXEL_PACK_BUFFER,Te),w.getBufferSubData(w.PIXEL_PACK_BUFFER,0,le),w.deleteBuffer(Te),w.deleteSync(ot),le}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(v,I=null,H=0){const N=Math.pow(2,-H),U=Math.floor(v.image.width*N),le=Math.floor(v.image.height*N),fe=I!==null?I.x:0,ce=I!==null?I.y:0;L.setTexture2D(v,0),w.copyTexSubImage2D(w.TEXTURE_2D,H,0,0,fe,ce,U,le),Se.unbindTexture()};const jo=w.createFramebuffer(),$o=w.createFramebuffer();this.copyTextureToTexture=function(v,I,H=null,N=null,U=0,le=0){let fe,ce,Me,be,De,Be,Te,$e,ot;const st=v.isCompressedTexture?v.mipmaps[le]:v.image;if(H!==null)fe=H.max.x-H.min.x,ce=H.max.y-H.min.y,Me=H.isBox3?H.max.z-H.min.z:1,be=H.min.x,De=H.min.y,Be=H.isBox3?H.min.z:0;else{const _t=Math.pow(2,-U);fe=Math.floor(st.width*_t),ce=Math.floor(st.height*_t),v.isDataArrayTexture?Me=st.depth:v.isData3DTexture?Me=Math.floor(st.depth*_t):Me=1,be=0,De=0,Be=0}N!==null?(Te=N.x,$e=N.y,ot=N.z):(Te=0,$e=0,ot=0);const Ke=se.convert(I.format),vt=se.convert(I.type);let Ee;I.isData3DTexture?(L.setTexture3D(I,0),Ee=w.TEXTURE_3D):I.isDataArrayTexture||I.isCompressedArrayTexture?(L.setTexture2DArray(I,0),Ee=w.TEXTURE_2D_ARRAY):(L.setTexture2D(I,0),Ee=w.TEXTURE_2D),w.pixelStorei(w.UNPACK_FLIP_Y_WEBGL,I.flipY),w.pixelStorei(w.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),w.pixelStorei(w.UNPACK_ALIGNMENT,I.unpackAlignment);const Rt=w.getParameter(w.UNPACK_ROW_LENGTH),ke=w.getParameter(w.UNPACK_IMAGE_HEIGHT),Nt=w.getParameter(w.UNPACK_SKIP_PIXELS),Ht=w.getParameter(w.UNPACK_SKIP_ROWS),Dn=w.getParameter(w.UNPACK_SKIP_IMAGES);w.pixelStorei(w.UNPACK_ROW_LENGTH,st.width),w.pixelStorei(w.UNPACK_IMAGE_HEIGHT,st.height),w.pixelStorei(w.UNPACK_SKIP_PIXELS,be),w.pixelStorei(w.UNPACK_SKIP_ROWS,De),w.pixelStorei(w.UNPACK_SKIP_IMAGES,Be);const Wn=v.isDataArrayTexture||v.isData3DTexture,Qe=I.isDataArrayTexture||I.isData3DTexture;if(v.isDepthTexture){const _t=g.get(v),xn=g.get(I),mt=g.get(_t.__renderTarget),vn=g.get(xn.__renderTarget);Se.bindFramebuffer(w.READ_FRAMEBUFFER,mt.__webglFramebuffer),Se.bindFramebuffer(w.DRAW_FRAMEBUFFER,vn.__webglFramebuffer);for(let Xn=0;Xn{const t=i.current;if(!t)return;const n=new ta;n.position.z=1;const r=new ac,s=new Di(2,2),a={time:{value:1},resolution:{value:new je}},o=new kt({uniforms:a,vertexShader:Ep,fragmentShader:bp}),c=new en(s,o);r.add(c);const l=new Sp({antialias:!0,alpha:!0});l.setClearColor(0,0),l.setPixelRatio(Math.min(window.devicePixelRatio,1.5)),t.appendChild(l.domElement);const h=()=>{const p=t.clientWidth,_=t.clientHeight;l.setSize(p,_),a.resolution.value.x=l.domElement.width,a.resolution.value.y=l.domElement.height};h(),window.addEventListener("resize",h,!1),e.current={camera:n,scene:r,renderer:l,uniforms:a,animationId:0};let m=0;const u=p=>{const _=requestAnimationFrame(u),M=m===0?0:(p-m)/1e3;m=p,a.time.value+=M*3,l.render(r,n),e.current&&(e.current.animationId=_)};return u(0),()=>{window.removeEventListener("resize",h),e.current&&(cancelAnimationFrame(e.current.animationId),e.current.renderer.domElement.parentElement===t&&t.removeChild(e.current.renderer.domElement),e.current.renderer.dispose(),s.dispose(),o.dispose(),e.current=null)}},[]),j.jsx("div",{ref:i,"aria-hidden":"true",style:{position:"absolute",inset:0,width:"100%",height:"100%",overflow:"hidden",pointerEvents:"none"}})}const ao=[{kind:"link",label:"Home",to:"/"},{kind:"link",label:"About",to:"/about"},{kind:"link",label:"Pricing",to:"/pricing"},{kind:"dropdown",label:"Resources",children:[{kind:"link",label:"Documentation",to:"/docs"},{kind:"link",label:"Help Center",to:"/help"},{kind:"link",label:"Affiliate Program",to:"/affiliate-program"},{kind:"link",label:"Affiliate Resources",to:"/affiliate-resources"},{kind:"link",label:"Changelog",to:"/changelog"},{kind:"link",label:"Contact",to:"/support#support-request"}]}];function Cp({children:i,showFooter:e=!0}){const t=Ko(),{isAuthenticated:n,colorMode:r,toggleColorMode:s,logout:a}=Zo(),[o,c]=Yt.useState(!1),[l,h]=Yt.useState(!1),m=Yt.useRef(null),u=r==="dark",p=t.pathname==="/",_=u?`${p?"bg-transparent":"bg-[#181A1E]"} text-[#FFFFFF]`:`${p?"bg-transparent":"bg-[#F4F6F8]"} text-[#181A1E]`,M=u?"text-[#8A9099]":"text-[#262B33]/70",f=u?"border-white/15":"border-[#262B33]/20",d=u?`bg-white/5 ${f} backdrop-blur-2xl`:`bg-white/70 ${f} backdrop-blur-2xl`,S=u?"drop-shadow-[0_0_24px_rgba(216,203,175,0.25)]":"",y=p?"h-[13rem] md:h-[14rem] lg:h-[15rem]":"h-[104px] lg:h-[120px]",T=p?`mx-auto flex w-full max-w-7xl items-center gap-3 pl-0 pr-4 md:gap-4 md:pr-5 lg:gap-6 lg:pr-8 xl:gap-8 ${y}`:`mx-auto flex w-full max-w-7xl items-center justify-between px-5 lg:px-8 ${y}`,C=p?`block h-[9.9rem] w-auto max-w-[14.9rem] shrink-0 object-contain md:h-[10.9rem] md:max-w-[16.4rem] lg:h-[12rem] lg:max-w-[18rem] ${S}`:`block h-[4.95rem] w-auto max-w-[7.45rem] shrink-0 object-contain md:h-[5.45rem] md:max-w-[8.2rem] lg:h-[6rem] lg:max-w-[9rem] ${S}`,R=p?"hidden min-w-0 flex-col lg:flex lg:max-w-[23rem]":"hidden min-w-0 flex-col lg:flex",D=p?"flex min-w-0 items-center justify-self-start lg:-ml-5 xl:-ml-7":"flex min-w-0 items-center gap-4",x=p?"flex min-w-0 items-center gap-3 md:gap-4 lg:gap-5 xl:gap-6":"",E=Yt.useMemo(()=>t.pathname==="/about"?"/about":t.pathname==="/docs"?"/docs":t.pathname==="/help"?"/help":t.pathname==="/affiliate-program"?"/affiliate-program":t.pathname==="/support"?"/support":t.pathname==="/changelog"?"/changelog":t.pathname==="/pricing"?"/pricing":"/",[t.pathname]),q=j.jsxs("div",{className:R,children:[j.jsxs("div",{className:"inline-flex w-fit max-w-full flex-col items-start",children:[j.jsx("span",{className:`truncate font-semibold tracking-tight ${p?"text-[1.4rem] xl:text-[1.55rem] 2xl:text-[1.7rem]":"text-[1.65rem] md:text-[2rem] lg:text-[2.15rem]"}`,style:{fontFamily:"var(--font-display)"},children:It.brandName}),j.jsx("span",{className:`mt-1 h-[2px] rounded-full bg-gradient-to-r from-[#A6926E] via-[#D8CBAF] to-[#A6926E] shadow-[0_0_12px_rgba(216,203,175,0.35)] ${p?"min-w-[6.5rem] w-[66%] max-w-[7.8rem]":"min-w-[7rem] w-[72%] max-w-[9.4rem]"}`})]}),j.jsx("span",{className:`${p?"text-[9px] uppercase tracking-[0.16em] leading-[1.45] xl:text-[10px] xl:tracking-[0.18em]":"truncate text-[10px] uppercase tracking-[0.18em] xl:text-[11px] xl:tracking-[0.22em]"} ${M}`,children:"AI-Native Research & Scientific Publication Suite"})]});return j.jsxs("div",{className:`relative isolate min-h-screen overflow-hidden ${_}`,"data-color-mode":u?"dark":"light",children:[j.jsxs("div",{className:`fixed inset-0 z-0 pointer-events-none ${p?"bg-[#090A0D]":"bg-black/40"}`,children:[j.jsx("div",{className:`absolute inset-0 ${p?"opacity-[0.94]":"opacity-55"}`,style:p?{filter:"saturate(1.28) contrast(1.08) brightness(1.06)"}:void 0,children:j.jsx(Tp,{})}),p&&j.jsxs(j.Fragment,{children:[j.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_50%_8%,rgba(216,203,175,0.14),transparent_22%),radial-gradient(circle_at_82%_18%,rgba(121,144,255,0.14),transparent_24%)]"}),j.jsx("div",{className:"absolute inset-0 bg-[linear-gradient(180deg,rgba(9,10,13,0.04)_0%,rgba(9,10,13,0.3)_42%,rgba(9,10,13,0.72)_100%)]"})]})]}),j.jsxs("div",{className:"pointer-events-none absolute inset-0 z-0",children:[j.jsx("div",{className:"absolute -top-40 -right-32 h-[28rem] w-[28rem] rounded-full bg-[radial-gradient(circle,rgba(121,144,255,0.2),transparent_62%)]"}),j.jsx("div",{className:"absolute top-[35%] -left-44 h-[32rem] w-[32rem] rounded-full bg-[radial-gradient(circle,rgba(191,174,140,0.18),transparent_62%)]"})]}),j.jsx("header",{className:`sticky top-0 z-50 border-b backdrop-blur-2xl ${u?"border-white/10 bg-black/20":"border-[#262B33]/15 bg-white/80"}`,children:j.jsxs("div",{className:T,children:[p?j.jsxs("div",{className:x,children:[j.jsx(it,{to:"/",className:D,children:j.jsx("img",{src:"/branding/ScriptoriumAI_logo.png",alt:`${It.brandName} logo`,className:C})}),j.jsx(it,{to:"/",className:"hidden min-w-0 lg:flex",children:q})]}):j.jsxs(it,{to:"/",className:D,children:[j.jsx("img",{src:"/branding/ScriptoriumAI_logo.png",alt:`${It.brandName} logo`,className:C}),q]}),j.jsx("nav",{className:`hidden items-center ${p?"ml-auto lg:flex":"flex-1 justify-center lg:flex"}`,children:j.jsx("div",{className:`flex items-center gap-2 rounded-full border px-3 py-2 ${d}`,children:ao.map(A=>{if(A.kind==="dropdown"){const F=A.children.some(V=>E===V.to);return j.jsxs("div",{className:"relative",ref:m,children:[j.jsxs("button",{type:"button",onClick:()=>h(V=>!V),onBlur:V=>{var k;(k=m.current)!=null&&k.contains(V.relatedTarget)||h(!1)},className:`public-nav-link flex items-center gap-1 ${F?"public-nav-link-active":`${M} hover:bg-white/10 hover:text-current`}`,children:[A.label,j.jsx(el,{size:12,className:`transition-transform ${l?"rotate-180":""}`})]}),l&&j.jsx("div",{className:`absolute left-0 top-full mt-2 min-w-[160px] rounded-2xl border p-1 shadow-xl z-50 ${u?"bg-[#1E2025] border-white/15":"bg-white border-[#262B33]/15"}`,children:A.children.map(V=>j.jsx(it,{to:V.to,onClick:()=>h(!1),className:`block rounded-xl px-3 py-2 text-sm transition-colors ${E===V.to?"bg-[#D8CBAF]/20 text-[#D8CBAF]":`${M} hover:bg-white/10 hover:text-current`}`,children:V.label},V.to))})]},A.label)}const z=E===A.to;return j.jsx(it,{to:A.to,className:`public-nav-link ${z?"public-nav-link-active":`${M} hover:bg-white/10 hover:text-current`}`,children:A.label},A.to)})})}),j.jsxs("div",{className:"relative z-10 flex items-center gap-2",children:[n?j.jsxs(j.Fragment,{children:[j.jsxs(it,{to:"/app",className:`hidden sm:inline-flex items-center gap-2 rounded-full border px-4 py-2 text-sm transition-colors ${d}`,children:["Dashboard",j.jsx(ll,{size:14})]}),j.jsx("button",{type:"button",onClick:a,className:`rounded-full border px-4 py-2 text-sm transition-colors ${d}`,children:"Logout"})]}):j.jsxs(j.Fragment,{children:[j.jsx(it,{to:"/login",className:`rounded-full border px-4 py-2 text-sm transition-colors ${d}`,children:"Sign In"}),j.jsx(it,{to:"/register",className:`hidden sm:inline-flex rounded-full border px-4 py-2 text-sm font-medium transition-colors ${u?"border-[#D8CBAF]/50 bg-[#D8CBAF]/15 text-[#D8CBAF] hover:bg-[#D8CBAF]/25":"border-[#7A6A50] bg-[#7A6A50] text-white hover:bg-[#6A5A42]"}`,children:"Sign Up"})]}),j.jsx("button",{type:"button",onClick:s,"aria-label":u?"Switch to light mode":"Switch to dark mode",className:`h-10 w-10 rounded-full border grid place-items-center transition-colors ${d}`,title:u?"Switch to light mode":"Switch to dark mode",children:u?j.jsx(sl,{size:16}):j.jsx(rl,{size:16})}),j.jsx("button",{type:"button",onClick:()=>c(A=>!A),"aria-label":"Toggle navigation menu",className:`relative z-10 lg:hidden h-10 w-10 rounded-full border grid place-items-center transition-colors ${d}`,children:j.jsx(il,{size:16})})]})]})}),o&&j.jsx("div",{className:`sticky top-0 z-40 border-b ${f} ${u?"bg-[#181A1E]":"bg-[#F4F6F8]"} lg:hidden`,children:j.jsx("nav",{className:"mx-auto max-w-7xl px-5 pb-4 pt-2",children:j.jsxs("div",{className:"flex flex-col gap-1",children:[ao.flatMap(A=>{if(A.kind==="dropdown")return[j.jsx("p",{className:`px-4 py-1 text-xs uppercase tracking-widest ${M}`,children:A.label},`${A.label}-header`),...A.children.map(F=>j.jsx(it,{to:F.to,onClick:()=>c(!1),className:`rounded-xl px-4 py-2.5 text-sm transition-colors pl-6 ${E===F.to?"bg-[#D8CBAF]/20 text-[#D8CBAF]":`${M} hover:bg-white/10`}`,children:F.label},F.to))];const z=E===A.to;return j.jsx(it,{to:A.to,onClick:()=>c(!1),className:`rounded-xl px-4 py-2.5 text-sm transition-colors ${z?"bg-[#D8CBAF]/20 text-[#D8CBAF]":`${M} hover:bg-white/10`}`,children:A.label},A.to)}),!n&&j.jsx(it,{to:"/register",onClick:()=>c(!1),className:"mt-2 rounded-xl border border-[#D8CBAF]/50 bg-[#D8CBAF]/15 px-4 py-2.5 text-sm font-medium text-[#D8CBAF] text-center",children:"Sign Up"})]})})}),j.jsx("main",{className:"relative z-10",children:i}),e&&j.jsxs("footer",{className:`relative z-10 mt-20 border-t ${f}`,children:[j.jsxs("div",{className:"mx-auto grid max-w-7xl gap-10 px-6 py-12 md:grid-cols-4 lg:px-8",children:[j.jsxs("div",{className:"space-y-3",children:[j.jsx("p",{className:"text-xl font-semibold tracking-tight",style:{fontFamily:"var(--font-display)"},children:It.brandName}),j.jsxs("p",{className:`text-sm leading-relaxed ${M}`,children:[It.tagline,". The only platform combining native LaTeX compile orchestration, real MuPDF rendering, bidirectional SyncTeX, cross-document comparison, and structured AI Memory in one unified architecture."]}),j.jsxs("div",{className:"flex items-center gap-3 pt-2",children:[j.jsx("a",{href:"https://x.com/scriptoriumai",target:"_blank",rel:"noopener noreferrer",className:M,"aria-label":"X / Twitter",children:j.jsx(al,{size:16})}),j.jsx("a",{href:"https://linkedin.com/company/scriptoriumai",target:"_blank",rel:"noopener noreferrer",className:M,"aria-label":"LinkedIn",children:j.jsx(nl,{size:16})}),j.jsx("a",{href:"https://youtube.com/@scriptoriumai",target:"_blank",rel:"noopener noreferrer",className:M,"aria-label":"YouTube",children:j.jsx(ol,{size:16})}),j.jsx("a",{href:"https://reddit.com/r/scriptoriumai",target:"_blank",rel:"noopener noreferrer",className:M,"aria-label":"Reddit",children:j.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:j.jsx("path",{d:"M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"})})}),j.jsx("a",{href:"https://instagram.com/scriptoriumai",target:"_blank",rel:"noopener noreferrer",className:M,"aria-label":"Instagram",children:j.jsx(tl,{size:16})}),j.jsx("a",{href:"https://tiktok.com/@scriptoriumai",target:"_blank",rel:"noopener noreferrer",className:M,"aria-label":"TikTok",children:j.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:j.jsx("path",{d:"M19.59 6.69a4.83 4.83 0 0 1-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 0 1-2.88 2.5 2.89 2.89 0 0 1-2.89-2.89 2.89 2.89 0 0 1 2.89-2.89c.28 0 .54.04.79.1V9.01a6.33 6.33 0 0 0-.79-.05 6.34 6.34 0 0 0-6.34 6.34 6.34 6.34 0 0 0 6.34 6.34 6.34 6.34 0 0 0 6.33-6.34V8.69a8.18 8.18 0 0 0 4.78 1.52V6.76a4.85 4.85 0 0 1-1.01-.07z"})})})]})]}),j.jsxs("div",{children:[j.jsx("p",{className:"public-shell-kicker",children:"Product"}),j.jsxs("div",{className:`mt-3 space-y-2 text-sm ${M}`,children:[j.jsx(it,{to:"/",children:"Home"}),j.jsx("div",{children:j.jsx(it,{to:"/pricing",children:"Pricing"})}),j.jsx("div",{children:j.jsx(it,{to:"/docs",children:"Docs"})}),j.jsx("div",{children:j.jsx(it,{to:"/affiliate-program",children:"Affiliate Program"})}),j.jsx("div",{children:j.jsx(it,{to:"/changelog",children:"Changelog"})})]})]}),j.jsxs("div",{children:[j.jsx("p",{className:"public-shell-kicker",children:"Support"}),j.jsxs("div",{className:`mt-3 space-y-2 text-sm ${M}`,children:[j.jsx(it,{to:"/support",children:"Support Hub"}),j.jsx("div",{children:j.jsx(it,{to:"/help",children:"Help Center"})}),j.jsx("div",{children:j.jsx(it,{to:"/support#support-request",children:"Submit a Request"})}),j.jsx("div",{children:j.jsx(it,{to:"/support#feedback",children:"Product Feedback"})})]})]}),j.jsxs("div",{children:[j.jsx("p",{className:"public-shell-kicker",children:"Legal"}),j.jsxs("div",{className:`mt-3 space-y-2 text-sm ${M}`,children:[j.jsx(it,{to:"/terms",children:"Terms"}),j.jsx("div",{children:j.jsx(it,{to:"/privacy",children:"Privacy"})}),j.jsx("div",{children:j.jsx(it,{to:"/impressum",children:"Impressum"})}),j.jsx("div",{children:j.jsx(it,{to:"/withdrawal",children:"Withdrawal"})}),j.jsx("div",{children:j.jsx(it,{to:"/shipping-payment",children:"Shipping & Payment"})})]})]})]}),j.jsx("div",{className:`mx-auto max-w-7xl px-6 pb-10 text-xs ${M}`,children:`© ${new Date().getFullYear()} ${It.legalName}. All rights reserved.`})]})]})}export{el as C,Ap as I,Cp as M,al as X,ll as a,It as b,Cn as c,Rp as d,wp as e}; diff --git a/dist/assets/PolicyArticle-s4Nnon3-.js b/dist/assets/PolicyArticle-s4Nnon3-.js deleted file mode 100644 index 22a14b07..00000000 --- a/dist/assets/PolicyArticle-s4Nnon3-.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./index-D-wwVRoV.js";function c({heading:i,subheading:x,sections:d,footer:a}){return e.jsxs("article",{className:"rounded-2xl border border-white/15 bg-white/5 p-6 backdrop-blur-2xl md:p-8",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:i}),e.jsx("div",{className:"mt-2 text-sm text-[#8A9099]",children:x}),e.jsx("div",{className:"mt-5 space-y-6 text-sm text-[#8A9099]",children:d.map(l=>{var r;return e.jsxs("section",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium text-[#F4F6F8]",children:l.title}),(r=l.paragraphs)==null?void 0:r.map((t,s)=>e.jsx("p",{children:t},`${l.title}-paragraph-${s}`)),l.bullets&&l.bullets.length>0?e.jsx("ul",{className:"list-disc space-y-1 pl-5",children:l.bullets.map((t,s)=>e.jsx("li",{children:t},`${l.title}-bullet-${s}`))}):null]},l.title)})}),a?e.jsx("div",{className:"mt-6 border-t border-white/10 pt-4 text-sm text-[#8A9099]",children:a}):null]})}export{c as P}; diff --git a/dist/assets/PricingPage-CSaw9bYM.js b/dist/assets/PricingPage-CSaw9bYM.js deleted file mode 100644 index 77349c75..00000000 --- a/dist/assets/PricingPage-CSaw9bYM.js +++ /dev/null @@ -1,6 +0,0 @@ -import{r as h,j as e,L as w}from"./index-D-wwVRoV.js";import{c as D,M as P,C as I}from"./MarketingShell-BgYQ8Cfp.js";import{P as x}from"./PublicPrimaryButton-FdcHLbCt.js";import{n as f}from"./notifications-BfjEGrJX.js";import{A as y}from"./arrow-right-lAzDeT03.js";import{U as N}from"./users-B0OVFCFN.js";import{G as A}from"./graduation-cap-BmClC3T4.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k=D("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),B=[2,3,4,5,10,20,30,40,"50+"];function r(a,s=0){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:s,maximumFractionDigits:s}).format(a)}function g(a){return a/12}function C(a,s){return a==="50+"?.3:s?.4:0}function G(a,s,i){const p=C(a,i),n=Math.round(22*(1-p)),o=Math.round(199*(1-p)),d=a==="50+"?50:Number(a);return s==="annual"?{per:g(o),total:`${r(g(o*d),2)}+`,annualPerSeat:o,annualTotal:`${r(o*d)}+`}:{per:n,total:`${r(n*d)}+`,annualPerSeat:null,annualTotal:null}}const S=[{name:"Free",monthly:0,annual:0,description:"Write and compile LaTeX instantly with artifact-backed preview and no credit card required.",features:["Native LaTeX compile orchestration","Real MuPDF PDF rendering","Bidirectional SyncTeX navigation","Artifact-backed preview-first compile flow","Desktop + web workspace parity","Up to 2 active projects","1 GB document storage","1-second compile timeout","Community support"],popular:!1,cta:"Start Free",badge:null,isFree:!0},{name:"Student",monthly:10,annual:89,description:"Full scholar-level power at a discounted price. Requires academic email verification.",features:["Everything in Free","Unlimited compile time","Git-native local history","AI Memory, Citation Intelligence, and Memory Domain Intelligence","Operator workbench layouts, working-set tabs, and routed handoffs","Scientific runtime (uv/venv)","Cross-document comparison + PDF visual diff","Operator Runboard + workspace visualization","Autonomous Research Agent + Skills Manager","Studio surfaces including Manim Visuals Studio","Up to 5 active projects","5 GB document storage","Email support"],popular:!1,cta:"Verify Academic Email",badge:"Student Verified",isStudent:!0},{name:"Scholar",monthly:15,annual:149,description:"For solo researchers and independent authors who need the full stack.",features:["Everything in Student","Unlimited active projects","20 GB document storage","Up to 3 project collaborators","Real-time collaboration (presence + follow-mode)","Reference sync + retention-aware Paper2All export","Provider-neutral OpenAPI routing + BYOK bridge","Managed Qwen route + expanded model fallback policy","AI Chat panel with model selector","PDF Intake QA pipeline","Priority email support"],popular:!0,cta:"Get Started",badge:"Most Popular"},{name:"Groups",monthly:22,annual:199,description:"For research groups, teaching teams, and technical organizations.",features:["Everything in Scholar, per seat","Pooled 500 GB shared storage","Unlimited collaborators per project","Real-time presence + follow-mode","Group admin panel & seat management","Centralized billing + shared workspace controls","Shared operator workbench + artifact-backed review flows","All studio surfaces (Whiteboard, MindMap, Video, AI Diagram)","14-day free trial · credit card required, no charge","Priority support"],popular:!0,cta:"Start Free Trial",badge:"Most Popular",isGroup:!0},{name:"Enterprise",monthly:0,annual:0,description:"For labs, publishers, and regulated environments needing custom controls.",features:["Everything in Groups","SSO + SCIM provisioning","Source-grounded AI memory with PII redaction","Custom deployment · self-host or air-gapped","Corpus governance seal + enterprise policy controls","Private endpoint routing + provider policy governance","Artifact-retention overlays for governed publication flows","Dedicated support & onboarding"],popular:!1,cta:"Contact Sales",badge:null,isEnterprise:!0}],T=[{feature:"Native LaTeX compile orchestration",free:"✓",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Real MuPDF rendering",free:"✓",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Bidirectional SyncTeX",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Desktop + web parity",free:"✓",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Compile timeout",free:"1 s",student:"Unlimited",scholar:"Unlimited",group:"Unlimited",enterprise:"Unlimited"},{feature:"Active projects",free:"2",student:"5",scholar:"Unlimited",group:"Unlimited",enterprise:"Unlimited"},{feature:"Storage",free:"1 GB",student:"5 GB",scholar:"20 GB",group:"500 GB pooled",enterprise:"Custom"},{feature:"Collaborators per project",free:"1",student:"3",scholar:"3",group:"Unlimited",enterprise:"Unlimited"},{feature:"Project history (Git-native)",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Artifact-backed compile manifests",free:"✓",student:"✓",scholar:"✓",group:"✓",enterprise:"✓ + policy overlays"},{feature:"Reference sync (Zotero)",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Paper2All export",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"AI Memory & reasoning checkpoints",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Citation Intelligence",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Memory Domain Intelligence",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓ + policy overlays"},{feature:"Scientific runtime (uv/venv)",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Cross-document comparison",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓ + custom policy"},{feature:"PDF visual diff",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Operator Runboard",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Operator workbench layouts & handoff continuity",free:"✓",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Workspace visualization system",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Real-time collaboration (presence)",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Autonomous Research Agent",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Skills Manager",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Provider-neutral routing + provider controls",free:"—",student:"✓",scholar:"✓ + BYOK",group:"✓ + BYOK",enterprise:"✓ + private routing"},{feature:"Manim Visuals Studio",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Managed Qwen route",free:"—",student:"—",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"AI Chat panel + model selector",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"PDF Intake QA pipeline",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Studio surfaces (Whiteboard, MindMap, Video, AI Diagram)",free:"—",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Tutorial Mode",free:"✓",student:"✓",scholar:"✓",group:"✓",enterprise:"✓"},{feature:"Group admin panel",free:"—",student:"—",scholar:"—",group:"✓",enterprise:"✓"},{feature:"SSO / SCIM",free:"—",student:"—",scholar:"—",group:"—",enterprise:"✓"},{feature:"Source-grounded AI memory",free:"—",student:"—",scholar:"—",group:"—",enterprise:"✓"},{feature:"Corpus governance seal",free:"—",student:"—",scholar:"—",group:"—",enterprise:"✓"},{feature:"Proprietary LLM routing",free:"—",student:"—",scholar:"—",group:"—",enterprise:"✓"},{feature:"Support",free:"Community",student:"Email",scholar:"Priority email",group:"Priority email",enterprise:"Dedicated channel"}],M=[{question:"What happens to existing early beta users now that pricing is live?",answer:`All existing users are granted 30 additional days of completely free, unlimited access without a credit card. During this "sunset" window you can lock in a lifetime 50% Founder's Discount on any paid plan. If you choose not to upgrade, your account gracefully shifts to the Free plan.`},{question:"How does Student verification work?",answer:"Sign up with a valid .edu or recognised academic institutional email address. ScriptoriumAI now supports sending a time-limited confirmation link to that academic inbox when delivery is configured, and development-style deployments can still fall back to the in-browser confirmation step. The Student plan activates once the confirmation succeeds. Academic re-verification and grace-period automation remain future follow-through items."},{question:"What is the Groups educational discount?",answer:'Check "Apply educational discount" on the Groups checkout to receive 40% off per seat for departments, classrooms, or research groups using ScriptoriumAI for teaching or institutional research. Groups of 50 or more seats receive an additional 30% volume discount. Both discounts stack with annual billing.'},{question:"Does Groups include a free trial?",answer:"Yes. Groups plans include a 14-day free trial. A valid credit card is required to start — a temporary authorisation hold may appear but no charge occurs until day 15. This deters disposable-account abuse while keeping the barrier low for genuine teams. Cancel any time before day 15 and nothing is charged. All seats and features are fully active during the trial."},{question:"Why is Groups priced higher than Scholar per seat?",answer:"Groups provides everything in Scholar plus pooled 500 GB shared storage, group admin and seat management, unlimited collaborators per project, real-time presence and follow-mode, and centralized workspace controls shared across your team. The additional infrastructure cost is reflected in the per-seat price."},{question:"What does annual billing save me?",answer:"Annual plans save approximately 20% compared to monthly billing. Student: $89/yr = $7.42/mo billed annually. Scholar: $149/yr = $12.42/mo billed annually. Groups: $199/seat/yr = $16.58/seat/mo billed annually. Additional discounts (educational 40%, 50+ seats 30%) apply on top of annual billing."},{question:'What does "Bring your own LLM key" mean?',answer:"Student and above can use the routed AI surfaces, but Scholar and Groups plans unlock Bring Your Own Key for OpenAI, Anthropic, Google, Qwen, or another compatible managed endpoint. The routing model stays provider-neutral: your selected provider, model, and endpoint remain operator-visible in OpenAPI Routing rather than being collapsed into one vendor-specific path. Your key is used directly with a bounded request bridge — no markup."},{question:"What does provider-neutral routing mean in practice?",answer:"ScriptoriumAI does not treat one model vendor as the default worldview for the product. OpenAPI Routing exposes provider, model, tier, base URL, and vault status as first-party controls. That means you can stay on hosted defaults, move to BYOK, or apply governed Qwen and private-endpoint routing without changing the rest of the workspace contract."},{question:"How are compile artifacts, exports, and caches treated?",answer:"Generated does not automatically mean disposable. Compile bundles, SyncTeX-backed outputs, Paper2All exports, and saved visualization artifacts are treated as meaningful workflow outputs when they are still referenced by the project. Rebuildable cache directories and temporary job residue are the parts intended for invalidation or cleanup. That distinction matters for both storage policy and publish-readiness workflows."},{question:"How does Qwen 3.6 Plus access work?",answer:"Qwen 3.6 Plus is exposed as a managed DashScope-backed route for Scholar+ plans at no additional cost beyond your plan. It stays inside the same provider-neutral routing contract as the other hosted providers, and Scholar+ users can optionally attach their own Qwen API key through BYOK to use their own quota. Local-model activation is intentionally not part of the current live product contract."},{question:"What is Tutorial Mode?",answer:"Tutorial Mode is a workspace-level toggle available from your account menu (accessible via the avatar icon in the top-right corner). When enabled, contextual help flags appear across the menu bar, account menu, editor chrome, formatting-toolbar groups, and right-side workspace controls. Each flag explains what the control does and when to use it. Tutorial Mode is designed for onboarding and low-friction orientation, and it has zero runtime overhead when disabled."},{question:'What is "source-grounded AI memory"?',answer:"Source-grounded AI memory is an Enterprise-tier capability where every AI-generated insight — summaries, cross-document inferences, synthesis run results — is traced back to a specific corpus event: which document section triggered it, which governance seal version was active, and which citation ledger entry corroborates it. Rather than a floating AI suggestion, each memory entry carries a provenance chain (document ID, section pointer, corpus seal hash) so teams can audit, reproduce, or dispute any AI conclusion. PII redaction runs over the provenance chain before storage, ensuring institutional data hygiene requirements are met."},{question:"Is the Free tier actually free forever?",answer:"Yes. The Free tier has no time limit — you can compile LaTeX, render PDF, and maintain 2 projects indefinitely. The 1-second compile cap keeps infrastructure costs sustainable while covering the vast majority of single-file and short document use cases."},{question:"What happens if a payment fails?",answer:"Scholar and Student plans receive a 4-day grace period before downgrading to Free. Groups and Enterprise receive a 7-day grace period before the workspace enters read-only mode. No data is ever deleted during a grace period."},{question:"Can my institution pay via PO or invoice (Net-30)?",answer:"Yes. For Groups and Enterprise plans, we process B2B transactions through Paddle and support Net-30 payment terms, corporate wire transfers (ACH/SEPA/SWIFT), and major corporate credit cards."},{question:"Is checkout live?",answer:"The pricing surface is production-shaped and Paddle is wired as the payment provider. Checkout activation completes once live credentials are issued — no charges occur until then."}];function L(){const[a,s]=h.useState("annual"),[i,v]=h.useState(2),[u,p]=h.useState(!1),[n,o]=h.useState("individual"),d=t=>{if(t==="Enterprise"){f.info("Contact us at inquiries@scriptoriumai.io to discuss Enterprise.");return}if(t==="Free"){f.info("Free tier registration opens shortly. We'll notify you at launch.");return}if(t==="Student"){window.location.assign("/register?academic=1");return}f.info(`Checkout for ${t} is ready and waiting on Paddle live credentials. You'll be notified as soon as it activates.`)},l=G(i,a,u),b=C(i,u),F=S.filter(t=>!t.isGroup),c=S.find(t=>t.isGroup);return e.jsxs(P,{children:[e.jsxs("section",{className:"mx-auto max-w-7xl px-6 py-16 lg:px-8",children:[e.jsx("div",{className:"mx-auto mb-12 max-w-4xl rounded-2xl border border-[#D8CBAF]/40 bg-[#D8CBAF]/5 p-6 backdrop-blur-md",children:e.jsxs("div",{className:"flex items-start sm:items-center justify-between flex-col sm:flex-row gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-semibold text-[#D8CBAF]",children:"Pricing is officially live. Thank you, early testers."}),e.jsxs("p",{className:"mt-2 text-sm text-[#8A9099]",children:["To say thank you for being an early beta tester, you have been granted ",e.jsx("strong",{className:"text-white",children:"30 additional days of completely free, unlimited access"})," without entering a credit card."]}),e.jsxs("p",{className:"mt-1 text-sm text-[#8A9099]",children:["During this sunset window, lock in an exclusive, lifetime ",e.jsx("strong",{className:"text-white",children:"50% Founder's Discount"})," on any paid plan."]})]}),e.jsxs(x,{onClick:()=>f.success("Activating 50% Founder's Discount logic..."),className:"shrink-0",children:["Claim Founder's Discount ",e.jsx(y,{className:"h-4 w-4"})]})]})}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"public-shell-kicker",children:"Pricing"}),e.jsx("h1",{className:"public-page-title mt-3",children:"Simple, transparent pricing"}),e.jsx("p",{className:"public-lead mx-auto mt-4 max-w-2xl",children:"Everything you need to write, publish, and operate technical-document workflows — from solo research to full lab operations, with provider-neutral AI controls and artifact-backed delivery built in."})]}),e.jsxs("div",{className:"mt-8 flex items-center justify-center gap-4",children:[e.jsxs("div",{className:"inline-flex items-center rounded-full border border-white/15 bg-white/5 p-1 backdrop-blur-xl public-card",children:[e.jsxs("button",{type:"button",onClick:()=>o("individual"),className:`relative rounded-full px-5 py-2 text-sm transition-colors flex items-center gap-2 ${n==="individual"?"text-[#D8CBAF]":"text-[#8A9099]"}`,children:[n==="individual"&&e.jsx("span",{className:"absolute inset-0 rounded-full bg-[#D8CBAF]/15"}),e.jsx("span",{className:"relative z-10",children:"Individuals"})]}),e.jsxs("button",{type:"button",onClick:()=>o("group"),className:`relative rounded-full px-5 py-2 text-sm transition-colors flex items-center gap-2 ${n==="group"?"text-[#D8CBAF]":"text-[#8A9099]"}`,children:[n==="group"&&e.jsx("span",{className:"absolute inset-0 rounded-full bg-[#D8CBAF]/15"}),e.jsx(N,{size:14,className:"relative z-10"}),e.jsx("span",{className:"relative z-10",children:"Groups"})]})]}),e.jsxs("div",{className:"inline-flex items-center rounded-full border border-white/15 bg-white/5 p-1 backdrop-blur-xl public-card",children:[e.jsxs("button",{type:"button",onClick:()=>s("monthly"),className:`relative rounded-full px-4 py-2 text-sm transition-colors ${a==="monthly"?"text-[#D8CBAF]":"text-[#8A9099]"}`,children:[a==="monthly"&&e.jsx("span",{className:"absolute inset-0 rounded-full bg-[#D8CBAF]/15"}),e.jsx("span",{className:"relative z-10",children:"Monthly"})]}),e.jsxs("button",{type:"button",onClick:()=>s("annual"),className:`relative rounded-full px-4 py-2 text-sm transition-colors ${a==="annual"?"text-[#D8CBAF]":"text-[#8A9099]"}`,children:[a==="annual"&&e.jsx("span",{className:"absolute inset-0 rounded-full bg-[#D8CBAF]/15"}),e.jsx("span",{className:"relative z-10",children:"Annual"})]})]}),a==="annual"&&e.jsx("span",{className:"rounded-full border border-[#D8CBAF]/40 bg-[#D8CBAF]/10 px-3 py-1 text-xs font-medium text-[#D8CBAF]",children:"Save ~20%"})]}),n==="individual"&&e.jsx("div",{className:"mt-10 grid gap-5 sm:grid-cols-2 xl:grid-cols-4",children:F.map(t=>{const m=a==="annual"?r(g(t.annual),2):r(t.monthly);return e.jsxs("div",{className:"relative flex flex-col",children:[t.badge&&e.jsx("div",{className:"absolute -top-3 left-1/2 z-10 -translate-x-1/2",children:e.jsx("span",{className:`rounded-full border px-3 py-1 text-[11px] font-semibold uppercase tracking-wide ${t.isStudent?"border-blue-400/60 bg-blue-400/20 text-blue-200":"border-[#D8CBAF]/60 bg-[#D8CBAF]/20 text-[#D8CBAF]"}`,children:t.badge})}),e.jsxs("div",{className:`public-card flex h-full flex-col rounded-2xl p-7 ${t.popular?"pricing-glow-border border-[#D8CBAF]/30":""}`,children:[t.isStudent&&e.jsxs("div",{className:"mb-3 flex items-center gap-1.5 text-blue-300 text-xs font-medium",children:[e.jsx(A,{size:13}),e.jsx("span",{children:"Academic verification required"})]}),e.jsx("h2",{className:"public-card-title",children:t.name}),e.jsx("p",{className:"public-body mt-2",children:t.description}),e.jsxs("p",{className:"mt-5 text-4xl font-semibold leading-none",children:[t.isFree?"Free":m,!t.isFree&&e.jsx("span",{className:"ml-2 text-sm align-middle text-[#8A9099]",children:"/ mo"})]}),!t.isFree&&a==="annual"&&e.jsxs("p",{className:"mt-1 text-xs text-[#8A9099]",children:["Equivalent monthly rate · billed annually at ",r(t.annual),"/yr · save ~20%"]}),e.jsx("ul",{className:"mt-6 grow space-y-2.5 text-sm text-[#8A9099]",children:t.features.map(j=>e.jsxs("li",{className:"flex items-start gap-2.5",children:[e.jsx(k,{size:14,className:"mt-0.5 shrink-0 text-[#D8CBAF]"}),e.jsx("span",{className:"public-body",children:j})]},j))}),e.jsx("div",{className:"mt-7 flex justify-center",children:e.jsx(x,{onClick:()=>d(t.name),children:t.cta})})]})]},t.name)})}),n==="group"&&e.jsxs("div",{className:"mt-10 max-w-2xl mx-auto",children:[e.jsxs("div",{className:"relative flex flex-col",children:[c.badge&&e.jsx("div",{className:"absolute -top-3 left-1/2 z-10 -translate-x-1/2",children:e.jsx("span",{className:"rounded-full border border-[#D8CBAF]/60 bg-[#D8CBAF]/20 px-3 py-1 text-[11px] font-semibold uppercase tracking-wide text-[#D8CBAF]",children:c.badge})}),e.jsxs("div",{className:"public-card pricing-glow-border flex flex-col rounded-2xl p-8 border-[#D8CBAF]/30",children:[e.jsx("h2",{className:"public-card-title text-2xl",children:"Groups"}),e.jsx("p",{className:"public-body mt-2",children:c.description}),e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-[#D8CBAF] mb-2",children:"How many seats do you need?"}),e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:String(i),onChange:t=>{const m=t.target.value;v(m==="50+"?"50+":Number(m))},className:"w-full appearance-none rounded-lg border border-white/15 bg-white/5 px-4 py-3 text-sm text-white backdrop-blur focus:border-[#D8CBAF]/50 focus:outline-none pr-10",children:B.map(t=>e.jsxs("option",{value:String(t),className:"bg-gray-900",children:[t," ",t==="50+"?"seats (30% discount)":"seats"]},String(t)))}),e.jsx(I,{size:16,className:"pointer-events-none absolute right-3 top-1/2 -translate-y-1/2 text-[#8A9099]"})]})]}),e.jsxs("label",{className:"flex cursor-pointer items-start gap-3 rounded-xl border border-white/10 bg-white/5 p-4 transition hover:border-[#D8CBAF]/30",children:[e.jsx("input",{type:"checkbox",checked:u,onChange:t=>p(t.target.checked),className:"mt-0.5 h-4 w-4 rounded accent-amber-400"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-[#D8CBAF]",children:"Apply educational discount"}),e.jsxs("p",{className:"text-xs text-[#8A9099] mt-0.5",children:["Get 40% off for groups using ScriptoriumAI for teaching",i==="50+"&&" · 50+ seats receive 30% volume discount automatically"]})]})]})]}),e.jsx("div",{className:"mt-6 rounded-xl border border-white/10 bg-white/5 p-5",children:e.jsxs("div",{className:"flex items-end justify-between",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-4xl font-semibold text-white",children:[a==="annual"?r(l.per,2):r(l.per),e.jsx("span",{className:"ml-2 text-sm align-middle text-[#8A9099]",children:"/ seat / mo"})]}),b>0&&e.jsxs("p",{className:"mt-1 text-xs font-medium text-emerald-400",children:[Math.round(b*100),"% discount applied",a==="annual"&&" · plus ~20% annual saving"]}),a==="annual"&&b===0&&e.jsx("p",{className:"mt-1 text-xs text-[#8A9099]",children:"Equivalent monthly rate · save ~20%"}),a==="annual"&&l.annualPerSeat!==null&&e.jsxs("p",{className:"mt-1 text-xs text-[#8A9099]",children:["Billed annually at ",r(l.annualPerSeat),"/seat/yr"]})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-sm text-[#8A9099]",children:["Total / ",a==="annual"?"mo equivalent":"mo"]}),e.jsx("p",{className:"text-lg font-semibold text-white",children:l.total}),a==="annual"&&l.annualTotal&&e.jsxs("p",{className:"mt-1 text-xs text-[#8A9099]",children:["Billed annually at ",l.annualTotal]})]})]})}),e.jsx("ul",{className:"mt-6 grid sm:grid-cols-2 gap-x-6 gap-y-2.5 text-sm text-[#8A9099]",children:c.features.map(t=>e.jsxs("li",{className:"flex items-start gap-2.5",children:[e.jsx(k,{size:14,className:"mt-0.5 shrink-0 text-[#D8CBAF]"}),e.jsx("span",{className:"public-body",children:t})]},t))}),e.jsx("div",{className:"mt-7 flex gap-3 justify-center flex-wrap",children:e.jsx(x,{onClick:()=>d("Groups"),children:"Start Free Trial"})})]})]}),e.jsxs("div",{className:"mt-6 rounded-xl border border-white/10 bg-white/5 p-5 text-sm text-[#8A9099]",children:[e.jsx("p",{className:"font-medium text-[#D8CBAF] mb-2",children:"Competitor comparison"}),e.jsxs("p",{children:["Legacy editor Groups Standard starts at ",e.jsx("strong",{className:"text-white",children:"€161/seat/yr"})," — without bundled AI. ScriptoriumAI Groups at ",e.jsx("strong",{className:"text-white",children:a==="annual"?`${r(g(c.annual),2)}/seat/mo equivalent`:`${r(c.monthly)}/seat/mo`}),a==="annual"?` billed annually at ${r(c.annual)}/seat/yr`:""," includes AI Memory, Visual Diff Pipeline, Operator Runboard, and Scientific runtime at no add-on cost."]})]})]}),e.jsxs("div",{className:"mt-14 public-card rounded-2xl p-5",children:[e.jsx("p",{className:"public-shell-kicker",children:"Feature Comparison"}),e.jsx("div",{className:"mt-4 overflow-x-auto",children:e.jsxs("table",{className:"min-w-full text-left text-sm leading-relaxed",children:[e.jsx("thead",{className:"comparison-th",children:e.jsxs("tr",{className:"border-b border-white/10",children:[e.jsx("th",{className:"px-3 py-3 font-medium leading-none",children:"Feature"}),e.jsx("th",{className:"px-3 py-3 font-medium leading-none",children:"Free"}),e.jsx("th",{className:"px-3 py-3 font-medium leading-none",children:e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(A,{size:12}),"Student"]})}),e.jsx("th",{className:"px-3 py-3 font-medium leading-none",children:"Scholar"}),e.jsx("th",{className:"px-3 py-3 font-medium leading-none",children:e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(N,{size:12}),"Groups"]})}),e.jsx("th",{className:"px-3 py-3 font-medium leading-none",children:"Enterprise"})]})}),e.jsx("tbody",{children:T.map(t=>e.jsxs("tr",{className:"border-b border-white/5 comparison-td last:border-0",children:[e.jsx("td",{className:"px-3 py-2.5 public-body",children:t.feature}),e.jsx("td",{className:"px-3 py-2.5 comparison-td",children:t.free}),e.jsx("td",{className:"px-3 py-2.5 comparison-td",children:t.student}),e.jsx("td",{className:"px-3 py-2.5 comparison-td",children:t.scholar}),e.jsx("td",{className:"px-3 py-2.5 comparison-td",children:t.group}),e.jsx("td",{className:"px-3 py-2.5 comparison-td",children:t.enterprise})]},t.feature))})]})})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-5",children:[e.jsx("p",{className:"public-shell-kicker",children:"Pricing FAQ"}),e.jsx("div",{className:"mt-4 space-y-4",children:M.map(t=>e.jsxs("div",{className:"public-card-raised rounded-xl p-4",children:[e.jsx("h3",{className:"public-card-title",children:t.question}),e.jsx("p",{className:"public-body mt-2",children:t.answer})]},t.question))})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"Affiliate Marketplace"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Open onboarding for creators, educators, reviewers, and technical operators"}),e.jsx("p",{className:"public-body mt-3 max-w-3xl",children:"The launch model is a broad marketplace, not a separate agency or formal-partner program. If your audience evaluates LaTeX platforms, scientific publishing infrastructure, or AI-assisted document workflows, use the marketplace onboarding and resource pages instead of generic sponsorship copy."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(x,{asChild:!0,children:e.jsxs(w,{to:"/affiliate-program",children:["Open affiliate onboarding",e.jsx(y,{size:13})]})}),e.jsxs(w,{to:"/affiliate-resources",className:"public-btn-secondary inline-flex items-center gap-2",children:["Open affiliate resources",e.jsx(y,{size:13})]})]})]})]}),e.jsx("section",{className:"mx-auto max-w-7xl px-6 pb-12 lg:px-8",children:e.jsxs("div",{className:"rounded-xl border border-yellow-500/30 bg-yellow-500/5 px-5 py-4 flex items-start gap-3",children:[e.jsx("span",{className:"text-yellow-400 text-base shrink-0 mt-0.5",children:"⚠️"}),e.jsxs("div",{className:"text-xs text-yellow-200/80 space-y-1",children:[e.jsx("p",{className:"font-semibold text-yellow-300",children:"Connect Backend — Paddle Checkout Activation"}),e.jsxs("p",{children:["The checkout flow is production-shaped and Paddle is wired as the payment provider. Activate by supplying ",e.jsx("code",{className:"font-mono",children:"VITE_PADDLE_CLIENT_TOKEN"}),","," ",e.jsx("code",{className:"font-mono",children:"VITE_PADDLE_ENVIRONMENT"}),", and the price IDs for each plan tier. Free-tier registration is live, and Student verification now uses the server-side"," ",e.jsx("code",{className:"font-mono",children:"POST /api/auth/validate-academic-email"})," and"," ",e.jsx("code",{className:"font-mono",children:"GET /api/auth/confirm-academic-email"})," flow with optional academic-inbox delivery when mail transport is configured. No charges will occur until live credentials are issued."]})]})]})})]})}export{L as PricingPage}; diff --git a/dist/assets/PrivacyPage-D9Ihd_q3.js b/dist/assets/PrivacyPage-D9Ihd_q3.js deleted file mode 100644 index 2b81e823..00000000 --- a/dist/assets/PrivacyPage-D9Ihd_q3.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t}from"./index-D-wwVRoV.js";import{b as e,d as n,e as i}from"./MarketingShell-BgYQ8Cfp.js";import{L as a}from"./LegalPageLayout-B12TU0j9.js";import{P as r}from"./PolicyArticle-s4Nnon3-.js";const s=[{title:"1. Controller and scope",paragraphs:[t.jsxs(t.Fragment,{children:["The controller for the processing described in this policy is ",e.legalName,", operating the ",e.brandName," service, ",n,". Contact: ",t.jsx("a",{href:e.contact.emailHref,className:"text-[#D8CBAF] underline underline-offset-2",children:e.contact.email}),"."]}),`This policy applies to the ${e.brandName} public website, account creation and sign-in flows, authenticated application, paid plan and billing touchpoints, support requests, and related product communications.`,"If you deliberately route data to a third-party provider, self-hosted model endpoint, or external service from within the product, that provider or environment also processes data under its own rules."]},{title:"2. Categories of personal data we process",bullets:["Identity and account data, such as name, email address, account identifiers, plan, seat or entitlement metadata, and academic-verification status.","Billing and transaction data, such as billing contact details, order IDs, tax or invoice metadata, payment status, and payment-provider confirmations.","Workspace and content data, such as documents, drafts, prompts, responses, uploads, comments, compile outputs, project metadata, and collaboration state.","Technical and security data, such as IP address, browser and device data, timestamps, authentication/session records, server logs, and abuse-prevention signals.","Routing and preference data, such as selected model/provider, base URL choices, fallback settings, task defaults, feature flags, and interface preferences.","Support and communication data, such as emails, contact-form submissions, support history, and operational follow-up records.","Local-browser storage, such as color mode, cached auth bootstrap data, recent items, local drafts, workspace UI state, shortcut overrides, feature toggles, and locally stored BYOK keys."]},{title:"3. Product-specific processing for AI routing and BYOK",paragraphs:["When you use AI-enabled features, the platform may process prompts, excerpts, document context, generated output, and provider-routing metadata in order to fulfill your request.","In the current activation slice reflected by this codebase, personal provider keys entered through the Environment Vault are stored locally in your browser and may be attached to supported requests through explicit request headers. The Help Center and routing UI currently state that these keys are not persisted on the server in this activation slice.","If you choose a third-party provider or self-hosted endpoint, the content you send through that route is also processed by that provider or environment. You are responsible for deciding whether the selected route is appropriate for the material you submit."]},{title:"4. Purposes and legal bases",bullets:["Art. 6(1)(b) GDPR: account creation, authentication, subscription delivery, workspace operation, support, contract performance, and pre-contract steps.","Art. 6(1)(c) GDPR: invoicing, tax, accounting, fraud documentation, and other statutory retention or compliance obligations.","Art. 6(1)(f) GDPR: platform security, abuse prevention, incident response, service reliability, troubleshooting, product improvement, and the protection of our legal and operational interests.","Art. 6(1)(a) GDPR: only where we separately request consent for an optional processing activity that is not strictly necessary."]},{title:"5. Cookies, local storage, and device access",paragraphs:["The service uses essential cookies and equivalent client-side storage for login continuity, security, routing preferences, workspace state, feature toggles, UI memory, and similar product operations.","Where storage or access is strictly necessary to provide the service you explicitly request, we rely on the exception in Section 25(2) TDDDG. If we later introduce optional technologies that require consent, we will request that consent separately.","Because several ScriptoriumAI features are intentionally local-first, some settings and temporary data remain only in your browser until you delete them or overwrite them."]},{title:"6. Recipients and categories of recipients",bullets:["Infrastructure, hosting, authentication, storage, and email-delivery providers needed to operate the platform.",`Billing providers and payment rails used to process orders, including ${e.payment.provider} where applicable.`,"AI or model providers that receive your request because you selected them, your organization configured them, or the platform routed the request there.","Professional advisers, auditors, authorities, or courts where disclosure is legally required or necessary to enforce or defend rights."]},{title:"7. International transfers",paragraphs:["Depending on your chosen provider, billing location, or infrastructure path, personal data may be processed outside your home jurisdiction, including outside the EEA or UK.","Where legally required, we rely on appropriate safeguards such as adequacy decisions, contractual protections, or another lawful transfer mechanism. Self-hosted endpoints selected by you remain your responsibility to assess and secure."]},{title:"8. Retention",paragraphs:["We retain personal data only for as long as needed for the purposes described above, for contract performance, for statutory retention duties, and for the establishment, exercise, or defense of legal claims.","Account and workspace records are generally kept while the account remains active and for a reasonable period afterwards to handle restoration requests, disputes, fraud prevention, or compliance obligations.","Billing and invoice records are retained for the periods required by commercial and tax law. Browser-local data remains on your device until you delete it, your browser clears it, or the relevant feature overwrites it."]},{title:"9. Security",paragraphs:["We use technical and organizational measures appropriate to the risk, including access controls, transport security, role separation where applicable, and operational monitoring.","No internet service can promise absolute security. You should also protect your account, endpoints, and any locally stored secrets or exports under your control."]},{title:"10. Your rights",bullets:["Access to your personal data (Art. 15 GDPR).","Rectification of inaccurate data (Art. 16 GDPR).","Erasure, subject to legal limits (Art. 17 GDPR).","Restriction of processing in the statutory cases (Art. 18 GDPR).","Data portability where applicable (Art. 20 GDPR).","Objection to processing based on legitimate interests where the legal conditions are met (Art. 21 GDPR).","Withdrawal of any consent with future effect where processing is based on consent.","Complaint to a supervisory authority, in particular in your place of residence, place of work, or the place of the alleged infringement."]},{title:"11. Children and policy updates",paragraphs:["The service is designed for researchers, writers, teams, and adult account holders. It is not intended for children to use on their own without the legally required authorization.","We may update this policy when product behavior, legal requirements, billing architecture, or provider-routing practices change. The current version is published on this page."]}],o=[{title:"1. Verantwortlicher und Anwendungsbereich",paragraphs:[t.jsxs(t.Fragment,{children:["Verantwortlicher fuer die in dieser Erklaerung beschriebenen Verarbeitungen ist ",e.legalName," als Betreiber des Dienstes ",e.brandName,", ",i,". Kontakt: ",t.jsx("a",{href:e.contact.emailHref,className:"text-[#D8CBAF] underline underline-offset-2",children:e.contact.email}),"."]}),`Diese Erklaerung gilt fuer die oeffentliche Website von ${e.brandName}, Kontoerstellung und Sign-in-Flows, die authentifizierte Anwendung, Touchpoints bezahlter Tarife und Billing-Vorgaenge, Supportanfragen sowie damit verbundene Produktkommunikation.`,"Wenn Sie Daten bewusst an einen Drittanbieter, einen selbst gehosteten Modell-Endpoint oder einen externen Dienst aus dem Produkt heraus routen, verarbeitet auch dieser Anbieter oder diese Umgebung Daten nach eigenen Regeln."]},{title:"2. Welche Kategorien personenbezogener Daten wir verarbeiten",bullets:["Identitaets- und Kontodaten, etwa Name, E-Mail-Adresse, Account-IDs, Tarif-, Sitz- oder Berechtigungsmetadaten und der Status akademischer Verifikation.","Billing- und Transaktionsdaten, etwa Rechnungs- und Kontaktdaten, Bestell-IDs, Steuer- oder Rechnungsmetadaten, Zahlungsstatus und Bestaetigungen des Zahlungsanbieters.","Workspace- und Inhaltsdaten, etwa Dokumente, Entwuerfe, Prompts, Antworten, Uploads, Kommentare, Compile-Artefakte, Projektmetadaten und Kollaborationsstatus.","Technische und Sicherheitsdaten, etwa IP-Adresse, Browser- und Geraetedaten, Zeitstempel, Authentifizierungs- und Sitzungsdaten, Server-Logs und Signale zur Missbrauchspraevention.","Routing- und Praeferenzdaten, etwa gewaehlter Modell- oder Providerpfad, Base-URL-Einstellungen, Fallback-Konfigurationen, Task-Defaults, Feature-Flags und Interface-Praeferenzen.","Support- und Kommunikationsdaten, etwa E-Mails, Kontaktformulare, Supporthistorie und operative Nachverfolgungen.","Lokaler Browser-Speicher, etwa Farbmodus, lokal gecachte Auth-Bootstrap-Daten, zuletzt verwendete Elemente, lokale Entwuerfe, Workspace-UI-Zustaende, Shortcut-Overrides, Feature-Toggles und lokal gespeicherte BYOK-Schluessel."]},{title:"3. Produktspezifische Verarbeitung fuer KI-Routing und BYOK",paragraphs:["Wenn Sie KI-gestuetzte Funktionen verwenden, kann die Plattform Prompts, Auszuege, Dokumentkontext, generierte Ausgaben und Routing-Metadaten verarbeiten, um Ihre Anfrage zu erfuellen.","Im derzeitigen Aktivierungsslice, den diese Codebasis abbildet, werden persoenliche Provider-Schluessel aus dem Environment Vault lokal in Ihrem Browser gespeichert und koennen ueber ausdrueckliche Request-Header an unterstuetzte Anfragen angehaengt werden. Help Center und Routing-Oberflaeche weisen derzeit darauf hin, dass diese Schluessel in diesem Aktivierungsslice nicht serverseitig persistiert werden.","Wenn Sie einen Drittanbieter oder einen selbst gehosteten Endpoint auswaehlen, werden die ueber diesen Pfad uebermittelten Inhalte auch von diesem Anbieter oder dieser Umgebung verarbeitet. Sie sind selbst dafuer verantwortlich zu beurteilen, ob der ausgewaehlte Pfad fuer das eingereichte Material geeignet ist."]},{title:"4. Zwecke und Rechtsgrundlagen",bullets:["Art. 6 Abs. 1 lit. b DSGVO: Kontoanlage, Authentifizierung, Lieferung des Abonnements, Betrieb des Workspace, Support, Vertragserfuellung und vorvertragliche Massnahmen.","Art. 6 Abs. 1 lit. c DSGVO: Rechnungsstellung, Steuer-, Buchhaltungs-, Fraud-Dokumentations- und sonstige gesetzliche Aufbewahrungs- oder Compliance-Pflichten.","Art. 6 Abs. 1 lit. f DSGVO: Plattformsicherheit, Missbrauchspraevention, Incident Response, Zuverlaessigkeit des Dienstes, Fehleranalyse, Produktverbesserung sowie Schutz unserer rechtlichen und betrieblichen Interessen.","Art. 6 Abs. 1 lit. a DSGVO: nur soweit wir fuer eine optionale, nicht strikt erforderliche Verarbeitung gesondert eine Einwilligung einholen."]},{title:"5. Cookies, Local Storage und Geraetezugriffe",paragraphs:["Der Dienst verwendet essenzielle Cookies und vergleichbare clientseitige Speicher fuer Login-Kontinuitaet, Sicherheit, Routing-Praeferenzen, Workspace-Zustand, Feature-Toggles, UI-Memory und vergleichbare Produktfunktionen.","Soweit Speicherung oder Zugriff unbedingt erforderlich ist, um den von Ihnen ausdruecklich gewuenschten Dienst bereitzustellen, stuetzen wir uns auf die Ausnahme des § 25 Abs. 2 TDDDG. Sollten wir spaeter optionale Technologien einfuehren, die eine Einwilligung erfordern, holen wir diese gesondert ein.","Da mehrere ScriptoriumAI-Funktionen bewusst local-first arbeiten, verbleiben bestimmte Einstellungen und temporaere Daten ausschliesslich in Ihrem Browser, bis Sie sie loeschen oder sie ueberschrieben werden."]},{title:"6. Empfaenger und Kategorien von Empfaengern",bullets:["Infrastruktur-, Hosting-, Authentifizierungs-, Speicher- und E-Mail-Dienstleister, die fuer den Plattformbetrieb erforderlich sind.",`Billing-Anbieter und Zahlungswege, die zur Bestellabwicklung eingesetzt werden, einschliesslich ${e.payment.provider}, soweit einschlaegig.`,"KI- oder Modellanbieter, die Ihre Anfrage erhalten, weil Sie diese ausgewaehlt haben, Ihre Organisation sie konfiguriert hat oder die Plattform dorthin routet.","Berater, Pruefer, Behoerden oder Gerichte, soweit eine Offenlegung gesetzlich erforderlich oder zur Durchsetzung bzw. Verteidigung von Rechten notwendig ist."]},{title:"7. Internationale Datenuebermittlungen",paragraphs:["Je nach gewaehltem Provider, Billing-Ort oder Infrastrukturpfad koennen personenbezogene Daten ausserhalb Ihrer Heimatjurisdiktion verarbeitet werden, auch ausserhalb des EWR oder des Vereinigten Koenigreichs.","Soweit rechtlich erforderlich, stuetzen wir uns auf geeignete Garantien wie Angemessenheitsbeschluesse, vertragliche Schutzmechanismen oder einen anderen zulaessigen Transfermechanismus. Selbst gehostete Endpoints, die Sie auswaehlen, bleiben in Ihrer eigenen Verantwortungs- und Sicherheitsbeurteilung."]},{title:"8. Speicherdauer",paragraphs:["Wir speichern personenbezogene Daten nur so lange, wie es fuer die genannten Zwecke, die Vertragserfuellung, gesetzliche Aufbewahrungspflichten sowie die Geltendmachung, Ausuebung oder Verteidigung von Rechtsanspruechen erforderlich ist.","Konto- und Workspace-Daten werden im Regelfall waehrend der aktiven Kontonutzung und danach fuer einen angemessenen Zeitraum aufbewahrt, um Wiederherstellungsanfragen, Streitigkeiten, Betrugspraevention oder Compliance-Pflichten zu behandeln.","Billing- und Rechnungsunterlagen werden fuer die gesetzlich vorgeschriebenen handels- und steuerrechtlichen Fristen aufbewahrt. Browser-lokale Daten verbleiben auf Ihrem Geraet, bis Sie sie loeschen, Ihr Browser sie entfernt oder die jeweilige Funktion sie ueberschreibt."]},{title:"9. Sicherheit",paragraphs:["Wir verwenden dem Risiko angemessene technische und organisatorische Massnahmen, darunter Zugriffskontrollen, Transportsicherheit, Rollenabgrenzung soweit einschlaegig und operatives Monitoring.","Kein Internetdienst kann absolute Sicherheit versprechen. Sie sollten daher auch Ihr Konto, Ihre Endpoints und etwaige lokal gespeicherte Secrets oder Exporte unter Ihrer Kontrolle absichern."]},{title:"10. Ihre Rechte",bullets:["Auskunft ueber Ihre personenbezogenen Daten (Art. 15 DSGVO).","Berichtigung unrichtiger Daten (Art. 16 DSGVO).","Loeschung im Rahmen der gesetzlichen Voraussetzungen (Art. 17 DSGVO).","Einschraenkung der Verarbeitung in den gesetzlich vorgesehenen Faellen (Art. 18 DSGVO).","Datenuebertragbarkeit, soweit einschlaegig (Art. 20 DSGVO).","Widerspruch gegen auf berechtigte Interessen gestuetzte Verarbeitungen bei Vorliegen der gesetzlichen Voraussetzungen (Art. 21 DSGVO).","Widerruf einer etwa erteilten Einwilligung mit Wirkung fuer die Zukunft.","Beschwerde bei einer Aufsichtsbehoerde, insbesondere an Ihrem Aufenthaltsort, Arbeitsplatz oder am Ort des mutmasslichen Verstosses."]},{title:"11. Kinder und Aktualisierungen dieser Erklaerung",paragraphs:["Der Dienst richtet sich an Forschende, Schreibende, Teams und erwachsene Account-Inhaber. Er ist nicht dafuer bestimmt, von Kindern ohne die gesetzlich erforderliche Autorisierung eigenstaendig genutzt zu werden.","Wir duerfen diese Erklaerung aktualisieren, wenn sich Produktverhalten, gesetzliche Anforderungen, Billing-Architektur oder Provider-Routing-Praxis aendern. Die aktuelle Fassung wird auf dieser Seite veroeffentlicht."]}];function h(){return t.jsxs(a,{badge:"Privacy",title:"Privacy Policy / Datenschutzerklaerung",description:`This policy now reflects ${e.brandName} as an authenticated SaaS with AI routing, local-first browser state, academic verification, and subscription billing rather than a generic storefront.`,panelTitle:"Privacy Focus Areas",panelItems:["Workspace content, prompts, and routing metadata","Local browser storage and BYOK handling","Billing, verification, and support records","GDPR rights and TDDDG storage rules"],children:[t.jsx(r,{heading:"Privacy Policy (English)",subheading:t.jsxs(t.Fragment,{children:["Controller and data-protection information for ",e.brandName,", including AI-assisted workspace usage, subscription handling, and public-site operation."]}),sections:s,footer:t.jsxs("p",{children:["If you want to exercise data-protection rights or ask about a specific processing path, contact ",t.jsx("a",{href:e.contact.emailHref,className:"text-[#D8CBAF] underline underline-offset-2",children:e.contact.email}),"."]})}),t.jsx(r,{heading:"Datenschutzerklaerung (Deutsch)",subheading:t.jsxs(t.Fragment,{children:["Informationen zum Datenschutz fuer ",e.brandName,", einschliesslich KI-gestuetzter Workspace-Nutzung, Abonnementabwicklung und Betrieb der oeffentlichen Website."]}),sections:o,footer:t.jsxs("p",{children:["Wenn Sie Datenschutzrechte ausueben moechten oder eine konkrete Verarbeitungsroute nachvollziehen wollen, kontaktieren Sie bitte ",t.jsx("a",{href:e.contact.emailHref,className:"text-[#D8CBAF] underline underline-offset-2",children:e.contact.email}),"."]})})]})}export{h as PrivacyPage}; diff --git a/dist/assets/PublicPrimaryButton-FdcHLbCt.js b/dist/assets/PublicPrimaryButton-FdcHLbCt.js deleted file mode 100644 index 2005a236..00000000 --- a/dist/assets/PublicPrimaryButton-FdcHLbCt.js +++ /dev/null @@ -1,421 +0,0 @@ -import{r as k,j as Q,u as Ie}from"./index-D-wwVRoV.js";function Lt(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Oe(...t){return e=>{let r=!1;const o=t.map(n=>{const a=Lt(n,e);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n{const{children:a,...i}=o,s=k.Children.toArray(a),l=s.find(Ge);if(l){const d=l.props.children,u=s.map(h=>h===l?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:h);return Q.jsx(e,{...i,ref:n,children:k.isValidElement(d)?k.cloneElement(d,void 0,u):null})}return Q.jsx(e,{...i,ref:n,children:a})});return r.displayName=`${t}.Slot`,r}var Ee=Fe("Slot");function ze(t){const e=k.forwardRef((r,o)=>{const{children:n,...a}=r;if(k.isValidElement(n)){const i=Ne(n),s=We(a,n.props);return n.type!==k.Fragment&&(s.ref=o?Oe(o,i):i),k.cloneElement(n,s)}return k.Children.count(n)>1?k.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var Le=Symbol("radix.slottable");function Ge(t){return k.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Le}function We(t,e){const r={...e};for(const o in e){const n=t[o],a=e[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...s)=>{const l=a(...s);return n(...s),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...t,...r}}function Ne(t){var o,n;let e=(o=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:o.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(n=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:n.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function Be(t){let e=t.replace("#","");return e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[parseInt(e.slice(0,2),16)/255,parseInt(e.slice(2,4),16)/255,parseInt(e.slice(4,6),16)/255]}function He(t,e,r){t/=255,e/=255,r/=255;const o=Math.max(t,e,r),n=Math.min(t,e,r),a=o-n;let i=0;const s=o===0?0:a/o;return a!==0&&(o===t?i=((e-r)/a+6)%6:o===e?i=(r-t)/a+2:i=(t-e)/a+4,i/=6),[i,s,o]}function je(t,e,r){const o=Math.floor(t*6),n=t*6-o,a=r*(1-e),i=r*(1-n*e),s=r*(1-(1-n)*e);let l=0,d=0,u=0;switch(o%6){case 0:l=r,d=s,u=a;break;case 1:l=i,d=r,u=a;break;case 2:l=a,d=r,u=s;break;case 3:l=a,d=i,u=r;break;case 4:l=s,d=a,u=r;break;case 5:l=r,d=a,u=i;break}return[Math.round(l*255),Math.round(d*255),Math.round(u*255)]}const Ue=66,De=66,Ve=1500,qe=1,Gt=16,Qe=16,Xe=8,Ye=96,Je=2,Ke={name:"chromatic",modes:{dark:{colors:["#000000","#aae8ff","#c5fe9e","#f7888d","#0d0d0d","#fffdc3","#007cff"],alphas:[1,1,1,1,1,1,1],direction:80,speed:1.2,intensity:2,scale:1.6,softness:.18,distortion:.3,complexity:.68,shape:1,blur:1,vignette:.26,vigOpacity:.6,shaderOpacity:1},light:{colors:["#ffffff","#ffffff","#ffffff","#ffb3b3","#adadad","#f5ff70","#007cff"],alphas:[1,1,1,1,1,1,1],direction:80,speed:1.2,intensity:2,scale:2.5,softness:.18,distortion:.3,complexity:.68,shape:1,blur:1,vignette:.24,vigOpacity:.16,shaderOpacity:1}}},Ze={name:"silver",modes:{dark:{colors:["#000000","#dedede","#747270","#e5e5e5","#0d0d0d","#ffffff","#e6e6e6"],alphas:[1,1,1,1,1,1,1],direction:80,speed:1.2,intensity:2,scale:2.5,softness:.18,distortion:.3,complexity:.68,shape:1,blur:1,vignette:.26,vigOpacity:.6,shaderOpacity:.88},light:{colors:["#f6f6f6","#ffffff","#ffffff","#f7f7f7","#c9c9c9","#d0d0d0","#d1d1d1"],alphas:[1,1,1,1,1,1,1],direction:80,speed:1.2,intensity:2,scale:2.5,softness:.18,distortion:.3,complexity:.68,shape:1,blur:1,vignette:.2,vigOpacity:.26,shaderOpacity:1}}},tr={name:"gold",modes:{dark:{colors:["#000000","#ffffff","#ffffff","#f7d488","#0d0d0d","#fffdc3","#ffffff"],alphas:[1,1,1,1,1,1,1],direction:80,speed:1,intensity:2,scale:2.5,softness:.18,distortion:.3,complexity:.68,shape:1,blur:1,vignette:.26,vigOpacity:.6,shaderOpacity:.92},light:{colors:["#fff8e1","#fffbe0","#ffffff","#fff6d6","#d2c7a7","#dcd2bc","#f9f7e5"],alphas:[1,1,1,1,1,1,1],direction:80,speed:1.2,intensity:2,scale:2.5,softness:.18,distortion:.3,complexity:.68,shape:1,blur:1,vignette:.22,vigOpacity:.24,shaderOpacity:1}}},se={chromatic:Ke,silver:Ze,gold:tr},er=` - attribute vec2 a_position; - void main() { gl_Position = vec4(a_position, 0.0, 1.0); } -`,rr=` - precision highp float; - - uniform vec2 u_resolution; - uniform float u_time; - uniform vec3 u_color1, u_color2, u_color3, u_color4, u_color5, u_color6, u_color7; - uniform float u_alpha1, u_alpha2, u_alpha3, u_alpha4, u_alpha5, u_alpha6, u_alpha7; - uniform float u_intensity, u_scale, u_direction; - uniform float u_softness, u_distortion, u_complexity, u_shape; - uniform float u_vignette, u_vigOpacity, u_blur, u_shaderOpacity; - - vec3 mod289(vec3 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } - vec2 mod289v2(vec2 x) { return x - floor(x * (1.0 / 289.0)) * 289.0; } - vec3 permute(vec3 x) { return mod289((x * 34.0 + 1.0) * x); } - - float snoise(vec2 v) { - const vec4 C = vec4(0.211324865405187, 0.366025403784439, - -0.577350269189626, 0.024390243902439); - vec2 i = floor(v + dot(v, C.yy)); - vec2 x0 = v - i + dot(i, C.xx); - vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0); - vec4 x12 = x0.xyxy + C.xxzz; - x12.xy -= i1; - i = mod289v2(i); - vec3 p = permute(permute(i.y + vec3(0.0, i1.y, 1.0)) + i.x + vec3(0.0, i1.x, 1.0)); - vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy), dot(x12.zw, x12.zw)), 0.0); - m = m * m; m = m * m; - vec3 x_ = 2.0 * fract(p * C.www) - 1.0; - vec3 h = abs(x_) - 0.5; - vec3 ox = floor(x_ + 0.5); - vec3 a0 = x_ - ox; - m *= 1.79284291400159 - 0.85373472095314 * (a0 * a0 + h * h); - vec3 g; - g.x = a0.x * x0.x + h.x * x0.y; - g.yz = a0.yz * x12.xz + h.yz * x12.yw; - return 130.0 * dot(m, g); - } - - float fbm(vec2 p, float oct) { - float val = 0.0, amp = 0.5; - int n = int(oct); - for (int i = 0; i < 7; i++) { - if (i >= n) break; - val += amp * snoise(p); - p *= 2.0; - amp *= 0.5; - } - return val; - } - - float nfbm(vec2 p) { return fbm(p, 3.0 + u_complexity * 4.0); } - - /* 5-stop palette used by effect 1 (Plasma) — direct port of \`palette\` from - * the canonical engine. Stops at t = 0, 0.25, 0.5, 0.75, 1.0. */ - vec3 palette(float t) { - t = clamp(t, 0.0, 1.0); - t = t * t * (3.0 - 2.0 * t); - float k = 64.0; - float w1 = u_alpha1 * exp(-k * t * t); - float w2 = u_alpha2 * exp(-k * (t - 0.25) * (t - 0.25)); - float w3 = u_alpha3 * exp(-k * (t - 0.5) * (t - 0.5)); - float w4 = u_alpha4 * exp(-k * (t - 0.75) * (t - 0.75)); - float w5 = u_alpha5 * exp(-k * (t - 1.0) * (t - 1.0)); - float total = w1 + w2 + w3 + w4 + w5 + 0.0001; - return (u_color1 * w1 + u_color2 * w2 + u_color3 * w3 + - u_color4 * w4 + u_color5 * w5) / total; - } - - /* Per-pixel alpha that re-introduces transparency when the user dials any - * palette stop's alpha below 1. Same \`paletteAlpha\` from the canonical - * engine. With every preset shipping all-1 alphas, this returns ~1 for every - * pixel — but mirroring it keeps custom-preset behaviour identical. */ - float paletteAlpha(float t) { - t = clamp(t, 0.0, 1.0); - t = t * t * (3.0 - 2.0 * t); - float k = 64.0; - float w1 = u_alpha1 * exp(-k * t * t); - float w2 = u_alpha2 * exp(-k * (t - 0.25) * (t - 0.25)); - float w3 = u_alpha3 * exp(-k * (t - 0.5) * (t - 0.5)); - float w4 = u_alpha4 * exp(-k * (t - 0.75) * (t - 0.75)); - float w5 = u_alpha5 * exp(-k * (t - 1.0) * (t - 1.0)); - float totalW = w1 + w2 + w3 + w4 + w5 + 0.0001; - float rawW = exp(-k * t * t) - + exp(-k * (t - 0.25) * (t - 0.25)) - + exp(-k * (t - 0.5) * (t - 0.5)) - + exp(-k * (t - 0.75) * (t - 0.75)) - + exp(-k * (t - 1.0) * (t - 1.0)) - + 0.0001; - return totalW / rawW; - } - - vec2 warp(vec2 p, float t) { - float str = u_distortion * 2.0; - return vec2( - nfbm(p + vec2(t * 0.1, 0.0)), - nfbm(p + vec2(0.0, t * 0.12) + 5.0) - ) * str; - } - - /* Plasma: four sine bands warped by an FBM field, mapped through the - * 5-stop palette. Identical to effect 1 in the canonical engine. */ - vec3 computeEffect(vec2 uv, float aspect, float t, float dist, float cpx) { - vec2 p = (uv - 0.5) * u_scale; - p.x *= aspect; - p += vec2(cos(u_direction), sin(u_direction)) * t * 0.15; - - float freq = 3.0 + cpx * 8.0; - float val = 0.0; - val += sin(p.x * freq + t); - val += sin(p.y * freq + t * 1.3); - val += sin((p.x + p.y) * freq * 0.7 + t * 0.7); - val += sin(length(p) * freq * 0.8 - t * 1.5); - vec2 w = warp(p, t); - val += (w.x + w.y) * dist; - val = val * 0.2 * u_intensity + 0.5; - - return palette(clamp(val, 0.0, 1.0)); - } - - void main() { - vec2 uv = gl_FragCoord.xy / u_resolution; - float aspect = u_resolution.x / u_resolution.y; - float t = u_time; // JS already multiplied u_time by preset.speed. - float dist = u_distortion; - float cpx = u_complexity; - - /* 5-tap cross blur (center + cardinal offsets). The chromatic/silver/gold - * presets all ship with blur=1 so this path is always active. 5 taps - * instead of the canonical engine's 9 saves ~44% fragment work; the - * perceptual difference is nil because the output is already soft from - * the plasma's low spatial frequency and CSS blur on reflections. */ - vec3 col; - if (u_blur < 0.01) { - col = computeEffect(uv, aspect, t, dist, cpx); - } else { - float r = u_blur * 0.02; - col = computeEffect(uv, aspect, t, dist, cpx) * 0.4; - col += computeEffect(uv + vec2( r, 0.0), aspect, t, dist, cpx) * 0.15; - col += computeEffect(uv + vec2(-r, 0.0), aspect, t, dist, cpx) * 0.15; - col += computeEffect(uv + vec2(0.0, r), aspect, t, dist, cpx) * 0.15; - col += computeEffect(uv + vec2(0.0, -r), aspect, t, dist, cpx) * 0.15; - } - - /* Gamma punch — adds the contrast pop that defines the chromatic - * highlights. From the canonical engine: \`col = pow(col, vec3(1.3))\`. */ - col = pow(col, vec3(1.3)); - - /* Vignette — soft edge darkening so corners read as recessed. The 40-px - * scale at the bottom of the formula is hard-coded in the canonical - * engine; we keep it for visual parity. */ - float edgeDist = min(min(uv.x, 1.0 - uv.x), min(uv.y, 1.0 - uv.y)); - float vigPx = 40.0 / min(u_resolution.x, u_resolution.y); - float vigRange = vigPx * (1.0 + u_vignette * 3.0); - float vig = edgeDist * edgeDist / (vigRange * vigRange); - vig = smoothstep(0.0, 1.0, vig); - col *= mix(1.0, vig, u_vignette * u_vigOpacity); - - /* Per-pixel alpha. With all-1 alphas the formula collapses to ~1 but the - * computation matches the canonical engine so custom presets behave the - * same. */ - float colorAlpha = (u_alpha1 + u_alpha2 + u_alpha3 + u_alpha4 + u_alpha5) / 5.0; - if (colorAlpha < 0.999) { - vec3 c1d = col - u_color1, c2d = col - u_color2, c3d = col - u_color3, - c4d = col - u_color4, c5d = col - u_color5; - float prox1 = exp(-8.0 * dot(c1d, c1d)); - float prox2 = exp(-8.0 * dot(c2d, c2d)); - float prox3 = exp(-8.0 * dot(c3d, c3d)); - float prox4 = exp(-8.0 * dot(c4d, c4d)); - float prox5 = exp(-8.0 * dot(c5d, c5d)); - float pTotal = prox1 + prox2 + prox3 + prox4 + prox5 + 0.0001; - colorAlpha = (prox1 * u_alpha1 + prox2 * u_alpha2 + prox3 * u_alpha3 + - prox4 * u_alpha4 + prox5 * u_alpha5) / pTotal; - } - float alpha = colorAlpha; - - /* Touch the unused-at-effect-1 uniforms so GL drivers that complain about - * declared-but-unread uniforms (some Mali / Adreno builds do) keep them - * live. The contribution is provably zero. */ - alpha += 0.0 * (u_softness + u_shape + - u_alpha6 + u_alpha7 + - u_color6.x + u_color7.x); - - gl_FragColor = vec4(col, alpha * u_shaderOpacity); - } -`;function Wt(t,e,r){const o=t.createShader(e);if(!o)throw new Error("metal-fx: gl.createShader returned null");if(t.shaderSource(o,r),t.compileShader(o),!t.getShaderParameter(o,t.COMPILE_STATUS)){const n=t.getShaderInfoLog(o);throw t.deleteShader(o),new Error(`metal-fx: shader compile failed: ${n??"(no info log)"}`)}return o}function or(t,e,r){const o=t.createProgram();if(!o)throw new Error("metal-fx: gl.createProgram returned null");if(t.attachShader(o,e),t.attachShader(o,r),t.linkProgram(o),!t.getProgramParameter(o,t.LINK_STATUS)){const n=t.getProgramInfoLog(o);throw t.deleteProgram(o),new Error(`metal-fx: program link failed: ${n??"(no info log)"}`)}return o}const le=140,ce=40,de=1.6,ue=1.3;let c=null,Rt=null;function nr(t){Rt=t}const ar=["u_resolution","u_time","u_color1","u_color2","u_color3","u_color4","u_color5","u_color6","u_color7","u_alpha1","u_alpha2","u_alpha3","u_alpha4","u_alpha5","u_alpha6","u_alpha7","u_intensity","u_scale","u_direction","u_softness","u_distortion","u_complexity","u_shape","u_vignette","u_vigOpacity","u_blur","u_shaderOpacity"];function Nt(t){t.enable(t.BLEND),t.blendFunc(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA);const e=Wt(t,t.VERTEX_SHADER,er),r=Wt(t,t.FRAGMENT_SHADER,rr),o=or(t,e,r);t.useProgram(o);const n=t.createBuffer();if(!n)throw new Error("metal-fx: gl.createBuffer returned null");t.bindBuffer(t.ARRAY_BUFFER,n),t.bufferData(t.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,-1,1,-1,1,1,-1,1,1]),t.STATIC_DRAW);const a=t.getAttribLocation(o,"a_position");t.enableVertexAttribArray(a),t.vertexAttribPointer(a,2,t.FLOAT,!1,0,0);const i={};for(const s of ar)i[s]=t.getUniformLocation(o,s);return{program:o,buffer:n,uniforms:i}}function fe(){if(c)return c;const t=Math.min(Je,typeof window<"u"&&window.devicePixelRatio||1),e=Math.round(Ye*t),r=typeof OffscreenCanvas<"u";let o,n;if(r)o=new OffscreenCanvas(e,e),n=o.getContext("webgl",{alpha:!0,premultipliedAlpha:!1,antialias:!1});else{const u=document.createElement("canvas");u.width=e,u.height=e,n=u.getContext("webgl",{alpha:!0,premultipliedAlpha:!1,antialias:!1,preserveDrawingBuffer:!0})??u.getContext("experimental-webgl"),o=u}if(!n)throw new Error("metal-fx: WebGL not supported");const{program:a,buffer:i,uniforms:s}=Nt(n),l=u=>{u.preventDefault(),c&&(c.contextLost=!0)},d=()=>{if(!c)return;const u=Nt(c.gl);c.program=u.program,c.buffer=u.buffer,c.uniforms=u.uniforms,c.presetDirty=!0,c.contextLost=!1,Rt==null||Rt()};return o.addEventListener("webglcontextlost",l,!1),o.addEventListener("webglcontextrestored",d,!1),c={glCanvas:o,gl:n,program:a,buffer:i,uniforms:s,preset:se.chromatic.modes.dark,presetDirty:!0,contextLost:!1,useOffscreen:r,frameBitmap:null,startMs:performance.now(),pausedMs:0,pausedAtMs:null,rafId:0,dpr:t,instances:new Set,frameCount:0,glowQueue:[],glowIdx:0,glowSkip:0,glowPixels:new Uint8Array(e*e*4),glowPixelsW:e,glowPixelsH:e},c}function ir(){var t;if(!c)return;const{gl:e,program:r,buffer:o,frameBitmap:n}=c;try{n==null||n.close(),e.deleteBuffer(o),e.deleteProgram(r),(t=e.getExtension("WEBGL_lose_context"))==null||t.loseContext()}catch{}c=null}let Bt=0;function xt(){if(!c)return;const t=performance.now();if(t-Btn&&(h=n),f>a&&(f=a);const g=(n-h)/2,m=(a-f)/2,p=g+e/t.cssWidth*h,v=m+r/t.cssHeight*f;return et.bx=Math.round(p),et.by=Math.round(a-1-v),et}const U={r:0,g:0,b:0,lum:0,count:0};function pe(t,e,r,o,n,a){const i=Math.max(1,a|0),s=Math.max(0,o-i),l=Math.min(e,o+i+1),d=Math.max(0,n-i),u=Math.min(r,n+i+1);U.r=0,U.g=0,U.b=0,U.lum=0,U.count=0;for(let h=d;h0?a.lum/a.count:0}function sr(t,e,r,o){if(!c)return F.r=255,F.g=255,F.b=255,F;xt();const n=$t(t,e,r),a=pe(c.glowPixels,c.glowPixelsW,c.glowPixelsH,n.bx,n.by,o);return a.count===0?(F.r=255,F.g=255,F.b=255,F):(F.r=a.r/a.count,F.g=a.g/a.count,F.b=a.b/a.count,F)}function lr(t,e,r,o){if(!c)return F.r=255,F.g=255,F.b=255,F;xt();const n=$t(t,e,r),{glowPixels:a,glowPixelsW:i,glowPixelsH:s}=c,l=Math.max(1,o|0),d=Math.max(0,n.bx-l),u=Math.min(i,n.bx+l+1),h=Math.max(0,n.by-l),f=Math.min(s,n.by+l+1);let g=-1;F.r=255,F.g=255,F.b=255;for(let m=h;m0?(T-L)/T:0)*(.35+.65*(T/255));H>g&&(g=H,F.r=R,F.g=z,F.b=E)}}return F}nr(()=>{c&&c.instances.size>0&&c.pausedAtMs===null&&ft()});typeof document<"u"&&document.addEventListener("visibilitychange",()=>{!c||c.pausedAtMs!==null||c.contextLost||(document.hidden?ge():c.instances.size>0&&ft())});function cr(t){const e=fe(),r=t.hostCanvas.getContext("2d",{alpha:!0});if(!r)throw new Error("metal-fx: canvas 2D context unavailable");const o=t.scale??1,n={canvas:t.hostCanvas,ctx:r,cssWidth:t.cssWidth,cssHeight:t.cssHeight,cornerRadius:t.cornerRadius,kind:t.kind,ringCssPx:t.ringCssPx??(t.kind==="circle"?2:1)*o,shaderScale:t.shaderScale??(t.kind==="circle"?ue:de)*o,opacityMul:t.opacityMul??1,visible:!0,paused:t.paused??!1,everCopied:!1,dpr:typeof window<"u"&&window.devicePixelRatio||1,scale:o,onAfterFrame:t.onAfterFrame,onFirstCopy:t.onFirstCopy};return he(n),e.instances.add(n),e.rafId===0&&e.pausedAtMs===null&&ft(),n}function dr(t){if(!c)return;c.instances.delete(t);const e=c.glowQueue.indexOf(t);e!==-1&&c.glowQueue.splice(e,1),c.instances.size===0&&(ge(),ir())}function ur(t){c&&(c.glowQueue.includes(t)||c.glowQueue.push(t))}function fr(t){if(!c)return;const e=c.glowQueue.indexOf(t);e!==-1&&c.glowQueue.splice(e,1)}function lt(t,e){let r=!1;e.cssWidth!==void 0&&e.cssWidth!==t.cssWidth&&(t.cssWidth=e.cssWidth,r=!0),e.cssHeight!==void 0&&e.cssHeight!==t.cssHeight&&(t.cssHeight=e.cssHeight,r=!0),e.cornerRadius!==void 0&&(t.cornerRadius=e.cornerRadius),e.scale!==void 0&&(t.scale=e.scale),e.kind!==void 0&&e.kind!==t.kind&&(t.kind=e.kind,e.shaderScale===void 0&&(t.shaderScale=(e.kind==="circle"?ue:de)*t.scale),e.ringCssPx===void 0&&(t.ringCssPx=(e.kind==="circle"?2:1)*t.scale)),e.shaderScale!==void 0&&(t.shaderScale=e.shaderScale),e.ringCssPx!==void 0&&(t.ringCssPx=e.ringCssPx),e.opacityMul!==void 0&&(t.opacityMul=e.opacityMul),e.paused!==void 0&&e.paused!==t.paused&&(t.paused=e.paused,!e.paused&&c&&c.rafId===0&&c.pausedAtMs===null&&!c.contextLost&&ft()),r&&he(t)}function pr(t,e){t.visible=e,e&&c&&c.rafId===0&&c.pausedAtMs===null&&!c.contextLost&&ft()}function hr(t,e){const r=fe();r.preset=se[t].modes[e],r.presetDirty=!0}let Tt=null;function mr(t){Tt=t}function he(t){t.dpr=typeof window<"u"&&window.devicePixelRatio||1;const e=Math.max(1,Math.round(t.cssWidth*t.dpr)),r=Math.max(1,Math.round(t.cssHeight*t.dpr));t.canvas.width!==e&&(t.canvas.width=e),t.canvas.height!==r&&(t.canvas.height=r)}function gr(t){const{ctx:e,dpr:r,canvas:o}=t,n=t.ringCssPx*r,a=o.width,i=o.height,s=Math.max(0,(t.cornerRadius-t.ringCssPx)*r);e.save(),e.globalCompositeOperation="destination-out",e.fillStyle="#000",e.beginPath(),e.roundRect(n,n,a-2*n,i-2*n,s),e.fill(),e.restore()}function xr(t){var e;if(!c)return;const r=c.frameBitmap??c.glCanvas,o=t.dpr,n=t.canvas.width,a=t.canvas.height;if(n<1||a<1)return;const i=c.glCanvas.width,s=c.glCanvas.height,l=le*o,d=ce*o;let u=n*(i/l)/t.shaderScale,h=a*(s/d)/t.shaderScale;u>i&&(u=i),h>s&&(h=s);const f=Math.max(0,(i-u)/2),g=Math.max(0,(s-h)/2);if(t.ctx.clearRect(0,0,n,a),t.opacityMul<1&&(t.ctx.globalAlpha=t.opacityMul),t.ctx.drawImage(r,f,g,u,h,0,0,n,a),t.opacityMul<1&&(t.ctx.globalAlpha=1),gr(t),t.onFirstCopy){const m=t.onFirstCopy;t.onFirstCopy=void 0,m()}(e=t.onAfterFrame)==null||e.call(t)}function br(){if(!c)return;const{gl:t,uniforms:e,preset:r,glCanvas:o}=c;e.u_resolution&&t.uniform2f(e.u_resolution,o.width,o.height);for(let n=0;n<7;n++){const a=e[`u_color${n+1}`];if(a){const[s,l,d]=Be(r.colors[n]);t.uniform3f(a,s,l,d)}const i=e[`u_alpha${n+1}`];i&&t.uniform1f(i,r.alphas[n])}e.u_intensity&&t.uniform1f(e.u_intensity,r.intensity),e.u_scale&&t.uniform1f(e.u_scale,r.scale),e.u_direction&&t.uniform1f(e.u_direction,r.direction*Math.PI/180),e.u_softness&&t.uniform1f(e.u_softness,r.softness),e.u_distortion&&t.uniform1f(e.u_distortion,r.distortion),e.u_complexity&&t.uniform1f(e.u_complexity,r.complexity),e.u_shape&&t.uniform1f(e.u_shape,r.shape),e.u_vignette&&t.uniform1f(e.u_vignette,r.vignette),e.u_vigOpacity&&t.uniform1f(e.u_vigOpacity,r.vigOpacity),e.u_blur&&t.uniform1f(e.u_blur,r.blur),e.u_shaderOpacity&&t.uniform1f(e.u_shaderOpacity,r.shaderOpacity),c.presetDirty=!1}function vr(t){if(!c)return;const{gl:e,uniforms:r,preset:o,glCanvas:n}=c,a=(t-c.startMs-c.pausedMs)/1e3*o.speed;e.viewport(0,0,n.width,n.height),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),c.presetDirty&&br(),r.u_time&&e.uniform1f(r.u_time,a),e.drawArrays(e.TRIANGLES,0,6),c.frameCount++}let jt=0;function me(t){var e;if(!c)return;if(c.contextLost){c.rafId=0;return}let r=!1;for(const o of c.instances)if(o.visible&&(!o.paused||!o.everCopied)){r=!0;break}if(!r){c.rafId=0;return}if(c.rafId=requestAnimationFrame(me),!(t-jt0&&xt(),(e=c.frameBitmap)==null||e.close(),c.frameBitmap=c.glCanvas.transferToImageBitmap());for(const o of c.instances)o.visible&&(o.paused&&o.everCopied||(xr(o),o.everCopied=!0));if(Tt&&c.glowQueue.length>0&&++c.glowSkip%qe===0){const o=c.glowQueue;c.glowIdx>=o.length&&(c.glowIdx=0);const n=o[c.glowIdx];n.visible&&!n.paused&&Tt(n,t),c.glowIdx++}}}function ft(){!c||c.rafId!==0||(c.rafId=requestAnimationFrame(me))}function ge(){c&&(c.rafId!==0&&cancelAnimationFrame(c.rafId),c.rafId=0)}const mt={linear:t=>t,smoothstep:t=>t*t*(3-2*t)};function rt(t,e,r,o=mt.linear){return{from:t,to:e,dur:r,ease:o,startMs:-1,val:t,done:!1}}function ot(t,e){t.startMs=e,t.val=t.from,t.done=!1}function Ut(t,e){if(t.done||t.startMs<0)return t.val;const r=Math.min(1,(e-t.startMs)/t.dur);return t.val=t.from+(t.to-t.from)*t.ease(r),r>=1&&(t.done=!0),t.val}const wr=1.5,pt=1/3,yr=4*pt,Mr=2*pt,_r=2*pt,kr=1.35*pt,Cr=13*pt;function It(t,e,r){const o=Math.max(0,Math.min(r,Math.min(t,e)/2));return 2*Math.max(0,t-2*o)+2*Math.max(0,e-2*o)+2*Math.PI*o}function Ot(t,e,r,o){return o==="circle"?2*Math.PI*Math.max(0,Math.min(r,Math.min(t,e)/2)):It(t,e,r)}function ut(t,e,r,o,n,a,i,s){const l=s||{x:0,y:0},d=Math.max(0,Math.min(o,Math.min(e,r)/2));if(i==="circle"){const x=2*Math.PI*d;if(x<=1e-4)return l.x=e*.5,l.y=r*.5,l;t=(t%x+x)%x;const R=-Math.PI/2+t/x*Math.PI*2,z=Math.max(0,d-n+a);return l.x=e*.5+z*Math.cos(R),l.y=r*.5+z*Math.sin(R),l}const u=Math.max(0,e-2*d),h=Math.max(0,r-2*d),f=Math.PI*d/2,g=2*(u+h)+4*f;t=(t%g+g)%g;const m=Math.max(0,d-n+a);let p=t;if(p0?p/f:0)*(Math.PI/2);return l.x=e-d+m*Math.cos(x),l.y=d+m*Math.sin(x),l}if(p-=f,p0?p/f:0)*(Math.PI/2);return l.x=e-d+m*Math.cos(x),l.y=r-d+m*Math.sin(x),l}if(p-=f,p0?p/f:0)*(Math.PI/2);return l.x=d+m*Math.cos(x),l.y=r-d+m*Math.sin(x),l}if(p-=f,p0?p/f:0)*(Math.PI/2);return l.x=d+m*Math.cos(v),l.y=d+m*Math.sin(v),l}function Dt(t,e){const r=t*2/e;let o="";for(let n=0;n<=e;n++){const a=-t+n*r;o+=(n===0?"M ":"L ")+a.toFixed(3)+" 0 "}return o}const wt={x:0,y:0},yt={x:0,y:0};function Sr(t,e,r,o,n,a){return ut(t-.1,e,r,o,n,0,a,wt),ut(t+.1,e,r,o,n,0,a,yt),Math.atan2(yt.y-wt.y,yt.x-wt.x)}function Vt(t,e,r){const o=Math.max(0,Math.min(1,(r-t)/(e-t)));return o*o*(3-2*o)}function Rr(t){const e=Ot(t.width,t.height,t.cornerRadius,t.kind),r=wr*(t.scale??1),o=[];for(let n=0;n(v*a).toFixed(3),p=v=>(v*a).toFixed(3);return["",``,``,``,``,``,``,``,``,``,"",``,``,``,``,``,``,``,"",``,``,``,``,``,``,""].join("")}const Ar=.00875,qt=.08,Qt=.32,Pr=.05,$r=3e3,Xt=.85,ht=.34,Mt=1500,Ir=15,Or=.0075,Fr=120,Er=1.5,zr=7.8,Lr=9.13952,Gr=1,Wr=1/3,Nr=.8,Br=3.51,Yt=2e3,_t=400,Hr=2.625,jr=1.008,Ur=.31,xe=140,be=40,ve=20;let Dr=0;const Y={x:0,y:0};function Jt(t,e){const r=`mfxg_${++Dr}`,o=document.createElementNS("http://www.w3.org/2000/svg","svg");o.setAttribute("class","metal-fx-glow-svg"),o.setAttribute("preserveAspectRatio","none"),o.setAttribute("viewBox",`0 0 ${e.width} ${e.height}`),o.innerHTML=Tr(e,r),t.appendChild(o);const n=x=>o.querySelector(`#${r}_${x}`),a=n("h"),i=n("hI"),s=n("e"),l=n("eI"),d=n("fc"),u=Ot(e.width,e.height,e.cornerRadius,e.kind)/It(xe,be,ve),h=Math.max(1,zr*u),f=Math.max(.6,Lr*Wr*u),g=Dt(h,Qe),m=Dt(f,Xe),p=[n("pXl"),n("pLg"),n("pMd"),n("pSm")],v=[n("eO"),n("eC")];for(const x of p)x.setAttribute("d",g);for(const x of v)x.setAttribute("d",m);return i.style.transformOrigin="0 0",l.style.transformOrigin="0 0",i.style.willChange="transform",l.style.willChange="transform",i.style.transition="transform 100ms linear",l.style.transition="transform 100ms linear",a.style.willChange="opacity",s.style.willChange="opacity",a.style.transition="opacity 100ms linear",s.style.transition="opacity 100ms linear",d.style.willChange="transform",{svg:o,haloGroup:a,haloInner:i,extraGroup:s,extraInner:l,fadeCircle:d,width:e.width,height:e.height,cornerRadius:e.cornerRadius,kind:e.kind,scale:e.scale??1,perim:Rr(e),currentIdx:0,appearedAt:0,glowOpacity:0,relocTween:null,relocNextIdx:-1,wanderS:0,wanderTargetS:0,wanderFrames:0,tintFrom:{r:255,g:255,b:255},tintTarget:{r:255,g:255,b:255},tintTween:null,tintHoldUntil:0,lastHaloStroke:"",lastExtraStroke:""}}function Vr(t,e,r,o,n="dark"){var a;const{width:i,height:s,cornerRadius:l,perim:d}=t;if(d.length===0)return;const u=2;let h=-1,f=t.currentIdx,g=0;for(let w=0;wh&&(h=$,f=w),w===t.currentIdx&&(g=$)}const m=t.appearedAt>0&&r-t.appearedAt<$r,p=ht+(Xt-ht)*Vt(qt,Qt,g),v=!m&&h-g>Pr;if(!t.relocTween||t.relocTween.done)if(t.appearedAt===0)t.currentIdx=f,t.appearedAt=r,t.wanderS=0,t.wanderTargetS=0,t.wanderFrames=0,t.relocTween=rt(0,p,Mt,mt.smoothstep),ot(t.relocTween,r);else if((a=t.relocTween)!=null&&a.done&&t.relocTween.to===0){t.currentIdx=t.relocNextIdx,t.appearedAt=r,t.wanderS=0,t.wanderTargetS=0,t.wanderFrames=0;const w=d[t.currentIdx],C=Ht(e,w.x,w.y,u),$=ht+(Xt-ht)*Vt(qt,Qt,C);t.relocTween=rt(0,$,Mt,mt.smoothstep),ot(t.relocTween,r)}else v?(t.relocNextIdx=f,t.relocTween=rt(t.glowOpacity,0,Mt,mt.smoothstep),ot(t.relocTween,r)):t.glowOpacity+=(p-t.glowOpacity)*Ar;t.relocTween&&(t.glowOpacity=Ut(t.relocTween,r)),t.glowOpacity=Math.max(0,Math.min(1,t.glowOpacity));const x=Ot(i,s,l,t.kind)/It(xe,be,ve),R=Ir*x;t.wanderFrames++>=Fr&&(t.wanderTargetS=(Math.random()*2-1)*R,t.wanderFrames=0),t.wanderS+=(t.wanderTargetS-t.wanderS)*Or;const z=d[t.currentIdx].arc+t.wanderS,E=Er*t.scale;ut(z,i,s,l,E,0,t.kind,Y);const T=Y.x,L=Y.y,H=Sr(z,i,s,l,E,t.kind),V=`translate(${T.toFixed(3)}px,${L.toFixed(3)}px) rotate(${H.toFixed(4)}rad)`;t.haloInner.style.transform=V;const N=Gr*x*t.scale;ut(z,i,s,l,E,N,t.kind,Y),t.extraInner.style.transform=`translate(${Y.x.toFixed(3)}px,${Y.y.toFixed(3)}px) rotate(${H.toFixed(4)}rad)`,t.fadeCircle.style.transform=`translate(${Y.x.toFixed(3)}px,${Y.y.toFixed(3)}px)`;const P=n==="light",S=P?lr(e,T,L,u):sr(e,T,L,u);t.tintTween?t.tintTween.done&&(P?(t.tintFrom={r:t.tintFrom.r+(t.tintTarget.r-t.tintFrom.r)*t.tintTween.val,g:t.tintFrom.g+(t.tintTarget.g-t.tintFrom.g)*t.tintTween.val,b:t.tintFrom.b+(t.tintTarget.b-t.tintFrom.b)*t.tintTween.val},t.tintTarget={...S},t.tintTween=rt(0,1,_t),ot(t.tintTween,r)):r>=t.tintHoldUntil&&(t.tintFrom={...t.tintTarget},t.tintTarget={...S},t.tintTween=rt(0,1,_t),ot(t.tintTween,r),t.tintHoldUntil=r+Yt)):(t.tintFrom={...S},t.tintTarget={...S},t.tintTween=rt(0,1,_t),ot(t.tintTween,r),t.tintHoldUntil=P?0:r+Yt),Ut(t.tintTween,r);const b=t.tintTween.val;let B,G,j;if(P)B=Math.round(t.tintFrom.r+(t.tintTarget.r-t.tintFrom.r)*b),G=Math.round(t.tintFrom.g+(t.tintTarget.g-t.tintFrom.g)*b),j=Math.round(t.tintFrom.b+(t.tintTarget.b-t.tintFrom.b)*b);else{const w=t.tintFrom.r+(t.tintTarget.r-t.tintFrom.r)*b,C=t.tintFrom.g+(t.tintTarget.g-t.tintFrom.g)*b,$=t.tintFrom.b+(t.tintTarget.b-t.tintFrom.b)*b,A=Math.max(w,C,$)||1;B=Math.round(255*(w/A)),G=Math.round(255*(C/A)),j=Math.round(255*($/A))}const M=`rgb(${B},${G},${j})`;if(M!==t.lastHaloStroke&&(t.lastHaloStroke=M,t.haloInner.style.stroke=M),P){const w=He(B,G,j),[C,$,A]=je(w[0],Math.min(1,w[1]*Hr),Math.max(Ur,w[2]*jr)),D=`rgb(${C},${$},${A})`;D!==t.lastExtraStroke&&(t.lastExtraStroke=D,t.extraInner.style.stroke=D)}else t.lastExtraStroke!=="#ffffff"&&(t.lastExtraStroke="#ffffff",t.extraInner.style.stroke="#ffffff");const _=Math.max(0,Math.min(1,o));t.haloGroup.style.opacity=(t.glowOpacity*Nr*_).toFixed(3),t.extraGroup.style.opacity=Math.min(1,t.glowOpacity*Br*_).toFixed(3)}const At=12,Kt=32,Zt=1,te=.55,qr=1,Qr=1,Xr=.85,Yr=0,Jr=1.3,ee=3.6,Kr=.7,Zr=1,to=.52,eo=1,ro=.044,oo=235,no=2.535,ao=.7,io=.5,so=new Set(["INPUT","TEXTAREA","SELECT","OPTION"]);function lo(t,e){const r=Math.max(t.left-e.right,e.left-t.right,0),o=Math.max(t.top-e.bottom,e.top-t.bottom,0);return Math.sqrt(r*r+o*o)}function co(t,e,r,o){return!(Math.min(t.bottom,e.bottom)-Math.max(t.top,e.top)o)}function uo(t,e,r,o){return Math.min(t.right,e.right)-Math.max(t.left,e.left)1e-4;m++){const p=Math.min(1,f);t.save(),po(t,d.x,d.y,d.w,d.h,d.r,h),t.globalCompositeOperation=g?"source-over":"lighter",g=!1,t.globalAlpha=p,we(t,e,r,o,l),t.globalAlpha=1,t.globalCompositeOperation="destination-in",t.fillStyle=s,t.fillRect(0,0,n,a),t.restore(),f-=p}}function ye(t,e,r,o,n,a,i){const s=i|0;if(s<1||o<=2*s||n<=2*s){t.beginPath(),tt(t,e,r,o,n,a),t.clip();return}t.beginPath(),tt(t,e,r,o,n,a),tt(t,e+s,r+s,o-2*s,n-2*s,Math.max(0,a-s)),t.clip("evenodd")}function mo(t,e,r,o,n,a,i,s,l,d,u,h){let f=s*u,g=!0;for(let m=0;m<3&&f>1e-4;m++){const p=Math.min(1,f);t.save(),ye(t,i.x,i.y,i.w,i.h,i.r,l),t.globalCompositeOperation=g?"source-over":"lighter",g=!1,t.globalAlpha=p,we(t,e,r,o,h),t.globalAlpha=1,t.globalCompositeOperation="destination-in",t.fillStyle=d,t.fillRect(0,0,n,a),t.restore(),f-=p}}function go(t,e,r,o,n,a,i,s){const l=t.createLinearGradient(o,n,a,i);l.addColorStop(0,`rgba(255,255,255,${s.toFixed(3)})`),l.addColorStop(.5,`rgba(255,255,255,${(s*.45).toFixed(3)})`),l.addColorStop(1,"rgba(255,255,255,0)"),t.save(),ye(t,e.x,e.y,e.w,e.h,e.r,r),t.globalCompositeOperation="lighter",t.lineWidth=r*2,t.strokeStyle=l,t.beginPath(),tt(t,e.x,e.y,e.w,e.h,e.r),t.stroke(),t.restore()}function Me(t){const e=getComputedStyle(t),r=[parseFloat(e.borderTopLeftRadius)||0,parseFloat(e.borderTopRightRadius)||0,parseFloat(e.borderBottomRightRadius)||0,parseFloat(e.borderBottomLeftRadius)||0].filter(o=>o>0);return r.length?Math.min.apply(null,r):0}function _e(t){const e=getComputedStyle(t),r=Math.max(parseFloat(e.borderTopWidth)||0,parseFloat(e.borderRightWidth)||0,parseFloat(e.borderBottomWidth)||0,parseFloat(e.borderLeftWidth)||0);let o=0,n=0;const a=e.boxShadow;if(a&&a!=="none"){const s=a.replace(/rgba?\([^)]*\)/g,u=>u.replace(/,/g,"\0")).split(/,\s*/);let l=1/0,d=1/0;for(const u of s){const h=u.match(/-?\d+(?:\.\d+)?px/g);if(!h||h.length<4)continue;const f=parseFloat(h[3]);f>0&&(/\binset\b/.test(u)?fre(t)),t.resizeObserver.observe(t.el)),typeof MutationObserver<"u"&&(t.mutationObserver=new MutationObserver(()=>re(t)),t.mutationObserver.observe(t.el,{attributes:!0,attributeFilter:["style","class"]}))}function bo(t){var e,r;(e=t.resizeObserver)==null||e.disconnect(),t.resizeObserver=null,(r=t.mutationObserver)==null||r.disconnect(),t.mutationObserver=null}const at=new Set;function vo(t,e,r){if(typeof document>"u"||so.has(t.tagName))return null;for(const g of at)if(g.el===t)return g;const o=document.createElement("div");o.setAttribute("data-metal-fx-reflection",""),o.setAttribute("aria-hidden","true");const n=document.createElement("canvas");n.className="metal-fx-reflection-canvas";const a=n.getContext("2d",{alpha:!0});if(!a)return null;const i=document.createElement("canvas");i.className="metal-fx-reflection-stroke-canvas";const s=i.getContext("2d",{alpha:!0});if(!s)return null;o.appendChild(n),o.appendChild(i);const l=getComputedStyle(t);let d=!1;l.position==="static"&&(t.style.position="relative",d=!0);let u=!1;l.isolation!=="isolate"&&(t.style.isolation="isolate",u=!0),t.setAttribute("data-metal-fx-reflect-host",""),t.insertBefore(o,t.firstChild);const h=_e(t),f={el:t,anchor:e,anchorEl:r,wrap:o,canvas:n,ctx:a,strokeCanvas:i,strokeCtx:s,cornerRadius:Me(t),hairlineWidth:h.width,hairlineOuterCssPx:h.outerCssPx,appliedPositionRelative:d,appliedIsolation:u,resizeObserver:null,mutationObserver:null};return xo(f),at.add(f),f}function wo(t){for(const e of at)if(e.el===t){bo(e),e.canvas.width=0,e.canvas.height=0,e.strokeCanvas.width=0,e.strokeCanvas.height=0,e.wrap.parentNode===e.el&&e.el.removeChild(e.wrap),e.el.removeAttribute("data-metal-fx-reflect-host"),e.appliedPositionRelative&&(e.el.style.position=""),e.appliedIsolation&&(e.el.style.isolation=""),at.delete(e);return}}function yo(){if(at.size===0)return;const t=typeof window<"u"&&window.devicePixelRatio||1,e=new Map;for(const r of at){const o=r.el.getBoundingClientRect();let n=e.get(r.anchorEl);if(n||(n=r.anchorEl.getBoundingClientRect(),e.set(r.anchorEl,n)),o.width<1||o.height<1||n.width<1||n.height<1)continue;if(!co(n,o,Zt,Kt)&&!uo(n,o,Zt,Kt)){r.canvas.width!==1&&(r.canvas.width=1,r.canvas.height=1),r.strokeCanvas.width!==1&&(r.strokeCanvas.width=1,r.strokeCanvas.height=1);continue}const a=r.anchor.canvas,i=a.width|0,s=a.height|0;if(i<4||s<4)continue;const l=(n.left+n.right)*.5,d=(n.top+n.bottom)*.5,u=(o.left+o.right)*.5,h=(o.top+o.bottom)*.5,f=l-u,g=d-h,m=Math.max(n.left-o.right,o.left-n.right,0),p=Math.max(n.top-o.bottom,o.top-n.bottom,0),v=m>=p,x=lo(n,o);let R=1-Math.min(1,x/At);R=R*R*(3-2*R);const z=te+(qr-te)*R,E=Math.min(ee,z*Jr*Kr),T=r.anchor.scale??1,L=Math.max(Zr*T,r.hairlineWidth),H=Math.max(1,Math.round(L*t)),V=Math.max(1,Math.round(Math.max(eo*T,r.hairlineWidth)*t)),N=r.hairlineOuterCssPx;r.wrap.style.inset=`${-N}px`,r.wrap.style.borderRadius=`${Math.max(0,r.cornerRadius)}px`;const P=Math.max(1,Math.round((o.width+N*2)*t)),S=Math.max(1,Math.round((o.height+N*2)*t));r.canvas.width!==P&&(r.canvas.width=P),r.canvas.height!==S&&(r.canvas.height=S),r.strokeCanvas.width!==P&&(r.strokeCanvas.width=P),r.strokeCanvas.height!==S&&(r.strokeCanvas.height=S);const b=r.ctx;b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,P,S);const B=r.strokeCtx;B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,P,S);const G=Math.min(At*t,Math.max(P,S));let j,M,_,w;v?(j=f>0?P:0,_=f>0?P-G:G,M=S*.5,w=S*.5):(M=g>0?S:0,w=g>0?S-G:G,j=P*.5,_=P*.5);const C=b.createLinearGradient(j,M,_,w);C.addColorStop(0,`rgba(0,0,0,${Qr})`),C.addColorStop(.5,`rgba(0,0,0,${Xr})`),C.addColorStop(1,`rgba(0,0,0,${Yr})`);const $=i/t,A=Math.max(1,Math.round(oo*Math.max(.1,$/140)*t));let D,X,O,W,Z=!1,Et=!1;if(v){const st=Math.max(n.top,o.top),vt=Math.min(n.bottom,o.bottom);Z=!0,D=f>0?P-A:0,X=Math.round((st-o.top+N)*t),O=A,W=Math.max(1,Math.round((vt-st)*t))}else{const st=Math.max(n.left,o.left),vt=Math.min(n.right,o.right);Et=!0,D=Math.round((st-o.left+N)*t),X=g>0?S-A:0,O=Math.max(1,Math.round((vt-st)*t)),W=A}const zt={x:D,y:X,w:O,h:W,flipX:Z,flipY:Et},bt={x:0,y:0,w:P,h:S,r:Math.max(0,r.cornerRadius*t)},$e=Math.min(ee,E*no*ao*io);ho(b,a,i,s,P,S,$e,C,zt,bt,t),mo(B,a,i,s,P,S,bt,E,H,C,to,zt),go(B,bt,V,j,M,_,w,Math.min(.85,ro*E)),b.globalCompositeOperation="source-over",B.globalCompositeOperation="source-over"}}let kt=!1,oe=0;function Mo(){kt||(kt=!0,!(typeof requestAnimationFrame>"u")&&requestAnimationFrame(t=>{kt=!1,!(t-oe * { - pointer-events: auto; -} -.metal-fx-root[data-normalize='true'] .metal-fx-content > * { - background: transparent !important; - border: 0 !important; - outline: 0 !important; - box-shadow: none !important; - /* Sizing: we deliberately DO NOT force \`width: 100%; height: 100%\` on the - child here. That used to be the contract ("the wrapper is the visible - button surface; the child stretches to fill it"), but it created a cyclic - percentage dependency: the wrapper is \`inline-flex\` with no intrinsic - size, .metal-fx-content is \`width/height: 100%\` of the wrapper, and the - child was \`100%\` of .metal-fx-content. With nothing breaking the cycle, - icon-only / class-sized children collapsed. - - The new contract: the child sizes itself (intrinsic content, CSS class, - or inline style — all work), and the wrapper's \`inline-flex\` wraps it - tightly. Consumers who want a metal frame BIGGER than the child (e.g. - padding around an icon) size AND - explicitly set width/height on the child to fill (or accept that the - child renders at its intrinsic size, centered). - - Typography is intentionally NOT touched. We used to apply - \`color: inherit; font: inherit;\` here to "match" the wrapper, but - \`font: inherit\` is a shorthand that overrides font-family, font-size, - font-weight, AND line-height on the child — which (a) shrank the - button height (line-height changes propagate through the flex - content box) and (b) scaled em-based icons / font-icons inside the - child to whatever the wrapper inherited. The wrapper now stays out - of the child's typography entirely; consumers who want typographic - normalization can apply it themselves on the child element. */ -} - -[data-metal-fx-reflection] { - position: absolute; - inset: 0; - pointer-events: none; - border-radius: inherit; - overflow: hidden; - z-index: 0; - isolation: isolate; -} -.metal-fx-reflection-canvas { - position: absolute; - inset: 0; - width: 100%; - height: 100%; - display: block; - filter: blur(4px) saturate(1.2) brightness(1.58); -} -.metal-fx-reflection-stroke-canvas { - position: absolute; - inset: 0; - width: 100%; - height: 100%; - display: block; - filter: saturate(1.35) brightness(1.75); -} -/* Hosts that participate as reflection targets need positioning + isolation - so the wrap composites only against the host (not the parent stack). The - wrap injects these inline as well, but stating them here keeps reflections - working on hosts that already have other inline styles applied. */ -[data-metal-fx-reflect-host] { - isolation: isolate; -} -`;let Ct=!1;function ko(){if(Ct||typeof document>"u")return;if(document.getElementById(ne)){Ct=!0;return}const t=document.createElement("style");t.id=ne,t.textContent=_o,document.head.appendChild(t),Ct=!0}ko();const Co={position:"absolute",inset:0,width:"100%",height:"100%"},So={position:"absolute",inset:3},Ro={position:"absolute",inset:0,pointerEvents:"none",zIndex:3,borderRadius:"inherit"},gt=new Map;mr((t,e)=>{const r=gt.get(t);r&&Vr(r.handles,t,e,t.opacityMul,r.themeRef.current)});function To(t){const[e,r]=k.useState(()=>t!=="auto"?t:typeof window>"u"||!window.matchMedia||window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return k.useEffect(()=>{if(t!=="auto"){r(t);return}if(typeof window>"u"||!window.matchMedia)return;const o=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>r(o.matches?"dark":"light");return n(),o.addEventListener("change",n),()=>o.removeEventListener("change",n)},[t]),e}const ke=k.forwardRef(function({children:t,variant:e="button",preset:r="chromatic",theme:o="auto",strength:n=1,paused:a=!1,borderRadius:i,normalizeHostStyles:s=!0,reflectionTargets:l,disableGlow:d=!1,shaderScale:u,ringCssPx:h,scale:f=1,className:g,style:m,...p},v){const x=k.useRef(null),R=k.useRef(null),z=k.useRef(null),E=k.useRef(null),T=k.useRef(null),L=k.useRef(null),H=k.useRef("dark"),V=k.useRef(0),[N,P]=k.useState(!1),S=To(o);H.current=S;const b=e==="circle"?"circle":"pill",B=!d;k.useImperativeHandle(v,()=>x.current,[]);const G=(M,_)=>{if(b==="circle")return Math.min(M,_)/2;const w=typeof i=="number"?i:(()=>{var C;const $=(C=E.current)==null?void 0:C.firstElementChild;if($){const A=parseFloat(getComputedStyle($).borderTopLeftRadius);if(Number.isFinite(A)&&A>0)return A}return V.current})();return Math.min(w,Math.min(M,_)/2)};k.useEffect(()=>{hr(r,S)},[r,S]),k.useEffect(()=>{const M=T.current;M&<(M,{paused:a})},[a]),k.useEffect(()=>{const M=T.current;if(!M)return;const _={};u!==void 0&&(_.shaderScale=u),h!==void 0&&(_.ringCssPx=h),f!==void 0&&(_.scale=f),Object.keys(_).length>0&<(M,_)},[u,h,f]),k.useLayoutEffect(()=>{const M=R.current,_=x.current,w=z.current;if(!M||!_)return;{const O=getComputedStyle(_),W=parseFloat(O.borderTopLeftRadius);V.current=Number.isFinite(W)?W:0}const C=()=>{const O=_.getBoundingClientRect(),W=Math.max(1,Math.round(O.width)),Z=Math.max(1,Math.round(O.height));return{cssWidth:W,cssHeight:Z,cornerRadius:G(W,Z)}},$=C();T.current=cr({hostCanvas:M,cssWidth:$.cssWidth,cssHeight:$.cssHeight,cornerRadius:$.cornerRadius,kind:b,paused:a,shaderScale:u,ringCssPx:h,scale:f,onFirstCopy:()=>P(!0)}),_.style.setProperty("--mfx-radius",`${$.cornerRadius}px`),_.style.borderRadius=`${$.cornerRadius}px`,w&&(L.current=Jt(w,{width:$.cssWidth,height:$.cssHeight,cornerRadius:$.cornerRadius,kind:b,scale:f}));let A=0;const D=new ResizeObserver(()=>{A===0&&(A=requestAnimationFrame(()=>{A=0;const O=C(),W=T.current;W&&(lt(W,{cssWidth:O.cssWidth,cssHeight:O.cssHeight,cornerRadius:O.cornerRadius}),_.style.setProperty("--mfx-radius",`${O.cornerRadius}px`),_.style.borderRadius=`${O.cornerRadius}px`,w&&(w.innerHTML="",L.current=Jt(w,{width:O.cssWidth,height:O.cssHeight,cornerRadius:O.cornerRadius,kind:b,scale:f}),W&&L.current&>.set(W,{handles:L.current,themeRef:H})))}))});D.observe(_);let X=null;return typeof IntersectionObserver<"u"&&(X=new IntersectionObserver(O=>{const W=T.current;if(W)for(const Z of O)pr(W,Z.isIntersecting)},{rootMargin:"64px"}),X.observe(_)),T.current&&L.current&&(gt.set(T.current,{handles:L.current,themeRef:H}),ur(T.current)),()=>{D.disconnect(),X==null||X.disconnect(),A!==0&&cancelAnimationFrame(A);const O=T.current;O&&(gt.delete(O),fr(O),dr(O)),T.current=null,L.current=null,w&&(w.innerHTML="")}},[b]),k.useEffect(()=>{const M=T.current;M&<(M,{opacityMul:Math.max(0,Math.min(1,n))})},[n,e]),k.useEffect(()=>{const M=T.current,_=x.current;if(!M||!_||!l||S!=="dark")return;M.onAfterFrame=Mo;const w=l.flatMap(C=>C.current?[C.current]:[]);for(const C of w)vo(C,M,_);return()=>{M.onAfterFrame=void 0;for(const C of w)wo(C)}},[l,S]),k.useEffect(()=>{const M=x.current,_=T.current;if(!M||!_)return;const w=G(_.cssWidth,_.cssHeight);lt(_,{cornerRadius:w}),M.style.setProperty("--mfx-radius",`${w}px`),M.style.borderRadius=`${w}px`},[i,S,e,b]);const j=k.useMemo(()=>({...m,"--mfx-strength":String(Math.min(1,Math.max(0,n))),opacity:N?1:0,visibility:N?"visible":"hidden",transition:N?"opacity 0.15s ease-out":"none"}),[m,n,N]);return Q.jsxs("div",{...p,ref:x,className:g?`metal-fx-root ${g}`:"metal-fx-root","data-variant":e,"data-shape":b,"data-theme":S,"data-paused":a?"true":void 0,"data-normalize":s?"true":"false",style:j,children:[Q.jsx("canvas",{ref:R,className:"metal-fx-canvas",style:Co}),Q.jsx("div",{className:"metal-fx-inner","aria-hidden":"true",style:So}),Q.jsx("div",{ref:z,"aria-hidden":"true",style:{...Ro,display:B?void 0:"none"}}),Q.jsx("div",{ref:E,className:"metal-fx-content",children:t})]})});ke.displayName="MetalFx";function Ce(t){var e,r,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e{const e=Io(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=t;return{getClassGroupId:i=>{const s=i.split(Ft);return s[0]===""&&s.length!==1&&s.shift(),Se(s,e)||$o(i)},getConflictingClassGroupIds:(i,s)=>{const l=r[i]||[];return s&&o[i]?[...l,...o[i]]:l}}},Se=(t,e)=>{var i;if(t.length===0)return e.classGroupId;const r=t[0],o=e.nextPart.get(r),n=o?Se(t.slice(1),o):void 0;if(n)return n;if(e.validators.length===0)return;const a=t.join(Ft);return(i=e.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},ae=/^\[(.+)\]$/,$o=t=>{if(ae.test(t)){const e=ae.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},Io=t=>{const{theme:e,prefix:r}=t,o={nextPart:new Map,validators:[]};return Fo(Object.entries(t.classGroups),r).forEach(([a,i])=>{Pt(i,o,a,e)}),o},Pt=(t,e,r,o)=>{t.forEach(n=>{if(typeof n=="string"){const a=n===""?e:ie(e,n);a.classGroupId=r;return}if(typeof n=="function"){if(Oo(n)){Pt(n(o),e,r,o);return}e.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,i])=>{Pt(i,ie(e,a),r,o)})})},ie=(t,e)=>{let r=t;return e.split(Ft).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Oo=t=>t.isThemeGetter,Fo=(t,e)=>e?t.map(([r,o])=>{const n=o.map(a=>typeof a=="string"?e+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[e+i,s])):a);return[r,n]}):t,Eo=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,o=new Map;const n=(a,i)=>{r.set(a,i),e++,e>t&&(e=0,o=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return n(a,i),i},set(a,i){r.has(a)?r.set(a,i):n(a,i)}}},Re="!",zo=t=>{const{separator:e,experimentalParseClassName:r}=t,o=e.length===1,n=e[0],a=e.length,i=s=>{const l=[];let d=0,u=0,h;for(let v=0;vu?h-u:void 0;return{modifiers:l,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:p}};return r?s=>r({className:s,parseClassName:i}):i},Lo=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(o=>{o[0]==="["?(e.push(...r.sort(),o),r=[]):r.push(o)}),e.push(...r.sort()),e},Go=t=>({cache:Eo(t.cacheSize),parseClassName:zo(t),...Po(t)}),Wo=/\s+/,No=(t,e)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=e,a=[],i=t.trim().split(Wo);let s="";for(let l=i.length-1;l>=0;l-=1){const d=i[l],{modifiers:u,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:g}=r(d);let m=!!g,p=o(m?f.substring(0,g):f);if(!p){if(!m){s=d+(s.length>0?" "+s:s);continue}if(p=o(f),!p){s=d+(s.length>0?" "+s:s);continue}m=!1}const v=Lo(u).join(":"),x=h?v+Re:v,R=x+p;if(a.includes(R))continue;a.push(R);const z=n(p,m);for(let E=0;E0?" "+s:s)}return s};function Bo(){let t=0,e,r,o="";for(;t{if(typeof t=="string")return t;let e,r="";for(let o=0;oh(u),t());return r=Go(d),o=r.cache.get,n=r.cache.set,a=s,s(l)}function s(l){const d=o(l);if(d)return d;const u=No(l,r);return n(l,u),u}return function(){return a(Bo.apply(null,arguments))}}const I=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},Ae=/^\[(?:([a-z-]+):)?(.+)\]$/i,jo=/^\d+\/\d+$/,Uo=new Set(["px","full","screen"]),Do=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Vo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Qo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,q=t=>nt(t)||Uo.has(t)||jo.test(t),J=t=>it(t,"length",on),nt=t=>!!t&&!Number.isNaN(Number(t)),St=t=>it(t,"number",nt),ct=t=>!!t&&Number.isInteger(Number(t)),Yo=t=>t.endsWith("%")&&nt(t.slice(0,-1)),y=t=>Ae.test(t),K=t=>Do.test(t),Jo=new Set(["length","size","percentage"]),Ko=t=>it(t,Jo,Pe),Zo=t=>it(t,"position",Pe),tn=new Set(["image","url"]),en=t=>it(t,tn,an),rn=t=>it(t,"",nn),dt=()=>!0,it=(t,e,r)=>{const o=Ae.exec(t);return o?o[1]?typeof e=="string"?o[1]===e:e.has(o[1]):r(o[2]):!1},on=t=>Vo.test(t)&&!qo.test(t),Pe=()=>!1,nn=t=>Qo.test(t),an=t=>Xo.test(t),sn=()=>{const t=I("colors"),e=I("spacing"),r=I("blur"),o=I("brightness"),n=I("borderColor"),a=I("borderRadius"),i=I("borderSpacing"),s=I("borderWidth"),l=I("contrast"),d=I("grayscale"),u=I("hueRotate"),h=I("invert"),f=I("gap"),g=I("gradientColorStops"),m=I("gradientColorStopPositions"),p=I("inset"),v=I("margin"),x=I("opacity"),R=I("padding"),z=I("saturate"),E=I("scale"),T=I("sepia"),L=I("skew"),H=I("space"),V=I("translate"),N=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto",y,e],b=()=>[y,e],B=()=>["",q,J],G=()=>["auto",nt,y],j=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],M=()=>["solid","dashed","dotted","double","none"],_=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],w=()=>["start","end","center","between","around","evenly","stretch"],C=()=>["","0",y],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>[nt,y];return{cacheSize:500,separator:":",theme:{colors:[dt],spacing:[q,J],blur:["none","",K,y],brightness:A(),borderColor:[t],borderRadius:["none","","full",K,y],borderSpacing:b(),borderWidth:B(),contrast:A(),grayscale:C(),hueRotate:A(),invert:C(),gap:b(),gradientColorStops:[t],gradientColorStopPositions:[Yo,J],inset:S(),margin:S(),opacity:A(),padding:b(),saturate:A(),scale:A(),sepia:C(),skew:A(),space:b(),translate:b()},classGroups:{aspect:[{aspect:["auto","square","video",y]}],container:["container"],columns:[{columns:[K]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...j(),y]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ct,y]}],basis:[{basis:S()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",y]}],grow:[{grow:C()}],shrink:[{shrink:C()}],order:[{order:["first","last","none",ct,y]}],"grid-cols":[{"grid-cols":[dt]}],"col-start-end":[{col:["auto",{span:["full",ct,y]},y]}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":[dt]}],"row-start-end":[{row:["auto",{span:[ct,y]},y]}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",y]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...w()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...w(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...w(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[H]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",y,e]}],"min-w":[{"min-w":[y,e,"min","max","fit"]}],"max-w":[{"max-w":[y,e,"none","full","min","max","fit","prose",{screen:[K]},K]}],h:[{h:[y,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[y,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[y,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[y,e,"auto","min","max","fit"]}],"font-size":[{text:["base",K,J]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",St]}],"font-family":[{font:[dt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",y]}],"line-clamp":[{"line-clamp":["none",nt,St]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",q,y]}],"list-image":[{"list-image":["none",y]}],"list-style-type":[{list:["none","disc","decimal",y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...M(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",q,J]}],"underline-offset":[{"underline-offset":["auto",q,y]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:b()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...j(),Zo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ko]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},en]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...M(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:M()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...M()]}],"outline-offset":[{"outline-offset":[q,y]}],"outline-w":[{outline:[q,J]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[q,J]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",K,rn]}],"shadow-color":[{shadow:[dt]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",K,y]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[h]}],saturate:[{saturate:[z]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[z]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",y]}],duration:[{duration:A()}],ease:[{ease:["linear","in","out","in-out",y]}],delay:[{delay:A()}],animate:[{animate:["none","spin","ping","pulse","bounce",y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[ct,y]}],"translate-x":[{"translate-x":[V]}],"translate-y":[{"translate-y":[V]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",y]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",y]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":b()}],"scroll-mx":[{"scroll-mx":b()}],"scroll-my":[{"scroll-my":b()}],"scroll-ms":[{"scroll-ms":b()}],"scroll-me":[{"scroll-me":b()}],"scroll-mt":[{"scroll-mt":b()}],"scroll-mr":[{"scroll-mr":b()}],"scroll-mb":[{"scroll-mb":b()}],"scroll-ml":[{"scroll-ml":b()}],"scroll-p":[{"scroll-p":b()}],"scroll-px":[{"scroll-px":b()}],"scroll-py":[{"scroll-py":b()}],"scroll-ps":[{"scroll-ps":b()}],"scroll-pe":[{"scroll-pe":b()}],"scroll-pt":[{"scroll-pt":b()}],"scroll-pr":[{"scroll-pr":b()}],"scroll-pb":[{"scroll-pb":b()}],"scroll-pl":[{"scroll-pl":b()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",y]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[q,J,St]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},ln=Ho(sn);function cn(...t){return ln(Ao(t))}function un({asChild:t=!1,children:e,className:r,type:o,...n}){const{colorMode:a}=Ie(),i=t?Ee:"button";return Q.jsx(ke,{className:"public-gold-metal-frame",preset:"gold",variant:"button",theme:a,strength:.9,ringCssPx:2,scale:1.04,children:Q.jsx(i,{className:cn("public-btn-primary",r),...t?{}:{type:o??"button"},...n,children:e})})}export{un as P,cn as c}; diff --git a/dist/assets/RegisterPage-BbT7Ul1-.js b/dist/assets/RegisterPage-BbT7Ul1-.js deleted file mode 100644 index e803c0aa..00000000 --- a/dist/assets/RegisterPage-BbT7Ul1-.js +++ /dev/null @@ -1 +0,0 @@ -import{a as M,b as I,u as L,r as s,c as R,j as e,N as G,L as C,i as W,d as q,P as T,e as V,p as K,v as Y}from"./index-D-wwVRoV.js";import{M as $,X as J}from"./MarketingShell-BgYQ8Cfp.js";import{n as r}from"./notifications-BfjEGrJX.js";import{E as U,a as X,K as Q}from"./key-round-BLVtnvIK.js";function Z(){return e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true",children:[e.jsx("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),e.jsx("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),e.jsx("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l3.66-2.84z"}),e.jsx("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]})}function ee(){return e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 256 256","aria-hidden":"true",children:[e.jsx("circle",{cx:"128",cy:"128",r:"128",fill:"#A6CE39"}),e.jsx("path",{fill:"#fff",d:"M86.3 186.2H70.9V79.1h15.4v107.1zM108.9 79.1h41.6c39.6 0 57 28.3 57 53.6 0 27.5-21.5 53.6-56.8 53.6h-41.8V79.1zm15.4 93.3h25.8c27.9 0 40.6-18.5 40.6-39.7 0-18.5-10.7-39.7-41.1-39.7h-25.3v79.4zM88.7 56.8c0 5.5-4.5 10.1-10.1 10.1s-10.1-4.6-10.1-10.1c0-5.6 4.5-10.1 10.1-10.1s10.1 4.5 10.1 10.1z"})]})}function ie(){const[d]=M(),u=I(),{isAuthenticated:N,isLoading:F,register:S,loginWithProvider:k}=L(),h=d.get("next")||"/app",p=d.get("academic")==="1"||d.get("plan")==="student",[b,D]=s.useState(""),[l,B]=s.useState(""),[x,E]=s.useState(""),[m,P]=s.useState(!1),[f,g]=s.useState(!1),[o,A]=s.useState(null),[i,_]=s.useState(R),j=W(),v=q(),O=j||v,H=i.fallbackEnabled?"email":"supertokens";if(s.useEffect(()=>{let t=!0;return(async()=>{const c=await K({timeoutMs:400});t&&_(c)})(),()=>{t=!1}},[]),F)return null;if(N)return e.jsx(G,{to:h,replace:!0});const w=async t=>{A(t);try{await k(t)}catch(n){r.error(n instanceof Error?n.message:`${t} sign-in failed.`),A(null)}},z=async t=>{var n,c;if(t.preventDefault(),!l||!x){r.error("Please fill in all required fields.");return}g(!0);try{const y=await S({method:H,name:b,email:l,password:x,returnTo:h});if(!y.ok){r.error(y.error||"Registration failed. Please try again.");return}if(p)try{const a=await Y(l);if(a.valid&&((n=a.delivery)==null?void 0:n.status)==="sent"&&a.delivery.pending_website_path){r.success("Account created. Check your academic inbox for the verification link."),u(a.delivery.pending_website_path,{replace:!0});return}if(a.valid&&((c=a.confirmation)!=null&&c.website_path)){r.success("Account created. Confirming your academic email now…"),u(a.confirmation.website_path,{replace:!0});return}r.info(a.valid?"Account created. Academic confirmation is available after sign-in from the verification link.":"Account created. This address does not qualify for the Student plan, so the account remains on Free.")}catch(a){r.info(a instanceof Error?`Account created. Academic confirmation is not available right now: ${a.message}`:"Account created. Academic confirmation is not available right now.")}r.success("Account created. Welcome to ScriptoriumAI!"),u(h,{replace:!0})}finally{g(!1)}};return e.jsx($,{children:e.jsx("section",{className:"flex min-h-[calc(100vh-5rem)] flex-col items-center justify-center px-4 py-12",children:e.jsxs("div",{className:"relative w-full max-w-md rounded-3xl border border-[#D8CBAF]/15 bg-[#0A0E19]/80 p-8 shadow-[0_24px_80px_rgba(2,6,23,0.64),0_0_0_1px_rgba(148,163,184,0.06)] backdrop-blur-2xl md:p-10",children:[e.jsx(C,{to:"/","aria-label":"Go back to home",className:"absolute right-4 top-4 flex h-8 w-8 items-center justify-center rounded-full border border-[#D8CBAF]/20 bg-[#0A0E19]/60 text-[#8A9099] transition-colors hover:border-[#D8CBAF]/50 hover:text-[#D8CBAF]",children:e.jsx(J,{size:14})}),e.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-[#D8CBAF]",children:"Get Started"}),e.jsx("h1",{className:"mt-3 text-3xl font-semibold md:text-4xl",children:"Create your ScriptoriumAI account"}),e.jsx("p",{className:"mt-3 text-sm text-[#8A9099]",children:"Start writing, compiling, and collaborating on your first project in minutes."}),p?e.jsx("p",{className:"mt-3 rounded-xl border border-[#D8CBAF]/20 bg-[#D8CBAF]/5 px-4 py-3 text-xs text-[#D8CBAF]","data-testid":"register-academic-intent-note",children:"Use your academic email address here. After account creation, ScriptoriumAI will send or generate the verification step needed to activate the Student plan for this deployment."}):null,i.loaded&&i.reachable&&i.source==="config_json"?e.jsx("p",{className:"mt-1 text-xs text-amber-300","data-testid":"register-auth-health-config-fallback-note",children:"Auth policy loaded from config snapshot. Live auth health endpoint was not reachable."}):null,i.loaded&&!i.reachable?e.jsx("p",{className:"mt-1 text-xs text-amber-300","data-testid":"register-auth-health-unreachable-note",children:"Auth runtime health endpoint is currently unreachable. Fallback defaults are in effect."}):null,e.jsxs("form",{className:"mt-8 space-y-4",onSubmit:t=>void z(t),children:[O&&e.jsxs("div",{className:"space-y-3 pb-2",children:[j&&e.jsxs("button",{type:"button",onClick:()=>void w("google"),disabled:o!==null,className:"inline-flex w-full items-center justify-center gap-3 rounded-xl border border-white/20 bg-white/5 px-4 py-3 text-sm font-medium text-[#F4F6F8] transition hover:bg-white/10 disabled:opacity-60",children:[e.jsx(Z,{}),o==="google"?"Redirecting…":"Continue with Google"]}),v&&e.jsxs("button",{type:"button",onClick:()=>void w("orcid"),disabled:o!==null,className:"inline-flex w-full items-center justify-center gap-3 rounded-xl border border-white/20 bg-white/5 px-4 py-3 text-sm font-medium text-[#F4F6F8] transition hover:bg-white/10 disabled:opacity-60",children:[e.jsx(ee,{}),o==="orcid"?"Redirecting…":"Continue with ORCID"]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-px flex-1 bg-white/10"}),e.jsx("span",{className:"text-xs text-[#8A9099]",children:"or register with email"}),e.jsx("div",{className:"h-px flex-1 bg-white/10"})]})]}),e.jsxs("label",{className:"block",children:[e.jsx("span",{className:"mb-2 block text-sm text-[#8A9099]",children:"Full name"}),e.jsx("input",{type:"text",value:b,onChange:t=>D(t.target.value),className:"w-full rounded-xl border border-white/20 bg-black/20 px-4 py-3 text-sm outline-none transition focus:border-[#D8CBAF]/70",placeholder:"Jane Doe"})]}),e.jsxs("label",{className:"block",children:[e.jsxs("span",{className:"mb-2 block text-sm text-[#8A9099]",children:["Work email ",e.jsx("span",{className:"text-[#D8CBAF]",children:"*"})]}),e.jsx("input",{type:"email",value:l,onChange:t=>B(t.target.value),required:!0,className:"w-full rounded-xl border border-white/20 bg-black/20 px-4 py-3 text-sm outline-none transition focus:border-[#D8CBAF]/70",placeholder:"you@company.com"})]}),e.jsxs("label",{className:"block",children:[e.jsxs("span",{className:"mb-2 block text-sm text-[#8A9099]",children:["Password ",e.jsx("span",{className:"text-[#D8CBAF]",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:m?"text":"password",value:x,onChange:t=>E(t.target.value),required:!0,minLength:8,className:"w-full rounded-xl border border-white/20 bg-black/20 px-4 py-3 pr-10 text-sm outline-none transition focus:border-[#D8CBAF]/70",placeholder:T}),e.jsx("button",{type:"button",onClick:()=>P(t=>!t),className:"absolute right-3 top-1/2 -translate-y-1/2 text-[#8A9099] hover:text-[#D8CBAF] transition-colors","aria-label":m?"Hide password":"Show password",children:m?e.jsx(U,{size:16}):e.jsx(X,{size:16})})]}),e.jsx("span",{className:"mt-2 block text-xs text-[#8A9099]","data-testid":"register-password-note",children:V})]}),e.jsxs("button",{type:"submit",disabled:f,className:"inline-flex w-full items-center justify-center gap-2 rounded-xl border border-[#D8CBAF]/50 bg-[#D8CBAF]/15 px-4 py-3 text-sm font-medium text-[#F4F6F8] transition hover:bg-[#D8CBAF]/25 disabled:opacity-60",children:[e.jsx(Q,{size:16}),f?"Creating account...":"Create Account"]}),e.jsxs("p",{className:"text-center text-xs text-[#8A9099]",children:["Already have an account?"," ",e.jsx(C,{to:"/login",className:"text-[#D8CBAF] hover:underline",children:"Sign in"})]})]})]})})})}export{ie as RegisterPage}; diff --git a/dist/assets/ShippingPaymentPage-BVPweEr5.js b/dist/assets/ShippingPaymentPage-BVPweEr5.js deleted file mode 100644 index 93684aff..00000000 --- a/dist/assets/ShippingPaymentPage-BVPweEr5.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./index-D-wwVRoV.js";import{b as n}from"./MarketingShell-BgYQ8Cfp.js";import{L as r}from"./LegalPageLayout-B12TU0j9.js";import{P as i}from"./PolicyArticle-s4Nnon3-.js";const a=[{title:"1. Delivery model",paragraphs:[`${n.brandName} is primarily a digital subscription and software-access service. Unless a specific offer expressly states otherwise, products are delivered electronically and no physical shipping takes place.`,"This page also explains how payment, renewal, and any separately offered physical shipments are handled."]},{title:"2. Digital delivery and activation",paragraphs:["Digital access is generally provided after successful order confirmation, account creation or sign-in, and any plan-specific verification steps required for the selected offering.","Some entitlements, such as academic or student discounts, may depend on successful academic email verification. If verification is pending, access may be limited to the applicable pre-verification or fallback state until the verification flow is completed.","No shipping costs apply to purely digital orders."]},{title:"3. Subscription billing and renewal cadence",paragraphs:["Paid plans are billed in advance on the monthly or annual cadence shown at checkout or in the accepted commercial quote.","Unless otherwise stated in a separate enterprise agreement, subscriptions renew automatically for the next billing period until cancelled for future billing periods. Cancellation stops future renewal and does not retroactively cancel the already active paid period.","Free trials, educational discounts, seat-based discounts, or enterprise invoicing terms may be subject to the specific conditions shown in the corresponding offer, quote, or checkout flow."]},{title:"4. Payment methods and billing providers",paragraphs:[e.jsxs(e.Fragment,{children:["Available payment methods are shown at checkout. Depending on the commercial path, payments may be processed through ",n.payment.provider," and its supported payment rails, or through an agreed invoice or purchase-order workflow for larger business customers."]}),"Where offered, invoice, purchase-order, or wire-transfer terms for business customers may be subject to prior approval, credit review, or signed commercial terms.","Your card statement, invoice, or billing email may reference the billing provider rather than only the ScriptoriumAI brand."]},{title:"5. Prices, taxes, currency, and invoicing",paragraphs:["All applicable prices, billing intervals, and taxes are displayed before the order is completed. Currency and tax treatment may vary based on billing country, customer type, and checkout configuration.","If VAT, sales tax, or similar indirect taxes apply, they are shown or calculated according to the legally required billing treatment. For business purchases, you may be asked for billing and tax details needed to issue a compliant invoice."]},{title:"6. Failed payments, reversals, and access restriction",paragraphs:["If a payment attempt fails, is declined, expires, or is reversed, we may retry the charge, request an updated payment method, suspend premium entitlements, or downgrade access until the billing issue is resolved.","Chargebacks or payment disputes do not automatically cancel an account or subscription and may lead to temporary suspension while the issue is investigated."]},{title:"7. Physical shipping if separately offered",paragraphs:["If a specific offer includes a physical component, the relevant shipping region, dispatch estimate, carrier information, and any shipping charges will be shown in the product description or checkout flow for that offer.","Delivery estimates for physical goods are indicative unless we expressly promise a binding delivery date. Import duties, customs fees, or similar destination charges are borne by the recipient unless stated otherwise.","Please provide an accurate delivery address. We are not responsible for delays or additional costs caused by incomplete or incorrect shipping information supplied by the customer."]},{title:"8. Questions, missing confirmations, and support",paragraphs:[e.jsxs(e.Fragment,{children:["If you do not receive an expected order confirmation, invoice, or activation notice within a reasonable time, contact ",e.jsx("a",{href:n.contact.emailHref,className:"text-[#D8CBAF] underline underline-offset-2",children:n.contact.email}),"."]}),"Refund, consumer withdrawal, and contract-right questions are governed by the separate Withdrawal and Terms pages."]}],t=[{title:"1. Liefermodell",paragraphs:[`${n.brandName} ist vorrangig ein digitales Abonnement- und Softwarezugangsangebot. Soweit ein konkretes Angebot nicht ausdruecklich etwas anderes vorsieht, erfolgt die Bereitstellung elektronisch und es findet kein physischer Versand statt.`,"Diese Seite erlaeutert ausserdem die Behandlung von Zahlung, Verlaengerung und etwa gesondert angebotenen physischen Lieferungen."]},{title:"2. Digitale Bereitstellung und Aktivierung",paragraphs:["Digitaler Zugang wird im Regelfall nach erfolgreicher Bestellbestaetigung, Kontoanlage oder Anmeldung sowie nach Abschluss etwaiger fuer den gewaehlten Tarif erforderlicher Verifikationsschritte bereitgestellt.","Bestimmte Berechtigungen, etwa akademische oder studentische Rabatte, koennen von einer erfolgreichen Verifikation einer akademischen E-Mail-Adresse abhaengen. Solange diese Verifikation aussteht, kann der Zugang auf den vorlaeufigen oder ersatzweisen Zustand beschraenkt sein, bis der Verifikationsablauf abgeschlossen ist.","Fuer rein digitale Bestellungen fallen keine Versandkosten an."]},{title:"3. Abrechnungsrhythmus und Verlaengerung",paragraphs:["Bezahlte Tarife werden im Voraus entsprechend dem im Checkout oder im angenommenen kommerziellen Angebot ausgewiesenen monatlichen oder jaehrlichen Rhythmus berechnet.","Soweit keine gesonderte Enterprise-Vereinbarung etwas anderes bestimmt, verlaengern sich Abonnements automatisch um die naechste Abrechnungsperiode, bis sie mit Wirkung fuer kuenftige Abrechnungsperioden gekuendigt werden. Eine Kuendigung stoppt die kuenftige Verlaengerung und beendet nicht rueckwirkend die bereits laufende bezahlte Periode.","Kostenlose Testphasen, Bildungsrabatte, Sitzplatzrabatte oder Enterprise-Rechnungskonditionen koennen den besonderen Bedingungen unterliegen, die im jeweiligen Angebot, Kostenvoranschlag oder Checkout ausgewiesen werden."]},{title:"4. Zahlungsarten und Billing-Anbieter",paragraphs:[e.jsxs(e.Fragment,{children:["Verfuegbare Zahlungsarten werden im Checkout angezeigt. Je nach kommerziellem Pfad koennen Zahlungen ueber ",n.payment.provider," und die dort unterstuetzten Zahlungswege oder ueber einen vereinbarten Rechnungs- oder Purchase-Order-Prozess fuer groessere Geschaeftskunden abgewickelt werden."]}),"Soweit angeboten, koennen Rechnungs-, Purchase-Order- oder Ueberweisungsbedingungen fuer Geschaeftskunden von einer vorherigen Freigabe, Bonitaetspruefung oder unterzeichneten kommerziellen Vereinbarung abhaengen.","Auf Kartenabrechnung, Rechnung oder Billing-E-Mail kann der Billing-Anbieter genannt sein und nicht ausschliesslich die Marke ScriptoriumAI."]},{title:"5. Preise, Steuern, Waehrung und Rechnungsstellung",paragraphs:["Alle einschlaegigen Preise, Abrechnungsintervalle und Steuern werden angezeigt, bevor die Bestellung abgeschlossen wird. Waehrung und Steuerbehandlung koennen je nach Rechnungsland, Kundentyp und Checkout-Konfiguration variieren.","Wenn Umsatzsteuer, Sales Tax oder vergleichbare indirekte Steuern anfallen, werden sie gemaess der rechtlich erforderlichen Billing-Behandlung ausgewiesen oder berechnet. Bei Business-Kaeufen koennen wir Rechnungs- und Steuerangaben anfordern, die fuer eine ordnungsgemaesse Rechnung erforderlich sind."]},{title:"6. Fehlgeschlagene Zahlungen, Rueckbelastungen und Zugangsbeschraenkung",paragraphs:["Wenn ein Zahlungsversuch fehlschlaegt, abgelehnt wird, auslaeuft oder rueckbelastet wird, duerfen wir die Belastung erneut versuchen, eine aktualisierte Zahlungsmethode anfordern, Premium-Berechtigungen aussetzen oder den Zugang herabstufen, bis das Billing-Problem geloest ist.","Chargebacks oder Zahlungsstreitigkeiten kuendigen ein Konto oder Abonnement nicht automatisch und koennen waehrend der Klaerung zu einer temporaeren Sperrung fuehren."]},{title:"7. Physischer Versand, falls gesondert angeboten",paragraphs:["Wenn ein konkretes Angebot eine physische Komponente enthaelt, werden Versandregion, Versandprognose, Carrier-Informationen und etwaige Versandkosten in der Produktbeschreibung oder im Checkout dieses Angebots ausgewiesen.","Lieferzeitangaben fuer physische Waren sind grundsaetzlich unverbindliche Schaetzungen, solange wir nicht ausdruecklich einen verbindlichen Liefertermin zusagen. Einfuhrabgaben, Zollgebuehren oder vergleichbare zielstaatsbezogene Kosten traegt der Empfaenger, sofern nichts anderes angegeben ist.","Bitte geben Sie eine zutreffende Lieferadresse an. Fuer Verzoegerungen oder Zusatzkosten aufgrund unvollstaendiger oder unrichtiger Versandangaben des Kunden haften wir nicht."]},{title:"8. Rueckfragen, fehlende Bestaetigungen und Support",paragraphs:[e.jsxs(e.Fragment,{children:["Wenn Sie innerhalb angemessener Zeit keine erwartete Bestellbestaetigung, Rechnung oder Aktivierungsnachricht erhalten, kontaktieren Sie bitte ",e.jsx("a",{href:n.contact.emailHref,className:"text-[#D8CBAF] underline underline-offset-2",children:n.contact.email}),"."]}),"Fragen zu Erstattungen, Verbraucherwiderruf oder vertraglichen Rechten richten sich nach den gesonderten Seiten Widerruf und AGB."]}];function c(){return e.jsxs(r,{badge:"Shipping & Payment",title:"Shipping & Payment / Versand & Zahlung",description:`This page now reflects ${n.brandName} as a digital subscription service first, while still covering invoice flows and any separately offered physical shipment scenario.`,panelTitle:"Commercial Operations",panelItems:["Digital delivery first, no shipping for SaaS access","Recurring monthly or annual billing","Billing-provider and invoice/PO handling","Fallback rules for any physical shipment"],children:[e.jsx(i,{heading:"Shipping & Payment (English)",subheading:"Operational rules for digital access, recurring billing, invoice handling, and any separately listed physical deliveries.",sections:a}),e.jsx(i,{heading:"Versand & Zahlung (Deutsch)",subheading:"Betriebliche Regeln fuer digitalen Zugang, wiederkehrende Abrechnung, Rechnungsabwicklung und etwa gesondert ausgewiesene physische Lieferungen.",sections:t})]})}export{c as ShippingPaymentPage}; diff --git a/dist/assets/SupportPage-CTKn1axq.js b/dist/assets/SupportPage-CTKn1axq.js deleted file mode 100644 index 74a26e27..00000000 --- a/dist/assets/SupportPage-CTKn1axq.js +++ /dev/null @@ -1,24 +0,0 @@ -import{r as a,u as P,j as e,L as p}from"./index-D-wwVRoV.js";import{c as h,M as D,C as I}from"./MarketingShell-BgYQ8Cfp.js";import{P as i}from"./PublicPrimaryButton-FdcHLbCt.js";import{B as L}from"./bot-Dw4nx5z7.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const E=h("LifeBuoy",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.93 4.93 4.24 4.24",key:"1ymg45"}],["path",{d:"m14.83 9.17 4.24-4.24",key:"1cb5xl"}],["path",{d:"m14.83 14.83 4.24 4.24",key:"q42g0n"}],["path",{d:"m9.17 14.83-4.24 4.24",key:"bqpfvv"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const z=h("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const S=h("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const N=h("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),A="scriptoriumai",m={question:"Question",feedback:"Product Feedback",bug:"Bug Report",billing:"Billing & Plans",enterprise:"Enterprise / Studio Inquiry",other:"Other"},R=[{id:"helper-center",title:"Help Center",description:"Guides, playbooks, troubleshooting paths, and operator documentation for editor, runboard, and corpus workflows.",icon:L,actionLabel:"Open Help Center"},{id:"support-request",title:"Support Request",description:"Track account, billing, authentication, and platform incidents in one queue.",icon:E,actionLabel:"Submit Request"},{id:"feedback",title:"Questions & Feedback",description:"Have a question, feature request, or something to share? Use the form below — we read every message.",icon:S,actionLabel:"Use Form Below"}],O=[{q:"What is ScriptoriumAI?",a:"ScriptoriumAI is the only technical writing and scientific publishing platform that combines native LaTeX compile orchestration, real MuPDF rendering with bidirectional SyncTeX navigation, Git-native local history, structured AI Memory, citation intelligence, Memory Domain intelligence, workspace visualization, autonomous research-agent workflows, provider routing, and specialist studio surfaces in one unified architecture — running identically on desktop and web."},{q:"How does authentication work?",a:"Public pages are open to everyone. Your dashboard and document workspace are protected by secure session-based authentication. Register or sign in from the top navigation to access your projects."},{q:"What payment provider is used?",a:"Paddle is the billing provider. Plans are available on monthly or annual billing. The checkout surface is wired and ready; activation happens once production credentials are configured."},{q:"What formats does ScriptoriumAI support?",a:"LaTeX, Markdown, RST, HTML, Plain Text, PDF, BibTeX, CSV, JSON, YAML, XML, SVG, PNG/JPEG/WebP, MP4/WebM, ZIP/TAR.GZ, and SyncTeX. The corpus engine handles cross-format ingestion, comparison, and integrity reporting."},{q:"How do I access the operator runboard?",a:"The Runboard is available after sign-in. It exposes compile orchestration controls, cross-document compare operations, checkpoint/resume workflows, approval gates, and post-run retrospectives."},{q:"Can I self-host ScriptoriumAI?",a:"Yes. The server is a Node.js/Express service deployable via Docker, with a self-hosted collaborative editor backend. A Docker Compose scaffold is included. Studio plans include deployment control guidance and onboarding."},{q:"How does the affiliate marketplace work?",a:"ScriptoriumAI is launching with a broad affiliate marketplace rather than a separate agency or formal-partner tier. The public onboarding route explains marketplace rules, disclosure expectations, and tracking, while the affiliate resources page covers brand assets, tracking primitives, and compliance controls."}],C="inquiries@scriptoriumai.io";function X(){const[x,F]=a.useState(null),{isAuthenticated:g}=P(),[n,f]=a.useState("question"),[r,j]=a.useState(""),[o,y]=a.useState(""),[c,w]=a.useState(""),[l,k]=a.useState(""),[b,d]=a.useState("idle"),[v,u]=a.useState("");a.useEffect(()=>{if(window.Featurebase)return;const t=document.createElement("script");return t.src="https://do.featurebase.app/js/sdk.js",t.id="featurebase-sdk",t.async=!0,t.onload=()=>{const s=window;s.Featurebase&&s.Featurebase("initialize_changelog_widget",{organization:A,theme:"dark",placement:"right",fullscreenPopup:!1,usersName:null})},document.body.appendChild(t),()=>{const s=document.getElementById("featurebase-sdk");s&&document.body.removeChild(s)}},[]),a.useEffect(()=>{var s;if(!g)return;const t=window;(s=t.Featurebase)==null||s.call(t,"identify",{organization:A})},[g]);const B=()=>{var s;const t=window;(s=t.Featurebase)==null||s.call(t,"open",{type:"changelog"})},q=async t=>{if(t.preventDefault(),u(""),!r.trim()||!o.trim()||!c.trim()||!l.trim()){u("Please fill in all fields before sending.");return}if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o)){u("Please enter a valid email address.");return}d("sending");try{if((await fetch("/api/contact",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({topic:n,name:r,email:o,subject:c,message:l})})).ok){d("sent");return}}catch{}const s=encodeURIComponent(`Topic: ${m[n]} -Name: ${r} - -${l}`),M=`mailto:${C}?subject=${encodeURIComponent(`[${m[n]}] ${c}`)}&body=${s}`;window.open(M,"_blank"),d("sent")},T=()=>{d("idle"),j(""),y(""),w(""),k(""),u(""),f("question")};return e.jsx(D,{children:e.jsxs("section",{className:"mx-auto max-w-7xl px-6 py-16 lg:px-8",children:[e.jsxs("div",{className:"public-hero-shell p-8 md:p-10",children:[e.jsx("p",{className:"public-shell-kicker",children:"Support"}),e.jsx("h1",{className:"public-page-title mt-3 max-w-4xl",children:"Questions, Feedback & Contact"}),e.jsx("p",{className:"public-lead mt-4 max-w-3xl",children:"Whether you have a question about the platform, want to share feedback, or need support — we read every message."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3",children:[e.jsx(i,{asChild:!0,children:e.jsxs("a",{href:"#contact-form",children:[e.jsx(S,{size:13}),"Send a Message"]})}),e.jsx("button",{type:"button",className:"public-btn-secondary",onClick:B,children:"View Changelog"})]})]}),e.jsx("div",{className:"mt-8 grid gap-5 md:grid-cols-3",children:R.map(t=>{const s=t.icon;return e.jsxs("div",{className:"public-card flex flex-col rounded-2xl p-6",children:[e.jsx(s,{size:20,className:"text-[#D8CBAF]"}),e.jsx("h2",{className:"public-card-title mt-4",children:t.title}),e.jsx("p",{className:"public-body mt-2 grow",children:t.description}),e.jsx("div",{className:"mt-5 pt-1",children:t.id==="helper-center"?e.jsx(i,{asChild:!0,children:e.jsx(p,{to:"/help",children:t.actionLabel})}):e.jsx(i,{asChild:!0,children:e.jsx("a",{href:"#contact-form",children:t.actionLabel})})})]},t.id)})}),e.jsxs("div",{id:"contact-form",className:"mt-10 public-card rounded-2xl p-6 md:p-8 scroll-mt-24",children:[e.jsx("p",{className:"public-shell-kicker",children:"Contact"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Send Us a Message"}),e.jsx("p",{className:"public-body mt-2 max-w-2xl",children:"Use this form for questions, feedback, bug reports, billing enquiries, or enterprise conversations. We respond within one business day."}),b==="sent"?e.jsxs("div",{className:"mt-8 flex flex-col items-center gap-4 rounded-xl border border-[#D8CBAF]/20 bg-[#D8CBAF]/5 px-6 py-10 text-center",children:[e.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-[#D8CBAF]/30 bg-[#D8CBAF]/10",children:e.jsx(N,{size:20,className:"text-[#D8CBAF]"})}),e.jsx("p",{className:"text-base font-medium text-[#D8CBAF]",children:"Message sent"}),e.jsx("p",{className:"public-body max-w-sm",children:"Thank you — we'll follow up at the address you provided. For urgent issues, include your account email in the message."}),e.jsx("button",{type:"button",className:"public-btn-secondary mt-2",onClick:T,children:"Send another message"})]}):e.jsxs("form",{onSubmit:q,className:"mt-6 space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-2 block text-xs font-medium uppercase tracking-widest text-[#8A9099]",children:"Topic"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.keys(m).map(t=>e.jsx("button",{type:"button",onClick:()=>f(t),className:`rounded-full border px-4 py-1.5 text-sm font-medium transition-colors ${n===t?"border-[#C4A96B] bg-[#C4A96B]/15 text-[#D8CBAF]":"border-white/10 bg-white/5 text-[#8A9099] hover:border-[#D8CBAF]/30 hover:text-[#D8CBAF]"}`,children:m[t]},t))})]}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"contact-name",className:"mb-1.5 block text-xs font-medium uppercase tracking-widest text-[#8A9099]",children:"Name"}),e.jsx("input",{id:"contact-name",type:"text",autoComplete:"name",value:r,onChange:t=>j(t.target.value),placeholder:"Your name",className:"w-full rounded-xl border border-white/10 bg-white/5 px-4 py-2.5 text-sm text-[#D8CBAF] placeholder-[#8A9099]/60 outline-none transition-colors focus:border-[#C4A96B]/50 focus:ring-0"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"contact-email",className:"mb-1.5 block text-xs font-medium uppercase tracking-widest text-[#8A9099]",children:"Email"}),e.jsx("input",{id:"contact-email",type:"email",autoComplete:"email",value:o,onChange:t=>y(t.target.value),placeholder:"you@example.com",className:"w-full rounded-xl border border-white/10 bg-white/5 px-4 py-2.5 text-sm text-[#D8CBAF] placeholder-[#8A9099]/60 outline-none transition-colors focus:border-[#C4A96B]/50 focus:ring-0"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"contact-subject",className:"mb-1.5 block text-xs font-medium uppercase tracking-widest text-[#8A9099]",children:"Subject"}),e.jsx("input",{id:"contact-subject",type:"text",value:c,onChange:t=>w(t.target.value),placeholder:"Brief subject line",className:"w-full rounded-xl border border-white/10 bg-white/5 px-4 py-2.5 text-sm text-[#D8CBAF] placeholder-[#8A9099]/60 outline-none transition-colors focus:border-[#C4A96B]/50 focus:ring-0"})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"contact-message",className:"mb-1.5 block text-xs font-medium uppercase tracking-widest text-[#8A9099]",children:"Message"}),e.jsx("textarea",{id:"contact-message",rows:6,value:l,onChange:t=>k(t.target.value),placeholder:"Describe your question, feedback, or issue in detail…",className:"w-full resize-y rounded-xl border border-white/10 bg-white/5 px-4 py-2.5 text-sm text-[#D8CBAF] placeholder-[#8A9099]/60 outline-none transition-colors focus:border-[#C4A96B]/50 focus:ring-0"})]}),v&&e.jsx("p",{className:"text-sm text-red-400/90",children:v}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(i,{type:"submit",disabled:b==="sending",className:"min-w-[140px] justify-center disabled:opacity-60",children:b==="sending"?e.jsxs(e.Fragment,{children:[e.jsx(z,{size:14,className:"animate-spin"}),"Sending…"]}):e.jsxs(e.Fragment,{children:[e.jsx(N,{size:14}),"Send Message"]})}),e.jsxs("span",{className:"text-xs text-[#8A9099]",children:["Replies to"," ",e.jsx("span",{className:"text-[#D8CBAF]/70",children:C})]})]})]})]}),e.jsxs("div",{className:"mt-10 public-card rounded-2xl p-6 md:p-8",children:[e.jsx("p",{className:"public-shell-kicker",children:"FAQ"}),e.jsx("h2",{className:"public-section-title mt-3",children:"Frequently Asked Questions"}),e.jsx("div",{className:"mt-6 divide-y divide-white/10",children:O.map((t,s)=>e.jsxs("div",{className:"py-4",children:[e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between gap-3 text-left public-card-title",onClick:()=>F(x===s?null:s),children:[e.jsx("span",{children:t.q}),e.jsx(I,{size:16,className:`shrink-0 text-[#8A9099] transition-transform ${x===s?"rotate-180":""}`})]}),x===s&&e.jsx("p",{className:"public-body mt-3",children:t.a})]},s))})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6",children:[e.jsx("p",{className:"public-shell-kicker",children:"Billing & Plans"}),e.jsx("p",{className:"public-body mt-3",children:"ScriptoriumAI is a subscription SaaS for technical writing, scientific publishing, and AI-assisted document intelligence — available in Free, Scholar, Team, and Enterprise tiers."}),e.jsx("div",{className:"mt-4",children:e.jsx(p,{to:"/pricing",children:e.jsx("button",{type:"button",className:"public-btn-secondary",children:"Review Pricing"})})})]}),e.jsxs("div",{className:"mt-8 public-card rounded-2xl p-6",children:[e.jsx("p",{className:"public-shell-kicker",children:"Affiliate Marketplace"}),e.jsx("p",{className:"public-body mt-3",children:"The affiliate lane is open-marketplace at launch. Use the onboarding page to understand how the marketplace works, then use the resource page for disclosure, tracking, brand assets, payout, and fraud-control guidance."}),e.jsxs("div",{className:"mt-4 flex flex-wrap gap-3",children:[e.jsx(i,{asChild:!0,children:e.jsx(p,{to:"/affiliate-program",children:"Open affiliate onboarding"})}),e.jsx(p,{to:"/affiliate-resources",className:"public-btn-secondary inline-flex",children:"Open affiliate resources"})]})]})]})})}export{X as SupportPage}; diff --git a/dist/assets/TermsPage-CZ6P_pT2.js b/dist/assets/TermsPage-CZ6P_pT2.js deleted file mode 100644 index 45d319e4..00000000 --- a/dist/assets/TermsPage-CZ6P_pT2.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./index-D-wwVRoV.js";import{b as n,d as i,e as t}from"./MarketingShell-BgYQ8Cfp.js";import{L as a}from"./LegalPageLayout-B12TU0j9.js";import{P as r}from"./PolicyArticle-s4Nnon3-.js";const s=[{title:"1. Provider, scope, and service character",paragraphs:[e.jsxs(e.Fragment,{children:["These Terms and Conditions govern access to and use of the public website, authenticated application, subscriptions, trials, support flows, and related digital services offered under the ",n.brandName," brand by ",n.legalName,", ",i,"."]}),"These terms apply to consumers and businesses unless a section expressly addresses only one group. Mandatory statutory rights, especially mandatory consumer-protection rights, remain unaffected.","The English and German versions are intended to describe the same commercial rules. Mandatory legal notices and mandatory rights continue to apply even if a wording question arises."]},{title:"2. What ScriptoriumAI is",paragraphs:[`${n.brandName} is a digital software service for research, technical writing, scientific publishing, and document intelligence. Depending on plan and configuration, the service may include collaborative editing, compile and preview workflows, runboard controls, document comparison, AI-assisted drafting or review, memory features, and provider-routing controls.`,"Some features may be preview, beta, experimental, plan-gated, or dependent on third-party infrastructure. Product pages and in-app notices may describe current limits, prerequisites, or feature availability."]},{title:"3. Eligibility, accounts, and academic plans",paragraphs:["You must have legal capacity to conclude the relevant contract and must provide accurate, current account information. You are responsible for maintaining the confidentiality of your credentials and for activity occurring through your account.","Individual plans are personal and non-transferable unless we expressly state otherwise. Team or enterprise seats may be assigned within the purchasing organization according to the applicable commercial package.","Student or academic pricing may require verification of an eligible academic email address or institution domain and may require later reverification. If eligibility cannot be confirmed or expires, we may adjust the account to the applicable non-discounted or free tier, with notice where required."]},{title:"4. Orders, subscriptions, and contract formation",paragraphs:["Plan and product pages describe essential features, billing cadence, and any published trial conditions. By submitting a checkout order or accepting a written quote or order form, you make a binding offer to contract.",e.jsx(e.Fragment,{children:"For self-serve purchases, the contract is normally formed when checkout is accepted and access or confirmation is issued through the billing flow. For enterprise, invoice, or negotiated transactions, the contract may instead arise from written acceptance, a countersigned order form, or another express commercial confirmation."}),"Paid plans usually renew automatically for successive billing periods until cancelled for future billing periods. Unless a separate written agreement states otherwise, cancellation stops future renewal and does not retroactively unwind the active paid term."]},{title:"5. Prices, taxes, payment, and billing responsibility",paragraphs:["Prices shown before checkout are the applicable subscription or service prices. Taxes, VAT, and the charged currency are shown according to the checkout configuration and billing location.",e.jsxs(e.Fragment,{children:["Where used, ",n.payment.provider," may act as payment processor and/or merchant-of-record surface for payment collection, invoicing, tax handling, and related billing operations. You authorize the recurring charge of the selected payment method for ongoing subscriptions until cancellation becomes effective."]}),"If payment fails, is reversed, or is reasonably suspected of fraud, trial abuse, or misuse, we may retry collection, suspend paid features, restrict access, or require a different payment method before service continues."]},{title:"6. Acceptable use",bullets:["Do not use the service for unlawful conduct, rights infringement, deceptive conduct, harassment, or publication fraud.","Do not upload malware, attempt unauthorized access, interfere with service integrity, or probe security boundaries without express authorization.","Do not bypass plan limits, share credentials outside the permitted seat model, or automate abusive scraping or extraction against the service.","Do not submit data to third-party AI or routing paths when you lack authority to process, transmit, or disclose that data there."]},{title:"7. User content and usage rights",paragraphs:['You retain your rights in the text, images, prompts, drafts, repositories, datasets, comments, and other materials you upload, create, or control in the service ("User Content").',"You grant us a non-exclusive, limited right to host, copy, transmit, transform, cache, and otherwise process User Content only as necessary to operate, secure, back up, troubleshoot, support, and provide the service to you and your authorized collaborators.","You are responsible for ensuring that you have all rights required to upload and process User Content and that its use within the service does not violate law, confidentiality duties, export controls, or third-party rights."]},{title:"8. AI features, routing choices, and BYOK",paragraphs:["AI features may route prompts, document context, files, excerpts, or task instructions to model providers selected by you, your organization, or the active platform configuration. AI output can be inaccurate, incomplete, biased, or unsuitable for high-stakes decisions unless independently reviewed by a qualified human.",'Scholar-and-higher flows may permit BYOK ("bring your own key") usage. In the current browser activation slice reflected by this codebase, personal provider keys entered through the Environment Vault are stored locally in your browser and may be forwarded through explicit request headers to supported routes; they are not intended to function as a general server-side secret vault in this slice.',"You remain responsible for deciding whether a selected provider, model, jurisdiction, or self-hosted endpoint is appropriate for the material you submit, especially if the material is confidential, regulated, personal, export-controlled, or publication-sensitive."]},{title:"9. Availability, maintenance, and product changes",paragraphs:["We work to provide a stable and useful service, but we do not promise uninterrupted or error-free availability. Maintenance windows, security work, supplier outages, provider changes, capacity constraints, and force majeure may affect availability or behavior.","We may update, replace, discontinue, or reconfigure features, models, interfaces, and integrations when reasonably necessary for security, legal compliance, supplier changes, or product evolution. Material reductions to paid core functionality will be handled with any notice required by law or contract.","Preview, beta, or experimental features may change faster than stable product surfaces and may be withdrawn with limited notice."]},{title:"10. Intellectual property",paragraphs:["The service, software, site design, branding, documentation, and non-user content remain owned by us or our licensors and are protected by intellectual-property law.","Subject to these terms and any applicable commercial package, you receive a limited, non-exclusive, revocable, non-transferable right to use the service for your internal personal, academic, or business documentation purposes."]},{title:"11. Suspension, termination, and cancellation",paragraphs:["You may stop using the service at any time. Paid subscriptions may be cancelled for future billing periods according to the billing terms in force at the time of purchase.","We may suspend or terminate access if you materially breach these terms, fail to pay, create a security risk, abuse trials or discounts, infringe rights, or if continued service would expose us, our providers, or other users to legal or operational harm.","Where practical and legally permissible, we will usually give notice and a reasonable opportunity to cure before permanent termination. Terms that by their nature should survive termination remain in effect."]},{title:"12. Liability and warranty",paragraphs:["Statutory rights for consumers remain unaffected.","We are fully liable for intent, gross negligence, injury to life, body, or health, and under any mandatory statutory liability regime.","In cases of slight negligence, we are liable only for breach of essential contractual obligations, and then limited to the foreseeable damage typical for the contract. We do not guarantee that AI output is factually correct, publication-ready, or legally, scientifically, or ethically sufficient without human review."]},{title:"13. Privacy, governing law, and updates",paragraphs:[e.jsx(e.Fragment,{children:"Our Privacy Policy explains how personal data is processed. If you use confidential or sensitive material, you should choose plan settings, provider-routing choices, and operational controls suitable for that material."}),"German law applies, without limiting mandatory consumer protections of the country in which a consumer has their habitual residence. If you are a merchant, legal entity under public law, or special fund under public law, Berlin is the exclusive venue to the extent permitted by law.","We may update these terms for legal, technical, or commercial reasons. Material changes affecting an ongoing paid relationship will be communicated in advance by appropriate means where required."]}],o=[{title:"1. Anbieter, Geltungsbereich und Leistungscharakter",paragraphs:[e.jsxs(e.Fragment,{children:["Diese Allgemeinen Geschaeftsbedingungen regeln den Zugang zur und die Nutzung der oeffentlichen Website, der authentifizierten Anwendung, von Abonnements, Testphasen, Supportablaeufen und verbundenen digitalen Leistungen, die unter der Marke ",n.brandName," von ",n.legalName,", ",t,", angeboten werden."]}),"Sie gelten gegenueber Verbrauchern und Unternehmern, soweit einzelne Regelungen nicht ausdruecklich nur fuer eine bestimmte Nutzergruppe bestimmt sind. Zwingende gesetzliche Rechte, insbesondere zwingende Verbraucherschutzrechte, bleiben unberuehrt.","Die englische und die deutsche Fassung sollen denselben wirtschaftlichen Regelungsgehalt wiedergeben. Zwingende gesetzliche Hinweise und zwingende Rechte gelten unabhaengig von etwaigen Auslegungsfragen weiter."]},{title:"2. Was ScriptoriumAI ist",paragraphs:[`${n.brandName} ist ein digitales Softwareangebot fuer Forschung, Technical Writing, wissenschaftliche Publikation und Dokumentintelligenz. Je nach Tarif und Konfiguration kann der Dienst kollaboratives Editieren, Compile- und Preview-Workflows, Runboard-Steuerung, Dokumentvergleich, KI-gestuetztes Schreiben oder Review, Memory-Funktionen und Provider-Routing-Kontrollen enthalten.`,"Einzelne Funktionen koennen Preview-, Beta-, experimentelle oder tarifgebundene Bestandteile sein oder von Drittinfrastruktur abhaengen. Produktseiten und In-App-Hinweise koennen aktuelle Grenzen, Voraussetzungen oder Verfuegbarkeiten beschreiben."]},{title:"3. Nutzungsberechtigung, Konten und Academic-Tarife",paragraphs:["Sie muessen rechtsgeschaeftlich handlungsfaehig sein und zutreffende, aktuelle Kontodaten angeben. Sie sind fuer die Vertraulichkeit Ihrer Zugangsdaten und fuer die ueber Ihr Konto erfolgenden Handlungen verantwortlich.","Einzelplatz-Tarife sind persoenlich und nicht uebertragbar, sofern wir nichts anderes ausdruecklich mitteilen. Team- oder Enterprise-Sitze duerfen im Rahmen des erworbenen Organisationspakets zugewiesen werden.","Studentische oder akademische Preisstufen koennen die Verifikation einer berechtigten akademischen E-Mail-Adresse oder Institution voraussetzen und spaetere Re-Verifikationen erfordern. Wenn die Berechtigung nicht bestaetigt werden kann oder entfaellt, duerfen wir das Konto nach gegebenenfalls erforderlicher Mitteilung auf den passenden nicht rabattierten oder freien Tarif umstellen."]},{title:"4. Bestellung, Abonnement und Vertragsschluss",paragraphs:["Tarif- und Produktseiten beschreiben die wesentlichen Merkmale, den Abrechnungsrhythmus und etwa bekanntgemachte Testbedingungen. Mit Absenden einer Checkout-Bestellung oder Annahme eines schriftlichen Angebots geben Sie ein verbindliches Vertragsangebot ab.",e.jsx(e.Fragment,{children:"Bei Self-Service-Kaeufen kommt der Vertrag in der Regel zustande, wenn der Checkout angenommen und der Zugang oder eine Bestaetigung ueber den Billing-Flow erteilt wird. Bei Enterprise-, Rechnungs- oder individuell verhandelten Geschaeften kann der Vertrag stattdessen durch schriftliche Annahme, eine gegengezeichnete Bestellung oder eine andere ausdrueckliche kommerzielle Bestaetigung zustande kommen."}),"Bezahlte Tarife verlaengern sich im Regelfall automatisch um die jeweils naechste Abrechnungsperiode, bis sie kuendigungswirksam beendet werden. Soweit keine gesonderte schriftliche Vereinbarung etwas anderes vorsieht, beendet eine Kuendigung nur die kuenftige Verlaengerung und hebt die laufende bereits bezahlte Periode nicht rueckwirkend auf."]},{title:"5. Preise, Steuern, Zahlung und Billing-Verantwortung",paragraphs:["Die vor dem Checkout angezeigten Preise sind die jeweils massgeblichen Entgelte fuer Abonnement oder Leistung. Steuern, Umsatzsteuer und Belastungswaehrung werden gemaess Checkout-Konfiguration und Rechnungsadresse ausgewiesen.",e.jsxs(e.Fragment,{children:["Soweit eingesetzt, kann ",n.payment.provider," als Zahlungsabwickler und/oder Merchant-of-Record-Oberflaeche fuer Zahlungseinzug, Rechnungsstellung, Steuerbehandlung und zusammenhaengende Billing-Vorgaenge auftreten. Sie ermaechtigen uns beziehungsweise den eingesetzten Billing-Flow zur wiederkehrenden Belastung der gewaehlten Zahlungsmethode, bis die Kuendigung wirksam wird."]}),"Wenn eine Zahlung fehlschlaegt, rueckbelastet wird oder ein begruendeter Verdacht auf Betrug, Missbrauch von Testphasen oder sonstigen Missbrauch besteht, duerfen wir den Einzug erneut versuchen, bezahlte Funktionen aussetzen, den Zugang einschraenken oder eine andere Zahlungsmethode verlangen."]},{title:"6. Zulaessige Nutzung",bullets:["Keine rechtswidrige Nutzung, keine Verletzung von Rechten Dritter, keine taeuschende Nutzung, kein Harassment und kein Publikationsbetrug.","Keine Schadsoftware, keine unbefugten Zugriffsversuche, keine Stoerung der Service-Integritaet und keine Sicherheitspruefung ohne ausdrueckliche Erlaubnis.","Kein Umgehen von Tarifgrenzen, kein unzulaessiges Teilen von Zugangsdaten ausserhalb des erlaubten Sitzmodells und kein missbraeuchliches automatisiertes Scraping oder Extrahieren.","Keine Uebermittlung von Daten in Dritt-KI- oder Routing-Pfade, fuer deren Verarbeitung, Weitergabe oder Offenlegung Ihnen die Berechtigung fehlt."]},{title:"7. Nutzerinhalte und Nutzungsrechte",paragraphs:['Sie behalten Ihre Rechte an Texten, Abbildungen, Prompts, Entwuerfen, Repositorien, Datensaetzen, Kommentaren und sonstigen Materialien, die Sie in den Dienst hochladen, dort erstellen oder kontrollieren ("Nutzerinhalte").',"Sie raeumen uns ein nicht ausschliessliches, beschraenktes Recht ein, Nutzerinhalte nur insoweit zu hosten, zu kopieren, zu uebertragen, umzuwandeln, zwischenzuspeichern und sonst zu verarbeiten, wie dies fuer Betrieb, Sicherheit, Backup, Fehlerbehebung, Support und die Erbringung des Dienstes fuer Sie und Ihre berechtigten Mitarbeitenden erforderlich ist.","Sie sind dafuer verantwortlich, dass Sie ueber alle fuer Upload und Verarbeitung erforderlichen Rechte verfuegen und dass die Nutzung der Nutzerinhalte im Dienst weder gegen Gesetze noch gegen Vertraulichkeitspflichten, Exportkontrollen oder Rechte Dritter verstoesst."]},{title:"8. KI-Funktionen, Routing-Wahlen und BYOK",paragraphs:["KI-Funktionen koennen Prompts, Dokumentkontext, Dateien, Auszuege oder Aufgabenanweisungen an Modellanbieter uebermitteln, die von Ihnen, Ihrer Organisation oder der aktiven Plattformkonfiguration ausgewaehlt werden. KI-Ausgaben koennen unzutreffend, unvollstaendig, verzerrt oder fuer hochkritische Entscheidungen ohne qualifizierte menschliche Pruefung ungeeignet sein.",'Scholar- und hoeherwertige Flows koennen BYOK ("bring your own key") ermoeglichen. Im derzeitigen Browser-Aktivierungsslice, den diese Codebasis abbildet, werden persoenliche Provider-Schluessel aus dem Environment Vault lokal im Browser gespeichert und koennen ueber ausdrueckliche Request-Header an unterstuetzte Pfade weitergegeben werden; sie dienen in diesem Slice nicht als allgemeiner serverseitiger Secret-Vault.',"Sie bleiben dafuer verantwortlich zu beurteilen, ob ein ausgewaehlter Provider, ein Modell, ein Staat oder ein selbst gehosteter Endpoint fuer das eingereichte Material geeignet ist, insbesondere bei vertraulichen, regulierten, personenbezogenen, exportkontrollierten oder publikationssensiblen Inhalten."]},{title:"9. Verfuegbarkeit, Wartung und Produktveraenderungen",paragraphs:["Wir bemuehen uns um einen stabilen und nuetzlichen Dienst, schulden jedoch keine ununterbrochene oder fehlerfreie Verfuegbarkeit. Wartungsfenster, Sicherheitsarbeiten, Ausfaelle von Zulieferern, Providerwechsel, Kapazitaetsengpaesse und hoehere Gewalt koennen Verfuegbarkeit oder Verhalten beeinflussen.","Wir duerfen Funktionen, Modelle, Schnittstellen und Integrationen aktualisieren, austauschen, einstellen oder neu konfigurieren, soweit dies fuer Sicherheit, Rechtskonformitaet, Lieferantenwechsel oder Produktentwicklung vernuenftig erforderlich ist. Wesentliche Reduktionen bezahlter Kernfunktionalitaet behandeln wir mit der gesetzlich oder vertraglich gebotenen Vorankuendigung.","Preview-, Beta- oder experimentelle Funktionen koennen sich schneller aendern als stabile Produktoberflaechen und koennen mit begrenzter Vorankuendigung entfallen."]},{title:"10. Geistiges Eigentum",paragraphs:["Der Dienst, die Software, das Seitendesign, die Marken, die Dokumentation und nicht von Nutzern stammende Inhalte verbleiben in unserem Eigentum oder dem unserer Lizenzgeber und sind urheber- und sonst immaterialgueterrechtlich geschuetzt.","Vorbehaltlich dieser Bedingungen und des jeweils gebuchten Pakets erhalten Sie ein beschraenktes, nicht ausschliessliches, widerrufliches und nicht uebertragbares Recht zur Nutzung des Dienstes fuer eigene persoenliche, akademische oder betriebliche Dokumentationszwecke."]},{title:"11. Sperrung, Beendigung und Kuendigung",paragraphs:["Sie koennen die Nutzung des Dienstes jederzeit einstellen. Bezahlte Abonnements koennen mit Wirkung fuer kuenftige Abrechnungsperioden nach den zum Kaufzeitpunkt geltenden Billing-Bedingungen gekuendigt werden.","Wir duerfen den Zugang sperren oder beenden, wenn Sie diese Bedingungen erheblich verletzen, nicht zahlen, ein Sicherheitsrisiko schaffen, Testphasen oder Rabatte missbrauchen, Rechte verletzen oder wenn die weitere Leistungserbringung uns, unsere Provider oder andere Nutzer rechtlich oder operativ gefaehrden wuerde.","Soweit praktikabel und rechtlich zulaessig, geben wir vor einer dauerhaften Beendigung regelmaessig einen Hinweis und eine angemessene Moeglichkeit zur Abhilfe. Regelungen, die ihrer Natur nach ueber die Vertragsbeendigung hinaus wirken sollen, bleiben bestehen."]},{title:"12. Haftung und Gewaehrleistung",paragraphs:["Gesetzliche Rechte von Verbrauchern bleiben unberuehrt.","Wir haften unbeschraenkt fuer Vorsatz, grobe Fahrlaessigkeit, Verletzung von Leben, Koerper oder Gesundheit sowie nach zwingenden gesetzlichen Haftungsregimen.","Bei leichter Fahrlaessigkeit haften wir nur bei Verletzung wesentlicher Vertragspflichten und dann begrenzt auf den vorhersehbaren vertragstypischen Schaden. Wir uebernehmen keine Gewaehr dafuer, dass KI-Ausgaben ohne menschliche Pruefung sachlich richtig, publikationsreif oder rechtlich, wissenschaftlich oder ethisch hinreichend sind."]},{title:"13. Datenschutz, anwendbares Recht und Aktualisierungen",paragraphs:["Unsere Datenschutzerklaerung erlaeutert die Verarbeitung personenbezogener Daten. Wenn Sie vertrauliche oder sensible Materialien nutzen, sollten Sie Tarifoptionen, Provider-Routing-Wahlen und betriebliche Kontrollen waehlen, die zur Sensibilitaet des Materials passen.","Es gilt deutsches Recht, ohne zwingende Verbraucherschutzvorschriften des Staates des gewoehnlichen Aufenthalts eines Verbrauchers einzuschraenken. Gegenueber Kaufleuten, juristischen Personen des oeffentlichen Rechts oder oeffentlich-rechtlichen Sondervermoegen ist Berlin ausschliesslicher Gerichtsstand, soweit gesetzlich zulaessig.","Wir duerfen diese Bedingungen aus rechtlichen, technischen oder kaufmaennischen Gruenden aktualisieren. Wesentliche Aenderungen, die ein laufendes bezahltes Vertragsverhaeltnis betreffen, werden wir, soweit erforderlich, vorab in geeigneter Weise mitteilen."]}];function h(){return e.jsxs(a,{badge:"Terms",title:"Terms & Conditions / Allgemeine Geschaeftsbedingungen",description:`These terms now describe ${n.brandName} as a subscription SaaS for research, technical writing, scientific publishing, AI routing, and authenticated workspace use rather than as a generic storefront.`,panelTitle:"Key Contract Themes",panelItems:["Subscriptions, trials, and recurring billing","Academic-plan verification and seat rules","AI routing, BYOK, and third-party providers","Mandatory consumer rights remain unaffected"],children:[e.jsx(r,{heading:"Terms & Conditions (English)",subheading:e.jsxs(e.Fragment,{children:["Contractual rules for access to ",n.brandName,", including public pages, paid plans, authenticated workspaces, and AI-enabled document workflows."]}),sections:s,footer:e.jsx("p",{children:"These terms should be reviewed whenever billing architecture, enterprise contracting, provider routing, or core product entitlements materially change."})}),e.jsx(r,{heading:"AGB (Deutsch)",subheading:e.jsxs(e.Fragment,{children:["Vertragliche Regeln fuer den Zugang zu ",n.brandName,", einschliesslich oeffentlicher Seiten, bezahlter Tarife, authentifizierter Arbeitsbereiche und KI-gestuetzter Dokument-Workflows."]}),sections:o,footer:e.jsx("p",{children:"Diese Bedingungen sollten ueberprueft werden, wenn sich Billing-Architektur, Enterprise-Vertragspfad, Provider-Routing oder zentrale Leistungsumfaenge wesentlich aendern."})})]})}export{h as TermsPage}; diff --git a/dist/assets/WithdrawalPage-CdZT6ngS.js b/dist/assets/WithdrawalPage-CdZT6ngS.js deleted file mode 100644 index c4cfb502..00000000 --- a/dist/assets/WithdrawalPage-CdZT6ngS.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./index-D-wwVRoV.js";import{b as r,d as a,e as s}from"./MarketingShell-BgYQ8Cfp.js";import{L as c}from"./LegalPageLayout-B12TU0j9.js";import{P as i}from"./PolicyArticle-s4Nnon3-.js";const g=[{title:"1. Who this notice applies to",paragraphs:["This withdrawal notice applies to consumers within the meaning of applicable consumer law, meaning natural persons acting for purposes predominantly outside their trade, business, or profession.",`It is relevant to distance contracts concluded through ${r.brandName} for digital services, digital content, subscriptions, and any separately offered physical goods.`]},{title:"2. Right of withdrawal",paragraphs:["You have the right to withdraw from the contract within 14 days without giving any reason, unless a statutory exception applies.","For digital services and subscriptions, the withdrawal period is 14 days from the day the contract is concluded. For physical goods, if ever offered, the withdrawal period is 14 days from the day on which you or a third party named by you who is not the carrier takes possession of the goods."]},{title:"3. Early performance, digital content, and possible loss of the right",paragraphs:["If you expressly request that a digital service or subscription begins during the withdrawal period and you later withdraw, you may owe a proportionate amount for the service already provided up to the moment of withdrawal.","For digital content not supplied on a tangible medium, the right of withdrawal may expire before the end of the 14-day period if performance begins after you expressly consent to immediate performance and acknowledge that you lose the withdrawal right once performance starts.","For services, the right may also expire once the service has been fully performed if performance began only after your express request and acknowledgement of the consequences where required by law."]},{title:"4. How to exercise withdrawal",paragraphs:["To exercise your withdrawal right, you must inform us by means of a clear statement of your decision to withdraw, for example by email or post.",e.jsxs(e.Fragment,{children:["Contact for withdrawal notices: ",r.legalName,", ",a,", email ",e.jsx("a",{href:r.contact.emailHref,className:"text-[#D8CBAF] underline underline-offset-2",children:r.contact.email}),"."]}),"Sending the notice before the 14-day period expires is sufficient to meet the deadline."]},{title:"5. Effects of withdrawal",paragraphs:["If you withdraw from the contract, we will reimburse all payments received from you, including standard delivery costs for a qualifying goods shipment if applicable, without undue delay and no later than 14 days from the day we receive your withdrawal notice.","We will use the same means of payment that you used for the original transaction unless something else has been expressly agreed. No reimbursement fee is charged.","If you requested early commencement of a service during the withdrawal period, we may deduct the legally permitted proportionate value of the service already supplied before withdrawal."]},{title:"6. Returns of physical goods and statutory exceptions",paragraphs:["If physical goods are part of the contract, you must send them back or hand them over without undue delay and in any event no later than 14 days from the day you inform us of your withdrawal.","You bear the direct cost of returning physical goods unless we expressly state otherwise before purchase.","Statutory withdrawal exclusions and exceptions remain unaffected. If a specific product is not subject to withdrawal because of its legal category, that will be indicated in the relevant offer or checkout flow."]},{title:"7. Withdrawal versus ordinary cancellation of a subscription",paragraphs:["The consumer right of withdrawal is separate from the ordinary cancellation of an ongoing subscription. After the withdrawal period ends, a recurring plan can still be cancelled for future billing periods according to the applicable billing terms.","If you want to stop future renewal rather than unwind the initial contract under consumer law, use the normal cancellation path for the subscription or contact support."]}],f=[{title:"1. Fuer wen diese Belehrung gilt",paragraphs:["Diese Widerrufsbelehrung gilt fuer Verbraucher im Sinne des anwendbaren Verbraucherschutzrechts, also fuer natuerliche Personen, die ein Rechtsgeschaeft ueberwiegend zu Zwecken abschliessen, die weder ihrer gewerblichen noch ihrer selbststaendigen beruflichen Taetigkeit zugerechnet werden koennen.",`Sie ist fuer Fernabsatzvertraege relevant, die ueber ${r.brandName} ueber digitale Dienste, digitale Inhalte, Abonnements und etwa gesondert angebotene physische Waren geschlossen werden.`]},{title:"2. Widerrufsrecht",paragraphs:["Sie haben das Recht, binnen 14 Tagen ohne Angabe von Gruenden diesen Vertrag zu widerrufen, soweit keine gesetzliche Ausnahme greift.","Bei digitalen Diensten und Abonnements betraegt die Widerrufsfrist 14 Tage ab dem Tag des Vertragsschlusses. Bei physischen Waren, falls solche angeboten werden, betraegt die Frist 14 Tage ab dem Tag, an dem Sie oder ein von Ihnen benannter Dritter, der nicht Befoerderer ist, die Waren in Besitz genommen haben."]},{title:"3. Vorzeitige Ausfuehrung, digitale Inhalte und moeglicher Fristverlust",paragraphs:["Wenn Sie ausdruecklich verlangen, dass ein digitaler Dienst oder ein Abonnement bereits waehrend der Widerrufsfrist beginnt, und Sie spaeter widerrufen, koennen wir einen angemessenen Betrag fuer die bis zum Widerruf bereits erbrachte Leistung verlangen.","Bei digitalen Inhalten, die nicht auf einem koerperlichen Datentraeger geliefert werden, kann das Widerrufsrecht vor Ablauf der 14 Tage erloeschen, wenn die Ausfuehrung beginnt, nachdem Sie ausdruecklich in die sofortige Ausfuehrung eingewilligt und bestaetigt haben, dass Sie dadurch Ihr Widerrufsrecht verlieren.","Bei Dienstleistungen kann das Widerrufsrecht ebenfalls erloeschen, sobald die Dienstleistung vollstaendig erbracht wurde, sofern die Ausfuehrung erst nach Ihrem ausdruecklichen Verlangen und der gesetzlich erforderlichen Bestaetigung begonnen hat."]},{title:"4. Ausuebung des Widerrufs",paragraphs:["Um Ihr Widerrufsrecht auszuueben, muessen Sie uns mittels einer eindeutigen Erklaerung ueber Ihren Entschluss informieren, den Vertrag zu widerrufen, zum Beispiel per E-Mail oder Post.",e.jsxs(e.Fragment,{children:["Kontakt fuer Widerrufserklaerungen: ",r.legalName,", ",s,", E-Mail ",e.jsx("a",{href:r.contact.emailHref,className:"text-[#D8CBAF] underline underline-offset-2",children:r.contact.email}),"."]}),"Zur Wahrung der Frist reicht es aus, dass Sie die Mitteilung ueber die Ausuebung des Widerrufsrechts vor Ablauf der Widerrufsfrist absenden."]},{title:"5. Folgen des Widerrufs",paragraphs:["Wenn Sie diesen Vertrag widerrufen, erstatten wir Ihnen alle Zahlungen, die wir von Ihnen erhalten haben, einschliesslich der Standard-Lieferkosten fuer eine gegebenenfalls widerrufbare Warensendung, unverzueglich und spaetestens binnen 14 Tagen ab dem Tag des Zugangs Ihrer Widerrufserklaerung.","Fuer die Rueckzahlung verwenden wir dasselbe Zahlungsmittel, das Sie bei der urspruenglichen Transaktion eingesetzt haben, es sei denn, mit Ihnen wurde ausdruecklich etwas anderes vereinbart. Fuer die Rueckzahlung werden keine Entgelte berechnet.","Wenn Sie verlangt haben, dass die Leistung waehrend der Widerrufsfrist beginnen soll, duerfen wir den gesetzlich zulaessigen Wertersatz fuer den bis zum Widerruf bereits erbrachten Teil der Leistung abziehen."]},{title:"6. Ruecksendung physischer Waren und gesetzliche Ausnahmen",paragraphs:["Soweit physische Waren Vertragsgegenstand sind, muessen Sie diese unverzueglich und spaetestens binnen 14 Tagen ab dem Tag, an dem Sie uns ueber den Widerruf unterrichten, an uns zuruecksenden oder uebergeben.","Die unmittelbaren Kosten der Ruecksendung physischer Waren tragen Sie, sofern wir vor dem Kauf nichts anderes ausweisen.","Gesetzliche Widerrufsausschluesse und Ausnahmen bleiben unberuehrt. Wenn fuer ein konkretes Produkt aufgrund seiner gesetzlichen Einordnung kein Widerrufsrecht besteht, wird dies im jeweiligen Angebot oder Checkout kenntlich gemacht."]},{title:"7. Widerruf im Unterschied zur ordentlichen Kuendigung eines Abonnements",paragraphs:["Das gesetzliche Widerrufsrecht ist von der ordentlichen Kuendigung eines laufenden Abonnements zu unterscheiden. Nach Ablauf der Widerrufsfrist kann ein wiederkehrender Tarif weiterhin mit Wirkung fuer kuenftige Abrechnungsperioden nach den anwendbaren Billing-Bedingungen beendet werden.","Wenn Sie lediglich die kuenftige Verlaengerung stoppen moechten und nicht den Anfangsvertrag nach Verbraucherschutzrecht rueckabwickeln wollen, nutzen Sie den regulaeren Kuendigungspfad fuer das Abonnement oder kontaktieren Sie den Support."]}];function t({heading:d,intro:o,addressLine:l,template:u,footer:h}){return e.jsxs("article",{className:"rounded-2xl border border-white/15 bg-white/5 p-6 backdrop-blur-2xl md:p-8",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:d}),e.jsx("p",{className:"mt-2 text-sm text-[#8A9099]",children:o}),e.jsxs("div",{className:"mt-5 rounded-2xl border border-white/10 bg-black/10 p-5 text-sm text-[#8A9099]",children:[e.jsxs("p",{children:[r.legalName,e.jsx("br",{}),l,e.jsx("br",{}),e.jsx("a",{href:r.contact.emailHref,className:"text-[#D8CBAF] underline underline-offset-2",children:r.contact.email})]}),e.jsx("div",{className:"mt-4 space-y-2",children:u.map(n=>e.jsx("p",{children:n},n))}),e.jsx("p",{className:"mt-4",children:h})]})]})}function y(){return e.jsxs(c,{badge:"Withdrawal",title:"Right of Withdrawal / Widerrufsbelehrung",description:"Consumer information for ScriptoriumAI subscriptions, digital services, digital content, and any separately offered goods. German version included below.",panelTitle:"Consumer-Protection Focus",panelItems:["14-day withdrawal period for consumers","Special rules for digital services and digital content","Ordinary cancellation is separate from withdrawal","Model withdrawal form in English and German"],children:[e.jsx(i,{heading:"Right of Withdrawal (English)",subheading:"Consumer notice for distance contracts involving ScriptoriumAI digital services, subscriptions, digital content, and any separately listed physical goods.",sections:g}),e.jsx(t,{heading:"Model Withdrawal Form (English)",intro:"Complete and return this form only if you wish to withdraw from the contract.",addressLine:a,template:["I/We (*) hereby give notice that I/We (*) withdraw from my/our (*) contract for the supply of the following service / digital content (*) or for the sale of the following goods (*):","Ordered on (*) / received on (*)","Name of consumer(s)","Address of consumer(s)","Signature of consumer(s) (only if this form is notified on paper)","Date"],footer:"(*) Delete as appropriate."}),e.jsx(i,{heading:"Widerrufsbelehrung (Deutsch)",subheading:"Verbraucherhinweis fuer Fernabsatzvertraege ueber digitale Dienste, Abonnements, digitale Inhalte und etwa gesondert ausgewiesene physische Waren von ScriptoriumAI.",sections:f}),e.jsx(t,{heading:"Muster-Widerrufsformular (Deutsch)",intro:"Wenn Sie den Vertrag widerrufen wollen, fuellen Sie bitte dieses Formular aus und senden Sie es zurueck.",addressLine:s,template:["Hiermit widerrufe(n) ich/wir (*) den von mir/uns (*) abgeschlossenen Vertrag ueber die Erbringung der folgenden Dienstleistung / digitalen Inhalte (*) beziehungsweise ueber den Kauf der folgenden Waren (*):","Bestellt am (*) / erhalten am (*)","Name des/der Verbraucher(s)","Anschrift des/der Verbraucher(s)","Unterschrift des/der Verbraucher(s) (nur bei Mitteilung auf Papier)","Datum"],footer:"(*) Unzutreffendes streichen."})]})}export{y as WithdrawalPage}; diff --git a/dist/assets/arrow-right-lAzDeT03.js b/dist/assets/arrow-right-lAzDeT03.js deleted file mode 100644 index 375256e8..00000000 --- a/dist/assets/arrow-right-lAzDeT03.js +++ /dev/null @@ -1,6 +0,0 @@ -import{c as r}from"./MarketingShell-BgYQ8Cfp.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const o=r("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);export{o as A}; diff --git a/dist/assets/bot-Dw4nx5z7.js b/dist/assets/bot-Dw4nx5z7.js deleted file mode 100644 index de4d8fe5..00000000 --- a/dist/assets/bot-Dw4nx5z7.js +++ /dev/null @@ -1,6 +0,0 @@ -import{c as t}from"./MarketingShell-BgYQ8Cfp.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const h=t("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);export{h as B}; diff --git a/dist/assets/file-text-Boy8OvW2.js b/dist/assets/file-text-Boy8OvW2.js deleted file mode 100644 index 387df55e..00000000 --- a/dist/assets/file-text-Boy8OvW2.js +++ /dev/null @@ -1,6 +0,0 @@ -import{c as e}from"./MarketingShell-BgYQ8Cfp.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const t=e("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);export{t as F}; diff --git a/dist/assets/graduation-cap-BmClC3T4.js b/dist/assets/graduation-cap-BmClC3T4.js deleted file mode 100644 index 5964ced5..00000000 --- a/dist/assets/graduation-cap-BmClC3T4.js +++ /dev/null @@ -1,6 +0,0 @@ -import{c as a}from"./MarketingShell-BgYQ8Cfp.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const e=a("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);export{e as G}; diff --git a/dist/assets/index-BA37C8RC.css b/dist/assets/index-BA37C8RC.css deleted file mode 100644 index c5ff987e..00000000 --- a/dist/assets/index-BA37C8RC.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Fira+Sans:wght@400;500;600;700&family=Source+Sans+3:wght@400;500;600;700&family=STIX+Two+Text:wght@500;600;700&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter,system-ui,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,Fira Code,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 224 71% 4%;--foreground: 213 31% 91%;--muted: 223 47% 11%;--muted-foreground: 215.4 16.3% 56.9%;--popover: 224 71% 4%;--popover-foreground: 215 20.2% 65.1%;--card: 224 71% 4%;--card-foreground: 213 31% 91%;--primary: 38 46% 60%;--primary-foreground: 26 15% 10%;--secondary: 222.2 47.4% 11.2%;--secondary-foreground: 210 40% 98%;--accent: 38 92% 50%;--accent-foreground: 222.2 47.4% 1.2%;--destructive: 0 72% 51%;--destructive-foreground: 210 40% 98%;--border: 216 34% 17%;--input: 216 34% 17%;--ring: 38 46% 60%;--radius: .5rem;--font-ui: "Source Sans 3", "Fira Sans", "Segoe UI", sans-serif;--font-display: "STIX Two Text", "Latin Modern Roman", "Times New Roman", serif}.light *,html.light *{border-color:#d6d0c5}*{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.light body.bg-gray-900,html.light body.bg-gray-900{background-color:#edebe4;color:#1e2230}body{--tw-bg-opacity: 1;background-color:rgb(10 10 15 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-ui)}.light body,html.light body{background-color:#f7f5f0;color:#1e2230}code,pre{font-family:JetBrains Mono,Fira Code,Consolas,monospace}.dark{--background: 224 71% 4%;--foreground: 213 31% 91%;--muted: 223 47% 11%;--muted-foreground: 215.4 16.3% 56.9%;--popover: 224 71% 4%;--popover-foreground: 215 20.2% 65.1%;--card: 224 71% 4%;--card-foreground: 213 31% 91%;--primary: 38 46% 60%;--primary-foreground: 26 15% 10%;--secondary: 222.2 47.4% 11.2%;--secondary-foreground: 210 40% 98%;--accent: 38 92% 50%;--accent-foreground: 222.2 47.4% 1.2%;--destructive: 0 72% 51%;--destructive-foreground: 210 40% 98%;--border: 216 34% 17%;--input: 216 34% 17%;--ring: 38 46% 60%}.light{--background: 40 20% 97%;--foreground: 220 20% 16%;--muted: 38 20% 92%;--muted-foreground: 220 10% 42%;--popover: 0 0% 100%;--popover-foreground: 220 20% 16%;--card: 0 0% 100%;--card-foreground: 220 20% 16%;--primary: 34 42% 50%;--primary-foreground: 0 0% 100%;--secondary: 38 18% 88%;--secondary-foreground: 220 20% 16%;--accent: 34 60% 45%;--accent-foreground: 0 0% 100%;--destructive: 0 72% 44%;--destructive-foreground: 0 0% 100%;--border: 38 16% 82%;--input: 38 16% 82%;--ring: 34 42% 50%}:root{--cc-font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--cc-font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;--cc-space-1: .25rem;--cc-space-2: .5rem;--cc-space-3: .75rem;--cc-space-4: 1rem;--cc-space-6: 1.5rem;--cc-radius-sm: .5rem;--cc-radius-md: .25rem;--cc-radius-pill: .25rem;--cc-text-eyebrow-size: .6875rem;--cc-text-eyebrow-weight: 600;--cc-text-eyebrow-tracking: .08em;--cc-text-body-muted-size: .75rem;--cc-color-panel-bg: rgba(17, 24, 39, .92);--cc-color-panel-bg-subtle: rgb(17, 24, 39);--cc-color-panel-border: rgba(55, 65, 81, .95);--cc-color-panel-border-soft: rgb(31, 41, 55);--cc-color-text-main: rgb(229, 231, 235);--cc-color-text-muted: rgb(156, 163, 175);--cc-color-text-soft: rgb(107, 114, 128);--cc-status-neutral-fg: rgb(209, 213, 219);--cc-status-neutral-bg: rgba(31, 41, 55, .6);--cc-status-neutral-border: rgb(55, 65, 81);--cc-status-info-fg: rgb(165, 180, 252);--cc-status-info-bg: rgba(49, 46, 129, .3);--cc-status-info-border: rgba(67, 56, 202, .4);--cc-status-success-fg: rgb(110, 231, 183);--cc-status-success-bg: rgba(6, 78, 59, .3);--cc-status-success-border: rgba(4, 120, 87, .4);--cc-status-warning-fg: rgb(252, 211, 77);--cc-status-warning-bg: rgba(120, 53, 15, .3);--cc-status-warning-border: rgba(180, 83, 9, .4);--cc-status-danger-fg: rgb(252, 165, 165);--cc-status-danger-bg: rgba(127, 29, 29, .3);--cc-status-danger-border: rgba(185, 28, 28, .4)}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.\!container{width:100%!important}.container{width:100%}@media (min-width: 640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width: 768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width: 1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width: 1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width: 1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}.custom-scrollbar::-webkit-scrollbar{height:.5rem;width:.5rem}.light .custom-scrollbar::-webkit-scrollbar-track,html.light .custom-scrollbar::-webkit-scrollbar-track{background-color:#edebe4}.light .custom-scrollbar.text-gray-100::-webkit-scrollbar-track,html.light .custom-scrollbar.text-gray-100::-webkit-scrollbar-track{background-color:#edebe4;color:#1e2230}.custom-scrollbar::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(22 22 30 / var(--tw-bg-opacity, 1))}.light .custom-scrollbar::-webkit-scrollbar-thumb,html.light .custom-scrollbar::-webkit-scrollbar-thumb{background-color:#d6d0c5}.custom-scrollbar::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.light .custom-scrollbar::-webkit-scrollbar-thumb:hover,html.light .custom-scrollbar::-webkit-scrollbar-thumb:hover{background-color:#c8c3b8}.custom-scrollbar::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.light .btn-primary,html.light .btn-primary{color:#1e2230}.btn-primary{border-radius:var(--radius);padding:.5rem 1rem;font-weight:500;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;background:hsl(var(--primary));box-shadow:0 0 20px #c4a96b59}.btn-primary:hover{background:#be9650}.light .input-field,html.light .input-field{background-color:#edebe4;border-color:#c8c3b8;color:#1e2230}.light .input-field.text-gray-100,html.light .input-field.text-gray-100,.light .bg-gray-900.input-field,html.light .bg-gray-900.input-field{background-color:#edebe4;color:#1e2230}.input-field{width:100%;border-radius:var(--radius);border-width:1px;--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(22 22 30 / var(--tw-bg-opacity, 1));padding:.5rem .75rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1));transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.input-field:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-color: hsl(var(--primary))}.light .card,html.light .card{background-color:#edebe4;border-color:#d6d0c5}.light .card.text-gray-100,html.light .card.text-gray-100{background-color:#edebe4;color:#1e2230}.card{border-radius:.75rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1));--tw-bg-opacity: 1;background-color:rgb(22 22 30 / var(--tw-bg-opacity, 1));padding:1.5rem}.light .glass,html.light .glass{background-color:#edebe4d9}.glass{border-width:1px;border-color:#1f293780;background-color:#16161e80;--tw-backdrop-blur: blur(4px);-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)}.light .card,html.light .card{background:#fff;border-color:#e2ddd4;color:#1e2230}.light .glass,html.light .glass{background:#ffffffa6;border-color:#262b3324}.light .btn-secondary,html.light .btn-secondary{background:#ede9e0;color:#1e2230}.light .btn-secondary:hover,html.light .btn-secondary:hover{background:#e0dad0}.light .btn-ghost,html.light .btn-ghost{color:#4d5563}.light .btn-ghost:hover,html.light .btn-ghost:hover{background:#262b3312;color:#1e2230}.light .input-field,html.light .input-field{background:#fff;border-color:#c8c3b8;color:#1e2230}.light .bg-gray-950,html.light .bg-gray-950{background-color:#f7f5f0!important}.light .bg-gray-900,html.light .bg-gray-900{background-color:#edebe4!important}.light .bg-gray-800,html.light .bg-gray-800{background-color:#e2ddd4!important}.light .bg-gray-800\/60,html.light .bg-gray-800\/60{background-color:#e2ddd499!important}.light .border-gray-800,html.light .border-gray-800{border-color:#d6d0c5!important}.light .border-gray-700,html.light .border-gray-700{border-color:#c8c3b8!important}.light .text-gray-100,html.light .text-gray-100{color:#1e2230!important}.light .text-gray-200,html.light .text-gray-200{color:#2c3040!important}.light .text-gray-300,html.light .text-gray-300{color:#3d4350!important}.light .text-gray-400,html.light .text-gray-400{color:#5a6070!important}.light .text-gray-500,html.light .text-gray-500{color:#7a8090!important}.light .bg-gray-900\/50,html.light .bg-gray-900\/50{background-color:#edebe4d9!important}.light .bg-gray-950\/95,html.light .bg-gray-950\/95{background-color:#f7f5f0f7!important}.light .hover\:bg-gray-800:hover,html.light .hover\:bg-gray-800:hover,.light .bg-gray-800.animate-pulse,html.light .bg-gray-800.animate-pulse{background-color:#e2ddd4!important}.light .monaco-editor .margin,html.light .monaco-editor .margin{background:#f7f5f0!important}.light .bg-gray-700,html.light .bg-gray-700{background-color:#d6d0c5!important}.light .bg-gray-700\/50,html.light .bg-gray-700\/50{background-color:#d6d0c580!important}.light .bg-gray-600,html.light .bg-gray-600{background-color:#c8c3b8!important}.light .bg-gray-900\/80,html.light .bg-gray-900\/80{background-color:#edebe4e6!important}.light .bg-gray-900\/40,html.light .bg-gray-900\/40{background-color:#edebe48c!important}.light .bg-gray-800\/80,html.light .bg-gray-800\/80{background-color:#e2ddd4d9!important}.light .bg-gray-800\/40,html.light .bg-gray-800\/40{background-color:#e2ddd480!important}.light .bg-gray-800\/30,html.light .bg-gray-800\/30{background-color:#e2ddd466!important}.light .bg-gray-800\/20,html.light .bg-gray-800\/20{background-color:#e2ddd44d!important}.light .border-gray-900,html.light .border-gray-900{border-color:#edebe4!important}.light .border-gray-600,html.light .border-gray-600{border-color:#b8b2a6!important}.light .border-white\/10,html.light .border-white\/10{border-color:#262b331a!important}.light .border-white\/15,html.light .border-white\/15{border-color:#262b3324!important}.light .border-white\/20,html.light .border-white\/20{border-color:#262b332e!important}.light .divide-gray-800>*+*,html.light .divide-gray-800>*+*{border-color:#d6d0c5!important}.light .divide-gray-700>*+*,html.light .divide-gray-700>*+*{border-color:#c8c3b8!important}.light .text-white,html.light .text-white,.light .text-gray-50,html.light .text-gray-50{color:#1e2230!important}.light .text-gray-600,html.light .text-gray-600{color:#7a8090!important}.light .text-gray-700,html.light .text-gray-700{color:#5a6070!important}.light .hover\:text-gray-100:hover,html.light .hover\:text-gray-100:hover{color:#2c3040!important}.light .hover\:text-gray-200:hover,html.light .hover\:text-gray-200:hover,.light .hover\:text-gray-300:hover,html.light .hover\:text-gray-300:hover{color:#3d4350!important}.light .hover\:bg-gray-800\/50:hover,html.light .hover\:bg-gray-800\/50:hover{background-color:#e2ddd4b3!important}.light .focus\:ring-gray-700:focus,html.light .focus\:ring-gray-700:focus{--tw-ring-color: #C8C3B8 !important}.light .bg-gray-800\/50,html.light .bg-gray-800\/50{background-color:#e2ddd4a6!important}.light .bg-gray-900\/60,html.light .bg-gray-900\/60{background-color:#edebe4bf!important}.light .btn-primary,html.light .btn-primary{color:#1a1409}.light .sidebar-nav-item,html.light .sidebar-nav-item{color:#3d4350}.light .sidebar-nav-item:hover,html.light .sidebar-nav-item:hover{background-color:#262b3312;color:#1e2230}.light .sidebar-nav-item.active,html.light .sidebar-nav-item.active{background-color:#a6926e24;color:#5a4020}.light .sidebar-nav-item.\!active,html.light .sidebar-nav-item.\!active{background-color:#a6926e24!important;color:#5a4020!important}.light .custom-scrollbar::-webkit-scrollbar-track,html.light .custom-scrollbar::-webkit-scrollbar-track{background:#edebe4}.light .custom-scrollbar::-webkit-scrollbar-thumb,html.light .custom-scrollbar::-webkit-scrollbar-thumb{background:#c8c3b8}.light .custom-scrollbar::-webkit-scrollbar-thumb:hover,html.light .custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#b0a998}.light .hover\:bg-gray-800\/30:hover,html.light .hover\:bg-gray-800\/30:hover{background-color:#e2ddd473!important}.light .bg-gray-900.text-gray-100,html.light .bg-gray-900.text-gray-100{background-color:#edebe4!important;color:#1e2230!important}.light .skeleton,html.light .skeleton{background-image:linear-gradient(90deg,#e2ddd4,#edebe4,#e2ddd4)!important}.light .monaco-editor,html.light .monaco-editor,.light .monaco-editor .inputarea.ime-input,html.light .monaco-editor .inputarea.ime-input{background:#fafaf8!important}@property --glow-angle{syntax: ""; inherits: false; initial-value: 0deg;}@property --glow-x{syntax: ""; inherits: false; initial-value: 50%;}@property --glow-y{syntax: ""; inherits: false; initial-value: 0%;}.pricing-glow-border{position:relative;isolation:isolate}.pricing-glow-border:before{content:"";position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;border-radius:inherit;padding:1px;background:linear-gradient(var(--glow-angle, 0deg),rgba(196,169,107,0),rgba(216,203,175,.9),rgba(196,169,107,0),rgba(216,203,175,0));-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none;animation:glow-border-rotate 4s linear infinite}.pricing-glow-border:after{content:"";position:absolute;top:-2px;right:-2px;bottom:-2px;left:-2px;border-radius:inherit;background:radial-gradient(ellipse at var(--glow-x, 50%) var(--glow-y, 0%),rgba(196,169,107,.25) 0%,transparent 70%);pointer-events:none;animation:glow-radial-sweep 4s ease-in-out infinite;z-index:-1}@keyframes glow-border-rotate{0%{--glow-angle: 0deg}to{--glow-angle: 360deg}}@keyframes glow-radial-sweep{0%{--glow-x: 50%;--glow-y: 0%;opacity:.8}25%{--glow-x: 100%;--glow-y: 50%;opacity:1}50%{--glow-x: 50%;--glow-y: 100%;opacity:.8}75%{--glow-x: 0%;--glow-y: 50%;opacity:1}to{--glow-x: 50%;--glow-y: 0%;opacity:.8}}.comparison-th{color:#8a9099}.comparison-td{color:#f4f6f8}[data-color-mode=light] .comparison-th{color:#3d4350}[data-color-mode=light] .comparison-td{color:#1a1f2b}@keyframes slideIn{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cc-panel{border:1px solid var(--cc-color-panel-border);border-radius:var(--cc-radius-md);background:var(--cc-color-panel-bg);color:var(--cc-color-text-main)}.cc-panel[data-variant=subtle]{background:var(--cc-color-panel-bg-subtle);border-color:var(--cc-color-panel-border-soft)}.cc-panel[data-padding=sm]{padding:var(--cc-space-3)}.cc-panel[data-padding=md]{padding:var(--cc-space-4)}.cc-panel[data-padding=lg]{padding:var(--cc-space-6)}.cc-eyebrow{margin:0;color:var(--cc-color-text-soft);font-family:var(--cc-font-ui);font-size:var(--cc-text-eyebrow-size);font-weight:var(--cc-text-eyebrow-weight);letter-spacing:var(--cc-text-eyebrow-tracking);text-transform:uppercase}.cc-status-pill{display:inline-block;border:1px solid var(--cc-status-neutral-border);border-radius:var(--cc-radius-pill);background:var(--cc-status-neutral-bg);color:var(--cc-status-neutral-fg);font-weight:400;white-space:nowrap}.cc-status-pill[data-size=xs]{font-size:10px;padding:.125rem .5rem}.cc-status-pill[data-size=sm]{font-size:11px;padding:.125rem .5rem}.cc-status-pill[data-size=md]{font-size:12px;padding:.1875rem .625rem}.cc-status-pill[data-tone=neutral]{color:var(--cc-status-neutral-fg);background:var(--cc-status-neutral-bg);border-color:var(--cc-status-neutral-border)}.cc-status-pill[data-tone=info]{color:var(--cc-status-info-fg);background:var(--cc-status-info-bg);border-color:var(--cc-status-info-border)}.cc-status-pill[data-tone=success]{color:var(--cc-status-success-fg);background:var(--cc-status-success-bg);border-color:var(--cc-status-success-border)}.cc-status-pill[data-tone=warning]{color:var(--cc-status-warning-fg);background:var(--cc-status-warning-bg);border-color:var(--cc-status-warning-border)}.cc-status-pill[data-tone=danger]{color:var(--cc-status-danger-fg);background:var(--cc-status-danger-bg);border-color:var(--cc-status-danger-border)}.cc-surface-notice{border-radius:var(--cc-radius-sm);border:1px solid var(--cc-color-panel-border-soft);background:var(--cc-color-panel-bg-subtle);color:var(--cc-color-text-main)}.cc-surface-notice[data-tone=info]{color:var(--cc-status-neutral-fg);background:#11182766;border-color:#4b556399}.cc-surface-notice[data-tone=warning]{color:var(--cc-status-warning-fg);background:#78350f33;border-color:#f59e0b59}.cc-surface-notice[data-tone=error]{color:var(--cc-status-danger-fg);background:#7f1d1d33;border-color:#ef444459}.cc-surface-state{border-top:1px solid rgba(31,41,55,.95);color:var(--cc-color-text-muted)}.cc-surface-state[data-kind=error]{color:var(--cc-status-danger-fg);background:#7f1d1d1a}.public-shell-kicker{font-size:.6875rem;font-weight:600;text-transform:uppercase;letter-spacing:.22em;--tw-text-opacity: 1;color:rgb(216 203 175 / var(--tw-text-opacity, 1));line-height:1.2}.public-page-title{font-size:2.25rem;line-height:2.5rem;font-weight:600;letter-spacing:-.025em;--tw-text-opacity: 1;color:rgb(244 246 248 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.public-page-title{font-size:3rem;line-height:1}}@media (min-width: 1024px){.public-page-title{font-size:3.75rem;line-height:1}}.public-page-title{line-height:1.05;font-family:var(--font-display)}.public-section-title{font-size:1.5rem;line-height:2rem;font-weight:600;letter-spacing:-.025em;--tw-text-opacity: 1;color:rgb(244 246 248 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.public-section-title{font-size:1.875rem;line-height:2.25rem}}.public-section-title{line-height:1.12;font-family:var(--font-display)}.public-card-title{font-size:1.25rem;line-height:1.75rem;font-weight:600;letter-spacing:-.025em;--tw-text-opacity: 1;color:rgb(244 246 248 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.public-card-title{font-size:1.375rem}}.public-card-title{line-height:1.15;font-family:var(--font-display)}.public-lead{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(138 144 153 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.public-lead{font-size:1rem;line-height:1.5rem}}.public-lead{line-height:1.7}.public-body{font-size:.875rem;line-height:1.25rem;line-height:1.625;--tw-text-opacity: 1;color:rgb(138 144 153 / var(--tw-text-opacity, 1))}@media (min-width: 768px){.public-body{font-size:.975rem}}.public-body{line-height:1.75}.public-microcopy{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:rgb(138 144 153 / var(--tw-text-opacity, 1));line-height:1.6}.public-nav-link{border-radius:9999px;padding:.375rem .75rem;font-size:.875rem;line-height:1.25rem;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;line-height:1.2}.public-stat-label{margin-top:.25rem;font-size:.7rem;text-transform:uppercase;letter-spacing:.16em;--tw-text-opacity: 1;color:rgb(138 144 153 / var(--tw-text-opacity, 1));line-height:1.4}[data-color-mode=light] .public-page-title,[data-color-mode=light] .public-section-title{color:#111318}[data-color-mode=light] .public-card-title{color:#181c24}[data-color-mode=light] .public-shell-kicker{color:#7a6a50}[data-color-mode=light] .public-lead,[data-color-mode=light] .public-body{color:#3d4350}[data-color-mode=light] .public-microcopy,[data-color-mode=light] .public-stat-label{color:#4d5563}.public-card{background:#ffffff0d;border:1px solid rgba(255,255,255,.15);border-radius:1rem;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.public-card-raised{background:#00000040;border:1px solid rgba(255,255,255,.1);border-radius:1rem;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}.public-hero-shell{background:#ffffff0d;border:1px solid rgba(255,255,255,.15);border-radius:2rem;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}[data-color-mode=light] .public-card{background:#fffc;border-color:#262b3321;box-shadow:0 1px 3px #0000000f}[data-color-mode=light] .public-card-raised{background:#ffffffe6;border-color:#262b3329;box-shadow:0 2px 8px #00000014}[data-color-mode=light] .public-hero-shell{background:#ffffffd1;border-color:#262b3324;box-shadow:0 2px 12px #00000012}[data-color-mode=light] .public-hero-inner{background:#121418eb!important;border-color:#d8cbaf26}[data-color-mode=light] .public-hero-inner .public-page-title,[data-color-mode=light] .public-hero-inner .public-section-title,[data-color-mode=light] .public-hero-inner .public-card-title{color:#f4f6f8}[data-color-mode=light] .public-hero-inner .public-lead{color:#c8cdd6}[data-color-mode=light] .public-hero-inner .public-body{color:#8a9099}[data-color-mode=light] .public-hero-inner .public-shell-kicker{color:#d8cbaf}.public-format-pill{background:#00000040;border-color:#fff3;color:#f4f6f8}[data-color-mode=light] .public-format-pill{background:#a6926e1f;border-color:#a6926e59;color:#5c4e32}.public-gold-metal-frame{display:inline-flex;vertical-align:middle;border-radius:9999px;filter:drop-shadow(0 14px 28px rgba(0,0,0,.26)) drop-shadow(0 0 18px rgba(196,169,107,.14));transition:transform .18s ease,filter .18s ease}.public-gold-metal-frame:hover{transform:translateY(-1px);filter:drop-shadow(0 18px 34px rgba(0,0,0,.3)) drop-shadow(0 0 22px rgba(216,203,175,.18))}.public-gold-metal-frame:active{transform:translateY(0)}.public-btn-primary{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-height:2.75rem;padding:.72rem 1.35rem;border-radius:9999px;font-size:.875rem;font-weight:600;line-height:1.2;transition:color .18s ease,opacity .18s ease;background:linear-gradient(135deg,#9a7a3a,#b8964f);color:#faf3e0;border:1px solid rgba(154,122,58,.7);box-shadow:0 1px 4px #00000059,0 0 #b8964f00;cursor:pointer;white-space:nowrap}.public-btn-primary:hover{color:#fff8e6}.public-btn-primary:disabled{cursor:not-allowed;opacity:.65}[data-color-mode=light] .public-gold-metal-frame{filter:drop-shadow(0 14px 28px rgba(62,49,23,.18)) drop-shadow(0 0 16px rgba(191,174,140,.16))}[data-color-mode=light] .public-gold-metal-frame:hover{filter:drop-shadow(0 18px 34px rgba(62,49,23,.2)) drop-shadow(0 0 20px rgba(191,174,140,.18))}[data-color-mode=light] .public-btn-primary{color:#2e2412}.public-btn-secondary{display:inline-flex;align-items:center;gap:.4rem;padding:.6rem 1.25rem;border-radius:9999px;font-size:.875rem;font-weight:400;line-height:1.2;transition:background .15s,color .15s;background:transparent;color:#8a9099;border:1px solid rgba(255,255,255,.2);cursor:pointer;white-space:nowrap}.public-btn-secondary:hover{background:#ffffff0f;color:#d8cbaf;border-color:#d8cbaf59}[data-color-mode=light] .public-btn-secondary{color:#4d5563;border-color:#262b3338}[data-color-mode=light] .public-btn-secondary:hover{background:#262b330f;color:#262b33;border-color:#262b3361}.public-nav-link-active{background:#d8cbaf2e;color:#d8cbaf}[data-color-mode=light] .public-nav-link-active{background:#a6926e24;color:#7a6a50}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-x-20{left:5rem;right:5rem}.inset-x-24{left:6rem;right:6rem}.inset-x-32{left:8rem;right:8rem}.inset-x-60{left:15rem;right:15rem}.inset-x-8{left:2rem;right:2rem}.inset-y-0{top:0;bottom:0}.-left-44{left:-11rem}.-left-\[2\.35rem\]{left:-2.35rem}.-right-32{right:-8rem}.-right-6{right:-1.5rem}.-top-12{top:-3rem}.-top-3{top:-.75rem}.-top-40{top:-10rem}.bottom-0{bottom:0}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.left-2{left:.5rem}.left-3{left:.75rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.left-full{left:100%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.right-full{right:100%}.top-0{top:0}.top-1{top:.25rem}.top-1\/2{top:50%}.top-14{top:3.5rem}.top-16{top:4rem}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[35\%\]{top:35%}.top-\[50\%\]{top:50%}.top-full{top:100%}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[10000\]{z-index:10000}.z-\[100\]{z-index:100}.z-\[9998\]{z-index:9998}.z-\[9999\]{z-index:9999}.col-span-2{grid-column:span 2 / span 2}.m-1{margin:.25rem}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-8{margin-left:-2rem;margin-right:-2rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-mb-px{margin-bottom:-1px}.mb-0\.5{margin-bottom:.125rem}.mb-1{margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-12{margin-bottom:3rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-0\.5{margin-right:.125rem}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mr-auto{margin-right:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-10{margin-top:2.5rem}.mt-14{margin-top:3.5rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-7{margin-top:1.75rem}.mt-8{margin-top:2rem}.mt-\[7px\]{margin-top:7px}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:16 / 9}.h-0{height:0px}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[104px\]{height:104px}.h-\[13rem\]{height:13rem}.h-\[28rem\]{height:28rem}.h-\[2px\]{height:2px}.h-\[32rem\]{height:32rem}.h-\[3px\]{height:3px}.h-\[4\.95rem\]{height:4.95rem}.h-\[40rem\]{height:40rem}.h-\[4px\]{height:4px}.h-\[5px\]{height:5px}.h-\[64px\]{height:64px}.h-\[800px\]{height:800px}.h-\[9\.9rem\]{height:9.9rem}.h-\[calc\(100\%-40px\)\]{height:calc(100% - 40px)}.h-\[calc\(100\%-57px\)\]{height:calc(100% - 57px)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-20{max-height:5rem}.max-h-24{max-height:6rem}.max-h-28{max-height:7rem}.max-h-32{max-height:8rem}.max-h-36{max-height:9rem}.max-h-40{max-height:10rem}.max-h-44{max-height:11rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-56{max-height:14rem}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[32rem\]{max-height:32rem}.max-h-\[34rem\]{max-height:34rem}.max-h-\[360px\]{max-height:360px}.max-h-\[420px\]{max-height:420px}.max-h-\[480px\]{max-height:480px}.max-h-\[70vh\]{max-height:70vh}.max-h-\[78vh\]{max-height:78vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[92vh\]{max-height:92vh}.max-h-\[var\(--radix-dropdown-menu-content-available-height\)\]{max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-\[10rem\]{min-height:10rem}.min-h-\[120px\]{min-height:120px}.min-h-\[16rem\]{min-height:16rem}.min-h-\[180px\]{min-height:180px}.min-h-\[18rem\]{min-height:18rem}.min-h-\[32px\]{min-height:32px}.min-h-\[42rem\]{min-height:42rem}.min-h-\[500px\]{min-height:500px}.min-h-\[64px\]{min-height:64px}.min-h-\[68px\]{min-height:68px}.min-h-\[72px\]{min-height:72px}.min-h-\[88px\]{min-height:88px}.min-h-\[calc\(100vh-5rem\)\]{min-height:calc(100vh - 5rem)}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-0\.5{width:.125rem}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-1\/4{width:25%}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-44{width:11rem}.w-52{width:13rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[14px\]{width:14px}.w-\[18rem\]{width:18rem}.w-\[240px\]{width:240px}.w-\[28rem\]{width:28rem}.w-\[32rem\]{width:32rem}.w-\[40rem\]{width:40rem}.w-\[66\%\]{width:66%}.w-\[72\%\]{width:72%}.w-\[min\(720px\,92vw\)\]{width:min(720px,92vw)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.min-w-0{min-width:0px}.min-w-\[100px\]{min-width:100px}.min-w-\[130px\]{min-width:130px}.min-w-\[140px\]{min-width:140px}.min-w-\[14rem\]{min-width:14rem}.min-w-\[160px\]{min-width:160px}.min-w-\[180px\]{min-width:180px}.min-w-\[190px\]{min-width:190px}.min-w-\[200px\]{min-width:200px}.min-w-\[220px\]{min-width:220px}.min-w-\[260px\]{min-width:260px}.min-w-\[280px\]{min-width:280px}.min-w-\[3rem\]{min-width:3rem}.min-w-\[6\.5rem\]{min-width:6.5rem}.min-w-\[7rem\]{min-width:7rem}.min-w-\[80px\]{min-width:80px}.min-w-\[8rem\]{min-width:8rem}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[100px\]{max-width:100px}.max-w-\[10rem\]{max-width:10rem}.max-w-\[120px\]{max-width:120px}.max-w-\[14\.9rem\]{max-width:14.9rem}.max-w-\[1500px\]{max-width:1500px}.max-w-\[160px\]{max-width:160px}.max-w-\[60\%\]{max-width:60%}.max-w-\[7\.45rem\]{max-width:7.45rem}.max-w-\[7\.8rem\]{max-width:7.8rem}.max-w-\[78\%\]{max-width:78%}.max-w-\[80\%\]{max-width:80%}.max-w-\[85\%\]{max-width:85%}.max-w-\[9\.4rem\]{max-width:9.4rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-\[--radix-dropdown-menu-content-transform-origin\]{transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-px{--tw-translate-y: -1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-px{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes fadeIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.animate-fade-in{animation:fadeIn .3s ease-in-out}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize-y{resize:vertical}.resize{resize:both}.scroll-mt-24{scroll-margin-top:6rem}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-\[1fr_80px_60px_60px\]{grid-template-columns:1fr 80px 60px 60px}.grid-cols-\[3rem_minmax\(0\,1fr\)\]{grid-template-columns:3rem minmax(0,1fr)}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-1{row-gap:.25rem}.gap-y-2\.5{row-gap:.625rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity, 1))}.divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity, 1))}.divide-gray-800>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(31 41 55 / var(--tw-divide-opacity, 1))}.divide-gray-800\/60>:not([hidden])~:not([hidden]){border-color:#1f293799}.divide-gray-900>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(22 22 30 / var(--tw-divide-opacity, 1))}.divide-white\/10>:not([hidden])~:not([hidden]){border-color:#ffffff1a}.divide-white\/5>:not([hidden])~:not([hidden]){border-color:#ffffff0d}.self-start{align-self:flex-start}.justify-self-start{justify-self:start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[2\.75rem\]{border-radius:2.75rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-tl-none{border-top-left-radius:0}.rounded-tr-none{border-top-right-radius:0}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-b-4{border-bottom-width:4px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-r-4{border-right-width:4px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-t-2{border-top-width:2px}.border-t-4{border-top-width:4px}.border-dashed{border-style:dashed}.border-none{border-style:none}.border-\[\#262B33\]\/15{border-color:#262b3326}.border-\[\#262B33\]\/20{border-color:#262b3333}.border-\[\#7A6A50\]{--tw-border-opacity: 1;border-color:rgb(122 106 80 / var(--tw-border-opacity, 1))}.border-\[\#A6926E\]{--tw-border-opacity: 1;border-color:rgb(166 146 110 / var(--tw-border-opacity, 1))}.border-\[\#A6926E\]\/25{border-color:#a6926e40}.border-\[\#A6926E\]\/35{border-color:#a6926e59}.border-\[\#A6926E\]\/40{border-color:#a6926e66}.border-\[\#A6926E\]\/50{border-color:#a6926e80}.border-\[\#A6926E\]\/60{border-color:#a6926e99}.border-\[\#C4A96B\]{--tw-border-opacity: 1;border-color:rgb(196 169 107 / var(--tw-border-opacity, 1))}.border-\[\#C4A96B\]\/30{border-color:#c4a96b4d}.border-\[\#C4A96B\]\/40{border-color:#c4a96b66}.border-\[\#C4A96B\]\/50{border-color:#c4a96b80}.border-\[\#C4A96B\]\/60{border-color:#c4a96b99}.border-\[\#D8CBAF\]\/15{border-color:#d8cbaf26}.border-\[\#D8CBAF\]\/20{border-color:#d8cbaf33}.border-\[\#D8CBAF\]\/30{border-color:#d8cbaf4d}.border-\[\#D8CBAF\]\/40{border-color:#d8cbaf66}.border-\[\#D8CBAF\]\/45{border-color:#d8cbaf73}.border-\[\#D8CBAF\]\/50{border-color:#d8cbaf80}.border-\[\#D8CBAF\]\/60{border-color:#d8cbaf99}.border-amber-400\/20{border-color:#fbbf2433}.border-amber-400\/30{border-color:#fbbf244d}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-amber-500\/20{border-color:#f59e0b33}.border-amber-500\/30{border-color:#f59e0b4d}.border-amber-500\/40{border-color:#f59e0b66}.border-amber-500\/50{border-color:#f59e0b80}.border-amber-600\/30{border-color:#d977064d}.border-amber-600\/40{border-color:#d9770666}.border-amber-600\/60{border-color:#d9770699}.border-amber-600\/70{border-color:#d97706b3}.border-amber-700{--tw-border-opacity: 1;border-color:rgb(180 83 9 / var(--tw-border-opacity, 1))}.border-amber-700\/40{border-color:#b4530966}.border-amber-700\/50{border-color:#b4530980}.border-amber-700\/60{border-color:#b4530999}.border-amber-700\/70{border-color:#b45309b3}.border-amber-800\/40{border-color:#92400e66}.border-amber-800\/60{border-color:#92400e99}.border-amber-800\/70{border-color:#92400eb3}.border-amber-900\/20{border-color:#78350f33}.border-amber-900\/30{border-color:#78350f4d}.border-amber-900\/35{border-color:#78350f59}.border-amber-900\/40{border-color:#78350f66}.border-blue-400\/60{border-color:#60a5fa99}.border-blue-500\/30{border-color:#3b82f64d}.border-blue-600\/40{border-color:#2563eb66}.border-blue-700\/50{border-color:#1d4ed880}.border-blue-800\/50{border-color:#1e40af80}.border-blue-900\/30{border-color:#1e3a8a4d}.border-border{border-color:hsl(var(--border))}.border-cyan-400\/30{border-color:#22d3ee4d}.border-cyan-500\/25{border-color:#06b6d440}.border-cyan-500\/30{border-color:#06b6d44d}.border-cyan-500\/40{border-color:#06b6d466}.border-cyan-500\/50{border-color:#06b6d480}.border-cyan-500\/60{border-color:#06b6d499}.border-cyan-600{--tw-border-opacity: 1;border-color:rgb(8 145 178 / var(--tw-border-opacity, 1))}.border-cyan-700\/25{border-color:#0e749040}.border-cyan-700\/35{border-color:#0e749059}.border-cyan-700\/50{border-color:#0e749080}.border-cyan-700\/60{border-color:#0e749099}.border-cyan-700\/70{border-color:#0e7490b3}.border-cyan-800\/60{border-color:#155e7599}.border-cyan-800\/70{border-color:#155e75b3}.border-destructive{border-color:hsl(var(--destructive))}.border-emerald-400\/30{border-color:#34d3994d}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-emerald-500\/20{border-color:#10b98133}.border-emerald-500\/25{border-color:#10b98140}.border-emerald-500\/30{border-color:#10b9814d}.border-emerald-500\/40{border-color:#10b98166}.border-emerald-500\/50{border-color:#10b98180}.border-emerald-600{--tw-border-opacity: 1;border-color:rgb(5 150 105 / var(--tw-border-opacity, 1))}.border-emerald-600\/30{border-color:#0596694d}.border-emerald-600\/40{border-color:#05966966}.border-emerald-700{--tw-border-opacity: 1;border-color:rgb(4 120 87 / var(--tw-border-opacity, 1))}.border-emerald-700\/40{border-color:#04785766}.border-emerald-700\/50{border-color:#04785780}.border-emerald-700\/70{border-color:#047857b3}.border-emerald-800\/30{border-color:#065f464d}.border-emerald-800\/40{border-color:#065f4666}.border-emerald-800\/50{border-color:#065f4680}.border-fuchsia-500\/30{border-color:#d946ef4d}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.border-gray-600{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.border-gray-700{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.border-gray-700\/50{border-color:#37415180}.border-gray-700\/60{border-color:#37415199}.border-gray-700\/80{border-color:#374151cc}.border-gray-800{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.border-gray-800\/60{border-color:#1f293799}.border-gray-800\/70{border-color:#1f2937b3}.border-gray-800\/80{border-color:#1f2937cc}.border-gray-900\/80{border-color:#16161ecc}.border-green-800{--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.border-green-900{--tw-border-opacity: 1;border-color:rgb(20 83 45 / var(--tw-border-opacity, 1))}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.border-indigo-500\/30{border-color:#6366f14d}.border-indigo-500\/40{border-color:#6366f166}.border-indigo-600{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity, 1))}.border-indigo-700\/50{border-color:#4338ca80}.border-indigo-700\/70{border-color:#4338cab3}.border-indigo-800\/50{border-color:#3730a380}.border-indigo-800\/70{border-color:#3730a3b3}.border-input{border-color:hsl(var(--input))}.border-orange-400{--tw-border-opacity: 1;border-color:rgb(251 146 60 / var(--tw-border-opacity, 1))}.border-orange-700\/50{border-color:#c2410c80}.border-orange-800{--tw-border-opacity: 1;border-color:rgb(154 52 18 / var(--tw-border-opacity, 1))}.border-purple-500{--tw-border-opacity: 1;border-color:rgb(139 92 246 / var(--tw-border-opacity, 1))}.border-purple-500\/0{border-color:#8b5cf600}.border-purple-500\/10{border-color:#8b5cf61a}.border-purple-500\/100{border-color:#8b5cf6}.border-purple-500\/15{border-color:#8b5cf626}.border-purple-500\/20{border-color:#8b5cf633}.border-purple-500\/25{border-color:#8b5cf640}.border-purple-500\/30{border-color:#8b5cf64d}.border-purple-500\/35{border-color:#8b5cf659}.border-purple-500\/40{border-color:#8b5cf666}.border-purple-500\/45{border-color:#8b5cf673}.border-purple-500\/5{border-color:#8b5cf60d}.border-purple-500\/50{border-color:#8b5cf680}.border-purple-500\/55{border-color:#8b5cf68c}.border-purple-500\/60{border-color:#8b5cf699}.border-purple-500\/65{border-color:#8b5cf6a6}.border-purple-500\/70{border-color:#8b5cf6b3}.border-purple-500\/75{border-color:#8b5cf6bf}.border-purple-500\/80{border-color:#8b5cf6cc}.border-purple-500\/85{border-color:#8b5cf6d9}.border-purple-500\/90{border-color:#8b5cf6e6}.border-purple-500\/95{border-color:#8b5cf6f2}.border-purple-700\/50{border-color:#6d28d980}.border-red-400{--tw-border-opacity: 1;border-color:rgb(248 113 113 / var(--tw-border-opacity, 1))}.border-red-400\/30{border-color:#f871714d}.border-red-500\/20{border-color:#ef444433}.border-red-500\/30{border-color:#ef44444d}.border-red-500\/40{border-color:#ef444466}.border-red-500\/50{border-color:#ef444480}.border-red-500\/60{border-color:#ef444499}.border-red-600{--tw-border-opacity: 1;border-color:rgb(220 38 38 / var(--tw-border-opacity, 1))}.border-red-600\/40{border-color:#dc262666}.border-red-600\/50{border-color:#dc262680}.border-red-700\/40{border-color:#b91c1c66}.border-red-700\/50{border-color:#b91c1c80}.border-red-700\/60{border-color:#b91c1c99}.border-red-700\/70{border-color:#b91c1cb3}.border-red-800{--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.border-red-800\/50{border-color:#991b1b80}.border-red-900{--tw-border-opacity: 1;border-color:rgb(127 29 29 / var(--tw-border-opacity, 1))}.border-red-900\/40{border-color:#7f1d1d66}.border-rose-700\/70{border-color:#be123cb3}.border-rose-800\/60{border-color:#9f123999}.border-rose-900\/60{border-color:#88133799}.border-rose-900\/70{border-color:#881337b3}.border-sky-400\/20{border-color:#38bdf833}.border-sky-500{--tw-border-opacity: 1;border-color:rgb(14 165 233 / var(--tw-border-opacity, 1))}.border-sky-500\/30{border-color:#0ea5e94d}.border-sky-700{--tw-border-opacity: 1;border-color:rgb(3 105 161 / var(--tw-border-opacity, 1))}.border-sky-700\/70{border-color:#0369a1b3}.border-sky-800\/40{border-color:#07598566}.border-sky-800\/60{border-color:#07598599}.border-sky-900\/40{border-color:#0c4a6e66}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.border-teal-500\/60{border-color:#14b8a699}.border-teal-700\/70{border-color:#0f766eb3}.border-teal-800\/60{border-color:#115e5999}.border-transparent{border-color:transparent}.border-violet-500\/30{border-color:#8b5cf64d}.border-violet-500\/40{border-color:#8b5cf666}.border-violet-600{--tw-border-opacity: 1;border-color:rgb(124 58 237 / var(--tw-border-opacity, 1))}.border-white\/10{border-color:#ffffff1a}.border-white\/15{border-color:#ffffff26}.border-white\/20{border-color:#fff3}.border-white\/30{border-color:#ffffff4d}.border-white\/40{border-color:#fff6}.border-white\/5{border-color:#ffffff0d}.border-yellow-400{--tw-border-opacity: 1;border-color:rgb(250 204 21 / var(--tw-border-opacity, 1))}.border-yellow-500\/30{border-color:#eab3084d}.border-yellow-500\/40{border-color:#eab30866}.border-yellow-700\/70{border-color:#a16207b3}.border-yellow-800{--tw-border-opacity: 1;border-color:rgb(133 77 14 / var(--tw-border-opacity, 1))}.border-zinc-200{--tw-border-opacity: 1;border-color:rgb(228 228 231 / var(--tw-border-opacity, 1))}.border-zinc-300{--tw-border-opacity: 1;border-color:rgb(212 212 216 / var(--tw-border-opacity, 1))}.border-b-amber-600\/80{border-bottom-color:#d97706cc}.border-b-background{border-bottom-color:hsl(var(--background))}.border-l-transparent{border-left-color:transparent}.border-r-transparent{border-right-color:transparent}.border-t-amber-600\/80{border-top-color:#d97706cc}.border-t-blue-500{--tw-border-opacity: 1;border-top-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-t-emerald-500{--tw-border-opacity: 1;border-top-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-t-indigo-400{--tw-border-opacity: 1;border-top-color:rgb(129 140 248 / var(--tw-border-opacity, 1))}.border-t-red-500{--tw-border-opacity: 1;border-top-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-t-slate-500{--tw-border-opacity: 1;border-top-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.border-t-transparent{border-top-color:transparent}.border-t-white{--tw-border-opacity: 1;border-top-color:rgb(255 255 255 / var(--tw-border-opacity, 1))}.bg-\[\#090A0D\]{--tw-bg-opacity: 1;background-color:rgb(9 10 13 / var(--tw-bg-opacity, 1))}.bg-\[\#0A0E19\]\/60{background-color:#0a0e1999}.bg-\[\#0A0E19\]\/70{background-color:#0a0e19b3}.bg-\[\#0A0E19\]\/80{background-color:#0a0e19cc}.bg-\[\#0D1117\]{--tw-bg-opacity: 1;background-color:rgb(13 17 23 / var(--tw-bg-opacity, 1))}.bg-\[\#11111b\]{--tw-bg-opacity: 1;background-color:rgb(17 17 27 / var(--tw-bg-opacity, 1))}.bg-\[\#111\]{--tw-bg-opacity: 1;background-color:rgb(17 17 17 / var(--tw-bg-opacity, 1))}.bg-\[\#161622\]{--tw-bg-opacity: 1;background-color:rgb(22 22 34 / var(--tw-bg-opacity, 1))}.bg-\[\#181A1E\]{--tw-bg-opacity: 1;background-color:rgb(24 26 30 / var(--tw-bg-opacity, 1))}.bg-\[\#1E2025\]{--tw-bg-opacity: 1;background-color:rgb(30 32 37 / var(--tw-bg-opacity, 1))}.bg-\[\#1e1e2e\]{--tw-bg-opacity: 1;background-color:rgb(30 30 46 / var(--tw-bg-opacity, 1))}.bg-\[\#7A6A50\]{--tw-bg-opacity: 1;background-color:rgb(122 106 80 / var(--tw-bg-opacity, 1))}.bg-\[\#A6926E\]\/10{background-color:#a6926e1a}.bg-\[\#BFAE8C\]\/10{background-color:#bfae8c1a}.bg-\[\#C4A96B\]{--tw-bg-opacity: 1;background-color:rgb(196 169 107 / var(--tw-bg-opacity, 1))}.bg-\[\#C4A96B\]\/10{background-color:#c4a96b1a}.bg-\[\#C4A96B\]\/15{background-color:#c4a96b26}.bg-\[\#C4A96B\]\/20{background-color:#c4a96b33}.bg-\[\#D8CBAF\]\/10{background-color:#d8cbaf1a}.bg-\[\#D8CBAF\]\/15{background-color:#d8cbaf26}.bg-\[\#D8CBAF\]\/20{background-color:#d8cbaf33}.bg-\[\#D8CBAF\]\/5{background-color:#d8cbaf0d}.bg-\[\#D8CBAF\]\/50{background-color:#d8cbaf80}.bg-\[\#D8CBAF\]\/60{background-color:#d8cbaf99}.bg-\[\#F4F6F8\]{--tw-bg-opacity: 1;background-color:rgb(244 246 248 / var(--tw-bg-opacity, 1))}.bg-\[var\(--tone-bg\)\]{background-color:var(--tone-bg)}.bg-amber-400{--tw-bg-opacity: 1;background-color:rgb(251 191 36 / var(--tw-bg-opacity, 1))}.bg-amber-400\/10{background-color:#fbbf241a}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-amber-500\/5{background-color:#f59e0b0d}.bg-amber-600{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.bg-amber-600\/20{background-color:#d9770633}.bg-amber-700{--tw-bg-opacity: 1;background-color:rgb(180 83 9 / var(--tw-bg-opacity, 1))}.bg-amber-900\/10{background-color:#78350f1a}.bg-amber-900\/20{background-color:#78350f33}.bg-amber-900\/30{background-color:#78350f4d}.bg-amber-900\/40{background-color:#78350f66}.bg-amber-950\/20{background-color:#451a0333}.bg-amber-950\/30{background-color:#451a034d}.bg-amber-950\/40{background-color:#451a0366}.bg-amber-950\/45{background-color:#451a0373}.bg-background{background-color:hsl(var(--background))}.bg-background\/95{background-color:hsl(var(--background) / .95)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/10{background-color:#0000001a}.bg-black\/20{background-color:#0003}.bg-black\/25{background-color:#00000040}.bg-black\/30{background-color:#0000004d}.bg-black\/40{background-color:#0006}.bg-black\/50{background-color:#00000080}.bg-black\/60{background-color:#0009}.bg-black\/70{background-color:#000000b3}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-400\/20{background-color:#60a5fa33}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-blue-500\/20{background-color:#3b82f633}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.bg-blue-900{--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.bg-blue-900\/20{background-color:#1e3a8a33}.bg-blue-900\/30{background-color:#1e3a8a4d}.bg-blue-900\/40{background-color:#1e3a8a66}.bg-blue-900\/60{background-color:#1e3a8a99}.bg-blue-950\/10{background-color:#1725541a}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-500\/10{background-color:#06b6d41a}.bg-cyan-600\/10{background-color:#0891b21a}.bg-cyan-600\/20{background-color:#0891b233}.bg-cyan-900\/30{background-color:#164e634d}.bg-cyan-950\/15{background-color:#08334426}.bg-cyan-950\/20{background-color:#08334433}.bg-cyan-950\/30{background-color:#0833444d}.bg-cyan-950\/40{background-color:#08334466}.bg-destructive{background-color:hsl(var(--destructive))}.bg-emerald-100{--tw-bg-opacity: 1;background-color:rgb(209 250 229 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/20{background-color:#10b98133}.bg-emerald-500\/5{background-color:#10b9810d}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-emerald-600\/20{background-color:#05966933}.bg-emerald-700{--tw-bg-opacity: 1;background-color:rgb(4 120 87 / var(--tw-bg-opacity, 1))}.bg-emerald-900\/10{background-color:#064e3b1a}.bg-emerald-900\/20{background-color:#064e3b33}.bg-emerald-900\/30{background-color:#064e3b4d}.bg-emerald-900\/40{background-color:#064e3b66}.bg-emerald-900\/60{background-color:#064e3b99}.bg-emerald-950\/20{background-color:#022c2233}.bg-fuchsia-500\/10{background-color:#d946ef1a}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-500{--tw-bg-opacity: 1;background-color:rgb(107 114 128 / var(--tw-bg-opacity, 1))}.bg-gray-700{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.bg-gray-700\/60{background-color:#37415199}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-gray-800\/40{background-color:#1f293766}.bg-gray-800\/50{background-color:#1f293780}.bg-gray-800\/60{background-color:#1f293799}.bg-gray-800\/70{background-color:#1f2937b3}.bg-gray-800\/80{background-color:#1f2937cc}.bg-gray-850{--tw-bg-opacity: 1;background-color:rgb(30 30 46 / var(--tw-bg-opacity, 1))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(22 22 30 / var(--tw-bg-opacity, 1))}.bg-gray-900\/20{background-color:#16161e33}.bg-gray-900\/30{background-color:#16161e4d}.bg-gray-900\/40{background-color:#16161e66}.bg-gray-900\/50{background-color:#16161e80}.bg-gray-900\/60{background-color:#16161e99}.bg-gray-900\/70{background-color:#16161eb3}.bg-gray-900\/80{background-color:#16161ecc}.bg-gray-900\/95{background-color:#16161ef2}.bg-gray-950{--tw-bg-opacity: 1;background-color:rgb(10 10 15 / var(--tw-bg-opacity, 1))}.bg-gray-950\/20{background-color:#0a0a0f33}.bg-gray-950\/30{background-color:#0a0a0f4d}.bg-gray-950\/40{background-color:#0a0a0f66}.bg-gray-950\/50{background-color:#0a0a0f80}.bg-gray-950\/60{background-color:#0a0a0f99}.bg-gray-950\/70{background-color:#0a0a0fb3}.bg-gray-950\/80{background-color:#0a0a0fcc}.bg-gray-950\/90{background-color:#0a0a0fe6}.bg-gray-950\/95{background-color:#0a0a0ff2}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-green-500\/10{background-color:#22c55e1a}.bg-green-500\/20{background-color:#22c55e33}.bg-green-600\/20{background-color:#16a34a33}.bg-green-800{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity, 1))}.bg-green-900{--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.bg-green-900\/50{background-color:#14532d80}.bg-green-950\/20{background-color:#052e1633}.bg-green-950\/30{background-color:#052e164d}.bg-green-950\/40{background-color:#052e1666}.bg-indigo-500{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.bg-indigo-500\/10{background-color:#6366f11a}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-indigo-600\/20{background-color:#4f46e533}.bg-indigo-700{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.bg-indigo-900\/40{background-color:#312e8166}.bg-indigo-950{--tw-bg-opacity: 1;background-color:rgb(30 27 75 / var(--tw-bg-opacity, 1))}.bg-indigo-950\/20{background-color:#1e1b4b33}.bg-indigo-950\/30{background-color:#1e1b4b4d}.bg-indigo-950\/50{background-color:#1e1b4b80}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-orange-100{--tw-bg-opacity: 1;background-color:rgb(255 237 213 / var(--tw-bg-opacity, 1))}.bg-orange-400{--tw-bg-opacity: 1;background-color:rgb(251 146 60 / var(--tw-bg-opacity, 1))}.bg-orange-500{--tw-bg-opacity: 1;background-color:rgb(249 115 22 / var(--tw-bg-opacity, 1))}.bg-orange-900{--tw-bg-opacity: 1;background-color:rgb(124 45 18 / var(--tw-bg-opacity, 1))}.bg-orange-900\/40{background-color:#7c2d1266}.bg-orange-950\/40{background-color:#43140766}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-purple-400{--tw-bg-opacity: 1;background-color:rgb(167 139 250 / var(--tw-bg-opacity, 1))}.bg-purple-400\/0{background-color:#a78bfa00}.bg-purple-400\/10{background-color:#a78bfa1a}.bg-purple-400\/100{background-color:#a78bfa}.bg-purple-400\/15{background-color:#a78bfa26}.bg-purple-400\/20{background-color:#a78bfa33}.bg-purple-400\/25{background-color:#a78bfa40}.bg-purple-400\/30{background-color:#a78bfa4d}.bg-purple-400\/35{background-color:#a78bfa59}.bg-purple-400\/40{background-color:#a78bfa66}.bg-purple-400\/45{background-color:#a78bfa73}.bg-purple-400\/5{background-color:#a78bfa0d}.bg-purple-400\/50{background-color:#a78bfa80}.bg-purple-400\/55{background-color:#a78bfa8c}.bg-purple-400\/60{background-color:#a78bfa99}.bg-purple-400\/65{background-color:#a78bfaa6}.bg-purple-400\/70{background-color:#a78bfab3}.bg-purple-400\/75{background-color:#a78bfabf}.bg-purple-400\/80{background-color:#a78bfacc}.bg-purple-400\/85{background-color:#a78bfad9}.bg-purple-400\/90{background-color:#a78bfae6}.bg-purple-400\/95{background-color:#a78bfaf2}.bg-purple-500{--tw-bg-opacity: 1;background-color:rgb(139 92 246 / var(--tw-bg-opacity, 1))}.bg-purple-500\/0{background-color:#8b5cf600}.bg-purple-500\/10{background-color:#8b5cf61a}.bg-purple-500\/100{background-color:#8b5cf6}.bg-purple-500\/15{background-color:#8b5cf626}.bg-purple-500\/20{background-color:#8b5cf633}.bg-purple-500\/25{background-color:#8b5cf640}.bg-purple-500\/30{background-color:#8b5cf64d}.bg-purple-500\/35{background-color:#8b5cf659}.bg-purple-500\/40{background-color:#8b5cf666}.bg-purple-500\/45{background-color:#8b5cf673}.bg-purple-500\/5{background-color:#8b5cf60d}.bg-purple-500\/50{background-color:#8b5cf680}.bg-purple-500\/55{background-color:#8b5cf68c}.bg-purple-500\/60{background-color:#8b5cf699}.bg-purple-500\/65{background-color:#8b5cf6a6}.bg-purple-500\/70{background-color:#8b5cf6b3}.bg-purple-500\/75{background-color:#8b5cf6bf}.bg-purple-500\/80{background-color:#8b5cf6cc}.bg-purple-500\/85{background-color:#8b5cf6d9}.bg-purple-500\/90{background-color:#8b5cf6e6}.bg-purple-500\/95{background-color:#8b5cf6f2}.bg-purple-600{--tw-bg-opacity: 1;background-color:rgb(124 58 237 / var(--tw-bg-opacity, 1))}.bg-purple-600\/0{background-color:#7c3aed00}.bg-purple-600\/10{background-color:#7c3aed1a}.bg-purple-600\/100{background-color:#7c3aed}.bg-purple-600\/15{background-color:#7c3aed26}.bg-purple-600\/20{background-color:#7c3aed33}.bg-purple-600\/25{background-color:#7c3aed40}.bg-purple-600\/30{background-color:#7c3aed4d}.bg-purple-600\/35{background-color:#7c3aed59}.bg-purple-600\/40{background-color:#7c3aed66}.bg-purple-600\/45{background-color:#7c3aed73}.bg-purple-600\/5{background-color:#7c3aed0d}.bg-purple-600\/50{background-color:#7c3aed80}.bg-purple-600\/55{background-color:#7c3aed8c}.bg-purple-600\/60{background-color:#7c3aed99}.bg-purple-600\/65{background-color:#7c3aeda6}.bg-purple-600\/70{background-color:#7c3aedb3}.bg-purple-600\/75{background-color:#7c3aedbf}.bg-purple-600\/80{background-color:#7c3aedcc}.bg-purple-600\/85{background-color:#7c3aedd9}.bg-purple-600\/90{background-color:#7c3aede6}.bg-purple-600\/95{background-color:#7c3aedf2}.bg-purple-700{--tw-bg-opacity: 1;background-color:rgb(109 40 217 / var(--tw-bg-opacity, 1))}.bg-purple-700\/0{background-color:#6d28d900}.bg-purple-700\/10{background-color:#6d28d91a}.bg-purple-700\/100{background-color:#6d28d9}.bg-purple-700\/15{background-color:#6d28d926}.bg-purple-700\/20{background-color:#6d28d933}.bg-purple-700\/25{background-color:#6d28d940}.bg-purple-700\/30{background-color:#6d28d94d}.bg-purple-700\/35{background-color:#6d28d959}.bg-purple-700\/40{background-color:#6d28d966}.bg-purple-700\/45{background-color:#6d28d973}.bg-purple-700\/5{background-color:#6d28d90d}.bg-purple-700\/50{background-color:#6d28d980}.bg-purple-700\/55{background-color:#6d28d98c}.bg-purple-700\/60{background-color:#6d28d999}.bg-purple-700\/65{background-color:#6d28d9a6}.bg-purple-700\/70{background-color:#6d28d9b3}.bg-purple-700\/75{background-color:#6d28d9bf}.bg-purple-700\/80{background-color:#6d28d9cc}.bg-purple-700\/85{background-color:#6d28d9d9}.bg-purple-700\/90{background-color:#6d28d9e6}.bg-purple-700\/95{background-color:#6d28d9f2}.bg-purple-800{--tw-bg-opacity: 1;background-color:rgb(91 33 182 / var(--tw-bg-opacity, 1))}.bg-purple-800\/0{background-color:#5b21b600}.bg-purple-800\/10{background-color:#5b21b61a}.bg-purple-800\/100{background-color:#5b21b6}.bg-purple-800\/15{background-color:#5b21b626}.bg-purple-800\/20{background-color:#5b21b633}.bg-purple-800\/25{background-color:#5b21b640}.bg-purple-800\/30{background-color:#5b21b64d}.bg-purple-800\/35{background-color:#5b21b659}.bg-purple-800\/40{background-color:#5b21b666}.bg-purple-800\/45{background-color:#5b21b673}.bg-purple-800\/5{background-color:#5b21b60d}.bg-purple-800\/50{background-color:#5b21b680}.bg-purple-800\/55{background-color:#5b21b68c}.bg-purple-800\/60{background-color:#5b21b699}.bg-purple-800\/65{background-color:#5b21b6a6}.bg-purple-800\/70{background-color:#5b21b6b3}.bg-purple-800\/75{background-color:#5b21b6bf}.bg-purple-800\/80{background-color:#5b21b6cc}.bg-purple-800\/85{background-color:#5b21b6d9}.bg-purple-800\/90{background-color:#5b21b6e6}.bg-purple-800\/95{background-color:#5b21b6f2}.bg-purple-900{--tw-bg-opacity: 1;background-color:rgb(76 29 149 / var(--tw-bg-opacity, 1))}.bg-purple-900\/0{background-color:#4c1d9500}.bg-purple-900\/10{background-color:#4c1d951a}.bg-purple-900\/100{background-color:#4c1d95}.bg-purple-900\/15{background-color:#4c1d9526}.bg-purple-900\/20{background-color:#4c1d9533}.bg-purple-900\/25{background-color:#4c1d9540}.bg-purple-900\/30{background-color:#4c1d954d}.bg-purple-900\/35{background-color:#4c1d9559}.bg-purple-900\/40{background-color:#4c1d9566}.bg-purple-900\/45{background-color:#4c1d9573}.bg-purple-900\/5{background-color:#4c1d950d}.bg-purple-900\/50{background-color:#4c1d9580}.bg-purple-900\/55{background-color:#4c1d958c}.bg-purple-900\/60{background-color:#4c1d9599}.bg-purple-900\/65{background-color:#4c1d95a6}.bg-purple-900\/70{background-color:#4c1d95b3}.bg-purple-900\/75{background-color:#4c1d95bf}.bg-purple-900\/80{background-color:#4c1d95cc}.bg-purple-900\/85{background-color:#4c1d95d9}.bg-purple-900\/90{background-color:#4c1d95e6}.bg-purple-900\/95{background-color:#4c1d95f2}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/20{background-color:#ef444433}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-red-600\/20{background-color:#dc262633}.bg-red-900{--tw-bg-opacity: 1;background-color:rgb(127 29 29 / var(--tw-bg-opacity, 1))}.bg-red-900\/10{background-color:#7f1d1d1a}.bg-red-900\/20{background-color:#7f1d1d33}.bg-red-900\/30{background-color:#7f1d1d4d}.bg-red-900\/40{background-color:#7f1d1d66}.bg-red-900\/50{background-color:#7f1d1d80}.bg-red-900\/60{background-color:#7f1d1d99}.bg-red-950\/20{background-color:#450a0a33}.bg-red-950\/30{background-color:#450a0a4d}.bg-red-950\/40{background-color:#450a0a66}.bg-rose-950\/30{background-color:#4c05194d}.bg-rose-950\/40{background-color:#4c051966}.bg-rose-950\/45{background-color:#4c051973}.bg-secondary{background-color:hsl(var(--secondary))}.bg-sky-400\/10{background-color:#38bdf81a}.bg-sky-500\/10{background-color:#0ea5e91a}.bg-sky-950\/20{background-color:#082f4933}.bg-sky-950\/30{background-color:#082f494d}.bg-sky-950\/40{background-color:#082f4966}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-900\/70{background-color:#0f172ab3}.bg-slate-900\/80{background-color:#0f172acc}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-slate-950\/70{background-color:#020617b3}.bg-teal-900{--tw-bg-opacity: 1;background-color:rgb(19 78 74 / var(--tw-bg-opacity, 1))}.bg-teal-900\/20{background-color:#134e4a33}.bg-teal-950\/20{background-color:#042f2e33}.bg-transparent{background-color:transparent}.bg-violet-100{--tw-bg-opacity: 1;background-color:rgb(237 233 254 / var(--tw-bg-opacity, 1))}.bg-violet-600{--tw-bg-opacity: 1;background-color:rgb(124 58 237 / var(--tw-bg-opacity, 1))}.bg-violet-600\/10{background-color:#7c3aed1a}.bg-violet-900\/30{background-color:#4c1d954d}.bg-violet-950\/20{background-color:#2e106533}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/10{background-color:#ffffff1a}.bg-white\/5{background-color:#ffffff0d}.bg-white\/70{background-color:#ffffffb3}.bg-white\/80{background-color:#fffc}.bg-white\/\[0\.03\]{background-color:#ffffff08}.bg-yellow-100{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1))}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-yellow-500\/5{background-color:#eab3080d}.bg-yellow-900{--tw-bg-opacity: 1;background-color:rgb(113 63 18 / var(--tw-bg-opacity, 1))}.bg-yellow-900\/40{background-color:#713f1266}.bg-yellow-900\/50{background-color:#713f1280}.bg-yellow-950\/40{background-color:#42200666}.bg-zinc-100{--tw-bg-opacity: 1;background-color:rgb(244 244 245 / var(--tw-bg-opacity, 1))}.bg-opacity-60{--tw-bg-opacity: .6}.bg-\[linear-gradient\(180deg\,rgba\(9\,10\,13\,0\.04\)_0\%\,rgba\(9\,10\,13\,0\.3\)_42\%\,rgba\(9\,10\,13\,0\.72\)_100\%\)\]{background-image:linear-gradient(180deg,#090a0d0a,#090a0d4d 42%,#090a0db8)}.bg-\[radial-gradient\(circle\,rgba\(121\,144\,255\,0\.2\)\,transparent_62\%\)\]{background-image:radial-gradient(circle,rgba(121,144,255,.2),transparent 62%)}.bg-\[radial-gradient\(circle\,rgba\(191\,174\,140\,0\.18\)\,transparent_62\%\)\]{background-image:radial-gradient(circle,rgba(191,174,140,.18),transparent 62%)}.bg-\[radial-gradient\(circle_at_50\%_0\%\,rgba\(216\,203\,175\,0\.22\)\,transparent_54\%\)\,linear-gradient\(180deg\,rgba\(11\,12\,15\,0\.08\)_0\%\,rgba\(11\,12\,15\,0\.28\)_100\%\)\]{background-image:radial-gradient(circle at 50% 0%,rgba(216,203,175,.22),transparent 54%),linear-gradient(180deg,#0b0c0f14,#0b0c0f47)}.bg-\[radial-gradient\(circle_at_50\%_8\%\,rgba\(216\,203\,175\,0\.14\)\,transparent_22\%\)\,radial-gradient\(circle_at_82\%_18\%\,rgba\(121\,144\,255\,0\.14\)\,transparent_24\%\)\]{background-image:radial-gradient(circle at 50% 8%,rgba(216,203,175,.14),transparent 22%),radial-gradient(circle at 82% 18%,rgba(121,144,255,.14),transparent 24%)}.bg-\[radial-gradient\(circle_at_top\,rgba\(216\,203\,175\,0\.22\)\,transparent_38\%\)\,radial-gradient\(circle_at_85\%_18\%\,rgba\(121\,144\,255\,0\.18\)\,transparent_30\%\)\]{background-image:radial-gradient(circle at top,rgba(216,203,175,.22),transparent 38%),radial-gradient(circle at 85% 18%,rgba(121,144,255,.18),transparent 30%)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#A6926E\]{--tw-gradient-from: #A6926E var(--tw-gradient-from-position);--tw-gradient-to: rgb(166 146 110 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-\[\#C4A96B\]{--tw-gradient-from: #C4A96B var(--tw-gradient-from-position);--tw-gradient-to: rgb(196 169 107 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-\[\#C4A96B\]\/15{--tw-gradient-from: rgb(196 169 107 / .15) var(--tw-gradient-from-position);--tw-gradient-to: rgb(196 169 107 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-\[\#C4A96B\]\/20{--tw-gradient-from: rgb(196 169 107 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(196 169 107 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-\[\#D8CBAF\]\/40{--tw-gradient-from: rgb(216 203 175 / .4) var(--tw-gradient-from-position);--tw-gradient-to: rgb(216 203 175 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-\[\#F4F6F8\]{--tw-gradient-from: #F4F6F8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(244 246 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-500\/20{--tw-gradient-from: rgb(16 185 129 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-950{--tw-gradient-from: rgb(10, 10, 15) var(--tw-gradient-from-position);--tw-gradient-to: rgb(10 10 15 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-950\/85{--tw-gradient-from: rgb(10 10 15 / .85) var(--tw-gradient-from-position);--tw-gradient-to: rgb(10 10 15 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400{--tw-gradient-from: #a78bfa var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/0{--tw-gradient-from: rgb(167 139 250 / 0) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/10{--tw-gradient-from: rgb(167 139 250 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/100{--tw-gradient-from: rgb(167 139 250 / 1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/15{--tw-gradient-from: rgb(167 139 250 / .15) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/20{--tw-gradient-from: rgb(167 139 250 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/25{--tw-gradient-from: rgb(167 139 250 / .25) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/30{--tw-gradient-from: rgb(167 139 250 / .3) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/35{--tw-gradient-from: rgb(167 139 250 / .35) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/40{--tw-gradient-from: rgb(167 139 250 / .4) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/45{--tw-gradient-from: rgb(167 139 250 / .45) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/5{--tw-gradient-from: rgb(167 139 250 / .05) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/50{--tw-gradient-from: rgb(167 139 250 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/55{--tw-gradient-from: rgb(167 139 250 / .55) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/60{--tw-gradient-from: rgb(167 139 250 / .6) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/65{--tw-gradient-from: rgb(167 139 250 / .65) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/70{--tw-gradient-from: rgb(167 139 250 / .7) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/75{--tw-gradient-from: rgb(167 139 250 / .75) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/80{--tw-gradient-from: rgb(167 139 250 / .8) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/85{--tw-gradient-from: rgb(167 139 250 / .85) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/90{--tw-gradient-from: rgb(167 139 250 / .9) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-purple-400\/95{--tw-gradient-from: rgb(167 139 250 / .95) var(--tw-gradient-from-position);--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-\[\#BFAE8C\]{--tw-gradient-to: rgb(191 174 140 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #BFAE8C var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-\[\#BFAE8C\]\/40{--tw-gradient-to: rgb(191 174 140 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(191 174 140 / .4) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-\[\#D8CBAF\]{--tw-gradient-to: rgb(216 203 175 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #D8CBAF var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-\[\#D8CBAF\]\/20{--tw-gradient-to: rgb(216 203 175 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(216 203 175 / .2) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-\[\#D8CBAF\]\/70{--tw-gradient-to: rgb(216 203 175 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(216 203 175 / .7) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-gray-900{--tw-gradient-to: rgb(22 22 30 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(22, 22, 30) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-gray-950\/60{--tw-gradient-to: rgb(10 10 15 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(10 10 15 / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-\[\#8A9099\]{--tw-gradient-to: #8A9099 var(--tw-gradient-to-position)}.to-\[\#A6926E\]{--tw-gradient-to: #A6926E var(--tw-gradient-to-position)}.to-\[\#A6926E\]\/20{--tw-gradient-to: rgb(166 146 110 / .2) var(--tw-gradient-to-position)}.to-\[\#A6926E\]\/5{--tw-gradient-to: rgb(166 146 110 / .05) var(--tw-gradient-to-position)}.to-\[\#C4A96B\]\/5{--tw-gradient-to: rgb(196 169 107 / .05) var(--tw-gradient-to-position)}.to-\[\#D8CBAF\]{--tw-gradient-to: #D8CBAF var(--tw-gradient-to-position)}.to-emerald-500\/5{--tw-gradient-to: rgb(16 185 129 / .05) var(--tw-gradient-to-position)}.to-gray-900{--tw-gradient-to: rgb(22, 22, 30) var(--tw-gradient-to-position)}.to-gray-950\/75{--tw-gradient-to: rgb(10 10 15 / .75) var(--tw-gradient-to-position)}.to-purple-400{--tw-gradient-to: #a78bfa var(--tw-gradient-to-position)}.to-purple-400\/0{--tw-gradient-to: rgb(167 139 250 / 0) var(--tw-gradient-to-position)}.to-purple-400\/10{--tw-gradient-to: rgb(167 139 250 / .1) var(--tw-gradient-to-position)}.to-purple-400\/100{--tw-gradient-to: rgb(167 139 250 / 1) var(--tw-gradient-to-position)}.to-purple-400\/15{--tw-gradient-to: rgb(167 139 250 / .15) var(--tw-gradient-to-position)}.to-purple-400\/20{--tw-gradient-to: rgb(167 139 250 / .2) var(--tw-gradient-to-position)}.to-purple-400\/25{--tw-gradient-to: rgb(167 139 250 / .25) var(--tw-gradient-to-position)}.to-purple-400\/30{--tw-gradient-to: rgb(167 139 250 / .3) var(--tw-gradient-to-position)}.to-purple-400\/35{--tw-gradient-to: rgb(167 139 250 / .35) var(--tw-gradient-to-position)}.to-purple-400\/40{--tw-gradient-to: rgb(167 139 250 / .4) var(--tw-gradient-to-position)}.to-purple-400\/45{--tw-gradient-to: rgb(167 139 250 / .45) var(--tw-gradient-to-position)}.to-purple-400\/5{--tw-gradient-to: rgb(167 139 250 / .05) var(--tw-gradient-to-position)}.to-purple-400\/50{--tw-gradient-to: rgb(167 139 250 / .5) var(--tw-gradient-to-position)}.to-purple-400\/55{--tw-gradient-to: rgb(167 139 250 / .55) var(--tw-gradient-to-position)}.to-purple-400\/60{--tw-gradient-to: rgb(167 139 250 / .6) var(--tw-gradient-to-position)}.to-purple-400\/65{--tw-gradient-to: rgb(167 139 250 / .65) var(--tw-gradient-to-position)}.to-purple-400\/70{--tw-gradient-to: rgb(167 139 250 / .7) var(--tw-gradient-to-position)}.to-purple-400\/75{--tw-gradient-to: rgb(167 139 250 / .75) var(--tw-gradient-to-position)}.to-purple-400\/80{--tw-gradient-to: rgb(167 139 250 / .8) var(--tw-gradient-to-position)}.to-purple-400\/85{--tw-gradient-to: rgb(167 139 250 / .85) var(--tw-gradient-to-position)}.to-purple-400\/90{--tw-gradient-to: rgb(167 139 250 / .9) var(--tw-gradient-to-position)}.to-purple-400\/95{--tw-gradient-to: rgb(167 139 250 / .95) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-\[\#C4A96B\]{fill:#c4a96b}.fill-amber-400{fill:#fbbf24}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-7{padding:1.75rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-0\.5{padding-left:.125rem;padding-right:.125rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-14{padding-top:3.5rem;padding-bottom:3.5rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-10{padding-bottom:2.5rem}.pb-12{padding-bottom:3rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-28{padding-bottom:7rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-0{padding-left:0}.pl-1{padding-left:.25rem}.pl-10{padding-left:2.5rem}.pl-12{padding-left:3rem}.pl-2{padding-left:.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-12{padding-right:3rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-5{padding-right:1.25rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-14{padding-top:3.5rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:JetBrains Mono,Fira Code,monospace}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[0\.65rem\]{font-size:.65rem}.text-\[1\.4rem\]{font-size:1.4rem}.text-\[1\.65rem\]{font-size:1.65rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-\[1\.45\]{line-height:1.45}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-\[0\.14em\]{letter-spacing:.14em}.tracking-\[0\.16em\]{letter-spacing:.16em}.tracking-\[0\.18em\]{letter-spacing:.18em}.tracking-\[0\.1em\]{letter-spacing:.1em}.tracking-\[0\.22em\]{letter-spacing:.22em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-\[\#140F08\]{--tw-text-opacity: 1;color:rgb(20 15 8 / var(--tw-text-opacity, 1))}.text-\[\#181A1E\]{--tw-text-opacity: 1;color:rgb(24 26 30 / var(--tw-text-opacity, 1))}.text-\[\#1A1409\]{--tw-text-opacity: 1;color:rgb(26 20 9 / var(--tw-text-opacity, 1))}.text-\[\#262B33\]\/70{color:#262b33b3}.text-\[\#8A9099\]{--tw-text-opacity: 1;color:rgb(138 144 153 / var(--tw-text-opacity, 1))}.text-\[\#8A9099\]\/60{color:#8a909999}.text-\[\#C0B49A\]\/85{color:#c0b49ad9}.text-\[\#C4A96B\]{--tw-text-opacity: 1;color:rgb(196 169 107 / var(--tw-text-opacity, 1))}.text-\[\#D8CBAF\]{--tw-text-opacity: 1;color:rgb(216 203 175 / var(--tw-text-opacity, 1))}.text-\[\#D8CBAF\]\/70{color:#d8cbafb3}.text-\[\#D8CBAF\]\/80{color:#d8cbafcc}.text-\[\#E6DEC7\]{--tw-text-opacity: 1;color:rgb(230 222 199 / var(--tw-text-opacity, 1))}.text-\[\#E7D3A1\]{--tw-text-opacity: 1;color:rgb(231 211 161 / var(--tw-text-opacity, 1))}.text-\[\#F2E4BF\]{--tw-text-opacity: 1;color:rgb(242 228 191 / var(--tw-text-opacity, 1))}.text-\[\#F4F6F8\]{--tw-text-opacity: 1;color:rgb(244 246 248 / var(--tw-text-opacity, 1))}.text-\[\#F6E7C0\]{--tw-text-opacity: 1;color:rgb(246 231 192 / var(--tw-text-opacity, 1))}.text-\[\#FFFFFF\]{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-\[\#a45ee5\]{--tw-text-opacity: 1;color:rgb(164 94 229 / var(--tw-text-opacity, 1))}.text-\[var\(--tone-fg-alpha-80\)\]{color:var(--tone-fg-alpha-80)}.text-amber-100{--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}.text-amber-100\/70{color:#fef3c7b3}.text-amber-100\/80{color:#fef3c7cc}.text-amber-100\/90{color:#fef3c7e6}.text-amber-200{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity, 1))}.text-amber-200\/70{color:#fde68ab3}.text-amber-200\/80{color:#fde68acc}.text-amber-200\/90{color:#fde68ae6}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-300\/80{color:#fcd34dcc}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-50{--tw-text-opacity: 1;color:rgb(255 251 235 / var(--tw-text-opacity, 1))}.text-amber-50\/80{color:#fffbebcc}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-blue-300{--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-100{--tw-text-opacity: 1;color:rgb(207 250 254 / var(--tw-text-opacity, 1))}.text-cyan-100\/90{color:#cffafee6}.text-cyan-200{--tw-text-opacity: 1;color:rgb(165 243 252 / var(--tw-text-opacity, 1))}.text-cyan-300{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.text-cyan-400{--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.text-cyan-50{--tw-text-opacity: 1;color:rgb(236 254 255 / var(--tw-text-opacity, 1))}.text-cyan-500{--tw-text-opacity: 1;color:rgb(6 182 212 / var(--tw-text-opacity, 1))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-100{--tw-text-opacity: 1;color:rgb(209 250 229 / var(--tw-text-opacity, 1))}.text-emerald-200{--tw-text-opacity: 1;color:rgb(167 243 208 / var(--tw-text-opacity, 1))}.text-emerald-200\/80{color:#a7f3d0cc}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-50\/90{color:#ecfdf5e6}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-emerald-800{--tw-text-opacity: 1;color:rgb(6 95 70 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-fuchsia-100{--tw-text-opacity: 1;color:rgb(250 232 255 / var(--tw-text-opacity, 1))}.text-fuchsia-200{--tw-text-opacity: 1;color:rgb(245 208 254 / var(--tw-text-opacity, 1))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.text-gray-200{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-50{--tw-text-opacity: 1;color:rgb(249 250 251 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-green-200{--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.text-green-300{--tw-text-opacity: 1;color:rgb(134 239 172 / var(--tw-text-opacity, 1))}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-indigo-100{--tw-text-opacity: 1;color:rgb(224 231 255 / var(--tw-text-opacity, 1))}.text-indigo-100\/90{color:#e0e7ffe6}.text-indigo-200{--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.text-indigo-200\/80{color:#c7d2fecc}.text-indigo-300{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-neutral-300{--tw-text-opacity: 1;color:rgb(212 212 212 / var(--tw-text-opacity, 1))}.text-orange-300{--tw-text-opacity: 1;color:rgb(253 186 116 / var(--tw-text-opacity, 1))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity, 1))}.text-orange-800{--tw-text-opacity: 1;color:rgb(154 52 18 / var(--tw-text-opacity, 1))}.text-pink-400{--tw-text-opacity: 1;color:rgb(244 114 182 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-purple-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-purple-300\/0{color:#c4b5fd00}.text-purple-300\/10{color:#c4b5fd1a}.text-purple-300\/100{color:#c4b5fd}.text-purple-300\/15{color:#c4b5fd26}.text-purple-300\/20{color:#c4b5fd33}.text-purple-300\/25{color:#c4b5fd40}.text-purple-300\/30{color:#c4b5fd4d}.text-purple-300\/35{color:#c4b5fd59}.text-purple-300\/40{color:#c4b5fd66}.text-purple-300\/45{color:#c4b5fd73}.text-purple-300\/5{color:#c4b5fd0d}.text-purple-300\/50{color:#c4b5fd80}.text-purple-300\/55{color:#c4b5fd8c}.text-purple-300\/60{color:#c4b5fd99}.text-purple-300\/65{color:#c4b5fda6}.text-purple-300\/70{color:#c4b5fdb3}.text-purple-300\/75{color:#c4b5fdbf}.text-purple-300\/80{color:#c4b5fdcc}.text-purple-300\/85{color:#c4b5fdd9}.text-purple-300\/90{color:#c4b5fde6}.text-purple-300\/95{color:#c4b5fdf2}.text-purple-400{--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.text-purple-400\/0{color:#a78bfa00}.text-purple-400\/10{color:#a78bfa1a}.text-purple-400\/100{color:#a78bfa}.text-purple-400\/15{color:#a78bfa26}.text-purple-400\/20{color:#a78bfa33}.text-purple-400\/25{color:#a78bfa40}.text-purple-400\/30{color:#a78bfa4d}.text-purple-400\/35{color:#a78bfa59}.text-purple-400\/40{color:#a78bfa66}.text-purple-400\/45{color:#a78bfa73}.text-purple-400\/5{color:#a78bfa0d}.text-purple-400\/50{color:#a78bfa80}.text-purple-400\/55{color:#a78bfa8c}.text-purple-400\/60{color:#a78bfa99}.text-purple-400\/65{color:#a78bfaa6}.text-purple-400\/70{color:#a78bfab3}.text-purple-400\/75{color:#a78bfabf}.text-purple-400\/80{color:#a78bfacc}.text-purple-400\/85{color:#a78bfad9}.text-purple-400\/90{color:#a78bfae6}.text-purple-400\/95{color:#a78bfaf2}.text-purple-500{--tw-text-opacity: 1;color:rgb(139 92 246 / var(--tw-text-opacity, 1))}.text-purple-500\/0{color:#8b5cf600}.text-purple-500\/10{color:#8b5cf61a}.text-purple-500\/100{color:#8b5cf6}.text-purple-500\/15{color:#8b5cf626}.text-purple-500\/20{color:#8b5cf633}.text-purple-500\/25{color:#8b5cf640}.text-purple-500\/30{color:#8b5cf64d}.text-purple-500\/35{color:#8b5cf659}.text-purple-500\/40{color:#8b5cf666}.text-purple-500\/45{color:#8b5cf673}.text-purple-500\/5{color:#8b5cf60d}.text-purple-500\/50{color:#8b5cf680}.text-purple-500\/55{color:#8b5cf68c}.text-purple-500\/60{color:#8b5cf699}.text-purple-500\/65{color:#8b5cf6a6}.text-purple-500\/70{color:#8b5cf6b3}.text-purple-500\/75{color:#8b5cf6bf}.text-purple-500\/80{color:#8b5cf6cc}.text-purple-500\/85{color:#8b5cf6d9}.text-purple-500\/90{color:#8b5cf6e6}.text-purple-500\/95{color:#8b5cf6f2}.text-red-100{--tw-text-opacity: 1;color:rgb(254 226 226 / var(--tw-text-opacity, 1))}.text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.text-red-200\/80{color:#fecacacc}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-400\/90{color:#f87171e6}.text-red-50\/80{color:#fef2f2cc}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-rose-200{--tw-text-opacity: 1;color:rgb(254 205 211 / var(--tw-text-opacity, 1))}.text-rose-300{--tw-text-opacity: 1;color:rgb(253 164 175 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-sky-100{--tw-text-opacity: 1;color:rgb(224 242 254 / var(--tw-text-opacity, 1))}.text-sky-200{--tw-text-opacity: 1;color:rgb(186 230 253 / var(--tw-text-opacity, 1))}.text-sky-300{--tw-text-opacity: 1;color:rgb(125 211 252 / var(--tw-text-opacity, 1))}.text-sky-400{--tw-text-opacity: 1;color:rgb(56 189 248 / var(--tw-text-opacity, 1))}.text-sky-50{--tw-text-opacity: 1;color:rgb(240 249 255 / var(--tw-text-opacity, 1))}.text-slate-100{--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-teal-200{--tw-text-opacity: 1;color:rgb(153 246 228 / var(--tw-text-opacity, 1))}.text-teal-300{--tw-text-opacity: 1;color:rgb(94 234 212 / var(--tw-text-opacity, 1))}.text-teal-400{--tw-text-opacity: 1;color:rgb(45 212 191 / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-violet-100{--tw-text-opacity: 1;color:rgb(237 233 254 / var(--tw-text-opacity, 1))}.text-violet-300{--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.text-violet-600{--tw-text-opacity: 1;color:rgb(124 58 237 / var(--tw-text-opacity, 1))}.text-violet-800{--tw-text-opacity: 1;color:rgb(91 33 182 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/30{color:#ffffff4d}.text-white\/40{color:#fff6}.text-white\/60{color:#fff9}.text-white\/70{color:#ffffffb3}.text-white\/80{color:#fffc}.text-yellow-100\/80{color:#fef9c3cc}.text-yellow-200{--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.text-yellow-200\/80{color:#fef08acc}.text-yellow-300{--tw-text-opacity: 1;color:rgb(253 224 71 / var(--tw-text-opacity, 1))}.text-yellow-300\/80{color:#fde047cc}.text-yellow-400{--tw-text-opacity: 1;color:rgb(250 204 21 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.text-yellow-800{--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.text-zinc-400{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.text-zinc-500{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.text-zinc-600{--tw-text-opacity: 1;color:rgb(82 82 91 / var(--tw-text-opacity, 1))}.text-zinc-700{--tw-text-opacity: 1;color:rgb(63 63 70 / var(--tw-text-opacity, 1))}.text-zinc-900{--tw-text-opacity: 1;color:rgb(24 24 27 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.line-through{text-decoration-line:line-through}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.placeholder-\[\#8A9099\]\/60::-moz-placeholder{color:#8a909999}.placeholder-\[\#8A9099\]\/60::placeholder{color:#8a909999}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-600::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(75 85 99 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-600::placeholder{--tw-placeholder-opacity: 1;color:rgb(75 85 99 / var(--tw-placeholder-opacity, 1))}.accent-\[\#C4A96B\]{accent-color:#C4A96B}.accent-amber-400{accent-color:#fbbf24}.accent-amber-500{accent-color:#f59e0b}.accent-emerald-500{accent-color:#10b981}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-20{opacity:.2}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-55{opacity:.55}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-\[0\.94\]{opacity:.94}.mix-blend-overlay{mix-blend-mode:overlay}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(216\,203\,175\,0\.35\)\]{--tw-shadow: 0 0 12px rgba(216,203,175,.35);--tw-shadow-colored: 0 0 12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_16px_rgba\(216\,203\,175\,0\.45\)\]{--tw-shadow: 0 0 16px rgba(216,203,175,.45);--tw-shadow-colored: 0 0 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_18px_rgba\(245\,158\,11\,0\.18\)\]{--tw-shadow: 0 0 18px rgba(245,158,11,.18);--tw-shadow-colored: 0 0 18px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_24px_80px_rgba\(2\,6\,23\,0\.64\)\,0_0_0_1px_rgba\(148\,163\,184\,0\.06\)\]{--tw-shadow: 0 24px 80px rgba(2,6,23,.64),0 0 0 1px rgba(148,163,184,.06);--tw-shadow-colored: 0 24px 80px var(--tw-shadow-color), 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[\#C4A96B\]\/20{--tw-shadow-color: rgb(196 169 107 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-amber-900\/20{--tw-shadow-color: rgb(120 53 15 / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-amber-900\/30{--tw-shadow-color: rgb(120 53 15 / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-black\/50{--tw-shadow-color: rgb(0 0 0 / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-black\/60{--tw-shadow-color: rgb(0 0 0 / .6);--tw-shadow: var(--tw-shadow-colored)}.shadow-purple-900\/30{--tw-shadow-color: rgb(76 29 149 / .3);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-inset{--tw-ring-inset: inset}.ring-\[\#C4A96B\]\/40{--tw-ring-color: rgb(196 169 107 / .4)}.ring-\[\#D8CBAF\]\/20{--tw-ring-color: rgb(216 203 175 / .2)}.ring-\[var\(--tone-alpha-10\)\]{--tw-ring-color: var(--tone-alpha-10)}.ring-\[var\(--tone-alpha-5\)\]{--tw-ring-color: var(--tone-alpha-5)}.ring-gray-700{--tw-ring-opacity: 1;--tw-ring-color: rgb(55 65 81 / var(--tw-ring-opacity, 1))}.ring-gray-800{--tw-ring-opacity: 1;--tw-ring-color: rgb(31 41 55 / var(--tw-ring-opacity, 1))}.ring-indigo-500\/30{--tw-ring-color: rgb(99 102 241 / .3)}.ring-indigo-600{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity, 1))}.ring-purple-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(139 92 246 / var(--tw-ring-opacity, 1))}.ring-purple-500\/0{--tw-ring-color: rgb(139 92 246 / 0)}.ring-purple-500\/10{--tw-ring-color: rgb(139 92 246 / .1)}.ring-purple-500\/100{--tw-ring-color: rgb(139 92 246 / 1)}.ring-purple-500\/15{--tw-ring-color: rgb(139 92 246 / .15)}.ring-purple-500\/20{--tw-ring-color: rgb(139 92 246 / .2)}.ring-purple-500\/25{--tw-ring-color: rgb(139 92 246 / .25)}.ring-purple-500\/30{--tw-ring-color: rgb(139 92 246 / .3)}.ring-purple-500\/35{--tw-ring-color: rgb(139 92 246 / .35)}.ring-purple-500\/40{--tw-ring-color: rgb(139 92 246 / .4)}.ring-purple-500\/45{--tw-ring-color: rgb(139 92 246 / .45)}.ring-purple-500\/5{--tw-ring-color: rgb(139 92 246 / .05)}.ring-purple-500\/50{--tw-ring-color: rgb(139 92 246 / .5)}.ring-purple-500\/55{--tw-ring-color: rgb(139 92 246 / .55)}.ring-purple-500\/60{--tw-ring-color: rgb(139 92 246 / .6)}.ring-purple-500\/65{--tw-ring-color: rgb(139 92 246 / .65)}.ring-purple-500\/70{--tw-ring-color: rgb(139 92 246 / .7)}.ring-purple-500\/75{--tw-ring-color: rgb(139 92 246 / .75)}.ring-purple-500\/80{--tw-ring-color: rgb(139 92 246 / .8)}.ring-purple-500\/85{--tw-ring-color: rgb(139 92 246 / .85)}.ring-purple-500\/90{--tw-ring-color: rgb(139 92 246 / .9)}.ring-purple-500\/95{--tw-ring-color: rgb(139 92 246 / .95)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-\[2px\]{--tw-blur: blur(2px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-sm{--tw-blur: blur(4px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow-\[0_0_24px_rgba\(216\,203\,175\,0\.25\)\]{--tw-drop-shadow: drop-shadow(0 0 24px rgba(216,203,175,.25));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hue-rotate-180{--tw-hue-rotate: hue-rotate(180deg);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur{--tw-backdrop-blur: blur(8px);-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)}.backdrop-blur-2xl{--tw-backdrop-blur: blur(40px);-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)}.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)}.backdrop-blur-md{--tw-backdrop-blur: blur(12px);-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)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-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)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.paused{animation-play-state:paused}.glow-indigo{box-shadow:0 0 20px #6366f14d}.glow-gold{box-shadow:0 0 20px #c4a96b59}.\[animation-delay\:0ms\]{animation-delay:0ms}.\[animation-delay\:150ms\]{animation-delay:.15s}.\[animation-delay\:300ms\]{animation-delay:.3s}.\[mask-image\:radial-gradient\(350px_200px_at_top\,transparent_20\%\,white\)\]{-webkit-mask-image:radial-gradient(350px 200px at top,transparent 20%,white);mask-image:radial-gradient(350px 200px at top,transparent 20%,white)}.monaco-editor::-webkit-scrollbar{height:.5rem;width:.5rem}.light .monaco-editor::-webkit-scrollbar-track,html.light .monaco-editor::-webkit-scrollbar-track{background-color:#edebe4}.light .monaco-editor.text-gray-100::-webkit-scrollbar-track,html.light .monaco-editor.text-gray-100::-webkit-scrollbar-track{background-color:#edebe4;color:#1e2230}.monaco-editor::-webkit-scrollbar-track{--tw-bg-opacity: 1;background-color:rgb(22 22 30 / var(--tw-bg-opacity, 1))}.light .monaco-editor::-webkit-scrollbar-thumb,html.light .monaco-editor::-webkit-scrollbar-thumb{background-color:#d6d0c5}.monaco-editor::-webkit-scrollbar-thumb{border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.light .monaco-editor::-webkit-scrollbar-thumb:hover,html.light .monaco-editor::-webkit-scrollbar-thumb:hover{background-color:#c8c3b8}.monaco-editor::-webkit-scrollbar-thumb:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.light .monaco-editor::-webkit-scrollbar-track,html.light .monaco-editor::-webkit-scrollbar-track{background:#edebe4}.light .monaco-editor::-webkit-scrollbar-thumb,html.light .monaco-editor::-webkit-scrollbar-thumb{background:#c8c3b8}.light .monaco-editor::-webkit-scrollbar-thumb:hover,html.light .monaco-editor::-webkit-scrollbar-thumb:hover{background:#b0a998}.light .monaco-editor .margin,html.light .monaco-editor .margin{background-color:#f7f5f0}.monaco-editor .margin{--tw-bg-opacity: 1;background-color:rgb(10 10 15 / var(--tw-bg-opacity, 1))}.katex{font-size:1.1em}.katex-display{margin-top:1rem;margin-bottom:1rem}.tsqd-parent-container{z-index:50}.generating-loader-wrapper{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;padding:1rem}.generating-loader-text{display:flex;font-weight:600;font-size:1.25rem;letter-spacing:.1em;color:hsl(var(--primary) / .8)}.generating-loader-letter{display:inline-block;animation:generating-loader-letter-anim 2s infinite}.generating-loader-bar{position:absolute;bottom:0;left:0;width:100%;height:2px;background:linear-gradient(90deg,transparent,hsl(var(--primary)),transparent);animation:generating-loader-bar-anim 2s linear infinite}@keyframes generating-loader-letter-anim{0%{opacity:0;transform:translateY(20px) rotateX(-90deg);text-shadow:0 0 0px rgba(255,255,255,0)}10%{opacity:1;transform:translateY(0) rotateX(0);text-shadow:0 0 10px rgba(255,255,255,.8)}30%{opacity:1;transform:translateY(0) rotateX(0);text-shadow:0 0 10px rgba(255,255,255,.8)}50%{opacity:0;transform:translateY(-20px) rotateX(90deg);text-shadow:0 0 0px rgba(255,255,255,0)}to{opacity:0}}@keyframes generating-loader-bar-anim{0%{left:-100%}50%{left:100%}to{left:-100%}}.collab-cursor-line{opacity:.18;border-radius:2px}.collab-cursor-0{background-color:#4fc3f7}.collab-cursor-1{background-color:#81c784}.collab-cursor-2{background-color:#ffb74d}.collab-cursor-3{background-color:#e57373}.collab-cursor-4{background-color:#ce93d8}.collab-cursor-5{background-color:#4db6ac}.collab-cursor-6{background-color:#f06292}.collab-cursor-7{background-color:#aed581}.collab-cursor-label{font-size:10px;font-family:var(--font-sans, ui-sans-serif, system-ui, sans-serif);padding:0 4px;border-radius:3px;background:#1e1e1eb3;color:#d8cbaf;margin-left:4px;pointer-events:none;white-space:nowrap}.light .placeholder\:text-gray-500::-moz-placeholder,html.light .placeholder\:text-gray-500::-moz-placeholder{color:#7a8090!important}.light .placeholder\:text-gray-500::placeholder,html.light .placeholder\:text-gray-500::placeholder{color:#7a8090!important}.light .placeholder\:text-gray-600::-moz-placeholder,html.light .placeholder\:text-gray-600::-moz-placeholder{color:#7a8090!important}.light .placeholder\:text-gray-600::placeholder,html.light .placeholder\:text-gray-600::placeholder{color:#7a8090!important}.light .focus-within\:bg-gray-900:focus-within,html.light .focus-within\:bg-gray-900:focus-within{background-color:#edebe4!important}.light .focus-within\:bg-gray-900:focus-within.text-gray-100,html.light .focus-within\:bg-gray-900:focus-within.text-gray-100{background-color:#edebe4!important;color:#1e2230!important}.light .hover\:bg-gray-950:hover,html.light .hover\:bg-gray-950:hover{background-color:#f7f5f0!important}.light .hover\:bg-gray-900:hover,html.light .hover\:bg-gray-900:hover{background-color:#edebe4!important}.light .hover\:bg-gray-800:hover,html.light .hover\:bg-gray-800:hover{background-color:#e2ddd4!important}.light .hover\:bg-gray-800\/60:hover,html.light .hover\:bg-gray-800\/60:hover{background-color:#e2ddd499!important}.light .hover\:border-gray-700:hover,html.light .hover\:border-gray-700:hover{border-color:#c8c3b8!important}.light .hover\:text-gray-100:hover,html.light .hover\:text-gray-100:hover{color:#1e2230!important}.light .hover\:text-gray-200:hover,html.light .hover\:text-gray-200:hover{color:#2c3040!important}.light .hover\:text-gray-300:hover,html.light .hover\:text-gray-300:hover{color:#3d4350!important}.light .hover\:text-gray-400:hover,html.light .hover\:text-gray-400:hover{color:#5a6070!important}.light .hover\:bg-gray-900\/50:hover,html.light .hover\:bg-gray-900\/50:hover{background-color:#edebe4d9!important}.light .hover\:bg-gray-800:hover.animate-pulse,html.light .hover\:bg-gray-800:hover.animate-pulse{background-color:#e2ddd4!important}.light .hover\:bg-gray-700:hover,html.light .hover\:bg-gray-700:hover{background-color:#d6d0c5!important}.light .hover\:bg-gray-600:hover,html.light .hover\:bg-gray-600:hover{background-color:#c8c3b8!important}.light .hover\:bg-gray-800\/80:hover,html.light .hover\:bg-gray-800\/80:hover{background-color:#e2ddd4d9!important}.light .hover\:bg-gray-800\/40:hover,html.light .hover\:bg-gray-800\/40:hover{background-color:#e2ddd480!important}.light .hover\:bg-gray-800\/30:hover,html.light .hover\:bg-gray-800\/30:hover{background-color:#e2ddd466!important}.light .hover\:border-gray-600:hover,html.light .hover\:border-gray-600:hover{border-color:#b8b2a6!important}.light .hover\:text-white:hover,html.light .hover\:text-white:hover{color:#1e2230!important}.light .hover\:bg-gray-800\/50:hover,html.light .hover\:bg-gray-800\/50:hover{background-color:#e2ddd4a6!important}.light .hover\:bg-gray-900:hover.text-gray-100,html.light .hover\:bg-gray-900:hover.text-gray-100,.light .hover\:text-gray-100:hover.bg-gray-900,html.light .hover\:text-gray-100:hover.bg-gray-900{background-color:#edebe4!important;color:#1e2230!important}.light .focus\:border-gray-600:focus,html.light .focus\:border-gray-600:focus{border-color:#b8b2a6!important}.light .focus\:border-white\/20:focus,html.light .focus\:border-white\/20:focus{border-color:#262b332e!important}.light .disabled\:bg-gray-900:disabled,html.light .disabled\:bg-gray-900:disabled{background-color:#edebe4!important}.light .disabled\:bg-gray-800:disabled,html.light .disabled\:bg-gray-800:disabled{background-color:#e2ddd4!important}.light .disabled\:border-gray-800:disabled,html.light .disabled\:border-gray-800:disabled{border-color:#d6d0c5!important}.light .disabled\:text-gray-500:disabled,html.light .disabled\:text-gray-500:disabled{color:#7a8090!important}.light .disabled\:bg-gray-800:disabled.animate-pulse,html.light .disabled\:bg-gray-800:disabled.animate-pulse{background-color:#e2ddd4!important}.light .disabled\:bg-gray-700:disabled,html.light .disabled\:bg-gray-700:disabled{background-color:#d6d0c5!important}.light .disabled\:text-gray-600:disabled,html.light .disabled\:text-gray-600:disabled{color:#7a8090!important}.light .disabled\:bg-gray-900:disabled.text-gray-100,html.light .disabled\:bg-gray-900:disabled.text-gray-100{background-color:#edebe4!important;color:#1e2230!important}.light .group:hover .group-hover\:text-gray-100,html.light .group:hover .group-hover\:text-gray-100{color:#1e2230!important}.light .group:hover .group-hover\:text-gray-500,html.light .group:hover .group-hover\:text-gray-500{color:#7a8090!important}.light .group:hover .group-hover\:text-white,html.light .group:hover .group-hover\:text-white{color:#1e2230!important}.light .group:hover .group-hover\:text-gray-100.bg-gray-900,html.light .group:hover .group-hover\:text-gray-100.bg-gray-900{background-color:#edebe4!important;color:#1e2230!important}.placeholder\:text-\[\#8A9099\]::-moz-placeholder{--tw-text-opacity: 1;color:rgb(138 144 153 / var(--tw-text-opacity, 1))}.placeholder\:text-\[\#8A9099\]::placeholder{--tw-text-opacity: 1;color:rgb(138 144 153 / var(--tw-text-opacity, 1))}.placeholder\:text-gray-500::-moz-placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.placeholder\:text-gray-500::placeholder{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.placeholder\:text-gray-600::-moz-placeholder{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.placeholder\:text-gray-600::placeholder{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.placeholder\:text-white\/30::-moz-placeholder{color:#ffffff4d}.placeholder\:text-white\/30::placeholder{color:#ffffff4d}.placeholder\:text-zinc-400::-moz-placeholder{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.placeholder\:text-zinc-400::placeholder{--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:inset-y-0:after{content:var(--tw-content);top:0;bottom:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:left-\[2px\]:after{content:var(--tw-content);left:2px}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:h-4:after{content:var(--tw-content);height:1rem}.after\:w-1:after{content:var(--tw-content);width:.25rem}.after\:w-4:after{content:var(--tw-content);width:1rem}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:bg-white:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.last\:border-0:last-child{border-width:0px}.focus-within\:border-\[\#D8CBAF\]\/50:focus-within{border-color:#d8cbaf80}.focus-within\:border-\[\#a45ee5\]\/50:focus-within{border-color:#a45ee580}.focus-within\:bg-gray-900:focus-within{--tw-bg-opacity: 1;background-color:rgb(22 22 30 / var(--tw-bg-opacity, 1))}.hover\:border-\[\#A6926E\]\/60:hover{border-color:#a6926e99}.hover\:border-\[\#C4A96B\]\/50:hover{border-color:#c4a96b80}.hover\:border-\[\#D8CBAF\]\/30:hover{border-color:#d8cbaf4d}.hover\:border-\[\#D8CBAF\]\/50:hover{border-color:#d8cbaf80}.hover\:border-cyan-400\/50:hover{border-color:#22d3ee80}.hover\:border-emerald-400\/50:hover{border-color:#34d39980}.hover\:border-emerald-500\/30:hover{border-color:#10b9814d}.hover\:border-fuchsia-400\/50:hover{border-color:#e879f980}.hover\:border-gray-500:hover{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.hover\:border-gray-600:hover{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.hover\:border-gray-700:hover{--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.hover\:border-indigo-400:hover{--tw-border-opacity: 1;border-color:rgb(129 140 248 / var(--tw-border-opacity, 1))}.hover\:border-purple-600\/50:hover{border-color:#7c3aed80}.hover\:border-red-500\/30:hover{border-color:#ef44444d}.hover\:border-red-500\/60:hover{border-color:#ef444499}.hover\:border-slate-500:hover{--tw-border-opacity: 1;border-color:rgb(100 116 139 / var(--tw-border-opacity, 1))}.hover\:border-teal-500\/60:hover{border-color:#14b8a699}.hover\:bg-\[\#6A5A42\]:hover{--tw-bg-opacity: 1;background-color:rgb(106 90 66 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#A6926E\]:hover{--tw-bg-opacity: 1;background-color:rgb(166 146 110 / var(--tw-bg-opacity, 1))}.hover\:bg-\[\#A6926E\]\/20:hover{background-color:#a6926e33}.hover\:bg-\[\#C4A96B\]\/10:hover{background-color:#c4a96b1a}.hover\:bg-\[\#C4A96B\]\/15:hover{background-color:#c4a96b26}.hover\:bg-\[\#C4A96B\]\/20:hover{background-color:#c4a96b33}.hover\:bg-\[\#C4A96B\]\/25:hover{background-color:#c4a96b40}.hover\:bg-\[\#C4A96B\]\/30:hover{background-color:#c4a96b4d}.hover\:bg-\[\#C4A96B\]\/60:hover{background-color:#c4a96b99}.hover\:bg-\[\#D8CBAF\]\/20:hover{background-color:#d8cbaf33}.hover\:bg-\[\#D8CBAF\]\/25:hover{background-color:#d8cbaf40}.hover\:bg-\[var\(--tone-bg-hover\)\]:hover{background-color:var(--tone-bg-hover)}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-amber-500:hover{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-500\/10:hover{background-color:#f59e0b1a}.hover\:bg-amber-500\/20:hover{background-color:#f59e0b33}.hover\:bg-amber-600:hover{--tw-bg-opacity: 1;background-color:rgb(217 119 6 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-600\/30:hover{background-color:#d977064d}.hover\:bg-amber-700:hover{--tw-bg-opacity: 1;background-color:rgb(180 83 9 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-800:hover{--tw-bg-opacity: 1;background-color:rgb(146 64 14 / var(--tw-bg-opacity, 1))}.hover\:bg-amber-900\/10:hover{background-color:#78350f1a}.hover\:bg-amber-900\/20:hover{background-color:#78350f33}.hover\:bg-amber-900\/30:hover{background-color:#78350f4d}.hover\:bg-amber-900\/40:hover{background-color:#78350f66}.hover\:bg-amber-900\/45:hover{background-color:#78350f73}.hover\:bg-amber-900\/50:hover{background-color:#78350f80}.hover\:bg-black\/20:hover{background-color:#0003}.hover\:bg-blue-600:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-600\/50:hover{background-color:#2563eb80}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-800\/50:hover{background-color:#1e40af80}.hover\:bg-cyan-500\/20:hover{background-color:#06b6d433}.hover\:bg-cyan-900\/20:hover{background-color:#164e6333}.hover\:bg-cyan-900\/30:hover{background-color:#164e634d}.hover\:bg-cyan-900\/50:hover{background-color:#164e6380}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-emerald-500:hover{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-500\/10:hover{background-color:#10b9811a}.hover\:bg-emerald-500\/20:hover{background-color:#10b98133}.hover\:bg-emerald-600:hover{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-600\/30:hover{background-color:#0596694d}.hover\:bg-emerald-900\/20:hover{background-color:#064e3b33}.hover\:bg-emerald-900\/30:hover{background-color:#064e3b4d}.hover\:bg-emerald-900\/50:hover{background-color:#064e3b80}.hover\:bg-emerald-900\/60:hover{background-color:#064e3b99}.hover\:bg-fuchsia-500\/20:hover{background-color:#d946ef33}.hover\:bg-gray-600:hover{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-700\/80:hover{background-color:#374151cc}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-800\/30:hover{background-color:#1f29374d}.hover\:bg-gray-800\/40:hover{background-color:#1f293766}.hover\:bg-gray-800\/50:hover{background-color:#1f293780}.hover\:bg-gray-800\/60:hover{background-color:#1f293799}.hover\:bg-gray-800\/70:hover{background-color:#1f2937b3}.hover\:bg-gray-800\/80:hover{background-color:#1f2937cc}.hover\:bg-gray-900:hover{--tw-bg-opacity: 1;background-color:rgb(22 22 30 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-900\/50:hover{background-color:#16161e80}.hover\:bg-gray-900\/70:hover{background-color:#16161eb3}.hover\:bg-gray-950:hover{--tw-bg-opacity: 1;background-color:rgb(10 10 15 / var(--tw-bg-opacity, 1))}.hover\:bg-green-700:hover{--tw-bg-opacity: 1;background-color:rgb(21 128 61 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-600:hover{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-600\/30:hover{background-color:#4f46e54d}.hover\:bg-indigo-700:hover{--tw-bg-opacity: 1;background-color:rgb(67 56 202 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-900\/20:hover{background-color:#312e8133}.hover\:bg-indigo-900\/50:hover{background-color:#312e8180}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/80:hover{background-color:hsl(var(--muted) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-purple-700:hover{--tw-bg-opacity: 1;background-color:rgb(109 40 217 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500:hover{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-red-600\/30:hover{background-color:#dc26264d}.hover\:bg-red-700:hover{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity, 1))}.hover\:bg-red-900\/20:hover{background-color:#7f1d1d33}.hover\:bg-red-900\/40:hover{background-color:#7f1d1d66}.hover\:bg-red-900\/60:hover{background-color:#7f1d1d99}.hover\:bg-red-950\/40:hover{background-color:#450a0a66}.hover\:bg-rose-900\/20:hover{background-color:#88133733}.hover\:bg-rose-900\/40:hover{background-color:#88133766}.hover\:bg-rose-900\/45:hover{background-color:#88133773}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-sky-500\/10:hover{background-color:#0ea5e91a}.hover\:bg-sky-500\/20:hover{background-color:#0ea5e933}.hover\:bg-sky-900\/20:hover{background-color:#0c4a6e33}.hover\:bg-sky-900\/30:hover{background-color:#0c4a6e4d}.hover\:bg-sky-900\/40:hover{background-color:#0c4a6e66}.hover\:bg-teal-900\/20:hover{background-color:#134e4a33}.hover\:bg-violet-700:hover{--tw-bg-opacity: 1;background-color:rgb(109 40 217 / var(--tw-bg-opacity, 1))}.hover\:bg-white\/10:hover{background-color:#ffffff1a}.hover\:bg-white\/15:hover{background-color:#ffffff26}.hover\:bg-yellow-900\/20:hover{background-color:#713f1233}.hover\:bg-zinc-50:hover{--tw-bg-opacity: 1;background-color:rgb(250 250 250 / var(--tw-bg-opacity, 1))}.hover\:text-\[\#C4A96B\]:hover{--tw-text-opacity: 1;color:rgb(196 169 107 / var(--tw-text-opacity, 1))}.hover\:text-\[\#D8CBAF\]:hover{--tw-text-opacity: 1;color:rgb(216 203 175 / var(--tw-text-opacity, 1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-amber-300:hover{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.hover\:text-blue-800:hover{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.hover\:text-current:hover{color:currentColor}.hover\:text-cyan-300:hover{--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-emerald-200:hover{--tw-text-opacity: 1;color:rgb(167 243 208 / var(--tw-text-opacity, 1))}.hover\:text-emerald-400:hover{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-gray-100:hover{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.hover\:text-gray-300:hover{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.hover\:text-gray-400:hover{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.hover\:text-indigo-200:hover{--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.hover\:text-indigo-300:hover{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.hover\:text-red-200:hover{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-red-800:hover{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:text-white\/60:hover{color:#fff9}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-80:hover{opacity:.8}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-\[\#C4A96B\]:focus{--tw-border-opacity: 1;border-color:rgb(196 169 107 / var(--tw-border-opacity, 1))}.focus\:border-\[\#C4A96B\]\/40:focus{border-color:#c4a96b66}.focus\:border-\[\#C4A96B\]\/50:focus{border-color:#c4a96b80}.focus\:border-\[\#C4A96B\]\/60:focus{border-color:#c4a96b99}.focus\:border-\[\#D8CBAF\]\/50:focus{border-color:#d8cbaf80}.focus\:border-\[\#D8CBAF\]\/70:focus{border-color:#d8cbafb3}.focus\:border-gray-500:focus{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.focus\:border-gray-600:focus{--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.focus\:border-indigo-500:focus{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:border-white\/20:focus{border-color:#fff3}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-0:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-1:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-\[\#C4A96B\]\/40:focus{--tw-ring-color: rgb(196 169 107 / .4)}.focus\:ring-\[\#C4A96B\]\/50:focus{--tw-ring-color: rgb(196 169 107 / .5)}.focus\:ring-\[\#C4A96B\]\/60:focus{--tw-ring-color: rgb(196 169 107 / .6)}.focus\:ring-amber-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(245 158 11 / var(--tw-ring-opacity, 1))}.focus\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.focus\:ring-blue-500\/60:focus{--tw-ring-color: rgb(59 130 246 / .6)}.focus\:ring-gray-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(75 85 99 / var(--tw-ring-opacity, 1))}.focus\:ring-indigo-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity, 1))}.focus\:ring-purple-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(139 92 246 / var(--tw-ring-opacity, 1))}.focus\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity, 1))}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-violet-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(139 92 246 / var(--tw-ring-opacity, 1))}.focus\:ring-zinc-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(161 161 170 / var(--tw-ring-opacity, 1))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus\:ring-offset-gray-900:focus{--tw-ring-offset-color: rgb(22, 22, 30)}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-inset:focus-visible{--tw-ring-inset: inset}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width: 1px}.active\:bg-blue-500:active{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:cursor-wait:disabled{cursor:wait}.disabled\:border-gray-800:disabled{--tw-border-opacity: 1;border-color:rgb(31 41 55 / var(--tw-border-opacity, 1))}.disabled\:bg-gray-700:disabled{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.disabled\:bg-gray-800:disabled{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.disabled\:bg-gray-900:disabled{--tw-bg-opacity: 1;background-color:rgb(22 22 30 / var(--tw-bg-opacity, 1))}.disabled\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.disabled\:text-gray-600:disabled{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.disabled\:hover\:bg-transparent:hover:disabled{background-color:transparent}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:bg-\[\#C4A96B\]\/60{background-color:#c4a96b99}.group:hover .group-hover\:bg-blue-400{--tw-bg-opacity: 1;background-color:rgb(96 165 250 / var(--tw-bg-opacity, 1))}.group:hover .group-hover\:text-\[\#C4A96B\]{--tw-text-opacity: 1;color:rgb(196 169 107 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-\[\#D8CBAF\]{--tw-text-opacity: 1;color:rgb(216 203 175 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.group:hover .group-hover\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-80{opacity:.8}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:checked~.peer-checked\:bg-\[\#C4A96B\]{--tw-bg-opacity: 1;background-color:rgb(196 169 107 / var(--tw-bg-opacity, 1))}.peer:checked~.peer-checked\:after\:translate-x-full:after{content:var(--tw-content);--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.peer:focus~.peer-focus\:outline-none{outline:2px solid transparent;outline-offset:2px}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:0}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:.25rem}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.dark\:border-zinc-600:is(class *){--tw-border-opacity: 1;border-color:rgb(82 82 91 / var(--tw-border-opacity, 1))}.dark\:border-zinc-700:is(class *){--tw-border-opacity: 1;border-color:rgb(63 63 70 / var(--tw-border-opacity, 1))}.dark\:bg-blue-900\/50:is(class *){background-color:#1e3a8a80}.dark\:bg-emerald-900\/50:is(class *){background-color:#064e3b80}.dark\:bg-red-900\/30:is(class *){background-color:#7f1d1d4d}.dark\:bg-red-900\/50:is(class *){background-color:#7f1d1d80}.dark\:bg-violet-900\/50:is(class *){background-color:#4c1d9580}.dark\:bg-yellow-900\/50:is(class *){background-color:#713f1280}.dark\:bg-zinc-800:is(class *){--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity, 1))}.dark\:bg-zinc-900:is(class *){--tw-bg-opacity: 1;background-color:rgb(24 24 27 / var(--tw-bg-opacity, 1))}.dark\:text-blue-200:is(class *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-emerald-200:is(class *){--tw-text-opacity: 1;color:rgb(167 243 208 / var(--tw-text-opacity, 1))}.dark\:text-red-200:is(class *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is(class *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-violet-200:is(class *){--tw-text-opacity: 1;color:rgb(221 214 254 / var(--tw-text-opacity, 1))}.dark\:text-yellow-200:is(class *){--tw-text-opacity: 1;color:rgb(254 240 138 / var(--tw-text-opacity, 1))}.dark\:text-zinc-100:is(class *){--tw-text-opacity: 1;color:rgb(244 244 245 / var(--tw-text-opacity, 1))}.dark\:text-zinc-300:is(class *){--tw-text-opacity: 1;color:rgb(212 212 216 / var(--tw-text-opacity, 1))}.dark\:text-zinc-400:is(class *){--tw-text-opacity: 1;color:rgb(161 161 170 / var(--tw-text-opacity, 1))}.dark\:text-zinc-500:is(class *){--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.dark\:placeholder\:text-zinc-500:is(class *)::-moz-placeholder{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.dark\:placeholder\:text-zinc-500:is(class *)::placeholder{--tw-text-opacity: 1;color:rgb(113 113 122 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-zinc-800:hover:is(class *){--tw-bg-opacity: 1;background-color:rgb(39 39 42 / var(--tw-bg-opacity, 1))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:block{display:block}.sm\:inline{display:inline}.sm\:flex{display:flex}.sm\:inline-flex{display:inline-flex}.sm\:max-w-sm{max-width:24rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-2{gap:.5rem}.sm\:gap-4{gap:1rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:static{position:static}.md\:z-auto{z-index:auto}.md\:col-span-2{grid-column:span 2 / span 2}.md\:col-span-3{grid-column:span 3 / span 3}.md\:col-span-4{grid-column:span 4 / span 4}.md\:block{display:block}.md\:hidden{display:none}.md\:h-\[10\.9rem\]{height:10.9rem}.md\:h-\[14rem\]{height:14rem}.md\:h-\[5\.45rem\]{height:5.45rem}.md\:w-full{width:100%}.md\:max-w-\[16\.4rem\]{max-width:16.4rem}.md\:max-w-\[420px\]{max-width:420px}.md\:max-w-\[8\.2rem\]{max-width:8.2rem}.md\:flex-1{flex:1 1 0%}.md\:shrink-0{flex-shrink:0}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:grid-cols-\[minmax\(0\,1fr\)_auto_auto\]{grid-template-columns:minmax(0,1fr) auto auto}.md\:flex-row{flex-direction:row}.md\:items-start{align-items:flex-start}.md\:items-end{align-items:flex-end}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-4{gap:1rem}.md\:p-10{padding:2.5rem}.md\:p-12{padding:3rem}.md\:p-8{padding:2rem}.md\:px-10{padding-left:2.5rem;padding-right:2.5rem}.md\:py-12{padding-top:3rem;padding-bottom:3rem}.md\:pr-5{padding-right:1.25rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-7xl{font-size:4.5rem;line-height:1}.md\:text-\[2rem\]{font-size:2rem}.md\:text-base{font-size:1rem;line-height:1.5rem}}@media (min-width: 1024px){.lg\:mx-auto{margin-left:auto;margin-right:auto}.lg\:-ml-5{margin-left:-1.25rem}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:h-\[120px\]{height:120px}.lg\:h-\[12rem\]{height:12rem}.lg\:h-\[15rem\]{height:15rem}.lg\:h-\[6rem\]{height:6rem}.lg\:max-w-3xl{max-width:48rem}.lg\:max-w-\[18rem\]{max-width:18rem}.lg\:max-w-\[23rem\]{max-width:23rem}.lg\:max-w-\[9rem\]{max-width:9rem}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-\[1\.1fr_0\.9fr\]{grid-template-columns:1.1fr .9fr}.lg\:grid-cols-\[1\.4fr_0\.6fr\]{grid-template-columns:1.4fr .6fr}.lg\:grid-cols-\[minmax\(0\,1\.1fr\)_minmax\(0\,1fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}.lg\:flex-row{flex-direction:row}.lg\:items-start{align-items:flex-start}.lg\:items-end{align-items:flex-end}.lg\:justify-between{justify-content:space-between}.lg\:gap-5{gap:1.25rem}.lg\:gap-6{gap:1.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pr-8{padding-right:2rem}.lg\:pt-24{padding-top:6rem}.lg\:text-9xl{font-size:8rem;line-height:1}.lg\:text-\[2\.15rem\]{font-size:2.15rem}}@media (min-width: 1280px){.xl\:col-span-2{grid-column:span 2 / span 2}.xl\:col-span-3{grid-column:span 3 / span 3}.xl\:-ml-7{margin-left:-1.75rem}.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.xl\:grid-cols-9{grid-template-columns:repeat(9,minmax(0,1fr))}.xl\:grid-cols-\[0\.9fr_1\.1fr\]{grid-template-columns:.9fr 1.1fr}.xl\:grid-cols-\[1\.15fr\,1fr\]{grid-template-columns:1.15fr 1fr}.xl\:grid-cols-\[1\.2fr_0\.8fr\]{grid-template-columns:1.2fr .8fr}.xl\:flex-row{flex-direction:row}.xl\:items-start{align-items:flex-start}.xl\:justify-between{justify-content:space-between}.xl\:gap-6{gap:1.5rem}.xl\:gap-8{gap:2rem}.xl\:text-right{text-align:right}.xl\:text-\[1\.55rem\]{font-size:1.55rem}.xl\:text-\[10px\]{font-size:10px}.xl\:text-\[11px\]{font-size:11px}.xl\:tracking-\[0\.18em\]{letter-spacing:.18em}.xl\:tracking-\[0\.22em\]{letter-spacing:.22em}}@media (min-width: 1536px){.\32xl\:text-\[1\.7rem\]{font-size:1.7rem}}.\[\&\+div\]\:text-xs+div{font-size:.75rem;line-height:1rem}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0} diff --git a/dist/assets/index-D-wwVRoV.js b/dist/assets/index-D-wwVRoV.js deleted file mode 100644 index 84d50039..00000000 --- a/dist/assets/index-D-wwVRoV.js +++ /dev/null @@ -1,1130 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeLanding-CMrIE0Xa.js","assets/MarketingShell-BgYQ8Cfp.js","assets/PublicPrimaryButton-FdcHLbCt.js","assets/arrow-right-lAzDeT03.js","assets/workflow-DutrKdOb.js","assets/users-B0OVFCFN.js","assets/bot-Dw4nx5z7.js","assets/graduation-cap-BmClC3T4.js","assets/AboutPage-DwEinoFu.js","assets/LoginPage-C958rnep.js","assets/notifications-BfjEGrJX.js","assets/key-round-BLVtnvIK.js","assets/RegisterPage-BbT7Ul1-.js","assets/PricingPage-CSaw9bYM.js","assets/AffiliateProgramPage-DccP8xMz.js","assets/shield-check-DmMPB5ob.js","assets/AffiliateResourcesPage-DtWyke4f.js","assets/file-text-Boy8OvW2.js","assets/SupportPage-CTKn1axq.js","assets/ChangelogPage-DgB9RcIb.js","assets/DocsPage-DVm6ovlc.js","assets/HelpCenterPage-Dq9CNrOI.js","assets/ImpressumPage-Df0oO5Hs.js","assets/LegalPageLayout-B12TU0j9.js","assets/PrivacyPage-D9Ihd_q3.js","assets/PolicyArticle-s4Nnon3-.js","assets/TermsPage-CZ6P_pT2.js","assets/WithdrawalPage-CdZT6ngS.js","assets/ShippingPaymentPage-BVPweEr5.js"])))=>i.map(i=>d[i]); -var O0=e=>{throw TypeError(e)};var Sc=(e,t,n)=>t.has(e)||O0("Cannot "+n);var D=(e,t,n)=>(Sc(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?O0("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ae=(e,t,n,r)=>(Sc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),It=(e,t,n)=>(Sc(e,t,"access private method"),n);var Bs=(e,t,n,r)=>({set _(i){ae(e,t,i,n)},get _(){return D(e,t,r)}});function Wy(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var C=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ps(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var n1={exports:{}},Il={},r1={exports:{}},ye={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var gs=Symbol.for("react.element"),zy=Symbol.for("react.portal"),Vy=Symbol.for("react.fragment"),Gy=Symbol.for("react.strict_mode"),qy=Symbol.for("react.profiler"),Qy=Symbol.for("react.provider"),Ky=Symbol.for("react.context"),Zy=Symbol.for("react.forward_ref"),Xy=Symbol.for("react.suspense"),Jy=Symbol.for("react.memo"),Yy=Symbol.for("react.lazy"),b0=Symbol.iterator;function e3(e){return e===null||typeof e!="object"?null:(e=b0&&e[b0]||e["@@iterator"],typeof e=="function"?e:null)}var i1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},o1=Object.assign,a1={};function $o(e,t,n){this.props=e,this.context=t,this.refs=a1,this.updater=n||i1}$o.prototype.isReactComponent={};$o.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};$o.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function s1(){}s1.prototype=$o.prototype;function Nf(e,t,n){this.props=e,this.context=t,this.refs=a1,this.updater=n||i1}var jf=Nf.prototype=new s1;jf.constructor=Nf;o1(jf,$o.prototype);jf.isPureReactComponent=!0;var L0=Array.isArray,u1=Object.prototype.hasOwnProperty,Hf={current:null},l1={key:!0,ref:!0,__self:!0,__source:!0};function c1(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)u1.call(t,r)&&!l1.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1>>1,he=Q[ee];if(0>>1;eei(M,X))bi(z,M)?(Q[ee]=z,Q[b]=X,ee=b):(Q[ee]=M,Q[E]=X,ee=E);else if(bi(z,X))Q[ee]=z,Q[b]=X,ee=b;else break e}}return j}function i(Q,j){var X=Q.sortIndex-j.sortIndex;return X!==0?X:Q.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var l=[],s=[],c=1,d=null,f=3,h=!1,m=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(Q){for(var j=n(s);j!==null;){if(j.callback===null)r(s);else if(j.startTime<=Q)r(s),j.sortIndex=j.expirationTime,t(l,j);else break;j=n(s)}}function w(Q){if(y=!1,p(Q),!m)if(n(l)!==null)m=!0,at(R);else{var j=n(s);j!==null&&tt(w,j.startTime-Q)}}function R(Q,j){m=!1,y&&(y=!1,g(T),T=-1),h=!0;var X=f;try{for(p(j),d=n(l);d!==null&&(!(d.expirationTime>j)||Q&&!F());){var ee=d.callback;if(typeof ee=="function"){d.callback=null,f=d.priorityLevel;var he=ee(d.expirationTime<=j);j=e.unstable_now(),typeof he=="function"?d.callback=he:d===n(l)&&r(l),p(j)}else r(l);d=n(l)}if(d!==null)var Tt=!0;else{var E=n(s);E!==null&&tt(w,E.startTime-j),Tt=!1}return Tt}finally{d=null,f=X,h=!1}}var _=!1,k=null,T=-1,L=5,P=-1;function F(){return!(e.unstable_now()-PQ||125ee?(Q.sortIndex=X,t(s,Q),n(l)===null&&Q===n(s)&&(y?(g(T),T=-1):y=!0,tt(w,X-ee))):(Q.sortIndex=he,t(l,Q),m||h||(m=!0,at(R))),Q},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(Q){var j=f;return function(){var X=f;f=j;try{return Q.apply(this,arguments)}finally{f=X}}}})(v1);g1.exports=v1;var f3=g1.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var h3=x,en=f3;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),wd=Object.prototype.hasOwnProperty,p3=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,F0={},M0={};function g3(e){return wd.call(M0,e)?!0:wd.call(F0,e)?!1:p3.test(e)?M0[e]=!0:(F0[e]=!0,!1)}function v3(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function m3(e,t,n,r){if(t===null||typeof t>"u"||v3(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function $t(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Rt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Rt[e]=new $t(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Rt[t]=new $t(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Rt[e]=new $t(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Rt[e]=new $t(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Rt[e]=new $t(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Rt[e]=new $t(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Rt[e]=new $t(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Rt[e]=new $t(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Rt[e]=new $t(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bf=/[\-:]([a-z])/g;function Wf(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Bf,Wf);Rt[t]=new $t(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Bf,Wf);Rt[t]=new $t(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Bf,Wf);Rt[t]=new $t(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Rt[e]=new $t(e,1,!1,e.toLowerCase(),null,!1,!1)});Rt.xlinkHref=new $t("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Rt[e]=new $t(e,1,!1,e.toLowerCase(),null,!0,!0)});function zf(e,t,n,r){var i=Rt.hasOwnProperty(t)?Rt[t]:null;(i!==null?i.type!==0:r||!(2u||i[a]!==o[u]){var l=` -`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=u);break}}}finally{Cc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ra(e):""}function y3(e){switch(e.tag){case 5:return Ra(e.type);case 16:return Ra("Lazy");case 13:return Ra("Suspense");case 19:return Ra("SuspenseList");case 0:case 2:case 15:return e=Tc(e.type,!1),e;case 11:return e=Tc(e.type.render,!1),e;case 1:return e=Tc(e.type,!0),e;default:return""}}function Rd(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case oo:return"Fragment";case io:return"Portal";case _d:return"Profiler";case Vf:return"StrictMode";case Sd:return"Suspense";case kd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case w1:return(e.displayName||"Context")+".Consumer";case y1:return(e._context.displayName||"Context")+".Provider";case Gf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qf:return t=e.displayName||null,t!==null?t:Rd(e.type)||"Memo";case Er:t=e._payload,e=e._init;try{return Rd(e(t))}catch{}}return null}function w3(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Rd(t);case 8:return t===Vf?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ii(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function S1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _3(e){var t=S1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vs(e){e._valueTracker||(e._valueTracker=_3(e))}function k1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=S1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Nu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Cd(e,t){var n=t.checked;return qe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function N0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ii(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function R1(e,t){t=t.checked,t!=null&&zf(e,"checked",t,!1)}function Td(e,t){R1(e,t);var n=ii(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Id(e,t.type,n):t.hasOwnProperty("defaultValue")&&Id(e,t.type,ii(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function j0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Id(e,t,n){(t!=="number"||Nu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ca=Array.isArray;function mo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Gs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function za(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ea={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},S3=["Webkit","ms","Moz","O"];Object.keys(Ea).forEach(function(e){S3.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ea[t]=Ea[e]})});function P1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ea.hasOwnProperty(e)&&Ea[e]?(""+t).trim():t+"px"}function E1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=P1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var k3=qe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function xd(e,t){if(t){if(k3[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function Ad(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Od=null;function Qf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bd=null,yo=null,wo=null;function B0(e){if(e=ys(e)){if(typeof bd!="function")throw Error($(280));var t=e.stateNode;t&&(t=Ol(t),bd(e.stateNode,e.type,t))}}function x1(e){yo?wo?wo.push(e):wo=[e]:yo=e}function A1(){if(yo){var e=yo,t=wo;if(wo=yo=null,B0(e),t)for(e=0;e>>=0,e===0?32:31-(L3(e)/D3|0)|0}var qs=64,Qs=4194304;function Ta(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~i;u!==0?r=Ta(u):(o&=a,o!==0&&(r=Ta(o)))}else a=n&~i,a!==0?r=Ta(a):o!==0&&(r=Ta(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function vs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-An(t),e[t]=n}function N3(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Aa),X0=" ",J0=!1;function Z1(e,t){switch(e){case"keyup":return f4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function X1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ao=!1;function p4(e,t){switch(e){case"compositionend":return X1(t);case"keypress":return t.which!==32?null:(J0=!0,X0);case"textInput":return e=t.data,e===X0&&J0?null:e;default:return null}}function g4(e,t){if(ao)return e==="compositionend"||!nh&&Z1(e,t)?(e=Q1(),Tu=Yf=zr=null,ao=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=np(n)}}function tv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nv(){for(var e=window,t=Nu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nu(e.document)}return t}function rh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function C4(e){var t=nv(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tv(n.ownerDocument.documentElement,n)){if(r!==null&&rh(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=rp(n,o);var a=rp(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,so=null,Nd=null,ba=null,jd=!1;function ip(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jd||so==null||so!==Nu(r)||(r=so,"selectionStart"in r&&rh(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ba&&Za(ba,r)||(ba=r,r=Vu(Nd,"onSelect"),0co||(e.current=Vd[co],Vd[co]=null,co--)}function Me(e,t){co++,Vd[co]=e.current,e.current=t}var oi={},Lt=li(oi),Vt=li(!1),Mi=oi;function Lo(e,t){var n=e.type.contextTypes;if(!n)return oi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Gt(e){return e=e.childContextTypes,e!=null}function qu(){$e(Vt),$e(Lt)}function dp(e,t,n){if(Lt.current!==oi)throw Error($(168));Me(Lt,t),Me(Vt,n)}function dv(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error($(108,w3(e)||"Unknown",i));return qe({},n,r)}function Qu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||oi,Mi=Lt.current,Me(Lt,e),Me(Vt,Vt.current),!0}function fp(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=dv(e,t,Mi),r.__reactInternalMemoizedMergedChildContext=e,$e(Vt),$e(Lt),Me(Lt,e)):$e(Vt),Me(Vt,n)}var sr=null,bl=!1,jc=!1;function fv(e){sr===null?sr=[e]:sr.push(e)}function M4(e){bl=!0,fv(e)}function ci(){if(!jc&&sr!==null){jc=!0;var e=0,t=De;try{var n=sr;for(De=1;e>=a,i-=a,lr=1<<32-An(t)+i|n<T?(L=k,k=null):L=k.sibling;var P=f(g,k,p[T],w);if(P===null){k===null&&(k=L);break}e&&k&&P.alternate===null&&t(g,k),v=o(P,v,T),_===null?R=P:_.sibling=P,_=P,k=L}if(T===p.length)return n(g,k),Be&&wi(g,T),R;if(k===null){for(;TT?(L=k,k=null):L=k.sibling;var F=f(g,k,P.value,w);if(F===null){k===null&&(k=L);break}e&&k&&F.alternate===null&&t(g,k),v=o(F,v,T),_===null?R=F:_.sibling=F,_=F,k=L}if(P.done)return n(g,k),Be&&wi(g,T),R;if(k===null){for(;!P.done;T++,P=p.next())P=d(g,P.value,w),P!==null&&(v=o(P,v,T),_===null?R=P:_.sibling=P,_=P);return Be&&wi(g,T),R}for(k=r(g,k);!P.done;T++,P=p.next())P=h(k,g,T,P.value,w),P!==null&&(e&&P.alternate!==null&&k.delete(P.key===null?T:P.key),v=o(P,v,T),_===null?R=P:_.sibling=P,_=P);return e&&k.forEach(function(Y){return t(g,Y)}),Be&&wi(g,T),R}function S(g,v,p,w){if(typeof p=="object"&&p!==null&&p.type===oo&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case zs:e:{for(var R=p.key,_=v;_!==null;){if(_.key===R){if(R=p.type,R===oo){if(_.tag===7){n(g,_.sibling),v=i(_,p.props.children),v.return=g,g=v;break e}}else if(_.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Er&&gp(R)===_.type){n(g,_.sibling),v=i(_,p.props),v.ref=ua(g,_,p),v.return=g,g=v;break e}n(g,_);break}else t(g,_);_=_.sibling}p.type===oo?(v=Di(p.props.children,g.mode,w,p.key),v.return=g,g=v):(w=Lu(p.type,p.key,p.props,null,g.mode,w),w.ref=ua(g,v,p),w.return=g,g=w)}return a(g);case io:e:{for(_=p.key;v!==null;){if(v.key===_)if(v.tag===4&&v.stateNode.containerInfo===p.containerInfo&&v.stateNode.implementation===p.implementation){n(g,v.sibling),v=i(v,p.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else t(g,v);v=v.sibling}v=qc(p,g.mode,w),v.return=g,g=v}return a(g);case Er:return _=p._init,S(g,v,_(p._payload),w)}if(Ca(p))return m(g,v,p,w);if(ra(p))return y(g,v,p,w);tu(g,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,v!==null&&v.tag===6?(n(g,v.sibling),v=i(v,p),v.return=g,g=v):(n(g,v),v=Gc(p,g.mode,w),v.return=g,g=v),a(g)):n(g,v)}return S}var Fo=vv(!0),mv=vv(!1),Xu=li(null),Ju=null,po=null,sh=null;function uh(){sh=po=Ju=null}function lh(e){var t=Xu.current;$e(Xu),e._currentValue=t}function Qd(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function So(e,t){Ju=e,sh=po=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(zt=!0),e.firstContext=null)}function fn(e){var t=e._currentValue;if(sh!==e)if(e={context:e,memoizedValue:t,next:null},po===null){if(Ju===null)throw Error($(308));po=e,Ju.dependencies={lanes:0,firstContext:e}}else po=po.next=e;return t}var Ri=null;function ch(e){Ri===null?Ri=[e]:Ri.push(e)}function yv(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ch(t)):(n.next=i.next,i.next=n),t.interleaved=n,gr(e,r)}function gr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var xr=!1;function dh(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function wv(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function dr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Yr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Te&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,gr(e,n)}return i=r.interleaved,i===null?(t.next=t,ch(r)):(t.next=i.next,i.next=t),r.interleaved=t,gr(e,n)}function Pu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zf(e,n)}}function vp(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yu(e,t,n,r){var i=e.updateQueue;xr=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var l=u,s=l.next;l.next=null,a===null?o=s:a.next=s,a=l;var c=e.alternate;c!==null&&(c=c.updateQueue,u=c.lastBaseUpdate,u!==a&&(u===null?c.firstBaseUpdate=s:u.next=s,c.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;a=0,c=s=l=null,u=o;do{var f=u.lane,h=u.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var m=e,y=u;switch(f=t,h=n,y.tag){case 1:if(m=y.payload,typeof m=="function"){d=m.call(h,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=y.payload,f=typeof m=="function"?m.call(h,d,f):m,f==null)break e;d=qe({},d,f);break e;case 2:xr=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[u]:f.push(u))}else h={eventTime:h,lane:f,tag:u.tag,payload:u.payload,callback:u.callback,next:null},c===null?(s=c=h,l=d):c=c.next=h,a|=f;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;f=u,u=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=s,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);ji|=a,e.lanes=a,e.memoizedState=d}}function mp(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=$c.transition;$c.transition={};try{e(!1),t()}finally{De=n,$c.transition=r}}function Mv(){return hn().memoizedState}function H4(e,t,n){var r=ti(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Uv(e))Nv(t,n);else if(n=yv(e,t,n,r),n!==null){var i=jt();On(n,e,r,i),jv(n,t,r)}}function $4(e,t,n){var r=ti(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Uv(e))Nv(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,u=o(a,n);if(i.hasEagerState=!0,i.eagerState=u,bn(u,a)){var l=t.interleaved;l===null?(i.next=i,ch(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=yv(e,t,i,r),n!==null&&(i=jt(),On(n,e,r,i),jv(n,t,r))}}function Uv(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function Nv(e,t){La=tl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function jv(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Zf(e,n)}}var nl={readContext:fn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},B4={readContext:fn,useCallback:function(e,t){return Un().memoizedState=[e,t===void 0?null:t],e},useContext:fn,useEffect:wp,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,xu(4194308,4,Ov.bind(null,t,e),n)},useLayoutEffect:function(e,t){return xu(4194308,4,e,t)},useInsertionEffect:function(e,t){return xu(4,2,e,t)},useMemo:function(e,t){var n=Un();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Un();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=H4.bind(null,Ge,e),[r.memoizedState,e]},useRef:function(e){var t=Un();return e={current:e},t.memoizedState=e},useState:yp,useDebugValue:wh,useDeferredValue:function(e){return Un().memoizedState=e},useTransition:function(){var e=yp(!1),t=e[0];return e=j4.bind(null,e[1]),Un().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ge,i=Un();if(Be){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),mt===null)throw Error($(349));Ni&30||Rv(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,wp(Tv.bind(null,r,o,e),[e]),r.flags|=2048,is(9,Cv.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Un(),t=mt.identifierPrefix;if(Be){var n=cr,r=lr;n=(r&~(1<<32-An(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ns++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Bn]=t,e[Ya]=r,Kv(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ad(n,r),n){case"dialog":je("cancel",e),je("close",e),i=r;break;case"iframe":case"object":case"embed":je("load",e),i=r;break;case"video":case"audio":for(i=0;iNo&&(t.flags|=128,r=!0,la(o,!1),t.lanes=4194304)}else{if(!r)if(e=el(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),la(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Be)return Et(t),null}else 2*Ye()-o.renderingStartTime>No&&n!==1073741824&&(t.flags|=128,r=!0,la(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ye(),t.sibling=null,n=Ve.current,Me(Ve,r?n&1|2:n&1),t):(Et(t),null);case 22:case 23:return Th(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Kt&1073741824&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function Z4(e,t){switch(oh(t),t.tag){case 1:return Gt(t.type)&&qu(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Mo(),$e(Vt),$e(Lt),ph(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return hh(t),null;case 13:if($e(Ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Do()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $e(Ve),null;case 4:return Mo(),null;case 10:return lh(t.type._context),null;case 22:case 23:return Th(),null;case 24:return null;default:return null}}var ru=!1,Ot=!1,X4=typeof WeakSet=="function"?WeakSet:Set,J=null;function go(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ze(e,t,r)}else n.current=null}function rf(e,t,n){try{n()}catch(r){Ze(e,t,r)}}var Ap=!1;function J4(e,t){if(Hd=Wu,e=nv(),rh(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,u=-1,l=-1,s=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(u=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++s===i&&(u=a),f===o&&++c===r&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=u===-1||l===-1?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},Wu=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var y=m.memoizedProps,S=m.memoizedState,g=t.stateNode,v=g.getSnapshotBeforeUpdate(t.elementType===t.type?y:Sn(t.type,y),S);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(w){Ze(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return m=Ap,Ap=!1,m}function Da(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&rf(t,n,o)}i=i.next}while(i!==r)}}function Fl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function of(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Jv(e){var t=e.alternate;t!==null&&(e.alternate=null,Jv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bn],delete t[Ya],delete t[zd],delete t[D4],delete t[F4])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Yv(e){return e.tag===5||e.tag===3||e.tag===4}function Op(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Yv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function af(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gu));else if(r!==4&&(e=e.child,e!==null))for(af(e,t,n),e=e.sibling;e!==null;)af(e,t,n),e=e.sibling}function sf(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(sf(e,t,n),e=e.sibling;e!==null;)sf(e,t,n),e=e.sibling}var St=null,Tn=!1;function Sr(e,t,n){for(n=n.child;n!==null;)em(e,t,n),n=n.sibling}function em(e,t,n){if(Gn&&typeof Gn.onCommitFiberUnmount=="function")try{Gn.onCommitFiberUnmount(Pl,n)}catch{}switch(n.tag){case 5:Ot||go(n,t);case 6:var r=St,i=Tn;St=null,Sr(e,t,n),St=r,Tn=i,St!==null&&(Tn?(e=St,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):St.removeChild(n.stateNode));break;case 18:St!==null&&(Tn?(e=St,n=n.stateNode,e.nodeType===8?Nc(e.parentNode,n):e.nodeType===1&&Nc(e,n),Qa(e)):Nc(St,n.stateNode));break;case 4:r=St,i=Tn,St=n.stateNode.containerInfo,Tn=!0,Sr(e,t,n),St=r,Tn=i;break;case 0:case 11:case 14:case 15:if(!Ot&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&rf(n,t,a),i=i.next}while(i!==r)}Sr(e,t,n);break;case 1:if(!Ot&&(go(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Ze(n,t,u)}Sr(e,t,n);break;case 21:Sr(e,t,n);break;case 22:n.mode&1?(Ot=(r=Ot)||n.memoizedState!==null,Sr(e,t,n),Ot=r):Sr(e,t,n);break;default:Sr(e,t,n)}}function bp(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new X4),t.forEach(function(r){var i=sw.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function mn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ew(r/1960))-r,10e?16:e,Vr===null)var r=!1;else{if(e=Vr,Vr=null,ol=0,Te&6)throw Error($(331));var i=Te;for(Te|=4,J=e.current;J!==null;){var o=J,a=o.child;if(J.flags&16){var u=o.deletions;if(u!==null){for(var l=0;lYe()-Rh?Li(e,0):kh|=n),qt(e,t)}function um(e,t){t===0&&(e.mode&1?(t=Qs,Qs<<=1,!(Qs&130023424)&&(Qs=4194304)):t=1);var n=jt();e=gr(e,t),e!==null&&(vs(e,t,n),qt(e,n))}function aw(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),um(e,n)}function sw(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),um(e,n)}var lm;lm=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Vt.current)zt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return zt=!1,Q4(e,t,n);zt=!!(e.flags&131072)}else zt=!1,Be&&t.flags&1048576&&hv(t,Zu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Au(e,t),e=t.pendingProps;var i=Lo(t,Lt.current);So(t,n),i=vh(null,t,r,e,i,n);var o=mh();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Gt(r)?(o=!0,Qu(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,dh(t),i.updater=Dl,t.stateNode=i,i._reactInternals=t,Zd(t,r,e,n),t=Yd(null,t,r,!0,o,n)):(t.tag=0,Be&&o&&ih(t),Ut(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Au(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=lw(r),e=Sn(r,e),i){case 0:t=Jd(null,t,r,e,n);break e;case 1:t=Pp(null,t,r,e,n);break e;case 11:t=Tp(null,t,r,e,n);break e;case 14:t=Ip(null,t,r,Sn(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),Jd(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),Pp(e,t,r,i,n);case 3:e:{if(Gv(t),e===null)throw Error($(387));r=t.pendingProps,o=t.memoizedState,i=o.element,wv(e,t),Yu(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Uo(Error($(423)),t),t=Ep(e,t,r,n,i);break e}else if(r!==i){i=Uo(Error($(424)),t),t=Ep(e,t,r,n,i);break e}else for(Xt=Jr(t.stateNode.containerInfo.firstChild),Jt=t,Be=!0,In=null,n=mv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Do(),r===i){t=vr(e,t,n);break e}Ut(e,t,r,n)}t=t.child}return t;case 5:return _v(t),e===null&&qd(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,Bd(r,i)?a=null:o!==null&&Bd(r,o)&&(t.flags|=32),Vv(e,t),Ut(e,t,a,n),t.child;case 6:return e===null&&qd(t),null;case 13:return qv(e,t,n);case 4:return fh(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fo(t,null,r,n):Ut(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),Tp(e,t,r,i,n);case 7:return Ut(e,t,t.pendingProps,n),t.child;case 8:return Ut(e,t,t.pendingProps.children,n),t.child;case 12:return Ut(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Me(Xu,r._currentValue),r._currentValue=a,o!==null)if(bn(o.value,a)){if(o.children===i.children&&!Vt.current){t=vr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){a=o.child;for(var l=u.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=dr(-1,n&-n),l.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var c=s.pending;c===null?l.next=l:(l.next=c.next,c.next=l),s.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Qd(o.return,n,t),u.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error($(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Qd(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Ut(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,So(t,n),i=fn(i),r=r(i),t.flags|=1,Ut(e,t,r,n),t.child;case 14:return r=t.type,i=Sn(r,t.pendingProps),i=Sn(r.type,i),Ip(e,t,r,i,n);case 15:return Wv(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Sn(r,i),Au(e,t),t.tag=1,Gt(r)?(e=!0,Qu(t)):e=!1,So(t,n),Hv(t,r,i),Zd(t,r,i,n),Yd(null,t,r,!0,e,n);case 19:return Qv(e,t,n);case 22:return zv(e,t,n)}throw Error($(156,t.tag))};function cm(e,t){return U1(e,t)}function uw(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,n,r){return new uw(e,t,n,r)}function Ph(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lw(e){if(typeof e=="function")return Ph(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gf)return 11;if(e===qf)return 14}return 2}function ni(e,t){var n=e.alternate;return n===null?(n=ln(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Lu(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")Ph(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case oo:return Di(n.children,i,o,t);case Vf:a=8,i|=8;break;case _d:return e=ln(12,n,t,i|2),e.elementType=_d,e.lanes=o,e;case Sd:return e=ln(13,n,t,i),e.elementType=Sd,e.lanes=o,e;case kd:return e=ln(19,n,t,i),e.elementType=kd,e.lanes=o,e;case _1:return Ul(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case y1:a=10;break e;case w1:a=9;break e;case Gf:a=11;break e;case qf:a=14;break e;case Er:a=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=ln(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Di(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function Ul(e,t,n,r){return e=ln(22,e,r,t),e.elementType=_1,e.lanes=n,e.stateNode={isHidden:!1},e}function Gc(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function qc(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cw(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Pc(0),this.expirationTimes=Pc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pc(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Eh(e,t,n,r,i,o,a,u,l){return e=new cw(e,t,n,u,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ln(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},dh(o),e}function dw(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pm)}catch(e){console.error(e)}}pm(),p1.exports=tn;var gm=p1.exports,Hp=gm;yd.createRoot=Hp.createRoot,yd.hydrateRoot=Hp.hydrateRoot;var Bl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vw={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Nr,Uf,qg,mw=(qg=class{constructor(){Se(this,Nr,vw);Se(this,Uf,!1)}setTimeoutProvider(e){ae(this,Nr,e)}setTimeout(e,t){return D(this,Nr).setTimeout(e,t)}clearTimeout(e){D(this,Nr).clearTimeout(e)}setInterval(e,t){return D(this,Nr).setInterval(e,t)}clearInterval(e){D(this,Nr).clearInterval(e)}},Nr=new WeakMap,Uf=new WeakMap,qg),ff=new mw;function yw(e){setTimeout(e,0)}var Wl=typeof window>"u"||"Deno"in globalThis;function kn(){}function ww(e,t){return typeof e=="function"?e(t):e}function _w(e){return typeof e=="number"&&e>=0&&e!==1/0}function Sw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function hf(e,t){return typeof e=="function"?e(t):e}function kw(e,t){return typeof e=="function"?e(t):e}function $p(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==bh(a,t.options))return!1}else if(!ss(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function Bp(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(as(t.options.mutationKey)!==as(o))return!1}else if(!ss(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function bh(e,t){return((t==null?void 0:t.queryKeyHashFn)||as)(e)}function as(e){return JSON.stringify(e,(t,n)=>pf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function ss(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ss(e[n],t[n])):!1}var Rw=Object.prototype.hasOwnProperty;function vm(e,t){if(e===t)return e;const n=Wp(e)&&Wp(t);if(!n&&!(pf(e)&&pf(t)))return t;const i=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),a=o.length,u=n?new Array(a):{};let l=0;for(let s=0;s{ff.setTimeout(t,e)})}function Tw(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?vm(e,t):t}function Iw(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Pw(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Lh=Symbol();function mm(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Lh?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Pi,jr,Co,Qg,Ew=(Qg=class extends Bl{constructor(){super();Se(this,Pi);Se(this,jr);Se(this,Co);ae(this,Co,t=>{if(!Wl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){D(this,jr)||this.setEventListener(D(this,Co))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,jr))==null||t.call(this),ae(this,jr,void 0))}setEventListener(t){var n;ae(this,Co,t),(n=D(this,jr))==null||n.call(this),ae(this,jr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){D(this,Pi)!==t&&(ae(this,Pi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof D(this,Pi)=="boolean"?D(this,Pi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Pi=new WeakMap,jr=new WeakMap,Co=new WeakMap,Qg),ym=new Ew;function xw(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Aw=yw;function Ow(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=Aw;const o=u=>{t?e.push(u):i(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(l=>{n(l)})})})};return{batch:u=>{let l;t++;try{l=u()}finally{t--,t||a()}return l},batchCalls:u=>(...l)=>{o(()=>{u(...l)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var Nt=Ow(),To,Hr,Io,Kg,bw=(Kg=class extends Bl{constructor(){super();Se(this,To,!0);Se(this,Hr);Se(this,Io);ae(this,Io,t=>{if(!Wl&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){D(this,Hr)||this.setEventListener(D(this,Io))}onUnsubscribe(){var t;this.hasListeners()||((t=D(this,Hr))==null||t.call(this),ae(this,Hr,void 0))}setEventListener(t){var n;ae(this,Io,t),(n=D(this,Hr))==null||n.call(this),ae(this,Hr,t(this.setOnline.bind(this)))}setOnline(t){D(this,To)!==t&&(ae(this,To,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return D(this,To)}},To=new WeakMap,Hr=new WeakMap,Io=new WeakMap,Kg),ul=new bw;function Lw(e){return Math.min(1e3*2**e,3e4)}function wm(e){return(e??"online")==="online"?ul.isOnline():!0}var gf=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function _m(e){let t=!1,n=0,r;const i=xw(),o=()=>i.status!=="pending",a=y=>{var S;if(!o()){const g=new gf(y);f(g),(S=e.onCancel)==null||S.call(e,g)}},u=()=>{t=!0},l=()=>{t=!1},s=()=>ym.isFocused()&&(e.networkMode==="always"||ul.isOnline())&&e.canRun(),c=()=>wm(e.networkMode)&&e.canRun(),d=y=>{o()||(r==null||r(),i.resolve(y))},f=y=>{o()||(r==null||r(),i.reject(y))},h=()=>new Promise(y=>{var S;r=g=>{(o()||s())&&y(g)},(S=e.onPause)==null||S.call(e)}).then(()=>{var y;r=void 0,o()||(y=e.onContinue)==null||y.call(e)}),m=()=>{if(o())return;let y;const S=n===0?e.initialPromise:void 0;try{y=S??e.fn()}catch(g){y=Promise.reject(g)}Promise.resolve(y).then(d).catch(g=>{var _;if(o())return;const v=e.retry??(Wl?0:3),p=e.retryDelay??Lw,w=typeof p=="function"?p(n,g):p,R=v===!0||typeof v=="number"&&ns()?void 0:h()).then(()=>{t?f(g):m()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r==null||r(),i),cancelRetry:u,continueRetry:l,canStart:c,start:()=>(c()?m():h().then(m),i)}}var Ei,Zg,Sm=(Zg=class{constructor(){Se(this,Ei)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_w(this.gcTime)&&ae(this,Ei,ff.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wl?1/0:5*60*1e3))}clearGcTimeout(){D(this,Ei)&&(ff.clearTimeout(D(this,Ei)),ae(this,Ei,void 0))}},Ei=new WeakMap,Zg),xi,Po,an,Ai,gt,ds,Oi,Rn,or,Xg,Dw=(Xg=class extends Sm{constructor(t){super();Se(this,Rn);Se(this,xi);Se(this,Po);Se(this,an);Se(this,Ai);Se(this,gt);Se(this,ds);Se(this,Oi);ae(this,Oi,!1),ae(this,ds,t.defaultOptions),this.setOptions(t.options),this.observers=[],ae(this,Ai,t.client),ae(this,an,D(this,Ai).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ae(this,xi,Vp(this.options)),this.state=t.state??D(this,xi),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=D(this,gt))==null?void 0:t.promise}setOptions(t){if(this.options={...D(this,ds),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Vp(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),ae(this,xi,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&D(this,an).remove(this)}setData(t,n){const r=Tw(this.state.data,t,this.options);return It(this,Rn,or).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){It(this,Rn,or).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=D(this,gt))==null?void 0:r.promise;return(i=D(this,gt))==null||i.cancel(t),n?n.then(kn).catch(kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(D(this,xi))}isActive(){return this.observers.some(t=>kw(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Lh||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>hf(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Sw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,gt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=D(this,gt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),D(this,an).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(D(this,gt)&&(D(this,Oi)?D(this,gt).cancel({revert:!0}):D(this,gt).cancelRetry()),this.scheduleGc()),D(this,an).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||It(this,Rn,or).call(this,{type:"invalidate"})}async fetch(t,n){var l,s,c,d,f,h,m,y,S,g,v,p;if(this.state.fetchStatus!=="idle"&&((l=D(this,gt))==null?void 0:l.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(D(this,gt))return D(this,gt).continueRetry(),D(this,gt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(R=>R.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,i=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(ae(this,Oi,!0),r.signal)})},o=()=>{const w=mm(this.options,n),_=(()=>{const k={client:D(this,Ai),queryKey:this.queryKey,meta:this.meta};return i(k),k})();return ae(this,Oi,!1),this.options.persister?this.options.persister(w,_,this):w(_)},u=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:D(this,Ai),state:this.state,fetchFn:o};return i(w),w})();(s=this.options.behavior)==null||s.onFetch(u,this),ae(this,Po,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=u.fetchOptions)==null?void 0:c.meta))&&It(this,Rn,or).call(this,{type:"fetch",meta:(d=u.fetchOptions)==null?void 0:d.meta}),ae(this,gt,_m({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:w=>{w instanceof gf&&w.revert&&this.setState({...D(this,Po),fetchStatus:"idle"}),r.abort()},onFail:(w,R)=>{It(this,Rn,or).call(this,{type:"failed",failureCount:w,error:R})},onPause:()=>{It(this,Rn,or).call(this,{type:"pause"})},onContinue:()=>{It(this,Rn,or).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const w=await D(this,gt).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(h=(f=D(this,an).config).onSuccess)==null||h.call(f,w,this),(y=(m=D(this,an).config).onSettled)==null||y.call(m,w,this.state.error,this),w}catch(w){if(w instanceof gf){if(w.silent)return D(this,gt).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw It(this,Rn,or).call(this,{type:"error",error:w}),(g=(S=D(this,an).config).onError)==null||g.call(S,w,this),(p=(v=D(this,an).config).onSettled)==null||p.call(v,this.state.data,w,this),w}finally{this.scheduleGc()}}},xi=new WeakMap,Po=new WeakMap,an=new WeakMap,Ai=new WeakMap,gt=new WeakMap,ds=new WeakMap,Oi=new WeakMap,Rn=new WeakSet,or=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Fw(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ae(this,Po,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Nt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),D(this,an).notify({query:this,type:"updated",action:t})})},Xg);function Fw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wm(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Vp(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function Gp(e){return{onFetch:(t,n)=>{var c,d,f,h,m;const r=t.options,i=(f=(d=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[];let u={pages:[],pageParams:[]},l=0;const s=async()=>{let y=!1;const S=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},g=mm(t.options,t.fetchOptions),v=async(p,w,R)=>{if(y)return Promise.reject();if(w==null&&p.pages.length)return Promise.resolve(p);const k=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:w,direction:R?"backward":"forward",meta:t.options.meta};return S(F),F})(),T=await g(k),{maxPages:L}=t.options,P=R?Pw:Iw;return{pages:P(p.pages,T,L),pageParams:P(p.pageParams,w,L)}};if(i&&o.length){const p=i==="backward",w=p?Mw:qp,R={pages:o,pageParams:a},_=w(r,R);u=await v(R,_,p)}else{const p=e??o.length;do{const w=l===0?a[0]??r.initialPageParam:qp(r,u);if(l>0&&w==null)break;u=await v(u,w),l++}while(l{var y,S;return(S=(y=t.options).persister)==null?void 0:S.call(y,s,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=s}}}function qp(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Mw(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var fs,jn,Mt,bi,Hn,Pr,Jg,Uw=(Jg=class extends Sm{constructor(t){super();Se(this,Hn);Se(this,fs);Se(this,jn);Se(this,Mt);Se(this,bi);ae(this,fs,t.client),this.mutationId=t.mutationId,ae(this,Mt,t.mutationCache),ae(this,jn,[]),this.state=t.state||Nw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){D(this,jn).includes(t)||(D(this,jn).push(t),this.clearGcTimeout(),D(this,Mt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ae(this,jn,D(this,jn).filter(n=>n!==t)),this.scheduleGc(),D(this,Mt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){D(this,jn).length||(this.state.status==="pending"?this.scheduleGc():D(this,Mt).remove(this))}continue(){var t;return((t=D(this,bi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,u,l,s,c,d,f,h,m,y,S,g,v,p,w,R,_,k,T,L;const n=()=>{It(this,Hn,Pr).call(this,{type:"continue"})},r={client:D(this,fs),meta:this.options.meta,mutationKey:this.options.mutationKey};ae(this,bi,_m({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(P,F)=>{It(this,Hn,Pr).call(this,{type:"failed",failureCount:P,error:F})},onPause:()=>{It(this,Hn,Pr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>D(this,Mt).canRun(this)}));const i=this.state.status==="pending",o=!D(this,bi).canStart();try{if(i)n();else{It(this,Hn,Pr).call(this,{type:"pending",variables:t,isPaused:o}),await((u=(a=D(this,Mt).config).onMutate)==null?void 0:u.call(a,t,this,r));const F=await((s=(l=this.options).onMutate)==null?void 0:s.call(l,t,r));F!==this.state.context&&It(this,Hn,Pr).call(this,{type:"pending",context:F,variables:t,isPaused:o})}const P=await D(this,bi).start();return await((d=(c=D(this,Mt).config).onSuccess)==null?void 0:d.call(c,P,t,this.state.context,this,r)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,P,t,this.state.context,r)),await((y=(m=D(this,Mt).config).onSettled)==null?void 0:y.call(m,P,null,this.state.variables,this.state.context,this,r)),await((g=(S=this.options).onSettled)==null?void 0:g.call(S,P,null,t,this.state.context,r)),It(this,Hn,Pr).call(this,{type:"success",data:P}),P}catch(P){try{throw await((p=(v=D(this,Mt).config).onError)==null?void 0:p.call(v,P,t,this.state.context,this,r)),await((R=(w=this.options).onError)==null?void 0:R.call(w,P,t,this.state.context,r)),await((k=(_=D(this,Mt).config).onSettled)==null?void 0:k.call(_,void 0,P,this.state.variables,this.state.context,this,r)),await((L=(T=this.options).onSettled)==null?void 0:L.call(T,void 0,P,t,this.state.context,r)),P}finally{It(this,Hn,Pr).call(this,{type:"error",error:P})}}finally{D(this,Mt).runNext(this)}}},fs=new WeakMap,jn=new WeakMap,Mt=new WeakMap,bi=new WeakMap,Hn=new WeakSet,Pr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Nt.batch(()=>{D(this,jn).forEach(r=>{r.onMutationUpdate(t)}),D(this,Mt).notify({mutation:this,type:"updated",action:t})})},Jg);function Nw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ur,Cn,hs,Yg,jw=(Yg=class extends Bl{constructor(t={}){super();Se(this,ur);Se(this,Cn);Se(this,hs);this.config=t,ae(this,ur,new Set),ae(this,Cn,new Map),ae(this,hs,0)}build(t,n,r){const i=new Uw({client:t,mutationCache:this,mutationId:++Bs(this,hs)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){D(this,ur).add(t);const n=au(t);if(typeof n=="string"){const r=D(this,Cn).get(n);r?r.push(t):D(this,Cn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(D(this,ur).delete(t)){const n=au(t);if(typeof n=="string"){const r=D(this,Cn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&D(this,Cn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=au(t);if(typeof n=="string"){const r=D(this,Cn).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=au(t);if(typeof n=="string"){const i=(r=D(this,Cn).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Nt.batch(()=>{D(this,ur).forEach(t=>{this.notify({type:"removed",mutation:t})}),D(this,ur).clear(),D(this,Cn).clear()})}getAll(){return Array.from(D(this,ur))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Bp(n,r))}findAll(t={}){return this.getAll().filter(n=>Bp(t,n))}notify(t){Nt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Nt.batch(()=>Promise.all(t.map(n=>n.continue().catch(kn))))}},ur=new WeakMap,Cn=new WeakMap,hs=new WeakMap,Yg);function au(e){var t;return(t=e.options.scope)==null?void 0:t.id}var $n,e1,Hw=(e1=class extends Bl{constructor(t={}){super();Se(this,$n);this.config=t,ae(this,$n,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??bh(i,n);let a=this.get(o);return a||(a=new Dw({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){D(this,$n).has(t.queryHash)||(D(this,$n).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=D(this,$n).get(t.queryHash);n&&(t.destroy(),n===t&&D(this,$n).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Nt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return D(this,$n).get(t)}getAll(){return[...D(this,$n).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>$p(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>$p(t,r)):n}notify(t){Nt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Nt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Nt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$n=new WeakMap,e1),Ke,$r,Br,Eo,xo,Wr,Ao,Oo,t1,$w=(t1=class{constructor(e={}){Se(this,Ke);Se(this,$r);Se(this,Br);Se(this,Eo);Se(this,xo);Se(this,Wr);Se(this,Ao);Se(this,Oo);ae(this,Ke,e.queryCache||new Hw),ae(this,$r,e.mutationCache||new jw),ae(this,Br,e.defaultOptions||{}),ae(this,Eo,new Map),ae(this,xo,new Map),ae(this,Wr,0)}mount(){Bs(this,Wr)._++,D(this,Wr)===1&&(ae(this,Ao,ym.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,Ke).onFocus())})),ae(this,Oo,ul.subscribe(async e=>{e&&(await this.resumePausedMutations(),D(this,Ke).onOnline())})))}unmount(){var e,t;Bs(this,Wr)._--,D(this,Wr)===0&&((e=D(this,Ao))==null||e.call(this),ae(this,Ao,void 0),(t=D(this,Oo))==null||t.call(this),ae(this,Oo,void 0))}isFetching(e){return D(this,Ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return D(this,$r).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,Ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=D(this,Ke).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(hf(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return D(this,Ke).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=D(this,Ke).get(r.queryHash),o=i==null?void 0:i.state.data,a=ww(t,o);if(a!==void 0)return D(this,Ke).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Nt.batch(()=>D(this,Ke).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=D(this,Ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=D(this,Ke);Nt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=D(this,Ke);return Nt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Nt.batch(()=>D(this,Ke).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(kn).catch(kn)}invalidateQueries(e,t={}){return Nt.batch(()=>(D(this,Ke).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Nt.batch(()=>D(this,Ke).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(kn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=D(this,Ke).build(this,t);return n.isStaleByTime(hf(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kn).catch(kn)}fetchInfiniteQuery(e){return e.behavior=Gp(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kn).catch(kn)}ensureInfiniteQueryData(e){return e.behavior=Gp(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ul.isOnline()?D(this,$r).resumePausedMutations():Promise.resolve()}getQueryCache(){return D(this,Ke)}getMutationCache(){return D(this,$r)}getDefaultOptions(){return D(this,Br)}setDefaultOptions(e){ae(this,Br,e)}setQueryDefaults(e,t){D(this,Eo).set(as(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...D(this,Eo).values()],n={};return t.forEach(r=>{ss(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){D(this,xo).set(as(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...D(this,xo).values()],n={};return t.forEach(r=>{ss(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...D(this,Br).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=bh(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Lh&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...D(this,Br).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){D(this,Ke).clear(),D(this,$r).clear()}},Ke=new WeakMap,$r=new WeakMap,Br=new WeakMap,Eo=new WeakMap,xo=new WeakMap,Wr=new WeakMap,Ao=new WeakMap,Oo=new WeakMap,t1),Bw=x.createContext(void 0),Ww=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Z.jsx(Bw.Provider,{value:e,children:t}));let zw={data:""},Vw=e=>{if(typeof window=="object"){let t=(e?e.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return t.nonce=window.__nonce__,t.parentNode||(e||document.head).appendChild(t),t.firstChild}return e||zw},Gw=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,qw=/\/\*[^]*?\*\/| +/g,Qp=/\n+/g,Ur=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+a+";":r+=o[1]=="f"?Ur(a,o):o+"{"+Ur(a,o[1]=="k"?"":t)+"}":typeof a=="object"?r+=Ur(a,t?t.replace(/([^,])+/g,u=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,u):u?u+" "+l:l)):o):a!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=Ur.p?Ur.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Yn={},km=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+km(e[n]);return t}return e},Qw=(e,t,n,r,i)=>{let o=km(e),a=Yn[o]||(Yn[o]=(l=>{let s=0,c=11;for(;s>>0;return"go"+c})(o));if(!Yn[a]){let l=o!==e?e:(s=>{let c,d,f=[{}];for(;c=Gw.exec(s.replace(qw,""));)c[4]?f.shift():c[3]?(d=c[3].replace(Qp," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][c[1]]=c[2].replace(Qp," ").trim();return f[0]})(e);Yn[a]=Ur(i?{["@keyframes "+a]:l}:l,n?"":"."+a)}let u=n&&Yn.g?Yn.g:null;return n&&(Yn.g=Yn[a]),((l,s,c,d)=>{d?s.data=s.data.replace(d,l):s.data.indexOf(l)===-1&&(s.data=c?l+s.data:s.data+l)})(Yn[a],t,r,u),a},Kw=(e,t,n)=>e.reduce((r,i,o)=>{let a=t[o];if(a&&a.call){let u=a(n),l=u&&u.props&&u.props.className||/^go/.test(u)&&u;a=l?"."+l:u&&typeof u=="object"?u.props?"":Ur(u,""):u===!1?"":u}return r+i+(a??"")},"");function zl(e){let t=this||{},n=e.call?e(t.p):e;return Qw(n.unshift?n.raw?Kw(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Vw(t.target),t.g,t.o,t.k)}let Rm,vf,mf;zl.bind({g:1});let mr=zl.bind({k:1});function Zw(e,t,n,r){Ur.p=t,Rm=e,vf=n,mf=r}function di(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let u=Object.assign({},o),l=u.className||i.className;n.p=Object.assign({theme:vf&&vf()},u),n.o=/ *go\d+/.test(l),u.className=zl.apply(n,r)+(l?" "+l:"");let s=e;return e[0]&&(s=u.as||e,delete u.as),mf&&s[0]&&mf(u),Rm(s,u)}return i}}var Xw=e=>typeof e=="function",ll=(e,t)=>Xw(e)?e(t):e,Jw=(()=>{let e=0;return()=>(++e).toString()})(),Cm=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Yw=20,Dh="default",Tm=(e,t)=>{let{toastLimit:n}=e.settings;switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,n)};case 1:return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:r}=t;return Tm(e,{type:e.toasts.find(a=>a.id===r.id)?1:0,toast:r});case 3:let{toastId:i}=t;return{...e,toasts:e.toasts.map(a=>a.id===i||i===void 0?{...a,dismissed:!0,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+o}))}}},Du=[],Im={toasts:[],pausedAt:void 0,settings:{toastLimit:Yw}},Vn={},Pm=(e,t=Dh)=>{Vn[t]=Tm(Vn[t]||Im,e),Du.forEach(([n,r])=>{n===t&&r(Vn[t])})},Em=e=>Object.keys(Vn).forEach(t=>Pm(e,t)),e_=e=>Object.keys(Vn).find(t=>Vn[t].toasts.some(n=>n.id===e)),Vl=(e=Dh)=>t=>{Pm(t,e)},t_={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},n_=(e={},t=Dh)=>{let[n,r]=x.useState(Vn[t]||Im),i=x.useRef(Vn[t]);x.useEffect(()=>(i.current!==Vn[t]&&r(Vn[t]),Du.push([t,r]),()=>{let a=Du.findIndex(([u])=>u===t);a>-1&&Du.splice(a,1)}),[t]);let o=n.toasts.map(a=>{var u,l,s;return{...e,...e[a.type],...a,removeDelay:a.removeDelay||((u=e[a.type])==null?void 0:u.removeDelay)||(e==null?void 0:e.removeDelay),duration:a.duration||((l=e[a.type])==null?void 0:l.duration)||(e==null?void 0:e.duration)||t_[a.type],style:{...e.style,...(s=e[a.type])==null?void 0:s.style,...a.style}}});return{...n,toasts:o}},r_=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||Jw()}),_s=e=>(t,n)=>{let r=r_(t,e,n);return Vl(r.toasterId||e_(r.id))({type:2,toast:r}),r.id},ct=(e,t)=>_s("blank")(e,t);ct.error=_s("error");ct.success=_s("success");ct.loading=_s("loading");ct.custom=_s("custom");ct.dismiss=(e,t)=>{let n={type:3,toastId:e};t?Vl(t)(n):Em(n)};ct.dismissAll=e=>ct.dismiss(void 0,e);ct.remove=(e,t)=>{let n={type:4,toastId:e};t?Vl(t)(n):Em(n)};ct.removeAll=e=>ct.remove(void 0,e);ct.promise=(e,t,n)=>{let r=ct.loading(t.loading,{...n,...n==null?void 0:n.loading});return typeof e=="function"&&(e=e()),e.then(i=>{let o=t.success?ll(t.success,i):void 0;return o?ct.success(o,{id:r,...n,...n==null?void 0:n.success}):ct.dismiss(r),i}).catch(i=>{let o=t.error?ll(t.error,i):void 0;o?ct.error(o,{id:r,...n,...n==null?void 0:n.error}):ct.dismiss(r)}),e};var i_=1e3,o_=(e,t="default")=>{let{toasts:n,pausedAt:r}=n_(e,t),i=x.useRef(new Map).current,o=x.useCallback((d,f=i_)=>{if(i.has(d))return;let h=setTimeout(()=>{i.delete(d),a({type:4,toastId:d})},f);i.set(d,h)},[]);x.useEffect(()=>{if(r)return;let d=Date.now(),f=n.map(h=>{if(h.duration===1/0)return;let m=(h.duration||0)+h.pauseDuration-(d-h.createdAt);if(m<0){h.visible&&ct.dismiss(h.id);return}return setTimeout(()=>ct.dismiss(h.id,t),m)});return()=>{f.forEach(h=>h&&clearTimeout(h))}},[n,r,t]);let a=x.useCallback(Vl(t),[t]),u=x.useCallback(()=>{a({type:5,time:Date.now()})},[a]),l=x.useCallback((d,f)=>{a({type:1,toast:{id:d,height:f}})},[a]),s=x.useCallback(()=>{r&&a({type:6,time:Date.now()})},[r,a]),c=x.useCallback((d,f)=>{let{reverseOrder:h=!1,gutter:m=8,defaultPosition:y}=f||{},S=n.filter(p=>(p.position||y)===(d.position||y)&&p.height),g=S.findIndex(p=>p.id===d.id),v=S.filter((p,w)=>wp.visible).slice(...h?[v+1]:[0,v]).reduce((p,w)=>p+(w.height||0)+m,0)},[n]);return x.useEffect(()=>{n.forEach(d=>{if(d.dismissed)o(d.id,d.removeDelay);else{let f=i.get(d.id);f&&(clearTimeout(f),i.delete(d.id))}})},[n,o]),{toasts:n,handlers:{updateHeight:l,startPause:u,endPause:s,calculateOffset:c}}},a_=mr` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,s_=mr` -from { - transform: scale(0); - opacity: 0; -} -to { - transform: scale(1); - opacity: 1; -}`,u_=mr` -from { - transform: scale(0) rotate(90deg); - opacity: 0; -} -to { - transform: scale(1) rotate(90deg); - opacity: 1; -}`,l_=di("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#ff4b4b"}; - position: relative; - transform: rotate(45deg); - - animation: ${a_} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - - &:after, - &:before { - content: ''; - animation: ${s_} 0.15s ease-out forwards; - animation-delay: 150ms; - position: absolute; - border-radius: 3px; - opacity: 0; - background: ${e=>e.secondary||"#fff"}; - bottom: 9px; - left: 4px; - height: 2px; - width: 12px; - } - - &:before { - animation: ${u_} 0.15s ease-out forwards; - animation-delay: 180ms; - transform: rotate(90deg); - } -`,c_=mr` - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -`,d_=di("div")` - width: 12px; - height: 12px; - box-sizing: border-box; - border: 2px solid; - border-radius: 100%; - border-color: ${e=>e.secondary||"#e0e0e0"}; - border-right-color: ${e=>e.primary||"#616161"}; - animation: ${c_} 1s linear infinite; -`,f_=mr` -from { - transform: scale(0) rotate(45deg); - opacity: 0; -} -to { - transform: scale(1) rotate(45deg); - opacity: 1; -}`,h_=mr` -0% { - height: 0; - width: 0; - opacity: 0; -} -40% { - height: 0; - width: 6px; - opacity: 1; -} -100% { - opacity: 1; - height: 10px; -}`,p_=di("div")` - width: 20px; - opacity: 0; - height: 20px; - border-radius: 10px; - background: ${e=>e.primary||"#61d345"}; - position: relative; - transform: rotate(45deg); - - animation: ${f_} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; - animation-delay: 100ms; - &:after { - content: ''; - box-sizing: border-box; - animation: ${h_} 0.2s ease-out forwards; - opacity: 0; - animation-delay: 200ms; - position: absolute; - border-right: 2px solid; - border-bottom: 2px solid; - border-color: ${e=>e.secondary||"#fff"}; - bottom: 6px; - left: 6px; - height: 10px; - width: 6px; - } -`,g_=di("div")` - position: absolute; -`,v_=di("div")` - position: relative; - display: flex; - justify-content: center; - align-items: center; - min-width: 20px; - min-height: 20px; -`,m_=mr` -from { - transform: scale(0.6); - opacity: 0.4; -} -to { - transform: scale(1); - opacity: 1; -}`,y_=di("div")` - position: relative; - transform: scale(0.6); - opacity: 0.4; - min-width: 20px; - animation: ${m_} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) - forwards; -`,w_=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return t!==void 0?typeof t=="string"?x.createElement(y_,null,t):t:n==="blank"?null:x.createElement(v_,null,x.createElement(d_,{...r}),n!=="loading"&&x.createElement(g_,null,n==="error"?x.createElement(l_,{...r}):x.createElement(p_,{...r})))},__=e=>` -0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;} -100% {transform: translate3d(0,0,0) scale(1); opacity:1;} -`,S_=e=>` -0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;} -100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;} -`,k_="0%{opacity:0;} 100%{opacity:1;}",R_="0%{opacity:1;} 100%{opacity:0;}",C_=di("div")` - display: flex; - align-items: center; - background: #fff; - color: #363636; - line-height: 1.3; - will-change: transform; - box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); - max-width: 350px; - pointer-events: auto; - padding: 8px 10px; - border-radius: 8px; -`,T_=di("div")` - display: flex; - justify-content: center; - margin: 4px 10px; - color: inherit; - flex: 1 1 auto; - white-space: pre-line; -`,I_=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=Cm()?[k_,R_]:[__(n),S_(n)];return{animation:t?`${mr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${mr(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},P_=x.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?I_(e.position||t||"top-center",e.visible):{opacity:0},o=x.createElement(w_,{toast:e}),a=x.createElement(T_,{...e.ariaProps},ll(e.message,e));return x.createElement(C_,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:o,message:a}):x.createElement(x.Fragment,null,o,a))});Zw(x.createElement);var E_=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let o=x.useCallback(a=>{if(a){let u=()=>{let l=a.getBoundingClientRect().height;r(e,l)};u(),new MutationObserver(u).observe(a,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return x.createElement("div",{ref:o,className:t,style:n},i)},x_=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Cm()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},A_=zl` - z-index: 9999; - > * { - pointer-events: auto; - } -`,su=16,O_=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,toasterId:o,containerStyle:a,containerClassName:u})=>{let{toasts:l,handlers:s}=o_(n,o);return x.createElement("div",{"data-rht-toaster":o||"",style:{position:"fixed",zIndex:9999,top:su,left:su,right:su,bottom:su,pointerEvents:"none",...a},className:u,onMouseEnter:s.startPause,onMouseLeave:s.endPause},l.map(c=>{let d=c.position||t,f=s.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),h=x_(d,f);return x.createElement(E_,{id:c.id,key:c.id,onHeightUpdate:s.updateHeight,className:c.visible?A_:"",style:h},c.type==="custom"?ll(c.message,c):i?i(c):x.createElement(P_,{toast:c,position:d}))}))},HT=ct,Fh={},pn={},Ct={},Gl={},xm={},Ss={},b_=C&&C.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Ss,"__esModule",{value:!0});Ss.STGeneralError=void 0;var L_=function(e){b_(t,e);function t(n){var r=e.call(this,n)||this;return r.isSuperTokensGeneralError=!0,r}return t.isThisError=function(n){return n.isSuperTokensGeneralError===!0},t}(Error);Ss.STGeneralError=L_;(function(e){function t(r){for(var i in r)e.hasOwnProperty(i)||(e[i]=r[i])}e.__esModule=!0;let n=Ss;n.default!==void 0?t(n):t({default:n,...n})})(xm);Object.defineProperty(Gl,"__esModule",{value:!0});var D_=xm;Gl.default=D_.STGeneralError;var Mh={},Uh={},Am={},Gi={},ql={},gn={},Ql={},Wn=C&&C.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(c){try{s(r.next(c))}catch(d){a(d)}}function l(c){try{s(r.throw(c))}catch(d){a(d)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((r=r.apply(e,t||[])).next())})},zn=C&&C.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]"u")throw Error("If you are using this package with server-side rendering, please make sure that you are checking if the window object is defined.");return window}var F_={key:function(e){return Wn(this,void 0,void 0,function(){return zn(this,function(t){return[2,Ce().localStorage.key(e)]})})},clear:function(){return Wn(this,void 0,void 0,function(){return zn(this,function(e){return[2,Ce().localStorage.clear()]})})},getItem:function(e){return Wn(this,void 0,void 0,function(){return zn(this,function(t){return[2,Ce().localStorage.getItem(e)]})})},removeItem:function(e){return Wn(this,void 0,void 0,function(){return zn(this,function(t){return[2,Ce().localStorage.removeItem(e)]})})},setItem:function(e,t){return Wn(this,void 0,void 0,function(){return zn(this,function(n){return[2,Ce().localStorage.setItem(e,t)]})})},keySync:function(e){return Ce().localStorage.key(e)},clearSync:function(){return Ce().localStorage.clear()},getItemSync:function(e){return Ce().localStorage.getItem(e)},removeItemSync:function(e){return Ce().localStorage.removeItem(e)},setItemSync:function(e,t){return Ce().localStorage.setItem(e,t)}},M_={key:function(e){return Wn(this,void 0,void 0,function(){return zn(this,function(t){return[2,Ce().sessionStorage.key(e)]})})},clear:function(){return Wn(this,void 0,void 0,function(){return zn(this,function(e){return[2,Ce().sessionStorage.clear()]})})},getItem:function(e){return Wn(this,void 0,void 0,function(){return zn(this,function(t){return[2,Ce().sessionStorage.getItem(e)]})})},removeItem:function(e){return Wn(this,void 0,void 0,function(){return zn(this,function(t){return[2,Ce().sessionStorage.removeItem(e)]})})},setItem:function(e,t){return Wn(this,void 0,void 0,function(){return zn(this,function(n){return[2,Ce().sessionStorage.setItem(e,t)]})})},keySync:function(e){return Ce().sessionStorage.key(e)},clearSync:function(){return Ce().sessionStorage.clear()},getItemSync:function(e){return Ce().sessionStorage.getItem(e)},removeItemSync:function(e){return Ce().sessionStorage.removeItem(e)},setItemSync:function(e,t){return Ce().sessionStorage.setItem(e,t)}};Ql.defaultWindowHandlerImplementation={history:{replaceState:function(e,t,n){return Ce().history.replaceState(e,t,n)},getState:function(){return Ce().history.state}},location:{getHref:function(){return Ce().location.href},setHref:function(e){Ce().location.href=e},getSearch:function(){return Ce().location.search},getHash:function(){return Ce().location.hash},getPathName:function(){return Ce().location.pathname},assign:function(e){Ce().location.assign(e)},getHostName:function(){return Ce().location.hostname},getHost:function(){return Ce().location.host},getOrigin:function(){return Ce().location.origin}},getDocument:function(){return Ce().document},getWindowUnsafe:function(){return Ce().window},localStorage:F_,sessionStorage:M_};Object.defineProperty(gn,"__esModule",{value:!0});gn.WindowHandlerReference=void 0;var U_=Ql,Om=function(){function e(t){var n=function(r){return r};t!==void 0&&(n=t),this.windowHandler=n(U_.defaultWindowHandlerImplementation)}return e.init=function(t){e.instance===void 0&&(e.instance=new e(t))},e.getReferenceOrThrow=function(){if(e.instance===void 0)throw new Error("SuperTokensWindowHandler must be initialized before calling this method.");return e.instance},e}();gn.WindowHandlerReference=Om;gn.default=Om;var Kp=C&&C.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(c){try{s(r.next(c))}catch(d){a(d)}}function l(c){try{s(r.throw(c))}catch(d){a(d)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((r=r.apply(e,t||[])).next())})},Zp=C&&C.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]0&&q[q.length-1])&&(le[0]===6||le[0]===2)){B=0;continue}if(le[0]===3&&(!q||le[1]>q[0]&&le[1]0&&!me.startsWith("/")?"/"+me:me}catch{return}}function ee(){var A;return(A=Q(p))!==null&&A!==void 0?A:void 0}function he(A,H,B,W){var G=A.appInfo.websiteBasePath.appendPath(new d.default(H)).getAsStringDangerous(),q=new URLSearchParams;return B.tenantIdFromQueryParams!==void 0&&q.set(p,B.tenantIdFromQueryParams),W!==void 0&&Object.entries(W).forEach(function(me){var Oe=me[0],st=me[1];st!==void 0&&q.set(Oe,st)}),q.toString()!==""?"".concat(G,"?").concat(q.toString()):G}function Tt(){try{return t.TEST_MODE==="testing"||t.REACT_APP_TEST_MODE==="testing"}catch{return!1}}function E(A){if(A===void 0)throw new Error("Please provide the appInfo object when calling supertokens.init");if(A.apiDomain===void 0)throw new Error("Please provide your apiDomain inside the appInfo object when calling supertokens.init");if(A.appName===void 0)throw new Error("Please provide your appName inside the appInfo object when calling supertokens.init");if(A.websiteDomain===void 0)throw new Error("Please provide your websiteDomain inside the appInfo object when calling supertokens.init");var H=new d.default("");return A.apiGatewayPath!==void 0&&(H=new d.default(A.apiGatewayPath)),{appName:A.appName,apiDomain:new c.default(A.apiDomain),websiteDomain:new c.default(A.websiteDomain),apiBasePath:H.appendPath(M(w,A.apiBasePath)),websiteBasePath:M(R,A.websiteBasePath)}}function M(A,H){return H!==void 0?new d.default(H):new d.default(A)}function b(A,H){return y(this,void 0,void 0,function(){var B,W,G;return S(this,function(q){switch(q.label){case 0:if(B=[],H.length!==A.length)throw Error("Are you sending too many / too few formFields?");W=function(me){var Oe,st,le,nt;return S(this,function(Dn){switch(Dn.label){case 0:return Oe=H[me],st=A.find(function(na){return na.id===Oe.id}),le=st.value,st.id==="email"&&(le=le.trim()),[4,Oe.validate(le)];case 1:return nt=Dn.sent(),nt!==void 0&&B.push({error:nt,id:Oe.id}),[2]}})},G=0,q.label=1;case 1:return G0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]0&&c[c.length-1])&&(m[0]===6||m[0]===2)){u=0;continue}if(m[0]===3&&(!c||m[1]>c[0]&&m[1]=0;l--)if(a.history[l]==u)return a.history[l]},this.reset=function(){a.history=[]},this.waitForEvent=function(u,l){return l===void 0&&(l=7e3),n(a,void 0,void 0,function(){var s,c=this;return r(this,function(d){return s=Date.now(),[2,new Promise(function(f){var h=c;function m(){var y=h.getEventByLastEventByName(u);y===void 0?Date.now()-s>l?f(void 0):setTimeout(m,1e3):f(y)}m()})]})})}}return o.getInstance=function(){return o.instance==null&&(o.instance=new o),o.instance},o}();e.ProcessState=i})(Yl);var ai={};Object.defineProperty(ai,"__esModule",{value:!0});ai.supported_fdi=ai.package_version=void 0;ai.package_version="20.1.6";ai.supported_fdi=["1.16","1.17","1.18","1.19","2.0","3.0","3.1","4.0","4.1"];var Qi={},$h={},Bh={};Object.defineProperty(Bh,"__esModule",{value:!0});var Z_=function(){function e(){var t=this;this.locked=new Map,this.addToLocked=function(n,r){var i=t.locked.get(n);i===void 0?r===void 0?t.locked.set(n,[]):t.locked.set(n,[r]):r!==void 0&&(i.unshift(r),t.locked.set(n,i))},this.isLocked=function(n){return t.locked.has(n)},this.lock=function(n){return new Promise(function(r,i){t.isLocked(n)?t.addToLocked(n,r):(t.addToLocked(n),r())})},this.unlock=function(n){var r=t.locked.get(n);if(r===void 0||r.length===0){t.locked.delete(n);return}var i=r.pop();t.locked.set(n,r),i!==void 0&&setTimeout(i,0)}}return e.getInstance=function(){return e.instance===void 0&&(e.instance=new e),e.instance},e}();function X_(){return Z_.getInstance()}Bh.default=X_;var Pn=C&&C.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(s){try{l(r.next(s))}catch(c){o(c)}}function u(s){try{l(r.throw(s))}catch(c){o(c)}}function l(s){s.done?i(s.value):new n(function(c){c(s.value)}).then(a,u)}l((r=r.apply(e,t||[])).next())})},En=C&&C.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]0?setTimeout(r,c):r(null)}}window.addEventListener("storage",l),e.addToWaiting(l);var s=setTimeout(l,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),e.waiters!==void 0&&e.waiters.push(t)},e.removeFromWaiting=function(t){e.waiters!==void 0&&(e.waiters=e.waiters.filter(function(n){return n!==t}))},e.notifyWaiters=function(){if(e.waiters!==void 0){var t=e.waiters.slice();t.forEach(function(n){return n()})}},e.prototype.releaseLock=function(t){return Pn(this,void 0,void 0,function(){return En(this,function(n){switch(n.label){case 0:return[4,this.releaseLock__private__(t)];case 1:return[2,n.sent()]}})})},e.prototype.releaseLock__private__=function(t){return Pn(this,void 0,void 0,function(){var n,r,i,o;return En(this,function(a){switch(a.label){case 0:return n=this.storageHandler===void 0?uu:this.storageHandler,r=Qc+"-"+t,i=n.getItemSync(r),i===null?[2]:(o=JSON.parse(i),o.id!==this.id?[3,2]:[4,no.default().lock(o.iat)]);case 1:a.sent(),this.acquiredIatSet.delete(o.iat),n.removeItemSync(r),no.default().unlock(o.iat),e.notifyWaiters(),a.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var n=Date.now()-5e3,r=t,i=[],o=0;;){var a=r.keySync(o);if(a===null)break;i.push(a),o++}for(var u=!1,l=0;l=this.thresholdInSeconds*1e3?t:0;var n=eg.default.getReferenceOrThrow().windowHandler.localStorage;n.setItemSync(e.CLOCK_SKEW_KEY,String(t))},e.prototype.getClientClockSkewInMillis=function(){return this.clockSkewInMillis},e.prototype.now=function(){return Date.now()+this.getClientClockSkewInMillis()},e.CLOCK_SKEW_KEY="__st_clockSkewInMillis",e}();ec.DateProvider=s5;Object.defineProperty(Qn,"__esModule",{value:!0});Qn.DateProviderReference=void 0;var tg=ec,Bm=function(){function e(t){t!==void 0?this.dateProvider=t():(tg.DateProvider.init(),this.dateProvider=tg.DateProvider.getReferenceOrThrow())}return e.init=function(t){e.instance===void 0&&(e.instance=new e(t))},e.getReferenceOrThrow=function(){if(e.instance===void 0)throw new Error("SuperTokensDateProvider must be initialized before calling this method.");return e.instance},e}();Qn.DateProviderReference=Bm;Qn.default=Bm;(function(e){var t=C&&C.__assign||function(){return t=Object.assign||function(E){for(var M,b=1,z=arguments.length;b0&&te[te.length-1])&&(ue[0]===6||ue[0]===2)){b=0;continue}if(ue[0]===3&&(!te||ue[1]>te[0]&&ue[1]=E.config.maxRetryAttemptsForSessionRefresh)throw(0,s.logDebugMessage)("doRequest: Maximum session refresh attempts reached. sessionRefreshAttempts: ".concat(Le,", maxRetryAttemptsForSessionRefresh: ").concat(E.config.maxRetryAttemptsForSessionRefresh)),ta="Received a 401 response from ".concat(K,". Attempted to refresh the session and retry the request with the updated session tokens ").concat(E.config.maxRetryAttemptsForSessionRefresh," times, but each attempt resulted in a 401 error. The maximum session refresh limit has been reached. Please investigate your API. To increase the session refresh attempts, update maxRetryAttemptsForSessionRefresh in the config."),console.error(ta),new Error(ta);return[4,p(ne)];case 13:if(_r=_t.sent(),Le++,(0,s.logDebugMessage)("doRequest: sessionRefreshAttempts: "+Le),_r.result!=="RETRY"){if((0,s.logDebugMessage)("doRequest: Not retrying original request"),_r.error!==void 0)if(_r.error instanceof Response)Ue=_r.error;else throw _r.error;else Ue=rn;return[3,18]}return(0,s.logDebugMessage)("doRequest: Retrying original request"),[3,17];case 14:return rn.status!==E.config.invalidClaimStatusCode?[3,16]:[4,R(rn)];case 15:_t.sent(),_t.label=16;case 16:return[2,rn];case 17:return[3,6];case 18:return[2,Ue]}})})},E.attemptRefreshingSession=function(){return n(void 0,void 0,void 0,function(){var b,z;return r(M,function(K){switch(K.label){case 0:if(!E.initCalled)throw Error("init function not called");return[4,_(!1)];case 1:return b=K.sent(),[4,p(b)];case 2:if(z=K.sent(),z.result==="API_ERROR")throw z.error;return[2,z.result==="RETRY"]}})})},E}();e.default=h;var m="st-last-access-token-update",y="st-refresh-token",S="st-access-token",g="sAntiCsrf",v="sFrontToken";function p(E){return n(this,void 0,void 0,function(){var M,b,z,K,te,pe,Ae,Qe,ue,Le,Ue,ne,Pe,Ne,wt;return r(this,function(Fe){switch(Fe.label){case 0:return[4,l.default.getReferenceOrThrow().lockFactory()];case 1:M=Fe.sent(),Fe.label=2;case 2:return(0,s.logDebugMessage)("onUnauthorisedResponse: trying to acquire lock"),[4,M.acquireLock("REFRESH_TOKEN_USE",1e3)];case 3:if(!Fe.sent())return[3,21];(0,s.logDebugMessage)("onUnauthorisedResponse: lock acquired"),Fe.label=4;case 4:return Fe.trys.push([4,17,19,21]),[4,_(!1)];case 5:return b=Fe.sent(),b.status==="NOT_EXISTS"?((0,s.logDebugMessage)("onUnauthorisedResponse: Not refreshing because local session state is NOT_EXISTS"),h.config.onHandleEvent({action:"UNAUTHORISED",sessionExpiredOrRevoked:!1,userContext:{}}),[2,{result:"SESSION_EXPIRED"}]):(z=b.status==="EXISTS",K=E.status==="EXISTS",te=b.status!==E.status,pe="lastAccessTokenUpdate"in b&&"lastAccessTokenUpdate"in E&&b.lastAccessTokenUpdate!==E.lastAccessTokenUpdate,te&&z?((0,s.logDebugMessage)("onUnauthorisedResponse: Retrying early because session status has changed and postLockLSS.status is EXISTS"),[2,{result:"RETRY"}]):z&&K&&pe?((0,s.logDebugMessage)("onUnauthorisedResponse: Retrying early because pre and post lastAccessTokenUpdate don't match"),[2,{result:"RETRY"}]):(Ae=new Headers,E.status!=="EXISTS"?[3,7]:[4,d.getToken(E.lastAccessTokenUpdate)]));case 6:Qe=Fe.sent(),Qe!==void 0&&((0,s.logDebugMessage)("onUnauthorisedResponse: Adding anti-csrf token to refresh API call"),Ae.set("anti-csrf",Qe)),Fe.label=7;case 7:return(0,s.logDebugMessage)("onUnauthorisedResponse: Adding rid and fdi-versions to refresh call header"),Ae.set("rid",h.rid),Ae.set("fdi-version",o.supported_fdi.join(",")),ue=h.config.tokenTransferMethod,(0,s.logDebugMessage)("onUnauthorisedResponse: Adding st-auth-mode header: "+ue),Ae.set("st-auth-mode",ue),[4,Y(Ae,!0)];case 8:return Fe.sent(),(0,s.logDebugMessage)("onUnauthorisedResponse: Calling refresh pre API hook"),[4,h.config.preAPIHook({action:"REFRESH_SESSION",requestInit:{method:"post",credentials:"include",headers:Ae},url:h.refreshTokenUrl,userContext:{}})];case 9:return Le=Fe.sent(),(0,s.logDebugMessage)("onUnauthorisedResponse: Making refresh call"),[4,h.env.__supertokensOriginalFetch(Le.url,Le.requestInit)];case 10:return Ue=Fe.sent(),(0,s.logDebugMessage)("onUnauthorisedResponse: Refresh call ended"),[4,Re(Ue)];case 11:return Fe.sent(),(0,s.logDebugMessage)("onUnauthorisedResponse: Refresh status code is: "+Ue.status),ne=Ue.status===h.config.sessionExpiredStatusCode,Ue.headers.get("front-token")!==null?[3,14]:ne?[4,f.setItem("remove")]:[3,13];case 12:return Fe.sent(),[3,14];case 13:if(Ue.status===200)throw Pe="The 'front-token' header is missing from a successful refresh-session response. The most likely causes are proxy settings (e.g.: 'front-token' missing from 'access-control-expose-headers' or a proxy stripping this header). Please investigate your API.",console.error(Pe),new Error(Pe);Fe.label=14;case 14:if(he(E.status==="EXISTS",Ue.status,ne&&Ue.headers.get("front-token")===null?"remove":Ue.headers.get("front-token")),Ue.status>=300)throw Ue;return[4,h.config.postAPIHook({action:"REFRESH_SESSION",fetchResponse:Ue.clone(),requestInit:Le.requestInit,url:Le.url,userContext:{}})];case 15:return Fe.sent(),[4,_(!1)];case 16:return Fe.sent().status==="NOT_EXISTS"?((0,s.logDebugMessage)("onUnauthorisedResponse: local session doesn't exist, so returning session expired"),[2,{result:"SESSION_EXPIRED"}]):(h.config.onHandleEvent({action:"REFRESH_SESSION",userContext:{}}),(0,s.logDebugMessage)("onUnauthorisedResponse: Sending RETRY signal"),[2,{result:"RETRY"}]);case 17:return Ne=Fe.sent(),[4,_(!1)];case 18:return Fe.sent().status==="NOT_EXISTS"?((0,s.logDebugMessage)("onUnauthorisedResponse: local session doesn't exist, so returning session expired"),[2,{result:"SESSION_EXPIRED",error:Ne}]):((0,s.logDebugMessage)("onUnauthorisedResponse: sending API_ERROR"),[2,{result:"API_ERROR",error:Ne}]);case 19:return[4,M.releaseLock("REFRESH_TOKEN_USE")];case 20:return Fe.sent(),(0,s.logDebugMessage)("onUnauthorisedResponse: Released lock"),[7];case 21:return[4,_(!1)];case 22:return wt=Fe.sent(),wt.status==="NOT_EXISTS"?((0,s.logDebugMessage)("onUnauthorisedResponse: lock acquired failed and local session doesn't exist, so sending SESSION_EXPIRED"),[2,{result:"SESSION_EXPIRED"}]):wt.status!==E.status||wt.status==="EXISTS"&&E.status==="EXISTS"&&wt.lastAccessTokenUpdate!==E.lastAccessTokenUpdate?((0,s.logDebugMessage)("onUnauthorisedResponse: lock acquired failed and retrying early because pre and post lastAccessTokenUpdate don't match"),[2,{result:"RETRY"}]):[3,2];case 23:return[2]}})})}e.onUnauthorisedResponse=p;function w(){(0,s.logDebugMessage)("onTokenUpdate: firing ACCESS_TOKEN_PAYLOAD_UPDATED event"),h.config.onHandleEvent({action:"ACCESS_TOKEN_PAYLOAD_UPDATED",userContext:{}})}e.onTokenUpdate=w;function R(E){return n(this,void 0,void 0,function(){var M;return r(this,function(b){switch(b.label){case 0:return b.trys.push([0,2,,3]),[4,h.recipeImpl.getInvalidClaimsFromResponse({response:E,userContext:{}})];case 1:return M=b.sent(),M&&h.config.onHandleEvent({action:"API_INVALID_CLAIM",claimValidationErrors:M,userContext:{}}),[3,3];case 2:return b.sent(),[3,3];case 3:return[2]}})})}e.onInvalidClaimResponse=R;function _(E){return n(this,void 0,void 0,function(){var M,b,z,K,te,pe,Ae;return r(this,function(Qe){switch(Qe.label){case 0:return(0,s.logDebugMessage)("getLocalSessionState: called"),[4,F(m)];case 1:return M=Qe.sent(),[4,f.doesTokenExists()];case 2:return b=Qe.sent(),b&&M!==void 0?((0,s.logDebugMessage)("getLocalSessionState: returning EXISTS since both frontToken and lastAccessTokenUpdate exists"),[2,{status:"EXISTS",lastAccessTokenUpdate:M}]):[3,3];case 3:return M?((0,s.logDebugMessage)("getLocalSessionState: returning NOT_EXISTS since frontToken was cleared but lastAccessTokenUpdate exists"),[2,{status:"NOT_EXISTS"}]):[3,4];case 4:return z={status:"MAY_EXIST"},E?((0,s.logDebugMessage)("getLocalSessionState: trying to refresh"),[4,p(z)]):[3,8];case 5:return K=Qe.sent(),K.result!=="RETRY"?((0,s.logDebugMessage)("getLocalSessionState: return NOT_EXISTS in case error from backend"+K.result),[2,{status:"NOT_EXISTS"}]):[4,F(m)];case 6:return te=Qe.sent(),[4,f.doesTokenExists()];case 7:if(pe=Qe.sent(),!pe||te===void 0)throw Ae="Failed to retrieve local session state from cookies after a successful session refresh. This indicates a configuration error or that the browser is preventing cookie writes.",console.error(Ae),new Error(Ae);return(0,s.logDebugMessage)("getLocalSessionState: returning EXISTS since both frontToken and lastAccessTokenUpdate exists post refresh"),[2,{status:"EXISTS",lastAccessTokenUpdate:te}];case 8:return(0,s.logDebugMessage)("getLocalSessionState: returning: "+z.status),[2,z]}})})}e.getLocalSessionState=_;function k(E){switch(E){case"access":return S;case"refresh":return y}}e.getStorageNameForToken=k;function T(E,M){var b=k(E);return M!==""?((0,s.logDebugMessage)("setToken: saved ".concat(E," token into cookies")),L(b,M,Date.now()+31536e5)):((0,s.logDebugMessage)("setToken: cleared ".concat(E," token from cookies")),L(b,M,0))}e.setToken=T;function L(E,M,b){var z="Fri, 31 Dec 9999 23:59:59 GMT";b!==Number.MAX_SAFE_INTEGER&&(z=new Date(b).toUTCString());var K=h.config.sessionTokenFrontendDomain;return K==="localhost"||K===u.default.getReferenceOrThrow().windowHandler.location.getHostName()?a.default.getReferenceOrThrow().cookieHandler.setCookie("".concat(E,"=").concat(M,";expires=").concat(z,";path=/;samesite=").concat(h.config.isInIframe?"none;secure":"lax")):a.default.getReferenceOrThrow().cookieHandler.setCookie("".concat(E,"=").concat(M,";expires=").concat(z,";domain=").concat(K,";path=/;samesite=").concat(h.config.isInIframe?"none;secure":"lax"))}function P(E){return n(this,void 0,void 0,function(){var M;return r(this,function(b){return M=k(E),[2,F(M)]})})}e.getTokenForHeaderAuth=P;function F(E){return n(this,void 0,void 0,function(){var M,b,z,K;return r(this,function(te){switch(te.label){case 0:return b="; ",[4,a.default.getReferenceOrThrow().cookieHandler.getCookie()];case 1:return M=b+te.sent(),z=M.split("; "+E+"="),z.length>=2&&(K=z.pop(),K!==void 0)?[2,K.split(";").shift()]:[2,void 0]}})})}function Y(E,M){return M===void 0&&(M=!1),n(this,void 0,void 0,function(){var b,z;return r(this,function(K){switch(K.label){case 0:return(0,s.logDebugMessage)("setTokenHeaders: adding existing tokens as header"),[4,P("access")];case 1:return b=K.sent(),[4,P("refresh")];case 2:return z=K.sent(),(M||b!==void 0)&&z!==void 0?E.has("Authorization")?(0,s.logDebugMessage)("setAuthorizationHeaderIfRequired: Authorization header defined by the user, not adding"):((0,s.logDebugMessage)("setAuthorizationHeaderIfRequired: added authorization header"),E.set("Authorization","Bearer ".concat(M?z:b))):(0,s.logDebugMessage)("setAuthorizationHeaderIfRequired: token for header based auth not found"),[2]}})})}function Re(E){return n(this,void 0,void 0,function(){var M,b,z,K,te;return r(this,function(pe){switch(pe.label){case 0:return(0,s.logDebugMessage)("saveTokensFromHeaders: Saving updated tokens from the response headers"),M=E.headers.get("st-refresh-token"),M===null?[3,2]:((0,s.logDebugMessage)("saveTokensFromHeaders: saving new refresh token"),[4,T("refresh",M)]);case 1:pe.sent(),pe.label=2;case 2:return b=E.headers.get("st-access-token"),b===null?[3,4]:((0,s.logDebugMessage)("saveTokensFromHeaders: saving new access token"),[4,T("access",b)]);case 3:pe.sent(),pe.label=4;case 4:return z=E.headers.get("front-token"),z===null?[3,6]:((0,s.logDebugMessage)("saveTokensFromHeaders: Setting sFrontToken: "+z),[4,f.setItem(z)]);case 5:pe.sent(),(0,e.updateClockSkewUsingFrontToken)({frontToken:z,responseHeaders:E.headers}),pe.label=6;case 6:return K=E.headers.get("anti-csrf"),K===null?[3,9]:[4,_(!1)];case 7:return te=pe.sent(),te.status!=="EXISTS"?[3,9]:((0,s.logDebugMessage)("saveTokensFromHeaders: Setting anti-csrf token"),[4,d.setItem(te.lastAccessTokenUpdate,K)]);case 8:pe.sent(),pe.label=9;case 9:return[2]}})})}var ze=void 0;function ft(){return n(this,void 0,void 0,function(){var E;return r(this,function(M){switch(M.label){case 0:return(0,s.logDebugMessage)("saveLastAccessTokenUpdate: called"),E=Date.now().toString(),(0,s.logDebugMessage)("saveLastAccessTokenUpdate: setting "+E),[4,L(m,E,Number.MAX_SAFE_INTEGER)];case 1:return M.sent(),ze!==void 0?[3,3]:[4,F(m)];case 2:ze=M.sent()===E,M.label=3;case 3:return ze===!1&&console.warn("Saving to cookies was not successful, this indicates a configuration error or the browser preventing us from writing the cookies."),[4,L("sIRTFrontend","",0)];case 4:return M.sent(),[2]}})})}e.saveLastAccessTokenUpdate=ft;function at(){return n(this,void 0,void 0,function(){function E(){return n(this,void 0,void 0,function(){var b,z,K,te,pe;return r(this,function(Ae){switch(Ae.label){case 0:return z="; ",[4,a.default.getReferenceOrThrow().cookieHandler.getCookie()];case 1:return b=z+Ae.sent(),K=b.split("; "+g+"="),K.length>=2&&(te=K.pop(),te!==void 0)?(pe=te.split(";").shift(),pe===void 0?[2,null]:[2,pe]):[2,null]}})})}var M;return r(this,function(b){switch(b.label){case 0:return(0,s.logDebugMessage)("getAntiCSRFToken: called"),[4,_(!0)];case 1:return b.sent().status!=="EXISTS"?((0,s.logDebugMessage)("getAntiCSRFToken: Returning because local session state != EXISTS"),[2,null]):[4,E()];case 2:return M=b.sent(),(0,s.logDebugMessage)("getAntiCSRFToken: returning: "+M),[2,M]}})})}function tt(E){return n(this,void 0,void 0,function(){return r(this,function(M){switch(M.label){case 0:return(0,s.logDebugMessage)("setAntiCSRF: called: "+E),E===void 0?[3,2]:[4,L(g,E,Number.MAX_SAFE_INTEGER)];case 1:return M.sent(),[3,4];case 2:return[4,L(g,"",0)];case 3:M.sent(),M.label=4;case 4:return[2]}})})}e.setAntiCSRF=tt;function Q(){return n(this,void 0,void 0,function(){var E;return r(this,function(M){switch(M.label){case 0:return(0,s.logDebugMessage)("getFrontTokenFromCookie: called"),[4,F(v)];case 1:return E=M.sent(),[2,E===void 0?null:E]}})})}function j(E){return JSON.parse(decodeURIComponent(escape(atob(E))))}function X(){return n(this,void 0,void 0,function(){var E;return r(this,function(M){switch(M.label){case 0:return(0,s.logDebugMessage)("getFrontToken: called"),[4,_(!0)];case 1:return M.sent().status!=="EXISTS"?((0,s.logDebugMessage)("getFrontToken: Returning because sIRTFrontend != EXISTS"),[2,null]):[4,Q()];case 2:return E=M.sent(),(0,s.logDebugMessage)("getFrontToken: returning: "+E),[2,E]}})})}e.getFrontToken=X;function ee(E){return n(this,void 0,void 0,function(){var M,b,z;return r(this,function(K){switch(K.label){case 0:return(0,s.logDebugMessage)("setFrontToken: called"),[4,Q()];case 1:return M=K.sent(),M!==null&&E!==void 0&&(b=j(M).up,z=j(E).up,JSON.stringify(b)!==JSON.stringify(z)&&w()),E!==void 0?[3,3]:[4,L(v,"",0)];case 2:return K.sent(),[3,5];case 3:return[4,L(v,E,Number.MAX_SAFE_INTEGER)];case 4:K.sent(),K.label=5;case 5:return[2]}})})}e.setFrontToken=ee;function he(E,M,b){if(b==null){(0,s.logDebugMessage)("fireSessionUpdateEventsIfNecessary returning early because the front token was not updated");return}var z=b!=="remove";(0,s.logDebugMessage)("fireSessionUpdateEventsIfNecessary wasLoggedIn: ".concat(E," frontTokenExistsAfter: ").concat(z," status: ").concat(M)),E?z||(M===h.config.sessionExpiredStatusCode?((0,s.logDebugMessage)("onUnauthorisedResponse: firing UNAUTHORISED event"),h.config.onHandleEvent({action:"UNAUTHORISED",sessionExpiredOrRevoked:!0,userContext:{}})):((0,s.logDebugMessage)("onUnauthorisedResponse: firing SIGN_OUT event"),h.config.onHandleEvent({action:"SIGN_OUT",userContext:{}}))):z&&((0,s.logDebugMessage)("onUnauthorisedResponse: firing SESSION_CREATED event"),h.config.onHandleEvent({action:"SESSION_CREATED",userContext:{}}))}e.fireSessionUpdateEventsIfNecessary=he;var Tt=function(E){var M=E.frontToken,b=E.responseHeaders;if((0,s.logDebugMessage)("updateClockSkewUsingFrontToken: frontToken: "+M),M==null||M==="remove"){(0,s.logDebugMessage)("updateClockSkewUsingFrontToken: the access token payload wasn't updated or is being removed, skipping clock skew update");return}var z=j(M),K=h.recipeImpl.calculateClockSkewInMillis({accessTokenPayload:z.up,responseHeaders:b});c.default.getReferenceOrThrow().dateProvider.setClientClockSkewInMillis(K),(0,s.logDebugMessage)("updateClockSkewUsingFrontToken: Client clock synchronized successfully")};e.updateClockSkewUsingFrontToken=Tt})(Vo);var Ki={};Object.defineProperty(Ki,"__esModule",{value:!0});Ki.SessionClaimValidatorStore=void 0;var Wm=function(){function e(){}return e.claimValidatorsAddedByOtherRecipes=[],e.addClaimValidatorFromOtherRecipe=function(t){e.claimValidatorsAddedByOtherRecipes.push(t)},e.getClaimValidatorsAddedByOtherRecipes=function(){return e.claimValidatorsAddedByOtherRecipes},e}();Ki.SessionClaimValidatorStore=Wm;Ki.default=Wm;Object.defineProperty(Jl,"__esModule",{value:!0});Jl.getGlobalClaimValidators=void 0;var u5=bt,l5=Vo,c5=Ki;function d5(e,t){var n=(0,u5.getNormalisedUserContext)(t),r=c5.default.getClaimValidatorsAddedByOtherRecipes(),i=l5.default.recipeImpl.getGlobalClaimValidators({claimValidatorsAddedByOtherRecipes:r,userContext:n}),o=e!==void 0?e(i,n):i;return o}Jl.getGlobalClaimValidators=d5;(function(e){function t(n){for(var r in n)e.hasOwnProperty(r)||(e[r]=n[r])}e.__esModule=!0,t(Jl)})(Mm);var f5={},Gr=C&&C.__assign||function(){return Gr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u"&&(e=e+zm.SSR_ERROR),e}se.checkForSSRErrorAndAppendIfNeeded=k5;function R5(e){return e===void 0?{}:e}se.getNormalisedUserContext=R5;function C5(){return zh.WindowHandlerReference.getReferenceOrThrow().windowHandler.location.getHash().substring(1)}se.getHashFromLocation=C5;function T5(e){var t=e.overrideGlobalClaimValidators,n=e.userContext;return(0,g5.getGlobalClaimValidators)(t,n)}se.getGlobalClaimValidators=T5;function I5(e,t){return"createdNewRecipeUser"in t?t:{createdNewRecipeUser:t.createdNewUser,user:Vm(e,t.user)}}se.normaliseUserResponse=I5;function Vm(e,t){if("loginMethods"in t)return t;var n=t.email!==void 0?[t.email]:[],r=t.phoneNumber!==void 0?[t.phoneNumber]:[],i=t.thirdParty!==void 0?[t.thirdParty]:[],o=t.webauthn!==void 0?t.webauthn:{credentialIds:[]};return{id:t.id,emails:n,phoneNumbers:r,thirdParty:i,webauthn:o,isPrimaryUser:!1,tenantIds:t.tenantIds,timeJoined:t.timeJoined,loginMethods:[{recipeId:e,recipeUserId:t.id,timeJoined:t.timeJoined,tenantIds:t.tenantIds,email:t.email,phoneNumber:t.email}]}}se.normaliseUser=Vm;function P5(e,t,n){for(var r,i=Gr({},t??{}),o=[(r=i.override)===null||r===void 0?void 0:r.functions],a=0,u=n;a0&&(i.override=Gr(Gr({},i.override),{functions:function(c,d){for(var f=0,h=o;f0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]=0;--S){var g=t.layers[S][m];if(g!=null)return g.bind(t.result).apply(void 0,y)}}},c=this,d=0;d0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]"),"g"),String(S))}d=new N5.default(d).getAsStringDangerous(),d.startsWith("/public/")&&(d=d.substring(7));var g=new URLSearchParams(c),v=g.toString();return v.length>0&&(d+="?"+g.toString()),d},this.safelyStringifyBody=function(o){return o?JSON.stringify(o):"{}"},this.get=function(o,a,u,l){return er(i,void 0,void 0,function(){var s,c,d;return tr(this,function(f){switch(f.label){case 0:return s=this.getFullUrl(o),[4,this.fetch(s,ht(ht({method:"GET"},a),{body:void 0}),u,l)];case 1:return c=f.sent(),[4,this.getResponseJsonOrThrowGeneralError(c)];case 2:return d=f.sent(),[2,{jsonBody:d,fetchResponse:c}]}})})},this.post=function(o,a,u,l){return er(i,void 0,void 0,function(){var s,c;return tr(this,function(d){switch(d.label){case 0:return[4,this.fetch(this.getFullUrl(o),ht(ht({method:"POST"},a),{body:this.safelyStringifyBody(a.body)}),u,l)];case 1:return s=d.sent(),[4,this.getResponseJsonOrThrowGeneralError(s)];case 2:return c=d.sent(),[2,{jsonBody:c,fetchResponse:s}]}})})},this.delete=function(o,a,u,l){return er(i,void 0,void 0,function(){var s,c;return tr(this,function(d){switch(d.label){case 0:return[4,this.fetch(this.getFullUrl(o),ht(ht({method:"DELETE"},a),{body:this.safelyStringifyBody(a.body)}),u,l)];case 1:return s=d.sent(),[4,this.getResponseJsonOrThrowGeneralError(s)];case 2:return c=d.sent(),[2,{jsonBody:c,fetchResponse:s}]}})})},this.put=function(o,a,u,l){return er(i,void 0,void 0,function(){var s,c;return tr(this,function(d){switch(d.label){case 0:return[4,this.fetch(this.getFullUrl(o),ht(ht({method:"PUT"},a),{body:this.safelyStringifyBody(a.body)}),u,l)];case 1:return s=d.sent(),[4,this.getResponseJsonOrThrowGeneralError(s)];case 2:return c=d.sent(),[2,{jsonBody:c,fetchResponse:s}]}})})},this.fetch=function(o,a,u,l){return er(i,void 0,void 0,function(){var s,c,d,f,h,m;return tr(this,function(y){switch(y.label){case 0:return a===void 0?s={}:s=a.headers,[4,this.callPreAPIHook({preAPIHook:u,url:o,requestInit:ht(ht({},a),{headers:ht(ht({},s),{"fdi-version":j5.supported_fdi.join(","),"Content-Type":"application/json",rid:this.recipeId})})})];case 1:return c=y.sent(),d=c.requestInit,f=c.url,[4,fetch(f,d)];case 2:if(h=y.sent(),h.status>=300)throw h;return l===void 0?[3,4]:(m=h.clone(),[4,l({requestInit:d,url:o,fetchResponse:m})]);case 3:y.sent(),y.label=4;case 4:return[2,h]}})})},this.callPreAPIHook=function(o){return er(i,void 0,void 0,function(){var a;return tr(this,function(u){switch(u.label){case 0:return o.preAPIHook===void 0?[2,{url:o.url,requestInit:o.requestInit}]:[4,o.preAPIHook({url:o.url,requestInit:o.requestInit})];case 1:return a=u.sent(),[2,a]}})})},this.getFullUrl=function(o){var a=i.appInfo.apiBasePath.getAsStringDangerous(),u=i.getPath(o);return"".concat(i.appInfo.apiDomain.getAsStringDangerous()).concat(a).concat(u)},this.getResponseJsonOrThrowGeneralError=function(o){return er(i,void 0,void 0,function(){var a,u;return tr(this,function(l){switch(l.label){case 0:return[4,o.clone().json()];case 1:if(a=l.sent(),a.status==="GENERAL_ERROR")throw u=a.message===void 0?"No Error Message Provided":a.message,new H5.default(u);return[2,a]}})})}}var t;return t=e,e.preparePreAPIHook=function(n){var r=n.recipePreAPIHook,i=n.action,o=n.options,a=n.userContext;return function(u){return er(void 0,void 0,void 0,function(){var l;return tr(t,function(s){switch(s.label){case 0:return[4,r(ht(ht({},u),{action:i,userContext:a}))];case 1:return l=s.sent(),o===void 0||o.preAPIHook===void 0?[2,l]:[2,o.preAPIHook({url:l.url,requestInit:l.requestInit,userContext:a})]}})})}},e.preparePostAPIHook=function(n){var r=n.recipePostAPIHook,i=n.action,o=n.userContext;return function(a){return er(void 0,void 0,void 0,function(){return tr(t,function(u){switch(u.label){case 0:return[4,r(ht(ht({},a),{userContext:o,action:i}))];case 1:return u.sent(),[2]}})})}},e}();Zi.default=$5;var B5=C&&C.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(c){try{s(r.next(c))}catch(d){a(d)}}function l(c){try{s(r.throw(c))}catch(d){a(d)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((r=r.apply(e,t||[])).next())})},W5=C&&C.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]/loginmethods",pathParams:{tenantId:r||"public"},queryParams:a},{},Zc.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"GET_LOGIN_METHODS",options:i,userContext:o}),Zc.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"GET_LOGIN_METHODS",userContext:o}))];case 1:return u=d.sent(),l=u.jsonBody,s=u.fetchResponse,l.firstFactors===void 0?(c=[],l.emailPassword.enabled&&c.push("emailpassword"),l.thirdParty.enabled&&c.push("thirdparty"),l.passwordless.enabled&&(c.push("otp-email"),c.push("otp-phone"),c.push("link-email"),c.push("link-phone"))):c=l.firstFactors,[2,{status:"OK",thirdParty:{providers:l.thirdParty.providers},firstFactors:c,fetchResponse:s}]}})})}}}Ts.default=qm;Ts.getRecipeImplementation=qm;var Xi={},ic={};Object.defineProperty(ic,"__esModule",{value:!0});var V5=function(){function e(t){this.config=t}return e}();ic.default=V5;var qo={},Vh={},Qm={},Gh={},fr={},oc={},G5=C&&C.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(c){try{s(r.next(c))}catch(d){a(d)}}function l(c){try{s(r.throw(c))}catch(d){a(d)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((r=r.apply(e,t||[])).next())})},q5=C&&C.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]=ie.default.config.maxRetryAttemptsForSessionRefresh}function Qh(e){var t=e.url===void 0?"":e.url,n=e.baseURL;return n!==void 0&&(t.charAt(0)==="/"&&n.charAt(n.length-1)==="/"?t=n+t.substr(1):t.charAt(0)!=="/"&&n.charAt(n.length-1)!=="/"?t=n+"/"+t:t=n+t),t}function Y5(e){return Ji(this,void 0,void 0,function(){var t,n,r,i,o,a;return Yi(this,function(u){switch(u.label){case 0:(0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: started axios interception"),t=Qh(e),n=!1;try{n=typeof t=="string"&&!ie.default.recipeImpl.shouldDoInterceptionBasedOnUrl(t,ie.default.config.apiDomain,ie.default.config.sessionTokenBackendDomain)}catch(l){if(l.message==="Please provide a valid domain name")(0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: Trying shouldDoInterceptionBasedOnUrl with location.origin"),n=!ie.default.recipeImpl.shouldDoInterceptionBasedOnUrl(qh.default.getReferenceOrThrow().windowHandler.location.getOrigin(),ie.default.config.apiDomain,ie.default.config.sessionTokenBackendDomain);else throw l}return(0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: Value of doNotDoInterception: "+n),n?((0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: Returning config unchanged"),[2,e]):((0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: Modifying config"),fl.ProcessState.getInstance().addState(fl.PROCESS_STATE.CALLING_INTERCEPTION_REQUEST),[4,(0,ie.getLocalSessionState)(!0)]);case 1:return r=u.sent(),i=e,r.status!=="EXISTS"?[3,3]:[4,ie.AntiCsrfToken.getToken(r.lastAccessTokenUpdate)];case 2:o=u.sent(),o!==void 0&&((0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: Adding anti-csrf token to request"),i=He(He({},i),{headers:i===void 0?{"anti-csrf":o}:He(He({},i.headers),{"anti-csrf":o})})),u.label=3;case 3:return ie.default.config.autoAddCredentials&&i.withCredentials===void 0&&((0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: Adding credentials include"),i=He(He({},i),{withCredentials:!0})),(0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: Adding rid header: anti-csrf (it may be overriden by the user's provided rid)"),i=He(He({},i),{headers:i===void 0?{rid:"anti-csrf"}:He({rid:"anti-csrf"},i.headers)}),a=ie.default.config.tokenTransferMethod,(0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: Adding st-auth-mode header: "+a),i.headers["st-auth-mode"]=a,[4,Zm(i)];case 4:return i=u.sent(),[4,Km(i)];case 5:return u.sent(),(0,oe.logDebugMessage)("interceptorFunctionRequestFulfilled: returning modified config"),[2,i]}})})}fr.interceptorFunctionRequestFulfilled=Y5;function eS(e){var t=this;return function(n){return Ji(t,void 0,void 0,function(){var r,i,o,a;return Yi(this,function(u){switch(u.label){case 0:if(r=!1,!ie.default.initCalled)throw new Error("init function not called");(0,oe.logDebugMessage)("responseInterceptor: started"),(0,oe.logDebugMessage)("responseInterceptor: already intercepted: "+n.headers["x-supertokens-xhr-intercepted"]),i=Qh(n.config);try{r=typeof i=="string"&&!ie.default.recipeImpl.shouldDoInterceptionBasedOnUrl(i,ie.default.config.apiDomain,ie.default.config.sessionTokenBackendDomain)||!!n.headers["x-supertokens-xhr-intercepted"]}catch(l){if(l.message==="Please provide a valid domain name")(0,oe.logDebugMessage)("responseInterceptor: Trying shouldDoInterceptionBasedOnUrl with location.origin"),r=!ie.default.recipeImpl.shouldDoInterceptionBasedOnUrl(qh.default.getReferenceOrThrow().windowHandler.location.getOrigin(),ie.default.config.apiDomain,ie.default.config.sessionTokenBackendDomain)||!!n.headers["x-supertokens-xhr-intercepted"];else throw l}return(0,oe.logDebugMessage)("responseInterceptor: Value of doNotDoInterception: "+r),r?((0,oe.logDebugMessage)("responseInterceptor: Returning without interception"),[2,n]):((0,oe.logDebugMessage)("responseInterceptor: Interception started"),fl.ProcessState.getInstance().addState(fl.PROCESS_STATE.CALLING_INTERCEPTION_RESPONSE),[4,(0,ie.getLocalSessionState)(!1)]);case 1:return o=u.sent(),[4,Cf(n)];case 2:return u.sent(),(0,ie.fireSessionUpdateEventsIfNecessary)(o.status==="EXISTS",n.status,n.headers["front-token"]),n.status!==ie.default.config.sessionExpiredStatusCode?[3,3]:((0,oe.logDebugMessage)("responseInterceptor: Status code is: "+n.status),a=n.config,[2,Kh.doRequest(function(l){return e(l)},a,i,n,void 0,!0)]);case 3:return n.status!==ie.default.config.invalidClaimStatusCode?[3,5]:[4,(0,ie.onInvalidClaimResponse)(n)];case 4:u.sent(),u.label=5;case 5:return[2,n]}})})}}fr.responseInterceptor=eS;function tS(e){var t=this;return function(n){return Ji(t,void 0,void 0,function(){var r;return Yi(this,function(i){switch(i.label){case 0:if((0,oe.logDebugMessage)("responseErrorInterceptor: called"),(0,oe.logDebugMessage)("responseErrorInterceptor: already intercepted: "+(n.response&&n.response.headers["x-supertokens-xhr-intercepted"])),n.response===void 0||n.response.headers["x-supertokens-xhr-intercepted"])throw n;return n.response!==void 0&&n.response.status===ie.default.config.sessionExpiredStatusCode?((0,oe.logDebugMessage)("responseErrorInterceptor: Status code is: "+n.response.status),r=n.config,[2,Kh.doRequest(function(o){return e(o)},r,Qh(r),void 0,n,!0)]):[3,1];case 1:return n.response!==void 0&&n.response.status===ie.default.config.invalidClaimStatusCode?[4,(0,ie.onInvalidClaimResponse)(n.response)]:[3,3];case 2:i.sent(),i.label=3;case 3:throw n}})})}}fr.responseErrorInterceptor=tS;var Kh=function(){function e(){}var t;return t=e,e.doRequest=function(n,r,i,o,a,u){return u===void 0&&(u=!1),Ji(void 0,void 0,void 0,function(){var l,s,c,d,f,h,m,y,v,S,g,v,p,w,R;return Yi(t,function(_){switch(_.label){case 0:if(!ie.default.initCalled)throw Error("init function not called");(0,oe.logDebugMessage)("doRequest: called"),l=!1;try{l=typeof i=="string"&&!ie.default.recipeImpl.shouldDoInterceptionBasedOnUrl(i,ie.default.config.apiDomain,ie.default.config.sessionTokenBackendDomain)&&u}catch(k){if(k.message==="Please provide a valid domain name")(0,oe.logDebugMessage)("doRequest: Trying shouldDoInterceptionBasedOnUrl with location.origin"),l=!ie.default.recipeImpl.shouldDoInterceptionBasedOnUrl(qh.default.getReferenceOrThrow().windowHandler.location.getOrigin(),ie.default.config.apiDomain,ie.default.config.sessionTokenBackendDomain)&&u;else throw k}if((0,oe.logDebugMessage)("doRequest: Value of doNotDoInterception: "+l),!l)return[3,2];if((0,oe.logDebugMessage)("doRequest: Returning without interception"),a!==void 0)throw a;return o!==void 0?[2,o]:[4,n(r)];case 1:return[2,_.sent()];case 2:return(0,oe.logDebugMessage)("doRequest: Interception started"),[4,Zm(r)];case 3:r=_.sent(),s=void 0,_.label=4;case 4:return[4,(0,ie.getLocalSessionState)(!0)];case 5:return c=_.sent(),d=r,c.status!=="EXISTS"?[3,7]:[4,ie.AntiCsrfToken.getToken(c.lastAccessTokenUpdate)];case 6:f=_.sent(),f!==void 0&&((0,oe.logDebugMessage)("doRequest: Adding anti-csrf token to request"),d=He(He({},d),{headers:d===void 0?{"anti-csrf":f}:He(He({},d.headers),{"anti-csrf":f})})),_.label=7;case 7:return ie.default.config.autoAddCredentials&&d.withCredentials===void 0&&((0,oe.logDebugMessage)("doRequest: Adding credentials include"),d=He(He({},d),{withCredentials:!0})),(0,oe.logDebugMessage)("doRequest: Adding rid header: anti-csrf (May get overriden by user's rid)"),d=He(He({},d),{headers:d===void 0?{rid:"anti-csrf"}:He({rid:"anti-csrf"},d.headers)}),h=ie.default.config.tokenTransferMethod,(0,oe.logDebugMessage)("doRequest: Adding st-auth-mode header: "+h),d.headers["st-auth-mode"]=h,[4,Km(d)];case 8:_.sent(),_.label=9;case 9:if(_.trys.push([9,14,,27]),m=a,y=o,a=void 0,o=void 0,m!==void 0)throw(0,oe.logDebugMessage)("doRequest: Not making call because localPrevError is not undefined"),m;return y!==void 0?(0,oe.logDebugMessage)("doRequest: Not making call because localPrevResponse is not undefined"):(0,oe.logDebugMessage)("doRequest: Making user's http call"),y!==void 0?[3,11]:[4,n(d)];case 10:return S=_.sent(),[3,12];case 11:S=y,_.label=12;case 12:return v=S,(0,oe.logDebugMessage)("doRequest: User's http call ended"),[4,Cf(v)];case 13:return _.sent(),(0,ie.fireSessionUpdateEventsIfNecessary)(c.status==="EXISTS",v.status,v.headers["front-token"]),[2,v];case 14:return g=_.sent(),v=g.response,v===void 0?[3,25]:[4,Cf(v)];case 15:if(_.sent(),(0,ie.fireSessionUpdateEventsIfNecessary)(c.status==="EXISTS",v.status,v.headers["front-token"]),v.status!==ie.default.config.sessionExpiredStatusCode)return[3,21];if((0,oe.logDebugMessage)("doRequest: Status code is: "+v.status),J5(r))throw(0,oe.logDebugMessage)("doRequest: Maximum session refresh attempts reached. sessionRefreshAttempts: ".concat(r.__supertokensSessionRefreshAttempts,", maxRetryAttemptsForSessionRefresh: ").concat(ie.default.config.maxRetryAttemptsForSessionRefresh)),p="Received a 401 response from ".concat(i,". Attempted to refresh the session and retry the request with the updated session tokens ").concat(ie.default.config.maxRetryAttemptsForSessionRefresh," times, but each attempt resulted in a 401 error. The maximum session refresh limit has been reached. Please investigate your API. To increase the session refresh attempts, update maxRetryAttemptsForSessionRefresh in the config."),console.error(p),new Error(p);return[4,(0,ie.onUnauthorisedResponse)(c)];case 16:return w=_.sent(),X5(r),(0,oe.logDebugMessage)("doRequest: sessionRefreshAttempts: "+r.__supertokensSessionRefreshAttempts),w.result==="RETRY"?[3,20]:((0,oe.logDebugMessage)("doRequest: Not retrying original request"),w.error===void 0?[3,18]:[4,(0,Z5.createAxiosErrorFromFetchResp)(w.error)]);case 17:return R=_.sent(),[3,19];case 18:R=g,_.label=19;case 19:return s=R,[3,28];case 20:return(0,oe.logDebugMessage)("doRequest: Retrying original request"),[3,24];case 21:return v.status!==ie.default.config.invalidClaimStatusCode?[3,23]:[4,(0,ie.onInvalidClaimResponse)(v)];case 22:_.sent(),_.label=23;case 23:throw g;case 24:return[3,26];case 25:throw g;case 26:return[3,27];case 27:return[3,4];case 28:throw s}})})},e}();fr.default=Kh;function Km(e){return Ji(this,void 0,void 0,function(){var t,n;return Yi(this,function(r){switch(r.label){case 0:return e.headers===void 0&&(e.headers={}),(0,oe.logDebugMessage)("setAuthorizationHeaderIfRequired: adding existing tokens as header"),[4,(0,ie.getTokenForHeaderAuth)("access")];case 1:return t=r.sent(),[4,(0,ie.getTokenForHeaderAuth)("refresh")];case 2:return n=r.sent(),t!==void 0&&n!==void 0?e.headers.Authorization!==void 0||e.headers.authorization!==void 0?(0,oe.logDebugMessage)("setAuthorizationHeaderIfRequired: Authorization header defined by the user, not adding"):((0,oe.logDebugMessage)("setAuthorizationHeaderIfRequired: added authorization header"),e.headers=He(He({},e.headers),{Authorization:"Bearer ".concat(t)}),e.__supertokensAddedAuthHeader=!0):(0,oe.logDebugMessage)("setAuthorizationHeaderIfRequired: token for header based auth not found"),[2]}})})}function Cf(e){return Ji(this,void 0,void 0,function(){var t,n,r,i,o,a;return Yi(this,function(u){switch(u.label){case 0:return(0,oe.logDebugMessage)("saveTokensFromHeaders: Saving updated tokens from the response"),t=e.headers["st-refresh-token"],t===void 0?[3,2]:((0,oe.logDebugMessage)("saveTokensFromHeaders: saving new refresh token"),[4,(0,ie.setToken)("refresh",t)]);case 1:u.sent(),u.label=2;case 2:return n=e.headers["st-access-token"],n===void 0?[3,4]:((0,oe.logDebugMessage)("saveTokensFromHeaders: saving new access token"),[4,(0,ie.setToken)("access",n)]);case 3:u.sent(),u.label=4;case 4:return r=e.headers["front-token"],r===void 0?[3,6]:((0,oe.logDebugMessage)("doRequest: Setting sFrontToken: "+r),[4,ie.FrontToken.setItem(r)]);case 5:u.sent(),i=new Headers,Object.entries(e.headers).forEach(function(l){var s=l[0],c=l[1];Array.isArray(c)?c.forEach(function(d){return i.append(s,d)}):i.append(s,c)}),(0,ie.updateClockSkewUsingFrontToken)({frontToken:r,responseHeaders:i}),u.label=6;case 6:return o=e.headers["anti-csrf"],o===void 0?[3,9]:[4,(0,ie.getLocalSessionState)(!1)];case 7:return a=u.sent(),a.status!=="EXISTS"?[3,9]:((0,oe.logDebugMessage)("doRequest: Setting anti-csrf token"),[4,ie.AntiCsrfToken.setItem(a.lastAccessTokenUpdate,o)]);case 8:u.sent(),u.label=9;case 9:return[2]}})})}function Zm(e){return Ji(this,void 0,void 0,function(){var t,n,r,i;return Yi(this,function(o){switch(o.label){case 0:return[4,(0,ie.getTokenForHeaderAuth)("access")];case 1:return t=o.sent(),[4,(0,ie.getTokenForHeaderAuth)("refresh")];case 2:return n=o.sent(),r=e.headers.Authorization||e.headers.authorization,t!==void 0&&n!==void 0&&(r==="Bearer ".concat(t)||"__supertokensAddedAuthHeader"in e)?((0,oe.logDebugMessage)("removeAuthHeaderIfMatchesLocalToken: Removing Authorization from user provided headers because it contains our access token"),i=He(He({},e),{headers:He({},e.headers)}),delete i.headers.authorization,delete i.headers.Authorization,[2,i]):[2,e]}})})}var ac={},Ti=C&&C.__awaiter||function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function u(c){try{s(r.next(c))}catch(d){a(d)}}function l(c){try{s(r.throw(c))}catch(d){a(d)}}function s(c){c.done?o(c.value):i(c.value).then(u,l)}s((r=r.apply(e,t||[])).next())})},Ii=C&&C.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(s){return function(c){return l([s,c])}}function l(s){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=s[0]&2?i.return:s[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,s[1])).done)return o;switch(i=0,o&&(s=[s[0]&2,o.value]),s[0]){case 0:case 1:o=s;break;case 4:return n.label++,{value:s[1],done:!1};case 5:n.label++,i=s[1],s=[0];continue;case 7:s=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]=xe.default.config.maxRetryAttemptsForSessionRefresh)throw(0,ge.logDebugMessage)("XHRInterceptor.handleRetryPostRefreshing: Maximum session refresh attempts reached. sessionRefreshAttempts: ".concat(y,", maxRetryAttemptsForSessionRefresh: ").concat(xe.default.config.maxRetryAttemptsForSessionRefresh)),a.status=0,a.statusText="",a.responseType="",_="Received a 401 response from ".concat(d,". Attempted to refresh the session and retry the request with the updated session tokens ").concat(xe.default.config.maxRetryAttemptsForSessionRefresh," times, but each attempt resulted in a 401 error. The maximum session refresh limit has been reached. Please investigate your API. To increase the session refresh attempts, update maxRetryAttemptsForSessionRefresh in the config."),console.error(_),new Error(_);return[4,(0,xe.onUnauthorisedResponse)(h)];case 1:if(k=L.sent(),y++,(0,ge.logDebugMessage)("XHRInterceptor.handleRetryPostRefreshing: sessionRefreshAttempts: "+y),k.result!=="RETRY"){if((0,ge.logDebugMessage)("XHRInterceptor.handleRetryPostRefreshing: Not retrying original request "+!!k.error),k.error!==void 0)throw k.error;return[2,!0]}return(0,ge.logDebugMessage)("XHRInterceptor.handleRetryPostRefreshing: Retrying original request"),T=new t,w(r,T,!0),i.forEach(function(P){P(T)}),R(T,m),[2,!1]}})})}function v(_){return Ti(this,void 0,void 0,function(){var k,T,L,P,F;return Ii(this,function(Y){switch(Y.label){case 0:if(f)return(0,ge.logDebugMessage)("XHRInterceptor.handleResponse: Returning without interception"),[2,!0];Y.label=1;case 1:return Y.trys.push([1,7,,11]),(0,ge.logDebugMessage)("XHRInterceptor.handleResponse: Interception started"),lu.ProcessState.getInstance().addState(lu.PROCESS_STATE.CALLING_INTERCEPTION_RESPONSE),k=_.status,T=uS(_),[4,sS(T)];case 2:return Y.sent(),(0,xe.fireSessionUpdateEventsIfNecessary)(h.status==="EXISTS",k,T.get("front-token")),k!==xe.default.config.sessionExpiredStatusCode?[3,4]:((0,ge.logDebugMessage)("responseInterceptor: Status code is: "+k),[4,g()]);case 3:return[2,Y.sent()];case 4:return k!==xe.default.config.invalidClaimStatusCode?[3,6]:[4,(0,xe.onInvalidClaimResponse)({data:_.responseText})];case 5:Y.sent(),Y.label=6;case 6:return[2,!0];case 7:return L=Y.sent(),(0,ge.logDebugMessage)("XHRInterceptor.handleResponse: caught error"),L.status===void 0?[3,9]:[4,oS(L)];case 8:if(P=Y.sent(),a.status=P.status,a.statusText=P.statusText,a.responseType=P.responseType,u=P.headers,P.responseType==="json")try{a.response=JSON.parse(P.responseText)}catch{a.response=P.responseText}else a.response=P.responseText;return a.responseText=P.responseText,[3,10];case 9:F=new ProgressEvent("error"),F.error=L,r.onerror!==void 0&&r.onerror!==null&&r.onerror(F),S("error",F),Y.label=10;case 10:return[2,!0];case 11:return[2]}})})}r.open=function(_,k){(0,ge.logDebugMessage)("XHRInterceptor.open called");var T=arguments;d=k;try{f=typeof d=="string"&&!xe.default.recipeImpl.shouldDoInterceptionBasedOnUrl(d,xe.default.config.apiDomain,xe.default.config.sessionTokenBackendDomain)||typeof d!="string"&&!xe.default.recipeImpl.shouldDoInterceptionBasedOnUrl(d.toString(),xe.default.config.apiDomain,xe.default.config.sessionTokenBackendDomain)}catch(L){if(L.message==="Please provide a valid domain name")(0,ge.logDebugMessage)("XHRInterceptor.open: Trying shouldDoInterceptionBasedOnUrl with location.origin"),f=!xe.default.recipeImpl.shouldDoInterceptionBasedOnUrl(nS.default.getReferenceOrThrow().windowHandler.location.getOrigin(),xe.default.config.apiDomain,xe.default.config.sessionTokenBackendDomain);else throw L}c(function(){i.push(function(L){L.open.apply(L,T)}),n.open.apply(n,T)})},r.send=function(_){m=_,R(n,m)},r.setRequestHeader=function(_,k){var T=this;if((0,ge.logDebugMessage)("XHRInterceptor.setRequestHeader: Called with ".concat(_)),f){c(function(){return n.setRequestHeader(_,k)});return}_!=="anti-csrf"&&c(function(){return Ti(T,void 0,void 0,function(){var L,P;return Ii(this,function(F){switch(F.label){case 0:return _.toLowerCase()!=="authorization"?[3,3]:((0,ge.logDebugMessage)("XHRInterceptor.setRequestHeader: checking if user provided auth header matches local token"),[4,(0,xe.getTokenForHeaderAuth)("access")]);case 1:return L=F.sent(),[4,(0,xe.getTokenForHeaderAuth)("refresh")];case 2:if(P=F.sent(),L!==void 0&&P!==void 0&&k==="Bearer ".concat(L))return(0,ge.logDebugMessage)("XHRInterceptor.setRequestHeader: skipping Authorization from user provided headers because it contains our access token"),[2];F.label=3;case 3:return i.push(function(Y){Y.setRequestHeader(_,k)}),o.push({name:_,value:k}),n.setRequestHeader(_,k),[2]}})})})};var p=void 0;w(r,n,!1);function w(_,k,T){var L,P=["load","loadend","readystatechange"];(0,ge.logDebugMessage)("XHRInterceptor.setUpXHR called");for(var F=function(j){(0,ge.logDebugMessage)("XHRInterceptor added listener for event ".concat(j)),k.addEventListener(j,function(X){(0,ge.logDebugMessage)("XHRInterceptor got event ".concat(j)),P.includes(j)||S(j,X)})},Y=0,Re=rS;Y0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]=300)throw r;return[4,e.postAPIHook({action:"SIGN_OUT",requestInit:n.requestInit,url:n.url,fetchResponse:r.clone(),userContext:t.userContext})];case 4:return a.sent(),[4,r.clone().json()];case 5:if(i=a.sent(),i.status==="GENERAL_ERROR")throw(0,be.logDebugMessage)("doRequest: Throwing general error"),o=i.message===void 0?"No Error Message Provided":i.message,new cS.STGeneralError(o);return[2]}})})},getInvalidClaimsFromResponse:function(t){return kr(this,void 0,void 0,function(){var n;return Rr(this,function(r){switch(r.label){case 0:return"body"in t.response?[4,t.response.clone().json()]:[3,2];case 1:return n=r.sent(),[3,3];case 2:typeof t.response.data=="string"?n=JSON.parse(t.response.data):n=t.response.data,r.label=3;case 3:return[2,n.claimValidationErrors]}})})},getGlobalClaimValidators:function(t){return t.claimValidatorsAddedByOtherRecipes},validateClaims:function(t){return kr(this,void 0,void 0,function(){var n,r,i,o,a,u,f,l,s,c,d,f,h;return Rr(this,function(m){switch(m.label){case 0:r=0,m.label=1;case 1:return++r ".concat(l.getThresholdInSeconds()));return i.getValueFromPayload(s,c)===void 0||a!==void 0&&s[i.id].ta?{isValid:!1,reason:{message:"expired",ageInSeconds:f,maxAgeInSeconds:a}}:d!==o?{isValid:!1,reason:{message:"wrong value",expectedValue:o,actualValue:d}}:{isValid:!0}}}}},this.id=r.id,this.refresh=r.refresh,this.defaultMaxAgeInSeconds=r.defaultMaxAgeInSeconds}return n.prototype.getValueFromPayload=function(r,i){return r[this.id]!==void 0?r[this.id].v:void 0},n.prototype.getLastFetchedTime=function(r,i){return r[this.id]!==void 0?r[this.id].t:void 0},n}();return fa.PrimitiveClaim=t,fa}var ha={},sg;function pS(){if(sg)return ha;sg=1;var e=C&&C.__awaiter||function(i,o,a,u){function l(s){return s instanceof a?s:new a(function(c){c(s)})}return new(a||(a=Promise))(function(s,c){function d(m){try{h(u.next(m))}catch(y){c(y)}}function f(m){try{h(u.throw(m))}catch(y){c(y)}}function h(m){m.done?s(m.value):l(m.value).then(d,f)}h((u=u.apply(i,o||[])).next())})},t=C&&C.__generator||function(i,o){var a={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},u,l,s,c;return c={next:d(0),throw:d(1),return:d(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function d(h){return function(m){return f([h,m])}}function f(h){if(u)throw new TypeError("Generator is already executing.");for(;a;)try{if(u=1,l&&(s=h[0]&2?l.return:h[0]?l.throw||((s=l.return)&&s.call(l),0):l.next)&&!(s=s.call(l,h[1])).done)return s;switch(l=0,s&&(h=[h[0]&2,s.value]),h[0]){case 0:case 1:s=h;break;case 4:return a.label++,{value:h[1],done:!1};case 5:a.label++,l=h[1],h=[0];continue;case 7:h=a.ops.pop(),a.trys.pop();continue;default:if(s=a.trys,!(s=s.length>0&&s[s.length-1])&&(h[0]===6||h[0]===2)){a=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1] ".concat(c.getThresholdInSeconds()));return a.getValueFromPayload(d,f)===void 0||l!==void 0&&d[a.id].tl?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:m,maxAgeInSeconds:l}}]:h.includes(u)?[2,{isValid:!0}]:[2,{isValid:!1,reason:{message:"wrong value",expectedToInclude:u,actualValue:h}}])})})}}},excludes:function(u,l,s){l===void 0&&(l=a.defaultMaxAgeInSeconds);var c=n.default.getReferenceOrThrow().dateProvider;return{id:s!==void 0?s:a.id,refresh:function(d){return a.refresh(d)},shouldRefresh:function(d,f){if(l!==void 0&&l ".concat(c.getThresholdInSeconds()));return a.getValueFromPayload(d,f)===void 0||l!==void 0&&d[a.id].tl?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:m,maxAgeInSeconds:l}}]:h.includes(u)?[2,{isValid:!1,reason:{message:"wrong value",expectedToNotInclude:u,actualValue:h}}]:[2,{isValid:!0}])})})}}},includesAll:function(u,l,s){l===void 0&&(l=a.defaultMaxAgeInSeconds);var c=n.default.getReferenceOrThrow().dateProvider;return{id:s!==void 0?s:a.id,refresh:function(d){return a.refresh(d)},shouldRefresh:function(d,f){if(l!==void 0&&l ".concat(c.getThresholdInSeconds()));return a.getValueFromPayload(d,f)===void 0||l!==void 0&&d[a.id].tl?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:m,maxAgeInSeconds:l}}]:(y=new Set(h),S=u.every(function(v){return y.has(v)}),[2,S?{isValid:S}:{isValid:S,reason:{message:"wrong value",expectedToInclude:u,actualValue:h}}]))})})}}},includesAny:function(u,l,s){l===void 0&&(l=a.defaultMaxAgeInSeconds);var c=n.default.getReferenceOrThrow().dateProvider;return{id:s!==void 0?s:a.id,refresh:function(d){return a.refresh(d)},shouldRefresh:function(d,f){if(l!==void 0&&l ".concat(c.getThresholdInSeconds()));return a.getValueFromPayload(d,f)===void 0||l!==void 0&&d[a.id].tl?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:m,maxAgeInSeconds:l}}]:(y=new Set(h),S=u.some(function(v){return y.has(v)}),[2,S?{isValid:S}:{isValid:S,reason:{message:"wrong value",expectedToIncludeAtLeastOneOf:u,actualValue:h}}]))})})}}},excludesAll:function(u,l,s){l===void 0&&(l=a.defaultMaxAgeInSeconds);var c=n.default.getReferenceOrThrow().dateProvider;return{id:s!==void 0?s:a.id,refresh:function(d){return a.refresh(d)},shouldRefresh:function(d,f){if(l!==void 0&&l ".concat(c.getThresholdInSeconds()));return a.getValueFromPayload(d,f)===void 0||l!==void 0&&d[a.id].tl?[2,{isValid:!1,reason:{message:"expired",ageInSeconds:m,maxAgeInSeconds:l}}]:(y=new Set(h),S=u.every(function(v){return!y.has(v)}),[2,S?{isValid:S}:{isValid:S,reason:{message:"wrong value",expectedToNotInclude:u,actualValue:h}}]))})})}}}},this.id=o.id,this.refresh=o.refresh,this.defaultMaxAgeInSeconds=o.defaultMaxAgeInSeconds}return i.prototype.getValueFromPayload=function(o,a){return o[this.id]!==void 0?o[this.id].v:void 0},i.prototype.getLastFetchedTime=function(o,a){return o[this.id]!==void 0?o[this.id].t:void 0},i}();return ha.PrimitiveArrayClaim=r,ha}var pa={},ug;function gS(){if(ug)return pa;ug=1;var e=C&&C.__extends||function(){var i=function(o,a){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,l){u.__proto__=l}||function(u,l){for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&(u[s]=l[s])},i(o,a)};return function(o,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");i(o,a);function u(){this.constructor=o}o.prototype=a===null?Object.create(a):(u.prototype=a.prototype,new u)}}(),t=C&&C.__assign||function(){return t=Object.assign||function(i){for(var o,a=1,u=arguments.length;a0&&_[_.length-1])&&(P[0]===6||P[0]===2)){p=0;continue}if(P[0]===3&&(!_||P[1]>_[0]&&P[1]<_[3])){p.label=P[1];break}if(P[0]===6&&p.label<_[1]){p.label=_[1],_=P;break}if(_&&p.label<_[2]){p.label=_[2],p.ops.push(P);break}_[2]&&p.ops.pop(),p.trys.pop();continue}P=v.call(g,p)}catch(F){P=[6,F],R=0}finally{w=_=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}};Object.defineProperty(e,"__esModule",{value:!0}),e.BooleanClaim=e.PrimitiveArrayClaim=e.PrimitiveClaim=e.getInvalidClaimsFromResponse=e.getClaimValue=e.validateClaims=e.signOut=e.addAxiosInterceptors=e.doesSessionExist=e.attemptRefreshingSession=e.getAccessToken=e.getAccessTokenPayloadSecurely=e.getUserId=e.init=void 0;var r=Vo,i=Gh,o=Kn,a=bt,u=Gi,l=gn,s=Qi,c=Ki,d=dn,f=Qn,h=function(){function g(){}g.init=function(p){u.default.init(p.cookieHandler),l.default.init(p.windowHandler),f.default.init(p.dateProvider),s.default.init(p.lockFactory,l.default.getReferenceOrThrow().windowHandler.localStorage);var w=(0,a.validateAndNormaliseInputOrThrowError)(p);p.enableDebugLogs!==void 0&&p.enableDebugLogs&&(0,d.enableLogging)();var R=new o.default((0,i.default)({onHandleEvent:w.onHandleEvent,preAPIHook:w.preAPIHook,postAPIHook:w.postAPIHook,sessionExpiredStatusCode:w.sessionExpiredStatusCode})).override(w.override.functions).build();r.default.init(w,R),g.axiosInterceptorQueue.forEach(function(_){_()}),g.axiosInterceptorQueue=[]},g.getUserId=function(p){return r.default.recipeImpl.getUserId({userContext:(0,a.getNormalisedUserContext)(p===void 0?void 0:p.userContext)})},g.getAccessTokenPayloadSecurely=function(p){return t(this,void 0,void 0,function(){return n(this,function(w){return[2,r.default.recipeImpl.getAccessTokenPayloadSecurely({userContext:(0,a.getNormalisedUserContext)(p===void 0?void 0:p.userContext)})]})})};var v;return v=g,g.axiosInterceptorQueue=[],g.attemptRefreshingSession=function(){return t(void 0,void 0,void 0,function(){return n(v,function(p){return[2,r.default.attemptRefreshingSession()]})})},g.doesSessionExist=function(p){return r.default.recipeImpl.doesSessionExist({userContext:(0,a.getNormalisedUserContext)(p===void 0?void 0:p.userContext)})},g.addAxiosInterceptors=function(p,w){r.default.initCalled?r.default.recipeImpl.addAxiosInterceptors({axiosInstance:p,userContext:(0,a.getNormalisedUserContext)(w)}):g.axiosInterceptorQueue.push(function(){r.default.recipeImpl.addAxiosInterceptors({axiosInstance:p,userContext:(0,a.getNormalisedUserContext)(w)})})},g.signOut=function(p){return r.default.recipeImpl.signOut({userContext:(0,a.getNormalisedUserContext)(p===void 0?void 0:p.userContext)})},g.getInvalidClaimsFromResponse=function(p){return t(this,void 0,void 0,function(){return n(this,function(w){return[2,r.default.recipeImpl.getInvalidClaimsFromResponse({response:p.response,userContext:(0,a.getNormalisedUserContext)(p.userContext)})]})})},g.getClaimValue=function(p){return t(this,void 0,void 0,function(){var w,R;return n(this,function(_){switch(_.label){case 0:return w=(0,a.getNormalisedUserContext)(p===void 0?void 0:p.userContext),[4,g.getAccessTokenPayloadSecurely({userContext:w})];case 1:return R=_.sent(),[2,p.claim.getValueFromPayload(R,w)]}})})},g.validateClaims=function(p,w){var R=(0,a.getNormalisedUserContext)(w),_=c.SessionClaimValidatorStore.getClaimValidatorsAddedByOtherRecipes(),k=r.default.recipeImpl.getGlobalClaimValidators({claimValidatorsAddedByOtherRecipes:_,userContext:R}),T=p!==void 0?p(k,R):k;return T.length===0?[]:r.default.recipeImpl.validateClaims({claimValidators:T,userContext:(0,a.getNormalisedUserContext)(w)})},g.getAccessToken=function(p){return t(void 0,void 0,void 0,function(){return n(v,function(w){switch(w.label){case 0:return[4,r.default.recipeImpl.doesSessionExist({userContext:(0,a.getNormalisedUserContext)(p===void 0?void 0:p.userContext)})];case 1:return w.sent()?[2,(0,r.getTokenForHeaderAuth)("access")]:[2,void 0]}})})},g}();e.default=h,e.init=h.init,e.getUserId=h.getUserId,e.getAccessTokenPayloadSecurely=h.getAccessTokenPayloadSecurely,e.getAccessToken=h.getAccessToken,e.attemptRefreshingSession=h.attemptRefreshingSession,e.doesSessionExist=h.doesSessionExist,e.addAxiosInterceptors=h.addAxiosInterceptors,e.signOut=h.signOut,e.validateClaims=h.validateClaims,e.getClaimValue=h.getClaimValue,e.getInvalidClaimsFromResponse=h.getInvalidClaimsFromResponse;var m=Xm();Object.defineProperty(e,"PrimitiveClaim",{enumerable:!0,get:function(){return m.PrimitiveClaim}});var y=pS();Object.defineProperty(e,"PrimitiveArrayClaim",{enumerable:!0,get:function(){return y.PrimitiveArrayClaim}});var S=gS();Object.defineProperty(e,"BooleanClaim",{enumerable:!0,get:function(){return S.BooleanClaim}})})(Qm);(function(e){function t(n){for(var r in n)e.hasOwnProperty(r)||(e[r]=n[r])}e.__esModule=!0,t(Qm)})(Vh);var sc={};Object.defineProperty(sc,"__esModule",{value:!0});sc.EMAILVERIFICATION_CLAIM_ID=void 0;sc.EMAILVERIFICATION_CLAIM_ID="st-ev";var vS=C&&C.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),on=C&&C.__assign||function(){return on=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]=~^]+)\s*(.+)$/);if(r){var i=r[1],o=r[2],a=ed(o),u=dg(n,a);switch(i){case">=":return u>=0;case">":return u>0;case"<=":return u<=0;case"<":return u<0;case"=":case"==":return u===0;case"~":return n.major===a.major&&n.minor===a.minor&&n.patch>=a.patch;case"^":return a.major===0?n.major===0&&n.minor===a.minor&&n.patch>=a.patch:n.major===a.major&&n.minor>=a.minor;default:return!1}}var l=t.match(/^(\d+)\.(\d+)\.x$/);if(l)return n.major===parseInt(l[1],10)&&n.minor===parseInt(l[2],10);var s=t.match(/^(\d+)\.x$/);if(s)return n.major===parseInt(s[1],10);var c=ed(t);return dg(n,c)===0},OS=function(e,t){for(var n=Array.isArray(t)?t:[t],r=0,i=n;r0)throw new Error("Duplicate plugin IDs: ".concat(c.map(function(g){return g.id}).join(", ")));this.pluginList=i.map(Cr.getPublicPlugin);for(var d=function(g){var v=i[g];if(v.config){var p=v.config((0,Cr.getPublicConfig)(Nn(Nn({},t),{appInfo:f.appInfo})))||{};p.appInfo;var w=bS(p,["appInfo"]);t=Nn(Nn({},t),w)}var R=i[g].init;R&&fg.PostSuperTokensInitCallbacks.addPostInitCallback(function(){R((0,Cr.getPublicConfig)(Nn(Nn({},t),{appInfo:n.appInfo})),n.pluginList,pu.package_version),n.pluginList[g].initialized=!0})},f=this,h=0;h0&&k[k.length-1])&&(F[0]===6||F[0]===2)){w=0;continue}if(F[0]===3&&(!k||F[1]>k[0]&&F[1]0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]"u"&&(n=n+V.SSR_ERROR),Error(n)}return t.instance},t.reset=function(){V.isTest()&&(t.instance=void 0)},t.RECIPE_ID="multitenancy",t}(s2),l2={en:{AUTH_PAGE_HEADER_TITLE_SIGN_IN_AND_UP:"Sign Up / Sign In",AUTH_PAGE_HEADER_TITLE_SIGN_IN:"Sign In",AUTH_PAGE_HEADER_TITLE_SIGN_UP:"Sign Up",AUTH_PAGE_HEADER_TITLE_SIGN_IN_UP_TO_APP:" to continue to ",AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_START:"Not registered yet?",AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_SIGN_UP_LINK:"Sign Up",AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_END:"",AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_START:"Already have an account?",AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_SIGN_IN_LINK:"Sign In",AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_END:"",AUTH_PAGE_FOOTER_START:"By continuing, you agree to our ",AUTH_PAGE_FOOTER_TOS:"Terms of Service",AUTH_PAGE_FOOTER_AND:" and ",AUTH_PAGE_FOOTER_PP:"Privacy Policy",AUTH_PAGE_FOOTER_END:"",DIVIDER_OR:"or",BRANDING_POWERED_BY_START:"Powered by ",BRANDING_POWERED_BY_END:"",SOMETHING_WENT_WRONG_ERROR:"Something went wrong. Please try again.",SOMETHING_WENT_WRONG_ERROR_RELOAD:"Something went wrong. Please try again later or reload the page."}},ZS=function(){function e(){this.handlers=new Map}return e.prototype.emit=function(t,n){for(var r=this.handlers.get(t)||[],i=0,o=r;i=~^]+)\s*(.+)$/);if(r){var i=r[1],o=r[2],a=rd(o),u=vg(n,a);switch(i){case">=":return u>=0;case">":return u>0;case"<=":return u<=0;case"<":return u<0;case"=":case"==":return u===0;case"~":return n.major===a.major&&n.minor===a.minor&&n.patch>=a.patch;case"^":return a.major===0?n.major===0&&n.minor===a.minor&&n.patch>=a.patch:n.major===a.major&&n.minor>=a.minor;default:return!1}}var l=t.match(/^(\d+)\.(\d+)\.x$/);if(l)return n.major===parseInt(l[1],10)&&n.minor===parseInt(l[2],10);var s=t.match(/^(\d+)\.x$/);if(s)return n.major===parseInt(s[1],10);var c=rd(t);return vg(n,c)===0},e6=function(e,t){for(var n=Array.isArray(t)?t:[t],r=0,i=n;r0)throw new Error("Duplicate plugin IDs: ".concat(h.map(function(g){return g.id}).join(", ")));for(var m=0,y=u;m"u"&&(t=t+V.SSR_ERROR),new Error(t)}return e.instance},e.prototype.getRecipeOrThrow=function(t){var n=this.recipeList.find(function(r){return r.config.recipeId===t});if(n===void 0)throw new Error("Missing recipe: ".concat(t));return n},e.prototype.loadTranslation=function(t){this.languageTranslations.translationEventSource.emit("TranslationLoaded",t)},e.prototype.getRedirectUrl=function(t,n){var r;return V.__awaiter(this,void 0,void 0,function(){var i,o,a,u;return V.__generator(this,function(l){switch(l.label){case 0:return this.userGetRedirectionURL?[4,this.userGetRedirectionURL(t,n)]:[3,2];case 1:if(i=l.sent(),i!==void 0)return[2,i];l.label=2;case 2:if(t.action==="TO_AUTH")return o=this.appInfo.websiteBasePath.getAsStringDangerous(),a=V.appendTrailingSlashToURL(o),t.tenantIdFromQueryParams?[2,V.appendQueryParamsToURL(a,(u={},u[V.TENANT_ID_QUERY_PARAM]=t.tenantIdFromQueryParams,u))]:[2,a];if(t.action==="SUCCESS")return[2,(r=t.redirectToPath)!==null&&r!==void 0?r:"/"];throw new Error("Should never come here: unexpected redirection context")}})})},e.reset=function(){V.isTest()&&(e.instance=void 0)},e.usesDynamicLoginMethods=!1,e}();function t6(e,t,n){try{new URL(t)}catch{var r=V.getOriginOfPage().getAsStringDangerous();if(r!==e.websiteDomain.getAsStringDangerous()){t="".concat(e.websiteDomain.getAsStringDangerous()).concat(t),V.redirectWithFullPageReload(t);return}if(n!==void 0){V.redirectWithNavigate(t,n);return}}V.redirectWithFullPageReload(t)}yt.BaseRecipeModule=s2;yt.Multitenancy=If;yt.SuperTokens=gl;yt.defaultTranslationsCommon=l2;yt.getCurrentLanguageFromCookie=d2;yt.getTranslationFunction=JS;yt.normaliseRecipeModuleConfig=u2;var Is={},gu=Ct,n6=Z,Si=x,r6=yt;function i6(e){return e&&e.__esModule?e:{default:e}}var o6=i6(Si),a6=function(){throw new Error("Cannot use translation func outside TranslationContext provider.")},f2=o6.default.createContext({translate:a6}),s6=function(){return Si.useContext(f2).translate},u6=function(e){var t=e.children,n=e.defaultLanguage,r=e.userTranslationFunc,i=e.defaultStore,o=e.translationControlEventSource,a=Si.useState(i),u=a[0],l=a[1],s=Si.useState(void 0),c=s[0],d=s[1];Si.useEffect(function(){function h(){return gu.__awaiter(this,void 0,void 0,function(){var m,y;return gu.__generator(this,function(S){switch(S.label){case 0:return[4,r6.getCurrentLanguageFromCookie()];case 1:return m=S.sent(),y=m===null?n:m,d(function(g){return g!==void 0?g:y}),[2]}})})}h()},[n,d]),Si.useEffect(function(){var h=function(y,S){d(S)},m=function(y,S){l(function(g){return gu.mergeObjects(g,S)})};return o.on("LanguageChange",h),o.on("TranslationLoaded",m),function(){o.off("LanguageChange",h),o.off("TranslationLoaded",m)}});var f=Si.useCallback(function(h){if(r!==void 0)return r(h);if(c!==void 0){var m=u[c]&&u[c][h],y=u[n]&&u[n][h];return m===void 0?y!==void 0?y:h:m}throw new Error("Should never come here")},[u,c,n,r]);return c===void 0?null:n6.jsx(f2.Provider,gu.__assign({value:{translate:f}},{children:t}))};Is.TranslationContextProvider=u6;Is.useTranslation=s6;var Jh={},Qo={},id=Ct,l6=Z,c6=x,d6=yt;function f6(e){return e&&e.__esModule?e:{default:e}}var mg=f6(c6),h6=function(e,t){e===void 0&&(e={});var n=mg.default.createContext(e),r=function(){var o,a=mg.default.useContext(n);return id.__assign(id.__assign({},(o=d6.SuperTokens.getInstance())===null||o===void 0?void 0:o.componentOverrides[t]),a)},i=function(o){var a=o.children,u=o.components;return l6.jsx(n.Provider,id.__assign({value:u},{children:a}))};return[r,i,n.Consumer]};Qo.createGenericComponentsOverrideContext=h6;var p6=Qo,g6=yt,h2=p6.createGenericComponentsOverrideContext(void 0,g6.Multitenancy.RECIPE_ID),v6=h2[0],m6=h2[1];Jh.Provider=m6;Jh.useContext=v6;var cc={},p2={},g2={},Ps={},Bi={},Na=C&&C.__assign||function(){return Na=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]"u"&&(n=n+rt.SSR_ERROR),Error(n)}return t.instance},t.getInstance=function(){return t.instance},t.prototype.getDefaultRedirectionURL=function(n){return rt.__awaiter(this,void 0,void 0,function(){return rt.__generator(this,function(r){if(n.action==="SUCCESS_OAUTH2"||n.action==="CONTINUE_OAUTH2_AFTER_REFRESH"||n.action==="POST_OAUTH2_LOGOUT_REDIRECT")return[2,n.frontendRedirectTo];throw new Error("Should never come here: unknown action in OAuth2Provider.getDefaultRedirectionURL")})})},t.reset=function(){rt.isTest()&&(t.instance=void 0)},t.RECIPE_ID="oauth2provider",t}(V6.RecipeModule);t0.OAuth2Provider=Z6;var ve=Ct,X6=e0,Ha=yt,J6=t0,Y6=As,e8=lc,t8=zo;function n8(e){return e&&e.__esModule?e:{default:e}}var fd=n8(X6);function r8(e){var t,n,r;e===void 0&&(e={});var i=(n=(t=e.accessDeniedScreen)===null||t===void 0?void 0:t.style)!==null&&n!==void 0?n:"",o={style:i},a=ve.__assign({functions:function(u){return u}},e.override);return ve.__assign(ve.__assign({},Ha.normaliseRecipeModuleConfig(e)),{invalidClaimStatusCode:(r=e.invalidClaimStatusCode)!==null&&r!==void 0?r:403,accessDeniedScreen:o,override:a})}var R2=function(e){var t=e.invalidClaims,n=e.overrideGlobalClaimValidators,r=e.userContext;return ve.__awaiter(void 0,void 0,void 0,function(){var i,o,a,u,l,s,c;return ve.__generator(this,function(d){switch(d.label){case 0:i=e8.getGlobalClaimValidators({overrideGlobalClaimValidators:n,userContext:r}),o=void 0,a=function(f){var h,m,y;return ve.__generator(this,function(S){switch(S.label){case 0:return h=t.find(function(g){return g.id===f.id}),h===void 0?[3,2]:(m=f.onFailureRedirection,m?[4,m({reason:h.reason,userContext:r})]:[3,2]);case 1:if(y=S.sent(),y!==void 0)return[2,{value:{redirectPath:y,failedClaim:h}}];S.label=2;case 2:return f.showAccessDeniedOnFailure!==!1&&o===void 0&&(o=h),[2]}})},u=0,l=i,d.label=1;case 1:return u0?o===void 0?[3,4]:(d=JSON.stringify({successRedirectContext:o,redirectToPath:u}),[4,ve.setLocalStorage("supertokens-success-redirection-context",d)]):[3,6];case 3:y.sent(),y.label=4;case 4:return[4,R2({invalidClaims:c,userContext:l})];case 5:if(f=y.sent(),f.redirectPath!==void 0){if(C2(f.redirectPath))throw new Error("onFailureRedirectionURL returned the current URL (".concat(f.redirectPath,") during success redirection. This indicates that the user is in a stuck state."));return[2,Ha.SuperTokens.getInstanceOrThrow().redirectToUrl(f.redirectPath,s)]}y.label=6;case 6:return o!==void 0?[3,13]:[4,ve.getLocalStorage("supertokens-success-redirection-context")];case 7:if(h=y.sent(),h===null)return[3,12];y.label=8;case 8:return y.trys.push([8,,9,11]),m=JSON.parse(h),o=m.successRedirectContext,u===void 0&&(u=m.redirectToPath),[3,11];case 9:return[4,ve.removeFromLocalStorage("supertokens-success-redirection-context")];case 10:return y.sent(),[7];case 11:return[3,13];case 12:o={recipeId:a,action:"SUCCESS",createdNewUser:!1,isNewRecipeUser:!1,newSessionCreated:!1,tenantIdFromQueryParams:ve.getTenantIdFromQueryParams()},y.label=13;case 13:if(o===void 0)throw new Error("This should never happen: successRedirectContext undefined ");return o.action==="SUCCESS_OAUTH2"?[2,J6.OAuth2Provider.getInstanceOrThrow().redirect(o,s,{},l)]:(o.action==="SUCCESS"&&u!==void 0&&(o.redirectToPath=u),[2,Ha.SuperTokens.getInstanceOrThrow().redirect(o,s,{},l)])}})})},i.getDefaultRedirectionURL=function(){return ve.__awaiter(i,void 0,void 0,function(){return ve.__generator(this,function(o){return[2,"/"]})})},i.notifyListeners=function(o){return ve.__awaiter(i,void 0,void 0,function(){var a;return ve.__generator(this,function(u){switch(u.label){case 0:return[4,this.getSessionContext(o)];case 1:return a=u.sent(),Array.from(this.eventListeners).forEach(function(l){return l(ve.__assign({sessionContext:a},o))}),[2]}})})},i}return t.prototype.getSessionContext=function(n){var r=n.action,i=n.userContext;return ve.__awaiter(this,void 0,void 0,function(){var o,a,u;return ve.__generator(this,function(l){switch(l.label){case 0:return r==="SESSION_CREATED"||r==="REFRESH_SESSION"||r==="API_INVALID_CLAIM"||r==="ACCESS_TOKEN_PAYLOAD_UPDATED"?[4,Promise.all([this.getUserId({userContext:i}),this.getAccessTokenPayloadSecurely({userContext:i})])]:[3,2];case 1:return o=l.sent(),a=o[0],u=o[1],[2,{doesSessionExist:!0,accessTokenPayload:u,userId:a}];case 2:if(r==="SIGN_OUT"||r==="UNAUTHORISED")return[2,{doesSessionExist:!1,accessTokenPayload:{},userId:""}];throw new Error("Unhandled recipe event: ".concat(r))}})})},t.addAxiosInterceptors=function(n,r){return fd.default.addAxiosInterceptors(n,r)},t.init=function(n){var r=this,i=r8(n);return{recipeID:t.RECIPE_ID,authReact:function(o){return t.instance=new t(ve.__assign(ve.__assign({},i),{appInfo:o,recipeId:t.RECIPE_ID})),t.instance},webJS:fd.default.init(ve.__assign(ve.__assign({},i),{onHandleEvent:function(o){i.onHandleEvent!==void 0&&i.onHandleEvent(o),t.getInstanceOrThrow().notifyListeners(o)},preAPIHook:function(o){return ve.__awaiter(r,void 0,void 0,function(){var a;return ve.__generator(this,function(u){return a=ve.__assign(ve.__assign({},o),{requestInit:ve.__assign(ve.__assign({},o.requestInit),{headers:ve.__assign(ve.__assign({},o.requestInit.headers),{rid:t.RECIPE_ID})})}),i.preAPIHook===void 0?[2,a]:[2,i.preAPIHook(o)]})})}}))}},t.getInstanceOrThrow=function(){if(t.instance===void 0)throw Error("No instance of Session found. Make sure to call the Session.init method. See https://supertokens.io/docs/emailpassword/quick-setup/frontend");return t.instance},t.getInstance=function(){return t.instance},t.reset=function(){ve.isTest()&&(t.instance=void 0)},t.RECIPE_ID="session",t}(Y6.RecipeModule),o8={EMAILPASSWORD:"emailpassword",OTP_EMAIL:"otp-email",OTP_PHONE:"otp-phone",LINK_EMAIL:"link-email",LINK_PHONE:"link-phone",THIRDPARTY:"thirdparty",TOTP:"totp",WEBAUTHN:"webauthn"};Ln.FactorIds=o8;Ln.Session=i8;Ln.getFailureRedirectionInfo=R2;Ln.validateAndCompareOnFailureRedirectionURLToCurrent=C2;var re=Ct,T2=p2,kg=lc,a8=Zh,s8=y2,I2=zo,Pf=yt,u8=As,l8=Ln;function c8(e){return e&&e.__esModule?e:{default:e}}var Rg=c8(T2),P2="/mfa",Fu="st-mfa-info-cache",ga=void 0,d8=function(e){return function(t){return re.__assign(re.__assign({},t),{resyncSessionAndFetchMFAInfo:function(n){return re.__awaiter(this,void 0,void 0,function(){var r,i,u,o,a,u,l;return re.__generator(this,function(s){switch(s.label){case 0:return r=I2.WindowHandlerReference.getReferenceOrThrow(),[4,ga];case 1:return s.sent(),[4,r.windowHandler.sessionStorage.getItem(Fu)];case 2:if(i=s.sent(),i!==null&&(u=JSON.parse(i),u.t>Date.now()-1e3))return[2,re.__assign(re.__assign({},u.v),{fetchResponse:new Response(null,{status:304})})];s.label=3;case 3:return ga===void 0?[3,5]:[4,ga];case 4:return s.sent(),[3,3];case 5:ga=new Promise(function(c){return o=c}),s.label=6;case 6:return s.trys.push([6,,11,12]),[4,r.windowHandler.sessionStorage.getItem(Fu)];case 7:return a=s.sent(),a!==null&&(u=JSON.parse(a),u.t>Date.now()-1e3)?[2,re.__assign(re.__assign({},u.v),{fetchResponse:new Response(null,{status:304})})]:[4,t.resyncSessionAndFetchMFAInfo(n)];case 8:return l=s.sent(),l.status!=="OK"?[3,10]:[4,r.windowHandler.sessionStorage.setItem(Fu,JSON.stringify({t:Date.now(),v:{emails:l.emails,phoneNumbers:l.phoneNumbers,factors:l.factors,status:l.status}}))];case 9:s.sent(),s.label=10;case 10:return[2,l];case 11:return ga=void 0,o(),[7];case 12:return[2]}})})}})}},f8=function(){function e(t,n,r){var i=this;this.webJSClaim=new T2.MultiFactorAuthClaimClass(function(){return t().webJSRecipe}),this.refresh=this.webJSClaim.refresh,this.getLastFetchedTime=this.webJSClaim.getLastFetchedTime,this.getValueFromPayload=this.webJSClaim.getValueFromPayload,this.id=this.webJSClaim.id;var o=function(a){var u=a.reason,l=a.userContext;return re.__awaiter(i,void 0,void 0,function(){var s,c,f,d,f;return re.__generator(this,function(h){switch(h.label){case 0:return s=t(),c=u.oneOf||u.allOfInAnyOrder||(u.factorId!==void 0?[u.factorId]:void 0),c===void 0?[3,1]:(re.logDebugMessage("Redirecting to MFA on next array from validation failure: "+c.join(", ")),f=s.getSecondaryFactors(l).filter(function(m){return c.factors.next.includes(m.id)}).map(function(m){return m.id}),f.length===1?[2,n({action:"GO_TO_FACTOR",factorId:f[0]},l)]:[2,n({action:"FACTOR_CHOOSER",nextFactorOptions:c},l)]);case 1:return[4,s.webJSRecipe.resyncSessionAndFetchMFAInfo({userContext:l})];case 2:return d=h.sent(),f=s.getSecondaryFactors(l).filter(function(m){return d.factors.next.includes(m.id)}).map(function(m){return m.id}),re.logDebugMessage("Redirecting to MFA on next array from backend: "+f.join(", ")),f.length===1?[2,n({action:"GO_TO_FACTOR",factorId:f[0]},l)]:[2,n({action:"FACTOR_CHOOSER"},l)];case 3:return[2,void 0]}})})};this.validators=re.__assign(re.__assign({},this.webJSClaim.validators),{hasCompletedMFARequirementsForAuth:function(a,u){a===void 0&&(a=!0),u===void 0&&(u=!0);var l=i.webJSClaim.validators.hasCompletedMFARequirementsForAuth();return re.__assign(re.__assign({},l),{showAccessDeniedOnFailure:u,onFailureRedirection:r??function(s){var c=s.reason,d=s.userContext;return a?o({reason:c,userContext:d}):void 0}})},hasCompletedFactors:function(a,u,l){u===void 0&&(u=!0),l===void 0&&(l=!0);var s=i.webJSClaim.validators.hasCompletedFactors(a);return re.__assign(re.__assign({},s),{showAccessDeniedOnFailure:l,onFailureRedirection:r??function(c){var d=c.reason,f=c.userContext;return u?o({reason:d,userContext:f}):void 0}})}})}return e}();function h8(e){var t;e===void 0&&(e={});var n=e.disableDefaultUI===!0,r=re.__assign({functions:function(i){return i}},e.override);return re.__assign(re.__assign({},Pf.normaliseRecipeModuleConfig(e)),{disableDefaultUI:n,firstFactors:e==null?void 0:e.firstFactors,getSecondaryFactorInfo:function(i){return i},factorChooserScreen:(t=e.factorChooserScreen)!==null&&t!==void 0?t:{},override:r})}function p8(e,t,n,r){re.logDebugMessage("getAvailableFactors: allowed to setup: ".concat(e.allowedToSetup)),re.logDebugMessage("getAvailableFactors: already setup: ".concat(e.alreadySetup)),re.logDebugMessage("getAvailableFactors: next from factorInfo: ".concat(e.next)),re.logDebugMessage("getAvailableFactors: nextArrayQueryParam: ".concat(t)),re.logDebugMessage("getAvailableFactors: secondary factors: ".concat(n.getSecondaryFactors(r).map(function(a){return a.id})));var i=t!==void 0?t.split(","):e.next,o=n.getSecondaryFactors(r).filter(function(a){var u=a.id;return i.length===0?e.allowedToSetup.includes(u)||e.alreadySetup.includes(u):i.includes(u)});return o}var g8=function(e){re.__extends(t,e);function t(r,i){i===void 0&&(i=Rg.default);var o=e.call(this,r)||this;return o.webJSRecipe=i,o.recipeID=t.RECIPE_ID,o.secondaryFactors=[],o.getDefaultRedirectionURL=function(a,u){return re.__awaiter(o,void 0,void 0,function(){var l,s;return re.__generator(this,function(c){if(a.action==="FACTOR_CHOOSER")return l=a.nextFactorOptions&&a.nextFactorOptions.length>0?a.nextFactorOptions.join(","):void 0,[2,re.getDefaultRedirectionURLForPath(this.config,P2,a,{n:l,stepUp:a.stepUp?"true":void 0})];if(a.action==="GO_TO_FACTOR"){if(s=this.getSecondaryFactors(u).find(function(d){return d.id===a.factorId}),s!==void 0)return[2,re.getDefaultRedirectionURLForPath(this.config,s.path,a,{setup:a.forceSetup?"true":void 0,stepUp:a.stepUp?"true":void 0})];throw new Error("Requested redirect to unknown factor id: "+a.factorId)}else return[2,"/"]})})},a8.PostSuperTokensInitCallbacks.addPostInitCallback(function(){var a=t.MultiFactorAuthClaim.validators.hasCompletedMFARequirementsForAuth();s8.SessionClaimValidatorStore.addClaimValidatorFromOtherRecipe(a),l8.Session.getInstanceOrThrow().addEventListener(function(){var u=I2.WindowHandlerReference.getReferenceOrThrow();u.windowHandler.sessionStorage.removeItemSync(Fu)})}),o}t.init=function(r){var i=h8(r);return{recipeID:t.RECIPE_ID,authReact:function(o){return t.instance=new t(re.__assign(re.__assign({},i),{appInfo:o,recipeId:t.RECIPE_ID})),t.instance},webJS:Rg.default.init(re.__assign(re.__assign({},i),{override:{functions:function(o,a){var u=d8(i.onHandleEvent);return a.override(u),a.override(i.override.functions),o}}}))}},t.getInstance=function(){return t.instance},t.getInstanceOrThrow=function(){if(t.instance===void 0){var r="No instance of MultiFactorAuth found. Make sure to call the MultiFactorAuth.init method.";throw typeof window>"u"&&(r=r+re.SSR_ERROR),Error(r)}return t.instance},t.prototype.addMFAFactors=function(r){this.secondaryFactors=re.__spreadArray(re.__spreadArray([],this.secondaryFactors.filter(function(i){return r.every(function(o){return i.id!==o.id})}),!0),r,!0)},t.prototype.isFirstFactorEnabledOnClient=function(r){return this.config.firstFactors===void 0||this.config.firstFactors.includes(r)},t.prototype.getSecondaryFactors=function(r){return this.config.getSecondaryFactorInfo(this.secondaryFactors,r)},t.prototype.redirectToFactor=function(r){var i=r.factorId,o=r.forceSetup,a=r.stepUp,u=r.redirectBack,l=r.navigate,s=r.userContext;return re.__awaiter(this,void 0,void 0,function(){var c,d,d;return re.__generator(this,function(f){switch(f.label){case 0:return[4,this.getRedirectUrl({action:"GO_TO_FACTOR",forceSetup:o,stepUp:a,factorId:i,tenantIdFromQueryParams:re.getTenantIdFromQueryParams()},kg.getNormalisedUserContext(s))];case 1:return c=f.sent(),c===null?[2]:(u?(d=re.getCurrentNormalisedUrlPathWithQueryParamsAndFragments(),c=re.appendQueryParamsToURL(c,{redirectToPath:d})):(d=re.getRedirectToPathFromURL(),d&&(c=re.appendQueryParamsToURL(c,{redirectToPath:d}))),[2,Pf.SuperTokens.getInstanceOrThrow().redirectToUrl(c,l)])}})})},t.prototype.redirectToFactorChooser=function(r){var i=r.redirectBack,o=i===void 0?!1:i,a=r.nextFactorOptions,u=a===void 0?[]:a,l=r.stepUp,s=r.navigate,c=r.userContext;return re.__awaiter(this,void 0,void 0,function(){var d,f,f;return re.__generator(this,function(h){switch(h.label){case 0:return[4,this.getRedirectUrl({action:"FACTOR_CHOOSER",nextFactorOptions:u,stepUp:l,tenantIdFromQueryParams:re.getTenantIdFromQueryParams()},kg.getNormalisedUserContext(c))];case 1:return d=h.sent(),d===null?[2]:(o?(f=re.getCurrentNormalisedUrlPathWithQueryParamsAndFragments(),d=re.appendQueryParamsToURL(d,{redirectToPath:f})):(f=re.getRedirectToPathFromURL(),f&&(d=re.appendQueryParamsToURL(d,{redirectToPath:f}))),[2,Pf.SuperTokens.getInstanceOrThrow().redirectToUrl(d,s)])}})})},t.reset=function(){re.isTest()&&(t.instance=void 0)};var n;return n=t,t.RECIPE_ID="multifactorauth",t.MultiFactorAuthClaim=new f8(function(){return t.getInstanceOrThrow()},function(r,i){return re.__awaiter(void 0,void 0,void 0,function(){return re.__generator(n,function(o){switch(o.label){case 0:return[4,this.getInstanceOrThrow().getRedirectUrl(re.__assign(re.__assign({},r),{tenantIdFromQueryParams:re.getTenantIdFromQueryParams()}),i)];case 1:return[2,o.sent()||void 0]}})})}),t}(u8.RecipeModule);cc.DEFAULT_FACTOR_CHOOSER_PATH=P2;cc.MultiFactorAuth=g8;cc.getAvailableFactors=p8;var Ds={},v8=Ct,m8=yt;function y8(e){return m8.normaliseRecipeModuleConfig(e)}function E2(e,t){if(t.length!==0)for(var n=function(o){var a=e[o],u=t.filter(function(c){return!a.factorIds.includes(c)});if(u.length===0)return{value:[a]};var l=e.filter(function(c){return c.factorIds.every(function(d){return u.includes(d)})});if(l.length!==0){var s=E2(l,u);if(s!==void 0)return{value:v8.__spreadArray([a],s,!0)}}},r=0;r div { - cursor: pointer; - margin: 0; -} -[data-supertokens~="footerLinkGroupVert"] [data-supertokens~="secondaryText"] { - font-weight: 400; -} -[data-supertokens~="footerLinkGroupVert"] [data-supertokens~="secondaryLinkWithLeftArrow"] { - font-weight: 400; - position: relative; - left: -6px; /* half the width of the left arrow */ -} -@media (max-width: 360px) { - [data-supertokens~="footerLinkGroupVert"] { - flex-direction: column; - } - [data-supertokens~="footerLinkGroupVert"] > div { - margin: 0 auto; - } -} -[data-supertokens~="footerLinkGroupVert"] div:only-child { - margin-left: auto; - margin-right: auto; - margin-top: 14px; -} -[data-supertokens~="withBackButton"] { - position: relative; - display: flex; - justify-content: space-between; - align-items: center; -} -[data-supertokens~="dividerWithOr"] { - padding-top: 5px; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - color: rgb(var(--palette-textPrimary)); -} -[data-supertokens~="dividerText"] { - flex: 1 1; - font-weight: 400; - font-size: var(--font-size-1); -} -[data-supertokens~="formLabelWithLinkWrapper"] { - display: flex; - justify-content: space-between; - align-items: center; -} -[data-supertokens~="formLabelLinkBtn"] { - width: auto; - margin-top: 0; - line-height: 24px; - font-size: var(--font-size-0); -} -[data-supertokens~="formLabelLinkBtn"]:hover { - text-decoration: underline; -} -[data-supertokens~="formLabelLinkBtn"]:disabled { - color: rgb(var(--palette-textPrimary)); - cursor: default; - text-decoration: none; -} -[data-supertokens~="authComponentList"] { - padding-bottom: 20px; -} -[data-supertokens~="authPageTitleOAuthClient"] { - color: rgb(var(--palette-textGray)); - font-size: var(--font-size-1); - font-weight: 400; - margin: 10px 0 25px; -} -[data-supertokens~="authPageTitleOAuthClientUrl"] { - text-decoration: none; -} -[data-supertokens~="authPageTitleOAuthClientLogo"] { - width: 44px; - height: 44px; - margin-bottom: 10px; -} -[data-supertokens~="authPageTitleOAuthClient"] [data-supertokens~="authPageTitleOAuthClientName"] { - color: rgb(var(--palette-textTitle)); -} -[data-supertokens~="buttonWithArrow"] { - border-radius: 6px; - border: 1px solid #d0d5dd; - width: 100%; - color: rgb(var(--palette-textGray)); - display: flex; - justify-content: center; - align-items: center; - gap: 5px; - margin: 24px 0; - min-height: 48px; - cursor: pointer; -} -[data-supertokens~="buttonWithArrow"]:hover { - background-color: rgb(var(--palette-inputBackground)); -} -[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryText"] { - font-weight: 700; - font-size: var(--font-size-2); - color: rgb(var(--palette-textGray)); - margin: 0; -} -[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithRightArrow"] ~ svg { - position: relative; - left: 2px; -} -[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithLeftArrow"] svg { - position: relative; - left: -2px; -} -[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryLinkWithLeftArrow"] { - display: flex; - align-items: center; -} -`,x8=function(e){var t=e.children,n=e.userStyles;return N.jsxs(de.Fragment,{children:[t,N.jsxs("style",{children:[E8,n.join(` -`)]})]})},A8=function(){return N.jsx("div",O.__assign({"data-supertokens":"container delayedRender"},{children:N.jsx("div",O.__assign({"data-supertokens":"row"},{children:N.jsx("div",O.__assign({"data-supertokens":"spinner delayedRender"},{children:N.jsx(A2,{})}))}))}))},O8=Fs("MultitenancyDynamicLoginMethodsSpinnerTheme",A8),b8=function(e){var t=fe.SuperTokens.getInstanceOrThrow().rootStyle;return N.jsx(x8,O.__assign({userStyles:[t,e.config.recipeRootStyle]},{children:N.jsx(O8,{})}))},hc=function(){var e=fe.Multitenancy.getInstanceOrThrow(),t=k8.useContext();return N.jsx(fc.Provider,O.__assign({value:t},{children:N.jsx(r0,O.__assign({useShadowDom:fe.SuperTokens.getInstanceOrThrow().useShadowDom},{children:N.jsx(b8,{config:e.config})}))}))},O2=Yt.default.createContext(void 0),L8=function(){var e=Yt.default.useContext(O2);if(e===void 0)throw new Error("useDynamicLoginMethods used outside of a valid provider (FeatureWrapper)");return e},b2=function(e){var t=e.value,n=e.children,r=t===void 0?{loaded:!1}:{loaded:!0,loginMethods:t};return N.jsx(O2.Provider,O.__assign({value:r},{children:n}))},pc=Yt.default.createContext(void 0),Ko=function(){return Yt.default.useContext(pc)},Ef=function(e){var t=e.children,n=e.userContext,r=de.useState(O.getNormalisedUserContext(n))[0];return N.jsx(pc.Provider,O.__assign({value:r},{children:t}))};function D8(e){var t=e.children,n=e.useShadowDom,r=e.defaultStore,i=Ko(),o=O.useRethrowInRender(),a=de.useState(void 0),u=a[0],l=a[1],s=fe.SuperTokens.getInstanceOrThrow();return de.useEffect(function(){u||fe.Multitenancy.getInstanceOrThrow().getCurrentDynamicLoginMethods({userContext:i}).then(function(c){return l(c)},function(c){return o(c)})},[u,l]),fe.SuperTokens.usesDynamicLoginMethods&&!u?N.jsx(hc,{}):N.jsx(b2,O.__assign({value:u},{children:N.jsx(pi.TranslationContextProvider,O.__assign({defaultLanguage:s.languageTranslations.defaultLanguage,defaultStore:O.mergeObjects(r,s.languageTranslations.userTranslationStore),translationControlEventSource:s.languageTranslations.translationEventSource,userTranslationFunc:s.languageTranslations.userTranslationFunc},{children:N.jsx(r0,O.__assign({useShadowDom:n},{children:t}))}))}))}function F8(e){var t=e.children,n=de.useRef(null),r=de.useState(),i=r[0],o=r[1];return de.useEffect(function(){n.current&&o(function(a){return a||n.current.shadowRoot||n.current.attachShadow({mode:"open",delegatesFocus:!1})})},[n]),N.jsx("div",O.__assign({id:O.ST_ROOT_ID,ref:n},{children:i&&S8.createPortal(t,i)}))}function r0(e){var t=e.children,n=e.useShadowDom;return n===!1?N.jsxs("div",O.__assign({id:O.ST_ROOT_ID},{children:[t,N.jsx(Cg,{})]})):N.jsxs(F8,{children:[t,N.jsx(Cg,{})]})}function Cg(){return N.jsx("style",O.__assign({type:"text/css"},{children:"input.supertokens-input:-webkit-autofill,input.supertokens-input:-webkit-autofill:focus,input.supertokens-input:-webkit-autofill:hover,select:-webkit-autofill,select:-webkit-autofill:focus,select:-webkit-autofill:hover,textarea:-webkit-autofill,textarea:-webkit-autofill:focus,textarea:-webkit-autofill:hover{transition:background-color 5000s ease-in-out 0s}"}))}var i0=Yt.default.createContext({loading:!0,isDefault:!0}),L2=function(){var e=Yt.default.useContext(i0);if(e.isDefault===!0)throw new Error("Cannot use useSessionContext outside auth wrapper components.");return e},D2=R8.createGenericComponentsOverrideContext({},"authRecipe"),M8=D2[0],F2=D2[1];function M2(){var e=pi.useTranslation();return N.jsxs("a",O.__assign({"data-supertokens":"superTokensBranding",href:"https://supertokens.com?utm_campaign=poweredby",target:"_blank"},{children:[e("BRANDING_POWERED_BY_START"),N.jsx("strong",{children:"SuperTokens"}),e("BRANDING_POWERED_BY_END")]}))}function o0(e){return e.userContext!==void 0?N.jsx(Ef,O.__assign({userContext:e.userContext},{children:e.children})):N.jsx(pc.Consumer,{children:function(t){return t===void 0?N.jsx(Ef,{children:e.children}):e.children}})}function U2(e){var t=e.error,n=pi.useTranslation();return N.jsx("div",O.__assign({"data-supertokens":"generalError"},{children:n(t)}))}var U8=`[data-supertokens~="container"] { - --palette-background: 255, 255, 255; - --palette-inputBackground: 250, 250, 250; - --palette-inputBorder: 224, 224, 224; - --palette-primary: 28, 34, 42; - --palette-primaryBorder: 45, 54, 68; - --palette-success: 65, 167, 0; - --palette-successBackground: 217, 255, 191; - --palette-error: 255, 23, 23; - --palette-errorBackground: 255, 241, 235; - --palette-textTitle: 0, 0, 0; - --palette-textLabel: 0, 0, 0; - --palette-textInput: 0, 0, 0; - --palette-textPrimary: 128, 128, 128; - --palette-textLink: 0, 122, 255; - --palette-buttonText: 255, 255, 255; - --palette-textGray: 54, 54, 54; - --palette-superTokensBrandingBackground: 242, 245, 246; - --palette-superTokensBrandingText: 173, 189, 196; - --palette-buttonGreyedOut: 221, 221, 221; - --palette-caution: 124, 96, 62; - --palette-errorDark: 207, 54, 68; - - --font-size-0: 12px; - --font-size-1: 14px; - --font-size-2: 16px; - --font-size-3: 19px; - --font-size-4: 24px; - --font-size-5: 28px; -} -/* - * Default styles. - */ -@keyframes slideTop { - 0% { - transform: translateY(-5px); - } - 100% { - transform: translateY(0px); - } -} -@keyframes swing-in-top-fwd { - 0% { - transform: rotateX(-100deg); - transform-origin: top; - opacity: 0; - } - 100% { - transform: rotateX(0deg); - transform-origin: top; - opacity: 1; - } -} -[data-supertokens~="container"] { - font-family: "Arial", sans-serif; - margin: 12px auto; - margin-top: 26px; - margin-bottom: 26px; - width: 420px; - text-align: center; - border-radius: 8px; - box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.16); - background-color: rgb(var(--palette-background)); -} -@media (max-width: 440px) { - [data-supertokens~="container"] { - width: 95vw; - } -} -[data-supertokens~="row"] { - margin: 0 auto; - width: 76%; - padding-top: 30px; - padding-bottom: 10px; -} -[data-supertokens~="superTokensBranding"] { - display: block; - margin: 10px auto 0; - background: rgb(var(--palette-superTokensBrandingBackground)); - color: rgb(var(--palette-superTokensBrandingText)); - text-decoration: none; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; - border-radius: 6px 6px 0 0; - padding: 4px 9px; - font-weight: 400; - font-size: var(--font-size-0); - letter-spacing: 0.4px; -} -[data-supertokens~="generalError"] { - background: rgb(var(--palette-errorBackground)); - padding-top: 10px; - padding-bottom: 10px; - margin-bottom: 10px; - margin-top: 24px; - padding-left: 18px; - padding-right: 18px; - letter-spacing: 0.2px; - font-size: var(--font-size-1); - border-radius: 8px; - color: rgb(var(--palette-error)); - animation: swing-in-top-fwd 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; - word-wrap: break-word; -} -[data-supertokens~="headerTitle"] { - font-size: var(--font-size-4); - line-height: 27.6px; - letter-spacing: 0.58px; - font-weight: 700; - margin-bottom: 20px; - color: rgb(var(--palette-textTitle)); -} -[data-supertokens~="headerSubtitle"] { - font-weight: 400; - color: rgb(var(--palette-textGray)); - margin-bottom: 21px; -} -[data-supertokens~="headerSubtitle"][data-supertokens~="secondaryText"] { - color: rgb(var(--palette-textGray)); - font-weight: 400; -} -[data-supertokens~="privacyPolicyAndTermsAndConditions"] { - max-width: 300px; - margin-top: 10px; -} -[data-supertokens~="privacyPolicyAndTermsAndConditions"] a { - line-height: 21px; -} -/* TODO: split the link style into separate things*/ -/* We add this before primary and secondary text, because if they are applied to the same element the other ones take priority */ -[data-supertokens~="link"] { - padding-left: 3px; - padding-right: 3px; - color: rgb(var(--palette-textLink)); - font-size: var(--font-size-1); - cursor: pointer; - letter-spacing: 0.16px; - line-height: 26px; -} -[data-supertokens~="primaryText"] { - font-size: var(--font-size-2); - font-weight: 400; - letter-spacing: 0.4px; - line-height: 21px; - color: rgb(var(--palette-textLabel)); -} -[data-supertokens~="secondaryText"] { - font-size: var(--font-size-1); - font-weight: 400; - letter-spacing: 0.4px; - color: rgb(var(--palette-textPrimary)); -} -[data-supertokens~="secondaryText"] strong { - font-weight: 600; -} -[data-supertokens~="divider"] { - margin-top: 1.5em; - margin-bottom: 1.5em; - border-bottom: 0.3px solid #dddddd; - align-items: center; - padding-bottom: 5px; - flex: 3 3; -} -[data-supertokens~="headerTinyTitle"] { - margin-top: 24px; - font-size: var(--font-size-5); - letter-spacing: 1.1px; - font-weight: 700; - line-height: 28px; -} -[data-supertokens~="secondaryLinkWithArrow"] { - margin-top: 10px; - margin-bottom: 30px; - cursor: pointer; -} -[data-supertokens~="secondaryLinkWithArrow"]:hover { - position: relative; - left: 2px; - word-spacing: 4px; -} -[data-supertokens~="generalSuccess"] { - color: rgb(var(--palette-success)); - font-size: var(--font-size-1); - background: rgb(var(--palette-successBackground)); - animation: swing-in-top-fwd 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; - padding: 9px 15px 9px 15px; - border-radius: 6px; - display: inline-block; -} -[data-supertokens~="spinner"] { - width: 80px; - height: auto; - padding-top: 20px; - padding-bottom: 40px; - margin: 0 auto; -} -[data-supertokens~="error"] { - color: rgb(var(--palette-error)); -} -[data-supertokens~="linkButton"] { - font-family: "Arial", sans-serif; - background-color: transparent; - border: 0; -} -[data-supertokens~="secondaryLinkWithLeftArrow"] { - color: rgb(var(--palette-textGray)); - font-weight: 400; - margin-top: 10px; - margin-bottom: 40px; - cursor: pointer; -} -[data-supertokens~="secondaryLinkWithLeftArrow"] svg { - margin-right: 0.3em; -} -[data-supertokens~="secondaryLinkWithLeftArrow"]:hover svg { - position: relative; - left: -4px; -} -[data-supertokens~="button"] { - font-family: "Arial", sans-serif; - background-color: rgb(var(--palette-primary)); - color: rgb(var(--palette-buttonText)); - width: 100%; - height: 34px; - font-weight: 600; - border-width: 1px; - border-style: solid; - border-radius: 6px; - border-color: rgb(var(--palette-primaryBorder)); - background-position: center; - transition: all 0.4s; - background-size: 12000%; - cursor: pointer; -} -[data-supertokens~="buttonGreyedOut"] { - background-color: rgb(var(--palette-buttonGreyedOut)); - border-color: rgb(var(--palette-buttonGreyedOut)); -} -[data-supertokens~="buttonWithIcon"] { - display: flex; - align-items: center; - justify-content: center; - gap: 8px; -} -[data-supertokens~="button"]:disabled { - border: none; - cursor: no-drop; -} -[data-supertokens~="button"]:active { - outline: none; - transition: all 0s; - background-size: 100%; - filter: brightness(0.85); -} -[data-supertokens~="button"]:focus { - outline: none; -} -[data-supertokens~="backButtonCommon"] { - width: 16px; - height: 13px; -} -[data-supertokens~="backButton"] { - cursor: pointer; - border: none; - background-color: transparent; - padding: 0px; -} -[data-supertokens~="backButtonPlaceholder"] { - display: block; -} -[data-supertokens~="delayedRender"] { - animation-duration: 0.1s; - animation-name: animate-fade; - animation-delay: 0.2s; - animation-fill-mode: backwards; -} -@keyframes animate-fade { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} -[data-supertokens~="footerLinkGroupVert"] { - display: flex; - flex-direction: column; - margin-top: 10px; - gap: 24px; -} -[data-supertokens~="footerLinkGroupVert"] > div { - cursor: pointer; - margin: 0; -} -[data-supertokens~="footerLinkGroupVert"] [data-supertokens~="secondaryText"] { - font-weight: 400; -} -[data-supertokens~="footerLinkGroupVert"] [data-supertokens~="secondaryLinkWithLeftArrow"] { - font-weight: 400; - position: relative; - left: -6px; /* half the width of the left arrow */ -} -@media (max-width: 360px) { - [data-supertokens~="footerLinkGroupVert"] { - flex-direction: column; - } - [data-supertokens~="footerLinkGroupVert"] > div { - margin: 0 auto; - } -} -[data-supertokens~="footerLinkGroupVert"] div:only-child { - margin-left: auto; - margin-right: auto; - margin-top: 14px; -} -[data-supertokens~="withBackButton"] { - position: relative; - display: flex; - justify-content: space-between; - align-items: center; -} -[data-supertokens~="dividerWithOr"] { - padding-top: 5px; - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - color: rgb(var(--palette-textPrimary)); -} -[data-supertokens~="dividerText"] { - flex: 1 1; - font-weight: 400; - font-size: var(--font-size-1); -} -[data-supertokens~="formLabelWithLinkWrapper"] { - display: flex; - justify-content: space-between; - align-items: center; -} -[data-supertokens~="formLabelLinkBtn"] { - width: auto; - margin-top: 0; - line-height: 24px; - font-size: var(--font-size-0); -} -[data-supertokens~="formLabelLinkBtn"]:hover { - text-decoration: underline; -} -[data-supertokens~="formLabelLinkBtn"]:disabled { - color: rgb(var(--palette-textPrimary)); - cursor: default; - text-decoration: none; -} -[data-supertokens~="authComponentList"] { - padding-bottom: 20px; -} -[data-supertokens~="authPageTitleOAuthClient"] { - color: rgb(var(--palette-textGray)); - font-size: var(--font-size-1); - font-weight: 400; - margin: 10px 0 25px; -} -[data-supertokens~="authPageTitleOAuthClientUrl"] { - text-decoration: none; -} -[data-supertokens~="authPageTitleOAuthClientLogo"] { - width: 44px; - height: 44px; - margin-bottom: 10px; -} -[data-supertokens~="authPageTitleOAuthClient"] [data-supertokens~="authPageTitleOAuthClientName"] { - color: rgb(var(--palette-textTitle)); -} -[data-supertokens~="buttonWithArrow"] { - border-radius: 6px; - border: 1px solid #d0d5dd; - width: 100%; - color: rgb(var(--palette-textGray)); - display: flex; - justify-content: center; - align-items: center; - gap: 5px; - margin: 24px 0; - min-height: 48px; - cursor: pointer; -} -[data-supertokens~="buttonWithArrow"]:hover { - background-color: rgb(var(--palette-inputBackground)); -} -[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryText"] { - font-weight: 700; - font-size: var(--font-size-2); - color: rgb(var(--palette-textGray)); - margin: 0; -} -[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithRightArrow"] ~ svg { - position: relative; - left: 2px; -} -[data-supertokens~="buttonWithArrow"]:hover [data-supertokens~="secondaryLinkWithLeftArrow"] svg { - position: relative; - left: -2px; -} -[data-supertokens~="buttonWithArrow"] [data-supertokens~="secondaryLinkWithLeftArrow"] { - display: flex; - align-items: center; -} -`,N8=function(e){var t=e.children,n=e.userStyles;return N.jsxs(de.Fragment,{children:[t,N.jsxs("style",{children:[U8,n.join(` -`)]})]})},a0=Fs("AuthPageComponentList",function(t){for(var n=pi.useTranslation(),r=[t.authComponents[0]],i=function(a){r.push(function(){return N.jsxs("div",O.__assign({"data-supertokens":"dividerWithOr"},{children:[N.jsx("div",{"data-supertokens":"divider"}),N.jsx("div",O.__assign({"data-supertokens":"dividerText"},{children:n("DIVIDER_OR")})),N.jsx("div",{"data-supertokens":"divider"})]}),"divider-".concat(a))}),r.push(t.authComponents[a])},o=1;o0&&N.jsxs("div",O.__assign({"data-supertokens":"authPageTitleOAuthClient"},{children:[d("AUTH_PAGE_HEADER_TITLE_SIGN_IN_UP_TO_APP"),u.clientUri!==void 0?N.jsx("a",O.__assign({"data-supertokens":"authPageTitleOAuthClientUrl link",href:u.clientUri},{children:u.clientName})):N.jsx("span",O.__assign({"data-supertokens":"authPageTitleOAuthClientName"},{children:u.clientName}))]})),!c&&r&&(i?N.jsxs("div",O.__assign({"data-supertokens":"headerSubtitle secondaryText"},{children:[d("AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_START"),N.jsx("span",O.__assign({"data-supertokens":"link",onClick:n},{children:d("AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_SIGN_IN_LINK")})),d("AUTH_PAGE_HEADER_SUBTITLE_SIGN_UP_END")]})):N.jsxs("div",O.__assign({"data-supertokens":"headerSubtitle secondaryText"},{children:[d("AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_START"),N.jsx("span",O.__assign({"data-supertokens":"link",onClick:n},{children:d("AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_SIGN_UP_LINK")})),d("AUTH_PAGE_HEADER_SUBTITLE_SIGN_IN_END")]}))),N.jsx("div",{"data-supertokens":"divider"})]})});function l0(e){return e.fullPageCompWithPreloadedInfo?N.jsx(N.Fragment,{children:e.fullPageCompWithPreloadedInfo.component(O.__assign(O.__assign({},e),{preloadInfo:e.fullPageCompWithPreloadedInfo.preloadInfo,showBackButton:e.showBackButton}))}):N.jsxs("div",O.__assign({"data-supertokens":"container authPage ".concat(e.factorIds.length>1?"multiFactor":"singleFactor")},{children:[N.jsxs("div",O.__assign({"data-supertokens":"row"},{children:[N.jsx(u0,{factorIds:e.factorIds,isSignUp:e.isSignUp,onSignInUpSwitcherClick:e.onSignInUpSwitcherClick,hasSeparateSignUpView:e.hasSeparateSignUpView,resetFactorList:e.resetFactorList,showBackButton:e.showBackButton,oauth2ClientInfo:e.oauth2ClientInfo}),e.error!==void 0&&N.jsx(U2,{error:e.error}),N.jsx(a0,O.__assign({},e)),N.jsx(s0,{factorIds:e.factorIds,isSignUp:e.isSignUp,hasSeparateSignUpView:e.hasSeparateSignUpView,privacyPolicyLink:e.privacyPolicyLink,termsOfServiceLink:e.termsOfServiceLink})]})),N.jsx(M2,{})]}))}function H8(e){var t=fe.SuperTokens.getInstanceOrThrow().rootStyle;return N.jsx(o0,O.__assign({userContext:e.userContext},{children:N.jsx(N8,O.__assign({userStyles:[t]},{children:N.jsx(l0,O.__assign({},e))}))}))}var $8={signin:"SOMETHING_WENT_WRONG_ERROR",no_email_present:"THIRD_PARTY_ERROR_NO_EMAIL",restart_link:"ERROR_SIGN_IN_UP_LINK"},j2=function(e){var t=M8();return N.jsx(Ef,O.__assign({userContext:e.userContext},{children:N.jsx(d0,O.__assign({requireAuth:!1,doRedirection:!1},{children:N.jsx(fc.Provider,O.__assign({value:t},{children:N.jsx(B8,O.__assign({},e))}))}))}))},B8=function(e){var t,n,r,i,o;if(e.factors!==void 0&&e.factors.length===0)throw new Error("The factors array cannot be empty");var a=_8.WindowHandlerReference.getReferenceOrThrow().windowHandler,u=new URLSearchParams(a.location.getSearch()),l=u.get("show"),s=e.useSignUpStateFromQueryString!==!0||l===null?void 0:l==="signup",c=u.get("error")!==null&&(n=(t=u.get("message"))!==null&&t!==void 0?t:u.get("error"))!==null&&n!==void 0?n:void 0;c=c!==void 0?(r=$8[c])!==null&&r!==void 0?r:c:void 0;var d=de.useRef(l),f=de.useRef(c),h=u.get("loginChallenge"),m=u.get("forceFreshAuth")==="true",y=L2(),S=Ko(),g=O.useRethrowInRender(),v=de.useState(void 0),p=v[0],w=v[1],R=de.useState(void 0),_=R[0],k=R[1],T=de.useState(c),L=T[0],P=T[1],F=de.useState(!1),Y=F[0],Re=F[1],ze=fe.SuperTokens.getInstanceOrThrow(),ft=de.useState(e.factors),at=ft[0],tt=ft[1],Q=de.useState((o=(i=e.isSignUp)!==null&&i!==void 0?i:s)!==null&&o!==void 0?o:ze.defaultToSignUp),j=Q[0],X=Q[1],ee=de.useState(0),he=ee[0],Tt=ee[1],E=de.useRef({buildReq:void 0});de.useEffect(function(){if(e.useSignUpStateFromQueryString&&d.current!==l){var ne=e.useSignUpStateFromQueryString!==!0||l===null?void 0:l==="signup";d.current=l;var Pe=ne??ze.defaultToSignUp;j!==Pe&&(X(Pe),Tt(function(Ne){return Ne+1}))}}),de.useEffect(function(){f.current!==c&&(f.current=c,P(c))});var M=de.useCallback(function(){e.useSignUpStateFromQueryString===!0&&O.updateQueryParam("show",j?"signin":"signup"),P(void 0),X(!j),Tt(function(ne){return ne+1})},[j,X,Tt,P,e.useSignUpStateFromQueryString]);de.useEffect(function(){p||fe.Multitenancy.getInstanceOrThrow().getCurrentDynamicLoginMethods({userContext:S}).then(function(ne){return w(ne)},function(ne){return g(ne)})},[p,w]),O.useOnMountAPICall(function(){return O.__awaiter(void 0,void 0,void 0,function(){var ne;return O.__generator(this,function(Pe){return _?[2]:(ne=mu.OAuth2Provider.getInstance(),ne!==void 0&&h!==null?[2,ne.webJSRecipe.getLoginChallengeInfo({loginChallenge:h,userContext:S})]:[2,void 0])})})},function(ne){return O.__awaiter(void 0,void 0,void 0,function(){return O.__generator(this,function(Pe){return ne!==void 0&&(ne.status==="OK"?k(ne.info):P("SOMETHING_WENT_WRONG_ERROR")),[2]})})},function(){O.clearQueryParams(["loginChallenge"]),P("SOMETHING_WENT_WRONG_ERROR")}),de.useEffect(function(){if(!Y&&y.loading===!1)if(y.doesSessionExist)if(e.onSessionAlreadyExists!==void 0)e.onSessionAlreadyExists();else if(e.redirectOnSessionExists!==!1&&!m){we.Session.getInstanceOrThrow().config.onHandleEvent({action:"SESSION_ALREADY_EXISTS"});var ne=mu.OAuth2Provider.getInstance();h!==null&&ne!==void 0?function(){return O.__awaiter(this,void 0,void 0,function(){var Pe;return O.__generator(this,function(Ne){switch(Ne.label){case 0:return[4,ne.webJSRecipe.getRedirectURLToContinueOAuthFlow({loginChallenge:h,userContext:S})];case 1:return Pe=Ne.sent().frontendRedirectTo,[2,we.Session.getInstanceOrThrow().validateGlobalClaimsAndHandleSuccessRedirection({action:"SUCCESS_OAUTH2",frontendRedirectTo:Pe,createdNewUser:!1,isNewRecipeUser:!1,newSessionCreated:!1,tenantIdFromQueryParams:O.getTenantIdFromQueryParams(),recipeId:we.Session.RECIPE_ID},we.Session.RECIPE_ID,O.getRedirectToPathFromURL(),S,e.navigate)]}})})}().catch(g):we.Session.getInstanceOrThrow().validateGlobalClaimsAndHandleSuccessRedirection(void 0,we.Session.RECIPE_ID,O.getRedirectToPathFromURL(),S,e.navigate).catch(g)}else Re(!0);else Re(!0)},[y.loading]);var b=de.useState(),z=b[0],K=b[1],te=at!==void 0&&(e.factors===void 0||e.factors.some(function(ne){return!at.includes(ne)})),pe=fe.SuperTokens.getInstanceOrThrow(),Ae=pe.privacyPolicyLink,Qe=pe.termsOfServiceLink;de.useEffect(function(){var ne=new AbortController;if(E.current.buildReq!==he)return Y&&(p!==void 0||!fe.SuperTokens.usesDynamicLoginMethods)&&W8(e.preBuiltUIList,p,S,at,j,K,ne.signal).then(function(){E.current.buildReq=he},g),function(){ne.abort()}},[Y,he,Tt,e.preBuiltUIList,p,S,at,j,K,g]);var ue=de.useCallback(function(ne){return O.__awaiter(void 0,void 0,void 0,function(){var Pe,Ne;return O.__generator(this,function(wt){switch(wt.label){case 0:return Pe=mu.OAuth2Provider.getInstance(),h===null||Pe===void 0?[2,we.Session.getInstanceOrThrow().validateGlobalClaimsAndHandleSuccessRedirection(O.__assign(O.__assign({},ne),{action:"SUCCESS",tenantIdFromQueryParams:O.getTenantIdFromQueryParams(),redirectToPath:O.getRedirectToPathFromURL()}),ne.recipeId,O.getRedirectToPathFromURL(),S,e.navigate)]:[4,Pe.webJSRecipe.getRedirectURLToContinueOAuthFlow({loginChallenge:h,userContext:S})];case 1:return Ne=wt.sent().frontendRedirectTo,[2,we.Session.getInstanceOrThrow().validateGlobalClaimsAndHandleSuccessRedirection(O.__assign(O.__assign({},ne),{action:"SUCCESS_OAUTH2",tenantIdFromQueryParams:O.getTenantIdFromQueryParams(),frontendRedirectTo:Ne}),ne.recipeId,O.getRedirectToPathFromURL(),S,e.navigate)]}})})},[h]),Le=z!==void 0&&(h===null||_!==void 0||mu.OAuth2Provider.getInstance()===void 0)?O.__assign(O.__assign({},z),{oauth2ClientInfo:_,onAuthSuccess:ue,error:L,onError:function(ne){P(ne)},clearError:function(){return P(void 0)},navigate:e.navigate,onSignInUpSwitcherClick:M,privacyPolicyLink:Ae,rebuildAuthPage:function(){return Tt(function(ne){return ne+1})},setFactorList:function(ne){tt(ne),Tt(function(Pe){return Pe+1})},resetFactorList:function(){tt(e.factors),Tt(function(ne){return ne+1})},showBackButton:te,termsOfServiceLink:Qe,userContext:S}):void 0,Ue=de.useMemo(function(){var ne=fe.defaultTranslationsCommon;if(z!==void 0)for(var Pe=0,Ne=e.preBuiltUIList;Pe0))throw new Error("Factor list not set but PreBuiltUI not added for ".concat(m.map(function(ee){return ee.recipeID})));if(h.length===0)throw new Error("There are no enabled factors to show");if(h.includes(we.FactorIds.THIRDPARTY)&&(y=e.find(function(ee){return ee.recipeInstance.recipeID===we.FactorIds.THIRDPARTY}),y!==void 0&&y.recipeInstance.config.signInAndUpFeature.providers.length===0&&(!fe.SuperTokens.usesDynamicLoginMethods||t.thirdparty.providers.length===0)&&(h=h.filter(function(ee){return ee!==we.FactorIds.THIRDPARTY}),h.length===0)))throw new Error("The only enabled first factor is thirdparty, but no providers were defined. Please define at least one provider.");for(S=e.some(function(ee){return ee.requiresSignUpPage&&ee.recipeInstance.firstFactorIds.some(function(he){return h.includes(he)})}),g=S&&i,v=[],p=0,w=e;p');var o=de.useState({loading:!0}),a=o[0],u=o[1],l=de.useCallback(function(g){u(function(v){return JSON.stringify(v)!==JSON.stringify(g)?g:v})},[u]),s=de.useRef(),c=de.useRef((t=eo.getReactRouterDomWithCustomHistory())===null||t===void 0?void 0:t.useHistoryCustom),d;try{c.current&&(d=c.current())}catch{}var f=Ko(),h=O.useRethrowInRender(),m=de.useCallback(function(){fe.SuperTokens.getInstanceOrThrow().redirectToAuth({navigate:d,userContext:f,redirectBack:!0})},[]),y=de.useCallback(function(){return O.__awaiter(void 0,void 0,void 0,function(){var g,v,p,w,R;return O.__generator(this,function(_){switch(_.label){case 0:return s.current===void 0&&(s.current=we.Session.getInstanceOrThrow()),[4,s.current.doesSessionExist({userContext:f})];case 1:if(g=_.sent(),g===!1)return[2,{loading:!1,doesSessionExist:!1,accessTokenPayload:{},invalidClaims:[],userId:""}];_.label=2;case 2:return _.trys.push([2,4,,6]),[4,s.current.validateClaims({overrideGlobalClaimValidators:r.overrideGlobalClaimValidators,userContext:f})];case 3:return v=_.sent(),[3,6];case 4:return p=_.sent(),[4,s.current.doesSessionExist({userContext:f})];case 5:if(_.sent())throw p;return[2,{loading:!1,doesSessionExist:!1,accessTokenPayload:{},invalidClaims:[],userId:""}];case 6:return _.trys.push([6,9,,11]),R={loading:!1,doesSessionExist:!0,invalidClaims:v},[4,s.current.getAccessTokenPayloadSecurely({userContext:f})];case 7:return R.accessTokenPayload=_.sent(),[4,s.current.getUserId({userContext:f})];case 8:return[2,(R.userId=_.sent(),R)];case 9:return w=_.sent(),[4,s.current.doesSessionExist({userContext:f})];case 10:if(_.sent())throw w;return[2,{loading:!1,doesSessionExist:!1,accessTokenPayload:{},invalidClaims:[],userId:""}];case 11:return[2]}})})},[]),S=de.useCallback(function(g){return O.__awaiter(void 0,void 0,void 0,function(){var v,p;return O.__generator(this,function(w){switch(w.label){case 0:if(a.loading===!1)return[2];if(r.doRedirection===!1)return[3,8];if(!g.doesSessionExist&&r.requireAuth!==!1)return m(),[2];if(g.invalidClaims.length===0)return[3,8];v=void 0,w.label=1;case 1:return w.trys.push([1,6,,7]),[4,we.getFailureRedirectionInfo({invalidClaims:g.invalidClaims,overrideGlobalClaimValidators:r.overrideGlobalClaimValidators,userContext:f})];case 2:return v=w.sent(),v.redirectPath===void 0?[3,5]:we.validateAndCompareOnFailureRedirectionURLToCurrent(v.redirectPath)?(l(g),[2]):[3,3];case 3:return[4,fe.SuperTokens.getInstanceOrThrow().redirectToUrl(v.redirectPath,d)];case 4:return[2,w.sent()];case 5:return[3,7];case 6:throw p=w.sent(),h(p),p;case 7:if(r.accessDeniedScreen!==void 0&&v.failedClaim!==void 0)return console.warn({message:"Showing access denied screen because a claim validator failed",claimValidationError:v.failedClaim}),[2,l(O.__assign(O.__assign({},g),{accessDeniedValidatorError:v.failedClaim}))];w.label=8;case 8:return l(g),[2]}})})},[a.loading,r.doRedirection,r.requireAuth,r.overrideGlobalClaimValidators,r.accessDeniedScreen,m,f,d]);return O.useOnMountAPICall(y,S),de.useEffect(function(){function g(v){return O.__awaiter(this,void 0,void 0,function(){var p,w,R,_;return O.__generator(this,function(k){switch(k.label){case 0:switch(p=v.action,p){case"SESSION_CREATED":return[3,1];case"REFRESH_SESSION":return[3,1];case"ACCESS_TOKEN_PAYLOAD_UPDATED":return[3,1];case"API_INVALID_CLAIM":return[3,1];case"SIGN_OUT":return[3,11];case"UNAUTHORISED":return[3,12]}return[3,13];case 1:return[4,s.current.validateClaims({overrideGlobalClaimValidators:r.overrideGlobalClaimValidators,userContext:f})];case 2:if(w=k.sent(),r.doRedirection===!1)return[3,10];R=void 0,k.label=3;case 3:return k.trys.push([3,8,,9]),[4,we.getFailureRedirectionInfo({invalidClaims:w,overrideGlobalClaimValidators:r.overrideGlobalClaimValidators,userContext:f})];case 4:return R=k.sent(),R.redirectPath?we.validateAndCompareOnFailureRedirectionURLToCurrent(R.redirectPath)?(l(O.__assign(O.__assign({},v.sessionContext),{loading:!1,invalidClaims:w})),[3,7]):[3,5]:[3,7];case 5:return[4,fe.SuperTokens.getInstanceOrThrow().redirectToUrl(R.redirectPath,d)];case 6:return[2,k.sent()];case 7:return[3,9];case 8:throw _=k.sent(),h(_),_;case 9:if(r.accessDeniedScreen!==void 0&&R.failedClaim!==void 0)return console.warn({message:"Showing access denied screen because a claim validator failed",claimValidationError:R.failedClaim}),[2,l(O.__assign(O.__assign({},v.sessionContext),{loading:!1,invalidClaims:w,accessDeniedValidatorError:R.failedClaim}))];k.label=10;case 10:return l(O.__assign(O.__assign({},v.sessionContext),{loading:!1,invalidClaims:w})),[2];case 11:return l(O.__assign(O.__assign({},v.sessionContext),{loading:!1,invalidClaims:[]})),[2];case 12:return l(O.__assign(O.__assign({},v.sessionContext),{loading:!1,invalidClaims:[]})),r.onSessionExpired!==void 0?r.onSessionExpired():r.requireAuth!==!1&&r.doRedirection!==!1&&m(),[2];case 13:return[2]}})})}if(s.current===void 0&&(s.current=we.Session.getInstanceOrThrow()),a.loading===!1)return s.current.addEventListener(g)},[r,l,a.loading,f,d,m]),r.requireAuth!==!1&&(a.loading||!a.doesSessionExist)?null:!a.loading&&a.accessDeniedValidatorError&&r.accessDeniedScreen?N.jsx(r.accessDeniedScreen,{userContext:f,navigate:d,validationError:a.accessDeniedValidatorError}):N.jsx(i0.Provider,O.__assign({value:a},{children:n}))},d0=function(e){return N.jsx(o0,O.__assign({userContext:e.userContext},{children:N.jsx(X8,O.__assign({},e))}))},H2=function(e){return N.jsx(d0,O.__assign({},e,{requireAuth:!1,doRedirection:!1}))},Zo=function(){function e(){}e.init=function(n){fe.SuperTokens.init(n)},e.changeLanguage=function(n){return fe.SuperTokens.getInstanceOrThrow().changeLanguage(n)},e.loadTranslation=function(n){return fe.SuperTokens.getInstanceOrThrow().loadTranslation(n)},e.isRecipeInitialized=function(n){return fe.SuperTokens.getInstanceOrThrow().recipeList.map(function(r){return r.recipeID}).includes(n)};var t;return t=e,e.SuperTokensWrapper=H2,e.redirectToAuth=function(n){return O.__awaiter(void 0,void 0,void 0,function(){var r;return O.__generator(t,function(i){return[2,fe.SuperTokens.getInstanceOrThrow().redirectToAuth(O.__assign(O.__assign({},n),{redirectBack:(r=n==null?void 0:n.redirectBack)!==null&&r!==void 0?r:!0,userContext:O.getNormalisedUserContext(n==null?void 0:n.userContext)}))]})})},e.useTranslation=pi.useTranslation,e.getTranslationFunction=fe.getTranslationFunction,e.useUserContext=Ko,e}(),J8=Zo.init,Y8=Zo.changeLanguage,ek=Zo.loadTranslation,$2=Zo.redirectToAuth,tk=Zo.isRecipeInitialized;_e.AuthPage=Z8;_e.AuthPageComponentList=a0;_e.AuthPageFooter=s0;_e.AuthPageHeader=u0;_e.AuthPageTheme=l0;_e.BackButton=N2;_e.ComponentOverrideContext=fc;_e.DynamicLoginMethodsSpinner=hc;_e.FeatureWrapper=D8;_e.GeneralError=U2;_e.Provider=F2;_e.RecipeRouter=c0;_e.SessionAuthWrapper=d0;_e.SessionContext=i0;_e.SpinnerIcon=A2;_e.SuperTokensAPIWrapper=Zo;_e.SuperTokensBranding=M2;_e.SuperTokensWrapper=H2;_e.UI=eo;_e.UserContextContext=pc;_e.UserContextWrapper=o0;_e.canHandleRoute=Q8;_e.changeLanguage=Y8;_e.getRoutingComponent=K8;_e.getSuperTokensRoutesForReactRouterDom=q8;_e.init=J8;_e.isRecipeInitialized=tk;_e.languageTranslations=G8;_e.loadTranslation=ek;_e.redirectToAuth=$2;_e.useDynamicLoginMethods=L8;_e.useSessionContext=L2;_e.useUserContext=Ko;_e.withOverride=Fs;Object.defineProperty(pn,"__esModule",{value:!0});var gi=_e,nk=yt,rk=Is;pn.SuperTokensWrapper=gi.SuperTokensWrapper;pn.changeLanguage=gi.changeLanguage;pn.default=gi.SuperTokensAPIWrapper;pn.init=gi.init;pn.isRecipeInitialized=gi.isRecipeInitialized;pn.loadTranslation=gi.loadTranslation;pn.redirectToAuth=gi.redirectToAuth;pn.useUserContext=gi.useUserContext;pn.getTranslationFunction=nk.getTranslationFunction;pn.useTranslation=rk.useTranslation;(function(e){function t(n){for(var r in n)e.hasOwnProperty(r)||(e[r]=n[r])}e.__esModule=!0,t(pn)})(Fh);const ik=ps(Fh);class ok extends x.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,i;console.error("[ErrorBoundary] Caught error:",t,n.componentStack),(i=(r=this.props).onError)==null||i.call(r,t,n)}render(){var t;return this.state.hasError?this.props.fallback?this.props.fallback:Z.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4 p-8 text-center",children:[Z.jsx("div",{className:"rounded-xl bg-red-500/10 p-4 text-red-400",children:Z.jsx("svg",{className:"h-8 w-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Z.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),Z.jsx("h2",{className:"text-lg font-semibold text-slate-100",children:"Something went wrong"}),Z.jsx("p",{className:"max-w-md text-sm text-slate-400",children:((t=this.state.error)==null?void 0:t.message)||"An unexpected error occurred loading this view."}),Z.jsx("button",{onClick:()=>this.setState({hasError:!1}),className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 transition-colors",children:"Try Again"})]}):this.props.children}}var wl={},vn={},f0={},h0={},B2={},Je={},Ms={},gc={},$a=C&&C.__assign||function(){return $a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]/user/password/reset",pathParams:{tenantId:a||"public"}},{body:{formFields:r,token:u,method:"token"}},wn.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"SUBMIT_NEW_PASSWORD",options:i,userContext:o}),wn.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"SUBMIT_NEW_PASSWORD",userContext:o}))];case 1:return l=d.sent(),s=l.jsonBody,c=l.fetchResponse,s.status==="FIELD_ERROR"?[2,{status:"FIELD_ERROR",formFields:s.formFields,fetchResponse:c}]:s.status==="RESET_PASSWORD_INVALID_TOKEN_ERROR"?[2,{status:s.status,fetchResponse:c}]:[2,_l(_l({},s),{fetchResponse:c})]}})})},sendPasswordResetEmail:function(n){var r=n.formFields,i=n.options,o=n.userContext;return va(this,void 0,void 0,function(){var a,u,l,s,c,d,f;return ma(this,function(h){switch(h.label){case 0:return c=(s=t).post,d={path:"//user/password/reset/token"},f={},[4,yu.default.getInstanceOrThrow().recipeImplementation.getTenantId({userContext:o})];case 1:return[4,c.apply(s,[(d.pathParams=(f.tenantId=h.sent()||"public",f),d),{body:{formFields:r}},wn.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"SEND_RESET_PASSWORD_EMAIL",options:i,userContext:o}),wn.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"SEND_RESET_PASSWORD_EMAIL",userContext:o})])];case 2:return a=h.sent(),u=a.jsonBody,l=a.fetchResponse,u.status==="FIELD_ERROR"?[2,{status:"FIELD_ERROR",formFields:u.formFields,fetchResponse:l}]:u.status==="PASSWORD_RESET_NOT_ALLOWED"?[2,{status:u.status,reason:u.reason,fetchResponse:l}]:[2,{status:u.status,fetchResponse:l}]}})})},signUp:function(n){var r=n.formFields,i=n.shouldTryLinkingWithSessionUser,o=n.options,a=n.userContext;return va(this,void 0,void 0,function(){var u,l,s,c,d,f,h;return ma(this,function(m){switch(m.label){case 0:return d=(c=t).post,f={path:"//signup"},h={},[4,yu.default.getInstanceOrThrow().recipeImplementation.getTenantId({userContext:a})];case 1:return[4,d.apply(c,[(f.pathParams=(h.tenantId=m.sent()||"public",h),f),{body:{formFields:r,shouldTryLinkingWithSessionUser:i}},wn.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"EMAIL_PASSWORD_SIGN_UP",options:o,userContext:a}),wn.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"EMAIL_PASSWORD_SIGN_UP",userContext:a})])];case 2:return u=m.sent(),l=u.jsonBody,s=u.fetchResponse,l.status==="FIELD_ERROR"?[2,{status:"FIELD_ERROR",formFields:l.formFields,fetchResponse:s}]:l.status==="SIGN_UP_NOT_ALLOWED"?[2,{status:"SIGN_UP_NOT_ALLOWED",reason:l.reason,fetchResponse:s}]:[2,{status:l.status,user:(0,wu.normaliseUser)("emailpassword",l.user),fetchResponse:s}]}})})},signIn:function(n){var r=n.formFields,i=n.shouldTryLinkingWithSessionUser,o=n.options,a=n.userContext;return va(this,void 0,void 0,function(){var u,l,s,c,d,f,h;return ma(this,function(m){switch(m.label){case 0:return d=(c=t).post,f={path:"//signin"},h={},[4,yu.default.getInstanceOrThrow().recipeImplementation.getTenantId({userContext:a})];case 1:return[4,d.apply(c,[(f.pathParams=(h.tenantId=m.sent()||"public",h),f),{body:{formFields:r,shouldTryLinkingWithSessionUser:i}},wn.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"EMAIL_PASSWORD_SIGN_IN",options:o,userContext:a}),wn.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"EMAIL_PASSWORD_SIGN_IN",userContext:a})])];case 2:return u=m.sent(),l=u.jsonBody,s=u.fetchResponse,l.status==="FIELD_ERROR"?[2,{status:"FIELD_ERROR",formFields:l.formFields,fetchResponse:s}]:l.status==="WRONG_CREDENTIALS_ERROR"?[2,{status:"WRONG_CREDENTIALS_ERROR",fetchResponse:s}]:l.status==="SIGN_IN_NOT_ALLOWED"?[2,{status:"SIGN_IN_NOT_ALLOWED",reason:l.reason,fetchResponse:s}]:[2,{status:"OK",user:(0,wu.normaliseUser)("emailpassword",l.user),fetchResponse:s}]}})})},doesEmailExist:function(n){var r=n.email,i=n.options,o=n.userContext;return va(this,void 0,void 0,function(){var a,u,l,s,c,d,f;return ma(this,function(h){switch(h.label){case 0:return c=(s=t).get,d={path:"//emailpassword/email/exists"},f={},[4,yu.default.getInstanceOrThrow().recipeImplementation.getTenantId({userContext:o})];case 1:return[4,c.apply(s,[(d.pathParams=(f.tenantId=h.sent()||"public",f),d.queryParams={email:r},d),{},wn.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"EMAIL_EXISTS",options:i,userContext:o}),wn.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"EMAIL_EXISTS",userContext:o})])];case 2:return a=h.sent(),u=a.jsonBody,l=a.fetchResponse,[2,{status:u.status,doesExist:u.exists,fetchResponse:l}]}})})},getResetPasswordTokenFromURL:function(){var n=(0,wu.getQueryParams)("token");return n===void 0?"":n},getTenantIdFromURL:function(){return(0,wu.getQueryParams)("tenantId")}}}Us.default=W2;Us.getRecipeImplementation=W2;var uk=C&&C.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Sl=C&&C.__assign||function(){return Sl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,e.match(t)===null?[2,"ERROR_EMAIL_INVALID"]:[2,void 0])})})}function Pk(e){return si.__awaiter(this,void 0,void 0,function(){return si.__generator(this,function(t){return typeof e!="string"?[2,"ERROR_PASSWORD_NON_STRING"]:e.length<8?[2,"ERROR_PASSWORD_TOO_SHORT"]:e.length>=100?[2,"ERROR_PASSWORD_TOO_LONG"]:e.match(/^.*[A-Za-z]+.*$/)===null?[2,"ERROR_PASSWORD_NO_ALPHA"]:e.match(/^.*[0-9]+.*$/)===null?[2,"ERROR_PASSWORD_NO_NUM"]:[2,void 0]})})}function Ek(e){return si.__awaiter(this,void 0,void 0,function(){return si.__generator(this,function(t){return typeof e!="string"?[2,"ERROR_PASSWORD_NON_STRING"]:[2,void 0]})})}function xk(e){return si.__awaiter(this,void 0,void 0,function(){return si.__generator(this,function(t){return[2,void 0]})})}Ns.defaultEmailValidator=Ik;Ns.defaultLoginPasswordValidator=Ek;Ns.defaultPasswordValidator=Pk;Ns.defaultValidate=xk;var ce=Ct,Ak=B2,Ok=p0,Pa=Ln,v0=g0,bk=Ds,vc=Ns;function Lk(e){return e&&e.__esModule?e:{default:e}}var xg=Lk(Ak),Dk=function(e){return function(t){return ce.__assign(ce.__assign({},t),{submitNewPassword:function(n){return ce.__awaiter(this,void 0,void 0,function(){var r;return ce.__generator(this,function(i){switch(i.label){case 0:return[4,t.submitNewPassword(ce.__assign(ce.__assign({},n),{formFields:[n.formFields[0]]}))];case 1:return r=i.sent(),r.status==="OK"&&e({action:"PASSWORD_RESET_SUCCESSFUL",userContext:n.userContext}),[2,r]}})})},sendPasswordResetEmail:function(n){return ce.__awaiter(this,void 0,void 0,function(){var r;return ce.__generator(this,function(i){switch(i.label){case 0:return[4,t.sendPasswordResetEmail(n)];case 1:return r=i.sent(),r.status==="OK"&&e({action:"RESET_PASSWORD_EMAIL_SENT",email:n.formFields.find(function(o){var a=o.id;return a==="email"}).value,userContext:n.userContext}),[2,r]}})})},signUp:function(n){return ce.__awaiter(this,void 0,void 0,function(){var r,i,o;return ce.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,Pa.Session.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:n.userContext})];case 1:return r=a.sent(),[3,3];case 2:return a.sent(),r=void 0,[3,3];case 3:return[4,t.signUp(n)];case 4:if(i=a.sent(),i.status!=="OK")return[3,9];o=void 0,a.label=5;case 5:return a.trys.push([5,7,,8]),[4,Pa.Session.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:n.userContext})];case 6:return o=a.sent(),[3,8];case 7:return a.sent(),o=void 0,[3,8];case 8:e({action:"SUCCESS",isNewRecipeUser:!0,createdNewSession:o!==void 0&&(r===void 0||r.sessionHandle!==o.sessionHandle),user:i.user,userContext:n.userContext}),a.label=9;case 9:return[2,i]}})})},signIn:function(n){return ce.__awaiter(this,void 0,void 0,function(){var r,i,o;return ce.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,Pa.Session.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:n.userContext})];case 1:return r=a.sent(),[3,3];case 2:return a.sent(),r=void 0,[3,3];case 3:return[4,t.signIn(n)];case 4:if(i=a.sent(),i.status!=="OK")return[3,9];o=void 0,a.label=5;case 5:return a.trys.push([5,7,,8]),[4,Pa.Session.getInstanceOrThrow().getAccessTokenPayloadSecurely({userContext:n.userContext})];case 6:return o=a.sent(),[3,8];case 7:return a.sent(),o=void 0,[3,8];case 8:e({action:"SUCCESS",isNewRecipeUser:!1,createdNewSession:o!==void 0&&(r===void 0||r.sessionHandle!==o.sessionHandle),user:i.user,userContext:n.userContext}),a.label=9;case 9:return[2,i]}})})}})}};function Fk(e){e===void 0&&(e={});var t=Mk(e.signInAndUpFeature),n=t.signUpForm.formFields.find(function(a){return a.id==="password"}),r=t.signUpForm.formFields.find(function(a){return a.id==="email"}),i=$k(n.validate,r,e.resetPasswordUsingTokenFeature),o=ce.__assign({functions:function(a){return a}},e.override);return ce.__assign(ce.__assign({},bk.normaliseAuthRecipe(e)),{signInAndUpFeature:t,resetPasswordUsingTokenFeature:i,override:o})}function Mk(e){e===void 0&&(e={});var t=Uk(e.signUpForm),n=t.formFields.reduce(function(i,o){return o.id==="email"?ce.__spreadArray(ce.__spreadArray([],i,!0),[o],!1):o.id==="password"?ce.__spreadArray(ce.__spreadArray([],i,!0),[ce.__assign(ce.__assign({},o),{autoComplete:"current-password",validate:vc.defaultLoginPasswordValidator})],!1):i},[]),r=Nk(n,e.signInForm);return{signUpForm:t,signInForm:r}}function Uk(e){e===void 0&&(e={});var t=jk(),n=[];e.formFields!==void 0&&(n=e.formFields);var r=G2(t,n),i=e.style!==void 0?e.style:"";return{style:i,formFields:r}}function Nk(e,t){t===void 0&&(t={});var n=[];t.formFields!==void 0&&(n=t.formFields.filter(function(o){return v0.MANDATORY_FORM_FIELDS_ID_ARRAY.includes(o.id)}).map(function(o){return ce.__assign(ce.__assign({},o),{optional:!1})}));var r=G2(e,n),i=t.style!==void 0?t.style:"";return{style:i,formFields:r}}function jk(){return[V2(),Hk()]}function V2(){return{id:"email",label:"EMAIL_PASSWORD_EMAIL_LABEL",placeholder:"EMAIL_PASSWORD_EMAIL_PLACEHOLDER",validate:vc.defaultEmailValidator,optional:!1,autoComplete:"email"}}function Hk(){return{id:"password",label:"EMAIL_PASSWORD_PASSWORD_LABEL",placeholder:"EMAIL_PASSWORD_PASSWORD_PLACEHOLDER",validate:vc.defaultPasswordValidator,optional:!1,autoComplete:"new-password"}}function $k(e,t,n){n===void 0&&(n={});var r=n.disableDefaultUI===!0,i=n.submitNewPasswordForm!==void 0&&n.submitNewPasswordForm.style!==void 0?n.submitNewPasswordForm.style:"",o={style:i,formFields:[{id:"password",label:"EMAIL_PASSWORD_NEW_PASSWORD_LABEL",placeholder:"EMAIL_PASSWORD_NEW_PASSWORD_PLACEHOLDER",validate:e,optional:!1,autoComplete:"new-password"},{id:"confirm-password",label:"EMAIL_PASSWORD_CONFIRM_PASSWORD_LABEL",placeholder:"EMAIL_PASSWORD_CONFIRM_PASSWORD_PLACEHOLDER",validate:e,optional:!1,autoComplete:"new-password"}]},a=n.enterEmailForm!==void 0&&n.enterEmailForm.style!==void 0?n.enterEmailForm.style:"",u={style:a,formFields:[ce.__assign(ce.__assign({},V2()),{validate:t.validate,placeholder:"",autofocus:!0})]};return{disableDefaultUI:r,submitNewPasswordForm:o,enterEmailForm:u}}function G2(e,t){for(var n=e,r=0;r"u"&&(n=n+ce.SSR_ERROR),Error(n)}return t.instance},t.reset=function(){ce.isTest()&&(t.instance=void 0)},t.RECIPE_ID="emailpassword",t}(Ok.AuthRecipe);h0.EmailPassword=Wk;var zk=Qo,Vk=h0,q2=zk.createGenericComponentsOverrideContext(void 0,Vk.EmailPassword.RECIPE_ID),Gk=q2[0],qk=q2[1];f0.Provider=qk;f0.useContext=Gk;Object.defineProperty(vn,"__esModule",{value:!0});var Ee=Ct,Qk=f0,Ir=h0,Xn=function(){function e(){}return e.init=function(t){return Ir.EmailPassword.init(t)},e.signOut=function(t){return Ee.__awaiter(this,void 0,void 0,function(){return Ee.__generator(this,function(n){return[2,Ir.EmailPassword.getInstanceOrThrow().signOut({userContext:Ee.getNormalisedUserContext(t==null?void 0:t.userContext)})]})})},e.submitNewPassword=function(t){return Ee.__awaiter(this,void 0,void 0,function(){return Ee.__generator(this,function(n){return[2,Ir.EmailPassword.getInstanceOrThrow().webJSRecipe.submitNewPassword(Ee.__assign(Ee.__assign({},t),{userContext:Ee.getNormalisedUserContext(t.userContext)}))]})})},e.sendPasswordResetEmail=function(t){return Ee.__awaiter(this,void 0,void 0,function(){return Ee.__generator(this,function(n){return[2,Ir.EmailPassword.getInstanceOrThrow().webJSRecipe.sendPasswordResetEmail(Ee.__assign(Ee.__assign({},t),{userContext:Ee.getNormalisedUserContext(t.userContext)}))]})})},e.signUp=function(t){return Ee.__awaiter(this,void 0,void 0,function(){return Ee.__generator(this,function(n){return[2,Ir.EmailPassword.getInstanceOrThrow().webJSRecipe.signUp(Ee.__assign(Ee.__assign({},t),{userContext:Ee.getNormalisedUserContext(t.userContext)}))]})})},e.signIn=function(t){return Ee.__awaiter(this,void 0,void 0,function(){return Ee.__generator(this,function(n){return[2,Ir.EmailPassword.getInstanceOrThrow().webJSRecipe.signIn(Ee.__assign(Ee.__assign({},t),{userContext:Ee.getNormalisedUserContext(t.userContext)}))]})})},e.doesEmailExist=function(t){return Ee.__awaiter(this,void 0,void 0,function(){return Ee.__generator(this,function(n){return[2,Ir.EmailPassword.getInstanceOrThrow().webJSRecipe.doesEmailExist(Ee.__assign(Ee.__assign({},t),{userContext:Ee.getNormalisedUserContext(t.userContext)}))]})})},e.getResetPasswordTokenFromURL=function(t){return Ir.EmailPassword.getInstanceOrThrow().webJSRecipe.getResetPasswordTokenFromURL(Ee.__assign(Ee.__assign({},t),{userContext:Ee.getNormalisedUserContext(t==null?void 0:t.userContext)}))},e.ComponentsOverrideProvider=Qk.Provider,e}(),Kk=Xn.init,Zk=Xn.signOut,Xk=Xn.submitNewPassword,Jk=Xn.sendPasswordResetEmail,Yk=Xn.signUp,eR=Xn.signIn,tR=Xn.doesEmailExist,nR=Xn.getResetPasswordTokenFromURL,rR=Xn.ComponentsOverrideProvider;vn.EmailPasswordComponentsOverrideProvider=rR;vn.default=Xn;vn.doesEmailExist=tR;vn.getResetPasswordTokenFromURL=nR;vn.init=Kk;vn.sendPasswordResetEmail=Jk;vn.signIn=eR;vn.signOut=Zk;vn.signUp=Yk;vn.submitNewPassword=Xk;(function(e){function t(n){for(var r in n)e.hasOwnProperty(r)||(e[r]=n[r])}e.__esModule=!0,t(vn)})(wl);const iR=ps(wl);var mc={},We={},ot={},Q2={},Zt={},js={},yc={},Ba=C&&C.__assign||function(){return Ba=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]/authorisationurl",pathParams:{tenantId:n.tenantId||"public"},queryParams:Or({thirdPartyId:n.thirdPartyId,redirectURIOnProviderDashboard:n.redirectURIOnProviderDashboard},e.clientType!==void 0?{clientType:e.clientType}:{})},{},_a.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"GET_AUTHORISATION_URL",options:n.options,userContext:n.userContext}),_a.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"GET_AUTHORISATION_URL",userContext:n.userContext}))];case 1:return r=a.sent(),i=r.jsonBody,o=r.fetchResponse,[2,{status:"OK",urlWithQueryParams:i.urlWithQueryParams,pkceCodeVerifier:i.pkceCodeVerifier,fetchResponse:o}]}})})},signInAndUp:function(n){return ya(this,void 0,void 0,function(){var r,i,o,a,u,l,s,c,d;return wa(this,function(f){switch(f.label){case 0:return r=this.getStateAndOtherInfoFromStorage({userContext:n.userContext}),i=this.getAuthStateFromURL({userContext:n.userContext}),[4,this.verifyAndGetStateOrThrowError({stateFromAuthProvider:i,stateObjectFromStorage:r,userContext:n.userContext})];case 1:if(o=f.sent(),a=this.getAuthErrorFromURL({userContext:n.userContext}),a!==void 0)throw new Error("Auth provider responded with error: ".concat(a));return u=(0,Sa.getAllQueryParams)(),l=Object.fromEntries(u),[4,t.post({path:"//signinup",pathParams:{tenantId:o.tenantId||"public"}},{body:{thirdPartyId:o.thirdPartyId,clientType:e.clientType,redirectURIInfo:{redirectURIOnProviderDashboard:o.redirectURIOnProviderDashboard,redirectURIQueryParams:l,pkceCodeVerifier:o.pkceCodeVerifier},shouldTryLinkingWithSessionUser:o.shouldTryLinkingWithSessionUser}},_a.default.preparePreAPIHook({recipePreAPIHook:e.preAPIHook,action:"THIRD_PARTY_SIGN_IN_UP",options:n.options,userContext:n.userContext}),_a.default.preparePostAPIHook({recipePostAPIHook:e.postAPIHook,action:"THIRD_PARTY_SIGN_IN_UP",userContext:n.userContext}))];case 2:return s=f.sent(),c=s.jsonBody,d=s.fetchResponse,c.status!=="OK"?[2,Or(Or({},c),{fetchResponse:d})]:[2,Or(Or({status:"OK"},(0,Sa.normaliseUserResponse)("thirdparty",c)),{fetchResponse:d})]}})})},generateStateToSendToOAuthProvider:function(n){var r={state:"".concat(1e20).replace(/[018]/g,function(i){return(parseInt(i)^crypto.getRandomValues(new Uint8Array(1))[0]&15>>parseInt(i)/4).toString(16)})};return n!==void 0&&n.frontendRedirectURI!==void 0&&(r.frontendRedirectURI=n.frontendRedirectURI),btoa(JSON.stringify(r))},verifyAndGetStateOrThrowError:function(n){return ya(this,void 0,void 0,function(){return wa(this,function(r){if(n.stateObjectFromStorage===void 0||n.stateObjectFromStorage.stateForAuthProvider===void 0)throw new Error("No valid auth state present in session storage");if(n.stateFromAuthProvider===void 0)throw new Error("No state recieved from auth provider");if(n.stateObjectFromStorage.expiresAt0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]e.clientWidth};function AR(e){var t=e.logo,n=e.providerName,r=e.displayName,i=TR.useTranslation(),o="provider".concat(n),a=Og.useRef(null),u="scroll-text-animation";return Og.useLayoutEffect(function(){var l=a.current;l&&Lg(l)&&l.classList.add(u);var s=function(){l&&(Lg(l)?l.classList.add(u):l.classList.remove(u))};return addEventListener("resize",s),function(){removeEventListener("resize",s)}},[]),I.jsxs("button",U.__assign({"data-supertokens":"button providerButton ".concat(o)},{children:[t!==void 0&&I.jsx("div",U.__assign({"data-supertokens":"providerButtonLeft"},{children:I.jsx("div",U.__assign({"data-supertokens":"providerButtonLogo"},{children:I.jsx("div",U.__assign({"data-supertokens":"providerButtonLogoCenter"},{children:t}))}))})),I.jsx("div",U.__assign({"data-supertokens":"providerButtonText",ref:a},{children:I.jsxs("span",{children:[i("THIRD_PARTY_PROVIDER_DEFAULT_BTN_START"),r,i("THIRD_PARTY_PROVIDER_DEFAULT_BTN_END")]})}))]}))}var Bt=function(){function e(t){var n=this;this.config=t,this.getButton=function(r){if(n.config.buttonComponent!==void 0)return typeof n.config.buttonComponent=="function"?I.jsx(n.config.buttonComponent,{name:r??n.name}):n.config.buttonComponent;var i=r!==void 0?r:n.name;return I.jsx(AR,{logo:n.getLogo(),providerName:i,displayName:i})}}return Object.defineProperty(e.prototype,"id",{get:function(){return this.config.id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){if(this.config.name===void 0)throw new Error("Name not defined for provider ".concat(this.config.id));return this.config.name},enumerable:!1,configurable:!0}),e.prototype.getRedirectURL=function(){if(this.config.getRedirectURL)return this.config.getRedirectURL(this.config.id);var t=Wi.SuperTokens.getInstanceOrThrow().appInfo.websiteDomain.getAsStringDangerous(),n=new PR.default("/callback/".concat(this.config.id)),r=Wi.SuperTokens.getInstanceOrThrow().appInfo.websiteBasePath.appendPath(n).getAsStringDangerous();return"".concat(t).concat(r)},e.prototype.getRedirectURIOnProviderDashboard=function(){},e}(),X2=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"active-directory",name:"Active Directory"},n))||this;return r.getLogo=function(){return I.jsxs("svg",U.__assign({width:"18",height:"16",viewBox:"0 0 416 415",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[I.jsxs("g",U.__assign({clipPath:"url(#clip0_402_84)"},{children:[I.jsx("path",{d:"M415.575 316.343V403.598C415.575 413.817 412.431 415.914 402.736 414.341C337.753 404.646 271.984 395.737 206.477 386.566C194.686 384.994 190.494 380.802 190.494 367.963C191.542 321.584 191.018 274.943 190.494 228.04C190.494 217.821 193.638 214.677 203.857 214.677C270.936 215.201 336.967 215.201 402.736 215.201C413.479 215.201 416.099 219.393 416.099 229.088C415.051 258.435 415.575 287.258 415.575 316.343Z",fill:"#00AAF2"}),I.jsx("path",{d:"M304.214 198.431C271.198 198.431 238.183 197.907 205.167 198.431C194.948 198.431 190.756 196.335 190.756 184.544C191.28 137.117 191.28 90.4763 190.756 43.5734C190.756 34.4025 193.9 31.2582 202.547 29.686C270.15 19.991 337.753 10.558 405.356 0.338969C417.147 -1.23319 415.051 6.62762 415.051 13.1783C415.051 55.1026 415.575 97.813 415.051 139.737C415.051 155.197 414.527 170.657 415.051 186.116C415.575 195.811 411.907 198.431 402.736 198.431C370.244 197.907 337.229 198.431 304.214 198.431Z",fill:"#00AAF2"}),I.jsx("path",{d:"M85.6828 215.987H159.574C167.435 215.987 170.842 218.608 170.842 226.73V372.417C170.842 380.802 167.173 381.588 159.574 380.802C110.575 373.466 61.5764 366.391 12.8393 359.578C3.14432 358.006 0 354.862 0 344.643C0.524054 305.863 0.524054 267.083 0 227.516C0 217.821 2.62027 215.201 12.3153 215.201C37.2078 215.987 61.0523 215.987 85.6828 215.987Z",fill:"#00AAF2"}),I.jsx("path",{d:"M85.6827 198.431H12.8392C3.66825 198.431 0.523926 195.287 0.523926 185.592C1.04798 147.336 1.04798 109.08 0.523926 70.5621C0.523926 61.3912 3.1442 58.2469 12.8392 56.6747C61.8383 50.3861 110.837 43.3113 159.574 35.4505C170.842 33.8784 171.89 37.5467 171.89 46.7177V186.116C171.89 196.335 167.697 197.907 158.526 197.907C134.158 197.907 109.527 198.431 85.6827 198.431Z",fill:"#00AAF2"})]})),I.jsx("defs",{children:I.jsx("clipPath",U.__assign({id:"clip0_402_84"},{children:I.jsx("rect",{width:"416",height:"415",fill:"white"})}))})]}))},r}return t.init=function(n){return t.instance!==void 0?(console.warn("ActiveDirectory Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),J2=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"apple",name:"Apple"},n))||this;return r.getLogo=function(){return I.jsx("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"15.614",height:"18",viewBox:"0 0 15.614 18.737"},{children:I.jsxs("g",U.__assign({id:"iconfinder_logo_brand_brands_logos_apple_ios_2993701",transform:"translate(-2)"},{children:[I.jsx("path",{id:"Path_91415",d:"M14.494 11.075a4.29 4.29 0 0 1 2.372-3.836A4.888 4.888 0 0 0 13.713 6a4.783 4.783 0 0 0-1.83.406 4.357 4.357 0 0 1-1.684.375 4.357 4.357 0 0 1-1.684-.375A4.783 4.783 0 0 0 6.685 6C6.206 6 2 6.153 2 11.465c0 4.344 2.964 8.587 4.685 8.587a5.18 5.18 0 0 0 2.194-.464 3.2 3.2 0 0 1 1.32-.316 3.2 3.2 0 0 1 1.32.317 5.187 5.187 0 0 0 2.194.463c1.206 0 2.922-2.085 3.9-4.826a4.209 4.209 0 0 1-3.119-4.151z",style:{fill:"#000"},transform:"translate(0 -1.316)"}),I.jsx("path",{id:"XMLID_1339_",d:"M12 4.684A4.734 4.734 0 0 0 15.906 0 4.734 4.734 0 0 0 12 4.684z",style:{fill:"#000"},transform:"translate(-2.193)"}),I.jsx("path",{id:"Path_91416",d:"M6.685 6.2a4.783 4.783 0 0 1 1.83.406 4.357 4.357 0 0 0 1.684.375 4.357 4.357 0 0 0 1.684-.381 4.783 4.783 0 0 1 1.83-.406 4.953 4.953 0 0 1 3.014 1.126c.047-.026.091-.058.14-.082A4.888 4.888 0 0 0 13.713 6a4.783 4.783 0 0 0-1.83.406 4.357 4.357 0 0 1-1.684.375 4.357 4.357 0 0 1-1.684-.375A4.783 4.783 0 0 0 6.685 6C6.206 6 2 6.153 2 11.465v.107C2.053 6.352 6.208 6.2 6.685 6.2z",style:{fill:"#000",opacity:.1},transform:"translate(0 -1.316)"}),I.jsx("path",{id:"Path_91417",d:"M13.713 21.368a5.187 5.187 0 0 1-2.194-.463 3.2 3.2 0 0 0-1.32-.317 3.2 3.2 0 0 0-1.32.316 5.18 5.18 0 0 1-2.194.464c-1.707 0-4.633-4.174-4.681-8.48v.088c0 4.344 2.964 8.587 4.685 8.587a5.18 5.18 0 0 0 2.19-.463 3.2 3.2 0 0 1 1.32-.316 3.2 3.2 0 0 1 1.32.317 5.187 5.187 0 0 0 2.194.463c1.206 0 2.922-2.085 3.9-4.826-.023-.006-.043-.017-.066-.023-.991 2.654-2.655 4.653-3.834 4.653z",style:{fill:"#000",opacity:.2},transform:"translate(0 -2.826)"}),I.jsx("path",{id:"Path_91418",d:"M15.888.4A4.621 4.621 0 0 1 12 4.544v.2A4.745 4.745 0 0 0 15.9.261c0 .039 0 .098-.012.139z",style:{fill:"#000",opacity:.2},transform:"translate(-2.193 -.057)"}),I.jsx("path",{id:"Path_91419",d:"M12.005 4.477c.009-.051.02-.192.032-.278q.012-.161.035-.317A4.491 4.491 0 0 1 15.9.2V0a4.738 4.738 0 0 0-3.895 4.477z",style:{fill:"#000",opacity:.1},transform:"translate(-2.194)"}),I.jsx("path",{id:"Path_91420",d:"M14.494 9.759a4.29 4.29 0 0 1 2.372-3.836 4.888 4.888 0 0 0-3.153-1.239 4.783 4.783 0 0 0-1.83.406 4.357 4.357 0 0 1-1.684.375 4.357 4.357 0 0 1-1.684-.375 4.783 4.783 0 0 0-1.83-.406C6.206 4.684 2 4.838 2 10.15c0 4.344 2.964 8.587 4.685 8.587a5.18 5.18 0 0 0 2.194-.464 3.2 3.2 0 0 1 1.32-.316 3.2 3.2 0 0 1 1.32.317 5.187 5.187 0 0 0 2.194.463c1.206 0 2.922-2.085 3.9-4.826a4.209 4.209 0 0 1-3.119-4.152zM13.713 0a4.734 4.734 0 0 0-3.9 4.684A4.734 4.734 0 0 0 13.713 0z",style:{fill:"#000"}})]}))}))},r}return t.prototype.getRedirectURIOnProviderDashboard=function(){var n=Wi.SuperTokens.getInstanceOrThrow().appInfo.apiDomain.getAsStringDangerous(),r=new ER.default("/callback/".concat(this.id)),i=Wi.SuperTokens.getInstanceOrThrow().appInfo.apiBasePath.appendPath(r).getAsStringDangerous();return"".concat(n).concat(i)},t.init=function(n){return t.instance!==void 0?(console.warn("Apple Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),Y2=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"bitbucket",name:"Bitbucket"},n))||this;return r.getLogo=function(){return I.jsxs("svg",U.__assign({width:"19",height:"17",viewBox:"0 0 19 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[I.jsx("path",{d:"M0.59534 0.0522702C0.229457 0.0522702 -0.0841565 0.365883 0.0203815 0.73174L2.58156 16.2556C2.63383 16.6738 2.99971 16.9351 3.3656 16.9351H15.6488C15.9624 16.9351 16.1715 16.726 16.2238 16.4124L18.7849 0.679471C18.8372 0.313614 18.5759 0 18.21 0L0.59534 0.0522702ZM11.3628 11.2901H7.44258L6.3972 5.74956H12.3036L11.3628 11.2901Z",fill:"#2684FF"}),I.jsx("path",{d:"M17.9502 5.76172H12.3052L11.3643 11.3022H7.44415L2.84448 16.7905C2.84448 16.7905 3.05356 16.9996 3.36717 16.9996H15.6504C15.964 16.9996 16.1731 16.7905 16.2253 16.4769L17.9502 5.76172Z",fill:"url(#paint0_linear_4108_67124)"}),I.jsx("defs",{children:I.jsxs("linearGradient",U.__assign({id:"paint0_linear_4108_67124",x1:"19.2748",y1:"7.29202",x2:"9.92001",y2:"14.5943",gradientUnits:"userSpaceOnUse"},{children:[I.jsx("stop",{offset:"0.176",stopColor:"#0052CC"}),I.jsx("stop",{offset:"1",stopColor:"#2684FF"})]}))})]}))},r}return t.init=function(n){return t.instance!==void 0?(console.warn("Bitbucket Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),ey=I.jsx("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 1593 1594"},{children:I.jsx("path",{fill:"#000",d:"M755.371.823c-1.784.423-3.873 1.292-4.642 1.93-4.011 3.329-4.03 2.828 3.816 102.179 4.144 52.479 7.783 97.553 8.087 100.166l.552 4.75h-18.458c-18.345 0-18.476.016-21.5 2.56-1.812 1.525-3.249 3.851-3.552 5.75-.28 1.755 3.667 47.065 8.77 100.69l9.279 97.5 2.946-.199c1.62-.109 9.021-.896 16.446-1.749 15.874-1.822 56.698-2.089 73.85-.482 6.243.585 11.507.906 11.699.714.192-.192 7.859-91.831 17.038-203.643L876.391 7.694l-1.982-2.673c-3.68-4.965-4.904-5.063-62.294-5.014-29.425.025-54.96.392-56.744.816ZM565.615 32.419c-12.65 4.653-35.6 13.05-51 18.66-30.467 11.1-34.5 13.387-34.5 19.555 0 1.643 3.88 11.475 8.621 21.85a251369.25 251369.25 0 0 0 41.5 90.672c18.084 39.495 32.879 72.149 32.879 72.566 0 .416-3.038 1.81-6.75 3.098-17.271 5.992-27.33 10.304-28.743 12.322-3.57 5.097-2.998 6.522 33.113 82.431 19.042 40.026 38.002 79.975 42.135 88.775 4.133 8.8 7.679 16.188 7.88 16.417.201.229 7.903-3.218 17.115-7.661 25.215-12.16 47.01-20.242 71.123-26.373 5.155-1.311 9.56-2.866 9.789-3.456.229-.591-10.43-40.641-23.686-89-13.257-48.36-29.283-106.827-35.613-129.927-33.881-123.636-46.505-169.275-47.514-171.784-1.635-4.064-5.524-6.725-9.734-6.661-1.988.03-13.965 3.863-26.615 8.516Zm456.555 4.179c-2.77 2.562-4.79 9.34-29.551 99.205-14.619 53.05-26.705 96.58-26.858 96.732-.152.153-6.548-2.005-14.212-4.795-20.053-7.3-20.548-7.406-24.866-5.357-2 .949-4.039 2.477-4.531 3.395-.491.918-11.073 40.572-23.515 88.12-12.442 47.547-23.705 90.482-25.029 95.409-1.325 4.928-2.224 9.143-2 9.367.224.225 8.868 2.567 19.207 5.205 25.239 6.441 45.896 13.772 68.675 24.373 5.431 2.528 10.212 4.596 10.623 4.596.412 0 6.615-12.712 13.785-28.25s35.852-77.75 63.742-138.25c27.88-60.5 60.15-130.475 71.71-155.5 11.55-25.025 21.22-47.097 21.49-49.05.38-2.811-.07-4.201-2.16-6.695-1.46-1.732-3.65-3.448-4.86-3.813-1.21-.366-13.01-4.628-26.21-9.472-60.69-22.27-76.91-27.97-79.59-27.97-1.75 0-4.04 1.077-5.85 2.75ZM329.005 148.532c-83.376 69.681-80.229 66.73-78.275 73.406.605 2.068 23.023 25.494 70.885 74.076 38.5 39.079 70.135 71.407 70.299 71.84.164.433-5.744 5.767-13.129 11.854-7.385 6.086-13.707 11.794-14.049 12.685-.341.89-.621 3.468-.621 5.728 0 4.102.084 4.192 52.25 55.619 28.738 28.331 60.827 59.982 71.31 70.337l19.061 18.826 17.439-17.345c18.573-18.472 31.688-29.664 49.44-42.192 6.05-4.269 11.396-8.126 11.879-8.569.484-.444-4.65-8.601-11.409-18.128-29.995-42.278-103.55-146.201-158.772-224.321-33.046-46.75-61.613-86.687-63.482-88.75-2.97-3.279-3.964-3.75-7.916-3.75-4.214 0-5.22.586-14.91 8.684Zm937.855 12.071c-1.52.96-18.62 24.057-38 51.328-19.39 27.271-45.37 63.826-57.75 81.234-12.37 17.407-22.79 31.545-23.15 31.416-.36-.128-5.91-4.733-12.33-10.233-14.82-12.707-17.39-14.154-22.44-12.64-3.48 1.042-5.38 3.441-23.63 29.887-47.61 69-58.8 85.209-75.62 109.504-9.8 14.162-17.8 26.087-17.77 26.5.03.412 4.58 3.645 10.12 7.184 20.37 13.023 38.83 27.846 58.22 46.761l12.89 12.579 35.15-35.388c19.33-19.463 57.86-58.337 85.62-86.387 27.76-28.05 76.28-77.051 107.82-108.891 32.09-32.395 57.92-59.261 58.64-61.001 2.35-5.613.99-8.068-9.39-16.957-23.16-19.83-76.82-64.419-78.81-65.483-3.08-1.646-6.36-1.444-9.57.587ZM145.518 334.381c-2.55 1.291-7.978 10.007-30.687 49.268-15.174 26.234-28.086 49.015-28.694 50.623-1.41 3.729-.522 7.763 2.28 10.37 2.027 1.886 30.964 16.076 68.698 33.686 22.946 10.709 83.41 39.326 99.678 47.178l14.177 6.842-8.912 15c-9.876 16.622-10.854 20.262-6.693 24.892 2.053 2.284 14.494 8.234 69.25 33.115 8.8 3.999 24.55 11.198 35 15.998 10.45 4.8 26.875 12.312 36.5 16.695 9.625 4.382 22.822 10.46 29.326 13.508 6.666 3.123 12.194 5.159 12.67 4.666.464-.481 2.539-5.149 4.61-10.374 7.806-19.692 25.512-51.411 39.869-71.421 3.08-4.293 5.696-8.167 5.813-8.608.117-.441-4.513-4.065-10.288-8.054s-26.475-18.272-46-31.74-39.775-27.506-45-31.196c-5.225-3.691-20.525-14.286-34-23.546a33783.27 33783.27 0 0 1-75.5-52.037c-7.15-4.943-32.8-22.645-57-39.337-24.2-16.692-49.015-33.886-55.144-38.209-12.147-8.567-15.244-9.703-19.953-7.319Zm1308.622 25.652c-2.23.828-6.61 3.808-80.53 54.809-86.05 59.378-85.34 58.904-86.3 57.675-.5-.643-4.62-7.59-9.14-15.438-8.38-14.54-10.93-17.231-16.28-17.231-2.73 0-.52-1.454-32.78 21.499-14.02 9.978-42.82 30.456-64 45.506-58.82 41.808-69 49.116-69 49.557 0 .223 2.86 4.126 6.35 8.672 14.23 18.555 27.97 41.04 39.71 65.011l8.11 16.57 5.17-2.291c2.84-1.26 19.34-9.028 36.66-17.263 17.33-8.236 38.93-18.474 48-22.752 17.19-8.103 83.71-39.62 114-54.017 9.63-4.573 43.83-20.787 76-36.03 88.25-41.81 88.53-41.945 90.34-44.533 3.72-5.311 3.08-6.747-24.19-53.806-14.22-24.543-26.55-45.982-27.41-47.644-3.54-6.895-9.46-10.234-14.71-8.294ZM31.37 581.891c-4.372.946-5.716 2.231-7.554 7.221-2.31 6.267-20.023 108.318-19.301 111.193.338 1.346 1.633 3.633 2.879 5.081 2.552 2.967 2.076 2.891 39.72 6.381 11.826 1.096 48.05 4.493 80.501 7.547 32.45 3.055 64.4 6.045 71 6.646 6.6.6 12.193 1.276 12.429 1.502.236.226-.787 7.492-2.272 16.148-3.339 19.455-3.369 22.178-.278 25.512 2.64 2.85 3.824 3.08 24.121 4.685 21.47 1.698 122.644 9.938 142.5 11.606 36.435 3.061 35.603 3.054 36.334.323.351-1.313.649-5.538.662-9.388.058-17.491 5.433-52.057 12.024-77.331 2.103-8.063 3.658-14.824 3.457-15.025-.361-.362-58.534-15.664-102.977-27.089-12.65-3.251-42.125-10.933-65.5-17.069a47473.272 47473.272 0 0 0-63-16.499 22538.853 22538.853 0 0 1-32-8.362c-6.325-1.662-37.6-9.81-69.5-18.107-31.9-8.297-58.45-15.219-59-15.382-.55-.162-2.46.02-4.244.407Zm1514.74 33.924c-7.97 2.088-28.67 7.474-46 11.968a55769.76 55769.76 0 0 0-81.33 21.205c-27.4 7.169-50.04 12.824-50.29 12.567-.26-.257-1.78-7.942-3.38-17.078-1.6-9.137-3.39-17.492-3.96-18.569-1.51-2.811-5.08-5.06-8.03-5.06-2.23 0-33.9 8.49-97.01 26.001-37.74 10.475-91.57 25.245-93.8 25.742-1.64.363-2.13.985-1.68 2.135.35.892 2.41 7.689 4.58 15.105 6.72 22.919 11.75 50.1 13.88 74.907.53 6.264 1.12 11.54 1.31 11.725.18.184 4.35-.09 9.27-.609 4.92-.52 16.82-1.651 26.44-2.514 9.63-.863 21.55-2.003 26.5-2.533 4.95-.53 16.65-1.632 26-2.448 9.35-.817 29.15-2.62 44-4.007 14.85-1.387 39.15-3.649 54-5.028 14.85-1.378 31.95-2.971 38-3.541 6.05-.569 20.23-1.894 31.5-2.945 44-4.098 87.87-8.19 117.99-11.006 33.82-3.161 34.93-3.434 37.8-9.274 1.11-2.276.11-9.376-7.79-55.41-4.99-29.04-9.78-54.751-10.65-57.135-1.73-4.763-6.15-8.212-10.35-8.077-1.37.045-9.02 1.79-17 3.879Zm-366 195.283c-.01 18.555-5.17 54.118-11.53 79.429-2.45 9.755-4.12 18.066-3.71 18.469.41.404 18.29 5.304 39.74 10.889 61.13 15.918 138.64 36.127 178 46.413 52.36 13.678 138.35 36.102 157.87 41.172 9.28 2.41 17.74 4.38 18.8 4.38 3.32 0 7.51-2.79 8.59-5.71 1.51-4.09 19.3-107.109 19.27-111.619-.03-4.746-4.13-9.271-9.13-10.07-1.87-.299-16.22-1.696-31.9-3.104-15.67-1.408-47.62-4.372-71-6.586-23.37-2.214-54.14-5.11-68.38-6.435-14.23-1.326-26.04-2.565-26.23-2.754-.18-.19 1.07-8.208 2.79-17.82 2.81-15.646 2.99-17.777 1.73-20.35-3.31-6.765-2.55-6.626-60.41-11.061-11-.843-36.2-2.872-56-4.509-19.8-1.638-41.85-3.453-49-4.035-7.15-.582-17.95-1.482-24-2-16.99-1.455-15.49-1.967-15.5 5.301Zm-782.995 7.814c-4.675.432-21.1 1.967-36.5 3.411-15.4 1.444-32.5 3.034-38 3.532-46.038 4.177-125.826 11.487-152.071 13.933-30.166 2.811-74.861 6.927-136.86 12.602-29.276 2.68-30.668 3.058-33.15 8.997-1.316 3.15-.754 7.115 8.172 57.665 5.272 29.856 10.205 55.765 10.96 57.576.926 2.213 2.575 3.793 5.03 4.819 3.586 1.498 4.46 1.316 46.287-9.619 90.806-23.741 149.992-38.98 151.388-38.98 1.09 0 2.023 3.34 3.701 13.25 3.94 23.264 4.524 24.764 10.402 26.703 3.055 1.009 5.877.461 25.785-5.005a52307.598 52307.598 0 0 0 110.356-30.462c13.018-3.616 34.768-9.537 50.25-13.68 9.362-2.505 9.314-2.416 6.207-11.399-7.354-21.262-14.494-58.062-16.522-85.157l-.693-9.25-3.121.139c-1.717.077-6.946.493-11.621.925Zm755.925 120.631c-9.79 25.743-30.43 63.057-46.59 84.227-2.73 3.58-3.15 4.68-2.12 5.65.71.67 7.13 5.22 14.28 10.12 7.15 4.9 25.38 17.48 40.5 27.95 15.13 10.48 36.95 25.55 48.5 33.5 11.55 7.95 37.2 25.64 57 39.33 19.8 13.68 51.98 35.9 71.5 49.37 19.53 13.47 40.45 27.94 46.5 32.16 38.09 26.57 54.08 37.3 56.68 38.05 1.89.54 4.3.41 6.63-.35 3.37-1.11 4.55-2.74 15.26-21.2 6.38-11 19.18-33.05 28.45-49 21.88-37.65 21.87-37.56 3.98-45.99-4.95-2.33-21.6-10.2-37-17.48l-45-21.27c-9.35-4.41-30.27-14.32-46.5-22.02-16.22-7.69-32.8-15.53-36.83-17.41-7.12-3.31-7.3-3.48-5.91-5.62.79-1.22 4.88-8.1 9.09-15.29 10.53-17.98 10.31-21.17-1.85-27.2-5.28-2.62-19.61-9.21-94.5-43.45-9.62-4.402-31.59-14.476-48.81-22.387-17.23-7.912-31.53-14.385-31.78-14.385s-.92 1.213-1.48 2.695Zm-761.925 31.904c-27.225 12.945-59.4 28.181-71.5 33.853a9396.97 9396.97 0 0 0-45.5 21.54c-12.925 6.17-40.15 19.1-60.5 28.73-20.35 9.63-49.6 23.49-65 30.78-15.4 7.3-38.125 18.05-50.5 23.89-22.428 10.58-26.352 13.18-27.632 18.28-.881 3.51-.228 4.75 29.988 57.23 27.044 46.97 28.543 49.09 34.644 49.09 1.58 0 10.048-5.21 23-14.14 11.275-7.77 28.375-19.57 38-26.2 9.625-6.64 24.048-16.59 32.052-22.11 8.004-5.53 24.342-16.79 36.306-25.04 11.965-8.25 25.66-17.78 30.435-21.17 4.774-3.38 8.99-5.97 9.368-5.73.378.23 4.383 6.96 8.9 14.94 4.516 7.99 9.336 15.41 10.71 16.49 1.472 1.16 4.035 1.97 6.239 1.97 3.169 0 6.237-1.78 20.115-11.66 9.006-6.41 29.425-20.95 45.375-32.32 15.95-11.36 44.75-31.83 64-45.5 19.25-13.66 35.374-25.16 35.832-25.56.457-.4-3.105-6.02-7.916-12.49-13.915-18.71-24.763-36.442-35.622-58.222-5.553-11.138-10.366-20.235-10.695-20.218-.33.018-22.874 10.623-50.099 23.567Zm678.495 94.723c-16.66 16.92-35.04 32.67-52.63 45.1l-11.63 8.22 10.19 14.43c5.6 7.93 18.97 26.8 29.7 41.93 10.73 15.12 31.58 44.6 46.35 65.5 14.76 20.9 30.07 42.5 34.03 48 3.95 5.5 30.7 43.3 59.44 84s53.78 75.46 55.64 77.25c2.65 2.54 4.24 3.25 7.32 3.25 3.62 0 5.45-1.27 22.76-15.78 10.36-8.68 29.75-24.93 43.1-36.11 13.35-11.17 24.93-21.27 25.75-22.44.82-1.16 1.48-3.86 1.48-6 0-3.76-1.25-5.15-43.13-47.8-23.72-24.16-43.45-44.12-43.84-44.36-.39-.24-12.92-12.99-27.84-28.32l-27.13-27.89 12.57-10.37c6.91-5.7 13.43-11.45 14.47-12.78 2.15-2.74 2.43-7.62.62-10.75-1.16-2-140.29-139.68-141.59-140.11-.34-.12-7.38 6.65-15.63 15.03Zm-584.07 22.93c-42.041 42.45-204.9 207.13-232.398 234.99-12.91 13.08-24.032 24.79-24.715 26.02-.682 1.23-1.257 3.56-1.277 5.18-.048 4.02 2.855 6.69 50.328 46.31 41.907 34.97 41.845 34.93 48.013 32.12 1.456-.66 9.367-10.82 19.27-24.75 9.24-12.99 25.619-36 36.398-51.12 10.78-15.13 29.181-41 40.892-57.5 11.711-16.5 21.63-30.37 22.042-30.82.413-.44 6.924 4.39 14.47 10.76 7.546 6.36 14.808 11.83 16.136 12.17 3.382.85 7.197-.3 9.651-2.9 1.907-2.02 112.765-162.5 112.765-163.24 0-.18-4.573-3.32-10.162-6.98-20.44-13.39-41.488-30.3-59.443-47.74-6.657-6.46-12.306-11.75-12.553-11.75-.247 0-13.484 13.16-29.417 29.25Zm485.075 50.44c-23.871 12.16-51.967 22.89-76.5 29.21-9.77 2.51-11.447 3.23-11.15 4.78.192 1 7.31 27.24 15.819 58.32 8.508 31.07 28.458 103.97 44.333 162 15.875 58.02 32.725 119.6 37.444 136.84 4.719 17.23 9.021 32.16 9.561 33.17 1.618 3.02 6.083 5.99 9.022 5.99 1.516 0 17.096-5.21 34.616-11.57s41.08-14.93 52.35-19.03c22.11-8.04 26-10.48 26-16.28 0-1.58-8.74-21.98-19.61-45.74-10.79-23.58-28.27-61.78-38.85-84.88-24.64-53.79-24.92-54.45-24.31-55.07.29-.28 7.28-2.93 15.55-5.88 17.49-6.26 19.73-7.53 21.25-12.14 1.33-4.03 4.74 3.65-39.98-90.37-16.88-35.5-33.813-71.17-37.621-79.27-3.808-8.1-7.374-14.72-7.924-14.7-.55.02-5.05 2.09-10 4.62Zm-353.692 10.57c-2.58 5.63-11.417 24.86-19.638 42.74-8.221 17.87-22.594 49.15-31.94 69.5-17.798 38.75-52.599 114.5-90.257 196.47-13.386 29.13-22.451 50.09-22.727 52.54-.379 3.36.013 4.64 2.236 7.28 1.483 1.77 3.223 3.21 3.867 3.21.644 0 20.291 7.01 43.661 15.57 54.596 20.02 58.716 21.43 62.622 21.43 7.456 0 5.922 4.43 34.964-101 14.621-53.08 26.88-96.79 27.243-97.14.364-.35 7.636 1.99 16.161 5.2 25.358 9.53 25.84 9.29 32.388-16.06 2.486-9.63 13.766-52.8 25.066-95.94 11.3-43.14 20.546-78.79 20.546-79.23 0-.44-1.237-1.06-2.75-1.38-31.023-6.62-64.501-17.99-88.441-30.05-3.717-1.87-7.108-3.4-7.534-3.39-.426 0-2.886 4.61-5.467 10.25Zm226.192 28.79c-21.446 3.14-68.689 3.66-86.4.97-3.794-.58-7.003-.94-7.131-.79-.127.15-3.92 45.27-8.428 100.27-4.508 55-11.936 145.57-16.506 201.28-5.688 69.32-8.047 102.45-7.475 105 .459 2.04 2.009 4.73 3.443 5.97l2.609 2.25h116.042l2.923-2.93c2.802-2.8 3.282-4.16 3.031-8.57-.063-1.1-3.488-44.53-7.611-96.5-4.124-51.98-7.498-95.94-7.497-97.69v-3.19l18.584-.31 18.584-.31 2.916-3.27c2.015-2.26 2.916-4.32 2.916-6.68 0-1.88-4.05-46.25-9-98.61-4.95-52.35-9-95.81-9-96.56 0-1.54-3.12-1.63-12-.33Z"})})),ty=I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 48 48"},{children:[I.jsx("path",{fill:"#FFC107",d:"M43.611 20.083H42V20H24v8h11.303c-1.649 4.657-6.08 8-11.303 8-6.627 0-12-5.373-12-12s5.373-12 12-12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 12.955 4 4 12.955 4 24s8.955 20 20 20 20-8.955 20-20c0-1.341-.138-2.65-.389-3.917z"}),I.jsx("path",{fill:"#FF3D00",d:"m6.306 14.691 6.571 4.819C14.655 15.108 18.961 12 24 12c3.059 0 5.842 1.154 7.961 3.039l5.657-5.657C34.046 6.053 29.268 4 24 4 16.318 4 9.656 8.337 6.306 14.691z"}),I.jsx("path",{fill:"#4CAF50",d:"M24 44c5.166 0 9.86-1.977 13.409-5.192l-6.19-5.238A11.91 11.91 0 0 1 24 36c-5.202 0-9.619-3.317-11.283-7.946l-6.522 5.025C9.505 39.556 16.227 44 24 44z"}),I.jsx("path",{fill:"#1976D2",d:"M43.611 20.083H42V20H24v8h11.303a12.04 12.04 0 0 1-4.087 5.571l.003-.002 6.19 5.238C36.971 39.205 44 34 44 24c0-1.341-.138-2.65-.389-3.917z"})]})),OR=I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},{children:[I.jsx("path",{fill:"#C12E33","fill-rule":"evenodd",d:"M14.85 11.25c-2.366-6.187-5.516-6.787-9.45-1.8.056-3.007 1.106-5.707 3.15-8.1 3.694 2.493 6.394 5.793 8.1 9.9-.423.867-1.023.867-1.8 0Z","clip-rule":"evenodd",opacity:".788"}),I.jsx("path",{fill:"#C32E31","fill-rule":"evenodd",d:"M4.95 2.25c.489.054.789.354.9.9-2.11 2.701-2.86 5.701-2.25 9 1.92.826 3.87.976 5.85.45-2.7 1.803-5.7 2.553-9 2.25.502-4.594 2.002-8.794 4.5-12.6Z","clip-rule":"evenodd",opacity:".728"}),I.jsx("path",{fill:"#BF2E32","fill-rule":"evenodd",d:"M14.85 11.25c.822 1.428.822 2.777 0 4.05a28.183 28.183 0 0 1-12.6.9 29.114 29.114 0 0 0 9-2.25c.362-1.92.362-3.72 0-5.4a442.65 442.65 0 0 0 3.6 2.7Z","clip-rule":"evenodd",opacity:".808"})]})),bR=I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},{children:[I.jsxs("g",U.__assign({"fill-rule":"evenodd","clip-path":"url(#a)","clip-rule":"evenodd"},{children:[I.jsx("path",{fill:"#66DCFE",d:"M8.996.989v4.289a873.854 873.854 0 0 0-4.36 4.913c1.45.913 2.9 1.824 4.35 2.733-.643.41-1.29.816-1.942 1.218-.894.476-1.811.523-2.75.14a8.494 8.494 0 0 1-.335-.154 257.53 257.53 0 0 1-3.445-2.157 1.464 1.464 0 0 1-.518-.936v-.308c.037-.276.144-.522.32-.738l7.55-8.517a1.57 1.57 0 0 1 1.13-.483Z",opacity:".999"}),I.jsx("path",{fill:"#0293E3",d:"M8.996.989a1.58 1.58 0 0 1 1.063.417c.89 1 1.777 2 2.663 3.002a3.204 3.204 0 0 0-2.276-.137 2.96 2.96 0 0 0-1.442 1.007h-.008V.988Z",opacity:".997"}),I.jsx("path",{fill:"#074793",d:"M12.722 4.408c1.652 1.858 3.303 3.719 4.953 5.58.177.217.284.463.32.739v.308a1.422 1.422 0 0 1-.667 1.041l-7.524 4.702c-.25.146-.519.22-.808.224v-4.078a816.044 816.044 0 0 0 4.359-2.733c-1.447-1.64-2.897-3.278-4.35-4.913a2.96 2.96 0 0 1 1.44-1.007 3.203 3.203 0 0 1 2.277.137Z",opacity:".999"}),I.jsx("path",{fill:"#CAF7FF",d:"M8.996 5.278v7.646h-.01c-1.45-.909-2.9-1.82-4.35-2.733 1.447-1.643 2.9-3.281 4.36-4.913Z"}),I.jsx("path",{fill:"#95BBC1",d:"M8.996 5.278h.008a1557.36 1557.36 0 0 1 4.351 4.913c-1.45.915-2.903 1.826-4.36 2.733V5.278Z"}),I.jsx("path",{fill:"#225086",d:"M8.987 12.924h.009v4.078a1.649 1.649 0 0 1-.765-.197c-1.426-.89-2.85-1.782-4.272-2.677.11.054.222.105.334.154.94.383 1.857.336 2.751-.14.651-.402 1.299-.808 1.943-1.218Z",opacity:".998"})]})),I.jsx("defs",{children:I.jsx("clipPath",U.__assign({id:"a"},{children:I.jsx("path",{fill:"#fff",d:"M0 0h18v18H0z"})}))})]})),LR=I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},{children:[I.jsxs("g",U.__assign({"fill-rule":"evenodd","clip-path":"url(#a)","clip-rule":"evenodd"},{children:[I.jsx("path",{fill:"#FEFBF9",d:"M.767.575v.037A.427.427 0 0 0 .43.687V.76C.344.81.282.787.243.687A.758.758 0 0 0 .355.482C.427.466.471.497.486.575a.386.386 0 0 1 .281 0Z",opacity:".58"}),I.jsx("path",{fill:"#EDD8D8",d:"M.767.576C.782.537.807.531.842.557a.09.09 0 0 1-.075.02Z",opacity:".047"}),I.jsx("path",{fill:"#DD8267",d:"M8.626 8.74c.012-2.703 0-5.4-.038-8.09-2.713-.013-5.42 0-8.12.037H.43A.427.427 0 0 1 .767.612c2.629.013 5.254 0 7.878-.037.03 2.728.024 5.45-.02 8.165Z",opacity:".998"}),I.jsx("path",{fill:"#E6562C",d:"M.468.687c2.7-.038 5.407-.05 8.12-.038.013 2.691 0 5.376-.037 8.054V.687H.468Z"}),I.jsx("path",{fill:"#84B321",d:"M9.412.65c2.713-.013 5.42 0 8.12.037H9.45c.012.168 0 .329-.037.482v-.52Z"}),I.jsx("path",{fill:"#F35123",d:"M.468.687H8.55v8.016H.468V.687Z"}),I.jsx("path",{fill:"#D5602F",d:"M8.588.65c.038 2.69.05 5.387.038 8.09H.58v-.037h7.971c.037-2.678.05-5.363.037-8.054Z"}),I.jsx("path",{fill:"#80BB05",d:"M17.532.687v8.016h-8.12V1.17c.036-.153.049-.314.037-.482h8.083Z"}),I.jsx("path",{fill:"#8BB743",d:"M9.374.65V.611h8.196V8.74h-.038V.687a448 448 0 0 0-8.12-.038h-.038Z"}),I.jsx("path",{fill:"#84A91F",d:"M9.374.65h.038v8.053h8.12v.037H9.374V.65Z"}),I.jsx("path",{fill:"#D85A3F",d:"M.43.687h.038v8.016H.58v.037H.43V.687Z",opacity:".997"}),I.jsx("path",{fill:"#F6CCB3",d:"M.43 8.74h8.196l-2.264.074a107.18 107.18 0 0 0-5.613 0A1.739 1.739 0 0 1 .43 8.74Z",opacity:".337"}),I.jsx("path",{fill:"#D1DDA0",d:"M9.374.612V8.74h8.196c-2.717.037-5.461.05-8.233.037-.013-2.728 0-5.45.037-8.165Z",opacity:".384"}),I.jsx("path",{fill:"#399FD9",d:"M.43 9.482c2.726-.012 5.445 0 8.158.038H.468v8.053H.43a1520.77 1520.77 0 0 1 0-8.09Z"}),I.jsx("path",{fill:"#03A5F1",d:"M8.55 9.52v8.016H.469V9.52H8.55Z"}),I.jsx("path",{fill:"#F0D194",d:"M17.57 9.482H9.374c-.012 2.712 0 5.422.038 8.128-.075-2.709-.1-5.43-.075-8.165 2.75-.012 5.495 0 8.233.037Z",opacity:".443"}),I.jsx("path",{fill:"#F1C360",d:"M17.57 9.482c.043 2.71.043 5.419 0 8.128-2.72.042-5.44.042-8.158 0a443.23 443.23 0 0 1-.038-8.128h8.196Z"}),I.jsx("path",{fill:"#FEB909",d:"M9.412 9.52h8.12v8.053c-2.694.006-5.389 0-8.083-.018-.037-2.676-.05-5.354-.037-8.035Z"}),I.jsx("path",{fill:"#20A1E6",d:"M8.55 9.52h.038v8.053H.468v-.037H8.55V9.52Z"}),I.jsx("path",{fill:"#8DC3E4",d:"M.43 9.482a460.62 460.62 0 0 1 8.233-.037v8.165c-2.538-.001-5.077.011-7.615.037a3.13 3.13 0 0 1-.618-.074h8.158V9.52C5.875 9.483 3.156 9.47.43 9.482Z"})]})),I.jsx("defs",{children:I.jsx("clipPath",U.__assign({id:"a"},{children:I.jsx("path",{fill:"#fff",d:"M0 0h18v18H0z"})}))})]})),DR=I.jsx("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"19",fill:"none"},{children:I.jsx("path",{fill:"#000",d:"M15.624.25h-6.5l2.01 6.257h6.497l-5.257 3.729 2.008 6.293c3.386-2.465 4.49-6.193 3.249-10.022L15.625.25h-.001ZM.618 6.507h6.5L9.124.25H2.625L.618 6.507c-1.24 3.829-.134 7.557 3.25 10.022l2.007-6.293L.618 6.504v.003Zm3.25 10.022 5.257 3.721 5.257-3.721-5.257-3.786-5.257 3.786Z"})})),FR=I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},{children:[I.jsxs("g",U.__assign({"fill-rule":"evenodd","clip-path":"url(#a)","clip-rule":"evenodd"},{children:[I.jsx("path",{fill:"#1C1F2A",d:"M13.13 1.986c.179.131.366.248.563.352a.82.82 0 0 0 .317.246c.092.082.186.164.281.246.305.281.598.574.879.879l.21.246a.82.82 0 0 0 .247.316c.103.198.22.385.351.563 1.065 1.876 1.375 3.88.932 6.012-.128.491-.293.972-.492 1.441a37.47 37.47 0 0 1-.475.914 6.853 6.853 0 0 0-.527.774 6.347 6.347 0 0 0-.527.597c-.024 0-.035.012-.035.035l-.247.247c-.023 0-.035.011-.035.035a9.416 9.416 0 0 0-.597.527c-1.77 1.31-3.762 1.855-5.977 1.635-.307-.034-.611-.08-.914-.14a16.286 16.286 0 0 1-1.23-.405 5.375 5.375 0 0 1-.528-.246 23.81 23.81 0 0 1-1.02-.598l-.808-.65-.545-.545-.65-.809a22.47 22.47 0 0 1-.598-1.02 5.336 5.336 0 0 1-.246-.527C.724 10.19.671 8.245 1.301 6.275A8.998 8.998 0 0 1 2.549 3.99c.433-.527.914-1.008 1.441-1.441a6.86 6.86 0 0 0 .774-.528C6.988.766 9.32.538 11.76 1.336c.21.101.427.19.65.264.244.125.484.254.72.386Z",opacity:".997"}),I.jsx("path",{fill:"#000",d:"M13.13 1.951c.048.024.048.024 0 0Zm-8.366.07c-.024-.046-.024-.046 0 0Zm8.929.282c.047.023.047.023 0 0Zm-9.703.246c-.023-.047-.023-.047 0 0Zm10.02 0c.047.023.047.023 0 0Zm.281.246c.047.023.047.023 0 0Zm.879.879c.047.023.047.023 0 0Zm.21.246c.048.023.048.023 0 0Zm-12.831.07c-.024-.047-.024-.047 0 0Zm13.078.246c.047.024.047.024 0 0Zm.352.563c.046.023.046.023 0 0Z",opacity:".01"}),I.jsx("path",{fill:"#FEFEFE",d:"M10.143 12.006a.08.08 0 0 1-.036.053c-.586.023-1.171.023-1.757 0a.248.248 0 0 1-.07-.088V8.35H7.048a.244.244 0 0 1-.123-.141 13.73 13.73 0 0 1 .017-1.688 36.284 36.284 0 0 1 3.182 0c.018 1.829.024 3.657.018 5.485Z"}),I.jsx("path",{fill:"#DADADC",d:"M10.143 12.006c.005-1.828 0-3.656-.018-5.485a36.292 36.292 0 0 0-3.182 0 .15.15 0 0 1 .106-.087 64.98 64.98 0 0 1 3.023 0 .31.31 0 0 1 .088.052c.03 1.846.024 3.686-.017 5.52Z"}),I.jsx("path",{fill:"#060B19",d:"M7.049 8.385c.405-.012.803 0 1.195.035-.03 1.142-.047 2.29-.053 3.445-.017-1.148-.023-2.297-.017-3.445-.381.011-.756 0-1.125-.035Z"}),I.jsx("path",{fill:"#97989C",d:"M7.049 8.385V8.35h1.23v3.62a89.672 89.672 0 0 1-.035-3.55c-.392-.035-.79-.047-1.195-.035Z"}),I.jsx("path",{fill:"#000",d:"M1.459 12.111c-.023.024-.023.024 0 0Zm.246.528c-.023.023-.023.023 0 0Zm14.238.562c.047.024.047.024 0 0Zm-13.64.457c-.024.024-.024.024 0 0Zm13.113.317c.047.023.047.023 0 0Zm-.527.597c.046.024.046.024 0 0Zm-.035.035h.035c-.007.024-.019.024-.035 0Zm-.247.247c.047.023.047.023 0 0Zm-.035.035h.035c-.006.023-.018.023-.035 0Zm-.597.527c.046.024.046.024 0 0Zm-9.668.246c-.024.024-.024.024 0 0Zm1.019.598c-.023.023-.023.023 0 0Zm.528.246c-.024.023-.024.023 0 0Z",opacity:".01"})]})),I.jsx("defs",{children:I.jsx("clipPath",U.__assign({id:"a"},{children:I.jsx("path",{fill:"#fff",d:"M0 0h18v18H0z"})}))})]})),MR=I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},{children:[I.jsxs("g",U.__assign({"fill-rule":"evenodd","clip-path":"url(#a)","clip-rule":"evenodd"},{children:[I.jsx("path",{fill:"#BD1B25",d:"M-.01-.01h18v18h-18v-18Z"}),I.jsx("path",{fill:"#FEFDFD",d:"M6.723 6.723c.38-.023.636.143.769.499a.78.78 0 0 1-.25.81c-.333.202-.636.165-.909-.11a.849.849 0 0 1-.14-.68.823.823 0 0 1 .53-.52Z"}),I.jsx("path",{fill:"#FEFEFE",d:"M1.968 7.082c.646-.003 1.292 0 1.938.01.601-.02 1.11.184 1.528.61a2.02 2.02 0 0 1 .38 1.618c-.147.805-.616 1.308-1.409 1.508-.432.027-.865.038-1.298.03v2.217h-1.14V7.082Z"}),I.jsx("path",{fill:"#BD1B25",d:"M3.107 8.061c.286-.003.572 0 .859.01.344.071.547.281.609.63.06.343 0 .663-.18.958a.579.579 0 0 1-.45.21c-.279.01-.559.013-.838.01V8.061Z"}),I.jsx("path",{fill:"#FEFDFD",d:"M16.012 8.4c.156.24.31.483.46.73a.976.976 0 0 1-.6.34c-.14.006-.28.006-.42 0 .293.476.29.952-.01 1.428-.234.279-.53.459-.888.54-.205.03-.412.046-.62.05a3.363 3.363 0 0 0-.3.179c-.073.056-.1.126-.08.21.024.021.05.038.08.05.36.005.72.018 1.08.04.769.1 1.175.535 1.218 1.308-.028.654-.348 1.096-.959 1.329a3.518 3.518 0 0 1-1.938.06 1.428 1.428 0 0 1-.928-.73 1.05 1.05 0 0 1 .01-.868c.34-.014.679-.014 1.018 0-.139.446.021.713.48.799.286.031.566.005.839-.08.335-.168.432-.425.29-.77a.69.69 0 0 0-.47-.23 32.673 32.673 0 0 0-1.039-.04 1.865 1.865 0 0 1-.759-.179.605.605 0 0 1-.2-.54.527.527 0 0 1 .28-.539 3.05 3.05 0 0 1 .42-.19c-.501-.157-.778-.497-.83-1.019-.057-.886.346-1.436 1.21-1.648a3.06 3.06 0 0 1 .778-.04c.278.038.551.098.82.18.416.053.77-.07 1.058-.37Z"}),I.jsx("path",{fill:"#FEFAFA",d:"M7.242 8.56h.16v4.515H6.283c-.003-1.445 0-2.89.01-4.335l.949-.18Z"}),I.jsx("path",{fill:"#FEFBFB",d:"M9.06 8.54a.057.057 0 0 1 .05.02c.078.166.131.34.16.52a2.29 2.29 0 0 1 .889-.47 1.344 1.344 0 0 1 1.038.2c.255.232.379.521.37.87.01 1.131.013 2.263.01 3.395h-1.099c.004-1.078 0-2.157-.01-3.236-.036-.193-.153-.286-.35-.28a1.255 1.255 0 0 0-.728.38c-.01 1.045-.014 2.09-.01 3.136H8.26c.004-1.218 0-2.437-.01-3.655a6.78 6.78 0 0 0-.11-.6c.313-.081.619-.174.92-.28Z"}),I.jsx("path",{fill:"#BD1D26",d:"M13.715 9.44c.65-.04.913.26.789.899a.518.518 0 0 1-.43.35c-.14.012-.28.012-.42 0-.295-.098-.435-.304-.419-.62.008-.33.168-.54.48-.63Z"}),I.jsx("path",{fill:"#FEFFFE",d:"M1.968 13.635h.26v2.437h-.26v-2.437Z"}),I.jsx("path",{fill:"#EEC5C7",d:"M3.686 13.635c.007.28 0 .56-.02.839-.012-.003-.019-.01-.02-.02l.04-.82Z"}),I.jsx("path",{fill:"#FEFCFC",d:"M3.686 13.635h.24c-.004.726 0 1.452.01 2.177.011.086.028.169.05.25a.661.661 0 0 1-.28-.01 1.634 1.634 0 0 0-.04-.14.579.579 0 0 1-.58.17.63.63 0 0 1-.429-.39 1.832 1.832 0 0 1-.02-.918c.159-.438.455-.58.89-.43a.658.658 0 0 1 .119.11c.001.01.008.017.02.02.02-.28.027-.56.02-.84Z"}),I.jsx("path",{fill:"#FCF4F4",d:"M9.3 13.635h.28v.66h.399a2.064 2.064 0 0 0-.06.219h-.34c-.003.433 0 .866.01 1.298a.15.15 0 0 0 .09.09.304.304 0 0 0 .18-.01.19.19 0 0 1 .02.19.415.415 0 0 1-.51-.09.459.459 0 0 1-.04-.1 16.741 16.741 0 0 1-.03-1.378h-.2v-.22h.2v-.66Z"}),I.jsx("path",{fill:"#FEFBFB",d:"M7.362 14.514v-.2c.07.006.137 0 .2-.02v-.66h.26v.66h.419a2.073 2.073 0 0 1-.06.22h-.36c-.003.426 0 .852.01 1.278.064.119.16.152.29.1.016.05.03.1.04.15a.22.22 0 0 1-.23.09c-.2.007-.319-.086-.36-.28a44.84 44.84 0 0 1-.01-1.338h-.2Z"}),I.jsx("path",{fill:"#FEFAFA",d:"M11.258 14.314a.514.514 0 0 1 .28.04c-.21.71-.433 1.416-.67 2.118a.644.644 0 0 1-.38.32.303.303 0 0 1-.09-.17c.067-.036.13-.08.19-.13a.852.852 0 0 0 .11-.22 17.097 17.097 0 0 0-.54-1.898.41.41 0 0 1 .26-.12c.142.514.285 1.027.43 1.538.131-.495.268-.987.41-1.478Z"}),I.jsx("path",{fill:"#FEFBFB",d:"M4.825 14.254c.356-.03.593.123.709.46.025.172.035.345.03.52h-1c-.052.304.06.513.34.628.203.04.38-.01.53-.15a.691.691 0 0 1 .09.17.698.698 0 0 1-.44.22c-.475.018-.744-.212-.809-.69a2.114 2.114 0 0 1 .04-.678.795.795 0 0 1 .51-.48Zm1.218.02a.097.097 0 0 1 .08.02c.026.072.046.145.06.22a.697.697 0 0 1 .48-.24c.23-.006.38.1.45.32.01.492.012.985.01 1.478h-.26c.003-.466 0-.932-.01-1.398-.038-.117-.118-.17-.24-.16a.802.802 0 0 0-.42.22c-.01.446-.013.892-.01 1.338h-.26c.004-.52 0-1.039-.01-1.558a.742.742 0 0 0-.05-.16.415.415 0 0 1 .18-.08Z"}),I.jsx("path",{fill:"#FEFAFB",d:"M8.68 14.274h.12v1.798h-.28v-1.778c.058.006.111 0 .16-.02Z"}),I.jsx("path",{fill:"#DE8E93",d:"M11.258 14.314a1.14 1.14 0 0 1 .3-.02c.004.026-.003.046-.02.06a.514.514 0 0 0-.28-.04Z"}),I.jsx("path",{fill:"#E9B2B4",d:"M7.562 14.294a.51.51 0 0 1-.2.02v.2a.616.616 0 0 1-.02-.22h.22Z"}),I.jsx("path",{fill:"#BE1F27",d:"M5.284 14.893v.12h-.72a.588.588 0 0 1 .16-.47c.227-.127.404-.077.53.15a.977.977 0 0 1 .03.2Z"}),I.jsx("path",{fill:"#BD1D26",d:"M3.146 14.514a.517.517 0 0 1 .51.16c.013.32.013.639 0 .959-.168.227-.377.277-.63.15a.579.579 0 0 1-.15-.33 2.62 2.62 0 0 1 .02-.6.593.593 0 0 1 .25-.34Z"}),I.jsx("path",{fill:"#DD8B90",d:"M5.284 14.893c.02.042.026.09.02.14-.25.007-.496 0-.74-.02h.72v-.12Z"}),I.jsx("path",{fill:"#FAE9EA",d:"M11.577 15.553c.232-.018.342.089.33.32-.076.192-.206.242-.39.15-.15-.181-.13-.338.06-.47Z"}),I.jsx("path",{fill:"#FBEEEE",d:"M11.577 15.653a.343.343 0 0 1 .19.04c.02.062.004.112-.05.15a.889.889 0 0 1 .06.11.1.1 0 0 1-.06-.01c-.058-.147-.098-.143-.12.01-.02-.1-.026-.2-.02-.3Z"}),I.jsx("path",{fill:"#C0292F",d:"M11.777 15.952a.889.889 0 0 0-.06-.11c.054-.037.07-.087.05-.15a.342.342 0 0 0-.19-.04h-.02c.218-.079.308.001.27.24a.085.085 0 0 1-.05.06Z"}),I.jsx("path",{fill:"#C12B31",d:"M11.617 15.713h.1v.06h-.1v-.06Z"}),I.jsx("path",{fill:"#C74042",d:"M11.557 15.653h.02c-.006.1 0 .2.02.3.022-.153.062-.157.12-.01a.1.1 0 0 0 .06.01c-.162.101-.262.055-.3-.14a.233.233 0 0 1 .08-.16Z"})]})),I.jsx("defs",{children:I.jsx("clipPath",U.__assign({id:"a"},{children:I.jsx("path",{fill:"#fff",d:"M0 0h18v18H0z"})}))})]})),UR=I.jsx("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"19",height:"10",fill:"none"},{children:I.jsx("path",{fill:"#B2E8E6","fill-rule":"evenodd",d:"M15.573 9.352a1.596 1.596 0 0 0-.37-.881A3.167 3.167 0 0 0 14 7.637l-.506-.187c.62-.708.768-1.51.443-2.409-.285-.645-.758-1.06-1.419-1.246-.908-.2-1.652.071-2.232.815-.454.68-.532 1.405-.235 2.174.105.253.253.475.443.666a3.927 3.927 0 0 0-1.518.815 5.38 5.38 0 0 0-.868-.384c.564-.665.663-1.399.298-2.203-.362-.62-.895-.945-1.599-.974-.978.08-1.572.618-1.78 1.612a1.974 1.974 0 0 0 .515 1.574 3.402 3.402 0 0 0-1.23.628c-.263.22-.438.497-.523.834-.277.003-.554 0-.832-.01-1.055-.12-1.775-.692-2.16-1.714-.302-1.159-.003-2.112.895-2.859.724-.499 1.495-.596 2.314-.29.511-1.003 1.318-1.496 2.421-1.48C6.716 1.697 7.475.85 8.706.458c1.255-.297 2.33.03 3.226.984.122.16.24.322.352.487 1.053-.272 1.954-.003 2.702.806.381.477.595 1.026.642 1.65.978-.224 1.807.045 2.485.805.602.798.729 1.673.38 2.624-.416.917-1.112 1.426-2.088 1.527-.277.01-.554.013-.832.01Z","clip-rule":"evenodd",opacity:".999"})})),NR=I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},{children:[I.jsxs("g",U.__assign({"fill-rule":"evenodd","clip-path":"url(#a)","clip-rule":"evenodd"},{children:[I.jsx("path",{fill:"#FCB61C",d:"M-.04-.04h18v18h-18v-18Z"}),I.jsx("path",{fill:"#4F2B3C",d:"M4.6 5.72c1.348-.493 2.161-.04 2.44 1.36.137.913-.143 1.673-.84 2.28.404.218.658.551.76 1 .04.666.053 1.333.04 2H5.56c.013-.614 0-1.227-.04-1.84a1.826 1.826 0 0 0-.92-1.16c1.173-.928 1.346-2.008.52-3.24a1.248 1.248 0 0 0-.52-.4Z"}),I.jsx("path",{fill:"#4F2C3C",d:"M7.8 5.72c1.482-.442 2.308.118 2.48 1.68 0 .788-.294 1.441-.88 1.96.4.254.654.614.76 1.08.04.64.053 1.28.04 1.92H8.76a10.32 10.32 0 0 0-.12-2.08 2.325 2.325 0 0 0-.84-.92c1.056-.82 1.283-1.82.68-3a1.574 1.574 0 0 0-.68-.64Z"}),I.jsx("path",{fill:"#512E3B",d:"M11 5.72a5.412 5.412 0 0 1 1.6-.04c1.167 1.225 1.167 2.452 0 3.68.4.251.653.611.76 1.08.04.64.053 1.28.04 1.92h-1.52c.013-.667 0-1.334-.04-2a1.93 1.93 0 0 0-.84-1c1.042-.866 1.242-1.892.6-3.08-.19-.203-.39-.39-.6-.56Z"})]})),I.jsx("defs",{children:I.jsx("clipPath",U.__assign({id:"a"},{children:I.jsx("path",{fill:"#fff",d:"M0 0h18v18H0z"})}))})]})),jR=I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none"},{children:[I.jsxs("g",U.__assign({"fill-rule":"evenodd","clip-path":"url(#a)","clip-rule":"evenodd"},{children:[I.jsx("path",{fill:"#F6931E",d:"M8.181 17.253c.006-.571 0-1.141-.018-1.71-.003-4.5 0-9 .009-13.5L10.89.711c.012 5.094.012 10.188 0 15.282-.9.428-1.803.847-2.709 1.26Z",opacity:".992"}),I.jsx("path",{fill:"#B2B1B1",d:"M8.163 15.543c.018.569.024 1.139.018 1.71a12.64 12.64 0 0 1-4.986-1.413 7.326 7.326 0 0 1-2.277-1.881c-1.04-1.39-1.166-2.86-.378-4.41a6.512 6.512 0 0 1 1.845-1.953 11.234 11.234 0 0 1 3.744-1.602 14.655 14.655 0 0 1 1.584-.279v1.746a8.006 8.006 0 0 0-3.366 1.323 4.29 4.29 0 0 0-1.305 1.485c-.424.938-.364 1.844.18 2.718a4.964 4.964 0 0 0 1.773 1.575c.994.524 2.05.852 3.168.981Z",opacity:".991"}),I.jsx("path",{fill:"#B1B2B1",d:"M11.35 5.715a12.7 12.7 0 0 1 4.481 1.359l.351.207a51.2 51.2 0 0 1 1.377-.774.123.123 0 0 1 .027.054c.125 1.278.248 2.556.37 3.834a414.518 414.518 0 0 1-5.257-1.152c.477-.278.957-.55 1.44-.819a7.956 7.956 0 0 0-2.79-.963V5.715Z",opacity:".989"})]})),I.jsx("defs",{children:I.jsx("clipPath",U.__assign({id:"a"},{children:I.jsx("path",{fill:"#fff",d:"M0 0h18v18H0z"})}))})]})),ny=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"boxy-saml",name:"BoxySAML"},n))||this;return r.getLogo=function(){switch(r.name.toLowerCase()){case"microsoft entra id":return bR;case"microsoft ad fs":return LR;case"okta":return ey;case"auth0":return DR;case"google":return ty;case"onelogin":return FR;case"pingone":return MR;case"jumpcloud":return UR;case"rippling":return NR;case"openid":return jR;default:return OR}},r}return t.init=function(n){return t.instance!==void 0?(console.warn("BoxySAML Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),xf=function(e){U.__extends(t,e);function t(n){var r=e.call(this,n)||this;return r.getLogo=function(){return r.logo},r.logo=n.logo,r}return t.init=function(n){if(n===void 0||n.id===void 0)throw new Error("Custom provider config should contain an id attribute");return new t(n)},t}(Bt),ry=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"discord",name:"Discord"},n))||this;return r.getLogo=function(){return I.jsxs("svg",U.__assign({width:"18",height:"14",viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[I.jsx("g",U.__assign({clipPath:"url(#clip0_4108_67056)"},{children:I.jsx("path",{d:"M15.2477 1.17248C14.0651 0.616848 12.8166 0.222666 11.5342 0C11.3587 0.321942 11.1999 0.653178 11.0585 0.99232C9.69245 0.781074 8.30327 0.781074 6.93722 0.99232C6.79573 0.653213 6.63694 0.321981 6.46152 0C5.17826 0.224546 3.92896 0.619664 2.74515 1.17538C0.394984 4.74367 -0.242109 8.22333 0.0764376 11.6536C1.45275 12.6971 2.99324 13.4908 4.63094 14C4.99971 13.491 5.32601 12.9511 5.6064 12.3858C5.07384 12.1817 4.55982 11.9299 4.0703 11.6332C4.19914 11.5374 4.32514 11.4386 4.4469 11.3427C5.87129 12.0301 7.42594 12.3865 8.99999 12.3865C10.574 12.3865 12.1287 12.0301 13.5531 11.3427C13.6762 11.4458 13.8023 11.5446 13.9297 11.6332C13.4392 11.9304 12.9242 12.1827 12.3907 12.3873C12.6708 12.9523 12.9971 13.4918 13.3662 14C15.0053 13.4928 16.547 12.6996 17.9235 11.655C18.2973 7.67704 17.285 4.22935 15.2477 1.17248ZM6.0099 9.544C5.12221 9.544 4.38885 8.71731 4.38885 7.70029C4.38885 6.68327 5.09673 5.84931 6.00707 5.84931C6.9174 5.84931 7.6451 6.68327 7.62953 7.70029C7.61396 8.71731 6.91457 9.544 6.0099 9.544ZM11.9901 9.544C11.101 9.544 10.3704 8.71731 10.3704 7.70029C10.3704 6.68327 11.0783 5.84931 11.9901 5.84931C12.9018 5.84931 13.6239 6.68327 13.6083 7.70029C13.5927 8.71731 12.8947 9.544 11.9901 9.544Z",fill:"#5865F2"})})),I.jsx("defs",{children:I.jsx("clipPath",U.__assign({id:"clip0_4108_67056"},{children:I.jsx("rect",{width:"18",height:"14",fill:"white"})}))})]}))},r}return t.init=function(n){return t.instance!==void 0?(console.warn("Discord Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),iy=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"facebook",name:"Facebook"},n))||this;return r.getLogo=function(){return I.jsx("svg",U.__assign({fill:"#1777F2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",width:"24px",height:"24px"},{children:I.jsx("path",{d:"M15,3C8.373,3,3,8.373,3,15c0,6.016,4.432,10.984,10.206,11.852V18.18h-2.969v-3.154h2.969v-2.099c0-3.475,1.693-5,4.581-5 c1.383,0,2.115,0.103,2.461,0.149v2.753h-1.97c-1.226,0-1.654,1.163-1.654,2.473v1.724h3.593L19.73,18.18h-3.106v8.697 C22.481,26.083,27,21.075,27,15C27,8.373,21.627,3,15,3z"})}))},r}return t.init=function(n){return t.instance!==void 0?(console.warn("Facebook Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),oy=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"github",name:"GitHub"},n))||this;return r.getLogo=function(){return I.jsx("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"18",height:"17.556",viewBox:"0 0 18 17.556"},{children:I.jsx("path",{fill:"#000",fillRule:"evenodd",d:"M145.319 107.44a9 9 0 0 0-2.844 17.54c.45.082.614-.2.614-.434 0-.214-.008-.78-.012-1.531-2.5.544-3.032-1.206-3.032-1.206a2.384 2.384 0 0 0-1-1.317c-.817-.559.062-.547.062-.547a1.89 1.89 0 0 1 1.378.927 1.916 1.916 0 0 0 2.619.748 1.924 1.924 0 0 1 .571-1.2c-2-.227-4.1-1-4.1-4.448a3.479 3.479 0 0 1 .927-2.415 3.233 3.233 0 0 1 .088-2.382s.755-.242 2.475.923a8.535 8.535 0 0 1 4.506 0c1.718-1.165 2.472-.923 2.472-.923a3.234 3.234 0 0 1 .09 2.382 3.473 3.473 0 0 1 .925 2.415c0 3.458-2.1 4.218-4.11 4.441a2.149 2.149 0 0 1 .611 1.667c0 1.2-.011 2.174-.011 2.469 0 .24.162.52.619.433a9 9 0 0 0-2.851-17.539z",transform:"translate(-136.32 -107.44)"})}))},r}return t.init=function(n){return t.instance!==void 0?(console.warn("Github Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),ay=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"gitlab",name:"Gitlab"},n))||this;return r.getLogo=function(){return I.jsxs("svg",U.__assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[I.jsx("path",{d:"M17.7004 6.86178L17.6751 6.79711L15.2251 0.403269C15.1753 0.277953 15.087 0.171648 14.973 0.0996044C14.8589 0.0287852 14.7259 -0.00532357 14.5918 0.00188338C14.4577 0.00909034 14.3291 0.057266 14.2232 0.139906C14.1186 0.224918 14.0426 0.340113 14.0058 0.469813L12.3516 5.5309H5.65312L3.99889 0.469813C3.96302 0.339406 3.88693 0.223634 3.78145 0.138968C3.67562 0.0563286 3.54698 0.0081529 3.41289 0.000945942C3.27881 -0.00626101 3.14574 0.0278478 3.03166 0.0986669C2.91791 0.171001 2.82972 0.277214 2.77954 0.402332L0.324918 6.79336L0.30055 6.85803C-0.0521303 7.77953 -0.0956629 8.79071 0.176516 9.73911C0.448694 10.6875 1.02183 11.5217 1.8095 12.1159L1.81794 12.1225L1.84043 12.1384L5.57251 14.9333L7.41888 16.3307L8.54356 17.1798C8.67512 17.2797 8.83575 17.3338 9.00093 17.3338C9.16611 17.3338 9.32675 17.2797 9.45831 17.1798L10.583 16.3307L12.4293 14.9333L16.1839 12.1216L16.1933 12.1141C16.9792 11.5197 17.551 10.6864 17.8228 9.73926C18.0945 8.79214 18.0516 7.7824 17.7004 6.86178Z",fill:"#E24329"}),I.jsx("path",{d:"M17.7004 6.86154L17.6751 6.79688C16.4813 7.04191 15.3564 7.54756 14.3807 8.27771L9 12.3463C10.8323 13.7324 12.4275 14.9368 12.4275 14.9368L16.1821 12.1251L16.1914 12.1176C16.9785 11.5233 17.5511 10.6894 17.8233 9.74145C18.0954 8.79352 18.0523 7.78284 17.7004 6.86154Z",fill:"#FC6D26"}),I.jsx("path",{d:"M5.57251 14.9362L7.41887 16.3337L8.54356 17.1828C8.67511 17.2827 8.83575 17.3367 9.00093 17.3367C9.16611 17.3367 9.32674 17.2827 9.4583 17.1828L10.583 16.3337L12.4293 14.9362C12.4293 14.9362 10.8323 13.7281 8.99999 12.3457C7.16769 13.7281 5.57251 14.9362 5.57251 14.9362Z",fill:"#FCA326"}),I.jsx("path",{d:"M3.61837 8.27755C2.64345 7.5459 1.51877 7.03893 0.324918 6.79297L0.30055 6.85764C-0.0521303 7.77914 -0.0956629 8.79031 0.176516 9.73871C0.448694 10.6871 1.02183 11.5213 1.8095 12.1155L1.81794 12.1221L1.84043 12.138L5.57251 14.9329C5.57251 14.9329 7.16582 13.7285 9 12.3424L3.61837 8.27755Z",fill:"#FC6D26"})]}))},r}return t.init=function(n){return t.instance!==void 0?(console.warn("Gitlab Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),sy=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"google",name:"Google"},n))||this;return r.getLogo=function(){return ty},r}return t.init=function(n){return t.instance!==void 0?(console.warn("Google Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),uy=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"google-workspaces",name:"Google Workspaces"},n))||this;return r.getLogo=function(){return I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"18px",height:"18px"},{children:[I.jsx("path",{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"}),I.jsx("path",{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"}),I.jsx("path",{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"}),I.jsx("path",{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"})]}))},r}return t.init=function(n){return t.instance!==void 0?(console.warn("GoogleWorkspaces Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),ly=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"linkedin",name:"LinkedIn"},n))||this;return r.getLogo=function(){return I.jsxs("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"20",height:"20"},{children:[I.jsx("path",{fill:"#0288D1",d:"M42,37c0,2.762-2.238,5-5,5H11c-2.761,0-5-2.238-5-5V11c0-2.762,2.239-5,5-5h26c2.762,0,5,2.238,5,5V37z"}),I.jsx("path",{fill:"#FFF",d:"M12 19H17V36H12zM14.485 17h-.028C12.965 17 12 15.888 12 14.499 12 13.08 12.995 12 14.514 12c1.521 0 2.458 1.08 2.486 2.499C17 15.887 16.035 17 14.485 17zM36 36h-5v-9.099c0-2.198-1.225-3.698-3.192-3.698-1.501 0-2.313 1.012-2.707 1.99C24.957 25.543 25 26.511 25 27v9h-5V19h5v2.616C25.721 20.5 26.85 19 29.738 19c3.578 0 6.261 2.25 6.261 7.274L36 36 36 36z"})]}))},r}return t.init=function(n){return t.instance!==void 0?(console.warn("LinkedIn Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),cy=function(e){U.__extends(t,e);function t(n){var r=e.call(this,U.__assign({id:"okta",name:"Okta"},n))||this;return r.getLogo=function(){return ey},r}return t.init=function(n){return t.instance!==void 0?(console.warn("Okta Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt),dy=function(e){U.__extends(t,e);function t(n){var r=this,i="X",o=(n==null?void 0:n.useLegacyTwitterLogo)===!0;return o&&(i="Twitter"),r=e.call(this,U.__assign({id:"twitter",name:i},n))||this,r.useLegacyTwitterLogo=!1,r.getLogo=function(){return r.useLegacyTwitterLogo===!0?I.jsx("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"20.129",height:"16.356",viewBox:"0 0 20.129 16.356"},{children:I.jsx("g",{children:I.jsx("g",{children:I.jsx("path",{fill:"#04ABEE",d:"M45.232 35.964a8.242 8.242 0 0 1-2.372.649 4.141 4.141 0 0 0 1.816-2.284 8.268 8.268 0 0 1-2.623 1 4.133 4.133 0 0 0-7.037 3.771 11.724 11.724 0 0 1-8.516-4.317 4.133 4.133 0 0 0 1.282 5.517 4.1 4.1 0 0 1-1.87-.517v.052a4.132 4.132 0 0 0 3.313 4.049 4.147 4.147 0 0 1-1.865.071 4.134 4.134 0 0 0 3.858 2.868 8.338 8.338 0 0 1-6.114 1.71 11.745 11.745 0 0 0 18.08-9.894q0-.268-.012-.534a8.374 8.374 0 0 0 2.061-2.137z",transform:"translate(34.799 -7.41) translate(2.201 4.266) translate(-62.103 -30.883)"})})})})):I.jsx("svg",U.__assign({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 1200 1227"},{children:I.jsx("path",{d:"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z",fill:"#000"})}))},r.useLegacyTwitterLogo=o,r}return t.init=function(n){return t.instance!==void 0?(console.warn("Twitter Provider was already initialized"),t.instance):(t.instance=new t(n),t.instance)},t.reset=function(){U.isTest()&&(t.instance=void 0)},t}(Bt);function HR(e){e===void 0&&(e={});var t=$R(e.signInAndUpFeature),n=e.oAuthCallbackScreen===void 0?{}:{style:e.oAuthCallbackScreen.style},r=U.__assign({functions:function(i){return i}},e.override);return U.__assign(U.__assign({},RR.normaliseAuthRecipe(e)),{signInAndUpFeature:t,oAuthCallbackScreen:n,override:r})}function $R(e){e===void 0&&(e={}),e.providers===void 0&&(e.providers=[]);var t=e.style!==void 0?e.style:"",n=e.providers.map(function(i){return i instanceof Bt?i:xf.init(i)}),r=Array.from(new Set(n.map(function(i){return i.id}))).map(function(i){return n.find(function(o){return o.id===i})});return{style:t,providers:r}}function BR(e,t){var n=e.webJSRecipe.getStateAndOtherInfoFromStorage({userContext:t});return n===void 0?!1:n.rid===e.config.recipeId}function WR(e){return U.__awaiter(this,void 0,void 0,function(){var t,n,r,i,o;return U.__generator(this,function(a){switch(a.label){case 0:return[4,Wi.Multitenancy.getInstanceOrThrow().getCurrentDynamicLoginMethods({userContext:e.userContext})];case 1:return t=a.sent(),n=t!=null&&t.firstFactors.includes(Rl.FactorIds.THIRDPARTY)?t.thirdparty.providers:[],r=fy({tenantProviders:n,clientProviders:e.config.signInAndUpFeature.providers}),i=r.find(function(u){return u.id===e.thirdPartyId}),i===void 0?[2,{status:"ERROR"}]:[4,e.recipeImplementation.getAuthorisationURLWithQueryParamsAndSetState({thirdPartyId:e.thirdPartyId,frontendRedirectURI:i.getRedirectURL(),redirectURIOnProviderDashboard:i.getRedirectURIOnProviderDashboard(),shouldTryLinkingWithSessionUser:e.shouldTryLinkingWithSessionUser,userContext:e.userContext})];case 2:return o=a.sent(),U.redirectWithFullPageReload(o),[2,{status:"OK"}]}})})}var fy=function(e){var t=e.tenantProviders,n=t===void 0?[]:t,r=e.clientProviders,i=r===void 0?[]:r,o={apple:J2,google:sy,"google-workspaces":uy,github:oy,"active-directory":X2,bitbucket:Y2,"boxy-saml":ny,discord:ry,gitlab:ay,linkedin:ly,okta:cy,twitter:dy,facebook:iy},a=Wi.SuperTokens.usesDynamicLoginMethods===!0;if(a===!1&&(i==null?void 0:i.length)===0)throw new Error("ThirdParty signInAndUpFeature providers array cannot be empty.");if(a===!1||n.length===0)return i;for(var u=[],l=function(f){var h=i.find(function(S){var g=f.id;return S.id===g});if(h===void 0&&(h=i.find(function(S){var g=f.id;return g.startsWith(S.id)})),h!==void 0)u.push(xf.init(U.__assign(U.__assign({},h.config),{id:f.id,name:f.name,buttonComponent:h.getButton(f.name)})));else{var m=Object.keys(o).find(function(S){return f.id===S||f.id.startsWith(S)});if(o[m]){var y=new o[m]({id:f.id,name:f.name});u.push(y)}else u.push(xf.init(f))}},s=0,c=n;s"u"&&(n=n+U.SSR_ERROR),Error(n)}return t.instance},t.reset=function(){U.isTest()&&(t.instance=void 0)},t.RECIPE_ID="thirdparty",t}(kR.AuthRecipe),py=_R.createGenericComponentsOverrideContext(void 0,hy.RECIPE_ID),zR=py[0],VR=py[1];ot.ActiveDirectory=X2;ot.Apple=J2;ot.Bitbucket=Y2;ot.BoxySAML=ny;ot.Discord=ry;ot.Facebook=iy;ot.Github=oy;ot.Gitlab=ay;ot.Google=sy;ot.GoogleWorkspaces=uy;ot.LinkedIn=ly;ot.Okta=cy;ot.Provider=VR;ot.ThirdParty=hy;ot.Twitter=dy;ot.matchRecipeIdUsingState=BR;ot.mergeProviders=fy;ot.redirectToThirdPartyLogin=WR;ot.useContext=zR;Object.defineProperty(We,"__esModule",{value:!0});var ut=Ct,ke=ot,wr=function(){function e(){}return e.init=function(t){return ke.ThirdParty.init(t)},e.signOut=function(t){return ut.__awaiter(this,void 0,void 0,function(){return ut.__generator(this,function(n){return[2,ke.ThirdParty.getInstanceOrThrow().signOut({userContext:ut.getNormalisedUserContext(t==null?void 0:t.userContext)})]})})},e.redirectToThirdPartyLogin=function(t){return ut.__awaiter(this,void 0,void 0,function(){var n;return ut.__generator(this,function(r){return n=ke.ThirdParty.getInstanceOrThrow(),[2,ke.redirectToThirdPartyLogin({thirdPartyId:t.thirdPartyId,config:n.config,userContext:ut.getNormalisedUserContext(t.userContext),shouldTryLinkingWithSessionUser:t.shouldTryLinkingWithSessionUser,recipeImplementation:n.webJSRecipe})]})})},e.getStateAndOtherInfoFromStorage=function(t){return ke.ThirdParty.getInstanceOrThrow().webJSRecipe.getStateAndOtherInfoFromStorage(ut.__assign(ut.__assign({},t),{userContext:ut.getNormalisedUserContext(t==null?void 0:t.userContext)}))},e.getAuthorisationURLWithQueryParamsAndSetState=function(t){return ut.__awaiter(this,void 0,void 0,function(){return ut.__generator(this,function(n){return[2,ke.ThirdParty.getInstanceOrThrow().webJSRecipe.getAuthorisationURLWithQueryParamsAndSetState(ut.__assign(ut.__assign({},t),{userContext:ut.getNormalisedUserContext(t.userContext)}))]})})},e.signInAndUp=function(t){return ut.__awaiter(this,void 0,void 0,function(){return ut.__generator(this,function(n){return[2,ke.ThirdParty.getInstanceOrThrow().webJSRecipe.signInAndUp(ut.__assign(ut.__assign({},t),{userContext:ut.getNormalisedUserContext(t==null?void 0:t.userContext)}))]})})},e.getProviders=function(){return ke.ThirdParty.getInstanceOrThrow().config.signInAndUpFeature.providers.map(function(t){return{id:t.id,name:t.name}})},e.Apple=ke.Apple,e.Bitbucket=ke.Bitbucket,e.Discord=ke.Discord,e.Github=ke.Github,e.Gitlab=ke.Gitlab,e.Google=ke.Google,e.GoogleWorkspaces=ke.GoogleWorkspaces,e.Facebook=ke.Facebook,e.LinkedIn=ke.LinkedIn,e.ActiveDirectory=ke.ActiveDirectory,e.BoxySAML=ke.BoxySAML,e.Okta=ke.Okta,e.Twitter=ke.Twitter,e.ComponentsOverrideProvider=ke.Provider,e}(),GR=wr.init,qR=wr.signOut,QR=wr.redirectToThirdPartyLogin,KR=wr.getStateAndOtherInfoFromStorage,ZR=wr.getAuthorisationURLWithQueryParamsAndSetState,XR=wr.signInAndUp,JR=wr.getProviders,YR=wr.ComponentsOverrideProvider;We.ActiveDirectory=ke.ActiveDirectory;We.Apple=ke.Apple;We.Bitbucket=ke.Bitbucket;We.BoxySAML=ke.BoxySAML;We.Discord=ke.Discord;We.Facebook=ke.Facebook;We.Github=ke.Github;We.Gitlab=ke.Gitlab;We.Google=ke.Google;We.GoogleWorkspaces=ke.GoogleWorkspaces;We.LinkedIn=ke.LinkedIn;We.Okta=ke.Okta;We.Twitter=ke.Twitter;We.ThirdpartyComponentsOverrideProvider=YR;We.default=wr;We.getAuthorisationURLWithQueryParamsAndSetState=ZR;We.getProviders=JR;We.getStateAndOtherInfoFromStorage=KR;We.init=GR;We.redirectToThirdPartyLogin=QR;We.signInAndUp=XR;We.signOut=qR;(function(e){function t(n){for(var r in n)e.hasOwnProperty(r)||(e[r]=n[r])}e.__esModule=!0,t(We)})(mc);const eC=ps(mc);var Lr={},Xe={},y0={},tC=Qo,nC=Ln,gy=tC.createGenericComponentsOverrideContext(void 0,nC.Session.RECIPE_ID),rC=gy[0],iC=gy[1];y0.Provider=iC;y0.useContext=rC;Object.defineProperty(Xe,"__esModule",{value:!0});var Ie=Ct,w0=e0,oC=y0,_n=Ln,Cl=_e,aC=function(e){Ie.__extends(t,e);function t(n){var r=e.call(this,n)||this,i=Ie.__assign({},r.validators),o=function(u){var l=i[u];i[u]=function(){for(var s=[],c=0;c/?~]/,LC="8+ chars; upper/lower, number, symbol. Avoid spaces, quotes, backticks, backslashes.",DC="8+ chars; upper/lower, number, symbol";function my(e){const t=String(e||"");if(t.length<8)return"Use at least 8 characters.";if(!xC.test(t)||!AC.test(t))return"Use uppercase and lowercase letters.";if(!OC.test(t))return"Add at least one number.";if(!bC.test(t))return"Add at least one symbol.";if(EC.test(t))return"Avoid spaces, quotes, backticks, and backslashes."}const wc=_0();PC();const yy=wc.superTokensApiDomain,FC=wc.superTokensWebsiteDomain,MC=wc.superTokensApiBasePath,UC=wc.superTokensWebsiteBasePath,wy="false".toLowerCase()==="true",NC="false".toLowerCase()==="true";let Fg=!1;function jC(){if(typeof window>"u")return null;const e=new URLSearchParams(window.location.search),t=String(e.get("next")||e.get("redirectToPath")||"").trim();return!t||!t.startsWith("/")||t.startsWith("//")?null:t}const HC=` -[data-supertokens~="container"] { - --palette-background: 24, 26, 30; - --palette-inputBackground: 31, 33, 36; - --palette-inputBorder: 216, 203, 175; - --palette-primary: 216, 203, 175; - --palette-primaryBorder: 196, 169, 107; - --palette-success: 110, 231, 183; - --palette-successBackground: 6, 78, 59; - --palette-error: 248, 113, 113; - --palette-errorBackground: 69, 10, 10; - --palette-textTitle: 244, 246, 248; - --palette-textLabel: 226, 232, 240; - --palette-textInput: 248, 250, 252; - --palette-textPrimary: 216, 203, 175; - --palette-textLink: 196, 169, 107; - --palette-buttonText: 24, 26, 30; - --palette-superTokensBrandingBackground: 24, 26, 30; - --palette-superTokensBrandingText: 216, 203, 175; - width: min(440px, calc(100vw - 2rem)); - margin-top: 0; - border: 1px solid rgba(216, 203, 175, 0.25) !important; - border-radius: 24px !important; - background: #181A1E !important; - box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8) !important; -} - -[data-supertokens~="row"] { - width: 85%; -} - -[data-supertokens~="button"] { - min-height: 44px; - border-radius: 999px !important; - background: #D8CBAF !important; - border-color: #D8CBAF !important; - color: #181A1E !important; - font-weight: 600; -} - -[data-supertokens~="button"]:hover { - background: #BFAE8C !important; -} - -[data-supertokens~="inputWrapper"] { - min-height: 44px; - border-radius: 12px !important; - background: #1F2124 !important; - border: 1px solid rgba(216, 203, 175, 0.3) !important; - color: #F8FAFC !important; -} - -[data-supertokens~="showPassword"] { - display: flex !important; - cursor: pointer; - color: rgba(216, 203, 175, 0.6); -} - -[data-supertokens~="showPassword"]:hover { - color: #D8CBAF; -} -`;function S0(){return!!yy}function $T(){return wy}function BT(){return NC}function ro(){if(Fg||!S0()||typeof window>"u")return;const e={Google:mc.Google},t=[];wy&&t.push(e.Google.init());const n=[iR.init({signInAndUpFeature:{signInForm:{formFields:[{id:"email",label:"Work email",placeholder:"you@company.com"},{id:"password",label:"Password",placeholder:"Your password"}]},signUpForm:{formFields:[{id:"email",label:"Work email",placeholder:"you@company.com"},{id:"password",label:`Password (${LC})`,placeholder:DC,validate:async r=>my(String(r||""))}]}}}),TC.init()];t.length>0&&n.splice(1,0,eC.init({signInAndUpFeature:{providers:t}})),ik.init({appInfo:{appName:"ScriptoriumAI",apiDomain:yy,websiteDomain:FC||window.location.origin,apiBasePath:MC,websiteBasePath:UC},recipeList:n,style:HC,getRedirectionURL:async r=>{if(r.action==="SUCCESS")return jC()||"/app"}}),Fg=!0}const _y=Math.max(750,Math.min(2e3,8e3));function WT(){return{loaded:!1,reachable:!1,fallbackEnabled:!0,superTokensReady:!1,sourceBaseUrl:"",source:"none"}}function us(e){return String(e||"").trim().replace(/\/$/,"")}function Sy(e){const t=us((e==null?void 0:e.configuredBaseUrl)??"https://scriptoriumai.io"),n=us((e==null?void 0:e.locationOrigin)??(typeof window<"u"?window.location.origin:""));return Array.from(new Set([t,n].filter(Boolean)))}async function $C(e,t){var u,l;const n=us(e),r=(t==null?void 0:t.fetchImpl)??fetch,i=Math.max(1e3,(t==null?void 0:t.timeoutMs)??_y),o=new AbortController,a=setTimeout(()=>o.abort(),i);try{const s=await r(`${n}/api/auth/health`,{credentials:"include",signal:o.signal});if(!s.ok)return{loaded:!0,reachable:!1,fallbackEnabled:!0,superTokensReady:!1,sourceBaseUrl:n,source:"api_auth_health",error:`auth_health_http_${s.status}`};const c=await s.json();return{loaded:!0,reachable:!0,fallbackEnabled:((u=c==null?void 0:c.fallback)==null?void 0:u.enabled)!==!1,superTokensReady:!!((l=c==null?void 0:c.supertokens)!=null&&l.ready),sourceBaseUrl:n,source:"api_auth_health"}}catch(s){return{loaded:!0,reachable:!1,fallbackEnabled:!0,superTokensReady:!1,sourceBaseUrl:n,source:"api_auth_health",error:s instanceof Error?s.message:String(s)}}finally{clearTimeout(a)}}async function BC(e,t){var u,l;const n=us(e),r=(t==null?void 0:t.fetchImpl)??fetch,i=Math.max(1e3,(t==null?void 0:t.timeoutMs)??_y),o=["/config.json","/api/config.json"],a=[];for(const s of o){const c=new AbortController,d=setTimeout(()=>c.abort(),i);try{const f=await r(`${n}${s}`,{credentials:"include",signal:c.signal});if(!f.ok){a.push(`${s}:config_json_http_${f.status}`);continue}const h=await f.json(),m=h==null?void 0:h.auth;if(!m||typeof m!="object"){a.push(`${s}:config_json_auth_missing`);continue}return{loaded:!0,reachable:!0,fallbackEnabled:((u=m==null?void 0:m.fallback)==null?void 0:u.enabled)!==!1,superTokensReady:!!((l=m==null?void 0:m.supertokens)!=null&&l.ready),sourceBaseUrl:n,source:"config_json"}}catch(f){a.push(`${s}:${f instanceof Error?f.message:String(f)}`)}finally{clearTimeout(d)}}return{loaded:!0,reachable:!1,fallbackEnabled:!0,superTokensReady:!1,sourceBaseUrl:n,source:"config_json",error:a.join(" | ")||"config_json_unreachable"}}async function zT(e){const t=((e==null?void 0:e.baseUrls)??Sy()).map(r=>us(r)).filter(Boolean);if(!t.length)return{loaded:!0,reachable:!1,fallbackEnabled:!0,superTokensReady:!1,sourceBaseUrl:"",source:"none",error:"auth_health_base_url_missing"};const n=[];for(const r of t){const i=await $C(r,{timeoutMs:e==null?void 0:e.timeoutMs,fetchImpl:e==null?void 0:e.fetchImpl});if(i.reachable)return i;i.error&&n.push(`${r}: ${i.error}`);const o=await BC(r,{timeoutMs:e==null?void 0:e.timeoutMs,fetchImpl:e==null?void 0:e.fetchImpl});if(o.reachable)return o;o.error&&n.push(`${r}: ${o.error}`)}return{loaded:!0,reachable:!1,fallbackEnabled:!0,superTokensReady:!1,sourceBaseUrl:t[0]||"",source:"none",error:n.join(" | ")||"auth_health_unreachable"}}const WC=Math.max(1e3,1e4);function ky(e){return String(e||"").trim().replace(/\/$/,"")}function zC(e){return e.startsWith("/")?e:`/${e}`}function VC(e){return e===404||e===405}function Ry(e){const t=ky(e==null?void 0:e.configuredBaseUrl);return t&&(e==null?void 0:e.includeOriginFallback)!==!0?[t]:Sy({configuredBaseUrl:t,locationOrigin:e==null?void 0:e.locationOrigin})}async function k0(e,t,n){const r=(n==null?void 0:n.fetchImpl)??fetch,i=Math.max(1e3,(n==null?void 0:n.timeoutMs)??WC),o=((n==null?void 0:n.baseUrls)??Ry()).map(l=>ky(l)).filter(Boolean);if(!o.length)throw new Error("auth_api_base_url_missing");const a=zC(e),u=[];for(let l=0;ld.abort(),i);try{const h=await r(`${s}${a}`,{...t,headers:c,credentials:"include",signal:d.signal});if(VC(h.status)&&l=o.length-1)break}finally{clearTimeout(f)}}throw new Error(u.join(" | ")||"auth_api_request_failed")}async function VT(e,t){const n=await k0("/api/auth/validate-academic-email",{method:"POST",body:JSON.stringify({email:e})},t),r=await n.response.json().catch(()=>null);if(!n.response.ok||!r)throw new Error(`academic_email_validation_failed_${n.response.status}`);return r}const Qt="scriptorium.platform.user.v1",Cy="scriptorium.platform.color-mode.v1",Ty=_0(),Iy=Ty.authApiBaseUrl,Af=!!Iy,Py=Ty.authApiTimeoutMs,Ey=x.createContext(null);function GC(){if(typeof window>"u")return null;try{const e=window.localStorage.getItem(Qt);if(!e)return null;const t=JSON.parse(e);return!(t!=null&&t.id)||!(t!=null&&t.email)||!(t!=null&&t.authMethod)||t.authMethod!=="supertokens"&&t.authMethod!=="email"?null:t}catch{return null}}function qC(){if(typeof window>"u")return"dark";const e=window.localStorage.getItem(Cy);return e==="light"||e==="dark"?e:"dark"}function R0(e){return(e.split("@")[0]||"Operator").replace(/[._-]+/g," ").replace(/\b\w/g,n=>n.toUpperCase()).trim()}function qr(e){return String(e||"").trim().toLowerCase()}function QC(e){const t=String((e==null?void 0:e.plan)||(e==null?void 0:e.subscription)||"").toLowerCase();return t==="student"||t==="scholar"||t==="group"||t==="team"||t==="enterprise"||t==="free"?t:"free"}function xy(e){const t=String(e||"").trim().toLowerCase();if(t==="viewer"||t==="operator"||t==="reviewer"||t==="admin")return t}function Of(e,t){if(!e||typeof e!="object")return null;const n=e,r=String(n.id||"").trim(),i=qr(n.email);if(!r||!i||!i.includes("@"))return null;const o=String(n.plan||"").trim().toLowerCase(),u=new Set(["free","student","scholar","group","team","enterprise"]).has(o)?o:"free",l=String(n.auth_method||n.mode||"").trim().toLowerCase(),s=l==="supertokens"?"supertokens":l==="email_fallback"||l==="email"?"email":t,c=xy(n.role),d=n.is_admin===!0||n.isAdmin===!0||c==="admin";return{id:r,email:i,name:String(n.name||"").trim()||R0(i),plan:u,authMethod:s,role:c,isAdmin:d}}function gd(e){var l,s,c,d,f,h;const t=qr((l=e.payload)==null?void 0:l.email),n=qr((s=e.storedUser)==null?void 0:s.email),r=t||n||qr(e.fallbackEmail)||"operator@scriptoriumai.io",i=String(((c=e.payload)==null?void 0:c.name)||"").trim(),o=String(e.fallbackName||"").trim(),a=i||o||((d=e.storedUser)==null?void 0:d.name)||R0(r),u=xy((f=e.payload)==null?void 0:f.role);return{id:e.userId,name:a,email:r,authMethod:"supertokens",plan:QC(e.payload),role:u,isAdmin:((h=e.payload)==null?void 0:h.is_admin)===!0||u==="admin"}}async function Mg(e){try{const t=await e.json();return t.error||t.message||`Request failed (${e.status}).`}catch{return`Request failed (${e.status}).`}}function C0(){return Ry({configuredBaseUrl:Iy,includeOriginFallback:!Af})}function Uu(){return C0().length>0}async function vd(e,t){return(await k0(e,t,{baseUrls:C0(),timeoutMs:Py})).response}async function KC(e){if(!Uu())return{status:"unavailable",user:null};try{const t=await k0("/api/auth/me",void 0,{baseUrls:C0(),timeoutMs:Math.min(Py,1500)}).then(i=>i.response);if(!t.ok)return{status:t.status===401?"unauthorized":"unavailable",user:null};const n=await t.json().catch(()=>null),r=Of(n!=null&&n.user&&typeof n.user=="object"?{...n.user,mode:n==null?void 0:n.mode}:null,e);return r?{status:"ok",user:r}:{status:"unavailable",user:null}}catch{return{status:"unavailable",user:null}}}function ZC({children:e}){const[t,n]=x.useState(null),[r,i]=x.useState(!0),[o,a]=x.useState("dark"),u=S0();x.useEffect(()=>{let y=!0;a(qC());const S=async()=>{const v=GC();u&&(v==null?void 0:v.authMethod)==="supertokens"&&y&&(n(v),i(!1));const p=await KC(u?"supertokens":"email");if(p.status==="ok"){y&&(n(p.user),window.localStorage.setItem(Qt,JSON.stringify(p.user)),i(!1));return}if(!u){y&&(p.status==="unauthorized"?(n(null),window.localStorage.removeItem(Qt)):n(v),i(!1));return}try{ro();const w=2500,_=await Promise.race([Lr.doesSessionExist(),new Promise(k=>setTimeout(()=>k(!1),w))]);if(!y)return;if(_){const k=await Lr.getUserId(),T=await Lr.getAccessTokenPayloadSecurely().catch(()=>null),P=gd({userId:k,payload:T&&typeof T=="object"?T:null,storedUser:v});n(P),window.localStorage.setItem(Qt,JSON.stringify(P))}else(v==null?void 0:v.authMethod)==="email"&&p.status!=="unauthorized"?n(v):(n(null),window.localStorage.removeItem(Qt))}catch(w){if(console.error("SuperTokens initialization failed:",w),!y)return;p.status==="unauthorized"?(n(null),window.localStorage.removeItem(Qt)):n((v==null?void 0:v.authMethod)==="email"?v:null)}finally{y&&i(!1)}},g=setTimeout(()=>{y&&i(!1)},3500);return S().finally(()=>clearTimeout(g)),()=>{y=!1,clearTimeout(g)}},[u]),x.useEffect(()=>{typeof window>"u"||(window.localStorage.setItem(Cy,o),document.documentElement.classList.toggle("dark",o==="dark"),document.documentElement.classList.toggle("light",o==="light"),document.documentElement.setAttribute("data-color-mode",o))},[o]);const l=x.useCallback(async y=>{var p,w;const S=qr(y.email);if(!S||!S.includes("@"))return{ok:!1,error:"Please enter a valid email."};const g=String(y.password||"");if(y.method==="supertokens"){if(!g)return{ok:!1,error:"Email and password are required."};if(u)try{ro();const R=await wl.signIn({formFields:[{id:"email",value:S},{id:"password",value:g}]});if(R.status==="FIELD_ERROR")return{ok:!1,error:((p=R.formFields[0])==null?void 0:p.error)||"Invalid form input."};if(R.status==="WRONG_CREDENTIALS_ERROR")return{ok:!1,error:"Invalid email or password."};if(R.status==="SIGN_IN_NOT_ALLOWED")return{ok:!1,error:R.reason||"Sign in is not allowed for this account."};const _=String(R.user.id||`supertokens_${Date.now()}`),k=Array.isArray(R.user.emails)?qr((w=R.user.emails)==null?void 0:w[0]):S,T=await Lr.getAccessTokenPayloadSecurely().catch(()=>null),P=gd({userId:_,payload:T&&typeof T=="object"?T:null,storedUser:t,fallbackEmail:k,fallbackName:String(y.name||"").trim()});return n(P),typeof window<"u"&&window.localStorage.setItem(Qt,JSON.stringify(P)),{ok:!0}}catch(R){return{ok:!1,error:R instanceof Error?R.message:"Unable to sign in with SuperTokens right now."}}if(g.length<8)return{ok:!1,error:"SuperTokens fallback requires at least 8 characters for password."}}if(y.method==="email"){if(!g)return{ok:!1,error:"Email and password are required."};if(Uu())try{const _=await vd("/api/auth/login",{method:"POST",body:JSON.stringify({email:S,password:g,name:String(y.name||"").trim()||void 0})});if(!_.ok)return{ok:!1,error:await Mg(_)};const k=await _.json().catch(()=>null),T=Of(k!=null&&k.user&&typeof k.user=="object"?{...k.user,mode:k==null?void 0:k.mode}:null,"email");if(T)return n(T),typeof window<"u"&&window.localStorage.setItem(Qt,JSON.stringify(T)),{ok:!0};if(Af)return{ok:!1,error:"Auth API response did not include a valid user payload."}}catch(_){if(Af)return{ok:!1,error:_ instanceof Error?_.message:"Unable to login right now."}}if(g.length<8)return{ok:!1,error:"Email login requires at least 8 characters for password."}}await new Promise(R=>setTimeout(R,200));const v={id:`user_${Date.now()}`,name:String(y.name||"").trim()||R0(S),email:S,authMethod:y.method,plan:"free"};return n(v),typeof window<"u"&&window.localStorage.setItem(Qt,JSON.stringify(v)),{ok:!0}},[u,t]),s=x.useCallback(async y=>{var p,w;const S=qr(y.email);if(!S||!S.includes("@"))return{ok:!1,error:"Please enter a valid email."};const g=String(y.password||"");if(!g)return{ok:!1,error:"Email and password are required."};const v=my(g);if(v)return{ok:!1,error:v};if(y.method==="supertokens"){if(!u)return{ok:!1,error:"SuperTokens sign-up is not configured right now."};try{ro();const R=await wl.signUp({formFields:[{id:"email",value:S},{id:"password",value:g}]});if(R.status==="FIELD_ERROR")return{ok:!1,error:((p=R.formFields[0])==null?void 0:p.error)||"Invalid form input."};if(R.status==="SIGN_UP_NOT_ALLOWED")return{ok:!1,error:R.reason||"Account creation is not allowed for this email."};const _=String(R.user.id||`supertokens_${Date.now()}`),k=Array.isArray(R.user.emails)?qr((w=R.user.emails)==null?void 0:w[0]):S,T=await Lr.getAccessTokenPayloadSecurely().catch(()=>null),P=gd({userId:_,payload:T&&typeof T=="object"?T:null,storedUser:t,fallbackEmail:k,fallbackName:String(y.name||"").trim()});return n(P),typeof window<"u"&&window.localStorage.setItem(Qt,JSON.stringify(P)),{ok:!0}}catch(R){return{ok:!1,error:R instanceof Error?R.message:"Unable to create the account right now."}}}if(!Uu())return{ok:!1,error:"Email registration is not configured right now."};try{const R=await vd("/api/auth/login",{method:"POST",body:JSON.stringify({email:S,password:g,name:String(y.name||"").trim()||void 0})});if(!R.ok)return{ok:!1,error:await Mg(R)};const _=await R.json().catch(()=>null),k=Of(_!=null&&_.user&&typeof _.user=="object"?{..._.user,mode:_==null?void 0:_.mode}:null,"email");return k?(n(k),typeof window<"u"&&window.localStorage.setItem(Qt,JSON.stringify(k)),{ok:!0}):{ok:!1,error:"Auth API response did not include a valid user payload."}}catch(R){return{ok:!1,error:R instanceof Error?R.message:"Unable to create the account right now."}}},[u,t]),c=x.useCallback(async y=>{if(!u){console.warn("[auth] loginWithProvider called but SuperTokens is not configured.");return}ro();const S=y==="orcid"?"orcid":"google";await mc.redirectToThirdPartyLogin({thirdPartyId:S})},[u]),d=x.useCallback(()=>{if(u&&(t==null?void 0:t.authMethod)==="supertokens")try{ro(),Lr.signOut()}catch(y){console.error("SuperTokens sign out failed:",y)}(!u||(t==null?void 0:t.authMethod)==="email")&&Uu()&&vd("/api/auth/logout",{method:"POST"}).catch(()=>{}),n(null),typeof window<"u"&&window.localStorage.removeItem(Qt)},[u,t==null?void 0:t.authMethod]),f=x.useCallback(y=>{n(S=>{if(!S)return S;const g={...S,...y};return typeof window<"u"&&window.localStorage.setItem(Qt,JSON.stringify(g)),g})},[]),h=x.useCallback(()=>{a(y=>y==="dark"?"light":"dark")},[]),m=x.useMemo(()=>({user:t,isAuthenticated:!!t,isLoading:r,superTokensConfigured:u,colorMode:o,login:l,register:s,loginWithProvider:c,logout:d,toggleColorMode:h,updateUser:f}),[t,r,u,o,l,s,c,d,h,f]);return Z.jsx(Ey.Provider,{value:m,children:e})}function GT(){const e=x.useContext(Ey);if(!e)throw new Error("usePlatformAuth must be used inside PlatformAuthProvider");return e}const bf="scriptorium.tutorial-mode.v1",XC=x.createContext(null);function JC(){try{return localStorage.getItem(bf)==="true"}catch{return!1}}function YC({children:e}){const[t,n]=x.useState(JC),r=x.useCallback(u=>{try{localStorage.setItem(bf,String(u))}catch{}n(u)},[]);x.useEffect(()=>{const u=l=>{l.key===bf&&n(l.newValue==="true")};return window.addEventListener("storage",u),()=>window.removeEventListener("storage",u)},[]);const i=x.useCallback(()=>r(!t),[r,t]),o=x.useCallback(()=>r(!0),[r]),a=x.useCallback(()=>r(!1),[r]);return Z.jsx(XC.Provider,{value:{tutorialMode:t,toggleTutorialMode:i,enableTutorialMode:o,disableTutorialMode:a},children:e})}/** - * @remix-run/router v1.23.0 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function ls(){return ls=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Ay(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function t7(){return Math.random().toString(36).substr(2,8)}function Ng(e,t){return{usr:e.state,key:e.key,idx:t}}function Lf(e,t,n,r){return n===void 0&&(n=null),ls({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Jo(t):t,{state:n,key:t&&t.key||r||t7()})}function Tl(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Jo(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function n7(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,u=Qr.Pop,l=null,s=c();s==null&&(s=0,a.replaceState(ls({},a.state,{idx:s}),""));function c(){return(a.state||{idx:null}).idx}function d(){u=Qr.Pop;let S=c(),g=S==null?null:S-s;s=S,l&&l({action:u,location:y.location,delta:g})}function f(S,g){u=Qr.Push;let v=Lf(y.location,S,g);s=c()+1;let p=Ng(v,s),w=y.createHref(v);try{a.pushState(p,"",w)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(w)}o&&l&&l({action:u,location:y.location,delta:1})}function h(S,g){u=Qr.Replace;let v=Lf(y.location,S,g);s=c();let p=Ng(v,s),w=y.createHref(v);a.replaceState(p,"",w),o&&l&&l({action:u,location:y.location,delta:0})}function m(S){let g=i.location.origin!=="null"?i.location.origin:i.location.href,v=typeof S=="string"?S:Tl(S);return v=v.replace(/ $/,"%20"),et(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let y={get action(){return u},get location(){return e(i,a)},listen(S){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Ug,d),l=S,()=>{i.removeEventListener(Ug,d),l=null}},createHref(S){return t(i,S)},createURL:m,encodeLocation(S){let g=m(S);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:f,replace:h,go(S){return a.go(S)}};return y}var jg;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(jg||(jg={}));function r7(e,t,n){return n===void 0&&(n="/"),i7(e,t,n)}function i7(e,t,n,r){let i=typeof t=="string"?Jo(t):t,o=T0(i.pathname||"/",n);if(o==null)return null;let a=Oy(e);o7(a);let u=null;for(let l=0;u==null&&l{let l={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(et(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let s=ri([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(et(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Oy(o.children,t,c,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:f7(s,o.index),routesMeta:c})};return e.forEach((o,a)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))i(o,a);else for(let l of by(o.path))i(o,a,l)}),t}function by(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=by(r.join("/")),u=[];return u.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&u.push(...a),u.map(l=>e.startsWith("/")&&l===""?"/":l)}function o7(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:h7(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const a7=/^:[\w-]+$/,s7=3,u7=2,l7=1,c7=10,d7=-2,Hg=e=>e==="*";function f7(e,t){let n=e.split("/"),r=n.length;return n.some(Hg)&&(r+=d7),t&&(r+=u7),n.filter(i=>!Hg(i)).reduce((i,o)=>i+(a7.test(o)?s7:o===""?l7:c7),r)}function h7(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function p7(e,t,n){let{routesMeta:r}=e,i={},o="/",a=[];for(let u=0;u{let{paramName:f,isOptional:h}=c;if(f==="*"){let y=u[d]||"";a=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const m=u[d];return h&&!m?s[f]=void 0:s[f]=(m||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:a,pattern:e}}function v7(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Ay(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,u,l)=>(r.push({paramName:u,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function m7(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ay(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function T0(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function y7(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Jo(e):e;return{pathname:n?n.startsWith("/")?n:w7(n,t):t,search:k7(r),hash:R7(i)}}function w7(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function md(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function _7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function I0(e,t){let n=_7(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function P0(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Jo(e):(i=ls({},e),et(!i.pathname||!i.pathname.includes("?"),md("?","pathname","search",i)),et(!i.pathname||!i.pathname.includes("#"),md("#","pathname","hash",i)),et(!i.search||!i.search.includes("#"),md("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,u;if(a==null)u=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}u=d>=0?t[d]:"/"}let l=y7(i,u),s=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(s||c)&&(l.pathname+="/"),l}const ri=e=>e.join("/").replace(/\/\/+/g,"/"),S7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),k7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,R7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function C7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ly=["post","put","patch","delete"];new Set(Ly);const T7=["get",...Ly];new Set(T7);/** - * React Router v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function cs(){return cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),x.useCallback(function(s,c){if(c===void 0&&(c={}),!u.current)return;if(typeof s=="number"){r.go(s);return}let d=P0(s,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:ri([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,o,e])}function My(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(vi),{matches:i}=x.useContext(mi),{pathname:o}=ea(),a=JSON.stringify(I0(i,r.v7_relativeSplatPath));return x.useMemo(()=>P0(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function x7(e,t){return A7(e,t)}function A7(e,t,n,r){Yo()||et(!1);let{navigator:i}=x.useContext(vi),{matches:o}=x.useContext(mi),a=o[o.length-1],u=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let s=ea(),c;if(t){var d;let S=typeof t=="string"?Jo(t):t;l==="/"||(d=S.pathname)!=null&&d.startsWith(l)||et(!1),c=S}else c=s;let f=c.pathname||"/",h=f;if(l!=="/"){let S=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(S.length).join("/")}let m=r7(e,{pathname:h}),y=F7(m&&m.map(S=>Object.assign({},S,{params:Object.assign({},u,S.params),pathname:ri([l,i.encodeLocation?i.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?l:ri([l,i.encodeLocation?i.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,n,r);return t&&y?x.createElement(_c.Provider,{value:{location:cs({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Qr.Pop}},y):y}function O7(){let e=j7(),t=C7(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,null)}const b7=x.createElement(O7,null);class L7 extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?x.createElement(mi.Provider,{value:this.props.routeContext},x.createElement(Dy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function D7(e){let{routeContext:t,match:n,children:r}=e,i=x.useContext(E0);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(mi.Provider,{value:t},r)}function F7(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,u=(i=n)==null?void 0:i.errors;if(u!=null){let c=a.findIndex(d=>d.route.id&&(u==null?void 0:u[d.route.id])!==void 0);c>=0||et(!1),a=a.slice(0,Math.min(a.length,c+1))}let l=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,s+1):a=[a[0]];break}}}return a.reduceRight((c,d,f)=>{let h,m=!1,y=null,S=null;n&&(h=u&&d.route.id?u[d.route.id]:void 0,y=d.route.errorElement||b7,l&&(s<0&&f===0?($7("route-fallback"),m=!0,S=null):s===f&&(m=!0,S=d.route.hydrateFallbackElement||null)));let g=t.concat(a.slice(0,f+1)),v=()=>{let p;return h?p=y:m?p=S:d.route.Component?p=x.createElement(d.route.Component,null):d.route.element?p=d.route.element:p=c,x.createElement(D7,{match:d,routeContext:{outlet:c,matches:g,isDataRoute:n!=null},children:p})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?x.createElement(L7,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var Uy=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Uy||{}),Ny=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Ny||{});function M7(e){let t=x.useContext(E0);return t||et(!1),t}function U7(e){let t=x.useContext(I7);return t||et(!1),t}function N7(e){let t=x.useContext(mi);return t||et(!1),t}function jy(e){let t=N7(),n=t.matches[t.matches.length-1];return n.route.id||et(!1),n.route.id}function j7(){var e;let t=x.useContext(Dy),n=U7(),r=jy();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function H7(){let{router:e}=M7(Uy.UseNavigateStable),t=jy(Ny.UseNavigateStable),n=x.useRef(!1);return Fy(()=>{n.current=!0}),x.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,cs({fromRouteId:t},o)))},[e,t])}const $g={};function $7(e,t,n){$g[e]||($g[e]=!0)}function B7(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function W7(e){let{to:t,replace:n,state:r,relative:i}=e;Yo()||et(!1);let{future:o,static:a}=x.useContext(vi),{matches:u}=x.useContext(mi),{pathname:l}=ea(),s=x0(),c=P0(t,I0(u,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(c);return x.useEffect(()=>s(JSON.parse(d),{replace:n,state:r,relative:i}),[s,d,i,n,r]),null}function pt(e){et(!1)}function z7(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Qr.Pop,navigator:o,static:a=!1,future:u}=e;Yo()&&et(!1);let l=t.replace(/^\/*/,"/"),s=x.useMemo(()=>({basename:l,navigator:o,static:a,future:cs({v7_relativeSplatPath:!1},u)}),[l,u,o,a]);typeof r=="string"&&(r=Jo(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:m="default"}=r,y=x.useMemo(()=>{let S=T0(c,l);return S==null?null:{location:{pathname:S,search:d,hash:f,state:h,key:m},navigationType:i}},[l,c,d,f,h,m,i]);return y==null?null:x.createElement(vi.Provider,{value:s},x.createElement(_c.Provider,{children:n,value:y}))}function V7(e){let{children:t,location:n}=e;return x7(Df(t),n)}new Promise(()=>{});function Df(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let o=[...t,i];if(r.type===x.Fragment){n.push.apply(n,Df(r.props.children,o));return}r.type!==pt&&et(!1),!r.props.index||!r.props.children||et(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Df(r.props.children,o)),n.push(a)}),n}/** - * React Router DOM v6.30.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Ff(){return Ff=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function q7(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Q7(e,t){return e.button===0&&(!t||t==="_self")&&!q7(e)}function Mf(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function K7(e,t){let n=Mf(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const Z7=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],X7="6";try{window.__reactRouterVersion=X7}catch{}const J7="startTransition",Bg=o3[J7];function Y7(e){let{basename:t,children:n,future:r,window:i}=e,o=x.useRef();o.current==null&&(o.current=e7({window:i,v5Compat:!0}));let a=o.current,[u,l]=x.useState({action:a.action,location:a.location}),{v7_startTransition:s}=r||{},c=x.useCallback(d=>{s&&Bg?Bg(()=>l(d)):l(d)},[l,s]);return x.useLayoutEffect(()=>a.listen(c),[a,c]),x.useEffect(()=>B7(r),[r]),x.createElement(z7,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:a,future:r})}const eT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",tT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qT=x.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:u,target:l,to:s,preventScrollReset:c,viewTransition:d}=t,f=G7(t,Z7),{basename:h}=x.useContext(vi),m,y=!1;if(typeof s=="string"&&tT.test(s)&&(m=s,eT))try{let p=new URL(window.location.href),w=s.startsWith("//")?new URL(p.protocol+s):new URL(s),R=T0(w.pathname,h);w.origin===p.origin&&R!=null?s=R+w.search+w.hash:y=!0}catch{}let S=P7(s,{relative:i}),g=nT(s,{replace:a,state:u,target:l,preventScrollReset:c,relative:i,viewTransition:d});function v(p){r&&r(p),p.defaultPrevented||g(p)}return x.createElement("a",Ff({},f,{href:m||S,onClick:y||o?r:v,ref:n,target:l}))});var Wg;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Wg||(Wg={}));var zg;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(zg||(zg={}));function nT(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:u}=t===void 0?{}:t,l=x0(),s=ea(),c=My(e,{relative:a});return x.useCallback(d=>{if(Q7(d,n)){d.preventDefault();let f=r!==void 0?r:Tl(s)===Tl(c);l(e,{replace:f,state:i,preventScrollReset:o,relative:a,viewTransition:u})}},[s,l,c,r,i,n,e,o,a,u])}function QT(e){let t=x.useRef(Mf(e)),n=x.useRef(!1),r=ea(),i=x.useMemo(()=>K7(r.search,n.current?null:t.current),[r.search]),o=x0(),a=x.useCallback((u,l)=>{const s=Mf(typeof u=="function"?u(i):u);n.current=!0,o("?"+s,l)},[o,i]);return[i,a]}const rT={v7_startTransition:!0,v7_relativeSplatPath:!0},Su=68,iT=.34,Vg=6e3,oT=5400,aT=4.6,sT=24,uT=6,lT=3,cT=4,dT=Math.PI/2,fT=.92;function hT(e,t,n,r){return{x:n+t*Math.sin(lT*e+dT),y:r+t*fT*Math.sin(cT*e)}}function pT({text:e="Loading"}){const t=x.useRef(null),n=x.useRef(0),r=x.useRef(null);return x.useEffect(()=>{const i=t.current;if(!i)return;i.querySelectorAll(".liss-dynamic").forEach(u=>u.remove());const o=[];for(let u=0;u{r.current===null&&(r.current=u);const l=u-r.current,{width:s,height:c}=i.getBoundingClientRect(),d=s/2,f=c/2,h=.5+.5*Math.sin(2*Math.PI*l/oT),m=sT+uT*h,y=l%Vg/Vg*2*Math.PI;for(let S=0;S{cancelAnimationFrame(n.current),r.current=null}},[]),Z.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 select-none",children:[Z.jsx("svg",{ref:t,width:"120",height:"80",viewBox:"0 0 120 80","aria-hidden":"true",className:"overflow-visible",style:{display:"block"}}),e&&Z.jsx("span",{className:"text-sm font-medium tracking-widest uppercase text-[#8A9099] opacity-70 animate-pulse",children:e})]})}function gT({title:e="Loading"}){return Z.jsx("div",{className:"h-full w-full flex flex-col items-center justify-center bg-[#181A1E] text-gray-300 gap-4",children:Z.jsx(pT,{text:e})})}const vT="modulepreload",mT=function(e){return"/"+e},Gg={},Ft=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),u=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=mT(l),l in Gg)return;Gg[l]=!0;const s=l.endsWith(".css"),c=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${c}`))return;const d=document.createElement("link");if(d.rel=s?"stylesheet":vT,s||(d.as="script"),d.crossOrigin="",d.href=l,u&&d.setAttribute("nonce",u),document.head.appendChild(d),s)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return i.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})},yT=x.lazy(async()=>({default:(await Ft(()=>import("./HomeLanding-CMrIE0Xa.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]))).HomeLanding})),wT=x.lazy(async()=>({default:(await Ft(()=>import("./AboutPage-DwEinoFu.js"),__vite__mapDeps([8,1,2,3]))).AboutPage})),_T=x.lazy(async()=>({default:(await Ft(()=>import("./LoginPage-C958rnep.js"),__vite__mapDeps([9,1,10,11]))).LoginPage})),ST=x.lazy(async()=>({default:(await Ft(()=>import("./RegisterPage-BbT7Ul1-.js"),__vite__mapDeps([12,1,10,11]))).RegisterPage})),kT=x.lazy(async()=>({default:(await Ft(()=>import("./PricingPage-CSaw9bYM.js"),__vite__mapDeps([13,1,2,10,3,5,7]))).PricingPage})),RT=x.lazy(async()=>({default:(await Ft(()=>import("./AffiliateProgramPage-DccP8xMz.js"),__vite__mapDeps([14,1,2,3,5,15]))).AffiliateProgramPage})),CT=x.lazy(async()=>({default:(await Ft(()=>import("./AffiliateResourcesPage-DtWyke4f.js"),__vite__mapDeps([16,1,2,3,15,17]))).AffiliateResourcesPage})),TT=x.lazy(async()=>({default:(await Ft(()=>import("./SupportPage-CTKn1axq.js"),__vite__mapDeps([18,1,2,6]))).SupportPage})),IT=x.lazy(async()=>({default:(await Ft(()=>import("./ChangelogPage-DgB9RcIb.js"),__vite__mapDeps([19,1]))).ChangelogPage})),PT=x.lazy(async()=>({default:(await Ft(()=>import("./DocsPage-DVm6ovlc.js"),__vite__mapDeps([20,1,2,3,6,4,17]))).DocsPage})),ET=x.lazy(async()=>({default:(await Ft(()=>import("./HelpCenterPage-Dq9CNrOI.js"),__vite__mapDeps([21,1,2]))).HelpCenterPage})),xT=x.lazy(async()=>({default:(await Ft(()=>import("./ImpressumPage-Df0oO5Hs.js"),__vite__mapDeps([22,1,23]))).ImpressumPage})),AT=x.lazy(async()=>({default:(await Ft(()=>import("./PrivacyPage-D9Ihd_q3.js"),__vite__mapDeps([24,1,23,25]))).PrivacyPage})),OT=x.lazy(async()=>({default:(await Ft(()=>import("./TermsPage-CZ6P_pT2.js"),__vite__mapDeps([26,1,23,25]))).TermsPage})),bT=x.lazy(async()=>({default:(await Ft(()=>import("./WithdrawalPage-CdZT6ngS.js"),__vite__mapDeps([27,1,23,25]))).WithdrawalPage})),LT=x.lazy(async()=>({default:(await Ft(()=>import("./ShippingPaymentPage-BVPweEr5.js"),__vite__mapDeps([28,1,23,25]))).ShippingPaymentPage}));function xt(e,t){return Z.jsx(x.Suspense,{fallback:Z.jsx(gT,{title:e}),children:t})}function DT(){return Z.jsxs(Z.Fragment,{children:[Z.jsx(pt,{path:"/",element:xt("Loading FamiliarOS...",Z.jsx(yT,{}))}),Z.jsx(pt,{path:"/about",element:xt("About",Z.jsx(wT,{}))}),Z.jsx(pt,{path:"/docs",element:xt("Documentation",Z.jsx(PT,{}))}),Z.jsx(pt,{path:"/help",element:xt("Help Center",Z.jsx(ET,{}))}),Z.jsx(pt,{path:"/affiliate-program",element:xt("Affiliate Program",Z.jsx(RT,{}))}),Z.jsx(pt,{path:"/affiliate-resources",element:xt("Affiliate Resources",Z.jsx(CT,{}))}),Z.jsx(pt,{path:"/support",element:xt("SupportPage",Z.jsx(TT,{}))}),Z.jsx(pt,{path:"/changelog",element:xt("ChangelogPage",Z.jsx(IT,{}))}),Z.jsx(pt,{path:"/pricing",element:xt("PricingPage",Z.jsx(kT,{}))}),Z.jsx(pt,{path:"/login",element:xt("LoginPage",Z.jsx(_T,{}))}),Z.jsx(pt,{path:"/register",element:xt("RegisterPage",Z.jsx(ST,{}))}),Z.jsx(pt,{path:"/impressum",element:xt("ImpressumPage",Z.jsx(xT,{}))}),Z.jsx(pt,{path:"/privacy",element:xt("PrivacyPage",Z.jsx(AT,{}))}),Z.jsx(pt,{path:"/terms",element:xt("TermsPage",Z.jsx(OT,{}))}),Z.jsx(pt,{path:"/withdrawal",element:xt("WithdrawalPage",Z.jsx(bT,{}))}),Z.jsx(pt,{path:"/shipping-payment",element:xt("ShippingPaymentPage",Z.jsx(LT,{}))})]})}function FT(){return Z.jsx(Y7,{future:rT,children:Z.jsxs(V7,{children:[DT(),Z.jsx(pt,{path:"*",element:Z.jsx(W7,{to:"/",replace:!0})})]})})}const MT=new $w({defaultOptions:{queries:{staleTime:1e3*60*5,retry:1}}});function UT({children:e}){return S0()?Z.jsx(Fh.SuperTokensWrapper,{children:e}):Z.jsx(Z.Fragment,{children:e})}function NT(){return Z.jsxs(Ww,{client:MT,children:[Z.jsx(UT,{children:Z.jsx(ZC,{children:Z.jsx(YC,{children:Z.jsx(ok,{children:Z.jsx(FT,{})})})})}),Z.jsx(O_,{position:"top-center",toastOptions:{duration:3e3,style:{background:"#1f2937",color:"#f9fafb",border:"1px solid #374151"},success:{iconTheme:{primary:"#8b5cf6",secondary:"#fff"}},error:{iconTheme:{primary:"#ef4444",secondary:"#fff"}}}})]})}ro();yd.createRoot(document.getElementById("root")).render(Z.jsx(f1.StrictMode,{children:Z.jsx(NT,{})}));export{qT as L,W7 as N,DC as P,QT as a,x0 as b,WT as c,BT as d,LC as e,ea as f,$T as i,Z as j,zT as p,x as r,GT as u,VT as v,HT as z}; diff --git a/dist/assets/key-round-BLVtnvIK.js b/dist/assets/key-round-BLVtnvIK.js deleted file mode 100644 index a1a8a218..00000000 --- a/dist/assets/key-round-BLVtnvIK.js +++ /dev/null @@ -1,16 +0,0 @@ -import{c as e}from"./MarketingShell-BgYQ8Cfp.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y=e("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const a=e("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r=e("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);export{y as E,r as K,a}; diff --git a/dist/assets/notifications-BfjEGrJX.js b/dist/assets/notifications-BfjEGrJX.js deleted file mode 100644 index 9fe5610b..00000000 --- a/dist/assets/notifications-BfjEGrJX.js +++ /dev/null @@ -1 +0,0 @@ -import{z as i}from"./index-D-wwVRoV.js";const e={success:(s,o=3e3)=>i.success(s,{duration:o}),error:(s,o=4e3)=>i.error(s,{duration:o}),loading:s=>i.loading(s),info:(s,o=3e3)=>i(s,{duration:o,icon:"ℹ️"}),dismiss:s=>i.dismiss(s),promise:(s,o)=>i.promise(s,o),custom:(s,o)=>i(s,{icon:o})};export{e as n}; diff --git a/dist/assets/shield-check-DmMPB5ob.js b/dist/assets/shield-check-DmMPB5ob.js deleted file mode 100644 index c38c49f2..00000000 --- a/dist/assets/shield-check-DmMPB5ob.js +++ /dev/null @@ -1,11 +0,0 @@ -import{c as e}from"./MarketingShell-BgYQ8Cfp.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c=e("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const h=e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);export{c as L,h as S}; diff --git a/dist/assets/users-B0OVFCFN.js b/dist/assets/users-B0OVFCFN.js deleted file mode 100644 index db408f69..00000000 --- a/dist/assets/users-B0OVFCFN.js +++ /dev/null @@ -1,6 +0,0 @@ -import{c as e}from"./MarketingShell-BgYQ8Cfp.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c=e("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);export{c as U}; diff --git a/dist/assets/workflow-DutrKdOb.js b/dist/assets/workflow-DutrKdOb.js deleted file mode 100644 index 4753ed7a..00000000 --- a/dist/assets/workflow-DutrKdOb.js +++ /dev/null @@ -1,31 +0,0 @@ -import{c as e}from"./MarketingShell-BgYQ8Cfp.js";/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const t=e("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const y=e("Cpu",[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const c=e("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k=e("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const a=e("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const r=e("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);export{t as B,y as C,c as G,k as N,a as S,r as W}; diff --git a/dist/index.html b/dist/index.html index d5204ba0..8516310c 100644 --- a/dist/index.html +++ b/dist/index.html @@ -15,8 +15,8 @@ ScriptoriumAI — AI-Native Research & Scientific Publication Suite - - + +
diff --git a/src/components/marketing/MarketingShell.tsx b/src/components/marketing/MarketingShell.tsx index 187d91d6..6da47043 100755 --- a/src/components/marketing/MarketingShell.tsx +++ b/src/components/marketing/MarketingShell.tsx @@ -1,6 +1,6 @@ import { useMemo, useRef, useState, type ReactNode } from 'react' import { Link, useLocation } from 'react-router-dom' -import { ChevronDown, Instagram, Linkedin, Menu, Moon, Sun, X, Youtube } from 'lucide-react' +import { Bot, ChevronDown, Instagram, Linkedin, Menu, Moon, Sun, X, Youtube } from 'lucide-react' import { ItshoverExternalLinkIcon } from '../icons/itshover-subset' import { usePlatformAuth } from '../../auth/platform-auth' import { brandConfig } from './brand-config' @@ -75,9 +75,9 @@ export function MarketingShell({ children, showFooter = true }: MarketingShellPr const headerInnerClassName = isHomePage ? `mx-auto flex w-full max-w-7xl items-center gap-3 pl-0 pr-4 md:gap-4 md:pr-5 lg:gap-6 lg:pr-8 xl:gap-8 ${headerFrameClassName}` : `mx-auto flex w-full max-w-7xl items-center justify-between px-5 lg:px-8 ${headerFrameClassName}` - const logoImageClassName = isHomePage - ? `block h-[9.9rem] w-auto max-w-[14.9rem] shrink-0 object-contain md:h-[10.9rem] md:max-w-[16.4rem] lg:h-[12rem] lg:max-w-[18rem] ${logoClassName}` - : `block h-[4.95rem] w-auto max-w-[7.45rem] shrink-0 object-contain md:h-[5.45rem] md:max-w-[8.2rem] lg:h-[6rem] lg:max-w-[9rem] ${logoClassName}` + const logoMarkClassName = isHomePage + ? `flex shrink-0 items-center justify-center rounded-2xl border bg-gradient-to-br from-[#D8CBAF] to-[#A6926E] text-[#181A1E] shadow-[0_0_32px_rgba(216,203,175,0.35)] ${logoClassName} h-[7.5rem] w-[7.5rem] md:h-[8.5rem] md:w-[8.5rem] lg:h-[10rem] lg:w-[10rem]` + : `flex shrink-0 items-center justify-center rounded-xl border bg-gradient-to-br from-[#D8CBAF] to-[#A6926E] text-[#181A1E] shadow-[0_0_16px_rgba(216,203,175,0.25)] ${logoClassName} h-[3.5rem] w-[3.5rem] md:h-[4rem] md:w-[4rem] lg:h-[4.5rem] lg:w-[4.5rem]` const logoTextClassName = isHomePage ? 'hidden min-w-0 flex-col lg:flex lg:max-w-[23rem]' : 'hidden min-w-0 flex-col lg:flex' @@ -158,11 +158,9 @@ export function MarketingShell({ children, showFooter = true }: MarketingShellPr {isHomePage ? (
- {`${brandConfig.brandName} +
+ +
{brandWordmark} @@ -170,11 +168,9 @@ export function MarketingShell({ children, showFooter = true }: MarketingShellPr
) : ( - {`${brandConfig.brandName} +
+ +
{brandWordmark} )} @@ -361,28 +357,28 @@ export function MarketingShell({ children, showFooter = true }: MarketingShellPr

{brandConfig.brandName}

- {brandConfig.tagline}. The only platform combining native LaTeX compile orchestration, real MuPDF rendering, bidirectional SyncTeX, cross-document comparison, and structured AI Memory in one unified architecture. + A local-first AI companion with memory, voice, knowledge, and tools. Create your Familiar, keep your data on your machine, and let it remember, speak, and act across your system.