diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..5b3e3cf --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,94 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +## [2025-11-23] + +### Features + +#### Mirror Operations + +- **MIRROR Method**: Create reflections and symmetric objects across axis planes + - New `Solid.MIRROR(solid, axis)` static method for mirroring geometry + - Axis options: 'X' (YZ plane), 'Y' (XZ plane), 'Z' (XY plane) + - Returns mirrored copy (combine with UNION for bilateral symmetry) + - Immutable operation - does not modify original solid + - Works with all primitives, CSG results, and negative solids + - Supports chaining for multi-axis symmetry (quadrant, octant) + - Common use cases: symmetric gears, arches, propellers, organic forms + +#### Import Capabilities + +- **STL File Import**: Load external STL files (binary and ASCII formats) as Solid components + - New `Solid.fromSTL()` method for importing 3D models + - Automatic normalization for seamless CSG operations + - Full support for transforms, boolean operations, and grid arrays + - Uses Three.js STLLoader (no additional dependencies) + +- **SVG Path Import**: Import SVG paths and extrude them into 3D profiles + - New `Solid.profilePrismFromSVG()` method for extruding SVG paths + - Supports all standard SVG path commands (M/m, L/l, H/h, V/v, C/c, Q/q, A/a, Z/z) + - Automatic Y-axis coordinate conversion (SVG Y-down → 3D Y-up) + - Perfect for logos, custom profiles, and 2D designs + - Uses Three.js SVGLoader (no additional dependencies) + +- **Combined Import Operations**: Imported geometries work seamlessly with CSG operations + - STL + primitives boolean operations + - SVG + STL combinations + - Grid arrays from imported geometries + +#### New Examples + +- Added comprehensive tutorial `P.mirror.ts` with 7 example components + - Simple mirroring and bilateral symmetry + - Quadrant and octant (full 3D) symmetry + - Symmetric gears with mirrored tooth patterns + - Mirrored holes and mounting patterns + - Architectural archway with symmetric pillars + +- Added comprehensive tutorial `N-importing.ts` with 14 example components + - STL import basics, transformations, and boolean operations + - SVG shapes: rectangles, stars, curves, hearts + - Advanced combinations: parametric imports, STL+SVG mixing, grid patterns +- Added sample STL asset (`projects/examples/assets/sample.stl`) for testing + +### Improvements + +#### Code Architecture + +- Extracted path segment types to dedicated module (`src/lib/3d/path-factories.ts`) + - `StraightSegment` and `CurveSegment` types now in separate file + - `straight()` and `curve()` factory functions modularized + - Better code organization and reusability + +#### Input Validation + +- Enhanced validation across all primitive creation methods + - Comprehensive validation for cube, cylinder, sphere, cone, and prism + - Transform method validation (scale, rotate, move, at) + - Better error handling for edge cases + - NaN and Infinity detection with clear error messages + - Zero and negative dimension validation + +### Testing + +- Added comprehensive validation test suite (`tests/unit/lib/3d/Solid.validation.test.ts`) + - 380 lines of test coverage + - Primitive validation tests for all geometry types + - Transform validation tests (scale, rotate, move, at) + - Edge case coverage: very small values, very large values, NaN, Infinity + - Zero dimensions and negative value handling tests + +### Documentation + +- Updated `CLAUDE.md` with complete import capabilities documentation + - STL import usage and examples + - SVG path import usage and supported commands + - Boolean operations with imported geometries +- Updated `README.md` with import feature overview +- Added extensive inline comments in example files + +### Internal + +- Added project planning document (`plan.MD`) +- Merged fixes from main branch (wedge positions) diff --git a/CLAUDE.md b/CLAUDE.md index 867d24a..d531810 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -8,14 +8,14 @@ CSG Builder: TypeScript-based 3D mesh creation using component architecture. Use ## Learning Resources -### **projects/examples/** - Tutorial Series (A-M) +### **projects/examples/** - Tutorial Series (A-N) Progressive examples with comprehensive inline comments: **Foundational (A-G):** Primitives, operations, alignment, partials, composition, custom profiles, revolution -**Advanced (H-M):** Scaling, transforms, 3D grids, patterns, optimization, production composition +**Advanced (H-N):** Scaling, transforms, 3D grids, patterns, optimization, production composition, import capabilities -**Start with A-G for basics, then H-M for advanced patterns.** +**Start with A-G for basics, then H-N for advanced patterns.** ### **projects/castle/** - Production Architecture @@ -122,11 +122,13 @@ npm run export --silent -- Box > box.stl ```typescript Solid.cube(width, height, depth, { color? }) +Solid.roundedBox(width, height, depth, { color?, radius?, segments? }) Solid.cylinder(radius, height, { color?, angle? }) // angle in degrees Solid.sphere(radius, { color?, angle? }) Solid.cone(radius, height, { color?, angle? }) Solid.prism(sides, radius, height, { color?, angle? }) Solid.trianglePrism(radius, height, { color? }) +Solid.text(text, { color?, size?, height?, curveSegments?, bevelEnabled? }) ``` ### Custom Profile Prisms @@ -159,6 +161,170 @@ Solid.revolutionSolidFromPath([straight(5), curve(2, 90), ...], { angle?, color? **Profile coordinates:** X=radius from center, Y=height, rotates around Y-axis +### 3D Text Extrusion + +Create 3D text shapes with customizable size and extrusion depth: + +```typescript +// Simple text +const label = Solid.text('Hello', { size: 10, height: 2, color: 'blue' }); + +// Text with bevel (rounded edges) +const logo = Solid.text('LOGO', { size: 15, height: 3, bevelEnabled: true, color: 'gold' }); + +// Text as cutter for engraving +const plate = Solid.cube(50, 20, 5, { color: 'gray' }); +const text = Solid.text('ENGRAVED', { size: 4, height: 10, color: 'gray' }); +const engraved = Solid.SUBTRACT(plate, text); + +// Embossed text (raised text on surface) +const base = Solid.cube(40, 30, 3, { color: 'gray' }); +const embossText = Solid.text('LOGO', { size: 6, height: 2, color: 'gold' }).move({ y: 3 }); // Position on top of base +const embossed = Solid.UNION(base, embossText); +``` + +**Text Parameters:** + +- `text`: The string to render (required, cannot be empty) +- `size`: Font size (default: 10) +- `height`: Extrusion depth along Y-axis (default: 2) +- `curveSegments`: Smoothness of curves (default: 12, lower=faster but blockier) +- `bevelEnabled`: Add rounded edges to text (default: false) +- `color`: Color of the text geometry + +**Important Notes:** + +- Uses Helvetiker Regular font (built-in) +- Text is automatically centered on XZ plane and aligned to Y=0 +- For engraving/embossing, make text height > target depth to ensure complete cut +- **Performance warning:** Long text (>10 characters) or high curveSegments can slow CSG operations +- For better performance with long text, reduce `curveSegments` to 8 + +### Rounded Box + +Create boxes with filleted/rounded edges: + +```typescript +// Basic rounded box with auto-calculated radius (10% of smallest dimension) +const box = Solid.roundedBox(10, 10, 10, { color: 'teal' }); + +// Custom radius +const customBox = Solid.roundedBox(20, 15, 10, { color: 'blue', radius: 2 }); + +// High quality rounding (more segments) +const smoothBox = Solid.roundedBox(10, 10, 10, { color: 'red', radius: 1.5, segments: 4 }); +``` + +**Rounded Box Parameters:** + +- `width`, `height`, `depth`: Box dimensions (required, must be positive) +- `radius`: Corner radius (default: 10% of smallest dimension) + - Must be ≤ half of smallest dimension + - Larger radius = more rounded corners +- `segments`: Rounding quality (default: 2) + - Higher values = smoother but more geometry + - 2 is sufficient for most cases + +**Use Cases:** + +- Mechanical parts with filleted edges +- Product design and prototyping +- Realistic objects (boxes are rarely sharp-edged in real life) +- Ergonomic designs + +## Import Capabilities + +### STL Import + +Load external STL files (binary or ASCII format) as Solid components: + +```typescript +// Import STL file using Vite's import syntax +import stlData from './model.stl?raw'; // ASCII STL +// For binary STL, use ?url and fetch as ArrayBuffer + +// Create Solid from STL data +const imported = Solid.fromSTL(stlData, { color: 'blue' }); + +// Use in boolean operations +const cube = Solid.cube(20, 20, 20, { color: 'red' }); +const result = Solid.SUBTRACT(cube, imported); + +// Transform imported geometry +const transformed = Solid.fromSTL(stlData, { color: 'green' }) + .scale({ all: 0.5 }) + .rotate({ y: 45 }) + .move({ y: 10 }); +``` + +**Key points:** + +- Supports both binary and ASCII STL formats +- Automatically normalized for CSG operations +- Works with all standard Solid methods (transforms, CSG, grids) +- Uses STLLoader from Three.js (no additional dependencies) + +### SVG Path Import + +Import SVG path data and extrude into 3D profiles: + +```typescript +// Simple SVG rectangle path +const rectPath = 'M 0 0 L 20 0 L 20 10 L 0 10 Z'; +const rect = Solid.profilePrismFromSVG(rectPath, 5, { color: 'blue' }); + +// Complex path with curves (Q = quadratic bezier) - creates wavy pattern +const curvedPath = 'M 0 5 Q 5 0, 10 5 Q 15 10, 20 5 L 20 10 L 0 10 Z'; +const curved = Solid.profilePrismFromSVG(curvedPath, 8, { color: 'pink' }); + +// Star shape +const starPath = 'M 10 0 L 12 8 L 20 8 L 14 13 L 16 21 L 10 16 L 4 21 L 6 13 L 0 8 L 8 8 Z'; +const star = Solid.profilePrismFromSVG(starPath, 3, { color: 'gold' }); + +// Use in boolean operations +const plate = Solid.cube(30, 20, 5, { color: 'gray' }); +const result = Solid.SUBTRACT(plate, star); +``` + +**SVG Path Commands Supported:** + +- M/m - Move to +- L/l - Line to +- H/h - Horizontal line +- V/v - Vertical line +- C/c - Cubic bezier curve +- Q/q - Quadratic bezier curve +- A/a - Arc +- Z/z - Close path + +**Key points:** + +- Extrudes SVG path along Y-axis +- Handles SVG coordinate system (Y-down → Y-up conversion) +- Works with all CSG operations +- Perfect for logos, custom profiles, 2D designs +- Uses SVGLoader from Three.js (no additional dependencies) + +### Boolean Operations with Imports + +All imported geometries work seamlessly with CSG operations: + +```typescript +// STL + Primitive +const stl = Solid.fromSTL(stlData, { color: 'red' }); +const cube = Solid.cube(20, 20, 20, { color: 'red' }); +const combined = Solid.UNION(stl, cube); + +// SVG + STL +const svg = Solid.profilePrismFromSVG(path, 5, { color: 'blue' }); +const stl = Solid.fromSTL(data, { color: 'blue' }); +const result = Solid.SUBTRACT(stl, svg); + +// Grid from imports +const imported = Solid.fromSTL(data, { color: 'purple' }); +const grid = Solid.GRID_XY(imported, { cols: 3, rows: 3, spacing: [5, 5] }); +``` + ## Component Patterns ### Basic Component @@ -202,6 +368,122 @@ Solid.GRID_XY(brick, { cols: 10, rows: 5, spacing: [1, 0.5] }); // 2D Solid.GRID_XYZ(brick, { cols: 5, rows: 5, levels: 3, spacing: [1, 1, 2] }); // 3D ``` +### Circular Arrays + +Arrange solids in circular/radial patterns (polar arrays): + +```typescript +// Gear teeth - elements face outward by default +// IMPORTANT: Element must extend in +X direction to face outward when rotated +// Width (X) > depth (Z) makes tooth point radially +const disk = Solid.cylinder(15, 8, { color: 'gray' }).align('bottom'); +const tooth = Solid.cube(3, 10, 2, { color: 'gray' }) // 3 wide (X), 2 deep (Z) + .center({ x: true, z: true }) + .align('bottom') + .move({ y: 8 }); // Position on top of disk +const teeth = Solid.ARRAY_CIRCULAR(tooth, { count: 24, radius: 17 }); +const gear = Solid.UNION(disk, teeth); + +// Bolt holes - no rotation needed for holes +const hole = Solid.cylinder(2, 10, { color: 'blue' }).setNegative(); +const pattern = Solid.ARRAY_CIRCULAR(hole, { count: 8, radius: 20, rotateElements: false }); + +// Half circle (amphitheater seating) +const seat = Solid.cube(2, 1, 2, { color: 'red' }); +const seating = Solid.ARRAY_CIRCULAR(seat, { count: 15, radius: 25, startAngle: 0, endAngle: 180 }); + +// Wheel spokes from center (radius = 0, just rotation) +const spoke = Solid.cube(1, 20, 2, { color: 'silver' }).center({ x: true, z: true }); +const spokes = Solid.ARRAY_CIRCULAR(spoke, { count: 12, radius: 0 }); + +// Decorative rosette with multiple layers +const orb = Solid.sphere(2, { color: 'gold' }); +const innerRing = Solid.ARRAY_CIRCULAR(orb, { count: 8, radius: 8, rotateElements: false }); +const outerRing = Solid.ARRAY_CIRCULAR(orb, { count: 16, radius: 15, rotateElements: false }); +const rosette = Solid.UNION(innerRing, outerRing); +``` + +**Parameters:** + +- `count`: Number of copies (required, must be >= 1) +- `radius`: Radius of circular arrangement (required, must be > 0) +- `startAngle`: Starting angle in degrees (default: 0) +- `endAngle`: Ending angle in degrees (default: 360) +- `rotateElements`: Rotate elements to face outward (default: true) + +**Key Behaviors:** + +- Elements distributed evenly in XZ plane (horizontal circle around Y-axis) +- By default, elements rotate to face outward (like gear teeth) +- Set `rotateElements: false` for spheres, holes, or decorative elements +- Partial circles: use `startAngle`/`endAngle` for arcs (e.g., 0° to 180° = half circle) +- Elements evenly spaced within angular range (startAngle included, endAngle excluded for full circles) +- **Y position preserved**: Elements maintain their vertical (Y) position, allowing layered circular patterns +- **Element orientation**: For radial elements, create them so they extend in the +X direction. When rotated, they'll face outward correctly. Example: for a tooth pointing outward, use `cube(3, 10, 2)` not `cube(2, 10, 3)` - width > depth +- **IMPORTANT**: Center elements with `.center({ x: true, z: true })` before passing to ARRAY_CIRCULAR. The `radius` parameter handles X/Z positioning, but you can use `.move({ y })` for vertical placement + +**Common Use Cases:** + +- Mechanical: Gear teeth, splines, bolt holes, heat sink fins +- Architectural: Columns, amphitheater seating, circular windows +- Decorative: Medallions, rosettes, clock markers, mandalas +- Functional: Turbine blades, fan blades, ventilation slots, spokes + +### Mirror Operations + +Create reflections and symmetric objects by mirroring across axis planes: + +```typescript +// Simple mirror - creates reflected copy +const shape = Solid.cube(10, 5, 3, { color: 'blue' }).move({ x: 8 }); +const mirrored = Solid.MIRROR(shape, 'X'); + +// Bilateral symmetry - combine original + mirror +const half = Solid.cube(10, 20, 5, { color: 'brown' }).move({ x: 10 }); +const symmetric = Solid.UNION(half, Solid.MIRROR(half, 'X')); + +// Full 3D symmetry - chain multiple mirrors +const quarter = Solid.cube(5, 5, 5, { color: 'red' }).move({ x: 10, z: 10 }); +const halfX = Solid.UNION(quarter, Solid.MIRROR(quarter, 'X')); +const full = Solid.UNION(halfX, Solid.MIRROR(halfX, 'Z')); + +// Works with negative solids +const hole = Solid.cylinder(2, 10, { color: 'blue' }).move({ x: 5 }).setNegative(); +const holes = Solid.MERGE([ + Solid.cube(30, 30, 5, { color: 'blue' }), + hole, + Solid.MIRROR(hole, 'X') +]); + +// Archway with symmetric pillars +const pillar = Solid.cube(5, 30, 8, { color: 'brown' }).move({ x: 15 }).align('bottom'); +const arch = Solid.UNION(pillar, Solid.MIRROR(pillar, 'X')); +``` + +**Axis Parameter:** + +- `'X'`: Mirrors across YZ plane (flips X coordinates) - for left/right symmetry +- `'Y'`: Mirrors across XZ plane (flips Y coordinates) - for top/bottom symmetry +- `'Z'`: Mirrors across XY plane (flips Z coordinates) - for front/back symmetry + +**Key Behaviors:** + +- Returns **only the mirrored copy** (not combined with original) +- Use `UNION(original, MIRROR(original, axis))` for bilateral symmetry +- Bakes all transformations before mirroring (position, rotation, scale) +- Preserves negative flag - mirrored negative solids remain negative +- Works with all primitives, CSG results, and complex shapes +- Can chain mirrors for multi-axis symmetry +- Immutable - does not modify original solid + +**Common Use Cases:** + +- Mechanical: Symmetric gears, propellers, mirror-image parts +- Architectural: Arches, symmetric facades, bilateral structures +- Organic: Butterflies, leaves, faces (bilateral symmetry) +- Decorative: Symmetric patterns, medallions, ornaments +- Functional: Mirrored mounting holes, symmetric assemblies + ## Performance - Caching ```typescript @@ -232,7 +514,11 @@ const w3 = Wall(30); // Different params, new computation ### Factory Methods -`cube(w,h,d,opts)`, `cylinder(r,h,opts)`, `sphere(r,opts)`, `cone(r,h,opts)`, `prism(sides,r,h,opts)`, `trianglePrism(r,h,opts)` +`cube(w,h,d,opts)`, `roundedBox(w,h,d,opts)`, `cylinder(r,h,opts)`, `sphere(r,opts)`, `cone(r,h,opts)`, `prism(sides,r,h,opts)`, `trianglePrism(r,h,opts)`, `text(text,opts)` + +### Import Methods + +`fromSTL(data,opts)`, `profilePrismFromSVG(svgPathData,height,opts)` ### Custom Profiles @@ -254,9 +540,9 @@ const w3 = Wall(30); // Different params, new computation `SUBTRACT(src,...others)`, `UNION(src,...others)`, `INTERSECT(a,b)`, `MERGE(solids[])` -### Grids (static, immutable) +### Grids & Arrays (static, immutable) -`GRID_X(solid,{cols,spacing?})`, `GRID_XY(solid,{cols,rows,spacing?})`, `GRID_XYZ(solid,{cols,rows,levels,spacing?})` +`GRID_X(solid,{cols,spacing?})`, `GRID_XY(solid,{cols,rows,spacing?})`, `GRID_XYZ(solid,{cols,rows,levels,spacing?})`, `ARRAY_CIRCULAR(solid,{count,radius,startAngle?,endAngle?,rotateElements?})`, `MIRROR(solid,axis)` ### Alignment (chainable) diff --git a/README.md b/README.md index 9350d38..447456d 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,12 @@ CSG Builder allows you to create 3D meshes using TypeScript code with a React-li - **Primitive Shapes** - Cubes, cylinders, spheres, cones, and polygon prisms with customizable dimensions - **Custom Profile Prisms** - Extrude 2D profiles into 3D shapes using points, paths, or Shape API - **Body of Revolution** - Create rotationally symmetric objects (chess pieces, vases, bottles) by rotating profiles +- **Import Capabilities** - Import STL files and SVG paths, use them in CSG operations like any primitive - **Partial Geometries** - Create pie slices, hemispheres, and wedges with CSG-based angle cutting - **Static CSG Operations** - Immutable SUBTRACT, UNION, INTERSECT, and MERGE operations for complex geometries +- **Mirror Operations** - Create reflections and symmetric objects across axis planes (X, Y, Z) - **Grid Arrays** - Create 1D, 2D, and 3D arrays with static GRID_X, GRID_XY, GRID_XYZ methods +- **Circular Arrays** - Create polar patterns and radial arrangements with ARRAY_CIRCULAR - **Transformations** - Translate, rotate, and scale objects with chainable methods - **Real-Time Preview** - Interactive 3D viewport with orbit controls - **STL Export** - Export models in binary STL format for 3D printing @@ -288,6 +291,55 @@ const quarterVase = Solid.revolutionSolidFromPoints( **Profile coords:** X=radius, Y=height. Rotates around Y-axis. **Uses:** Chess pieces, vases, bottles, tableware, architectural elements +### Example: Import Capabilities + +Load external STL files and SVG paths to use in your designs: + +```typescript +import { Solid } from '$lib/3d/Solid'; + +// Import STL file using Vite's import syntax +import stlData from './model.stl?raw'; // ASCII STL +// For binary STL, use ?url and fetch as ArrayBuffer + +// 1. STL IMPORT - Load external 3D models +const imported = Solid.fromSTL(stlData, { color: 'blue' }); + +// Use imported geometry in CSG operations +const cube = Solid.cube(20, 20, 20, { color: 'red' }); +const result = Solid.SUBTRACT(cube, imported); + +// Transform imported models +const transformed = Solid.fromSTL(stlData, { color: 'green' }) + .scale({ all: 0.5 }) + .rotate({ y: 45 }) + .move({ y: 10 }); + +// 2. SVG PATH IMPORT - Extrude SVG paths into 3D +const starPath = 'M 10 0 L 12 8 L 20 8 L 14 13 L 16 21 L 10 16 L 4 21 L 6 13 L 0 8 L 8 8 Z'; +const star = Solid.profilePrismFromSVG(starPath, 3, { color: 'gold' }); + +// Curved SVG paths with quadratic bezier curves (Q) +const curvedPath = 'M 0 5 Q 5 0, 10 5 Q 15 10, 20 5 L 20 10 L 0 10 Z'; +const curved = Solid.profilePrismFromSVG(curvedPath, 8, { color: 'pink' }); + +// Use SVG as cutter +const plate = Solid.cube(30, 20, 5, { color: 'gray' }); +const cutout = Solid.SUBTRACT(plate, star); + +// 3. COMBINE IMPORTS - Mix imported and primitive shapes +const base = Solid.fromSTL(stlData, { color: 'brown' }).align('bottom'); +const decoration = Solid.profilePrismFromSVG('M 0 0 L 5 0 L 5 5 L 0 5 Z', 2, { color: 'brown' }); +const combined = Solid.UNION(base, decoration); +``` + +**Supported formats:** + +- **STL:** Binary and ASCII formats (via Three.js STLLoader) +- **SVG:** Path data with M, L, C, Q, A commands (via Three.js SVGLoader) +- Works with all CSG operations, transformations, and grids +- No additional dependencies required + ## Performance Optimization Cache expensive component computations that are called repeatedly: @@ -322,6 +374,7 @@ const w3 = Wall(30); // Different params, new computation ### API Reference **Primitives:** `cube(w,h,d,opts)`, `cylinder(r,h,opts)`, `sphere(r,opts)`, `cone(r,h,opts)`, `prism(sides,r,h,opts)`, `trianglePrism(r,h,opts)` +**Import:** `fromSTL(data,opts)`, `profilePrismFromSVG(svgPathData,height,opts)` **Profiles:** `profilePrism(h,builder,opts)`, `profilePrismFromPoints(h,points,opts)`, `profilePrismFromPath(h,segments,opts)` **Revolution:** `revolutionSolid(builder,opts)`, `revolutionSolidFromPoints(points,opts)`, `revolutionSolidFromPath(segments,opts)` **Path Factories:** `straight(length)`, `curve(radius,angle)` - positive=right, negative=left, 0=sharp @@ -330,7 +383,12 @@ const w3 = Wall(30); // Different params, new computation **CSG (static, immutable):** `SUBTRACT(src,...cut)`, `UNION(src,...add)`, `INTERSECT(a,b)`, `MERGE(solids[])` - respects `setNegative()` -**Grids (static, immutable):** `GRID_X(solid,{cols,spacing?})`, `GRID_XY(solid,{cols,rows,spacing?})`, `GRID_XYZ(solid,{cols,rows,levels,spacing?})` +**Arrays (static, immutable):** + +- Grids: `GRID_X(solid,{cols,spacing?})`, `GRID_XY(solid,{cols,rows,spacing?})`, `GRID_XYZ(solid,{cols,rows,levels,spacing?})` +- Circular: `ARRAY_CIRCULAR(solid,{count,radius,startAngle?,endAngle?,rotateElements?})` +- Mirror: `MIRROR(solid,axis)` - axis: 'X'|'Y'|'Z' + Spacing: GRID_X=number, GRID_XY=[x,y], GRID_XYZ=[x,y,z] **Alignment (chainable):** `center({x?,y?,z?}?)`, `align('bottom'|'top'|'left'|'right'|'front'|'back')`, `getBounds()` @@ -473,16 +531,16 @@ npm run export --silent -- "Brick Wall" > wall.stl ## Examples & Learning Resources -**projects/examples/** - Progressive tutorial (A-M) with inline docs: +**projects/examples/** - Progressive tutorial (A-P) with inline docs: - **A-G:** Primitives, operations, alignment, partials, composition, profiles, revolution -- **H-M:** Scaling, transforms, 3D grids, patterns, optimization, production composition +- **H-P:** Scaling, transforms, 3D grids, patterns, optimization, production composition, import capabilities, circular arrays, mirror operations **projects/castle/** - Production multi-file architecture: modular structure, caching, cross-file dependencies, advanced CSG **projects/sample/** - Working examples: box, brick wall, window, shapes showcase, chess pieces -Start with examples A-G, then explore castle project for production patterns. +Start with examples A-G, then explore H-P for advanced features including STL/SVG imports, circular arrays, and mirror operations. ## Troubleshooting diff --git a/docs/assets/index-ByUqiuvw.css b/docs/assets/index-ByUqiuvw.css deleted file mode 100644 index 094cd49..0000000 --- a/docs/assets/index-ByUqiuvw.css +++ /dev/null @@ -1 +0,0 @@ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-50:oklch(98.4% .014 180.72);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-200:oklch(91% .096 180.426);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-teal-700:oklch(51.1% .096 186.391);--color-teal-800:oklch(43.7% .078 188.216);--color-teal-900:oklch(38.6% .063 188.416);--color-cyan-50:oklch(98.4% .019 200.873);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-cyan-700:oklch(52% .105 223.128);--color-cyan-800:oklch(45% .085 224.283);--color-cyan-900:oklch(39.8% .07 227.392);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-900:oklch(38% .189 293.745);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-fuchsia-50:oklch(97.7% .017 320.058);--color-fuchsia-100:oklch(95.2% .037 318.852);--color-fuchsia-200:oklch(90.3% .076 319.62);--color-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-fuchsia-600:oklch(59.1% .293 322.896);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-fuchsia-800:oklch(45.2% .211 324.591);--color-fuchsia-900:oklch(40.1% .17 325.612);--color-pink-50:oklch(97.1% .014 343.198);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-200:oklch(89.9% .061 343.231);--color-pink-300:oklch(82.3% .12 346.018);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--color-pink-700:oklch(52.5% .223 3.958);--color-pink-800:oklch(45.9% .187 3.815);--color-pink-900:oklch(40.8% .153 2.432);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-900:oklch(41% .159 10.272);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-md:48rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-4xl:56rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-xs:4px;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.tooltip-arrow,.tooltip-arrow:before{background:inherit;width:8px;height:8px;position:absolute}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:var(--color-gray-200)}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{background:inherit;width:8px;height:8px;position:absolute}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;background:inherit;width:9px;height:9px;position:absolute;transform:rotate(45deg)}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:var(--color-gray-200)}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:var(--color-gray-600)}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:var(--color-gray-200)}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:var(--color-gray-600)}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before,[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before,[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before,[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before,[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before,[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{appearance:none;border-color:var(--color-gray-500);--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is([type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:var(--color-blue-600);--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);border-color:var(--color-blue-600);outline:2px solid #0000}input::placeholder,textarea::placeholder{color:var(--color-gray-500);opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}select:not([size]){print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem}[dir=rtl] select:not([size]){background-position:.75rem;padding-left:0;padding-right:.75rem}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;print-color-adjust:unset;padding-right:.75rem}[type=checkbox],[type=radio]{appearance:none;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;width:1rem;height:1rem;color:var(--color-blue-600);border-color:--color-gray-500;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;flex-shrink:0;padding:0;display:inline-block}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:var(--color-blue-600);--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);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{background-position:50%;background-repeat:no-repeat;background-size:.55em .55em;background-color:currentColor!important;border-color:#0000!important}[type=checkbox]:checked{print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em}[type=radio]:checked,.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M0.5 6h14'/%3e %3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:.55em .55em;background-color:currentColor!important;border-color:#0000!important}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{background-color:currentColor!important;border-color:#0000!important}[type=file]{background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:var(--color-gray-800);cursor:pointer;border:0;margin-inline:-1rem 1rem;padding:.625rem 1rem .625rem 2rem;font-size:.875rem;font-weight:500}input[type=file]::file-selector-button:hover{background:var(--color-gray-700)}[dir=rtl] input[type=file]::file-selector-button{padding-left:1rem;padding-right:2rem}.dark input[type=file]::file-selector-button{color:#fff;background:var(--color-gray-600)}.dark input[type=file]::file-selector-button:hover{background:var(--color-gray-500)}input[type=range]::-webkit-slider-thumb{background:var(--color-blue-600);appearance:none;cursor:pointer;border:0;border-radius:9999px;width:1.25rem;height:1.25rem}input[type=range]:disabled::-webkit-slider-thumb{background:var(--color-gray-400)}.dark input[type=range]:disabled::-webkit-slider-thumb{background:var(--color-gray-500)}input[type=range]:focus::-webkit-slider-thumb{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(4px + 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-opacity:1;--tw-ring-color:rgb(164 202 254/var(--tw-ring-opacity));outline:2px solid #0000}input[type=range]::-moz-range-thumb{background:var(--color-blue-600);appearance:none;cursor:pointer;border:0;border-radius:9999px;width:1.25rem;height:1.25rem}input[type=range]:disabled::-moz-range-thumb{background:var(--color-gray-400)}.dark input[type=range]:disabled::-moz-range-thumb{background:var(--color-gray-500)}input[type=range]::-moz-range-progress{background:var(--color-blue-500)}input[type=range]::-ms-fill-lower{background:var(--color-blue-500)}input[type=range].range-sm::-webkit-slider-thumb{width:1rem;height:1rem}input[type=range].range-lg::-webkit-slider-thumb{width:1.5rem;height:1.5rem}input[type=range].range-sm::-moz-range-thumb{width:1rem;height:1rem}input[type=range].range-lg::-moz-range-thumb{width:1.5rem;height:1.5rem}.toggle-bg:after{content:"";border-color:var(--color-gray-300);width:1.25rem;height:1.25rem;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);background:#fff;border-width:1px;border-radius:9999px;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;position:absolute;top:.125rem;left:.125rem}input:checked+.toggle-bg:after{border-color:#fff;transform:translate(100%)}input:checked+.toggle-bg{background:var(--color-blue-600);border-color:var(--color-blue-600)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.visible\!{visibility:visible!important}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.\!sticky{position:sticky!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-1{inset:calc(var(--spacing)*-1)}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.-start-3{inset-inline-start:calc(var(--spacing)*-3)}.-start-4{inset-inline-start:calc(var(--spacing)*-4)}.-start-12{inset-inline-start:calc(var(--spacing)*-12)}.start-0{inset-inline-start:calc(var(--spacing)*0)}.start-1{inset-inline-start:calc(var(--spacing)*1)}.start-1\/2{inset-inline-start:50%}.start-2\.5{inset-inline-start:calc(var(--spacing)*2.5)}.start-5{inset-inline-start:calc(var(--spacing)*5)}.end-0{inset-inline-end:calc(var(--spacing)*0)}.end-2\.5{inset-inline-end:calc(var(--spacing)*2.5)}.end-5{inset-inline-end:calc(var(--spacing)*5)}.-top-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-1\.5{top:calc(var(--spacing)*1.5)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-2\.5{top:calc(var(--spacing)*2.5)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.top-5{top:calc(var(--spacing)*5)}.top-6{top:calc(var(--spacing)*6)}.top-7{top:calc(var(--spacing)*7)}.top-\[40px\]{top:40px}.top-\[72px\]{top:72px}.top-\[88px\]{top:88px}.top-\[124px\]{top:124px}.top-\[142px\]{top:142px}.top-\[178px\]{top:178px}.top-\[calc\(100\%\+1rem\)\]{top:calc(100% + 1rem)}.top-full{top:100%}.-right-\[16px\]{right:-16px}.-right-\[17px\]{right:-17px}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.right-8{right:calc(var(--spacing)*8)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-1{bottom:calc(var(--spacing)*1)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-5{bottom:calc(var(--spacing)*5)}.-left-1{left:calc(var(--spacing)*-1)}.-left-1\.5{left:calc(var(--spacing)*-1.5)}.-left-4{left:calc(var(--spacing)*-4)}.-left-\[17px\]{left:-17px}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.left-4{left:calc(var(--spacing)*4)}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-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-\[9998\]{z-index:9998}.z-\[9999\]{z-index:9999}.z-\[10001\]{z-index:10001}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.m-0\.5{margin:calc(var(--spacing)*.5)}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-2\.5{margin:calc(var(--spacing)*2.5)}.-mx-1\.5{margin-inline:calc(var(--spacing)*-1.5)}.mx-0{margin-inline:calc(var(--spacing)*0)}.mx-0\.5{margin-inline:calc(var(--spacing)*.5)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.-my-1\.5{margin-block:calc(var(--spacing)*-1.5)}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-8{margin-block:calc(var(--spacing)*8)}.my-auto{margin-block:auto}.ms-1{margin-inline-start:calc(var(--spacing)*1)}.ms-1\.5{margin-inline-start:calc(var(--spacing)*1.5)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-3{margin-inline-start:calc(var(--spacing)*3)}.ms-4{margin-inline-start:calc(var(--spacing)*4)}.ms-6{margin-inline-start:calc(var(--spacing)*6)}.ms-auto{margin-inline-start:auto}.-me-1\.5{margin-inline-end:calc(var(--spacing)*-1.5)}.me-0{margin-inline-end:calc(var(--spacing)*0)}.me-1{margin-inline-end:calc(var(--spacing)*1)}.me-2{margin-inline-end:calc(var(--spacing)*2)}.me-2\.5{margin-inline-end:calc(var(--spacing)*2.5)}.me-3{margin-inline-end:calc(var(--spacing)*3)}.me-4{margin-inline-end:calc(var(--spacing)*4)}.me-auto{margin-inline-end:auto}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-20{margin-top:calc(var(--spacing)*20)}.mt-auto{margin-top:auto}.mr-0{margin-right:calc(var(--spacing)*0)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-auto{margin-right:auto}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-2\.5{margin-bottom:calc(var(--spacing)*2.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.mb-auto{margin-bottom:auto}.mb-px{margin-bottom:1px}.ml-0{margin-left:calc(var(--spacing)*0)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-5{margin-left:calc(var(--spacing)*5)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\!block{display:block!important}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.hidden\!{display:none!important}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-1{height:calc(var(--spacing)*1)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-15{height:calc(var(--spacing)*15)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-36{height:calc(var(--spacing)*36)}.h-48{height:calc(var(--spacing)*48)}.h-56{height:calc(var(--spacing)*56)}.h-64{height:calc(var(--spacing)*64)}.h-72{height:calc(var(--spacing)*72)}.h-80{height:calc(var(--spacing)*80)}.h-96{height:calc(var(--spacing)*96)}.h-\[5px\]{height:5px}.h-\[10px\]{height:10px}.h-\[17px\]{height:17px}.h-\[18px\]{height:18px}.h-\[24px\]{height:24px}.h-\[32px\]{height:32px}.h-\[41px\]{height:41px}.h-\[46px\]{height:46px}.h-\[52px\]{height:52px}.h-\[55px\]{height:55px}.h-\[63px\]{height:63px}.h-\[64px\]{height:64px}.h-\[140px\]{height:140px}.h-\[156px\]{height:156px}.h-\[172px\]{height:172px}.h-\[193px\]{height:193px}.h-\[213px\]{height:213px}.h-\[426px\]{height:426px}.h-\[454px\]{height:454px}.h-\[572px\]{height:572px}.h-\[600px\]{height:600px}.h-auto{height:auto}.h-full{height:100%}.h-min{height:min-content}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-\[500px\]{max-height:500px}.max-h-none{max-height:none}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\[2\.4rem\]{min-height:2.4rem}.min-h-\[2\.7rem\]{min-height:2.7rem}.min-h-\[3\.2rem\]{min-height:3.2rem}.min-h-\[60px\]{min-height:60px}.\!w-6{width:calc(var(--spacing)*6)!important}.\!w-full{width:100%!important}.w-1{width:calc(var(--spacing)*1)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-2\/4{width:50%}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-8\/12{width:66.6667%}.w-9{width:calc(var(--spacing)*9)}.w-9\/12{width:75%}.w-10{width:calc(var(--spacing)*10)}.w-10\/12{width:83.3333%}.w-11{width:calc(var(--spacing)*11)}.w-11\/12{width:91.6667%}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-15{width:calc(var(--spacing)*15)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-28{width:calc(var(--spacing)*28)}.w-32{width:calc(var(--spacing)*32)}.w-36{width:calc(var(--spacing)*36)}.w-48{width:calc(var(--spacing)*48)}.w-64{width:calc(var(--spacing)*64)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-96{width:calc(var(--spacing)*96)}.w-\[3px\]{width:3px}.w-\[6px\]{width:6px}.w-\[10px\]{width:10px}.w-\[52px\]{width:52px}.w-\[56px\]{width:56px}.w-\[148px\]{width:148px}.w-\[188px\]{width:188px}.w-\[208px\]{width:208px}.w-\[272px\]{width:272px}.w-\[300px\]{width:300px}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-\(--breakpoint-md\){max-width:var(--breakpoint-md)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[83px\]{max-width:83px}.max-w-\[133px\]{max-width:133px}.max-w-\[200px\]{max-width:200px}.max-w-\[301px\]{max-width:301px}.max-w-\[341px\]{max-width:341px}.max-w-\[351px\]{max-width:351px}.max-w-\[540px\]{max-width:540px}.max-w-\[640px\]{max-width:640px}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-fit{min-width:fit-content}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.origin-\[0\],.origin-left{transform-origin:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-1\/3{--tw-translate-x:calc(calc(1/3*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-1\/3{--tw-translate-x:calc(1/3*100%);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/3{--tw-translate-y:calc(calc(1/3*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-4{--tw-translate-y:calc(var(--spacing)*-4);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-6{--tw-translate-y:calc(var(--spacing)*-6);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full{--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\/3{--tw-translate-y:calc(1/3*100%);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-none{translate:none}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}.-rotate-45{rotate:-45deg}.-rotate-135{rotate:-135deg}.rotate-45{rotate:45deg}.rotate-135{rotate:135deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-\[slideIn_0\.2s_ease-out\]{animation:.2s ease-out slideIn}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.touch-pan-x{--tw-pan-x:pan-x;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.touch-pan-y{--tw-pan-y:pan-y;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.resize{resize:both}.scroll-py-2{scroll-padding-block:calc(var(--spacing)*2)}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-flow-row{grid-auto-flow:row}.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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-8{gap:calc(var(--spacing)*8)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.-space-x-px>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(-1px*var(--tw-space-x-reverse));margin-inline-end:calc(-1px*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-0\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*.5)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-6>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*6)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-4{row-gap:calc(var(--spacing)*4)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}:where(.divide-amber-300>:not(:last-child)){border-color:var(--color-amber-300)}:where(.divide-blue-300>:not(:last-child)){border-color:var(--color-blue-300)}:where(.divide-cyan-300>:not(:last-child)){border-color:var(--color-cyan-300)}:where(.divide-emerald-300>:not(:last-child)){border-color:var(--color-emerald-300)}:where(.divide-fuchsia-300>:not(:last-child)){border-color:var(--color-fuchsia-300)}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}:where(.divide-gray-200>:not(:last-child)){border-color:var(--color-gray-200)}:where(.divide-gray-300>:not(:last-child)){border-color:var(--color-gray-300)}:where(.divide-gray-700>:not(:last-child)){border-color:var(--color-gray-700)}:where(.divide-green-300>:not(:last-child)){border-color:var(--color-green-300)}:where(.divide-indigo-300>:not(:last-child)){border-color:var(--color-indigo-300)}:where(.divide-inherit>:not(:last-child)){border-color:inherit}:where(.divide-lime-300>:not(:last-child)){border-color:var(--color-lime-300)}:where(.divide-orange-300>:not(:last-child)){border-color:var(--color-orange-300)}:where(.divide-pink-300>:not(:last-child)){border-color:var(--color-pink-300)}:where(.divide-primary-300>:not(:last-child)){border-color:#ffd5cc}:where(.divide-primary-500>:not(:last-child)){border-color:#fe795d}:where(.divide-purple-300>:not(:last-child)){border-color:var(--color-purple-300)}:where(.divide-red-300>:not(:last-child)){border-color:var(--color-red-300)}:where(.divide-rose-300>:not(:last-child)){border-color:var(--color-rose-300)}:where(.divide-sky-300>:not(:last-child)){border-color:var(--color-sky-300)}:where(.divide-teal-300>:not(:last-child)){border-color:var(--color-teal-300)}:where(.divide-violet-300>:not(:last-child)){border-color:var(--color-violet-300)}:where(.divide-yellow-300>:not(:last-child)){border-color:var(--color-yellow-300)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.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-y-scroll{overflow-y:scroll}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-\[2\.5rem\]{border-radius:2.5rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-none\!{border-radius:0!important}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-s-full{border-start-start-radius:3.40282e38px;border-end-start-radius:3.40282e38px}.rounded-s-lg{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-e-full{border-start-end-radius:3.40282e38px;border-end-end-radius:3.40282e38px}.rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.rounded-e-none{border-start-end-radius:0;border-end-end-radius:0}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-\[2\.5rem\]{border-top-left-radius:2.5rem;border-top-right-radius:2.5rem}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.\!rounded-l-lg{border-top-left-radius:var(--radius-lg)!important;border-bottom-left-radius:var(--radius-lg)!important}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tl{border-top-left-radius:.25rem}.rounded-tl-none{border-top-left-radius:0}.\!rounded-r-lg{border-top-right-radius:var(--radius-lg)!important;border-bottom-right-radius:var(--radius-lg)!important}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-\[1rem\]{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-b-\[2\.5rem\]{border-bottom-right-radius:2.5rem;border-bottom-left-radius:2.5rem}.rounded-b-lg{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-0\!{border-style:var(--tw-border-style)!important;border-width:0!important}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[8px\]{border-style:var(--tw-border-style);border-width:8px}.border-\[10px\]{border-style:var(--tw-border-style);border-width:10px}.border-\[14px\]{border-style:var(--tw-border-style);border-width:14px}.border-\[16px\]{border-style:var(--tw-border-style);border-width:16px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-4{border-inline-start-style:var(--tw-border-style);border-inline-start-width:4px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\!border-r{border-right-style:var(--tw-border-style)!important;border-right-width:1px!important}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l,.border-l-1{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.dark .apexcharts-canvas .apexcharts-tooltip{background-color:var(--color-gray-700)!important;color:var(--color-gray-400)!important;border-color:#0000!important;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a!important}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title{background-color:var(--color-gray-600)!important;border-color:var(--color-gray-500)!important;color:var(--color-gray-500)!important}.dark .apexcharts-canvas .apexcharts-xaxistooltip{color:var(--color-gray-400)!important;background-color:var(--color-gray-700)!important}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label{color:var(--color-gray-400)!important}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value{color:#fff!important}.dark .apexcharts-canvas .apexcharts-xaxistooltip:after,.dark .apexcharts-canvas .apexcharts-xaxistooltip:before{border-bottom-color:var(--color-gray-700)!important}.dark .apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active{background-color:var(--color-gray-700)!important;color:var(--color-gray-400)!important}.dark .apexcharts-canvas .apexcharts-legend-text{color:var(--color-gray-400)!important}.dark .apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover{color:#fff!important}.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value{fill:#fff!important}.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label{fill:var(--color-gray-400)!important}.dark .apexcharts-gridline,.dark .apexcharts-xcrosshairs,.dark .apexcharts-ycrosshairs{stroke:var(--color-gray-700)!important}.dark .datatable-wrapper .datatable-search .datatable-input,.dark .datatable-wrapper .datatable-input{color:#fff;background-color:var(--color-gray-800);border:1px solid var(--color-gray-700)}.dark .datatable-wrapper thead th .datatable-input{background-color:var(--color-gray-700);border-color:var(--color-gray-600);color:#fff}.dark .datatable-wrapper .datatable-top .datatable-dropdown{color:var(--color-gray-400)}.dark .datatable-wrapper .datatable-top .datatable-dropdown .datatable-selector{background-color:var(--color-gray-800);border:1px solid var(--color-gray-700);color:#fff}.dark .datatable-wrapper .datatable-table{color:var(--color-gray-400)}.dark .datatable-wrapper .datatable-table thead{color:var(--color-gray-400);background-color:var(--color-gray-800)}.dark .datatable-wrapper .datatable-table thead th .datatable-sorter:hover,.dark .datatable-wrapper .datatable-table thead th.datatable-ascending .datatable-sorter,.dark .datatable-wrapper .datatable-table thead th.datatable-descending .datatable-sorter{color:#fff}.dark .datatable-wrapper .datatable-table tbody tr{border-bottom:1px solid var(--color-gray-700)}.dark .datatable-wrapper .datatable-bottom .datatable-info{color:var(--color-gray-400)}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link{color:var(--color-gray-400);border-color:var(--color-gray-700)}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link,.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link{color:#0000}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:after{content:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='oklch(70.7%25 0.022 261.325)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3e %3c/svg%3e")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:hover:after{content:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3e %3c/svg%3e")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:after{content:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='oklch(70.7%25 0.022 261.325)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3e %3c/svg%3e")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:hover:after{content:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3e %3c/svg%3e")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link{border-left:1px solid var(--color-gray-700)}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link:hover{background-color:var(--color-gray-700);color:#fff}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400{border-color:var(--color-amber-400)}.border-amber-700{border-color:var(--color-amber-700)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-400{border-color:var(--color-blue-400)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-700{border-color:var(--color-blue-700)}.border-cyan-200{border-color:var(--color-cyan-200)}.border-cyan-300{border-color:var(--color-cyan-300)}.border-cyan-400{border-color:var(--color-cyan-400)}.border-cyan-700{border-color:var(--color-cyan-700)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-400{border-color:var(--color-emerald-400)}.border-emerald-700{border-color:var(--color-emerald-700)}.border-fuchsia-200{border-color:var(--color-fuchsia-200)}.border-fuchsia-300{border-color:var(--color-fuchsia-300)}.border-fuchsia-400{border-color:var(--color-fuchsia-400)}.border-fuchsia-700{border-color:var(--color-fuchsia-700)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-500{border-color:var(--color-gray-500)}.border-gray-700{border-color:var(--color-gray-700)}.border-gray-800{border-color:var(--color-gray-800)}.border-gray-900{border-color:var(--color-gray-900)}.border-green-200{border-color:var(--color-green-200)}.border-green-300{border-color:var(--color-green-300)}.border-green-400{border-color:var(--color-green-400)}.border-green-500{border-color:var(--color-green-500)}.border-green-700{border-color:var(--color-green-700)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-indigo-400{border-color:var(--color-indigo-400)}.border-indigo-700{border-color:var(--color-indigo-700)}.border-inherit{border-color:inherit}.border-lime-200{border-color:var(--color-lime-200)}.border-lime-300{border-color:var(--color-lime-300)}.border-lime-400{border-color:var(--color-lime-400)}.border-lime-700{border-color:var(--color-lime-700)}.border-orange-200{border-color:var(--color-orange-200)}.border-orange-300{border-color:var(--color-orange-300)}.border-orange-400{border-color:var(--color-orange-400)}.border-orange-700{border-color:var(--color-orange-700)}.border-pink-200{border-color:var(--color-pink-200)}.border-pink-300{border-color:var(--color-pink-300)}.border-pink-400{border-color:var(--color-pink-400)}.border-pink-700{border-color:var(--color-pink-700)}.border-primary-200{border-color:#ffe4de}.border-primary-300{border-color:#ffd5cc}.border-primary-400{border-color:#ffbcad}.border-primary-500{border-color:#fe795d}.border-primary-600{border-color:#ef562f}.border-primary-700{border-color:#eb4f27}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-300{border-color:var(--color-purple-300)}.border-purple-400{border-color:var(--color-purple-400)}.border-purple-500{border-color:var(--color-purple-500)}.border-purple-700{border-color:var(--color-purple-700)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-400{border-color:var(--color-red-400)}.border-red-500{border-color:var(--color-red-500)}.border-red-700{border-color:var(--color-red-700)}.border-rose-200{border-color:var(--color-rose-200)}.border-rose-300{border-color:var(--color-rose-300)}.border-rose-400{border-color:var(--color-rose-400)}.border-rose-700{border-color:var(--color-rose-700)}.border-sky-200{border-color:var(--color-sky-200)}.border-sky-300{border-color:var(--color-sky-300)}.border-sky-400{border-color:var(--color-sky-400)}.border-sky-700{border-color:var(--color-sky-700)}.border-teal-200{border-color:var(--color-teal-200)}.border-teal-300{border-color:var(--color-teal-300)}.border-teal-400{border-color:var(--color-teal-400)}.border-teal-700{border-color:var(--color-teal-700)}.border-transparent{border-color:#0000}.border-violet-200{border-color:var(--color-violet-200)}.border-violet-300{border-color:var(--color-violet-300)}.border-violet-400{border-color:var(--color-violet-400)}.border-violet-700{border-color:var(--color-violet-700)}.border-white{border-color:var(--color-white)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-yellow-300{border-color:var(--color-yellow-300)}.border-yellow-400{border-color:var(--color-yellow-400)}.datatable-wrapper .datatable-table tbody tr.selected{background-color:var(--color-gray-100)}.dark .datatable-wrapper .datatable-table tbody tr.selected{background-color:var(--color-gray-700)}.datatable-wrapper .datatable-table tbody tr.selected\!{background-color:var(--color-gray-100)!important}.dark .datatable-wrapper .datatable-table tbody tr.selected\!{background-color:var(--color-gray-700)!important}.\!bg-blue-500{background-color:var(--color-blue-500)!important}.\!bg-green-500{background-color:var(--color-green-500)!important}.\!bg-primary-500{background-color:#fe795d!important}.\!bg-purple-500{background-color:var(--color-purple-500)!important}.\!bg-red-500{background-color:var(--color-red-500)!important}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-300{background-color:var(--color-amber-300)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-600{background-color:var(--color-amber-600)}.bg-amber-700{background-color:var(--color-amber-700)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-200{background-color:var(--color-blue-200)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-700{background-color:var(--color-blue-700)}.bg-blue-800{background-color:var(--color-blue-800)}.bg-cyan-50{background-color:var(--color-cyan-50)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-300{background-color:var(--color-cyan-300)}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-cyan-600{background-color:var(--color-cyan-600)}.bg-cyan-700{background-color:var(--color-cyan-700)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-700{background-color:var(--color-emerald-700)}.bg-fuchsia-50{background-color:var(--color-fuchsia-50)}.bg-fuchsia-100{background-color:var(--color-fuchsia-100)}.bg-fuchsia-300{background-color:var(--color-fuchsia-300)}.bg-fuchsia-400{background-color:var(--color-fuchsia-400)}.bg-fuchsia-500{background-color:var(--color-fuchsia-500)}.bg-fuchsia-600{background-color:var(--color-fuchsia-600)}.bg-fuchsia-700{background-color:var(--color-fuchsia-700)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-200{background-color:var(--color-green-200)}.bg-green-300{background-color:var(--color-green-300)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-600{background-color:var(--color-green-600)}.bg-green-700{background-color:var(--color-green-700)}.bg-green-800{background-color:var(--color-green-800)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-300{background-color:var(--color-indigo-300)}.bg-indigo-400{background-color:var(--color-indigo-400)}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-indigo-700{background-color:var(--color-indigo-700)}.bg-indigo-800{background-color:var(--color-indigo-800)}.bg-inherit{background-color:inherit}.bg-lime-50{background-color:var(--color-lime-50)}.bg-lime-100{background-color:var(--color-lime-100)}.bg-lime-300{background-color:var(--color-lime-300)}.bg-lime-400{background-color:var(--color-lime-400)}.bg-lime-500{background-color:var(--color-lime-500)}.bg-lime-600{background-color:var(--color-lime-600)}.bg-lime-700{background-color:var(--color-lime-700)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-200{background-color:var(--color-orange-200)}.bg-orange-300{background-color:var(--color-orange-300)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-600{background-color:var(--color-orange-600)}.bg-orange-700{background-color:var(--color-orange-700)}.bg-pink-50{background-color:var(--color-pink-50)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-pink-300{background-color:var(--color-pink-300)}.bg-pink-400{background-color:var(--color-pink-400)}.bg-pink-500{background-color:var(--color-pink-500)}.bg-pink-600{background-color:var(--color-pink-600)}.bg-pink-700{background-color:var(--color-pink-700)}.bg-pink-800{background-color:var(--color-pink-800)}.bg-primary-50{background-color:#fff5f2}.bg-primary-100{background-color:#fff1ee}.bg-primary-200{background-color:#ffe4de}.bg-primary-300{background-color:#ffd5cc}.bg-primary-400{background-color:#ffbcad}.bg-primary-500{background-color:#fe795d}.bg-primary-600{background-color:#ef562f}.bg-primary-700{background-color:#eb4f27}.bg-primary-800{background-color:#cc4522}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-200{background-color:var(--color-purple-200)}.bg-purple-300{background-color:var(--color-purple-300)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-purple-700{background-color:var(--color-purple-700)}.bg-purple-800{background-color:var(--color-purple-800)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-200{background-color:var(--color-red-200)}.bg-red-300{background-color:var(--color-red-300)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-red-700{background-color:var(--color-red-700)}.bg-red-900{background-color:var(--color-red-900)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-300{background-color:var(--color-rose-300)}.bg-rose-400{background-color:var(--color-rose-400)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-600{background-color:var(--color-rose-600)}.bg-rose-700{background-color:var(--color-rose-700)}.bg-rose-800{background-color:var(--color-rose-800)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-300{background-color:var(--color-sky-300)}.bg-sky-400{background-color:var(--color-sky-400)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-sky-600{background-color:var(--color-sky-600)}.bg-sky-700{background-color:var(--color-sky-700)}.bg-teal-50{background-color:var(--color-teal-50)}.bg-teal-100{background-color:var(--color-teal-100)}.bg-teal-300{background-color:var(--color-teal-300)}.bg-teal-400{background-color:var(--color-teal-400)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-600{background-color:var(--color-teal-600)}.bg-teal-700{background-color:var(--color-teal-700)}.bg-transparent{background-color:#0000}.bg-violet-50{background-color:var(--color-violet-50)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-300{background-color:var(--color-violet-300)}.bg-violet-400{background-color:var(--color-violet-400)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-600{background-color:var(--color-violet-600)}.bg-violet-700{background-color:var(--color-violet-700)}.bg-white{background-color:var(--color-white)}.bg-white\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\/30{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-600{background-color:var(--color-yellow-600)}.bg-yellow-700{background-color:var(--color-yellow-700)}.dark .selectedCell{background-color:var(--color-gray-700)}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-400{--tw-gradient-from:var(--color-blue-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-cyan-400{--tw-gradient-from:var(--color-cyan-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-fuchsia-500{--tw-gradient-from:var(--color-fuchsia-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-green-400{--tw-gradient-from:var(--color-green-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-indigo-600{--tw-gradient-from:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-lime-200{--tw-gradient-from:var(--color-lime-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-orange-400{--tw-gradient-from:var(--color-orange-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-pink-400{--tw-gradient-from:var(--color-pink-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-pink-500{--tw-gradient-from:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-600{--tw-gradient-from:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-200{--tw-gradient-from:var(--color-red-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-400{--tw-gradient-from:var(--color-red-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-600{--tw-gradient-from:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-sky-400{--tw-gradient-from:var(--color-sky-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-teal-200{--tw-gradient-from:var(--color-teal-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-teal-400{--tw-gradient-from:var(--color-teal-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-violet-600{--tw-gradient-from:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-yellow-200{--tw-gradient-from:var(--color-yellow-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-blue-600{--tw-gradient-via:var(--color-blue-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-cyan-500{--tw-gradient-via:var(--color-cyan-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-green-500{--tw-gradient-via:var(--color-green-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-400{--tw-gradient-via:var(--color-indigo-400);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-lime-400{--tw-gradient-via:var(--color-lime-400);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-pink-500{--tw-gradient-via:var(--color-pink-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-600{--tw-gradient-via:var(--color-purple-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-red-300{--tw-gradient-via:var(--color-red-300);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-red-500{--tw-gradient-via:var(--color-red-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-teal-500{--tw-gradient-via:var(--color-teal-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-600{--tw-gradient-to:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-700{--tw-gradient-to:var(--color-blue-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-cyan-400{--tw-gradient-to:var(--color-cyan-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-cyan-600{--tw-gradient-to:var(--color-cyan-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-green-400{--tw-gradient-to:var(--color-green-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-green-600{--tw-gradient-to:var(--color-green-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-lime-200{--tw-gradient-to:var(--color-lime-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-lime-300{--tw-gradient-to:var(--color-lime-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-lime-500{--tw-gradient-to:var(--color-lime-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-orange-400{--tw-gradient-to:var(--color-orange-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-600{--tw-gradient-to:var(--color-pink-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-purple-700{--tw-gradient-to:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-red-500{--tw-gradient-to:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-red-600{--tw-gradient-to:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-rose-500{--tw-gradient-to:var(--color-rose-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-600{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-yellow-200{--tw-gradient-to:var(--color-yellow-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-yellow-500{--tw-gradient-to:var(--color-yellow-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.fill-amber-500{fill:var(--color-amber-500)}.fill-blue-600{fill:var(--color-blue-600)}.fill-cyan-500{fill:var(--color-cyan-500)}.fill-emerald-500{fill:var(--color-emerald-500)}.fill-fuchsia-600{fill:var(--color-fuchsia-600)}.fill-gray-600{fill:var(--color-gray-600)}.fill-green-500{fill:var(--color-green-500)}.fill-indigo-600{fill:var(--color-indigo-600)}.fill-lime-500{fill:var(--color-lime-500)}.fill-orange-500{fill:var(--color-orange-500)}.fill-pink-600{fill:var(--color-pink-600)}.fill-primary-600{fill:#ef562f}.fill-purple-600{fill:var(--color-purple-600)}.fill-red-600{fill:var(--color-red-600)}.fill-rose-600{fill:var(--color-rose-600)}.fill-sky-500{fill:var(--color-sky-500)}.fill-teal-500{fill:var(--color-teal-500)}.fill-violet-600{fill:var(--color-violet-600)}.fill-yellow-400{fill:var(--color-yellow-400)}.stroke-amber-600{stroke:var(--color-amber-600)}.stroke-blue-600{stroke:var(--color-blue-600)}.stroke-cyan-600{stroke:var(--color-cyan-600)}.stroke-emerald-600{stroke:var(--color-emerald-600)}.stroke-fuchsia-600{stroke:var(--color-fuchsia-600)}.stroke-gray-600{stroke:var(--color-gray-600)}.stroke-green-600{stroke:var(--color-green-600)}.stroke-indigo-600{stroke:var(--color-indigo-600)}.stroke-lime-600{stroke:var(--color-lime-600)}.stroke-orange-600{stroke:var(--color-orange-600)}.stroke-pink-600{stroke:var(--color-pink-600)}.stroke-primary-600{stroke:#ef562f}.stroke-purple-600{stroke:var(--color-purple-600)}.stroke-red-600{stroke:var(--color-red-600)}.stroke-rose-600{stroke:var(--color-rose-600)}.stroke-sky-600{stroke:var(--color-sky-600)}.stroke-teal-600{stroke:var(--color-teal-600)}.stroke-violet-600{stroke:var(--color-violet-600)}.stroke-yellow-400{stroke:var(--color-yellow-400)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-fill{object-fit:fill}.object-none{object-fit:none}.object-scale-down{object-fit:scale-down}.p-0{padding:calc(var(--spacing)*0)}.p-0\!{padding:calc(var(--spacing)*0)!important}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-2\.5{padding:calc(var(--spacing)*2.5)}.p-3{padding:calc(var(--spacing)*3)}.p-3\!{padding:calc(var(--spacing)*3)!important}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-0\!{padding-inline:calc(var(--spacing)*0)!important}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-3\.5{padding-block:calc(var(--spacing)*3.5)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-8{padding-block:calc(var(--spacing)*8)}.py-14{padding-block:calc(var(--spacing)*14)}.ps-2\.5{padding-inline-start:calc(var(--spacing)*2.5)}.ps-3{padding-inline-start:calc(var(--spacing)*3)}.ps-3\.5{padding-inline-start:calc(var(--spacing)*3.5)}.ps-4{padding-inline-start:calc(var(--spacing)*4)}.ps-6{padding-inline-start:calc(var(--spacing)*6)}.ps-9{padding-inline-start:calc(var(--spacing)*9)}.ps-10{padding-inline-start:calc(var(--spacing)*10)}.ps-11{padding-inline-start:calc(var(--spacing)*11)}.pe-0{padding-inline-end:calc(var(--spacing)*0)}.pe-3\.5{padding-inline-end:calc(var(--spacing)*3.5)}.pe-4{padding-inline-end:calc(var(--spacing)*4)}.pe-9{padding-inline-end:calc(var(--spacing)*9)}.pe-10{padding-inline-end:calc(var(--spacing)*10)}.pe-11{padding-inline-end:calc(var(--spacing)*11)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-1\.5{padding-bottom:calc(var(--spacing)*1.5)}.pb-2\.5{padding-bottom:calc(var(--spacing)*2.5)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.text-8xl{font-size:var(--text-8xl);line-height:var(--tw-leading,var(--text-8xl--line-height))}.text-9xl{font-size:var(--text-9xl);line-height:var(--tw-leading,var(--text-9xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5{--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.leading-7{--tw-leading:calc(var(--spacing)*7);line-height:calc(var(--spacing)*7)}.leading-8{--tw-leading:calc(var(--spacing)*8);line-height:calc(var(--spacing)*8)}.leading-9{--tw-leading:calc(var(--spacing)*9);line-height:calc(var(--spacing)*9)}.leading-10{--tw-leading:calc(var(--spacing)*10);line-height:calc(var(--spacing)*10)}.leading-loose{--tw-leading:var(--leading-loose);line-height:var(--leading-loose)}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-extralight{--tw-font-weight:var(--font-weight-extralight);font-weight:var(--font-weight-extralight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin{--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-100{color:var(--color-amber-100)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-black{color:var(--color-black)}.text-blue-100{color:var(--color-blue-100)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-blue-900{color:var(--color-blue-900)}.text-cyan-100{color:var(--color-cyan-100)}.text-cyan-500{color:var(--color-cyan-500)}.text-cyan-600{color:var(--color-cyan-600)}.text-cyan-700{color:var(--color-cyan-700)}.text-cyan-800{color:var(--color-cyan-800)}.text-cyan-900{color:var(--color-cyan-900)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-fuchsia-100{color:var(--color-fuchsia-100)}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-fuchsia-600{color:var(--color-fuchsia-600)}.text-fuchsia-700{color:var(--color-fuchsia-700)}.text-fuchsia-800{color:var(--color-fuchsia-800)}.text-fuchsia-900{color:var(--color-fuchsia-900)}.text-gray-100{color:var(--color-gray-100)}.text-gray-200{color:var(--color-gray-200)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-gray-900\!{color:var(--color-gray-900)!important}.text-green-100{color:var(--color-green-100)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-green-900{color:var(--color-green-900)}.text-indigo-100{color:var(--color-indigo-100)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-indigo-900{color:var(--color-indigo-900)}.text-inherit{color:inherit}.text-lime-100{color:var(--color-lime-100)}.text-lime-500{color:var(--color-lime-500)}.text-lime-600{color:var(--color-lime-600)}.text-lime-700{color:var(--color-lime-700)}.text-lime-800{color:var(--color-lime-800)}.text-lime-900{color:var(--color-lime-900)}.text-orange-100{color:var(--color-orange-100)}.text-orange-500{color:var(--color-orange-500)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-orange-800{color:var(--color-orange-800)}.text-orange-900{color:var(--color-orange-900)}.text-pink-100{color:var(--color-pink-100)}.text-pink-500{color:var(--color-pink-500)}.text-pink-600{color:var(--color-pink-600)}.text-pink-700{color:var(--color-pink-700)}.text-pink-800{color:var(--color-pink-800)}.text-pink-900{color:var(--color-pink-900)}.text-primary-100{color:#fff1ee}.text-primary-500{color:#fe795d}.text-primary-600{color:#ef562f}.text-primary-700{color:#eb4f27}.text-primary-800{color:#cc4522}.text-primary-900{color:#a5371b}.text-purple-100{color:var(--color-purple-100)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-purple-800{color:var(--color-purple-800)}.text-purple-900{color:var(--color-purple-900)}.text-red-100{color:var(--color-red-100)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-red-900{color:var(--color-red-900)}.text-rose-100{color:var(--color-rose-100)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-rose-900{color:var(--color-rose-900)}.text-sky-100{color:var(--color-sky-100)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-sky-900{color:var(--color-sky-900)}.text-teal-100{color:var(--color-teal-100)}.text-teal-500{color:var(--color-teal-500)}.text-teal-600{color:var(--color-teal-600)}.text-teal-700{color:var(--color-teal-700)}.text-teal-800{color:var(--color-teal-800)}.text-teal-900{color:var(--color-teal-900)}.text-transparent{color:#0000}.text-violet-100{color:var(--color-violet-100)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-700{color:var(--color-violet-700)}.text-violet-800{color:var(--color-violet-800)}.text-violet-900{color:var(--color-violet-900)}.text-white{color:var(--color-white)}.text-yellow-100{color:var(--color-yellow-100)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.text-yellow-900{color:var(--color-yellow-900)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.decoration-blue-400{-webkit-text-decoration-color:var(--color-blue-400);text-decoration-color:var(--color-blue-400)}.decoration-cyan-400{-webkit-text-decoration-color:var(--color-cyan-400);text-decoration-color:var(--color-cyan-400)}.decoration-emerald-400{-webkit-text-decoration-color:var(--color-emerald-400);text-decoration-color:var(--color-emerald-400)}.decoration-fuchsia-400{-webkit-text-decoration-color:var(--color-fuchsia-400);text-decoration-color:var(--color-fuchsia-400)}.decoration-gray-400{-webkit-text-decoration-color:var(--color-gray-400);text-decoration-color:var(--color-gray-400)}.decoration-green-400{-webkit-text-decoration-color:var(--color-green-400);text-decoration-color:var(--color-green-400)}.decoration-indigo-400{-webkit-text-decoration-color:var(--color-indigo-400);text-decoration-color:var(--color-indigo-400)}.decoration-lime-400{-webkit-text-decoration-color:var(--color-lime-400);text-decoration-color:var(--color-lime-400)}.decoration-orange-400{-webkit-text-decoration-color:var(--color-orange-400);text-decoration-color:var(--color-orange-400)}.decoration-pink-400{-webkit-text-decoration-color:var(--color-pink-400);text-decoration-color:var(--color-pink-400)}.decoration-primary-400{text-decoration-color:#ffbcad}.decoration-purple-400{-webkit-text-decoration-color:var(--color-purple-400);text-decoration-color:var(--color-purple-400)}.decoration-red-400{-webkit-text-decoration-color:var(--color-red-400);text-decoration-color:var(--color-red-400)}.decoration-rose-400{-webkit-text-decoration-color:var(--color-rose-400);text-decoration-color:var(--color-rose-400)}.decoration-sky-400{-webkit-text-decoration-color:var(--color-sky-400);text-decoration-color:var(--color-sky-400)}.decoration-teal-400{-webkit-text-decoration-color:var(--color-teal-400);text-decoration-color:var(--color-teal-400)}.decoration-violet-400{-webkit-text-decoration-color:var(--color-violet-400);text-decoration-color:var(--color-violet-400)}.decoration-yellow-400{-webkit-text-decoration-color:var(--color-yellow-400);text-decoration-color:var(--color-yellow-400)}.decoration-dashed{text-decoration-style:dashed}.decoration-dotted{text-decoration-style:dotted}.decoration-double{text-decoration-style:double}.decoration-wavy{text-decoration-style:wavy}.decoration-0{text-decoration-thickness:0}.decoration-1{text-decoration-thickness:1px}.decoration-2{text-decoration-thickness:2px}.decoration-4{text-decoration-thickness:4px}.decoration-8{text-decoration-thickness:8px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.placeholder-amber-700::placeholder{color:var(--color-amber-700)}.placeholder-blue-700::placeholder{color:var(--color-blue-700)}.placeholder-cyan-700::placeholder{color:var(--color-cyan-700)}.placeholder-emerald-700::placeholder{color:var(--color-emerald-700)}.placeholder-fuchsia-700::placeholder{color:var(--color-fuchsia-700)}.placeholder-gray-400::placeholder{color:var(--color-gray-400)}.placeholder-gray-700::placeholder{color:var(--color-gray-700)}.placeholder-green-700::placeholder{color:var(--color-green-700)}.placeholder-indigo-700::placeholder{color:var(--color-indigo-700)}.placeholder-lime-700::placeholder{color:var(--color-lime-700)}.placeholder-orange-700::placeholder{color:var(--color-orange-700)}.placeholder-pink-700::placeholder{color:var(--color-pink-700)}.placeholder-primary-700::placeholder{color:#eb4f27}.placeholder-purple-700::placeholder{color:var(--color-purple-700)}.placeholder-red-700::placeholder{color:var(--color-red-700)}.placeholder-rose-700::placeholder{color:var(--color-rose-700)}.placeholder-sky-700::placeholder{color:var(--color-sky-700)}.placeholder-teal-700::placeholder{color:var(--color-teal-700)}.placeholder-violet-700::placeholder{color:var(--color-violet-700)}.placeholder-yellow-700::placeholder{color:var(--color-yellow-700)}.accent-blue-500{accent-color:var(--color-blue-500)}.accent-fuchsia-500{accent-color:var(--color-fuchsia-500)}.accent-gray-500{accent-color:var(--color-gray-500)}.accent-indigo-500{accent-color:var(--color-indigo-500)}.accent-pink-500{accent-color:var(--color-pink-500)}.accent-purple-500{accent-color:var(--color-purple-500)}.accent-red-500{accent-color:var(--color-red-500)}.accent-rose-500{accent-color:var(--color-rose-500)}.accent-violet-500{accent-color:var(--color-violet-500)}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow\!{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_4px_rgba\(34\,197\,94\,0\.2\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,#22c55e33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_4px_rgba\(59\,130\,246\,0\.2\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,#3b82f633);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_4px_rgba\(168\,85\,247\,0\.2\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,#a855f733);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_4px_rgba\(239\,68\,68\,0\.2\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,#ef444433);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-8{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(8px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-500\/50{--tw-shadow-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-amber-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)20%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-blue-500\/50{--tw-shadow-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.shadow-blue-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-cyan-500\/50{--tw-shadow-color:#00b7d780}@supports (color:color-mix(in lab,red,red)){.shadow-cyan-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-cyan-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-emerald-500\/50{--tw-shadow-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-emerald-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-fuchsia-500\/50{--tw-shadow-color:#e12afb80}@supports (color:color-mix(in lab,red,red)){.shadow-fuchsia-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-fuchsia-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-gray-500\/50{--tw-shadow-color:#6a728280}@supports (color:color-mix(in lab,red,red)){.shadow-gray-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-gray-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-green-500\/50{--tw-shadow-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.shadow-green-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-green-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-indigo-500\/50{--tw-shadow-color:#625fff80}@supports (color:color-mix(in lab,red,red)){.shadow-indigo-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-indigo-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-lime-500\/50{--tw-shadow-color:#80cd0080}@supports (color:color-mix(in lab,red,red)){.shadow-lime-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-lime-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-orange-500\/50{--tw-shadow-color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.shadow-orange-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-orange-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-pink-500\/50{--tw-shadow-color:#f6339a80}@supports (color:color-mix(in lab,red,red)){.shadow-pink-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-pink-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-primary-500\/50{--tw-shadow-color:#fe795d80}@supports (color:color-mix(in lab,red,red)){.shadow-primary-500\/50{--tw-shadow-color:color-mix(in oklab,oklab(72.6768% .1406 .0925087/.5) var(--tw-shadow-alpha),transparent)}}.shadow-purple-500\/50{--tw-shadow-color:#ac4bff80}@supports (color:color-mix(in lab,red,red)){.shadow-purple-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-purple-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-red-500\/50{--tw-shadow-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-red-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-rose-500\/50{--tw-shadow-color:#ff235780}@supports (color:color-mix(in lab,red,red)){.shadow-rose-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-rose-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-sky-500\/50{--tw-shadow-color:#00a5ef80}@supports (color:color-mix(in lab,red,red)){.shadow-sky-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-sky-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-teal-500\/50{--tw-shadow-color:#00baa780}@supports (color:color-mix(in lab,red,red)){.shadow-teal-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-teal-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-violet-500\/50{--tw-shadow-color:#8d54ff80}@supports (color:color-mix(in lab,red,red)){.shadow-violet-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-violet-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-yellow-500\/50{--tw-shadow-color:#edb20080}@supports (color:color-mix(in lab,red,red)){.shadow-yellow-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-yellow-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-black\/5{--tw-ring-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.ring-black\/5{--tw-ring-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.ring-gray-300{--tw-ring-color:var(--color-gray-300)}.ring-primary-500{--tw-ring-color:#fe795d}.ring-white{--tw-ring-color:var(--color-white)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-4{outline-style:var(--tw-outline-style);outline-width:4px}.outline-green-500{outline-color:var(--color-green-500)}.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-sm{--tw-blur:blur(var(--blur-sm));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-xs{--tw-blur:blur(var(--blur-xs));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{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);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,)}.grayscale{--tw-grayscale:grayscale(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,)}.hue-rotate-60{--tw-hue-rotate:hue-rotate(60deg);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,)}.saturate-50{--tw-saturate:saturate(50%);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,)}.sepia{--tw-sepia:sepia(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,)}.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,)!important}.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-sm{--tw-backdrop-blur:blur(var(--blur-sm));-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-grayscale{--tw-backdrop-grayscale:grayscale(100%);-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-invert{--tw-backdrop-invert:invert(100%);-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-sepia{--tw-backdrop-sepia:sepia(100%);-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-filter{-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,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.will-change-transform{will-change:transform}.\[contain\:layout_style_paint\]{contain:layout style paint}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}.not-first\:-ms-4:not(:first-child){margin-inline-start:calc(var(--spacing)*-4)}.not-first\:-ms-px:not(:first-child),.group-not-first\:-ms-px:is(:where(.group):not(:first-child) *){margin-inline-start:-1px}.group-first\:rounded-s-lg:is(:where(.group):first-child *){border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.group-first\:rounded-t-xl:is(:where(.group):first-child *){border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.group-first\:border-t:is(:where(.group):first-child *){border-top-style:var(--tw-border-style);border-top-width:1px}.group-last\:rounded-e-lg:is(:where(.group):last-child *){border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}@media(hover:hover){.group-hover\:rotate-45:is(:where(.group):hover *){rotate:45deg}.group-hover\:bg-white\/50:is(:where(.group):hover *){background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-white\/50:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.group-hover\:text-inherit\!:is(:where(.group):hover *){color:inherit!important}.group-hover\:text-primary-600:is(:where(.group):hover *){color:#ef562f}.group-hover\:opacity-0\!:is(:where(.group):hover *){opacity:0!important}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-focus\:ring-4:is(:where(.group):focus *){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-focus\:ring-white:is(:where(.group):focus *){--tw-ring-color:var(--color-white)}.group-focus\:outline-hidden:is(:where(.group):focus *){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.group-focus\:outline-hidden:is(:where(.group):focus *){outline-offset:2px;outline:2px solid #0000}}.group-has-\[ul\]\:ms-6:is(:where(.group):has(:is(ul)) *){margin-inline-start:calc(var(--spacing)*6)}.peer-checked\:bg-amber-600:is(:where(.peer):checked~*){background-color:var(--color-amber-600)}.peer-checked\:bg-blue-600:is(:where(.peer):checked~*){background-color:var(--color-blue-600)}.peer-checked\:bg-cyan-600:is(:where(.peer):checked~*){background-color:var(--color-cyan-600)}.peer-checked\:bg-emerald-600:is(:where(.peer):checked~*){background-color:var(--color-emerald-600)}.peer-checked\:bg-fuchsia-600:is(:where(.peer):checked~*){background-color:var(--color-fuchsia-600)}.peer-checked\:bg-gray-500:is(:where(.peer):checked~*){background-color:var(--color-gray-500)}.peer-checked\:bg-green-600:is(:where(.peer):checked~*){background-color:var(--color-green-600)}.peer-checked\:bg-indigo-600:is(:where(.peer):checked~*){background-color:var(--color-indigo-600)}.peer-checked\:bg-lime-500:is(:where(.peer):checked~*){background-color:var(--color-lime-500)}.peer-checked\:bg-orange-500:is(:where(.peer):checked~*){background-color:var(--color-orange-500)}.peer-checked\:bg-pink-600:is(:where(.peer):checked~*){background-color:var(--color-pink-600)}.peer-checked\:bg-primary-600:is(:where(.peer):checked~*){background-color:#ef562f}.peer-checked\:bg-purple-600:is(:where(.peer):checked~*){background-color:var(--color-purple-600)}.peer-checked\:bg-red-600:is(:where(.peer):checked~*){background-color:var(--color-red-600)}.peer-checked\:bg-rose-600:is(:where(.peer):checked~*){background-color:var(--color-rose-600)}.peer-checked\:bg-sky-600:is(:where(.peer):checked~*){background-color:var(--color-sky-600)}.peer-checked\:bg-teal-600:is(:where(.peer):checked~*){background-color:var(--color-teal-600)}.peer-checked\:bg-violet-600:is(:where(.peer):checked~*){background-color:var(--color-violet-600)}.peer-checked\:bg-yellow-400:is(:where(.peer):checked~*){background-color:var(--color-yellow-400)}.peer-placeholder-shown\:start-6:is(:where(.peer):placeholder-shown~*){inset-inline-start:calc(var(--spacing)*6)}.peer-placeholder-shown\:top-1\/2:is(:where(.peer):placeholder-shown~*){top:50%}.peer-placeholder-shown\:-translate-y-1\/2:is(:where(.peer):placeholder-shown~*){--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-placeholder-shown\:translate-y-0:is(:where(.peer):placeholder-shown~*){--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-placeholder-shown\:scale-100:is(:where(.peer):placeholder-shown~*){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.peer-focus\:start-0:is(:where(.peer):focus~*){inset-inline-start:calc(var(--spacing)*0)}.peer-focus\:top-2:is(:where(.peer):focus~*){top:calc(var(--spacing)*2)}.peer-focus\:-translate-y-4:is(:where(.peer):focus~*){--tw-translate-y:calc(var(--spacing)*-4);translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-focus\:-translate-y-6:is(:where(.peer):focus~*){--tw-translate-y:calc(var(--spacing)*-6);translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-focus\:scale-75:is(:where(.peer):focus~*){--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.peer-focus\:px-2:is(:where(.peer):focus~*){padding-inline:calc(var(--spacing)*2)}.peer-focus\:text-amber-600:is(:where(.peer):focus~*){color:var(--color-amber-600)}.peer-focus\:text-blue-600:is(:where(.peer):focus~*){color:var(--color-blue-600)}.peer-focus\:text-cyan-600:is(:where(.peer):focus~*){color:var(--color-cyan-600)}.peer-focus\:text-emerald-600:is(:where(.peer):focus~*){color:var(--color-emerald-600)}.peer-focus\:text-fuchsia-600:is(:where(.peer):focus~*){color:var(--color-fuchsia-600)}.peer-focus\:text-gray-600:is(:where(.peer):focus~*){color:var(--color-gray-600)}.peer-focus\:text-green-600:is(:where(.peer):focus~*){color:var(--color-green-600)}.peer-focus\:text-indigo-600:is(:where(.peer):focus~*){color:var(--color-indigo-600)}.peer-focus\:text-lime-600:is(:where(.peer):focus~*){color:var(--color-lime-600)}.peer-focus\:text-orange-600:is(:where(.peer):focus~*){color:var(--color-orange-600)}.peer-focus\:text-pink-600:is(:where(.peer):focus~*){color:var(--color-pink-600)}.peer-focus\:text-primary-600:is(:where(.peer):focus~*){color:#ef562f}.peer-focus\:text-purple-600:is(:where(.peer):focus~*){color:var(--color-purple-600)}.peer-focus\:text-red-600:is(:where(.peer):focus~*){color:var(--color-red-600)}.peer-focus\:text-rose-600:is(:where(.peer):focus~*){color:var(--color-rose-600)}.peer-focus\:text-sky-600:is(:where(.peer):focus~*){color:var(--color-sky-600)}.peer-focus\:text-teal-600:is(:where(.peer):focus~*){color:var(--color-teal-600)}.peer-focus\:text-violet-600:is(:where(.peer):focus~*){color:var(--color-violet-600)}.peer-focus\:text-yellow-600:is(:where(.peer):focus~*){color:var(--color-yellow-600)}.peer-focus\:ring-4:is(:where(.peer):focus~*){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.peer-focus\:ring-amber-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-amber-300)}.peer-focus\:ring-blue-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-blue-300)}.peer-focus\:ring-cyan-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-cyan-300)}.peer-focus\:ring-emerald-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-emerald-300)}.peer-focus\:ring-fuchsia-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-fuchsia-300)}.peer-focus\:ring-gray-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-gray-300)}.peer-focus\:ring-green-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-green-300)}.peer-focus\:ring-indigo-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-indigo-300)}.peer-focus\:ring-lime-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-lime-300)}.peer-focus\:ring-orange-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-orange-300)}.peer-focus\:ring-pink-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-pink-300)}.peer-focus\:ring-primary-300:is(:where(.peer):focus~*){--tw-ring-color:#ffd5cc}.peer-focus\:ring-purple-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-purple-300)}.peer-focus\:ring-red-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-red-300)}.peer-focus\:ring-rose-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-rose-300)}.peer-focus\:ring-sky-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-sky-300)}.peer-focus\:ring-teal-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-teal-300)}.peer-focus\:ring-violet-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-violet-300)}.peer-focus\:ring-yellow-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-yellow-300)}.first-letter\:float-left:first-letter{float:left}.first-letter\:me-3:first-letter{margin-inline-end:calc(var(--spacing)*3)}.first-letter\:text-7xl:first-letter{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.first-letter\:font-bold:first-letter{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.first-letter\:text-gray-900:first-letter{color:var(--color-gray-900)}.first-line\:tracking-widest:first-line{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.first-line\:uppercase:first-line{text-transform:uppercase}.backdrop\:bg-gray-900\/50::backdrop{background-color:#10182880}@supports (color:color-mix(in lab,red,red)){.backdrop\:bg-gray-900\/50::backdrop{background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-\[2px\]:after{content:var(--tw-content);inset-inline-start:2px}.after\:start-\[4px\]:after{content:var(--tw-content);inset-inline-start:4px}.after\:top-0\.5:after{content:var(--tw-content);top:calc(var(--spacing)*.5)}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:mx-2:after{content:var(--tw-content);margin-inline:calc(var(--spacing)*2)}.after\:mx-6:after{content:var(--tw-content);margin-inline:calc(var(--spacing)*6)}.after\:hidden:after{content:var(--tw-content);display:none}.after\:inline-block:after{content:var(--tw-content);display:inline-block}.after\:h-1:after{content:var(--tw-content);height:calc(var(--spacing)*1)}.after\:h-4:after{content:var(--tw-content);height:calc(var(--spacing)*4)}.after\:h-5:after{content:var(--tw-content);height:calc(var(--spacing)*5)}.after\:h-6:after{content:var(--tw-content);height:calc(var(--spacing)*6)}.after\:w-4:after{content:var(--tw-content);width:calc(var(--spacing)*4)}.after\:w-5:after{content:var(--tw-content);width:calc(var(--spacing)*5)}.after\:w-6:after{content:var(--tw-content);width:calc(var(--spacing)*6)}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:rounded-full:after{content:var(--tw-content);border-radius:3.40282e38px}.after\:border:after,.after\:border-1:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-4:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:4px}.after\:border-b:after{content:var(--tw-content);border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.after\:border-gray-100:after{content:var(--tw-content);border-color:var(--color-gray-100)}.after\:border-gray-200:after{content:var(--tw-content);border-color:var(--color-gray-200)}.after\:border-gray-300:after{content:var(--tw-content);border-color:var(--color-gray-300)}.after\:border-primary-100:after{content:var(--tw-content);border-color:#fff1ee}.after\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\:text-gray-200:after{content:var(--tw-content);color:var(--color-gray-200)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:content-\[\'\/\'\]:after{--tw-content:"/";content:var(--tw-content)}.after\:content-none:after{content:var(--tw-content);--tw-content:none;content:none}.peer-checked\:after\:translate-x-full:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-checked\:after\:border-white:is(:where(.peer):checked~*):after{content:var(--tw-content);border-color:var(--color-white)}.first\:rounded-s-full:first-child{border-start-start-radius:3.40282e38px;border-end-start-radius:3.40282e38px}.first\:rounded-s-lg:first-child{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.first\:rounded-s-md:first-child{border-start-start-radius:var(--radius-md);border-end-start-radius:var(--radius-md)}.first\:rounded-s-sm:first-child{border-start-start-radius:var(--radius-sm);border-end-start-radius:var(--radius-sm)}.first\:rounded-s-xl:first-child{border-start-start-radius:var(--radius-xl);border-end-start-radius:var(--radius-xl)}.first\:rounded-t-lg:first-child{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.last\:me-0:last-child{margin-inline-end:calc(var(--spacing)*0)}.last\:rounded-e-full:last-child{border-start-end-radius:3.40282e38px;border-end-end-radius:3.40282e38px}.last\:rounded-e-lg:last-child{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.last\:rounded-e-md:last-child{border-start-end-radius:var(--radius-md);border-end-end-radius:var(--radius-md)}.last\:rounded-e-sm:last-child{border-start-end-radius:var(--radius-sm);border-end-end-radius:var(--radius-sm)}.last\:rounded-e-xl:last-child{border-start-end-radius:var(--radius-xl);border-end-end-radius:var(--radius-xl)}.last\:rounded-r-lg:last-child{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.last\:rounded-b-lg:last-child{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.odd\:bg-amber-500:nth-child(odd){background-color:var(--color-amber-500)}.odd\:bg-blue-500:nth-child(odd){background-color:var(--color-blue-500)}.odd\:bg-cyan-500:nth-child(odd){background-color:var(--color-cyan-500)}.odd\:bg-emerald-500:nth-child(odd){background-color:var(--color-emerald-500)}.odd\:bg-fuchsia-500:nth-child(odd){background-color:var(--color-fuchsia-500)}.odd\:bg-gray-500:nth-child(odd){background-color:var(--color-gray-500)}.odd\:bg-green-500:nth-child(odd){background-color:var(--color-green-500)}.odd\:bg-indigo-500:nth-child(odd){background-color:var(--color-indigo-500)}.odd\:bg-lime-500:nth-child(odd){background-color:var(--color-lime-500)}.odd\:bg-orange-500:nth-child(odd){background-color:var(--color-orange-500)}.odd\:bg-pink-500:nth-child(odd){background-color:var(--color-pink-500)}.odd\:bg-primary-500:nth-child(odd){background-color:#fe795d}.odd\:bg-purple-500:nth-child(odd){background-color:var(--color-purple-500)}.odd\:bg-red-500:nth-child(odd){background-color:var(--color-red-500)}.odd\:bg-rose-500:nth-child(odd){background-color:var(--color-rose-500)}.odd\:bg-sky-500:nth-child(odd){background-color:var(--color-sky-500)}.odd\:bg-teal-500:nth-child(odd){background-color:var(--color-teal-500)}.odd\:bg-violet-500:nth-child(odd){background-color:var(--color-violet-500)}.odd\:bg-white:nth-child(odd){background-color:var(--color-white)}.odd\:bg-yellow-500:nth-child(odd){background-color:var(--color-yellow-500)}.even\:bg-amber-600:nth-child(2n){background-color:var(--color-amber-600)}.even\:bg-blue-600:nth-child(2n){background-color:var(--color-blue-600)}.even\:bg-cyan-600:nth-child(2n){background-color:var(--color-cyan-600)}.even\:bg-emerald-600:nth-child(2n){background-color:var(--color-emerald-600)}.even\:bg-fuchsia-600:nth-child(2n){background-color:var(--color-fuchsia-600)}.even\:bg-gray-50:nth-child(2n){background-color:var(--color-gray-50)}.even\:bg-gray-600:nth-child(2n){background-color:var(--color-gray-600)}.even\:bg-green-600:nth-child(2n){background-color:var(--color-green-600)}.even\:bg-indigo-600:nth-child(2n){background-color:var(--color-indigo-600)}.even\:bg-lime-600:nth-child(2n){background-color:var(--color-lime-600)}.even\:bg-orange-600:nth-child(2n){background-color:var(--color-orange-600)}.even\:bg-pink-600:nth-child(2n){background-color:var(--color-pink-600)}.even\:bg-primary-600:nth-child(2n){background-color:#ef562f}.even\:bg-purple-600:nth-child(2n){background-color:var(--color-purple-600)}.even\:bg-red-600:nth-child(2n){background-color:var(--color-red-600)}.even\:bg-rose-600:nth-child(2n){background-color:var(--color-rose-600)}.even\:bg-sky-600:nth-child(2n){background-color:var(--color-sky-600)}.even\:bg-teal-600:nth-child(2n){background-color:var(--color-teal-600)}.even\:bg-violet-600:nth-child(2n){background-color:var(--color-violet-600)}.even\:bg-yellow-600:nth-child(2n){background-color:var(--color-yellow-600)}.open\:flex:is([open],:popover-open,:open){display:flex}.focus-within\:z-10:focus-within{z-index:10}.focus-within\:border-primary-500:focus-within{border-color:#fe795d}.focus-within\:text-primary-700:focus-within{color:#eb4f27}.focus-within\:ring-0:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-4:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-amber-300:focus-within{--tw-ring-color:var(--color-amber-300)}.focus-within\:ring-blue-300:focus-within{--tw-ring-color:var(--color-blue-300)}.focus-within\:ring-cyan-300:focus-within{--tw-ring-color:var(--color-cyan-300)}.focus-within\:ring-emerald-300:focus-within{--tw-ring-color:var(--color-emerald-300)}.focus-within\:ring-gray-200:focus-within{--tw-ring-color:var(--color-gray-200)}.focus-within\:ring-gray-300:focus-within{--tw-ring-color:var(--color-gray-300)}.focus-within\:ring-green-300:focus-within{--tw-ring-color:var(--color-green-300)}.focus-within\:ring-indigo-300:focus-within{--tw-ring-color:var(--color-indigo-300)}.focus-within\:ring-lime-300:focus-within{--tw-ring-color:var(--color-lime-300)}.focus-within\:ring-orange-300:focus-within{--tw-ring-color:var(--color-orange-300)}.focus-within\:ring-primary-300:focus-within{--tw-ring-color:#ffd5cc}.focus-within\:ring-primary-500:focus-within{--tw-ring-color:#fe795d}.focus-within\:ring-red-300:focus-within{--tw-ring-color:var(--color-red-300)}.focus-within\:ring-sky-300:focus-within{--tw-ring-color:var(--color-sky-300)}.focus-within\:ring-teal-300:focus-within{--tw-ring-color:var(--color-teal-300)}.focus-within\:ring-violet-300:focus-within{--tw-ring-color:var(--color-violet-300)}.focus-within\:ring-yellow-300:focus-within{--tw-ring-color:var(--color-yellow-300)}.focus-within\:outline-hidden:focus-within{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus-within\:outline-hidden:focus-within{outline-offset:2px;outline:2px solid #0000}}@media(hover:hover){.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500:hover{background-color:var(--color-amber-500)}.hover\:bg-amber-800:hover{background-color:var(--color-amber-800)}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-blue-200:hover{background-color:var(--color-blue-200)}.hover\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-blue-800:hover{background-color:var(--color-blue-800)}.hover\:bg-cyan-200:hover{background-color:var(--color-cyan-200)}.hover\:bg-cyan-400:hover{background-color:var(--color-cyan-400)}.hover\:bg-cyan-500:hover{background-color:var(--color-cyan-500)}.hover\:bg-cyan-800:hover{background-color:var(--color-cyan-800)}.hover\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-emerald-800:hover{background-color:var(--color-emerald-800)}.hover\:bg-fuchsia-200:hover{background-color:var(--color-fuchsia-200)}.hover\:bg-fuchsia-400:hover{background-color:var(--color-fuchsia-400)}.hover\:bg-fuchsia-500:hover{background-color:var(--color-fuchsia-500)}.hover\:bg-fuchsia-800:hover{background-color:var(--color-fuchsia-800)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-gray-400:hover{background-color:var(--color-gray-400)}.hover\:bg-gray-800:hover{background-color:var(--color-gray-800)}.hover\:bg-gray-900:hover{background-color:var(--color-gray-900)}.hover\:bg-green-200:hover{background-color:var(--color-green-200)}.hover\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\:bg-green-500:hover{background-color:var(--color-green-500)}.hover\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\:bg-green-800:hover{background-color:var(--color-green-800)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-400:hover{background-color:var(--color-indigo-400)}.hover\:bg-indigo-500:hover{background-color:var(--color-indigo-500)}.hover\:bg-indigo-800:hover{background-color:var(--color-indigo-800)}.hover\:bg-lime-200:hover{background-color:var(--color-lime-200)}.hover\:bg-lime-400:hover{background-color:var(--color-lime-400)}.hover\:bg-lime-500:hover{background-color:var(--color-lime-500)}.hover\:bg-lime-800:hover{background-color:var(--color-lime-800)}.hover\:bg-orange-200:hover{background-color:var(--color-orange-200)}.hover\:bg-orange-400:hover{background-color:var(--color-orange-400)}.hover\:bg-orange-500:hover{background-color:var(--color-orange-500)}.hover\:bg-orange-800:hover{background-color:var(--color-orange-800)}.hover\:bg-pink-200:hover{background-color:var(--color-pink-200)}.hover\:bg-pink-400:hover{background-color:var(--color-pink-400)}.hover\:bg-pink-500:hover{background-color:var(--color-pink-500)}.hover\:bg-pink-800:hover{background-color:var(--color-pink-800)}.hover\:bg-primary-100:hover{background-color:#fff1ee}.hover\:bg-primary-200:hover{background-color:#ffe4de}.hover\:bg-primary-400:hover{background-color:#ffbcad}.hover\:bg-primary-500:hover{background-color:#fe795d}.hover\:bg-primary-600:hover{background-color:#ef562f}.hover\:bg-primary-800:hover{background-color:#cc4522}.hover\:bg-purple-200:hover{background-color:var(--color-purple-200)}.hover\:bg-purple-400:hover{background-color:var(--color-purple-400)}.hover\:bg-purple-500:hover{background-color:var(--color-purple-500)}.hover\:bg-purple-600:hover{background-color:var(--color-purple-600)}.hover\:bg-purple-800:hover{background-color:var(--color-purple-800)}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-200:hover{background-color:var(--color-red-200)}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500:hover{background-color:var(--color-red-500)}.hover\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-red-800:hover{background-color:var(--color-red-800)}.hover\:bg-rose-200:hover{background-color:var(--color-rose-200)}.hover\:bg-rose-400:hover{background-color:var(--color-rose-400)}.hover\:bg-rose-500:hover{background-color:var(--color-rose-500)}.hover\:bg-rose-800:hover{background-color:var(--color-rose-800)}.hover\:bg-sky-200:hover{background-color:var(--color-sky-200)}.hover\:bg-sky-400:hover{background-color:var(--color-sky-400)}.hover\:bg-sky-500:hover{background-color:var(--color-sky-500)}.hover\:bg-sky-800:hover{background-color:var(--color-sky-800)}.hover\:bg-teal-200:hover{background-color:var(--color-teal-200)}.hover\:bg-teal-400:hover{background-color:var(--color-teal-400)}.hover\:bg-teal-500:hover{background-color:var(--color-teal-500)}.hover\:bg-teal-800:hover{background-color:var(--color-teal-800)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:bg-violet-200:hover{background-color:var(--color-violet-200)}.hover\:bg-violet-400:hover{background-color:var(--color-violet-400)}.hover\:bg-violet-500:hover{background-color:var(--color-violet-500)}.hover\:bg-violet-800:hover{background-color:var(--color-violet-800)}.hover\:bg-yellow-200:hover{background-color:var(--color-yellow-200)}.hover\:bg-yellow-400:hover{background-color:var(--color-yellow-400)}.hover\:bg-yellow-500:hover{background-color:var(--color-yellow-500)}.hover\:bg-linear-to-bl:hover{--tw-gradient-position:to bottom left}@supports (background-image:linear-gradient(in lab,red,red)){.hover\:bg-linear-to-bl:hover{--tw-gradient-position:to bottom left in oklab}}.hover\:bg-linear-to-bl:hover{background-image:linear-gradient(var(--tw-gradient-stops))}.hover\:bg-linear-to-br:hover{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab,red,red)){.hover\:bg-linear-to-br:hover{--tw-gradient-position:to bottom right in oklab}}.hover\:bg-linear-to-br:hover{background-image:linear-gradient(var(--tw-gradient-stops))}.hover\:bg-linear-to-l:hover{--tw-gradient-position:to left}@supports (background-image:linear-gradient(in lab,red,red)){.hover\:bg-linear-to-l:hover{--tw-gradient-position:to left in oklab}}.hover\:bg-linear-to-l:hover{background-image:linear-gradient(var(--tw-gradient-stops))}.hover\:text-amber-600:hover{color:var(--color-amber-600)}.hover\:text-black:hover{color:var(--color-black)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-cyan-600:hover{color:var(--color-cyan-600)}.hover\:text-emerald-600:hover{color:var(--color-emerald-600)}.hover\:text-fuchsia-600:hover{color:var(--color-fuchsia-600)}.hover\:text-gray-200:hover{color:var(--color-gray-200)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-gray-900:hover{color:var(--color-gray-900)}.hover\:text-green-600:hover{color:var(--color-green-600)}.hover\:text-indigo-600:hover{color:var(--color-indigo-600)}.hover\:text-inherit\!:hover{color:inherit!important}.hover\:text-lime-600:hover{color:var(--color-lime-600)}.hover\:text-orange-600:hover{color:var(--color-orange-600)}.hover\:text-pink-600:hover{color:var(--color-pink-600)}.hover\:text-primary-500:hover{color:#fe795d}.hover\:text-primary-600:hover{color:#ef562f}.hover\:text-primary-700:hover{color:#eb4f27}.hover\:text-primary-900:hover{color:#a5371b}.hover\:text-purple-600:hover{color:var(--color-purple-600)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-rose-600:hover{color:var(--color-rose-600)}.hover\:text-sky-600:hover{color:var(--color-sky-600)}.hover\:text-teal-600:hover{color:var(--color-teal-600)}.hover\:text-violet-600:hover{color:var(--color-violet-600)}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-yellow-600:hover{color:var(--color-yellow-600)}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:blur-none:hover{--tw-blur: ;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,)}.hover\:grayscale-0:hover{--tw-grayscale:grayscale(0%);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,)}.hover\:hue-rotate-0:hover{--tw-hue-rotate:hue-rotate(0deg);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,)}.hover\:invert-0:hover{--tw-invert:invert(0%);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,)}.hover\:saturate-100:hover{--tw-saturate:saturate(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,)}.hover\:sepia-0:hover{--tw-sepia:sepia(0%);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\:z-40:focus{z-index:40}.focus\:border-amber-600:focus{border-color:var(--color-amber-600)}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:border-blue-600:focus{border-color:var(--color-blue-600)}.focus\:border-cyan-600:focus{border-color:var(--color-cyan-600)}.focus\:border-emerald-600:focus{border-color:var(--color-emerald-600)}.focus\:border-fuchsia-600:focus{border-color:var(--color-fuchsia-600)}.focus\:border-gray-200:focus{border-color:var(--color-gray-200)}.focus\:border-gray-600:focus{border-color:var(--color-gray-600)}.focus\:border-green-600:focus{border-color:var(--color-green-600)}.focus\:border-indigo-600:focus{border-color:var(--color-indigo-600)}.focus\:border-lime-600:focus{border-color:var(--color-lime-600)}.focus\:border-orange-600:focus{border-color:var(--color-orange-600)}.focus\:border-pink-600:focus{border-color:var(--color-pink-600)}.focus\:border-primary-500:focus{border-color:#fe795d}.focus\:border-primary-600:focus{border-color:#ef562f}.focus\:border-purple-600:focus{border-color:var(--color-purple-600)}.focus\:border-red-600:focus{border-color:var(--color-red-600)}.focus\:border-rose-600:focus{border-color:var(--color-rose-600)}.focus\:border-sky-600:focus{border-color:var(--color-sky-600)}.focus\:border-teal-600:focus{border-color:var(--color-teal-600)}.focus\:border-violet-600:focus{border-color:var(--color-violet-600)}.focus\:border-yellow-600:focus{border-color:var(--color-yellow-600)}.focus\:bg-gray-400:focus{background-color:var(--color-gray-400)}.focus\:text-primary-700:focus{color:#eb4f27}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-4:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-amber-400:focus{--tw-ring-color:var(--color-amber-400)}.focus\:ring-amber-500:focus{--tw-ring-color:var(--color-amber-500)}.focus\:ring-amber-600:focus{--tw-ring-color:var(--color-amber-600)}.focus\:ring-blue-300:focus{--tw-ring-color:var(--color-blue-300)}.focus\:ring-blue-400:focus{--tw-ring-color:var(--color-blue-400)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\:ring-cyan-300:focus{--tw-ring-color:var(--color-cyan-300)}.focus\:ring-cyan-400:focus{--tw-ring-color:var(--color-cyan-400)}.focus\:ring-cyan-500:focus{--tw-ring-color:var(--color-cyan-500)}.focus\:ring-cyan-600:focus{--tw-ring-color:var(--color-cyan-600)}.focus\:ring-emerald-400:focus{--tw-ring-color:var(--color-emerald-400)}.focus\:ring-emerald-500:focus{--tw-ring-color:var(--color-emerald-500)}.focus\:ring-emerald-600:focus{--tw-ring-color:var(--color-emerald-600)}.focus\:ring-fuchsia-400:focus{--tw-ring-color:var(--color-fuchsia-400)}.focus\:ring-fuchsia-500:focus{--tw-ring-color:var(--color-fuchsia-500)}.focus\:ring-fuchsia-600:focus{--tw-ring-color:var(--color-fuchsia-600)}.focus\:ring-gray-200:focus{--tw-ring-color:var(--color-gray-200)}.focus\:ring-gray-300:focus{--tw-ring-color:var(--color-gray-300)}.focus\:ring-gray-400:focus{--tw-ring-color:var(--color-gray-400)}.focus\:ring-gray-500:focus{--tw-ring-color:var(--color-gray-500)}.focus\:ring-gray-600:focus{--tw-ring-color:var(--color-gray-600)}.focus\:ring-green-200:focus{--tw-ring-color:var(--color-green-200)}.focus\:ring-green-300:focus{--tw-ring-color:var(--color-green-300)}.focus\:ring-green-400:focus{--tw-ring-color:var(--color-green-400)}.focus\:ring-green-500:focus{--tw-ring-color:var(--color-green-500)}.focus\:ring-green-600:focus{--tw-ring-color:var(--color-green-600)}.focus\:ring-indigo-400:focus{--tw-ring-color:var(--color-indigo-400)}.focus\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}.focus\:ring-indigo-700:focus{--tw-ring-color:var(--color-indigo-700)}.focus\:ring-lime-200:focus{--tw-ring-color:var(--color-lime-200)}.focus\:ring-lime-300:focus{--tw-ring-color:var(--color-lime-300)}.focus\:ring-lime-400:focus{--tw-ring-color:var(--color-lime-400)}.focus\:ring-lime-500:focus{--tw-ring-color:var(--color-lime-500)}.focus\:ring-lime-700:focus{--tw-ring-color:var(--color-lime-700)}.focus\:ring-orange-400:focus{--tw-ring-color:var(--color-orange-400)}.focus\:ring-orange-500:focus{--tw-ring-color:var(--color-orange-500)}.focus\:ring-orange-600:focus{--tw-ring-color:var(--color-orange-600)}.focus\:ring-pink-200:focus{--tw-ring-color:var(--color-pink-200)}.focus\:ring-pink-300:focus{--tw-ring-color:var(--color-pink-300)}.focus\:ring-pink-400:focus{--tw-ring-color:var(--color-pink-400)}.focus\:ring-pink-500:focus{--tw-ring-color:var(--color-pink-500)}.focus\:ring-pink-600:focus{--tw-ring-color:var(--color-pink-600)}.focus\:ring-primary-300:focus{--tw-ring-color:#ffd5cc}.focus\:ring-primary-400:focus{--tw-ring-color:#ffbcad}.focus\:ring-primary-500:focus{--tw-ring-color:#fe795d}.focus\:ring-primary-700:focus{--tw-ring-color:#eb4f27}.focus\:ring-purple-200:focus{--tw-ring-color:var(--color-purple-200)}.focus\:ring-purple-300:focus{--tw-ring-color:var(--color-purple-300)}.focus\:ring-purple-400:focus{--tw-ring-color:var(--color-purple-400)}.focus\:ring-purple-500:focus{--tw-ring-color:var(--color-purple-500)}.focus\:ring-purple-600:focus{--tw-ring-color:var(--color-purple-600)}.focus\:ring-red-100:focus{--tw-ring-color:var(--color-red-100)}.focus\:ring-red-300:focus{--tw-ring-color:var(--color-red-300)}.focus\:ring-red-400:focus{--tw-ring-color:var(--color-red-400)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-red-600:focus{--tw-ring-color:var(--color-red-600)}.focus\:ring-rose-400:focus{--tw-ring-color:var(--color-rose-400)}.focus\:ring-rose-500:focus{--tw-ring-color:var(--color-rose-500)}.focus\:ring-rose-600:focus{--tw-ring-color:var(--color-rose-600)}.focus\:ring-sky-400:focus{--tw-ring-color:var(--color-sky-400)}.focus\:ring-sky-500:focus{--tw-ring-color:var(--color-sky-500)}.focus\:ring-sky-600:focus{--tw-ring-color:var(--color-sky-600)}.focus\:ring-teal-300:focus{--tw-ring-color:var(--color-teal-300)}.focus\:ring-teal-400:focus{--tw-ring-color:var(--color-teal-400)}.focus\:ring-teal-500:focus{--tw-ring-color:var(--color-teal-500)}.focus\:ring-teal-600:focus{--tw-ring-color:var(--color-teal-600)}.focus\:ring-violet-400:focus{--tw-ring-color:var(--color-violet-400)}.focus\:ring-violet-500:focus{--tw-ring-color:var(--color-violet-500)}.focus\:ring-violet-600:focus{--tw-ring-color:var(--color-violet-600)}.focus\:ring-yellow-400:focus{--tw-ring-color:var(--color-yellow-400)}.focus\:ring-yellow-500:focus{--tw-ring-color:var(--color-yellow-500)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline:focus{outline-style:var(--tw-outline-style);outline-width:1px}.focus\:outline-2:focus{outline-style:var(--tw-outline-style);outline-width:2px}.focus\:-outline-offset-2:focus{outline-offset:-2px}.focus\:outline-blue-500:focus{outline-color:var(--color-blue-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus\:first\:rounded-s-lg:focus:first-child{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.focus\:first\:rounded-t-lg:focus:first-child{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.focus\:last\:rounded-e-lg:focus:last-child{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.focus\:last\:rounded-b-lg:focus:last-child{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-gray-300:focus-visible{--tw-ring-color:var(--color-gray-300)}.focus-visible\:ring-primary-500:focus-visible{--tw-ring-color:#fe795d}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:text-gray-400:disabled{color:var(--color-gray-400)}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-primary-600[aria-selected=true]{background-color:#ef562f}.aria-selected\:text-primary-100[aria-selected=true]{color:#fff1ee}.aria-selected\:text-white[aria-selected=true]{color:var(--color-white)}@media(hover:hover){.data-\[selected\=false\]\:hover\:bg-amber-50[data-selected=false]:hover{background-color:var(--color-amber-50)}.data-\[selected\=false\]\:hover\:bg-blue-50[data-selected=false]:hover{background-color:var(--color-blue-50)}.data-\[selected\=false\]\:hover\:bg-cyan-50[data-selected=false]:hover{background-color:var(--color-cyan-50)}.data-\[selected\=false\]\:hover\:bg-emerald-50[data-selected=false]:hover{background-color:var(--color-emerald-50)}.data-\[selected\=false\]\:hover\:bg-fuchsia-50[data-selected=false]:hover{background-color:var(--color-fuchsia-50)}.data-\[selected\=false\]\:hover\:bg-gray-100[data-selected=false]:hover{background-color:var(--color-gray-100)}.data-\[selected\=false\]\:hover\:bg-green-50[data-selected=false]:hover{background-color:var(--color-green-50)}.data-\[selected\=false\]\:hover\:bg-indigo-50[data-selected=false]:hover{background-color:var(--color-indigo-50)}.data-\[selected\=false\]\:hover\:bg-lime-50[data-selected=false]:hover{background-color:var(--color-lime-50)}.data-\[selected\=false\]\:hover\:bg-orange-50[data-selected=false]:hover{background-color:var(--color-orange-50)}.data-\[selected\=false\]\:hover\:bg-pink-50[data-selected=false]:hover{background-color:var(--color-pink-50)}.data-\[selected\=false\]\:hover\:bg-purple-50[data-selected=false]:hover{background-color:var(--color-purple-50)}.data-\[selected\=false\]\:hover\:bg-red-50[data-selected=false]:hover{background-color:var(--color-red-50)}.data-\[selected\=false\]\:hover\:bg-rose-50[data-selected=false]:hover{background-color:var(--color-rose-50)}.data-\[selected\=false\]\:hover\:bg-sky-50[data-selected=false]:hover{background-color:var(--color-sky-50)}.data-\[selected\=false\]\:hover\:bg-teal-50[data-selected=false]:hover{background-color:var(--color-teal-50)}.data-\[selected\=false\]\:hover\:bg-violet-50[data-selected=false]:hover{background-color:var(--color-violet-50)}.data-\[selected\=false\]\:hover\:bg-yellow-50[data-selected=false]:hover{background-color:var(--color-yellow-50)}}.data-\[selected\=true\]\:bg-amber-200[data-selected=true]{background-color:var(--color-amber-200)}.data-\[selected\=true\]\:bg-blue-200[data-selected=true]{background-color:var(--color-blue-200)}.data-\[selected\=true\]\:bg-cyan-200[data-selected=true]{background-color:var(--color-cyan-200)}.data-\[selected\=true\]\:bg-emerald-200[data-selected=true]{background-color:var(--color-emerald-200)}.data-\[selected\=true\]\:bg-fuchsia-200[data-selected=true]{background-color:var(--color-fuchsia-200)}.data-\[selected\=true\]\:bg-gray-200[data-selected=true]{background-color:var(--color-gray-200)}.data-\[selected\=true\]\:bg-green-200[data-selected=true]{background-color:var(--color-green-200)}.data-\[selected\=true\]\:bg-indigo-200[data-selected=true]{background-color:var(--color-indigo-200)}.data-\[selected\=true\]\:bg-lime-200[data-selected=true]{background-color:var(--color-lime-200)}.data-\[selected\=true\]\:bg-orange-200[data-selected=true]{background-color:var(--color-orange-200)}.data-\[selected\=true\]\:bg-pink-200[data-selected=true]{background-color:var(--color-pink-200)}.data-\[selected\=true\]\:bg-primary-200[data-selected=true]{background-color:#ffe4de}.data-\[selected\=true\]\:bg-purple-200[data-selected=true]{background-color:var(--color-purple-200)}.data-\[selected\=true\]\:bg-red-200[data-selected=true]{background-color:var(--color-red-200)}.data-\[selected\=true\]\:bg-rose-200[data-selected=true]{background-color:var(--color-rose-200)}.data-\[selected\=true\]\:bg-sky-200[data-selected=true]{background-color:var(--color-sky-200)}.data-\[selected\=true\]\:bg-teal-200[data-selected=true]{background-color:var(--color-teal-200)}.data-\[selected\=true\]\:bg-violet-200[data-selected=true]{background-color:var(--color-violet-200)}.data-\[selected\=true\]\:bg-yellow-200[data-selected=true]{background-color:var(--color-yellow-200)}.data-\[state\=completed\]\:bg-blue-500[data-state=completed]{background-color:var(--color-blue-500)}.data-\[state\=completed\]\:bg-gray-400[data-state=completed]{background-color:var(--color-gray-400)}.data-\[state\=completed\]\:bg-green-500[data-state=completed]{background-color:var(--color-green-500)}.data-\[state\=completed\]\:bg-indigo-500[data-state=completed]{background-color:var(--color-indigo-500)}.data-\[state\=completed\]\:bg-pink-500[data-state=completed]{background-color:var(--color-pink-500)}.data-\[state\=completed\]\:bg-primary-500[data-state=completed]{background-color:#fe795d}.data-\[state\=completed\]\:bg-purple-500[data-state=completed]{background-color:var(--color-purple-500)}.data-\[state\=completed\]\:bg-red-600[data-state=completed]{background-color:var(--color-red-600)}.data-\[state\=completed\]\:bg-yellow-400[data-state=completed]{background-color:var(--color-yellow-400)}.data-\[state\=current\]\:bg-blue-800[data-state=current]{background-color:var(--color-blue-800)}.data-\[state\=current\]\:bg-gray-700[data-state=current]{background-color:var(--color-gray-700)}.data-\[state\=current\]\:bg-green-800[data-state=current]{background-color:var(--color-green-800)}.data-\[state\=current\]\:bg-indigo-800[data-state=current]{background-color:var(--color-indigo-800)}.data-\[state\=current\]\:bg-pink-800[data-state=current]{background-color:var(--color-pink-800)}.data-\[state\=current\]\:bg-primary-800[data-state=current]{background-color:#cc4522}.data-\[state\=current\]\:bg-purple-800[data-state=current]{background-color:var(--color-purple-800)}.data-\[state\=current\]\:bg-red-900[data-state=current]{background-color:var(--color-red-900)}.data-\[state\=current\]\:bg-yellow-600[data-state=current]{background-color:var(--color-yellow-600)}@media(min-width:40rem){.sm\:static{position:static}.sm\:z-auto{z-index:auto}.sm\:order-last{order:9999}.sm\:ms-2{margin-inline-start:calc(var(--spacing)*2)}.sm\:ms-4{margin-inline-start:calc(var(--spacing)*4)}.sm\:mb-0{margin-bottom:calc(var(--spacing)*0)}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:inline-flex{display:inline-flex}.sm\:h-4{height:calc(var(--spacing)*4)}.sm\:h-6{height:calc(var(--spacing)*6)}.sm\:h-7{height:calc(var(--spacing)*7)}.sm\:h-10{height:calc(var(--spacing)*10)}.sm\:h-18{height:calc(var(--spacing)*18)}.sm\:h-64{height:calc(var(--spacing)*64)}.sm\:w-4{width:calc(var(--spacing)*4)}.sm\:w-6{width:calc(var(--spacing)*6)}.sm\:w-10{width:calc(var(--spacing)*10)}.sm\:w-96{width:calc(var(--spacing)*96)}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}:where(.sm\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.sm\:space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}:where(.sm\:space-x-8>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*8)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-x-reverse)))}:where(.sm\:divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius-lg)}.sm\:rounded-none{border-radius:0}.sm\:border-0{border-style:var(--tw-border-style);border-width:0}.sm\:border-none{--tw-border-style:none;border-style:none}.sm\:bg-inherit{background-color:inherit}.sm\:bg-transparent{background-color:#0000}.sm\:p-2{padding:calc(var(--spacing)*2)}.sm\:p-4{padding:calc(var(--spacing)*4)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:px-0{padding-inline:calc(var(--spacing)*0)}.sm\:px-4{padding-inline:calc(var(--spacing)*4)}.sm\:ps-0{padding-inline-start:calc(var(--spacing)*0)}.sm\:pe-0{padding-inline-end:calc(var(--spacing)*0)}.sm\:text-center{text-align:center}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.sm\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.sm\:text-primary-700{color:#eb4f27}.sm\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.sm\:after\:hidden:after{content:var(--tw-content);display:none}.sm\:after\:inline-block:after{content:var(--tw-content);display:inline-block}.sm\:after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}@media(hover:hover){.sm\:hover\:bg-transparent:hover{background-color:#0000}.sm\:hover\:text-primary-700:hover{color:#eb4f27}}}@media(min-width:48rem){.md\:static{position:static}.md\:end-auto{inset-inline-end:auto}.md\:top-auto{top:auto}.md\:z-auto{z-index:auto}.md\:ms-2{margin-inline-start:calc(var(--spacing)*2)}.md\:me-6{margin-inline-end:calc(var(--spacing)*6)}.md\:mt-0{margin-top:calc(var(--spacing)*0)}.md\:mt-3{margin-top:calc(var(--spacing)*3)}.md\:mb-3{margin-bottom:calc(var(--spacing)*3)}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:h-\[8px\]{height:8px}.md\:h-\[21px\]{height:21px}.md\:h-\[42px\]{height:42px}.md\:h-\[95px\]{height:95px}.md\:h-\[262px\]{height:262px}.md\:h-\[278px\]{height:278px}.md\:h-\[294px\]{height:294px}.md\:h-\[654px\]{height:654px}.md\:h-\[682px\]{height:682px}.md\:h-auto{height:auto}.md\:w-1\/3{width:33.3333%}.md\:w-2\/3{width:66.6667%}.md\:w-48{width:calc(var(--spacing)*48)}.md\:w-\[96px\]{width:96px}.md\:w-auto{width:auto}.md\:w-full{width:100%}.md\:max-w-\[142px\]{max-width:142px}.md\:max-w-\[512px\]{max-width:512px}.md\:max-w-\[597px\]{max-width:597px}.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\:flex-row{flex-direction:row}.md\:flex-row-reverse{flex-direction:row-reverse}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-4{gap:calc(var(--spacing)*4)}.md\:gap-8{gap:calc(var(--spacing)*8)}:where(.md\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}.md\:gap-x-0{column-gap:calc(var(--spacing)*0)}:where(.md\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.md\:space-x-8>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*8)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-s-lg{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.md\:rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.md\:border-0{border-style:var(--tw-border-style);border-width:0}.md\:border-none{--tw-border-style:none;border-style:none}.md\:bg-inherit{background-color:inherit}.md\:bg-transparent{background-color:#0000}.md\:p-2{padding:calc(var(--spacing)*2)}.md\:p-3{padding:calc(var(--spacing)*3)}.md\:p-4{padding:calc(var(--spacing)*4)}.md\:p-5{padding:calc(var(--spacing)*5)}.md\:p-6{padding:calc(var(--spacing)*6)}.md\:p-7{padding:calc(var(--spacing)*7)}.md\:p-16{padding:calc(var(--spacing)*16)}.md\:px-2{padding-inline:calc(var(--spacing)*2)}.md\:px-6{padding-inline:calc(var(--spacing)*6)}.md\:py-8{padding-block:calc(var(--spacing)*8)}.md\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.md\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.md\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.md\:text-primary-700{color:#eb4f27}.md\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.md\:hover\:bg-transparent:hover{background-color:#0000}.md\:hover\:text-primary-700:hover{color:#eb4f27}}}@media(min-width:64rem){.lg\:static{position:static}.lg\:z-auto{z-index:auto}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:h-4{height:calc(var(--spacing)*4)}.lg\:h-5{height:calc(var(--spacing)*5)}.lg\:h-6{height:calc(var(--spacing)*6)}.lg\:h-12{height:calc(var(--spacing)*12)}.lg\:w-4{width:calc(var(--spacing)*4)}.lg\:w-5{width:calc(var(--spacing)*5)}.lg\:w-6{width:calc(var(--spacing)*6)}.lg\:w-12{width:calc(var(--spacing)*12)}.lg\:w-auto{width:auto}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:rounded-none{border-radius:0}.lg\:border-0{border-style:var(--tw-border-style);border-width:0}.lg\:border-none{--tw-border-style:none;border-style:none}.lg\:bg-inherit{background-color:inherit}.lg\:bg-transparent{background-color:#0000}.lg\:p-2{padding:calc(var(--spacing)*2)}.lg\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.lg\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.lg\:text-primary-700{color:#eb4f27}.lg\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.lg\:hover\:bg-transparent:hover{background-color:#0000}.lg\:hover\:text-primary-700:hover{color:#eb4f27}}}@media(min-width:80rem){.xl\:static{position:static}.xl\:z-auto{z-index:auto}.xl\:block{display:block}.xl\:hidden{display:none}.xl\:h-80{height:calc(var(--spacing)*80)}.xl\:w-auto{width:auto}.xl\:flex-row{flex-direction:row}.xl\:rounded-none{border-radius:0}.xl\:border-0{border-style:var(--tw-border-style);border-width:0}.xl\:border-none{--tw-border-style:none;border-style:none}.xl\:bg-inherit{background-color:inherit}.xl\:bg-transparent{background-color:#0000}.xl\:p-2{padding:calc(var(--spacing)*2)}.xl\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.xl\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.xl\:text-primary-700{color:#eb4f27}.xl\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.xl\:after\:mx-10:after{content:var(--tw-content);margin-inline:calc(var(--spacing)*10)}@media(hover:hover){.xl\:hover\:bg-transparent:hover{background-color:#0000}.xl\:hover\:text-primary-700:hover{color:#eb4f27}}}@media(min-width:96rem){.\32xl\:block{display:block}.\32xl\:hidden{display:none}.\32xl\:h-96{height:calc(var(--spacing)*96)}}.rtl\:origin-right:where(:dir(rtl),[dir=rtl],[dir=rtl] *){transform-origin:100%}.rtl\:-translate-x-1\/3:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x:calc(calc(1/3*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.rtl\:translate-x-1\/2:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rtl\:translate-x-1\/3:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x:calc(1/3*100%);translate:var(--tw-translate-x)var(--tw-translate-y)}.rtl\:-scale-x-100:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-scale-x: -100% ;scale:var(--tw-scale-x)var(--tw-scale-y)}.rtl\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:180deg}.rtl\:rotate-\[270deg\]:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:270deg}:where(.rtl\:space-x-reverse:where(:dir(rtl),[dir=rtl],[dir=rtl] *)>:not(:last-child)){--tw-space-x-reverse:1}.rtl\:text-right:where(:dir(rtl),[dir=rtl],[dir=rtl] *){text-align:right}:where(.rtl\:divide-x-reverse:where(:dir(rtl),[dir=rtl],[dir=rtl] *)>:not(:last-child)){--tw-divide-x-reverse:1}.rtl\:peer-focus\:left-auto:where(:dir(rtl),[dir=rtl],[dir=rtl] *):is(:where(.peer):focus~*){left:auto}.rtl\:peer-focus\:translate-x-1\/4:where(:dir(rtl),[dir=rtl],[dir=rtl] *):is(:where(.peer):focus~*){--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-checked\:rtl\:after\:-translate-x-full:is(:where(.peer):checked~*):where(:dir(rtl),[dir=rtl],[dir=rtl] *):after{content:var(--tw-content);--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}:where(.dark\:divide-amber-800:is(.dark *)>:not(:last-child)){border-color:var(--color-amber-800)}:where(.dark\:divide-blue-800:is(.dark *)>:not(:last-child)){border-color:var(--color-blue-800)}:where(.dark\:divide-cyan-800:is(.dark *)>:not(:last-child)){border-color:var(--color-cyan-800)}:where(.dark\:divide-emerald-800:is(.dark *)>:not(:last-child)){border-color:var(--color-emerald-800)}:where(.dark\:divide-fuchsia-800:is(.dark *)>:not(:last-child)){border-color:var(--color-fuchsia-800)}:where(.dark\:divide-gray-500:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-500)}:where(.dark\:divide-gray-600:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-600)}:where(.dark\:divide-gray-700:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-700)}:where(.dark\:divide-gray-800:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-800)}:where(.dark\:divide-green-800:is(.dark *)>:not(:last-child)){border-color:var(--color-green-800)}:where(.dark\:divide-indigo-800:is(.dark *)>:not(:last-child)){border-color:var(--color-indigo-800)}:where(.dark\:divide-inherit:is(.dark *)>:not(:last-child)){border-color:inherit}:where(.dark\:divide-lime-800:is(.dark *)>:not(:last-child)){border-color:var(--color-lime-800)}:where(.dark\:divide-orange-800:is(.dark *)>:not(:last-child)){border-color:var(--color-orange-800)}:where(.dark\:divide-pink-800:is(.dark *)>:not(:last-child)){border-color:var(--color-pink-800)}:where(.dark\:divide-primary-200:is(.dark *)>:not(:last-child)){border-color:#ffe4de}:where(.dark\:divide-primary-800:is(.dark *)>:not(:last-child)){border-color:#cc4522}:where(.dark\:divide-purple-800:is(.dark *)>:not(:last-child)){border-color:var(--color-purple-800)}:where(.dark\:divide-red-800:is(.dark *)>:not(:last-child)){border-color:var(--color-red-800)}:where(.dark\:divide-rose-800:is(.dark *)>:not(:last-child)){border-color:var(--color-rose-800)}:where(.dark\:divide-sky-800:is(.dark *)>:not(:last-child)){border-color:var(--color-sky-800)}:where(.dark\:divide-teal-800:is(.dark *)>:not(:last-child)){border-color:var(--color-teal-800)}:where(.dark\:divide-violet-800:is(.dark *)>:not(:last-child)){border-color:var(--color-violet-800)}:where(.dark\:divide-yellow-800:is(.dark *)>:not(:last-child)){border-color:var(--color-yellow-800)}.dark\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.dark\:border-0:is(.dark *){border-style:var(--tw-border-style);border-width:0}.dark\:border-amber-400:is(.dark *){border-color:var(--color-amber-400)}.dark\:border-amber-700:is(.dark *){border-color:var(--color-amber-700)}.dark\:border-amber-800:is(.dark *){border-color:var(--color-amber-800)}.dark\:border-blue-400:is(.dark *){border-color:var(--color-blue-400)}.dark\:border-blue-500:is(.dark *){border-color:var(--color-blue-500)}.dark\:border-blue-700:is(.dark *){border-color:var(--color-blue-700)}.dark\:border-blue-800:is(.dark *){border-color:var(--color-blue-800)}.dark\:border-cyan-400:is(.dark *){border-color:var(--color-cyan-400)}.dark\:border-cyan-700:is(.dark *){border-color:var(--color-cyan-700)}.dark\:border-cyan-800:is(.dark *){border-color:var(--color-cyan-800)}.dark\:border-emerald-400:is(.dark *){border-color:var(--color-emerald-400)}.dark\:border-emerald-700:is(.dark *){border-color:var(--color-emerald-700)}.dark\:border-emerald-800:is(.dark *){border-color:var(--color-emerald-800)}.dark\:border-fuchsia-400:is(.dark *){border-color:var(--color-fuchsia-400)}.dark\:border-fuchsia-700:is(.dark *){border-color:var(--color-fuchsia-700)}.dark\:border-fuchsia-800:is(.dark *){border-color:var(--color-fuchsia-800)}.dark\:border-gray-200:is(.dark *){border-color:var(--color-gray-200)}.dark\:border-gray-300:is(.dark *){border-color:var(--color-gray-300)}.dark\:border-gray-400:is(.dark *){border-color:var(--color-gray-400)}.dark\:border-gray-500:is(.dark *){border-color:var(--color-gray-500)}.dark\:border-gray-600:is(.dark *){border-color:var(--color-gray-600)}.dark\:border-gray-700:is(.dark *){border-color:var(--color-gray-700)}.dark\:border-gray-800:is(.dark *){border-color:var(--color-gray-800)}.dark\:border-gray-900:is(.dark *){border-color:var(--color-gray-900)}.dark\:border-green-400:is(.dark *){border-color:var(--color-green-400)}.dark\:border-green-500:is(.dark *){border-color:var(--color-green-500)}.dark\:border-green-700:is(.dark *){border-color:var(--color-green-700)}.dark\:border-green-800:is(.dark *){border-color:var(--color-green-800)}.dark\:border-indigo-400:is(.dark *){border-color:var(--color-indigo-400)}.dark\:border-indigo-700:is(.dark *){border-color:var(--color-indigo-700)}.dark\:border-indigo-800:is(.dark *){border-color:var(--color-indigo-800)}.dark\:border-inherit:is(.dark *){border-color:inherit}.dark\:border-lime-400:is(.dark *){border-color:var(--color-lime-400)}.dark\:border-lime-700:is(.dark *){border-color:var(--color-lime-700)}.dark\:border-lime-800:is(.dark *){border-color:var(--color-lime-800)}.dark\:border-orange-400:is(.dark *){border-color:var(--color-orange-400)}.dark\:border-orange-700:is(.dark *){border-color:var(--color-orange-700)}.dark\:border-orange-800:is(.dark *){border-color:var(--color-orange-800)}.dark\:border-pink-400:is(.dark *){border-color:var(--color-pink-400)}.dark\:border-pink-700:is(.dark *){border-color:var(--color-pink-700)}.dark\:border-pink-800:is(.dark *){border-color:var(--color-pink-800)}.dark\:border-primary-200:is(.dark *){border-color:#ffe4de}.dark\:border-primary-400:is(.dark *){border-color:#ffbcad}.dark\:border-primary-500:is(.dark *){border-color:#fe795d}.dark\:border-primary-700:is(.dark *){border-color:#eb4f27}.dark\:border-primary-800:is(.dark *){border-color:#cc4522}.dark\:border-purple-400:is(.dark *){border-color:var(--color-purple-400)}.dark\:border-purple-700:is(.dark *){border-color:var(--color-purple-700)}.dark\:border-purple-800:is(.dark *){border-color:var(--color-purple-800)}.dark\:border-red-400:is(.dark *){border-color:var(--color-red-400)}.dark\:border-red-500:is(.dark *){border-color:var(--color-red-500)}.dark\:border-red-700:is(.dark *){border-color:var(--color-red-700)}.dark\:border-red-800:is(.dark *){border-color:var(--color-red-800)}.dark\:border-rose-400:is(.dark *){border-color:var(--color-rose-400)}.dark\:border-rose-700:is(.dark *){border-color:var(--color-rose-700)}.dark\:border-rose-800:is(.dark *){border-color:var(--color-rose-800)}.dark\:border-sky-400:is(.dark *){border-color:var(--color-sky-400)}.dark\:border-sky-700:is(.dark *){border-color:var(--color-sky-700)}.dark\:border-sky-800:is(.dark *){border-color:var(--color-sky-800)}.dark\:border-teal-400:is(.dark *){border-color:var(--color-teal-400)}.dark\:border-teal-700:is(.dark *){border-color:var(--color-teal-700)}.dark\:border-teal-800:is(.dark *){border-color:var(--color-teal-800)}.dark\:border-violet-400:is(.dark *){border-color:var(--color-violet-400)}.dark\:border-violet-700:is(.dark *){border-color:var(--color-violet-700)}.dark\:border-violet-800:is(.dark *){border-color:var(--color-violet-800)}.dark\:border-yellow-300:is(.dark *){border-color:var(--color-yellow-300)}.dark\:border-yellow-400:is(.dark *){border-color:var(--color-yellow-400)}.dark\:border-yellow-700:is(.dark *){border-color:var(--color-yellow-700)}.dark\:border-yellow-800:is(.dark *){border-color:var(--color-yellow-800)}.dark\:border-e-gray-600:is(.dark *){border-inline-end-color:var(--color-gray-600)}.dark\:border-e-gray-700:is(.dark *){border-inline-end-color:var(--color-gray-700)}.dark\:bg-amber-200:is(.dark *){background-color:var(--color-amber-200)}.dark\:bg-amber-500:is(.dark *){background-color:var(--color-amber-500)}.dark\:bg-amber-600:is(.dark *){background-color:var(--color-amber-600)}.dark\:bg-amber-700:is(.dark *){background-color:var(--color-amber-700)}.dark\:bg-amber-800:is(.dark *){background-color:var(--color-amber-800)}.dark\:bg-amber-900:is(.dark *){background-color:var(--color-amber-900)}.dark\:bg-blue-200:is(.dark *){background-color:var(--color-blue-200)}.dark\:bg-blue-400:is(.dark *){background-color:var(--color-blue-400)}.dark\:bg-blue-500:is(.dark *){background-color:var(--color-blue-500)}.dark\:bg-blue-600:is(.dark *){background-color:var(--color-blue-600)}.dark\:bg-blue-700:is(.dark *){background-color:var(--color-blue-700)}.dark\:bg-blue-800:is(.dark *){background-color:var(--color-blue-800)}.dark\:bg-blue-900:is(.dark *){background-color:var(--color-blue-900)}.dark\:bg-cyan-200:is(.dark *){background-color:var(--color-cyan-200)}.dark\:bg-cyan-500:is(.dark *){background-color:var(--color-cyan-500)}.dark\:bg-cyan-600:is(.dark *){background-color:var(--color-cyan-600)}.dark\:bg-cyan-700:is(.dark *){background-color:var(--color-cyan-700)}.dark\:bg-cyan-800:is(.dark *){background-color:var(--color-cyan-800)}.dark\:bg-cyan-900:is(.dark *){background-color:var(--color-cyan-900)}.dark\:bg-emerald-200:is(.dark *){background-color:var(--color-emerald-200)}.dark\:bg-emerald-500:is(.dark *){background-color:var(--color-emerald-500)}.dark\:bg-emerald-600:is(.dark *){background-color:var(--color-emerald-600)}.dark\:bg-emerald-700:is(.dark *){background-color:var(--color-emerald-700)}.dark\:bg-emerald-800:is(.dark *){background-color:var(--color-emerald-800)}.dark\:bg-emerald-900:is(.dark *){background-color:var(--color-emerald-900)}.dark\:bg-fuchsia-200:is(.dark *){background-color:var(--color-fuchsia-200)}.dark\:bg-fuchsia-500:is(.dark *){background-color:var(--color-fuchsia-500)}.dark\:bg-fuchsia-600:is(.dark *){background-color:var(--color-fuchsia-600)}.dark\:bg-fuchsia-700:is(.dark *){background-color:var(--color-fuchsia-700)}.dark\:bg-fuchsia-800:is(.dark *){background-color:var(--color-fuchsia-800)}.dark\:bg-fuchsia-900:is(.dark *){background-color:var(--color-fuchsia-900)}.dark\:bg-gray-200:is(.dark *){background-color:var(--color-gray-200)}.dark\:bg-gray-300:is(.dark *){background-color:var(--color-gray-300)}.dark\:bg-gray-500:is(.dark *){background-color:var(--color-gray-500)}.dark\:bg-gray-600:is(.dark *){background-color:var(--color-gray-600)}.dark\:bg-gray-700:is(.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-800:is(.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1e29394d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-gray-800\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-800)30%,transparent)}}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-gray-900\/50:is(.dark *){background-color:#10182880}@supports (color:color-mix(in lab,red,red)){.dark\:bg-gray-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}}.dark\:bg-green-200:is(.dark *){background-color:var(--color-green-200)}.dark\:bg-green-400:is(.dark *){background-color:var(--color-green-400)}.dark\:bg-green-500:is(.dark *){background-color:var(--color-green-500)}.dark\:bg-green-600:is(.dark *){background-color:var(--color-green-600)}.dark\:bg-green-700:is(.dark *){background-color:var(--color-green-700)}.dark\:bg-green-800:is(.dark *){background-color:var(--color-green-800)}.dark\:bg-green-900:is(.dark *){background-color:var(--color-green-900)}.dark\:bg-indigo-200:is(.dark *){background-color:var(--color-indigo-200)}.dark\:bg-indigo-400:is(.dark *){background-color:var(--color-indigo-400)}.dark\:bg-indigo-500:is(.dark *){background-color:var(--color-indigo-500)}.dark\:bg-indigo-600:is(.dark *){background-color:var(--color-indigo-600)}.dark\:bg-indigo-700:is(.dark *){background-color:var(--color-indigo-700)}.dark\:bg-indigo-800:is(.dark *){background-color:var(--color-indigo-800)}.dark\:bg-indigo-900:is(.dark *){background-color:var(--color-indigo-900)}.dark\:bg-inherit:is(.dark *){background-color:inherit}.dark\:bg-lime-200:is(.dark *){background-color:var(--color-lime-200)}.dark\:bg-lime-500:is(.dark *){background-color:var(--color-lime-500)}.dark\:bg-lime-600:is(.dark *){background-color:var(--color-lime-600)}.dark\:bg-lime-700:is(.dark *){background-color:var(--color-lime-700)}.dark\:bg-lime-800:is(.dark *){background-color:var(--color-lime-800)}.dark\:bg-lime-900:is(.dark *){background-color:var(--color-lime-900)}.dark\:bg-orange-200:is(.dark *){background-color:var(--color-orange-200)}.dark\:bg-orange-500:is(.dark *){background-color:var(--color-orange-500)}.dark\:bg-orange-600:is(.dark *){background-color:var(--color-orange-600)}.dark\:bg-orange-700:is(.dark *){background-color:var(--color-orange-700)}.dark\:bg-orange-800:is(.dark *){background-color:var(--color-orange-800)}.dark\:bg-orange-900:is(.dark *){background-color:var(--color-orange-900)}.dark\:bg-pink-200:is(.dark *){background-color:var(--color-pink-200)}.dark\:bg-pink-400:is(.dark *){background-color:var(--color-pink-400)}.dark\:bg-pink-500:is(.dark *){background-color:var(--color-pink-500)}.dark\:bg-pink-600:is(.dark *){background-color:var(--color-pink-600)}.dark\:bg-pink-700:is(.dark *){background-color:var(--color-pink-700)}.dark\:bg-pink-800:is(.dark *){background-color:var(--color-pink-800)}.dark\:bg-pink-900:is(.dark *){background-color:var(--color-pink-900)}.dark\:bg-primary-200:is(.dark *){background-color:#ffe4de}.dark\:bg-primary-400:is(.dark *){background-color:#ffbcad}.dark\:bg-primary-500:is(.dark *){background-color:#fe795d}.dark\:bg-primary-600:is(.dark *){background-color:#ef562f}.dark\:bg-primary-700:is(.dark *){background-color:#eb4f27}.dark\:bg-primary-800:is(.dark *){background-color:#cc4522}.dark\:bg-primary-900:is(.dark *){background-color:#a5371b}.dark\:bg-primary-900\/30:is(.dark *){background-color:#a5371b4d}.dark\:bg-purple-200:is(.dark *){background-color:var(--color-purple-200)}.dark\:bg-purple-400:is(.dark *){background-color:var(--color-purple-400)}.dark\:bg-purple-500:is(.dark *){background-color:var(--color-purple-500)}.dark\:bg-purple-600:is(.dark *){background-color:var(--color-purple-600)}.dark\:bg-purple-700:is(.dark *){background-color:var(--color-purple-700)}.dark\:bg-purple-800:is(.dark *){background-color:var(--color-purple-800)}.dark\:bg-purple-900:is(.dark *){background-color:var(--color-purple-900)}.dark\:bg-red-200:is(.dark *){background-color:var(--color-red-200)}.dark\:bg-red-500:is(.dark *){background-color:var(--color-red-500)}.dark\:bg-red-600:is(.dark *){background-color:var(--color-red-600)}.dark\:bg-red-700:is(.dark *){background-color:var(--color-red-700)}.dark\:bg-red-800:is(.dark *){background-color:var(--color-red-800)}.dark\:bg-red-900:is(.dark *){background-color:var(--color-red-900)}.dark\:bg-rose-200:is(.dark *){background-color:var(--color-rose-200)}.dark\:bg-rose-500:is(.dark *){background-color:var(--color-rose-500)}.dark\:bg-rose-600:is(.dark *){background-color:var(--color-rose-600)}.dark\:bg-rose-700:is(.dark *){background-color:var(--color-rose-700)}.dark\:bg-rose-800:is(.dark *){background-color:var(--color-rose-800)}.dark\:bg-rose-900:is(.dark *){background-color:var(--color-rose-900)}.dark\:bg-sky-200:is(.dark *){background-color:var(--color-sky-200)}.dark\:bg-sky-500:is(.dark *){background-color:var(--color-sky-500)}.dark\:bg-sky-600:is(.dark *){background-color:var(--color-sky-600)}.dark\:bg-sky-700:is(.dark *){background-color:var(--color-sky-700)}.dark\:bg-sky-800:is(.dark *){background-color:var(--color-sky-800)}.dark\:bg-sky-900:is(.dark *){background-color:var(--color-sky-900)}.dark\:bg-teal-200:is(.dark *){background-color:var(--color-teal-200)}.dark\:bg-teal-500:is(.dark *){background-color:var(--color-teal-500)}.dark\:bg-teal-600:is(.dark *){background-color:var(--color-teal-600)}.dark\:bg-teal-700:is(.dark *){background-color:var(--color-teal-700)}.dark\:bg-teal-800:is(.dark *){background-color:var(--color-teal-800)}.dark\:bg-teal-900:is(.dark *){background-color:var(--color-teal-900)}.dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:bg-violet-200:is(.dark *){background-color:var(--color-violet-200)}.dark\:bg-violet-500:is(.dark *){background-color:var(--color-violet-500)}.dark\:bg-violet-600:is(.dark *){background-color:var(--color-violet-600)}.dark\:bg-violet-700:is(.dark *){background-color:var(--color-violet-700)}.dark\:bg-violet-800:is(.dark *){background-color:var(--color-violet-800)}.dark\:bg-violet-900:is(.dark *){background-color:var(--color-violet-900)}.dark\:bg-white:is(.dark *){background-color:var(--color-white)}.dark\:bg-yellow-200:is(.dark *){background-color:var(--color-yellow-200)}.dark\:bg-yellow-400:is(.dark *){background-color:var(--color-yellow-400)}.dark\:bg-yellow-700:is(.dark *){background-color:var(--color-yellow-700)}.dark\:bg-yellow-800:is(.dark *){background-color:var(--color-yellow-800)}.dark\:bg-yellow-900:is(.dark *){background-color:var(--color-yellow-900)}.dark\:fill-gray-300:is(.dark *){fill:var(--color-gray-300)}.dark\:stroke-amber-500:is(.dark *){stroke:var(--color-amber-500)}.dark\:stroke-cyan-500:is(.dark *){stroke:var(--color-cyan-500)}.dark\:stroke-emerald-500:is(.dark *){stroke:var(--color-emerald-500)}.dark\:stroke-fuchsia-500:is(.dark *){stroke:var(--color-fuchsia-500)}.dark\:stroke-gray-300:is(.dark *){stroke:var(--color-gray-300)}.dark\:stroke-green-500:is(.dark *){stroke:var(--color-green-500)}.dark\:stroke-indigo-500:is(.dark *){stroke:var(--color-indigo-500)}.dark\:stroke-lime-500:is(.dark *){stroke:var(--color-lime-500)}.dark\:stroke-orange-500:is(.dark *){stroke:var(--color-orange-500)}.dark\:stroke-pink-500:is(.dark *){stroke:var(--color-pink-500)}.dark\:stroke-purple-500:is(.dark *){stroke:var(--color-purple-500)}.dark\:stroke-red-500:is(.dark *){stroke:var(--color-red-500)}.dark\:stroke-rose-500:is(.dark *){stroke:var(--color-rose-500)}.dark\:stroke-sky-500:is(.dark *){stroke:var(--color-sky-500)}.dark\:stroke-teal-500:is(.dark *){stroke:var(--color-teal-500)}.dark\:stroke-violet-500:is(.dark *){stroke:var(--color-violet-500)}.dark\:text-amber-100:is(.dark *){color:var(--color-amber-100)}.dark\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\:text-amber-400:is(.dark *){color:var(--color-amber-400)}.dark\:text-amber-500:is(.dark *){color:var(--color-amber-500)}.dark\:text-amber-600:is(.dark *){color:var(--color-amber-600)}.dark\:text-blue-100:is(.dark *){color:var(--color-blue-100)}.dark\:text-blue-200:is(.dark *){color:var(--color-blue-200)}.dark\:text-blue-300:is(.dark *){color:var(--color-blue-300)}.dark\:text-blue-400:is(.dark *){color:var(--color-blue-400)}.dark\:text-blue-500:is(.dark *){color:var(--color-blue-500)}.dark\:text-blue-600:is(.dark *){color:var(--color-blue-600)}.dark\:text-cyan-100:is(.dark *){color:var(--color-cyan-100)}.dark\:text-cyan-200:is(.dark *){color:var(--color-cyan-200)}.dark\:text-cyan-300:is(.dark *){color:var(--color-cyan-300)}.dark\:text-cyan-400:is(.dark *){color:var(--color-cyan-400)}.dark\:text-cyan-500:is(.dark *){color:var(--color-cyan-500)}.dark\:text-cyan-600:is(.dark *){color:var(--color-cyan-600)}.dark\:text-emerald-100:is(.dark *){color:var(--color-emerald-100)}.dark\:text-emerald-200:is(.dark *){color:var(--color-emerald-200)}.dark\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\:text-emerald-500:is(.dark *){color:var(--color-emerald-500)}.dark\:text-emerald-600:is(.dark *){color:var(--color-emerald-600)}.dark\:text-fuchsia-100:is(.dark *){color:var(--color-fuchsia-100)}.dark\:text-fuchsia-200:is(.dark *){color:var(--color-fuchsia-200)}.dark\:text-fuchsia-300:is(.dark *){color:var(--color-fuchsia-300)}.dark\:text-fuchsia-400:is(.dark *){color:var(--color-fuchsia-400)}.dark\:text-fuchsia-500:is(.dark *){color:var(--color-fuchsia-500)}.dark\:text-fuchsia-600:is(.dark *){color:var(--color-fuchsia-600)}.dark\:text-gray-50:is(.dark *){color:var(--color-gray-50)}.dark\:text-gray-100:is(.dark *){color:var(--color-gray-100)}.dark\:text-gray-200:is(.dark *){color:var(--color-gray-200)}.dark\:text-gray-300:is(.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-gray-500:is(.dark *){color:var(--color-gray-500)}.dark\:text-gray-600:is(.dark *){color:var(--color-gray-600)}.dark\:text-gray-700:is(.dark *){color:var(--color-gray-700)}.dark\:text-gray-800:is(.dark *){color:var(--color-gray-800)}.dark\:text-gray-900:is(.dark *){color:var(--color-gray-900)}.dark\:text-green-100:is(.dark *){color:var(--color-green-100)}.dark\:text-green-200:is(.dark *){color:var(--color-green-200)}.dark\:text-green-300:is(.dark *){color:var(--color-green-300)}.dark\:text-green-400:is(.dark *){color:var(--color-green-400)}.dark\:text-green-500:is(.dark *){color:var(--color-green-500)}.dark\:text-green-600:is(.dark *){color:var(--color-green-600)}.dark\:text-indigo-100:is(.dark *){color:var(--color-indigo-100)}.dark\:text-indigo-200:is(.dark *){color:var(--color-indigo-200)}.dark\:text-indigo-300:is(.dark *){color:var(--color-indigo-300)}.dark\:text-indigo-400:is(.dark *){color:var(--color-indigo-400)}.dark\:text-indigo-500:is(.dark *){color:var(--color-indigo-500)}.dark\:text-indigo-600:is(.dark *){color:var(--color-indigo-600)}.dark\:text-lime-100:is(.dark *){color:var(--color-lime-100)}.dark\:text-lime-200:is(.dark *){color:var(--color-lime-200)}.dark\:text-lime-300:is(.dark *){color:var(--color-lime-300)}.dark\:text-lime-400:is(.dark *){color:var(--color-lime-400)}.dark\:text-lime-500:is(.dark *){color:var(--color-lime-500)}.dark\:text-lime-600:is(.dark *){color:var(--color-lime-600)}.dark\:text-orange-100:is(.dark *){color:var(--color-orange-100)}.dark\:text-orange-200:is(.dark *){color:var(--color-orange-200)}.dark\:text-orange-300:is(.dark *){color:var(--color-orange-300)}.dark\:text-orange-400:is(.dark *){color:var(--color-orange-400)}.dark\:text-orange-500:is(.dark *){color:var(--color-orange-500)}.dark\:text-orange-600:is(.dark *){color:var(--color-orange-600)}.dark\:text-pink-100:is(.dark *){color:var(--color-pink-100)}.dark\:text-pink-200:is(.dark *){color:var(--color-pink-200)}.dark\:text-pink-300:is(.dark *){color:var(--color-pink-300)}.dark\:text-pink-400:is(.dark *){color:var(--color-pink-400)}.dark\:text-pink-500:is(.dark *){color:var(--color-pink-500)}.dark\:text-pink-600:is(.dark *){color:var(--color-pink-600)}.dark\:text-primary-100:is(.dark *){color:#fff1ee}.dark\:text-primary-200:is(.dark *){color:#ffe4de}.dark\:text-primary-300:is(.dark *){color:#ffd5cc}.dark\:text-primary-400:is(.dark *){color:#ffbcad}.dark\:text-primary-500:is(.dark *){color:#fe795d}.dark\:text-primary-600:is(.dark *){color:#ef562f}.dark\:text-primary-700:is(.dark *){color:#eb4f27}.dark\:text-primary-800:is(.dark *){color:#cc4522}.dark\:text-primary-900:is(.dark *){color:#a5371b}.dark\:text-purple-100:is(.dark *){color:var(--color-purple-100)}.dark\:text-purple-200:is(.dark *){color:var(--color-purple-200)}.dark\:text-purple-300:is(.dark *){color:var(--color-purple-300)}.dark\:text-purple-400:is(.dark *){color:var(--color-purple-400)}.dark\:text-purple-500:is(.dark *){color:var(--color-purple-500)}.dark\:text-purple-600:is(.dark *){color:var(--color-purple-600)}.dark\:text-red-100:is(.dark *){color:var(--color-red-100)}.dark\:text-red-200:is(.dark *){color:var(--color-red-200)}.dark\:text-red-300:is(.dark *){color:var(--color-red-300)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.dark\:text-red-500:is(.dark *){color:var(--color-red-500)}.dark\:text-red-600:is(.dark *){color:var(--color-red-600)}.dark\:text-rose-100:is(.dark *){color:var(--color-rose-100)}.dark\:text-rose-200:is(.dark *){color:var(--color-rose-200)}.dark\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\:text-rose-500:is(.dark *){color:var(--color-rose-500)}.dark\:text-rose-600:is(.dark *){color:var(--color-rose-600)}.dark\:text-sky-100:is(.dark *){color:var(--color-sky-100)}.dark\:text-sky-200:is(.dark *){color:var(--color-sky-200)}.dark\:text-sky-300:is(.dark *){color:var(--color-sky-300)}.dark\:text-sky-400:is(.dark *){color:var(--color-sky-400)}.dark\:text-sky-500:is(.dark *){color:var(--color-sky-500)}.dark\:text-sky-600:is(.dark *){color:var(--color-sky-600)}.dark\:text-teal-100:is(.dark *){color:var(--color-teal-100)}.dark\:text-teal-200:is(.dark *){color:var(--color-teal-200)}.dark\:text-teal-300:is(.dark *){color:var(--color-teal-300)}.dark\:text-teal-400:is(.dark *){color:var(--color-teal-400)}.dark\:text-teal-500:is(.dark *){color:var(--color-teal-500)}.dark\:text-teal-600:is(.dark *){color:var(--color-teal-600)}.dark\:text-violet-100:is(.dark *){color:var(--color-violet-100)}.dark\:text-violet-200:is(.dark *){color:var(--color-violet-200)}.dark\:text-violet-300:is(.dark *){color:var(--color-violet-300)}.dark\:text-violet-400:is(.dark *){color:var(--color-violet-400)}.dark\:text-violet-500:is(.dark *){color:var(--color-violet-500)}.dark\:text-violet-600:is(.dark *){color:var(--color-violet-600)}.dark\:text-white:is(.dark *){color:var(--color-white)}.dark\:text-white\!:is(.dark *){color:var(--color-white)!important}.dark\:text-yellow-100:is(.dark *){color:var(--color-yellow-100)}.dark\:text-yellow-200:is(.dark *){color:var(--color-yellow-200)}.dark\:text-yellow-300:is(.dark *){color:var(--color-yellow-300)}.dark\:text-yellow-400:is(.dark *){color:var(--color-yellow-400)}.dark\:text-yellow-500:is(.dark *){color:var(--color-yellow-500)}.dark\:text-yellow-600:is(.dark *){color:var(--color-yellow-600)}.dark\:decoration-blue-600:is(.dark *){-webkit-text-decoration-color:var(--color-blue-600);text-decoration-color:var(--color-blue-600)}.dark\:decoration-cyan-600:is(.dark *){-webkit-text-decoration-color:var(--color-cyan-600);text-decoration-color:var(--color-cyan-600)}.dark\:decoration-emerald-600:is(.dark *){-webkit-text-decoration-color:var(--color-emerald-600);text-decoration-color:var(--color-emerald-600)}.dark\:decoration-fuchsia-600:is(.dark *){-webkit-text-decoration-color:var(--color-fuchsia-600);text-decoration-color:var(--color-fuchsia-600)}.dark\:decoration-gray-600:is(.dark *){-webkit-text-decoration-color:var(--color-gray-600);text-decoration-color:var(--color-gray-600)}.dark\:decoration-green-600:is(.dark *){-webkit-text-decoration-color:var(--color-green-600);text-decoration-color:var(--color-green-600)}.dark\:decoration-indigo-600:is(.dark *){-webkit-text-decoration-color:var(--color-indigo-600);text-decoration-color:var(--color-indigo-600)}.dark\:decoration-lime-600:is(.dark *){-webkit-text-decoration-color:var(--color-lime-600);text-decoration-color:var(--color-lime-600)}.dark\:decoration-orange-600:is(.dark *){-webkit-text-decoration-color:var(--color-orange-600);text-decoration-color:var(--color-orange-600)}.dark\:decoration-pink-600:is(.dark *){-webkit-text-decoration-color:var(--color-pink-600);text-decoration-color:var(--color-pink-600)}.dark\:decoration-primary-600:is(.dark *){text-decoration-color:#ef562f}.dark\:decoration-purple-600:is(.dark *){-webkit-text-decoration-color:var(--color-purple-600);text-decoration-color:var(--color-purple-600)}.dark\:decoration-red-600:is(.dark *){-webkit-text-decoration-color:var(--color-red-600);text-decoration-color:var(--color-red-600)}.dark\:decoration-rose-600:is(.dark *){-webkit-text-decoration-color:var(--color-rose-600);text-decoration-color:var(--color-rose-600)}.dark\:decoration-sky-600:is(.dark *){-webkit-text-decoration-color:var(--color-sky-600);text-decoration-color:var(--color-sky-600)}.dark\:decoration-teal-600:is(.dark *){-webkit-text-decoration-color:var(--color-teal-600);text-decoration-color:var(--color-teal-600)}.dark\:decoration-violet-600:is(.dark *){-webkit-text-decoration-color:var(--color-violet-600);text-decoration-color:var(--color-violet-600)}.dark\:decoration-yellow-600:is(.dark *){-webkit-text-decoration-color:var(--color-yellow-600);text-decoration-color:var(--color-yellow-600)}.dark\:placeholder-amber-500:is(.dark *)::placeholder{color:var(--color-amber-500)}.dark\:placeholder-blue-500:is(.dark *)::placeholder{color:var(--color-blue-500)}.dark\:placeholder-cyan-500:is(.dark *)::placeholder{color:var(--color-cyan-500)}.dark\:placeholder-emerald-500:is(.dark *)::placeholder{color:var(--color-emerald-500)}.dark\:placeholder-fuchsia-500:is(.dark *)::placeholder{color:var(--color-fuchsia-500)}.dark\:placeholder-gray-400:is(.dark *)::placeholder{color:var(--color-gray-400)}.dark\:placeholder-gray-500:is(.dark *)::placeholder{color:var(--color-gray-500)}.dark\:placeholder-green-500:is(.dark *)::placeholder{color:var(--color-green-500)}.dark\:placeholder-indigo-500:is(.dark *)::placeholder{color:var(--color-indigo-500)}.dark\:placeholder-lime-500:is(.dark *)::placeholder{color:var(--color-lime-500)}.dark\:placeholder-orange-500:is(.dark *)::placeholder{color:var(--color-orange-500)}.dark\:placeholder-pink-500:is(.dark *)::placeholder{color:var(--color-pink-500)}.dark\:placeholder-primary-500:is(.dark *)::placeholder{color:#fe795d}.dark\:placeholder-purple-500:is(.dark *)::placeholder{color:var(--color-purple-500)}.dark\:placeholder-red-500:is(.dark *)::placeholder{color:var(--color-red-500)}.dark\:placeholder-rose-500:is(.dark *)::placeholder{color:var(--color-rose-500)}.dark\:placeholder-sky-500:is(.dark *)::placeholder{color:var(--color-sky-500)}.dark\:placeholder-teal-500:is(.dark *)::placeholder{color:var(--color-teal-500)}.dark\:placeholder-violet-500:is(.dark *)::placeholder{color:var(--color-violet-500)}.dark\:placeholder-yellow-500:is(.dark *)::placeholder{color:var(--color-yellow-500)}.dark\:opacity-25:is(.dark *){opacity:.25}.dark\:shadow-amber-800\/80:is(.dark *){--tw-shadow-color:#953d00cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-amber-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-amber-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color:#193cb8cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color:#005f78cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-cyan-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-emerald-800\/80:is(.dark *){--tw-shadow-color:#005f46cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-emerald-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-emerald-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-fuchsia-800\/80:is(.dark *){--tw-shadow-color:#8a0194cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-fuchsia-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-fuchsia-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-gray-800\/80:is(.dark *){--tw-shadow-color:#1e2939cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-gray-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-gray-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color:#016630cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-green-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-indigo-800\/80:is(.dark *){--tw-shadow-color:#372aaccc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-indigo-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-indigo-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color:#3d6300cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-lime-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-orange-800\/80:is(.dark *){--tw-shadow-color:#9f2d00cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-orange-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-orange-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color:#a2004ccc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-pink-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-primary-800\/80:is(.dark *){--tw-shadow-color:#cc4522cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-primary-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,oklab(57.5989% .145025 .102079/.8) var(--tw-shadow-alpha),transparent)}}.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color:#6e11b0cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-purple-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color:#9f0712cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-red-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-rose-800\/80:is(.dark *){--tw-shadow-color:#a30037cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-rose-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-rose-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-sky-800\/80:is(.dark *){--tw-shadow-color:#005986cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-sky-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-sky-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color:#005f5acc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-teal-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-violet-800\/80:is(.dark *){--tw-shadow-color:#5d0ec0cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-violet-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-violet-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-white\/10:is(.dark *){--tw-shadow-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-white\/10:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-white)10%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-yellow-800\/80:is(.dark *){--tw-shadow-color:#874b00cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-yellow-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-yellow-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:ring-gray-500:is(.dark *){--tw-ring-color:var(--color-gray-500)}.dark\:ring-gray-900:is(.dark *){--tw-ring-color:var(--color-gray-900)}.dark\:ring-primary-500:is(.dark *){--tw-ring-color:#fe795d}.dark\:ring-white\/10:is(.dark *){--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:ring-white\/10:is(.dark *){--tw-ring-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.dark\:ring-offset-amber-600:is(.dark *){--tw-ring-offset-color:var(--color-amber-600)}.dark\:ring-offset-blue-700:is(.dark *){--tw-ring-offset-color:var(--color-blue-700)}.dark\:ring-offset-cyan-600:is(.dark *){--tw-ring-offset-color:var(--color-cyan-600)}.dark\:ring-offset-emerald-600:is(.dark *){--tw-ring-offset-color:var(--color-emerald-600)}.dark\:ring-offset-fuchsia-600:is(.dark *){--tw-ring-offset-color:var(--color-fuchsia-600)}.dark\:ring-offset-gray-800:is(.dark *){--tw-ring-offset-color:var(--color-gray-800)}.dark\:ring-offset-green-600:is(.dark *){--tw-ring-offset-color:var(--color-green-600)}.dark\:ring-offset-indigo-700:is(.dark *){--tw-ring-offset-color:var(--color-indigo-700)}.dark\:ring-offset-lime-700:is(.dark *){--tw-ring-offset-color:var(--color-lime-700)}.dark\:ring-offset-orange-600:is(.dark *){--tw-ring-offset-color:var(--color-orange-600)}.dark\:ring-offset-pink-600:is(.dark *){--tw-ring-offset-color:var(--color-pink-600)}.dark\:ring-offset-purple-600:is(.dark *){--tw-ring-offset-color:var(--color-purple-600)}.dark\:ring-offset-red-600:is(.dark *){--tw-ring-offset-color:var(--color-red-600)}.dark\:ring-offset-rose-600:is(.dark *){--tw-ring-offset-color:var(--color-rose-600)}.dark\:ring-offset-sky-600:is(.dark *){--tw-ring-offset-color:var(--color-sky-600)}.dark\:ring-offset-teal-600:is(.dark *){--tw-ring-offset-color:var(--color-teal-600)}.dark\:ring-offset-violet-600:is(.dark *){--tw-ring-offset-color:var(--color-violet-600)}.dark\:ring-offset-yellow-400:is(.dark *){--tw-ring-offset-color:var(--color-yellow-400)}@media(hover:hover){.dark\:group-hover\:bg-gray-800\/60:is(.dark *):is(:where(.group):hover *){background-color:#1e293999}@supports (color:color-mix(in lab,red,red)){.dark\:group-hover\:bg-gray-800\/60:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-gray-800)60%,transparent)}}.dark\:group-hover\:text-primary-500:is(.dark *):is(:where(.group):hover *){color:#fe795d}}.dark\:group-focus\:ring-gray-800\/70:is(.dark *):is(:where(.group):focus *){--tw-ring-color:#1e2939b3}@supports (color:color-mix(in lab,red,red)){.dark\:group-focus\:ring-gray-800\/70:is(.dark *):is(:where(.group):focus *){--tw-ring-color:color-mix(in oklab,var(--color-gray-800)70%,transparent)}}.dark\:peer-focus\:text-amber-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-amber-500)}.dark\:peer-focus\:text-blue-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-blue-500)}.dark\:peer-focus\:text-cyan-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-cyan-500)}.dark\:peer-focus\:text-emerald-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-emerald-500)}.dark\:peer-focus\:text-fuchsia-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-fuchsia-500)}.dark\:peer-focus\:text-gray-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-gray-500)}.dark\:peer-focus\:text-green-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-green-500)}.dark\:peer-focus\:text-indigo-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-indigo-500)}.dark\:peer-focus\:text-lime-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-lime-500)}.dark\:peer-focus\:text-orange-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-orange-500)}.dark\:peer-focus\:text-pink-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-pink-500)}.dark\:peer-focus\:text-primary-500:is(.dark *):is(:where(.peer):focus~*){color:#fe795d}.dark\:peer-focus\:text-purple-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-purple-500)}.dark\:peer-focus\:text-red-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-red-500)}.dark\:peer-focus\:text-rose-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-rose-500)}.dark\:peer-focus\:text-sky-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-sky-500)}.dark\:peer-focus\:text-teal-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-teal-500)}.dark\:peer-focus\:text-violet-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-violet-500)}.dark\:peer-focus\:text-yellow-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-yellow-500)}.peer-focus\:dark\:text-primary-500:is(:where(.peer):focus~*):is(.dark *){color:#fe795d}.dark\:peer-focus\:ring-amber-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-amber-800)}.dark\:peer-focus\:ring-blue-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-blue-800)}.dark\:peer-focus\:ring-cyan-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-cyan-800)}.dark\:peer-focus\:ring-emerald-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-emerald-800)}.dark\:peer-focus\:ring-fuchsia-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-fuchsia-800)}.dark\:peer-focus\:ring-gray-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-gray-800)}.dark\:peer-focus\:ring-green-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-green-800)}.dark\:peer-focus\:ring-indigo-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-indigo-800)}.dark\:peer-focus\:ring-lime-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-lime-800)}.dark\:peer-focus\:ring-orange-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-orange-800)}.dark\:peer-focus\:ring-pink-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-pink-800)}.dark\:peer-focus\:ring-primary-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:#cc4522}.dark\:peer-focus\:ring-purple-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-purple-800)}.dark\:peer-focus\:ring-red-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-red-800)}.dark\:peer-focus\:ring-rose-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-rose-800)}.dark\:peer-focus\:ring-sky-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-sky-800)}.dark\:peer-focus\:ring-teal-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-teal-800)}.dark\:peer-focus\:ring-violet-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-violet-800)}.dark\:peer-focus\:ring-yellow-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-yellow-800)}.dark\:first-letter\:text-gray-100:is(.dark *):first-letter{color:var(--color-gray-100)}.dark\:after\:border-gray-700:is(.dark *):after{content:var(--tw-content);border-color:var(--color-gray-700)}.dark\:after\:border-primary-800:is(.dark *):after{content:var(--tw-content);border-color:#cc4522}.dark\:after\:text-gray-500:is(.dark *):after{content:var(--tw-content);color:var(--color-gray-500)}.dark\:last\:border-e-gray-500:is(.dark *):last-child{border-inline-end-color:var(--color-gray-500)}.dark\:last\:border-e-gray-600:is(.dark *):last-child{border-inline-end-color:var(--color-gray-600)}.dark\:odd\:bg-amber-500:is(.dark *):nth-child(odd){background-color:var(--color-amber-500)}.dark\:odd\:bg-blue-500:is(.dark *):nth-child(odd){background-color:var(--color-blue-500)}.dark\:odd\:bg-cyan-500:is(.dark *):nth-child(odd){background-color:var(--color-cyan-500)}.dark\:odd\:bg-emerald-500:is(.dark *):nth-child(odd){background-color:var(--color-emerald-500)}.dark\:odd\:bg-fuchsia-500:is(.dark *):nth-child(odd){background-color:var(--color-fuchsia-500)}.dark\:odd\:bg-gray-500:is(.dark *):nth-child(odd){background-color:var(--color-gray-500)}.dark\:odd\:bg-gray-800:is(.dark *):nth-child(odd){background-color:var(--color-gray-800)}.dark\:odd\:bg-green-500:is(.dark *):nth-child(odd){background-color:var(--color-green-500)}.dark\:odd\:bg-indigo-500:is(.dark *):nth-child(odd){background-color:var(--color-indigo-500)}.dark\:odd\:bg-lime-500:is(.dark *):nth-child(odd){background-color:var(--color-lime-500)}.dark\:odd\:bg-orange-500:is(.dark *):nth-child(odd){background-color:var(--color-orange-500)}.dark\:odd\:bg-pink-500:is(.dark *):nth-child(odd){background-color:var(--color-pink-500)}.dark\:odd\:bg-primary-500:is(.dark *):nth-child(odd){background-color:#fe795d}.dark\:odd\:bg-purple-500:is(.dark *):nth-child(odd){background-color:var(--color-purple-500)}.dark\:odd\:bg-red-500:is(.dark *):nth-child(odd){background-color:var(--color-red-500)}.dark\:odd\:bg-rose-500:is(.dark *):nth-child(odd){background-color:var(--color-rose-500)}.dark\:odd\:bg-sky-500:is(.dark *):nth-child(odd){background-color:var(--color-sky-500)}.dark\:odd\:bg-teal-500:is(.dark *):nth-child(odd){background-color:var(--color-teal-500)}.dark\:odd\:bg-violet-500:is(.dark *):nth-child(odd){background-color:var(--color-violet-500)}.dark\:odd\:bg-yellow-500:is(.dark *):nth-child(odd){background-color:var(--color-yellow-500)}.dark\:even\:bg-amber-600:is(.dark *):nth-child(2n){background-color:var(--color-amber-600)}.dark\:even\:bg-blue-600:is(.dark *):nth-child(2n){background-color:var(--color-blue-600)}.dark\:even\:bg-cyan-600:is(.dark *):nth-child(2n){background-color:var(--color-cyan-600)}.dark\:even\:bg-emerald-600:is(.dark *):nth-child(2n){background-color:var(--color-emerald-600)}.dark\:even\:bg-fuchsia-600:is(.dark *):nth-child(2n){background-color:var(--color-fuchsia-600)}.dark\:even\:bg-gray-600:is(.dark *):nth-child(2n){background-color:var(--color-gray-600)}.dark\:even\:bg-gray-700:is(.dark *):nth-child(2n){background-color:var(--color-gray-700)}.dark\:even\:bg-green-600:is(.dark *):nth-child(2n){background-color:var(--color-green-600)}.dark\:even\:bg-indigo-600:is(.dark *):nth-child(2n){background-color:var(--color-indigo-600)}.dark\:even\:bg-lime-600:is(.dark *):nth-child(2n){background-color:var(--color-lime-600)}.dark\:even\:bg-orange-600:is(.dark *):nth-child(2n){background-color:var(--color-orange-600)}.dark\:even\:bg-pink-600:is(.dark *):nth-child(2n){background-color:var(--color-pink-600)}.dark\:even\:bg-primary-600:is(.dark *):nth-child(2n){background-color:#ef562f}.dark\:even\:bg-purple-600:is(.dark *):nth-child(2n){background-color:var(--color-purple-600)}.dark\:even\:bg-red-600:is(.dark *):nth-child(2n){background-color:var(--color-red-600)}.dark\:even\:bg-rose-600:is(.dark *):nth-child(2n){background-color:var(--color-rose-600)}.dark\:even\:bg-sky-600:is(.dark *):nth-child(2n){background-color:var(--color-sky-600)}.dark\:even\:bg-teal-600:is(.dark *):nth-child(2n){background-color:var(--color-teal-600)}.dark\:even\:bg-violet-600:is(.dark *):nth-child(2n){background-color:var(--color-violet-600)}.dark\:even\:bg-yellow-600:is(.dark *):nth-child(2n){background-color:var(--color-yellow-600)}.dark\:focus-within\:border-primary-500:is(.dark *):focus-within{border-color:#fe795d}.dark\:focus-within\:text-white:is(.dark *):focus-within{color:var(--color-white)}.dark\:focus-within\:ring-amber-900:is(.dark *):focus-within{--tw-ring-color:var(--color-amber-900)}.dark\:focus-within\:ring-blue-800:is(.dark *):focus-within{--tw-ring-color:var(--color-blue-800)}.dark\:focus-within\:ring-cyan-800:is(.dark *):focus-within{--tw-ring-color:var(--color-cyan-800)}.dark\:focus-within\:ring-emerald-800:is(.dark *):focus-within{--tw-ring-color:var(--color-emerald-800)}.dark\:focus-within\:ring-gray-700:is(.dark *):focus-within{--tw-ring-color:var(--color-gray-700)}.dark\:focus-within\:ring-gray-800:is(.dark *):focus-within{--tw-ring-color:var(--color-gray-800)}.dark\:focus-within\:ring-green-800:is(.dark *):focus-within{--tw-ring-color:var(--color-green-800)}.dark\:focus-within\:ring-indigo-800:is(.dark *):focus-within{--tw-ring-color:var(--color-indigo-800)}.dark\:focus-within\:ring-lime-800:is(.dark *):focus-within{--tw-ring-color:var(--color-lime-800)}.dark\:focus-within\:ring-orange-900:is(.dark *):focus-within{--tw-ring-color:var(--color-orange-900)}.dark\:focus-within\:ring-primary-800:is(.dark *):focus-within{--tw-ring-color:#cc4522}.dark\:focus-within\:ring-red-900:is(.dark *):focus-within{--tw-ring-color:var(--color-red-900)}.dark\:focus-within\:ring-sky-800:is(.dark *):focus-within{--tw-ring-color:var(--color-sky-800)}.dark\:focus-within\:ring-teal-800:is(.dark *):focus-within{--tw-ring-color:var(--color-teal-800)}.dark\:focus-within\:ring-violet-800:is(.dark *):focus-within{--tw-ring-color:var(--color-violet-800)}.dark\:focus-within\:ring-yellow-900:is(.dark *):focus-within{--tw-ring-color:var(--color-yellow-900)}@media(hover:hover){.dark\:hover\:border-gray-500:is(.dark *):hover{border-color:var(--color-gray-500)}.dark\:hover\:border-gray-600:is(.dark *):hover{border-color:var(--color-gray-600)}.dark\:hover\:bg-amber-400:is(.dark *):hover{background-color:var(--color-amber-400)}.dark\:hover\:bg-amber-500:is(.dark *):hover{background-color:var(--color-amber-500)}.dark\:hover\:bg-amber-700:is(.dark *):hover{background-color:var(--color-amber-700)}.dark\:hover\:bg-amber-800:is(.dark *):hover{background-color:var(--color-amber-800)}.dark\:hover\:bg-blue-400:is(.dark *):hover{background-color:var(--color-blue-400)}.dark\:hover\:bg-blue-500:is(.dark *):hover{background-color:var(--color-blue-500)}.dark\:hover\:bg-blue-700:is(.dark *):hover{background-color:var(--color-blue-700)}.dark\:hover\:bg-blue-800:is(.dark *):hover{background-color:var(--color-blue-800)}.dark\:hover\:bg-blue-900\/20:is(.dark *):hover{background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-blue-900\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\:hover\:bg-cyan-400:is(.dark *):hover{background-color:var(--color-cyan-400)}.dark\:hover\:bg-cyan-500:is(.dark *):hover{background-color:var(--color-cyan-500)}.dark\:hover\:bg-cyan-700:is(.dark *):hover{background-color:var(--color-cyan-700)}.dark\:hover\:bg-cyan-800:is(.dark *):hover{background-color:var(--color-cyan-800)}.dark\:hover\:bg-emerald-400:is(.dark *):hover{background-color:var(--color-emerald-400)}.dark\:hover\:bg-emerald-500:is(.dark *):hover{background-color:var(--color-emerald-500)}.dark\:hover\:bg-emerald-700:is(.dark *):hover{background-color:var(--color-emerald-700)}.dark\:hover\:bg-emerald-800:is(.dark *):hover{background-color:var(--color-emerald-800)}.dark\:hover\:bg-fuchsia-400:is(.dark *):hover{background-color:var(--color-fuchsia-400)}.dark\:hover\:bg-fuchsia-500:is(.dark *):hover{background-color:var(--color-fuchsia-500)}.dark\:hover\:bg-fuchsia-700:is(.dark *):hover{background-color:var(--color-fuchsia-700)}.dark\:hover\:bg-fuchsia-800:is(.dark *):hover{background-color:var(--color-fuchsia-800)}.dark\:hover\:bg-gray-400:is(.dark *):hover{background-color:var(--color-gray-400)}.dark\:hover\:bg-gray-500:is(.dark *):hover{background-color:var(--color-gray-500)}.dark\:hover\:bg-gray-600:is(.dark *):hover{background-color:var(--color-gray-600)}.dark\:hover\:bg-gray-700:is(.dark *):hover{background-color:var(--color-gray-700)}.dark\:hover\:bg-gray-800:is(.dark *):hover{background-color:var(--color-gray-800)}.dark\:hover\:bg-gray-800\/50:is(.dark *):hover{background-color:#1e293980}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-gray-800\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}}.dark\:hover\:bg-green-400:is(.dark *):hover{background-color:var(--color-green-400)}.dark\:hover\:bg-green-600:is(.dark *):hover{background-color:var(--color-green-600)}.dark\:hover\:bg-green-700:is(.dark *):hover{background-color:var(--color-green-700)}.dark\:hover\:bg-green-800:is(.dark *):hover{background-color:var(--color-green-800)}.dark\:hover\:bg-indigo-400:is(.dark *):hover{background-color:var(--color-indigo-400)}.dark\:hover\:bg-indigo-500:is(.dark *):hover{background-color:var(--color-indigo-500)}.dark\:hover\:bg-indigo-700:is(.dark *):hover{background-color:var(--color-indigo-700)}.dark\:hover\:bg-indigo-800:is(.dark *):hover{background-color:var(--color-indigo-800)}.dark\:hover\:bg-lime-400:is(.dark *):hover{background-color:var(--color-lime-400)}.dark\:hover\:bg-lime-500:is(.dark *):hover{background-color:var(--color-lime-500)}.dark\:hover\:bg-lime-700:is(.dark *):hover{background-color:var(--color-lime-700)}.dark\:hover\:bg-lime-800:is(.dark *):hover{background-color:var(--color-lime-800)}.dark\:hover\:bg-orange-400:is(.dark *):hover{background-color:var(--color-orange-400)}.dark\:hover\:bg-orange-500:is(.dark *):hover{background-color:var(--color-orange-500)}.dark\:hover\:bg-orange-700:is(.dark *):hover{background-color:var(--color-orange-700)}.dark\:hover\:bg-orange-800:is(.dark *):hover{background-color:var(--color-orange-800)}.dark\:hover\:bg-pink-400:is(.dark *):hover{background-color:var(--color-pink-400)}.dark\:hover\:bg-pink-500:is(.dark *):hover{background-color:var(--color-pink-500)}.dark\:hover\:bg-pink-700:is(.dark *):hover{background-color:var(--color-pink-700)}.dark\:hover\:bg-pink-800:is(.dark *):hover{background-color:var(--color-pink-800)}.dark\:hover\:bg-primary-400:is(.dark *):hover{background-color:#ffbcad}.dark\:hover\:bg-primary-500:is(.dark *):hover{background-color:#fe795d}.dark\:hover\:bg-primary-600:is(.dark *):hover{background-color:#ef562f}.dark\:hover\:bg-primary-700:is(.dark *):hover{background-color:#eb4f27}.dark\:hover\:bg-primary-800:is(.dark *):hover{background-color:#cc4522}.dark\:hover\:bg-purple-400:is(.dark *):hover{background-color:var(--color-purple-400)}.dark\:hover\:bg-purple-500:is(.dark *):hover{background-color:var(--color-purple-500)}.dark\:hover\:bg-purple-700:is(.dark *):hover{background-color:var(--color-purple-700)}.dark\:hover\:bg-purple-800:is(.dark *):hover{background-color:var(--color-purple-800)}.dark\:hover\:bg-red-400:is(.dark *):hover{background-color:var(--color-red-400)}.dark\:hover\:bg-red-600:is(.dark *):hover{background-color:var(--color-red-600)}.dark\:hover\:bg-red-700:is(.dark *):hover{background-color:var(--color-red-700)}.dark\:hover\:bg-red-800:is(.dark *):hover{background-color:var(--color-red-800)}.dark\:hover\:bg-red-900\/20:is(.dark *):hover{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-red-900\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.dark\:hover\:bg-rose-400:is(.dark *):hover{background-color:var(--color-rose-400)}.dark\:hover\:bg-rose-500:is(.dark *):hover{background-color:var(--color-rose-500)}.dark\:hover\:bg-rose-700:is(.dark *):hover{background-color:var(--color-rose-700)}.dark\:hover\:bg-rose-800:is(.dark *):hover{background-color:var(--color-rose-800)}.dark\:hover\:bg-sky-400:is(.dark *):hover{background-color:var(--color-sky-400)}.dark\:hover\:bg-sky-500:is(.dark *):hover{background-color:var(--color-sky-500)}.dark\:hover\:bg-sky-700:is(.dark *):hover{background-color:var(--color-sky-700)}.dark\:hover\:bg-sky-800:is(.dark *):hover{background-color:var(--color-sky-800)}.dark\:hover\:bg-teal-400:is(.dark *):hover{background-color:var(--color-teal-400)}.dark\:hover\:bg-teal-500:is(.dark *):hover{background-color:var(--color-teal-500)}.dark\:hover\:bg-teal-700:is(.dark *):hover{background-color:var(--color-teal-700)}.dark\:hover\:bg-teal-800:is(.dark *):hover{background-color:var(--color-teal-800)}.dark\:hover\:bg-violet-400:is(.dark *):hover{background-color:var(--color-violet-400)}.dark\:hover\:bg-violet-500:is(.dark *):hover{background-color:var(--color-violet-500)}.dark\:hover\:bg-violet-700:is(.dark *):hover{background-color:var(--color-violet-700)}.dark\:hover\:bg-violet-800:is(.dark *):hover{background-color:var(--color-violet-800)}.dark\:hover\:bg-yellow-400:is(.dark *):hover{background-color:var(--color-yellow-400)}.dark\:hover\:bg-yellow-700:is(.dark *):hover{background-color:var(--color-yellow-700)}.dark\:hover\:bg-yellow-800:is(.dark *):hover{background-color:var(--color-yellow-800)}.dark\:hover\:text-amber-300:is(.dark *):hover{color:var(--color-amber-300)}.dark\:hover\:text-amber-500:is(.dark *):hover{color:var(--color-amber-500)}.dark\:hover\:text-blue-300:is(.dark *):hover{color:var(--color-blue-300)}.dark\:hover\:text-blue-500:is(.dark *):hover{color:var(--color-blue-500)}.dark\:hover\:text-cyan-300:is(.dark *):hover{color:var(--color-cyan-300)}.dark\:hover\:text-cyan-500:is(.dark *):hover{color:var(--color-cyan-500)}.dark\:hover\:text-emerald-300:is(.dark *):hover{color:var(--color-emerald-300)}.dark\:hover\:text-emerald-500:is(.dark *):hover{color:var(--color-emerald-500)}.dark\:hover\:text-fuchsia-300:is(.dark *):hover{color:var(--color-fuchsia-300)}.dark\:hover\:text-fuchsia-500:is(.dark *):hover{color:var(--color-fuchsia-500)}.dark\:hover\:text-gray-50:is(.dark *):hover{color:var(--color-gray-50)}.dark\:hover\:text-gray-300:is(.dark *):hover{color:var(--color-gray-300)}.dark\:hover\:text-gray-500:is(.dark *):hover{color:var(--color-gray-500)}.dark\:hover\:text-green-300:is(.dark *):hover{color:var(--color-green-300)}.dark\:hover\:text-green-500:is(.dark *):hover{color:var(--color-green-500)}.dark\:hover\:text-indigo-300:is(.dark *):hover{color:var(--color-indigo-300)}.dark\:hover\:text-indigo-500:is(.dark *):hover{color:var(--color-indigo-500)}.dark\:hover\:text-lime-300:is(.dark *):hover{color:var(--color-lime-300)}.dark\:hover\:text-lime-500:is(.dark *):hover{color:var(--color-lime-500)}.dark\:hover\:text-orange-300:is(.dark *):hover{color:var(--color-orange-300)}.dark\:hover\:text-orange-500:is(.dark *):hover{color:var(--color-orange-500)}.dark\:hover\:text-pink-300:is(.dark *):hover{color:var(--color-pink-300)}.dark\:hover\:text-pink-500:is(.dark *):hover{color:var(--color-pink-500)}.dark\:hover\:text-primary-100:is(.dark *):hover{color:#fff1ee}.dark\:hover\:text-primary-300:is(.dark *):hover{color:#ffd5cc}.dark\:hover\:text-primary-500:is(.dark *):hover{color:#fe795d}.dark\:hover\:text-primary-900:is(.dark *):hover{color:#a5371b}.dark\:hover\:text-purple-300:is(.dark *):hover{color:var(--color-purple-300)}.dark\:hover\:text-purple-500:is(.dark *):hover{color:var(--color-purple-500)}.dark\:hover\:text-red-300:is(.dark *):hover{color:var(--color-red-300)}.dark\:hover\:text-red-500:is(.dark *):hover{color:var(--color-red-500)}.dark\:hover\:text-rose-300:is(.dark *):hover{color:var(--color-rose-300)}.dark\:hover\:text-rose-500:is(.dark *):hover{color:var(--color-rose-500)}.dark\:hover\:text-sky-300:is(.dark *):hover{color:var(--color-sky-300)}.dark\:hover\:text-sky-500:is(.dark *):hover{color:var(--color-sky-500)}.dark\:hover\:text-teal-300:is(.dark *):hover{color:var(--color-teal-300)}.dark\:hover\:text-teal-500:is(.dark *):hover{color:var(--color-teal-500)}.dark\:hover\:text-violet-300:is(.dark *):hover{color:var(--color-violet-300)}.dark\:hover\:text-violet-500:is(.dark *):hover{color:var(--color-violet-500)}.dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}.dark\:hover\:text-yellow-300:is(.dark *):hover{color:var(--color-yellow-300)}.dark\:hover\:text-yellow-500:is(.dark *):hover{color:var(--color-yellow-500)}}.dark\:focus\:border-amber-500:is(.dark *):focus{border-color:var(--color-amber-500)}.dark\:focus\:border-blue-500:is(.dark *):focus{border-color:var(--color-blue-500)}.dark\:focus\:border-cyan-500:is(.dark *):focus{border-color:var(--color-cyan-500)}.dark\:focus\:border-emerald-500:is(.dark *):focus{border-color:var(--color-emerald-500)}.dark\:focus\:border-fuchsia-500:is(.dark *):focus{border-color:var(--color-fuchsia-500)}.dark\:focus\:border-gray-500:is(.dark *):focus{border-color:var(--color-gray-500)}.dark\:focus\:border-green-500:is(.dark *):focus{border-color:var(--color-green-500)}.dark\:focus\:border-indigo-500:is(.dark *):focus{border-color:var(--color-indigo-500)}.dark\:focus\:border-lime-500:is(.dark *):focus{border-color:var(--color-lime-500)}.dark\:focus\:border-orange-500:is(.dark *):focus{border-color:var(--color-orange-500)}.dark\:focus\:border-pink-500:is(.dark *):focus{border-color:var(--color-pink-500)}.dark\:focus\:border-primary-500:is(.dark *):focus{border-color:#fe795d}.dark\:focus\:border-purple-500:is(.dark *):focus{border-color:var(--color-purple-500)}.dark\:focus\:border-red-500:is(.dark *):focus{border-color:var(--color-red-500)}.dark\:focus\:border-rose-500:is(.dark *):focus{border-color:var(--color-rose-500)}.dark\:focus\:border-sky-500:is(.dark *):focus{border-color:var(--color-sky-500)}.dark\:focus\:border-teal-500:is(.dark *):focus{border-color:var(--color-teal-500)}.dark\:focus\:border-violet-500:is(.dark *):focus{border-color:var(--color-violet-500)}.dark\:focus\:border-yellow-500:is(.dark *):focus{border-color:var(--color-yellow-500)}.dark\:focus\:text-white:is(.dark *):focus{color:var(--color-white)}.dark\:focus\:ring-amber-400:is(.dark *):focus{--tw-ring-color:var(--color-amber-400)}.dark\:focus\:ring-amber-500:is(.dark *):focus{--tw-ring-color:var(--color-amber-500)}.dark\:focus\:ring-amber-600:is(.dark *):focus{--tw-ring-color:var(--color-amber-600)}.dark\:focus\:ring-blue-400:is(.dark *):focus{--tw-ring-color:var(--color-blue-400)}.dark\:focus\:ring-blue-500:is(.dark *):focus{--tw-ring-color:var(--color-blue-500)}.dark\:focus\:ring-blue-600:is(.dark *):focus{--tw-ring-color:var(--color-blue-600)}.dark\:focus\:ring-blue-700:is(.dark *):focus{--tw-ring-color:var(--color-blue-700)}.dark\:focus\:ring-blue-800:is(.dark *):focus{--tw-ring-color:var(--color-blue-800)}.dark\:focus\:ring-cyan-400:is(.dark *):focus{--tw-ring-color:var(--color-cyan-400)}.dark\:focus\:ring-cyan-500:is(.dark *):focus{--tw-ring-color:var(--color-cyan-500)}.dark\:focus\:ring-cyan-600:is(.dark *):focus{--tw-ring-color:var(--color-cyan-600)}.dark\:focus\:ring-cyan-800:is(.dark *):focus{--tw-ring-color:var(--color-cyan-800)}.dark\:focus\:ring-emerald-400:is(.dark *):focus{--tw-ring-color:var(--color-emerald-400)}.dark\:focus\:ring-emerald-500:is(.dark *):focus{--tw-ring-color:var(--color-emerald-500)}.dark\:focus\:ring-emerald-600:is(.dark *):focus{--tw-ring-color:var(--color-emerald-600)}.dark\:focus\:ring-fuchsia-400:is(.dark *):focus{--tw-ring-color:var(--color-fuchsia-400)}.dark\:focus\:ring-fuchsia-500:is(.dark *):focus{--tw-ring-color:var(--color-fuchsia-500)}.dark\:focus\:ring-fuchsia-600:is(.dark *):focus{--tw-ring-color:var(--color-fuchsia-600)}.dark\:focus\:ring-gray-400:is(.dark *):focus{--tw-ring-color:var(--color-gray-400)}.dark\:focus\:ring-gray-500:is(.dark *):focus{--tw-ring-color:var(--color-gray-500)}.dark\:focus\:ring-gray-600:is(.dark *):focus{--tw-ring-color:var(--color-gray-600)}.dark\:focus\:ring-gray-800:is(.dark *):focus{--tw-ring-color:var(--color-gray-800)}.dark\:focus\:ring-green-400:is(.dark *):focus{--tw-ring-color:var(--color-green-400)}.dark\:focus\:ring-green-500:is(.dark *):focus{--tw-ring-color:var(--color-green-500)}.dark\:focus\:ring-green-600:is(.dark *):focus{--tw-ring-color:var(--color-green-600)}.dark\:focus\:ring-green-800:is(.dark *):focus{--tw-ring-color:var(--color-green-800)}.dark\:focus\:ring-indigo-400:is(.dark *):focus{--tw-ring-color:var(--color-indigo-400)}.dark\:focus\:ring-indigo-500:is(.dark *):focus{--tw-ring-color:var(--color-indigo-500)}.dark\:focus\:ring-indigo-600:is(.dark *):focus{--tw-ring-color:var(--color-indigo-600)}.dark\:focus\:ring-indigo-700:is(.dark *):focus{--tw-ring-color:var(--color-indigo-700)}.dark\:focus\:ring-lime-400:is(.dark *):focus{--tw-ring-color:var(--color-lime-400)}.dark\:focus\:ring-lime-500:is(.dark *):focus{--tw-ring-color:var(--color-lime-500)}.dark\:focus\:ring-lime-600:is(.dark *):focus{--tw-ring-color:var(--color-lime-600)}.dark\:focus\:ring-lime-700:is(.dark *):focus{--tw-ring-color:var(--color-lime-700)}.dark\:focus\:ring-lime-800:is(.dark *):focus{--tw-ring-color:var(--color-lime-800)}.dark\:focus\:ring-orange-400:is(.dark *):focus{--tw-ring-color:var(--color-orange-400)}.dark\:focus\:ring-orange-500:is(.dark *):focus{--tw-ring-color:var(--color-orange-500)}.dark\:focus\:ring-orange-600:is(.dark *):focus{--tw-ring-color:var(--color-orange-600)}.dark\:focus\:ring-pink-400:is(.dark *):focus{--tw-ring-color:var(--color-pink-400)}.dark\:focus\:ring-pink-500:is(.dark *):focus{--tw-ring-color:var(--color-pink-500)}.dark\:focus\:ring-pink-600:is(.dark *):focus{--tw-ring-color:var(--color-pink-600)}.dark\:focus\:ring-pink-800:is(.dark *):focus{--tw-ring-color:var(--color-pink-800)}.dark\:focus\:ring-primary-400:is(.dark *):focus{--tw-ring-color:#ffbcad}.dark\:focus\:ring-primary-500:is(.dark *):focus{--tw-ring-color:#fe795d}.dark\:focus\:ring-primary-600:is(.dark *):focus{--tw-ring-color:#ef562f}.dark\:focus\:ring-purple-400:is(.dark *):focus{--tw-ring-color:var(--color-purple-400)}.dark\:focus\:ring-purple-500:is(.dark *):focus{--tw-ring-color:var(--color-purple-500)}.dark\:focus\:ring-purple-600:is(.dark *):focus{--tw-ring-color:var(--color-purple-600)}.dark\:focus\:ring-purple-800:is(.dark *):focus{--tw-ring-color:var(--color-purple-800)}.dark\:focus\:ring-red-400:is(.dark *):focus{--tw-ring-color:var(--color-red-400)}.dark\:focus\:ring-red-500:is(.dark *):focus{--tw-ring-color:var(--color-red-500)}.dark\:focus\:ring-red-600:is(.dark *):focus{--tw-ring-color:var(--color-red-600)}.dark\:focus\:ring-red-800:is(.dark *):focus{--tw-ring-color:var(--color-red-800)}.dark\:focus\:ring-rose-400:is(.dark *):focus{--tw-ring-color:var(--color-rose-400)}.dark\:focus\:ring-rose-500:is(.dark *):focus{--tw-ring-color:var(--color-rose-500)}.dark\:focus\:ring-rose-600:is(.dark *):focus{--tw-ring-color:var(--color-rose-600)}.dark\:focus\:ring-sky-400:is(.dark *):focus{--tw-ring-color:var(--color-sky-400)}.dark\:focus\:ring-sky-500:is(.dark *):focus{--tw-ring-color:var(--color-sky-500)}.dark\:focus\:ring-sky-600:is(.dark *):focus{--tw-ring-color:var(--color-sky-600)}.dark\:focus\:ring-teal-400:is(.dark *):focus{--tw-ring-color:var(--color-teal-400)}.dark\:focus\:ring-teal-500:is(.dark *):focus{--tw-ring-color:var(--color-teal-500)}.dark\:focus\:ring-teal-600:is(.dark *):focus{--tw-ring-color:var(--color-teal-600)}.dark\:focus\:ring-teal-700:is(.dark *):focus{--tw-ring-color:var(--color-teal-700)}.dark\:focus\:ring-teal-800:is(.dark *):focus{--tw-ring-color:var(--color-teal-800)}.dark\:focus\:ring-violet-400:is(.dark *):focus{--tw-ring-color:var(--color-violet-400)}.dark\:focus\:ring-violet-500:is(.dark *):focus{--tw-ring-color:var(--color-violet-500)}.dark\:focus\:ring-violet-600:is(.dark *):focus{--tw-ring-color:var(--color-violet-600)}.dark\:focus\:ring-yellow-400:is(.dark *):focus{--tw-ring-color:var(--color-yellow-400)}.dark\:focus\:ring-yellow-500:is(.dark *):focus{--tw-ring-color:var(--color-yellow-500)}.dark\:focus\:ring-yellow-600:is(.dark *):focus{--tw-ring-color:var(--color-yellow-600)}.dark\:focus-visible\:ring-gray-500:is(.dark *):focus-visible{--tw-ring-color:var(--color-gray-500)}.dark\:focus-visible\:ring-offset-gray-900:is(.dark *):focus-visible{--tw-ring-offset-color:var(--color-gray-900)}.dark\:disabled\:text-gray-500:is(.dark *):disabled{color:var(--color-gray-500)}.data-\[state\=completed\]\:dark\:bg-blue-900[data-state=completed]:is(.dark *){background-color:var(--color-blue-900)}.data-\[state\=completed\]\:dark\:bg-gray-500[data-state=completed]:is(.dark *){background-color:var(--color-gray-500)}.data-\[state\=completed\]\:dark\:bg-green-900[data-state=completed]:is(.dark *){background-color:var(--color-green-900)}.data-\[state\=completed\]\:dark\:bg-indigo-900[data-state=completed]:is(.dark *){background-color:var(--color-indigo-900)}.data-\[state\=completed\]\:dark\:bg-pink-900[data-state=completed]:is(.dark *){background-color:var(--color-pink-900)}.data-\[state\=completed\]\:dark\:bg-primary-900[data-state=completed]:is(.dark *){background-color:#a5371b}.data-\[state\=completed\]\:dark\:bg-purple-900[data-state=completed]:is(.dark *){background-color:var(--color-purple-900)}.data-\[state\=completed\]\:dark\:bg-red-900[data-state=completed]:is(.dark *){background-color:var(--color-red-900)}.data-\[state\=completed\]\:dark\:bg-yellow-600[data-state=completed]:is(.dark *){background-color:var(--color-yellow-600)}.data-\[state\=current\]\:dark\:bg-blue-400[data-state=current]:is(.dark *){background-color:var(--color-blue-400)}.data-\[state\=current\]\:dark\:bg-gray-200[data-state=current]:is(.dark *){background-color:var(--color-gray-200)}.data-\[state\=current\]\:dark\:bg-green-400[data-state=current]:is(.dark *){background-color:var(--color-green-400)}.data-\[state\=current\]\:dark\:bg-indigo-400[data-state=current]:is(.dark *){background-color:var(--color-indigo-400)}.data-\[state\=current\]\:dark\:bg-pink-400[data-state=current]:is(.dark *){background-color:var(--color-pink-400)}.data-\[state\=current\]\:dark\:bg-primary-400[data-state=current]:is(.dark *){background-color:#ffbcad}.data-\[state\=current\]\:dark\:bg-purple-400[data-state=current]:is(.dark *){background-color:var(--color-purple-400)}.data-\[state\=current\]\:dark\:bg-red-500[data-state=current]:is(.dark *){background-color:var(--color-red-500)}.data-\[state\=current\]\:dark\:bg-yellow-400[data-state=current]:is(.dark *){background-color:var(--color-yellow-400)}@media(min-width:40rem){.dark\:sm\:bg-inherit:is(.dark *){background-color:inherit}.sm\:dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:sm\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.sm\:dark\:text-white:is(.dark *){color:var(--color-white)}@media(hover:hover){.sm\:dark\:hover\:bg-transparent:is(.dark *):hover{background-color:#0000}.sm\:dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}}}@media(min-width:48rem){.dark\:md\:bg-inherit:is(.dark *){background-color:inherit}.md\:dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:md\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.md\:dark\:text-white:is(.dark *){color:var(--color-white)}@media(hover:hover){.md\:dark\:hover\:bg-transparent:is(.dark *):hover{background-color:#0000}.md\:dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}}}@media(min-width:64rem){.dark\:lg\:bg-inherit:is(.dark *){background-color:inherit}.lg\:dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:lg\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.lg\:dark\:text-white:is(.dark *){color:var(--color-white)}@media(hover:hover){.lg\:dark\:hover\:bg-transparent:is(.dark *):hover{background-color:#0000}.lg\:dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}}}@media(min-width:80rem){.dark\:xl\:bg-inherit:is(.dark *){background-color:inherit}.xl\:dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:xl\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.xl\:dark\:text-white:is(.dark *){color:var(--color-white)}@media(hover:hover){.xl\:dark\:hover\:bg-transparent:is(.dark *):hover{background-color:#0000}.xl\:dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}}}@media(hover:hover){.\[\&_tbody_tr\]\:hover\:bg-gray-50 tbody tr:hover{background-color:var(--color-gray-50)}.\[\&_tbody_tr\]\:dark\:hover\:bg-gray-600 tbody tr:is(.dark *):hover{background-color:var(--color-gray-600)}}.\[\&_tbody_tr\:nth-child\(even\)\]\:bg-gray-50 tbody tr:nth-child(2n){background-color:var(--color-gray-50)}.\[\&_tbody_tr\:nth-child\(even\)\]\:dark\:bg-gray-800 tbody tr:nth-child(2n):is(.dark *){background-color:var(--color-gray-800)}.\[\&_tbody_tr\:nth-child\(odd\)\]\:bg-white tbody tr:nth-child(odd){background-color:var(--color-white)}.\[\&_tbody_tr\:nth-child\(odd\)\]\:dark\:bg-gray-900 tbody tr:nth-child(odd):is(.dark *){background-color:var(--color-gray-900)}.\[\&\:not\(\:first-child\)\]\:rounded-s-none:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.\[\&\:not\(\:last-child\)\]\:rounded-e-none:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.\[\&\:not\(\:last-child\)\]\:border-e-0:not(:last-child){border-inline-end-style:var(--tw-border-style);border-inline-end-width:0}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}div.svelte-clyidt{position:relative;width:100%;height:100%}canvas.svelte-clyidt{display:block;position:relative;width:100%;height:100%}.clip{clip-path:polygon(0 0,0% 100%,100% 100%,100% 85%,15% 0)}body{background-color:#f3f4f6}.canvasContainer.svelte-1n46o8q{width:100%;height:calc(100vh - 120px)} diff --git a/docs/assets/index-CoSc5MWZ.js b/docs/assets/index-CoSc5MWZ.js new file mode 100644 index 0000000..9e00465 --- /dev/null +++ b/docs/assets/index-CoSc5MWZ.js @@ -0,0 +1,4721 @@ +(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();const zf=!1;var Up=Array.isArray,u2=Array.prototype.indexOf,_0=Array.from,Zb=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,h2=Object.getOwnPropertyDescriptors,f2=Object.prototype,p2=Array.prototype,$b=Object.getPrototypeOf,ig=Object.isExtensible;function So(r){return typeof r=="function"}const zt=()=>{};function jb(r){for(var e=0;e{r=n,e=i});return{promise:t,resolve:r,reject:e}}const vn=2,Fp=4,w0=8,Jb=1<<24,hi=16,Zi=32,Da=64,S0=128,Wr=512,En=1024,nr=2048,$i=4096,fr=8192,qi=16384,M0=32768,li=65536,sg=1<<17,Qb=1<<18,Xo=1<<19,e1=1<<20,ms=1<<25,va=32768,Vf=1<<21,Op=1<<22,_s=1<<23,ws=Symbol("$state"),t1=Symbol("legacy props"),m2=Symbol(""),Mo=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function qp(r){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function g2(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function x2(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function b2(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function y2(r){throw new Error("https://svelte.dev/e/effect_orphan")}function v2(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function _2(r){throw new Error("https://svelte.dev/e/props_invalid_value")}function w2(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function S2(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function M2(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function T2(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const A2=1,k2=2,E2=16,C2=1,R2=4,I2=8,P2=16,D2=4,n1=1,L2=2,mn=Symbol(),N2="http://www.w3.org/1999/xhtml",U2="http://www.w3.org/2000/svg",F2="@attach";function O2(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function q2(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function r1(r){return r===this.v}function i1(r,e){return r!=r?e==e:r!==e||r!==null&&typeof r=="object"||typeof r=="function"}function s1(r){return!i1(r,this.v)}let B2=!1,xn=null;function Io(r){xn=r}function sn(r){return o1().get(r)}function zn(r,e){return o1().set(r,e),e}function _n(r,e=!1,t){xn={p:xn,i:!1,c:null,e:null,s:r,x:null,l:null}}function wn(r){var e=xn,t=e.e;if(t!==null){e.e=null;for(var n of t)k1(n)}return e.i=!0,xn=e.p,{}}function a1(){return!0}function o1(r){return xn===null&&qp(),xn.c??=new Map(z2(xn)||void 0)}function z2(r){let e=r.p;for(;e!==null;){const t=e.c;if(t!==null)return t;e=e.p}return null}let aa=[];function l1(){var r=aa;aa=[],jb(r)}function La(r){if(aa.length===0&&!Bl){var e=aa;queueMicrotask(()=>{e===aa&&l1()})}aa.push(r)}function V2(){for(;aa.length>0;)l1()}function c1(r){var e=_t;if(e===null)return bt.f|=_s,r;if((e.f&M0)===0){if((e.f&S0)===0)throw r;e.b.error(r)}else Po(r,e)}function Po(r,e){for(;e!==null;){if((e.f&S0)!==0)try{e.b.error(r);return}catch(t){r=t}e=e.parent}throw r}const zc=new Set;let Ct=null,uu=null,Ar=null,Sr=[],T0=null,Gf=!1,Bl=!1;class ti{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#l=null;#s=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#n>0}process(e){Sr=[],uu=null,this.apply();var t={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of e)this.#a(n,t);this.is_fork||this.#d(),this.is_deferred()?(this.#o(t.effects),this.#o(t.render_effects),this.#o(t.block_effects)):(uu=this,Ct=null,ag(t.render_effects),ag(t.effects),uu=null,this.#l?.resolve()),Ar=null}#a(e,t){e.f^=En;for(var n=e.first;n!==null;){var i=n.f,s=(i&(Zi|Da))!==0,a=s&&(i&En)!==0,o=a||(i&fr)!==0||this.skipped_effects.has(n);if((n.f&S0)!==0&&n.b?.is_pending()&&(t={parent:t,effect:n,effects:[],render_effects:[],block_effects:[]}),!o&&n.fn!==null){s?n.f^=En:(i&Fp)!==0?t.effects.push(n):Ec(n)&&((n.f&hi)!==0&&t.block_effects.push(n),ic(n));var l=n.first;if(l!==null){n=l;continue}}var c=n.parent;for(n=n.next;n===null&&c!==null;)c===t.effect&&(this.#o(t.effects),this.#o(t.render_effects),this.#o(t.block_effects),t=t.parent),n=c.next,c=c.parent}}#o(e){for(const t of e)((t.f&nr)!==0?this.#s:this.#i).push(t),this.#c(t.deps),Cn(t,En)}#c(e){if(e!==null)for(const t of e)(t.f&vn)===0||(t.f&va)===0||(t.f^=va,this.#c(t.deps))}capture(e,t){this.previous.has(e)||this.previous.set(e,t),(e.f&_s)===0&&(this.current.set(e,e.v),Ar?.set(e,e.v))}activate(){Ct=this,this.apply()}deactivate(){Ct===this&&(Ct=null,Ar=null)}flush(){if(this.activate(),Sr.length>0){if(d1(),Ct!==null&&Ct!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#d(){if(this.#n===0){for(const e of this.#e)e();this.#e.clear()}this.#r===0&&this.#u()}#u(){if(zc.size>1){this.previous.clear();var e=Ar,t=!0,n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const s of zc){if(s===this){t=!1;continue}const a=[];for(const[l,c]of this.current){if(s.current.has(l))if(t&&c!==s.current.get(l))s.current.set(l,c);else continue;a.push(l)}if(a.length===0)continue;const o=[...s.current.keys()].filter(l=>!this.current.has(l));if(o.length>0){var i=Sr;Sr=[];const l=new Set,c=new Map;for(const d of a)u1(d,o,l,c);if(Sr.length>0){Ct=s,s.apply();for(const d of Sr)s.#a(d,n);s.deactivate()}Sr=i}}Ct=null,Ar=e}this.committed=!0,zc.delete(this)}increment(e){this.#r+=1,e&&(this.#n+=1)}decrement(e){this.#r-=1,e&&(this.#n-=1),this.revive()}revive(){for(const e of this.#s)Cn(e,nr),_a(e);for(const e of this.#i)Cn(e,$i),_a(e);this.#s=[],this.#i=[],this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#l??=Kb()).promise}static ensure(){if(Ct===null){const e=Ct=new ti;zc.add(Ct),Bl||ti.enqueue(()=>{Ct===e&&e.flush()})}return Ct}static enqueue(e){La(e)}apply(){}}function G2(r){var e=Bl;Bl=!0;try{for(var t;;){if(V2(),Sr.length===0&&(Ct?.flush(),Sr.length===0))return T0=null,t;d1()}}finally{Bl=e}}function d1(){var r=ha;Gf=!0;var e=null;try{var t=0;for(_u(!0);Sr.length>0;){var n=ti.ensure();if(t++>1e3){var i,s;H2()}n.process(Sr),Ss.clear()}}finally{Gf=!1,_u(r),T0=null}}function H2(){try{v2()}catch(r){Po(r,T0)}}let Ci=null;function ag(r){var e=r.length;if(e!==0){for(var t=0;t0)){Ss.clear();for(const i of Ci){if((i.f&(qi|fr))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Ci.has(a)&&(Ci.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&(qi|fr))===0&&ic(l)}}Ci.clear()}}Ci=null}}function u1(r,e,t,n){if(!t.has(r)&&(t.add(r),r.reactions!==null))for(const i of r.reactions){const s=i.f;(s&vn)!==0?u1(i,e,t,n):(s&(Op|hi))!==0&&(s&nr)===0&&h1(i,e,n)&&(Cn(i,nr),_a(i))}}function h1(r,e,t){const n=t.get(r);if(n!==void 0)return n;if(r.deps!==null)for(const i of r.deps){if(e.includes(i))return!0;if((i.f&vn)!==0&&h1(i,e,t))return t.set(i,!0),!0}return t.set(r,!1),!1}function _a(r){for(var e=T0=r;e.parent!==null;){e=e.parent;var t=e.f;if(Gf&&e===_t&&(t&hi)!==0&&(t&Qb)===0)return;if((t&(Da|Zi))!==0){if((t&En)===0)return;e.f^=En}}Sr.push(e)}function Bp(r){let e=0,t=wa(0),n;return()=>{Lo()&&(X(t),Vp(()=>(e===0&&(n=fi(()=>r(()=>zl(t)))),e+=1,()=>{La(()=>{e-=1,e===0&&(n?.(),n=void 0,zl(t))})})))}}var W2=li|Xo|S0;function X2(r,e,t){new Y2(r,e,t)}class Y2{parent;#e=!1;#t;#r=null;#n;#l;#s;#i=null;#a=null;#o=null;#c=null;#d=null;#u=0;#h=0;#p=!1;#f=null;#y=Bp(()=>(this.#f=wa(this.#u),()=>{this.#f=null}));constructor(e,t,n){this.#t=e,this.#n=t,this.#l=n,this.parent=_t.b,this.#e=!!this.#n.pending,this.#s=Na(()=>{_t.b=this;{var i=this.#x();try{this.#i=jn(()=>n(i))}catch(s){this.error(s)}this.#h>0?this.#g():this.#e=!1}return()=>{this.#d?.remove()}},W2)}#v(){try{this.#i=jn(()=>this.#l(this.#t))}catch(e){this.error(e)}this.#e=!1}#_(){const e=this.#n.pending;e&&(this.#a=jn(()=>e(this.#t)),ti.enqueue(()=>{var t=this.#x();this.#i=this.#m(()=>(ti.ensure(),jn(()=>this.#l(t)))),this.#h>0?this.#g():(ua(this.#a,()=>{this.#a=null}),this.#e=!1)}))}#x(){var e=this.#t;return this.#e&&(this.#d=Gi(),this.#t.before(this.#d),e=this.#d),e}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#m(e){var t=_t,n=bt,i=xn;ci(this.#s),Qn(this.#s),Io(this.#s.ctx);try{return e()}catch(s){return c1(s),null}finally{ci(t),Qn(n),Io(i)}}#g(){const e=this.#n.pending;this.#i!==null&&(this.#c=document.createDocumentFragment(),this.#c.append(this.#d),L1(this.#i,this.#c)),this.#a===null&&(this.#a=jn(()=>e(this.#t)))}#b(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e);return}this.#h+=e,this.#h===0&&(this.#e=!1,this.#a&&ua(this.#a,()=>{this.#a=null}),this.#c&&(this.#t.before(this.#c),this.#c=null))}update_pending_count(e){this.#b(e),this.#u+=e,this.#f&&Do(this.#f,this.#u)}get_effect_pending(){return this.#y(),X(this.#f)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(this.#p||!t&&!n)throw e;this.#i&&(bn(this.#i),this.#i=null),this.#a&&(bn(this.#a),this.#a=null),this.#o&&(bn(this.#o),this.#o=null);var i=!1,s=!1;const a=()=>{if(i){q2();return}i=!0,s&&T2(),ti.ensure(),this.#u=0,this.#o!==null&&ua(this.#o,()=>{this.#o=null}),this.#e=this.has_pending_snippet(),this.#i=this.#m(()=>(this.#p=!1,jn(()=>this.#l(this.#t)))),this.#h>0?this.#g():this.#e=!1};var o=bt;try{Qn(null),s=!0,t?.(e,a),s=!1}catch(l){Po(l,this.#s&&this.#s.parent)}finally{Qn(o)}n&&La(()=>{this.#o=this.#m(()=>{ti.ensure(),this.#p=!0;try{return jn(()=>{n(this.#t,()=>e,()=>a)})}catch(l){return Po(l,this.#s.parent),null}finally{this.#p=!1}})})}}function f1(r,e,t,n){const i=A0;if(t.length===0&&r.length===0){n(e.map(i));return}var s=Ct,a=_t,o=Z2();function l(){Promise.all(t.map(c=>$2(c))).then(c=>{o();try{n([...e.map(i),...c])}catch(d){(a.f&qi)===0&&Po(d,a)}s?.deactivate(),vu()}).catch(c=>{Po(c,a)})}r.length>0?Promise.all(r).then(()=>{o();try{return l()}finally{s?.deactivate(),vu()}}):l()}function Z2(){var r=_t,e=bt,t=xn,n=Ct;return function(s=!0){ci(r),Qn(e),Io(t),s&&n?.activate()}}function vu(){ci(null),Qn(null),Io(null)}function A0(r){var e=vn|nr,t=bt!==null&&(bt.f&vn)!==0?bt:null;return _t!==null&&(_t.f|=Xo),{ctx:xn,deps:null,effects:null,equals:r1,f:e,fn:r,reactions:null,rv:0,v:mn,wv:0,parent:t??_t,ac:null}}function $2(r,e){let t=_t;t===null&&g2();var n=t.b,i=void 0,s=wa(mn),a=!bt,o=new Map;return s_(()=>{var l=Kb();i=l.promise;try{Promise.resolve(r()).then(l.resolve,l.reject).then(()=>{c===Ct&&c.committed&&c.deactivate(),vu()})}catch(h){l.reject(h),vu()}var c=Ct;if(a){var d=!n.is_pending();n.update_pending_count(1),c.increment(d),o.get(c)?.reject(Mo),o.delete(c),o.set(c,l)}const u=(h,f=void 0)=>{if(c.activate(),f)f!==Mo&&(s.f|=_s,Do(s,f));else{(s.f&_s)!==0&&(s.f^=_s),Do(s,h);for(const[m,x]of o){if(o.delete(m),m===c)break;x.reject(Mo)}}a&&(n.update_pending_count(-1),c.decrement(d))};l.promise.then(u,h=>u(null,h||"unknown"))}),Ac(()=>{for(const l of o.values())l.reject(Mo)}),new Promise(l=>{function c(d){function u(){d===i?l(s):c(i)}d.then(u,u)}c(i)})}function Ye(r){const e=A0(r);return N1(e),e}function p1(r){const e=A0(r);return e.equals=s1,e}function m1(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t0&&!x1&&K2()}return e}function K2(){x1=!1;var r=ha;_u(!0);const e=Array.from(Hf);try{for(const t of e)(t.f&En)!==0&&Cn(t,$i),Ec(t)&&ic(t)}finally{_u(r)}Hf.clear()}function zl(r){It(r,r.v+1)}function y1(r,e){var t=r.reactions;if(t!==null)for(var n=t.length,i=0;i{if(fa===s)return o();var l=bt,c=fa;Qn(null),ug(s);var d=o();return Qn(l),ug(c),d};return n&&t.set("length",Ut(r.length)),new Proxy(r,{defineProperty(o,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&w2();var d=t.get(l);return d===void 0?d=a(()=>{var u=Ut(c.value);return t.set(l,u),u}):It(d,c.value,!0),!0},deleteProperty(o,l){var c=t.get(l);if(c===void 0){if(l in o){const d=a(()=>Ut(mn));t.set(l,d),zl(i)}}else It(c,mn),zl(i);return!0},get(o,l,c){if(l===ws)return r;var d=t.get(l),u=l in o;if(d===void 0&&(!u||vs(o,l)?.writable)&&(d=a(()=>{var f=Oi(u?o[l]:mn),m=Ut(f);return m}),t.set(l,d)),d!==void 0){var h=X(d);return h===mn?void 0:h}return Reflect.get(o,l,c)},getOwnPropertyDescriptor(o,l){var c=Reflect.getOwnPropertyDescriptor(o,l);if(c&&"value"in c){var d=t.get(l);d&&(c.value=X(d))}else if(c===void 0){var u=t.get(l),h=u?.v;if(u!==void 0&&h!==mn)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(o,l){if(l===ws)return!0;var c=t.get(l),d=c!==void 0&&c.v!==mn||Reflect.has(o,l);if(c!==void 0||_t!==null&&(!d||vs(o,l)?.writable)){c===void 0&&(c=a(()=>{var h=d?Oi(o[l]):mn,f=Ut(h);return f}),t.set(l,c));var u=X(c);if(u===mn)return!1}return d},set(o,l,c,d){var u=t.get(l),h=l in o;if(n&&l==="length")for(var f=c;fUt(mn)),t.set(f+"",m))}if(u===void 0)(!h||vs(o,l)?.writable)&&(u=a(()=>Ut(void 0)),It(u,Oi(c)),t.set(l,u));else{h=u.v!==mn;var x=a(()=>Oi(c));It(u,x)}var g=Reflect.getOwnPropertyDescriptor(o,l);if(g?.set&&g.set.call(d,c),!h){if(n&&typeof l=="string"){var p=t.get("length"),v=Number(l);Number.isInteger(v)&&v>=p.v&&It(p,v+1)}zl(i)}return!0},ownKeys(o){X(i);var l=Reflect.ownKeys(o).filter(u=>{var h=t.get(u);return h===void 0||h.v!==mn});for(var[c,d]of t)d.v!==mn&&!(c in o)&&l.push(c);return l},setPrototypeOf(){S2()}})}function og(r){try{if(r!==null&&typeof r=="object"&&ws in r)return r[ws]}catch{}return r}function J2(r,e){return Object.is(og(r),og(e))}var lg,v1,_1,w1,S1;function Q2(){if(lg===void 0){lg=window,v1=document,_1=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;w1=vs(e,"firstChild").get,S1=vs(e,"nextSibling").get,ig(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),ig(t)&&(t.__t=void 0)}}function Gi(r=""){return document.createTextNode(r)}function Li(r){return w1.call(r)}function Tc(r){return S1.call(r)}function Pt(r,e){return Li(r)}function yt(r,e=!1){{var t=Li(r);return t instanceof Comment&&t.data===""?Tc(t):t}}function Ft(r,e=1,t=!1){let n=r;for(;e--;)n=Tc(n);return n}function e_(r){r.textContent=""}function M1(){return!1}function t_(r,e){if(e){const t=document.body;r.autofocus=!0,La(()=>{document.activeElement===t&&r.focus()})}}let cg=!1;function n_(){cg||(cg=!0,document.addEventListener("reset",r=>{Promise.resolve().then(()=>{if(!r.defaultPrevented)for(const e of r.target.elements)e.__on_r?.()})},{capture:!0}))}function Yo(r){var e=bt,t=_t;Qn(null),ci(null);try{return r()}finally{Qn(e),ci(t)}}function T1(r,e,t,n=t){r.addEventListener(e,()=>Yo(t));const i=r.__on_r;i?r.__on_r=()=>{i(),n(!0)}:r.__on_r=()=>n(!0),n_()}function A1(r){_t===null&&(bt===null&&y2(),b2()),Ua&&x2()}function r_(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function Zr(r,e,t){var n=_t;n!==null&&(n.f&fr)!==0&&(r|=fr);var i={ctx:xn,deps:null,nodes:null,f:r|nr|Wr,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(t)try{ic(i),i.f|=M0}catch(o){throw bn(i),o}else e!==null&&_a(i);var s=i;if(t&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&Xo)===0&&(s=s.first,(r&hi)!==0&&(r&li)!==0&&s!==null&&(s.f|=li)),s!==null&&(s.parent=n,n!==null&&r_(s,n),bt!==null&&(bt.f&vn)!==0&&(r&Da)===0)){var a=bt;(a.effects??=[]).push(s)}return i}function Lo(){return bt!==null&&!ni}function Ac(r){const e=Zr(w0,null,!1);return Cn(e,En),e.teardown=r,e}function Hi(r){A1();var e=_t.f,t=!bt&&(e&Zi)!==0&&(e&M0)===0;if(t){var n=xn;(n.e??=[]).push(r)}else return k1(r)}function k1(r){return Zr(Fp|e1,r,!1)}function gn(r){return A1(),Zr(w0|e1,r,!0)}function i_(r){ti.ensure();const e=Zr(Da|Xo,r,!0);return(t={})=>new Promise(n=>{t.outro?ua(e,()=>{bn(e),n(void 0)}):(bn(e),n(void 0))})}function kc(r){return Zr(Fp,r,!1)}function s_(r){return Zr(Op|Xo,r,!0)}function Vp(r,e=0){return Zr(w0|e,r,!0)}function dr(r,e=[],t=[],n=[]){f1(n,e,t,i=>{Zr(w0,()=>r(...i.map(X)),!0)})}function Na(r,e=0){var t=Zr(hi|e,r,!0);return t}function E1(r,e=0){var t=Zr(Jb|e,r,!0);return t}function jn(r){return Zr(Zi|Xo,r,!0)}function C1(r){var e=r.teardown;if(e!==null){const t=Ua,n=bt;dg(!0),Qn(null);try{e.call(null)}finally{dg(t),Qn(n)}}}function R1(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){const i=t.ac;i!==null&&Yo(()=>{i.abort(Mo)});var n=t.next;(t.f&Da)!==0?t.parent=null:bn(t,e),t=n}}function a_(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&Zi)===0&&bn(e),e=t}}function bn(r,e=!0){var t=!1;(e||(r.f&Qb)!==0)&&r.nodes!==null&&r.nodes.end!==null&&(o_(r.nodes.start,r.nodes.end),t=!0),R1(r,e&&!t),wu(r,0),Cn(r,qi);var n=r.nodes&&r.nodes.t;if(n!==null)for(const s of n)s.stop();C1(r);var i=r.parent;i!==null&&i.first!==null&&I1(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes=r.ac=null}function o_(r,e){for(;r!==null;){var t=r===e?null:Tc(r);r.remove(),r=t}}function I1(r){var e=r.parent,t=r.prev,n=r.next;t!==null&&(t.next=n),n!==null&&(n.prev=t),e!==null&&(e.first===r&&(e.first=n),e.last===r&&(e.last=t))}function ua(r,e,t=!0){var n=[];P1(r,n,!0);var i=()=>{t&&bn(r),e&&e()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function P1(r,e,t){if((r.f&fr)===0){r.f^=fr;var n=r.nodes&&r.nodes.t;if(n!==null)for(const o of n)(o.is_global||t)&&e.push(o);for(var i=r.first;i!==null;){var s=i.next,a=(i.f&li)!==0||(i.f&Zi)!==0&&(r.f&hi)!==0;P1(i,e,a?t:!1),i=s}}}function Gp(r){D1(r,!0)}function D1(r,e){if((r.f&fr)!==0){r.f^=fr,(r.f&En)===0&&(Cn(r,nr),_a(r));for(var t=r.first;t!==null;){var n=t.next,i=(t.f&li)!==0||(t.f&Zi)!==0;D1(t,i?e:!1),t=n}var s=r.nodes&&r.nodes.t;if(s!==null)for(const a of s)(a.is_global||e)&&a.in()}}function L1(r,e){if(r.nodes)for(var t=r.nodes.start,n=r.nodes.end;t!==null;){var i=t===n?null:Tc(t);e.append(t),t=i}}let ha=!1;function _u(r){ha=r}let Ua=!1;function dg(r){Ua=r}let bt=null,ni=!1;function Qn(r){bt=r}let _t=null;function ci(r){_t=r}let Bi=null;function N1(r){bt!==null&&(Bi===null?Bi=[r]:Bi.push(r))}let Fn=null,cr=0,_r=null;function l_(r){_r=r}let U1=1,rc=0,fa=rc;function ug(r){fa=r}function F1(){return++U1}function Ec(r){var e=r.f;if((e&nr)!==0)return!0;if(e&vn&&(r.f&=~va),(e&$i)!==0){var t=r.deps;if(t!==null)for(var n=t.length,i=0;ir.wv)return!0}(e&Wr)!==0&&Ar===null&&Cn(r,En)}return!1}function O1(r,e,t=!0){var n=r.reactions;if(n!==null&&!Bi?.includes(r))for(var i=0;i{r.ac.abort(Mo)}),r.ac=null);try{r.f|=Vf;var d=r.fn,u=d(),h=r.deps;if(Fn!==null){var f;if(wu(r,cr),h!==null&&cr>0)for(h.length=cr+Fn.length,f=0;ft?.call(this,s))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?La(()=>{e.addEventListener(r,i,n)}):e.addEventListener(r,i,n),i}function y_(r,e,t,n={}){var i=Hp(e,r,t,n);return()=>{r.removeEventListener(e,i,n)}}function v_(r,e,t,n,i){var s={capture:n,passive:i},a=Hp(r,e,t,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Ac(()=>{e.removeEventListener(r,a,s)})}function Nt(r){for(var e=0;e{throw g});throw h}}finally{r.__root=e,delete r.currentTarget,Qn(d),ci(u)}}}function G1(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("",""),e.content}function Sa(r,e){var t=_t;t.nodes===null&&(t.nodes={start:r,end:e,a:null,t:null})}function Ht(r,e){var t=(e&n1)!==0,n=(e&L2)!==0,i,s=!r.startsWith("");return()=>{i===void 0&&(i=G1(s?r:""+r),t||(i=Li(i)));var a=n||_1?document.importNode(i,!0):i.cloneNode(!0);if(t){var o=Li(a),l=a.lastChild;Sa(o,l)}else Sa(a,a);return a}}function __(r,e,t="svg"){var n=!r.startsWith(""),i=(e&n1)!==0,s=`<${t}>${n?r:""+r}`,a;return()=>{if(!a){var o=G1(s),l=Li(o);if(i)for(a=document.createDocumentFragment();Li(l);)a.appendChild(Li(l));else a=Li(l)}var c=a.cloneNode(!0);if(i){var d=Li(c),u=c.lastChild;Sa(d,u)}else Sa(c,c);return c}}function Fa(r,e){return __(r,e,"svg")}function gh(r=""){{var e=Gi(r+"");return Sa(e,e),e}}function Rt(){var r=document.createDocumentFragment(),e=document.createComment(""),t=Gi();return r.append(e,t),Sa(e,t),r}function We(r,e){r!==null&&r.before(e)}let Su=!0;function Vc(r){Su=r}function pa(r,e){var t=e==null?"":typeof e=="object"?e+"":e;t!==(r.__t??=r.nodeValue)&&(r.__t=t,r.nodeValue=t+"")}function w_(r,e){return S_(r,e)}const Ha=new Map;function S_(r,{target:e,anchor:t,props:n={},events:i,context:s,intro:a=!0}){Q2();var o=new Set,l=u=>{for(var h=0;h{var u=t??e.appendChild(Gi());return X2(u,{pending:()=>{}},h=>{if(s){_n({});var f=xn;f.c=s}i&&(n.$$events=i),Su=a,c=r(h,n)||{},Su=!0,s&&wn()}),()=>{for(var h of o){e.removeEventListener(h,Pl);var f=Ha.get(h);--f===0?(document.removeEventListener(h,Pl),Ha.delete(h)):Ha.set(h,f)}Wf.delete(l),u!==t&&u.parentNode?.removeChild(u)}});return M_.set(c,d),c}let M_=new WeakMap;class Cc{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#l=!0;constructor(e,t=!0){this.anchor=e,this.#l=t}#s=()=>{var e=Ct;if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Gp(n),this.#n.delete(t);else{var i=this.#r.get(t);i&&(this.#t.set(t,i.effect),this.#r.delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===e)break;const o=this.#r.get(a);o&&(bn(o.effect),this.#r.delete(a))}for(const[s,a]of this.#t){if(s===t||this.#n.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var c=document.createDocumentFragment();L1(a,c),c.append(Gi()),this.#r.set(s,{effect:a,fragment:c})}else bn(a);this.#n.delete(s),this.#t.delete(s)};this.#l||!n?(this.#n.add(s),ua(a,o,!1)):o()}}};#i=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[n,i]of this.#r)t.includes(n)||(bn(i.effect),this.#r.delete(n))};ensure(e,t){var n=Ct,i=M1();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(i){var s=document.createDocumentFragment(),a=Gi();s.append(a),this.#r.set(e,{effect:jn(()=>t(a)),fragment:s})}else this.#t.set(e,jn(()=>t(this.anchor)));if(this.#e.set(n,e),i){for(const[o,l]of this.#t)o===e?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[o,l]of this.#r)o===e?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#s),n.ondiscard(this.#i)}else this.#s()}}function Ot(r,e,t=!1){var n=new Cc(r),i=t?li:0;function s(a,o){n.ensure(a,o)}Na(()=>{var a=!1;e((o,l=!0)=>{a=!0,s(l,o)}),a||s(!1,null)},i)}function T_(r,e,t){var n=new Cc(r);Na(()=>{var i=e();n.ensure(i,t)})}function A_(r,e,t){for(var n=[],i=e.length,s,a=e.length,o=0;o{if(s){if(s.pending.delete(u),s.done.add(u),s.pending.size===0){var h=r.outrogroups;Xf(_0(s.done)),h.delete(s),h.size===0&&(r.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=n.length===0&&t!==null;if(l){var c=t,d=c.parentNode;e_(d),d.append(c),r.items.clear()}Xf(e,!l)}else s={pending:new Set(e),done:new Set},(r.outrogroups??=new Set).add(s)}function Xf(r,e=!0){for(var t=0;t{var x=t();return Up(x)?x:x==null?[]:_0(x)}),d,u=!0;function h(){m.fallback=l,E_(m,d,a,e,n),l!==null&&(d.length===0?(l.f&ms)===0?Gp(l):(l.f^=ms,Dl(l,null,a)):ua(l,()=>{l=null}))}var f=Na(()=>{d=X(c);for(var x=d.length,g=new Set,p=Ct,v=M1(),b=0;bs(a)):(l=jn(()=>s(fg??=Gi())),l.f|=ms)),!u)if(v){for(const[T,A]of o)g.has(T)||p.skipped_effects.add(A.e);p.oncommit(h),p.ondiscard(()=>{})}else h();X(c)}),m={effect:f,items:o,outrogroups:null,fallback:l};u=!1}function E_(r,e,t,n,i){var s=e.length,a=r.items,o=r.effect.first,l,c=null,d=[],u=[],h,f,m,x;for(x=0;x0){var T=null;A_(r,_,T)}}}function C_(r,e,t,n,i,s,a,o){var l=(a&A2)!==0?(a&E2)===0?b1(t,!1,!1):wa(t):null,c=(a&k2)!==0?wa(i):null;return{v:l,i:c,e:jn(()=>(s(e,l??t,c??i,o),()=>{r.delete(n)}))}}function Dl(r,e,t){if(r.nodes)for(var n=r.nodes.start,i=r.nodes.end,s=e&&(e.f&ms)===0?e.nodes.start:t;n!==null;){var a=Tc(n);if(s.before(n),n===i)return;n=a}}function Qi(r,e,t){e===null?r.effect.first=t:e.next=t,t===null?r.effect.last=e:t.prev=e}function ln(r,e,...t){var n=new Cc(r);Na(()=>{const i=e()??null;n.ensure(i,i&&(s=>i(s,...t)))},li)}function Ds(r,e,t){var n=new Cc(r);Na(()=>{var i=e()??null;n.ensure(i,i&&(s=>t(s,i)))},li)}const R_=()=>performance.now(),Ni={tick:r=>requestAnimationFrame(r),now:()=>R_(),tasks:new Set};function H1(){const r=Ni.now();Ni.tasks.forEach(e=>{e.c(r)||(Ni.tasks.delete(e),e.f())}),Ni.tasks.size!==0&&Ni.tick(H1)}function I_(r){let e;return Ni.tasks.size===0&&Ni.tick(H1),{promise:new Promise(t=>{Ni.tasks.add(e={c:r,f:t})}),abort(){Ni.tasks.delete(e)}}}function Gc(r,e){Yo(()=>{r.dispatchEvent(new CustomEvent(e))})}function P_(r){if(r==="float")return"cssFloat";if(r==="offset")return"cssOffset";if(r.startsWith("--"))return r;const e=r.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function pg(r){const e={},t=r.split(";");for(const n of t){const[i,s]=n.split(":");if(!i||s===void 0)break;const a=P_(i.trim());e[a]=s.trim()}return e}const D_=r=>r;function L_(r,e,t,n){var i=(r&D2)!==0,s="both",a,o=e.inert,l=e.style.overflow,c,d;function u(){return Yo(()=>a??=t()(e,n?.()??{},{direction:s}))}var h={is_global:i,in(){e.inert=o,Gc(e,"introstart"),c=Yf(e,u(),d,1,()=>{Gc(e,"introend"),c?.abort(),c=a=void 0,e.style.overflow=l})},out(g){e.inert=!0,Gc(e,"outrostart"),d=Yf(e,u(),c,0,()=>{Gc(e,"outroend"),g?.()})},stop:()=>{c?.abort(),d?.abort()}},f=_t;if((f.nodes.t??=[]).push(h),Su){var m=i;if(!m){for(var x=f.parent;x&&(x.f&li)!==0;)for(;(x=x.parent)&&(x.f&hi)===0;);m=!x||(x.f&M0)!==0}m&&kc(()=>{fi(()=>h.in())})}}function Yf(r,e,t,n,i){var s=n===1;if(So(e)){var a,o=!1;return La(()=>{if(!o){var g=e({direction:s?"in":"out"});a=Yf(r,g,t,n,i)}}),{abort:()=>{o=!0,a?.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(t?.deactivate(),!e?.duration)return i(),{abort:zt,deactivate:zt,reset:zt,t:()=>n};const{delay:l=0,css:c,tick:d,easing:u=D_}=e;var h=[];if(s&&t===void 0&&(d&&d(0,1),c)){var f=pg(c(0,1));h.push(f,f)}var m=()=>1-n,x=r.animate(h,{duration:l,fill:"forwards"});return x.onfinish=()=>{x.cancel();var g=t?.t()??1-n;t?.abort();var p=n-g,v=e.duration*Math.abs(p),b=[];if(v>0){var y=!1;if(c)for(var _=Math.ceil(v/16.666666666666668),w=0;w<=_;w+=1){var T=g+p*u(w/_),A=pg(c(T,1-T));b.push(A),y||=A.overflow==="hidden"}y&&(r.style.overflow="hidden"),m=()=>{var M=x.currentTime;return g+p*u(M/v)},d&&I_(()=>{if(x.playState!=="running")return!1;var M=m();return d(M,1-M),!0})}x=r.animate(b,{duration:v,fill:"forwards"}),x.onfinish=()=>{m=()=>n,d?.(n,1-n),i()}},{abort:()=>{x&&(x.cancel(),x.effect=null,x.onfinish=zt)},deactivate:()=>{i=zt},reset:()=>{n===0&&d?.(1,0)},t:()=>m()}}function N_(r,e,t,n,i,s){var a=null,o=r,l=new Cc(o,!1);Na(()=>{const c=e()||null;var d=c==="svg"?U2:null;if(c===null){l.ensure(null,null),Vc(!0);return}return l.ensure(c,u=>{if(c){if(a=d?document.createElementNS(d,c):document.createElement(c),Sa(a,a),n){var h=a.appendChild(Gi());n(a,h)}_t.nodes.end=a,u.before(a)}}),Vc(!0),()=>{c&&Vc(!1)}},li),Ac(()=>{Vc(!0)})}function U_(r,e){var t=void 0,n;E1(()=>{t!==(t=e())&&(n&&(bn(n),n=null),t&&(n=jn(()=>{kc(()=>t(r))})))})}function W1(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e=0;){var o=a+s;(a===0||mg.includes(n[a-1]))&&(o===n.length||mg.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function gg(r,e=!1){var t=e?" !important;":";",n="";for(var i in r){var s=r[i];s!=null&&s!==""&&(n+=" "+i+": "+s+t)}return n}function xh(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function O_(r,e){if(e){var t="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,a=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(xh)),i&&l.push(...Object.keys(i).map(xh));var c=0,d=-1;const x=r.length;for(var u=0;u{Mu(r,r.__value)});e.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ac(()=>{e.disconnect()})}function B_(r,e,t=e){var n=new WeakSet,i=!0;T1(r,"change",s=>{var a=s?"[selected]":":checked",o;if(r.multiple)o=[].map.call(r.querySelectorAll(a),Vl);else{var l=r.querySelector(a)??r.querySelector("option:not([disabled])");o=l&&Vl(l)}t(o),Ct!==null&&n.add(Ct)}),kc(()=>{var s=e();if(r===document.activeElement){var a=uu??Ct;if(n.has(a))return}if(Mu(r,s,i),i&&s===void 0){var o=r.querySelector(":checked");o!==null&&(s=Vl(o),t(s))}r.__value=s,i=!1}),X1(r)}function Vl(r){return"__value"in r?r.__value:r.value}const sl=Symbol("class"),al=Symbol("style"),Y1=Symbol("is custom element"),Z1=Symbol("is html");function $1(r,e){e?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function na(r,e,t,n){var i=j1(r);i[e]!==(i[e]=t)&&(e==="loading"&&(r[m2]=t),t==null?r.removeAttribute(e):typeof t!="string"&&K1(r).includes(e)?r[e]=t:r.setAttribute(e,t))}function z_(r,e,t,n,i=!1,s=!1){var a=j1(r),o=a[Y1],l=!a[Z1],c=e||{},d=r.tagName==="OPTION";for(var u in e)u in t||(t[u]=null);t.class?t.class=Ma(t.class):t[sl]&&(t.class=null),t[al]&&(t.style??=null);var h=K1(r);for(const y in t){let _=t[y];if(d&&y==="value"&&_==null){r.value=r.__value="",c[y]=_;continue}if(y==="class"){var f=r.namespaceURI==="http://www.w3.org/1999/xhtml";Ta(r,f,_,n,e?.[sl],t[sl]),c[y]=_,c[sl]=t[sl];continue}if(y==="style"){q_(r,_,e?.[al],t[al]),c[y]=_,c[al]=t[al];continue}var m=c[y];if(!(_===m&&!(_===void 0&&r.hasAttribute(y)))){c[y]=_;var x=y[0]+y[1];if(x!=="$$")if(x==="on"){const w={},T="$$"+y;let A=y.slice(2);var g=p_(A);if(h_(A)&&(A=A.slice(0,-7),w.capture=!0),!g&&m){if(_!=null)continue;r.removeEventListener(A,c[T],w),c[T]=null}if(_!=null)if(g)r[`__${A}`]=_,Nt([A]);else{let M=function(S){c[y].call(this,S)};var b=M;c[T]=Hp(A,r,M,w)}else g&&(r[`__${A}`]=void 0)}else if(y==="style")na(r,y,_);else if(y==="autofocus")t_(r,!!_);else if(!o&&(y==="__value"||y==="value"&&_!=null))r.value=r.__value=_;else if(y==="selected"&&d)$1(r,_);else{var p=y;l||(p=g_(p));var v=p==="defaultValue"||p==="defaultChecked";if(_==null&&!o&&!v)if(a[y]=null,p==="value"||p==="checked"){let w=r;const T=e===void 0;if(p==="value"){let A=w.defaultValue;w.removeAttribute(p),w.defaultValue=A,w.value=w.__value=T?A:null}else{let A=w.defaultChecked;w.removeAttribute(p),w.defaultChecked=A,w.checked=T?A:!1}}else r.removeAttribute(y);else v||h.includes(p)&&(o||typeof _!="string")?(r[p]=_,p in a&&(a[p]=mn)):typeof _!="function"&&na(r,p,_)}}}return c}function fn(r,e,t=[],n=[],i=[],s,a=!1,o=!1){f1(i,t,n,l=>{var c=void 0,d={},u=r.nodeName==="SELECT",h=!1;if(E1(()=>{var m=e(...l.map(X)),x=z_(r,c,m,s,a,o);h&&u&&"value"in m&&Mu(r,m.value);for(let p of Object.getOwnPropertySymbols(d))m[p]||bn(d[p]);for(let p of Object.getOwnPropertySymbols(m)){var g=m[p];p.description===F2&&(!c||g!==c[p])&&(d[p]&&bn(d[p]),d[p]=jn(()=>U_(r,()=>g))),x[p]=g}c=x}),u){var f=r;kc(()=>{Mu(f,c.value,!0),X1(f)})}h=!0})}function j1(r){return r.__attributes??={[Y1]:r.nodeName.includes("-"),[Z1]:r.namespaceURI===N2}}var xg=new Map;function K1(r){var e=r.getAttribute("is")||r.nodeName,t=xg.get(e);if(t)return t;xg.set(e,t=[]);for(var n,i=r,s=Element.prototype;s!==i;){n=h2(i);for(var a in n)n[a].set&&t.push(a);i=$b(i)}return t}function V_(r,e,t=e){T1(r,"change",n=>{var i=n?r.defaultChecked:r.checked;t(i)}),fi(e)==null&&t(r.checked),Vp(()=>{var n=e();r.checked=!!n})}function bg(r,e){return r===e||r?.[ws]===e}function Tu(r={},e,t,n){return kc(()=>{var i,s;return Vp(()=>{i=s,s=[],fi(()=>{r!==t(...s)&&(e(r,...s),i&&bg(t(...i),r)&&e(null,...i))})}),()=>{La(()=>{s&&bg(t(...s),r)&&e(null,...s)})}}),r}function Wp(r,e,t){if(r==null)return e(void 0),t&&t(void 0),zt;const n=fi(()=>r.subscribe(e,t));return n.unsubscribe?()=>n.unsubscribe():n}const Wa=[];function Xp(r,e){return{subscribe:No(r,e).subscribe}}function No(r,e=zt){let t=null;const n=new Set;function i(o){if(i1(r,o)&&(r=o,t)){const l=!Wa.length;for(const c of n)c[1](),Wa.push(c,r);if(l){for(let c=0;c{n.delete(c),n.size===0&&t&&(t(),t=null)}}return{set:i,update:s,subscribe:a}}function Yp(r,e,t){const n=!Array.isArray(r),i=n?[r]:r;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=e.length<2;return Xp(t,(a,o)=>{let l=!1;const c=[];let d=0,u=zt;const h=()=>{if(d)return;u();const m=e(n?c[0]:c,a,o);s?a(m):u=typeof m=="function"?m:zt},f=i.map((m,x)=>Wp(m,g=>{c[x]=g,d&=~(1<{d|=1<e=t)(),e}let Hc=!1,Zf=Symbol();function G_(r,e,t){const n=t[e]??={store:null,source:b1(void 0),unsubscribe:zt};if(n.store!==r&&!(Zf in t))if(n.unsubscribe(),n.store=r??null,r==null)n.source.v=void 0,n.unsubscribe=zt;else{var i=!0;n.unsubscribe=Wp(r,s=>{i?n.source.v=s:It(n.source,s)}),i=!1}return r&&Zf in t?J1(r):X(n.source)}function H_(){const r={};function e(){Ac(()=>{for(var t in r)r[t].unsubscribe();Zb(r,Zf,{enumerable:!1,value:!0})})}return[r,e]}function W_(r){var e=Hc;try{return Hc=!1,[r(),Hc]}finally{Hc=e}}const X_={get(r,e){if(!r.exclude.includes(e))return r.props[e]},set(r,e){return!1},getOwnPropertyDescriptor(r,e){if(!r.exclude.includes(e)&&e in r.props)return{enumerable:!0,configurable:!0,value:r.props[e]}},has(r,e){return r.exclude.includes(e)?!1:e in r.props},ownKeys(r){return Reflect.ownKeys(r.props).filter(e=>!r.exclude.includes(e))}};function ir(r,e,t){return new Proxy({props:r,exclude:e},X_)}const Y_={get(r,e){let t=r.props.length;for(;t--;){let n=r.props[t];if(So(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(r,e,t){let n=r.props.length;for(;n--;){let i=r.props[n];So(i)&&(i=i());const s=vs(i,e);if(s&&s.set)return s.set(t),!0}return!1},getOwnPropertyDescriptor(r,e){let t=r.props.length;for(;t--;){let n=r.props[t];if(So(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const i=vs(n,e);return i&&!i.configurable&&(i.configurable=!0),i}}},has(r,e){if(e===ws||e===t1)return!1;for(let t of r.props)if(So(t)&&(t=t()),t!=null&&e in t)return!0;return!1},ownKeys(r){const e=[];for(let t of r.props)if(So(t)&&(t=t()),!!t){for(const n in t)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(t))e.includes(n)||e.push(n)}return e}};function Zp(...r){return new Proxy({props:r},Y_)}function mt(r,e,t,n){var i=(t&I2)!==0,s=(t&P2)!==0,a=n,o=!0,l=()=>(o&&(o=!1,a=s?fi(n):n),a),c;if(i){var d=ws in r||t1 in r;c=vs(r,e)?.set??(d&&e in r?v=>r[e]=v:void 0)}var u,h=!1;i?[u,h]=W_(()=>r[e]):u=r[e],u===void 0&&n!==void 0&&(u=l(),c&&(_2(),c(u)));var f;if(f=()=>{var v=r[e];return v===void 0?l():(o=!0,v)},(t&R2)===0)return f;if(c){var m=r.$$legacy;return(function(v,b){return arguments.length>0?((!b||m||h)&&c(b?f():v),v):f()})}var x=!1,g=((t&C2)!==0?A0:p1)(()=>(x=!1,f()));i&&X(g);var p=_t;return(function(v,b){if(arguments.length>0){const y=b?X(g):i?Oi(v):v;return It(g,y),x=!0,a!==void 0&&(a=y),v}return Ua&&x||(p.f&qi)!==0?g.v:X(g)})}function k0(r){xn===null&&qp(),Hi(()=>{const e=fi(r);if(typeof e=="function")return e})}function Rc(r){xn===null&&qp(),k0(()=>()=>fi(r))}const Z_="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Z_);const yg=(r,e)=>{if(r===e)return!0;if(!r||!e)return!1;const t=r.length;if(e.length!==t)return!1;for(let n=0;n{const r=[],n={items:r,remember:(i,s)=>{for(let o=0;o{for(let s=0;s=0;--e)if(r[e]>=65535)return!0;return!1}const Lw={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Ao(r,e){return new Lw[r](e)}function fc(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function Vy(){const r=fc("canvas");return r.style.display="block",r}const vg={};let Ts=null;function Nw(r){Ts=r}function Uw(){return Ts}function pc(...r){const e="THREE."+r.shift();Ts?Ts("log",e,...r):console.log(e,...r)}function Ce(...r){const e="THREE."+r.shift();Ts?Ts("warn",e,...r):console.warn(e,...r)}function it(...r){const e="THREE."+r.shift();Ts?Ts("error",e,...r):console.error(e,...r)}function zo(...r){const e=r.join(" ");e in vg||(vg[e]=!0,Ce(...r))}function Fw(r,e,t){return new Promise(function(n,i){function s(){switch(r.clientWaitSync(e,r.SYNC_FLUSH_COMMANDS_BIT,0)){case r.WAIT_FAILED:i();break;case r.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:n()}}setTimeout(s,t)})}class pi{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 i=n[e];if(i!==void 0){const s=i.indexOf(t);s!==-1&&i.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 i=n.slice(0);for(let s=0,a=i.length;s>8&255]+Mn[r>>16&255]+Mn[r>>24&255]+"-"+Mn[e&255]+Mn[e>>8&255]+"-"+Mn[e>>16&15|64]+Mn[e>>24&255]+"-"+Mn[t&63|128]+Mn[t>>8&255]+"-"+Mn[t>>16&255]+Mn[t>>24&255]+Mn[n&255]+Mn[n>>8&255]+Mn[n>>16&255]+Mn[n>>24&255]).toLowerCase()}function et(r,e,t){return Math.max(e,Math.min(t,r))}function sm(r,e){return(r%e+e)%e}function Ow(r,e,t,n,i){return n+(r-e)*(i-n)/(t-e)}function qw(r,e,t){return r!==e?(t-r)/(e-r):0}function $l(r,e,t){return(1-t)*r+t*e}function Bw(r,e,t,n){return $l(r,e,1-Math.exp(-t*n))}function zw(r,e=1){return e-Math.abs(sm(r,e*2)-e)}function Vw(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*(3-2*r))}function Gw(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*r*(r*(r*6-15)+10))}function Hw(r,e){return r+Math.floor(Math.random()*(e-r+1))}function Ww(r,e){return r+Math.random()*(e-r)}function Xw(r){return r*(.5-Math.random())}function Yw(r){r!==void 0&&(_g=r);let e=_g+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function Zw(r){return r*xa}function $w(r){return r*Vo}function jw(r){return(r&r-1)===0&&r!==0}function Kw(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function Jw(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function Qw(r,e,t,n,i){const s=Math.cos,a=Math.sin,o=s(t/2),l=a(t/2),c=s((e+n)/2),d=a((e+n)/2),u=s((e-n)/2),h=a((e-n)/2),f=s((n-e)/2),m=a((n-e)/2);switch(i){case"XYX":r.set(o*d,l*u,l*h,o*c);break;case"YZY":r.set(l*h,o*d,l*u,o*c);break;case"ZXZ":r.set(l*u,l*h,o*d,o*c);break;case"XZX":r.set(o*d,l*m,l*f,o*c);break;case"YXY":r.set(l*f,o*d,l*m,o*c);break;case"ZYZ":r.set(l*m,l*f,o*d,o*c);break;default:Ce("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function On(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function dt(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}const Gy={DEG2RAD:xa,RAD2DEG:Vo,generateUUID:pr,clamp:et,euclideanModulo:sm,mapLinear:Ow,inverseLerp:qw,lerp:$l,damp:Bw,pingpong:zw,smoothstep:Vw,smootherstep:Gw,randInt:Hw,randFloat:Ww,randFloatSpread:Xw,seededRandom:Yw,degToRad:Zw,radToDeg:$w,isPowerOfTwo:jw,ceilPowerOfTwo:Kw,floorPowerOfTwo:Jw,setQuaternionFromProperEuler:Qw,normalize:dt,denormalize:On};class re{constructor(e=0,t=0){re.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,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[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=et(this.x,e.x,t.x),this.y=et(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=et(this.x,e,t),this.y=et(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(et(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(et(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),i=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*n-a*i+e.x,this.y=s*i+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 In{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,s,a,o){let l=n[i+0],c=n[i+1],d=n[i+2],u=n[i+3],h=s[a+0],f=s[a+1],m=s[a+2],x=s[a+3];if(o<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(o>=1){e[t+0]=h,e[t+1]=f,e[t+2]=m,e[t+3]=x;return}if(u!==x||l!==h||c!==f||d!==m){let g=l*h+c*f+d*m+u*x;g<0&&(h=-h,f=-f,m=-m,x=-x,g=-g);let p=1-o;if(g<.9995){const v=Math.acos(g),b=Math.sin(v);p=Math.sin(p*v)/b,o=Math.sin(o*v)/b,l=l*p+h*o,c=c*p+f*o,d=d*p+m*o,u=u*p+x*o}else{l=l*p+h*o,c=c*p+f*o,d=d*p+m*o,u=u*p+x*o;const v=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=v,c*=v,d*=v,u*=v}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,i,s,a){const o=n[i],l=n[i+1],c=n[i+2],d=n[i+3],u=s[a],h=s[a+1],f=s[a+2],m=s[a+3];return e[t]=o*m+d*u+l*f-c*h,e[t+1]=l*m+d*h+c*u-o*f,e[t+2]=c*m+d*f+o*h-l*u,e[t+3]=d*m-o*u-l*h-c*f,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,i){return this._x=e,this._y=t,this._z=n,this._w=i,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,i=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,c=o(n/2),d=o(i/2),u=o(s/2),h=l(n/2),f=l(i/2),m=l(s/2);switch(a){case"XYZ":this._x=h*d*u+c*f*m,this._y=c*f*u-h*d*m,this._z=c*d*m+h*f*u,this._w=c*d*u-h*f*m;break;case"YXZ":this._x=h*d*u+c*f*m,this._y=c*f*u-h*d*m,this._z=c*d*m-h*f*u,this._w=c*d*u+h*f*m;break;case"ZXY":this._x=h*d*u-c*f*m,this._y=c*f*u+h*d*m,this._z=c*d*m+h*f*u,this._w=c*d*u-h*f*m;break;case"ZYX":this._x=h*d*u-c*f*m,this._y=c*f*u+h*d*m,this._z=c*d*m-h*f*u,this._w=c*d*u+h*f*m;break;case"YZX":this._x=h*d*u+c*f*m,this._y=c*f*u+h*d*m,this._z=c*d*m-h*f*u,this._w=c*d*u-h*f*m;break;case"XZY":this._x=h*d*u-c*f*m,this._y=c*f*u-h*d*m,this._z=c*d*m+h*f*u,this._w=c*d*u+h*f*m;break;default:Ce("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],s=t[8],a=t[1],o=t[5],l=t[9],c=t[2],d=t[6],u=t[10],h=n+o+u;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(d-l)*f,this._y=(s-c)*f,this._z=(a-i)*f}else if(n>o&&n>u){const f=2*Math.sqrt(1+n-o-u);this._w=(d-l)/f,this._x=.25*f,this._y=(i+a)/f,this._z=(s+c)/f}else if(o>u){const f=2*Math.sqrt(1+o-n-u);this._w=(s-c)/f,this._x=(i+a)/f,this._y=.25*f,this._z=(l+d)/f}else{const f=2*Math.sqrt(1+u-n-o);this._w=(a-i)/f,this._x=(s+c)/f,this._y=(l+d)/f,this._z=.25*f}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(et(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),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,i=e._y,s=e._z,a=e._w,o=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+a*o+i*c-s*l,this._y=i*d+a*l+s*o-n*c,this._z=s*d+a*c+n*l-i*o,this._w=a*d-n*o-i*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,i=e._y,s=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,i=-i,s=-s,a=-a,o=-o);let l=1-t;if(o<.9995){const c=Math.acos(o),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+i*t,this._z=this._z*l+s*t,this._w=this._w*l+a*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+i*t,this._z=this._z*l+s*t,this._w=this._w*l+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(),i=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(i*Math.sin(e),i*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 P{constructor(e=0,t=0,n=0){P.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(wg.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(wg.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,s=e.elements;return this.x=s[0]*t+s[3]*n+s[6]*i,this.y=s[1]*t+s[4]*n+s[7]*i,this.z=s[2]*t+s[5]*n+s[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,s=e.elements,a=1/(s[3]*t+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*t+s[4]*n+s[8]*i+s[12])*a,this.y=(s[1]*t+s[5]*n+s[9]*i+s[13])*a,this.z=(s[2]*t+s[6]*n+s[10]*i+s[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,s=e.x,a=e.y,o=e.z,l=e.w,c=2*(a*i-o*n),d=2*(o*t-s*i),u=2*(s*n-a*t);return this.x=t+l*c+a*u-o*d,this.y=n+l*d+o*c-s*u,this.z=i+l*u+s*d-a*c,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,i=this.z,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*i,this.y=s[1]*t+s[5]*n+s[9]*i,this.z=s[2]*t+s[6]*n+s[10]*i,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=et(this.x,e.x,t.x),this.y=et(this.y,e.y,t.y),this.z=et(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=et(this.x,e,t),this.y=et(this.y,e,t),this.z=et(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(et(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,i=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=i*l-s*o,this.y=s*a-n*l,this.z=n*o-i*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 yh.copy(this).projectOnVector(e),this.sub(yh)}reflect(e){return this.sub(yh.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(et(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}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 i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*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(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,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 yh=new P,wg=new In;class Je{constructor(e,t,n,i,s,a,o,l,c){Je.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,s,a,o,l,c)}set(e,t,n,i,s,a,o,l,c){const d=this.elements;return d[0]=e,d[1]=i,d[2]=o,d[3]=t,d[4]=s,d[5]=l,d[6]=n,d[7]=a,d[8]=c,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,i=t.elements,s=this.elements,a=n[0],o=n[3],l=n[6],c=n[1],d=n[4],u=n[7],h=n[2],f=n[5],m=n[8],x=i[0],g=i[3],p=i[6],v=i[1],b=i[4],y=i[7],_=i[2],w=i[5],T=i[8];return s[0]=a*x+o*v+l*_,s[3]=a*g+o*b+l*w,s[6]=a*p+o*y+l*T,s[1]=c*x+d*v+u*_,s[4]=c*g+d*b+u*w,s[7]=c*p+d*y+u*T,s[2]=h*x+f*v+m*_,s[5]=h*g+f*b+m*w,s[8]=h*p+f*y+m*T,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],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],d=e[8];return t*a*d-t*o*c-n*s*d+n*o*l+i*s*c-i*a*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],d=e[8],u=d*a-o*c,h=o*l-d*s,f=c*s-a*l,m=t*u+n*h+i*f;if(m===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/m;return e[0]=u*x,e[1]=(i*c-d*n)*x,e[2]=(o*n-i*a)*x,e[3]=h*x,e[4]=(d*t-i*l)*x,e[5]=(i*s-o*t)*x,e[6]=f*x,e[7]=(n*l-c*t)*x,e[8]=(a*t-n*s)*x,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,i,s,a,o){const l=Math.cos(s),c=Math.sin(s);return this.set(n*l,n*c,-n*(l*a+c*o)+a+e,-i*c,i*l,-i*(-c*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(vh.makeScale(e,t)),this}rotate(e){return this.premultiply(vh.makeRotation(-e)),this}translate(e,t){return this.premultiply(vh.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 i=0;i<9;i++)if(t[i]!==n[i])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 vh=new Je,Sg=new Je().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Mg=new Je().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function e5(){const r={enabled:!0,workingColorSpace:ka,spaces:{},convert:function(i,s,a){return this.enabled===!1||s===a||!s||!a||(this.spaces[s].transfer===St&&(i.r=Vi(i.r),i.g=Vi(i.g),i.b=Vi(i.b)),this.spaces[s].primaries!==this.spaces[a].primaries&&(i.applyMatrix3(this.spaces[s].toXYZ),i.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===St&&(i.r=Ro(i.r),i.g=Ro(i.g),i.b=Ro(i.b))),i},workingToColorSpace:function(i,s){return this.convert(i,this.workingColorSpace,s)},colorSpaceToWorking:function(i,s){return this.convert(i,s,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Ui?uc:this.spaces[i].transfer},getToneMappingMode:function(i){return this.spaces[i].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(i,s=this.workingColorSpace){return i.fromArray(this.spaces[s].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,s,a){return i.copy(this.spaces[s].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,s){return zo("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),r.workingToColorSpace(i,s)},toWorkingColorSpace:function(i,s){return zo("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),r.colorSpaceToWorking(i,s)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return r.define({[ka]:{primaries:e,whitePoint:n,transfer:uc,toXYZ:Sg,fromXYZ:Mg,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:kn},outputColorSpaceConfig:{drawingBufferColorSpace:kn}},[kn]:{primaries:e,whitePoint:n,transfer:St,toXYZ:Sg,fromXYZ:Mg,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:kn}}}),r}const pt=e5();function Vi(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function Ro(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}let Xa;class Hy{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{Xa===void 0&&(Xa=fc("canvas")),Xa.width=e.width,Xa.height=e.height;const i=Xa.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=Xa}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=fc("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),s=i.data;for(let a=0;a1),this.pmremVersion=0}get width(){return this.source.getSize(wh).x}get height(){return this.source.getSize(wh).y}get depth(){return this.source.getSize(wh).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){Ce(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){Ce(`Texture.setValues(): property '${t}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.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!==E0)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case oc:e.x=e.x-Math.floor(e.x);break;case er:e.x=e.x<0?0:1;break;case lc: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 oc:e.y=e.y-Math.floor(e.y);break;case er:e.y=e.y<0?0:1;break;case lc: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++}}$t.DEFAULT_IMAGE=null;$t.DEFAULT_MAPPING=E0;$t.DEFAULT_ANISOTROPY=1;class ot{constructor(e=0,t=0,n=0,i=1){ot.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}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,i){return this.x=e,this.y=t,this.z=n,this.w=i,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,i=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i+a[12]*s,this.y=a[1]*t+a[5]*n+a[9]*i+a[13]*s,this.z=a[2]*t+a[6]*n+a[10]*i+a[14]*s,this.w=a[3]*t+a[7]*n+a[11]*i+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,i,s;const l=e.elements,c=l[0],d=l[4],u=l[8],h=l[1],f=l[5],m=l[9],x=l[2],g=l[6],p=l[10];if(Math.abs(d-h)<.01&&Math.abs(u-x)<.01&&Math.abs(m-g)<.01){if(Math.abs(d+h)<.1&&Math.abs(u+x)<.1&&Math.abs(m+g)<.1&&Math.abs(c+f+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,y=(f+1)/2,_=(p+1)/2,w=(d+h)/4,T=(u+x)/4,A=(m+g)/4;return b>y&&b>_?b<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(b),i=w/n,s=T/n):y>_?y<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(y),n=w/i,s=A/i):_<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(_),n=T/s,i=A/s),this.set(n,i,s,t),this}let v=Math.sqrt((g-m)*(g-m)+(u-x)*(u-x)+(h-d)*(h-d));return Math.abs(v)<.001&&(v=1),this.x=(g-m)/v,this.y=(u-x)/v,this.z=(h-d)/v,this.w=Math.acos((c+f+p-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=et(this.x,e.x,t.x),this.y=et(this.y,e.y,t.y),this.z=et(this.z,e.z,t.z),this.w=et(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=et(this.x,e,t),this.y=et(this.y,e,t),this.z=et(this.z,e,t),this.w=et(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(et(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 am extends pi{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Qt,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 ot(0,0,e,t),this.scissorTest=!1,this.viewport=new ot(0,0,e,t);const i={width:e,height:t,depth:n.depth},s=new $t(i);this.textures=[];const 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=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,Fr),Fr.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(ol),Xc.subVectors(this.max,ol),Ya.subVectors(e.a,ol),Za.subVectors(e.b,ol),$a.subVectors(e.c,ol),es.subVectors(Za,Ya),ts.subVectors($a,Za),Ls.subVectors(Ya,$a);let t=[0,-es.z,es.y,0,-ts.z,ts.y,0,-Ls.z,Ls.y,es.z,0,-es.x,ts.z,0,-ts.x,Ls.z,0,-Ls.x,-es.y,es.x,0,-ts.y,ts.x,0,-Ls.y,Ls.x,0];return!Sh(t,Ya,Za,$a,Xc)||(t=[1,0,0,0,1,0,0,0,1],!Sh(t,Ya,Za,$a,Xc))?!1:(Yc.crossVectors(es,ts),t=[Yc.x,Yc.y,Yc.z],Sh(t,Ya,Za,$a,Xc))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Fr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Fr).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:(gi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),gi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),gi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),gi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),gi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),gi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),gi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),gi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(gi),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 gi=[new P,new P,new P,new P,new P,new P,new P,new P],Fr=new P,Wc=new wt,Ya=new P,Za=new P,$a=new P,es=new P,ts=new P,Ls=new P,ol=new P,Xc=new P,Yc=new P,Ns=new P;function Sh(r,e,t,n,i){for(let s=0,a=r.length-3;s<=a;s+=3){Ns.fromArray(r,s);const o=i.x*Math.abs(Ns.x)+i.y*Math.abs(Ns.y)+i.z*Math.abs(Ns.z),l=e.dot(Ns),c=t.dot(Ns),d=n.dot(Ns);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>o)return!1}return!0}const s5=new wt,ll=new P,Mh=new P;class rn{constructor(e=new P,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):s5.setFromPoints(e).getCenter(n);let i=0;for(let s=0,a=e.length;sthis.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;ll.subVectors(e,this.center);const t=ll.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(ll,i/n),this.radius+=i}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):(Mh.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(ll.copy(e.center).add(Mh)),this.expandByPoint(ll.copy(e.center).sub(Mh))),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}}const xi=new P,Th=new P,Zc=new P,ns=new P,Ah=new P,$c=new P,kh=new P;class $r{constructor(e=new P,t=new P(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,xi)),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=xi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(xi.copy(this.origin).addScaledVector(this.direction,t),xi.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){Th.copy(e).add(t).multiplyScalar(.5),Zc.copy(t).sub(e).normalize(),ns.copy(this.origin).sub(Th);const s=e.distanceTo(t)*.5,a=-this.direction.dot(Zc),o=ns.dot(this.direction),l=-ns.dot(Zc),c=ns.lengthSq(),d=Math.abs(1-a*a);let u,h,f,m;if(d>0)if(u=a*l-o,h=a*o-l,m=s*d,u>=0)if(h>=-m)if(h<=m){const x=1/d;u*=x,h*=x,f=u*(u+a*h+2*o)+h*(a*u+h+2*l)+c}else h=s,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*l)+c;else h=-s,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*l)+c;else h<=-m?(u=Math.max(0,-(-a*s+o)),h=u>0?-s:Math.min(Math.max(-s,-l),s),f=-u*u+h*(h+2*l)+c):h<=m?(u=0,h=Math.min(Math.max(-s,-l),s),f=h*(h+2*l)+c):(u=Math.max(0,-(a*s+o)),h=u>0?s:Math.min(Math.max(-s,-l),s),f=-u*u+h*(h+2*l)+c);else h=a>0?-s:s,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),i&&i.copy(Th).addScaledVector(Zc,h),f}intersectSphere(e,t){xi.subVectors(e.center,this.origin);const n=xi.dot(this.direction),i=xi.dot(xi)-n*n,s=e.radius*e.radius;if(i>s)return null;const a=Math.sqrt(s-i),o=n-a,l=n+a;return l<0?null:o<0?this.at(l,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,i,s,a,o,l;const c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,h=this.origin;return c>=0?(n=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(n=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),d>=0?(s=(e.min.y-h.y)*d,a=(e.max.y-h.y)*d):(s=(e.max.y-h.y)*d,a=(e.min.y-h.y)*d),n>a||s>i||((s>n||isNaN(n))&&(n=s),(a=0?(o=(e.min.z-h.z)*u,l=(e.max.z-h.z)*u):(o=(e.max.z-h.z)*u,l=(e.min.z-h.z)*u),n>l||o>i)||((o>n||n!==n)&&(n=o),(l=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,xi)!==null}intersectTriangle(e,t,n,i,s){Ah.subVectors(t,e),$c.subVectors(n,e),kh.crossVectors(Ah,$c);let a=this.direction.dot(kh),o;if(a>0){if(i)return null;o=1}else if(a<0)o=-1,a=-a;else return null;ns.subVectors(this.origin,e);const l=o*this.direction.dot($c.crossVectors(ns,$c));if(l<0)return null;const c=o*this.direction.dot(Ah.cross(ns));if(c<0||l+c>a)return null;const d=-o*ns.dot(kh);return d<0?null:this.at(d/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 Oe{constructor(e,t,n,i,s,a,o,l,c,d,u,h,f,m,x,g){Oe.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,s,a,o,l,c,d,u,h,f,m,x,g)}set(e,t,n,i,s,a,o,l,c,d,u,h,f,m,x,g){const p=this.elements;return p[0]=e,p[4]=t,p[8]=n,p[12]=i,p[1]=s,p[5]=a,p[9]=o,p[13]=l,p[2]=c,p[6]=d,p[10]=u,p[14]=h,p[3]=f,p[7]=m,p[11]=x,p[15]=g,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Oe().fromArray(this.elements)}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],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/ja.setFromMatrixColumn(e,0).length(),s=1/ja.setFromMatrixColumn(e,1).length(),a=1/ja.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*s,t[5]=n[5]*s,t[6]=n[6]*s,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,s=e.z,a=Math.cos(n),o=Math.sin(n),l=Math.cos(i),c=Math.sin(i),d=Math.cos(s),u=Math.sin(s);if(e.order==="XYZ"){const h=a*d,f=a*u,m=o*d,x=o*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=f+m*c,t[5]=h-x*c,t[9]=-o*l,t[2]=x-h*c,t[6]=m+f*c,t[10]=a*l}else if(e.order==="YXZ"){const h=l*d,f=l*u,m=c*d,x=c*u;t[0]=h+x*o,t[4]=m*o-f,t[8]=a*c,t[1]=a*u,t[5]=a*d,t[9]=-o,t[2]=f*o-m,t[6]=x+h*o,t[10]=a*l}else if(e.order==="ZXY"){const h=l*d,f=l*u,m=c*d,x=c*u;t[0]=h-x*o,t[4]=-a*u,t[8]=m+f*o,t[1]=f+m*o,t[5]=a*d,t[9]=x-h*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const h=a*d,f=a*u,m=o*d,x=o*u;t[0]=l*d,t[4]=m*c-f,t[8]=h*c+x,t[1]=l*u,t[5]=x*c+h,t[9]=f*c-m,t[2]=-c,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const h=a*l,f=a*c,m=o*l,x=o*c;t[0]=l*d,t[4]=x-h*u,t[8]=m*u+f,t[1]=u,t[5]=a*d,t[9]=-o*d,t[2]=-c*d,t[6]=f*u+m,t[10]=h-x*u}else if(e.order==="XZY"){const h=a*l,f=a*c,m=o*l,x=o*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=h*u+x,t[5]=a*d,t[9]=f*u-m,t[2]=m*u-f,t[6]=o*d,t[10]=x*u+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(a5,e,o5)}lookAt(e,t,n){const i=this.elements;return or.subVectors(e,t),or.lengthSq()===0&&(or.z=1),or.normalize(),rs.crossVectors(n,or),rs.lengthSq()===0&&(Math.abs(n.z)===1?or.x+=1e-4:or.z+=1e-4,or.normalize(),rs.crossVectors(n,or)),rs.normalize(),jc.crossVectors(or,rs),i[0]=rs.x,i[4]=jc.x,i[8]=or.x,i[1]=rs.y,i[5]=jc.y,i[9]=or.y,i[2]=rs.z,i[6]=jc.z,i[10]=or.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,s=this.elements,a=n[0],o=n[4],l=n[8],c=n[12],d=n[1],u=n[5],h=n[9],f=n[13],m=n[2],x=n[6],g=n[10],p=n[14],v=n[3],b=n[7],y=n[11],_=n[15],w=i[0],T=i[4],A=i[8],M=i[12],S=i[1],E=i[5],I=i[9],O=i[13],q=i[2],z=i[6],V=i[10],H=i[14],F=i[3],ie=i[7],ue=i[11],_e=i[15];return s[0]=a*w+o*S+l*q+c*F,s[4]=a*T+o*E+l*z+c*ie,s[8]=a*A+o*I+l*V+c*ue,s[12]=a*M+o*O+l*H+c*_e,s[1]=d*w+u*S+h*q+f*F,s[5]=d*T+u*E+h*z+f*ie,s[9]=d*A+u*I+h*V+f*ue,s[13]=d*M+u*O+h*H+f*_e,s[2]=m*w+x*S+g*q+p*F,s[6]=m*T+x*E+g*z+p*ie,s[10]=m*A+x*I+g*V+p*ue,s[14]=m*M+x*O+g*H+p*_e,s[3]=v*w+b*S+y*q+_*F,s[7]=v*T+b*E+y*z+_*ie,s[11]=v*A+b*I+y*V+_*ue,s[15]=v*M+b*O+y*H+_*_e,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],s=e[12],a=e[1],o=e[5],l=e[9],c=e[13],d=e[2],u=e[6],h=e[10],f=e[14],m=e[3],x=e[7],g=e[11],p=e[15];return m*(+s*l*u-i*c*u-s*o*h+n*c*h+i*o*f-n*l*f)+x*(+t*l*f-t*c*h+s*a*h-i*a*f+i*c*d-s*l*d)+g*(+t*c*u-t*o*f-s*a*u+n*a*f+s*o*d-n*c*d)+p*(-i*o*d-t*l*u+t*o*h+i*a*u-n*a*h+n*l*d)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],d=e[8],u=e[9],h=e[10],f=e[11],m=e[12],x=e[13],g=e[14],p=e[15],v=u*g*c-x*h*c+x*l*f-o*g*f-u*l*p+o*h*p,b=m*h*c-d*g*c-m*l*f+a*g*f+d*l*p-a*h*p,y=d*x*c-m*u*c+m*o*f-a*x*f-d*o*p+a*u*p,_=m*u*l-d*x*l-m*o*h+a*x*h+d*o*g-a*u*g,w=t*v+n*b+i*y+s*_;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const T=1/w;return e[0]=v*T,e[1]=(x*h*s-u*g*s-x*i*f+n*g*f+u*i*p-n*h*p)*T,e[2]=(o*g*s-x*l*s+x*i*c-n*g*c-o*i*p+n*l*p)*T,e[3]=(u*l*s-o*h*s-u*i*c+n*h*c+o*i*f-n*l*f)*T,e[4]=b*T,e[5]=(d*g*s-m*h*s+m*i*f-t*g*f-d*i*p+t*h*p)*T,e[6]=(m*l*s-a*g*s-m*i*c+t*g*c+a*i*p-t*l*p)*T,e[7]=(a*h*s-d*l*s+d*i*c-t*h*c-a*i*f+t*l*f)*T,e[8]=y*T,e[9]=(m*u*s-d*x*s-m*n*f+t*x*f+d*n*p-t*u*p)*T,e[10]=(a*x*s-m*o*s+m*n*c-t*x*c-a*n*p+t*o*p)*T,e[11]=(d*o*s-a*u*s-d*n*c+t*u*c+a*n*f-t*o*f)*T,e[12]=_*T,e[13]=(d*x*i-m*u*i+m*n*h-t*x*h-d*n*g+t*u*g)*T,e[14]=(m*o*i-a*x*i-m*n*l+t*x*l+a*n*g-t*o*g)*T,e[15]=(a*u*i-d*o*i+d*n*l-t*u*l-a*n*h+t*o*h)*T,this}scale(e){const t=this.elements,n=e.x,i=e.y,s=e.z;return t[0]*=n,t[4]*=i,t[8]*=s,t[1]*=n,t[5]*=i,t[9]*=s,t[2]*=n,t[6]*=i,t[10]*=s,t[3]*=n,t[7]*=i,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),s=1-n,a=e.x,o=e.y,l=e.z,c=s*a,d=s*o;return this.set(c*a+n,c*o-i*l,c*l+i*o,0,c*o+i*l,d*o+n,d*l-i*a,0,c*l-i*o,d*l+i*a,s*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,s,a){return this.set(1,n,s,0,e,1,a,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,s=t._x,a=t._y,o=t._z,l=t._w,c=s+s,d=a+a,u=o+o,h=s*c,f=s*d,m=s*u,x=a*d,g=a*u,p=o*u,v=l*c,b=l*d,y=l*u,_=n.x,w=n.y,T=n.z;return i[0]=(1-(x+p))*_,i[1]=(f+y)*_,i[2]=(m-b)*_,i[3]=0,i[4]=(f-y)*w,i[5]=(1-(h+p))*w,i[6]=(g+v)*w,i[7]=0,i[8]=(m+b)*T,i[9]=(g-v)*T,i[10]=(1-(h+x))*T,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let s=ja.set(i[0],i[1],i[2]).length();const a=ja.set(i[4],i[5],i[6]).length(),o=ja.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),e.x=i[12],e.y=i[13],e.z=i[14],Or.copy(this);const c=1/s,d=1/a,u=1/o;return Or.elements[0]*=c,Or.elements[1]*=c,Or.elements[2]*=c,Or.elements[4]*=d,Or.elements[5]*=d,Or.elements[6]*=d,Or.elements[8]*=u,Or.elements[9]*=u,Or.elements[10]*=u,t.setFromRotationMatrix(Or),n.x=s,n.y=a,n.z=o,this}makePerspective(e,t,n,i,s,a,o=ur,l=!1){const c=this.elements,d=2*s/(t-e),u=2*s/(n-i),h=(t+e)/(t-e),f=(n+i)/(n-i);let m,x;if(l)m=s/(a-s),x=a*s/(a-s);else if(o===ur)m=-(a+s)/(a-s),x=-2*a*s/(a-s);else if(o===Bo)m=-a/(a-s),x=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return c[0]=d,c[4]=0,c[8]=h,c[12]=0,c[1]=0,c[5]=u,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=m,c[14]=x,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,i,s,a,o=ur,l=!1){const c=this.elements,d=2/(t-e),u=2/(n-i),h=-(t+e)/(t-e),f=-(n+i)/(n-i);let m,x;if(l)m=1/(a-s),x=a/(a-s);else if(o===ur)m=-2/(a-s),x=-(a+s)/(a-s);else if(o===Bo)m=-1/(a-s),x=-s/(a-s);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return c[0]=d,c[4]=0,c[8]=0,c[12]=h,c[1]=0,c[5]=u,c[9]=0,c[13]=f,c[2]=0,c[6]=0,c[10]=m,c[14]=x,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;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[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const ja=new P,Or=new Oe,a5=new P(0,0,0),o5=new P(1,1,1),rs=new P,jc=new P,or=new P,Tg=new Oe,Ag=new In;class mr{constructor(e=0,t=0,n=0,i=mr.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}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 order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,s=i[0],a=i[4],o=i[8],l=i[1],c=i[5],d=i[9],u=i[2],h=i[6],f=i[10];switch(t){case"XYZ":this._y=Math.asin(et(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-d,f),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-et(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,s),this._z=0);break;case"ZXY":this._x=Math.asin(et(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-et(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(et(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-u,s)):(this._x=0,this._y=Math.atan2(o,f));break;case"XZY":this._z=Math.asin(-et(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-d,f),this._y=0);break;default:Ce("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Tg.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Tg,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Ag.setFromEuler(this),this.setFromQuaternion(Ag,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[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._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}mr.DEFAULT_ORDER="XYZ";class q0{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let n=0;n0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(o=>({...o})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function s(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let c=0,d=l.length;c0){i.children=[];for(let o=0;o0){i.animations=[];for(let o=0;o0&&(n.geometries=o),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),d.length>0&&(n.images=d),u.length>0&&(n.shapes=u),h.length>0&&(n.skeletons=h),f.length>0&&(n.animations=f),m.length>0&&(n.nodes=m)}return n.object=i,n;function a(o){const l=[];for(const c in o){const d=o[c];delete d.metadata,l.push(d)}return l}}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),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.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(e,t,n,i,s){qr.subVectors(i,t),yi.subVectors(n,t),Ch.subVectors(e,t);const a=qr.dot(qr),o=qr.dot(yi),l=qr.dot(Ch),c=yi.dot(yi),d=yi.dot(Ch),u=a*c-o*o;if(u===0)return s.set(0,0,0),null;const h=1/u,f=(c*l-o*d)*h,m=(a*d-o*l)*h;return s.set(1-f-m,m,f)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,vi)===null?!1:vi.x>=0&&vi.y>=0&&vi.x+vi.y<=1}static getInterpolation(e,t,n,i,s,a,o,l){return this.getBarycoord(e,t,n,i,vi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,vi.x),l.addScaledVector(a,vi.y),l.addScaledVector(o,vi.z),l)}static getInterpolatedAttribute(e,t,n,i,s,a){return Dh.setScalar(0),Lh.setScalar(0),Nh.setScalar(0),Dh.fromBufferAttribute(e,t),Lh.fromBufferAttribute(e,n),Nh.fromBufferAttribute(e,i),a.setScalar(0),a.addScaledVector(Dh,s.x),a.addScaledVector(Lh,s.y),a.addScaledVector(Nh,s.z),a}static isFrontFacing(e,t,n,i){return qr.subVectors(n,t),yi.subVectors(e,t),qr.cross(yi).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),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 qr.subVectors(this.c,this.b),yi.subVectors(this.a,this.b),qr.cross(yi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return kt.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return kt.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,s){return kt.getInterpolation(e,this.a,this.b,this.c,t,n,i,s)}containsPoint(e){return kt.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return kt.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,s=this.c;let a,o;Qa.subVectors(i,n),eo.subVectors(s,n),Rh.subVectors(e,n);const l=Qa.dot(Rh),c=eo.dot(Rh);if(l<=0&&c<=0)return t.copy(n);Ih.subVectors(e,i);const d=Qa.dot(Ih),u=eo.dot(Ih);if(d>=0&&u<=d)return t.copy(i);const h=l*u-d*c;if(h<=0&&l>=0&&d<=0)return a=l/(l-d),t.copy(n).addScaledVector(Qa,a);Ph.subVectors(e,s);const f=Qa.dot(Ph),m=eo.dot(Ph);if(m>=0&&f<=m)return t.copy(s);const x=f*c-l*m;if(x<=0&&c>=0&&m<=0)return o=c/(c-m),t.copy(n).addScaledVector(eo,o);const g=d*m-f*u;if(g<=0&&u-d>=0&&f-m>=0)return Pg.subVectors(s,i),o=(u-d)/(u-d+(f-m)),t.copy(i).addScaledVector(Pg,o);const p=1/(g+x+h);return a=x*p,o=h*p,t.copy(n).addScaledVector(Qa,a).addScaledVector(eo,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const Wy={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},is={h:0,s:0,l:0},Jc={h:0,s:0,l:0};function Uh(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}class De{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 i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=kn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,pt.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=pt.workingColorSpace){return this.r=e,this.g=t,this.b=n,pt.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=pt.workingColorSpace){if(e=sm(e,1),t=et(t,0,1),n=et(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=Uh(a,s,e+1/3),this.g=Uh(a,s,e),this.b=Uh(a,s,e-1/3)}return pt.colorSpaceToWorking(this,i),this}setStyle(e,t=kn){function n(s){s!==void 0&&parseFloat(s)<1&&Ce("Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=i[1],o=i[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:Ce("Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=i[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);Ce("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=kn){const n=Wy[e.toLowerCase()];return n!==void 0?this.setHex(n,t):Ce("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=Vi(e.r),this.g=Vi(e.g),this.b=Vi(e.b),this}copyLinearToSRGB(e){return this.r=Ro(e.r),this.g=Ro(e.g),this.b=Ro(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=kn){return pt.workingToColorSpace(Tn.copy(this),e),Math.round(et(Tn.r*255,0,255))*65536+Math.round(et(Tn.g*255,0,255))*256+Math.round(et(Tn.b*255,0,255))}getHexString(e=kn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=pt.workingColorSpace){pt.workingToColorSpace(Tn.copy(this),t);const n=Tn.r,i=Tn.g,s=Tn.b,a=Math.max(n,i,s),o=Math.min(n,i,s);let l,c;const d=(o+a)/2;if(o===a)l=0,c=0;else{const u=a-o;switch(c=d<=.5?u/(a+o):u/(2-a-o),a){case n:l=(i-s)/u+(i0!=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){Ce(`Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){Ce(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.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!==ga&&(n.blending=this.blending),this.side!==Xr&&(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!==Au&&(n.blendSrc=this.blendSrc),this.blendDst!==ku&&(n.blendDst=this.blendDst),this.blendEquation!==fs&&(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!==Aa&&(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!==ep&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ta&&(n.stencilFail=this.stencilFail),this.stencilZFail!==ta&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==ta&&(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.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 i(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=i(e.textures),a=i(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 i=t.length;n=new Array(i);for(let s=0;s!==i;++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.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++}}class ji extends Pn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new De(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 mr,this.combine=Ic,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 Fi=f5();function f5(){const r=new ArrayBuffer(4),e=new Float32Array(r),t=new Uint32Array(r),n=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(n[l]=0,n[l|256]=32768,i[l]=24,i[l|256]=24):c<-14?(n[l]=1024>>-c-14,n[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(n[l]=c+15<<10,n[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(n[l]=31744,n[l|256]=64512,i[l]=24,i[l|256]=24):(n[l]=31744,n[l|256]=64512,i[l]=13,i[l|256]=13)}const s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,d=0;for(;(c&8388608)===0;)c<<=1,d-=8388608;c&=-8388609,d+=947912704,s[l]=c|d}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)a[l]=l<<23;a[31]=1199570944,a[32]=2147483648;for(let l=33;l<63;++l)a[l]=2147483648+(l-32<<23);a[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(o[l]=1024);return{floatView:e,uint32View:t,baseTable:n,shiftTable:i,mantissaTable:s,exponentTable:a,offsetTable:o}}function Zn(r){Math.abs(r)>65504&&Ce("DataUtils.toHalfFloat(): Value out of range."),r=et(r,-65504,65504),Fi.floatView[0]=r;const e=Fi.uint32View[0],t=e>>23&511;return Fi.baseTable[t]+((e&8388607)>>Fi.shiftTable[t])}function Ll(r){const e=r>>10;return Fi.uint32View[0]=Fi.mantissaTable[Fi.offsetTable[e]+(r&1023)]+Fi.exponentTable[e],Fi.floatView[0]}class p5{static toHalfFloat(e){return Zn(e)}static fromHalfFloat(e){return Ll(e)}}const tn=new P,Qc=new re;let m5=0;class ft{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:m5++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=hc,this.updateRanges=[],this.gpuType=tr,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 i=0,s=this.itemSize;it.count&&Ce("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 wt);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){it("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new P(-1/0,-1/0,-1/0),new P(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);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 l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],d=[];for(let u=0,h=c.length;u0&&(i[l]=d,s=!0)}s&&(e.data.morphAttributes=i,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 i=e.attributes;for(const c in i){const d=i[c];this.setAttribute(c,d.clone(t))}const s=e.morphAttributes;for(const c in s){const d=[],u=s[c];for(let h=0,f=u.length;h0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=i.length;s(e.far-e.near)**2))&&(Dg.copy(s).invert(),Us.copy(e.ray).applyMatrix4(Dg),!(n.boundingBox!==null&&Us.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Us)))}_computeIntersections(e,t,n){let i;const s=this.geometry,a=this.material,o=s.index,l=s.attributes.position,c=s.attributes.uv,d=s.attributes.uv1,u=s.attributes.normal,h=s.groups,f=s.drawRange;if(o!==null)if(Array.isArray(a))for(let m=0,x=h.length;mt.far?null:{distance:c,point:sd.clone(),object:r}}function ad(r,e,t,n,i,s,a,o,l,c){r.getVertexPosition(o,td),r.getVertexPosition(l,nd),r.getVertexPosition(c,rd);const d=S5(r,e,t,n,td,nd,rd,Ng);if(d){const u=new P;kt.getBarycoord(Ng,td,nd,rd,u),i&&(d.uv=kt.getInterpolatedAttribute(i,o,l,c,u,new re)),s&&(d.uv1=kt.getInterpolatedAttribute(s,o,l,c,u,new re)),a&&(d.normal=kt.getInterpolatedAttribute(a,o,l,c,u,new P),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a:o,b:l,c,normal:new P,materialIndex:0};kt.getNormal(td,nd,rd,h.normal),d.face=h,d.barycoord=u}return d}class ui extends st{constructor(e=1,t=1,n=1,i=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:s,depthSegments:a};const o=this;i=Math.floor(i),s=Math.floor(s),a=Math.floor(a);const l=[],c=[],d=[],u=[];let h=0,f=0;m("z","y","x",-1,-1,n,t,e,a,s,0),m("z","y","x",1,-1,n,t,-e,a,s,1),m("x","z","y",1,1,e,n,t,i,a,2),m("x","z","y",1,-1,e,n,-t,i,a,3),m("x","y","z",1,-1,e,t,n,i,s,4),m("x","y","z",-1,-1,e,t,-n,i,s,5),this.setIndex(l),this.setAttribute("position",new Ie(c,3)),this.setAttribute("normal",new Ie(d,3)),this.setAttribute("uv",new Ie(u,2));function m(x,g,p,v,b,y,_,w,T,A,M){const S=y/T,E=_/A,I=y/2,O=_/2,q=w/2,z=T+1,V=A+1;let H=0,F=0;const ie=new P;for(let ue=0;ue0?1:-1,d.push(ie.x,ie.y,ie.z),u.push(Ne/T),u.push(1-ue/A),H+=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 i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class B0 extends gt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Oe,this.projectionMatrix=new Oe,this.projectionMatrixInverse=new Oe,this.coordinateSystem=ur,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.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const ss=new P,Ug=new re,Fg=new re;class hn extends B0{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,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=Vo*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(xa*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Vo*2*Math.atan(Math.tan(xa*.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){ss.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(ss.x,ss.y).multiplyScalar(-e/ss.z),ss.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(ss.x,ss.y).multiplyScalar(-e/ss.z)}getViewSize(e,t){return this.getViewBounds(e,Ug,Fg),t.subVectors(Fg,Ug)}setViewOffset(e,t,n,i,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=i,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(xa*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,s=-.5*i;const a=this.view;if(this.view!==null&&this.view.enabled){const l=a.fullWidth,c=a.fullHeight;s+=a.offsetX*i/l,t-=a.offsetY*n/c,i*=a.width/l,n*=a.height/c}const o=this.filmOffset;o!==0&&(s+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,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}}const no=-90,ro=1;class Yy extends gt{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new hn(no,ro,e,t);i.layers=this.layers,this.add(i);const s=new hn(no,ro,e,t);s.layers=this.layers,this.add(s);const a=new hn(no,ro,e,t);a.layers=this.layers,this.add(a);const o=new hn(no,ro,e,t);o.layers=this.layers,this.add(o);const l=new hn(no,ro,e,t);l.layers=this.layers,this.add(l);const c=new hn(no,ro,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,i,s,a,o,l]=t;for(const c of t)this.remove(c);if(e===ur)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.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),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Bo)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.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),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,a,o,l,c,d]=this.children,u=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),m=e.xr.enabled;e.xr.enabled=!1;const x=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(t,s),e.setRenderTarget(n,1,i),e.render(t,a),e.setRenderTarget(n,2,i),e.render(t,o),e.setRenderTarget(n,3,i),e.render(t,l),e.setRenderTarget(n,4,i),e.render(t,c),n.texture.generateMipmaps=x,e.setRenderTarget(n,5,i),e.render(t,d),e.setRenderTarget(u,h,f),e.xr.enabled=m,n.texture.needsPMREMUpdate=!0}}class Dc extends $t{constructor(e=[],t=Wi,n,i,s,a,o,l,c,d){super(e,t,n,i,s,a,o,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Zy extends di{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new Dc(i),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 ); + + } + `},i=new ui(5,5,5),s=new Pr({name:"CubemapFromEquirect",uniforms:Go(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Rn,blending:ai});s.uniforms.tEquirect.value=t;const a=new en(i,s),o=t.minFilter;return t.minFilter===ri&&(t.minFilter=Qt),new Yy(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){const s=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,i);e.setRenderTarget(s)}}class ko extends gt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const k5={type:"move"};class fu{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new ko,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new ko,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new P,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new P),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new ko,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new P,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new P),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,s=null,a=null;const o=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){a=!0;for(const x of e.hand.values()){const g=t.getJointPose(x,n),p=this._getHandJoint(c,x);g!==null&&(p.matrix.fromArray(g.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.matrixWorldNeedsUpdate=!0,p.jointRadius=g.radius),p.visible=g!==null}const d=c.joints["index-finger-tip"],u=c.joints["thumb-tip"],h=d.position.distanceTo(u.position),f=.02,m=.005;c.inputState.pinching&&h>f+m?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=f-m&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,n),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));o!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(k5)))}return o!==null&&(o.visible=i!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new ko;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class z0{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new De(e),this.density=t}clone(){return new z0(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class V0{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new De(e),this.near=t,this.far=n}clone(){return new V0(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class dm extends gt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new mr,this.environmentIntensity=1,this.environmentRotation=new mr,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(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}}class G0{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=hc,this.updateRanges=[],this.version=0,this.uuid=pr()}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.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,s=this.stride;ie.far||t.push({distance:l,point:ul.clone(),uv:kt.getInterpolation(ul,od,fl,ld,Og,qh,qg,new re),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function cd(r,e,t,n,i,s){oo.subVectors(r,t).addScalar(.5).multiply(n),i!==void 0?(hl.x=s*oo.x-i*oo.y,hl.y=i*oo.x+s*oo.y):hl.copy(oo),r.copy(e),r.x+=hl.x,r.y+=hl.y,r.applyMatrix4($y)}const dd=new P,Bg=new P;class Ky extends gt{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,i=t.length;n0){let n,i;for(n=1,i=t.length;n0){dd.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(dd);this.getObjectForDistance(i).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){dd.setFromMatrixPosition(e.matrixWorld),Bg.setFromMatrixPosition(this.matrixWorld);const n=dd.distanceTo(Bg)/e.zoom;t[0].object.visible=!0;let i,s;for(i=1,s=t.length;i=a)t[i-1].object.visible=!1,t[i].object.visible=!0;else break}for(this._currentLevel=i-1;i1?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||P5.getNormalMatrix(e),i=this.coplanarPoint(Vh).applyMatrix4(e),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.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 Fs=new rn,D5=new re(.5,.5),fd=new P;class jo{constructor(e=new Mr,t=new Mr,n=new Mr,i=new Mr,s=new Mr,a=new Mr){this.planes=[e,t,n,i,s,a]}set(e,t,n,i,s,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(i),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=ur,n=!1){const i=this.planes,s=e.elements,a=s[0],o=s[1],l=s[2],c=s[3],d=s[4],u=s[5],h=s[6],f=s[7],m=s[8],x=s[9],g=s[10],p=s[11],v=s[12],b=s[13],y=s[14],_=s[15];if(i[0].setComponents(c-a,f-d,p-m,_-v).normalize(),i[1].setComponents(c+a,f+d,p+m,_+v).normalize(),i[2].setComponents(c+o,f+u,p+x,_+b).normalize(),i[3].setComponents(c-o,f-u,p-x,_-b).normalize(),n)i[4].setComponents(l,h,g,y).normalize(),i[5].setComponents(c-l,f-h,p-g,_-y).normalize();else if(i[4].setComponents(c-l,f-h,p-g,_-y).normalize(),t===ur)i[5].setComponents(c+l,f+h,p+g,_+y).normalize();else if(t===Bo)i[5].setComponents(l,h,g,y).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(),Fs.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Fs.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Fs)}intersectsSprite(e){Fs.center.set(0,0,0);const t=D5.distanceTo(e.center);return Fs.radius=.7071067811865476+t,Fs.applyMatrix4(e.matrixWorld),this.intersectsSphere(Fs)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(n)0?e.max.x:e.min.x,fd.y=i.normal.y>0?e.max.y:e.min.y,fd.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(fd)<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)}}const Jr=new Oe,Qr=new jo;class W0{constructor(){this.coordinateSystem=ur}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let n=0;n=s.length&&s.push({start:-1,count:-1,z:-1,index:-1});const o=s[this.index];a.push(o),this.index++,o.start=e,o.count=t,o.z=n,o.index=i}reset(){this.list.length=0,this.index=0}}const Xn=new Oe,F5=new De(1,1,1),$g=new jo,O5=new W0,pd=new wt,Os=new rn,gl=new P,jg=new P,q5=new P,Hh=new U5,An=new en,md=[];function B5(r,e,t=0){const n=e.itemSize;if(r.isInterleavedBufferAttribute||r.array.constructor!==e.array.constructor){const i=r.count;for(let s=0;s65535?new Uint32Array(i):new Uint16Array(i);t.setIndex(new ft(s,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(!e.hasAttribute(n))throw new Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const i=e.getAttribute(n),s=t.getAttribute(n);if(i.itemSize!==s.itemSize||i.normalized!==s.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new wt);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,i=t.length;n=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const n={visible:!0,active:!0,geometryIndex:e};let i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Gh),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=n):(i=this._instanceInfo.length,this._instanceInfo.push(n));const s=this._matricesTexture;Xn.identity().toArray(s.image.data,i*16),s.needsUpdate=!0;const a=this._colorsTexture;return a&&(F5.toArray(a.image.data,i*4),a.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},s=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const a=e.getIndex();if(a!==null&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=n===-1?a.count:n),i.indexStart!==-1&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Gh),l=this._availableGeometryIds.shift(),s[l]=i):(l=this._geometryCount,this._geometryCount++,s.push(i)),this.setGeometryAt(l,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,l}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,i=n.getIndex()!==null,s=n.getIndex(),a=t.getIndex(),o=this._geometryInfo[e];if(i&&a.count>o.reservedIndexCount||t.attributes.position.count>o.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const l=o.vertexStart,c=o.reservedVertexCount;o.vertexCount=t.getAttribute("position").count;for(const d in n.attributes){const u=t.getAttribute(d),h=n.getAttribute(d);B5(u,h,l);const f=u.itemSize;for(let m=u.count,x=c;m=t.length||t[e].active===!1)return this;const n=this._instanceInfo;for(let i=0,s=n.length;io).sort((a,o)=>n[a].vertexStart-n[o].vertexStart),s=this.geometry;for(let a=0,o=n.length;a=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){const s=new wt,a=n.index,o=n.attributes.position;for(let l=i.start,c=i.start+i.count;l=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[e];if(i.boundingSphere===null){const s=new rn;this.getBoundingBoxAt(e,pd),pd.getCenter(s.center);const a=n.index,o=n.attributes.position;let l=0;for(let c=i.start,d=i.start+i.count;co.active);if(Math.max(...n.map(o=>o.vertexStart+o.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...n.map(l=>l.indexStart+l.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const s=this.geometry;s.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new st,this._initializeGeometry(s));const a=this.geometry;s.index&&qs(s.index.array,a.index.array);for(const o in s.attributes)qs(s.attributes[o].array,a.attributes[o].array)}raycast(e,t){const n=this._instanceInfo,i=this._geometryInfo,s=this.matrixWorld,a=this.geometry;An.material=this.material,An.geometry.index=a.index,An.geometry.attributes=a.attributes,An.geometry.boundingBox===null&&(An.geometry.boundingBox=new wt),An.geometry.boundingSphere===null&&(An.geometry.boundingSphere=new rn);for(let o=0,l=n.length;o({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,i,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const a=i.getIndex(),o=a===null?1:a.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,d=this._multiDrawCounts,u=this._geometryInfo,h=this.perObjectFrustumCulled,f=this._indirectTexture,m=f.image.data,x=n.isArrayCamera?O5:$g;h&&!n.isArrayCamera&&(Xn.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),$g.setFromProjectionMatrix(Xn,n.coordinateSystem,n.reversedDepth));let g=0;if(this.sortObjects){Xn.copy(this.matrixWorld).invert(),gl.setFromMatrixPosition(n.matrixWorld).applyMatrix4(Xn),jg.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(Xn);for(let b=0,y=l.length;b0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=i.length;sn)return;Wh.applyMatrix4(r.matrixWorld);const c=e.ray.origin.distanceTo(Wh);if(!(ce.far))return{distance:c,point:Jg.clone().applyMatrix4(r.matrixWorld),index:a,face:null,faceIndex:null,barycoord:null,object:r}}const Qg=new P,ex=new P;class mi extends As{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,s=t.count;i0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=i.length;si.far)return;s.push({distance:c,distanceToRay:Math.sqrt(o),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:a})}}class rv extends $t{constructor(e,t,n,i,s=Qt,a=Qt,o,l,c){super(e,t,n,i,s,a,o,l,c),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const d=this;function u(){d.needsUpdate=!0,d._requestVideoFrameCallbackId=e.requestVideoFrameCallback(u)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(u))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class z5 extends rv{constructor(e,t,n,i,s,a,o,l){super({},e,t,n,i,s,a,o,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class V5 extends $t{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=yn,this.minFilter=yn,this.generateMipmaps=!1,this.needsUpdate=!0}}class X0 extends $t{constructor(e,t,n,i,s,a,o,l,c,d,u,h){super(null,a,o,l,c,d,i,s,u,h),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class G5 extends X0{constructor(e,t,n,i,s,a){super(e,t,n,s,a),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=er,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class H5 extends X0{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,Wi),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class W5 extends $t{constructor(e,t,n,i,s,a,o,l,c){super(e,t,n,i,s,a,o,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class pm extends $t{constructor(e,t,n=Xi,i,s,a,o=yn,l=yn,c,d=Oo,u=1){if(d!==Oo&&d!==qo)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const h={width:e,height:t,depth:u};super(h,i,s,a,o,l,d,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new gs(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 mm extends $t{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class Y0 extends st{constructor(e=1,t=1,n=4,i=8,s=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:i,heightSegments:s},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),i=Math.max(3,Math.floor(i)),s=Math.max(1,Math.floor(s));const a=[],o=[],l=[],c=[],d=t/2,u=Math.PI/2*e,h=t,f=2*u+h,m=n*2+s,x=i+1,g=new P,p=new P;for(let v=0;v<=m;v++){let b=0,y=0,_=0,w=0;if(v<=n){const M=v/n,S=M*Math.PI/2;y=-d-e*Math.cos(S),_=e*Math.sin(S),w=-e*Math.cos(S),b=M*u}else if(v<=n+s){const M=(v-n)/s;y=-d+M*t,_=e,w=0,b=u+M*h}else{const M=(v-n-s)/n,S=M*Math.PI/2;y=d+e*Math.sin(S),_=e*Math.cos(S),w=e*Math.sin(S),b=u+h+M*u}const T=Math.max(0,Math.min(1,b/f));let A=0;v===0?A=.5/i:v===m&&(A=-.5/i);for(let M=0;M<=i;M++){const S=M/i,E=S*Math.PI*2,I=Math.sin(E),O=Math.cos(E);p.x=-_*O,p.y=y,p.z=_*I,o.push(p.x,p.y,p.z),g.set(-_*O,w,_*I),g.normalize(),l.push(g.x,g.y,g.z),c.push(S+A,T)}if(v>0){const M=(v-1)*x;for(let S=0;S0&&b(!0),t>0&&b(!1)),this.setIndex(d),this.setAttribute("position",new Ie(u,3)),this.setAttribute("normal",new Ie(h,3)),this.setAttribute("uv",new Ie(f,2));function v(){const y=new P,_=new P;let w=0;const T=(t-e)/n;for(let A=0;A<=s;A++){const M=[],S=A/s,E=S*(t-e)+e;for(let I=0;I<=i;I++){const O=I/i,q=O*l+o,z=Math.sin(q),V=Math.cos(q);_.x=E*z,_.y=-S*n+g,_.z=E*V,u.push(_.x,_.y,_.z),y.set(z,T,V).normalize(),h.push(y.x,y.y,y.z),f.push(O,1-S),M.push(m++)}x.push(M)}for(let A=0;A0||M!==0)&&(d.push(S,E,O),w+=3),(t>0||M!==s-1)&&(d.push(E,I,O),w+=3)}c.addGroup(p,w,0),p+=w}function b(y){const _=m,w=new re,T=new P;let A=0;const M=y===!0?e:t,S=y===!0?1:-1;for(let I=1;I<=i;I++)u.push(0,g*S,0),h.push(0,S,0),f.push(.5,.5),m++;const E=m;for(let I=0;I<=i;I++){const q=I/i*l+o,z=Math.cos(q),V=Math.sin(q);T.x=M*V,T.y=g*S,T.z=M*z,u.push(T.x,T.y,T.z),h.push(0,S,0),w.x=z*.5+.5,w.y=V*.5*S+.5,f.push(w.x,w.y),m++}for(let I=0;I.9&&T<.1&&(b<.2&&(a[v+0]+=1),y<.2&&(a[v+2]+=1),_<.2&&(a[v+4]+=1))}}function h(v){s.push(v.x,v.y,v.z)}function f(v,b){const y=v*3;b.x=e[y+0],b.y=e[y+1],b.z=e[y+2]}function m(){const v=new P,b=new P,y=new P,_=new P,w=new re,T=new re,A=new re;for(let M=0,S=0;M0)l=i-1;else{l=i;break}if(i=l,n[i]===a)return i/(s-1);const d=n[i],h=n[i+1]-d,f=(a-d)/h;return(i+f)/(s-1)}getTangent(e,t){let i=e-1e-4,s=e+1e-4;i<0&&(i=0),s>1&&(s=1);const a=this.getPoint(i),o=this.getPoint(s),l=t||(a.isVector2?new re:new P);return l.copy(o).sub(a).normalize(),l}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new P,i=[],s=[],a=[],o=new P,l=new Oe;for(let f=0;f<=e;f++){const m=f/e;i[f]=this.getTangentAt(m,new P)}s[0]=new P,a[0]=new P;let c=Number.MAX_VALUE;const d=Math.abs(i[0].x),u=Math.abs(i[0].y),h=Math.abs(i[0].z);d<=c&&(c=d,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),h<=c&&n.set(0,0,1),o.crossVectors(i[0],n).normalize(),s[0].crossVectors(i[0],o),a[0].crossVectors(i[0],s[0]);for(let f=1;f<=e;f++){if(s[f]=s[f-1].clone(),a[f]=a[f-1].clone(),o.crossVectors(i[f-1],i[f]),o.length()>Number.EPSILON){o.normalize();const m=Math.acos(et(i[f-1].dot(i[f]),-1,1));s[f].applyMatrix4(l.makeRotationAxis(o,m))}a[f].crossVectors(i[f],s[f])}if(t===!0){let f=Math.acos(et(s[0].dot(s[e]),-1,1));f/=e,i[0].dot(o.crossVectors(s[0],s[e]))>0&&(f=-f);for(let m=1;m<=e;m++)s[m].applyMatrix4(l.makeRotationAxis(i[m],f*m)),a[m].crossVectors(i[m],s[m])}return{tangents:i,normals:s,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class j0 extends jr{constructor(e=0,t=0,n=1,i=1,s=0,a=Math.PI*2,o=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=s,this.aEndAngle=a,this.aClockwise=o,this.aRotation=l}getPoint(e,t=new re){const n=t,i=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const a=Math.abs(s)i;)s-=i;s0?0:(Math.floor(Math.abs(o)/s)+1)*s:l===0&&o===s-1&&(o=s-2,l=1);let c,d;this.closed||o>0?c=i[(o-1)%s]:(Sd.subVectors(i[0],i[1]).add(i[0]),c=Sd);const u=i[o%s],h=i[(o+1)%s];if(this.closed||o+2i.length-2?i.length-1:a+1],u=i[a>i.length-3?i.length-1:a+2];return n.set(rx(o,l.x,c.x,d.x,u.x),rx(o,l.y,c.y,d.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){const a=i[s]-n,o=this.curves[s],l=o.getLength(),c=l===0?0:1-a/l;return o.getPointAt(c,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,i=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){const u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);const d=c.getPoint(1);return this.currentPoint.copy(d),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class oi extends ba{constructor(e){super(e),this.uuid=pr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,i=this.holes.length;n80*t){o=r[0],l=r[1];let d=o,u=l;for(let h=t;hd&&(d=f),m>u&&(u=m)}c=Math.max(d-o,u-l),c=c!==0?32767/c:0}return mc(s,a,t,o,l,c,0),a}function dv(r,e,t,n,i){let s;if(i===m4(r,e,t,n)>0)for(let a=e;a=e;a-=n)s=ix(a/n|0,r[a],r[a+1],s);return s&&Wo(s,s.next)&&(xc(s),s=s.next),s}function Ra(r,e){if(!r)return r;e||(e=r);let t=r,n;do if(n=!1,!t.steiner&&(Wo(t,t.next)||Vt(t.prev,t,t.next)===0)){if(xc(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function mc(r,e,t,n,i,s,a){if(!r)return;!a&&s&&c4(r,n,i,s);let o=r;for(;r.prev!==r.next;){const l=r.prev,c=r.next;if(s?t4(r,n,i,s):e4(r)){e.push(l.i,r.i,c.i),xc(r),r=c.next,o=c.next;continue}if(r=c,r===o){a?a===1?(r=n4(Ra(r),e),mc(r,e,t,n,i,s,2)):a===2&&r4(r,e,t,n,i,s):mc(Ra(r),e,t,n,i,s,1);break}}}function e4(r){const e=r.prev,t=r,n=r.next;if(Vt(e,t,n)>=0)return!1;const i=e.x,s=t.x,a=n.x,o=e.y,l=t.y,c=n.y,d=Math.min(i,s,a),u=Math.min(o,l,c),h=Math.max(i,s,a),f=Math.max(o,l,c);let m=n.next;for(;m!==e;){if(m.x>=d&&m.x<=h&&m.y>=u&&m.y<=f&&Nl(i,o,s,l,a,c,m.x,m.y)&&Vt(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function t4(r,e,t,n){const i=r.prev,s=r,a=r.next;if(Vt(i,s,a)>=0)return!1;const o=i.x,l=s.x,c=a.x,d=i.y,u=s.y,h=a.y,f=Math.min(o,l,c),m=Math.min(d,u,h),x=Math.max(o,l,c),g=Math.max(d,u,h),p=rp(f,m,e,t,n),v=rp(x,g,e,t,n);let b=r.prevZ,y=r.nextZ;for(;b&&b.z>=p&&y&&y.z<=v;){if(b.x>=f&&b.x<=x&&b.y>=m&&b.y<=g&&b!==i&&b!==a&&Nl(o,d,l,u,c,h,b.x,b.y)&&Vt(b.prev,b,b.next)>=0||(b=b.prevZ,y.x>=f&&y.x<=x&&y.y>=m&&y.y<=g&&y!==i&&y!==a&&Nl(o,d,l,u,c,h,y.x,y.y)&&Vt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;b&&b.z>=p;){if(b.x>=f&&b.x<=x&&b.y>=m&&b.y<=g&&b!==i&&b!==a&&Nl(o,d,l,u,c,h,b.x,b.y)&&Vt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=v;){if(y.x>=f&&y.x<=x&&y.y>=m&&y.y<=g&&y!==i&&y!==a&&Nl(o,d,l,u,c,h,y.x,y.y)&&Vt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function n4(r,e){let t=r;do{const n=t.prev,i=t.next.next;!Wo(n,i)&&hv(n,t,t.next,i)&&gc(n,i)&&gc(i,n)&&(e.push(n.i,t.i,i.i),xc(t),xc(t.next),t=r=i),t=t.next}while(t!==r);return Ra(t)}function r4(r,e,t,n,i,s){let a=r;do{let o=a.next.next;for(;o!==a.prev;){if(a.i!==o.i&&h4(a,o)){let l=fv(a,o);a=Ra(a,a.next),l=Ra(l,l.next),mc(a,e,t,n,i,s,0),mc(l,e,t,n,i,s,0);return}o=o.next}a=a.next}while(a!==r)}function i4(r,e,t,n){const i=[];for(let s=0,a=e.length;s=t.next.y&&t.next.y!==t.y){const u=t.x+(i-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(u<=n&&u>s&&(s=u,a=t.x=t.x&&t.x>=l&&n!==t.x&&uv(ia.x||t.x===a.x&&l4(a,t)))&&(a=t,d=u)}t=t.next}while(t!==o);return a}function l4(r,e){return Vt(r.prev,r,e.prev)<0&&Vt(e.next,r,r.next)<0}function c4(r,e,t,n){let i=r;do i.z===0&&(i.z=rp(i.x,i.y,e,t,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,d4(i)}function d4(r){let e,t=1;do{let n=r,i;r=null;let s=null;for(e=0;n;){e++;let a=n,o=0;for(let c=0;c0||l>0&&a;)o!==0&&(l===0||!a||n.z<=a.z)?(i=n,n=n.nextZ,o--):(i=a,a=a.nextZ,l--),s?s.nextZ=i:r=i,i.prevZ=s,s=i;n=a}s.nextZ=null,t*=2}while(e>1);return r}function rp(r,e,t,n,i){return r=(r-t)*i|0,e=(e-n)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function u4(r){let e=r,t=r;do(e.x=(r-a)*(s-o)&&(r-a)*(n-o)>=(t-a)*(e-o)&&(t-a)*(s-o)>=(i-a)*(n-o)}function Nl(r,e,t,n,i,s,a,o){return!(r===a&&e===o)&&uv(r,e,t,n,i,s,a,o)}function h4(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!f4(r,e)&&(gc(r,e)&&gc(e,r)&&p4(r,e)&&(Vt(r.prev,r,e.prev)||Vt(r,e.prev,e))||Wo(r,e)&&Vt(r.prev,r,r.next)>0&&Vt(e.prev,e,e.next)>0)}function Vt(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function Wo(r,e){return r.x===e.x&&r.y===e.y}function hv(r,e,t,n){const i=Td(Vt(r,e,t)),s=Td(Vt(r,e,n)),a=Td(Vt(t,n,r)),o=Td(Vt(t,n,e));return!!(i!==s&&a!==o||i===0&&Md(r,t,e)||s===0&&Md(r,n,e)||a===0&&Md(t,r,n)||o===0&&Md(t,e,n))}function Md(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function Td(r){return r>0?1:r<0?-1:0}function f4(r,e){let t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&hv(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function gc(r,e){return Vt(r.prev,r,r.next)<0?Vt(r,e,r.next)>=0&&Vt(r,r.prev,e)>=0:Vt(r,e,r.prev)<0||Vt(r,r.next,e)<0}function p4(r,e){let t=r,n=!1;const i=(r.x+e.x)/2,s=(r.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&i<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==r);return n}function fv(r,e){const t=ip(r.i,r.x,r.y),n=ip(e.i,e.x,e.y),i=r.next,s=e.prev;return r.next=e,e.prev=r,t.next=i,i.prev=t,n.next=t,t.prev=n,s.next=n,n.prev=s,n}function ix(r,e,t,n){const i=ip(r,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function xc(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function ip(r,e,t){return{i:r,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function m4(r,e,t,n){let i=0;for(let s=e,a=t-n;s2&&r[e-1].equals(r[0])&&r.pop()}function ax(r,e){for(let t=0;tNumber.EPSILON){const de=Math.sqrt(k),xe=Math.sqrt(Te*Te+B*B),le=D.x-pe/de,Ve=D.y+he/de,Me=ne.x-B/xe,Xe=ne.y+Te/xe,ze=((Me-le)*B-(Xe-Ve)*Te)/(he*B-pe*Te);se=le+he*ze-Z.x,G=Ve+pe*ze-Z.y;const be=se*se+G*G;if(be<=2)return new re(se,G);U=Math.sqrt(be/2)}else{let de=!1;he>Number.EPSILON?Te>Number.EPSILON&&(de=!0):he<-Number.EPSILON?Te<-Number.EPSILON&&(de=!0):Math.sign(pe)===Math.sign(B)&&(de=!0),de?(se=-pe,G=he,U=Math.sqrt(k)):(se=he,G=pe,U=Math.sqrt(k/2))}return new re(se/U,G/U)}const ie=[];for(let Z=0,D=z.length,ne=D-1,se=Z+1;Z=0;Z--){const D=Z/g,ne=f*Math.cos(D*Math.PI/2),se=m*Math.sin(D*Math.PI/2)+x;for(let G=0,U=z.length;G=0;){const se=ne;let G=ne-1;G<0&&(G=Z.length-1);for(let U=0,he=d+g*2;U0)&&f.push(b,y,w),(p!==n-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class bv extends Pn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new De(16777215),this.specular=new De(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new De(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Es,this.normalScale=new re(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new mr,this.combine=Ic,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,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.flatShading=e.flatShading,this.fog=e.fog,this}}class yv extends Pn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new De(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new De(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Es,this.normalScale=new re(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,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.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class vv extends Pn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Es,this.normalScale=new re(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class _v extends Pn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new De(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new De(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Es,this.normalScale=new re(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new mr,this.combine=Ic,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,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.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,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.flatShading=e.flatShading,this.fog=e.fog,this}}class Sm extends Pn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Iy,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 Mm extends Pn{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}}class wv extends Pn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new De(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Es,this.normalScale=new re(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Sv extends Vn{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function da(r,e){return!r||r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)}function Mv(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function Tv(r){function e(i,s){return r[i]-r[s]}const t=r.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function sp(r,e,t){const n=r.length,i=new r.constructor(n);for(let s=0,a=0;a!==n;++s){const o=t[s]*e;for(let l=0;l!==e;++l)i[a++]=r[o+l]}return i}function Tm(r,e,t,n){let i=1,s=r[0];for(;s!==void 0&&s[n]===void 0;)s=r[i++];if(s===void 0)return;let a=s[n];if(a!==void 0)if(Array.isArray(a))do a=s[n],a!==void 0&&(e.push(s.time),t.push(...a)),s=r[i++];while(s!==void 0);else if(a.toArray!==void 0)do a=s[n],a!==void 0&&(e.push(s.time),a.toArray(t,t.length)),s=r[i++];while(s!==void 0);else do a=s[n],a!==void 0&&(e.push(s.time),t.push(a)),s=r[i++];while(s!==void 0)}function v4(r,e,t,n,i=30){const s=r.clone();s.name=e;const a=[];for(let l=0;l=n)){u.push(c.times[f]);for(let x=0;xs.tracks[l].times[0]&&(o=s.tracks[l].times[0]);for(let l=0;l=o.times[m]){const p=m*u+d,v=p+u-d;x=o.values.slice(p,v)}else{const p=o.createInterpolant(),v=d,b=u-d;p.evaluate(s),x=p.resultBuffer.slice(v,b)}l==="quaternion"&&new In().fromArray(x).normalize().conjugate().toArray(x);const g=c.times.length;for(let p=0;p=s)){const o=t[1];e=s)break t}a=n,n=0;break n}break e}for(;n>>1;et;)--a;if(++a,s!==0||a!==i){s>=a&&(a=Math.max(a,1),s=a-1);const o=this.getValueSize();this.times=n.slice(s,a),this.values=this.values.slice(s*o,a*o)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(it("KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,s=n.length;s===0&&(it("KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let o=0;o!==s;o++){const l=n[o];if(typeof l=="number"&&isNaN(l)){it("KeyframeTrack: Time is not a valid number.",this,o,l),e=!1;break}if(a!==null&&a>l){it("KeyframeTrack: Out of order keys.",this,o,l,a),e=!1;break}a=l}if(i!==void 0&&Mv(i))for(let o=0,l=i.length;o!==l;++o){const c=i[o];if(isNaN(c)){it("KeyframeTrack: Value is not a valid number.",this,o,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===hu,s=e.length-1;let a=1;for(let o=1;o0){e[a]=e[s];for(let o=s*n,l=a*n,c=0;c!==n;++c)t[l+c]=t[o+c];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}Nr.prototype.ValueTypeName="";Nr.prototype.TimeBufferType=Float32Array;Nr.prototype.ValueBufferType=Float32Array;Nr.prototype.DefaultInterpolation=d0;class qa extends Nr{constructor(e,t,n){super(e,t,n)}}qa.prototype.ValueTypeName="bool";qa.prototype.ValueBufferType=Array;qa.prototype.DefaultInterpolation=cc;qa.prototype.InterpolantFactoryMethodLinear=void 0;qa.prototype.InterpolantFactoryMethodSmooth=void 0;class km extends Nr{constructor(e,t,n,i){super(e,t,n,i)}}km.prototype.ValueTypeName="color";class bc extends Nr{constructor(e,t,n,i){super(e,t,n,i)}}bc.prototype.ValueTypeName="number";class Ev extends Uc{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const s=this.resultBuffer,a=this.sampleValues,o=this.valueSize,l=(n-t)/(i-t);let c=e*o;for(let d=c+o;c!==d;c+=4)In.slerpFlat(s,0,a,c-o,a,c,l);return s}}class Fc extends Nr{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new Ev(this.times,this.values,this.getValueSize(),e)}}Fc.prototype.ValueTypeName="quaternion";Fc.prototype.InterpolantFactoryMethodSmooth=void 0;class Ba extends Nr{constructor(e,t,n){super(e,t,n)}}Ba.prototype.ValueTypeName="string";Ba.prototype.ValueBufferType=Array;Ba.prototype.DefaultInterpolation=cc;Ba.prototype.InterpolantFactoryMethodLinear=void 0;Ba.prototype.InterpolantFactoryMethodSmooth=void 0;class yc extends Nr{constructor(e,t,n,i){super(e,t,n,i)}}yc.prototype.ValueTypeName="vector";class vc{constructor(e="",t=-1,n=[],i=U0){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=pr(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let a=0,o=n.length;a!==o;++a)t.push(M4(n[a]).scale(i));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s.userData=JSON.parse(e.userData||"{}"),s}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let s=0,a=n.length;s!==a;++s)t.push(Nr.toJSON(n[s]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const s=t.length,a=[];for(let o=0;o1){const u=d[1];let h=i[u];h||(i[u]=h=[]),h.push(c)}}const a=[];for(const o in i)a.push(this.CreateFromMorphTargetSequence(o,i[o],t,n));return a}static parseAnimation(e,t){if(Ce("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return it("AnimationClip: No animation in JSONLoader data."),null;const n=function(u,h,f,m,x){if(f.length!==0){const g=[],p=[];Tm(f,g,p,m),g.length!==0&&x.push(new u(h,g,p))}},i=[],s=e.name||"default",a=e.fps||30,o=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let u=0;u{t&&t(s),this.manager.itemEnd(e)},0),s;if(_i[e]!==void 0){_i[e].push({onLoad:t,onProgress:n,onError:i});return}_i[e]=[],_i[e].push({onLoad:t,onProgress:n,onError:i});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),o=this.mimeType,l=this.responseType;fetch(a).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&Ce("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const d=_i[e],u=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),f=h?parseInt(h):0,m=f!==0;let x=0;const g=new ReadableStream({start(p){v();function v(){u.read().then(({done:b,value:y})=>{if(b)p.close();else{x+=y.byteLength;const _=new ProgressEvent("progress",{lengthComputable:m,loaded:x,total:f});for(let w=0,T=d.length;w{p.error(b)})}}});return new Response(g)}else throw new T4(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>new DOMParser().parseFromString(d,o));case"json":return c.json();default:if(o==="")return c.text();{const u=/charset="?([^;"\s]*)"?/i.exec(o),h=u&&u[1]?u[1].toLowerCase():void 0,f=new TextDecoder(h);return c.arrayBuffer().then(m=>f.decode(m))}}}).then(c=>{ii.add(`file:${e}`,c);const d=_i[e];delete _i[e];for(let u=0,h=d.length;u{const d=_i[e];if(d===void 0)throw this.manager.itemError(e),c;delete _i[e];for(let u=0,h=d.length;u{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class A4 extends Sn{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new Dr(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(o){try{t(s.parse(JSON.parse(o)))}catch(l){i?i(l):it(l),s.manager.itemError(e)}},n,i)}parse(e){const t=[];for(let n=0;n0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const a=e.uniforms[s];switch(i.uniforms[s]={},a.type){case"t":i.uniforms[s].value=n(a.value);break;case"c":i.uniforms[s].value=new De().setHex(a.value);break;case"v2":i.uniforms[s].value=new re().fromArray(a.value);break;case"v3":i.uniforms[s].value=new P().fromArray(a.value);break;case"v4":i.uniforms[s].value=new ot().fromArray(a.value);break;case"m3":i.uniforms[s].value=new Je().fromArray(a.value);break;case"m4":i.uniforms[s].value=new Oe().fromArray(a.value);break;default:i.uniforms[s].value=a.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)i.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=n(e.map)),e.matcap!==void 0&&(i.matcap=n(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),i.normalScale=new re().fromArray(s)}return e.displacementMap!==void 0&&(i.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=n(e.envMap)),e.envMapRotation!==void 0&&i.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new re().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=n(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return ih.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:mv,SpriteMaterial:um,RawShaderMaterial:gv,ShaderMaterial:Pr,PointsMaterial:fm,MeshPhysicalMaterial:xv,MeshStandardMaterial:wm,MeshPhongMaterial:bv,MeshToonMaterial:yv,MeshNormalMaterial:vv,MeshLambertMaterial:_v,MeshDepthMaterial:Sm,MeshDistanceMaterial:Mm,MeshBasicMaterial:ji,MeshMatcapMaterial:wv,LineDashedMaterial:Sv,LineBasicMaterial:Vn,Material:Pn};return new t[e]}}class ap{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class Fv extends st{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class Ov extends Sn{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new Dr(s.manager);a.setPath(s.path),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,function(o){try{t(s.parse(JSON.parse(o)))}catch(l){i?i(l):it(l),s.manager.itemError(e)}},n,i)}parse(e){const t={},n={};function i(f,m){if(t[m]!==void 0)return t[m];const g=f.interleavedBuffers[m],p=s(f,g.buffer),v=Ao(g.type,p),b=new G0(v,g.stride);return b.uuid=g.uuid,t[m]=b,b}function s(f,m){if(n[m]!==void 0)return n[m];const g=f.arrayBuffers[m],p=new Uint32Array(g).buffer;return n[m]=p,p}const a=e.isInstancedBufferGeometry?new Fv:new st,o=e.data.index;if(o!==void 0){const f=Ao(o.type,o.array);a.setIndex(new ft(f,1))}const l=e.data.attributes;for(const f in l){const m=l[f];let x;if(m.isInterleavedBufferAttribute){const g=i(e.data,m.data);x=new Ea(g,m.itemSize,m.offset,m.normalized)}else{const g=Ao(m.type,m.array),p=m.isInstancedBufferAttribute?Ho:ft;x=new p(g,m.itemSize,m.normalized)}m.name!==void 0&&(x.name=m.name),m.usage!==void 0&&x.setUsage(m.usage),a.setAttribute(f,x)}const c=e.data.morphAttributes;if(c)for(const f in c){const m=c[f],x=[];for(let g=0,p=m.length;g0){const l=new Em(t);s=new _c(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,d=e.length;c0){i=new _c(this.manager),i.setCrossOrigin(this.crossOrigin);for(let a=0,o=e.length;a{let g=null,p=null;return x.boundingBox!==void 0&&(g=new wt().fromJSON(x.boundingBox)),x.boundingSphere!==void 0&&(p=new rn().fromJSON(x.boundingSphere)),{...x,boundingBox:g,boundingSphere:p}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=c(e.matricesTexture.uuid),a._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(a._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(a.boundingSphere=new rn().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(a.boundingBox=new wt().fromJSON(e.boundingBox));break;case"LOD":a=new Ky;break;case"Line":a=new As(o(e.geometry),l(e.material));break;case"LineLoop":a=new tv(o(e.geometry),l(e.material));break;case"LineSegments":a=new mi(o(e.geometry),l(e.material));break;case"PointCloud":case"Points":a=new nv(o(e.geometry),l(e.material));break;case"Sprite":a=new jy(l(e.material));break;case"Group":a=new ko;break;case"Bone":a=new hm;break;default:a=new gt}if(a.uuid=e.uuid,e.name!==void 0&&(a.name=e.name),e.matrix!==void 0?(a.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(e.position!==void 0&&a.position.fromArray(e.position),e.rotation!==void 0&&a.rotation.fromArray(e.rotation),e.quaternion!==void 0&&a.quaternion.fromArray(e.quaternion),e.scale!==void 0&&a.scale.fromArray(e.scale)),e.up!==void 0&&a.up.fromArray(e.up),e.castShadow!==void 0&&(a.castShadow=e.castShadow),e.receiveShadow!==void 0&&(a.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(a.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(a.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(a.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(a.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(a.visible=e.visible),e.frustumCulled!==void 0&&(a.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(a.renderOrder=e.renderOrder),e.userData!==void 0&&(a.userData=e.userData),e.layers!==void 0&&(a.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let f=0;f"u"&&Ce("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&Ce("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,a=ii.get(`image-bitmap:${e}`);if(a!==void 0){if(s.manager.itemStart(e),a.then){a.then(c=>{if(Jh.has(a)===!0)i&&i(Jh.get(a)),s.manager.itemError(e),s.manager.itemEnd(e);else return t&&t(c),s.manager.itemEnd(e),c});return}return setTimeout(function(){t&&t(a),s.manager.itemEnd(e)},0),a}const o={};o.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",o.headers=this.requestHeader,o.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const l=fetch(e,o).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return ii.add(`image-bitmap:${e}`,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){i&&i(c),Jh.set(l,c),ii.remove(`image-bitmap:${e}`),s.manager.itemError(e),s.manager.itemEnd(e)});ii.add(`image-bitmap:${e}`,l),s.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let Ad;class Rm{static getContext(){return Ad===void 0&&(Ad=new(window.AudioContext||window.webkitAudioContext)),Ad}static setContext(e){Ad=e}}class F4 extends Sn{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new Dr(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){try{const c=l.slice(0);Rm.getContext().decodeAudioData(c,function(u){t(u)}).catch(o)}catch(c){o(c)}},n,i);function o(l){i?i(l):it(l),s.manager.itemError(e)}}}const px=new Oe,mx=new Oe,Bs=new Oe;class O4{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new hn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new hn,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,Bs.copy(e.projectionMatrix);const i=t.eyeSep/2,s=i*t.near/t.focus,a=t.near*Math.tan(xa*t.fov*.5)/t.zoom;let o,l;mx.elements[12]=-i,px.elements[12]=i,o=-a*t.aspect+s,l=a*t.aspect+s,Bs.elements[0]=2*t.near/(l-o),Bs.elements[8]=(l+o)/(l-o),this.cameraL.projectionMatrix.copy(Bs),o=-a*t.aspect-s,l=a*t.aspect-s,Bs.elements[0]=2*t.near/(l-o),Bs.elements[8]=(l+o)/(l-o),this.cameraR.projectionMatrix.copy(Bs)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(mx),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(px)}}class qv extends hn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class Bv{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}const zs=new P,Qh=new In,q4=new P,Vs=new P,Gs=new P;class B4 extends gt{constructor(){super(),this.type="AudioListener",this.context=Rm.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Bv}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(zs,Qh,q4),Vs.set(0,0,-1).applyQuaternion(Qh),Gs.set(0,1,0).applyQuaternion(Qh),t.positionX){const n=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(zs.x,n),t.positionY.linearRampToValueAtTime(zs.y,n),t.positionZ.linearRampToValueAtTime(zs.z,n),t.forwardX.linearRampToValueAtTime(Vs.x,n),t.forwardY.linearRampToValueAtTime(Vs.y,n),t.forwardZ.linearRampToValueAtTime(Vs.z,n),t.upX.linearRampToValueAtTime(Gs.x,n),t.upY.linearRampToValueAtTime(Gs.y,n),t.upZ.linearRampToValueAtTime(Gs.z,n)}else t.setPosition(zs.x,zs.y,zs.z),t.setOrientation(Vs.x,Vs.y,Vs.z,Gs.x,Gs.y,Gs.z)}}class zv extends gt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){Ce("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){Ce("Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){Ce("Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){Ce("Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(n[l]!==n[l+t]){o.setValue(n,i);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let s=n,a=i;s!==a;++s)t[s]=t[i+s%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let a=0;a!==s;++a)e[t+a]=e[n+a]}_slerp(e,t,n,i){In.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,s){const a=this._workIndex*s;In.multiplyQuaternionsFlat(e,a,e,t,e,n),In.slerpFlat(e,t,e,t,e,a,i)}_lerp(e,t,n,i,s){const a=1-i;for(let o=0;o!==s;++o){const l=t+o;e[l]=e[l]*a+e[n+o]*i}}_lerpAdditive(e,t,n,i,s){for(let a=0;a!==s;++a){const o=t+a;e[o]=e[o]+e[n+a]*i}}}const Im="\\[\\]\\.:\\/",H4=new RegExp("["+Im+"]","g"),Pm="[^"+Im+"]",W4="[^"+Im.replace("\\.","")+"]",X4=/((?:WC+[\/:])*)/.source.replace("WC",Pm),Y4=/(WCOD+)?/.source.replace("WCOD",W4),Z4=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Pm),$4=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Pm),j4=new RegExp("^"+X4+Y4+Z4+$4+"$"),K4=["material","materials","bones","map"];class J4{constructor(e,t,n){const i=n||xt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class xt{constructor(e,t,n){this.path=t,this.parsedPath=n||xt.parseTrackName(t),this.node=xt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new xt.Composite(e,t,n):new xt(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(H4,"")}static parseTrackName(e){const t=j4.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=n.nodeName.substring(i+1);K4.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(s){for(let a=0;a=s){const u=s++,h=e[u];t[h.uuid]=d,e[d]=h,t[c]=u,e[u]=l;for(let f=0,m=i;f!==m;++f){const x=n[f],g=x[u],p=x[d];x[d]=g,x[u]=p}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let s=this.nCachedObjects_,a=e.length;for(let o=0,l=arguments.length;o!==l;++o){const c=arguments[o],d=c.uuid,u=t[d];if(u!==void 0)if(delete t[d],u0&&(t[f.uuid]=u),e[u]=f,e.pop();for(let m=0,x=i;m!==x;++m){const g=n[m];g[u]=g[h],g.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const n=this._bindingsIndicesByPath;let i=n[e];const s=this._bindings;if(i!==void 0)return s[i];const a=this._paths,o=this._parsedPaths,l=this._objects,c=l.length,d=this.nCachedObjects_,u=new Array(c);i=s.length,n[e]=i,a.push(e),o.push(t),s.push(u);for(let h=d,f=l.length;h!==f;++h){const m=l[h];u[h]=new xt(m,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){const i=this._paths,s=this._parsedPaths,a=this._bindings,o=a.length-1,l=a[o],c=e[o];t[c]=n,a[n]=l,a.pop(),s[n]=s[o],s.pop(),i[n]=i[o],i.pop()}}}class Gv{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;const s=t.tracks,a=s.length,o=new Array(a),l={endingStart:la,endingEnd:la};for(let c=0;c!==a;++c){const d=s[c].createInterpolant(null);o[c]=d,d.settings=l}this._interpolantSettings=l,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Cy,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){const i=this._clip.duration,s=e._clip.duration,a=s/i,o=i/s;e.warp(1,a,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const i=this._mixer,s=i.time,a=this.timeScale;let o=this._timeScaleInterpolant;o===null&&(o=i._lendControlInterpolant(),this._timeScaleInterpolant=o);const l=o.parameterPositions,c=o.sampleValues;return l[0]=s,l[1]=s+n,c[0]=e/a,c[1]=t/a,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*n;l<0||n===0?t=0:(this._startTime=null,t=n*l)}t*=this._updateTimeScale(e);const a=this._updateTime(t),o=this._updateWeight(e);if(o>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case rm:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(a),c[d].accumulateAdditive(o);break;case U0:default:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(a),c[d].accumulate(i,o)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(n!==null){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(n!==null){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let i=this.time+e,s=this._loopCount;const a=n===Ry;if(e===0)return s===-1?i:a&&(s&1)===1?t-i:i;if(n===Ey){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),i>=t||i<0){const o=Math.floor(i/t);i-=t*o,s+=Math.abs(o);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=s,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=i;if(a&&(s&1)===1)return t-i}return i}_setEndings(e,t,n){const i=this._interpolantSettings;n?(i.endingStart=ca,i.endingEnd=ca):(e?i.endingStart=this.zeroSlopeAtStart?ca:la:i.endingStart=dc,t?i.endingEnd=this.zeroSlopeAtEnd?ca:la:i.endingEnd=dc)}_scheduleFading(e,t,n){const i=this._mixer,s=i.time;let a=this._weightInterpolant;a===null&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,l=a.sampleValues;return o[0]=s,l[0]=t,o[1]=s+e,l[1]=n,this}}const eS=new Float32Array(1);class tS extends pi{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,i=e._clip.tracks,s=i.length,a=e._propertyBindings,o=e._interpolants,l=n.uuid,c=this._bindingsByRootAndName;let d=c[l];d===void 0&&(d={},c[l]=d);for(let u=0;u!==s;++u){const h=i[u],f=h.name;let m=d[f];if(m!==void 0)++m.referenceCount,a[u]=m;else{if(m=a[u],m!==void 0){m._cacheIndex===null&&(++m.referenceCount,this._addInactiveBinding(m,l,f));continue}const x=t&&t._propertyBindings[u].binding.parsedPath;m=new Vv(xt.create(n,f,x),h.ValueTypeName,h.getValueSize()),++m.referenceCount,this._addInactiveBinding(m,l,f),a[u]=m}o[u].resultBuffer=m.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,i=e._clip.uuid,s=this._actionsByClip[i];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,i,n)}const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const s=t[n];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const s=t[n];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,i=this.time+=e,s=Math.sign(e),a=this._accuIndex^=1;for(let c=0;c!==n;++c)t[c]._update(i,e,s,a);const o=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)o[c].apply(a);return this}setTime(e){this.time=0;for(let t=0;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}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}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))}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}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,yx).distanceTo(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}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)}}const vx=new P,kd=new P,uo=new P,ho=new P,ef=new P,uS=new P,hS=new P;class rr{constructor(e=new P,t=new P){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){vx.subVectors(e,this.start),kd.subVectors(this.end,this.start);const n=kd.dot(kd);let s=kd.dot(vx)/n;return t&&(s=et(s,0,1)),s}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}distanceSqToLine3(e,t=uS,n=hS){const i=10000000000000001e-32;let s,a;const o=this.start,l=e.start,c=this.end,d=e.end;uo.subVectors(c,o),ho.subVectors(d,l),ef.subVectors(o,l);const u=uo.dot(uo),h=ho.dot(ho),f=ho.dot(ef);if(u<=i&&h<=i)return t.copy(o),n.copy(l),t.sub(n),t.dot(t);if(u<=i)s=0,a=f/h,a=et(a,0,1);else{const m=uo.dot(ef);if(h<=i)a=0,s=et(-m/u,0,1);else{const x=uo.dot(ho),g=u*h-x*x;g!==0?s=et((x*f-m*h)/g,0,1):s=0,a=(x*s+f)/h,a<0?(a=0,s=et(-m/u,0,1)):a>1&&(a=1,s=et((x-m)/u,0,1))}}return t.copy(o).add(uo.multiplyScalar(s)),n.copy(l).add(ho.multiplyScalar(a)),t.sub(n),t.dot(t)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const _x=new P;class fS extends gt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new st,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let a=0,o=1,l=32;a1)for(let u=0;u.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Ax.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Ax,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class AS extends mi{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new st;i.setAttribute("position",new Ie(t,3)),i.setAttribute("color",new Ie(n,3));const s=new Vn({vertexColors:!0,toneMapped:!1});super(i,s),this.type="AxesHelper"}setColors(e,t,n){const i=new De,s=this.geometry.attributes.color.array;return i.set(e),i.toArray(s,0),i.toArray(s,3),i.set(t),i.toArray(s,6),i.toArray(s,9),i.set(n),i.toArray(s,12),i.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Ri{constructor(){this.type="ShapePath",this.color=new De,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new ba,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,i){return this.currentPath.quadraticCurveTo(e,t,n,i),this}bezierCurveTo(e,t,n,i,s,a){return this.currentPath.bezierCurveTo(e,t,n,i,s,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(p){const v=[];for(let b=0,y=p.length;bNumber.EPSILON){if(S<0&&(T=v[w],M=-M,A=v[_],S=-S),p.yA.y)continue;if(p.y===T.y){if(p.x===T.x)return!0}else{const E=S*(p.x-T.x)-M*(p.y-T.y);if(E===0)return!0;if(E<0)continue;y=!y}}else{if(p.y!==T.y)continue;if(A.x<=p.x&&p.x<=T.x||T.x<=p.x&&p.x<=A.x)return!0}}return y}const i=kr.isClockWise,s=this.subPaths;if(s.length===0)return[];let a,o,l;const c=[];if(s.length===1)return o=s[0],l=new oi,l.curves=o.curves,c.push(l),c;let d=!i(s[0].getPoints());d=e?!d:d;const u=[],h=[];let f=[],m=0,x;h[m]=void 0,f[m]=[];for(let p=0,v=s.length;p1){let p=!1,v=0;for(let b=0,y=h.length;b0&&p===!1&&(f=u)}let g;for(let p=0,v=h.length;pe?(r.repeat.x=1,r.repeat.y=t/e,r.offset.x=0,r.offset.y=(1-r.repeat.y)/2):(r.repeat.x=e/t,r.repeat.y=1,r.offset.x=(1-r.repeat.x)/2,r.offset.y=0),r}function ES(r,e){const t=r.image&&r.image.width?r.image.width/r.image.height:1;return t>e?(r.repeat.x=e/t,r.repeat.y=1,r.offset.x=(1-r.repeat.x)/2,r.offset.y=0):(r.repeat.x=1,r.repeat.y=t/e,r.offset.x=0,r.offset.y=(1-r.repeat.y)/2),r}function CS(r){return r.repeat.x=1,r.repeat.y=1,r.offset.x=0,r.offset.y=0,r}function cp(r,e,t,n){const i=RS(n);switch(t){case tm:return r*e;case P0:return r*e/i.components*i.byteLength;case Pc:return r*e/i.components*i.byteLength;case D0:return r*e*2/i.components*i.byteLength;case L0:return r*e*2/i.components*i.byteLength;case nm:return r*e*3/i.components*i.byteLength;case qn:return r*e*4/i.components*i.byteLength;case N0:return r*e*4/i.components*i.byteLength;case Wl:case Xl:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*8;case Yl:case Zl:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*16;case Fu:case qu:return Math.max(r,16)*Math.max(e,8)/4;case Uu:case Ou:return Math.max(r,8)*Math.max(e,8)/2;case Bu:case zu:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*8;case Vu:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*16;case Gu:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*16;case Hu:return Math.floor((r+4)/5)*Math.floor((e+3)/4)*16;case Wu:return Math.floor((r+4)/5)*Math.floor((e+4)/5)*16;case Xu:return Math.floor((r+5)/6)*Math.floor((e+4)/5)*16;case Yu:return Math.floor((r+5)/6)*Math.floor((e+5)/6)*16;case Zu:return Math.floor((r+7)/8)*Math.floor((e+4)/5)*16;case $u:return Math.floor((r+7)/8)*Math.floor((e+5)/6)*16;case ju:return Math.floor((r+7)/8)*Math.floor((e+7)/8)*16;case Ku:return Math.floor((r+9)/10)*Math.floor((e+4)/5)*16;case Ju:return Math.floor((r+9)/10)*Math.floor((e+5)/6)*16;case Qu:return Math.floor((r+9)/10)*Math.floor((e+7)/8)*16;case e0:return Math.floor((r+9)/10)*Math.floor((e+9)/10)*16;case t0:return Math.floor((r+11)/12)*Math.floor((e+9)/10)*16;case n0:return Math.floor((r+11)/12)*Math.floor((e+11)/12)*16;case r0:case i0:case s0:return Math.ceil(r/4)*Math.ceil(e/4)*16;case a0:case o0:return Math.ceil(r/4)*Math.ceil(e/4)*8;case l0:case c0:return Math.ceil(r/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function RS(r){switch(r){case Yr:case Kp:return{byteLength:1,components:1};case Uo:case Jp:case Oa:return{byteLength:2,components:1};case R0:case I0:return{byteLength:2,components:4};case Xi:case C0:case tr:return{byteLength:4,components:1};case Qp:case em:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${r}.`)}class IS{static contain(e,t){return kS(e,t)}static cover(e,t){return ES(e,t)}static fill(e){return CS(e)}static getByteLength(e,t,n,i){return cp(e,t,n,i)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Zo}}));typeof window<"u"&&(window.__THREE__?Ce("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Zo);function Yv(){let r=null,e=!1,t=null,n=null;function i(s,a){t(s,a),n=r.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(n=r.requestAnimationFrame(i),e=!0)},stop:function(){r.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){r=s}}}function PS(r){const e=new WeakMap;function t(o,l){const c=o.array,d=o.usage,u=c.byteLength,h=r.createBuffer();r.bindBuffer(l,h),r.bufferData(l,c,d),o.onUploadCallback();let f;if(c instanceof Float32Array)f=r.FLOAT;else if(typeof Float16Array<"u"&&c instanceof Float16Array)f=r.HALF_FLOAT;else if(c instanceof Uint16Array)o.isFloat16BufferAttribute?f=r.HALF_FLOAT:f=r.UNSIGNED_SHORT;else if(c instanceof Int16Array)f=r.SHORT;else if(c instanceof Uint32Array)f=r.UNSIGNED_INT;else if(c instanceof Int32Array)f=r.INT;else if(c instanceof Int8Array)f=r.BYTE;else if(c instanceof Uint8Array)f=r.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)f=r.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:h,type:f,bytesPerElement:c.BYTES_PER_ELEMENT,version:o.version,size:u}}function n(o,l,c){const d=l.array,u=l.updateRanges;if(r.bindBuffer(c,o),u.length===0)r.bufferSubData(c,0,d);else{u.sort((f,m)=>f.start-m.start);let h=0;for(let f=1;f 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`,$S=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,jS=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,KS=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,JS=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,QS=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,eM=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + varying vec3 vColor; +#endif`,tM=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif +#ifdef USE_BATCHING_COLOR + vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); + vColor.xyz *= batchingColor.xyz; +#endif`,nM=`#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`,rM=`#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`,iM=`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`,sM=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,aM=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); +#endif`,oM=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); + #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE + emissiveColor = sRGBTransferEOTF( emissiveColor ); + #endif + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,lM=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,cM="gl_FragColor = linearToOutputTexel( gl_FragColor );",dM=`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 ); +}`,uM=`#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 ) ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #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`,hM=`#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`,fM=`#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`,pM=`#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`,mM=`#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`,gM=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,xM=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,bM=`#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`,yM=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,vM=`#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 +}`,_M=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,wM=`LambertMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularStrength = specularStrength;`,SM=`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`,MM=`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`,TM=`#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`,AM=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,kM=`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`,EM=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,CM=`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`,RM=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - 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 = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), 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.07, 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`,IM=`uniform sampler2D dfgLUT; +struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + 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; + #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 saturate(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.specularColor; + 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 a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; + float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; + float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); + return saturate( DG * RECIPROCAL_PI ); +} +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + vec2 uv = vec2( roughness, dotNV ); + return texture2D( dfgLUT, uv ).rg; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + 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 + vec2 fab = DFGApprox( normal, viewDir, roughness ); + #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 = DFGApprox( vec3(0.0, 0.0, 1.0), vec3(sqrt(1.0 - dotNV * dotNV), 0.0, dotNV), material.roughness ); + vec2 dfgL = DFGApprox( vec3(0.0, 0.0, 1.0), vec3(sqrt(1.0 - dotNL * dotNL), 0.0, dotNL), material.roughness ); + vec3 FssEss_V = material.specularColor * dfgV.x + material.specularF90 * dfgV.y; + vec3 FssEss_L = material.specularColor * 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.specularColor + ( 1.0 - material.specularColor ) * 0.047619; + vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg * 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.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#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 ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +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 ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +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 ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + #ifdef USE_IRIDESCENCE + computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); + #else + computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + #endif + vec3 totalScattering = singleScattering + multiScattering; + vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#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 ); +}`,PM=` +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.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); + 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 ) + 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`,DM=`#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( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometryNormal ); + #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`,LM=`#if defined( RE_IndirectDiffuse ) + 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`,NM=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) + gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,UM=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,FM=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER + varying float vFragDepth; + varying float vIsPerspective; +#endif`,OM=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); +#endif`,qM=`#ifdef USE_MAP + vec4 sampledDiffuseColor = texture2D( map, vMapUv ); + #ifdef DECODE_VIDEO_TEXTURE + sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); + #endif + diffuseColor *= sampledDiffuseColor; +#endif`,BM=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,zM=`#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`,VM=`#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`,GM=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); + metalnessFactor *= texelMetalness.b; +#endif`,HM=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,WM=`#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`,XM=`#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`,YM=`#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`,ZM=`#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`,$M=`#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`,jM=`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;`,KM=`#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`,JM=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,QM=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,e6=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,t6=`#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`,n6=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = nonPerturbedNormal; +#endif`,r6=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + clearcoatNormal = normalize( tbn2 * clearcoatMapN ); +#endif`,i6=`#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`,s6=`#ifdef USE_IRIDESCENCEMAP + uniform sampler2D iridescenceMap; +#endif +#ifdef USE_IRIDESCENCE_THICKNESSMAP + uniform sampler2D iridescenceThicknessMap; +#endif`,a6=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= material.transmissionAlpha; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,o6=`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 ) { + return depth * ( near - far ) - near; +} +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 ) { + return ( near * far ) / ( ( far - near ) * depth - far ); +}`,l6=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,c6=`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;`,d6=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,u6=`#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`,h6=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); + roughnessFactor *= texelRoughness.g; +#endif`,f6=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,p6=`#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 + uniform sampler2D directionalShadowMap[ 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 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + 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 sampler2D pointShadowMap[ 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 + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + float depth = unpackRGBAToDepth( texture2D( depths, uv ) ); + #ifdef USE_REVERSED_DEPTH_BUFFER + return step( depth, compare ); + #else + return step( compare, depth ); + #endif + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow( sampler2D shadow, vec2 uv, float compare ) { + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + #ifdef USE_REVERSED_DEPTH_BUFFER + float hard_shadow = step( distribution.x, compare ); + #else + float hard_shadow = step( compare, distribution.x ); + #endif + if ( hard_shadow != 1.0 ) { + float distance = compare - distribution.x; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D 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 ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return mix( 1.0, shadow, shadowIntensity ); + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + float shadow = 1.0; + vec3 lightToPosition = shadowCoord.xyz; + + float lightToPositionLength = length( lightToPosition ); + if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { + float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + shadow = ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } + return mix( 1.0, shadow, shadowIntensity ); + } +#endif`,m6=`#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`,g6=`#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`,x6=`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 + 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; +}`,b6=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,y6=`#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`,v6=`#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`,_6=`#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`,w6=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,S6=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,M6=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,T6=`#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; }`,A6=`#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.diffuseColor, material.specularColor, 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`,k6=`#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`,E6=`#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`,C6=`#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`,R6=`#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`,I6=`#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 P6=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,D6=`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 +}`,L6=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,N6=`#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 +}`,U6=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,F6=`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 +}`,O6=`#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; +}`,q6=`#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 +}`,B6=`#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; +}`,z6=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#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 = packDepthToRGBA( dist ); +}`,V6=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,G6=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + gl_FragColor = texture2D( tEquirect, sampleUV ); + #include + #include +}`,H6=`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 +}`,W6=`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 +}`,X6=`#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 +}`,Y6=`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 +}`,Z6=`#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 +}`,$6=`#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 +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 +}`,j6=`#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; +}`,K6=`#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 +}`,J6=`#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 +}`,Q6=`#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 +#include +void main() { + vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); + #ifdef OPAQUE + gl_FragColor.a = 1.0; + #endif +}`,e8=`#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 +}`,t8=`#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 +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 +}`,n8=`#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 +}`,r8=`#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 +#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 + float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); + outgoingLight = outgoingLight * sheenEnergyComp + 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 +}`,i8=`#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 +}`,s8=`#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 +#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 +}`,a8=`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 +}`,o8=`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 +}`,l8=`#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,c8=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,d8=`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 +}`,u8=`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 +}`,je={alphahash_fragment:DS,alphahash_pars_fragment:LS,alphamap_fragment:NS,alphamap_pars_fragment:US,alphatest_fragment:FS,alphatest_pars_fragment:OS,aomap_fragment:qS,aomap_pars_fragment:BS,batching_pars_vertex:zS,batching_vertex:VS,begin_vertex:GS,beginnormal_vertex:HS,bsdfs:WS,iridescence_fragment:XS,bumpmap_pars_fragment:YS,clipping_planes_fragment:ZS,clipping_planes_pars_fragment:$S,clipping_planes_pars_vertex:jS,clipping_planes_vertex:KS,color_fragment:JS,color_pars_fragment:QS,color_pars_vertex:eM,color_vertex:tM,common:nM,cube_uv_reflection_fragment:rM,defaultnormal_vertex:iM,displacementmap_pars_vertex:sM,displacementmap_vertex:aM,emissivemap_fragment:oM,emissivemap_pars_fragment:lM,colorspace_fragment:cM,colorspace_pars_fragment:dM,envmap_fragment:uM,envmap_common_pars_fragment:hM,envmap_pars_fragment:fM,envmap_pars_vertex:pM,envmap_physical_pars_fragment:TM,envmap_vertex:mM,fog_vertex:gM,fog_pars_vertex:xM,fog_fragment:bM,fog_pars_fragment:yM,gradientmap_pars_fragment:vM,lightmap_pars_fragment:_M,lights_lambert_fragment:wM,lights_lambert_pars_fragment:SM,lights_pars_begin:MM,lights_toon_fragment:AM,lights_toon_pars_fragment:kM,lights_phong_fragment:EM,lights_phong_pars_fragment:CM,lights_physical_fragment:RM,lights_physical_pars_fragment:IM,lights_fragment_begin:PM,lights_fragment_maps:DM,lights_fragment_end:LM,logdepthbuf_fragment:NM,logdepthbuf_pars_fragment:UM,logdepthbuf_pars_vertex:FM,logdepthbuf_vertex:OM,map_fragment:qM,map_pars_fragment:BM,map_particle_fragment:zM,map_particle_pars_fragment:VM,metalnessmap_fragment:GM,metalnessmap_pars_fragment:HM,morphinstance_vertex:WM,morphcolor_vertex:XM,morphnormal_vertex:YM,morphtarget_pars_vertex:ZM,morphtarget_vertex:$M,normal_fragment_begin:jM,normal_fragment_maps:KM,normal_pars_fragment:JM,normal_pars_vertex:QM,normal_vertex:e6,normalmap_pars_fragment:t6,clearcoat_normal_fragment_begin:n6,clearcoat_normal_fragment_maps:r6,clearcoat_pars_fragment:i6,iridescence_pars_fragment:s6,opaque_fragment:a6,packing:o6,premultiplied_alpha_fragment:l6,project_vertex:c6,dithering_fragment:d6,dithering_pars_fragment:u6,roughnessmap_fragment:h6,roughnessmap_pars_fragment:f6,shadowmap_pars_fragment:p6,shadowmap_pars_vertex:m6,shadowmap_vertex:g6,shadowmask_pars_fragment:x6,skinbase_vertex:b6,skinning_pars_vertex:y6,skinning_vertex:v6,skinnormal_vertex:_6,specularmap_fragment:w6,specularmap_pars_fragment:S6,tonemapping_fragment:M6,tonemapping_pars_fragment:T6,transmission_fragment:A6,transmission_pars_fragment:k6,uv_pars_fragment:E6,uv_pars_vertex:C6,uv_vertex:R6,worldpos_vertex:I6,background_vert:P6,background_frag:D6,backgroundCube_vert:L6,backgroundCube_frag:N6,cube_vert:U6,cube_frag:F6,depth_vert:O6,depth_frag:q6,distanceRGBA_vert:B6,distanceRGBA_frag:z6,equirect_vert:V6,equirect_frag:G6,linedashed_vert:H6,linedashed_frag:W6,meshbasic_vert:X6,meshbasic_frag:Y6,meshlambert_vert:Z6,meshlambert_frag:$6,meshmatcap_vert:j6,meshmatcap_frag:K6,meshnormal_vert:J6,meshnormal_frag:Q6,meshphong_vert:e8,meshphong_frag:t8,meshphysical_vert:n8,meshphysical_frag:r8,meshtoon_vert:i8,meshtoon_frag:s8,points_vert:a8,points_frag:o8,shadow_vert:l8,shadow_frag:c8,sprite_vert:d8,sprite_frag:u8},Ae={common:{diffuse:{value:new De(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Je},alphaMap:{value:null},alphaMapTransform:{value:new Je},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Je}},envmap:{envMap:{value:null},envMapRotation:{value:new Je},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 Je}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Je}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Je},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Je},normalScale:{value:new re(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Je},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Je}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Je}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Je}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new De(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},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 De(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Je},alphaTest:{value:0},uvTransform:{value:new Je}},sprite:{diffuse:{value:new De(16777215)},opacity:{value:1},center:{value:new re(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Je},alphaMap:{value:null},alphaMapTransform:{value:new Je},alphaTest:{value:0}}},Tr={basic:{uniforms:Un([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.fog]),vertexShader:je.meshbasic_vert,fragmentShader:je.meshbasic_frag},lambert:{uniforms:Un([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new De(0)}}]),vertexShader:je.meshlambert_vert,fragmentShader:je.meshlambert_frag},phong:{uniforms:Un([Ae.common,Ae.specularmap,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,Ae.lights,{emissive:{value:new De(0)},specular:{value:new De(1118481)},shininess:{value:30}}]),vertexShader:je.meshphong_vert,fragmentShader:je.meshphong_frag},standard:{uniforms:Un([Ae.common,Ae.envmap,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.roughnessmap,Ae.metalnessmap,Ae.fog,Ae.lights,{emissive:{value:new De(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:je.meshphysical_vert,fragmentShader:je.meshphysical_frag},toon:{uniforms:Un([Ae.common,Ae.aomap,Ae.lightmap,Ae.emissivemap,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.gradientmap,Ae.fog,Ae.lights,{emissive:{value:new De(0)}}]),vertexShader:je.meshtoon_vert,fragmentShader:je.meshtoon_frag},matcap:{uniforms:Un([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,Ae.fog,{matcap:{value:null}}]),vertexShader:je.meshmatcap_vert,fragmentShader:je.meshmatcap_frag},points:{uniforms:Un([Ae.points,Ae.fog]),vertexShader:je.points_vert,fragmentShader:je.points_frag},dashed:{uniforms:Un([Ae.common,Ae.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:je.linedashed_vert,fragmentShader:je.linedashed_frag},depth:{uniforms:Un([Ae.common,Ae.displacementmap]),vertexShader:je.depth_vert,fragmentShader:je.depth_frag},normal:{uniforms:Un([Ae.common,Ae.bumpmap,Ae.normalmap,Ae.displacementmap,{opacity:{value:1}}]),vertexShader:je.meshnormal_vert,fragmentShader:je.meshnormal_frag},sprite:{uniforms:Un([Ae.sprite,Ae.fog]),vertexShader:je.sprite_vert,fragmentShader:je.sprite_frag},background:{uniforms:{uvTransform:{value:new Je},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:je.background_vert,fragmentShader:je.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Je}},vertexShader:je.backgroundCube_vert,fragmentShader:je.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:je.cube_vert,fragmentShader:je.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:je.equirect_vert,fragmentShader:je.equirect_frag},distanceRGBA:{uniforms:Un([Ae.common,Ae.displacementmap,{referencePosition:{value:new P},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:je.distanceRGBA_vert,fragmentShader:je.distanceRGBA_frag},shadow:{uniforms:Un([Ae.lights,Ae.fog,{color:{value:new De(0)},opacity:{value:1}}]),vertexShader:je.shadow_vert,fragmentShader:je.shadow_frag}};Tr.physical={uniforms:Un([Tr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Je},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Je},clearcoatNormalScale:{value:new re(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Je},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Je},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Je},sheen:{value:0},sheenColor:{value:new De(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Je},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Je},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Je},transmissionSamplerSize:{value:new re},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Je},attenuationDistance:{value:0},attenuationColor:{value:new De(0)},specularColor:{value:new De(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Je},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Je},anisotropyVector:{value:new re},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Je}}]),vertexShader:je.meshphysical_vert,fragmentShader:je.meshphysical_frag};const Dd={r:0,b:0,g:0},Xs=new mr,h8=new Oe;function f8(r,e,t,n,i,s,a){const o=new De(0);let l=s===!0?0:1,c,d,u=null,h=0,f=null;function m(b){let y=b.isScene===!0?b.background:null;return y&&y.isTexture&&(y=(b.backgroundBlurriness>0?t:e).get(y)),y}function x(b){let y=!1;const _=m(b);_===null?p(o,l):_&&_.isColor&&(p(_,1),y=!0);const w=r.xr.getEnvironmentBlendMode();w==="additive"?n.buffers.color.setClear(0,0,0,1,a):w==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,a),(r.autoClear||y)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil))}function g(b,y){const _=m(y);_&&(_.isCubeTexture||_.mapping===$o)?(d===void 0&&(d=new en(new ui(1,1,1),new Pr({name:"BackgroundCubeMaterial",uniforms:Go(Tr.backgroundCube.uniforms),vertexShader:Tr.backgroundCube.vertexShader,fragmentShader:Tr.backgroundCube.fragmentShader,side:Rn,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(w,T,A){this.matrixWorld.copyPosition(A.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),Xs.copy(y.backgroundRotation),Xs.x*=-1,Xs.y*=-1,Xs.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(Xs.y*=-1,Xs.z*=-1),d.material.uniforms.envMap.value=_,d.material.uniforms.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(h8.makeRotationFromEuler(Xs)),d.material.toneMapped=pt.getTransfer(_.colorSpace)!==St,(u!==_||h!==_.version||f!==r.toneMapping)&&(d.material.needsUpdate=!0,u=_,h=_.version,f=r.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null)):_&&_.isTexture&&(c===void 0&&(c=new en(new Jo(2,2),new Pr({name:"BackgroundMaterial",uniforms:Go(Tr.background.uniforms),vertexShader:Tr.background.vertexShader,fragmentShader:Tr.background.fragmentShader,side:Xr,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=_,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=pt.getTransfer(_.colorSpace)!==St,_.matrixAutoUpdate===!0&&_.updateMatrix(),c.material.uniforms.uvTransform.value.copy(_.matrix),(u!==_||h!==_.version||f!==r.toneMapping)&&(c.material.needsUpdate=!0,u=_,h=_.version,f=r.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function p(b,y){b.getRGB(Dd,Xy(r)),n.buffers.color.setClear(Dd.r,Dd.g,Dd.b,y,a)}function v(){d!==void 0&&(d.geometry.dispose(),d.material.dispose(),d=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return o},setClearColor:function(b,y=1){o.set(b),l=y,p(o,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,p(o,l)},render:x,addToRenderList:g,dispose:v}}function p8(r,e){const t=r.getParameter(r.MAX_VERTEX_ATTRIBS),n={},i=h(null);let s=i,a=!1;function o(S,E,I,O,q){let z=!1;const V=u(O,I,E);s!==V&&(s=V,c(s.object)),z=f(S,O,I,q),z&&m(S,O,I,q),q!==null&&e.update(q,r.ELEMENT_ARRAY_BUFFER),(z||a)&&(a=!1,y(S,E,I,O),q!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e.get(q).buffer))}function l(){return r.createVertexArray()}function c(S){return r.bindVertexArray(S)}function d(S){return r.deleteVertexArray(S)}function u(S,E,I){const O=I.wireframe===!0;let q=n[S.id];q===void 0&&(q={},n[S.id]=q);let z=q[E.id];z===void 0&&(z={},q[E.id]=z);let V=z[O];return V===void 0&&(V=h(l()),z[O]=V),V}function h(S){const E=[],I=[],O=[];for(let q=0;q=0){const ue=q[F];let _e=z[F];if(_e===void 0&&(F==="instanceMatrix"&&S.instanceMatrix&&(_e=S.instanceMatrix),F==="instanceColor"&&S.instanceColor&&(_e=S.instanceColor)),ue===void 0||ue.attribute!==_e||_e&&ue.data!==_e.data)return!0;V++}return s.attributesNum!==V||s.index!==O}function m(S,E,I,O){const q={},z=E.attributes;let V=0;const H=I.getAttributes();for(const F in H)if(H[F].location>=0){let ue=z[F];ue===void 0&&(F==="instanceMatrix"&&S.instanceMatrix&&(ue=S.instanceMatrix),F==="instanceColor"&&S.instanceColor&&(ue=S.instanceColor));const _e={};_e.attribute=ue,ue&&ue.data&&(_e.data=ue.data),q[F]=_e,V++}s.attributes=q,s.attributesNum=V,s.index=O}function x(){const S=s.newAttributes;for(let E=0,I=S.length;E=0){let ie=q[H];if(ie===void 0&&(H==="instanceMatrix"&&S.instanceMatrix&&(ie=S.instanceMatrix),H==="instanceColor"&&S.instanceColor&&(ie=S.instanceColor)),ie!==void 0){const ue=ie.normalized,_e=ie.itemSize,Ne=e.get(ie);if(Ne===void 0)continue;const Le=Ne.buffer,$=Ne.type,W=Ne.bytesPerElement,L=$===r.INT||$===r.UNSIGNED_INT||ie.gpuType===C0;if(ie.isInterleavedBufferAttribute){const C=ie.data,Q=C.stride,ce=ie.offset;if(C.isInstancedInterleavedBuffer){for(let j=0;j0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const d=l(c);d!==c&&(Ce("WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const u=t.logarithmicDepthBuffer===!0,h=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control"),f=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),m=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x=r.getParameter(r.MAX_TEXTURE_SIZE),g=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),p=r.getParameter(r.MAX_VERTEX_ATTRIBS),v=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),b=r.getParameter(r.MAX_VARYING_VECTORS),y=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),_=m>0,w=r.getParameter(r.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:a,textureTypeReadable:o,precision:c,logarithmicDepthBuffer:u,reversedDepthBuffer:h,maxTextures:f,maxVertexTextures:m,maxTextureSize:x,maxCubemapSize:g,maxAttributes:p,maxVertexUniforms:v,maxVaryings:b,maxFragmentUniforms:y,vertexTextures:_,maxSamples:w}}function x8(r){const e=this;let t=null,n=0,i=!1,s=!1;const a=new Mr,o=new Je,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(u,h){const f=u.length!==0||h||n!==0||i;return i=h,n=u.length,f},this.beginShadows=function(){s=!0,d(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(u,h){t=d(u,h,0)},this.setState=function(u,h,f){const m=u.clippingPlanes,x=u.clipIntersection,g=u.clipShadows,p=r.get(u);if(!i||m===null||m.length===0||s&&!g)s?d(null):c();else{const v=s?0:n,b=v*4;let y=p.clippingState||null;l.value=y,y=d(m,h,b,f);for(let _=0;_!==b;++_)y[_]=t[_];p.clippingState=y,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(u,h,f,m){const x=u!==null?u.length:0;let g=null;if(x!==0){if(g=l.value,m!==!0||g===null){const p=f+x*4,v=h.matrixWorldInverse;o.getNormalMatrix(v),(g===null||g.length0){const c=new Zy(l.height);return c.fromEquirectangularTexture(r,a),e.set(a,c),a.addEventListener("dispose",i),t(c.texture,a.mapping)}else return null}}return a}function i(a){const o=a.target;o.removeEventListener("dispose",i);const l=e.get(o);l!==void 0&&(e.delete(o),l.dispose())}function s(){e=new WeakMap}return{get:n,dispose:s}}const xs=4,kx=[.125,.215,.35,.446,.526,.582],ra=20,y8=256,yl=new Oc,Ex=new De;let rf=null,sf=0,af=0,of=!1;const v8=new P;class dp{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,i=100,s={}){const{size:a=256,position:o=v8}=s;rf=this._renderer.getRenderTarget(),sf=this._renderer.getActiveCubeFace(),af=this._renderer.getActiveMipmapLevel(),of=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,n,i,l,o),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Ix(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Rx(),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?_:0,_,_),u.setRenderTarget(i),p&&u.render(x,l),u.render(e,l)}u.toneMapping=f,u.autoClear=h,e.background=v}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===Wi||e.mapping===Ms;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Ix()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Rx());const s=i?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=s;const o=s.uniforms;o.envMap.value=e;const l=this._cubeSize;fo(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(a,yl)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodMeshes.length;for(let s=1;sm-xs?n-m+xs:0),p=4*(this._cubeSize-x);l.envMap.value=e.texture,l.roughness.value=f,l.mipInt.value=m-t,fo(s,g,p,3*x,2*x),i.setRenderTarget(s),i.render(o,yl),l.envMap.value=s.texture,l.roughness.value=0,l.mipInt.value=m-n,fo(e,g,p,3*x,2*x),i.setRenderTarget(e),i.render(o,yl)}_blur(e,t,n,i,s){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,i,"latitudinal",s),this._halfBlur(a,e,n,n,i,"longitudinal",s)}_halfBlur(e,t,n,i,s,a,o){const l=this._renderer,c=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&it("blur direction must be either latitudinal or longitudinal!");const d=3,u=this._lodMeshes[i];u.material=c;const h=c.uniforms,f=this._sizeLods[n]-1,m=isFinite(s)?Math.PI/(2*f):2*Math.PI/(2*ra-1),x=s/m,g=isFinite(s)?1+Math.floor(d*x):ra;g>ra&&Ce(`sigmaRadians, ${s}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${ra}`);const p=[];let v=0;for(let T=0;Tb-xs?i-b+xs:0),w=4*(this._cubeSize-y);fo(t,_,w,3*y,2*y),l.setRenderTarget(t),l.render(u,yl)}}function _8(r){const e=[],t=[],n=[];let i=r;const s=r-xs+1+kx.length;for(let a=0;ar-xs?l=kx[a-r+xs-1]:a===0&&(l=0),t.push(l);const c=1/(o-2),d=-c,u=1+c,h=[d,d,u,d,u,u,d,d,u,u,d,u],f=6,m=6,x=3,g=2,p=1,v=new Float32Array(x*m*f),b=new Float32Array(g*m*f),y=new Float32Array(p*m*f);for(let w=0;w2?0:-1,M=[T,A,0,T+2/3,A,0,T+2/3,A+1,0,T,A,0,T+2/3,A+1,0,T,A+1,0];v.set(M,x*m*w),b.set(h,g*m*w);const S=[w,w,w,w,w,w];y.set(S,p*m*w)}const _=new st;_.setAttribute("position",new ft(v,x)),_.setAttribute("uv",new ft(b,g)),_.setAttribute("faceIndex",new ft(y,p)),n.push(new en(_,null)),i>xs&&i--}return{lodMeshes:n,sizeLods:e,sigmas:t}}function Cx(r,e,t){const n=new di(r,e,t);return n.texture.mapping=$o,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function fo(r,e,t,n,i){r.viewport.set(e,t,n,i),r.scissor.set(e,t,n,i)}function w8(r,e,t){return new Pr({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:y8,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:sh(),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 3.2: Transform view direction to hemisphere configuration + vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z)); + + // Section 4.1: Orthonormal basis + float lensq = Vh.x * Vh.x + Vh.y * Vh.y; + vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0); + vec3 T2 = cross(Vh, 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 + Vh.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)) * Vh; + + // 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:ai,depthTest:!1,depthWrite:!1})}function S8(r,e,t){const n=new Float32Array(ra),i=new P(0,1,0);return new Pr({name:"SphericalGaussianBlur",defines:{n:ra,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:sh(),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:ai,depthTest:!1,depthWrite:!1})}function Rx(){return new Pr({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:sh(),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:ai,depthTest:!1,depthWrite:!1})}function Ix(){return new Pr({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:sh(),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:ai,depthTest:!1,depthWrite:!1})}function sh(){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 ); + + } + `}function M8(r){let e=new WeakMap,t=null;function n(o){if(o&&o.isTexture){const l=o.mapping,c=l===sc||l===ac,d=l===Wi||l===Ms;if(c||d){let u=e.get(o);const h=u!==void 0?u.texture.pmremVersion:0;if(o.isRenderTargetTexture&&o.pmremVersion!==h)return t===null&&(t=new dp(r)),u=c?t.fromEquirectangular(o,u):t.fromCubemap(o,u),u.texture.pmremVersion=o.pmremVersion,e.set(o,u),u.texture;if(u!==void 0)return u.texture;{const f=o.image;return c&&f&&f.height>0||d&&f&&i(f)?(t===null&&(t=new dp(r)),u=c?t.fromEquirectangular(o):t.fromCubemap(o),u.texture.pmremVersion=o.pmremVersion,e.set(o,u),o.addEventListener("dispose",s),u.texture):null}}}return o}function i(o){let l=0;const c=6;for(let d=0;de.maxTextureSize&&(w=Math.ceil(_/e.maxTextureSize),_=e.maxTextureSize);const T=new Float32Array(_*w*4*u),A=new F0(T,_,w,u);A.type=tr,A.needsUpdate=!0;const M=y*4;for(let E=0;E0)return r;const i=e*t;let s=Dx[i];if(s===void 0&&(s=new Float32Array(i),Dx[i]=s),e!==0){n.toArray(s,0);for(let a=1,o=0;a!==e;++a)o+=t,r[a].toArray(s,o)}return s}function cn(r,e){if(r.length!==e.length)return!1;for(let t=0,n=r.length;t":" "} ${o}: ${t[a]}`)}return n.join(` +`)}const Bx=new Je;function MT(r){pt._getMatrix(Bx,pt.workingColorSpace,r);const e=`mat3( ${Bx.elements.map(t=>t.toFixed(4))} )`;switch(pt.getTransfer(r)){case uc:return[e,"LinearTransferOETF"];case St:return[e,"sRGBTransferOETF"];default:return Ce("WebGLProgram: Unsupported color space: ",r),[e,"LinearTransferOETF"]}}function zx(r,e,t){const n=r.getShaderParameter(e,r.COMPILE_STATUS),s=(r.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+` + +`+ST(r.getShaderSource(e),o)}else return s}function TT(r,e){const t=MT(e);return[`vec4 ${r}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(` +`)}function AT(r,e){let t;switch(e){case _y:t="Linear";break;case wy:t="Reinhard";break;case Sy:t="Cineon";break;case My:t="ACESFilmic";break;case Nu:t="AgX";break;case Ay:t="Neutral";break;case Ty:t="Custom";break;default:Ce("WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const Ld=new P;function kT(){pt.getLuminanceCoefficients(Ld);const r=Ld.x.toFixed(4),e=Ld.y.toFixed(4),t=Ld.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${r}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` +`)}function ET(r){return[r.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",r.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Ul).join(` +`)}function CT(r){const e=[];for(const t in r){const n=r[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(` +`)}function RT(r,e){const t={},n=r.getProgramParameter(e,r.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function up(r){return r.replace(IT,DT)}const PT=new Map;function DT(r,e){let t=je[e];if(t===void 0){const n=PT.get(e);if(n!==void 0)t=je[n],Ce('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return up(t)}const LT=/#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 Hx(r){return r.replace(LT,NT)}function NT(r,e,t,n){let i="";for(let s=parseInt(e);s0&&(g+=` +`),p=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m].filter(Ul).join(` +`),p.length>0&&(p+=` +`)):(g=[Wx(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m,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 "+d:"",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 "+l:"",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(Ul).join(` +`),p=[Wx(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,m,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 "+c:"",t.envMap?"#define "+d:"",t.envMap?"#define "+u:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.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||t.batchingColor?"#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.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 "+l:"",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!==zi?"#define TONE_MAPPING":"",t.toneMapping!==zi?je.tonemapping_pars_fragment:"",t.toneMapping!==zi?AT("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",je.colorspace_pars_fragment,TT("linearToOutputTexel",t.outputColorSpace),kT(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(Ul).join(` +`)),a=up(a),a=Vx(a,t),a=Gx(a,t),o=up(o),o=Vx(o,t),o=Gx(o,t),a=Hx(a),o=Hx(o),t.isRawShaderMaterial!==!0&&(v=`#version 300 es +`,g=[f,"#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+g,p=["#define varying in",t.glslVersion===tp?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===tp?"":"#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(` +`)+` +`+p);const b=v+g+a,y=v+p+o,_=qx(i,i.VERTEX_SHADER,b),w=qx(i,i.FRAGMENT_SHADER,y);i.attachShader(x,_),i.attachShader(x,w),t.index0AttributeName!==void 0?i.bindAttribLocation(x,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x);function T(E){if(r.debug.checkShaderErrors){const I=i.getProgramInfoLog(x)||"",O=i.getShaderInfoLog(_)||"",q=i.getShaderInfoLog(w)||"",z=I.trim(),V=O.trim(),H=q.trim();let F=!0,ie=!0;if(i.getProgramParameter(x,i.LINK_STATUS)===!1)if(F=!1,typeof r.debug.onShaderError=="function")r.debug.onShaderError(i,x,_,w);else{const ue=zx(i,_,"vertex"),_e=zx(i,w,"fragment");it("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(x,i.VALIDATE_STATUS)+` + +Material Name: `+E.name+` +Material Type: `+E.type+` + +Program Info Log: `+z+` +`+ue+` +`+_e)}else z!==""?Ce("WebGLProgram: Program Info Log:",z):(V===""||H==="")&&(ie=!1);ie&&(E.diagnostics={runnable:F,programLog:z,vertexShader:{log:V,prefix:g},fragmentShader:{log:H,prefix:p}})}i.deleteShader(_),i.deleteShader(w),A=new pu(i,x),M=RT(i,x)}let A;this.getUniforms=function(){return A===void 0&&T(this),A};let M;this.getAttributes=function(){return M===void 0&&T(this),M};let S=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=i.getProgramParameter(x,_T)),S},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=wT++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=_,this.fragmentShader=w,this}let VT=0;class GT{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),s=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(i)===!1&&(a.add(i),i.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 HT(e),t.set(e,n)),n}}class HT{constructor(e){this.id=VT++,this.code=e,this.usedTimes=0}}function WT(r,e,t,n,i,s,a){const o=new q0,l=new GT,c=new Set,d=[],u=i.logarithmicDepthBuffer,h=i.vertexTextures;let f=i.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",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(M){return c.add(M),M===0?"uv":`uv${M}`}function g(M,S,E,I,O){const q=I.fog,z=O.geometry,V=M.isMeshStandardMaterial?I.environment:null,H=(M.isMeshStandardMaterial?t:e).get(M.envMap||V),F=H&&H.mapping===$o?H.image.height:null,ie=m[M.type];M.precision!==null&&(f=i.getMaxPrecision(M.precision),f!==M.precision&&Ce("WebGLProgram.getParameters:",M.precision,"not supported, using",f,"instead."));const ue=z.morphAttributes.position||z.morphAttributes.normal||z.morphAttributes.color,_e=ue!==void 0?ue.length:0;let Ne=0;z.morphAttributes.position!==void 0&&(Ne=1),z.morphAttributes.normal!==void 0&&(Ne=2),z.morphAttributes.color!==void 0&&(Ne=3);let Le,$,W,L;if(ie){const Mt=Tr[ie];Le=Mt.vertexShader,$=Mt.fragmentShader}else Le=M.vertexShader,$=M.fragmentShader,l.update(M),W=l.getVertexShaderID(M),L=l.getFragmentShaderID(M);const C=r.getRenderTarget(),Q=r.state.buffers.depth.getReversed(),ce=O.isInstancedMesh===!0,j=O.isBatchedMesh===!0,fe=!!M.map,ye=!!M.matcap,me=!!H,Z=!!M.aoMap,D=!!M.lightMap,ne=!!M.bumpMap,se=!!M.normalMap,G=!!M.displacementMap,U=!!M.emissiveMap,he=!!M.metalnessMap,pe=!!M.roughnessMap,Te=M.anisotropy>0,B=M.clearcoat>0,k=M.dispersion>0,K=M.iridescence>0,de=M.sheen>0,xe=M.transmission>0,le=Te&&!!M.anisotropyMap,Ve=B&&!!M.clearcoatMap,Me=B&&!!M.clearcoatNormalMap,Xe=B&&!!M.clearcoatRoughnessMap,ze=K&&!!M.iridescenceMap,be=K&&!!M.iridescenceThicknessMap,we=de&&!!M.sheenColorMap,tt=de&&!!M.sheenRoughnessMap,Ke=!!M.specularMap,Ue=!!M.specularColorMap,at=!!M.specularIntensityMap,Y=xe&&!!M.transmissionMap,Re=xe&&!!M.thicknessMap,ke=!!M.gradientMap,Ee=!!M.alphaMap,ve=M.alphaTest>0,ge=!!M.alphaHash,Ge=!!M.extensions;let lt=zi;M.toneMapped&&(C===null||C.isXRRenderTarget===!0)&&(lt=r.toneMapping);const Dt={shaderID:ie,shaderType:M.type,shaderName:M.name,vertexShader:Le,fragmentShader:$,defines:M.defines,customVertexShaderID:W,customFragmentShaderID:L,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:f,batching:j,batchingColor:j&&O._colorsTexture!==null,instancing:ce,instancingColor:ce&&O.instanceColor!==null,instancingMorph:ce&&O.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:C===null?r.outputColorSpace:C.isXRRenderTarget===!0?C.texture.colorSpace:ka,alphaToCoverage:!!M.alphaToCoverage,map:fe,matcap:ye,envMap:me,envMapMode:me&&H.mapping,envMapCubeUVHeight:F,aoMap:Z,lightMap:D,bumpMap:ne,normalMap:se,displacementMap:h&&G,emissiveMap:U,normalMapObjectSpace:se&&M.normalMapType===Dy,normalMapTangentSpace:se&&M.normalMapType===Es,metalnessMap:he,roughnessMap:pe,anisotropy:Te,anisotropyMap:le,clearcoat:B,clearcoatMap:Ve,clearcoatNormalMap:Me,clearcoatRoughnessMap:Xe,dispersion:k,iridescence:K,iridescenceMap:ze,iridescenceThicknessMap:be,sheen:de,sheenColorMap:we,sheenRoughnessMap:tt,specularMap:Ke,specularColorMap:Ue,specularIntensityMap:at,transmission:xe,transmissionMap:Y,thicknessMap:Re,gradientMap:ke,opaque:M.transparent===!1&&M.blending===ga&&M.alphaToCoverage===!1,alphaMap:Ee,alphaTest:ve,alphaHash:ge,combine:M.combine,mapUv:fe&&x(M.map.channel),aoMapUv:Z&&x(M.aoMap.channel),lightMapUv:D&&x(M.lightMap.channel),bumpMapUv:ne&&x(M.bumpMap.channel),normalMapUv:se&&x(M.normalMap.channel),displacementMapUv:G&&x(M.displacementMap.channel),emissiveMapUv:U&&x(M.emissiveMap.channel),metalnessMapUv:he&&x(M.metalnessMap.channel),roughnessMapUv:pe&&x(M.roughnessMap.channel),anisotropyMapUv:le&&x(M.anisotropyMap.channel),clearcoatMapUv:Ve&&x(M.clearcoatMap.channel),clearcoatNormalMapUv:Me&&x(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Xe&&x(M.clearcoatRoughnessMap.channel),iridescenceMapUv:ze&&x(M.iridescenceMap.channel),iridescenceThicknessMapUv:be&&x(M.iridescenceThicknessMap.channel),sheenColorMapUv:we&&x(M.sheenColorMap.channel),sheenRoughnessMapUv:tt&&x(M.sheenRoughnessMap.channel),specularMapUv:Ke&&x(M.specularMap.channel),specularColorMapUv:Ue&&x(M.specularColorMap.channel),specularIntensityMapUv:at&&x(M.specularIntensityMap.channel),transmissionMapUv:Y&&x(M.transmissionMap.channel),thicknessMapUv:Re&&x(M.thicknessMap.channel),alphaMapUv:Ee&&x(M.alphaMap.channel),vertexTangents:!!z.attributes.tangent&&(se||Te),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!z.attributes.color&&z.attributes.color.itemSize===4,pointsUvs:O.isPoints===!0&&!!z.attributes.uv&&(fe||Ee),fog:!!q,useFog:M.fog===!0,fogExp2:!!q&&q.isFogExp2,flatShading:M.flatShading===!0&&M.wireframe===!1,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:u,reversedDepthBuffer:Q,skinning:O.isSkinnedMesh===!0,morphTargets:z.morphAttributes.position!==void 0,morphNormals:z.morphAttributes.normal!==void 0,morphColors:z.morphAttributes.color!==void 0,morphTargetsCount:_e,morphTextureStride:Ne,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:M.dithering,shadowMapEnabled:r.shadowMap.enabled&&E.length>0,shadowMapType:r.shadowMap.type,toneMapping:lt,decodeVideoTexture:fe&&M.map.isVideoTexture===!0&&pt.getTransfer(M.map.colorSpace)===St,decodeVideoTextureEmissive:U&&M.emissiveMap.isVideoTexture===!0&&pt.getTransfer(M.emissiveMap.colorSpace)===St,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===Kn,flipSided:M.side===Rn,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:Ge&&M.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Ge&&M.extensions.multiDraw===!0||j)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return Dt.vertexUv1s=c.has(1),Dt.vertexUv2s=c.has(2),Dt.vertexUv3s=c.has(3),c.clear(),Dt}function p(M){const S=[];if(M.shaderID?S.push(M.shaderID):(S.push(M.customVertexShaderID),S.push(M.customFragmentShaderID)),M.defines!==void 0)for(const E in M.defines)S.push(E),S.push(M.defines[E]);return M.isRawShaderMaterial===!1&&(v(S,M),b(S,M),S.push(r.outputColorSpace)),S.push(M.customProgramCacheKey),S.join()}function v(M,S){M.push(S.precision),M.push(S.outputColorSpace),M.push(S.envMapMode),M.push(S.envMapCubeUVHeight),M.push(S.mapUv),M.push(S.alphaMapUv),M.push(S.lightMapUv),M.push(S.aoMapUv),M.push(S.bumpMapUv),M.push(S.normalMapUv),M.push(S.displacementMapUv),M.push(S.emissiveMapUv),M.push(S.metalnessMapUv),M.push(S.roughnessMapUv),M.push(S.anisotropyMapUv),M.push(S.clearcoatMapUv),M.push(S.clearcoatNormalMapUv),M.push(S.clearcoatRoughnessMapUv),M.push(S.iridescenceMapUv),M.push(S.iridescenceThicknessMapUv),M.push(S.sheenColorMapUv),M.push(S.sheenRoughnessMapUv),M.push(S.specularMapUv),M.push(S.specularColorMapUv),M.push(S.specularIntensityMapUv),M.push(S.transmissionMapUv),M.push(S.thicknessMapUv),M.push(S.combine),M.push(S.fogExp2),M.push(S.sizeAttenuation),M.push(S.morphTargetsCount),M.push(S.morphAttributeCount),M.push(S.numDirLights),M.push(S.numPointLights),M.push(S.numSpotLights),M.push(S.numSpotLightMaps),M.push(S.numHemiLights),M.push(S.numRectAreaLights),M.push(S.numDirLightShadows),M.push(S.numPointLightShadows),M.push(S.numSpotLightShadows),M.push(S.numSpotLightShadowsWithMaps),M.push(S.numLightProbes),M.push(S.shadowMapType),M.push(S.toneMapping),M.push(S.numClippingPlanes),M.push(S.numClipIntersection),M.push(S.depthPacking)}function b(M,S){o.disableAll(),S.supportsVertexTextures&&o.enable(0),S.instancing&&o.enable(1),S.instancingColor&&o.enable(2),S.instancingMorph&&o.enable(3),S.matcap&&o.enable(4),S.envMap&&o.enable(5),S.normalMapObjectSpace&&o.enable(6),S.normalMapTangentSpace&&o.enable(7),S.clearcoat&&o.enable(8),S.iridescence&&o.enable(9),S.alphaTest&&o.enable(10),S.vertexColors&&o.enable(11),S.vertexAlphas&&o.enable(12),S.vertexUv1s&&o.enable(13),S.vertexUv2s&&o.enable(14),S.vertexUv3s&&o.enable(15),S.vertexTangents&&o.enable(16),S.anisotropy&&o.enable(17),S.alphaHash&&o.enable(18),S.batching&&o.enable(19),S.dispersion&&o.enable(20),S.batchingColor&&o.enable(21),S.gradientMap&&o.enable(22),M.push(o.mask),o.disableAll(),S.fog&&o.enable(0),S.useFog&&o.enable(1),S.flatShading&&o.enable(2),S.logarithmicDepthBuffer&&o.enable(3),S.reversedDepthBuffer&&o.enable(4),S.skinning&&o.enable(5),S.morphTargets&&o.enable(6),S.morphNormals&&o.enable(7),S.morphColors&&o.enable(8),S.premultipliedAlpha&&o.enable(9),S.shadowMapEnabled&&o.enable(10),S.doubleSided&&o.enable(11),S.flipSided&&o.enable(12),S.useDepthPacking&&o.enable(13),S.dithering&&o.enable(14),S.transmission&&o.enable(15),S.sheen&&o.enable(16),S.opaque&&o.enable(17),S.pointsUvs&&o.enable(18),S.decodeVideoTexture&&o.enable(19),S.decodeVideoTextureEmissive&&o.enable(20),S.alphaToCoverage&&o.enable(21),M.push(o.mask)}function y(M){const S=m[M.type];let E;if(S){const I=Tr[S];E=cm.clone(I.uniforms)}else E=M.uniforms;return E}function _(M,S){let E;for(let I=0,O=d.length;I0?n.push(p):f.transparent===!0?i.push(p):t.push(p)}function l(u,h,f,m,x,g){const p=a(u,h,f,m,x,g);f.transmission>0?n.unshift(p):f.transparent===!0?i.unshift(p):t.unshift(p)}function c(u,h){t.length>1&&t.sort(u||YT),n.length>1&&n.sort(h||Xx),i.length>1&&i.sort(h||Xx)}function d(){for(let u=e,h=r.length;u=s.length?(a=new Yx,s.push(a)):a=s[i],a}function t(){r=new WeakMap}return{get:e,dispose:t}}function $T(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new P,color:new De};break;case"SpotLight":t={position:new P,direction:new P,color:new De,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new P,color:new De,distance:0,decay:0};break;case"HemisphereLight":t={direction:new P,skyColor:new De,groundColor:new De};break;case"RectAreaLight":t={color:new De,position:new P,halfWidth:new P,halfHeight:new P};break}return r[e.id]=t,t}}}function jT(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new re};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new re};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new re,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}let KT=0;function JT(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function QT(r){const e=new $T,t=jT(),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 c=0;c<9;c++)n.probe.push(new P);const i=new P,s=new Oe,a=new Oe;function o(c){let d=0,u=0,h=0;for(let M=0;M<9;M++)n.probe[M].set(0,0,0);let f=0,m=0,x=0,g=0,p=0,v=0,b=0,y=0,_=0,w=0,T=0;c.sort(JT);for(let M=0,S=c.length;M0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=Ae.LTC_FLOAT_1,n.rectAreaLTC2=Ae.LTC_FLOAT_2):(n.rectAreaLTC1=Ae.LTC_HALF_1,n.rectAreaLTC2=Ae.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=u,n.ambient[2]=h;const A=n.hash;(A.directionalLength!==f||A.pointLength!==m||A.spotLength!==x||A.rectAreaLength!==g||A.hemiLength!==p||A.numDirectionalShadows!==v||A.numPointShadows!==b||A.numSpotShadows!==y||A.numSpotMaps!==_||A.numLightProbes!==T)&&(n.directional.length=f,n.spot.length=x,n.rectArea.length=g,n.point.length=m,n.hemi.length=p,n.directionalShadow.length=v,n.directionalShadowMap.length=v,n.pointShadow.length=b,n.pointShadowMap.length=b,n.spotShadow.length=y,n.spotShadowMap.length=y,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=b,n.spotLightMatrix.length=y+_-w,n.spotLightMap.length=_,n.numSpotLightShadowsWithMaps=w,n.numLightProbes=T,A.directionalLength=f,A.pointLength=m,A.spotLength=x,A.rectAreaLength=g,A.hemiLength=p,A.numDirectionalShadows=v,A.numPointShadows=b,A.numSpotShadows=y,A.numSpotMaps=_,A.numLightProbes=T,n.version=KT++)}function l(c,d){let u=0,h=0,f=0,m=0,x=0;const g=d.matrixWorldInverse;for(let p=0,v=c.length;p=a.length?(o=new Zx(r),a.push(o)):o=a[s],o}function n(){e=new WeakMap}return{get:t,dispose:n}}const tA=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,nA=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +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 = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function rA(r,e,t){let n=new jo;const i=new re,s=new re,a=new ot,o=new Sm({depthPacking:Py}),l=new Mm,c={},d=t.maxTextureSize,u={[Xr]:Rn,[Rn]:Xr,[Kn]:Kn},h=new Pr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new re},radius:{value:4}},vertexShader:tA,fragmentShader:nA}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const m=new st;m.setAttribute("position",new ft(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new en(m,h),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=$p;let p=this.type;this.render=function(w,T,A){if(g.enabled===!1||g.autoUpdate===!1&&g.needsUpdate===!1||w.length===0)return;const M=r.getRenderTarget(),S=r.getActiveCubeFace(),E=r.getActiveMipmapLevel(),I=r.state;I.setBlending(ai),I.buffers.depth.getReversed()===!0?I.buffers.color.setClear(0,0,0,0):I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);const O=p!==ei&&this.type===ei,q=p===ei&&this.type!==ei;for(let z=0,V=w.length;zd||i.y>d)&&(i.x>d&&(s.x=Math.floor(d/ie.x),i.x=s.x*ie.x,F.mapSize.x=s.x),i.y>d&&(s.y=Math.floor(d/ie.y),i.y=s.y*ie.y,F.mapSize.y=s.y)),F.map===null||O===!0||q===!0){const _e=this.type!==ei?{minFilter:yn,magFilter:yn}:{};F.map!==null&&F.map.dispose(),F.map=new di(i.x,i.y,_e),F.map.texture.name=H.name+".shadowMap",F.camera.updateProjectionMatrix()}r.setRenderTarget(F.map),r.clear();const ue=F.getViewportCount();for(let _e=0;_e0||T.map&&T.alphaTest>0||T.alphaToCoverage===!0){const I=S.uuid,O=T.uuid;let q=c[I];q===void 0&&(q={},c[I]=q);let z=q[O];z===void 0&&(z=S.clone(),q[O]=z,T.addEventListener("dispose",_)),S=z}if(S.visible=T.visible,S.wireframe=T.wireframe,M===ei?S.side=T.shadowSide!==null?T.shadowSide:T.side:S.side=T.shadowSide!==null?T.shadowSide:u[T.side],S.alphaMap=T.alphaMap,S.alphaTest=T.alphaToCoverage===!0?.5:T.alphaTest,S.map=T.map,S.clipShadows=T.clipShadows,S.clippingPlanes=T.clippingPlanes,S.clipIntersection=T.clipIntersection,S.displacementMap=T.displacementMap,S.displacementScale=T.displacementScale,S.displacementBias=T.displacementBias,S.wireframeLinewidth=T.wireframeLinewidth,S.linewidth=T.linewidth,A.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const I=r.properties.get(S);I.light=A}return S}function y(w,T,A,M,S){if(w.visible===!1)return;if(w.layers.test(T.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&S===ei)&&(!w.frustumCulled||n.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(A.matrixWorldInverse,w.matrixWorld);const O=e.update(w),q=w.material;if(Array.isArray(q)){const z=O.groups;for(let V=0,H=z.length;V=1):F.indexOf("OpenGL ES")!==-1&&(H=parseFloat(/^OpenGL ES (\d)/.exec(F)[1]),V=H>=2);let ie=null,ue={};const _e=r.getParameter(r.SCISSOR_BOX),Ne=r.getParameter(r.VIEWPORT),Le=new ot().fromArray(_e),$=new ot().fromArray(Ne);function W(Y,Re,ke,Ee){const ve=new Uint8Array(4),ge=r.createTexture();r.bindTexture(Y,ge),r.texParameteri(Y,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(Y,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let Ge=0;Ge"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new re,d=new WeakMap;let u;const h=new WeakMap;let f=!1;try{f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function m(B,k){return f?new OffscreenCanvas(B,k):fc("canvas")}function x(B,k,K){let de=1;const xe=Te(B);if((xe.width>K||xe.height>K)&&(de=K/Math.max(xe.width,xe.height)),de<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 le=Math.floor(de*xe.width),Ve=Math.floor(de*xe.height);u===void 0&&(u=m(le,Ve));const Me=k?m(le,Ve):u;return Me.width=le,Me.height=Ve,Me.getContext("2d").drawImage(B,0,0,le,Ve),Ce("WebGLRenderer: Texture has been resized from ("+xe.width+"x"+xe.height+") to ("+le+"x"+Ve+")."),Me}else return"data"in B&&Ce("WebGLRenderer: Image in DataTexture is too big ("+xe.width+"x"+xe.height+")."),B;return B}function g(B){return B.generateMipmaps}function p(B){r.generateMipmap(B)}function v(B){return B.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:B.isWebGL3DRenderTarget?r.TEXTURE_3D:B.isWebGLArrayRenderTarget||B.isCompressedArrayTexture?r.TEXTURE_2D_ARRAY:r.TEXTURE_2D}function b(B,k,K,de,xe=!1){if(B!==null){if(r[B]!==void 0)return r[B];Ce("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+B+"'")}let le=k;if(k===r.RED&&(K===r.FLOAT&&(le=r.R32F),K===r.HALF_FLOAT&&(le=r.R16F),K===r.UNSIGNED_BYTE&&(le=r.R8)),k===r.RED_INTEGER&&(K===r.UNSIGNED_BYTE&&(le=r.R8UI),K===r.UNSIGNED_SHORT&&(le=r.R16UI),K===r.UNSIGNED_INT&&(le=r.R32UI),K===r.BYTE&&(le=r.R8I),K===r.SHORT&&(le=r.R16I),K===r.INT&&(le=r.R32I)),k===r.RG&&(K===r.FLOAT&&(le=r.RG32F),K===r.HALF_FLOAT&&(le=r.RG16F),K===r.UNSIGNED_BYTE&&(le=r.RG8)),k===r.RG_INTEGER&&(K===r.UNSIGNED_BYTE&&(le=r.RG8UI),K===r.UNSIGNED_SHORT&&(le=r.RG16UI),K===r.UNSIGNED_INT&&(le=r.RG32UI),K===r.BYTE&&(le=r.RG8I),K===r.SHORT&&(le=r.RG16I),K===r.INT&&(le=r.RG32I)),k===r.RGB_INTEGER&&(K===r.UNSIGNED_BYTE&&(le=r.RGB8UI),K===r.UNSIGNED_SHORT&&(le=r.RGB16UI),K===r.UNSIGNED_INT&&(le=r.RGB32UI),K===r.BYTE&&(le=r.RGB8I),K===r.SHORT&&(le=r.RGB16I),K===r.INT&&(le=r.RGB32I)),k===r.RGBA_INTEGER&&(K===r.UNSIGNED_BYTE&&(le=r.RGBA8UI),K===r.UNSIGNED_SHORT&&(le=r.RGBA16UI),K===r.UNSIGNED_INT&&(le=r.RGBA32UI),K===r.BYTE&&(le=r.RGBA8I),K===r.SHORT&&(le=r.RGBA16I),K===r.INT&&(le=r.RGBA32I)),k===r.RGB&&(K===r.UNSIGNED_INT_5_9_9_9_REV&&(le=r.RGB9_E5),K===r.UNSIGNED_INT_10F_11F_11F_REV&&(le=r.R11F_G11F_B10F)),k===r.RGBA){const Ve=xe?uc:pt.getTransfer(de);K===r.FLOAT&&(le=r.RGBA32F),K===r.HALF_FLOAT&&(le=r.RGBA16F),K===r.UNSIGNED_BYTE&&(le=Ve===St?r.SRGB8_ALPHA8:r.RGBA8),K===r.UNSIGNED_SHORT_4_4_4_4&&(le=r.RGBA4),K===r.UNSIGNED_SHORT_5_5_5_1&&(le=r.RGB5_A1)}return(le===r.R16F||le===r.R32F||le===r.RG16F||le===r.RG32F||le===r.RGBA16F||le===r.RGBA32F)&&e.get("EXT_color_buffer_float"),le}function y(B,k){let K;return B?k===null||k===Xi||k===Fo?K=r.DEPTH24_STENCIL8:k===tr?K=r.DEPTH32F_STENCIL8:k===Uo&&(K=r.DEPTH24_STENCIL8,Ce("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):k===null||k===Xi||k===Fo?K=r.DEPTH_COMPONENT24:k===tr?K=r.DEPTH_COMPONENT32F:k===Uo&&(K=r.DEPTH_COMPONENT16),K}function _(B,k){return g(B)===!0||B.isFramebufferTexture&&B.minFilter!==yn&&B.minFilter!==Qt?Math.log2(Math.max(k.width,k.height))+1:B.mipmaps!==void 0&&B.mipmaps.length>0?B.mipmaps.length:B.isCompressedTexture&&Array.isArray(B.image)?k.mipmaps.length:1}function w(B){const k=B.target;k.removeEventListener("dispose",w),A(k),k.isVideoTexture&&d.delete(k)}function T(B){const k=B.target;k.removeEventListener("dispose",T),S(k)}function A(B){const k=n.get(B);if(k.__webglInit===void 0)return;const K=B.source,de=h.get(K);if(de){const xe=de[k.__cacheKey];xe.usedTimes--,xe.usedTimes===0&&M(B),Object.keys(de).length===0&&h.delete(K)}n.remove(B)}function M(B){const k=n.get(B);r.deleteTexture(k.__webglTexture);const K=B.source,de=h.get(K);delete de[k.__cacheKey],a.memory.textures--}function S(B){const k=n.get(B);if(B.depthTexture&&(B.depthTexture.dispose(),n.remove(B.depthTexture)),B.isWebGLCubeRenderTarget)for(let de=0;de<6;de++){if(Array.isArray(k.__webglFramebuffer[de]))for(let xe=0;xe=i.maxTextures&&Ce("WebGLTextures: Trying to use "+B+" texture units while this GPU supports only "+i.maxTextures),E+=1,B}function q(B){const k=[];return k.push(B.wrapS),k.push(B.wrapT),k.push(B.wrapR||0),k.push(B.magFilter),k.push(B.minFilter),k.push(B.anisotropy),k.push(B.internalFormat),k.push(B.format),k.push(B.type),k.push(B.generateMipmaps),k.push(B.premultiplyAlpha),k.push(B.flipY),k.push(B.unpackAlignment),k.push(B.colorSpace),k.join()}function z(B,k){const K=n.get(B);if(B.isVideoTexture&&he(B),B.isRenderTargetTexture===!1&&B.isExternalTexture!==!0&&B.version>0&&K.__version!==B.version){const de=B.image;if(de===null)Ce("WebGLRenderer: Texture marked for update but no image data found.");else if(de.complete===!1)Ce("WebGLRenderer: Texture marked for update but image is incomplete");else{L(K,B,k);return}}else B.isExternalTexture&&(K.__webglTexture=B.sourceTexture?B.sourceTexture:null);t.bindTexture(r.TEXTURE_2D,K.__webglTexture,r.TEXTURE0+k)}function V(B,k){const K=n.get(B);if(B.isRenderTargetTexture===!1&&B.version>0&&K.__version!==B.version){L(K,B,k);return}else B.isExternalTexture&&(K.__webglTexture=B.sourceTexture?B.sourceTexture:null);t.bindTexture(r.TEXTURE_2D_ARRAY,K.__webglTexture,r.TEXTURE0+k)}function H(B,k){const K=n.get(B);if(B.isRenderTargetTexture===!1&&B.version>0&&K.__version!==B.version){L(K,B,k);return}t.bindTexture(r.TEXTURE_3D,K.__webglTexture,r.TEXTURE0+k)}function F(B,k){const K=n.get(B);if(B.version>0&&K.__version!==B.version){C(K,B,k);return}t.bindTexture(r.TEXTURE_CUBE_MAP,K.__webglTexture,r.TEXTURE0+k)}const ie={[oc]:r.REPEAT,[er]:r.CLAMP_TO_EDGE,[lc]:r.MIRRORED_REPEAT},ue={[yn]:r.NEAREST,[jp]:r.NEAREST_MIPMAP_NEAREST,[To]:r.NEAREST_MIPMAP_LINEAR,[Qt]:r.LINEAR,[Hl]:r.LINEAR_MIPMAP_NEAREST,[ri]:r.LINEAR_MIPMAP_LINEAR},_e={[Ly]:r.NEVER,[By]:r.ALWAYS,[Ny]:r.LESS,[im]:r.LEQUAL,[Uy]:r.EQUAL,[qy]:r.GEQUAL,[Fy]:r.GREATER,[Oy]:r.NOTEQUAL};function Ne(B,k){if(k.type===tr&&e.has("OES_texture_float_linear")===!1&&(k.magFilter===Qt||k.magFilter===Hl||k.magFilter===To||k.magFilter===ri||k.minFilter===Qt||k.minFilter===Hl||k.minFilter===To||k.minFilter===ri)&&Ce("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(B,r.TEXTURE_WRAP_S,ie[k.wrapS]),r.texParameteri(B,r.TEXTURE_WRAP_T,ie[k.wrapT]),(B===r.TEXTURE_3D||B===r.TEXTURE_2D_ARRAY)&&r.texParameteri(B,r.TEXTURE_WRAP_R,ie[k.wrapR]),r.texParameteri(B,r.TEXTURE_MAG_FILTER,ue[k.magFilter]),r.texParameteri(B,r.TEXTURE_MIN_FILTER,ue[k.minFilter]),k.compareFunction&&(r.texParameteri(B,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(B,r.TEXTURE_COMPARE_FUNC,_e[k.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(k.magFilter===yn||k.minFilter!==To&&k.minFilter!==ri||k.type===tr&&e.has("OES_texture_float_linear")===!1)return;if(k.anisotropy>1||n.get(k).__currentAnisotropy){const K=e.get("EXT_texture_filter_anisotropic");r.texParameterf(B,K.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(k.anisotropy,i.getMaxAnisotropy())),n.get(k).__currentAnisotropy=k.anisotropy}}}function Le(B,k){let K=!1;B.__webglInit===void 0&&(B.__webglInit=!0,k.addEventListener("dispose",w));const de=k.source;let xe=h.get(de);xe===void 0&&(xe={},h.set(de,xe));const le=q(k);if(le!==B.__cacheKey){xe[le]===void 0&&(xe[le]={texture:r.createTexture(),usedTimes:0},a.memory.textures++,K=!0),xe[le].usedTimes++;const Ve=xe[B.__cacheKey];Ve!==void 0&&(xe[B.__cacheKey].usedTimes--,Ve.usedTimes===0&&M(k)),B.__cacheKey=le,B.__webglTexture=xe[le].texture}return K}function $(B,k,K){return Math.floor(Math.floor(B/K)/k)}function W(B,k,K,de){const le=B.updateRanges;if(le.length===0)t.texSubImage2D(r.TEXTURE_2D,0,0,0,k.width,k.height,K,de,k.data);else{le.sort((be,we)=>be.start-we.start);let Ve=0;for(let be=1;be0){Y&&Re&&t.texStorage2D(r.TEXTURE_2D,Ee,Ke,at[0].width,at[0].height);for(let ve=0,ge=at.length;ve0){const Ge=cp(Ue.width,Ue.height,k.format,k.type);for(const lt of k.layerUpdates){const Dt=Ue.data.subarray(lt*Ge/Ue.data.BYTES_PER_ELEMENT,(lt+1)*Ge/Ue.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,ve,0,0,lt,Ue.width,Ue.height,1,we,Dt)}k.clearLayerUpdates()}else t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,ve,0,0,0,Ue.width,Ue.height,be.depth,we,Ue.data)}else t.compressedTexImage3D(r.TEXTURE_2D_ARRAY,ve,Ke,Ue.width,Ue.height,be.depth,0,Ue.data,0,0);else Ce("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else Y?ke&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,ve,0,0,0,Ue.width,Ue.height,be.depth,we,tt,Ue.data):t.texImage3D(r.TEXTURE_2D_ARRAY,ve,Ke,Ue.width,Ue.height,be.depth,0,we,tt,Ue.data)}else{Y&&Re&&t.texStorage2D(r.TEXTURE_2D,Ee,Ke,at[0].width,at[0].height);for(let ve=0,ge=at.length;ve0){const ve=cp(be.width,be.height,k.format,k.type);for(const ge of k.layerUpdates){const Ge=be.data.subarray(ge*ve/be.data.BYTES_PER_ELEMENT,(ge+1)*ve/be.data.BYTES_PER_ELEMENT);t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,ge,be.width,be.height,1,we,tt,Ge)}k.clearLayerUpdates()}else t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,be.width,be.height,be.depth,we,tt,be.data)}else t.texImage3D(r.TEXTURE_2D_ARRAY,0,Ke,be.width,be.height,be.depth,0,we,tt,be.data);else if(k.isData3DTexture)Y?(Re&&t.texStorage3D(r.TEXTURE_3D,Ee,Ke,be.width,be.height,be.depth),ke&&t.texSubImage3D(r.TEXTURE_3D,0,0,0,0,be.width,be.height,be.depth,we,tt,be.data)):t.texImage3D(r.TEXTURE_3D,0,Ke,be.width,be.height,be.depth,0,we,tt,be.data);else if(k.isFramebufferTexture){if(Re)if(Y)t.texStorage2D(r.TEXTURE_2D,Ee,Ke,be.width,be.height);else{let ve=be.width,ge=be.height;for(let Ge=0;Ge>=1,ge>>=1}}else if(at.length>0){if(Y&&Re){const ve=Te(at[0]);t.texStorage2D(r.TEXTURE_2D,Ee,Ke,ve.width,ve.height)}for(let ve=0,ge=at.length;ve0&&Ee++;const ge=Te(we[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,Ee,at,ge.width,ge.height)}for(let ge=0;ge<6;ge++)if(be){Y?ke&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,0,0,we[ge].width,we[ge].height,Ke,Ue,we[ge].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,at,we[ge].width,we[ge].height,0,Ke,Ue,we[ge].data);for(let Ge=0;Ge>le),tt=Math.max(1,k.height>>le);xe===r.TEXTURE_3D||xe===r.TEXTURE_2D_ARRAY?t.texImage3D(xe,le,Xe,we,tt,k.depth,0,Ve,Me,null):t.texImage2D(xe,le,Xe,we,tt,0,Ve,Me,null)}t.bindFramebuffer(r.FRAMEBUFFER,B),U(k)?o.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,de,xe,be.__webglTexture,0,G(k)):(xe===r.TEXTURE_2D||xe>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&xe<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,de,xe,be.__webglTexture,le),t.bindFramebuffer(r.FRAMEBUFFER,null)}function ce(B,k,K){if(r.bindRenderbuffer(r.RENDERBUFFER,B),k.depthBuffer){const de=k.depthTexture,xe=de&&de.isDepthTexture?de.type:null,le=y(k.stencilBuffer,xe),Ve=k.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Me=G(k);U(k)?o.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Me,le,k.width,k.height):K?r.renderbufferStorageMultisample(r.RENDERBUFFER,Me,le,k.width,k.height):r.renderbufferStorage(r.RENDERBUFFER,le,k.width,k.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,Ve,r.RENDERBUFFER,B)}else{const de=k.textures;for(let xe=0;xe{delete k.__boundDepthTexture,delete k.__depthDisposeCallback,de.removeEventListener("dispose",xe)};de.addEventListener("dispose",xe),k.__depthDisposeCallback=xe}k.__boundDepthTexture=de}if(B.depthTexture&&!k.__autoAllocateDepthBuffer){if(K)throw new Error("target.depthTexture not supported in Cube render targets");const de=B.texture.mipmaps;de&&de.length>0?j(k.__webglFramebuffer[0],B):j(k.__webglFramebuffer,B)}else if(K){k.__webglDepthbuffer=[];for(let de=0;de<6;de++)if(t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer[de]),k.__webglDepthbuffer[de]===void 0)k.__webglDepthbuffer[de]=r.createRenderbuffer(),ce(k.__webglDepthbuffer[de],B,!1);else{const xe=B.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,le=k.__webglDepthbuffer[de];r.bindRenderbuffer(r.RENDERBUFFER,le),r.framebufferRenderbuffer(r.FRAMEBUFFER,xe,r.RENDERBUFFER,le)}}else{const de=B.texture.mipmaps;if(de&&de.length>0?t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer[0]):t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer),k.__webglDepthbuffer===void 0)k.__webglDepthbuffer=r.createRenderbuffer(),ce(k.__webglDepthbuffer,B,!1);else{const xe=B.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,le=k.__webglDepthbuffer;r.bindRenderbuffer(r.RENDERBUFFER,le),r.framebufferRenderbuffer(r.FRAMEBUFFER,xe,r.RENDERBUFFER,le)}}t.bindFramebuffer(r.FRAMEBUFFER,null)}function ye(B,k,K){const de=n.get(B);k!==void 0&&Q(de.__webglFramebuffer,B,B.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),K!==void 0&&fe(B)}function me(B){const k=B.texture,K=n.get(B),de=n.get(k);B.addEventListener("dispose",T);const xe=B.textures,le=B.isWebGLCubeRenderTarget===!0,Ve=xe.length>1;if(Ve||(de.__webglTexture===void 0&&(de.__webglTexture=r.createTexture()),de.__version=k.version,a.memory.textures++),le){K.__webglFramebuffer=[];for(let Me=0;Me<6;Me++)if(k.mipmaps&&k.mipmaps.length>0){K.__webglFramebuffer[Me]=[];for(let Xe=0;Xe0){K.__webglFramebuffer=[];for(let Me=0;Me0&&U(B)===!1){K.__webglMultisampledFramebuffer=r.createFramebuffer(),K.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,K.__webglMultisampledFramebuffer);for(let Me=0;Me0)for(let Xe=0;Xe0)for(let Xe=0;Xe0){if(U(B)===!1){const k=B.textures,K=B.width,de=B.height;let xe=r.COLOR_BUFFER_BIT;const le=B.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Ve=n.get(B),Me=k.length>1;if(Me)for(let ze=0;ze0?t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ve.__webglFramebuffer[0]):t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Ve.__webglFramebuffer);for(let ze=0;ze0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&k.__useRenderToTexture!==!1}function he(B){const k=a.render.frame;d.get(B)!==k&&(d.set(B,k),B.update())}function pe(B,k){const K=B.colorSpace,de=B.format,xe=B.type;return B.isCompressedTexture===!0||B.isVideoTexture===!0||K!==ka&&K!==Ui&&(pt.getTransfer(K)===St?(de!==qn||xe!==Yr)&&Ce("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):it("WebGLTextures: Unsupported texture color space:",K)),k}function Te(B){return typeof HTMLImageElement<"u"&&B instanceof HTMLImageElement?(c.width=B.naturalWidth||B.width,c.height=B.naturalHeight||B.height):typeof VideoFrame<"u"&&B instanceof VideoFrame?(c.width=B.displayWidth,c.height=B.displayHeight):(c.width=B.width,c.height=B.height),c}this.allocateTextureUnit=O,this.resetTextureUnits=I,this.setTexture2D=z,this.setTexture2DArray=V,this.setTexture3D=H,this.setTextureCube=F,this.rebindTextures=ye,this.setupRenderTarget=me,this.updateRenderTargetMipmap=Z,this.updateMultisampleRenderTarget=se,this.setupDepthRenderbuffer=fe,this.setupFrameBufferTexture=Q,this.useMultisampledRTT=U}function Jv(r,e){function t(n,i=Ui){let s;const a=pt.getTransfer(i);if(n===Yr)return r.UNSIGNED_BYTE;if(n===R0)return r.UNSIGNED_SHORT_4_4_4_4;if(n===I0)return r.UNSIGNED_SHORT_5_5_5_1;if(n===Qp)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===em)return r.UNSIGNED_INT_10F_11F_11F_REV;if(n===Kp)return r.BYTE;if(n===Jp)return r.SHORT;if(n===Uo)return r.UNSIGNED_SHORT;if(n===C0)return r.INT;if(n===Xi)return r.UNSIGNED_INT;if(n===tr)return r.FLOAT;if(n===Oa)return r.HALF_FLOAT;if(n===tm)return r.ALPHA;if(n===nm)return r.RGB;if(n===qn)return r.RGBA;if(n===Oo)return r.DEPTH_COMPONENT;if(n===qo)return r.DEPTH_STENCIL;if(n===P0)return r.RED;if(n===Pc)return r.RED_INTEGER;if(n===D0)return r.RG;if(n===L0)return r.RG_INTEGER;if(n===N0)return r.RGBA_INTEGER;if(n===Wl||n===Xl||n===Yl||n===Zl)if(a===St)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===Wl)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Xl)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Yl)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Zl)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===Wl)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Xl)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Yl)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Zl)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Uu||n===Fu||n===Ou||n===qu)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===Uu)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Fu)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Ou)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===qu)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Bu||n===zu||n===Vu)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(n===Bu||n===zu)return a===St?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===Vu)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Gu||n===Hu||n===Wu||n===Xu||n===Yu||n===Zu||n===$u||n===ju||n===Ku||n===Ju||n===Qu||n===e0||n===t0||n===n0)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(n===Gu)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Hu)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Wu)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===Xu)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===Yu)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===Zu)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===$u)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ju)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Ku)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Ju)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===Qu)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===e0)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===t0)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===n0)return a===St?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===r0||n===i0||n===s0)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(n===r0)return a===St?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===i0)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===s0)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===a0||n===o0||n===l0||n===c0)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(n===a0)return s.COMPRESSED_RED_RGTC1_EXT;if(n===o0)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===l0)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===c0)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===Fo?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:t}}const oA=` +void main() { + + gl_Position = vec4( position, 1.0 ); + +}`,lA=` +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 cA{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const n=new mm(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 Pr({vertexShader:oA,fragmentShader:lA,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new en(new Jo(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class dA extends pi{constructor(e,t){super();const n=this;let i=null,s=1,a=null,o="local-floor",l=1,c=null,d=null,u=null,h=null,f=null,m=null;const x=typeof XRWebGLBinding<"u",g=new cA,p={},v=t.getContextAttributes();let b=null,y=null;const _=[],w=[],T=new re;let A=null;const M=new hn;M.viewport=new ot;const S=new hn;S.viewport=new ot;const E=[M,S],I=new qv;let O=null,q=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(L){let C=_[L];return C===void 0&&(C=new fu,_[L]=C),C.getTargetRaySpace()},this.getControllerGrip=function(L){let C=_[L];return C===void 0&&(C=new fu,_[L]=C),C.getGripSpace()},this.getHand=function(L){let C=_[L];return C===void 0&&(C=new fu,_[L]=C),C.getHandSpace()};function z(L){const C=w.indexOf(L.inputSource);if(C===-1)return;const Q=_[C];Q!==void 0&&(Q.update(L.inputSource,L.frame,c||a),Q.dispatchEvent({type:L.type,data:L.inputSource}))}function V(){i.removeEventListener("select",z),i.removeEventListener("selectstart",z),i.removeEventListener("selectend",z),i.removeEventListener("squeeze",z),i.removeEventListener("squeezestart",z),i.removeEventListener("squeezeend",z),i.removeEventListener("end",V),i.removeEventListener("inputsourceschange",H);for(let L=0;L<_.length;L++){const C=w[L];C!==null&&(w[L]=null,_[L].disconnect(C))}O=null,q=null,g.reset();for(const L in p)delete p[L];e.setRenderTarget(b),f=null,h=null,u=null,i=null,y=null,W.stop(),n.isPresenting=!1,e.setPixelRatio(A),e.setSize(T.width,T.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(L){s=L,n.isPresenting===!0&&Ce("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(L){o=L,n.isPresenting===!0&&Ce("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(L){c=L},this.getBaseLayer=function(){return h!==null?h:f},this.getBinding=function(){return u===null&&x&&(u=new XRWebGLBinding(i,t)),u},this.getFrame=function(){return m},this.getSession=function(){return i},this.setSession=async function(L){if(i=L,i!==null){if(b=e.getRenderTarget(),i.addEventListener("select",z),i.addEventListener("selectstart",z),i.addEventListener("selectend",z),i.addEventListener("squeeze",z),i.addEventListener("squeezestart",z),i.addEventListener("squeezeend",z),i.addEventListener("end",V),i.addEventListener("inputsourceschange",H),v.xrCompatible!==!0&&await t.makeXRCompatible(),A=e.getPixelRatio(),e.getSize(T),x&&"createProjectionLayer"in XRWebGLBinding.prototype){let Q=null,ce=null,j=null;v.depth&&(j=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,Q=v.stencil?qo:Oo,ce=v.stencil?Fo:Xi);const fe={colorFormat:t.RGBA8,depthFormat:j,scaleFactor:s};u=this.getBinding(),h=u.createProjectionLayer(fe),i.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),y=new di(h.textureWidth,h.textureHeight,{format:qn,type:Yr,depthTexture:new pm(h.textureWidth,h.textureHeight,ce,void 0,void 0,void 0,void 0,void 0,void 0,Q),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}else{const Q={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:s};f=new XRWebGLLayer(i,t,Q),i.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),y=new di(f.framebufferWidth,f.framebufferHeight,{format:qn,type:Yr,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:f.ignoreDepthValues===!1,resolveStencilBuffer:f.ignoreDepthValues===!1})}y.isXRRenderTarget=!0,this.setFoveation(l),c=null,a=await i.requestReferenceSpace(o),W.setContext(i),W.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return g.getDepthTexture()};function H(L){for(let C=0;C=0&&(w[ce]=null,_[ce].disconnect(Q))}for(let C=0;C=w.length){w.push(Q),ce=fe;break}else if(w[fe]===null){w[fe]=Q,ce=fe;break}if(ce===-1)break}const j=_[ce];j&&j.connect(Q)}}const F=new P,ie=new P;function ue(L,C,Q){F.setFromMatrixPosition(C.matrixWorld),ie.setFromMatrixPosition(Q.matrixWorld);const ce=F.distanceTo(ie),j=C.projectionMatrix.elements,fe=Q.projectionMatrix.elements,ye=j[14]/(j[10]-1),me=j[14]/(j[10]+1),Z=(j[9]+1)/j[5],D=(j[9]-1)/j[5],ne=(j[8]-1)/j[0],se=(fe[8]+1)/fe[0],G=ye*ne,U=ye*se,he=ce/(-ne+se),pe=he*-ne;if(C.matrixWorld.decompose(L.position,L.quaternion,L.scale),L.translateX(pe),L.translateZ(he),L.matrixWorld.compose(L.position,L.quaternion,L.scale),L.matrixWorldInverse.copy(L.matrixWorld).invert(),j[10]===-1)L.projectionMatrix.copy(C.projectionMatrix),L.projectionMatrixInverse.copy(C.projectionMatrixInverse);else{const Te=ye+he,B=me+he,k=G-pe,K=U+(ce-pe),de=Z*me/B*Te,xe=D*me/B*Te;L.projectionMatrix.makePerspective(k,K,de,xe,Te,B),L.projectionMatrixInverse.copy(L.projectionMatrix).invert()}}function _e(L,C){C===null?L.matrixWorld.copy(L.matrix):L.matrixWorld.multiplyMatrices(C.matrixWorld,L.matrix),L.matrixWorldInverse.copy(L.matrixWorld).invert()}this.updateCamera=function(L){if(i===null)return;let C=L.near,Q=L.far;g.texture!==null&&(g.depthNear>0&&(C=g.depthNear),g.depthFar>0&&(Q=g.depthFar)),I.near=S.near=M.near=C,I.far=S.far=M.far=Q,(O!==I.near||q!==I.far)&&(i.updateRenderState({depthNear:I.near,depthFar:I.far}),O=I.near,q=I.far),I.layers.mask=L.layers.mask|6,M.layers.mask=I.layers.mask&3,S.layers.mask=I.layers.mask&5;const ce=L.parent,j=I.cameras;_e(I,ce);for(let fe=0;fe0&&(g.alphaTest.value=p.alphaTest);const v=e.get(p),b=v.envMap,y=v.envMapRotation;b&&(g.envMap.value=b,Ys.copy(y),Ys.x*=-1,Ys.y*=-1,Ys.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(Ys.y*=-1,Ys.z*=-1),g.envMapRotation.value.setFromMatrix4(uA.makeRotationFromEuler(Ys)),g.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=p.reflectivity,g.ior.value=p.ior,g.refractionRatio.value=p.refractionRatio),p.lightMap&&(g.lightMap.value=p.lightMap,g.lightMapIntensity.value=p.lightMapIntensity,t(p.lightMap,g.lightMapTransform)),p.aoMap&&(g.aoMap.value=p.aoMap,g.aoMapIntensity.value=p.aoMapIntensity,t(p.aoMap,g.aoMapTransform))}function a(g,p){g.diffuse.value.copy(p.color),g.opacity.value=p.opacity,p.map&&(g.map.value=p.map,t(p.map,g.mapTransform))}function o(g,p){g.dashSize.value=p.dashSize,g.totalSize.value=p.dashSize+p.gapSize,g.scale.value=p.scale}function l(g,p,v,b){g.diffuse.value.copy(p.color),g.opacity.value=p.opacity,g.size.value=p.size*v,g.scale.value=b*.5,p.map&&(g.map.value=p.map,t(p.map,g.uvTransform)),p.alphaMap&&(g.alphaMap.value=p.alphaMap,t(p.alphaMap,g.alphaMapTransform)),p.alphaTest>0&&(g.alphaTest.value=p.alphaTest)}function c(g,p){g.diffuse.value.copy(p.color),g.opacity.value=p.opacity,g.rotation.value=p.rotation,p.map&&(g.map.value=p.map,t(p.map,g.mapTransform)),p.alphaMap&&(g.alphaMap.value=p.alphaMap,t(p.alphaMap,g.alphaMapTransform)),p.alphaTest>0&&(g.alphaTest.value=p.alphaTest)}function d(g,p){g.specular.value.copy(p.specular),g.shininess.value=Math.max(p.shininess,1e-4)}function u(g,p){p.gradientMap&&(g.gradientMap.value=p.gradientMap)}function h(g,p){g.metalness.value=p.metalness,p.metalnessMap&&(g.metalnessMap.value=p.metalnessMap,t(p.metalnessMap,g.metalnessMapTransform)),g.roughness.value=p.roughness,p.roughnessMap&&(g.roughnessMap.value=p.roughnessMap,t(p.roughnessMap,g.roughnessMapTransform)),p.envMap&&(g.envMapIntensity.value=p.envMapIntensity)}function f(g,p,v){g.ior.value=p.ior,p.sheen>0&&(g.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen),g.sheenRoughness.value=p.sheenRoughness,p.sheenColorMap&&(g.sheenColorMap.value=p.sheenColorMap,t(p.sheenColorMap,g.sheenColorMapTransform)),p.sheenRoughnessMap&&(g.sheenRoughnessMap.value=p.sheenRoughnessMap,t(p.sheenRoughnessMap,g.sheenRoughnessMapTransform))),p.clearcoat>0&&(g.clearcoat.value=p.clearcoat,g.clearcoatRoughness.value=p.clearcoatRoughness,p.clearcoatMap&&(g.clearcoatMap.value=p.clearcoatMap,t(p.clearcoatMap,g.clearcoatMapTransform)),p.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=p.clearcoatRoughnessMap,t(p.clearcoatRoughnessMap,g.clearcoatRoughnessMapTransform)),p.clearcoatNormalMap&&(g.clearcoatNormalMap.value=p.clearcoatNormalMap,t(p.clearcoatNormalMap,g.clearcoatNormalMapTransform),g.clearcoatNormalScale.value.copy(p.clearcoatNormalScale),p.side===Rn&&g.clearcoatNormalScale.value.negate())),p.dispersion>0&&(g.dispersion.value=p.dispersion),p.iridescence>0&&(g.iridescence.value=p.iridescence,g.iridescenceIOR.value=p.iridescenceIOR,g.iridescenceThicknessMinimum.value=p.iridescenceThicknessRange[0],g.iridescenceThicknessMaximum.value=p.iridescenceThicknessRange[1],p.iridescenceMap&&(g.iridescenceMap.value=p.iridescenceMap,t(p.iridescenceMap,g.iridescenceMapTransform)),p.iridescenceThicknessMap&&(g.iridescenceThicknessMap.value=p.iridescenceThicknessMap,t(p.iridescenceThicknessMap,g.iridescenceThicknessMapTransform))),p.transmission>0&&(g.transmission.value=p.transmission,g.transmissionSamplerMap.value=v.texture,g.transmissionSamplerSize.value.set(v.width,v.height),p.transmissionMap&&(g.transmissionMap.value=p.transmissionMap,t(p.transmissionMap,g.transmissionMapTransform)),g.thickness.value=p.thickness,p.thicknessMap&&(g.thicknessMap.value=p.thicknessMap,t(p.thicknessMap,g.thicknessMapTransform)),g.attenuationDistance.value=p.attenuationDistance,g.attenuationColor.value.copy(p.attenuationColor)),p.anisotropy>0&&(g.anisotropyVector.value.set(p.anisotropy*Math.cos(p.anisotropyRotation),p.anisotropy*Math.sin(p.anisotropyRotation)),p.anisotropyMap&&(g.anisotropyMap.value=p.anisotropyMap,t(p.anisotropyMap,g.anisotropyMapTransform))),g.specularIntensity.value=p.specularIntensity,g.specularColor.value.copy(p.specularColor),p.specularColorMap&&(g.specularColorMap.value=p.specularColorMap,t(p.specularColorMap,g.specularColorMapTransform)),p.specularIntensityMap&&(g.specularIntensityMap.value=p.specularIntensityMap,t(p.specularIntensityMap,g.specularIntensityMapTransform))}function m(g,p){p.matcap&&(g.matcap.value=p.matcap)}function x(g,p){const v=e.get(p).light;g.referencePosition.value.setFromMatrixPosition(v.matrixWorld),g.nearDistance.value=v.shadow.camera.near,g.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function fA(r,e,t,n){let i={},s={},a=[];const o=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,b){const y=b.program;n.uniformBlockBinding(v,y)}function c(v,b){let y=i[v.id];y===void 0&&(m(v),y=d(v),i[v.id]=y,v.addEventListener("dispose",g));const _=b.program;n.updateUBOMapping(v,_);const w=e.render.frame;s[v.id]!==w&&(h(v),s[v.id]=w)}function d(v){const b=u();v.__bindingPointIndex=b;const y=r.createBuffer(),_=v.__size,w=v.usage;return r.bindBuffer(r.UNIFORM_BUFFER,y),r.bufferData(r.UNIFORM_BUFFER,_,w),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,b,y),y}function u(){for(let v=0;v0&&(y+=_-w),v.__size=y,v.__cache={},this}function x(v){const b={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(b.boundary=4,b.storage=4):v.isVector2?(b.boundary=8,b.storage=8):v.isVector3||v.isColor?(b.boundary=16,b.storage=12):v.isVector4?(b.boundary=16,b.storage=16):v.isMatrix3?(b.boundary=48,b.storage=48):v.isMatrix4?(b.boundary=64,b.storage=64):v.isTexture?Ce("WebGLRenderer: Texture samplers can not be part of an uniforms group."):Ce("WebGLRenderer: Unsupported uniform value type.",v),b}function g(v){const b=v.target;b.removeEventListener("dispose",g);const y=a.indexOf(b.__bindingPointIndex);a.splice(y,1),r.deleteBuffer(i[b.id]),delete i[b.id],delete s[b.id]}function p(){for(const v in i)r.deleteBuffer(i[v]);a=[],i={},s={}}return{bind:l,update:c,dispose:p}}const pA=new Uint16Array([11481,15204,11534,15171,11808,15015,12385,14843,12894,14716,13396,14600,13693,14483,13976,14366,14237,14171,14405,13961,14511,13770,14605,13598,14687,13444,14760,13305,14822,13066,14876,12857,14923,12675,14963,12517,14997,12379,15025,12230,15049,12023,15070,11843,15086,11687,15100,11551,15111,11433,15120,11330,15127,11217,15132,11060,15135,10922,15138,10801,15139,10695,15139,10600,13012,14923,13020,14917,13064,14886,13176,14800,13349,14666,13513,14526,13724,14398,13960,14230,14200,14020,14383,13827,14488,13651,14583,13491,14667,13348,14740,13132,14803,12908,14856,12713,14901,12542,14938,12394,14968,12241,14992,12017,15010,11822,15024,11654,15034,11507,15041,11380,15044,11269,15044,11081,15042,10913,15037,10764,15031,10635,15023,10520,15014,10419,15003,10330,13657,14676,13658,14673,13670,14660,13698,14622,13750,14547,13834,14442,13956,14317,14112,14093,14291,13889,14407,13704,14499,13538,14586,13389,14664,13201,14733,12966,14792,12758,14842,12577,14882,12418,14915,12272,14940,12033,14959,11826,14972,11646,14980,11490,14983,11355,14983,11212,14979,11008,14971,10830,14961,10675,14950,10540,14936,10420,14923,10315,14909,10204,14894,10041,14089,14460,14090,14459,14096,14452,14112,14431,14141,14388,14186,14305,14252,14130,14341,13941,14399,13756,14467,13585,14539,13430,14610,13272,14677,13026,14737,12808,14790,12617,14833,12449,14869,12303,14896,12065,14916,11845,14929,11655,14937,11490,14939,11347,14936,11184,14930,10970,14921,10783,14912,10621,14900,10480,14885,10356,14867,10247,14848,10062,14827,9894,14805,9745,14400,14208,14400,14206,14402,14198,14406,14174,14415,14122,14427,14035,14444,13913,14469,13767,14504,13613,14548,13463,14598,13324,14651,13082,14704,12858,14752,12658,14795,12483,14831,12330,14860,12106,14881,11875,14895,11675,14903,11501,14905,11351,14903,11178,14900,10953,14892,10757,14880,10589,14865,10442,14847,10313,14827,10162,14805,9965,14782,9792,14757,9642,14731,9507,14562,13883,14562,13883,14563,13877,14566,13862,14570,13830,14576,13773,14584,13689,14595,13582,14613,13461,14637,13336,14668,13120,14704,12897,14741,12695,14776,12516,14808,12358,14835,12150,14856,11910,14870,11701,14878,11519,14882,11361,14884,11187,14880,10951,14871,10748,14858,10572,14842,10418,14823,10286,14801,10099,14777,9897,14751,9722,14725,9567,14696,9430,14666,9309,14702,13604,14702,13604,14702,13600,14703,13591,14705,13570,14707,13533,14709,13477,14712,13400,14718,13305,14727,13106,14743,12907,14762,12716,14784,12539,14807,12380,14827,12190,14844,11943,14855,11727,14863,11539,14870,11376,14871,11204,14868,10960,14858,10748,14845,10565,14829,10406,14809,10269,14786,10058,14761,9852,14734,9671,14705,9512,14674,9374,14641,9253,14608,9076,14821,13366,14821,13365,14821,13364,14821,13358,14821,13344,14821,13320,14819,13252,14817,13145,14815,13011,14814,12858,14817,12698,14823,12539,14832,12389,14841,12214,14850,11968,14856,11750,14861,11558,14866,11390,14867,11226,14862,10972,14853,10754,14840,10565,14823,10401,14803,10259,14780,10032,14754,9820,14725,9635,14694,9473,14661,9333,14627,9203,14593,8988,14557,8798,14923,13014,14922,13014,14922,13012,14922,13004,14920,12987,14919,12957,14915,12907,14909,12834,14902,12738,14894,12623,14888,12498,14883,12370,14880,12203,14878,11970,14875,11759,14873,11569,14874,11401,14872,11243,14865,10986,14855,10762,14842,10568,14825,10401,14804,10255,14781,10017,14754,9799,14725,9611,14692,9445,14658,9301,14623,9139,14587,8920,14548,8729,14509,8562,15008,12672,15008,12672,15008,12671,15007,12667,15005,12656,15001,12637,14997,12605,14989,12556,14978,12490,14966,12407,14953,12313,14940,12136,14927,11934,14914,11742,14903,11563,14896,11401,14889,11247,14879,10992,14866,10767,14851,10570,14833,10400,14812,10252,14789,10007,14761,9784,14731,9592,14698,9424,14663,9279,14627,9088,14588,8868,14548,8676,14508,8508,14467,8360,15080,12386,15080,12386,15079,12385,15078,12383,15076,12378,15072,12367,15066,12347,15057,12315,15045,12253,15030,12138,15012,11998,14993,11845,14972,11685,14951,11530,14935,11383,14920,11228,14904,10981,14887,10762,14870,10567,14850,10397,14827,10248,14803,9997,14774,9771,14743,9578,14710,9407,14674,9259,14637,9048,14596,8826,14555,8632,14514,8464,14471,8317,14427,8182,15139,12008,15139,12008,15138,12008,15137,12007,15135,12003,15130,11990,15124,11969,15115,11929,15102,11872,15086,11794,15064,11693,15041,11581,15013,11459,14987,11336,14966,11170,14944,10944,14921,10738,14898,10552,14875,10387,14850,10239,14824,9983,14794,9758,14762,9563,14728,9392,14692,9244,14653,9014,14611,8791,14569,8597,14526,8427,14481,8281,14436,8110,14391,7885,15188,11617,15188,11617,15187,11617,15186,11618,15183,11617,15179,11612,15173,11601,15163,11581,15150,11546,15133,11495,15110,11427,15083,11346,15051,11246,15024,11057,14996,10868,14967,10687,14938,10517,14911,10362,14882,10206,14853,9956,14821,9737,14787,9543,14752,9375,14715,9228,14675,8980,14632,8760,14589,8565,14544,8395,14498,8248,14451,8049,14404,7824,14357,7630,15228,11298,15228,11298,15227,11299,15226,11301,15223,11303,15219,11302,15213,11299,15204,11290,15191,11271,15174,11217,15150,11129,15119,11015,15087,10886,15057,10744,15024,10599,14990,10455,14957,10318,14924,10143,14891,9911,14856,9701,14820,9516,14782,9352,14744,9200,14703,8946,14659,8725,14615,8533,14568,8366,14521,8220,14472,7992,14423,7770,14374,7578,14315,7408,15260,10819,15260,10819,15259,10822,15258,10826,15256,10832,15251,10836,15246,10841,15237,10838,15225,10821,15207,10788,15183,10734,15151,10660,15120,10571,15087,10469,15049,10359,15012,10249,14974,10041,14937,9837,14900,9647,14860,9475,14820,9320,14779,9147,14736,8902,14691,8688,14646,8499,14598,8335,14549,8189,14499,7940,14448,7720,14397,7529,14347,7363,14256,7218,15285,10410,15285,10411,15285,10413,15284,10418,15282,10425,15278,10434,15272,10442,15264,10449,15252,10445,15235,10433,15210,10403,15179,10358,15149,10301,15113,10218,15073,10059,15033,9894,14991,9726,14951,9565,14909,9413,14865,9273,14822,9073,14777,8845,14730,8641,14682,8459,14633,8300,14583,8129,14531,7883,14479,7670,14426,7482,14373,7321,14305,7176,14201,6939,15305,9939,15305,9940,15305,9945,15304,9955,15302,9967,15298,9989,15293,10010,15286,10033,15274,10044,15258,10045,15233,10022,15205,9975,15174,9903,15136,9808,15095,9697,15053,9578,15009,9451,14965,9327,14918,9198,14871,8973,14825,8766,14775,8579,14725,8408,14675,8259,14622,8058,14569,7821,14515,7615,14460,7435,14405,7276,14350,7108,14256,6866,14149,6653,15321,9444,15321,9445,15321,9448,15320,9458,15317,9470,15314,9490,15310,9515,15302,9540,15292,9562,15276,9579,15251,9577,15226,9559,15195,9519,15156,9463,15116,9389,15071,9304,15025,9208,14978,9023,14927,8838,14878,8661,14827,8496,14774,8344,14722,8206,14667,7973,14612,7749,14556,7555,14499,7382,14443,7229,14385,7025,14322,6791,14210,6588,14100,6409,15333,8920,15333,8921,15332,8927,15332,8943,15329,8965,15326,9002,15322,9048,15316,9106,15307,9162,15291,9204,15267,9221,15244,9221,15212,9196,15175,9134,15133,9043,15088,8930,15040,8801,14990,8665,14938,8526,14886,8391,14830,8261,14775,8087,14719,7866,14661,7664,14603,7482,14544,7322,14485,7178,14426,6936,14367,6713,14281,6517,14166,6348,14054,6198,15341,8360,15341,8361,15341,8366,15341,8379,15339,8399,15336,8431,15332,8473,15326,8527,15318,8585,15302,8632,15281,8670,15258,8690,15227,8690,15191,8664,15149,8612,15104,8543,15055,8456,15001,8360,14948,8259,14892,8122,14834,7923,14776,7734,14716,7558,14656,7397,14595,7250,14534,7070,14472,6835,14410,6628,14350,6443,14243,6283,14125,6135,14010,5889,15348,7715,15348,7717,15348,7725,15347,7745,15345,7780,15343,7836,15339,7905,15334,8e3,15326,8103,15310,8193,15293,8239,15270,8270,15240,8287,15204,8283,15163,8260,15118,8223,15067,8143,15014,8014,14958,7873,14899,7723,14839,7573,14778,7430,14715,7293,14652,7164,14588,6931,14524,6720,14460,6531,14396,6362,14330,6210,14207,6015,14086,5781,13969,5576,15352,7114,15352,7116,15352,7128,15352,7159,15350,7195,15348,7237,15345,7299,15340,7374,15332,7457,15317,7544,15301,7633,15280,7703,15251,7754,15216,7775,15176,7767,15131,7733,15079,7670,15026,7588,14967,7492,14906,7387,14844,7278,14779,7171,14714,6965,14648,6770,14581,6587,14515,6420,14448,6269,14382,6123,14299,5881,14172,5665,14049,5477,13929,5310,15355,6329,15355,6330,15355,6339,15355,6362,15353,6410,15351,6472,15349,6572,15344,6688,15337,6835,15323,6985,15309,7142,15287,7220,15260,7277,15226,7310,15188,7326,15142,7318,15090,7285,15036,7239,14976,7177,14914,7045,14849,6892,14782,6736,14714,6581,14645,6433,14576,6293,14506,6164,14438,5946,14369,5733,14270,5540,14140,5369,14014,5216,13892,5043,15357,5483,15357,5484,15357,5496,15357,5528,15356,5597,15354,5692,15351,5835,15347,6011,15339,6195,15328,6317,15314,6446,15293,6566,15268,6668,15235,6746,15197,6796,15152,6811,15101,6790,15046,6748,14985,6673,14921,6583,14854,6479,14785,6371,14714,6259,14643,6149,14571,5946,14499,5750,14428,5567,14358,5401,14242,5250,14109,5111,13980,4870,13856,4657,15359,4555,15359,4557,15358,4573,15358,4633,15357,4715,15355,4841,15353,5061,15349,5216,15342,5391,15331,5577,15318,5770,15299,5967,15274,6150,15243,6223,15206,6280,15161,6310,15111,6317,15055,6300,14994,6262,14928,6208,14860,6141,14788,5994,14715,5838,14641,5684,14566,5529,14492,5384,14418,5247,14346,5121,14216,4892,14079,4682,13948,4496,13822,4330,15359,3498,15359,3501,15359,3520,15359,3598,15358,3719,15356,3860,15355,4137,15351,4305,15344,4563,15334,4809,15321,5116,15303,5273,15280,5418,15250,5547,15214,5653,15170,5722,15120,5761,15064,5763,15002,5733,14935,5673,14865,5597,14792,5504,14716,5400,14640,5294,14563,5185,14486,5041,14410,4841,14335,4655,14191,4482,14051,4325,13918,4183,13790,4012,15360,2282,15360,2285,15360,2306,15360,2401,15359,2547,15357,2748,15355,3103,15352,3349,15345,3675,15336,4020,15324,4272,15307,4496,15285,4716,15255,4908,15220,5086,15178,5170,15128,5214,15072,5234,15010,5231,14943,5206,14871,5166,14796,5102,14718,4971,14639,4833,14559,4687,14480,4541,14402,4401,14315,4268,14167,4142,14025,3958,13888,3747,13759,3556,15360,923,15360,925,15360,946,15360,1052,15359,1214,15357,1494,15356,1892,15352,2274,15346,2663,15338,3099,15326,3393,15309,3679,15288,3980,15260,4183,15226,4325,15185,4437,15136,4517,15080,4570,15018,4591,14950,4581,14877,4545,14800,4485,14720,4411,14638,4325,14556,4231,14475,4136,14395,3988,14297,3803,14145,3628,13999,3465,13861,3314,13729,3177,15360,263,15360,264,15360,272,15360,325,15359,407,15358,548,15356,780,15352,1144,15347,1580,15339,2099,15328,2425,15312,2795,15292,3133,15264,3329,15232,3517,15191,3689,15143,3819,15088,3923,15025,3978,14956,3999,14882,3979,14804,3931,14722,3855,14639,3756,14554,3645,14470,3529,14388,3409,14279,3289,14124,3173,13975,3055,13834,2848,13701,2658,15360,49,15360,49,15360,52,15360,75,15359,111,15358,201,15356,283,15353,519,15348,726,15340,1045,15329,1415,15314,1795,15295,2173,15269,2410,15237,2649,15197,2866,15150,3054,15095,3140,15032,3196,14963,3228,14888,3236,14808,3224,14725,3191,14639,3146,14553,3088,14466,2976,14382,2836,14262,2692,14103,2549,13952,2409,13808,2278,13674,2154,15360,4,15360,4,15360,4,15360,13,15359,33,15358,59,15357,112,15353,199,15348,302,15341,456,15331,628,15316,827,15297,1082,15272,1332,15241,1601,15202,1851,15156,2069,15101,2172,15039,2256,14970,2314,14894,2348,14813,2358,14728,2344,14640,2311,14551,2263,14463,2203,14376,2133,14247,2059,14084,1915,13930,1761,13784,1609,13648,1464,15360,0,15360,0,15360,0,15360,3,15359,18,15358,26,15357,53,15354,80,15348,97,15341,165,15332,238,15318,326,15299,427,15275,529,15245,654,15207,771,15161,885,15108,994,15046,1089,14976,1170,14900,1229,14817,1266,14731,1284,14641,1282,14550,1260,14460,1223,14370,1174,14232,1116,14066,1050,13909,981,13761,910,13623,839]);let wi=null;function mA(){return wi===null&&(wi=new Hr(pA,32,32,D0,Oa),wi.minFilter=Qt,wi.magFilter=Qt,wi.wrapS=er,wi.wrapT=er,wi.generateMipmaps=!1,wi.needsUpdate=!0),wi}class Qv{constructor(e={}){const{canvas:t=Vy(),context:n=null,depth:i=!0,stencil:s=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:u=!1,reversedDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");f=n.getContextAttributes().alpha}else f=a;const m=new Set([N0,L0,Pc]),x=new Set([Yr,Xi,Uo,Fo,R0,I0]),g=new Uint32Array(4),p=new Int32Array(4);let v=null,b=null;const y=[],_=[];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=zi,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const w=this;let T=!1;this._outputColorSpace=kn;let A=0,M=0,S=null,E=-1,I=null;const O=new ot,q=new ot;let z=null;const V=new De(0);let H=0,F=t.width,ie=t.height,ue=1,_e=null,Ne=null;const Le=new ot(0,0,F,ie),$=new ot(0,0,F,ie);let W=!1;const L=new jo;let C=!1,Q=!1;const ce=new Oe,j=new P,fe=new ot,ye={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let me=!1;function Z(){return S===null?ue:1}let D=n;function ne(N,J){return t.getContext(N,J)}try{const N={alpha:!0,depth:i,stencil:s,antialias:o,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:d,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Zo}`),t.addEventListener("webglcontextlost",ve,!1),t.addEventListener("webglcontextrestored",ge,!1),t.addEventListener("webglcontextcreationerror",Ge,!1),D===null){const J="webgl2";if(D=ne(J,N),D===null)throw ne(J)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(N){throw N("WebGLRenderer: "+N.message),N}let se,G,U,he,pe,Te,B,k,K,de,xe,le,Ve,Me,Xe,ze,be,we,tt,Ke,Ue,at,Y,Re;function ke(){se=new T8(D),se.init(),at=new Jv(D,se),G=new g8(D,se,e,at),U=new sA(D,se),G.reversedDepthBuffer&&h&&U.buffers.depth.setReversed(!0),he=new E8(D),pe=new XT,Te=new aA(D,se,U,pe,G,at,he),B=new b8(w),k=new M8(w),K=new PS(D),Y=new p8(D,K),de=new A8(D,K,he,Y),xe=new R8(D,de,K,he),tt=new C8(D,G,Te),ze=new x8(pe),le=new WT(w,B,k,se,G,Y,ze),Ve=new hA(w,pe),Me=new ZT,Xe=new eA(se),we=new f8(w,B,k,U,xe,f,l),be=new rA(w,xe,G),Re=new fA(D,he,G,U),Ke=new m8(D,se,he),Ue=new k8(D,se,he),he.programs=le.programs,w.capabilities=G,w.extensions=se,w.properties=pe,w.renderLists=Me,w.shadowMap=be,w.state=U,w.info=he}ke();const Ee=new dA(w,D);this.xr=Ee,this.getContext=function(){return D},this.getContextAttributes=function(){return D.getContextAttributes()},this.forceContextLoss=function(){const N=se.get("WEBGL_lose_context");N&&N.loseContext()},this.forceContextRestore=function(){const N=se.get("WEBGL_lose_context");N&&N.restoreContext()},this.getPixelRatio=function(){return ue},this.setPixelRatio=function(N){N!==void 0&&(ue=N,this.setSize(F,ie,!1))},this.getSize=function(N){return N.set(F,ie)},this.setSize=function(N,J,ae=!0){if(Ee.isPresenting){Ce("WebGLRenderer: Can't change size while VR device is presenting.");return}F=N,ie=J,t.width=Math.floor(N*ue),t.height=Math.floor(J*ue),ae===!0&&(t.style.width=N+"px",t.style.height=J+"px"),this.setViewport(0,0,N,J)},this.getDrawingBufferSize=function(N){return N.set(F*ue,ie*ue).floor()},this.setDrawingBufferSize=function(N,J,ae){F=N,ie=J,ue=ae,t.width=Math.floor(N*ae),t.height=Math.floor(J*ae),this.setViewport(0,0,N,J)},this.getCurrentViewport=function(N){return N.copy(O)},this.getViewport=function(N){return N.copy(Le)},this.setViewport=function(N,J,ae,oe){N.isVector4?Le.set(N.x,N.y,N.z,N.w):Le.set(N,J,ae,oe),U.viewport(O.copy(Le).multiplyScalar(ue).round())},this.getScissor=function(N){return N.copy($)},this.setScissor=function(N,J,ae,oe){N.isVector4?$.set(N.x,N.y,N.z,N.w):$.set(N,J,ae,oe),U.scissor(q.copy($).multiplyScalar(ue).round())},this.getScissorTest=function(){return W},this.setScissorTest=function(N){U.setScissorTest(W=N)},this.setOpaqueSort=function(N){_e=N},this.setTransparentSort=function(N){Ne=N},this.getClearColor=function(N){return N.copy(we.getClearColor())},this.setClearColor=function(){we.setClearColor(...arguments)},this.getClearAlpha=function(){return we.getClearAlpha()},this.setClearAlpha=function(){we.setClearAlpha(...arguments)},this.clear=function(N=!0,J=!0,ae=!0){let oe=0;if(N){let ee=!1;if(S!==null){const Se=S.texture.format;ee=m.has(Se)}if(ee){const Se=S.texture.type,Pe=x.has(Se),He=we.getClearColor(),Fe=we.getClearAlpha(),Qe=He.r,rt=He.g,Ze=He.b;Pe?(g[0]=Qe,g[1]=rt,g[2]=Ze,g[3]=Fe,D.clearBufferuiv(D.COLOR,0,g)):(p[0]=Qe,p[1]=rt,p[2]=Ze,p[3]=Fe,D.clearBufferiv(D.COLOR,0,p))}else oe|=D.COLOR_BUFFER_BIT}J&&(oe|=D.DEPTH_BUFFER_BIT),ae&&(oe|=D.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),D.clear(oe)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",ve,!1),t.removeEventListener("webglcontextrestored",ge,!1),t.removeEventListener("webglcontextcreationerror",Ge,!1),we.dispose(),Me.dispose(),Xe.dispose(),pe.dispose(),B.dispose(),k.dispose(),xe.dispose(),Y.dispose(),Re.dispose(),le.dispose(),Ee.dispose(),Ee.removeEventListener("sessionstart",Km),Ee.removeEventListener("sessionend",Jm),Is.stop()};function ve(N){N.preventDefault(),pc("WebGLRenderer: Context Lost."),T=!0}function ge(){pc("WebGLRenderer: Context Restored."),T=!1;const N=he.autoReset,J=be.enabled,ae=be.autoUpdate,oe=be.needsUpdate,ee=be.type;ke(),he.autoReset=N,be.enabled=J,be.autoUpdate=ae,be.needsUpdate=oe,be.type=ee}function Ge(N){it("WebGLRenderer: A WebGL context could not be created. Reason: ",N.statusMessage)}function lt(N){const J=N.target;J.removeEventListener("dispose",lt),Dt(J)}function Dt(N){Mt(N),pe.remove(N)}function Mt(N){const J=pe.get(N).programs;J!==void 0&&(J.forEach(function(ae){le.releaseProgram(ae)}),N.isShaderMaterial&&le.releaseShaderCache(N))}this.renderBufferDirect=function(N,J,ae,oe,ee,Se){J===null&&(J=ye);const Pe=ee.isMesh&&ee.matrixWorld.determinant()<0,He=s2(N,J,ae,oe,ee);U.setMaterial(oe,Pe);let Fe=ae.index,Qe=1;if(oe.wireframe===!0){if(Fe=de.getWireframeAttribute(ae),Fe===void 0)return;Qe=2}const rt=ae.drawRange,Ze=ae.attributes.position;let ht=rt.start*Qe,Tt=(rt.start+rt.count)*Qe;Se!==null&&(ht=Math.max(ht,Se.start*Qe),Tt=Math.min(Tt,(Se.start+Se.count)*Qe)),Fe!==null?(ht=Math.max(ht,0),Tt=Math.min(Tt,Fe.count)):Ze!=null&&(ht=Math.max(ht,0),Tt=Math.min(Tt,Ze.count));const Wt=Tt-ht;if(Wt<0||Wt===1/0)return;Y.setup(ee,oe,He,ae,Fe);let Xt,Et=Ke;if(Fe!==null&&(Xt=K.get(Fe),Et=Ue,Et.setIndex(Xt)),ee.isMesh)oe.wireframe===!0?(U.setLineWidth(oe.wireframeLinewidth*Z()),Et.setMode(D.LINES)):Et.setMode(D.TRIANGLES);else if(ee.isLine){let $e=oe.linewidth;$e===void 0&&($e=1),U.setLineWidth($e*Z()),ee.isLineSegments?Et.setMode(D.LINES):ee.isLineLoop?Et.setMode(D.LINE_LOOP):Et.setMode(D.LINE_STRIP)}else ee.isPoints?Et.setMode(D.POINTS):ee.isSprite&&Et.setMode(D.TRIANGLES);if(ee.isBatchedMesh)if(ee._multiDrawInstances!==null)zo("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Et.renderMultiDrawInstances(ee._multiDrawStarts,ee._multiDrawCounts,ee._multiDrawCount,ee._multiDrawInstances);else if(se.get("WEBGL_multi_draw"))Et.renderMultiDraw(ee._multiDrawStarts,ee._multiDrawCounts,ee._multiDrawCount);else{const $e=ee._multiDrawStarts,qt=ee._multiDrawCounts,vt=ee._multiDrawCount,sr=Fe?K.get(Fe).bytesPerElement:1,Ga=pe.get(oe).currentProgram.getUniforms();for(let ar=0;ar{function Se(){if(oe.forEach(function(Pe){pe.get(Pe).currentProgram.isReady()&&oe.delete(Pe)}),oe.size===0){ee(N);return}setTimeout(Se,10)}se.get("KHR_parallel_shader_compile")!==null?Se():setTimeout(Se,10)})};let Ur=null;function i2(N){Ur&&Ur(N)}function Km(){Is.stop()}function Jm(){Is.start()}const Is=new Yv;Is.setAnimationLoop(i2),typeof self<"u"&&Is.setContext(self),this.setAnimationLoop=function(N){Ur=N,Ee.setAnimationLoop(N),N===null?Is.stop():Is.start()},Ee.addEventListener("sessionstart",Km),Ee.addEventListener("sessionend",Jm),this.render=function(N,J){if(J!==void 0&&J.isCamera!==!0){it("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;if(N.matrixWorldAutoUpdate===!0&&N.updateMatrixWorld(),J.parent===null&&J.matrixWorldAutoUpdate===!0&&J.updateMatrixWorld(),Ee.enabled===!0&&Ee.isPresenting===!0&&(Ee.cameraAutoUpdate===!0&&Ee.updateCamera(J),J=Ee.getCamera()),N.isScene===!0&&N.onBeforeRender(w,N,J,S),b=Xe.get(N,_.length),b.init(J),_.push(b),ce.multiplyMatrices(J.projectionMatrix,J.matrixWorldInverse),L.setFromProjectionMatrix(ce,ur,J.reversedDepth),Q=this.localClippingEnabled,C=ze.init(this.clippingPlanes,Q),v=Me.get(N,y.length),v.init(),y.push(v),Ee.enabled===!0&&Ee.isPresenting===!0){const Se=w.xr.getDepthSensingMesh();Se!==null&&ph(Se,J,-1/0,w.sortObjects)}ph(N,J,0,w.sortObjects),v.finish(),w.sortObjects===!0&&v.sort(_e,Ne),me=Ee.enabled===!1||Ee.isPresenting===!1||Ee.hasDepthSensing()===!1,me&&we.addToRenderList(v,N),this.info.render.frame++,C===!0&&ze.beginShadows();const ae=b.state.shadowsArray;be.render(ae,N,J),C===!0&&ze.endShadows(),this.info.autoReset===!0&&this.info.reset();const oe=v.opaque,ee=v.transmissive;if(b.setupLights(),J.isArrayCamera){const Se=J.cameras;if(ee.length>0)for(let Pe=0,He=Se.length;Pe0&&eg(oe,ee,N,J),me&&we.render(N),Qm(v,N,J);S!==null&&M===0&&(Te.updateMultisampleRenderTarget(S),Te.updateRenderTargetMipmap(S)),N.isScene===!0&&N.onAfterRender(w,N,J),Y.resetDefaultState(),E=-1,I=null,_.pop(),_.length>0?(b=_[_.length-1],C===!0&&ze.setGlobalState(w.clippingPlanes,b.state.camera)):b=null,y.pop(),y.length>0?v=y[y.length-1]:v=null};function ph(N,J,ae,oe){if(N.visible===!1)return;if(N.layers.test(J.layers)){if(N.isGroup)ae=N.renderOrder;else if(N.isLOD)N.autoUpdate===!0&&N.update(J);else if(N.isLight)b.pushLight(N),N.castShadow&&b.pushShadow(N);else if(N.isSprite){if(!N.frustumCulled||L.intersectsSprite(N)){oe&&fe.setFromMatrixPosition(N.matrixWorld).applyMatrix4(ce);const Pe=xe.update(N),He=N.material;He.visible&&v.push(N,Pe,He,ae,fe.z,null)}}else if((N.isMesh||N.isLine||N.isPoints)&&(!N.frustumCulled||L.intersectsObject(N))){const Pe=xe.update(N),He=N.material;if(oe&&(N.boundingSphere!==void 0?(N.boundingSphere===null&&N.computeBoundingSphere(),fe.copy(N.boundingSphere.center)):(Pe.boundingSphere===null&&Pe.computeBoundingSphere(),fe.copy(Pe.boundingSphere.center)),fe.applyMatrix4(N.matrixWorld).applyMatrix4(ce)),Array.isArray(He)){const Fe=Pe.groups;for(let Qe=0,rt=Fe.length;Qe0&&qc(ee,J,ae),Se.length>0&&qc(Se,J,ae),Pe.length>0&&qc(Pe,J,ae),U.buffers.depth.setTest(!0),U.buffers.depth.setMask(!0),U.buffers.color.setMask(!0),U.setPolygonOffset(!1)}function eg(N,J,ae,oe){if((ae.isScene===!0?ae.overrideMaterial:null)!==null)return;b.state.transmissionRenderTarget[oe.id]===void 0&&(b.state.transmissionRenderTarget[oe.id]=new di(1,1,{generateMipmaps:!0,type:se.has("EXT_color_buffer_half_float")||se.has("EXT_color_buffer_float")?Oa:Yr,minFilter:ri,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:pt.workingColorSpace}));const Se=b.state.transmissionRenderTarget[oe.id],Pe=oe.viewport||O;Se.setSize(Pe.z*w.transmissionResolutionScale,Pe.w*w.transmissionResolutionScale);const He=w.getRenderTarget(),Fe=w.getActiveCubeFace(),Qe=w.getActiveMipmapLevel();w.setRenderTarget(Se),w.getClearColor(V),H=w.getClearAlpha(),H<1&&w.setClearColor(16777215,.5),w.clear(),me&&we.render(ae);const rt=w.toneMapping;w.toneMapping=zi;const Ze=oe.viewport;if(oe.viewport!==void 0&&(oe.viewport=void 0),b.setupLightsView(oe),C===!0&&ze.setGlobalState(w.clippingPlanes,oe),qc(N,ae,oe),Te.updateMultisampleRenderTarget(Se),Te.updateRenderTargetMipmap(Se),se.has("WEBGL_multisampled_render_to_texture")===!1){let ht=!1;for(let Tt=0,Wt=J.length;Tt0),Ze=!!ae.morphAttributes.position,ht=!!ae.morphAttributes.normal,Tt=!!ae.morphAttributes.color;let Wt=zi;oe.toneMapped&&(S===null||S.isXRRenderTarget===!0)&&(Wt=w.toneMapping);const Xt=ae.morphAttributes.position||ae.morphAttributes.normal||ae.morphAttributes.color,Et=Xt!==void 0?Xt.length:0,$e=pe.get(oe),qt=b.state.lights;if(C===!0&&(Q===!0||N!==I)){const Dn=N===I&&oe.id===E;ze.setState(oe,N,Dn)}let vt=!1;oe.version===$e.__version?($e.needsLights&&$e.lightsStateVersion!==qt.state.version||$e.outputColorSpace!==He||ee.isBatchedMesh&&$e.batching===!1||!ee.isBatchedMesh&&$e.batching===!0||ee.isBatchedMesh&&$e.batchingColor===!0&&ee.colorTexture===null||ee.isBatchedMesh&&$e.batchingColor===!1&&ee.colorTexture!==null||ee.isInstancedMesh&&$e.instancing===!1||!ee.isInstancedMesh&&$e.instancing===!0||ee.isSkinnedMesh&&$e.skinning===!1||!ee.isSkinnedMesh&&$e.skinning===!0||ee.isInstancedMesh&&$e.instancingColor===!0&&ee.instanceColor===null||ee.isInstancedMesh&&$e.instancingColor===!1&&ee.instanceColor!==null||ee.isInstancedMesh&&$e.instancingMorph===!0&&ee.morphTexture===null||ee.isInstancedMesh&&$e.instancingMorph===!1&&ee.morphTexture!==null||$e.envMap!==Fe||oe.fog===!0&&$e.fog!==Se||$e.numClippingPlanes!==void 0&&($e.numClippingPlanes!==ze.numPlanes||$e.numIntersection!==ze.numIntersection)||$e.vertexAlphas!==Qe||$e.vertexTangents!==rt||$e.morphTargets!==Ze||$e.morphNormals!==ht||$e.morphColors!==Tt||$e.toneMapping!==Wt||$e.morphTargetsCount!==Et)&&(vt=!0):(vt=!0,$e.__version=oe.version);let sr=$e.currentProgram;vt===!0&&(sr=Bc(oe,J,ee));let Ga=!1,ar=!1,il=!1;const Bt=sr.getUniforms(),Hn=$e.uniforms;if(U.useProgram(sr.program)&&(Ga=!0,ar=!0,il=!0),oe.id!==E&&(E=oe.id,ar=!0),Ga||I!==N){U.buffers.depth.getReversed()&&N.reversedDepth!==!0&&(N._reversedDepth=!0,N.updateProjectionMatrix()),Bt.setValue(D,"projectionMatrix",N.projectionMatrix),Bt.setValue(D,"viewMatrix",N.matrixWorldInverse);const Wn=Bt.map.cameraPosition;Wn!==void 0&&Wn.setValue(D,j.setFromMatrixPosition(N.matrixWorld)),G.logarithmicDepthBuffer&&Bt.setValue(D,"logDepthBufFC",2/(Math.log(N.far+1)/Math.LN2)),(oe.isMeshPhongMaterial||oe.isMeshToonMaterial||oe.isMeshLambertMaterial||oe.isMeshBasicMaterial||oe.isMeshStandardMaterial||oe.isShaderMaterial)&&Bt.setValue(D,"isOrthographic",N.isOrthographicCamera===!0),I!==N&&(I=N,ar=!0,il=!0)}if(ee.isSkinnedMesh){Bt.setOptional(D,ee,"bindMatrix"),Bt.setOptional(D,ee,"bindMatrixInverse");const Dn=ee.skeleton;Dn&&(Dn.boneTexture===null&&Dn.computeBoneTexture(),Bt.setValue(D,"boneTexture",Dn.boneTexture,Te))}ee.isBatchedMesh&&(Bt.setOptional(D,ee,"batchingTexture"),Bt.setValue(D,"batchingTexture",ee._matricesTexture,Te),Bt.setOptional(D,ee,"batchingIdTexture"),Bt.setValue(D,"batchingIdTexture",ee._indirectTexture,Te),Bt.setOptional(D,ee,"batchingColorTexture"),ee._colorsTexture!==null&&Bt.setValue(D,"batchingColorTexture",ee._colorsTexture,Te));const gr=ae.morphAttributes;if((gr.position!==void 0||gr.normal!==void 0||gr.color!==void 0)&&tt.update(ee,ae,sr),(ar||$e.receiveShadow!==ee.receiveShadow)&&($e.receiveShadow=ee.receiveShadow,Bt.setValue(D,"receiveShadow",ee.receiveShadow)),oe.isMeshGouraudMaterial&&oe.envMap!==null&&(Hn.envMap.value=Fe,Hn.flipEnvMap.value=Fe.isCubeTexture&&Fe.isRenderTargetTexture===!1?-1:1),oe.isMeshStandardMaterial&&oe.envMap===null&&J.environment!==null&&(Hn.envMapIntensity.value=J.environmentIntensity),Hn.dfgLUT!==void 0&&(Hn.dfgLUT.value=mA()),ar&&(Bt.setValue(D,"toneMappingExposure",w.toneMappingExposure),$e.needsLights&&a2(Hn,il),Se&&oe.fog===!0&&Ve.refreshFogUniforms(Hn,Se),Ve.refreshMaterialUniforms(Hn,oe,ue,ie,b.state.transmissionRenderTarget[N.id]),pu.upload(D,ng($e),Hn,Te)),oe.isShaderMaterial&&oe.uniformsNeedUpdate===!0&&(pu.upload(D,ng($e),Hn,Te),oe.uniformsNeedUpdate=!1),oe.isSpriteMaterial&&Bt.setValue(D,"center",ee.center),Bt.setValue(D,"modelViewMatrix",ee.modelViewMatrix),Bt.setValue(D,"normalMatrix",ee.normalMatrix),Bt.setValue(D,"modelMatrix",ee.matrixWorld),oe.isShaderMaterial||oe.isRawShaderMaterial){const Dn=oe.uniformsGroups;for(let Wn=0,mh=Dn.length;Wn0&&Te.useMultisampledRTT(N)===!1?ee=pe.get(N).__webglMultisampledFramebuffer:Array.isArray(rt)?ee=rt[ae]:ee=rt,O.copy(N.viewport),q.copy(N.scissor),z=N.scissorTest}else O.copy(Le).multiplyScalar(ue).floor(),q.copy($).multiplyScalar(ue).floor(),z=W;if(ae!==0&&(ee=l2),U.bindFramebuffer(D.FRAMEBUFFER,ee)&&oe&&U.drawBuffers(N,ee),U.viewport(O),U.scissor(q),U.setScissorTest(z),Se){const Fe=pe.get(N.texture);D.framebufferTexture2D(D.FRAMEBUFFER,D.COLOR_ATTACHMENT0,D.TEXTURE_CUBE_MAP_POSITIVE_X+J,Fe.__webglTexture,ae)}else if(Pe){const Fe=J;for(let Qe=0;Qe=0&&J<=N.width-oe&&ae>=0&&ae<=N.height-ee&&(N.textures.length>1&&D.readBuffer(D.COLOR_ATTACHMENT0+He),D.readPixels(J,ae,oe,ee,at.convert(rt),at.convert(Ze),Se))}finally{const Qe=S!==null?pe.get(S).__webglFramebuffer:null;U.bindFramebuffer(D.FRAMEBUFFER,Qe)}}},this.readRenderTargetPixelsAsync=async function(N,J,ae,oe,ee,Se,Pe,He=0){if(!(N&&N.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Fe=pe.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&Pe!==void 0&&(Fe=Fe[Pe]),Fe)if(J>=0&&J<=N.width-oe&&ae>=0&&ae<=N.height-ee){U.bindFramebuffer(D.FRAMEBUFFER,Fe);const Qe=N.textures[He],rt=Qe.format,Ze=Qe.type;if(!G.textureFormatReadable(rt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!G.textureTypeReadable(Ze))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const ht=D.createBuffer();D.bindBuffer(D.PIXEL_PACK_BUFFER,ht),D.bufferData(D.PIXEL_PACK_BUFFER,Se.byteLength,D.STREAM_READ),N.textures.length>1&&D.readBuffer(D.COLOR_ATTACHMENT0+He),D.readPixels(J,ae,oe,ee,at.convert(rt),at.convert(Ze),0);const Tt=S!==null?pe.get(S).__webglFramebuffer:null;U.bindFramebuffer(D.FRAMEBUFFER,Tt);const Wt=D.fenceSync(D.SYNC_GPU_COMMANDS_COMPLETE,0);return D.flush(),await Fw(D,Wt,4),D.bindBuffer(D.PIXEL_PACK_BUFFER,ht),D.getBufferSubData(D.PIXEL_PACK_BUFFER,0,Se),D.deleteBuffer(ht),D.deleteSync(Wt),Se}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(N,J=null,ae=0){const oe=Math.pow(2,-ae),ee=Math.floor(N.image.width*oe),Se=Math.floor(N.image.height*oe),Pe=J!==null?J.x:0,He=J!==null?J.y:0;Te.setTexture2D(N,0),D.copyTexSubImage2D(D.TEXTURE_2D,ae,0,0,Pe,He,ee,Se),U.unbindTexture()};const c2=D.createFramebuffer(),d2=D.createFramebuffer();this.copyTextureToTexture=function(N,J,ae=null,oe=null,ee=0,Se=null){Se===null&&(ee!==0?(zo("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Se=ee,ee=0):Se=0);let Pe,He,Fe,Qe,rt,Ze,ht,Tt,Wt;const Xt=N.isCompressedTexture?N.mipmaps[Se]:N.image;if(ae!==null)Pe=ae.max.x-ae.min.x,He=ae.max.y-ae.min.y,Fe=ae.isBox3?ae.max.z-ae.min.z:1,Qe=ae.min.x,rt=ae.min.y,Ze=ae.isBox3?ae.min.z:0;else{const gr=Math.pow(2,-ee);Pe=Math.floor(Xt.width*gr),He=Math.floor(Xt.height*gr),N.isDataArrayTexture?Fe=Xt.depth:N.isData3DTexture?Fe=Math.floor(Xt.depth*gr):Fe=1,Qe=0,rt=0,Ze=0}oe!==null?(ht=oe.x,Tt=oe.y,Wt=oe.z):(ht=0,Tt=0,Wt=0);const Et=at.convert(J.format),$e=at.convert(J.type);let qt;J.isData3DTexture?(Te.setTexture3D(J,0),qt=D.TEXTURE_3D):J.isDataArrayTexture||J.isCompressedArrayTexture?(Te.setTexture2DArray(J,0),qt=D.TEXTURE_2D_ARRAY):(Te.setTexture2D(J,0),qt=D.TEXTURE_2D),D.pixelStorei(D.UNPACK_FLIP_Y_WEBGL,J.flipY),D.pixelStorei(D.UNPACK_PREMULTIPLY_ALPHA_WEBGL,J.premultiplyAlpha),D.pixelStorei(D.UNPACK_ALIGNMENT,J.unpackAlignment);const vt=D.getParameter(D.UNPACK_ROW_LENGTH),sr=D.getParameter(D.UNPACK_IMAGE_HEIGHT),Ga=D.getParameter(D.UNPACK_SKIP_PIXELS),ar=D.getParameter(D.UNPACK_SKIP_ROWS),il=D.getParameter(D.UNPACK_SKIP_IMAGES);D.pixelStorei(D.UNPACK_ROW_LENGTH,Xt.width),D.pixelStorei(D.UNPACK_IMAGE_HEIGHT,Xt.height),D.pixelStorei(D.UNPACK_SKIP_PIXELS,Qe),D.pixelStorei(D.UNPACK_SKIP_ROWS,rt),D.pixelStorei(D.UNPACK_SKIP_IMAGES,Ze);const Bt=N.isDataArrayTexture||N.isData3DTexture,Hn=J.isDataArrayTexture||J.isData3DTexture;if(N.isDepthTexture){const gr=pe.get(N),Dn=pe.get(J),Wn=pe.get(gr.__renderTarget),mh=pe.get(Dn.__renderTarget);U.bindFramebuffer(D.READ_FRAMEBUFFER,Wn.__webglFramebuffer),U.bindFramebuffer(D.DRAW_FRAMEBUFFER,mh.__webglFramebuffer);for(let Ps=0;Ps{let s=!1;const a=r.subscribe(o=>{e=o,s&&i()});return s=!0,a});function n(){return Lo()?(t(),e):J1(r)}return"set"in r?{get current(){return n()},set current(i){r.set(i)}}:{get current(){return n()}}}const $x=Symbol(),xA=r=>typeof r?.subscribe=="function",e3=(r,e,t)=>{const n=r().map(a=>xA(a)?p0(a):$x),i=Ye(()=>r().map((a,o)=>n[o]===$x?a:n[o].current)),s=()=>{X(i);let a;return fi(()=>{a=e(X(i))}),a};t?gn(s):Hi(s)},bA=(r,e)=>e3(r,e,!1),yA=(r,e)=>e3(r,e,!0);Object.assign(bA,{pre:yA});const zr=(r,e)=>r?.[`is${e}`]===!0,vA=typeof window<"u",Ii=(r,e)=>{const t=Yp(r,s=>s);let n;const i=t.subscribe(async s=>{n&&n();const a=await e(s);a&&(n=a)});Rc(()=>{i(),n&&n()})},pn=r=>{const e=No(r),t={set:n=>{t.current=n,e.set(n)},subscribe:e.subscribe,update:n=>{const i=n(t.current);t.current=i,e.set(i)},current:r};return t},_A=r=>({subscribe:r.subscribe,get current(){return r.current}}),t3=(r,e)=>{if(e.includes(".")){const t=e.split("."),n=t.pop();for(let i=0;i{const{dom:e,canvas:t}=r,n=pn({width:e.offsetWidth,height:e.offsetHeight});k0(()=>{const s=new ResizeObserver(()=>{const{offsetWidth:a,offsetHeight:o}=e;(n.current.width!==a||n.current.height!==o)&&n.set({width:a,height:o})});return s.observe(e),()=>{s.disconnect()}});const i={dom:e,canvas:t,size:_A(n)};return zn("threlte-dom-context",i),i},Nm=()=>{const r=sn("threlte-dom-context");if(!r)throw new Error("useDOM can only be used in a child component to .");return r};function SA(r){return{all:r=r||new Map,on:function(e,t){var n=r.get(e);n?n.push(t):r.set(e,[t])},off:function(e,t){var n=r.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):r.set(e,[]))},emit:function(e,t){var n=r.get(e);n&&n.slice().map(function(i){i(t)}),(n=r.get("*"))&&n.slice().map(function(i){i(e,t)})}}}class us{allVertices={};isolatedVertices={};connectedVertices={};sortedConnectedValues=[];needsSort=!1;emitter=SA();emit=this.emitter.emit.bind(this.emitter);on=this.emitter.on.bind(this.emitter);off=this.emitter.off.bind(this.emitter);get sortedVertices(){return this.mapNodes(e=>e)}moveToIsolated(e){const t=this.connectedVertices[e];t&&(this.isolatedVertices[e]=t,delete this.connectedVertices[e])}moveToConnected(e){const t=this.isolatedVertices[e];t&&(this.connectedVertices[e]=t,delete this.isolatedVertices[e])}getKey=e=>typeof e=="object"?e.key:e;add(e,t,n){if(this.allVertices[e]&&this.allVertices[e].value!==void 0)throw new Error(`A node with the key ${e.toString()} already exists`);let i=this.allVertices[e];i?i.value===void 0&&(i.value=t):(i={value:t,previous:new Set,next:new Set},this.allVertices[e]=i);const s=i.next.size>0||i.previous.size>0;if(!n?.after&&!n?.before&&!s){this.isolatedVertices[e]=i,this.emit("node:added",{key:e,type:"isolated",value:t});return}else this.connectedVertices[e]=i;if(n?.after){const a=Array.isArray(n.after)?n.after:[n.after];a.forEach(o=>{i.previous.add(this.getKey(o))}),a.forEach(o=>{const l=this.getKey(o),c=this.allVertices[l];c?(c.next.add(e),this.moveToConnected(l)):(this.allVertices[l]={value:void 0,previous:new Set,next:new Set([e])},this.connectedVertices[l]=this.allVertices[l])})}if(n?.before){const a=Array.isArray(n.before)?n.before:[n.before];a.forEach(o=>{i.next.add(this.getKey(o))}),a.forEach(o=>{const l=this.getKey(o),c=this.allVertices[l];c?(c.previous.add(e),this.moveToConnected(l)):(this.allVertices[l]={value:void 0,previous:new Set([e]),next:new Set},this.connectedVertices[l]=this.allVertices[l])})}this.emit("node:added",{key:e,type:"connected",value:t}),this.needsSort=!0}remove(e){const t=this.getKey(e);if(this.isolatedVertices[t]){delete this.isolatedVertices[t],delete this.allVertices[t],this.emit("node:removed",{key:t,type:"isolated"});return}const i=this.connectedVertices[t];i&&(i.next.forEach(s=>{const a=this.connectedVertices[s];a&&(a.previous.delete(t),a.previous.size===0&&a.next.size===0&&this.moveToIsolated(s))}),i.previous.forEach(s=>{const a=this.connectedVertices[s];a&&(a.next.delete(t),a.previous.size===0&&a.next.size===0&&this.moveToIsolated(s))}),delete this.connectedVertices[t],delete this.allVertices[t],this.emit("node:removed",{key:t,type:"connected"}),this.needsSort=!0)}mapNodes(e){this.needsSort&&this.sort();const t=[];return this.forEachNode((n,i)=>{t.push(e(n,i))}),t}forEachNode(e){this.needsSort&&this.sort();let t=0;for(;t{const i=this.isolatedVertices[n];i.value!==void 0&&e(i.value,t++)})}getValueByKey(e){return this.allVertices[e]?.value}getKeyByValue(e){return Reflect.ownKeys(this.connectedVertices).find(t=>this.connectedVertices[t].value===e)??Reflect.ownKeys(this.isolatedVertices).find(t=>this.isolatedVertices[t].value===e)}sort(){const e=new Map,t=[],n=[],i=Reflect.ownKeys(this.connectedVertices).filter(a=>this.connectedVertices[a].value!==void 0);for(i.forEach(a=>{e.set(a,0)}),i.forEach(a=>{this.connectedVertices[a].next.forEach(l=>{this.connectedVertices[l]&&e.set(l,(e.get(l)||0)+1)})}),e.forEach((a,o)=>{a===0&&t.push(o)});t.length>0;){const a=t.shift();n.push(a);const o=i.find(l=>l===a);o&&this.connectedVertices[o]?.next.forEach(l=>{const c=(e.get(l)||0)-1;e.set(l,c),c===0&&t.push(l)})}if(n.length!==i.length)throw new Error("The graph contains a cycle, and thus can not be sorted topologically.");const s=a=>a!==void 0;this.sortedConnectedValues=n.map(a=>this.connectedVertices[a].value).filter(s),this.needsSort=!1}clear(){this.allVertices={},this.isolatedVertices={},this.connectedVertices={},this.sortedConnectedValues=[],this.needsSort=!1}static isKey(e){return typeof e=="string"||typeof e=="symbol"}static isValue(e){return typeof e=="object"&&"key"in e}}class MA{key;stage;callback;runTask=!0;stop(){this.runTask=!1}start(){this.runTask=!0}constructor(e,t,n){this.stage=e,this.key=t,this.callback=n}run(e){this.runTask&&this.callback(e)}}class TA extends us{key;scheduler;runTask=!0;stop(){this.runTask=!1}start(){this.runTask=!0}get tasks(){return this.sortedVertices}callback=(e,t)=>t();constructor(e,t,n){super(),this.scheduler=e,this.key=t,this.start=this.start.bind(this),this.stop=this.stop.bind(this),n&&(this.callback=n.bind(this))}createTask(e,t,n){const i=new MA(this,e,t);return this.add(e,i,n),i}getTask(e){return this.getValueByKey(e)}removeTask=this.remove.bind(this);run(e){this.runTask&&this.callback(e,t=>{this.forEachNode(n=>{n.run(t??e)})})}runWithTiming(e){if(!this.runTask)return{};const t={};return this.callback(e,n=>{this.forEachNode(i=>{const s=performance.now();i.run(n??e);const a=performance.now()-s;t[i.key]=a})}),t}getSchedule(){return this.mapNodes(e=>e.key.toString())}}class AA extends us{lastTime=performance.now();clampDeltaTo=.1;get stages(){return this.sortedVertices}constructor(e){super(),e?.clampDeltaTo&&(this.clampDeltaTo=e.clampDeltaTo),this.run=this.run.bind(this)}createStage(e,t){const n=new TA(this,e,t?.callback);return this.add(e,n,{after:t?.after,before:t?.before}),n}getStage(e){return this.getValueByKey(e)}removeStage=this.remove.bind(this);run(e){const t=e-this.lastTime;this.forEachNode(n=>{n.run(Math.min(t/1e3,this.clampDeltaTo))}),this.lastTime=e}runWithTiming(e){const t=e-this.lastTime,n={},i=performance.now();return this.forEachNode(s=>{const a=performance.now(),o=s.runWithTiming(Math.min(t/1e3,this.clampDeltaTo)),l=performance.now()-a;n[s.key.toString()]={duration:l,tasks:o}}),{total:performance.now()-i,stages:n}}getSchedule(e={tasks:!0}){return{stages:this.mapNodes(t=>{if(t===void 0)throw new Error("Stage not found");return{key:t.key.toString(),tasks:e.tasks?t.getSchedule():void 0}})}}dispose(){this.clear()}}const kA=r=>{const e=new AA,t=e.createStage(Symbol("threlte-main-stage")),n={scheduler:e,frameInvalidated:!0,autoInvalidations:new Set,shouldAdvance:!1,advance:()=>{n.shouldAdvance=!0},autoRender:pn(r.autoRender??!0),renderMode:pn(r.renderMode??"on-demand"),invalidate(){n.frameInvalidated=!0},mainStage:t,shouldRender:()=>n.renderMode.current==="always"||n.renderMode.current==="on-demand"&&(n.frameInvalidated||n.autoInvalidations.size>0)||n.renderMode.current==="manual"&&n.shouldAdvance,renderStage:e.createStage(Symbol("threlte-render-stage"),{after:t,callback(i,s){n.shouldRender()&&s()}}),resetFrameInvalidation(){n.frameInvalidated=!1,n.shouldAdvance=!1}};return Hi(()=>{n.autoRender.set(r.autoRender??!0)}),Hi(()=>{n.renderMode.set(r.renderMode??"on-demand")}),Rc(()=>{n.scheduler.dispose()}),zn("threlte-scheduler-context",n),n},oh=()=>{const r=sn("threlte-scheduler-context");if(!r)throw new Error("useScheduler can only be used in a child component to .");return r},EA=()=>{const{size:r}=Nm(),{invalidate:e}=oh(),t=new hn(75,0,.1,1e3);t.position.z=5,t.lookAt(0,0,0);const n=pn(t);Ii(r,s=>{if(n.current===t){const a=n.current;a.aspect=s.width/s.height,a.updateProjectionMatrix(),e()}}),Ii(n,s=>{s===void 0&&n.set(t)});const i={camera:n};return zn("threlte-camera-context",i),i},n3=()=>{const r=sn("threlte-camera-context");if(!r)throw new Error("useCamera can only be used in a child component to .");return r},CA=()=>{const r={removeObjectFromDisposal:e=>{r.disposableObjects.delete(e)},disposableObjectMounted:e=>{const t=r.disposableObjects.get(e);t?r.disposableObjects.set(e,t+1):r.disposableObjects.set(e,1)},disposableObjectUnmounted:e=>{const t=r.disposableObjects.get(e);t&&t>0&&(r.disposableObjects.set(e,t-1),t-1<=0&&(r.shouldDispose=!0))},disposableObjects:new Map,shouldDispose:!1,dispose:async(e=!1)=>{await d_(),!(!r.shouldDispose&&!e)&&(r.disposableObjects.forEach((t,n)=>{(t===0||e)&&(n?.dispose?.(),r.disposableObjects.delete(n))}),r.shouldDispose=!1)}};return Rc(()=>{r.dispose(!0)}),zn("threlte-disposal-context",r),r},r3=()=>{const r=sn("threlte-disposal-context");if(!r)throw new Error("useDisposal can only be used in a child component to .");return r},i3=Symbol("threlte-parent-context"),s3=r=>{const e=pn(r);return zn(i3,e),e},a3=()=>sn(i3),m0=Symbol("threlte-parent-object3d-context"),RA=r=>{const e=Xp(r);return zn(m0,e),e},IA=r=>{const e=sn(m0),t=No(r),n=Yp([t,e],([i,s])=>i??s);return zn(m0,n),t},PA=()=>sn(m0);function o3(r,e,t){if(!vA)return{task:void 0,start:()=>{},stop:()=>{},started:Xp(!1)};let n,i,s;us.isKey(r)?(n=r,i=e,s=t):(n=Symbol("useTask"),i=r,s=e);const a=oh();let o=a.mainStage;if(s){if(s.stage)if(us.isValue(s.stage))o=s.stage;else{const h=a.scheduler.getStage(s.stage);if(!h)throw new Error(`No stage found with key ${s.stage.toString()}`);o=h}else if(s.after)if(Array.isArray(s.after))for(let h=0;h{l.set(!0),(s?.autoInvalidate??!0)&&a.autoInvalidations.add(i),c.start()},u=()=>{l.set(!1),(s?.autoInvalidate??!0)&&a.autoInvalidations.delete(i),c.stop()};return s?.autoStart??!0?d():u(),Rc(()=>{u(),o.removeTask(n)}),{task:c,start:d,stop:u,started:{subscribe:l.subscribe}}}const DA=r=>{const e={scene:new dm};return zn("threlte-scene-context",e),e},l3=()=>{const r=sn("threlte-scene-context");if(!r)throw new Error("useScene can only be used in a child component to .");return r},LA=r=>{const{dispose:e}=r3(),{camera:t}=n3(),{scene:n}=l3(),{invalidate:i,renderStage:s,autoRender:a,scheduler:o,resetFrameInvalidation:l}=oh(),{size:c,canvas:d}=Nm(),u=r.createRenderer?r.createRenderer(d):new Qv({canvas:d,powerPreference:"high-performance",antialias:!0,alpha:!0}),h=s.createTask(Symbol("threlte-auto-render-task"),()=>{u.render(n,t.current)}),f={renderer:u,colorManagementEnabled:pn(r.colorManagementEnabled??!0),colorSpace:pn(r.colorSpace??"srgb"),dpr:pn(r.dpr??window.devicePixelRatio),shadows:pn(r.shadows??Gl),toneMapping:pn(r.toneMapping??Nu),autoRenderTask:h};zn("threlte-renderer-context",f),Ii([f.colorManagementEnabled],([g])=>{pt.enabled=g}),Ii([f.colorSpace],([g])=>{"outputColorSpace"in u&&(u.outputColorSpace=g)}),Ii([f.dpr],([g])=>{"setPixelRatio"in u&&u.setPixelRatio(g)});const{start:m,stop:x}=o3(()=>{!("xr"in u)||u.xr?.isPresenting||(u.setSize(c.current.width,c.current.height),i(),x())},{before:h,autoStart:!1,autoInvalidate:!1});return Ii([c],()=>{m()}),Ii([f.shadows],([g])=>{"shadowMap"in u&&(u.shadowMap.enabled=!!g,g&&g!==!0?u.shadowMap.type=g:g===!0&&(u.shadowMap.type=Gl))}),Ii([f.toneMapping],([g])=>{"toneMapping"in u&&(u.toneMapping=g)}),Ii([a],([g])=>(g?f.autoRenderTask.start():f.autoRenderTask.stop(),()=>{f.autoRenderTask.stop()})),"setAnimationLoop"in f.renderer&&f.renderer.setAnimationLoop(p=>{e(),o.run(p),l()}),Rc(()=>{if("dispose"in f.renderer){const g=f.renderer.dispose;g()}}),gn(()=>{f.colorManagementEnabled.set(r.colorManagementEnabled??!0)}),gn(()=>{f.colorSpace.set(r.colorSpace??"srgb")}),gn(()=>{f.toneMapping.set(r.toneMapping??Nu)}),gn(()=>{f.shadows.set(r.shadows??Gl)}),gn(()=>{f.dpr.set(r.dpr??window.devicePixelRatio)}),f},NA=()=>{const r=sn("threlte-renderer-context");if(!r)throw new Error("useRenderer can only be used in a child component to .");return r},UA=()=>{const r=pn({});return zn("threlte-user-context",r),r},FA=()=>{const r=sn("threlte-user-context");if(!r)throw new Error("useUserContext can only be used in a child component to .");return r},OA=r=>{const{scene:e}=DA();return{scene:e,...wA(r),...$_(),...s3(e),...RA(e),...CA(),...kA(r),...EA(),...LA(r),...UA()}};function qA(r,e){_n(e,!0),OA(ir(e,["$$slots","$$events","$$legacy","children"]));var n=Rt(),i=yt(n);ln(i,()=>e.children),We(r,n),wn()}var BA=Ht('
');function zA(r,e){let t=ir(e,["$$slots","$$events","$$legacy","children"]),n=Ut(void 0),i=Ut(void 0);var s=BA(),a=Pt(s),o=Pt(a);{var l=c=>{qA(c,Zp({get dom(){return X(i)},get canvas(){return X(n)}},()=>t,{children:(d,u)=>{var h=Rt(),f=yt(h);ln(f,()=>e.children??zt),We(d,h)},$$slots:{default:!0}}))};Ot(o,c=>{X(n)&&X(i)&&c(l)})}Tu(a,c=>It(n,c),()=>X(n)),Tu(s,c=>It(i,c),()=>X(i)),We(r,s)}const lh=()=>{const r=oh(),e=NA(),t=n3(),n=l3(),i=Nm();return{advance:r.advance,autoRender:r.autoRender,autoRenderTask:e.autoRenderTask,camera:t.camera,colorManagementEnabled:e.colorManagementEnabled,colorSpace:e.colorSpace,dpr:e.dpr,invalidate:r.invalidate,mainStage:r.mainStage,renderer:e.renderer,renderMode:r.renderMode,renderStage:r.renderStage,scheduler:r.scheduler,shadows:e.shadows,shouldRender:r.shouldRender,dom:i.dom,canvas:i.canvas,size:i.size,toneMapping:e.toneMapping,get scene(){return n.scene},set scene(a){n.scene=a}}},VA=r=>typeof r=="object"&&r!==null,GA=(r,e)=>{const{invalidate:t}=lh(),n=Ye(r),i=Ye(e),s=p0(a3()),a=p0(PA()),o=s3(),l=IA();gn(()=>{o.set(X(n)),zr(X(n),"Object3D")&&l.set(X(n)),t()}),gn(()=>{t();const c=X(n);if(X(i)===void 0&&zr(c,"Object3D"))return a.current?.add(c),()=>{t(),a.current?.remove(c)};if(X(i)===void 0&&VA(s.current)){const d=s.current;if(zr(c,"Material")){const u=d.material;return d.material=c,()=>{t(),d.material=u}}else if(zr(c,"BufferGeometry")){const u=d.geometry;return d.geometry=c,()=>{t(),d.geometry=u}}}if(X(i)===!1)return()=>{t()};if(typeof X(i)=="function"){const d=X(i)({ref:c,parent:s.current,parentObject3D:a.current});return()=>{t(),d?.()}}if(typeof X(i)=="string"){const{target:d,key:u}=t3(s.current,X(i));if(u in d){const h=d[u];return d[u]=c,()=>{t(),d[u]=h}}else return d[u]=c,()=>{t(),delete d[u]}}if(zr(X(i),"Object3D")&&zr(c,"Object3D"))return X(i).add(c),()=>{t(),X(i).remove(c)}})},cf=new Set,HA=(r,e,t)=>{const{invalidate:n,size:i,camera:s}=lh(),a=Ye(r),o=p0(i);gn(()=>{if(!t())return;const l=X(a);return cf.add(l),s.set(l),n(),()=>{cf.delete(l),cf.size===0&&(s.set(void 0),n())}}),gn(()=>{if(e())return;const{width:l,height:c}=o.current;zr(X(a),"PerspectiveCamera")?X(a).aspect=l/c:zr(X(a),"OrthographicCamera")&&(X(a).left=l/-2,X(a).right=l/2,X(a).top=c/2,X(a).bottom=c/-2),X(a).updateProjectionMatrix(),X(a).updateMatrixWorld(),n()})},hp=Symbol("threlte-disposable-object-context"),WA=r=>typeof r?.dispose=="function",XA=r=>{const e=sn(hp),t=Ye(()=>r()??e?.()??!0);zn(hp,()=>X(t))},YA=r=>{const e=Ye(r),{disposableObjectMounted:t,disposableObjectUnmounted:n,removeObjectFromDisposal:i}=r3(),s=sn(hp),a=Ye(()=>s?.()??!0);Hi(()=>{if(X(a))return t(X(e)),()=>n(X(e));i(X(e))})},ZA=r=>r!==null&&typeof r=="object"&&"addEventListener"in r&&"removeEventListener"in r,$A=(r,e,t)=>{const n=Ye(r);for(const i of e){const s=Ye(()=>t[i]);i.startsWith("on")&&gn(()=>{if(typeof X(s)!="function"||!ZA(X(n)))return;const a=i.slice(2);return X(n).addEventListener(a,X(s)),()=>X(n).removeEventListener(a,X(s))})}};let fp;const jA=r=>{fp=r},KA=()=>{const r=fp;return fp=void 0,r},JA="threlte-plugin-context",QA=r=>{const e=sn(JA);if(!e)return;const t=[],n=Object.values(e);if(n.length>0){const i=r();for(let s=0;stypeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r>"u"||r===null,jx=(r,e,t)=>!Array.isArray(t)&&typeof t=="number"&&typeof r[e]=="object"&&r[e]!==null&&typeof r[e]?.setScalar=="function"&&!r[e]?.isColor?(n,i,s)=>{n[i].setScalar(s)}:typeof r[e]?.set=="function"&&typeof r[e]=="object"&&r[e]!==null?Array.isArray(t)?(n,i,s)=>{n[i].set(...s)}:(n,i,s)=>{n[i].set(s)}:(n,i,s)=>{n[i]=s},rk=()=>{const{invalidate:r}=lh(),e=new Map,t=new Map,n=(s,a,o,l)=>{if(nk(o)){const u=e.get(a);if(u&&u.instance===s&&u.value===o)return;e.set(a,{instance:s,value:o})}const{key:c,target:d}=t3(s,a);if(o!=null){const u=t.get(a);if(u)u(d,c,o);else{const h=jx(d,c,o);t.set(a,h),h(d,c,o)}}else jx(d,c,o)(d,c,o);l||tk.has(c)&&(d.isPerspectiveCamera||d.isOrthographicCamera)&&d.updateProjectionMatrix()};return{updateProp:(s,a,o,l,c)=>{!ek.has(a)&&!l?.includes(a)&&n(s,a,o,c),r()}}},ik=r=>typeof r=="function"&&Function.prototype.toString.call(r).startsWith("class "),sk=(r,e)=>ik(r)?Array.isArray(e)?new r(...e):new r:r;function df(r,e){_n(e,!0);let t=mt(e,"is",19,KA),n=mt(e,"manual",3,!1),i=mt(e,"makeDefault",3,!1),s=mt(e,"ref",15),a=ir(e,["$$slots","$$events","$$legacy","is","args","attach","manual","makeDefault","dispose","ref","oncreate","children"]);const o=Ye(()=>sk(t(),e.args));gn(()=>{s()!==X(o)&&s(X(o))});const l=QA(()=>({get ref(){return X(o)},get args(){return e.args},get attach(){return e.attach},get manual(){return n()},get makeDefault(){return i()},get dispose(){return e.dispose},get props(){return a}})),c=Object.keys(a),{updateProp:d}=rk();c.forEach(f=>{const m=Ye(()=>a[f]);gn(()=>{d(X(o),f,X(m),l?.pluginsProps,n())})}),GA(()=>X(o),()=>e.attach),gn(()=>{(zr(X(o),"PerspectiveCamera")||zr(X(o),"OrthographicCamera"))&&HA(()=>X(o),()=>n(),()=>i())}),XA(()=>e.dispose),gn(()=>{WA(X(o))&&YA(()=>X(o))}),$A(()=>X(o),c,a),Hi(()=>{X(o);let f;return fi(()=>{f=e.oncreate?.(X(o))}),f});var u=Rt(),h=yt(u);ln(h,()=>e.children??zt,()=>({ref:X(o)})),We(r,u),wn()}const ak={},ds=new Proxy(df,{get(r,e){if(typeof e!="string")return df;const t=ak[e]||gA[e];if(t===void 0)throw new Error(`No Three.js module found for ${e}. Did you forget to extend the catalogue?`);return jA(t),df}});function ok(r,e,t){const n=FA();if(!n)throw new Error("No user context store found, did you invoke this function outside of your main component?");return e?(n.update(i=>{if(r in i)return i;const s=typeof e=="function"?e():e;return i[r]=s,i}),n.current[r]):Yp(n,i=>i[r])}const lk=JSON.parse('{"0":{"x_min":73,"x_max":715,"ha":792,"o":"m 394 -29 q 153 129 242 -29 q 73 479 73 272 q 152 829 73 687 q 394 989 241 989 q 634 829 545 989 q 715 479 715 684 q 635 129 715 270 q 394 -29 546 -29 m 394 89 q 546 211 489 89 q 598 479 598 322 q 548 748 598 640 q 394 871 491 871 q 241 748 298 871 q 190 479 190 637 q 239 211 190 319 q 394 89 296 89 "},"1":{"x_min":215.671875,"x_max":574,"ha":792,"o":"m 574 0 l 442 0 l 442 697 l 215 697 l 215 796 q 386 833 330 796 q 475 986 447 875 l 574 986 l 574 0 "},"2":{"x_min":59,"x_max":731,"ha":792,"o":"m 731 0 l 59 0 q 197 314 59 188 q 457 487 199 315 q 598 691 598 580 q 543 819 598 772 q 411 867 488 867 q 272 811 328 867 q 209 630 209 747 l 81 630 q 182 901 81 805 q 408 986 271 986 q 629 909 536 986 q 731 694 731 826 q 613 449 731 541 q 378 316 495 383 q 201 122 235 234 l 731 122 l 731 0 "},"3":{"x_min":54,"x_max":737,"ha":792,"o":"m 737 284 q 635 55 737 141 q 399 -25 541 -25 q 156 52 248 -25 q 54 308 54 140 l 185 308 q 245 147 185 202 q 395 96 302 96 q 539 140 484 96 q 602 280 602 190 q 510 429 602 390 q 324 454 451 454 l 324 565 q 487 584 441 565 q 565 719 565 617 q 515 835 565 791 q 395 879 466 879 q 255 824 307 879 q 203 661 203 769 l 78 661 q 166 909 78 822 q 387 992 250 992 q 603 921 513 992 q 701 723 701 844 q 669 607 701 656 q 578 524 637 558 q 696 434 655 499 q 737 284 737 369 "},"4":{"x_min":48,"x_max":742.453125,"ha":792,"o":"m 742 243 l 602 243 l 602 0 l 476 0 l 476 243 l 48 243 l 48 368 l 476 958 l 602 958 l 602 354 l 742 354 l 742 243 m 476 354 l 476 792 l 162 354 l 476 354 "},"5":{"x_min":54.171875,"x_max":738,"ha":792,"o":"m 738 314 q 626 60 738 153 q 382 -23 526 -23 q 155 47 248 -23 q 54 256 54 125 l 183 256 q 259 132 204 174 q 382 91 314 91 q 533 149 471 91 q 602 314 602 213 q 538 469 602 411 q 386 528 475 528 q 284 506 332 528 q 197 439 237 484 l 81 439 l 159 958 l 684 958 l 684 840 l 254 840 l 214 579 q 306 627 258 612 q 407 643 354 643 q 636 552 540 643 q 738 314 738 457 "},"6":{"x_min":53,"x_max":739,"ha":792,"o":"m 739 312 q 633 62 739 162 q 400 -31 534 -31 q 162 78 257 -31 q 53 439 53 206 q 178 859 53 712 q 441 986 284 986 q 643 912 559 986 q 732 713 732 833 l 601 713 q 544 830 594 786 q 426 875 494 875 q 268 793 331 875 q 193 517 193 697 q 301 597 240 570 q 427 624 362 624 q 643 540 552 624 q 739 312 739 451 m 603 298 q 540 461 603 400 q 404 516 484 516 q 268 461 323 516 q 207 300 207 401 q 269 137 207 198 q 405 83 325 83 q 541 137 486 83 q 603 298 603 197 "},"7":{"x_min":58.71875,"x_max":730.953125,"ha":792,"o":"m 730 839 q 469 448 560 641 q 335 0 378 255 l 192 0 q 328 441 235 252 q 593 830 421 630 l 58 830 l 58 958 l 730 958 l 730 839 "},"8":{"x_min":55,"x_max":736,"ha":792,"o":"m 571 527 q 694 424 652 491 q 736 280 736 358 q 648 71 736 158 q 395 -26 551 -26 q 142 69 238 -26 q 55 279 55 157 q 96 425 55 359 q 220 527 138 491 q 120 615 153 562 q 88 726 88 668 q 171 904 88 827 q 395 986 261 986 q 618 905 529 986 q 702 727 702 830 q 670 616 702 667 q 571 527 638 565 m 394 565 q 519 610 475 565 q 563 717 563 655 q 521 823 563 781 q 392 872 474 872 q 265 824 312 872 q 224 720 224 783 q 265 613 224 656 q 394 565 312 565 m 395 91 q 545 150 488 91 q 597 280 597 204 q 546 408 597 355 q 395 465 492 465 q 244 408 299 465 q 194 280 194 356 q 244 150 194 203 q 395 91 299 91 "},"9":{"x_min":53,"x_max":739,"ha":792,"o":"m 739 524 q 619 94 739 241 q 362 -32 516 -32 q 150 47 242 -32 q 59 244 59 126 l 191 244 q 246 129 191 176 q 373 82 301 82 q 526 161 466 82 q 597 440 597 255 q 363 334 501 334 q 130 432 216 334 q 53 650 53 521 q 134 880 53 786 q 383 986 226 986 q 659 841 566 986 q 739 524 739 719 m 388 449 q 535 514 480 449 q 585 658 585 573 q 535 805 585 744 q 388 873 480 873 q 242 809 294 873 q 191 658 191 745 q 239 514 191 572 q 388 449 292 449 "},"ο":{"x_min":0,"x_max":712,"ha":815,"o":"m 356 -25 q 96 88 192 -25 q 0 368 0 201 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 "},"S":{"x_min":0,"x_max":788,"ha":890,"o":"m 788 291 q 662 54 788 144 q 397 -26 550 -26 q 116 68 226 -26 q 0 337 0 168 l 131 337 q 200 152 131 220 q 384 85 269 85 q 557 129 479 85 q 650 270 650 183 q 490 429 650 379 q 194 513 341 470 q 33 739 33 584 q 142 964 33 881 q 388 1041 242 1041 q 644 957 543 1041 q 756 716 756 867 l 625 716 q 561 874 625 816 q 395 933 497 933 q 243 891 309 933 q 164 759 164 841 q 325 609 164 656 q 625 526 475 568 q 788 291 788 454 "},"¦":{"x_min":343,"x_max":449,"ha":792,"o":"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"/":{"x_min":183.25,"x_max":608.328125,"ha":792,"o":"m 608 1041 l 266 -129 l 183 -129 l 520 1041 l 608 1041 "},"Τ":{"x_min":-0.4375,"x_max":777.453125,"ha":839,"o":"m 777 893 l 458 893 l 458 0 l 319 0 l 319 892 l 0 892 l 0 1013 l 777 1013 l 777 893 "},"y":{"x_min":0,"x_max":684.78125,"ha":771,"o":"m 684 738 l 388 -83 q 311 -216 356 -167 q 173 -279 252 -279 q 97 -266 133 -279 l 97 -149 q 132 -155 109 -151 q 168 -160 155 -160 q 240 -114 213 -160 q 274 -26 248 -98 l 0 738 l 137 737 l 341 139 l 548 737 l 684 738 "},"Π":{"x_min":0,"x_max":803,"ha":917,"o":"m 803 0 l 667 0 l 667 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 803 1012 l 803 0 "},"ΐ":{"x_min":-111,"x_max":339,"ha":361,"o":"m 339 800 l 229 800 l 229 925 l 339 925 l 339 800 m -1 800 l -111 800 l -111 925 l -1 925 l -1 800 m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 m 302 1040 l 113 819 l 30 819 l 165 1040 l 302 1040 "},"g":{"x_min":0,"x_max":686,"ha":838,"o":"m 686 34 q 586 -213 686 -121 q 331 -306 487 -306 q 131 -252 216 -306 q 31 -84 31 -190 l 155 -84 q 228 -174 166 -138 q 345 -207 284 -207 q 514 -109 454 -207 q 564 89 564 -27 q 461 6 521 36 q 335 -23 401 -23 q 88 100 184 -23 q 0 370 0 215 q 87 634 0 522 q 330 758 183 758 q 457 728 398 758 q 564 644 515 699 l 564 737 l 686 737 l 686 34 m 582 367 q 529 560 582 481 q 358 652 468 652 q 189 561 250 652 q 135 369 135 482 q 189 176 135 255 q 361 85 251 85 q 529 176 468 85 q 582 367 582 255 "},"²":{"x_min":0,"x_max":442,"ha":539,"o":"m 442 383 l 0 383 q 91 566 0 492 q 260 668 176 617 q 354 798 354 727 q 315 875 354 845 q 227 905 277 905 q 136 869 173 905 q 99 761 99 833 l 14 761 q 82 922 14 864 q 232 974 141 974 q 379 926 316 974 q 442 797 442 878 q 351 635 442 704 q 183 539 321 611 q 92 455 92 491 l 442 455 l 442 383 "},"–":{"x_min":0,"x_max":705.5625,"ha":803,"o":"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},"Κ":{"x_min":0,"x_max":819.5625,"ha":893,"o":"m 819 0 l 650 0 l 294 509 l 139 356 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},"ƒ":{"x_min":-46.265625,"x_max":392,"ha":513,"o":"m 392 651 l 259 651 l 79 -279 l -46 -278 l 134 651 l 14 651 l 14 751 l 135 751 q 151 948 135 900 q 304 1041 185 1041 q 334 1040 319 1041 q 392 1034 348 1039 l 392 922 q 337 931 360 931 q 271 883 287 931 q 260 793 260 853 l 260 751 l 392 751 l 392 651 "},"e":{"x_min":0,"x_max":714,"ha":813,"o":"m 714 326 l 140 326 q 200 157 140 227 q 359 87 260 87 q 488 130 431 87 q 561 245 545 174 l 697 245 q 577 48 670 123 q 358 -26 484 -26 q 97 85 195 -26 q 0 363 0 197 q 94 642 0 529 q 358 765 195 765 q 626 627 529 765 q 714 326 714 503 m 576 429 q 507 583 564 522 q 355 650 445 650 q 206 583 266 650 q 140 429 152 522 l 576 429 "},"ό":{"x_min":0,"x_max":712,"ha":815,"o":"m 356 -25 q 94 91 194 -25 q 0 368 0 202 q 92 642 0 533 q 356 761 192 761 q 617 644 517 761 q 712 368 712 533 q 619 91 712 201 q 356 -25 520 -25 m 356 85 q 527 175 465 85 q 583 369 583 255 q 528 562 583 484 q 356 651 466 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 356 85 250 85 m 576 1040 l 387 819 l 303 819 l 438 1040 l 576 1040 "},"J":{"x_min":0,"x_max":588,"ha":699,"o":"m 588 279 q 287 -26 588 -26 q 58 73 126 -26 q 0 327 0 158 l 133 327 q 160 172 133 227 q 288 96 198 96 q 426 171 391 96 q 449 336 449 219 l 449 1013 l 588 1013 l 588 279 "},"»":{"x_min":-1,"x_max":503,"ha":601,"o":"m 503 302 l 280 136 l 281 256 l 429 373 l 281 486 l 280 608 l 503 440 l 503 302 m 221 302 l 0 136 l 0 255 l 145 372 l 0 486 l -1 608 l 221 440 l 221 302 "},"©":{"x_min":-3,"x_max":1008,"ha":1106,"o":"m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 741 394 q 661 246 731 302 q 496 190 591 190 q 294 285 369 190 q 228 497 228 370 q 295 714 228 625 q 499 813 370 813 q 656 762 588 813 q 733 625 724 711 l 634 625 q 589 704 629 673 q 498 735 550 735 q 377 666 421 735 q 334 504 334 597 q 374 340 334 408 q 490 272 415 272 q 589 304 549 272 q 638 394 628 337 l 741 394 "},"ώ":{"x_min":0,"x_max":922,"ha":1030,"o":"m 687 1040 l 498 819 l 415 819 l 549 1040 l 687 1040 m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 338 0 202 q 45 551 0 444 q 161 737 84 643 l 302 737 q 175 552 219 647 q 124 336 124 446 q 155 179 124 248 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 341 797 257 q 745 555 797 450 q 619 737 705 637 l 760 737 q 874 551 835 640 q 922 339 922 444 "},"^":{"x_min":193.0625,"x_max":598.609375,"ha":792,"o":"m 598 772 l 515 772 l 395 931 l 277 772 l 193 772 l 326 1013 l 462 1013 l 598 772 "},"«":{"x_min":0,"x_max":507.203125,"ha":604,"o":"m 506 136 l 284 302 l 284 440 l 506 608 l 507 485 l 360 371 l 506 255 l 506 136 m 222 136 l 0 302 l 0 440 l 222 608 l 221 486 l 73 373 l 222 256 l 222 136 "},"D":{"x_min":0,"x_max":828,"ha":935,"o":"m 389 1013 q 714 867 593 1013 q 828 521 828 729 q 712 161 828 309 q 382 0 587 0 l 0 0 l 0 1013 l 389 1013 m 376 124 q 607 247 523 124 q 681 510 681 355 q 607 771 681 662 q 376 896 522 896 l 139 896 l 139 124 l 376 124 "},"∙":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"ÿ":{"x_min":0,"x_max":47,"ha":125,"o":"m 47 3 q 37 -7 47 -7 q 28 0 30 -7 q 39 -4 32 -4 q 45 3 45 -1 l 37 0 q 28 9 28 0 q 39 19 28 19 l 47 16 l 47 19 l 47 3 m 37 1 q 44 8 44 1 q 37 16 44 16 q 30 8 30 16 q 37 1 30 1 m 26 1 l 23 22 l 14 0 l 3 22 l 3 3 l 0 25 l 13 1 l 22 25 l 26 1 "},"w":{"x_min":0,"x_max":1009.71875,"ha":1100,"o":"m 1009 738 l 783 0 l 658 0 l 501 567 l 345 0 l 222 0 l 0 738 l 130 738 l 284 174 l 432 737 l 576 738 l 721 173 l 881 737 l 1009 738 "},"$":{"x_min":0,"x_max":700,"ha":793,"o":"m 664 717 l 542 717 q 490 825 531 785 q 381 872 450 865 l 381 551 q 620 446 540 522 q 700 241 700 370 q 618 45 700 116 q 381 -25 536 -25 l 381 -152 l 307 -152 l 307 -25 q 81 62 162 -25 q 0 297 0 149 l 124 297 q 169 146 124 204 q 307 81 215 89 l 307 441 q 80 536 148 469 q 13 725 13 603 q 96 910 13 839 q 307 982 180 982 l 307 1077 l 381 1077 l 381 982 q 574 917 494 982 q 664 717 664 845 m 307 565 l 307 872 q 187 831 233 872 q 142 724 142 791 q 180 618 142 656 q 307 565 218 580 m 381 76 q 562 237 562 96 q 517 361 562 313 q 381 423 472 409 l 381 76 "},"\\\\":{"x_min":-0.015625,"x_max":425.0625,"ha":522,"o":"m 425 -129 l 337 -129 l 0 1041 l 83 1041 l 425 -129 "},"µ":{"x_min":0,"x_max":697.21875,"ha":747,"o":"m 697 -4 q 629 -14 658 -14 q 498 97 513 -14 q 422 9 470 41 q 313 -23 374 -23 q 207 4 258 -23 q 119 81 156 32 l 119 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 173 124 246 q 308 83 216 83 q 452 178 402 83 q 493 359 493 255 l 493 738 l 617 738 l 617 214 q 623 136 617 160 q 673 92 637 92 q 697 96 684 92 l 697 -4 "},"Ι":{"x_min":42,"x_max":181,"ha":297,"o":"m 181 0 l 42 0 l 42 1013 l 181 1013 l 181 0 "},"Ύ":{"x_min":0,"x_max":1144.5,"ha":1214,"o":"m 1144 1012 l 807 416 l 807 0 l 667 0 l 667 416 l 325 1012 l 465 1012 l 736 533 l 1004 1012 l 1144 1012 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"’":{"x_min":0,"x_max":139,"ha":236,"o":"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"Ν":{"x_min":0,"x_max":801,"ha":915,"o":"m 801 0 l 651 0 l 131 822 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 191 l 670 1013 l 801 1013 l 801 0 "},"-":{"x_min":8.71875,"x_max":350.390625,"ha":478,"o":"m 350 317 l 8 317 l 8 428 l 350 428 l 350 317 "},"Q":{"x_min":0,"x_max":968,"ha":1072,"o":"m 954 5 l 887 -79 l 744 35 q 622 -11 687 2 q 483 -26 556 -26 q 127 130 262 -26 q 0 504 0 279 q 127 880 0 728 q 484 1041 262 1041 q 841 884 708 1041 q 968 507 968 735 q 933 293 968 398 q 832 104 899 188 l 954 5 m 723 191 q 802 330 777 248 q 828 499 828 412 q 744 790 828 673 q 483 922 650 922 q 228 791 322 922 q 142 505 142 673 q 227 221 142 337 q 487 91 323 91 q 632 123 566 91 l 520 215 l 587 301 l 723 191 "},"ς":{"x_min":1,"x_max":676.28125,"ha":740,"o":"m 676 460 l 551 460 q 498 595 542 546 q 365 651 448 651 q 199 578 263 651 q 136 401 136 505 q 266 178 136 241 q 508 106 387 142 q 640 -50 640 62 q 625 -158 640 -105 q 583 -278 611 -211 l 465 -278 q 498 -182 490 -211 q 515 -80 515 -126 q 381 12 515 -15 q 134 91 197 51 q 1 388 1 179 q 100 651 1 542 q 354 761 199 761 q 587 680 498 761 q 676 460 676 599 "},"M":{"x_min":0,"x_max":954,"ha":1067,"o":"m 954 0 l 819 0 l 819 869 l 537 0 l 405 0 l 128 866 l 128 0 l 0 0 l 0 1013 l 200 1013 l 472 160 l 757 1013 l 954 1013 l 954 0 "},"Ψ":{"x_min":0,"x_max":1006,"ha":1094,"o":"m 1006 678 q 914 319 1006 429 q 571 200 814 200 l 571 0 l 433 0 l 433 200 q 92 319 194 200 q 0 678 0 429 l 0 1013 l 139 1013 l 139 679 q 191 417 139 492 q 433 326 255 326 l 433 1013 l 571 1013 l 571 326 l 580 326 q 813 423 747 326 q 868 679 868 502 l 868 1013 l 1006 1013 l 1006 678 "},"C":{"x_min":0,"x_max":886,"ha":944,"o":"m 886 379 q 760 87 886 201 q 455 -26 634 -26 q 112 136 236 -26 q 0 509 0 283 q 118 882 0 737 q 469 1041 245 1041 q 748 955 630 1041 q 879 708 879 859 l 745 708 q 649 862 724 805 q 473 920 573 920 q 219 791 312 920 q 136 509 136 675 q 217 229 136 344 q 470 99 311 99 q 672 179 591 99 q 753 379 753 259 l 886 379 "},"!":{"x_min":0,"x_max":138,"ha":236,"o":"m 138 684 q 116 409 138 629 q 105 244 105 299 l 33 244 q 16 465 33 313 q 0 684 0 616 l 0 1013 l 138 1013 l 138 684 m 138 0 l 0 0 l 0 151 l 138 151 l 138 0 "},"{":{"x_min":0,"x_max":480.5625,"ha":578,"o":"m 480 -286 q 237 -213 303 -286 q 187 -45 187 -159 q 194 48 187 -15 q 201 141 201 112 q 164 264 201 225 q 0 314 118 314 l 0 417 q 164 471 119 417 q 201 605 201 514 q 199 665 201 644 q 193 772 193 769 q 241 941 193 887 q 480 1015 308 1015 l 480 915 q 336 866 375 915 q 306 742 306 828 q 310 662 306 717 q 314 577 314 606 q 288 452 314 500 q 176 365 256 391 q 289 275 257 337 q 314 143 314 226 q 313 84 314 107 q 310 -11 310 -5 q 339 -131 310 -94 q 480 -182 377 -182 l 480 -286 "},"X":{"x_min":-0.015625,"x_max":854.15625,"ha":940,"o":"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 428 637 l 675 1013 l 836 1013 l 504 520 l 854 0 "},"#":{"x_min":0,"x_max":963.890625,"ha":1061,"o":"m 963 690 l 927 590 l 719 590 l 655 410 l 876 410 l 840 310 l 618 310 l 508 -3 l 393 -2 l 506 309 l 329 310 l 215 -2 l 102 -3 l 212 310 l 0 310 l 36 410 l 248 409 l 312 590 l 86 590 l 120 690 l 347 690 l 459 1006 l 573 1006 l 462 690 l 640 690 l 751 1006 l 865 1006 l 754 690 l 963 690 m 606 590 l 425 590 l 362 410 l 543 410 l 606 590 "},"ι":{"x_min":42,"x_max":284,"ha":361,"o":"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 738 l 167 738 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 103 239 101 q 284 112 257 104 l 284 3 "},"Ά":{"x_min":0,"x_max":906.953125,"ha":982,"o":"m 283 1040 l 88 799 l 5 799 l 145 1040 l 283 1040 m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1012 l 529 1012 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},")":{"x_min":0,"x_max":318,"ha":415,"o":"m 318 365 q 257 25 318 191 q 87 -290 197 -141 l 0 -290 q 140 21 93 -128 q 193 360 193 189 q 141 704 193 537 q 0 1024 97 850 l 87 1024 q 257 706 197 871 q 318 365 318 542 "},"ε":{"x_min":0,"x_max":634.71875,"ha":714,"o":"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 314 0 265 q 128 390 67 353 q 56 460 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 "},"Δ":{"x_min":0,"x_max":952.78125,"ha":1028,"o":"m 952 0 l 0 0 l 400 1013 l 551 1013 l 952 0 m 762 124 l 476 867 l 187 124 l 762 124 "},"}":{"x_min":0,"x_max":481,"ha":578,"o":"m 481 314 q 318 262 364 314 q 282 136 282 222 q 284 65 282 97 q 293 -58 293 -48 q 241 -217 293 -166 q 0 -286 174 -286 l 0 -182 q 143 -130 105 -182 q 171 -2 171 -93 q 168 81 171 22 q 165 144 165 140 q 188 275 165 229 q 306 365 220 339 q 191 455 224 391 q 165 588 165 505 q 168 681 165 624 q 171 742 171 737 q 141 865 171 827 q 0 915 102 915 l 0 1015 q 243 942 176 1015 q 293 773 293 888 q 287 675 293 741 q 282 590 282 608 q 318 466 282 505 q 481 417 364 417 l 481 314 "},"‰":{"x_min":-3,"x_max":1672,"ha":1821,"o":"m 846 0 q 664 76 732 0 q 603 244 603 145 q 662 412 603 344 q 846 489 729 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 846 0 962 0 m 845 103 q 945 143 910 103 q 981 243 981 184 q 947 340 981 301 q 845 385 910 385 q 745 342 782 385 q 709 243 709 300 q 742 147 709 186 q 845 103 781 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 m 1428 0 q 1246 76 1314 0 q 1185 244 1185 145 q 1244 412 1185 344 q 1428 489 1311 489 q 1610 412 1542 489 q 1672 244 1672 343 q 1612 76 1672 144 q 1428 0 1545 0 m 1427 103 q 1528 143 1492 103 q 1564 243 1564 184 q 1530 340 1564 301 q 1427 385 1492 385 q 1327 342 1364 385 q 1291 243 1291 300 q 1324 147 1291 186 q 1427 103 1363 103 "},"a":{"x_min":0,"x_max":698.609375,"ha":794,"o":"m 698 0 q 661 -12 679 -7 q 615 -17 643 -17 q 536 12 564 -17 q 500 96 508 41 q 384 6 456 37 q 236 -25 312 -25 q 65 31 130 -25 q 0 194 0 88 q 118 390 0 334 q 328 435 180 420 q 488 483 476 451 q 495 523 495 504 q 442 619 495 584 q 325 654 389 654 q 209 617 257 654 q 152 513 161 580 l 33 513 q 123 705 33 633 q 332 772 207 772 q 528 712 448 772 q 617 531 617 645 l 617 163 q 624 108 617 126 q 664 90 632 90 l 698 94 l 698 0 m 491 262 l 491 372 q 272 329 350 347 q 128 201 128 294 q 166 113 128 144 q 264 83 205 83 q 414 130 346 83 q 491 262 491 183 "},"—":{"x_min":0,"x_max":941.671875,"ha":1039,"o":"m 941 334 l 0 334 l 0 410 l 941 410 l 941 334 "},"=":{"x_min":8.71875,"x_max":780.953125,"ha":792,"o":"m 780 510 l 8 510 l 8 606 l 780 606 l 780 510 m 780 235 l 8 235 l 8 332 l 780 332 l 780 235 "},"N":{"x_min":0,"x_max":801,"ha":914,"o":"m 801 0 l 651 0 l 131 823 l 131 0 l 0 0 l 0 1013 l 151 1013 l 670 193 l 670 1013 l 801 1013 l 801 0 "},"ρ":{"x_min":0,"x_max":712,"ha":797,"o":"m 712 369 q 620 94 712 207 q 362 -26 521 -26 q 230 2 292 -26 q 119 83 167 30 l 119 -278 l 0 -278 l 0 362 q 91 643 0 531 q 355 764 190 764 q 617 647 517 764 q 712 369 712 536 m 583 366 q 530 559 583 480 q 359 651 469 651 q 190 562 252 651 q 135 370 135 483 q 189 176 135 257 q 359 85 250 85 q 528 175 466 85 q 583 366 583 254 "},"¯":{"x_min":0,"x_max":941.671875,"ha":938,"o":"m 941 1033 l 0 1033 l 0 1109 l 941 1109 l 941 1033 "},"Z":{"x_min":0,"x_max":779,"ha":849,"o":"m 779 0 l 0 0 l 0 113 l 621 896 l 40 896 l 40 1013 l 779 1013 l 778 887 l 171 124 l 779 124 l 779 0 "},"u":{"x_min":0,"x_max":617,"ha":729,"o":"m 617 0 l 499 0 l 499 110 q 391 10 460 45 q 246 -25 322 -25 q 61 58 127 -25 q 0 258 0 136 l 0 738 l 125 738 l 125 284 q 156 148 125 202 q 273 82 197 82 q 433 165 369 82 q 493 340 493 243 l 493 738 l 617 738 l 617 0 "},"k":{"x_min":0,"x_max":612.484375,"ha":697,"o":"m 612 738 l 338 465 l 608 0 l 469 0 l 251 382 l 121 251 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 402 l 456 738 l 612 738 "},"Η":{"x_min":0,"x_max":803,"ha":917,"o":"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"Α":{"x_min":0,"x_max":906.953125,"ha":985,"o":"m 906 0 l 756 0 l 650 303 l 251 303 l 143 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 609 421 l 452 866 l 293 421 l 609 421 "},"s":{"x_min":0,"x_max":604,"ha":697,"o":"m 604 217 q 501 36 604 104 q 292 -23 411 -23 q 86 43 166 -23 q 0 238 0 114 l 121 237 q 175 122 121 164 q 300 85 223 85 q 415 112 363 85 q 479 207 479 147 q 361 309 479 276 q 140 372 141 370 q 21 544 21 426 q 111 708 21 647 q 298 761 190 761 q 492 705 413 761 q 583 531 583 643 l 462 531 q 412 625 462 594 q 298 657 363 657 q 199 636 242 657 q 143 558 143 608 q 262 454 143 486 q 484 394 479 397 q 604 217 604 341 "},"B":{"x_min":0,"x_max":778,"ha":876,"o":"m 580 546 q 724 469 670 535 q 778 311 778 403 q 673 83 778 171 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 892 q 691 633 732 693 q 580 546 650 572 m 393 899 l 139 899 l 139 588 l 379 588 q 521 624 462 588 q 592 744 592 667 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 303 635 219 q 559 436 635 389 q 402 477 494 477 l 139 477 l 139 124 l 419 124 "},"…":{"x_min":0,"x_max":614,"ha":708,"o":"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 m 378 0 l 236 0 l 236 151 l 378 151 l 378 0 m 614 0 l 472 0 l 472 151 l 614 151 l 614 0 "},"?":{"x_min":0,"x_max":607,"ha":704,"o":"m 607 777 q 543 599 607 674 q 422 474 482 537 q 357 272 357 391 l 236 272 q 297 487 236 395 q 411 619 298 490 q 474 762 474 691 q 422 885 474 838 q 301 933 371 933 q 179 880 228 933 q 124 706 124 819 l 0 706 q 94 963 0 872 q 302 1044 177 1044 q 511 973 423 1044 q 607 777 607 895 m 370 0 l 230 0 l 230 151 l 370 151 l 370 0 "},"H":{"x_min":0,"x_max":803,"ha":915,"o":"m 803 0 l 667 0 l 667 475 l 140 475 l 140 0 l 0 0 l 0 1013 l 140 1013 l 140 599 l 667 599 l 667 1013 l 803 1013 l 803 0 "},"ν":{"x_min":0,"x_max":675,"ha":761,"o":"m 675 738 l 404 0 l 272 0 l 0 738 l 133 738 l 340 147 l 541 738 l 675 738 "},"c":{"x_min":1,"x_max":701.390625,"ha":775,"o":"m 701 264 q 584 53 681 133 q 353 -26 487 -26 q 91 91 188 -26 q 1 370 1 201 q 92 645 1 537 q 353 761 190 761 q 572 688 479 761 q 690 493 666 615 l 556 493 q 487 606 545 562 q 356 650 428 650 q 186 563 246 650 q 134 372 134 487 q 188 179 134 258 q 359 88 250 88 q 492 136 437 88 q 566 264 548 185 l 701 264 "},"¶":{"x_min":0,"x_max":566.671875,"ha":678,"o":"m 21 892 l 52 892 l 98 761 l 145 892 l 176 892 l 178 741 l 157 741 l 157 867 l 108 741 l 88 741 l 40 871 l 40 741 l 21 741 l 21 892 m 308 854 l 308 731 q 252 691 308 691 q 227 691 240 691 q 207 696 213 695 l 207 712 l 253 706 q 288 733 288 706 l 288 763 q 244 741 279 741 q 193 797 193 741 q 261 860 193 860 q 287 860 273 860 q 308 854 302 855 m 288 842 l 263 843 q 213 796 213 843 q 248 756 213 756 q 288 796 288 756 l 288 842 m 566 988 l 502 988 l 502 -1 l 439 -1 l 439 988 l 317 988 l 317 -1 l 252 -1 l 252 602 q 81 653 155 602 q 0 805 0 711 q 101 989 0 918 q 309 1053 194 1053 l 566 1053 l 566 988 "},"β":{"x_min":0,"x_max":660,"ha":745,"o":"m 471 550 q 610 450 561 522 q 660 280 660 378 q 578 64 660 151 q 367 -22 497 -22 q 239 5 299 -22 q 126 82 178 32 l 126 -278 l 0 -278 l 0 593 q 54 903 0 801 q 318 1042 127 1042 q 519 964 436 1042 q 603 771 603 887 q 567 644 603 701 q 471 550 532 586 m 337 79 q 476 138 418 79 q 535 279 535 198 q 427 437 535 386 q 226 477 344 477 l 226 583 q 398 620 329 583 q 486 762 486 668 q 435 884 486 833 q 312 935 384 935 q 169 861 219 935 q 126 698 126 797 l 126 362 q 170 169 126 242 q 337 79 224 79 "},"Μ":{"x_min":0,"x_max":954,"ha":1068,"o":"m 954 0 l 819 0 l 819 868 l 537 0 l 405 0 l 128 865 l 128 0 l 0 0 l 0 1013 l 199 1013 l 472 158 l 758 1013 l 954 1013 l 954 0 "},"Ό":{"x_min":0.109375,"x_max":1120,"ha":1217,"o":"m 1120 505 q 994 132 1120 282 q 642 -29 861 -29 q 290 130 422 -29 q 167 505 167 280 q 294 883 167 730 q 650 1046 430 1046 q 999 882 868 1046 q 1120 505 1120 730 m 977 504 q 896 784 977 669 q 644 915 804 915 q 391 785 484 915 q 307 504 307 669 q 391 224 307 339 q 644 95 486 95 q 894 224 803 95 q 977 504 977 339 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ή":{"x_min":0,"x_max":1158,"ha":1275,"o":"m 1158 0 l 1022 0 l 1022 475 l 496 475 l 496 0 l 356 0 l 356 1012 l 496 1012 l 496 599 l 1022 599 l 1022 1012 l 1158 1012 l 1158 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"•":{"x_min":0,"x_max":663.890625,"ha":775,"o":"m 663 529 q 566 293 663 391 q 331 196 469 196 q 97 294 194 196 q 0 529 0 393 q 96 763 0 665 q 331 861 193 861 q 566 763 469 861 q 663 529 663 665 "},"¥":{"x_min":0.1875,"x_max":819.546875,"ha":886,"o":"m 563 561 l 697 561 l 696 487 l 520 487 l 482 416 l 482 380 l 697 380 l 695 308 l 482 308 l 482 0 l 342 0 l 342 308 l 125 308 l 125 380 l 342 380 l 342 417 l 303 487 l 125 487 l 125 561 l 258 561 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 l 563 561 "},"(":{"x_min":0,"x_max":318.0625,"ha":415,"o":"m 318 -290 l 230 -290 q 61 23 122 -142 q 0 365 0 190 q 62 712 0 540 q 230 1024 119 869 l 318 1024 q 175 705 219 853 q 125 360 125 542 q 176 22 125 187 q 318 -290 223 -127 "},"U":{"x_min":0,"x_max":796,"ha":904,"o":"m 796 393 q 681 93 796 212 q 386 -25 566 -25 q 101 95 208 -25 q 0 393 0 211 l 0 1013 l 138 1013 l 138 391 q 204 191 138 270 q 394 107 276 107 q 586 191 512 107 q 656 391 656 270 l 656 1013 l 796 1013 l 796 393 "},"γ":{"x_min":0.5,"x_max":744.953125,"ha":822,"o":"m 744 737 l 463 54 l 463 -278 l 338 -278 l 338 54 l 154 495 q 104 597 124 569 q 13 651 67 651 l 0 651 l 0 751 l 39 753 q 168 711 121 753 q 242 594 207 676 l 403 208 l 617 737 l 744 737 "},"α":{"x_min":0,"x_max":765.5625,"ha":809,"o":"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 728 407 760 q 563 637 524 696 l 563 739 l 685 739 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 96 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 "},"F":{"x_min":0,"x_max":683.328125,"ha":717,"o":"m 683 888 l 140 888 l 140 583 l 613 583 l 613 458 l 140 458 l 140 0 l 0 0 l 0 1013 l 683 1013 l 683 888 "},"­":{"x_min":0,"x_max":705.5625,"ha":803,"o":"m 705 334 l 0 334 l 0 410 l 705 410 l 705 334 "},":":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"Χ":{"x_min":0,"x_max":854.171875,"ha":935,"o":"m 854 0 l 683 0 l 423 409 l 166 0 l 0 0 l 347 519 l 18 1013 l 186 1013 l 427 637 l 675 1013 l 836 1013 l 504 521 l 854 0 "},"*":{"x_min":116,"x_max":674,"ha":792,"o":"m 674 768 l 475 713 l 610 544 l 517 477 l 394 652 l 272 478 l 178 544 l 314 713 l 116 766 l 153 876 l 341 812 l 342 1013 l 446 1013 l 446 811 l 635 874 l 674 768 "},"†":{"x_min":0,"x_max":777,"ha":835,"o":"m 458 804 l 777 804 l 777 683 l 458 683 l 458 0 l 319 0 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 "},"°":{"x_min":0,"x_max":347,"ha":444,"o":"m 173 802 q 43 856 91 802 q 0 977 0 905 q 45 1101 0 1049 q 173 1153 90 1153 q 303 1098 255 1153 q 347 977 347 1049 q 303 856 347 905 q 173 802 256 802 m 173 884 q 238 910 214 884 q 262 973 262 937 q 239 1038 262 1012 q 173 1064 217 1064 q 108 1037 132 1064 q 85 973 85 1010 q 108 910 85 937 q 173 884 132 884 "},"V":{"x_min":0,"x_max":862.71875,"ha":940,"o":"m 862 1013 l 505 0 l 361 0 l 0 1013 l 143 1013 l 434 165 l 718 1012 l 862 1013 "},"Ξ":{"x_min":0,"x_max":734.71875,"ha":763,"o":"m 723 889 l 9 889 l 9 1013 l 723 1013 l 723 889 m 673 463 l 61 463 l 61 589 l 673 589 l 673 463 m 734 0 l 0 0 l 0 124 l 734 124 l 734 0 "}," ":{"x_min":0,"x_max":0,"ha":853},"Ϋ":{"x_min":0.328125,"x_max":819.515625,"ha":889,"o":"m 588 1046 l 460 1046 l 460 1189 l 588 1189 l 588 1046 m 360 1046 l 232 1046 l 232 1189 l 360 1189 l 360 1046 m 819 1012 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1012 l 140 1012 l 411 533 l 679 1012 l 819 1012 "},"”":{"x_min":0,"x_max":347,"ha":454,"o":"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 m 347 851 q 310 737 347 784 q 208 669 273 690 l 208 734 q 267 787 250 741 q 280 873 280 821 l 208 873 l 208 1013 l 347 1013 l 347 851 "},"@":{"x_min":0,"x_max":1260,"ha":1357,"o":"m 1098 -45 q 877 -160 1001 -117 q 633 -203 752 -203 q 155 -29 327 -203 q 0 360 0 127 q 176 802 0 616 q 687 1008 372 1008 q 1123 854 969 1008 q 1260 517 1260 718 q 1155 216 1260 341 q 868 82 1044 82 q 772 106 801 82 q 737 202 737 135 q 647 113 700 144 q 527 82 594 82 q 367 147 420 82 q 314 312 314 212 q 401 565 314 452 q 639 690 498 690 q 810 588 760 690 l 849 668 l 938 668 q 877 441 900 532 q 833 226 833 268 q 853 182 833 198 q 902 167 873 167 q 1088 272 1012 167 q 1159 512 1159 372 q 1051 793 1159 681 q 687 925 925 925 q 248 747 415 925 q 97 361 97 586 q 226 26 97 159 q 627 -122 370 -122 q 856 -87 737 -122 q 1061 8 976 -53 l 1098 -45 m 786 488 q 738 580 777 545 q 643 615 700 615 q 483 517 548 615 q 425 322 425 430 q 457 203 425 250 q 552 156 490 156 q 722 273 665 156 q 786 488 738 309 "},"Ί":{"x_min":0,"x_max":499,"ha":613,"o":"m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 m 499 0 l 360 0 l 360 1012 l 499 1012 l 499 0 "},"i":{"x_min":14,"x_max":136,"ha":275,"o":"m 136 873 l 14 873 l 14 1013 l 136 1013 l 136 873 m 136 0 l 14 0 l 14 737 l 136 737 l 136 0 "},"Β":{"x_min":0,"x_max":778,"ha":877,"o":"m 580 545 q 724 468 671 534 q 778 310 778 402 q 673 83 778 170 q 432 0 575 0 l 0 0 l 0 1013 l 411 1013 q 629 957 541 1013 q 732 768 732 891 q 691 632 732 692 q 580 545 650 571 m 393 899 l 139 899 l 139 587 l 379 587 q 521 623 462 587 q 592 744 592 666 q 531 859 592 819 q 393 899 471 899 m 419 124 q 566 169 504 124 q 635 302 635 219 q 559 435 635 388 q 402 476 494 476 l 139 476 l 139 124 l 419 124 "},"υ":{"x_min":0,"x_max":617,"ha":725,"o":"m 617 352 q 540 94 617 199 q 308 -24 455 -24 q 76 94 161 -24 q 0 352 0 199 l 0 739 l 126 739 l 126 355 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 355 492 257 l 492 739 l 617 739 l 617 352 "},"]":{"x_min":0,"x_max":275,"ha":372,"o":"m 275 -281 l 0 -281 l 0 -187 l 151 -187 l 151 920 l 0 920 l 0 1013 l 275 1013 l 275 -281 "},"m":{"x_min":0,"x_max":1019,"ha":1128,"o":"m 1019 0 l 897 0 l 897 454 q 860 591 897 536 q 739 660 816 660 q 613 586 659 660 q 573 436 573 522 l 573 0 l 447 0 l 447 455 q 412 591 447 535 q 294 657 372 657 q 165 586 213 657 q 122 437 122 521 l 122 0 l 0 0 l 0 738 l 117 738 l 117 640 q 202 730 150 697 q 316 763 254 763 q 437 730 381 763 q 525 642 494 697 q 621 731 559 700 q 753 763 682 763 q 943 694 867 763 q 1019 512 1019 625 l 1019 0 "},"χ":{"x_min":8.328125,"x_max":780.5625,"ha":815,"o":"m 780 -278 q 715 -294 747 -294 q 616 -257 663 -294 q 548 -175 576 -227 l 379 133 l 143 -277 l 9 -277 l 313 254 l 163 522 q 127 586 131 580 q 36 640 91 640 q 8 637 27 640 l 8 752 l 52 757 q 162 719 113 757 q 236 627 200 690 l 383 372 l 594 737 l 726 737 l 448 250 l 625 -69 q 670 -153 647 -110 q 743 -188 695 -188 q 780 -184 759 -188 l 780 -278 "},"ί":{"x_min":42,"x_max":326.71875,"ha":361,"o":"m 284 3 q 233 -10 258 -5 q 182 -15 207 -15 q 85 26 119 -15 q 42 200 42 79 l 42 737 l 167 737 l 168 215 q 172 141 168 157 q 226 101 183 101 q 248 102 239 101 q 284 112 257 104 l 284 3 m 326 1040 l 137 819 l 54 819 l 189 1040 l 326 1040 "},"Ζ":{"x_min":0,"x_max":779.171875,"ha":850,"o":"m 779 0 l 0 0 l 0 113 l 620 896 l 40 896 l 40 1013 l 779 1013 l 779 887 l 170 124 l 779 124 l 779 0 "},"R":{"x_min":0,"x_max":781.953125,"ha":907,"o":"m 781 0 l 623 0 q 587 242 590 52 q 407 433 585 433 l 138 433 l 138 0 l 0 0 l 0 1013 l 396 1013 q 636 946 539 1013 q 749 731 749 868 q 711 597 749 659 q 608 502 674 534 q 718 370 696 474 q 729 207 722 352 q 781 26 736 62 l 781 0 m 373 551 q 533 594 465 551 q 614 731 614 645 q 532 859 614 815 q 373 896 465 896 l 138 896 l 138 551 l 373 551 "},"o":{"x_min":0,"x_max":713,"ha":821,"o":"m 357 -25 q 94 91 194 -25 q 0 368 0 202 q 93 642 0 533 q 357 761 193 761 q 618 644 518 761 q 713 368 713 533 q 619 91 713 201 q 357 -25 521 -25 m 357 85 q 528 175 465 85 q 584 369 584 255 q 529 562 584 484 q 357 651 467 651 q 189 560 250 651 q 135 369 135 481 q 187 177 135 257 q 357 85 250 85 "},"K":{"x_min":0,"x_max":819.46875,"ha":906,"o":"m 819 0 l 649 0 l 294 509 l 139 355 l 139 0 l 0 0 l 0 1013 l 139 1013 l 139 526 l 626 1013 l 809 1013 l 395 600 l 819 0 "},",":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 -12 q 105 -132 142 -82 q 0 -205 68 -182 l 0 -138 q 57 -82 40 -124 q 70 0 70 -51 l 0 0 l 0 151 l 142 151 l 142 -12 "},"d":{"x_min":0,"x_max":683,"ha":796,"o":"m 683 0 l 564 0 l 564 93 q 456 6 516 38 q 327 -25 395 -25 q 87 100 181 -25 q 0 365 0 215 q 90 639 0 525 q 343 763 187 763 q 564 647 486 763 l 564 1013 l 683 1013 l 683 0 m 582 373 q 529 562 582 484 q 361 653 468 653 q 190 561 253 653 q 135 365 135 479 q 189 175 135 254 q 358 85 251 85 q 529 178 468 85 q 582 373 582 258 "},"¨":{"x_min":-109,"x_max":247,"ha":232,"o":"m 247 1046 l 119 1046 l 119 1189 l 247 1189 l 247 1046 m 19 1046 l -109 1046 l -109 1189 l 19 1189 l 19 1046 "},"E":{"x_min":0,"x_max":736.109375,"ha":789,"o":"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"Y":{"x_min":0,"x_max":820,"ha":886,"o":"m 820 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 534 l 679 1012 l 820 1013 "},"\\"":{"x_min":0,"x_max":299,"ha":396,"o":"m 299 606 l 203 606 l 203 988 l 299 988 l 299 606 m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"‹":{"x_min":17.984375,"x_max":773.609375,"ha":792,"o":"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"„":{"x_min":0,"x_max":364,"ha":467,"o":"m 141 -12 q 104 -132 141 -82 q 0 -205 67 -182 l 0 -138 q 56 -82 40 -124 q 69 0 69 -51 l 0 0 l 0 151 l 141 151 l 141 -12 m 364 -12 q 327 -132 364 -82 q 222 -205 290 -182 l 222 -138 q 279 -82 262 -124 q 292 0 292 -51 l 222 0 l 222 151 l 364 151 l 364 -12 "},"δ":{"x_min":1,"x_max":710,"ha":810,"o":"m 710 360 q 616 87 710 196 q 356 -28 518 -28 q 99 82 197 -28 q 1 356 1 192 q 100 606 1 509 q 355 703 199 703 q 180 829 288 754 q 70 903 124 866 l 70 1012 l 643 1012 l 643 901 l 258 901 q 462 763 422 794 q 636 592 577 677 q 710 360 710 485 m 584 365 q 552 501 584 447 q 451 602 521 555 q 372 611 411 611 q 197 541 258 611 q 136 355 136 472 q 190 171 136 245 q 358 85 252 85 q 528 173 465 85 q 584 365 584 252 "},"έ":{"x_min":0,"x_max":634.71875,"ha":714,"o":"m 634 234 q 527 38 634 110 q 300 -25 433 -25 q 98 29 183 -25 q 0 204 0 93 q 37 313 0 265 q 128 390 67 352 q 56 459 82 419 q 26 555 26 505 q 114 712 26 654 q 295 763 191 763 q 499 700 416 763 q 589 515 589 631 l 478 515 q 419 618 464 580 q 307 657 374 657 q 207 630 253 657 q 151 547 151 598 q 238 445 151 469 q 389 434 280 434 l 389 331 l 349 331 q 206 315 255 331 q 125 210 125 287 q 183 107 125 145 q 302 76 233 76 q 436 117 379 76 q 509 234 493 159 l 634 234 m 520 1040 l 331 819 l 248 819 l 383 1040 l 520 1040 "},"ω":{"x_min":0,"x_max":922,"ha":1031,"o":"m 922 339 q 856 97 922 203 q 650 -26 780 -26 q 538 9 587 -26 q 461 103 489 44 q 387 12 436 46 q 277 -22 339 -22 q 69 97 147 -22 q 0 339 0 203 q 45 551 0 444 q 161 738 84 643 l 302 738 q 175 553 219 647 q 124 336 124 446 q 155 179 124 249 q 275 88 197 88 q 375 163 341 88 q 400 294 400 219 l 400 572 l 524 572 l 524 294 q 561 135 524 192 q 643 88 591 88 q 762 182 719 88 q 797 342 797 257 q 745 556 797 450 q 619 738 705 638 l 760 738 q 874 551 835 640 q 922 339 922 444 "},"´":{"x_min":0,"x_max":96,"ha":251,"o":"m 96 606 l 0 606 l 0 988 l 96 988 l 96 606 "},"±":{"x_min":11,"x_max":781,"ha":792,"o":"m 781 490 l 446 490 l 446 255 l 349 255 l 349 490 l 11 490 l 11 586 l 349 586 l 349 819 l 446 819 l 446 586 l 781 586 l 781 490 m 781 21 l 11 21 l 11 115 l 781 115 l 781 21 "},"|":{"x_min":343,"x_max":449,"ha":792,"o":"m 449 462 l 343 462 l 343 986 l 449 986 l 449 462 m 449 -242 l 343 -242 l 343 280 l 449 280 l 449 -242 "},"ϋ":{"x_min":0,"x_max":617,"ha":725,"o":"m 482 800 l 372 800 l 372 925 l 482 925 l 482 800 m 239 800 l 129 800 l 129 925 l 239 925 l 239 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 "},"§":{"x_min":0,"x_max":593,"ha":690,"o":"m 593 425 q 554 312 593 369 q 467 233 516 254 q 537 83 537 172 q 459 -74 537 -12 q 288 -133 387 -133 q 115 -69 184 -133 q 47 96 47 -6 l 166 96 q 199 7 166 40 q 288 -26 232 -26 q 371 -5 332 -26 q 420 60 420 21 q 311 201 420 139 q 108 309 210 255 q 0 490 0 383 q 33 602 0 551 q 124 687 66 654 q 75 743 93 712 q 58 812 58 773 q 133 984 58 920 q 300 1043 201 1043 q 458 987 394 1043 q 529 814 529 925 l 411 814 q 370 908 404 877 q 289 939 336 939 q 213 911 246 939 q 180 841 180 883 q 286 720 180 779 q 484 612 480 615 q 593 425 593 534 m 467 409 q 355 544 467 473 q 196 630 228 612 q 146 587 162 609 q 124 525 124 558 q 239 387 124 462 q 398 298 369 315 q 448 345 429 316 q 467 409 467 375 "},"b":{"x_min":0,"x_max":685,"ha":783,"o":"m 685 372 q 597 99 685 213 q 347 -25 501 -25 q 219 5 277 -25 q 121 93 161 36 l 121 0 l 0 0 l 0 1013 l 121 1013 l 121 634 q 214 723 157 692 q 341 754 272 754 q 591 637 493 754 q 685 372 685 526 m 554 356 q 499 550 554 470 q 328 644 437 644 q 162 556 223 644 q 108 369 108 478 q 160 176 108 256 q 330 83 221 83 q 498 169 435 83 q 554 356 554 245 "},"q":{"x_min":0,"x_max":683,"ha":876,"o":"m 683 -278 l 564 -278 l 564 97 q 474 8 533 39 q 345 -23 415 -23 q 91 93 188 -23 q 0 364 0 203 q 87 635 0 522 q 337 760 184 760 q 466 727 408 760 q 564 637 523 695 l 564 737 l 683 737 l 683 -278 m 582 375 q 527 564 582 488 q 358 652 466 652 q 190 565 253 652 q 135 377 135 488 q 189 179 135 261 q 361 84 251 84 q 530 179 469 84 q 582 375 582 260 "},"Ω":{"x_min":-0.171875,"x_max":969.5625,"ha":1068,"o":"m 969 0 l 555 0 l 555 123 q 744 308 675 194 q 814 558 814 423 q 726 812 814 709 q 484 922 633 922 q 244 820 334 922 q 154 567 154 719 q 223 316 154 433 q 412 123 292 199 l 412 0 l 0 0 l 0 124 l 217 124 q 68 327 122 210 q 15 572 15 444 q 144 911 15 781 q 484 1041 274 1041 q 822 909 691 1041 q 953 569 953 777 q 899 326 953 443 q 750 124 846 210 l 969 124 l 969 0 "},"ύ":{"x_min":0,"x_max":617,"ha":725,"o":"m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 535 1040 l 346 819 l 262 819 l 397 1040 l 535 1040 "},"z":{"x_min":-0.015625,"x_max":613.890625,"ha":697,"o":"m 613 0 l 0 0 l 0 100 l 433 630 l 20 630 l 20 738 l 594 738 l 593 636 l 163 110 l 613 110 l 613 0 "},"™":{"x_min":0,"x_max":894,"ha":1000,"o":"m 389 951 l 229 951 l 229 503 l 160 503 l 160 951 l 0 951 l 0 1011 l 389 1011 l 389 951 m 894 503 l 827 503 l 827 939 l 685 503 l 620 503 l 481 937 l 481 503 l 417 503 l 417 1011 l 517 1011 l 653 580 l 796 1010 l 894 1011 l 894 503 "},"ή":{"x_min":0.78125,"x_max":697,"ha":810,"o":"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 721 124 755 q 200 630 193 687 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 m 479 1040 l 290 819 l 207 819 l 341 1040 l 479 1040 "},"Θ":{"x_min":0,"x_max":960,"ha":1056,"o":"m 960 507 q 833 129 960 280 q 476 -32 698 -32 q 123 129 255 -32 q 0 507 0 280 q 123 883 0 732 q 476 1045 255 1045 q 832 883 696 1045 q 960 507 960 732 m 817 500 q 733 789 817 669 q 476 924 639 924 q 223 792 317 924 q 142 507 142 675 q 222 222 142 339 q 476 89 315 89 q 730 218 636 89 q 817 500 817 334 m 716 449 l 243 449 l 243 571 l 716 571 l 716 449 "},"®":{"x_min":-3,"x_max":1008,"ha":1106,"o":"m 503 532 q 614 562 566 532 q 672 658 672 598 q 614 747 672 716 q 503 772 569 772 l 338 772 l 338 532 l 503 532 m 502 -7 q 123 151 263 -7 q -3 501 -3 294 q 123 851 -3 706 q 502 1011 263 1011 q 881 851 739 1011 q 1008 501 1008 708 q 883 151 1008 292 q 502 -7 744 -7 m 502 60 q 830 197 709 60 q 940 501 940 322 q 831 805 940 681 q 502 944 709 944 q 174 805 296 944 q 65 501 65 680 q 173 197 65 320 q 502 60 294 60 m 788 146 l 678 146 q 653 316 655 183 q 527 449 652 449 l 338 449 l 338 146 l 241 146 l 241 854 l 518 854 q 688 808 621 854 q 766 658 766 755 q 739 563 766 607 q 668 497 713 519 q 751 331 747 472 q 788 164 756 190 l 788 146 "},"~":{"x_min":0,"x_max":833,"ha":931,"o":"m 833 958 q 778 753 833 831 q 594 665 716 665 q 402 761 502 665 q 240 857 302 857 q 131 795 166 857 q 104 665 104 745 l 0 665 q 54 867 0 789 q 237 958 116 958 q 429 861 331 958 q 594 765 527 765 q 704 827 670 765 q 729 958 729 874 l 833 958 "},"Ε":{"x_min":0,"x_max":736.21875,"ha":778,"o":"m 736 0 l 0 0 l 0 1013 l 725 1013 l 725 889 l 139 889 l 139 585 l 677 585 l 677 467 l 139 467 l 139 125 l 736 125 l 736 0 "},"³":{"x_min":0,"x_max":450,"ha":547,"o":"m 450 552 q 379 413 450 464 q 220 366 313 366 q 69 414 130 366 q 0 567 0 470 l 85 567 q 126 470 85 504 q 225 437 168 437 q 320 467 280 437 q 360 552 360 498 q 318 632 360 608 q 213 657 276 657 q 195 657 203 657 q 176 657 181 657 l 176 722 q 279 733 249 722 q 334 815 334 752 q 300 881 334 856 q 220 907 267 907 q 133 875 169 907 q 97 781 97 844 l 15 781 q 78 926 15 875 q 220 972 135 972 q 364 930 303 972 q 426 817 426 888 q 344 697 426 733 q 421 642 392 681 q 450 552 450 603 "},"[":{"x_min":0,"x_max":273.609375,"ha":371,"o":"m 273 -281 l 0 -281 l 0 1013 l 273 1013 l 273 920 l 124 920 l 124 -187 l 273 -187 l 273 -281 "},"L":{"x_min":0,"x_max":645.828125,"ha":696,"o":"m 645 0 l 0 0 l 0 1013 l 140 1013 l 140 126 l 645 126 l 645 0 "},"σ":{"x_min":0,"x_max":803.390625,"ha":894,"o":"m 803 628 l 633 628 q 713 368 713 512 q 618 93 713 204 q 357 -25 518 -25 q 94 91 194 -25 q 0 368 0 201 q 94 644 0 533 q 356 761 194 761 q 481 750 398 761 q 608 739 564 739 l 803 739 l 803 628 m 360 85 q 529 180 467 85 q 584 374 584 262 q 527 566 584 490 q 352 651 463 651 q 187 559 247 651 q 135 368 135 478 q 189 175 135 254 q 360 85 251 85 "},"ζ":{"x_min":0,"x_max":573,"ha":642,"o":"m 573 -40 q 553 -162 573 -97 q 510 -278 543 -193 l 400 -278 q 441 -187 428 -219 q 462 -90 462 -132 q 378 -14 462 -14 q 108 45 197 -14 q 0 290 0 117 q 108 631 0 462 q 353 901 194 767 l 55 901 l 55 1012 l 561 1012 l 561 924 q 261 669 382 831 q 128 301 128 489 q 243 117 128 149 q 458 98 350 108 q 573 -40 573 80 "},"θ":{"x_min":0,"x_max":674,"ha":778,"o":"m 674 496 q 601 160 674 304 q 336 -26 508 -26 q 73 153 165 -26 q 0 485 0 296 q 72 840 0 683 q 343 1045 166 1045 q 605 844 516 1045 q 674 496 674 692 m 546 579 q 498 798 546 691 q 336 935 437 935 q 178 798 237 935 q 126 579 137 701 l 546 579 m 546 475 l 126 475 q 170 233 126 348 q 338 80 230 80 q 504 233 447 80 q 546 475 546 346 "},"Ο":{"x_min":0,"x_max":958,"ha":1054,"o":"m 485 1042 q 834 883 703 1042 q 958 511 958 735 q 834 136 958 287 q 481 -26 701 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 729 q 485 1042 263 1042 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 670 q 480 913 640 913 q 226 785 321 913 q 142 504 142 671 q 226 224 142 339 q 480 98 319 98 "},"Γ":{"x_min":0,"x_max":705.28125,"ha":749,"o":"m 705 886 l 140 886 l 140 0 l 0 0 l 0 1012 l 705 1012 l 705 886 "}," ":{"x_min":0,"x_max":0,"ha":375},"%":{"x_min":-3,"x_max":1089,"ha":1186,"o":"m 845 0 q 663 76 731 0 q 602 244 602 145 q 661 412 602 344 q 845 489 728 489 q 1027 412 959 489 q 1089 244 1089 343 q 1029 76 1089 144 q 845 0 962 0 m 844 103 q 945 143 909 103 q 981 243 981 184 q 947 340 981 301 q 844 385 909 385 q 744 342 781 385 q 708 243 708 300 q 741 147 708 186 q 844 103 780 103 m 888 986 l 284 -25 l 199 -25 l 803 986 l 888 986 m 241 468 q 58 545 126 468 q -3 715 -3 615 q 56 881 -3 813 q 238 958 124 958 q 421 881 353 958 q 483 712 483 813 q 423 544 483 612 q 241 468 356 468 m 241 855 q 137 811 175 855 q 100 710 100 768 q 136 612 100 653 q 240 572 172 572 q 344 614 306 572 q 382 713 382 656 q 347 810 382 771 q 241 855 308 855 "},"P":{"x_min":0,"x_max":726,"ha":806,"o":"m 424 1013 q 640 931 555 1013 q 726 719 726 850 q 637 506 726 587 q 413 426 548 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 379 889 l 140 889 l 140 548 l 372 548 q 522 589 459 548 q 593 720 593 637 q 528 845 593 801 q 379 889 463 889 "},"Έ":{"x_min":0,"x_max":1078.21875,"ha":1118,"o":"m 1078 0 l 342 0 l 342 1013 l 1067 1013 l 1067 889 l 481 889 l 481 585 l 1019 585 l 1019 467 l 481 467 l 481 125 l 1078 125 l 1078 0 m 277 1040 l 83 799 l 0 799 l 140 1040 l 277 1040 "},"Ώ":{"x_min":0.125,"x_max":1136.546875,"ha":1235,"o":"m 1136 0 l 722 0 l 722 123 q 911 309 842 194 q 981 558 981 423 q 893 813 981 710 q 651 923 800 923 q 411 821 501 923 q 321 568 321 720 q 390 316 321 433 q 579 123 459 200 l 579 0 l 166 0 l 166 124 l 384 124 q 235 327 289 210 q 182 572 182 444 q 311 912 182 782 q 651 1042 441 1042 q 989 910 858 1042 q 1120 569 1120 778 q 1066 326 1120 443 q 917 124 1013 210 l 1136 124 l 1136 0 m 277 1040 l 83 800 l 0 800 l 140 1041 l 277 1040 "},"_":{"x_min":0,"x_max":705.5625,"ha":803,"o":"m 705 -334 l 0 -334 l 0 -234 l 705 -234 l 705 -334 "},"Ϊ":{"x_min":-110,"x_max":246,"ha":275,"o":"m 246 1046 l 118 1046 l 118 1189 l 246 1189 l 246 1046 m 18 1046 l -110 1046 l -110 1189 l 18 1189 l 18 1046 m 136 0 l 0 0 l 0 1012 l 136 1012 l 136 0 "},"+":{"x_min":23,"x_max":768,"ha":792,"o":"m 768 372 l 444 372 l 444 0 l 347 0 l 347 372 l 23 372 l 23 468 l 347 468 l 347 840 l 444 840 l 444 468 l 768 468 l 768 372 "},"½":{"x_min":0,"x_max":1050,"ha":1149,"o":"m 1050 0 l 625 0 q 712 178 625 108 q 878 277 722 187 q 967 385 967 328 q 932 456 967 429 q 850 484 897 484 q 759 450 798 484 q 721 352 721 416 l 640 352 q 706 502 640 448 q 851 551 766 551 q 987 509 931 551 q 1050 385 1050 462 q 976 251 1050 301 q 829 179 902 215 q 717 68 740 133 l 1050 68 l 1050 0 m 834 985 l 215 -28 l 130 -28 l 750 984 l 834 985 m 224 422 l 142 422 l 142 811 l 0 811 l 0 867 q 104 889 62 867 q 164 973 157 916 l 224 973 l 224 422 "},"Ρ":{"x_min":0,"x_max":720,"ha":783,"o":"m 424 1013 q 637 933 554 1013 q 720 723 720 853 q 633 508 720 591 q 413 426 546 426 l 140 426 l 140 0 l 0 0 l 0 1013 l 424 1013 m 378 889 l 140 889 l 140 548 l 371 548 q 521 589 458 548 q 592 720 592 637 q 527 845 592 801 q 378 889 463 889 "},"\'":{"x_min":0,"x_max":139,"ha":236,"o":"m 139 851 q 102 737 139 784 q 0 669 65 690 l 0 734 q 59 787 42 741 q 72 873 72 821 l 0 873 l 0 1013 l 139 1013 l 139 851 "},"ª":{"x_min":0,"x_max":350,"ha":397,"o":"m 350 625 q 307 616 328 616 q 266 631 281 616 q 247 673 251 645 q 190 628 225 644 q 116 613 156 613 q 32 641 64 613 q 0 722 0 669 q 72 826 0 800 q 247 866 159 846 l 247 887 q 220 934 247 916 q 162 953 194 953 q 104 934 129 953 q 76 882 80 915 l 16 882 q 60 976 16 941 q 166 1011 104 1011 q 266 979 224 1011 q 308 891 308 948 l 308 706 q 311 679 308 688 q 331 670 315 670 l 350 672 l 350 625 m 247 757 l 247 811 q 136 790 175 798 q 64 726 64 773 q 83 682 64 697 q 132 667 103 667 q 207 690 174 667 q 247 757 247 718 "},"΅":{"x_min":0,"x_max":450,"ha":553,"o":"m 450 800 l 340 800 l 340 925 l 450 925 l 450 800 m 406 1040 l 212 800 l 129 800 l 269 1040 l 406 1040 m 110 800 l 0 800 l 0 925 l 110 925 l 110 800 "},"T":{"x_min":0,"x_max":777,"ha":835,"o":"m 777 894 l 458 894 l 458 0 l 319 0 l 319 894 l 0 894 l 0 1013 l 777 1013 l 777 894 "},"Φ":{"x_min":0,"x_max":915,"ha":997,"o":"m 527 0 l 389 0 l 389 122 q 110 231 220 122 q 0 509 0 340 q 110 785 0 677 q 389 893 220 893 l 389 1013 l 527 1013 l 527 893 q 804 786 693 893 q 915 509 915 679 q 805 231 915 341 q 527 122 696 122 l 527 0 m 527 226 q 712 310 641 226 q 779 507 779 389 q 712 705 779 627 q 527 787 641 787 l 527 226 m 389 226 l 389 787 q 205 698 275 775 q 136 505 136 620 q 206 308 136 391 q 389 226 276 226 "},"⁋":{"x_min":0,"x_max":0,"ha":694},"j":{"x_min":-77.78125,"x_max":167,"ha":349,"o":"m 167 871 l 42 871 l 42 1013 l 167 1013 l 167 871 m 167 -80 q 121 -231 167 -184 q -26 -278 76 -278 l -77 -278 l -77 -164 l -41 -164 q 26 -143 11 -164 q 42 -65 42 -122 l 42 737 l 167 737 l 167 -80 "},"Σ":{"x_min":0,"x_max":756.953125,"ha":819,"o":"m 756 0 l 0 0 l 0 107 l 395 523 l 22 904 l 22 1013 l 745 1013 l 745 889 l 209 889 l 566 523 l 187 125 l 756 125 l 756 0 "},"›":{"x_min":18.0625,"x_max":774,"ha":792,"o":"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"<":{"x_min":17.984375,"x_max":773.609375,"ha":792,"o":"m 773 40 l 18 376 l 17 465 l 773 799 l 773 692 l 159 420 l 773 149 l 773 40 "},"£":{"x_min":0,"x_max":704.484375,"ha":801,"o":"m 704 41 q 623 -10 664 5 q 543 -26 583 -26 q 359 15 501 -26 q 243 36 288 36 q 158 23 197 36 q 73 -21 119 10 l 6 76 q 125 195 90 150 q 175 331 175 262 q 147 443 175 383 l 0 443 l 0 512 l 108 512 q 43 734 43 623 q 120 929 43 854 q 358 1010 204 1010 q 579 936 487 1010 q 678 729 678 857 l 678 684 l 552 684 q 504 838 552 780 q 362 896 457 896 q 216 852 263 896 q 176 747 176 815 q 199 627 176 697 q 248 512 217 574 l 468 512 l 468 443 l 279 443 q 297 356 297 398 q 230 194 297 279 q 153 107 211 170 q 227 133 190 125 q 293 142 264 142 q 410 119 339 142 q 516 96 482 96 q 579 105 550 96 q 648 142 608 115 l 704 41 "},"t":{"x_min":0,"x_max":367,"ha":458,"o":"m 367 0 q 312 -5 339 -2 q 262 -8 284 -8 q 145 28 183 -8 q 108 143 108 64 l 108 638 l 0 638 l 0 738 l 108 738 l 108 944 l 232 944 l 232 738 l 367 738 l 367 638 l 232 638 l 232 185 q 248 121 232 140 q 307 102 264 102 q 345 104 330 102 q 367 107 360 107 l 367 0 "},"¬":{"x_min":0,"x_max":706,"ha":803,"o":"m 706 411 l 706 158 l 630 158 l 630 335 l 0 335 l 0 411 l 706 411 "},"λ":{"x_min":0,"x_max":750,"ha":803,"o":"m 750 -7 q 679 -15 716 -15 q 538 59 591 -15 q 466 214 512 97 l 336 551 l 126 0 l 0 0 l 270 705 q 223 837 247 770 q 116 899 190 899 q 90 898 100 899 l 90 1004 q 152 1011 125 1011 q 298 938 244 1011 q 373 783 326 901 l 605 192 q 649 115 629 136 q 716 95 669 95 l 736 95 q 750 97 745 97 l 750 -7 "},"W":{"x_min":0,"x_max":1263.890625,"ha":1351,"o":"m 1263 1013 l 995 0 l 859 0 l 627 837 l 405 0 l 265 0 l 0 1013 l 136 1013 l 342 202 l 556 1013 l 701 1013 l 921 207 l 1133 1012 l 1263 1013 "},">":{"x_min":18.0625,"x_max":774,"ha":792,"o":"m 774 376 l 18 40 l 18 149 l 631 421 l 18 692 l 18 799 l 774 465 l 774 376 "},"v":{"x_min":0,"x_max":675.15625,"ha":761,"o":"m 675 738 l 404 0 l 272 0 l 0 738 l 133 737 l 340 147 l 541 737 l 675 738 "},"τ":{"x_min":0.28125,"x_max":644.5,"ha":703,"o":"m 644 628 l 382 628 l 382 179 q 388 120 382 137 q 436 91 401 91 q 474 94 447 91 q 504 97 501 97 l 504 0 q 454 -9 482 -5 q 401 -14 426 -14 q 278 67 308 -14 q 260 233 260 118 l 260 628 l 0 628 l 0 739 l 644 739 l 644 628 "},"ξ":{"x_min":0,"x_max":624.9375,"ha":699,"o":"m 624 -37 q 608 -153 624 -96 q 563 -278 593 -211 l 454 -278 q 491 -183 486 -200 q 511 -83 511 -126 q 484 -23 511 -44 q 370 1 452 1 q 323 0 354 1 q 283 -1 293 -1 q 84 76 169 -1 q 0 266 0 154 q 56 431 0 358 q 197 538 108 498 q 94 613 134 562 q 54 730 54 665 q 77 823 54 780 q 143 901 101 867 l 27 901 l 27 1012 l 576 1012 l 576 901 l 380 901 q 244 863 303 901 q 178 745 178 820 q 312 600 178 636 q 532 582 380 582 l 532 479 q 276 455 361 479 q 118 281 118 410 q 165 173 118 217 q 274 120 208 133 q 494 101 384 110 q 624 -37 624 76 "},"&":{"x_min":-3,"x_max":894.25,"ha":992,"o":"m 894 0 l 725 0 l 624 123 q 471 0 553 40 q 306 -41 390 -41 q 168 -7 231 -41 q 62 92 105 26 q 14 187 31 139 q -3 276 -3 235 q 55 433 -3 358 q 248 581 114 508 q 170 689 196 640 q 137 817 137 751 q 214 985 137 922 q 384 1041 284 1041 q 548 988 483 1041 q 622 824 622 928 q 563 666 622 739 q 431 556 516 608 l 621 326 q 649 407 639 361 q 663 493 653 426 l 781 493 q 703 229 781 352 l 894 0 m 504 818 q 468 908 504 877 q 384 940 433 940 q 293 907 331 940 q 255 818 255 875 q 289 714 255 767 q 363 628 313 678 q 477 729 446 682 q 504 818 504 771 m 556 209 l 314 499 q 179 395 223 449 q 135 283 135 341 q 146 222 135 253 q 183 158 158 192 q 333 80 241 80 q 556 209 448 80 "},"Λ":{"x_min":0,"x_max":862.5,"ha":942,"o":"m 862 0 l 719 0 l 426 847 l 143 0 l 0 0 l 356 1013 l 501 1013 l 862 0 "},"I":{"x_min":41,"x_max":180,"ha":293,"o":"m 180 0 l 41 0 l 41 1013 l 180 1013 l 180 0 "},"G":{"x_min":0,"x_max":921,"ha":1011,"o":"m 921 0 l 832 0 l 801 136 q 655 15 741 58 q 470 -28 568 -28 q 126 133 259 -28 q 0 499 0 284 q 125 881 0 731 q 486 1043 259 1043 q 763 957 647 1043 q 905 709 890 864 l 772 709 q 668 866 747 807 q 486 926 589 926 q 228 795 322 926 q 142 507 142 677 q 228 224 142 342 q 483 94 323 94 q 712 195 625 94 q 796 435 796 291 l 477 435 l 477 549 l 921 549 l 921 0 "},"ΰ":{"x_min":0,"x_max":617,"ha":725,"o":"m 524 800 l 414 800 l 414 925 l 524 925 l 524 800 m 183 800 l 73 800 l 73 925 l 183 925 l 183 800 m 617 352 q 540 93 617 199 q 308 -24 455 -24 q 76 93 161 -24 q 0 352 0 199 l 0 738 l 126 738 l 126 354 q 169 185 126 257 q 312 98 220 98 q 451 185 402 98 q 492 354 492 257 l 492 738 l 617 738 l 617 352 m 489 1040 l 300 819 l 216 819 l 351 1040 l 489 1040 "},"`":{"x_min":0,"x_max":138.890625,"ha":236,"o":"m 138 699 l 0 699 l 0 861 q 36 974 0 929 q 138 1041 72 1020 l 138 977 q 82 931 95 969 q 69 839 69 893 l 138 839 l 138 699 "},"·":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 "},"Υ":{"x_min":0.328125,"x_max":819.515625,"ha":889,"o":"m 819 1013 l 482 416 l 482 0 l 342 0 l 342 416 l 0 1013 l 140 1013 l 411 533 l 679 1013 l 819 1013 "},"r":{"x_min":0,"x_max":355.5625,"ha":432,"o":"m 355 621 l 343 621 q 179 569 236 621 q 122 411 122 518 l 122 0 l 0 0 l 0 737 l 117 737 l 117 604 q 204 719 146 686 q 355 753 262 753 l 355 621 "},"x":{"x_min":0,"x_max":675,"ha":764,"o":"m 675 0 l 525 0 l 331 286 l 144 0 l 0 0 l 256 379 l 12 738 l 157 737 l 336 473 l 516 738 l 661 738 l 412 380 l 675 0 "},"μ":{"x_min":0,"x_max":696.609375,"ha":747,"o":"m 696 -4 q 628 -14 657 -14 q 498 97 513 -14 q 422 8 470 41 q 313 -24 374 -24 q 207 3 258 -24 q 120 80 157 31 l 120 -278 l 0 -278 l 0 738 l 124 738 l 124 343 q 165 172 124 246 q 308 82 216 82 q 451 177 402 82 q 492 358 492 254 l 492 738 l 616 738 l 616 214 q 623 136 616 160 q 673 92 636 92 q 696 95 684 92 l 696 -4 "},"h":{"x_min":0,"x_max":615,"ha":724,"o":"m 615 472 l 615 0 l 490 0 l 490 454 q 456 590 490 535 q 338 654 416 654 q 186 588 251 654 q 122 436 122 522 l 122 0 l 0 0 l 0 1013 l 122 1013 l 122 633 q 218 727 149 694 q 362 760 287 760 q 552 676 484 760 q 615 472 615 600 "},".":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 0 l 0 0 l 0 151 l 142 151 l 142 0 "},"φ":{"x_min":-2,"x_max":878,"ha":974,"o":"m 496 -279 l 378 -279 l 378 -17 q 101 88 204 -17 q -2 367 -2 194 q 68 626 -2 510 q 283 758 151 758 l 283 646 q 167 537 209 626 q 133 373 133 462 q 192 177 133 254 q 378 93 259 93 l 378 758 q 445 764 426 763 q 476 765 464 765 q 765 659 653 765 q 878 377 878 553 q 771 96 878 209 q 496 -17 665 -17 l 496 -279 m 496 93 l 514 93 q 687 183 623 93 q 746 380 746 265 q 691 569 746 491 q 522 658 629 658 l 496 656 l 496 93 "},";":{"x_min":0,"x_max":142,"ha":239,"o":"m 142 585 l 0 585 l 0 738 l 142 738 l 142 585 m 142 -12 q 105 -132 142 -82 q 0 -206 68 -182 l 0 -138 q 58 -82 43 -123 q 68 0 68 -56 l 0 0 l 0 151 l 142 151 l 142 -12 "},"f":{"x_min":0,"x_max":378,"ha":472,"o":"m 378 638 l 246 638 l 246 0 l 121 0 l 121 638 l 0 638 l 0 738 l 121 738 q 137 935 121 887 q 290 1028 171 1028 q 320 1027 305 1028 q 378 1021 334 1026 l 378 908 q 323 918 346 918 q 257 870 273 918 q 246 780 246 840 l 246 738 l 378 738 l 378 638 "},"“":{"x_min":1,"x_max":348.21875,"ha":454,"o":"m 140 670 l 1 670 l 1 830 q 37 943 1 897 q 140 1011 74 990 l 140 947 q 82 900 97 940 q 68 810 68 861 l 140 810 l 140 670 m 348 670 l 209 670 l 209 830 q 245 943 209 897 q 348 1011 282 990 l 348 947 q 290 900 305 940 q 276 810 276 861 l 348 810 l 348 670 "},"A":{"x_min":0.03125,"x_max":906.953125,"ha":1008,"o":"m 906 0 l 756 0 l 648 303 l 251 303 l 142 0 l 0 0 l 376 1013 l 529 1013 l 906 0 m 610 421 l 452 867 l 293 421 l 610 421 "},"‘":{"x_min":1,"x_max":139.890625,"ha":236,"o":"m 139 670 l 1 670 l 1 830 q 37 943 1 897 q 139 1011 74 990 l 139 947 q 82 900 97 940 q 68 810 68 861 l 139 810 l 139 670 "},"ϊ":{"x_min":-70,"x_max":283,"ha":361,"o":"m 283 800 l 173 800 l 173 925 l 283 925 l 283 800 m 40 800 l -70 800 l -70 925 l 40 925 l 40 800 m 283 3 q 232 -10 257 -5 q 181 -15 206 -15 q 84 26 118 -15 q 41 200 41 79 l 41 737 l 166 737 l 167 215 q 171 141 167 157 q 225 101 182 101 q 247 103 238 101 q 283 112 256 104 l 283 3 "},"π":{"x_min":-0.21875,"x_max":773.21875,"ha":857,"o":"m 773 -7 l 707 -11 q 575 40 607 -11 q 552 174 552 77 l 552 226 l 552 626 l 222 626 l 222 0 l 97 0 l 97 626 l 0 626 l 0 737 l 773 737 l 773 626 l 676 626 l 676 171 q 695 103 676 117 q 773 90 714 90 l 773 -7 "},"ά":{"x_min":0,"x_max":765.5625,"ha":809,"o":"m 765 -4 q 698 -14 726 -14 q 564 97 586 -14 q 466 7 525 40 q 337 -26 407 -26 q 88 98 186 -26 q 0 369 0 212 q 88 637 0 525 q 337 760 184 760 q 465 727 407 760 q 563 637 524 695 l 563 738 l 685 738 l 685 222 q 693 141 685 168 q 748 94 708 94 q 765 95 760 94 l 765 -4 m 584 371 q 531 562 584 485 q 360 653 470 653 q 192 566 254 653 q 135 379 135 489 q 186 181 135 261 q 358 84 247 84 q 528 176 465 84 q 584 371 584 260 m 604 1040 l 415 819 l 332 819 l 466 1040 l 604 1040 "},"O":{"x_min":0,"x_max":958,"ha":1057,"o":"m 485 1041 q 834 882 702 1041 q 958 512 958 734 q 834 136 958 287 q 481 -26 702 -26 q 126 130 261 -26 q 0 504 0 279 q 127 880 0 728 q 485 1041 263 1041 m 480 98 q 731 225 638 98 q 815 504 815 340 q 733 783 815 669 q 480 912 640 912 q 226 784 321 912 q 142 504 142 670 q 226 224 142 339 q 480 98 319 98 "},"n":{"x_min":0,"x_max":615,"ha":724,"o":"m 615 463 l 615 0 l 490 0 l 490 454 q 453 592 490 537 q 331 656 410 656 q 178 585 240 656 q 117 421 117 514 l 117 0 l 0 0 l 0 738 l 117 738 l 117 630 q 218 728 150 693 q 359 764 286 764 q 552 675 484 764 q 615 463 615 593 "},"l":{"x_min":41,"x_max":166,"ha":279,"o":"m 166 0 l 41 0 l 41 1013 l 166 1013 l 166 0 "},"¤":{"x_min":40.09375,"x_max":728.796875,"ha":825,"o":"m 728 304 l 649 224 l 512 363 q 383 331 458 331 q 256 363 310 331 l 119 224 l 40 304 l 177 441 q 150 553 150 493 q 184 673 150 621 l 40 818 l 119 898 l 267 749 q 321 766 291 759 q 384 773 351 773 q 447 766 417 773 q 501 749 477 759 l 649 898 l 728 818 l 585 675 q 612 618 604 648 q 621 553 621 587 q 591 441 621 491 l 728 304 m 384 682 q 280 643 318 682 q 243 551 243 604 q 279 461 243 499 q 383 423 316 423 q 487 461 449 423 q 525 553 525 500 q 490 641 525 605 q 384 682 451 682 "},"κ":{"x_min":0,"x_max":632.328125,"ha":679,"o":"m 632 0 l 482 0 l 225 384 l 124 288 l 124 0 l 0 0 l 0 738 l 124 738 l 124 446 l 433 738 l 596 738 l 312 466 l 632 0 "},"p":{"x_min":0,"x_max":685,"ha":786,"o":"m 685 364 q 598 96 685 205 q 350 -23 504 -23 q 121 89 205 -23 l 121 -278 l 0 -278 l 0 738 l 121 738 l 121 633 q 220 726 159 691 q 351 761 280 761 q 598 636 504 761 q 685 364 685 522 m 557 371 q 501 560 557 481 q 330 651 437 651 q 162 559 223 651 q 108 366 108 479 q 162 177 108 254 q 333 87 224 87 q 502 178 441 87 q 557 371 557 258 "},"‡":{"x_min":0,"x_max":777,"ha":835,"o":"m 458 238 l 458 0 l 319 0 l 319 238 l 0 238 l 0 360 l 319 360 l 319 681 l 0 683 l 0 804 l 319 804 l 319 1015 l 458 1013 l 458 804 l 777 804 l 777 683 l 458 683 l 458 360 l 777 360 l 777 238 l 458 238 "},"ψ":{"x_min":0,"x_max":808,"ha":907,"o":"m 465 -278 l 341 -278 l 341 -15 q 87 102 180 -15 q 0 378 0 210 l 0 739 l 133 739 l 133 379 q 182 195 133 275 q 341 98 242 98 l 341 922 l 465 922 l 465 98 q 623 195 563 98 q 675 382 675 278 l 675 742 l 808 742 l 808 381 q 720 104 808 213 q 466 -13 627 -13 l 465 -278 "},"η":{"x_min":0.78125,"x_max":697,"ha":810,"o":"m 697 -278 l 572 -278 l 572 454 q 540 587 572 536 q 425 650 501 650 q 271 579 337 650 q 206 420 206 509 l 206 0 l 81 0 l 81 489 q 73 588 81 562 q 0 644 56 644 l 0 741 q 68 755 38 755 q 158 720 124 755 q 200 630 193 686 q 297 726 234 692 q 434 761 359 761 q 620 692 544 761 q 697 516 697 624 l 697 -278 "}}'),ck="normal",dk=1189,uk=-100,hk="normal",fk={yMin:-334,xMin:-111,yMax:1189,xMax:1672},pk=1e3,mk={postscript_name:"Helvetiker-Regular",version_string:"Version 1.00 2004 initial release",vendor_url:"http://www.magenta.gr/",full_font_name:"Helvetiker",font_family_name:"Helvetiker",copyright:"Copyright (c) Μagenta ltd, 2004",description:"",trademark:"",designer:"",designer_url:"",unique_font_identifier:"Μagenta ltd:Helvetiker:22-10-104",license_url:"http://www.ellak.gr/fonts/MgOpen/license.html",license_description:`Copyright (c) 2004 by MAGENTA Ltd. All Rights Reserved.\r +\r +Permission is hereby granted, free of charge, to any person obtaining a copy of the fonts accompanying this license ("Fonts") and associated documentation files (the "Font Software"), to reproduce and distribute the Font Software, including without limitation the rights to use, copy, merge, publish, distribute, and/or sell copies of the Font Software, and to permit persons to whom the Font Software is furnished to do so, subject to the following conditions: \r +\r +The above copyright and this permission notice shall be included in all copies of one or more of the Font Software typefaces.\r +\r +The Font Software may be modified, altered, or added to, and in particular the designs of glyphs or characters in the Fonts may be modified and additional glyphs or characters may be added to the Fonts, only if the fonts are renamed to names not containing the word "MgOpen", or if the modifications are accepted for inclusion in the Font Software itself by the each appointed Administrator.\r +\r +This License becomes null and void to the extent applicable to Fonts or Font Software that has been modified and is distributed under the "MgOpen" name.\r +\r +The Font Software may be sold as part of a larger software package but no copy of one or more of the Font Software typefaces may be sold by itself. \r +\r +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL MAGENTA OR PERSONS OR BODIES IN CHARGE OF ADMINISTRATION AND MAINTENANCE OF THE FONT SOFTWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.`,manufacturer_name:"Μagenta ltd",font_sub_family_name:"Regular"},gk=-334,xk="Helvetiker",bk=1522,yk=50,vk={glyphs:lk,cssFontWeight:ck,ascender:dk,underlinePosition:uk,cssFontStyle:hk,boundingBox:fk,resolution:pk,original_font_information:mk,descender:gk,familyName:xk,lineHeight:bk,underlineThickness:yk},vl=new P;function br(r,e,t,n,i,s){const a=2*Math.PI*i/4,o=Math.max(s-2*i,0),l=Math.PI/4;vl.copy(e),vl[n]=0,vl.normalize();const c=.5*a/(a+o),d=1-vl.angleTo(r)/l;return Math.sign(vl[t])===1?d*c:o/(a+o)+c+c*(1-d)}class Um extends ui{constructor(e=1,t=1,n=1,i=2,s=.1){const a=i*2+1;if(s=Math.min(e/2,t/2,n/2,s),super(1,1,1,a,a,a),this.type="RoundedBoxGeometry",this.parameters={width:e,height:t,depth:n,segments:i,radius:s},a===1)return;const o=this.toNonIndexed();this.index=null,this.attributes.position=o.attributes.position,this.attributes.normal=o.attributes.normal,this.attributes.uv=o.attributes.uv;const l=new P,c=new P,d=new P(e,t,n).divideScalar(2).subScalar(s),u=this.attributes.position.array,h=this.attributes.normal.array,f=this.attributes.uv.array,m=u.length/6,x=new P,g=.5/a;for(let p=0,v=0;p>5&31)/31,m=(V>>10&31)/31):(h=p,f=v,m=b)}for(let V=1;V<=3;V++){const H=I+V*12,F=E*3*3+(V-1)*3;A[F]=d.getFloat32(H,!0),A[F+1]=d.getFloat32(H+4,!0),A[F+2]=d.getFloat32(H+8,!0),M[F]=O,M[F+1]=q,M[F+2]=z,x&&(S.setRGB(h,f,m,kn),g[F]=S.r,g[F+1]=S.g,g[F+2]=S.b)}}return T.setAttribute("position",new ft(A,3)),T.setAttribute("normal",new ft(M,3)),x&&(T.setAttribute("color",new ft(g,3)),T.hasColors=!0,T.alpha=y),T}function s(c){const d=new st,u=/solid([\s\S]*?)endsolid/g,h=/facet([\s\S]*?)endfacet/g,f=/solid\s(.+)/;let m=0;const x=/[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source,g=new RegExp("vertex"+x+x+x,"g"),p=new RegExp("normal"+x+x+x,"g"),v=[],b=[],y=[],_=new P;let w,T=0,A=0,M=0;for(;(w=u.exec(c))!==null;){A=M;const S=w[0],E=(w=f.exec(S))!==null?w[1]:"";for(y.push(E);(w=h.exec(S))!==null;){let q=0,z=0;const V=w[0];for(;(w=p.exec(V))!==null;)_.x=parseFloat(w[1]),_.y=parseFloat(w[2]),_.z=parseFloat(w[3]),z++;for(;(w=g.exec(V))!==null;)v.push(parseFloat(w[1]),parseFloat(w[2]),parseFloat(w[3])),b.push(_.x,_.y,_.z),q++,M++;z!==1&&console.error("THREE.STLLoader: Something isn't right with the normal of face number "+m),q!==3&&console.error("THREE.STLLoader: Something isn't right with the vertices of face number "+m),m++}const I=A,O=M-A;d.userData.groupNames=y,d.addGroup(I,O,T),T++}return d.setAttribute("position",new Ie(v,3)),d.setAttribute("normal",new Ie(b,3)),d}function a(c){return typeof c!="string"?new TextDecoder().decode(c):c}function o(c){if(typeof c=="string"){const d=new Uint8Array(c.length);for(let u=0;u0?_e.copy(q[q.length-1]):_e.identity())}function i($){const W=new Ri,L=new re,C=new re,Q=new re;let ce=!0,j=!1;const fe=$.getAttribute("d");if(fe===""||fe==="none")return null;const ye=fe.match(/[a-df-z][^a-df-z]*/ig);for(let me=0,Z=ye.length;me0&&(L.copy(Q),W.currentPath.currentPoint.copy(L),ce=!0);break;default:console.warn(D)}j=!1}return W}function s($){if(!(!$.sheet||!$.sheet.cssRules||!$.sheet.cssRules.length))for(let W=0;W<$.sheet.cssRules.length;W++){const L=$.sheet.cssRules[W];if(L.type!==1)continue;const C=L.selectorText.split(/,/gm).filter(Boolean).map(Q=>Q.trim());for(let Q=0;Qj!==""));O[C[Q]]=Object.assign(O[C[Q]]||{},ce)}}}function a($,W,L,C,Q,ce,j,fe){if(W==0||L==0){$.lineTo(fe.x,fe.y);return}C=C*Math.PI/180,W=Math.abs(W),L=Math.abs(L);const ye=(j.x-fe.x)/2,me=(j.y-fe.y)/2,Z=Math.cos(C)*ye+Math.sin(C)*me,D=-Math.sin(C)*ye+Math.cos(C)*me;let ne=W*W,se=L*L;const G=Z*Z,U=D*D,he=G/ne+U/se;if(he>1){const Me=Math.sqrt(he);W=Me*W,L=Me*L,ne=W*W,se=L*L}const pe=ne*U+se*G,Te=(ne*se-pe)/pe;let B=Math.sqrt(Math.max(0,Te));Q===ce&&(B=-B);const k=B*W*D/L,K=-B*L*Z/W,de=Math.cos(C)*k-Math.sin(C)*K+(j.x+fe.x)/2,xe=Math.sin(C)*k+Math.cos(C)*K+(j.y+fe.y)/2,le=o(1,0,(Z-k)/W,(D-K)/L),Ve=o((Z-k)/W,(D-K)/L,(-Z-k)/W,(-D-K)/L)%(Math.PI*2);$.currentPath.absellipse(de,xe,W,L,le,le+Ve,ce===0,C)}function o($,W,L,C){const Q=$*L+W*C,ce=Math.sqrt($*$+W*W)*Math.sqrt(L*L+C*C);let j=Math.acos(Math.max(-1,Math.min(1,Q/ce)));return $*C-W*L<0&&(j=-j),j}function l($){const W=b($.getAttribute("x")||0),L=b($.getAttribute("y")||0),C=b($.getAttribute("rx")||$.getAttribute("ry")||0),Q=b($.getAttribute("ry")||$.getAttribute("rx")||0),ce=b($.getAttribute("width")),j=b($.getAttribute("height")),fe=1-.551915024494,ye=new Ri;return ye.moveTo(W+C,L),ye.lineTo(W+ce-C,L),(C!==0||Q!==0)&&ye.bezierCurveTo(W+ce-C*fe,L,W+ce,L+Q*fe,W+ce,L+Q),ye.lineTo(W+ce,L+j-Q),(C!==0||Q!==0)&&ye.bezierCurveTo(W+ce,L+j-Q*fe,W+ce-C*fe,L+j,W+ce-C,L+j),ye.lineTo(W+C,L+j),(C!==0||Q!==0)&&ye.bezierCurveTo(W+C*fe,L+j,W,L+j-Q*fe,W,L+j-Q),ye.lineTo(W,L+Q),(C!==0||Q!==0)&&ye.bezierCurveTo(W,L+Q*fe,W+C*fe,L,W+C,L),ye}function c($){function W(ce,j,fe){const ye=b(j),me=b(fe);Q===0?C.moveTo(ye,me):C.lineTo(ye,me),Q++}const L=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,C=new Ri;let Q=0;return $.getAttribute("points").replace(L,W),C.currentPath.autoClose=!0,C}function d($){function W(ce,j,fe){const ye=b(j),me=b(fe);Q===0?C.moveTo(ye,me):C.lineTo(ye,me),Q++}const L=/([+-]?\d*\.?\d+(?:e[+-]?\d+)?)(?:,|\s)([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/g,C=new Ri;let Q=0;return $.getAttribute("points").replace(L,W),C.currentPath.autoClose=!1,C}function u($){const W=b($.getAttribute("cx")||0),L=b($.getAttribute("cy")||0),C=b($.getAttribute("r")||0),Q=new ba;Q.absarc(W,L,C,0,Math.PI*2);const ce=new Ri;return ce.subPaths.push(Q),ce}function h($){const W=b($.getAttribute("cx")||0),L=b($.getAttribute("cy")||0),C=b($.getAttribute("rx")||0),Q=b($.getAttribute("ry")||0),ce=new ba;ce.absellipse(W,L,C,Q,0,Math.PI*2);const j=new Ri;return j.subPaths.push(ce),j}function f($){const W=b($.getAttribute("x1")||0),L=b($.getAttribute("y1")||0),C=b($.getAttribute("x2")||0),Q=b($.getAttribute("y2")||0),ce=new Ri;return ce.moveTo(W,L),ce.lineTo(C,Q),ce.currentPath.autoClose=!1,ce}function m($,W){W=Object.assign({},W);let L={};if($.hasAttribute("class")){const j=$.getAttribute("class").split(/\s/).filter(Boolean).map(fe=>fe.trim());for(let fe=0;fe0&&W.premultiply(q[q.length-1]),_e.copy(W),q.push(W),W}function _($){const W=new Je,L=z;if($.nodeName==="use"&&($.hasAttribute("x")||$.hasAttribute("y"))){const C=b($.getAttribute("x")||0),Q=b($.getAttribute("y")||0);W.translate(C,Q)}if($.hasAttribute("transform")){const C=$.getAttribute("transform").split(")");for(let Q=C.length-1;Q>=0;Q--){const ce=C[Q].trim();if(ce==="")continue;const j=ce.indexOf("("),fe=ce.length;if(j>0&&j=1){const Z=me[0];let D=0;me.length>=2&&(D=me[1]),L.translate(Z,D)}break;case"rotate":if(me.length>=1){let Z=0,D=0,ne=0;Z=me[0]*Math.PI/180,me.length>=3&&(D=me[1],ne=me[2]),V.makeTranslation(-D,-ne),H.makeRotation(Z),F.multiplyMatrices(H,V),V.makeTranslation(D,ne),L.multiplyMatrices(V,F)}break;case"scale":if(me.length>=1){const Z=me[0];let D=Z;me.length>=2&&(D=me[1]),L.scale(Z,D)}break;case"skewX":me.length===1&&L.set(1,Math.tan(me[0]*Math.PI/180),0,0,1,0,0,0,1);break;case"skewY":me.length===1&&L.set(1,0,0,Math.tan(me[0]*Math.PI/180),1,0,0,0,1);break;case"matrix":me.length===6&&L.set(me[0],me[2],me[4],me[1],me[3],me[5],0,0,1);break}}W.premultiply(L)}}return W}function w($,W){function L(j){ue.set(j.x,j.y,1).applyMatrix3(W),j.set(ue.x,ue.y)}function C(j){const fe=j.xRadius,ye=j.yRadius,me=Math.cos(j.aRotation),Z=Math.sin(j.aRotation),D=new P(fe*me,fe*Z,0),ne=new P(-ye*Z,ye*me,0),se=D.applyMatrix3(W),G=ne.applyMatrix3(W),U=z.set(se.x,G.x,0,se.y,G.y,0,0,0,1),he=V.copy(U).invert(),B=H.copy(he).transpose().multiply(he).elements,k=E(B[0],B[1],B[4]),K=Math.sqrt(k.rt1),de=Math.sqrt(k.rt2);if(j.xRadius=1/K,j.yRadius=1/de,j.aRotation=Math.atan2(k.sn,k.cs),!((j.aEndAngle-j.aStartAngle)%(2*Math.PI){const{x:be,y:we}=new P(Math.cos(ze),Math.sin(ze),0).applyMatrix3(Me);return Math.atan2(we,be)};j.aStartAngle=Xe(j.aStartAngle),j.aEndAngle=Xe(j.aEndAngle),T(W)&&(j.aClockwise=!j.aClockwise)}}function Q(j){const fe=M(W),ye=S(W);j.xRadius*=fe,j.yRadius*=ye;const me=fe>Number.EPSILON?Math.atan2(W.elements[1],W.elements[0]):Math.atan2(-W.elements[3],W.elements[4]);j.aRotation+=me,T(W)&&(j.aStartAngle*=-1,j.aEndAngle*=-1,j.aClockwise=!j.aClockwise)}const ce=$.subPaths;for(let j=0,fe=ce.length;jNumber.EPSILON}function M($){const W=$.elements;return Math.sqrt(W[0]*W[0]+W[1]*W[1])}function S($){const W=$.elements;return Math.sqrt(W[3]*W[3]+W[4]*W[4])}function E($,W,L){let C,Q,ce,j,fe;const ye=$+L,me=$-L,Z=Math.sqrt(me*me+4*W*W);return ye>0?(C=.5*(ye+Z),fe=1/C,Q=$*fe*L-W*fe*W):ye<0?Q=.5*(ye-Z):(C=.5*Z,Q=-.5*Z),me>0?ce=me+Z:ce=me-Z,Math.abs(ce)>2*Math.abs(W)?(fe=-2*W/ce,j=1/Math.sqrt(1+fe*fe),ce=fe*j):Math.abs(W)===0?(ce=1,j=0):(fe=-.5*ce/W,ce=1/Math.sqrt(1+fe*fe),j=fe*ce),me>0&&(fe=ce,ce=-j,j=fe),{rt1:C,rt2:Q,cs:ce,sn:j}}const I=[],O={},q=[],z=new Je,V=new Je,H=new Je,F=new Je,ie=new re,ue=new P,_e=new Je,Ne=new DOMParser().parseFromString(e,"image/svg+xml");return n(Ne.documentElement,{fill:"#000",fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeLineJoin:"miter",strokeLineCap:"butt",strokeMiterLimit:4}),{paths:I,xml:Ne.documentElement}}static createShapes(e){const n={ORIGIN:0,DESTINATION:1,BETWEEN:2,LEFT:3,RIGHT:4,BEHIND:5,BEYOND:6},i={loc:n.ORIGIN,t:0};function s(x,g,p,v){const b=x.x,y=g.x,_=p.x,w=v.x,T=x.y,A=g.y,M=p.y,S=v.y,E=(w-_)*(T-M)-(S-M)*(b-_),I=(y-b)*(T-M)-(A-T)*(b-_),O=(S-M)*(y-b)-(w-_)*(A-T),q=E/O,z=I/O;if(O===0&&E!==0||q<=0||q>=1||z<0||z>1)return null;if(E===0&&O===0){for(let V=0;V<2;V++)if(a(V===0?p:v,x,g),i.loc==n.ORIGIN){const H=V===0?p:v;return{x:H.x,y:H.y,t:i.t}}else if(i.loc==n.BETWEEN){const H=+(b+i.t*(y-b)).toPrecision(10),F=+(T+i.t*(A-T)).toPrecision(10);return{x:H,y:F,t:i.t}}return null}else{for(let F=0;F<2;F++)if(a(F===0?p:v,x,g),i.loc==n.ORIGIN){const ie=F===0?p:v;return{x:ie.x,y:ie.y,t:i.t}}const V=+(b+q*(y-b)).toPrecision(10),H=+(T+q*(A-T)).toPrecision(10);return{x:V,y:H,t:q}}}function a(x,g,p){const v=p.x-g.x,b=p.y-g.y,y=x.x-g.x,_=x.y-g.y,w=v*_-y*b;if(x.x===g.x&&x.y===g.y){i.loc=n.ORIGIN,i.t=0;return}if(x.x===p.x&&x.y===p.y){i.loc=n.DESTINATION,i.t=1;return}if(w<-Number.EPSILON){i.loc=n.LEFT;return}if(w>Number.EPSILON){i.loc=n.RIGHT;return}if(v*y<0||b*_<0){i.loc=n.BEHIND;return}if(Math.sqrt(v*v+b*b)S.t<=M.t+Number.EPSILON&&S.t>=M.t-Number.EPSILON)===void 0&&(p.push(M),v.push(new re(M.x,M.y)))}}return v}function l(x,g,p){const v=new re;g.getCenter(v);const b=[];return p.forEach(y=>{y.boundingBox.containsPoint(v)&&o(x,y.points).forEach(w=>{b.push({identifier:y.identifier,isCW:y.isCW,point:w})})}),b.sort((y,_)=>y.point.x-_.point.x),b}function c(x,g,p,v,b){(b==null||b==="")&&(b="nonzero");const y=new re;x.boundingBox.getCenter(y);const _=[new re(p,y.y),new re(v,y.y)],w=l(_,x.boundingBox,g);w.sort((I,O)=>I.point.x-O.point.x);const T=[],A=[];w.forEach(I=>{I.identifier===x.identifier?T.push(I):A.push(I)});const M=T[0].point.x,S=[];let E=0;for(;E0&&S[S.length-1]===A[E].identifier?S.pop():S.push(A[E].identifier),E++;if(S.push(x.identifier),b==="evenodd"){const I=S.length%2===0,O=S[S.length-2];return{identifier:x.identifier,isHole:I,for:O}}else if(b==="nonzero"){let I=!0,O=null,q=null;for(let z=0;z{const g=x.getPoints();let p=-999999999,v=999999999,b=-999999999,y=999999999;for(let _=0;_p&&(p=w.y),w.yb&&(b=w.x),w.x=y&&(d=y-1),{curves:x.curves,points:g,isCW:kr.isClockWise(g),identifier:-1,boundingBox:new Hv(new re(y,v),new re(b,p))}});h=h.filter(x=>x.points.length>1);for(let x=0;xc(x,h,d,u,e.userData?e.userData.style.fillRule:void 0)),m=[];return h.forEach(x=>{if(!f[x.identifier].isHole){const p=new oi;p.curves=x.curves,f.filter(b=>b.isHole&&b.for===x.identifier).forEach(b=>{const y=h[b.identifier],_=new ba;_.curves=y.curves,p.holes.push(_)}),m.push(p)}}),m}static getStrokeStyle(e,t,n,i,s){return e=e!==void 0?e:1,t=t!==void 0?t:"#000",n=n!==void 0?n:"miter",i=i!==void 0?i:"butt",s=s!==void 0?s:4,{strokeColor:t,strokeWidth:e,strokeLineJoin:n,strokeLineCap:i,strokeMiterLimit:s}}static pointsToStroke(e,t,n,i){const s=[],a=[],o=[];if(g0.pointsToStrokeWithBuffers(e,t,n,i,s,a,o)===0)return null;const l=new st;return l.setAttribute("position",new Ie(s,3)),l.setAttribute("normal",new Ie(a,3)),l.setAttribute("uv",new Ie(o,2)),l}static pointsToStrokeWithBuffers(e,t,n,i,s,a,o,l){const c=new re,d=new re,u=new re,h=new re,f=new re,m=new re,x=new re,g=new re,p=new re,v=new re,b=new re,y=new re,_=new re,w=new re,T=new re,A=new re,M=new re;n=n!==void 0?n:12,i=i!==void 0?i:.001,l=l!==void 0?l:0,e=me(e);const S=e.length;if(S<2)return 0;const E=e[0].equals(e[S-1]);let I,O=e[0],q;const z=t.strokeWidth/2,V=1/(S-1);let H=0,F,ie,ue,_e,Ne=!1,Le=0,$=l*3,W=l*2;L(e[0],e[1],c).multiplyScalar(z),g.copy(e[0]).sub(c),p.copy(e[0]).add(c),v.copy(g),b.copy(p);for(let Z=1;ZNumber.EPSILON){const se=z/ne;u.multiplyScalar(-se),h.subVectors(I,O),f.copy(h).setLength(se).add(u),A.copy(f).negate();const G=f.length(),U=h.length();h.divideScalar(U),m.subVectors(q,I);const he=m.length();switch(m.divideScalar(he),h.dot(A)=i&&ne.push(Z[se]);return ne.push(Z[Z.length-1]),ne}}}const c3=0,Ek=1,Ck=2,Kx=2,uf=1.25,Jx=1,Jl=32,ch=65535,Rk=Math.pow(2,-24),hf=Symbol("SKIP_GENERATION");function Ik(r){return r.index?r.index.count:r.attributes.position.count}function tl(r){return Ik(r)/3}function Pk(r,e=ArrayBuffer){return r>65535?new Uint32Array(new e(4*r)):new Uint16Array(new e(2*r))}function Dk(r,e){if(!r.index){const t=r.attributes.position.count,n=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=Pk(t,n);r.setIndex(new ft(i,1));for(let s=0;si&&(a.push({pos:Math.max(i,d),isStart:!0}),a.push({pos:Math.min(s,u),isStart:!1}))}a.sort((c,d)=>c.pos!==d.pos?c.pos-d.pos:c.type==="end"?-1:1);let o=0,l=null;for(const c of a){const d=c.pos;o!==0&&d!==l&&t.push({offset:l,count:d-l}),o+=c.isStart?1:-1,l=d}return t}function ff(r,e,t,n,i){let s=1/0,a=1/0,o=1/0,l=-1/0,c=-1/0,d=-1/0,u=1/0,h=1/0,f=1/0,m=-1/0,x=-1/0,g=-1/0;const p=r.offset||0;for(let v=(e-p)*6,b=(e+t-p)*6;vl&&(l=T),ym&&(m=y);const A=r[v+2],M=r[v+3],S=A-M,E=A+M;Sc&&(c=E),Ax&&(x=A);const I=r[v+4],O=r[v+5],q=I-O,z=I+O;qd&&(d=z),Ig&&(g=I)}n[0]=s,n[1]=a,n[2]=o,n[3]=l,n[4]=c,n[5]=d,i[0]=u,i[1]=h,i[2]=f,i[3]=m,i[4]=x,i[5]=g}function eb(r,e,t=null,n=null,i=null){const s=r.attributes.position,a=r.index?r.index.array:null,o=s.normalized;if(i===null)i=new Float32Array(t*6),i.offset=e;else if(e<0||t+e>i.length/6)throw new Error("MeshBVH: compute triangle bounds range is invalid.");const l=s.array,c=s.offset||0;let d=3;s.isInterleavedBufferAttribute&&(d=s.data.stride);const u=["getX","getY","getZ"],h=i.offset;for(let f=e,m=e+t;fS&&(S=T),A>S&&(S=A);const E=(S-M)/2,I=_*2;i[p+I+0]=M+E,i[p+I+1]=E+(Math.abs(M)+E)*Rk}}return i}function Zt(r,e,t){return t.min.x=e[r],t.min.y=e[r+1],t.min.z=e[r+2],t.max.x=e[r+3],t.max.y=e[r+4],t.max.z=e[r+5],t}function tb(r){let e=-1,t=-1/0;for(let n=0;n<3;n++){const i=r[n+3]-r[n];i>t&&(t=i,e=n)}return e}function nb(r,e){e.set(r)}function rb(r,e,t){let n,i;for(let s=0;s<3;s++){const a=s+3;n=r[s],i=e[s],t[s]=ni?n:i}}function Nd(r,e,t){for(let n=0;n<3;n++){const i=e[r+2*n],s=e[r+2*n+1],a=i-s,o=i+s;at[n+3]&&(t[n+3]=o)}}function _l(r){const e=r[3]-r[0],t=r[4]-r[1],n=r[5]-r[2];return 2*(e*t+t*n+n*e)}const Ei=32,Lk=(r,e)=>r.candidate-e.candidate,os=new Array(Ei).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Ud=new Float32Array(6);function Nk(r,e,t,n,i,s){let a=-1,o=0;if(s===c3)a=tb(e),a!==-1&&(o=(e[a]+e[a+3])/2);else if(s===Ek)a=tb(r),a!==-1&&(o=Uk(t,n,i,a));else if(s===Ck){const l=_l(r);let c=uf*i;const d=t.offset||0,u=(n-d)*6,h=(n+i-d)*6;for(let f=0;f<3;f++){const m=e[f],p=(e[f+3]-m)/Ei;if(i=A.candidate?Nd(_,t,A.rightCacheBounds):(Nd(_,t,A.leftCacheBounds),A.count++)}}for(let _=0;_=Ei&&(T=Ei-1);const A=os[T];A.count++,Nd(y,t,A.bounds)}const v=os[Ei-1];nb(v.bounds,v.rightCacheBounds);for(let y=Ei-2;y>=0;y--){const _=os[y],w=os[y+1];rb(_.bounds,w.rightCacheBounds,_.rightCacheBounds)}let b=0;for(let y=0;y=l;)o--;if(a=l;)o--;if(aqk)throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return Fl[t+6]=c/4,c=mp(c,o),Fl[t+7]=l,c}}function zk(r,e,t){const i=(r.index?r.index.count:r.attributes.position.count)/3>2**16,s=t.reduce((d,u)=>d+u.count,0),a=i?4:2,o=e?new SharedArrayBuffer(s*a):new ArrayBuffer(s*a),l=i?new Uint32Array(o):new Uint16Array(o);let c=0;for(let d=0;d=s&&(p=!0,a&&(console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`),console.warn(h))),T<=o||M>=s)return b(w+T),_.offset=w,_.count=T,_;const S=Nk(_.boundingData,A,e,w,T,l);if(S.axis===-1)return b(w+T),_.offset=w,_.count=T,_;const E=m(u,f,e,w,T,S);if(E===w||E===w+T)b(w+T),_.offset=w,_.count=T;else{_.splitAxis=S.axis;const I=new pf,O=w,q=E-w;_.left=I,ff(e,O,q,I.boundingData,g),y(I,O,q,g,M+1);const z=new pf,V=E,H=T-q;_.right=z,ff(e,V,H,z.boundingData,g),y(z,V,H,g,M+1)}return _}}function Gk(r,e){const t=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,n=r.geometry;let i,s;if(e.indirect){const a=Qx(n,e.range),o=zk(n,e.useSharedArrayBuffer,a);r._indirectBuffer=o,i=eb(n,0,o.length,o),s=[{offset:0,count:o.length}]}else{Dk(n,e);const a=d3(n,e.range)[0];i=eb(n,a.offset,a.count),s=Qx(n,e.range)}r._roots=s.map(a=>{const o=Vk(r,i,a.offset,a.count,e),l=pp(o),c=new t(Jl*l);return Bk(0,o,c),c})}class Yi{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let n=1/0,i=-1/0;for(let s=0,a=e.length;si?l:i}this.min=n,this.max=i}setFromPoints(e,t){let n=1/0,i=-1/0;for(let s=0,a=t.length;si?l:i}this.min=n,this.max=i}isSeparated(e){return this.min>e.max||e.min>this.max}}Yi.prototype.setFromBox=(function(){const r=new P;return function(t,n){const i=n.min,s=n.max;let a=1/0,o=-1/0;for(let l=0;l<=1;l++)for(let c=0;c<=1;c++)for(let d=0;d<=1;d++){r.x=i.x*l+s.x*(1-l),r.y=i.y*c+s.y*(1-c),r.z=i.z*d+s.z*(1-d);const u=t.dot(r);a=Math.min(u,a),o=Math.max(u,o)}this.min=a,this.max=o}})();const Hk=(function(){const r=new P,e=new P,t=new P;return function(i,s,a){const o=i.start,l=r,c=s.start,d=e;t.subVectors(o,c),r.subVectors(i.end,i.start),e.subVectors(s.end,s.start);const u=t.dot(d),h=d.dot(l),f=d.dot(d),m=t.dot(l),g=l.dot(l)*f-h*h;let p,v;g!==0?p=(u*h-m*f)/g:p=0,v=(u+p*h)/f,a.x=p,a.y=v}})(),Fm=(function(){const r=new re,e=new P,t=new P;return function(i,s,a,o){Hk(i,s,r);let l=r.x,c=r.y;if(l>=0&&l<=1&&c>=0&&c<=1){i.at(l,a),s.at(c,o);return}else if(l>=0&&l<=1){c<0?s.at(0,o):s.at(1,o),i.closestPointToPoint(o,!0,a);return}else if(c>=0&&c<=1){l<0?i.at(0,a):i.at(1,a),s.closestPointToPoint(a,!0,o);return}else{let d;l<0?d=i.start:d=i.end;let u;c<0?u=s.start:u=s.end;const h=e,f=t;if(i.closestPointToPoint(u,!0,e),s.closestPointToPoint(d,!0,t),h.distanceToSquared(u)<=f.distanceToSquared(d)){a.copy(h),o.copy(u);return}else{a.copy(d),o.copy(f);return}}}})(),Wk=(function(){const r=new P,e=new P,t=new Mr,n=new rr;return function(s,a){const{radius:o,center:l}=s,{a:c,b:d,c:u}=a;if(n.start=c,n.end=d,n.closestPointToPoint(l,!0,r).distanceTo(l)<=o||(n.start=c,n.end=u,n.closestPointToPoint(l,!0,r).distanceTo(l)<=o)||(n.start=d,n.end=u,n.closestPointToPoint(l,!0,r).distanceTo(l)<=o))return!0;const x=a.getPlane(t);if(Math.abs(x.distanceToPoint(l))<=o){const p=x.projectPoint(l,e);if(a.containsPoint(p))return!0}return!1}})(),Xk=["x","y","z"],Pi=1e-15,ib=Pi*Pi;function yr(r){return Math.abs(r)new P),this.satBounds=new Array(4).fill().map(()=>new Yi),this.points=[this.a,this.b,this.c],this.plane=new Mr,this.isDegenerateIntoSegment=!1,this.isDegenerateIntoPoint=!1,this.degenerateSegment=new rr,this.needsUpdate=!0}intersectsSphere(e){return Wk(e,this)}update(){const e=this.a,t=this.b,n=this.c,i=this.points,s=this.satAxes,a=this.satBounds,o=s[0],l=a[0];this.getNormal(o),l.setFromPoints(o,i);const c=s[1],d=a[1];c.subVectors(e,t),d.setFromPoints(c,i);const u=s[2],h=a[2];u.subVectors(t,n),h.setFromPoints(u,i);const f=s[3],m=a[3];f.subVectors(n,e),m.setFromPoints(f,i);const x=c.length(),g=u.length(),p=f.length();this.isDegenerateIntoPoint=!1,this.isDegenerateIntoSegment=!1,x0)f(b.c,b.a,b.b,w,y,_,E,M,S,I,O);else if(A>0)f(b.b,b.a,b.c,_,y,w,S,M,E,I,O);else if(S*E>0||M!=0)f(b.a,b.b,b.c,y,_,w,M,S,E,I,O);else if(S!=0)f(b.b,b.a,b.c,_,y,w,S,M,E,I,O);else if(E!=0)f(b.c,b.a,b.b,w,y,_,E,M,S,I,O);else return!0;return!1}function x(b,y,_,w){const T=y.degenerateSegment,A=b.plane.distanceToPoint(T.start),M=b.plane.distanceToPoint(T.end);return yr(A)?yr(M)?h(b,y,_,w):(_&&(_.start.copy(T.start),_.end.copy(T.start)),b.containsPoint(T.start)):yr(M)?(_&&(_.start.copy(T.end),_.end.copy(T.end)),b.containsPoint(T.end)):b.plane.intersectLine(T,n)!=null?(_&&(_.start.copy(n),_.end.copy(n)),b.containsPoint(n)):!1}function g(b,y,_){const w=y.a;return yr(b.plane.distanceToPoint(w))&&b.containsPoint(w)?(_&&(_.start.copy(w),_.end.copy(w)),!0):!1}function p(b,y,_){const w=b.degenerateSegment,T=y.a;return w.closestPointToPoint(T,!0,n),T.distanceToSquared(n)1||q<0||q>1)return!1;const z=T.start.z+M.z*O,V=A.start.z+S.z*q;return yr(z-V)?(_&&(_.start.copy(T.start).addScaledVector(M,O),_.end.copy(T.start).addScaledVector(M,O)),!0):!1}else return y.isDegenerateIntoPoint?p(b,y,_):x(y,b,_,w);else{if(b.isDegenerateIntoPoint)return y.isDegenerateIntoPoint?y.a.distanceToSquared(b.a)0&&q>0)return!1;let z=A.distanceToPoint(y.a),V=A.distanceToPoint(y.b),H=A.distanceToPoint(y.c);yr(z)&&(z=0),yr(V)&&(V=0),yr(H)&&(H=0);const F=z*V,ie=z*H;if(F>0&&ie>0)return!1;i.copy(A.normal),s.copy(M.normal);const ue=i.cross(s);let _e=0,Ne=Math.abs(ue.x);const Le=Math.abs(ue.y);Le>Ne&&(Ne=Le,_e=1),Math.abs(ue.z)>Ne&&(_e=2);const W=Xk[_e],L=this.a[W],C=this.b[W],Q=this.c[W],ce=y.a[W],j=y.b[W],fe=y.c[W];if(m(this,L,C,Q,O,q,S,E,I,d,o))return h(this,y,_,w);if(m(y,ce,j,fe,F,ie,z,V,H,u,l))return h(this,y,_,w);if(d.yd.x?_.start.copy(l.start):_.start.copy(o.start),u.ynew P),this.satAxes=new Array(3).fill().map(()=>new P),this.satBounds=new Array(3).fill().map(()=>new Yi),this.alignedSatBounds=new Array(3).fill().map(()=>new Yi),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),n&&this.matrix.copy(n)}set(e,t,n){this.min.copy(e),this.max.copy(t),this.matrix.copy(n),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}Gn.prototype.update=(function(){return function(){const e=this.matrix,t=this.min,n=this.max,i=this.points;for(let c=0;c<=1;c++)for(let d=0;d<=1;d++)for(let u=0;u<=1;u++){const h=1*c|2*d|4*u,f=i[h];f.x=c?n.x:t.x,f.y=d?n.y:t.y,f.z=u?n.z:t.z,f.applyMatrix4(e)}const s=this.satBounds,a=this.satAxes,o=i[0];for(let c=0;c<3;c++){const d=a[c],u=s[c],h=1<new rr),t=new Array(12).fill().map(()=>new rr),n=new P,i=new P;return function(a,o=0,l=null,c=null){if(this.needsUpdate&&this.update(),this.intersectsBox(a))return(l||c)&&(a.getCenter(i),this.closestPointToPoint(i,n),a.closestPointToPoint(n,i),l&&l.copy(n),c&&c.copy(i)),0;const d=o*o,u=a.min,h=a.max,f=this.points;let m=1/0;for(let g=0;g<8;g++){const p=f[g];i.copy(p).clamp(u,h);const v=p.distanceToSquared(i);if(vnew Lr)}}const Ir=new Yk;class Zk{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let t=null;this.setBuffer=n=>{t&&e.push(t),t=n,this.float32Array=new Float32Array(n),this.uint16Array=new Uint16Array(n),this.uint32Array=new Uint32Array(n)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const Lt=new Zk;let bs,Eo;const po=[],Fd=new Om(()=>new wt);function $k(r,e,t,n,i,s){bs=Fd.getPrimitive(),Eo=Fd.getPrimitive(),po.push(bs,Eo),Lt.setBuffer(r._roots[e]);const a=gp(0,r.geometry,t,n,i,s);Lt.clearBuffer(),Fd.releasePrimitive(bs),Fd.releasePrimitive(Eo),po.pop(),po.pop();const o=po.length;return o>0&&(Eo=po[o-1],bs=po[o-2]),a}function gp(r,e,t,n,i=null,s=0,a=0){const{float32Array:o,uint16Array:l,uint32Array:c}=Lt;let d=r*2;if(Jn(d,l)){const m=hr(r,c),x=Er(d,l);return Zt(r,o,bs),n(m,x,!1,a,s+r,bs)}else{let I=function(q){const{uint16Array:z,uint32Array:V}=Lt;let H=q*2;for(;!Jn(H,z);)q=Cr(q),H=q*2;return hr(q,V)},O=function(q){const{uint16Array:z,uint32Array:V}=Lt;let H=q*2;for(;!Jn(H,z);)q=Rr(q,V),H=q*2;return hr(q,V)+Er(H,z)};var h=I,f=O;const m=Cr(r),x=Rr(r,c);let g=m,p=x,v,b,y,_;if(i&&(y=bs,_=Eo,Zt(g,o,y),Zt(p,o,_),v=i(y),b=i(_),b(wl.copy(e).clamp(d.min,d.max),wl.distanceToSquared(e)),intersectsBounds:(d,u,h)=>h{d.closestPointToPoint(e,wl);const h=e.distanceToSquared(wl);return h=169,Kk=parseInt(Zo)<=161,Zs=new P,$s=new P,js=new P,qd=new re,Bd=new re,zd=new re,sb=new P,ab=new P,ob=new P,Sl=new P;function Jk(r,e,t,n,i,s,a,o){let l;if(s===Rn?l=r.intersectTriangle(n,t,e,!0,i):l=r.intersectTriangle(e,t,n,s!==Kn,i),l===null)return null;const c=r.origin.distanceTo(i);return co?null:{distance:c,point:i.clone()}}function lb(r,e,t,n,i,s,a,o,l,c,d){Zs.fromBufferAttribute(e,s),$s.fromBufferAttribute(e,a),js.fromBufferAttribute(e,o);const u=Jk(r,Zs,$s,js,Sl,l,c,d);if(u){if(n){qd.fromBufferAttribute(n,s),Bd.fromBufferAttribute(n,a),zd.fromBufferAttribute(n,o),u.uv=new re;const f=kt.getInterpolation(Sl,Zs,$s,js,qd,Bd,zd,u.uv);Od||(u.uv=f)}if(i){qd.fromBufferAttribute(i,s),Bd.fromBufferAttribute(i,a),zd.fromBufferAttribute(i,o),u.uv1=new re;const f=kt.getInterpolation(Sl,Zs,$s,js,qd,Bd,zd,u.uv1);Od||(u.uv1=f),Kk&&(u.uv2=u.uv1)}if(t){sb.fromBufferAttribute(t,s),ab.fromBufferAttribute(t,a),ob.fromBufferAttribute(t,o),u.normal=new P;const f=kt.getInterpolation(Sl,Zs,$s,js,sb,ab,ob,u.normal);u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1),Od||(u.normal=f)}const h={a:s,b:a,c:o,normal:new P,materialIndex:0};if(kt.getNormal(Zs,$s,js,h.normal),u.face=h,u.faceIndex=s,Od){const f=new P;kt.getBarycoord(Sl,Zs,$s,js,f),u.barycoord=f}}return u}function cb(r){return r&&r.isMaterial?r.side:r}function dh(r,e,t,n,i,s,a){const o=n*3;let l=o+0,c=o+1,d=o+2;const{index:u,groups:h}=r;r.index&&(l=u.getX(l),c=u.getX(c),d=u.getX(d));const{position:f,normal:m,uv:x,uv1:g}=r.attributes;if(Array.isArray(e)){const p=n*3;for(let v=0,b=h.length;v=y&&pw&&(w=I),OT&&(T=O),q<_&&(_=q),q>A&&(A=q)}return l[h+0]!==b||l[h+1]!==y||l[h+2]!==_||l[h+3]!==w||l[h+4]!==T||l[h+5]!==A?(l[h+0]=b,l[h+1]=y,l[h+2]=_,l[h+3]=w,l[h+4]=T,l[h+5]=A,!0):!1}else{const p=h+8,v=a[h+6],b=p+f,y=v+f;let _=m,w=!1,T=!1;e?_||(w=e.has(b),T=e.has(y),_=!w&&!T):(w=!0,T=!0);const A=_||w,M=_||T;let S=!1;A&&(S=u(p,f,_));let E=!1;M&&(E=u(v,f,_));const I=S||E;if(I)for(let O=0;O<3;O++){const q=p+O,z=v+O,V=l[q],H=l[q+3],F=l[z],ie=l[z+3];l[h+O]=Vie?H:ie}return I}}}function ks(r,e,t,n,i){let s,a,o,l,c,d;const u=1/t.direction.x,h=1/t.direction.y,f=1/t.direction.z,m=t.origin.x,x=t.origin.y,g=t.origin.z;let p=e[r],v=e[r+3],b=e[r+1],y=e[r+3+1],_=e[r+2],w=e[r+3+2];return u>=0?(s=(p-m)*u,a=(v-m)*u):(s=(v-m)*u,a=(p-m)*u),h>=0?(o=(b-x)*h,l=(y-x)*h):(o=(y-x)*h,l=(b-x)*h),s>l||o>a||((o>s||isNaN(s))&&(s=o),(l=0?(c=(_-g)*f,d=(w-g)*f):(c=(w-g)*f,d=(_-g)*f),s>d||c>a)?!1:((c>s||s!==s)&&(s=c),(d=n)}function r7(r,e,t,n,i,s,a,o){const{geometry:l,_indirectBuffer:c}=r;for(let d=n,u=n+i;d=0;let x,g;m?(x=Cr(r),g=Rr(r,l)):(x=Rr(r,l),g=Cr(r));const v=ks(x,a,n,i,s)?bp(x,e,t,n,i,s):null;if(v){const _=v.point[h];if(m?_<=a[g+u]:_>=a[g+u+3])return v}const y=ks(g,a,n,i,s)?bp(g,e,t,n,i,s):null;return v&&y?v.distance<=y.distance?v:y:v||y||null}}const Vd=new wt,mo=new Lr,go=new Lr,Ml=new Oe,db=new Gn,Gd=new Gn;function c7(r,e,t,n){Lt.setBuffer(r._roots[e]);const i=yp(0,r,t,n);return Lt.clearBuffer(),i}function yp(r,e,t,n,i=null){const{float32Array:s,uint16Array:a,uint32Array:o}=Lt;let l=r*2;if(i===null&&(t.boundingBox||t.computeBoundingBox(),db.set(t.boundingBox.min,t.boundingBox.max,n),i=db),Jn(l,a)){const d=e.geometry,u=d.index,h=d.attributes.position,f=t.index,m=t.attributes.position,x=hr(r,o),g=Er(l,a);if(Ml.copy(n).invert(),t.boundsTree)return Zt(r,s,Gd),Gd.matrix.copy(Ml),Gd.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:v=>Gd.intersectsBox(v),intersectsTriangle:v=>{v.a.applyMatrix4(n),v.b.applyMatrix4(n),v.c.applyMatrix4(n),v.needsUpdate=!0;for(let b=x*3,y=(g+x)*3;bgf.distanceToBox(_),intersectsBounds:(_,w,T)=>T{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:A=>Tl.distanceToBox(A),intersectsBounds:(A,M,S)=>S{for(let S=A,E=A+M;Sw&&(w=q),zT&&(T=z),V<_&&(_=V),V>A&&(A=V)}}return l[h+0]!==b||l[h+1]!==y||l[h+2]!==_||l[h+3]!==w||l[h+4]!==T||l[h+5]!==A?(l[h+0]=b,l[h+1]=y,l[h+2]=_,l[h+3]=w,l[h+4]=T,l[h+5]=A,!0):!1}else{const p=h+8,v=a[h+6],b=p+f,y=v+f;let _=m,w=!1,T=!1;e?_||(w=e.has(b),T=e.has(y),_=!w&&!T):(w=!0,T=!0);const A=_||w,M=_||T;let S=!1;A&&(S=u(p,f,_));let E=!1;M&&(E=u(v,f,_));const I=S||E;if(I)for(let O=0;O<3;O++){const q=p+O,z=v+O,V=l[q],H=l[q+3],F=l[z],ie=l[z+3];l[h+O]=Vie?H:ie}return I}}}function g7(r,e,t,n,i,s,a){Lt.setBuffer(r._roots[e]),vp(0,r,t,n,i,s,a),Lt.clearBuffer()}function vp(r,e,t,n,i,s,a){const{float32Array:o,uint16Array:l,uint32Array:c}=Lt,d=r*2;if(Jn(d,l)){const h=hr(r,c),f=Er(d,l);r7(e,t,n,h,f,i,s,a)}else{const h=Cr(r);ks(h,o,n,s,a)&&vp(h,e,t,n,i,s,a);const f=Rr(r,c);ks(f,o,n,s,a)&&vp(f,e,t,n,i,s,a)}}const x7=["x","y","z"];function b7(r,e,t,n,i,s){Lt.setBuffer(r._roots[e]);const a=_p(0,r,t,n,i,s);return Lt.clearBuffer(),a}function _p(r,e,t,n,i,s){const{float32Array:a,uint16Array:o,uint32Array:l}=Lt;let c=r*2;if(Jn(c,o)){const u=hr(r,l),h=Er(c,o);return i7(e,t,n,u,h,i,s)}else{const u=u3(r,l),h=x7[u],m=n.direction[h]>=0;let x,g;m?(x=Cr(r),g=Rr(r,l)):(x=Rr(r,l),g=Cr(r));const v=ks(x,a,n,i,s)?_p(x,e,t,n,i,s):null;if(v){const _=v.point[h];if(m?_<=a[g+u]:_>=a[g+u+3])return v}const y=ks(g,a,n,i,s)?_p(g,e,t,n,i,s):null;return v&&y?v.distance<=y.distance?v:y:v||y||null}}const Wd=new wt,xo=new Lr,bo=new Lr,Al=new Oe,ub=new Gn,Xd=new Gn;function y7(r,e,t,n){Lt.setBuffer(r._roots[e]);const i=wp(0,r,t,n);return Lt.clearBuffer(),i}function wp(r,e,t,n,i=null){const{float32Array:s,uint16Array:a,uint32Array:o}=Lt;let l=r*2;if(i===null&&(t.boundingBox||t.computeBoundingBox(),ub.set(t.boundingBox.min,t.boundingBox.max,n),i=ub),Jn(l,a)){const d=e.geometry,u=d.index,h=d.attributes.position,f=t.index,m=t.attributes.position,x=hr(r,o),g=Er(l,a);if(Al.copy(n).invert(),t.boundsTree)return Zt(r,s,Xd),Xd.matrix.copy(Al),Xd.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:v=>Xd.intersectsBox(v),intersectsTriangle:v=>{v.a.applyMatrix4(n),v.b.applyMatrix4(n),v.c.applyMatrix4(n),v.needsUpdate=!0;for(let b=x,y=g+x;bxf.distanceToBox(_),intersectsBounds:(_,w,T)=>T{if(e.boundsTree){const T=e.boundsTree;return T.shapecast({boundsTraverseOrder:A=>kl.distanceToBox(A),intersectsBounds:(A,M,S)=>S{for(let S=A,E=A+M;Snew wt),yo=new wt,vo=new wt,bf=new wt,yf=new wt;let vf=!1;function A7(r,e,t,n){if(vf)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");vf=!0;const i=r._roots,s=e._roots;let a,o=0,l=0;const c=new Oe().copy(t).invert();for(let d=0,u=i.length;dl.slice()),index:a?a.array.slice():null,indirectBuffer:s?s.slice():null}:o={roots:i,index:a?a.array:null,indirectBuffer:s},o}static deserialize(e,t,n={}){n={setIndex:!0,indirect:!!e.indirectBuffer,...n};const{index:i,roots:s,indirectBuffer:a}=e,o=new qm(t,{...n,[hf]:!0});if(o._roots=s,o._indirectBuffer=a||null,n.setIndex){const l=t.getIndex();if(l===null){const c=new ft(e.index,1,!1);t.setIndex(c)}else l.array!==i&&(l.array.set(i),l.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(e,t={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(t=Object.assign({...k7,[hf]:!1},t),t.useSharedArrayBuffer&&!T7())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,t[hf]||(Gk(this,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new wt))),this.resolveTriangleIndex=t.indirect?n=>this._indirectBuffer[n]:n=>n}refit(e=null){return(this.indirect?m7:n7)(this,e)}traverse(e,t=0){const n=this._roots[t],i=new Uint32Array(n),s=new Uint16Array(n);a(0);function a(o,l=0){const c=o*2,d=s[c+15]===ch;if(d){const u=i[o+6],h=s[c+14];e(l,d,new Float32Array(n,o*4,6),u,h)}else{const u=o+Jl/4,h=i[o+6],f=i[o+7];e(l,d,new Float32Array(n,o*4,6),f)||(a(u,l+1),a(h,l+1))}}}raycast(e,t=Xr,n=0,i=1/0){const s=this._roots,a=[],o=this.indirect?g7:a7;for(let l=0,c=s.length;lu(h,f,m,x,g)?!0:n(h,f,this,o,m,x,t)}else a||(o?a=(u,h,f,m)=>n(u,h,this,o,f,m,t):a=(u,h,f)=>f);let l=!1,c=0;const d=this._roots;for(let u=0,h=d.length;u{const x=this.resolveTriangleIndex(m);nn(a,x*3,o,l)}:m=>{nn(a,m*3,o,l)},d=Ir.getPrimitive(),u=e.geometry.index,h=e.geometry.attributes.position,f=e.indirect?m=>{const x=e.resolveTriangleIndex(m);nn(d,x*3,u,h)}:m=>{nn(d,m*3,u,h)};if(s){const m=(x,g,p,v,b,y,_,w)=>{for(let T=p,A=p+v;TZd.intersectsBox(n),intersectsTriangle:n=>Zd.intersectsTriangle(n)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,n={},i={},s=0,a=1/0){return(this.indirect?M7:p7)(this,e,t,n,i,s,a)}closestPointToPoint(e,t={},n=0,i=1/0){return jk(this,e,t,n,i)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(n=>{Zt(0,new Float32Array(n),hb),e.union(hb)}),e}}const E7=` + +// A stack of uint32 indices can can store the indices for +// a perfectly balanced tree with a depth up to 31. Lower stack +// depth gets higher performance. +// +// However not all trees are balanced. Best value to set this to +// is the trees max depth. +#ifndef BVH_STACK_DEPTH +#define BVH_STACK_DEPTH 60 +#endif + +#ifndef INFINITY +#define INFINITY 1e20 +#endif + +// Utilities +uvec4 uTexelFetch1D( usampler2D tex, uint index ) { + + uint width = uint( textureSize( tex, 0 ).x ); + uvec2 uv; + uv.x = index % width; + uv.y = index / width; + + return texelFetch( tex, ivec2( uv ), 0 ); + +} + +ivec4 iTexelFetch1D( isampler2D tex, uint index ) { + + uint width = uint( textureSize( tex, 0 ).x ); + uvec2 uv; + uv.x = index % width; + uv.y = index / width; + + return texelFetch( tex, ivec2( uv ), 0 ); + +} + +vec4 texelFetch1D( sampler2D tex, uint index ) { + + uint width = uint( textureSize( tex, 0 ).x ); + uvec2 uv; + uv.x = index % width; + uv.y = index / width; + + return texelFetch( tex, ivec2( uv ), 0 ); + +} + +vec4 textureSampleBarycoord( sampler2D tex, vec3 barycoord, uvec3 faceIndices ) { + + return + barycoord.x * texelFetch1D( tex, faceIndices.x ) + + barycoord.y * texelFetch1D( tex, faceIndices.y ) + + barycoord.z * texelFetch1D( tex, faceIndices.z ); + +} + +void ndcToCameraRay( + vec2 coord, mat4 cameraWorld, mat4 invProjectionMatrix, + out vec3 rayOrigin, out vec3 rayDirection +) { + + // get camera look direction and near plane for camera clipping + vec4 lookDirection = cameraWorld * vec4( 0.0, 0.0, - 1.0, 0.0 ); + vec4 nearVector = invProjectionMatrix * vec4( 0.0, 0.0, - 1.0, 1.0 ); + float near = abs( nearVector.z / nearVector.w ); + + // get the camera direction and position from camera matrices + vec4 origin = cameraWorld * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec4 direction = invProjectionMatrix * vec4( coord, 0.5, 1.0 ); + direction /= direction.w; + direction = cameraWorld * direction - origin; + + // slide the origin along the ray until it sits at the near clip plane position + origin.xyz += direction.xyz * near / dot( direction, lookDirection ); + + rayOrigin = origin.xyz; + rayDirection = direction.xyz; + +} +`,C7=` + +#ifndef TRI_INTERSECT_EPSILON +#define TRI_INTERSECT_EPSILON 1e-5 +#endif + +// Raycasting +bool intersectsBounds( vec3 rayOrigin, vec3 rayDirection, vec3 boundsMin, vec3 boundsMax, out float dist ) { + + // https://www.reddit.com/r/opengl/comments/8ntzz5/fast_glsl_ray_box_intersection/ + // https://tavianator.com/2011/ray_box.html + vec3 invDir = 1.0 / rayDirection; + + // find intersection distances for each plane + vec3 tMinPlane = invDir * ( boundsMin - rayOrigin ); + vec3 tMaxPlane = invDir * ( boundsMax - rayOrigin ); + + // get the min and max distances from each intersection + vec3 tMinHit = min( tMaxPlane, tMinPlane ); + vec3 tMaxHit = max( tMaxPlane, tMinPlane ); + + // get the furthest hit distance + vec2 t = max( tMinHit.xx, tMinHit.yz ); + float t0 = max( t.x, t.y ); + + // get the minimum hit distance + t = min( tMaxHit.xx, tMaxHit.yz ); + float t1 = min( t.x, t.y ); + + // set distance to 0.0 if the ray starts inside the box + dist = max( t0, 0.0 ); + + return t1 >= dist; + +} + +bool intersectsTriangle( + vec3 rayOrigin, vec3 rayDirection, vec3 a, vec3 b, vec3 c, + out vec3 barycoord, out vec3 norm, out float dist, out float side +) { + + // https://stackoverflow.com/questions/42740765/intersection-between-line-and-triangle-in-3d + vec3 edge1 = b - a; + vec3 edge2 = c - a; + norm = cross( edge1, edge2 ); + + float det = - dot( rayDirection, norm ); + float invdet = 1.0 / det; + + vec3 AO = rayOrigin - a; + vec3 DAO = cross( AO, rayDirection ); + + vec4 uvt; + uvt.x = dot( edge2, DAO ) * invdet; + uvt.y = - dot( edge1, DAO ) * invdet; + uvt.z = dot( AO, norm ) * invdet; + uvt.w = 1.0 - uvt.x - uvt.y; + + // set the hit information + barycoord = uvt.wxy; // arranged in A, B, C order + dist = uvt.z; + side = sign( det ); + norm = side * normalize( norm ); + + // add an epsilon to avoid misses between triangles + uvt += vec4( TRI_INTERSECT_EPSILON ); + + return all( greaterThanEqual( uvt, vec4( 0.0 ) ) ); + +} + +bool intersectTriangles( + // geometry info and triangle range + sampler2D positionAttr, usampler2D indexAttr, uint offset, uint count, + + // ray + vec3 rayOrigin, vec3 rayDirection, + + // outputs + inout float minDistance, inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord, + inout float side, inout float dist +) { + + bool found = false; + vec3 localBarycoord, localNormal; + float localDist, localSide; + for ( uint i = offset, l = offset + count; i < l; i ++ ) { + + uvec3 indices = uTexelFetch1D( indexAttr, i ).xyz; + vec3 a = texelFetch1D( positionAttr, indices.x ).rgb; + vec3 b = texelFetch1D( positionAttr, indices.y ).rgb; + vec3 c = texelFetch1D( positionAttr, indices.z ).rgb; + + if ( + intersectsTriangle( rayOrigin, rayDirection, a, b, c, localBarycoord, localNormal, localDist, localSide ) + && localDist < minDistance + ) { + + found = true; + minDistance = localDist; + + faceIndices = uvec4( indices.xyz, i ); + faceNormal = localNormal; + + side = localSide; + barycoord = localBarycoord; + dist = localDist; + + } + + } + + return found; + +} + +bool intersectsBVHNodeBounds( vec3 rayOrigin, vec3 rayDirection, sampler2D bvhBounds, uint currNodeIndex, out float dist ) { + + uint cni2 = currNodeIndex * 2u; + vec3 boundsMin = texelFetch1D( bvhBounds, cni2 ).xyz; + vec3 boundsMax = texelFetch1D( bvhBounds, cni2 + 1u ).xyz; + return intersectsBounds( rayOrigin, rayDirection, boundsMin, boundsMax, dist ); + +} + +// use a macro to hide the fact that we need to expand the struct into separate fields +#define bvhIntersectFirstHit( bvh, rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist ) _bvhIntersectFirstHit( bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents, rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist ) + +bool _bvhIntersectFirstHit( + // bvh info + sampler2D bvh_position, usampler2D bvh_index, sampler2D bvh_bvhBounds, usampler2D bvh_bvhContents, + + // ray + vec3 rayOrigin, vec3 rayDirection, + + // output variables split into separate variables due to output precision + inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord, + inout float side, inout float dist +) { + + // stack needs to be twice as long as the deepest tree we expect because + // we push both the left and right child onto the stack every traversal + int ptr = 0; + uint stack[ BVH_STACK_DEPTH ]; + stack[ 0 ] = 0u; + + float triangleDistance = INFINITY; + bool found = false; + while ( ptr > - 1 && ptr < BVH_STACK_DEPTH ) { + + uint currNodeIndex = stack[ ptr ]; + ptr --; + + // check if we intersect the current bounds + float boundsHitDistance; + if ( + ! intersectsBVHNodeBounds( rayOrigin, rayDirection, bvh_bvhBounds, currNodeIndex, boundsHitDistance ) + || boundsHitDistance > triangleDistance + ) { + + continue; + + } + + uvec2 boundsInfo = uTexelFetch1D( bvh_bvhContents, currNodeIndex ).xy; + bool isLeaf = bool( boundsInfo.x & 0xffff0000u ); + + if ( isLeaf ) { + + uint count = boundsInfo.x & 0x0000ffffu; + uint offset = boundsInfo.y; + + found = intersectTriangles( + bvh_position, bvh_index, offset, count, + rayOrigin, rayDirection, triangleDistance, + faceIndices, faceNormal, barycoord, side, dist + ) || found; + + } else { + + uint leftIndex = currNodeIndex + 1u; + uint splitAxis = boundsInfo.x & 0x0000ffffu; + uint rightIndex = boundsInfo.y; + + bool leftToRight = rayDirection[ splitAxis ] >= 0.0; + uint c1 = leftToRight ? leftIndex : rightIndex; + uint c2 = leftToRight ? rightIndex : leftIndex; + + // set c2 in the stack so we traverse it later. We need to keep track of a pointer in + // the stack while we traverse. The second pointer added is the one that will be + // traversed first + ptr ++; + stack[ ptr ] = c2; + + ptr ++; + stack[ ptr ] = c1; + + } + + } + + return found; + +} +`,R7=` +struct BVH { + + usampler2D index; + sampler2D position; + + sampler2D bvhBounds; + usampler2D bvhContents; + +}; +`,I7=R7,P7=` + ${E7} + ${C7} +`,p3=1e-6,D7=p3*.5,m3=Math.pow(10,-Math.log10(p3)),L7=D7*m3;function si(r){return~~(r*m3+L7)}function N7(r){return`${si(r.x)},${si(r.y)}`}function fb(r){return`${si(r.x)},${si(r.y)},${si(r.z)}`}function U7(r){return`${si(r.x)},${si(r.y)},${si(r.z)},${si(r.w)}`}function F7(r,e,t){t.direction.subVectors(e,r).normalize();const n=r.dot(t.direction);return t.origin.copy(r).addScaledVector(t.direction,-n),t}function g3(){return typeof SharedArrayBuffer<"u"}function O7(r){if(r.buffer instanceof SharedArrayBuffer)return r;const e=r.constructor,t=r.buffer,n=new SharedArrayBuffer(t.byteLength),i=new Uint8Array(t);return new Uint8Array(n).set(i,0),new e(n)}function q7(r,e=ArrayBuffer){return r>65535?new Uint32Array(new e(4*r)):new Uint16Array(new e(2*r))}function B7(r,e){if(!r.index){const t=r.attributes.position.count,n=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=q7(t,n);r.setIndex(new ft(i,1));for(let s=0;sl.end)){if(l.end=d.end)s(d.end,l.end)||r.splice(o+1,0,{start:d.end,end:l.end,index:l.index}),l.end=d.start,d.start=0,d.end=0;else if(l.start>=d.start&&l.end<=d.end)s(l.end,d.end)||e.splice(c+1,0,{start:l.end,end:d.end,index:d.index}),d.end=l.start,l.start=0,l.end=0;else if(l.start<=d.start&&l.end<=d.end){const u=l.end;l.end=d.start,d.start=u}else if(l.start>=d.start&&l.end>=d.end){const u=d.end;d.end=l.start,l.start=u}else throw new Error}if(t.has(l.index)||t.set(l.index,[]),t.has(d.index)||t.set(d.index,[]),t.get(l.index).push(d.index),t.get(d.index).push(l.index),a(d)&&(e.splice(c,1),c--),a(l)){r.splice(o,1),o--;break}}}i(r),i(e);function i(o){for(let l=0;lgb;return l.direction.angleTo(c.direction)>xb||d}function o(l,c){const d=l.origin.distanceTo(c.origin),u=l.direction.angleTo(c.direction);return d/gb+u/xb}}}const _f=new P,wf=new P,$d=new $r;function Z7(r,e,t){const n=r.attributes,i=r.index,s=n.position,a=new Map,o=new Map,l=Array.from(e),c=new Y7;for(let d=0,u=l.length;dy&&([b,y]=[y,b]),$d.direction.dot(v.direction)<0?p.reverse.push({start:b,end:y,index:h}):p.forward.push({start:b,end:y,index:h})}return o.forEach(({forward:d,reverse:u},h)=>{X7(d,u,a,t),d.length===0&&u.length===0&&o.delete(h)}),{disjointConnectivityMap:a,fragmentMap:o}}const $7=new re,Sf=new P,j7=new ot,Mf=["","",""];class K7{constructor(e=null){this.data=null,this.disjointConnections=null,this.unmatchedDisjointEdges=null,this.unmatchedEdges=-1,this.matchedEdges=-1,this.useDrawRange=!0,this.useAllAttributes=!1,this.matchDisjointEdges=!1,this.degenerateEpsilon=1e-8,e&&this.updateFrom(e)}getSiblingTriangleIndex(e,t){const n=this.data[e*3+t];return n===-1?-1:~~(n/3)}getSiblingEdgeIndex(e,t){const n=this.data[e*3+t];return n===-1?-1:n%3}getDisjointSiblingTriangleIndices(e,t){const n=e*3+t,i=this.disjointConnections.get(n);return i?i.map(s=>~~(s/3)):[]}getDisjointSiblingEdgeIndices(e,t){const n=e*3+t,i=this.disjointConnections.get(n);return i?i.map(s=>s%3):[]}isFullyConnected(){return this.unmatchedEdges===0}updateFrom(e){const{useAllAttributes:t,useDrawRange:n,matchDisjointEdges:i,degenerateEpsilon:s}=this,a=t?b:v,o=new Map,{attributes:l}=e,c=t?Object.keys(l):null,d=e.index,u=l.position;let h=Bm(e);const f=h;let m=0;n&&(m=e.drawRange.start,e.drawRange.count!==1/0&&(h=~~(e.drawRange.count/3)));let x=this.data;(!x||x.length<3*f)&&(x=new Int32Array(3*f)),x.fill(-1);let g=0,p=new Set;for(let y=m,_=h*3+m;y<_;y+=3){const w=y;for(let T=0;T<3;T++){let A=w+T;d&&(A=d.getX(A)),Mf[T]=a(A)}for(let T=0;T<3;T++){const A=(T+1)%3,M=Mf[T],S=Mf[A],E=`${S}_${M}`;if(o.has(E)){const I=w+T,O=o.get(E);x[I]=O,x[O]=I,o.delete(E),g+=2,p.delete(O)}else{const I=`${M}_${S}`,O=w+T;o.set(I,O),p.add(O)}}}if(i){const{fragmentMap:y,disjointConnectivityMap:_}=Z7(e,p,s);p.clear(),y.forEach(({forward:w,reverse:T})=>{w.forEach(({index:A})=>p.add(A)),T.forEach(({index:A})=>p.add(A))}),this.unmatchedDisjointEdges=y,this.disjointConnections=_,g=h*3-p.size}this.matchedEdges=g,this.unmatchedEdges=p.size,this.data=x;function v(y){return Sf.fromBufferAttribute(u,y),fb(Sf)}function b(y){let _="";for(let w=0,T=c.length;w=this._pool.length&&this._pool.push(new kt),this._pool[this._index++]}clear(){this._index=0}reset(){this._pool.length=0,this._index=0}}class tE{constructor(){this.trianglePool=new eE,this.triangles=[],this.normal=new P,this.coplanarTriangleUsed=!1}initialize(e){this.reset();const{triangles:t,trianglePool:n,normal:i}=this;if(Array.isArray(e))for(let s=0,a=e.length;sAf)throw new Error("Triangle Splitter: Cannot initialize with triangles that have different normals.");const l=n.getTriangle();l.copy(o),t.push(l)}else{e.getNormal(i);const s=n.getTriangle();s.copy(e),t.push(s)}}splitByTriangle(e){const{normal:t,triangles:n}=this;if(e.getNormal(kf).normalize(),Math.abs(1-Math.abs(kf.dot(t)))0?m.push(p):x.push(p),Math.abs(b)El)if(h!==-1){h=(h+1)%3;let p=0;p===h&&(p=(p+1)%3);let v=p+1;v===h&&(v=(v+1)%3);const b=i.getTriangle();b.a.copy(g[v]),b.b.copy(Kt.end),b.c.copy(Kt.start),ps(b)||n.push(b),o.a.copy(g[p]),o.b.copy(Kt.start),o.c.copy(Kt.end),ps(o)&&(n.splice(s,1),s--,a--)}else{const p=m.length>=2?x[0]:m[0];if(p===0){let w=Kt.start;Kt.start=Kt.end,Kt.end=w}const v=(p+1)%3,b=(p+2)%3,y=i.getTriangle(),_=i.getTriangle();g[v].distanceToSquared(Kt.start)t.length&&(this.expand(),t=this.array);for(let i=0,s=e.length;i=t.length;){const i={};t.push(i);for(const s in n){const a=n[s],o=new _b(a.type);o.itemSize=a.itemSize,o.normalized=a.normalized,i[s]=o}}return t[e]}getGroupAttrArray(e,t=0){const{groupAttributes:n}=this;if(!n[0][e])throw new Error(`TypedAttributeData: Attribute with "${e}" has not been initialized`);return this.getGroupAttrSet(t)[e]}initializeArray(e,t,n,i){const{groupAttributes:s}=this,o=s[0][e];if(o){if(o.type!==t)for(let l=0,c=s.length;l{for(const n in t)t[n].clear()})}delete(e){this.groupAttributes.forEach(t=>{delete t[e]})}reset(){this.groupAttributes=[],this.groupCount=0}}class wb{constructor(){this.intersectionSet={},this.ids=[]}add(e,t){const{intersectionSet:n,ids:i}=this;n[e]||(n[e]=[],i.push(e)),n[e].push(t)}}const Mp=0,Tp=1,iE=2,x3=3,sE=4,b3=5,y3=6,wr=new $r,Sb=new Oe,Nn=new kt,Ti=new P,Mb=new ot,Tb=new ot,Ab=new ot,Cf=new ot,Kd=new ot,Jd=new ot,kb=new rr,Rf=new P,If=1e-8,aE=1e-15,ia=-1,sa=1,gu=-2,xu=2,ec=0,Ks=1,zm=2,oE=1e-14;let bu=null;function Eb(r){bu=r}function v3(r,e){r.getMidpoint(wr.origin),r.getNormal(wr.direction);const t=e.raycastFirst(wr,Kn);return!!(t&&wr.direction.dot(t.face.normal)>0)?ia:sa}function lE(r,e){function t(){return Math.random()-.5}r.getNormal(Rf),wr.direction.copy(Rf),r.getMidpoint(wr.origin);const n=3;let i=0,s=1/0;for(let a=0;a0)&&i++,o!==null&&(s=Math.min(s,o.distance)),s<=aE)return o.face.normal.dot(Rf)>0?xu:gu;if(i/n>.5||(a-i+1)/n>.5)break}return i/n>.5?ia:sa}function cE(r,e){const t=new wb,n=new wb;return Sb.copy(r.matrixWorld).invert().multiply(e.matrixWorld),r.geometry.boundsTree.bvhcast(e.geometry.boundsTree,Sb,{intersectsTriangles(i,s,a,o){if(!ps(i)&&!ps(s)){let l=i.intersectsTriangle(s,kb,!0);if(!l){const c=i.plane,d=s.plane,u=c.normal,h=d.normal;u.dot(h)===1&&Math.abs(c.constant-d.constant){s.push(c.x),i>1&&s.push(c.y),i>2&&s.push(c.z),i>3&&s.push(c.w)};Cf.set(0,0,0,0).addScaledVector(r,n.a.x).addScaledVector(e,n.a.y).addScaledVector(t,n.a.z),Kd.set(0,0,0,0).addScaledVector(r,n.b.x).addScaledVector(e,n.b.y).addScaledVector(t,n.b.z),Jd.set(0,0,0,0).addScaledVector(r,n.c.x).addScaledVector(e,n.c.y).addScaledVector(t,n.c.z),o&&(Cf.normalize(),Kd.normalize(),Jd.normalize()),l(Cf),a?(l(Jd),l(Kd)):(l(Kd),l(Jd))}function Df(r,e,t,n,i,s=!1){for(const a in i){const o=e[a],l=i[a];if(!(a in e))throw new Error(`CSG Operations: Attribute ${a} no available on geometry.`);const c=o.itemSize;a==="position"?(Ti.fromBufferAttribute(o,r).applyMatrix4(t),l.push(Ti.x,Ti.y,Ti.z)):a==="normal"?(Ti.fromBufferAttribute(o,r).applyNormalMatrix(n),s&&Ti.multiplyScalar(-1),l.push(Ti.x,Ti.y,Ti.z)):(l.push(o.getX(r)),c>1&&l.push(o.getY(r)),c>2&&l.push(o.getZ(r)),c>3&&l.push(o.getW(r)))}}class hE{constructor(e){this.triangle=new kt().copy(e),this.intersects={}}addTriangle(e,t){this.intersects[e]=new kt().copy(t)}getIntersectArray(){const e=[],{intersects:t}=this;for(const n in t)e.push(t[n]);return e}}class Cb{constructor(){this.data={}}addTriangleIntersection(e,t,n,i){const{data:s}=this;s[e]||(s[e]=new hE(t)),s[e].addTriangle(n,i)}getTrianglesAsArray(e=null){const{data:t}=this,n=[];if(e!==null)e in t&&n.push(t[e].triangle);else for(const i in t)n.push(t[i].triangle);return n}getTriangleIndices(){return Object.keys(this.data).map(e=>parseInt(e))}getIntersectionIndices(e){const{data:t}=this;return t[e]?Object.keys(t[e].intersects).map(n=>parseInt(n)):[]}getIntersectionsAsArray(e=null,t=null){const{data:n}=this,i=new Set,s=[],a=o=>{if(n[o])if(t!==null)n[o].intersects[t]&&s.push(n[o].intersects[t]);else{const l=n[o].intersects;for(const c in l)i.has(c)||(i.add(c),s.push(l[c]))}};if(e!==null)a(e);else for(const o in n)a(o);return s}reset(){this.data={}}}class fE{constructor(){this.enabled=!1,this.triangleIntersectsA=new Cb,this.triangleIntersectsB=new Cb,this.intersectionEdges=[]}addIntersectingTriangles(e,t,n,i){const{triangleIntersectsA:s,triangleIntersectsB:a}=this;s.addTriangleIntersection(e,t,n,i),a.addTriangleIntersection(n,i,e,t)}addEdge(e){this.intersectionEdges.push(e.clone())}reset(){this.triangleIntersectsA.reset(),this.triangleIntersectsB.reset(),this.intersectionEdges=[]}init(){this.enabled&&(this.reset(),Eb(this))}complete(){this.enabled&&Eb(null)}}const ys=new Oe,b0=new Je,Js=new kt,Qd=new kt,ls=new kt,eu=new kt,Vr=[],ya=[];function pE(r){for(const e of r)return e}function mE(r,e,t,n,i,s={}){const{useGroups:a=!0}=s,{aIntersections:o,bIntersections:l}=cE(r,e),c=[];let d=null,u;return u=a?0:-1,Rb(r,e,o,t,!1,n,i,u),Ib(r,e,o,t,!1,i,u),t.findIndex(f=>f!==y3&&f!==b3)!==-1&&(u=a?r.geometry.groups.length||1:-1,Rb(e,r,l,t,!0,n,i,u),Ib(e,r,l,t,!0,i,u)),Vr.length=0,ya.length=0,{groups:c,materials:d}}function Rb(r,e,t,n,i,s,a,o=0){const l=r.matrixWorld.determinant()<0;ys.copy(e.matrixWorld).invert().multiply(r.matrixWorld),b0.getNormalMatrix(r.matrixWorld).multiplyScalar(l?-1:1);const c=r.geometry.groupIndices,d=r.geometry.index,u=r.geometry.attributes.position,h=e.geometry.boundsTree,f=e.geometry.index,m=e.geometry.attributes.position,x=t.ids,g=t.intersectionSet;for(let p=0,v=x.length;p0;){const p=pE(x);x.delete(p),f.push(p);const v=3*p,b=d.getX(v+0),y=d.getX(v+1),_=d.getX(v+2);ls.a.fromBufferAttribute(h,b).applyMatrix4(ys),ls.b.fromBufferAttribute(h,y).applyMatrix4(ys),ls.c.fromBufferAttribute(h,_).applyMatrix4(ys);const w=v3(ls,l);ya.length=0,Vr.length=0;for(let T=0,A=n.length;T0;){const T=f.pop();for(let A=0;A<3;A++){const M=m.getSiblingTriangleIndex(T,A);M!==-1&&x.has(M)&&(f.push(M),x.delete(M))}if(Vr.length!==0){const A=3*T,M=d.getX(A+0),S=d.getX(A+1),E=d.getX(A+2),I=a===-1?0:c[T]+a;if(ls.a.fromBufferAttribute(h,M),ls.b.fromBufferAttribute(h,S),ls.c.fromBufferAttribute(h,E),!ps(ls))for(let O=0,q=Vr.length;O{t[n.materialIndex]=e})),t}class yE{constructor(){this.triangleSplitter=new tE,this.attributeData=[],this.attributes=["position","uv","normal"],this.useGroups=!0,this.consolidateGroups=!0,this.debug=new fE}getGroupRanges(e){return!this.useGroups||e.groups.length===0?[{start:0,count:1/0,materialIndex:0}]:e.groups.map(t=>({...t}))}evaluate(e,t,n,i=new Sp){let s=!0;if(Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i],s=!1),i.length!==n.length)throw new Error("Evaluator: operations and target array passed as different sizes.");e.prepareGeometry(),t.prepareGeometry();const{triangleSplitter:a,attributeData:o,attributes:l,useGroups:c,consolidateGroups:d,debug:u}=this;for(;o.length{xE(e.geometry,p.geometry,o[v],l)}),u.init(),mE(e,t,n,a,o,{useGroups:c}),u.complete();const h=this.getGroupRanges(e.geometry),f=Pb(h,e.material),m=this.getGroupRanges(t.geometry),x=Pb(m,t.material);m.forEach(p=>p.materialIndex+=f.length);let g=[...h,...m].map((p,v)=>({...p,index:v}));if(c){const p=[...f,...x];d&&(g=g.map(b=>{const y=p[b.materialIndex];return b.materialIndex=p.indexOf(y),b}).sort((b,y)=>b.materialIndex-y.materialIndex));const v=[];for(let b=0,y=p.length;b{b.material=v})}else g=[{start:0,count:1/0,index:0,materialIndex:0}],i.forEach(p=>{p.material=f[0]});return i.forEach((p,v)=>{const b=p.geometry;bE(b,o[v],g),d&&gE(b.groups)}),s?i:i[0]}evaluateHierarchy(e,t=new Sp){e.updateMatrixWorld(!0);const n=(s,a)=>{const o=s.children;for(let l=0,c=o.length;l{const a=s.children;let o=!1;for(let c=0,d=a.length;c{c?c=this.evaluate(c,d,d.operation):c=this.evaluate(s,d,d.operation)}),s._cachedGeometry=c.geometry,s._cachedMaterials=c.material,!0}else return o||l};return i(e),t.geometry=e._cachedGeometry,t.material=e._cachedMaterials,t}reset(){this.triangleSplitter.reset()}}const vE=r=>{if(r.length===0)return 0;let e=r[0];for(const t of r)eMath.max(Math.min(r,t),e),vr=r=>Math.round(r*100)/100,Db=r=>({type:"straight",length:r}),Lb=(r,e)=>({type:"curve",radius:r,angle:e});class R{static evaluator=new yE;static defaultFont=void 0;static getDefaultFont(){if(!this.defaultFont){const e=new wk;this.defaultFont=e.parse(vk)}return this.defaultFont}static degreesToRadians=e=>e*(Math.PI/180);static generateWedgePoints(e,t){const n=e*2,i=360-t;if(i<=0)return[];const s=this.degreesToRadians(t),a=this.degreesToRadians(360),o=Math.max(8,Math.ceil(i/15)),l=[[0,0]];for(let c=0;c<=o;c++){const d=c/o,u=s+(a-s)*d,h=Math.cos(u)*n,f=Math.sin(u)*n;l[l.length]=[h,f]}return l[l.length]=[0,0],l}brush;_color;_isNegative;constructor(e,t,n=!1){this.brush=e,this._color=t,this._isNegative=n,this.brush.updateMatrixWorld()}get color(){return this._color}get isNegative(){return this._isNegative}clone=()=>new R(this.brush.clone(!0),this._color,this._isNegative);static geometryToBrush(e){const t=new Sp(e.translate(0,0,0));return t.updateMatrixWorld(),t}static cube=(e,t,n,i)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(n))throw new Error(`Cube dimensions must be finite (got width: ${e}, height: ${t}, depth: ${n})`);if(e<=0||t<=0||n<=0)throw new Error(`Cube dimensions must be positive (got width: ${e}, height: ${t}, depth: ${n})`);const s=i?.color??"gray";return new R(this.geometryToBrush(new ui(e,t,n)),s).normalize()};static roundedBox=(e,t,n,i)=>{if(!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(n))throw new Error(`RoundedBox dimensions must be finite (got width: ${e}, height: ${t}, depth: ${n})`);if(e<=0||t<=0||n<=0)throw new Error(`RoundedBox dimensions must be positive (got width: ${e}, height: ${t}, depth: ${n})`);const s=i?.color??"gray",a=i?.radius??Math.min(e,t,n)*.1,o=i?.segments??2,l=Math.min(e,t,n)/2;if(a>l)throw new Error(`RoundedBox radius (${a}) cannot exceed half of smallest dimension (${l})`);if(a<0)throw new Error(`RoundedBox radius must be non-negative (got ${a})`);return new R(this.geometryToBrush(new Um(e,t,n,o,a)),s).normalize()};static cylinder=(e,t,n)=>{if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error(`Cylinder dimensions must be finite (got radius: ${e}, height: ${t})`);if(e<=0||t<=0)throw new Error(`Cylinder dimensions must be positive (got radius: ${e}, height: ${t})`);if(n?.topRadius!==void 0){if(!Number.isFinite(n.topRadius))throw new Error(`Cylinder topRadius must be finite (got ${n.topRadius})`);if(n.topRadius<0)throw new Error(`Cylinder topRadius must be non-negative (got ${n.topRadius})`)}const i=n?.color??"gray",s=n?.angle??360,a=new R(this.geometryToBrush(new Ca(n?.topRadius??e,e,t,tu(e*8,16,48),1,!1)),i).normalize();if(s>=360)return a;const o=this.generateWedgePoints(e,s);if(o.length===0)return a;const l=this.profilePrismFromPoints(t*2,o,{color:i});return R.SUBTRACT(a,l)};static sphere=(e,t)=>{if(!Number.isFinite(e))throw new Error(`Sphere radius must be finite (got ${e})`);if(e<=0)throw new Error(`Sphere radius must be positive (got ${e})`);const n=t?.color??"gray",i=t?.angle??360,s=new R(this.geometryToBrush(new Qo(e,t?.segments??tu(e*8,16,48),t?.segments??tu(e*8,16,48))),n).normalize();if(i>=360)return s;const a=this.generateWedgePoints(e,i);if(a.length===0)return s;const o=this.profilePrismFromPoints(e*4,a,{color:n});return R.SUBTRACT(s,o)};static cone=(e,t,n)=>{if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error(`Cone dimensions must be finite (got radius: ${e}, height: ${t})`);if(e<=0||t<=0)throw new Error(`Cone dimensions must be positive (got radius: ${e}, height: ${t})`);const i=n?.color??"gray",s=n?.angle??360,a=new R(this.geometryToBrush(new Ko(e,t,n?.segments??tu(e*8,16,48),1,!1)),i).normalize();if(s>=360)return a;const o=this.generateWedgePoints(e,s);if(o.length===0)return a;const l=this.profilePrismFromPoints(t*2,o,{color:i});return R.SUBTRACT(a,l)};static prism=(e,t,n,i)=>{if(e<3)throw new Error(`Prism must have at least 3 sides (got ${e})`);if(!Number.isInteger(e))throw new Error(`Prism sides must be an integer (got ${e})`);if(!Number.isFinite(t)||!Number.isFinite(n))throw new Error(`Prism dimensions must be finite (got radius: ${t}, height: ${n})`);if(t<=0||n<=0)throw new Error(`Prism dimensions must be positive (got radius: ${t}, height: ${n})`);if(i?.topRadius!==void 0){if(!Number.isFinite(i.topRadius))throw new Error(`Prism topRadius must be finite (got ${i.topRadius})`);if(i.topRadius<0)throw new Error(`Prism topRadius must be non-negative (got ${i.topRadius})`)}const s=i?.color??"gray",a=i?.angle??360,o=new R(this.geometryToBrush(new Ca(i?.topRadius??t,t,n,e,1,!1)),s).normalize();if(a>=360)return o;const l=this.generateWedgePoints(t,a);if(l.length===0)return o;const c=this.profilePrismFromPoints(n*2,l,{color:s});return R.SUBTRACT(o,c)};static trianglePrism=(e,t,n)=>this.prism(3,e,t,n);static text=(e,t)=>{if(!e||e.length===0)throw new Error("Text cannot be empty");const n=t?.color??"gray",i=t?.size??10,s=t?.height??2,a=t?.curveSegments??12,o=t?.bevelEnabled??!1,l=this.getDefaultFont(),c=new _k(e,{font:l,size:i,depth:s,curveSegments:a,bevelEnabled:o});return new R(this.geometryToBrush(c),n).normalize().center({x:!0,z:!0}).align("bottom")};static fromSTL=(e,t)=>{const n=t?.color??"gray";let s=new Ak().parse(e);if(!s.attributes.position||s.attributes.position.count===0)throw new Error("Failed to parse STL data - file may be corrupted or invalid");if(s.index&&(s=s.toNonIndexed()),s.attributes.normal||s.computeVertexNormals(),!s.attributes.uv){const o=s.attributes.position.count,l=new Float32Array(o*2);for(let c=0;c{const i=n?.color??"gray",s=``,o=new g0().parse(s);if(o.paths.length===0)throw new Error("No paths found in SVG data");const l=g0.createShapes(o.paths[0]);if(l.length===0)throw new Error("No valid shapes extracted from SVG path");const c=new Ia(l[0],{depth:t,bevelEnabled:!1,curveSegments:12,steps:1});if(!c.attributes.position||c.attributes.position.count===0)throw new Error("Failed to create valid geometry from SVG path - check path syntax");return c.attributes.normal||c.computeVertexNormals(),c.translate(0,0,-t/2),new R(this.geometryToBrush(c),i).normalize().rotate({x:90}).scale({z:-1})};static profilePrism=(e,t,n)=>{const i=n?.color??"gray",s=new oi;t(s);const a=new Ia(s,{depth:e,bevelEnabled:!1,curveSegments:12,steps:1});return a.translate(0,0,-e/2),new R(this.geometryToBrush(a),i).normalize().rotate({x:90})};static profilePrismFromPoints=(e,t,n)=>{if(t.length<3)throw new Error("profilePrismFromPoints requires at least 3 points");return this.profilePrism(e,i=>{const[s,a]=t[0];i.moveTo(s,a);for(let o=1;o{if(t.length===0)throw new Error("profilePrismFromPath requires at least one segment");for(const[i,s]of t.entries())if(s.type==="straight"){if(s.length<=0||!Number.isFinite(s.length))throw new Error(`Invalid straight segment at index ${i}: length must be positive and finite (got ${s.length})`)}else if(s.type==="curve"){if(s.radius<0||!Number.isFinite(s.radius))throw new Error(`Invalid curve segment at index ${i}: radius must be non-negative and finite (got ${s.radius})`);if(!Number.isFinite(s.angle))throw new TypeError(`Invalid curve segment at index ${i}: angle must be finite (got ${s.angle})`)}return this.profilePrism(e,i=>{let s=0,a=0,o=0;i.moveTo(s,a);for(const l of t)if(l.type==="straight"){const c=s+l.length*Math.cos(o),d=a+l.length*Math.sin(o);i.lineTo(c,d),s=c,a=d}else if(l.type==="curve"){const{radius:c,angle:d}=l,u=this.degreesToRadians(d);if(c===0){o-=u;continue}const h=d>=0?1:-1,f=s+c*Math.sin(o)*h,m=a-c*Math.cos(o)*h,x=Math.atan2(a-m,s-f),g=x-u,p=d>=0;i.absarc(f,m,Math.abs(c),x,g,p),s=f+Math.abs(c)*Math.cos(g),a=m+Math.abs(c)*Math.sin(g),o-=u}i.lineTo(0,0)},n)};static revolutionSolid=(e,t)=>{const n=t?.angle??360,i=t?.color??"gray",s=new oi;e(s);const a=s.getPoints(),o=Math.max(8,Math.ceil(360/15)),l=new R(this.geometryToBrush(new Lc(a,o)),i).normalize();if(n>=360)return l;let c=0,d=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(const p of a)c=Math.max(c,Math.abs(p.x)),d=Math.min(d,p.y),u=Math.max(u,p.y);const h=u-d,f=(d+u)/2,m=this.generateWedgePoints(c,n);if(m.length===0)return l;const x=Math.max(h*2,c*4),g=this.profilePrismFromPoints(x,m,{color:i}).move({y:f});return R.SUBTRACT(l,g)};static revolutionSolidFromPoints=(e,t)=>{if(e.length<2)throw new Error("revolutionSolidFromPoints requires at least 2 points");const n=t?.angle??360,i=t?.color??"gray";return this.revolutionSolid(s=>{const[a,o]=e[0];s.moveTo(a,o);for(let l=1;l{if(e.length===0)throw new Error("revolutionSolidFromPath requires at least one segment");const n=t?.angle??360,i=t?.color??"gray";for(const[s,a]of e.entries())if(a.type==="straight"){if(a.length<=0||!Number.isFinite(a.length))throw new Error(`Invalid straight segment at index ${s}: length must be positive and finite (got ${a.length})`)}else if(a.type==="curve"){if(a.radius<0||!Number.isFinite(a.radius))throw new Error(`Invalid curve segment at index ${s}: radius must be non-negative and finite (got ${a.radius})`);if(!Number.isFinite(a.angle))throw new TypeError(`Invalid curve segment at index ${s}: angle must be finite (got ${a.angle})`)}return this.revolutionSolid(s=>{let a=0,o=0,l=0;s.moveTo(a,o);for(const c of e)if(c.type==="straight"){const d=a+c.length*Math.cos(l),u=o+c.length*Math.sin(l);s.lineTo(d,u),a=d,o=u}else if(c.type==="curve"){const{radius:d,angle:u}=c,h=this.degreesToRadians(u);if(d===0){l-=h;continue}const f=u>=0?1:-1,m=a+d*Math.sin(l)*f,x=o-d*Math.cos(l)*f,g=Math.atan2(o-x,a-m),p=g-h,v=u>=0;s.absarc(m,x,Math.abs(d),g,p,v),a=m+Math.abs(d)*Math.cos(p),o=x+Math.abs(d)*Math.sin(p),l-=h}},{angle:n,color:i})};at(e,t,n){if(!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(n))throw new TypeError(`Position coordinates must be finite (got x: ${e}, y: ${t}, z: ${n})`);return this.brush.position.set(e,t,n),this.brush.updateMatrixWorld(),this}move(e){return e.x!==void 0&&!Number.isFinite(e.x)&&(e.x=0),e.y!==void 0&&!Number.isFinite(e.y)&&(e.y=0),e.z!==void 0&&!Number.isFinite(e.z)&&(e.z=0),e.x!==void 0&&(this.brush.position.x+=e.x),e.y!==void 0&&(this.brush.position.y+=e.y),e.z!==void 0&&(this.brush.position.z+=e.z),this.brush.updateMatrixWorld(),this}angleToRadian=e=>e*(Math.PI/180);rotate(e){const t=[{value:e.x,name:"x"},{value:e.y,name:"y"},{value:e.z,name:"z"}].filter(n=>n.value!==void 0);for(const n of t)if(!Number.isFinite(n.value))throw new TypeError(`Rotation angle '${n.name}' must be finite (got ${n.value})`);return e.x!==void 0&&(this.brush.rotation.x+=this.angleToRadian(e.x)),e.y!==void 0&&(this.brush.rotation.y+=this.angleToRadian(e.y)),e.z!==void 0&&(this.brush.rotation.z+=this.angleToRadian(e.z)),this.brush.updateMatrixWorld(),this}scale(e){const t=[{value:e.all,name:"all"},{value:e.x,name:"x"},{value:e.y,name:"y"},{value:e.z,name:"z"}].filter(n=>n.value!==void 0);for(const n of t){if(!Number.isFinite(n.value))throw new TypeError(`Scale factor '${n.name}' must be finite (got ${n.value})`);if(n.value===0)throw new Error(`Scale factor '${n.name}' cannot be zero (creates degenerate geometry)`)}return e.all!==void 0&&(this.brush.scale.x*=e.all,this.brush.scale.y*=e.all,this.brush.scale.z*=e.all),e.x!==void 0&&(this.brush.scale.x*=e.x),e.y!==void 0&&(this.brush.scale.y*=e.y),e.z!==void 0&&(this.brush.scale.z*=e.z),this.brush.updateMatrixWorld(),this}center(e){this.brush.geometry.applyMatrix4(this.brush.matrix),this.brush.position.set(0,0,0),this.brush.rotation.set(0,0,0),this.brush.scale.set(1,1,1),this.brush.updateMatrixWorld();const t=this.getBounds(),n=e?.x??e===void 0,i=e?.y??e===void 0,s=e?.z??e===void 0,a=n?-t.center.x:0,o=i?-t.center.y:0,l=s?-t.center.z:0;return this.brush.geometry.translate(a,o,l),this.brush.updateMatrixWorld(),this}align(e){this.brush.geometry.applyMatrix4(this.brush.matrix),this.brush.position.set(0,0,0),this.brush.rotation.set(0,0,0),this.brush.scale.set(1,1,1),this.brush.updateMatrixWorld();const t=this.getBounds();switch(e){case"bottom":{this.brush.geometry.translate(0,-t.min.y,0);break}case"top":{this.brush.geometry.translate(0,-t.max.y,0);break}case"left":{this.brush.geometry.translate(-t.min.x,0,0);break}case"right":{this.brush.geometry.translate(-t.max.x,0,0);break}case"front":{this.brush.geometry.translate(0,0,-t.min.z);break}case"back":{this.brush.geometry.translate(0,0,-t.max.z);break}}return this.brush.updateMatrixWorld(),this}static MERGE(e){if(e.length>0&&e[0].isNegative)throw new Error("First solid in MERGE cannot be negative");return e.reduce((t,n)=>{const i=R.evaluator.evaluate(t.brush,n.brush,n.isNegative?Tp:Mp);return new R(i,t._color)},R.emptyCube.setColor(e[0]?._color??"gray"))}static SUBTRACT(e,...t){return t.reduce((n,i)=>{const s=R.evaluator.evaluate(n.brush,i.brush,Tp);return new R(s,n._color)},e)}static UNION(e,...t){return t.reduce((n,i)=>{const s=R.evaluator.evaluate(n.brush,i.brush,Mp);return new R(s,n._color)},e)}static INTERSECT(e,t){return new R(R.evaluator.evaluate(e.brush,t.brush,x3),e._color)}static GRID_XYZ(e,t){const n=[],{width:i,height:s,depth:a}=e.getBounds(),o=typeof t.spacing=="number"?[t.spacing,t.spacing,t.spacing]:t.spacing??[0,0,0],[l,c,d]=o;for(let u=0;unew Float32Array(this.brush.geometry.attributes.position.array);getBounds(){this.brush.geometry.computeBoundingBox();const t=(this.brush.geometry.boundingBox||new wt).clone();t.applyMatrix4(this.brush.matrixWorld);const n=t.min.clone(),i=t.max.clone(),s=new P;return t.getCenter(s),n.set(vr(n.x),vr(n.y),vr(n.z)),i.set(vr(i.x),vr(i.y),vr(i.z)),s.set(vr(s.x),vr(s.y),vr(s.z)),{width:vr(i.x-n.x),height:vr(i.y-n.y),depth:vr(i.z-n.z),min:n,max:i,center:s}}}const _E=(r,e,t)=>(new DataView(r.buffer).setInt16(t,e,!0),t+2),wE=(r,e,t)=>(new DataView(r.buffer).setInt32(t,e,!0),t+4),nu=(r,e,t)=>(new DataView(r.buffer).setFloat32(t,e,!0),t+4),SE=r=>{if(r.length===0)throw new Error("Vertices array cannot be empty");if(r.length%9!==0)throw new Error("Vertices length must be divisible by 9");const e=new Uint8Array(84+50*(r.length/9));let t=wE(e,r.length/9,80),n=0;for(;n{const t=document.createElement("a");let n;try{document.body.append(t),t.download=r,n=URL.createObjectURL(new Blob([e])),t.href=n,t.click()}finally{if(t.remove(),n){const i=n;setTimeout(()=>URL.revokeObjectURL(i),100)}}},TE=()=>{const r=window.location.hash,e=r.indexOf("?");if(e===-1)return;const t=r.slice(Math.max(0,e+1)),n=new URLSearchParams(t);if(["px","py","pz","rx","ry","rz","tx","ty","tz","zoom"].every(a=>n.has(a)))return{px:Number.parseFloat(n.get("px")),py:Number.parseFloat(n.get("py")),pz:Number.parseFloat(n.get("pz")),rx:Number.parseFloat(n.get("rx")),ry:Number.parseFloat(n.get("ry")),rz:Number.parseFloat(n.get("rz")),tx:Number.parseFloat(n.get("tx")),ty:Number.parseFloat(n.get("ty")),tz:Number.parseFloat(n.get("tz")),zoom:Number.parseFloat(n.get("zoom"))}},AE=()=>{const r=window.location.hash;if(!r||r.length<=1)return;let e=r.slice(1);const t=e.indexOf("?");return t!==-1&&(e=e.slice(0,Math.max(0,t))),decodeURIComponent(e)},kE=(r,e)=>{let t=`#${r}`;if(e){const n=new URLSearchParams({px:e.px.toFixed(3),py:e.py.toFixed(3),pz:e.pz.toFixed(3),rx:e.rx.toFixed(3),ry:e.ry.toFixed(3),rz:e.rz.toFixed(3),tx:e.tx.toFixed(3),ty:e.ty.toFixed(3),tz:e.tz.toFixed(3),zoom:e.zoom.toFixed(3)});t+=`?${n.toString()}`}return t},Vm=(r,e)=>{const t=kE(r,e);window.location.hash=t},yu=[],w3=()=>yu;let Ap;const EE=r=>{Ap=r},Ki=r=>{for(const[e,t]of Object.entries(r))yu.some(n=>n.name===e)||yu.push({name:e,receiveData:t});yu.sort((e,t)=>e.name.localeCompare(t.name)),Ap&&Ap()},Lf={},CE=(r,e)=>`${r}:${JSON.stringify(e)}`,Bn=(r,e)=>{if(!r)throw new Error("cacheInlineFunction requires a function name for caching purposes");return((...t)=>{const n=CE(r,t);if(n in Lf)return Lf[n];const i=e(...t);return Lf[n]=i.clone(),i})},RE=r=>Bn(r.name,r),nt={HEIGHT:20,WIDTH:2,ZIGZAG_LENGTH:5,GATE_WIDTH:14},tc={CORNER_RADIUS:8,CONNECTOR_RADIUS:6},IE=Bn("WallHeader",r=>{let e=R.cube(r,nt.WIDTH*2,nt.WIDTH/2,{color:"green"}).move({y:nt.HEIGHT/2+nt.WIDTH,z:nt.WIDTH*1.75});const t=R.cube(nt.ZIGZAG_LENGTH,3,nt.WIDTH).move({x:-r/2+nt.ZIGZAG_LENGTH,y:nt.HEIGHT/2+nt.WIDTH*2,z:nt.WIDTH*1.75});for(let i=0;i{const t=R.cube(r,nt.HEIGHT,nt.WIDTH,{color:"green"}),n=R.cube(r,nt.WIDTH,nt.WIDTH*4,{color:"green"}).move({y:nt.HEIGHT/2-nt.WIDTH/2}),i=n.clone().move({y:-20+nt.WIDTH}).scale({z:.5}),s=IE(r),a=s.clone().rotate({y:180});let o=R.UNION(t,n,i,s,a);if(e?.includeFootPath){const l=R.cube(r,nt.WIDTH*2,nt.WIDTH*4).align("bottom").move({y:nt.HEIGHT/2});o=R.UNION(o,l)}return o.align("bottom")}),S3=Bn("WallWithGate",r=>{let e=Gr(r),t=R.cube(nt.GATE_WIDTH,nt.HEIGHT-nt.GATE_WIDTH/2,nt.WIDTH*4).align("bottom");const n=R.cylinder(nt.GATE_WIDTH/2,nt.WIDTH*4).move({y:nt.HEIGHT-nt.GATE_WIDTH/2}).rotate({z:90,y:90});return t=R.UNION(t,n),e=R.UNION(e,t),t.scale({x:.8,y:.95,z:2}),e=R.SUBTRACT(e,t),e}),PE={"X. Example: Wall 100":()=>Gr(100),"X. Example: Wall with gate 100":()=>S3(100)},M3=Bn("Tower",r=>{const e=R.prism(8,r,nt.HEIGHT,{color:"red"}).align("bottom").rotate({y:22.5}),t=R.prism(8,r+2,nt.WIDTH*2).align("bottom").rotate({y:22.5}),n=R.prism(8,r+4,nt.HEIGHT/2).align("bottom").move({y:nt.HEIGHT}).rotate({y:22.5}),i=R.prism(8,r+3,nt.HEIGHT/2+1).align("bottom").move({y:nt.HEIGHT+.5}).rotate({y:22.5});let s=R.UNION(e,t,n);s=R.SUBTRACT(s,i);const a=R.cube(r*4,nt.WIDTH*2,nt.WIDTH).align("bottom").move({y:nt.HEIGHT*1.5-nt.WIDTH*2});for(let c=0;c<4;c++)s=R.SUBTRACT(s,a),a.rotate({y:45});let o=R.cone(r+4+2,nt.HEIGHT/2,{segments:8}).rotate({y:22.5}).align("bottom");const l=R.cone(r+4,nt.HEIGHT/2+2,{segments:8}).rotate({y:22.5}).align("bottom");return o=R.SUBTRACT(o,l).move({y:nt.HEIGHT+nt.HEIGHT/2}),s=R.UNION(s,o),s.align("bottom")}),Ol=Bn("CornetTower",()=>{let r=M3(tc.CORNER_RADIUS);const e=Gr(20,{includeFootPath:!0}).align("left").move({x:tc.CORNER_RADIUS-2});r=R.SUBTRACT(r,e);const t=Gr(20,{includeFootPath:!0}).align("right").rotate({y:90}).move({z:tc.CORNER_RADIUS-2});return r=R.SUBTRACT(r,t),r}),kp=Bn("ConnectorTower",()=>{let r=M3(tc.CONNECTOR_RADIUS);const e=Gr(20,{includeFootPath:!0}).align("left").move({x:tc.CONNECTOR_RADIUS-2});r=R.SUBTRACT(r,e);const t=Gr(20,{includeFootPath:!0}).align("right").move({x:-4});return r=R.SUBTRACT(r,t),r}),DE={"X. Example: Corner Tower 10":()=>Ol(),"X. Example: Connector Tower 10":()=>kp()},LE=()=>{const r=S3(100).clone(),e=Ol().clone().move({x:-50}).rotate({y:90}),t=Ol().clone().move({x:50}).rotate({y:180}),n=Gr(150).clone().move({x:-50,z:-75}).rotate({y:90}),i=kp().clone().move({x:-50,z:-150}).rotate({y:90}),s=Gr(50).clone().move({x:-50,z:-175}).rotate({y:90}),a=Gr(50).clone().move({x:50,z:-25}).rotate({y:90}),o=kp().clone().move({x:50,z:-50}).rotate({y:90}),l=Gr(150).clone().move({x:50,z:-125}).rotate({y:90}),c=Gr(100).clone().move({z:-200}),d=Ol().clone().move({x:-50,z:-200}).rotate({y:0}),u=Ol().clone().move({x:50,z:-200}).rotate({y:-90});return R.UNION(r,e,t,n,i,s,a,o,l,c,d,u)},NE={"X. Example: Whole Castle":()=>LE()};Ki({...PE,...DE,...NE});const UE=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),FE=()=>R.cube(10,10,10,{color:"red"}),OE=()=>R.cylinder(5,12,{color:"blue"}),qE=()=>R.sphere(6,{color:"green"}),BE=()=>R.cone(6,12,{color:"orange"}),zE=()=>R.trianglePrism(6,12,{color:"purple"}),VE=()=>R.prism(6,6,12,{color:"cyan"}),GE=()=>R.roundedBox(10,10,10,{color:"teal",radius:2}),HE=()=>R.text("CSG",{color:"blue",size:8,height:3}),WE=()=>{const r=R.cube(30,20,5,{color:"gray"}).center().align("bottom"),e=R.text("HELLO",{size:4,height:10,color:"gray"}).move({y:10});return R.SUBTRACT(r,e)},XE={"A1. Solids: Cube":FE,"A2. Solids: Cylinder":OE,"A3. Solids: Sphere":qE,"A4. Solids: Cone":BE,"A5. Solids: Triangle Prism":zE,"A6. Solids: Hexagonal Prism":VE,"A7. Solids: Rounded Box":GE,"A8. Solids: Text":HE,"A9. Solids: Text Cutter":WE},YE=()=>{const r=R.cube(10,10,10,{color:"blue"}),e=R.cube(10,10,10,{color:"blue"}).move({x:5,y:5,z:-5});return R.UNION(r,e)},ZE=()=>{const r=R.cube(15,15,15,{color:"red"}),e=R.cylinder(4,20,{color:"red"}).rotate({x:90});return R.SUBTRACT(r,e)},$E=()=>{const r=R.sphere(8,{color:"green"}),e=R.sphere(4,{color:"green"}).move({x:6});return R.INTERSECT(r,e)},jE={"B1. Operations: Union":YE,"B2. Operations: Subtract":ZE,"B3. Operations: Intersect":$E},KE=()=>R.cube(12,15,8,{color:"orange"}).align("bottom"),JE=()=>R.cylinder(6,18,{color:"purple"}).align("top"),QE=()=>R.sphere(7,{color:"cyan"}).center(),eC={"C1. Alignment: Bottom":KE,"C2. Alignment: Top":JE,"C3. Alignment: Center":QE},tC=()=>R.cylinder(8,10,{color:"blue",angle:90}),nC=()=>R.sphere(8,{color:"green",angle:180}),rC=()=>R.cone(8,12,{color:"red",angle:270}),iC={"D1. Partials: Cylinder 90°":tC,"D2. Partials: Sphere 180°":nC,"D3. Partials: Cone 270°":rC},Ai=3,Cl=1,Nf=2,_o=.2,Uf=.2,T3=()=>{let r=R.cube(2*Ai+2*_o,2*Cl+2*_o,Nf-Uf,{color:"red"});const e=Cl/2+_o,t=-Cl/2,n=R.cube(Ai,Cl,Uf).move({z:Nf/2}),i=R.cube(Ai/2,Cl,Uf).move({z:Nf/2}),s=n.clone().move({x:-Ai/2,y:e}),a=n.clone().move({x:Ai/2+_o,y:e}),o=i.clone().move({x:-Ai/2-Ai/4-_o,y:t}),l=n.clone().move({x:0,y:t}),c=i.clone().move({x:Ai/2+Ai/4+_o,y:t});return r=R.UNION(r,s,a,o,l,c),r},A3=(r,e)=>R.GRID_XYZ(T3(),{cols:r,rows:1,levels:e}),k3=(r,e,t)=>{const n=R.cube(r,e,t,{color:"brown"}),i=2,s=R.cube(r-i*2,e-i*2,t*4,{color:"gray"}),a=R.SUBTRACT(n,s),o=R.cube(r-i*2,e-i*2,t*4,{color:"gray"}).setNegative(),l=R.cube(i,e,t-1,{color:"brown"}).move({z:-.5}),c=R.cube(r,i,t-1,{color:"brown"}).move({z:-.5});return[a,o,l,c]},sC=()=>{const r=A3(5,7).center(),e=k3(10,14,3);return R.MERGE([r,...e])},aC={"E1. Wall: Brick Item":T3,"E2. Wall: Brick Wall":()=>A3(2,2),"E3. Wall: Window":()=>k3(15,30,3),"E4. Wall: Brick Wall with Window":()=>sC()},oC=()=>R.profilePrismFromPoints(4,[[0,5],[10,5],[10,8],[15,4],[10,0],[10,3],[0,3]],{color:"orange"}).align("bottom").center({x:!0,z:!0}),lC=()=>R.profilePrism(3,r=>{r.moveTo(10*Math.cos(0),10*Math.sin(0));for(let i=1;i<=10;i++){const s=i*Math.PI/5,a=i%2===0?10:4;r.lineTo(a*Math.cos(s),a*Math.sin(s))}},{color:"gold"}).align("bottom").center({x:!0,z:!0}),cC=()=>{const r=R.profilePrism(4,n=>{n.moveTo(0,0),n.lineTo(10,0),n.lineTo(10,3),n.lineTo(3,3),n.lineTo(3,10),n.lineTo(0,10),n.lineTo(0,0)},{color:"gray"}),e=R.cylinder(1,5,{color:"gray"}).at(2,7,2),t=R.cylinder(1,5,{color:"gray"}).at(7,1.5,2);return R.SUBTRACT(r,e,t)},dC=()=>R.profilePrismFromPath(2,[Db(20),Lb(5,180),Db(20),Lb(5,180)],{color:"green"}),uC={"F1. Shapes: Arrow":oC,"F2. Shapes: Star":lC,"F3. Shapes: L Profile With Holes":cC,"F4. Shapes: Race Track":dC},hC=()=>R.revolutionSolidFromPoints([[0,0],[2,0],[1.5,1],[1.5,4],[3,6],[1.5,8],[2.5,10],[0,10]],{color:"white"}),fC=()=>R.revolutionSolidFromPoints([[0,0],[2,0],[1.5,1],[1.5,4],[3,6],[1.5,8],[2.5,10],[0,10]],{angle:90,color:"purple"}),pC={"G1. ShapeRevolution: Chess Pawn":hC,"G2. ShapeRevolution: Quarter Pawn":fC},mC=()=>{const r=R.cube(10,10,10,{color:"blue"}).move({x:-30}),e=R.cube(10,10,10,{color:"green"}).scale({all:2}).move({x:0}),t=R.cube(10,10,10,{color:"red"}).scale({all:.5}).move({x:30});return R.MERGE([r,e,t])},gC=()=>{const r=R.cylinder(5,10,{color:"cyan"}).rotate({z:90}).scale({x:2}).move({y:20}),e=R.sphere(8,{color:"orange"}).scale({y:.5}).move({y:0}),t=R.cube(8,8,8,{color:"purple"}).scale({x:1.5,z:2}).move({y:-20});return R.MERGE([r,e,t])},xC=()=>{const r=R.cube(10,10,10,{color:"lime"}).scale({all:2}).move({x:-30,y:15}),e=R.cube(10,10,10,{color:"yellow"}).scale({all:2,z:1.5}).move({x:0,y:15}),t=R.cube(10,10,10,{color:"magenta"}).scale({all:.5,x:3}).move({x:30,y:15}),n=R.cube(10,10,10,{color:"gray"}).move({y:-15}).center({x:!0,z:!0});return R.MERGE([r,e,t,n])},bC=()=>{const r=R.cone(5,15,{color:"teal"}).scale({all:2}).scale({y:.5}).scale({x:1.5,z:1.5}).move({x:-20}),e=R.sphere(5,{color:"pink"}).scale({x:2}).scale({x:1.5}).scale({y:.8,z:.8}).move({x:20});return R.MERGE([r,e])},yC=()=>{const r=()=>{const i=R.cube(10,15,2,{color:"brown"}),s=R.cube(8,13,1,{color:"cyan"}).move({y:0,z:.5}).center({x:!0,y:!0}),a=R.cube(.5,15,2,{color:"brown"}).center({x:!0,y:!0});return R.MERGE([i,s,a])},e=r().scale({x:1.8}).move({x:-30}),t=r().scale({y:1.5}).move({x:0}),n=r().scale({all:.6}).move({x:30});return R.MERGE([e,t,n])},E3={"H1: Uniform Scaling":mC,"H2: Individual Axis Scaling":gC,"H3: Combined Scaling":xC,"H4: Cumulative Scaling":bC,"H5: Aspect Ratio Adjustments":yC};Ki(E3);const vC=()=>{const r=R.cylinder(3,15,{color:"red"}).rotate({z:90}).move({x:20}).rotate({y:45}),e=R.cylinder(3,15,{color:"blue"}).rotate({z:90}).rotate({y:45}).move({x:10}),t=R.sphere(2,{color:"yellow"});return R.MERGE([r,e,t])},_C=()=>{const r=R.cube(10,20,5,{color:"green"}).center().rotate({z:45}).move({x:-30,y:15}),e=R.UNION(R.cube(10,20,5,{color:"cyan"}),R.cylinder(3,25,{color:"cyan"}).rotate({x:90})).rotate({z:30}).center().move({x:30,y:15}),t=R.cube(8,15,6,{color:"orange"}).align("bottom").center({x:!0,z:!0}).move({y:-15});return R.MERGE([r,e,t])},wC=()=>{const r=R.cube(8,8,8,{color:"purple"}).at(0,0,0).at(10,5,0).at(-30,10,0),e=R.cube(8,8,8,{color:"lime"}).move({x:10}).move({y:5}).move({x:-5,z:3}),t=R.cube(8,8,8,{color:"yellow"}).at(30,0,0).move({y:10,z:2});return R.MERGE([r,e,t])},SC=()=>{const r=R.cube(15,5,15,{color:"brown"}).align("bottom").center({x:!0,z:!0}),e=R.cylinder(4,20,{color:"gray"}).align("bottom").move({y:5}).center({x:!0,z:!0}),t=R.cone(8,10,{color:"red"}).align("bottom").move({y:25}).center({x:!0,z:!0}),n=R.cube(2,20,15,{color:"blue"}).align("right").move({x:-7.5}).align("bottom").move({y:5,x:2}),i=R.cube(2,20,15,{color:"blue"}).align("left").move({x:7.5}).align("bottom").move({y:5,x:-2});return R.MERGE([r,e,t,n,i])},MC=()=>{const r=(s,a)=>{const o=R.cube(s,a,2,{color:"brown"}),l=R.cube(s-2,a-2,3,{color:"brown"}).center({x:!0,y:!0}),c=R.cube(.8,a,2,{color:"brown"}).center({x:!0,y:!0}),d=R.SUBTRACT(o,l);return R.UNION(d,c)},e=R.cube(60,30,3,{color:"lightgray"}).align("bottom").center({x:!0,z:!0}),t=r(8,12).scale({x:1.2}).center().rotate({z:0}).move({x:-20,y:15,z:1.5}),n=r(8,12).scale({y:1.3}).center().rotate({z:0}).move({x:0,y:15,z:1.5}),i=r(8,12).center().rotate({z:10}).move({x:20,y:15,z:1.5});return R.MERGE([e,t,n,i])},C3={"I1: Transform Order":vC,"I2: Centering in Chains":_C,"I3: Absolute vs Relative":wC,"I4: Alignment Workflow":SC,"I5: Complete Transform Chain":MC};Ki(C3);const TC=()=>{const r=R.sphere(2,{color:"red"}),e=R.GRID_X(r,{cols:5}).center({x:!0}).move({y:20}),t=R.GRID_XY(r,{cols:5,rows:3}).center({x:!0,y:!0}).move({z:0}),n=R.GRID_XYZ(r,{cols:3,rows:3,levels:3}).center().move({y:-20});return R.MERGE([e,t,n])},AC=()=>{const r=R.sphere(2,{color:"cyan"}),e=R.GRID_XYZ(r,{cols:3,rows:3,levels:3}).move({x:-35}),t=R.GRID_XYZ(r,{cols:3,rows:3,levels:3,spacing:[2,2,2]}).move({x:-10}),n=R.GRID_XYZ(r,{cols:3,rows:3,levels:3,spacing:[4,1,6]}).move({x:20});return R.MERGE([e,t,n])},kC=()=>{const r=R.cylinder(.8,20,{color:"gray"}),e=R.GRID_XYZ(r,{cols:4,rows:4,levels:1,spacing:[8,8,0]}).align("bottom"),t=R.cylinder(.6,32,{color:"orange"}).rotate({z:90}),n=R.GRID_XYZ(t,{cols:1,rows:4,levels:3,spacing:[0,8,8]}).align("left").move({y:4,z:4}),i=R.cylinder(.6,32,{color:"yellow"}).rotate({z:90}).rotate({x:90}),s=R.GRID_XYZ(i,{cols:4,rows:1,levels:3,spacing:[8,0,8]}).align("front").move({x:4,z:4});return R.MERGE([e,n,s])},EC=()=>{const r=R.sphere(2.5,{color:"white"}),e=R.cube(5,5,5,{color:"black"}),t=R.MERGE([R.GRID_XY(r,{cols:3,rows:3}).move({x:0,y:0,z:0})]),n=R.MERGE([R.GRID_XY(e,{cols:3,rows:3}).move({x:0,y:5,z:0})]),i=R.MERGE([R.GRID_XY(r,{cols:3,rows:3}).move({x:0,y:10,z:0})]);return R.MERGE([t,n,i]).center()},CC=()=>{const r=R.cube(2,40,2,{color:"brown"}),e=R.GRID_XYZ(r,{cols:2,rows:1,levels:2,spacing:[26,0,16]}).align("bottom").align("left").align("front"),t=R.cube(30,1.5,20,{color:"lightgray"}).align("bottom").align("left").align("front").move({y:0}),n=R.cube(30,1.5,20,{color:"lightgray"}).align("bottom").align("left").align("front").move({y:12}),i=R.cube(30,1.5,20,{color:"lightgray"}).align("bottom").align("left").align("front").move({y:24}),s=R.cube(30,1.5,20,{color:"lightgray"}).align("bottom").align("left").align("front").move({y:36}),a=R.cube(2,6,3,{color:"red"}),o=R.GRID_XY(a,{cols:8,rows:2,spacing:[1,0]}).align("bottom").move({x:3,y:13.5,z:4}),l=R.GRID_XY(a,{cols:7,rows:3,spacing:[1.5,0]}).align("bottom").move({x:5,y:25.5,z:3});return R.MERGE([e,t,n,i,s,o,l])},R3={"J1: Grid Comparison (1D/2D/3D)":TC,"J2: Spacing in 3D Grids":AC,"J3: 3D Lattice Structure":kC,"J4: 3D Checkerboard Pattern":EC,"J5: Storage Shelf (Practical)":CC};Ki(R3);const RC=()=>{const r=R.UNION(R.cube(8,12,4,{color:"teal"}),R.cylinder(3,15,{color:"teal"}).move({y:6})),e=r.getBounds(),{width:t,height:n,depth:i,center:s}=e,a=5,o=a,l=a,c=a,d=R.GRID_XYZ(r,{cols:3,rows:2,levels:2,spacing:[o,l,c]}),u=R.cube(t,n,i,{color:"red"}).at(s.x,s.y,s.z).move({x:-30});return R.MERGE([d.center(),u])},IC=()=>{const r=[];for(let e=0;e<3;e++)for(let t=0;t<5;t++)for(let n=0;n<5;n++){const a=5+Math.sin(n*.5)*Math.cos(t*.5)*3,l=["red","green","blue"][e],c=R.cube(3,a,3,{color:l}).align("bottom").move({x:n*5,y:e*10,z:t*5});r.push(c)}return R.MERGE(r).center()},PC=()=>{const r=R.cube(6,6,6,{color:"purple"}),e=R.GRID_XYZ(r,{cols:4,rows:4,levels:4,spacing:[2,2,2]}).center(),t=R.sphere(18,{color:"purple"}),n=R.sphere(14,{color:"purple"}),i=R.SUBTRACT(t,n);return R.INTERSECT(e,i)},DC=()=>{const r=R.cube(4,2,4,{color:"gray"}).align("bottom").center({x:!0,z:!0}),e=R.cylinder(1.5,20,{color:"lightgray"}).center({x:!0,z:!0}).align("bottom").move({y:2}),t=R.cube(4,3,4,{color:"gray"}).center({x:!0,z:!0}).align("bottom").move({y:22}),n=R.MERGE([r,e,t]),i=R.GRID_X(n,{cols:4,spacing:10}).align("left").center({z:!0}),s=R.cube(50,1,15,{color:"brown"}).align("bottom").center({x:!0,z:!0}).move({y:-.5,x:22.5}),a=R.cube(50,4,12,{color:"gray"}).align("bottom").move({y:25,x:22.5}).center({z:!0});return R.MERGE([s,i,a])},LC=()=>{const r=[];for(let a=0;a<10;a++){const o=R.cube(1.5,1.5,2,{color:"blue"}),l=R.GRID_X(o,{cols:15,spacing:.5}).align("bottom").move({y:a*2,z:a*3}).center({x:!0});r.push(l)}const s=R.cube(30,.5,15,{color:"green"}).align("bottom").move({y:-1,z:-10}).center({x:!0});return r.push(s),R.MERGE(r).center({z:!0})},I3={"K1: Dynamic Spacing with getBounds()":RC,"K2: Programmatic Grid (Wave Pattern)":IC,"K3: Hollow Grid Structure":PC,"K4: Architectural Column Grid":DC,"K5: Stadium Seating":LC};Ki(I3);const NC=(r,e,t)=>{const n=R.cube(r,e,t,{color:"red"}),i=R.cylinder(e*.15,r*1.2,{color:"red"}).rotate({z:90}),s=R.SUBTRACT(n,i.move({y:e*.5,z:t*.3}),i.move({y:e*.5,z:t*.7})),a=R.cube(r*.9,e*.1,t*.05,{color:"red"}).center({x:!0,y:!0}).move({z:-t*.5}),o=R.cube(r*.9,e*.1,t*.05,{color:"red"}).center({x:!0,y:!0}).move({z:t*.5});return R.SUBTRACT(s,a,o)},Ff=RE(NC),UC=()=>{const r=Ff(8,3,4).move({x:-15}),e=Ff(8,3,4).move({x:0}),t=Ff(10,4,5).move({x:20});return R.MERGE([r,e,t])},FC=()=>{const r=Bn("Column",(n,i)=>{const s=R.cylinder(i*1.5,n*.1,{color:"gray"}).align("bottom");let o=R.cylinder(i,n*.7,{color:"lightgray"}).align("bottom").move({y:n*.1});for(let c=0;c<4;c++){const d=R.cylinder(i*.15,n*.72,{color:"lightgray"}).align("bottom").move({x:i*.8,y:n*.09}).rotate({y:c*45});o=R.SUBTRACT(o,d)}const l=R.cylinder(i*1.4,n*.2,{color:"gray"}).align("bottom").move({y:n*.8});return R.MERGE([s,o,l])}),e=r(20,2).move({x:-15}),t=r(20,2).move({x:15});return R.MERGE([e,t])},OC=()=>{const e=Bn("DecorativeTile",n=>{const i=R.cube(n,n,1,{color:"blue"}),s=R.cylinder(n*.3,2,{color:"blue"}).center({x:!0,z:!0}).move({y:.5}),a=[];for(let o=0;o<4;o++){const l=R.sphere(n*.15,{color:"blue"}).move({x:n*.35,z:n*.35}).rotate({y:o*90}).center({x:!0,z:!0}).move({y:.5});a.push(l)}return R.SUBTRACT(i,s,...a)})(5);return R.GRID_XY(e,{cols:5,rows:5,spacing:[1,1]}).center()},qC=()=>{const r=Bn("Window",(i,s)=>{const a=R.cube(i,s,2,{color:"brown"}),o=R.cube(i-1,s-1,1,{color:"cyan"}).center({x:!0,y:!0}).move({z:.5}),l=R.cube(.5,s,2,{color:"brown"}).center({x:!0,y:!0});return R.MERGE([a,o,l])}),e=Bn("WallWithWindows",(i,s)=>{const a=R.cube(i,s,3,{color:"lightgray"}),o=r(6,8).move({x:i*.2,y:s*.5,z:1.5}).center({x:!0,y:!0}),l=r(6,8).move({x:i*.5,y:s*.5,z:1.5}).center({x:!0,y:!0}),c=r(6,8).move({x:i*.8,y:s*.5,z:1.5}).center({x:!0,y:!0});return R.MERGE([a,o,l,c])}),t=e(40,20).move({z:-10}),n=e(40,20).move({z:10});return R.MERGE([t,n]).center({x:!0})},BC=()=>{const r=Bn("Ornament",()=>{const a=R.sphere(2,{color:"gold"}),o=R.cone(1.5,3,{color:"gold"}).align("bottom").move({y:2});return R.MERGE([a,o])}),e=Bn("Post",a=>{const o=R.cube(2,a,2,{color:"brown"}).align("bottom"),l=r().move({y:a}).center({x:!0,z:!0});return R.MERGE([o,l])}),t=Bn("Railing",a=>{const o=R.GRID_X(e(8),{cols:5,spacing:a/4-2}).align("left"),l=R.cube(a,1,1,{color:"brown"}).align("bottom").move({y:6,z:.5});return R.MERGE([o,l])}),n=t(30).move({x:-15,z:-8}),i=t(30).move({x:-15,z:8}),s=R.cube(60,1,18,{color:"gray"}).align("bottom").center({x:!0,z:!0});return R.MERGE([s,n,i])},P3={"L1: Basic cacheFunction":UC,"L2: cacheInlineFunction":FC,"L3: Cached Components in Grids":OC,"L4: Hierarchical Caching":qC,"L5: Real-World Optimization":BC};Ki(P3);const zC=()=>{const r=(s,a)=>R.cube(4,8,4,{color:"purple"}).center().scale({y:a}).rotate({y:s}).move({y:20}),e=[];for(let s=0;s<12;s++){const a=s*360/12,o=.5+s/12*1.5,l=15,c=r(a,o).move({x:Math.cos(a*Math.PI/180)*l,z:Math.sin(a*Math.PI/180)*l,y:s*3});e.push(c)}const n=R.cylinder(3,40,{color:"gold"}).align("bottom").center({x:!0,z:!0}),i=R.cylinder(20,2,{color:"gray"}).align("bottom").center({x:!0,z:!0});return R.MERGE([i,n,...e])},VC=()=>{const r={sections:6,tiersPerSection:6,seatsPerRow:20,seatWidth:1.8,tierHeight:2.5,tierDepth:3},e=Bn("StadiumSeat",()=>{const i=R.cube(1.5,.8,1.8,{color:"blue"}),s=R.cube(1.5,1.2,.3,{color:"blue"}).align("bottom").move({y:.3,z:-1.8/2+.15});return R.MERGE([i,s]).align("bottom")}),t=i=>{const s=[];for(let o=0;oR.fromSTL(Va,{color:"blue"}),HC=()=>R.fromSTL(Va,{color:"green"}).scale({all:.5}).rotate({y:45}).move({y:10}),WC=()=>{const r=R.cube(20,20,20,{color:"red"}),e=R.fromSTL(Va,{color:"blue"}).move({x:5,y:5,z:5});return R.SUBTRACT(r,e)},XC=()=>{const r=R.fromSTL(Va,{color:"purple"}),e=R.cube(15,2,15,{color:"purple"}).align("bottom");return R.UNION(r,e)},YC=()=>{const r=R.fromSTL(Va,{color:"cyan"}).scale({all:2}),e=R.sphere(8,{color:"cyan"}).move({x:5,y:5,z:5});return R.INTERSECT(r,e)},ZC=()=>R.profilePrismFromSVG("M 0 0 L 20 0 L 20 10 L 0 10 Z",5,{color:"orange"}),$C=()=>R.profilePrismFromSVG("M 10 0 L 12 8 L 20 8 L 14 13 L 16 21 L 10 16 L 4 21 L 6 13 L 0 8 L 8 8 Z",3,{color:"gold"}),jC=()=>R.profilePrismFromSVG("M 0 5 Q 5 0, 10 5 Q 15 10, 20 5 L 20 10 L 0 10 Z",8,{color:"pink"}),KC=()=>R.profilePrismFromSVG("M 10 6 Q 10 4, 8 3 Q 6 2, 5 4 Q 4 6, 5 8 L 10 14 L 15 8 Q 16 6, 15 4 Q 14 2, 12 3 Q 10 4, 10 6 Z",2,{color:"red"}).scale({all:.8}),JC=()=>{const r=R.cube(30,20,5,{color:"gray"}),t=R.profilePrismFromSVG("M 5 0 L 6 4 L 10 4 L 7 6 L 8 10 L 5 8 L 2 10 L 3 6 L 0 4 L 4 4 Z",10,{color:"gray"}).move({x:-5,y:0,z:0});return R.SUBTRACT(r,t)},QC=()=>{const r="M 0 0 L 10 0 L 10 10 L 0 10 Z",e="M 0 0 L 10 0 L 10 10 L 0 10 Z",t=R.profilePrismFromSVG(r,8,{color:"teal"}).move({x:-5}),n=R.profilePrismFromSVG(e,8,{color:"teal"}).move({x:5});return R.UNION(t,n)},e9=()=>{const r=R.fromSTL(Va,{color:"brown"}).align("bottom"),t=R.profilePrismFromSVG("M 0 0 L 5 0 L 5 5 L 0 5 Z",2,{color:"brown"}).move({x:2,y:8,z:2});return R.UNION(r,t)},t9=(r=6)=>{const t=2*Math.PI/r;let n="M ";for(let i=0;i{const r=R.fromSTL(Va,{color:"violet"}).scale({all:.3});return R.GRID_XY(r,{cols:3,rows:3,spacing:[5,5]})},r9={"N1. Import: STL Basic":GC,"N2. Import: STL Transformed":HC,"N3. Import: Subtract STL":WC,"N4. Import: Union STL":XC,"N5. Import: Intersect STL":YC,"N6. Import: SVG Rectangle":ZC,"N7. Import: SVG Star":$C,"N8. Import: SVG Curved":jC,"N9. Import: SVG Heart":KC,"NA. Import: SVG Cutter":JC,"NB. Import: Multiple SVG":QC,"NC. Import: STL + SVG":e9,"ND. Import: Parametric SVG":()=>t9(6),"NE. Import: Grid from STL":n9},i9=()=>{const r=R.sphere(2,{color:"blue"});return R.ARRAY_CIRCULAR(r,{count:12,radius:15,rotateElements:!1})},s9=()=>{const r=R.cylinder(15,8,{color:"gray"}).align("bottom"),e=R.cube(3,10,2,{color:"gray"}).center({x:!0,z:!0}).align("bottom").rotate({y:180}).move({y:-6}),t=R.ARRAY_CIRCULAR(e,{count:24,radius:15});return R.UNION(r,t)},a9=()=>{const r=R.cylinder(30,5,{color:"blue"}).align("bottom"),e=R.cylinder(2,12,{color:"blue"}),t=R.ARRAY_CIRCULAR(e,{count:8,radius:20,rotateElements:!1}).setNegative(),n=R.cylinder(5,10,{color:"blue"}).setNegative();return R.MERGE([r,t,n])},o9=()=>{const r=R.cube(1,20,2,{color:"silver"}).center({x:!0,z:!0}).rotate({y:45}).align("bottom"),e=R.ARRAY_CIRCULAR(r,{count:8,radius:11}),t=R.cylinder(12,3,{color:"black"}).align("bottom").move({y:8.5}),n=R.cylinder(3,4,{color:"silver"}).align("bottom");return R.UNION(e,t,n)},l9=()=>{const r=R.cube(2,1,2,{color:"red"}).align("bottom"),e=R.ARRAY_CIRCULAR(r,{count:15,radius:25,startAngle:0,endAngle:180}),t=R.cube(30,1,12,{color:"brown"}).center().align("bottom").move({z:-20});return R.UNION(e,t)},c9=()=>{const r=R.cube(1,3,1,{color:"black"}).center({x:!0,z:!0}).align("bottom"),e=R.ARRAY_CIRCULAR(r,{count:12,radius:18}),t=R.cylinder(20,2,{color:"white"}).align("bottom"),n=R.cylinder(1.5,3,{color:"black"}).align("bottom");return R.UNION(t,e,n)},d9=()=>{const r=R.sphere(1.5,{color:"gold"}),e=R.ARRAY_CIRCULAR(r,{count:8,radius:8,rotateElements:!1}),t=R.sphere(2,{color:"gold"}),n=R.ARRAY_CIRCULAR(t,{count:12,radius:15,rotateElements:!1}),i=R.cube(2,4,2,{color:"gold"}).center({x:!0,z:!0}).align("bottom"),s=R.ARRAY_CIRCULAR(i,{count:16,radius:20}),a=R.sphere(5,{color:"gold"});return R.UNION(e,n,s,a)},u9=()=>{const r=R.cube(30,2,30,{color:"gray"}).center().align("bottom"),e=R.cube(2,10,.5,{color:"gray"}).center({x:!0,z:!0}).align("front"),t=R.ARRAY_CIRCULAR(e,{count:11,radius:12,startAngle:-45,endAngle:45}).setNegative();return R.MERGE([r,t])},h9={"O1. Circular: Basic Circle":i9,"O2. Circular: Gear Teeth":s9,"O3. Circular: Bolt Holes":a9,"O4. Circular: Wheel Spokes":o9,"O5. Circular: Half Circle (Amphitheater)":l9,"O6. Circular: Clock Face":c9,"O7. Circular: Rosette (Layers)":d9,"O8. Circular: Ventilation Grille":u9},f9=()=>{const r=R.cube(10,5,3,{color:"blue"}).move({x:8}),e=R.MIRROR(r,"X");return R.UNION(r,e)},p9=()=>{const r=R.cube(15,25,5,{color:"brown"}).move({x:7.5}).align("bottom"),e=R.cylinder(8,10,{color:"brown"}).rotate({x:90}).move({x:15,y:12}),t=R.SUBTRACT(r,e);return R.UNION(t,R.MIRROR(t,"X"))},m9=()=>{const r=R.cube(15,5,3,{color:"red"}).move({x:7.5}).align("bottom"),e=R.UNION(r,R.MIRROR(r,"X"));return R.UNION(r,e)},g9=()=>{const r=R.sphere(12,{color:"purple"}).move({x:5,y:5,z:5}),e=R.sphere(3,{color:"purple"}).move({x:10,y:10,z:10}),t=R.SUBTRACT(r,e),n=R.UNION(t,R.MIRROR(t,"X")),i=R.UNION(n,R.MIRROR(n,"Y"));return R.UNION(i,R.MIRROR(i,"Z"))},x9=()=>{const r=R.cylinder(15,8,{color:"gray"}).align("bottom"),e=R.cube(4,12,2,{color:"gray"}).center({x:!0,z:!0}).align("bottom").move({x:16,y:8}),t=R.UNION(e,R.MIRROR(e,"Z")),n=R.ARRAY_CIRCULAR(t,{count:12,radius:1,rotateElements:!0});return R.UNION(r,n)},b9=()=>{const r=R.cube(40,30,5,{color:"blue"}).center().align("bottom"),e=R.cylinder(2,10,{color:"blue"}).move({x:12,z:8}).setNegative(),t=R.MIRROR(e,"X");return R.MERGE([r,e,t])},y9=()=>{const r=R.cube(5,30,8,{color:"brown"}).move({x:15}).align("bottom"),e=R.cylinder(15,8,{color:"brown",angle:180}).rotate({x:90,z:90}).move({x:7.5,y:30,z:4}),t=R.UNION(r,e);return R.UNION(t,R.MIRROR(t,"X"))},v9={"P1. Mirror: Simple Mirror":f9,"P2. Mirror: Bilateral Symmetry":p9,"P3. Mirror: Quadrant Symmetry (2-axis)":m9,"P4. Mirror: Octant Symmetry (3-axis)":g9,"P5. Mirror: Symmetric Gear":x9,"P6. Mirror: Mirrored Holes":b9,"P7. Mirror: Archway":y9};Ki({...XE,...jE,...eC,...iC,...aC,...uC,...pC,...E3,...C3,...R3,...I3,...P3,...D3,...r9,...h9,...v9});const _9=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));Ki({...UE,..._9});const Qs=r=>({subscribe:r.subscribe,get current(){return r.current}});let nc=0;const Gm=pn(!1),uh=pn(!1),Hm=pn(void 0),Wm=pn(0),Xm=pn(0),L3=pn([]),Ym=pn(0),{onStart:w9,onLoad:S9,onError:M9}=za;za.onStart=(r,e,t)=>{w9?.(r,e,t),uh.set(!0),Hm.set(r),Wm.set(e),Xm.set(t);const n=(e-nc)/(t-nc);Ym.set(n),n===1&&Gm.set(!0)};za.onLoad=()=>{S9?.(),uh.set(!1)};za.onError=r=>{M9?.(r),L3.update(e=>[...e,r])};za.onProgress=(r,e,t)=>{e===t&&(nc=t),uh.set(!0),Hm.set(r),Wm.set(e),Xm.set(t);const n=(e-nc)/(t-nc)||1;Ym.set(n),n===1&&Gm.set(!0)};Qs(uh),Qs(Hm),Qs(Wm),Qs(Xm),Qs(L3),Qs(Ym),Qs(Gm);new P;new P;new P;new rn;new Oe;new $r;new P;new P;new Oe;new P;new P;new gt;new P;new P;new P;new re;const T9="Right",A9="Top",k9="Front",E9="Left",C9="Bottom",R9="Back";[T9,A9,k9,E9,C9,R9].map(r=>r.toLocaleLowerCase());new wt;new P;Ae.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new re(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};Tr.line={uniforms:cm.merge([Ae.common,Ae.fog,Ae.line]),vertexShader:` + #include + #include + #include + #include + #include + + uniform float linewidth; + uniform vec2 resolution; + + attribute vec3 instanceStart; + attribute vec3 instanceEnd; + + attribute vec3 instanceColorStart; + attribute vec3 instanceColorEnd; + + #ifdef WORLD_UNITS + + varying vec4 worldPos; + varying vec3 worldStart; + varying vec3 worldEnd; + + #ifdef USE_DASH + + varying vec2 vUv; + + #endif + + #else + + varying vec2 vUv; + + #endif + + #ifdef USE_DASH + + uniform float dashScale; + attribute float instanceDistanceStart; + attribute float instanceDistanceEnd; + varying float vLineDistance; + + #endif + + void trimSegment( const in vec4 start, inout vec4 end ) { + + // trim end segment so it terminates between the camera plane and the near plane + + // conservative estimate of the near plane + float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column + float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column + float nearEstimate = - 0.5 * b / a; + + float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); + + end.xyz = mix( start.xyz, end.xyz, alpha ); + + } + + void main() { + + #ifdef USE_COLOR + + vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; + + #endif + + #ifdef USE_DASH + + vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; + vUv = uv; + + #endif + + float aspect = resolution.x / resolution.y; + + // camera space + vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); + vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); + + #ifdef WORLD_UNITS + + worldStart = start.xyz; + worldEnd = end.xyz; + + #else + + vUv = uv; + + #endif + + // special case for perspective projection, and segments that terminate either in, or behind, the camera plane + // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space + // but we need to perform ndc-space calculations in the shader, so we must address this issue directly + // perhaps there is a more elegant solution -- WestLangley + + bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column + + if ( perspective ) { + + if ( start.z < 0.0 && end.z >= 0.0 ) { + + trimSegment( start, end ); + + } else if ( end.z < 0.0 && start.z >= 0.0 ) { + + trimSegment( end, start ); + + } + + } + + // clip space + vec4 clipStart = projectionMatrix * start; + vec4 clipEnd = projectionMatrix * end; + + // ndc space + vec3 ndcStart = clipStart.xyz / clipStart.w; + vec3 ndcEnd = clipEnd.xyz / clipEnd.w; + + // direction + vec2 dir = ndcEnd.xy - ndcStart.xy; + + // account for clip-space aspect ratio + dir.x *= aspect; + dir = normalize( dir ); + + #ifdef WORLD_UNITS + + vec3 worldDir = normalize( end.xyz - start.xyz ); + vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) ); + vec3 worldUp = normalize( cross( worldDir, tmpFwd ) ); + vec3 worldFwd = cross( worldDir, worldUp ); + worldPos = position.y < 0.5 ? start: end; + + // height offset + float hw = linewidth * 0.5; + worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp; + + // don't extend the line if we're rendering dashes because we + // won't be rendering the endcaps + #ifndef USE_DASH + + // cap extension + worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir; + + // add width to the box + worldPos.xyz += worldFwd * hw; + + // endcaps + if ( position.y > 1.0 || position.y < 0.0 ) { + + worldPos.xyz -= worldFwd * 2.0 * hw; + + } + + #endif + + // project the worldpos + vec4 clip = projectionMatrix * worldPos; + + // shift the depth of the projected points so the line + // segments overlap neatly + vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; + clip.z = clipPose.z * clip.w; + + #else + + vec2 offset = vec2( dir.y, - dir.x ); + // undo aspect ratio adjustment + dir.x /= aspect; + offset.x /= aspect; + + // sign flip + if ( position.x < 0.0 ) offset *= - 1.0; + + // endcaps + if ( position.y < 0.0 ) { + + offset += - dir; + + } else if ( position.y > 1.0 ) { + + offset += dir; + + } + + // adjust for linewidth + offset *= linewidth; + + // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... + offset /= resolution.y; + + // select end + vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; + + // back to clip space + offset *= clip.w; + + clip.xy += offset; + + #endif + + gl_Position = clip; + + vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation + + #include + #include + #include + + } + `,fragmentShader:` + uniform vec3 diffuse; + uniform float opacity; + uniform float linewidth; + + #ifdef USE_DASH + + uniform float dashOffset; + uniform float dashSize; + uniform float gapSize; + + #endif + + varying float vLineDistance; + + #ifdef WORLD_UNITS + + varying vec4 worldPos; + varying vec3 worldStart; + varying vec3 worldEnd; + + #ifdef USE_DASH + + varying vec2 vUv; + + #endif + + #else + + varying vec2 vUv; + + #endif + + #include + #include + #include + #include + #include + + vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { + + float mua; + float mub; + + vec3 p13 = p1 - p3; + vec3 p43 = p4 - p3; + + vec3 p21 = p2 - p1; + + float d1343 = dot( p13, p43 ); + float d4321 = dot( p43, p21 ); + float d1321 = dot( p13, p21 ); + float d4343 = dot( p43, p43 ); + float d2121 = dot( p21, p21 ); + + float denom = d2121 * d4343 - d4321 * d4321; + + float numer = d1343 * d4321 - d1321 * d4343; + + mua = numer / denom; + mua = clamp( mua, 0.0, 1.0 ); + mub = ( d1343 + d4321 * ( mua ) ) / d4343; + mub = clamp( mub, 0.0, 1.0 ); + + return vec2( mua, mub ); + + } + + void main() { + + #include + + #ifdef USE_DASH + + if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps + + if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX + + #endif + + float alpha = opacity; + + #ifdef WORLD_UNITS + + // Find the closest points on the view ray and the line segment + vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; + vec3 lineDir = worldEnd - worldStart; + vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); + + vec3 p1 = worldStart + lineDir * params.x; + vec3 p2 = rayEnd * params.y; + vec3 delta = p1 - p2; + float len = length( delta ); + float norm = len / linewidth; + + #ifndef USE_DASH + + #ifdef USE_ALPHA_TO_COVERAGE + + float dnorm = fwidth( norm ); + alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); + + #else + + if ( norm > 0.5 ) { + + discard; + + } + + #endif + + #endif + + #else + + #ifdef USE_ALPHA_TO_COVERAGE + + // artifacts appear on some hardware if a derivative is taken within a conditional + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + float dlen = fwidth( len2 ); + + if ( abs( vUv.y ) > 1.0 ) { + + alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); + + } + + #else + + if ( abs( vUv.y ) > 1.0 ) { + + float a = vUv.x; + float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; + float len2 = a * a + b * b; + + if ( len2 > 1.0 ) discard; + + } + + #endif + + #endif + + vec4 diffuseColor = vec4( diffuse, alpha ); + + #include + #include + + gl_FragColor = vec4( diffuseColor.rgb, alpha ); + + #include + #include + #include + #include + + } + `};new ot;new P;new P;new ot;new ot;new ot;new P;new Oe;new rr;new P;new wt;new rn;new ot;const Nb={type:"change"},Zm={type:"start"},N3={type:"end"},ru=new $r,Ub=new Mr,I9=Math.cos(70*Gy.DEG2RAD),an=new P,Yn=2*Math.PI,At={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},Of=1e-6;let P9=class extends Xv{constructor(e,t=null){super(e,t),this.state=At.NONE,this.target=new P,this.cursor=new P,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:ma.ROTATE,MIDDLE:ma.DOLLY,RIGHT:ma.PAN},this.touches={ONE:oa.ROTATE,TWO:oa.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new P,this._lastQuaternion=new In,this._lastTargetPosition=new P,this._quat=new In().setFromUnitVectors(e.up,new P(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new lp,this._sphericalDelta=new lp,this._scale=1,this._panOffset=new P,this._rotateStart=new re,this._rotateEnd=new re,this._rotateDelta=new re,this._panStart=new re,this._panEnd=new re,this._panDelta=new re,this._dollyStart=new re,this._dollyEnd=new re,this._dollyDelta=new re,this._dollyDirection=new P,this._mouse=new re,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=L9.bind(this),this._onPointerDown=D9.bind(this),this._onPointerUp=N9.bind(this),this._onContextMenu=V9.bind(this),this._onMouseWheel=O9.bind(this),this._onKeyDown=q9.bind(this),this._onTouchStart=B9.bind(this),this._onTouchMove=z9.bind(this),this._onMouseDown=U9.bind(this),this._onMouseMove=F9.bind(this),this._interceptControlDown=G9.bind(this),this._interceptControlUp=H9.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Nb),this.update(),this.state=At.NONE}update(e=null){const t=this.object.position;an.copy(t).sub(this.target),an.applyQuaternion(this._quat),this._spherical.setFromVector3(an),this.autoRotate&&this.state===At.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,i=this.maxAzimuthAngle;isFinite(n)&&isFinite(i)&&(n<-Math.PI?n+=Yn:n>Math.PI&&(n-=Yn),i<-Math.PI?i+=Yn:i>Math.PI&&(i-=Yn),n<=i?this._spherical.theta=Math.max(n,Math.min(i,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+i)/2?Math.max(n,this._spherical.theta):Math.min(i,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const a=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=a!=this._spherical.radius}if(an.setFromSpherical(this._spherical),an.applyQuaternion(this._quatInverse),t.copy(this.target).add(an),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let a=null;if(this.object.isPerspectiveCamera){const o=an.length();a=this._clampDistance(o*this._scale);const l=o-a;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),s=!!l}else if(this.object.isOrthographicCamera){const o=new P(this._mouse.x,this._mouse.y,0);o.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=l!==this.object.zoom;const c=new P(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(o),this.object.updateMatrixWorld(),a=an.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;a!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position):(ru.origin.copy(this.object.position),ru.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(ru.direction))Of||8*(1-this._lastQuaternion.dot(this.object.quaternion))>Of||this._lastTargetPosition.distanceToSquared(this.target)>Of?(this.dispatchEvent(Nb),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?Yn/60*this.autoRotateSpeed*e:Yn/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){an.setFromMatrixColumn(t,0),an.multiplyScalar(-e),this._panOffset.add(an)}_panUp(e,t){this.screenSpacePanning===!0?an.setFromMatrixColumn(t,1):(an.setFromMatrixColumn(t,0),an.crossVectors(this.object.up,an)),an.multiplyScalar(e),this._panOffset.add(an)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;an.copy(i).sub(this.target);let s=an.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*s/n.clientHeight,this.object.matrix),this._panUp(2*t*s/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),i=e-n.left,s=t-n.top,a=n.width,o=n.height;this._mouse.x=i/a*2-1,this._mouse.y=-(s/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Yn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Yn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(Yn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-Yn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(Yn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-Yn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._rotateStart.set(n,i)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panStart.set(n,i)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,s=Math.sqrt(n*n+i*i);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),s=.5*(e.pageY+n.y);this._rotateEnd.set(i,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Yn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Yn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panEnd.set(n,i)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,s=Math.sqrt(n*n+i*i);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;tok("threlte-controls",{orbitControls:No(void 0),trackballControls:No(void 0)});function X9(r,e){_n(e,!0);const t=()=>G_(o,"$parent",n),[n,i]=H_();let s=mt(e,"ref",15),a=ir(e,["$$slots","$$events","$$legacy","ref","children"]);const o=a3(),{dom:l,invalidate:c}=lh();if(!zr(t(),"Camera"))throw new Error("Parent missing: need to be a child of a ");const d=new P9(t(),l),{orbitControls:u}=W9(),{start:h,stop:f}=o3(()=>{d.update()},{autoStart:!1,autoInvalidate:!1});gn(()=>{e.autoRotate||e.enableDamping?h():f()}),gn(()=>{const m=x=>{c(),e.onchange?.(x)};return u.set(d),d.addEventListener("change",m),()=>{u.set(void 0),d.removeEventListener("change",m)}}),ds(r,Zp({get is(){return d}},()=>a,{get ref(){return s()},set ref(m){s(m)},children:(m,x)=>{var g=Rt(),p=yt(g);ln(p,()=>e.children??zt,()=>({ref:d})),We(m,g)},$$slots:{default:!0}})),wn(),i()}new Oe;new Oe;new en;`${je.logdepthbuf_pars_vertex}${je.fog_pars_vertex}${je.logdepthbuf_vertex}${je.fog_vertex}`;`${je.tonemapping_fragment}${je.colorspace_fragment}`;`${je.tonemapping_fragment}${je.colorspace_fragment}`;`${I7}${P7}${je.tonemapping_fragment}${je.colorspace_fragment}`;new wt;typeof window<"u"&&document.createElement("div");class Y9{#e;#t;constructor(e,t){this.#e=e,this.#t=Bp(t)}get current(){return this.#t(),this.#e()}}const Z9=/\(.+\)/,$9=new Set(["all","print","screen","and","or","not","only"]);class j9 extends Y9{constructor(e,t){let n=Z9.test(e)||e.split(/[\s,]+/).some(s=>$9.has(s.trim()))?e:`(${e})`;const i=window.matchMedia(n);super(()=>i.matches,s=>y_(i,"change",s))}}for(let r=0;r<256;r++)(r<16?"0":"")+r.toString(16);new Oc(-1,1,1,-1,0,1);class K9 extends st{constructor(){super(),this.setAttribute("position",new Ie([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new Ie([0,2,0,0,2,0],2))}}new K9;var U3={exports:{}};U3.exports=hh;U3.exports.default=hh;function hh(r,e,t){t=t||2;var n=e&&e.length,i=n?e[0]*t:r.length,s=F3(r,0,i,t,!0),a=[];if(!s||s.next===s.prev)return a;var o,l,c,d,u,h,f;if(n&&(s=nR(r,e,s,t)),r.length>80*t){o=c=r[0],l=d=r[1];for(var m=t;mc&&(c=u),h>d&&(d=h);f=Math.max(c-o,d-l),f=f!==0?32767/f:0}return wc(s,a,t,o,l,f,0),a}function F3(r,e,t,n,i){var s,a;if(i===Rp(r,e,t,n)>0)for(s=e;s=e;s-=n)a=Fb(s,r[s],r[s+1],a);return a&&fh(a,a.next)&&(Mc(a),a=a.next),a}function Pa(r,e){if(!r)return r;e||(e=r);var t=r,n;do if(n=!1,!t.steiner&&(fh(t,t.next)||Gt(t.prev,t,t.next)===0)){if(Mc(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function wc(r,e,t,n,i,s,a){if(r){!a&&s&&oR(r,n,i,s);for(var o=r,l,c;r.prev!==r.next;){if(l=r.prev,c=r.next,s?Q9(r,n,i,s):J9(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(c.i/t|0),Mc(r),r=c.next,o=c.next;continue}if(r=c,r===o){a?a===1?(r=eR(Pa(r),e,t),wc(r,e,t,n,i,s,2)):a===2&&tR(r,e,t,n,i,s):wc(Pa(r),e,t,n,i,s,1);break}}}}function J9(r){var e=r.prev,t=r,n=r.next;if(Gt(e,t,n)>=0)return!1;for(var i=e.x,s=t.x,a=n.x,o=e.y,l=t.y,c=n.y,d=is?i>a?i:a:s>a?s:a,f=o>l?o>c?o:c:l>c?l:c,m=n.next;m!==e;){if(m.x>=d&&m.x<=h&&m.y>=u&&m.y<=f&&Co(i,o,s,l,a,c,m.x,m.y)&&Gt(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function Q9(r,e,t,n){var i=r.prev,s=r,a=r.next;if(Gt(i,s,a)>=0)return!1;for(var o=i.x,l=s.x,c=a.x,d=i.y,u=s.y,h=a.y,f=ol?o>c?o:c:l>c?l:c,g=d>u?d>h?d:h:u>h?u:h,p=Ep(f,m,e,t,n),v=Ep(x,g,e,t,n),b=r.prevZ,y=r.nextZ;b&&b.z>=p&&y&&y.z<=v;){if(b.x>=f&&b.x<=x&&b.y>=m&&b.y<=g&&b!==i&&b!==a&&Co(o,d,l,u,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0||(b=b.prevZ,y.x>=f&&y.x<=x&&y.y>=m&&y.y<=g&&y!==i&&y!==a&&Co(o,d,l,u,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;b&&b.z>=p;){if(b.x>=f&&b.x<=x&&b.y>=m&&b.y<=g&&b!==i&&b!==a&&Co(o,d,l,u,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=v;){if(y.x>=f&&y.x<=x&&y.y>=m&&y.y<=g&&y!==i&&y!==a&&Co(o,d,l,u,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function eR(r,e,t){var n=r;do{var i=n.prev,s=n.next.next;!fh(i,s)&&O3(i,n,n.next,s)&&Sc(i,s)&&Sc(s,i)&&(e.push(i.i/t|0),e.push(n.i/t|0),e.push(s.i/t|0),Mc(n),Mc(n.next),n=r=s),n=n.next}while(n!==r);return Pa(n)}function tR(r,e,t,n,i,s){var a=r;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&dR(a,o)){var l=q3(a,o);a=Pa(a,a.next),l=Pa(l,l.next),wc(a,e,t,n,i,s,0),wc(l,e,t,n,i,s,0);return}o=o.next}a=a.next}while(a!==r)}function nR(r,e,t,n){var i=[],s,a,o,l,c;for(s=0,a=e.length;s=t.next.y&&t.next.y!==t.y){var o=t.x+(i-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=n&&o>s&&(s=o,a=t.x=t.x&&t.x>=c&&n!==t.x&&Co(ia.x||t.x===a.x&&aR(a,t)))&&(a=t,u=h)),t=t.next;while(t!==l);return a}function aR(r,e){return Gt(r.prev,r,e.prev)<0&&Gt(e.next,r,r.next)<0}function oR(r,e,t,n){var i=r;do i.z===0&&(i.z=Ep(i.x,i.y,e,t,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,lR(i)}function lR(r){var e,t,n,i,s,a,o,l,c=1;do{for(t=r,r=null,s=null,a=0;t;){for(a++,n=t,o=0,e=0;e0||l>0&&n;)o!==0&&(l===0||!n||t.z<=n.z)?(i=t,t=t.nextZ,o--):(i=n,n=n.nextZ,l--),s?s.nextZ=i:r=i,i.prevZ=s,s=i;t=n}s.nextZ=null,c*=2}while(a>1);return r}function Ep(r,e,t,n,i){return r=(r-t)*i|0,e=(e-n)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function cR(r){var e=r,t=r;do(e.x=(r-a)*(s-o)&&(r-a)*(n-o)>=(t-a)*(e-o)&&(t-a)*(s-o)>=(i-a)*(n-o)}function dR(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!uR(r,e)&&(Sc(r,e)&&Sc(e,r)&&hR(r,e)&&(Gt(r.prev,r,e.prev)||Gt(r,e.prev,e))||fh(r,e)&&Gt(r.prev,r,r.next)>0&&Gt(e.prev,e,e.next)>0)}function Gt(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function fh(r,e){return r.x===e.x&&r.y===e.y}function O3(r,e,t,n){var i=su(Gt(r,e,t)),s=su(Gt(r,e,n)),a=su(Gt(t,n,r)),o=su(Gt(t,n,e));return!!(i!==s&&a!==o||i===0&&iu(r,t,e)||s===0&&iu(r,n,e)||a===0&&iu(t,r,n)||o===0&&iu(t,e,n))}function iu(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function su(r){return r>0?1:r<0?-1:0}function uR(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&O3(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function Sc(r,e){return Gt(r.prev,r,r.next)<0?Gt(r,e,r.next)>=0&&Gt(r,r.prev,e)>=0:Gt(r,e,r.prev)<0||Gt(r,r.next,e)<0}function hR(r,e){var t=r,n=!1,i=(r.x+e.x)/2,s=(r.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&i<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==r);return n}function q3(r,e){var t=new Cp(r.i,r.x,r.y),n=new Cp(e.i,e.x,e.y),i=r.next,s=e.prev;return r.next=e,e.prev=r,t.next=i,i.prev=t,n.next=t,t.prev=n,s.next=n,n.prev=s,n}function Fb(r,e,t,n){var i=new Cp(r,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Mc(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Cp(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}hh.deviation=function(r,e,t,n){var i=e&&e.length,s=i?e[0]*t:r.length,a=Math.abs(Rp(r,0,s,t));if(i)for(var o=0,l=e.length;o0&&(n+=r[i-1].length,t.holes.push(n))}return t};new re;new re;var Ob;(r=>{function e(i){let s=i.slice();return s.sort(r.POINT_COMPARATOR),r.makeHullPresorted(s)}r.makeHull=e;function t(i){if(i.length<=1)return i.slice();let s=[];for(let o=0;o=2;){const c=s[s.length-1],d=s[s.length-2];if((c.x-d.x)*(l.y-d.y)>=(c.y-d.y)*(l.x-d.x))s.pop();else break}s.push(l)}s.pop();let a=[];for(let o=i.length-1;o>=0;o--){const l=i[o];for(;a.length>=2;){const c=a[a.length-1],d=a[a.length-2];if((c.x-d.x)*(l.y-d.y)>=(c.y-d.y)*(l.x-d.x))a.pop();else break}a.push(l)}return a.pop(),s.length==1&&a.length==1&&s[0].x==a[0].x&&s[0].y==a[0].y?s:s.concat(a)}r.makeHullPresorted=t;function n(i,s){return i.xs.x?1:i.ys.y?1:0}r.POINT_COMPARATOR=n})(Ob||(Ob={}));new ji;new P;new Oe;new $r;new rn;new wt;new P;new P;var fR=Ht(" ",1),pR=Ht(" ",1);function mR(r,e){_n(e,!0);const t=2;let n=Ut(void 0),i=Ut(void 0),s=Ut(void 0),a,o=!1;k0(()=>(X(n)&&X(n).computeVertexNormals(),setTimeout(()=>{e.cameraState&&X(i)&&X(s)&&l(e.cameraState),o=!0,X(s)&&X(s).addEventListener("change",d)},100),()=>{X(s)&&X(s).removeEventListener("change",d),a&&clearTimeout(a)}));const l=g=>{!X(i)||!X(s)||(X(i).position.set(g.px,g.py,g.pz),X(i).rotation.set(g.rx,g.ry,g.rz),X(s).target.set(g.tx,g.ty,g.tz),X(i).zoom=g.zoom,X(i).updateProjectionMatrix(),X(s).update())},c=()=>{if(!(!X(i)||!X(s)))return{px:X(i).position.x,py:X(i).position.y,pz:X(i).position.z,rx:X(i).rotation.x,ry:X(i).rotation.y,rz:X(i).rotation.z,tx:X(s).target.x,ty:X(s).target.y,tz:X(s).target.z,zoom:X(i).zoom}},d=()=>{o&&e.saveCameraToUrl&&(a&&clearTimeout(a),a=setTimeout(()=>{const g=c();g&&Vm(e.componentName,g)},500))};Hi(()=>{if(e.componentName,o=!1,X(i)&&X(s)){const g=t*e.volume;X(i).position.set(g,g,g),X(i).rotation.set(0,0,0),X(s).target.set(0,0,0),X(i).zoom=1,X(i).updateProjectionMatrix(),X(s).update()}});var u=pR(),h=yt(u);{let g=Ye(()=>[t*e.volume,t*e.volume,t*e.volume]);Ds(h,()=>ds.PerspectiveCamera,(p,v)=>{v(p,{makeDefault:!0,get position(){return X(g)},get ref(){return X(i)},set ref(b){It(i,b,!0)},children:(b,y)=>{X9(b,{get ref(){return X(s)},set ref(_){It(s,_,!0)}})},$$slots:{default:!0}})})}var f=Ft(h,2);{let g=Ye(()=>[0,1*e.volume,2*e.volume]);Ds(f,()=>ds.PointLight,(p,v)=>{v(p,{decay:.1,intensity:1,get position(){return X(g)}})})}var m=Ft(f,2);Ds(m,()=>ds.AmbientLight,(g,p)=>{p(g,{color:"white",intensity:.5})});var x=Ft(m,2);Ds(x,()=>ds.Mesh,(g,p)=>{p(g,{children:(v,b)=>{var y=fR(),_=yt(y);Ds(_,()=>ds.BufferGeometry,(T,A)=>{A(T,{get ref(){return X(n)},set ref(M){It(n,M,!0)},children:(M,S)=>{var E=Rt(),I=yt(E);{let O=Ye(()=>[e.solid.getVertices(),3]);Ds(I,()=>ds.BufferAttribute,(q,z)=>{z(q,{get args(){return X(O)},attach:"attributes.position"})})}We(M,E)},$$slots:{default:!0}})});var w=Ft(_,2);Ds(w,()=>ds.MeshPhongMaterial,(T,A)=>{A(T,{get color(){return e.solid.color},get side(){return Kn},get wireframe(){return e.wireframe}})}),We(v,y)},$$slots:{default:!0}})}),We(r,u),wn()}const gR=(r,e)=>{const t=new Array(r.length+e.length);for(let n=0;n({classGroupId:r,validator:e}),B3=(r=new Map,e=null,t)=>({nextPart:r,validators:e,classGroupId:t}),y0="-",qb=[],bR="arbitrary..",yR=r=>{const e=_R(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return vR(a);const o=a.split(y0),l=o[0]===""&&o.length>1?1:0;return z3(o,l,e)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=n[a],c=t[a];return l?c?gR(c,l):l:c||qb}return t[a]||qb}}},z3=(r,e,t)=>{if(r.length-e===0)return t.classGroupId;const i=r[e],s=t.nextPart.get(i);if(s){const c=z3(r,e+1,s);if(c)return c}const a=t.validators;if(a===null)return;const o=e===0?r.join(y0):r.slice(e).join(y0),l=a.length;for(let c=0;cr.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=r.slice(1,-1),t=e.indexOf(":"),n=e.slice(0,t);return n?bR+n:void 0})(),_R=r=>{const{theme:e,classGroups:t}=r;return wR(t,e)},wR=(r,e)=>{const t=B3();for(const n in r){const i=r[n];$m(i,t,n,e)}return t},$m=(r,e,t,n)=>{const i=r.length;for(let s=0;s{if(typeof r=="string"){MR(r,e,t);return}if(typeof r=="function"){TR(r,e,t,n);return}AR(r,e,t,n)},MR=(r,e,t)=>{const n=r===""?e:V3(e,r);n.classGroupId=t},TR=(r,e,t,n)=>{if(kR(r)){$m(r(n),e,t,n);return}e.validators===null&&(e.validators=[]),e.validators.push(xR(t,r))},AR=(r,e,t,n)=>{const i=Object.entries(r),s=i.length;for(let a=0;a{let t=r;const n=e.split(y0),i=n.length;for(let s=0;s"isThemeGetter"in r&&r.isThemeGetter===!0,ER=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),n=Object.create(null);const i=(s,a)=>{t[s]=a,e++,e>r&&(e=0,n=t,t=Object.create(null))};return{get(s){let a=t[s];if(a!==void 0)return a;if((a=n[s])!==void 0)return i(s,a),a},set(s,a){s in t?t[s]=a:i(s,a)}}},Ip="!",Bb=":",CR=[],zb=(r,e,t,n,i)=>({modifiers:r,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:n,isExternal:i}),RR=r=>{const{prefix:e,experimentalParseClassName:t}=r;let n=i=>{const s=[];let a=0,o=0,l=0,c;const d=i.length;for(let x=0;xl?c-l:void 0;return zb(s,f,h,m)};if(e){const i=e+Bb,s=n;n=a=>a.startsWith(i)?s(a.slice(i.length)):zb(CR,!1,a,void 0,!0)}if(t){const i=n;n=s=>t({className:s,parseClassName:i})}return n},IR=r=>{const e=new Map;return r.orderSensitiveModifiers.forEach((t,n)=>{e.set(t,1e6+n)}),t=>{const n=[];let i=[];for(let s=0;s0&&(i.sort(),n.push(...i),i=[]),n.push(a)):i.push(a)}return i.length>0&&(i.sort(),n.push(...i)),n}},PR=r=>({cache:ER(r.cacheSize),parseClassName:RR(r),sortModifiers:IR(r),...yR(r)}),DR=/\s+/,LR=(r,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:s}=e,a=[],o=r.trim().split(DR);let l="";for(let c=o.length-1;c>=0;c-=1){const d=o[c],{isExternal:u,modifiers:h,hasImportantModifier:f,baseClassName:m,maybePostfixModifierPosition:x}=t(d);if(u){l=d+(l.length>0?" "+l:l);continue}let g=!!x,p=n(g?m.substring(0,x):m);if(!p){if(!g){l=d+(l.length>0?" "+l:l);continue}if(p=n(m),!p){l=d+(l.length>0?" "+l:l);continue}g=!1}const v=h.length===0?"":h.length===1?h[0]:s(h).join(":"),b=f?v+Ip:v,y=b+p;if(a.indexOf(y)>-1)continue;a.push(y);const _=i(p,g);for(let w=0;w<_.length;++w){const T=_[w];a.push(b+T)}l=d+(l.length>0?" "+l:l)}return l},NR=(...r)=>{let e=0,t,n,i="";for(;e{if(typeof r=="string")return r;let e,t="";for(let n=0;n{let t,n,i,s;const a=l=>{const c=e.reduce((d,u)=>u(d),r());return t=PR(c),n=t.cache.get,i=t.cache.set,s=o,o(l)},o=l=>{const c=n(l);if(c)return c;const d=LR(l,t);return i(l,d),d};return s=a,(...l)=>s(NR(...l))},UR=[],on=r=>{const e=t=>t[r]||UR;return e.isThemeGetter=!0,e},H3=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,W3=/^\((?:(\w[\w-]*):)?(.+)\)$/i,FR=/^\d+\/\d+$/,OR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qR=/\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$/,BR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,VR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wo=r=>FR.test(r),ut=r=>!!r&&!Number.isNaN(Number(r)),cs=r=>!!r&&Number.isInteger(Number(r)),qf=r=>r.endsWith("%")&&ut(r.slice(0,-1)),ki=r=>OR.test(r),GR=()=>!0,HR=r=>qR.test(r)&&!BR.test(r),X3=()=>!1,WR=r=>zR.test(r),XR=r=>VR.test(r),YR=r=>!qe(r)&&!Be(r),ZR=r=>nl(r,$3,X3),qe=r=>H3.test(r),ea=r=>nl(r,j3,HR),Bf=r=>nl(r,QR,ut),Vb=r=>nl(r,Y3,X3),$R=r=>nl(r,Z3,XR),au=r=>nl(r,K3,WR),Be=r=>W3.test(r),Rl=r=>rl(r,j3),jR=r=>rl(r,eI),Gb=r=>rl(r,Y3),KR=r=>rl(r,$3),JR=r=>rl(r,Z3),ou=r=>rl(r,K3,!0),nl=(r,e,t)=>{const n=H3.exec(r);return n?n[1]?e(n[1]):t(n[2]):!1},rl=(r,e,t=!1)=>{const n=W3.exec(r);return n?n[1]?e(n[1]):t:!1},Y3=r=>r==="position"||r==="percentage",Z3=r=>r==="image"||r==="url",$3=r=>r==="length"||r==="size"||r==="bg-size",j3=r=>r==="length",QR=r=>r==="number",eI=r=>r==="family-name",K3=r=>r==="shadow",Dp=()=>{const r=on("color"),e=on("font"),t=on("text"),n=on("font-weight"),i=on("tracking"),s=on("leading"),a=on("breakpoint"),o=on("container"),l=on("spacing"),c=on("radius"),d=on("shadow"),u=on("inset-shadow"),h=on("text-shadow"),f=on("drop-shadow"),m=on("blur"),x=on("perspective"),g=on("aspect"),p=on("ease"),v=on("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...y(),Be,qe],w=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],A=()=>[Be,qe,l],M=()=>[wo,"full","auto",...A()],S=()=>[cs,"none","subgrid",Be,qe],E=()=>["auto",{span:["full",cs,Be,qe]},cs,Be,qe],I=()=>[cs,"auto",Be,qe],O=()=>["auto","min","max","fr",Be,qe],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],z=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...A()],H=()=>[wo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],F=()=>[r,Be,qe],ie=()=>[...y(),Gb,Vb,{position:[Be,qe]}],ue=()=>["no-repeat",{repeat:["","x","y","space","round"]}],_e=()=>["auto","cover","contain",KR,ZR,{size:[Be,qe]}],Ne=()=>[qf,Rl,ea],Le=()=>["","none","full",c,Be,qe],$=()=>["",ut,Rl,ea],W=()=>["solid","dashed","dotted","double"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],C=()=>[ut,qf,Gb,Vb],Q=()=>["","none",m,Be,qe],ce=()=>["none",ut,Be,qe],j=()=>["none",ut,Be,qe],fe=()=>[ut,Be,qe],ye=()=>[wo,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ki],breakpoint:[ki],color:[GR],container:[ki],"drop-shadow":[ki],ease:["in","out","in-out"],font:[YR],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ki],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ki],shadow:[ki],spacing:["px",ut],text:[ki],"text-shadow":[ki],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wo,qe,Be,g]}],container:["container"],columns:[{columns:[ut,qe,Be,o]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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"],sr:["sr-only","not-sr-only"],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:_()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[cs,"auto",Be,qe]}],basis:[{basis:[wo,"full","auto",o,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ut,wo,"auto","initial","none",qe]}],grow:[{grow:["",ut,Be,qe]}],shrink:[{shrink:["",ut,Be,qe]}],order:[{order:[cs,"first","last","none",Be,qe]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":O()}],"auto-rows":[{"auto-rows":O()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...z(),"normal"]}],"justify-self":[{"justify-self":["auto",...z()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...z(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...z(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...z(),"baseline"]}],"place-self":[{"place-self":["auto",...z()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],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":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[o,"screen",...H()]}],"min-w":[{"min-w":[o,"screen","none",...H()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",t,Rl,ea]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Be,Bf]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qf,qe]}],"font-family":[{font:[jR,qe,e]}],"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:[i,Be,qe]}],"line-clamp":[{"line-clamp":[ut,"none",Be,Bf]}],leading:[{leading:[s,...A()]}],"list-image":[{"list-image":["none",Be,qe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Be,qe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[ut,"from-font","auto",Be,ea]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[ut,"auto",Be,qe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be,qe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be,qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ue()}],"bg-size":[{bg:_e()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cs,Be,qe],radial:["",Be,qe],conic:[cs,Be,qe]},JR,$R]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:Ne()}],"gradient-via-pos":[{via:Ne()}],"gradient-to-pos":[{to:Ne()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:Le()}],"rounded-s":[{"rounded-s":Le()}],"rounded-e":[{"rounded-e":Le()}],"rounded-t":[{"rounded-t":Le()}],"rounded-r":[{"rounded-r":Le()}],"rounded-b":[{"rounded-b":Le()}],"rounded-l":[{"rounded-l":Le()}],"rounded-ss":[{"rounded-ss":Le()}],"rounded-se":[{"rounded-se":Le()}],"rounded-ee":[{"rounded-ee":Le()}],"rounded-es":[{"rounded-es":Le()}],"rounded-tl":[{"rounded-tl":Le()}],"rounded-tr":[{"rounded-tr":Le()}],"rounded-br":[{"rounded-br":Le()}],"rounded-bl":[{"rounded-bl":Le()}],"border-w":[{border:$()}],"border-w-x":[{"border-x":$()}],"border-w-y":[{"border-y":$()}],"border-w-s":[{"border-s":$()}],"border-w-e":[{"border-e":$()}],"border-w-t":[{"border-t":$()}],"border-w-r":[{"border-r":$()}],"border-w-b":[{"border-b":$()}],"border-w-l":[{"border-l":$()}],"divide-x":[{"divide-x":$()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":$()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ut,Be,qe]}],"outline-w":[{outline:["",ut,Rl,ea]}],"outline-color":[{outline:F()}],shadow:[{shadow:["","none",d,ou,au]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":["none",u,ou,au]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[ut,ea]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":$()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":["none",h,ou,au]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[ut,Be,qe]}],"mix-blend":[{"mix-blend":[...L(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":L()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ut]}],"mask-image-linear-from-pos":[{"mask-linear-from":C()}],"mask-image-linear-to-pos":[{"mask-linear-to":C()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":C()}],"mask-image-t-to-pos":[{"mask-t-to":C()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":C()}],"mask-image-r-to-pos":[{"mask-r-to":C()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":C()}],"mask-image-b-to-pos":[{"mask-b-to":C()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":C()}],"mask-image-l-to-pos":[{"mask-l-to":C()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":C()}],"mask-image-x-to-pos":[{"mask-x-to":C()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":C()}],"mask-image-y-to-pos":[{"mask-y-to":C()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[Be,qe]}],"mask-image-radial-from-pos":[{"mask-radial-from":C()}],"mask-image-radial-to-pos":[{"mask-radial-to":C()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[ut]}],"mask-image-conic-from-pos":[{"mask-conic-from":C()}],"mask-image-conic-to-pos":[{"mask-conic-to":C()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ue()}],"mask-size":[{mask:_e()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Be,qe]}],filter:[{filter:["","none",Be,qe]}],blur:[{blur:Q()}],brightness:[{brightness:[ut,Be,qe]}],contrast:[{contrast:[ut,Be,qe]}],"drop-shadow":[{"drop-shadow":["","none",f,ou,au]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:["",ut,Be,qe]}],"hue-rotate":[{"hue-rotate":[ut,Be,qe]}],invert:[{invert:["",ut,Be,qe]}],saturate:[{saturate:[ut,Be,qe]}],sepia:[{sepia:["",ut,Be,qe]}],"backdrop-filter":[{"backdrop-filter":["","none",Be,qe]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ut,Be,qe]}],"backdrop-contrast":[{"backdrop-contrast":[ut,Be,qe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ut,Be,qe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ut,Be,qe]}],"backdrop-invert":[{"backdrop-invert":["",ut,Be,qe]}],"backdrop-opacity":[{"backdrop-opacity":[ut,Be,qe]}],"backdrop-saturate":[{"backdrop-saturate":[ut,Be,qe]}],"backdrop-sepia":[{"backdrop-sepia":["",ut,Be,qe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Be,qe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ut,"initial",Be,qe]}],ease:[{ease:["linear","initial",p,Be,qe]}],delay:[{delay:[ut,Be,qe]}],animate:[{animate:["none",v,Be,qe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Be,qe]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:ce()}],"rotate-x":[{"rotate-x":ce()}],"rotate-y":[{"rotate-y":ce()}],"rotate-z":[{"rotate-z":ce()}],scale:[{scale:j()}],"scale-x":[{"scale-x":j()}],"scale-y":[{"scale-y":j()}],"scale-z":[{"scale-z":j()}],"scale-3d":["scale-3d"],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[Be,qe,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:F()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Be,qe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",Be,qe]}],fill:[{fill:["none",...F()]}],"stroke-w":[{stroke:[ut,Rl,ea,Bf]}],stroke:[{stroke:["none",...F()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},tI=(r,{cacheSize:e,prefix:t,experimentalParseClassName:n,extend:i={},override:s={}})=>(ql(r,"cacheSize",e),ql(r,"prefix",t),ql(r,"experimentalParseClassName",n),lu(r.theme,s.theme),lu(r.classGroups,s.classGroups),lu(r.conflictingClassGroups,s.conflictingClassGroups),lu(r.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),ql(r,"orderSensitiveModifiers",s.orderSensitiveModifiers),cu(r.theme,i.theme),cu(r.classGroups,i.classGroups),cu(r.conflictingClassGroups,i.conflictingClassGroups),cu(r.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),J3(r,i,"orderSensitiveModifiers"),r),ql=(r,e,t)=>{t!==void 0&&(r[e]=t)},lu=(r,e)=>{if(e)for(const t in e)ql(r,t,e[t])},cu=(r,e)=>{if(e)for(const t in e)J3(r,e,t)},J3=(r,e,t)=>{const n=e[t];n!==void 0&&(r[t]=r[t]?r[t].concat(n):n)},nI=(r,...e)=>typeof r=="function"?Pp(Dp,r,...e):Pp(()=>tI(Dp(),r),...e),rI=Pp(Dp);var iI=/\s+/g,sI=r=>typeof r!="string"||!r?r:r.replace(iI," ").trim(),v0=(...r)=>{const e=[],t=n=>{if(!n&&n!==0&&n!==0n)return;if(Array.isArray(n)){for(let s=0,a=n.length;s0?sI(e.join(" ")):void 0},Hb=r=>r===!1?"false":r===!0?"true":r===0?"0":r,$n=r=>{if(!r||typeof r!="object")return!0;for(const e in r)return!1;return!0},aI=(r,e)=>{if(r===e)return!0;if(!r||!e)return!1;const t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(let i=0;i{for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];t in r?r[t]=v0(r[t],n):r[t]=n}return r},Q3=(r,e)=>{for(let t=0;t{const e=[];Q3(r,e);const t=[];for(let n=0;n{const t={};for(const n in r){const i=r[n];if(n in e){const s=e[n];Array.isArray(i)||Array.isArray(s)?t[n]=e2(s,i):typeof i=="object"&&typeof s=="object"&&i&&s?t[n]=Lp(i,s):t[n]=s+" "+i}else t[n]=i}for(const n in e)n in r||(t[n]=e[n]);return t},lI={twMerge:!0,twMergeConfig:{}};function cI(){let r=null,e={},t=!1;return{get cachedTwMerge(){return r},set cachedTwMerge(n){r=n},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(n){e=n},get didTwMergeConfigChange(){return t},set didTwMergeConfigChange(n){t=n},reset(){r=null,e={},t=!1}}}var Di=cI(),dI=r=>{const e=(n,i)=>{const{extend:s=null,slots:a={},variants:o={},compoundVariants:l=[],compoundSlots:c=[],defaultVariants:d={}}=n,u={...lI,...i},h=s?.base?v0(s.base,n?.base):n?.base,f=s?.variants&&!$n(s.variants)?Lp(o,s.variants):o,m=s?.defaultVariants&&!$n(s.defaultVariants)?{...s.defaultVariants,...d}:d;!$n(u.twMergeConfig)&&!aI(u.twMergeConfig,Di.cachedTwMergeConfig)&&(Di.didTwMergeConfigChange=!0,Di.cachedTwMergeConfig=u.twMergeConfig);const x=$n(s?.slots),g=$n(a)?{}:{base:v0(n?.base,x&&s?.base),...a},p=x?g:oI({...s?.slots},$n(g)?{base:n?.base}:g),v=$n(s?.compoundVariants)?l:e2(s?.compoundVariants,l),b=_=>{if($n(f)&&$n(a)&&x)return r(h,_?.class,_?.className)(u);if(v&&!Array.isArray(v))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof v}`);if(c&&!Array.isArray(c))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof c}`);const w=(q,z=f,V=null,H=null)=>{const F=z[q];if(!F||$n(F))return null;const ie=H?.[q]??_?.[q];if(ie===null)return null;const ue=Hb(ie);if(typeof ue=="object")return null;const _e=m?.[q],Ne=ue??Hb(_e);return F[Ne||"false"]},T=()=>{if(!f)return null;const q=Object.keys(f),z=[];for(let V=0;V{if(!f||typeof f!="object")return null;const V=[];for(const H in f){const F=w(H,f,q,z),ie=q==="base"&&typeof F=="string"?F:F&&F[q];ie&&V.push(ie)}return V},M={};for(const q in _){const z=_[q];z!==void 0&&(M[q]=z)}const S=(q,z)=>{const V=typeof _?.[q]=="object"?{[q]:_[q]?.initial}:{};return{...m,...M,...V,...z}},E=(q=[],z)=>{const V=[],H=q.length;for(let F=0;F{const z=E(v,q);if(!Array.isArray(z))return z;const V={},H=r;for(let F=0;F{if(c.length<1)return null;const z={},V=S(null,q);for(let H=0;H{const F=I(H),ie=O(H);return z(p[V],A(V,H),F?F[V]:void 0,ie?ie[V]:void 0,H?.class,H?.className)(u)}}return q}return r(h,T(),E(v),_?.class,_?.className)(u)},y=()=>{if(!(!f||typeof f!="object"))return Object.keys(f)};return b.variantKeys=y(),b.extend=s,b.base=h,b.slots=p,b.variants=f,b.defaultVariants=m,b.compoundSlots=c,b.compoundVariants=v,b};return{tv:e,createTV:n=>(i,s)=>e(i,s?Lp(n,s):n)}},uI=r=>$n(r)?rI:nI({...r,extend:{theme:r.theme,classGroups:r.classGroups,conflictingClassGroupModifiers:r.conflictingClassGroupModifiers,conflictingClassGroups:r.conflictingClassGroups,...r.extend}}),hI=(r,e)=>{const t=v0(r);return!t||!(e?.twMerge??!0)?t:((!Di.cachedTwMerge||Di.didTwMergeConfigChange)&&(Di.didTwMergeConfigChange=!1,Di.cachedTwMerge=uI(Di.cachedTwMergeConfig)),Di.cachedTwMerge(t)||void 0)},fI=(...r)=>e=>hI(r,e),{tv:te}=dI(fI);const pI=te({base:"focus:outline-hidden whitespace-normal disabled:cursor-not-allowed disabled:opacity-50",variants:{color:{primary:"text-primary-500 focus:ring-primary-400 hover:bg-primary-200 dark:hover:bg-primary-800 dark:hover:text-primary-300",secondary:"text-secondary-500 focus:ring-secondary-400 hover:bg-secondary-200 dark:hover:bg-secondary-800 dark:hover:text-secondary-300",gray:"text-gray-500 focus:ring-gray-400 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-gray-300",red:"text-red-500 focus:ring-red-400 hover:bg-red-200 dark:hover:bg-red-800 dark:hover:text-red-300",orange:"text-orange-500 focus:ring-orange-400 hover:bg-orange-200 dark:hover:bg-orange-800 dark:hover:text-orange-300",amber:"text-amber-500 focus:ring-amber-400 hover:bg-amber-200 dark:hover:bg-amber-800 dark:hover:text-amber-300",yellow:"text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:hover:bg-yellow-800 dark:hover:text-yellow-300",lime:"text-lime-500 focus:ring-lime-400 hover:bg-lime-200 dark:hover:bg-lime-800 dark:hover:text-lime-300",green:"text-green-500 focus:ring-green-400 hover:bg-green-200 dark:hover:bg-green-800 dark:hover:text-green-300",emerald:"text-emerald-500 focus:ring-emerald-400 hover:bg-emerald-200 dark:hover:bg-emerald-800 dark:hover:text-emerald-300",teal:"text-teal-500 focus:ring-teal-400 hover:bg-teal-200 dark:hover:bg-teal-800 dark:hover:text-teal-300",cyan:"text-cyan-500 focus:ring-cyan-400 hover:bg-cyan-200 dark:hover:bg-cyan-800 dark:hover:text-cyan-300",sky:"text-sky-500 focus:ring-sky-400 hover:bg-sky-200 dark:hover:bg-sky-800 dark:hover:text-sky-300",blue:"text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800 dark:hover:text-blue-300",indigo:"text-indigo-500 focus:ring-indigo-400 hover:bg-indigo-200 dark:hover:bg-indigo-800 dark:hover:text-indigo-300",violet:"text-violet-500 focus:ring-violet-400 hover:bg-violet-200 dark:hover:bg-violet-800 dark:hover:text-violet-300",purple:"text-purple-500 focus:ring-purple-400 hover:bg-purple-200 dark:hover:bg-purple-800 dark:hover:text-purple-300",fuchsia:"text-fuchsia-500 focus:ring-fuchsia-400 hover:bg-fuchsia-200 dark:hover:bg-fuchsia-800 dark:hover:text-fuchsia-300",pink:"text-pink-500 focus:ring-pink-400 hover:bg-pink-200 dark:hover:bg-pink-800 dark:hover:text-pink-300",rose:"text-rose-500 focus:ring-rose-400 hover:bg-rose-200 dark:hover:bg-rose-800 dark:hover:text-rose-300",none:""},size:{xs:"m-0.5 rounded-xs focus:ring-1 p-0.5",sm:"m-0.5 rounded-sm focus:ring-1 p-0.5",md:"m-0.5 rounded-lg focus:ring-2 p-1.5",lg:"m-0.5 rounded-lg focus:ring-2 p-2.5"}},defaultVariants:{color:"gray",size:"md",href:null},slots:{svg:""},compoundVariants:[{size:"xs",class:{svg:"w-3 h-3"}},{size:"sm",class:{svg:"w-3.5 h-3.5"}},{size:["md","lg"],class:{svg:"w-5 h-5"}},{size:["xs","sm","md","lg"],color:"none",class:"focus:ring-0 rounded-none m-0"}]}),t2=Symbol("dismissable");function mI(r){return zn(t2,{dismiss:r})}function gI(){return sn(t2)}var xI=Ht(' '),bI=Fa(''),yI=Ht(""),vI=Ht(' '),_I=Fa(''),wI=Ht(" ");function SI(r,e){_n(e,!0);let t=mt(e,"color",3,"gray"),n=mt(e,"name",3,"Close"),i=mt(e,"size",3,"md"),s=ir(e,["$$slots","$$events","$$legacy","children","color","onclick","name","ariaLabel","size","class","svgClass"]);const a=Ye(()=>pI({color:t(),size:i()})),o=Ye(()=>X(a).base),l=Ye(()=>X(a).svg),c=gI();function d(x){e.onclick?.(x),!x.defaultPrevented&&c?.dismiss?.(x)}var u=Rt(),h=yt(u);{var f=x=>{var g=yI();fn(g,w=>({type:"button",...s,class:w,onclick:d,"aria-label":e.ariaLabel??n()}),[()=>X(o)({class:Jt(e.class)})]);var p=Pt(g);{var v=w=>{var T=xI(),A=Pt(T);dr(()=>pa(A,n())),We(w,T)};Ot(p,w=>{n()&&w(v)})}var b=Ft(p,2);{var y=w=>{var T=Rt(),A=yt(T);ln(A,()=>e.children),We(w,T)},_=w=>{var T=bI();dr(A=>Ta(T,0,A),[()=>Ma(X(l)({class:e.svgClass}))]),We(w,T)};Ot(b,w=>{e.children?w(y):w(_,!1)})}We(x,g)},m=x=>{var g=wI();fn(g,w=>({...s,onclick:d,class:w,"aria-label":e.ariaLabel??n()}),[()=>X(o)({class:Jt(e.class)})]);var p=Pt(g);{var v=w=>{var T=vI(),A=Pt(T);dr(()=>pa(A,n())),We(w,T)};Ot(p,w=>{n()&&w(v)})}var b=Ft(p,2);{var y=w=>{var T=Rt(),A=yt(T);ln(A,()=>e.children),We(w,T)},_=w=>{var T=_I();dr(A=>Ta(T,0,A),[()=>Ma(X(l)())]),We(w,T)};Ot(b,w=>{e.children?w(y):w(_,!1)})}We(x,g)};Ot(h,x=>{e.href===void 0?x(f):x(m,!1)})}We(r,u),wn()}function Il(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}const MI=r=>r;function jm(r){const e=r-1;return e*e*e+1}function Wb(r){const e=typeof r=="string"&&r.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[r,"px"]}function TI(r,{delay:e=0,duration:t=400,easing:n=MI}={}){const i=+getComputedStyle(r).opacity;return{delay:e,duration:t,easing:n,css:s=>`opacity: ${s*i}`}}function AI(r,{delay:e=0,duration:t=400,easing:n=jm,x:i=0,y:s=0,opacity:a=0}={}){const o=getComputedStyle(r),l=+o.opacity,c=o.transform==="none"?"":o.transform,d=l*(1-a),[u,h]=Wb(i),[f,m]=Wb(s);return{delay:e,duration:t,easing:n,css:(x,g)=>` + transform: ${c} translate(${(1-x)*u}${h}, ${(1-x)*f}${m}); + opacity: ${l-d*g}`}}function Xb(r,{delay:e=0,duration:t=400,easing:n=jm,axis:i="y"}={}){const s=getComputedStyle(r),a=+s.opacity,o=i==="y"?"height":"width",l=parseFloat(s[o]),c=i==="y"?["top","bottom"]:["left","right"],d=c.map(p=>`${p[0].toUpperCase()}${p.slice(1)}`),u=parseFloat(s[`padding${d[0]}`]),h=parseFloat(s[`padding${d[1]}`]),f=parseFloat(s[`margin${d[0]}`]),m=parseFloat(s[`margin${d[1]}`]),x=parseFloat(s[`border${d[0]}Width`]),g=parseFloat(s[`border${d[1]}Width`]);return{delay:e,duration:t,easing:n,css:p=>`overflow: hidden;opacity: ${Math.min(p*20,1)*a};${o}: ${p*l}px;padding-${c[0]}: ${p*u}px;padding-${c[1]}: ${p*h}px;margin-${c[0]}: ${p*f}px;margin-${c[1]}: ${p*m}px;border-${c[0]}-width: ${p*x}px;border-${c[1]}-width: ${p*g}px;min-${o}: 0`}}function kI(r,{delay:e=0,duration:t=400,easing:n=jm,start:i=0,opacity:s=0}={}){const a=getComputedStyle(r),o=+a.opacity,l=a.transform==="none"?"":a.transform,c=1-i,d=o*(1-s);return{delay:e,duration:t,easing:n,css:(u,h)=>` + transform: ${l} scale(${1-c*h}); + opacity: ${o-d*h} + `}}function Ji(r){return sn("theme")?.[r]}te({base:"w-full",variants:{color:{primary:"text-primary-500 dark:text-primary-400",secondary:"text-secondary-500 dark:text-secondary-400"},flush:{true:"",false:"border border-gray-200 dark:border-gray-700 rounded-t-xl"}}});te({slots:{base:"group",button:"flex items-center justify-between w-full font-medium text-left group-first:rounded-t-xl border-gray-200 dark:border-gray-700 border-b",content:"border-b border-gray-200 dark:border-gray-700",active:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800",inactive:"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"},variants:{flush:{true:{button:"py-5",content:"py-5"},false:{button:"p-5 border-s border-e group-first:border-t",content:"p-5 border-s border-e"}},open:{true:{},false:{}}},compoundVariants:[{flush:!0,open:!0,class:{button:"text-gray-900 dark:text-white"}},{flush:!0,open:!1,class:{button:"text-gray-500 dark:text-gray-400"}}],defaultVariants:{flush:!1,open:!1}});Nt(["click"]);te({base:"p-4 gap-3 text-sm",variants:{color:{primary:"bg-primary-50 dark:bg-gray-800 text-primary-800 dark:text-primary-400",secondary:"bg-secondary-50 dark:bg-secondary-800 text-secondary-800 dark:text-secondary-400",gray:"bg-gray-100 text-gray-500 focus:ring-gray-400 dark:bg-gray-700 dark:text-gray-300",red:"bg-red-100 text-red-500 focus:ring-red-400 dark:bg-red-200 dark:text-red-600",orange:"bg-orange-100 text-orange-500 focus:ring-orange-400 dark:bg-orange-200 dark:text-orange-600",amber:"bg-amber-100 text-amber-500 focus:ring-amber-400 dark:bg-amber-200 dark:text-amber-600",yellow:"bg-yellow-100 text-yellow-500 focus:ring-yellow-400 dark:bg-yellow-200 dark:text-yellow-600",lime:"bg-lime-100 text-lime-500 focus:ring-lime-400 dark:bg-lime-200 dark:text-lime-600",green:"bg-green-100 text-green-500 focus:ring-green-400 dark:bg-green-200 dark:text-green-600",emerald:"bg-emerald-100 text-emerald-500 focus:ring-emerald-400 dark:bg-emerald-200 dark:text-emerald-600",teal:"bg-teal-100 text-teal-500 focus:ring-teal-400 dark:bg-teal-200 dark:text-teal-600",cyan:"bg-cyan-100 text-cyan-500 focus:ring-cyan-400 dark:bg-cyan-200 dark:text-cyan-600",sky:"bg-sky-100 text-sky-500 focus:ring-sky-400 dark:bg-sky-200 dark:text-sky-600",blue:"bg-blue-100 text-blue-500 focus:ring-blue-400 dark:bg-blue-200 dark:text-blue-600",indigo:"bg-indigo-100 text-indigo-500 focus:ring-indigo-400 dark:bg-indigo-200 dark:text-indigo-600",violet:"bg-violet-100 text-violet-500 focus:ring-violet-400 dark:bg-violet-200 dark:text-violet-600",purple:"bg-purple-100 text-purple-500 focus:ring-purple-400 dark:bg-purple-200 dark:text-purple-600",fuchsia:"bg-fuchsia-100 text-fuchsia-500 focus:ring-fuchsia-400 dark:bg-fuchsia-200 dark:text-fuchsia-600",pink:"bg-pink-100 text-pink-500 focus:ring-pink-400 dark:bg-pink-200 dark:text-pink-600",rose:"bg-rose-100 text-rose-500 focus:ring-rose-400 dark:bg-rose-200 dark:text-rose-600"},rounded:{true:"rounded-lg"},border:{true:"border"},icon:{true:"flex items-center"},dismissable:{true:"flex items-center"}},compoundVariants:[{border:!0,color:"primary",class:"border-primary-500 dark:border-primary-200 divide-primary-500 dark:divide-primary-200"},{border:!0,color:"secondary",class:"border-secondary-500 dark:border-secondary-200 divide-secondary-500 dark:divide-secondary-200"},{border:!0,color:"gray",class:"border-gray-300 dark:border-gray-800 divide-gray-300 dark:divide-gray-800"},{border:!0,color:"red",class:"border-red-300 dark:border-red-800 divide-red-300 dark:divide-red-800"},{border:!0,color:"orange",class:"border-orange-300 dark:border-orange-800 divide-orange-300 dark:divide-orange-800"},{border:!0,color:"amber",class:"border-amber-300 dark:border-amber-800 divide-amber-300 dark:divide-amber-800"},{border:!0,color:"yellow",class:"border-yellow-300 dark:border-yellow-800 divide-yellow-300 dark:divide-yellow-800"},{border:!0,color:"lime",class:"border-lime-300 dark:border-lime-800 divide-lime-300 dark:divide-lime-800"},{border:!0,color:"green",class:"border-green-300 dark:border-green-800 divide-green-300 dark:divide-green-800"},{border:!0,color:"emerald",class:"border-emerald-300 dark:border-emerald-800 divide-emerald-300 dark:divide-emerald-800"},{border:!0,color:"teal",class:"border-teal-300 dark:border-teal-800 divide-teal-300 dark:divide-teal-800"},{border:!0,color:"cyan",class:"border-cyan-300 dark:border-cyan-800 divide-cyan-300 dark:divide-cyan-800"},{border:!0,color:"sky",class:"border-sky-300 dark:border-sky-800 divide-sky-300 dark:divide-sky-800"},{border:!0,color:"blue",class:"border-blue-300 dark:border-blue-800 divide-blue-300 dark:divide-blue-800"},{border:!0,color:"indigo",class:"border-indigo-300 dark:border-indigo-800 divide-indigo-300 dark:divide-indigo-800"},{border:!0,color:"violet",class:"border-violet-300 dark:border-violet-800 divide-violet-300 dark:divide-violet-800"},{border:!0,color:"purple",class:"border-purple-300 dark:border-purple-800 divide-purple-300 dark:divide-purple-800"},{border:!0,color:"fuchsia",class:"border-fuchsia-300 dark:border-fuchsia-800 divide-fuchsia-300 dark:divide-fuchsia-800"},{border:!0,color:"pink",class:"border-pink-300 dark:border-pink-800 divide-pink-300 dark:divide-pink-800"},{border:!0,color:"rose",class:"border-rose-300 dark:border-rose-800 divide-rose-300 dark:divide-rose-800"}],defaultVariants:{color:"primary",rounded:!0}});te({base:"relative flex items-center justify-center bg-gray-100 dark:bg-gray-600 text-gray-600 dark:text-gray-300",variants:{cornerStyle:{rounded:"rounded-sm",circular:"rounded-full"},border:{true:"p-1 ring-2 ring-gray-300 dark:ring-gray-500",false:""},stacked:{true:"border-2 not-first:-ms-4 border-white dark:border-gray-800",false:""},size:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10",lg:"w-20 h-20",xl:"w-36 h-36"}},defaultVariants:{cornerStyle:"circular",border:!1,stacked:!1,size:"md"}});te({base:"shrink-0",variants:{color:{primary:"bg-primary-500",secondary:"bg-secondary-500",gray:"bg-gray-200",red:"bg-red-500",orange:"bg-orange-600",amber:"bg-amber-500",yellow:"bg-yellow-300",lime:"bg-lime-500",green:"bg-green-500",emerald:"bg-emerald-500",teal:"bg-teal-500",cyan:"bg-cyan-500",sky:"bg-sky-500",blue:"bg-blue-500",indigo:"bg-indigo-500",violet:"bg-violet-500",purple:"bg-purple-500",fuchsia:"bg-fuchsia-500",pink:"bg-pink-500",rose:"bg-rose-500"},size:{xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5",xl:"w-6 h-6"},cornerStyle:{rounded:"rounded-sm",circular:"rounded-full"},border:{true:"border border-gray-300 dark:border-gray-300",false:{}},hasChildren:{true:"inline-flex items-center justify-center",false:{}},placement:{default:"","top-left":"absolute top-0 start-0","top-center":"absolute top-0 start-1/2 -translate-x-1/2 rtl:translate-x-1/2","top-right":"absolute top-0 end-0","center-left":"absolute top-1/2 -translate-y-1/2 start-0",center:"absolute top-1/2 -translate-y-1/2 start-1/2 -translate-x-1/2 rtl:translate-x-1/2","center-right":"absolute top-1/2 -translate-y-1/2 end-0","bottom-left":"absolute bottom-0 start-0","bottom-center":"absolute bottom-0 start-1/2 -translate-x-1/2 rtl:translate-x-1/2","bottom-right":"absolute bottom-0 end-0"},offset:{true:{},false:{}}},compoundVariants:[{placement:"top-left",offset:!0,class:"-translate-x-1/3 rtl:translate-x-1/3 -translate-y-1/3"},{placement:"top-center",offset:!0,class:"-translate-y-1/3"},{placement:"top-right",offset:!0,class:"translate-x-1/3 rtl:-translate-x-1/3 -translate-y-1/3"},{placement:"center-left",offset:!0,class:"-translate-x-1/3 rtl:translate-x-1/3"},{placement:"center-right",offset:!0,class:"translate-x-1/3 rtl:-translate-x-1/3"},{placement:"bottom-left",offset:!0,class:"-translate-x-1/3 rtl:translate-x-1/3 translate-y-1/3"},{placement:"bottom-center",offset:!0,class:"translate-y-1/3"},{placement:"bottom-right",offset:!0,class:"translate-x-1/3 rtl:-translate-x-1/3 translate-y-1/3"}],defaultVariants:{color:"primary",size:"md",cornerStyle:"circular",border:!1,offset:!0,hasChildren:!1}});te({slots:{linkClass:"flex align-middle",base:"font-medium inline-flex items-center justify-center px-2.5 py-0.5"},variants:{color:{primary:{base:"bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-300"},secondary:{base:"bg-secondary-100 text-secondary-800 dark:bg-secondary-900 dark:text-secondary-300"},gray:{base:"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-300"},red:{base:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300"},orange:{base:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-300"},amber:{base:"bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-300"},yellow:{base:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300"},lime:{base:"bg-lime-100 text-lime-800 dark:bg-lime-900 dark:text-lime-300"},green:{base:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300"},emerald:{base:"bg-emerald-100 text-emerald-800 dark:bg-emerald-900 dark:text-emerald-300"},teal:{base:"bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-300"},cyan:{base:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900 dark:text-cyan-300"},sky:{base:"bg-sky-100 text-sky-800 dark:bg-sky-900 dark:text-sky-300"},blue:{base:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300"},indigo:{base:"bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-300"},violet:{base:"bg-violet-100 text-violet-800 dark:bg-violet-900 dark:text-violet-300"},fuchsia:{base:"bg-fuchsia-100 text-fuchsia-800 dark:bg-fuchsia-900 dark:text-fuchsia-300"},purple:{base:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-300"},pink:{base:"bg-pink-100 text-pink-800 dark:bg-pink-900 dark:text-pink-300"},rose:{base:"bg-rose-100 text-rose-800 dark:bg-rose-900 dark:text-rose-300"}},size:{small:"text-xs",large:"text-sm"},border:{true:{base:"border"}},rounded:{true:{base:"rounded-full"},false:"rounded-sm"}},compoundVariants:[{border:!0,color:"primary",class:"dark:bg-transparent dark:text-primary-400 border-primary-400 dark:border-primary-400"},{border:!0,color:"secondary",class:"dark:bg-transparent dark:text-secondary-400 border-secondary-400 dark:border-secondary-400"},{border:!0,color:"gray",class:"dark:bg-transparent dark:text-gray-400 border-gray-400 dark:border-gray-400"},{border:!0,color:"red",class:"dark:bg-transparent dark:text-red-400 border-red-400 dark:border-red-400"},{border:!0,color:"orange",class:"dark:bg-transparent dark:text-orange-400 border-orange-400 dark:border-orange-400"},{border:!0,color:"amber",class:"dark:bg-transparent dark:text-amber-400 border-amber-400 dark:border-amber-400"},{border:!0,color:"yellow",class:"dark:bg-transparent dark:text-yellow-300 border-yellow-300 dark:border-yellow-300"},{border:!0,color:"lime",class:"dark:bg-transparent dark:text-lime-400 border-lime-400 dark:border-lime-400"},{border:!0,color:"green",class:"dark:bg-transparent dark:text-green-400 border-green-400 dark:border-green-400"},{border:!0,color:"emerald",class:"dark:bg-transparent dark:text-emerald-400 border-emerald-400 dark:border-emerald-400"},{border:!0,color:"teal",class:"dark:bg-transparent dark:text-teal-400 border-teal-400 dark:border-teal-400"},{border:!0,color:"cyan",class:"dark:bg-transparent dark:text-cyan-400 border-cyan-400 dark:border-cyan-400"},{border:!0,color:"sky",class:"dark:bg-transparent dark:text-sky-400 border-sky-400 dark:border-sky-400"},{border:!0,color:"blue",class:"dark:bg-transparent dark:text-blue-400 border-blue-400 dark:border-blue-400"},{border:!0,color:"indigo",class:"dark:bg-transparent dark:text-indigo-400 border-indigo-400 dark:border-indigo-400"},{border:!0,color:"violet",class:"dark:bg-transparent dark:text-violet-400 border-violet-400 dark:border-violet-400"},{border:!0,color:"purple",class:"dark:bg-transparent dark:text-purple-400 border-purple-400 dark:border-purple-400"},{border:!0,color:"fuchsia",class:"dark:bg-transparent dark:text-fuchsia-400 border-fuchsia-400 dark:border-fuchsia-400"},{border:!0,color:"pink",class:"dark:bg-transparent dark:text-pink-400 border-pink-400 dark:border-pink-400"},{border:!0,color:"rose",class:"dark:bg-transparent dark:text-rose-400 border-rose-400 dark:border-rose-400"},{href:!0,color:"primary",class:"hover:bg-primary-200"},{href:!0,color:"secondary",class:"hover:bg-secondary-200"},{href:!0,color:"gray",class:"hover:bg-gray-200"},{href:!0,color:"red",class:"hover:bg-red-200"},{href:!0,color:"orange",class:"hover:bg-orange-200"},{href:!0,color:"amber",class:"hover:bg-amber-200"},{href:!0,color:"yellow",class:"hover:bg-yellow-200"},{href:!0,color:"lime",class:"hover:bg-lime-200"},{href:!0,color:"green",class:"hover:bg-green-200"},{href:!0,color:"emerald",class:"hover:bg-emerald-200"},{href:!0,color:"teal",class:"hover:bg-teal-200"},{href:!0,color:"cyan",class:"hover:bg-cyan-200"},{href:!0,color:"sky",class:"hover:bg-sky-200"},{href:!0,color:"blue",class:"hover:bg-blue-200"},{href:!0,color:"indigo",class:"hover:bg-indigo-200"},{href:!0,color:"violet",class:"hover:bg-violet-200"},{href:!0,color:"purple",class:"hover:bg-purple-200"},{href:!0,color:"fuchsia",class:"hover:bg-fuchsia-200"},{href:!0,color:"pink",class:"hover:bg-pink-200"},{href:!0,color:"rose",class:"hover:bg-rose-200"}],defaultVariants:{color:"primary",size:"small",rounded:!1}});te({slots:{base:"fixed z-50 flex justify-between p-4 mx-auto dark:bg-gray-700 dark:border-gray-600",insideDiv:"flex flex-col md:flex-row md:items-center gap-2 mx-auto",dismissable:"absolute end-2.5 top-2.5 md:static md:end-auto md:top-auto"},variants:{type:{top:{base:"top-0 start-0 w-full border-b border-gray-200 bg-gray-50"},bottom:{base:"bottom-0 start-0 w-full border-t border-gray-200 bg-gray-50"}},color:{primary:{base:"bg-primary-50 dark:bg-primary-900"},secondary:{base:"bg-secondary-50 dark:bg-secondary-900"},gray:{base:"bg-gray-50 dark:bg-gray-700"},red:{base:"bg-red-50 dark:bg-red-900"},orange:{base:"bg-orange-50 dark:bg-orange-900"},amber:{base:"bg-amber-50 dark:bg-amber-900"},yellow:{base:"bg-yellow-50 dark:bg-yellow-900"},lime:{base:"bg-lime-50 dark:bg-lime-900"},green:{base:"bg-green-50 dark:bg-green-900"},emerald:{base:"bg-emerald-50 dark:bg-emerald-900"},teal:{base:"bg-teal-50 dark:bg-teal-900"},cyan:{base:"bg-cyan-50 dark:bg-cyan-900"},sky:{base:"bg-sky-50 dark:bg-sky-900"},blue:{base:"bg-blue-50 dark:bg-blue-900"},indigo:{base:"bg-indigo-50 dark:bg-indigo-900"},violet:{base:"bg-violet-50 dark:bg-violet-900"},purple:{base:"bg-purple-50 dark:bg-purple-900"},fuchsia:{base:"bg-fuchsia-50 dark:bg-fuchsia-900"},pink:{base:"bg-pink-50 dark:bg-pink-900"},rose:{base:"bg-rose-50 dark:bg-rose-900"}}},defaultVariants:{type:"top",multiline:!0}});te({slots:{base:"w-full z-30 border-gray-200 dark:bg-gray-700 dark:border-gray-600",inner:"grid h-full max-w-lg mx-auto"},variants:{position:{static:{base:"static"},fixed:{base:"fixed"},absolute:{base:"absolute"},relative:{base:"relative"},sticky:{base:"sticky"}},navType:{default:{base:"bottom-0 start-0 h-16 bg-white border-t"},border:{base:"bottom-0 start-0 h-16 bg-white border-t"},application:{base:"h-16 max-w-lg -translate-x-1/2 rtl:translate-x-1/2 bg-white border rounded-full bottom-4 start-1/2"},pagination:{base:"bottom-0 h-16 -translate-x-1/2 rtl:translate-x-1/2 bg-white border-t start-1/2"},group:{base:"bottom-0 -translate-x-1/2 rtl:translate-x-1/2 bg-white border-t start-1/2"},card:{base:"bottom-0 start-0 h-16 bg-white border-t"},meeting:{base:"bottom-0 start-0 grid h-16 grid-cols-1 px-8 bg-white border-t md:grid-cols-3",inner:"flex items-center justify-center mx-auto"},video:{base:"bottom-0 start-0 grid h-24 grid-cols-1 px-8 bg-white border-t md:grid-cols-3",inner:"flex items-center w-full"}}},defaultVariants:{position:"fixed",navType:"default"}});te({slots:{base:"inline-flex flex-col items-center justify-center",span:"text-sm"},variants:{navType:{default:{base:"px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group",span:"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-500"},border:{base:"px-5 border-gray-200 border-x hover:bg-gray-50 dark:hover:bg-gray-800 group dark:border-gray-600",span:"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-500"},application:{base:"",span:"sr-only"},pagination:{base:"px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group",span:"sr-only"},group:{base:"p-4 hover:bg-gray-50 dark:hover:bg-gray-800 group",span:"sr-only"},card:{base:"px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group",span:"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-500"},meeting:{base:"",span:""},video:{base:"",span:""}},appBtnPosition:{left:{base:"px-5 rounded-s-full hover:bg-gray-50 dark:hover:bg-gray-800 group"},middle:{base:"px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group"},right:{base:"px-5 rounded-e-full hover:bg-gray-50 dark:hover:bg-gray-800 group"}}},defaultVariants:{navType:"default",appBtnPosition:"middle",active:!1}});te({slots:{base:"w-full",innerDiv:"grid max-w-xs grid-cols-3 gap-1 p-1 mx-auto my-2 bg-gray-100 rounded-lg dark:bg-gray-600"}});te({base:"px-5 py-1.5 text-xs font-medium rounded-lg",variants:{active:{true:"text-white bg-gray-900 dark:bg-gray-300 dark:text-gray-900",false:"text-gray-900 hover:bg-gray-200 dark:text-white dark:hover:bg-gray-700"}}});te({slots:{base:"flex",list:"inline-flex items-center space-x-1 rtl:space-x-reverse md:space-x-3 rtl:space-x-reverse"},variants:{solid:{true:{base:"px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700"},false:""}},defaultVariants:{solid:!1}});te({slots:{base:"inline-flex items-center",separator:"h-6 w-6 text-gray-400 rtl:-scale-x-100"},variants:{home:{true:"",false:""},hasHref:{true:"",false:""}},compoundVariants:[{home:!0,class:{base:"inline-flex items-center text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white",separator:"me-2 h-4 w-4"}},{home:!1,hasHref:!0,class:{base:"ms-1 text-sm font-medium text-gray-700 hover:text-gray-900 md:ms-2 dark:text-gray-400 dark:hover:text-white"}},{home:!1,hasHref:!1,class:{base:"ms-1 text-sm font-medium text-gray-500 md:ms-2 dark:text-gray-400"}}]});te({base:"inline-flex rounded-lg shadow-xs",variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}});const EI=te({slots:{base:"text-center font-medium inline-flex items-center justify-center",outline:"bg-transparent border hover:text-white dark:bg-transparent dark:hover-text-white",shadow:"shadow-lg",spinner:"ms-2"},variants:{color:{primary:{base:"text-white bg-primary-700 hover:bg-primary-800 dark:bg-primary-600 dark:hover:bg-primary-700 focus-within:ring-primary-300 dark:focus-within:ring-primary-800",outline:"text-primary-700 border-primary-700 hover:bg-primary-800 dark:border-primary-500 dark:text-primary-500 dark:hover:bg-primary-600",shadow:"shadow-primary-500/50 dark:shadow-primary-800/80"},dark:{base:"text-white bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:hover:bg-gray-700 focus-within:ring-gray-300 dark:focus-within:ring-gray-700",outline:"text-gray-900 border-gray-800 hover:bg-gray-900 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-600",shadow:"shadow-gray-500/50 gray:shadow-gray-800/80"},alternative:{base:"text-gray-900 bg-transparent border border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400 hover:text-primary-700 focus-within:text-primary-700 dark:focus-within:text-white dark:hover:text-white dark:hover:bg-gray-700 focus-within:ring-gray-200 dark:focus-within:ring-gray-700",outline:"text-gray-700 border-gray-700 hover:bg-gray-800 dark:border-gray-400 dark:text-gray-400 dark:hover:bg-gray-500",shadow:"_shadow-gray-500/50 dark:shadow-gray-800/80"},light:{base:"text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 focus-within:ring-gray-200 dark:focus-within:ring-gray-700",outline:"text-gray-700 border-gray-700 hover:bg-gray-800 dark:border-gray-400 dark:text-gray-400 dark:hover:bg-gray-500",shadow:"shadow-gray-500/50 dark:shadow-gray-800/80"},secondary:{base:"text-white bg-secondary-700 hover:bg-secondary-800 dark:bg-secondary-600 dark:hover:bg-secondary-700 focus-within:ring-secondary-300 dark:focus-within:ring-secondary-800",outline:"text-secondary-700 border-secondary-700 hover:bg-secondary-800 dark:border-secondary-400 dark:text-secondary-400 dark:hover:bg-secondary-500",shadow:"shadow-secondary-500/50 dark:shadow-secondary-800/80"},gray:{base:"text-white bg-gray-700 hover:bg-gray-800 dark:bg-gray-600 dark:hover:bg-gray-700 focus-within:ring-gray-300 dark:focus-within:ring-gray-800",outline:"text-gray-700 border-gray-700 hover:bg-gray-800 dark:border-gray-400 dark:text-gray-400 dark:hover:bg-gray-500",shadow:"shadow-gray-500/50 dark:shadow-gray-800/80"},red:{base:"text-white bg-red-700 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700 focus-within:ring-red-300 dark:focus-within:ring-red-900",outline:"text-red-700 border-red-700 hover:bg-red-800 dark:border-red-500 dark:text-red-500 dark:hover:bg-red-600",shadow:"shadow-red-500/50 dark:shadow-red-800/80"},orange:{base:"text-white bg-orange-700 hover:bg-orange-800 dark:bg-orange-600 dark:hover:bg-orange-700 focus-within:ring-orange-300 dark:focus-within:ring-orange-900",outline:"text-orange-700 border-orange-700 hover:bg-orange-800 dark:border-orange-400 dark:text-orange-400 dark:hover:bg-orange-500",shadow:"shadow-orange-500/50 dark:shadow-orange-800/80"},amber:{base:"text-white bg-amber-700 hover:bg-amber-800 dark:bg-amber-600 dark:hover:bg-amber-700 focus-within:ring-amber-300 dark:focus-within:ring-amber-900",outline:"text-amber-700 border-amber-700 hover:bg-amber-800 dark:border-amber-400 dark:text-amber-400 dark:hover:bg-amber-500",shadow:"shadow-amber-500/50 dark:shadow-amber-800/80"},yellow:{base:"text-white bg-yellow-400 hover:bg-yellow-500 focus-within:ring-yellow-300 dark:focus-within:ring-yellow-900",outline:"text-yellow-400 border-yellow-400 hover:bg-yellow-500 dark:border-yellow-300 dark:text-yellow-300 dark:hover:bg-yellow-400",shadow:"shadow-yellow-500/50 dark:shadow-yellow-800/80"},lime:{base:"text-white bg-lime-700 hover:bg-lime-800 dark:bg-lime-600 dark:hover:bg-lime-700 focus-within:ring-lime-300 dark:focus-within:ring-lime-800",outline:"text-lime-700 border-lime-700 hover:bg-lime-800 dark:border-lime-400 dark:text-lime-400 dark:hover:bg-lime-500",shadow:"shadow-lime-500/50 dark:shadow-lime-800/80"},green:{base:"text-white bg-green-700 hover:bg-green-800 dark:bg-green-600 dark:hover:bg-green-700 focus-within:ring-green-300 dark:focus-within:ring-green-800",outline:"text-green-700 border-green-700 hover:bg-green-800 dark:border-green-500 dark:text-green-500 dark:hover:bg-green-600",shadow:"shadow-green-500/50 dark:shadow-green-800/80"},emerald:{base:"text-white bg-emerald-700 hover:bg-emerald-800 dark:bg-emerald-600 dark:hover:bg-emerald-700 focus-within:ring-emerald-300 dark:focus-within:ring-emerald-800",outline:"text-emerald-700 border-emerald-700 hover:bg-emerald-800 dark:border-emerald-400 dark:text-emerald-400 dark:hover:bg-emerald-500",shadow:"shadow-emerald-500/50 dark:shadow-emerald-800/80"},teal:{base:"text-white bg-teal-700 hover:bg-teal-800 dark:bg-teal-600 dark:hover:bg-teal-700 focus-within:ring-teal-300 dark:focus-within:ring-teal-800",outline:"text-teal-700 border-teal-700 hover:bg-teal-800 dark:border-teal-400 dark:text-teal-400 dark:hover:bg-teal-500",shadow:"shadow-teal-500/50 dark:shadow-teal-800/80"},cyan:{base:"text-white bg-cyan-700 hover:bg-cyan-800 dark:bg-cyan-600 dark:hover:bg-cyan-700 focus-within:ring-cyan-300 dark:focus-within:ring-cyan-800",outline:"text-cyan-700 border-cyan-700 hover:bg-cyan-800 dark:border-cyan-400 dark:text-cyan-400 dark:hover:bg-cyan-500",shadow:"shadow-cyan-500/50 dark:shadow-cyan-800/80"},sky:{base:"text-white bg-sky-700 hover:bg-sky-800 dark:bg-sky-600 dark:hover:bg-sky-700 focus-within:ring-sky-300 dark:focus-within:ring-sky-800",outline:"text-sky-700 border-sky-700 hover:bg-sky-800 dark:border-sky-400 dark:text-sky-400 dark:hover:bg-sky-500",shadow:"shadow-sky-500/50 dark:shadow-sky-800/80"},blue:{base:"text-white bg-blue-700 hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700 focus-within:ring-blue-300 dark:focus-within:ring-blue-800",outline:"text-blue-700 border-blue-700 hover:bg-blue-800 dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-500",shadow:"shadow-blue-500/50 dark:shadow-blue-800/80"},indigo:{base:"text-white bg-indigo-700 hover:bg-indigo-800 dark:bg-indigo-600 dark:hover:bg-indigo-700 focus-within:ring-indigo-300 dark:focus-within:ring-indigo-800",outline:"text-indigo-700 border-indigo-700 hover:bg-indigo-800 dark:border-indigo-400 dark:text-indigo-400 dark:hover:bg-indigo-500",shadow:"shadow-indigo-500/50 dark:shadow-indigo-800/80"},violet:{base:"text-white bg-violet-700 hover:bg-violet-800 dark:bg-violet-600 dark:hover:bg-violet-700 focus-within:ring-violet-300 dark:focus-within:ring-violet-800",outline:"text-violet-700 border-violet-700 hover:bg-violet-800 dark:border-violet-400 dark:text-violet-400 dark:hover:bg-violet-500",shadow:"shadow-violet-500/50 dark:shadow-violet-800/80"},purple:{base:"text-white bg-purple-700 hover:bg-purple-800 dark:bg-purple-600 dark:hover:bg-purple-700",outline:"text-purple-700 border-purple-700 hover:bg-purple-800 dark:border-purple-400 dark:text-purple-400 dark:hover:bg-purple-500",shadow:"shadow-purple-500/50 dark:shadow-purple-800/80"},fuchsia:{base:"text-white bg-fuchsia-700 hover:bg-fuchsia-800 dark:bg-fuchsia-600 dark:hover:bg-fuchsia-700",outline:"text-fuchsia-700 border-fuchsia-700 hover:bg-fuchsia-800 dark:border-fuchsia-400 dark:text-fuchsia-400 dark:hover:bg-fuchsia-500",shadow:"shadow-fuchsia-500/50 dark:shadow-fuchsia-800/80"},pink:{base:"text-white bg-pink-700 hover:bg-pink-800 dark:bg-pink-600 dark:hover:bg-pink-700",outline:"text-pink-700 border-pink-700 hover:bg-pink-800 dark:border-pink-400 dark:text-pink-400 dark:hover:bg-pink-500",shadow:"shadow-pink-500/50 dark:shadow-pink-800/80"},rose:{base:"text-white bg-rose-700 hover:bg-rose-800 dark:bg-rose-600 dark:hover:bg-rose-700",outline:"text-rose-700 border-rose-700 hover:bg-rose-800 dark:border-rose-400 dark:text-rose-400 dark:hover:bg-rose-500",shadow:"shadow-rose-500/50 dark:shadow-rose-800/80"}},size:{xs:"px-3 py-2 text-xs",sm:"px-4 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},group:{true:"focus-within:ring-2 focus-within:z-10 [&:not(:first-child)]:rounded-s-none [&:not(:last-child)]:rounded-e-none [&:not(:last-child)]:border-e-0",false:"focus-within:ring-4 focus-within:outline-hidden"},disabled:{true:"cursor-not-allowed opacity-50",false:""},pill:{true:"rounded-full",false:"rounded-lg"},checked:{true:"",false:""}},compoundVariants:[],defaultVariants:{pill:!1}});te({slots:{base:"inline-flex items-center justify-center transition-all duration-75 ease-in text-white bg-linear-to-r ",outlineWrapper:"inline-flex items-center justify-center w-full border-0!"},variants:{color:{blue:{base:"from-blue-500 via-blue-600 to-blue-700 hover:bg-linear-to-br focus:ring-blue-300 dark:focus:ring-blue-800"},green:{base:"from-green-400 via-green-500 to-green-600 hover:bg-linear-to-br focus:ring-green-300 dark:focus:ring-green-800"},cyan:{base:"text-white bg-linear-to-r from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-linear-to-br focus:ring-cyan-300 dark:focus:ring-cyan-800"},teal:{base:"text-white bg-linear-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-linear-to-br focus:ring-teal-300 dark:focus:ring-teal-800"},lime:{base:"text-gray-900 bg-linear-to-r from-lime-200 via-lime-400 to-lime-500 hover:bg-linear-to-br focus:ring-lime-300 dark:focus:ring-lime-800"},red:{base:"text-white bg-linear-to-r from-red-400 via-red-500 to-red-600 hover:bg-linear-to-br focus:ring-red-300 dark:focus:ring-red-800"},pink:{base:"text-white bg-linear-to-r from-pink-400 via-pink-500 to-pink-600 hover:bg-linear-to-br focus:ring-pink-300 dark:focus:ring-pink-800"},purple:{base:"text-white bg-linear-to-r from-purple-500 via-purple-600 to-purple-700 hover:bg-linear-to-br focus:ring-purple-300 dark:focus:ring-purple-800"},purpleToBlue:{base:"text-white bg-linear-to-br from-purple-600 to-blue-500 hover:bg-linear-to-bl focus:ring-blue-300 dark:focus:ring-blue-800"},cyanToBlue:{base:"text-white bg-linear-to-r from-cyan-500 to-blue-500 hover:bg-linear-to-bl focus:ring-cyan-300 dark:focus:ring-cyan-800"},greenToBlue:{base:"text-white bg-linear-to-br from-green-400 to-blue-600 hover:bg-linear-to-bl focus:ring-green-200 dark:focus:ring-green-800"},purpleToPink:{base:"text-white bg-linear-to-r from-purple-500 to-pink-500 hover:bg-linear-to-l focus:ring-purple-200 dark:focus:ring-purple-800"},pinkToOrange:{base:"text-white bg-linear-to-br from-pink-500 to-orange-400 hover:bg-linear-to-bl focus:ring-pink-200 dark:focus:ring-pink-800"},tealToLime:{base:"text-gray-900 bg-linear-to-r from-teal-200 to-lime-200 hover:bg-linear-to-l focus:ring-lime-200 dark:focus:ring-teal-700"},redToYellow:{base:"text-gray-900 bg-linear-to-r from-red-200 via-red-300 to-yellow-200 hover:bg-linear-to-bl focus:ring-red-100 dark:focus:ring-red-400"}},outline:{true:{base:"p-0.5",outlineWrapper:"bg-white text-gray-900! dark:bg-gray-900 dark:text-white! hover:bg-transparent hover:text-inherit! group-hover:opacity-0! group-hover:text-inherit!"}},pill:{true:{base:"rounded-full",outlineWrapper:"rounded-full"},false:{base:"rounded-lg",outlineWrapper:"rounded-lg"}},size:{xs:"px-3 py-2 text-xs",sm:"px-4 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},shadow:{true:{base:"shadow-lg"}},group:{true:"rounded-none",false:""},disabled:{true:{base:"opacity-50 cursor-not-allowed"}}},compoundVariants:[{shadow:!0,color:"blue",class:{base:"shadow-blue-500/50 dark:shadow-blue-800/80"}},{shadow:!0,color:"green",class:{base:"shadow-green-500/50 dark:shadow-green-800/80"}},{shadow:!0,color:"cyan",class:{base:"shadow-cyan-500/50 dark:shadow-cyan-800/80"}},{shadow:!0,color:"teal",class:{base:"shadow-teal-500/50 dark:shadow-teal-800/80"}},{shadow:!0,color:"lime",class:{base:"shadow-lime-500/50 dark:shadow-lime-800/80"}},{shadow:!0,color:"red",class:{base:"shadow-red-500/50 dark:shadow-red-800/80"}},{shadow:!0,color:"pink",class:{base:"shadow-pink-500/50 dark:shadow-pink-800/80"}},{shadow:!0,color:"purple",class:{base:"shadow-purple-500/50 dark:shadow-purple-800/80"}},{shadow:!0,color:"purpleToBlue",class:{base:"shadow-blue-500/50 dark:shadow-blue-800/80"}},{shadow:!0,color:"cyanToBlue",class:{base:"shadow-cyan-500/50 dark:shadow-cyan-800/80"}},{shadow:!0,color:"greenToBlue",class:{base:"shadow-green-500/50 dark:shadow-green-800/80"}},{shadow:!0,color:"purpleToPink",class:{base:"shadow-purple-500/50 dark:shadow-purple-800/80"}},{shadow:!0,color:"pinkToOrange",class:{base:"shadow-pink-500/50 dark:shadow-pink-800/80"}},{shadow:!0,color:"tealToLime",class:{base:"shadow-lime-500/50 dark:shadow-teal-800/80"}},{shadow:!0,color:"redToYellow",class:{base:"shadow-red-500/50 dark:shadow-red-800/80"}},{group:!0,pill:!0,class:"first:rounded-s-full last:rounded-e-full"},{group:!0,pill:!1,class:"first:rounded-s-lg last:rounded-e-lg"}]});var CI=Ht(""),RI=Ht("");function II(r,e){_n(e,!0);const t=sn("group"),n=sn("disabled");let i=mt(e,"outline",3,!1),s=mt(e,"size",3,"md"),a=mt(e,"shadow",3,!1),o=mt(e,"tag",3,"button"),l=mt(e,"loading",3,!1),c=mt(e,"spinnerProps",19,()=>({size:"4"})),d=ir(e,["$$slots","$$events","$$legacy","children","pill","outline","size","color","shadow","tag","disabled","loading","spinnerProps","class"]);const u=Ji("button");let h=Ye(()=>t?"sm":s()),f=Ye(()=>e.color??(t?i()?"dark":"alternative":"primary")),m=Ye(()=>!!n||!!e.disabled||l());const x=Ye(()=>EI({color:X(f),size:X(h),disabled:X(m),pill:e.pill,group:!!t})),g=Ye(()=>X(x).base),p=Ye(()=>X(x).outline),v=Ye(()=>X(x).shadow),b=Ye(()=>X(x).spinner);let y=Ye(()=>X(g)({class:Jt(i()&&X(p)(),a()&&X(v)(),u?.base,e.class)}));var _=Rt(),w=yt(_);{var T=M=>{var S=CI();fn(S,()=>({...d,class:X(y)}));var E=Pt(S);ln(E,()=>e.children??zt),We(M,S)},A=M=>{var S=Rt(),E=yt(S);{var I=q=>{var z=RI();fn(z,()=>({type:"button",...d,class:X(y),disabled:X(m)}));var V=Pt(z);ln(V,()=>e.children??zt);var H=Ft(V,2);{var F=ie=>{{let ue=Ye(()=>X(b)());KI(ie,Zp(c,{get class(){return X(ue)}}))}};Ot(H,ie=>{l()&&ie(F)})}We(q,z)},O=q=>{var z=Rt(),V=yt(z);N_(V,o,!1,(H,F)=>{fn(H,()=>({...d,class:X(y)}));var ie=Rt(),ue=yt(ie);ln(ue,()=>e.children??zt),We(F,ie)}),We(q,z)};Ot(E,q=>{o()==="button"?q(I):q(O,!1)},!0)}We(M,S)};Ot(w,M=>{e.href!==void 0?M(T):M(A,!1)})}We(r,_),wn()}te({slots:{base:"w-full flex max-w-sm bg-white border border-gray-200 rounded-lg dark:bg-gray-800 dark:border-gray-700",image:"rounded-t-lg"},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-lg"},lg:{base:"max-w-2xl"},xl:{base:"max-w-none"}},color:{gray:{base:"border-gray-200 dark:bg-gray-800 dark:border-gray-700"},primary:{base:"border-primary-200 bg-primary-400 dark:bg-primary-800 dark:border-primary-700"},secondary:{base:"border-secondary-200 bg-secondary-400 dark:bg-secondary-800 dark:border-secondary-700"},red:{base:"border-red-200 bg-red-400 dark:bg-red-800 dark:border-red-700"},orange:{base:"border-orange-200 bg-orange-400 dark:bg-orange-800 dark:border-orange-700"},amber:{base:"border-amber-200 bg-amber-400 dark:bg-amber-800 dark:border-amber-700"},yellow:{base:"border-yellow-200 bg-yellow-400 dark:bg-yellow-800 dark:border-yellow-700"},lime:{base:"border-lime-200 bg-lime-400 dark:bg-lime-800 dark:border-lime-700"},green:{base:"border-green-200 bg-green-400 dark:bg-green-800 dark:border-green-700"},emerald:{base:"border-emerald-200 bg-emerald-400 dark:bg-emerald-800 dark:border-emerald-700"},teal:{base:"border-teal-200 bg-teal-400 dark:bg-teal-800 dark:border-teal-700"},cyan:{base:"border-cyan-200 bg-cyan-400 dark:bg-cyan-800 dark:border-cyan-700"},sky:{base:"border-sky-200 bg-sky-400 dark:bg-sky-800 dark:border-sky-700"},blue:{base:"border-blue-200 bg-blue-400 dark:bg-blue-800 dark:border-blue-700"},indigo:{base:"border-indigo-200 bg-indigo-400 dark:bg-indigo-800 dark:border-indigo-700"},violet:{base:"border-violet-200 bg-violet-400 dark:bg-violet-800 dark:border-violet-700"},purple:{base:"border-purple-200 bg-purple-400 dark:bg-purple-800 dark:border-purple-700"},fuchsia:{base:"border-fuchsia-200 bg-fuchsia-400 dark:bg-fuchsia-800 dark:border-fuchsia-700"},pink:{base:"border-pink-200 bg-pink-400 dark:bg-pink-800 dark:border-pink-700"},rose:{base:"border-rose-200 bg-rose-400 dark:bg-rose-800 dark:border-rose-700"}},shadow:{xs:{base:"shadow-xs"},sm:{base:"shadow-sm"},normal:{base:"shadow"},md:{base:"shadow-md"},lg:{base:"shadow-lg"},xl:{base:"shadow-xl"},"2xl":{base:"shadow-2xl"},inner:{base:"shadow-inner"}},horizontal:{true:{base:"md:flex-row",image:"object-cover w-full h-96 md:h-auto md:w-48 md:rounded-none"}},reverse:{true:{base:"flex-col-reverse",image:"rounded-b-lg rounded-tl-none"},false:{base:"flex-col",image:"rounded-t-lg"}},href:{true:"",false:""},hasImage:{true:"",false:""}},compoundVariants:[{horizontal:!0,reverse:!0,class:{base:"md:flex-row-reverse",image:"md:rounded-e-lg"}},{horizontal:!0,reverse:!1,class:{base:"md:flex-row",image:"md:rounded-s-lg"}},{href:!0,color:"gray",class:{base:"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700"}},{href:!0,color:"primary",class:{base:"cursor-pointer hover:bg-primary-500 dark:hover:bg-primary-700"}},{href:!0,color:"secondary",class:{base:"cursor-pointer hover:bg-secondary-500 dark:hover:bg-secondary-700"}},{href:!0,color:"red",class:{base:"cursor-pointer hover:bg-red-500 dark:hover:bg-red-700"}},{href:!0,color:"orange",class:{base:"cursor-pointer hover:bg-orange-500 dark:hover:bg-orange-700"}},{href:!0,color:"amber",class:{base:"cursor-pointer hover:bg-amber-500 dark:hover:bg-amber-700"}},{href:!0,color:"yellow",class:{base:"cursor-pointer hover:bg-yellow-500 dark:hover:bg-yellow-700"}},{href:!0,color:"lime",class:{base:"cursor-pointer hover:bg-lime-500 dark:hover:bg-lime-700"}},{href:!0,color:"green",class:{base:"cursor-pointer hover:bg-green-500 dark:hover:bg-green-700"}},{href:!0,color:"emerald",class:{base:"cursor-pointer hover:bg-emerald-500 dark:hover:bg-emerald-700"}},{href:!0,color:"teal",class:{base:"cursor-pointer hover:bg-teal-500 dark:hover:bg-teal-700"}},{href:!0,color:"cyan",class:{base:"cursor-pointer hover:bg-cyan-500 dark:hover:bg-cyan-700"}},{href:!0,color:"sky",class:{base:"cursor-pointer hover:bg-sky-500 dark:hover:bg-sky-700"}},{href:!0,color:"blue",class:{base:"cursor-pointer hover:bg-blue-500 dark:hover:bg-blue-700"}},{href:!0,color:"indigo",class:{base:"cursor-pointer hover:bg-indigo-500 dark:hover:bg-indigo-700"}},{href:!0,color:"violet",class:{base:"cursor-pointer hover:bg-violet-500 dark:hover:bg-violet-700"}},{href:!0,color:"purple",class:{base:"cursor-pointer hover:bg-purple-500 dark:hover:bg-purple-700"}},{href:!0,color:"fuchsia",class:{base:"cursor-pointer hover:bg-fuchsia-500 dark:hover:bg-fuchsia-700"}},{href:!0,color:"pink",class:{base:"cursor-pointer hover:bg-pink-500 dark:hover:bg-pink-700"}},{href:!0,color:"rose",class:{base:"cursor-pointer hover:bg-rose-500 dark:hover:bg-rose-700"}}],defaultVariants:{size:"sm",shadow:"normal",horizontal:!1,reverse:!1}});te({slots:{base:"grid overflow-hidden relative rounded-lg h-56 sm:h-64 xl:h-80 2xl:h-96",slide:""},variants:{},compoundVariants:[],defaultVariants:{}});te({slots:{base:"absolute start-1/2 z-30 flex -translate-x-1/2 space-x-3 rtl:translate-x-1/2 rtl:space-x-reverse",indicator:"bg-gray-100 hover:bg-gray-300"},variants:{selected:{true:{indicator:"opacity-100"},false:{indicator:"opacity-60"}},position:{top:{base:"top-5"},bottom:{base:"bottom-5"}}}});te({slots:{base:"flex absolute top-0 z-30 justify-center items-center px-4 h-full group focus:outline-hidden text-white dark:text-gray-300",span:"inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/30 group-hover:bg-white/50 group-focus:ring-4 group-focus:ring-white group-focus:outline-hidden sm:h-10 sm:w-10 dark:bg-gray-800/30 dark:group-hover:bg-gray-800/60 dark:group-focus:ring-gray-800/70"},variants:{forward:{true:"end-0",false:"start-0"}}});te({base:"flex flex-row justify-center bg-gray-100 w-full"});te({base:"",variants:{selected:{true:"opacity-100",false:"opacity-60"}},defaultVariants:{selected:!1}});te({base:"absolute block w-full h-full",variants:{fit:{contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}},defaultVariants:{fit:"cover"}});Nt(["click"]);Nt(["click"]);te({base:"gap-2",variants:{embedded:{true:"px-1 py-1 focus-within:ring-0 bg-transparent hover:bg-transparent text-inherit",false:""}},defaultVariants:{embedded:!1}});te({base:"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-hidden rounded-lg text-sm p-2.5"});te({slots:{base:"flex justify-between items-center",content:"flex flex-wrap items-center"},variants:{embedded:{true:{},false:{base:"py-2 px-3 rounded-lg dark:border"}},color:{default:{base:"bg-gray-50 dark:bg-gray-800 dark:border-gray-600",content:"divide-gray-300 dark:divide-gray-800"},primary:{base:"bg-primary-50 dark:bg-gray-800 dark:border-primary-800",content:"divide-primary-300 dark:divide-primary-800"},secondary:{base:"bg-secondary-50 dark:bg-gray-800 dark:border-secondary-800",content:"divide-secondary-300 dark:divide-primary-800"},gray:{base:"bg-gray-50 dark:bg-gray-800 dark:border-gray-800",content:"divide-gray-300 dark:divide-gray-800"},red:{base:"bg-red-50 dark:bg-gray-800 dark:border-red-800",content:"divide-red-300 dark:divide-red-800"},yellow:{base:"bg-yellow-50 dark:bg-gray-800 dark:border-yellow-800",content:"divide-yellow-300 dark:divide-yellow-800"},green:{base:"bg-green-50 dark:bg-gray-800 dark:border-green-800",content:"divide-green-300 dark:divide-green-800"},indigo:{base:"bg-indigo-50 dark:bg-gray-800 dark:border-indigo-800",content:"divide-indigo-300 dark:divide-indigo-800"},purple:{base:"bg-purple-50 dark:bg-gray-800 dark:border-purple-800",content:"divide-purple-300 dark:divide-purple-800"},pink:{base:"bg-pink-50 dark:bg-gray-800 dark:border-pink-800",content:"divide-pink-300 dark:divide-pink-800"},blue:{base:"bg-blue-50 dark:bg-gray-800 dark:border-blue-800",content:"divide-blue-300 dark:divide-blue-800"},dark:{base:"bg-gray-50 dark:bg-gray-800 dark:border-gray-800",content:"divide-gray-300 dark:divide-gray-800"}},separators:{true:{content:"sm:divide-x rtl:divide-x-reverse"}}},compoundVariants:[{embedded:!0,color:"default",class:{base:"bg-transparent"}}],defaultVariants:{color:"default"}});te({base:"flex items-center",variants:{spacing:{default:"space-x-1 rtl:space-x-reverse",tight:"space-x-0.5 rtl:space-x-reverse",loose:"space-x-2 rtl:space-x-reverse"},padding:{default:"sm:not(:last):pe-4 sm:not(:first):ps-4",none:""},position:{middle:"",first:"sm:ps-0",last:"sm:pe-0"}},compoundVariants:[{position:["first","last"],class:"sm:px-0"}],defaultVariants:{spacing:"default",padding:"default"}});te({base:"focus:outline-hidden whitespace-normal",variants:{color:{dark:"text-gray-500 hover:text-gray-900 hover:bg-gray-200 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-600",gray:"text-gray-500 focus:ring-gray-400 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-gray-300",red:"text-red-500 focus:ring-red-400 hover:bg-red-200 dark:hover:bg-red-800 dark:hover:text-red-300",yellow:"text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:hover:bg-yellow-800 dark:hover:text-yellow-300",green:"text-green-500 focus:ring-green-400 hover:bg-green-200 dark:hover:bg-green-800 dark:hover:text-green-300",indigo:"text-indigo-500 focus:ring-indigo-400 hover:bg-indigo-200 dark:hover:bg-indigo-800 dark:hover:text-indigo-300",purple:"text-purple-500 focus:ring-purple-400 hover:bg-purple-200 dark:hover:bg-purple-800 dark:hover:text-purple-300",pink:"text-pink-500 focus:ring-pink-400 hover:bg-pink-200 dark:hover:bg-pink-800 dark:hover:text-pink-300",blue:"text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800 dark:hover:text-blue-300",primary:"text-primary-500 focus:ring-primary-400 hover:bg-primary-200 dark:hover:bg-primary-800 dark:hover:text-primary-300",default:"focus:ring-gray-400 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-gray-50"},size:{xs:"m-0.5 rounded-xs focus:ring-1 p-0.5",sm:"m-0.5 rounded-sm focus:ring-1 p-0.5",md:"m-0.5 rounded-lg focus:ring-2 p-1.5",lg:"m-0.5 rounded-lg focus:ring-2 p-2.5"},background:{true:"",false:""}},compoundVariants:[{color:"default",background:!0,class:"dark:hover:bg-gray-600"},{color:"default",background:!1,class:"dark:hover:bg-gray-700"}],defaultVariants:{color:"default",size:"md"}});te({slots:{base:"inline-block rounded-lg bg-white dark:bg-gray-700 shadow-lg p-4",input:"w-full rounded-md border px-4 py-2 text-sm focus:ring-2 focus:outline-none outline-none dark:border-gray-600 dark:bg-gray-700 dark:text-white disabled:cursor-not-allowed disabled:opacity-50 border-gray-300 bg-gray-50 text-gray-900",titleVariant:"mb-2 text-lg font-semibold text-gray-900 dark:text-white",polite:"text-sm rounded-lg text-gray-900 dark:text-white bg-white dark:bg-gray-700 font-semibold py-2.5 px-5 hover:bg-gray-100 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-200",button:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-500 focus:outline-hidden dark:text-gray-400",actionButtons:"mt-4 flex justify-between",columnHeader:"text-center text-sm font-medium text-gray-500 dark:text-gray-400",grid:"grid grid-cols-7 gap-1 w-64",nav:"mb-4 flex items-center justify-between",dayButton:"h-8 w-full block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center font-semibold text-sm day p-0",monthButton:"rounded-lg px-3 py-2 text-sm hover:bg-gray-100 focus:ring-2 focus:ring-blue-500 dark:hover:bg-gray-700",actionSlot:""},variants:{color:{primary:{input:"focus:ring-primary-500 dark:focus:ring-primary-400",dayButton:"bg-primary-300 dark:bg-primary-900"},blue:{input:"focus:ring-blue-500 dark:focus:ring-blue-400",dayButton:"bg-blue-300 dark:bg-blue-900"},red:{input:"focus:ring-red-500 dark:focus:ring-red-400",dayButton:"bg-red-300 dark:bg-red-900"},green:{input:"focus:ring-green-500 dark:focus:ring-green-400",dayButton:"bg-green-300 dark:bg-green-900"},yellow:{input:"focus:ring-yellow-500 dark:focus:ring-yellow-400",dayButton:"bg-yellow-300 dark:bg-yellow-900"},purple:{input:"focus:ring-purple-500 dark:focus:ring-purple-400",dayButton:"bg-purple-300 dark:bg-purple-900"},dark:{input:"focus:ring-gray-500 dark:focus:ring-gray-400",dayButton:"bg-gray-300 dark:bg-gray-900"},light:{input:"focus:ring-gray-500 dark:focus:ring-gray-400",dayButton:"bg-gray-300 dark:bg-gray-900"},alternative:{input:"focus:ring-alternative-500 dark:focus:ring-alternative-400",dayButton:"bg-alternative-300 dark:bg-alternative-900"},secondary:{input:"focus:ring-secondary-500 dark:focus:ring-secondary-400",dayButton:"bg-secondary-300 dark:bg-secondary-900"},gray:{input:"focus:ring-gray-500 dark:focus:ring-gray-400",dayButton:"bg-gray-300 dark:bg-gray-900"},orange:{input:"focus:ring-orange-500 dark:focus:ring-orange-400",dayButton:"bg-orange-300 dark:bg-orange-900"},amber:{input:"focus:ring-amber-500 dark:focus:ring-amber-400",dayButton:"bg-amber-300 dark:bg-amber-900"},lime:{input:"focus:ring-lime-500 dark:focus:ring-lime-400",dayButton:"bg-lime-300 dark:bg-lime-900"},emerald:{input:"focus:ring-emerald-500 dark:focus:ring-emerald-400",dayButton:"bg-emerald-300 dark:bg-emerald-900"},teal:{input:"focus:ring-teal-500 dark:focus:ring-teal-400",dayButton:"bg-teal-300 dark:bg-teal-900"},cyan:{input:"focus:ring-cyan-500 dark:focus:ring-cyan-400",dayButton:"bg-cyan-300 dark:bg-cyan-900"},sky:{input:"focus:ring-sky-500 dark:focus:ring-sky-400",dayButton:"bg-sky-300 dark:bg-sky-900"},indigo:{input:"focus:ring-indigo-500 dark:focus:ring-indigo-400",dayButton:"bg-indigo-300 dark:bg-indigo-900"},violet:{input:"focus:ring-violet-500 dark:focus:ring-violet-400",dayButton:"bg-violet-300 dark:bg-violet-900"},fuchsia:{input:"focus:ring-fuchsia-500 dark:focus:ring-fuchsia-400",dayButton:"bg-fuchsia-300 dark:bg-fuchsia-900"},pink:{input:"focus:ring-pink-500 dark:focus:ring-pink-400",dayButton:"bg-pink-300 dark:bg-pink-900"},rose:{input:"focus:ring-rose-500 dark:focus:ring-rose-400",dayButton:"bg-rose-300 dark:bg-rose-900"}},inline:{false:{base:"absolute z-10 mt-1"}},current:{true:{dayButton:"text-gray-400 dark:text-gray-500"}},today:{true:{dayButton:"font-bold"}},unavailable:{true:{dayButton:"opacity-50 cursor-not-allowed hover:bg-gray-100 dark:hover:bg-gray-700"}}},compoundVariants:[]});Nt(["click"]);te({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[14px] rounded-xl h-[600px] w-[300px] shadow-xl",slot:"rounded-xl overflow-hidden w-[272px] h-[572px] bg-white dark:bg-gray-800",top:"w-[148px] h-[18px] bg-gray-800 top-0 rounded-b-[1rem] left-1/2 -translate-x-1/2 absolute",leftTop:"h-[32px] w-[3px] bg-gray-800 absolute -left-[17px] top-[72px] rounded-l-lg",leftMid:"h-[46px] w-[3px] bg-gray-800 absolute -left-[17px] top-[124px] rounded-l-lg",leftBot:"h-[46px] w-[3px] bg-gray-800 absolute -left-[17px] top-[178px] rounded-l-lg",right:"h-[64px] w-[3px] bg-gray-800 absolute -right-[17px] top-[142px] rounded-r-lg"}});te({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[14px] rounded-[2.5rem] h-[600px] w-[300px]",slot:"rounded-[2rem] overflow-hidden w-[272px] h-[572px] bg-white dark:bg-gray-800",top:"h-[32px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[72px] rounded-l-lg",leftTop:"h-[46px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[124px] rounded-l-lg",leftBot:"h-[46px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[178px] rounded-l-lg",right:"h-[64px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -right-[17px] top-[142px] rounded-r-lg"}});te({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[16px] rounded-t-xl h-[172px] max-w-[301px] md:h-[294px] md:max-w-[512px]",inner:"rounded-xl overflow-hidden h-[140px] md:h-[262px]",bot:"relative mx-auto bg-gray-900 dark:bg-gray-700 rounded-b-xl h-[24px] max-w-[301px] md:h-[42px] md:max-w-[512px]",botUnder:"relative mx-auto bg-gray-800 rounded-b-xl h-[55px] max-w-[83px] md:h-[95px] md:max-w-[142px]"}});te({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[14px] rounded-[2.5rem] h-[600px] w-[300px] shadow-xl",slot:"rounded-[2rem] overflow-hidden w-[272px] h-[572px] bg-white dark:bg-gray-800",top:"w-[148px] h-[18px] bg-gray-800 top-0 rounded-b-[1rem] left-1/2 -translate-x-1/2 absolute",leftTop:"h-[46px] w-[3px] bg-gray-800 absolute -left-[17px] top-[124px] rounded-l-lg",leftBot:"h-[46px] w-[3px] bg-gray-800 absolute -left-[17px] top-[178px] rounded-l-lg",right:"h-[64px] w-[3px] bg-gray-800 absolute -right-[17px] top-[142px] rounded-r-lg"}});te({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[8px] rounded-t-xl h-[172px] max-w-[301px] md:h-[294px] md:max-w-[512px]",inner:"rounded-lg overflow-hidden h-[156px] md:h-[278px] bg-white dark:bg-gray-800",bot:"relative mx-auto bg-gray-900 dark:bg-gray-700 rounded-b-xl rounded-t-sm h-[17px] max-w-[351px] md:h-[21px] md:max-w-[597px]",botCen:"absolute left-1/2 top-0 -translate-x-1/2 rounded-b-xl w-[56px] h-[5px] md:w-[96px] md:h-[8px] bg-gray-800"}});te({slots:{base:"relative mx-auto bg-gray-800 dark:bg-gray-700 rounded-t-[2.5rem] h-[63px] max-w-[133px]",slot:"rounded-[2rem] overflow-hidden h-[193px] w-[188px]",rightTop:"h-[41px] w-[6px] bg-gray-800 dark:bg-gray-800 absolute -right-[16px] top-[40px] rounded-r-lg",rightBot:"h-[32px] w-[6px] bg-gray-800 dark:bg-gray-800 absolute -right-[16px] top-[88px] rounded-r-lg",top:"relative mx-auto border-gray-900 dark:bg-gray-800 dark:border-gray-800 border-[10px] rounded-[2.5rem] h-[213px] w-[208px]",bot:"relative mx-auto bg-gray-800 dark:bg-gray-700 rounded-b-[2.5rem] h-[63px] max-w-[133px]"}});te({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[14px] rounded-[2.5rem] h-[454px] max-w-[341px] md:h-[682px] md:max-w-[512px]",slot:"rounded-[2rem] overflow-hidden h-[426px] md:h-[654px] bg-white dark:bg-gray-800",leftTop:"h-[32px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[72px] rounded-l-lg",leftMid:"h-[46px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[124px] rounded-l-lg",leftBot:"h-[46px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[178px] rounded-l-lg",right:"h-[64px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -right-[17px] top-[142px] rounded-r-lg"}});const n2=te({slots:{base:"backdrop:bg-gray-900/50 open:flex flex-col bg-white dark:bg-gray-800",form:"flex flex-col w-full border-inherit dark:border-inherit divide-inherit dark:divide-inherit",close:"absolute top-2.5 end-2.5"},variants:{},defaultVariants:{}});te({extend:n2,slots:{base:"p-4 max-h-none max-w-none border border-gray-200 dark:border-gray-700 transform-gpu will-change-transform"},variants:{placement:{left:{base:"me-auto h-full"},right:{base:"ms-auto h-full"},top:{base:"mb-auto !w-full"},bottom:{base:"mt-auto !w-full"}},width:{default:{base:"w-80"},full:{base:"w-full"},half:{base:"w-1/2"}},modal:{false:{base:"fixed inset-0"},true:{base:""}},shifted:{true:{},false:{}}},compoundVariants:[{shifted:!1,modal:!1,class:{base:"z-50"}},{shifted:!0,placement:"left",class:{base:"-translate-x-full"}},{shifted:!0,placement:"right",class:{base:"translate-x-full"}},{shifted:!0,placement:"top",class:{base:"-translate-y-full"}},{shifted:!0,placement:"bottom",class:{base:"translate-y-full"}}],defaultVariants:{placement:"left",width:"default",modal:!0}});te({slots:{base:"flex items-center justify-between",button:"ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white",svg:"h-4 w-4"}});te({slots:{base:"p-4 absolute flex select-none cursor-grab active:cursor-grabbing focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-300 dark:focus-visible:ring-gray-500",handle:"absolute rounded-lg bg-gray-300 dark:bg-gray-600"},variants:{placement:{left:{base:"inset-y-0 right-0 touch-pan-x",handle:"w-1 h-8 top-1/2 -translate-y-1/2"},right:{base:"inset-y-0 left-0 touch-pan-x",handle:"w-1 h-8 top-1/2 -translate-y-1/2"},top:{base:"inset-x-0 bottom-0 touch-pan-y",handle:"w-8 h-1 left-1/2 -translate-x-1/2"},bottom:{base:"inset-x-0 top-0 touch-pan-y",handle:"w-8 h-1 left-1/2 -translate-x-1/2"}}}});te({base:"mt-2 divide-y divide-gray-300 dark:divide-gray-500 overflow-hidden rounded-lg bg-white shadow-sm dark:bg-gray-700"});te({base:"my-1 h-px bg-gray-100 dark:bg-gray-500"});te({base:"px-4 py-3 text-sm text-gray-900 dark:text-white"});te({slots:{base:"block w-full text-left px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",active:"block w-full text-left px-4 py-2 text-primary-700 dark:text-primary-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",li:""}});te({base:"py-2 text-sm text-gray-700 dark:text-gray-200"});te({base:"bg-white dark:bg-gray-800",variants:{footerType:{default:"p-4 rounded-lg shadow md:flex md:items-center md:justify-between md:p-6",sitemap:"bg-white dark:bg-gray-900",socialmedia:"p-4 sm:p-6",logo:"p-4 rounded-lg shadow md:px-6 md:py-8",sticky:"fixed bottom-0 left-0 z-20 w-full p-4 bg-white border-t border-gray-200 shadow md:flex md:items-center md:justify-between md:p-6 dark:bg-gray-800 dark:border-gray-600"}}});te({slots:{base:"flex items-center",span:"self-center text-2xl font-semibold whitespace-nowrap dark:text-white",img:"me-3 h-8"}});te({slots:{base:"block text-sm text-gray-500 sm:text-center dark:text-gray-400",link:"hover:underline",bySpan:"ms-1"}});te({base:"text-gray-500 hover:text-gray-900 dark:hover:text-white"});te({base:"text-gray-600 dark:text-gray-400"});te({slots:{base:"me-4 last:me-0 md:me-6",link:"hover:underline"}});te({slots:{image:"h-auto max-w-full rounded-lg",div:"grid"}});te({base:"px-2 py-1.5 text-xs font-semibold text-gray-800 bg-gray-100 border border-gray-200 rounded-lg dark:bg-gray-600 dark:text-gray-100 dark:border-gray-500"});te({base:"flex bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 divide-gray-200 dark:divide-gray-600",variants:{rounded:{true:"rounded-lg",false:""},border:{true:"border border-gray-200 dark:border-gray-700",false:""},horizontal:{true:"flex-row divide-x",false:"flex-col divide-y"}},compoundVariants:[{border:!0,class:"divide-gray-200 dark:divide-gray-700"}],defaultVariants:{rounded:!0,border:!0,horizontal:!1}});te({base:"py-2 px-4 w-full text-sm font-medium list-none flex items-center text-left gap-2",variants:{state:{normal:"",current:"text-white bg-primary-700 dark:text-white dark:bg-gray-800",disabled:"text-gray-900 bg-gray-100 dark:bg-gray-600 dark:text-gray-400"},active:{true:"",false:""},horizontal:{true:"first:rounded-s-lg last:rounded-e-lg",false:"first:rounded-t-lg last:rounded-b-lg"}},compoundVariants:[{active:!0,state:"disabled",class:"cursor-not-allowed"},{active:!0,state:"normal",class:"hover:bg-gray-100 hover:text-primary-700 dark:hover:bg-gray-600 dark:hover:text-white focus:z-40 focus:outline-hidden focus:ring-2 focus:ring-primary-700 focus:text-primary-700 dark:focus:ring-gray-500 dark:focus:text-white"}]});te({slots:{base:"w-fit bg-white shadow-md dark:bg-gray-700 text-gray-700 dark:text-gray-200 rounded-lg border border-gray-100 dark:border-gray-600 divide-gray-100 dark:divide-gray-600",div:"flex flex-col md:flex-row p-4 max-w-(--breakpoint-md) justify-center mx-auto mt-2",ul:"grid grid-flow-row gap-y-4 md:gap-x-0 auto-col-max auto-row-max grid-cols-2 md:grid-cols-3 text-sm font-medium",extra:"md:w-1/3 mt-4 md:mt-0"},variants:{full:{true:{base:"border-y shadow-xs w-full ml-0 rounded-none"}},hasExtra:{true:{}}},compoundVariants:[{full:!0,hasExtra:!0,class:{ul:"grid-cols-2 md:w-2/3"}}]});te({extend:n2,slots:{base:"w-full rounded-lg divide-y text-gray-500 dark:text-gray-400 border-gray-300 dark:border-gray-700 divide-gray-300 dark:divide-gray-700 bg-white dark:bg-gray-800 pointer-events-auto",form:"rounded-lg divide-y",header:"flex items-center p-4 md:p-5 justify-between rounded-t-lg shrink-0 text-xl font-semibold text-gray-900 dark:text-white",footer:"flex items-center p-4 md:p-5 space-x-3 rtl:space-x-reverse rounded-b-lg shrink-0",body:"p-4 md:p-5 space-y-4 overflow-y-auto overscroll-contain"},variants:{fullscreen:{true:{base:"fixed inset-0 w-screen h-screen max-w-none max-h-none m-0 p-0 border-none rounded-none bg-white dark:bg-gray-900"}},placement:{"top-left":{base:"mb-auto mr-auto"},"top-center":{base:"mb-auto mx-auto"},"top-right":{base:"mb-auto ml-auto"},"center-left":{base:"my-auto mr-auto"},center:{base:"my-auto mx-auto"},"center-right":{base:"my-auto ml-auto"},"bottom-left":{base:"mt-auto mr-auto"},"bottom-center":{base:"mt-auto mx-auto"},"bottom-right":{base:"mt-auto ml-auto"}},size:{none:{base:""},xs:{base:"max-w-md"},sm:{base:"max-w-lg"},md:{base:"max-w-2xl"},lg:{base:"max-w-4xl"},xl:{base:"max-w-7xl"}}},defaultVariants:{placement:"center",size:"md"}});const PI=te({base:"relative w-full px-2 py-2.5 sm:px-4"}),DI=te({base:"flex items-center"}),LI=te({base:"mx-auto flex flex-wrap items-center justify-between ",variants:{fluid:{true:"w-full",false:"container"}}}),NI=te({slots:{base:"",ul:"flex flex-col p-4 mt-0 rtl:space-x-reverse",active:"text-white bg-primary-700 dark:bg-primary-600",nonActive:"hover:text-primary-500 text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},variants:{breakpoint:{sm:{base:"w-full sm:block sm:w-auto",ul:"sm:flex-row sm:text-sm sm:font-medium",active:"sm:bg-transparent sm:text-primary-700 sm:dark:text-white sm:dark:bg-transparent",nonActive:"sm:hover:bg-transparent sm:border-0 sm:hover:text-primary-700 dark:sm:text-gray-400 sm:dark:hover:text-white sm:dark:hover:bg-transparent"},md:{base:"w-full md:block md:w-auto",ul:"md:flex-row md:text-sm md:font-medium",active:"md:bg-transparent md:text-primary-700 md:dark:text-white md:dark:bg-transparent",nonActive:"md:hover:bg-transparent md:border-0 md:hover:text-primary-700 dark:md:text-gray-400 md:dark:hover:text-white md:dark:hover:bg-transparent"},lg:{base:"w-full lg:block lg:w-auto",ul:"lg:flex-row lg:text-sm lg:font-medium",active:"lg:bg-transparent lg:text-primary-700 lg:dark:text-white lg:dark:bg-transparent",nonActive:"lg:hover:bg-transparent lg:border-0 lg:hover:text-primary-700 dark:lg:text-gray-400 lg:dark:hover:text-white lg:dark:hover:bg-transparent"},xl:{base:"w-full xl:block xl:w-auto",ul:"xl:flex-row xl:text-sm xl:font-medium",active:"xl:bg-transparent xl:text-primary-700 xl:dark:text-white xl:dark:bg-transparent",nonActive:"xl:hover:bg-transparent xl:border-0 xl:hover:text-primary-700 dark:xl:text-gray-400 xl:dark:hover:text-white xl:dark:hover:bg-transparent"}},hidden:{false:{base:"absolute top-full left-0 right-0 z-50 w-full",ul:"border rounded-lg bg-white shadow-lg dark:bg-gray-800 dark:border-gray-700 text-gray-700 dark:text-gray-400 border-gray-100 dark:border-gray-700 divide-gray-100 dark:divide-gray-700"},true:{base:"hidden"}}},compoundVariants:[{breakpoint:"sm",hidden:!1,class:{base:"sm:static sm:z-auto",ul:"sm:border-none sm:rounded-none sm:bg-inherit dark:sm:bg-inherit sm:shadow-none"}},{breakpoint:"md",hidden:!1,class:{base:"md:static md:z-auto",ul:"md:border-none md:rounded-none md:bg-inherit dark:md:bg-inherit md:shadow-none"}},{breakpoint:"lg",hidden:!1,class:{base:"lg:static lg:z-auto",ul:"lg:border-none lg:rounded-none lg:bg-inherit dark:lg:bg-inherit lg:shadow-none"}},{breakpoint:"xl",hidden:!1,class:{base:"xl:static xl:z-auto",ul:"xl:border-none xl:rounded-none xl:bg-inherit dark:xl:bg-inherit xl:shadow-none"}}],defaultVariants:{breakpoint:"md"}});te({base:"block py-2 pe-4 ps-3 rounded-sm",variants:{breakpoint:{sm:"sm:p-2 sm:border-0",md:"md:p-2 md:border-0",lg:"lg:p-2 lg:border-0",xl:"xl:p-2 xl:border-0"},hidden:{false:"text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}},compoundVariants:[{breakpoint:"sm",hidden:!1,class:"sm:hover:bg-transparent sm:hover:text-primary-700 sm:dark:hover:text-white sm:dark:hover:bg-transparent"},{breakpoint:"md",hidden:!1,class:"md:hover:bg-transparent md:hover:text-primary-700 md:dark:hover:text-white md:dark:hover:bg-transparent"},{breakpoint:"lg",hidden:!1,class:"lg:hover:bg-transparent lg:hover:text-primary-700 lg:dark:hover:text-white lg:dark:hover:bg-transparent"},{breakpoint:"xl",hidden:!1,class:"xl:hover:bg-transparent xl:hover:text-primary-700 xl:dark:hover:text-white xl:dark:hover:bg-transparent"}],defaultVariants:{breakpoint:"md"}});te({slots:{base:"ms-3",menu:"h-6 w-6 shrink-0"},variants:{breakpoint:{sm:{base:"sm:hidden"},md:{base:"md:hidden"},lg:{base:"lg:hidden"},xl:{base:"xl:hidden"}}},defaultVariants:{breakpoint:"md"}});var UI=Ht("
");function Np(r,e){_n(e,!0);let t=ir(e,["$$slots","$$events","$$legacy","children","fluid","class"]);const n=Ji("navbarContainer");var i=UI();fn(i,a=>({...t,class:a}),[()=>LI({fluid:e.fluid,class:Jt(n,e.class)})]);var s=Pt(i);ln(s,()=>e.children??zt),We(r,i),wn()}var FI=Ht("");function OI(r,e){_n(e,!0);let t=mt(e,"closeOnClickOutside",3,!0),n=mt(e,"breakpoint",3,"md"),i=ir(e,["$$slots","$$events","$$legacy","children","fluid","navContainerClass","class","closeOnClickOutside","breakpoint"]);const s=Ji("navbar");let a=Oi({hidden:!0});zn("navState",a),zn("breakpoint",n());let o,l=()=>{a.hidden=!a.hidden};function c(f){t()&&!a.hidden&&o&&!o.contains(f.target)&&(a.hidden=!0)}var d=FI();v_("click",v1,c);var u=Pt(d);fn(u,f=>({...i,class:f}),[()=>PI({class:Jt(s,e.class)})]);var h=Pt(u);{let f=Ye(()=>Jt(e.navContainerClass));Np(h,{get fluid(){return e.fluid},get class(){return X(f)},children:(m,x)=>{var g=Rt(),p=yt(g);ln(p,()=>e.children,()=>({hidden:a.hidden,toggle:l,NavContainer:Np})),We(m,g)},$$slots:{default:!0}})}Tu(d,f=>o=f,()=>o),We(r,d),wn()}var qI=Ht("");function BI(r,e){_n(e,!0);let t=ir(e,["$$slots","$$events","$$legacy","children","class"]);const n=Ji("navbarBrand");var i=qI();fn(i,a=>({...t,class:a}),[()=>DI({class:Jt(n,e.class)})]);var s=Pt(i);ln(s,()=>e.children??zt),We(r,i),wn()}const zI=new j9("(prefers-reduced-motion: reduce)");var VI=Ht("
"),GI=Ht("
");function HI(r,e){_n(e,!0);let t=sn("navState"),n=sn("breakpoint"),i=mt(e,"transition",3,Xb),s=mt(e,"respectMotionPreference",3,!0),a=ir(e,["$$slots","$$events","$$legacy","children","activeUrl","ulClass","slideParams","transition","transitionParams","activeClass","nonActiveClass","respectMotionPreference","class","classes"]);e.ulClass,e.activeClass,e.nonActiveClass;const o=Ye(()=>e.classes??{ul:e.ulClass,active:e.activeClass,nonActive:e.nonActiveClass}),l=Ji("navbarUl"),c=M=>M===Xb?{delay:0,duration:200,easing:Il}:M===AI?{delay:0,duration:200,y:-10,easing:Il}:M===TI?{delay:0,duration:200,easing:Il}:M===kI?{delay:0,duration:200,start:.95,easing:Il}:{delay:0,duration:200,easing:Il},d=Ye(()=>c(i())),u=Ye(()=>e.transitionParams??e.slideParams??X(d)),h=Ye(()=>()=>s()&&zI.current?{...X(u),duration:0,delay:0}:X(u));let f=Ye(()=>t.hidden??!0),m=Ye(()=>NI({hidden:X(f),breakpoint:n})),x=Ye(()=>X(m).base),g=Ye(()=>X(m).ul),p=Ye(()=>X(m).active),v=Ye(()=>X(m).nonActive);Hi(()=>{t.activeClass=X(p)({class:Jt(l?.active,X(o).active)}),t.nonActiveClass=X(v)({class:Jt(l?.nonActive,X(o).nonActive)}),t.activeUrl=e.activeUrl});let b=Ye(()=>X(x)({class:Jt(l?.base,e.class)})),y=Ye(()=>X(g)({class:Jt(l?.ul,X(o).ul)}));var _=Rt(),w=yt(_);{var T=M=>{var S=VI();fn(S,()=>({...a,class:X(b)}));var E=Pt(S),I=Pt(E);ln(I,()=>e.children??zt),dr(()=>Ta(E,1,Ma(X(y)))),L_(3,S,i,()=>X(h)()),We(M,S)},A=M=>{var S=GI();fn(S,()=>({...a,class:X(b)}));var E=Pt(S),I=Pt(E);ln(I,()=>e.children??zt),dr(()=>Ta(E,1,Ma(X(y)))),We(M,S)};Ot(w,M=>{X(f)?M(A,!1):M(T)})}We(r,_),wn()}te({slots:{base:"inline-flex -space-x-px rtl:space-x-reverse items-center",tableDiv:"flex items-center text-sm mb-4",span:"font-semibold mx-1",prev:"rounded-none",next:"rounded-none",active:""},variants:{size:{default:"",large:""},layout:{table:{prev:"rounded-s bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white text-white hover:text-gray-200",next:"text-white bg-gray-800 border-0 border-s border-gray-700 rounded-e hover:bg-gray-900 hover:text-gray-200 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},navigation:{prev:"rounded-s-lg",next:"rounded-e-lg"},pagination:{prev:"rounded-s-lg",next:"rounded-e-lg"}}},defaultVariants:{table:!1,size:"default"}});te({base:"flex items-center font-medium",variants:{size:{default:"h-8 px-3 text-sm",large:"h-10 px-4 text-base"},active:{true:"text-primary-600 border border-gray-300 bg-primary-50 hover:bg-primary-100 hover:text-primary-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white",false:"text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},group:{true:"",false:"rounded-lg"},table:{true:"rounded-sm",false:"border"},disabled:{true:"cursor-not-allowed opacity-50",false:""}},compoundVariants:[{group:!1,table:!1,class:"rounded-lg"}],defaultVariants:{size:"default",active:!1,group:!1,table:!1}});te({base:"flex items-center font-medium",variants:{size:{default:"h-8 px-3 text-sm",large:"h-10 px-4 text-base"},active:{true:"text-primary-600 border border-gray-300 bg-primary-50 hover:bg-primary-100 hover:text-primary-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white",false:"text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},group:{true:"",false:"rounded-lg"},table:{true:"rounded-sm",false:"border"}},compoundVariants:[{group:!1,table:!1,class:"rounded-lg"}],defaultVariants:{size:"default",active:!1,group:!1,table:!1}});te({base:"inline-flex -space-x-px rtl:space-x-reverse items-center",variants:{table:{true:"divide-x rtl:divide-x-reverse dark divide-gray-700 dark:divide-gray-700",false:""},size:{default:"",large:""}},defaultVariants:{table:!1,size:"default"}});te({slots:{base:"rounded-lg shadow-md bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 border border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700",content:"p-2",title:"py-2 px-3 rounded-t-md border-b ",h3:"font-semibold"},variants:{color:{default:{title:"bg-gray-100 border-gray-200 dark:border-gray-600 dark:bg-gray-700",h3:"text-gray-900 dark:text-white"},primary:{title:"bg-primary-700",h3:"text-white"},secondary:{title:"bg-secondary-700",h3:"text-white"},gray:{title:"bg-gray-700",h3:"text-white"},red:{title:"bg-red-700",h3:"text-white"},orange:{title:"bg-orange-700",h3:"text-white"},amber:{title:"bg-amber-700",h3:"text-white"},yellow:{title:"bg-yellow-500",h3:"text-gray-800"},lime:{title:"bg-lime-700",h3:"text-white"},green:{title:"bg-green-700",h3:"text-white"},emerald:{title:"bg-emerald-700",h3:"text-white"},teal:{title:"bg-teal-700",h3:"text-white"},cyan:{title:"bg-cyan-700",h3:"text-white"},sky:{title:"bg-sky-700",h3:"text-white"},blue:{title:"bg-blue-700",h3:"text-white"},indigo:{title:"bg-indigo-700",h3:"text-white"},violet:{title:"bg-violet-700",h3:"text-white"},purple:{title:"bg-purple-700",h3:"text-white"},fuchsia:{title:"bg-fuchsia-700",h3:"text-white"},pink:{title:"bg-pink-700",h3:"text-white"},rose:{title:"bg-rose-700",h3:"text-white"}}}});te({slots:{base:"w-full bg-gray-200 rounded-full dark:bg-gray-700",label:"text-primary-100 text-xs font-medium text-center leading-none rounded-full",inside:"rounded-full",outside:"mb-1 flex justify-between",span:"text-base font-medium dark:text-white",progressCls:"text-sm font-medium dark:text-white"},variants:{color:{primary:{label:"bg-primary-600",inside:"bg-primary-600"},secondary:{label:"bg-secondary-600",inside:"bg-secondary-600"},gray:{label:"bg-gray-600 dark:bg-gray-300",inside:"bg-gray-600 dark:bg-gray-300"},red:{label:"bg-red-600 dark:bg-red-500",inside:"bg-red-600 dark:bg-red-500"},orange:{label:"bg-orange-600 dark:bg-orange-500",inside:"bg-orange-600 dark:bg-orange-500"},amber:{label:"bg-amber-600 dark:bg-amber-500",inside:"bg-amber-600 dark:bg-amber-500"},yellow:{label:"bg-yellow-400",inside:"bg-yellow-400"},lime:{label:"bg-lime-600 dark:bg-lime-500",inside:"bg-lime-600 dark:bg-lime-500"},green:{label:"bg-green-600 dark:bg-green-500",inside:"bg-green-600 dark:bg-green-500"},emerald:{label:"bg-emerald-600 dark:bg-emerald-500",inside:"bg-emerald-600 dark:bg-emerald-500"},teal:{label:"bg-teal-600 dark:bg-teal-500",inside:"bg-teal-600 dark:bg-teal-500"},cyan:{label:"bg-cyan-600 dark:bg-cyan-500",inside:"bg-cyan-600 dark:bg-cyan-500"},sky:{label:"bg-sky-600 dark:bg-sky-500",inside:"bg-sky-600 dark:bg-sky-500"},blue:{label:"bg-blue-600",inside:"bg-blue-600"},indigo:{label:"bg-indigo-600 dark:bg-indigo-500",inside:"bg-indigo-600 dark:bg-indigo-500"},violet:{label:"bg-violet-600 dark:bg-violet-500",inside:"bg-violet-600 dark:bg-violet-500"},purple:{label:"bg-purple-600 dark:bg-purple-500",inside:"bg-purple-600 dark:bg-purple-500"},fuchsia:{label:"bg-fuchsia-600 dark:bg-fuchsia-500",inside:"bg-fuchsia-600 dark:bg-fuchsia-500"},pink:{label:"bg-pink-600 dark:bg-pink-500",inside:"bg-pink-600 dark:bg-pink-500"},rose:{label:"bg-rose-600 dark:bg-rose-500",inside:"bg-rose-600 dark:bg-rose-500"}},labelInside:{true:"",false:""}},compoundVariants:[{labelInside:!0,class:{base:"text-primary-100 text-xs font-medium text-center leading-none rounded-full",label:"p-0.5"}},{labelInside:!1,class:{base:"rounded-full"}}],defaultVariants:{color:"primary",labelInside:!1}});te({slots:{base:"relative inline-flex",label:"absolute inset-0 flex items-center justify-center text-sm font-medium",background:"opacity-25",foreground:"transition-all",outside:"flex flex-col items-center mb-2 text-center",span:"text-base font-medium",progressCls:"text-sm font-medium ml-1"},variants:{color:{primary:{background:"stroke-primary-600",foreground:"stroke-primary-600"},secondary:{background:"stroke-secondary-600",foreground:"stroke-secondary-600"},gray:{background:"stroke-gray-600 dark:stroke-gray-300",foreground:"stroke-gray-600 dark:stroke-gray-300"},red:{background:"stroke-red-600 dark:stroke-red-500",foreground:"stroke-red-600 dark:stroke-red-500"},orange:{background:"stroke-orange-600 dark:stroke-orange-500",foreground:"stroke-orange-600 dark:stroke-orange-500"},amber:{background:"stroke-amber-600 dark:stroke-amber-500",foreground:"stroke-amber-600 dark:stroke-amber-500"},yellow:{background:"stroke-yellow-400",foreground:"stroke-yellow-400"},lime:{background:"stroke-lime-600 dark:stroke-lime-500",foreground:"stroke-lime-600 dark:stroke-lime-500"},green:{background:"stroke-green-600 dark:stroke-green-500",foreground:"stroke-green-600 dark:stroke-green-500"},emerald:{background:"stroke-emerald-600 dark:stroke-emerald-500",foreground:"stroke-emerald-600 dark:stroke-emerald-500"},teal:{background:"stroke-teal-600 dark:stroke-teal-500",foreground:"stroke-teal-600 dark:stroke-teal-500"},cyan:{background:"stroke-cyan-600 dark:stroke-cyan-500",foreground:"stroke-cyan-600 dark:stroke-cyan-500"},sky:{background:"stroke-sky-600 dark:stroke-sky-500",foreground:"stroke-sky-600 dark:stroke-sky-500"},blue:{background:"stroke-blue-600",foreground:"stroke-blue-600"},indigo:{background:"stroke-indigo-600 dark:stroke-indigo-500",foreground:"stroke-indigo-600 dark:stroke-indigo-500"},violet:{background:"stroke-violet-600 dark:stroke-violet-500",foreground:"stroke-violet-600 dark:stroke-violet-500"},purple:{background:"stroke-purple-600 dark:stroke-purple-500",foreground:"stroke-purple-600 dark:stroke-purple-500"},fuchsia:{background:"stroke-fuchsia-600 dark:stroke-fuchsia-500",foreground:"stroke-fuchsia-600 dark:stroke-fuchsia-500"},pink:{background:"stroke-pink-600 dark:stroke-pink-500",foreground:"stroke-pink-600 dark:stroke-pink-500"},rose:{background:"stroke-rose-600 dark:stroke-rose-500",foreground:"stroke-rose-600 dark:stroke-rose-500"}},labelInside:{true:{}}}});te({slots:{base:"flex items-center mt-4",span:"text-sm font-medium text-gray-600 dark:text-gray-500",div2:"mx-4 w-2/4 h-5 bg-gray-200 rounded-sm dark:bg-gray-700",div3:"h-5 bg-yellow-400 rounded-sm",span2:"text-sm font-medium text-gray-600 dark:text-gray-500"}});te({slots:{base:"flex items-center",p:"ms-2 text-sm font-bold text-gray-900 dark:text-white"}});te({slots:{article:"md:grid md:grid-cols-3 md:gap-8",div:"mb-6 flex items-center space-x-4 rtl:space-x-reverse",div2:"space-y-1 font-medium dark:text-white",div3:"flex items-center text-sm text-gray-500 dark:text-gray-400",img:"h-10 w-10 rounded-full",ul:"space-y-4 text-sm text-gray-500 dark:text-gray-400",li:"flex items-center"}});te({slots:{desc1:"bg-primary-100 w-8 text-primary-800 text-sm font-semibold inline-flex items-center p-1.5 rounded-sm dark:bg-primary-200 dark:text-primary-800",desc2:"ms-2 font-medium text-gray-900 dark:text-white",desc3span:"text-sm w-24 font-medium text-gray-500 dark:text-gray-400",desc3p:"text-sm w-24 font-medium text-gray-500 dark:text-gray-400",link:"ms-auto w-32 text-sm font-medium text-primary-600 hover:underline dark:text-primary-500",bar:"bg-primary-600 h-2.5 rounded-sm dark:bg-primary-500"}});te({slots:{base:"top-0 left-0 z-50 w-64 transition-transform bg-gray-50 dark:bg-gray-800",active:"flex items-center group-has-[ul]:ms-6 p-2 text-base font-normal text-gray-900 bg-gray-200 dark:bg-gray-700 rounded-sm dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700",nonactive:"flex items-center group-has-[ul]:ms-6 p-2 text-base font-normal text-gray-900 rounded-sm dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700",div:"overflow-y-auto px-3 py-4 bg-gray-50 dark:bg-gray-800",backdrop:"fixed top-0 start-0 z-40 w-full h-full"},variants:{position:{fixed:{base:"fixed"},absolute:{base:"absolute"},static:{base:"static"}},isOpen:{true:"block",false:"hidden"},breakpoint:{sm:{base:"sm:block"},md:{base:"md:block"},lg:{base:"lg:block"},xl:{base:"xl:block"},"2xl":{base:"2xl:block"}},alwaysOpen:{true:{base:"block"}},backdrop:{true:{backdrop:"bg-gray-900 opacity-75"}}},compoundVariants:[{alwaysOpen:!0,class:{base:"!block"}}]});te({slots:{base:"inline-flex items-center text-sm text-gray-500 rounded-lg hover:bg-gray-100 focus:outline-hidden focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600",svg:"h-6 w-6 m-2"},variants:{breakpoint:{sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden","2xl":"2xl:hidden"}}});te({slots:{base:"flex items-center ps-2.5 mb-5",img:"h-6 me-3 sm:h-7",span:"self-center text-xl font-semibold whitespace-nowrap dark:text-white"}});te({slots:{base:"p-4 mt-6 bg-primary-50 rounded-lg dark:bg-primary-900",div:"flex items-center mb-3",span:"bg-primary-100 text-primary-800 text-sm font-semibold me-2 px-2.5 py-0.5 rounded-sm dark:bg-primary-200 dark:text-primary-900"}});te({slots:{base:"group",btn:"flex items-center p-2 w-full text-base font-normal text-gray-900 rounded-sm transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700",span:"flex-1 ms-3 text-left whitespace-nowrap",svg:"h-3 w-3 text-gray-800 dark:text-white",ul:"py-2 space-y-0"}});Nt(["click"]);te({slots:{base:"p-4 rounded-sm border border-gray-200 shadow-sm animate-pulse md:p-6 dark:border-gray-700",area:"mb-4 flex h-48 items-center justify-center rounded-sm bg-gray-300 dark:bg-gray-700",icon:"text-gray-200 dark:text-gray-600",line:"rounded-full bg-gray-200 dark:bg-gray-700",footer:"mt-4 flex items-center space-x-3 rtl:space-x-reverse"},variants:{size:{sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"}}}});te({slots:{base:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",image:"flex w-full items-center justify-center rounded-sm bg-gray-300 sm:w-96 dark:bg-gray-700",svg:"text-gray-200",content:"w-full",line:"rounded-full bg-gray-200 dark:bg-gray-700"},variants:{size:{sm:{image:"h-32",content:"space-y-2"},md:{image:"h-48",content:"space-y-3"},lg:{image:"h-64",content:"space-y-4"}},rounded:{none:{image:"rounded-none",line:"rounded-none"},sm:{image:"rounded-xs",line:"rounded-xs"},md:{image:"rounded-sm",line:"rounded-sm"},lg:{image:"rounded-lg",line:"rounded-lg"},full:{image:"rounded-full",line:"rounded-full"}}}});te({slots:{base:"p-4 space-y-4 max-w-md rounded-sm border border-gray-200 divide-y divide-gray-200 shadow-sm animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700",item:"flex items-center justify-between",content:"",title:"mb-2.5 h-2.5 w-24 rounded-full bg-gray-300 dark:bg-gray-600",subTitle:"h-2 w-32 rounded-full bg-gray-200 dark:bg-gray-700",extra:"h-2.5 w-12 rounded-full bg-gray-300 dark:bg-gray-700"},variants:{size:{sm:{base:"p-3 space-y-3 max-w-sm md:p-4",title:"mb-2 h-2 w-20",subTitle:"h-1.5 w-28",extra:"h-2 w-10"},md:{},lg:{base:"p-5 space-y-5 max-w-lg md:p-7",title:"mb-3 h-3 w-28",subTitle:"h-2.5 w-36",extra:"h-3 w-14"}},rounded:{none:{base:"rounded-none"},sm:{base:"rounded-xs"},md:{base:"rounded-sm"},lg:{base:"rounded-lg"},full:{base:"rounded-full p-8 md:p-16"}}}});te({slots:{wrapper:"animate-pulse",line:"rounded-full bg-gray-200 dark:bg-gray-700"},variants:{size:{sm:{wrapper:"max-w-sm"},md:{wrapper:"max-w-md"},lg:{wrapper:"max-w-lg"},xl:{wrapper:"max-w-xl"},"2xl":{wrapper:"max-w-2xl"}}}});te({slots:{base:"animate-pulse",lineA:"rounded-full bg-gray-200 dark:bg-gray-700",lineB:"rounded-full bg-gray-300 dark:bg-gray-700",svg:"me-2 h-10 w-10 text-gray-200 dark:text-gray-700",content:"mt-4 flex items-center justify-center"}});te({slots:{base:"space-y-2.5 animate-pulse",div:"flex items-center space-x-2 rtl:space-x-reverse",lineA:"rounded-full bg-gray-200 dark:bg-gray-700",lineB:"rounded-full bg-gray-300 dark:bg-gray-600"},variants:{size:{sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"}}}});te({base:"flex justify-center items-center h-56 bg-gray-300 rounded-lg animate-pulse dark:bg-gray-700",variants:{size:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl"}}});te({slots:{base:"p-4 max-w-sm rounded-sm border border-gray-200 shadow-sm animate-pulse md:p-6 dark:border-gray-700",wrapper:"mt-4 flex items-baseline space-x-6 rtl:space-x-reverse",hLine:"rounded-full bg-gray-200 dark:bg-gray-700",vLine:"w-full rounded-t-lg bg-gray-200 dark:bg-gray-700"}});te({slots:{base:"group bg-transparent",popper:"flex items-center gap-2 bg-transparent text-inherit"},variants:{vertical:{true:{popper:"flex-col"}}},defaultVariants:{vertical:!1}});te({slots:{base:"w-[52px] h-[52px] shadow-xs p-0",span:"mb-px text-xs font-medium"},variants:{noTooltip:{false:{},true:{}},textOutside:{true:{base:"relative",span:"absolute -start-12 top-1/2 mb-px text-sm font-medium -translate-y-1/2"}}},compoundVariants:[{noTooltip:!0,textOutside:!1,class:{base:"flex flex-col"}}],defaultVariants:{}});te({base:"px-3 py-2 rounded-lg text-sm z-50 pointer-events-none",variants:{type:{light:"bg-white text-gray-800 dark:bg-white dark:text-gray-800 border border-gray-200 dark:border-gray-200",auto:"bg-white text-gray-800 dark:bg-gray-800 dark:text-white border border-gray-200 dark:border-gray-700",dark:"bg-gray-800 text-white dark:bg-gray-800 dark:text-white dark:border dark:border-gray-700",custom:""},color:{primary:"bg-primary-600 dark:bg-primary-600",secondary:"bg-secondary-600 dark:bg-secondary-600",gray:"bg-gray-600 dark:bg-gray-600",red:"bg-red-600 dark:bg-red-600",orange:"bg-orange-600 dark:bg-orange-600",amber:"bg-amber-600 dark:bg-amber-600",yellow:"bg-yellow-400 dark:bg-yellow-400",lime:"bg-lime-600 dark:bg-lime-600",green:"bg-green-600 dark:bg-green-600",emerald:"bg-emerald-600 dark:bg-emerald-600",teal:"bg-teal-600 dark:bg-teal-600",cyan:"bg-cyan-600 dark:bg-cyan-600",sky:"bg-sky-600 dark:bg-sky-600",blue:"bg-blue-600 dark:bg-blue-600",indigo:"bg-indigo-600 dark:bg-indigo-600",violet:"bg-violet-600 dark:bg-violet-600",purple:"bg-purple-600 dark:bg-purple-600",fuchsia:"bg-fuchsia-600 dark:bg-fuchsia-600",pink:"bg-pink-600 dark:bg-pink-600",rose:"bg-rose-800 dark:bg-rose-800"}},compoundVariants:[{color:["primary","secondary","gray","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],class:"border-0 dark:border-0"}],defaultVariants:{type:"dark",color:void 0}});const WI=te({base:"inline-block",variants:{type:{default:"animate-spin",dots:"inline-flex items-center justify-center",bars:"inline-flex items-center justify-center",pulse:"animate-pulse",orbit:""},color:{primary:"fill-primary-600 text-gray-300",secondary:"fill-secondary-600 text-gray-300",gray:"fill-gray-600 dark:fill-gray-300 text-gray-300",red:"fill-red-600 text-gray-300",orange:"fill-orange-500 text-gray-300",amber:"fill-amber-500 text-gray-300",yellow:"fill-yellow-400 text-gray-300",lime:"fill-lime-500 text-gray-300",green:"fill-green-500 text-gray-300",emerald:"fill-emerald-500 text-gray-300",teal:"fill-teal-500 text-gray-300",cyan:"fill-cyan-500 text-gray-300",sky:"fill-sky-500 text-gray-300",blue:"fill-blue-600 text-gray-300",indigo:"fill-indigo-600 text-gray-300",violet:"fill-violet-600 text-gray-300",purple:"fill-purple-600 text-gray-300",fuchsia:"fill-fuchsia-600 text-gray-300",pink:"fill-pink-600 text-gray-300",rose:"fill-rose-600 text-gray-300"},size:{4:"w-4 h-4",5:"w-5 h-5",6:"w-6 h-6",8:"w-8 h-8",10:"w-10 h-10",12:"w-12 h-12",16:"w-16 h-16"}},defaultVariants:{type:"default",color:"primary",size:"8"}});var XI=Fa(''),YI=Fa(''),ZI=Fa(''),$I=Fa(''),jI=Fa('');function KI(r,e){_n(e,!0);let t=mt(e,"type",3,"default"),n=mt(e,"color",3,"primary"),i=mt(e,"size",3,"8"),s=mt(e,"currentFill",3,"inherit"),a=mt(e,"currentColor",3,"currentColor"),o=ir(e,["$$slots","$$events","$$legacy","type","color","size","class","currentFill","currentColor"]);const l=Ji("spinner");let c=Ye(()=>WI({type:t(),color:n(),size:i(),class:Jt(l,e.class)}));var d=Rt(),u=yt(d);{var h=m=>{var x=XI();fn(x,()=>({...o,role:"status",class:X(c),viewBox:"0 0 100 101",fill:"none"}));var g=Pt(x),p=Ft(g);dr(()=>{na(g,"fill",a()),na(p,"fill",s())}),We(m,x)},f=m=>{var x=Rt(),g=yt(x);{var p=b=>{var y=YI();fn(y,()=>({...o,role:"status",class:X(c),viewBox:"0 0 120 30",fill:"currentColor"})),We(b,y)},v=b=>{var y=Rt(),_=yt(y);{var w=A=>{var M=ZI();fn(M,()=>({...o,role:"status",class:X(c),viewBox:"0 0 135 140",fill:"currentColor"})),We(A,M)},T=A=>{var M=Rt(),S=yt(M);{var E=O=>{var q=$I();fn(q,()=>({...o,role:"status",class:X(c),viewBox:"0 0 100 100"}));var z=Pt(q),V=Ft(z),H=Ft(V);dr(()=>{na(z,"fill",s()),na(V,"fill",s()),na(H,"fill",s())}),We(O,q)},I=O=>{var q=Rt(),z=yt(q);{var V=H=>{var F=jI();fn(F,()=>({...o,role:"status",class:X(c),viewBox:"0 0 100 100",fill:"currentColor"})),We(H,F)};Ot(z,H=>{t()==="orbit"&&H(V)},!0)}We(O,q)};Ot(S,O=>{t()==="pulse"?O(E):O(I,!1)},!0)}We(A,M)};Ot(_,A=>{t()==="bars"?A(w):A(T,!1)},!0)}We(b,y)};Ot(g,b=>{t()==="dots"?b(p):b(v,!1)},!0)}We(m,x)};Ot(u,m=>{t()==="default"?m(h):m(f,!1)})}We(r,d),wn()}te({slots:{base:"flex items-center w-full text-sm font-medium text-center text-gray-500 dark:text-gray-400 sm:text-base",item:"flex items-center",content:"flex items-center"},variants:{status:{completed:{item:"text-primary-600 dark:text-primary-500 md:w-full sm:after:content-[''] after:w-full after:h-1 after:border-b after:border-gray-200 after:border-1 after:hidden sm:after:inline-block after:mx-6 xl:after:mx-10 dark:after:border-gray-700",content:"after:content-['/'] sm:after:hidden after:mx-2 after:text-gray-200 dark:after:text-gray-500"},current:{item:"text-primary-600 dark:text-primary-500 md:w-full sm:after:content-[''] after:w-full after:h-1 after:border-b after:border-gray-200 after:border-1 after:hidden sm:after:inline-block after:mx-6 xl:after:mx-10 dark:after:border-gray-700",content:"after:content-['/'] sm:after:hidden after:mx-2 after:text-gray-200 dark:after:text-gray-500"},pending:{item:"md:w-full sm:after:content-[''] after:w-full after:h-1 after:border-b after:border-gray-200 after:border-1 after:hidden sm:after:inline-block after:mx-6 xl:after:mx-10 dark:after:border-gray-700",content:"after:content-['/'] sm:after:hidden after:mx-2 after:text-gray-200 dark:after:text-gray-500"}},isLast:{true:{item:"after:!hidden",content:"after:!hidden"},false:{}}},defaultVariants:{status:"pending",isLast:!1}});te({slots:{base:"flex items-center w-full relative",item:"flex items-center justify-center z-10",circle:"flex items-center justify-center w-10 h-10 rounded-full lg:h-12 lg:w-12 shrink-0",line:"absolute h-1 top-1/2 -translate-y-1/2 bg-gray-200 dark:bg-gray-700",progressLine:"absolute h-1 top-1/2 -translate-y-1/2 bg-primary-600 dark:bg-primary-500 transition-all duration-300 ease-in-out"},variants:{status:{completed:{item:"text-primary-600 dark:text-primary-400 flex-1",circle:"bg-primary-600 dark:bg-primary-500 text-white"},current:{item:"flex-1",circle:"bg-primary-600 dark:bg-primary-500 text-white"},pending:{item:"flex-1",circle:"bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400"}}},defaultVariants:{status:"pending"}});te({slots:{base:"items-center w-full space-y-4 sm:flex sm:space-x-8 sm:space-y-0 rtl:space-x-reverse",item:"flex items-center space-x-2.5 rtl:space-x-reverse",indicator:"flex items-center justify-center w-8 h-8 rounded-full shrink-0"},variants:{status:{completed:{item:"text-primary-600 dark:text-primary-500",indicator:"border border-primary-600 dark:border-primary-500 bg-primary-600 dark:bg-primary-500 text-white"},current:{item:"text-gray-500 dark:text-gray-400",indicator:"border border-gray-500 dark:border-gray-400 text-gray-500 dark:text-gray-400"},pending:{item:"text-gray-500 dark:text-gray-400",indicator:"border border-gray-500 dark:border-gray-400 text-gray-500 dark:text-gray-400"}}},defaultVariants:{status:"pending"}});te({slots:{base:"space-y-4 w-72",card:"w-full p-4 border rounded-lg",content:"flex items-center justify-between"},variants:{status:{completed:{card:"text-green-700 border-green-300 bg-green-50 dark:bg-gray-800 dark:border-green-800 dark:text-green-400"},current:{card:"text-primary-700 bg-primary-100 border-primary-300 dark:bg-gray-800 dark:border-primary-800 dark:text-primary-400"},pending:{card:"text-gray-900 bg-gray-100 border-gray-300 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400"}}},defaultVariants:{status:"pending"}});te({slots:{base:"flex items-center w-full p-3 space-x-2 text-sm font-medium text-center text-gray-500 bg-white border border-gray-200 rounded-lg shadow-xs dark:text-gray-400 sm:text-base dark:bg-gray-800 dark:border-gray-700 sm:p-4 sm:space-x-4 rtl:space-x-reverse",item:"flex items-center",indicator:"flex items-center justify-center w-5 h-5 me-2 text-xs rounded-full shrink-0"},variants:{status:{completed:{item:"text-primary-600 dark:text-primary-500",indicator:"border border-primary-600 dark:border-primary-500 bg-primary-600 dark:bg-primary-500 text-white"},current:{item:"text-primary-600 dark:text-primary-500",indicator:"border border-primary-600 dark:border-primary-500 bg-primary-600 dark:bg-primary-500 text-white"},pending:{item:"text-gray-500 dark:text-gray-400",indicator:"border border-gray-500 dark:border-gray-400 text-gray-500 dark:text-gray-400"}},hasChevron:{true:{},false:{}}},defaultVariants:{status:"pending",hasChevron:!1}});te({slots:{base:"relative text-gray-500 border-s border-gray-200 dark:border-gray-700 dark:text-gray-400",item:"ms-6",circle:"absolute flex items-center justify-center w-8 h-8 rounded-full -start-4 ring-4 ring-white dark:ring-gray-900"},variants:{status:{completed:{circle:"bg-green-200 dark:bg-green-900"},current:{circle:"bg-primary-200 dark:bg-primary-900"},pending:{circle:"bg-gray-100 dark:bg-gray-700"}},isLast:{true:{},false:{item:"mb-10"}}},defaultVariants:{status:"pending",isLast:!1}});Nt(["click"]);Nt(["click"]);Nt(["click"]);Nt(["click"]);Nt(["click"]);Nt(["click"]);te({slots:{div:"relative overflow-x-auto",table:"w-full text-left text-sm"},variants:{color:{default:{table:"text-gray-500 dark:text-gray-400"},primary:{table:"text-primary-100 dark:text-primary-100"},secondary:{table:"text-secondary-100 dark:text-secondary-100"},gray:{table:"text-gray-100 dark:text-gray-100"},red:{table:"text-red-100 dark:text-red-100"},orange:{table:"text-orange-100 dark:text-orange-100"},amber:{table:"text-amber-100 dark:text-amber-100"},yellow:{table:"text-yellow-100 dark:text-yellow-100"},lime:{table:"text-lime-100 dark:text-lime-100"},green:{table:"text-green-100 dark:text-green-100"},emerald:{table:"text-emerald-100 dark:text-emerald-100"},teal:{table:"text-teal-100 dark:text-teal-100"},cyan:{table:"text-cyan-100 dark:text-cyan-100"},sky:{table:"text-sky-100 dark:text-sky-100"},blue:{table:"text-blue-100 dark:text-blue-100"},indigo:{table:"text-indigo-100 dark:text-indigo-100"},violet:{table:"text-violet-100 dark:text-violet-100"},purple:{table:"text-purple-100 dark:text-purple-100"},fuchsia:{table:"text-fuchsia-100 dark:text-fuchsia-100"},pink:{table:"text-pink-100 dark:text-pink-100"},rose:{table:"text-rose-100 dark:text-rose-100"}},shadow:{true:{div:"shadow-md sm:rounded-lg"}}}});te({base:"",variants:{color:{default:"bg-white dark:bg-gray-800 dark:border-gray-700",primary:"bg-white bg-primary-500 border-primary-400",secondary:"bg-white bg-secondary-500 border-secondary-400",gray:"bg-gray-500 border-gray-400",red:"bg-red-500 border-red-400",orange:"bg-orange-500 border-orange-400",amber:"bg-amber-500 border-amber-400",yellow:"bg-yellow-500 border-yellow-400",lime:"bg-lime-500 border-lime-400",green:"bg-white bg-green-500 border-green-400",emerald:"bg-emerald-500 border-emerald-400",teal:"bg-teal-500 border-teal-400",cyan:"bg-cyan-500 border-cyan-400",sky:"bg-sky-500 border-sky-400",blue:"bg-white bg-blue-500 border-blue-400",indigo:"bg-indigo-500 border-indigo-400",violet:"bg-violet-500 border-violet-400",purple:"bg-purple-500 border-purple-400",fuchsia:"bg-fuchsia-500 border-fuchsia-400",pink:"bg-pink-500 border-pink-400",rose:"bg-rose-500 border-rose-400"},hoverable:{true:""},striped:{true:""},border:{true:"border-b last:border-b-0"}},compoundVariants:[{hoverable:!0,color:"default",class:"hover:bg-gray-50 dark:hover:bg-gray-600"},{hoverable:!0,color:"primary",class:"hover:bg-primary-400 dark:hover:bg-primary-400"},{hoverable:!0,color:"secondary",class:"hover:bg-secondary-400 dark:hover:bg-secondary-400"},{hoverable:!0,color:"gray",class:"hover:bg-gray-400 dark:hover:bg-gray-400"},{hoverable:!0,color:"red",class:"hover:bg-red-400 dark:hover:bg-red-400"},{hoverable:!0,color:"orange",class:"hover:bg-orange-400 dark:hover:bg-orange-400"},{hoverable:!0,color:"amber",class:"hover:bg-amber-400 dark:hover:bg-amber-400"},{hoverable:!0,color:"yellow",class:"hover:bg-yellow-400 dark:hover:bg-yellow-400"},{hoverable:!0,color:"lime",class:"hover:bg-lime-400 dark:hover:bg-lime-400"},{hoverable:!0,color:"green",class:"hover:bg-green-400 dark:hover:bg-green-400"},{hoverable:!0,color:"emerald",class:"hover:bg-emerald-400 dark:hover:bg-emerald-400"},{hoverable:!0,color:"teal",class:"hover:bg-teal-400 dark:hover:bg-teal-400"},{hoverable:!0,color:"cyan",class:"hover:bg-cyan-400 dark:hover:bg-cyan-400"},{hoverable:!0,color:"sky",class:"hover:bg-sky-400 dark:hover:bg-sky-400"},{hoverable:!0,color:"blue",class:"hover:bg-blue-400 dark:hover:bg-blue-400"},{hoverable:!0,color:"indigo",class:"hover:bg-indigo-400 dark:hover:bg-indigo-400"},{hoverable:!0,color:"violet",class:"hover:bg-violet-400 dark:hover:bg-violet-400"},{hoverable:!0,color:"purple",class:"hover:bg-purple-400 dark:hover:bg-purple-400"},{hoverable:!0,color:"fuchsia",class:"hover:bg-fuchsia-400 dark:hover:bg-fuchsia-400"},{hoverable:!0,color:"pink",class:"hover:bg-pink-400 dark:hover:bg-pink-400"},{hoverable:!0,color:"rose",class:"hover:bg-rose-400 dark:hover:bg-rose-400"},{striped:!0,color:"default",class:"odd:bg-white even:bg-gray-50 dark:odd:bg-gray-800 dark:even:bg-gray-700"},{striped:!0,color:"primary",class:"odd:bg-primary-500 even:bg-primary-600 dark:odd:bg-primary-500 dark:even:bg-primary-600"},{striped:!0,color:"secondary",class:"odd:bg-secondary-500 even:bg-secondary-600 dark:odd:bg-secondary-500 dark:even:bg-secondary-600"},{striped:!0,color:"gray",class:"odd:bg-gray-500 even:bg-gray-600 dark:odd:bg-gray-500 dark:even:bg-gray-600"},{striped:!0,color:"red",class:"odd:bg-red-500 even:bg-red-600 dark:odd:bg-red-500 dark:even:bg-red-600"},{striped:!0,color:"orange",class:"odd:bg-orange-500 even:bg-orange-600 dark:odd:bg-orange-500 dark:even:bg-orange-600"},{striped:!0,color:"amber",class:"odd:bg-amber-500 even:bg-amber-600 dark:odd:bg-amber-500 dark:even:bg-amber-600"},{striped:!0,color:"yellow",class:"odd:bg-yellow-500 even:bg-yellow-600 dark:odd:bg-yellow-500 dark:even:bg-yellow-600"},{striped:!0,color:"lime",class:"odd:bg-lime-500 even:bg-lime-600 dark:odd:bg-lime-500 dark:even:bg-lime-600"},{striped:!0,color:"green",class:"odd:bg-green-500 even:bg-green-600 dark:odd:bg-green-500 dark:even:bg-green-600"},{striped:!0,color:"emerald",class:"odd:bg-emerald-500 even:bg-emerald-600 dark:odd:bg-emerald-500 dark:even:bg-emerald-600"},{striped:!0,color:"teal",class:"odd:bg-teal-500 even:bg-teal-600 dark:odd:bg-teal-500 dark:even:bg-teal-600"},{striped:!0,color:"cyan",class:"odd:bg-cyan-500 even:bg-cyan-600 dark:odd:bg-cyan-500 dark:even:bg-cyan-600"},{striped:!0,color:"sky",class:"odd:bg-sky-500 even:bg-sky-600 dark:odd:bg-sky-500 dark:even:bg-sky-600"},{striped:!0,color:"blue",class:"odd:bg-blue-500 even:bg-blue-600 dark:odd:bg-blue-500 dark:even:bg-blue-600"},{striped:!0,color:"indigo",class:"odd:bg-indigo-500 even:bg-indigo-600 dark:odd:bg-indigo-500 dark:even:bg-indigo-600"},{striped:!0,color:"violet",class:"odd:bg-violet-500 even:bg-violet-600 dark:odd:bg-violet-500 dark:even:bg-violet-600"},{striped:!0,color:"purple",class:"odd:bg-purple-500 even:bg-purple-600 dark:odd:bg-purple-500 dark:even:bg-purple-600"},{striped:!0,color:"fuchsia",class:"odd:bg-fuchsia-500 even:bg-fuchsia-600 dark:odd:bg-fuchsia-500 dark:even:bg-fuchsia-600"},{striped:!0,color:"pink",class:"odd:bg-pink-500 even:bg-pink-600 dark:odd:bg-pink-500 dark:even:bg-pink-600"},{striped:!0,color:"rose",class:"odd:bg-rose-500 even:bg-rose-600 dark:odd:bg-rose-500 dark:even:bg-rose-600"}]});te({base:"text-xs uppercase",variants:{color:{default:"text-gray-700 dark:text-gray-400 bg-gray-50 dark:bg-gray-700",primary:"text-white dark:text-white bg-primary-700 dark:bg-primary-700",secondary:"text-white dark:text-white bg-secondary-700 dark:bg-secondary-700",gray:"text-white dark:text-white bg-gray-700 dark:bg-gray-700",red:"text-white dark:text-white bg-red-700 dark:bg-red-700",orange:"text-white dark:text-white bg-orange-700 dark:bg-orange-700",amber:"text-white dark:text-white bg-amber-700 dark:bg-amber-700",yellow:"text-white dark:text-white bg-yellow-700 dark:bg-yellow-700",lime:"text-white dark:text-white bg-lime-700 dark:bg-lime-700",green:"text-white dark:text-white bg-green-700 dark:bg-green-700",emerald:"text-white dark:text-white bg-emerald-700 dark:bg-emerald-700",teal:"text-white dark:text-white bg-teal-700 dark:bg-teal-700",cyan:"text-white dark:text-white bg-cyan-700 dark:bg-cyan-700",sky:"text-white dark:text-white bg-sky-700 dark:bg-sky-700",blue:"text-white dark:text-white bg-blue-700 dark:bg-blue-700",indigo:"text-white dark:text-white bg-indigo-700 dark:bg-indigo-700",violet:"text-white dark:text-white bg-violet-700 dark:bg-violet-700",purple:"text-white dark:text-white bg-purple-700 dark:bg-purple-700",fuchsia:"text-white dark:text-white bg-fuchsia-700 dark:bg-fuchsia-700",pink:"text-white dark:text-white bg-pink-700 dark:bg-pink-700",rose:"text-white dark:text-white bg-rose-700 dark:bg-rose-700"},border:{true:"",false:""},striped:{true:"",false:""}},compoundVariants:[{color:"default",border:!0,class:""},{color:"default",striped:!0,class:""},{striped:!0,color:"blue",class:"border-blue-400"},{striped:!0,color:"green",class:"border-green-400"},{striped:!0,color:"red",class:"border-red-400"},{striped:!0,color:"yellow",class:"border-yellow-400"},{striped:!0,color:"purple",class:"border-purple-400"},{striped:!0,color:"indigo",class:"border-indigo-400"},{striped:!0,color:"pink",class:"border-pink-400"}]});te({base:"px-6 py-4 whitespace-nowrap font-medium"});te({base:"px-6 py-3"});te({slots:{root:"relative overflow-x-auto shadow-md sm:rounded-lg",inner:"p-4",search:"relative mt-1",svgDiv:"absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none",svg:"w-5 h-5",input:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-80 p-2.5 ps-10 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",table:"w-full text-left text-sm"},variants:{color:{default:{svg:"text-gray-500 dark:text-gray-400",table:"text-gray-500 dark:text-gray-400"},blue:{svg:"text-blue-500 dark:text-blue-400",table:"text-blue-100 dark:text-blue-100"},green:{svg:"text-green-500 dark:text-green-400",table:"text-green-100 dark:text-green-100"},red:{svg:"text-red-500 dark:text-red-400",table:"text-red-100 dark:text-red-100"},yellow:{svg:"text-yellow-500 dark:text-yellow-400",table:"text-yellow-100 dark:text-yellow-100"},purple:{svg:"text-purple-500 dark:text-purple-400",table:"text-purple-100 dark:text-purple-100"},indigo:{svg:"text-indigo-500 dark:text-indigo-400",table:"text-indigo-100 dark:text-indigo-100"},pink:{svg:"text-pink-500 dark:text-pink-400",table:"text-pink-100 dark:text-pink-100"}},striped:{true:{table:"[&_tbody_tr:nth-child(odd)]:bg-white [&_tbody_tr:nth-child(odd)]:dark:bg-gray-900 [&_tbody_tr:nth-child(even)]:bg-gray-50 [&_tbody_tr:nth-child(even)]:dark:bg-gray-800"},false:{}},hoverable:{true:{table:"[&_tbody_tr]:hover:bg-gray-50 [&_tbody_tr]:dark:hover:bg-gray-600"},false:{}}},defaultVariants:{color:"default",striped:!1,hoverable:!1}});Nt(["click"]);te({slots:{base:"flex space-x-2 rtl:space-x-reverse",content:"p-4 bg-gray-50 rounded-lg dark:bg-gray-800 mt-4",divider:"h-px bg-gray-200 dark:bg-gray-700",active:"p-4 text-primary-600 bg-gray-100 rounded-t-lg dark:bg-gray-800 dark:text-primary-500",inactive:"p-4 text-gray-500 rounded-t-lg hover:text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300"},variants:{tabStyle:{full:{active:"p-4 w-full rounded-none group-first:rounded-s-lg group-last:rounded-e-lg text-gray-900 bg-gray-100 focus:ring-4 focus:ring-primary-300 focus:outline-hidden dark:bg-gray-700 dark:text-white",inactive:"p-4 w-full rounded-none group-first:rounded-s-lg group-last:rounded-e-lg text-gray-500 dark:text-gray-400 bg-white hover:text-gray-700 hover:bg-gray-50 focus:ring-4 focus:ring-primary-300 focus:outline-hidden dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700"},pill:{active:"py-3 px-4 text-white bg-primary-600 rounded-lg",inactive:"py-3 px-4 text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white"},underline:{base:"-mb-px",active:"p-4 text-primary-600 border-b-2 border-primary-600 dark:text-primary-500 dark:border-primary-500 bg-transparent",inactive:"p-4 border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 text-gray-500 dark:text-gray-400 bg-transparent"},none:{active:"",inactive:""}},hasDivider:{true:{}}},compoundVariants:[{tabStyle:["full","pill"],hasDivider:!0,class:{divider:"hidden"}}],defaultVariants:{tabStyle:"none",hasDivider:!0}});te({slots:{base:"group focus-within:z-10",button:"inline-block text-sm font-medium text-center disabled:cursor-not-allowed"},variants:{open:{true:{button:"active"}},disabled:{true:{button:"cursor-not-allowed"}}},compoundVariants:[{open:!0,class:{button:""}},{open:!1,class:{button:""}}],defaultVariants:{open:!1,disabled:!1}});Nt(["click"]);te({base:"relative border-s border-gray-200 dark:border-gray-700"});te({slots:{li:"mb-10 ms-6",span:"flex absolute -start-3 justify-center items-center w-6 h-6 bg-blue-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-blue-900",img:"rounded-full shadow-lg",outer:"p-4 bg-white rounded-lg border border-gray-200 shadow-xs dark:bg-gray-700 dark:border-gray-600",inner:"justify-between items-center mb-3 sm:flex",time:"mb-1 text-xs font-normal text-gray-400 sm:order-last sm:mb-0",title:"text-sm font-normal text-gray-500 lex dark:text-gray-300",text:"p-3 text-xs italic font-normal text-gray-500 bg-gray-50 rounded-lg border border-gray-200 dark:bg-gray-600 dark:border-gray-500 dark:text-gray-300"}});te({slots:{div:"p-5 mb-4 bg-gray-50 rounded-lg border border-gray-100 dark:bg-gray-800 dark:border-gray-700",time:"text-lg font-semibold text-gray-900 dark:text-white",ol:"mt-3 divide-y divider-gray-200 dark:divide-gray-700"}});te({slots:{base:"",a:"block items-center p-3 sm:flex hover:bg-gray-100 dark:hover:bg-gray-700",img:"me-3 mb-3 w-12 h-12 rounded-full sm:mb-0",div:"text-gray-600 dark:text-gray-400",title:"text-base font-normal",span:"inline-flex items-center text-xs font-normal text-gray-500 dark:text-gray-400",svg:"me-1 h-3 w-3"}});const ct={primary:{dot:"bg-primary-200 dark:bg-primary-900",ring:"ring-white dark:ring-gray-900",icon:"text-primary-600 dark:text-primary-400"},green:{dot:"bg-green-200 dark:bg-green-900",ring:"ring-white dark:ring-gray-900",icon:"text-green-600 dark:text-green-400"},orange:{dot:"bg-orange-200 dark:bg-orange-900",ring:"ring-white dark:ring-gray-900",icon:"text-orange-600 dark:text-orange-400"},red:{dot:"bg-red-200 dark:bg-red-900",ring:"ring-white dark:ring-gray-900",icon:"text-red-600 dark:text-red-400"},blue:{dot:"bg-blue-200 dark:bg-blue-900",ring:"ring-white dark:ring-gray-900",icon:"text-blue-600 dark:text-blue-400"},purple:{dot:"bg-purple-200 dark:bg-purple-900",ring:"ring-white dark:ring-gray-900",icon:"text-purple-600 dark:text-purple-400"},gray:{dot:"bg-gray-200 dark:bg-gray-700",ring:"ring-white dark:ring-gray-900",icon:"text-gray-600 dark:text-gray-400"}};te({variants:{order:{group:"p-5 mb-4 bg-gray-50 rounded-lg border border-gray-100 dark:bg-gray-800 dark:border-gray-700",horizontal:"sm:flex",activity:"relative",vertical:"relative",default:"relative border-s border-gray-200 dark:border-gray-700"}},defaultVariants:{order:"default"}});te({slots:{base:"relative",div:"",time:"",h3:"",svg:"w-4 h-4",connector:"absolute top-6 left-3 w-px h-full"},variants:{order:{default:{base:"mb-10 ms-4",div:"absolute w-3 h-3 bg-gray-200 rounded-full mt-1.5 -left-1.5 border border-white dark:border-gray-900 dark:bg-gray-700",time:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500",h3:"text-lg font-semibold text-gray-900 dark:text-white"},vertical:{base:"mb-10 ms-6 relative",div:"flex absolute -left-4 top-1.5 justify-center items-center w-6 h-6 rounded-full ring-8",time:"mb-1 pl-4 text-sm font-normal leading-none text-gray-400 dark:text-gray-500",h3:"flex ml-4 items-center mb-1 text-lg font-semibold text-gray-900 dark:text-white",connector:"absolute top-7 -left-1.5 w-px h-full"},horizontal:{base:"relative mb-6 sm:mb-0",div:"flex items-center",time:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500",h3:"text-lg font-semibold text-gray-900 dark:text-white"},activity:{base:"mb-10 ms-6 relative",div:"flex absolute -left-4 top-1.5 justify-center items-center w-6 h-6 rounded-full ring-8",time:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500",h3:"text-lg font-semibold text-gray-900 dark:text-white",connector:"absolute top-7 -left-4 w-px h-full"},group:{base:"",div:"p-5 mb-4 bg-gray-50 rounded-lg border border-gray-100 dark:bg-gray-800 dark:border-gray-700",time:"text-lg font-semibold text-gray-900 dark:text-white",h3:"text-lg font-semibold text-gray-900 dark:text-white"}},color:{primary:{},green:{},orange:{},red:{},blue:{},purple:{},gray:{}},isLast:{true:{},false:{}}},compoundVariants:[{order:"vertical",color:"primary",class:{div:ct.primary.dot+" "+ct.primary.ring,svg:ct.primary.icon,connector:"bg-primary-200 dark:bg-primary-700"}},{order:"vertical",color:"green",class:{div:ct.green.dot+" "+ct.green.ring,svg:ct.green.icon,connector:"bg-green-200 dark:bg-green-700"}},{order:"vertical",color:"orange",class:{div:ct.orange.dot+" "+ct.orange.ring,svg:ct.orange.icon,connector:"bg-orange-200 dark:bg-orange-700"}},{order:"vertical",color:"red",class:{div:ct.red.dot+" "+ct.red.ring,svg:ct.red.icon,connector:"bg-red-200 dark:bg-red-700"}},{order:"vertical",color:"blue",class:{div:ct.blue.dot+" "+ct.blue.ring,svg:ct.blue.icon,connector:"bg-blue-200 dark:bg-blue-700"}},{order:"vertical",color:"purple",class:{div:ct.purple.dot+" "+ct.purple.ring,svg:ct.purple.icon,connector:"bg-purple-200 dark:bg-purple-700"}},{order:"vertical",color:"gray",class:{div:ct.gray.dot+" "+ct.gray.ring,svg:ct.gray.icon,connector:"bg-gray-200 dark:bg-gray-700"}},{order:"horizontal",color:"primary",class:{div:ct.primary.dot+" "+ct.primary.ring,svg:ct.primary.icon}},{order:"horizontal",color:"green",class:{div:ct.green.dot+" "+ct.green.ring,svg:ct.green.icon}},{order:"horizontal",color:"orange",class:{div:ct.orange.dot+" "+ct.orange.ring,svg:ct.orange.icon}},{order:"horizontal",color:"red",class:{div:ct.red.dot+" "+ct.red.ring,svg:ct.red.icon}},{order:"horizontal",color:"blue",class:{div:ct.blue.dot+" "+ct.blue.ring,svg:ct.blue.icon}},{order:"horizontal",color:"purple",class:{div:ct.purple.dot+" "+ct.purple.ring,svg:ct.purple.icon}},{order:"horizontal",color:"gray",class:{div:ct.gray.dot+" "+ct.gray.ring,svg:ct.gray.icon}},{isLast:!0,class:{connector:"hidden"}}],defaultVariants:{order:"default",color:"primary",isLast:!1}});te({slots:{base:"flex w-full max-w-xs p-4 text-gray-500 bg-white rounded-lg shadow-sm dark:text-gray-400 dark:bg-gray-800 gap-3",icon:"w-8 h-8 inline-flex items-center justify-center shrink-0 rounded-lg",content:"w-full text-sm font-normal",close:"ms-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700"},variants:{position:{"top-left":{base:"absolute top-5 start-5"},"top-right":{base:"absolute top-5 end-5"},"bottom-left":{base:"absolute bottom-5 start-5"},"bottom-right":{base:"absolute bottom-5 end-5"}},color:{primary:{icon:"text-primary-500 bg-primary-100 dark:bg-primary-800 dark:text-primary-200",close:"text-primary-500 dark:text-primary-200 hover:text-primary-600 dark:hover:text-primary-500"},gray:{icon:"text-gray-500 bg-gray-100 dark:bg-gray-700 dark:text-gray-200",close:"text-gray-500 dark:text-gray-200 hover:text-gray-600 dark:hover:text-gray-500"},red:{icon:"text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200",close:"text-red-500 dark:text-red-200 hover:text-red-600 dark:hover:text-red-500"},orange:{icon:"text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200",close:"text-orange-500 dark:text-orange-200 hover:text-orange-600 dark:hover:text-orange-500"},amber:{icon:"text-amber-500 bg-amber-100 dark:bg-amber-700 dark:text-amber-200",close:"text-amber-500 dark:text-amber-200 hover:text-amber-600 dark:hover:text-amber-500"},yellow:{icon:"text-yellow-500 bg-yellow-100 dark:bg-yellow-800 dark:text-yellow-200",close:"text-yellow-500 dark:text-yellow-200 hover:text-yellow-600 dark:hover:text-yellow-500"},lime:{icon:"text-lime-500 bg-lime-100 dark:bg-lime-700 dark:text-lime-200",close:"text-lime-500 dark:text-lime-200 hover:text-lime-600 dark:hover:text-lime-500"},green:{icon:"text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200",close:"text-green-500 dark:text-green-200 hover:text-green-600 dark:hover:text-green-500"},emerald:{icon:"text-emerald-500 bg-emerald-100 dark:bg-emerald-800 dark:text-emerald-200",close:"text-emerald-500 dark:text-emerald-200 hover:text-emerald-600 dark:hover:text-emerald-500"},teal:{icon:"text-teal-500 bg-teal-100 dark:bg-teal-800 dark:text-teal-200",close:"text-teal-500 dark:text-teal-200 hover:text-teal-600 dark:hover:text-teal-500"},cyan:{icon:"text-cyan-500 bg-cyan-100 dark:bg-cyan-800 dark:text-cyan-200",close:"text-cyan-500 dark:text-cyan-200 hover:text-cyan-600 dark:hover:text-cyan-500"},sky:{icon:"text-sky-500 bg-sky-100 dark:bg-sky-800 dark:text-sky-200",close:"text-sky-500 dark:text-sky-200 hover:text-sky-600 dark:hover:text-sky-500"},blue:{icon:"text-blue-500 bg-blue-100 dark:bg-blue-800 dark:text-blue-200",close:"text-blue-500 dark:text-blue-200 hover:text-blue-600 dark:hover:text-blue-500"},indigo:{icon:"text-indigo-500 bg-indigo-100 dark:bg-indigo-800 dark:text-indigo-200",close:"text-indigo-500 dark:text-indigo-200 hover:text-indigo-600 dark:hover:text-indigo-500"},violet:{icon:"text-violet-500 bg-violet-100 dark:bg-violet-800 dark:text-violet-200",close:"text-violet-500 dark:text-violet-200 hover:text-violet-600 dark:hover:text-violet-500"},purple:{icon:"text-purple-500 bg-purple-100 dark:bg-purple-800 dark:text-purple-200",close:"text-purple-500 dark:text-purple-200 hover:text-purple-600 dark:hover:text-purple-500"},fuchsia:{icon:"text-fuchsia-500 bg-fuchsia-100 dark:bg-fuchsia-800 dark:text-fuchsia-200",close:"text-fuchsia-500 dark:text-fuchsia-200 hover:text-fuchsia-600 dark:hover:text-fuchsia-500"},pink:{icon:"text-pink-500 bg-pink-100 dark:bg-pink-700 dark:text-pink-200",close:"text-pink-500 dark:text-pink-200 hover:text-pink-600 dark:hover:text-pink-500"},rose:{icon:"text-rose-500 bg-rose-100 dark:bg-rose-700 dark:text-rose-200",close:"text-rose-500 dark:text-rose-200 hover:text-rose-600 dark:hover:text-rose-500"}},align:{true:{base:"items-center"},false:{base:"items-start"}}}});te({base:"fixed z-50 space-y-3"});te({slots:{base:"w-4 h-4 bg-gray-100 border-gray-300 dark:ring-offset-gray-800 focus:ring-2 me-2 rounded-sm",div:"flex items-center"},variants:{color:{primary:{base:"text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600"},secondary:{base:"text-secondary-600 focus:ring-secondary-500 dark:focus:ring-secondary-600"},gray:{base:"text-gray-600 focus:ring-gray-600 dark:ring-offset-gray-800 dark:focus:ring-gray-600"},red:{base:"text-red-600 focus:ring-red-600 dark:ring-offset-red-600 dark:focus:ring-red-600"},orange:{base:"text-orange-600 focus:ring-orange-600 dark:ring-offset-orange-600 dark:focus:ring-orange-600"},amber:{base:"text-amber-600 focus:ring-amber-600 dark:ring-offset-amber-600 dark:focus:ring-amber-600"},yellow:{base:"text-yellow-400 focus:ring-yellow-400 dark:ring-offset-yellow-400 dark:focus:ring-yellow-400"},lime:{base:"text-lime-700 focus:ring-lime-700 dark:ring-offset-lime-700 dark:focus:ring-lime-700"},green:{base:"text-green-600 focus:ring-green-600 dark:ring-offset-green-600 dark:focus:ring-green-600"},emerald:{base:"text-emerald-600 focus:ring-emerald-600 dark:ring-offset-emerald-600 dark:focus:ring-emerald-600"},teal:{base:"text-teal-600 focus:ring-teal-600 dark:ring-offset-teal-600 dark:focus:ring-teal-600"},cyan:{base:"text-cyan-600 focus:ring-cyan-600 dark:ring-offset-cyan-600 dark:focus:ring-cyan-600"},sky:{base:"text-sky-600 focus:ring-sky-600 dark:ring-offset-sky-600 dark:focus:ring-sky-600"},blue:{base:"text-blue-700 focus:ring-blue-600 dark:ring-offset-blue-700 dark:focus:ring-blue-700"},indigo:{base:"text-indigo-700 focus:ring-indigo-700 dark:ring-offset-indigo-700 dark:focus:ring-indigo-700"},violet:{base:"text-violet-600 focus:ring-violet-600 dark:ring-offset-violet-600 dark:focus:ring-violet-600"},purple:{base:"text-purple-600 focus:ring-purple-600 dark:ring-offset-purple-600 dark:focus:ring-purple-600"},fuchsia:{base:"text-fuchsia-600 focus:ring-fuchsia-600 dark:ring-offset-fuchsia-600 dark:focus:ring-fuchsia-600"},pink:{base:"text-pink-600 focus:ring-pink-600 dark:ring-offset-pink-600 dark:focus:ring-pink-600"},rose:{base:"text-rose-600 focus:ring-rose-600 dark:ring-offset-rose-600 dark:focus:ring-rose-600"}},tinted:{true:{base:"dark:bg-gray-600 dark:border-gray-500"},false:{base:"dark:bg-gray-700 dark:border-gray-600"}},custom:{true:{base:"sr-only peer"}},rounded:{true:{base:"rounded-sm"}},inline:{true:{div:"inline-flex",false:"flex items-center"}},disabled:{true:{base:"cursor-not-allowed opacity-50 bg-gray-200 border-gray-300",div:"cursor-not-allowed opacity-70"},false:{}}},defaultVariants:{color:"primary",disabled:!1}});te({base:"",variants:{inline:{true:"inline-flex",false:"flex"},checked:{true:"outline-4 outline-green-500"}},defaultVariants:{inline:!0}});const JI=te({base:"text-sm rtl:text-right font-medium block",variants:{color:{disabled:"text-gray-500 dark:text-gray-500",primary:"text-primary-700 dark:text-primary-500",secondary:"text-secondary-700 dark:text-secondary-500",green:"text-green-700 dark:text-green-500",emerald:"text-emerald-700 dark:text-emerald-500",red:"text-red-700 dark:text-red-500",blue:"text-blue-700 dark:text-blue-500",yellow:"text-yellow-700 dark:text-yellow-500",orange:"text-orange-700 dark:text-orange-500",gray:"text-gray-700 dark:text-gray-200",teal:"text-teal-700 dark:text-teal-500",cyan:"text-cyan-700 dark:text-cyan-500",sky:"text-sky-700 dark:text-sky-500",indigo:"text-indigo-700 dark:text-indigo-500",lime:"text-lime-700 dark:text-lime-500",amber:"text-amber-700 dark:text-amber-500",violet:"text-violet-700 dark:text-violet-500",purple:"text-purple-700 dark:text-purple-500",fuchsia:"text-fuchsia-700 dark:text-fuchsia-500",pink:"text-pink-700 dark:text-pink-500",rose:"text-rose-700 dark:text-rose-500"}}});var QI=Ht("");function eP(r,e){_n(e,!0);let t=mt(e,"color",3,"gray"),n=mt(e,"show",3,!0),i=ir(e,["$$slots","$$events","$$legacy","children","color","show","class"]);const s=Ji("label");let a=Ye(()=>JI({color:t(),class:Jt(s,e.class)}));var o=Rt(),l=yt(o);{var c=u=>{var h=QI();fn(h,()=>({...i,class:X(a)}));var f=Pt(h);ln(f,()=>e.children),We(u,h)},d=u=>{var h=Rt(),f=yt(h);ln(f,()=>e.children),We(u,h)};Ot(l,u=>{n()?u(c):u(d,!1)})}We(r,o),wn()}te({base:"flex flex-col justify-center items-center w-full h-64 bg-gray-50 rounded-lg border-2 border-gray-300 border-dashed cursor-pointer dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"});te({slots:{base:"block w-full disabled:cursor-not-allowed disabled:opacity-50 rtl:text-right p-2.5 focus:border-primary-500 focus:ring-primary-500 dark:focus:border-primary-500 dark:focus:ring-primary-500 bg-gray-50 text-gray-900 dark:bg-gray-700 dark:placeholder-gray-400 border-gray-300 dark:border-gray-600 text-sm rounded-lg border p-0! dark:text-gray-400",wrapper:"relative w-full",close:"flex absolute inset-y-0 items-center text-gray-500 dark:text-gray-400 end-0 p-2.5",svg:""},variants:{size:{sm:{base:"text-xs ps-9 pe-9 p-2"},md:{base:"text-sm ps-10 pe-10 p-2.5"},lg:{base:"sm:text-base ps-11 pe-11 p-3"}}}});te({slots:{base:"relative",input:"block w-full text-sm text-gray-900 bg-transparent appearance-none dark:text-white focus:outline-hidden focus:ring-0 peer disabled:cursor-not-allowed disabled:opacity-50",label:"absolute text-sm duration-300 transform scale-75 z-10 origin-left rtl:origin-right peer-placeholder-shown:scale-100 peer-focus:scale-75",close:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black",combo:"absolute top-full right-0 left-0 z-10 mt-1 max-h-60 overflow-y-auto rounded-md border border-gray-200 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-800",svg:""},variants:{variant:{filled:{base:"relative",input:"rounded-t-lg border-0 border-b-2 bg-gray-50 dark:bg-gray-700",label:"-translate-y-4 start-2.5 peer-placeholder-shown:translate-y-0 peer-focus:-translate-y-4"},outlined:{base:"relative",input:"rounded-lg border",label:"-translate-y-4 bg-white dark:bg-gray-900 px-2 peer-focus:px-2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:-translate-y-4 start-1"},standard:{base:"relative z-0",input:"border-0 border-b-2",label:"-translate-y-6 -z-10 peer-focus:start-0 peer-placeholder-shown:translate-y-0 peer-focus:-translate-y-6"}},size:{small:{},default:{}},color:{default:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-primary-500 focus:border-primary-600",label:"text-gray-500 dark:text-gray-400 peer-focus:text-primary-600 dark:peer-focus:text-primary-500"},primary:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-primary-500 focus:border-primary-600",label:"text-primary-500 dark:text-primary-400 peer-focus:text-primary-600 dark:peer-focus:text-primary-500"},secondary:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-secondary-500 focus:border-secondary-600",label:"text-secondary-500 dark:text-secondary-400 peer-focus:text-secondary-600 dark:peer-focus:text-secondary-500"},gray:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-gray-500 focus:border-gray-600",label:"text-gray-500 dark:text-gray-400 peer-focus:text-gray-600 dark:peer-focus:text-gray-500"},red:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-red-500 focus:border-red-600",label:"text-red-500 dark:text-red-400 peer-focus:text-red-600 dark:peer-focus:text-red-500"},orange:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-orange-500 focus:border-orange-600",label:"text-orange-500 dark:text-orange-400 peer-focus:text-orange-600 dark:peer-focus:text-orange-500"},amber:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-amber-500 focus:border-amber-600",label:"text-amber-500 dark:text-amber-400 peer-focus:text-amber-600 dark:peer-focus:text-amber-500"},yellow:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-yellow-500 focus:border-yellow-600",label:"text-yellow-500 dark:text-yellow-400 peer-focus:text-yellow-600 dark:peer-focus:text-yellow-500"},lime:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-lime-500 focus:border-lime-600",label:"text-lime-500 dark:text-lime-400 peer-focus:text-lime-600 dark:peer-focus:text-lime-500"},green:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-green-500 focus:border-green-600",label:"text-green-500 dark:text-green-400 peer-focus:text-green-600 dark:peer-focus:text-green-500"},emerald:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-emerald-500 focus:border-emerald-600",label:"text-emerald-500 dark:text-emerald-400 peer-focus:text-emerald-600 dark:peer-focus:text-emerald-500"},teal:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-teal-500 focus:border-teal-600",label:"text-teal-500 dark:text-teal-400 peer-focus:text-teal-600 dark:peer-focus:text-teal-500"},cyan:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-cyan-500 focus:border-cyan-600",label:"text-cyan-500 dark:text-cyan-400 peer-focus:text-cyan-600 dark:peer-focus:text-cyan-500"},sky:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-sky-500 focus:border-sky-600",label:"text-sky-500 dark:text-sky-400 peer-focus:text-sky-600 dark:peer-focus:text-sky-500"},blue:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-blue-500 focus:border-blue-600",label:"text-blue-500 dark:text-blue-400 peer-focus:text-blue-600 dark:peer-focus:text-blue-500"},indigo:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-indigo-500 focus:border-indigo-600",label:"text-indigo-500 dark:text-indigo-400 peer-focus:text-indigo-600 dark:peer-focus:text-indigo-500"},violet:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-violet-500 focus:border-violet-600",label:"text-violet-600 dark:text-violet-500 peer-focus:text-violet-600 dark:peer-focus:text-violet-500"},purple:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-purple-500 focus:border-purple-600",label:"text-purple-600 dark:text-purple-500 peer-focus:text-purple-600 dark:peer-focus:text-purple-500"},fuchsia:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-fuchsia-500 focus:border-fuchsia-600",label:"text-fuchsia-600 dark:text-fuchsia-500 peer-focus:text-fuchsia-600 dark:peer-focus:text-fuchsia-500"},pink:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-pink-500 focus:border-pink-600",label:"text-pink-600 dark:text-pink-500 peer-focus:text-pink-600 dark:peer-focus:text-pink-500"},rose:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-rose-500 focus:border-rose-600",label:"text-rose-600 dark:text-rose-500 peer-focus:text-rose-600 dark:peer-focus:text-rose-500"}}},compoundVariants:[{variant:"filled",size:"small",class:{input:"px-2.5 pb-1.5 pt-4",label:"top-3"}},{variant:"filled",size:"default",class:{input:"px-2.5 pb-2.5 pt-5",label:"top-4"}},{variant:"outlined",size:"small",class:{input:"px-2.5 pb-1.5 pt-3",label:"top-1"}},{variant:"outlined",size:"default",class:{input:"px-2.5 pb-2.5 pt-4",label:"top-2"}},{variant:"standard",size:"small",class:{input:"py-2 px-0",label:"top-3"}},{variant:"standard",size:"default",class:{input:"py-2.5 px-0",label:"top-3"}},{variant:"filled",color:"primary",class:{input:"dark:focus:border-primary-500 focus:border-primary-600"}}],defaultVariants:{variant:"standard",size:"default",color:"primary"}});Nt(["click"]);te({base:"text-xs font-normal text-gray-500 dark:text-gray-300",variants:{color:{disabled:"text-gray-400 dark:text-gray-500",primary:"text-primary-500 dark:text-primary-400",secondary:"text-secondary-500 dark:text-secondary-400",green:"text-green-500 dark:text-green-400",emerald:"text-emerald-500 dark:text-emerald-400",red:"text-red-500 dark:text-red-400",blue:"text-blue-500 dark:text-blue-400",yellow:"text-yellow-500 dark:text-yellow-400",orange:"text-orange-500 dark:text-orange-400",gray:"text-gray-500 dark:text-gray-400",teal:"text-teal-500 dark:text-teal-400",cyan:"text-cyan-500 dark:text-cyan-400",sky:"text-sky-500 dark:text-sky-400",indigo:"text-indigo-500 dark:text-indigo-400",lime:"text-lime-500 dark:text-lime-400",amber:"text-amber-500 dark:text-amber-400",violet:"text-violet-500 dark:text-violet-400",purple:"text-purple-500 dark:text-purple-400",fuchsia:"text-fuchsia-500 dark:text-fuchsia-400",pink:"text-pink-500 dark:text-pink-400",rose:"text-rose-500 dark:text-rose-400"}}});te({slots:{base:"relative w-full",input:"block w-full disabled:cursor-not-allowed disabled:opacity-50 rtl:text-right focus:outline-hidden",left:"flex absolute inset-y-0 items-center text-gray-500 dark:text-gray-400 pointer-events-none start-0 p-2.5",right:"flex absolute inset-y-0 items-center text-gray-500 dark:text-gray-400 end-0 p-2.5",close:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black",combo:"absolute top-full right-0 left-0 z-20 mt-1 max-h-60 overflow-y-auto rounded-md border border-gray-200 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-800",comboItem:"text-gray-900 dark:text-gray-50",div:"",svg:""},variants:{size:{sm:{input:"text-xs px-2 py-1"},md:{input:"text-sm px-2.5 py-2.5"},lg:{input:"sm:text-base px-3 py-3"}},color:{default:{input:"border border-gray-300 dark:border-gray-600 focus:border-primary-500 focus:ring-primary-500 dark:focus:border-primary-500 dark:focus:ring-primary-500 bg-gray-50 text-gray-900 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 bg-gray-50 text-gray-900 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400"},tinted:{input:"border border-gray-300 dark:border-gray-500 bg-gray-50 text-gray-900 dark:bg-gray-600 dark:text-white dark:placeholder-gray-400"},primary:{input:"border border-primary-200 dark:border-primary-400 focus:ring-primary-500 focus:border-primary-600 dark:focus:ring-primary-500 dark:focus:border-primary-500 bg-primary-50 text-primary-900 placeholder-primary-700 dark:text-primary-400 dark:placeholder-primary-500 dark:bg-gray-700"},secondary:{input:"border border-secondary-200 dark:border-secondary-400 focus:ring-secondary-500 focus:border-secondary-600 dark:focus:ring-secondary-500 dark:focus:border-secondary-500 bg-secondary-50 text-secondary-900 placeholder-secondary-700 dark:text-secondary-400 dark:placeholder-secondary-500 dark:bg-gray-700"},green:{input:"border border-green-200 dark:border-green-400 focus:ring-green-500 focus:border-green-600 dark:focus:ring-green-500 dark:focus:border-green-500 bg-green-50 text-green-900 placeholder-green-700 dark:text-green-400 dark:placeholder-green-500 dark:bg-gray-700"},emerald:{input:"border border-emerald-200 dark:border-emerald-400 focus:ring-emerald-500 focus:border-emerald-600 dark:focus:ring-emerald-500 dark:focus:border-emerald-500 bg-emerald-50 text-emerald-900 placeholder-emerald-700 dark:text-emerald-400 dark:placeholder-emerald-500 dark:bg-gray-700"},red:{input:"border border-red-200 dark:border-red-400 focus:ring-red-500 focus:border-red-600 dark:focus:ring-red-500 dark:focus:border-red-500 bg-red-50 text-red-900 placeholder-red-700 dark:text-red-400 dark:placeholder-red-500 dark:bg-gray-700"},blue:{input:"border border-blue-200 dark:border-blue-400 focus:ring-blue-500 focus:border-blue-600 dark:focus:ring-blue-500 dark:focus:border-blue-500 bg-blue-50 text-blue-900 placeholder-blue-700 dark:text-blue-400 dark:placeholder-blue-500 dark:bg-gray-700"},yellow:{input:"border border-yellow-200 dark:border-yellow-400 focus:ring-yellow-500 focus:border-yellow-600 dark:focus:ring-yellow-500 dark:focus:border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 dark:text-yellow-400 dark:placeholder-yellow-500 dark:bg-gray-700"},orange:{input:"border border-orange-200 dark:border-orange-400 focus:ring-orange-500 focus:border-orange-600 dark:focus:ring-orange-500 dark:focus:border-orange-500 bg-orange-50 text-orange-900 placeholder-orange-700 dark:text-orange-400 dark:placeholder-orange-500 dark:bg-gray-700"},gray:{input:"border border-gray-200 dark:border-gray-400 focus:ring-gray-500 focus:border-gray-600 dark:focus:ring-gray-500 dark:focus:border-gray-500 bg-gray-50 text-gray-900 placeholder-gray-700 dark:text-gray-400 dark:placeholder-gray-500 dark:bg-gray-700"},teal:{input:"border border-teal-200 dark:border-teal-400 focus:ring-teal-500 focus:border-teal-600 dark:focus:ring-teal-500 dark:focus:border-teal-500 bg-teal-50 text-teal-900 placeholder-teal-700 dark:text-teal-400 dark:placeholder-teal-500 dark:bg-gray-700"},cyan:{input:"border border-cyan-200 dark:border-cyan-400 focus:ring-cyan-500 focus:border-cyan-600 dark:focus:ring-cyan-500 dark:focus:border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 dark:text-cyan-400 dark:placeholder-cyan-500 dark:bg-gray-700"},sky:{input:"border border-sky-200 dark:border-sky-400 focus:ring-sky-500 focus:border-sky-600 dark:focus:ring-sky-500 dark:focus:border-sky-500 bg-sky-50 text-sky-900 placeholder-sky-700 dark:text-sky-400 dark:placeholder-sky-500 dark:bg-gray-700"},indigo:{input:"border border-indigo-200 dark:border-indigo-400 focus:ring-indigo-500 focus:border-indigo-600 dark:focus:ring-indigo-500 dark:focus:border-indigo-500 bg-indigo-50 text-indigo-900 placeholder-indigo-700 dark:text-indigo-400 dark:placeholder-indigo-500 dark:bg-gray-700"},lime:{input:"border border-lime-200 dark:border-lime-400 focus:ring-lime-500 focus:border-lime-600 dark:focus:ring-lime-500 dark:focus:border-lime-500 bg-lime-50 text-lime-900 placeholder-lime-700 dark:text-lime-400 dark:placeholder-lime-500 dark:bg-gray-700"},amber:{input:"border border-amber-200 dark:border-amber-400 focus:ring-amber-500 focus:border-amber-600 dark:focus:ring-amber-500 dark:focus:border-amber-500 bg-amber-50 text-amber-900 placeholder-amber-700 dark:text-amber-400 dark:placeholder-amber-500 dark:bg-gray-700"},violet:{input:"border border-violet-200 dark:border-violet-400 focus:ring-violet-500 focus:border-violet-600 dark:focus:ring-violet-500 dark:focus:border-violet-500 bg-violet-50 text-violet-900 placeholder-violet-700 dark:text-violet-400 dark:placeholder-violet-500 dark:bg-gray-700"},purple:{input:"border border-purple-200 dark:border-purple-400 focus:ring-purple-500 focus:border-purple-600 dark:focus:ring-purple-500 dark:focus:border-purple-500 bg-purple-50 text-purple-900 placeholder-purple-700 dark:text-purple-400 dark:placeholder-purple-500 dark:bg-gray-700"},fuchsia:{input:"border border-fuchsia-200 dark:border-fuchsia-400 focus:ring-fuchsia-500 focus:border-fuchsia-600 dark:focus:ring-fuchsia-500 dark:focus:border-fuchsia-500 bg-fuchsia-50 text-fuchsia-900 placeholder-fuchsia-700 dark:text-fuchsia-400 dark:placeholder-fuchsia-500 dark:bg-gray-700"},pink:{input:"border border-pink-200 dark:border-pink-400 focus:ring-pink-500 focus:border-pink-600 dark:focus:ring-pink-500 dark:focus:border-pink-500 bg-pink-50 text-pink-900 placeholder-pink-700 dark:text-pink-400 dark:placeholder-pink-500 dark:bg-gray-700"},rose:{input:"border border-rose-200 dark:border-rose-400 focus:ring-rose-500 focus:border-rose-600 dark:focus:ring-rose-500 dark:focus:border-rose-500 bg-rose-50 text-rose-900 placeholder-rose-700 dark:text-rose-400 dark:placeholder-rose-500 dark:bg-gray-700"}},grouped:{false:{base:"rounded-lg",input:"rounded-lg"},true:{base:"first:rounded-s-lg last:rounded-e-lg not-first:-ms-px group",input:"group-first:rounded-s-lg group-last:rounded-e-lg group-not-first:-ms-px h-full"}}},defaultVariants:{size:"md",color:"default"}});Nt(["click"]);te({slots:{div:"absolute inset-y-0 start-0 top-0 flex items-center ps-3.5 pointer-events-none",svg:"w-4 h-4 text-gray-500 dark:text-gray-400",input:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 disabled:cursor-not-allowed disabled:opacity-50",span:"absolute start-0 bottom-3 text-gray-500 dark:text-gray-400",floatingInput:"block py-2.5 ps-6 pe-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-primary-500 focus:outline-none focus:ring-0 focus:border-primary-600 peer disabled:cursor-not-allowed disabled:opacity-50",label:"absolute text-sm text-gray-500 dark:text-gray-400 duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:start-6 peer-focus:start-0 peer-focus:text-primary-600 peer-focus:dark:text-primary-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto"},variants:{phoneType:{default:{},floating:{svg:"w-4 h-4 rtl:rotate-[270deg]"},countryCode:{input:"rounded-none rounded-e-lg"},copy:{},advanced:{}},phoneIcon:{true:{input:"ps-10"},false:{}}}});te({slots:{input:"flex items-center w-4 h-4 bg-gray-100 border-gray-300 dark:ring-offset-gray-800 focus:ring-2 mr-2",label:"flex items-center"},variants:{color:{primary:{input:"text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600"},secondary:{input:"text-secondary-600 focus:ring-secondary-500 dark:focus:ring-secondary-600"},gray:{input:"text-gray-600 focus:ring-gray-500 dark:focus:ring-gray-600"},red:{input:"text-red-600 focus:ring-red-500 dark:focus:ring-red-600"},orange:{input:"text-orange-500 focus:ring-orange-500 dark:focus:ring-orange-600"},amber:{input:"text-amber-600 focus:ring-amber-500 dark:focus:ring-amber-600"},yellow:{input:"text-yellow-400 focus:ring-yellow-500 dark:focus:ring-yellow-600"},lime:{input:"text-lime-600 focus:ring-lime-500 dark:focus:ring-lime-600"},green:{input:"text-green-600 focus:ring-green-500 dark:focus:ring-green-600"},emerald:{input:"text-emerald-600 focus:ring-emerald-500 dark:focus:ring-emerald-600"},teal:{input:"text-teal-600 focus:ring-teal-500 dark:focus:ring-teal-600"},cyan:{input:"text-cyan-600 focus:ring-cyan-500 dark:focus:ring-cyan-600"},sky:{input:"text-sky-600 focus:ring-sky-500 dark:focus:ring-sky-600"},blue:{input:"text-blue-600 focus:ring-blue-500 dark:focus:ring-blue-600"},indigo:{input:"text-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600"},violet:{input:"text-violet-600 focus:ring-violet-500 dark:focus:ring-violet-600"},purple:{input:"text-purple-600 focus:ring-purple-500 dark:focus:ring-purple-600"},fuchsia:{input:"text-fuchsia-600 focus:ring-fuchsia-500 dark:focus:ring-fuchsia-600"},pink:{input:"text-pink-600 focus:ring-pink-500 dark:focus:ring-pink-600"},rose:{input:"text-rose-600 focus:ring-rose-500 dark:focus:ring-rose-600"}},tinted:{true:{input:"dark:bg-gray-600 dark:border-gray-500"},false:{input:"dark:bg-gray-700 dark:border-gray-600"}},custom:{true:{input:"sr-only peer"},false:{input:"relative"}},inline:{true:{label:"inline-flex"},false:{label:"flex"}}},defaultVariants:{color:"primary"}});te({base:"",variants:{inline:{true:"inline-flex",false:"flex"}},defaultVariants:{inline:!0}});te({base:"w-full bg-gray-200 rounded-lg cursor-pointer dark:bg-gray-700",variants:{size:{sm:"h-1 range-sm",md:"h-2",lg:"h-3 range-lg"},color:{gray:"",red:"",blue:"",indigo:"",violet:"",purple:"",fuchsia:"",pink:"",rose:""},appearance:{auto:"range accent-red-500",none:"appearance-none"}},compoundVariants:[{appearance:"auto",color:"gray",class:"accent-gray-500"},{appearance:"auto",color:"red",class:"accent-red-500"},{appearance:"auto",color:"blue",class:"accent-blue-500"},{appearance:"auto",color:"indigo",class:"accent-indigo-500"},{appearance:"auto",color:"violet",class:"accent-violet-500"},{appearance:"auto",color:"purple",class:"accent-purple-500"},{appearance:"auto",color:"fuchsia",class:"accent-fuchsia-500"},{appearance:"auto",color:"pink",class:"accent-pink-500"},{appearance:"auto",color:"rose",class:"accent-rose-500"}]});te({slots:{base:"relative w-full",left:"absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none",icon:"text-gray-500 dark:text-gray-400",content:"absolute inset-y-0 end-0 flex items-center text-gray-500 dark:text-gray-400",input:"block w-full text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 disabled:cursor-not-allowed disabled:opacity-50",close:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black",svg:""},variants:{size:{sm:{input:"text-xs p-2 ps-9 pe-9 ",icon:"w-3 h-3"},md:{input:"text-sm p-2.5 ps-10 pe-10",icon:"w-4 h-4"},lg:{input:"sm:text-base p-3 ps-11 pe-11",icon:"w-6 h-6"}}},defaultVariants:{size:"lg"}});const tP=te({slots:{base:"relative w-full",select:"block w-full rtl:text-right",close:"absolute right-8 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black",svg:""},variants:{underline:{true:{select:"text-gray-500 bg-transparent rounded-none! border-0 border-b-2 border-gray-200 appearance-none dark:text-gray-400 dark:border-gray-700 focus:outline-hidden focus:ring-0 focus:border-gray-200 peer px-0!"},false:{select:"text-gray-900 bg-gray-50 border border-gray-300 focus:outline-hidden focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"}},size:{sm:{select:"text-xs px-2.5 py-2.5"},md:{select:"text-sm px-2.5 py-2.5"},lg:{select:"text-base py-3 px-4"}},disabled:{true:{select:"cursor-not-allowed opacity-50"},false:{}},grouped:{false:{base:"rounded-lg",select:"rounded-lg"},true:{base:"first:rounded-s-lg last:rounded-e-lg not-first:-ms-px group",select:"group-first:rounded-s-lg group-last:rounded-e-lg group-not-first:-ms-px h-full"}}},defaultVariants:{underline:!1,size:"md"}});te({slots:{base:"relative border border-gray-300 w-full flex items-center gap-2 dark:border-gray-600 ring-primary-500 dark:ring-primary-500 focus-visible:outline-hidden",select:"",dropdown:"absolute z-50 p-3 flex flex-col gap-1 max-h-64 bg-white border border-gray-300 dark:bg-gray-700 dark:border-gray-600 start-0 top-[calc(100%+1rem)] rounded-lg cursor-pointer overflow-y-scroll w-full",item:"py-2 px-3 rounded-lg text-gray-600 hover:text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:text-gray-300 dark:hover:bg-gray-600",close:"p-0 focus:ring-gray-400 dark:text-white",span:"",placeholder:"text-gray-400",svg:"ms-1 h-3 w-3 cursor-pointer text-gray-800 dark:text-white"},variants:{size:{sm:"px-2.5 py-2.5 min-h-[2.4rem] text-xs",md:"px-2.5 py-2.5 min-h-[2.7rem] text-sm",lg:"px-3 py-3 min-h-[3.2rem] sm:text-base"},disabled:{true:{base:"cursor-not-allowed opacity-50 pointer-events-none",item:"cursor-not-allowed opacity-50",close:"cursor-not-allowed"},false:{base:"focus-within:border-primary-500 dark:focus-within:border-primary-500 focus-within:ring-1"}},active:{true:{item:"bg-primary-100 text-primary-500 dark:bg-primary-500 dark:text-primary-100 hover:bg-primary-100 dark:hover:bg-primary-500 hover:text-primary-600 dark:hover:text-primary-100"}},selected:{true:{item:"bg-gray-100 text-black font-semibold hover:text-black dark:text-white dark:bg-gray-600 dark:hover:text-white"}},grouped:{false:{base:"rounded-lg",select:"rounded-lg"},true:{base:"first:rounded-s-lg last:rounded-e-lg not-first:-ms-px group",select:"group-first:rounded-s-lg group-last:rounded-e-lg group-not-first:-ms-px h-full"}}},compoundVariants:[{selected:!0,active:!0,class:{item:"bg-primary-200 dark:bg-primary-600 text-primary-700 dark:text-primary-100 font-semibold"}}],defaultVariants:{underline:!1,size:"md"}});var nP=Ht(""),rP=Ht(""),iP=Ht("
");function sP(r,e){_n(e,!0);let t=mt(e,"value",15),n=mt(e,"elementRef",15),i=mt(e,"size",3,"md"),s=mt(e,"placeholder",3,"Choose option ..."),a=mt(e,"clearableColor",3,"none"),o=ir(e,["$$slots","$$events","$$legacy","children","items","value","elementRef","underline","size","disabled","placeholder","clearable","clearableColor","clearableOnClick","onClear","clearableSvgClass","clearableClass","selectClass","class","classes"]);e.selectClass,e.clearableSvgClass,e.clearableClass;const l=Ye(()=>e.classes??{select:e.selectClass,svg:e.clearableSvgClass,close:e.clearableClass}),c=Ji("select");let d=sn("group");const u=Ye(()=>tP({underline:e.underline,size:i(),disabled:e.disabled,grouped:!!d})),h=Ye(()=>X(u).base),f=Ye(()=>X(u).select),m=Ye(()=>X(u).close);mI(()=>{n()&&(n(n().value="",!0),n().dispatchEvent(new Event("change",{bubbles:!0}))),t(""),e.onClear&&e.onClear(),e.clearableOnClick&&e.clearableOnClick()});var g=iP(),p=Pt(g);fn(p,S=>({disabled:e.disabled,...o,class:S}),[()=>X(f)({class:Jt(c?.select,X(l).select)})]);var v=Pt(p);{var b=S=>{var E=nP(),I=Pt(E);E.value=E.__value="",dr(()=>{$1(E,t()===""||t()===void 0),pa(I,s())}),We(S,E)};Ot(v,S=>{s()&&S(b)})}var y=Ft(v);{var _=S=>{var E=Rt(),I=yt(E);k_(I,17,()=>e.items,O=>O.value,(O,q)=>{var z=rP(),V=Pt(z),H={};dr(()=>{z.disabled=X(q).disabled,pa(V,X(q).name),H!==(H=X(q).value)&&(z.value=(z.__value=X(q).value)??"")}),We(O,z)}),We(S,E)};Ot(y,S=>{e.items&&S(_)})}var w=Ft(y);{var T=S=>{var E=Rt(),I=yt(E);ln(I,()=>e.children),We(S,E)};Ot(w,S=>{e.children&&S(T)})}Tu(p,S=>n(S),()=>n());var A=Ft(p,2);{var M=S=>{{let E=Ye(()=>X(m)({class:Jt(c?.close,X(l).close)})),I=Ye(()=>Jt(X(l).svg));SI(S,{get class(){return X(E)},get color(){return a()},"aria-label":"Clear search value",get svgClass(){return X(I)},get disabled(){return e.disabled}})}};Ot(A,S=>{t()!==void 0&&t()!==""&&e.clearable&&S(M)})}dr(S=>Ta(g,1,S),[()=>Ma(X(h)({class:Jt(c?.base,e.class)}))]),B_(p,t),We(r,g),wn()}Nt(["change","click"]);te({slots:{div:"relative",base:"block w-full text-sm border-0 px-0 bg-inherit dark:bg-inherit focus:outline-hidden focus:ring-0 disabled:cursor-not-allowed disabled:opacity-50",wrapper:"text-sm rounded-lg bg-gray-50 dark:bg-gray-600 text-gray-900 dark:placeholder-gray-400 dark:text-white border border-gray-200 dark:border-gray-500 disabled:cursor-not-allowed disabled:opacity-50",inner:"py-2 px-4 bg-white dark:bg-gray-800",header:"py-2 px-3 border-gray-200 dark:border-gray-500",footer:"py-2 px-3 border-gray-200 dark:border-gray-500",addon:"absolute top-2 right-2 z-10",close:"absolute right-2 top-5 -translate-y-1/2 text-gray-400 hover:text-black",svg:""},variants:{wrapped:{false:{wrapper:"p-2.5 text-sm focus:outline-hidden focus:ring-primary-500 border-gray-300 focus:border-primary-500 dark:focus:ring-primary-500 dark:focus:border-primary-500 disabled:cursor-not-allowed disabled:opacity-50"}},hasHeader:{true:{header:"border-b"},false:{inner:"rounded-t-lg"}},hasFooter:{true:{footer:"border-t"},false:{inner:"rounded-b-lg"}}}});const aP=te({slots:{span:"me-3 shrink-0 bg-gray-200 rounded-full peer-focus:ring-4 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:bg-white after:border-gray-300 after:border after:rounded-full after:transition-all dark:bg-gray-600 dark:border-gray-500 relative ",label:"flex items-center",input:"w-4 h-4 bg-gray-100 border-gray-300 dark:ring-offset-gray-800 focus:ring-2 rounded-sm dark:bg-gray-700 dark:border-gray-600 sr-only peer"},variants:{disabled:{true:{label:"cursor-not-allowed opacity-50"}},checked:{true:"",false:""},off_state_label:{true:{span:"ms-3"}},color:{primary:{span:"peer-focus:ring-primary-300 dark:peer-focus:ring-primary-800 peer-checked:bg-primary-600"},secondary:{span:"peer-focus:ring-secondary-300 dark:peer-focus:ring-secondary-800 peer-checked:bg-secondary-600"},gray:{span:"peer-focus:ring-gray-300 dark:peer-focus:ring-gray-800 peer-checked:bg-gray-500"},red:{span:"peer-focus:ring-red-300 dark:peer-focus:ring-red-800 peer-checked:bg-red-600"},orange:{span:"peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:bg-orange-500"},amber:{span:"peer-focus:ring-amber-300 dark:peer-focus:ring-amber-800 peer-checked:bg-amber-600"},yellow:{span:"peer-focus:ring-yellow-300 dark:peer-focus:ring-yellow-800 peer-checked:bg-yellow-400"},lime:{span:"peer-focus:ring-lime-300 dark:peer-focus:ring-lime-800 peer-checked:bg-lime-500"},green:{span:"peer-focus:ring-green-300 dark:peer-focus:ring-green-800 peer-checked:bg-green-600"},emerald:{span:"peer-focus:ring-emerald-300 dark:peer-focus:ring-emerald-800 peer-checked:bg-emerald-600"},teal:{span:"peer-focus:ring-teal-300 dark:peer-focus:ring-teal-800 peer-checked:bg-teal-600"},cyan:{span:"peer-focus:ring-cyan-300 dark:peer-focus:ring-cyan-800 peer-checked:bg-cyan-600"},sky:{span:"peer-focus:ring-sky-300 dark:peer-focus:ring-sky-800 peer-checked:bg-sky-600"},blue:{span:"peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 peer-checked:bg-blue-600"},indigo:{span:"peer-focus:ring-indigo-300 dark:peer-focus:ring-indigo-800 peer-checked:bg-indigo-600"},violet:{span:"peer-focus:ring-violet-300 dark:peer-focus:ring-violet-800 peer-checked:bg-violet-600"},purple:{span:"peer-focus:ring-purple-300 dark:peer-focus:ring-purple-800 peer-checked:bg-purple-600"},fuchsia:{span:"peer-focus:ring-fuchsia-300 dark:peer-focus:ring-fuchsia-800 peer-checked:bg-fuchsia-600"},pink:{span:"peer-focus:ring-pink-300 dark:peer-focus:ring-pink-800 peer-checked:bg-pink-600"},rose:{span:"peer-focus:ring-rose-300 dark:peer-focus:ring-rose-800 peer-checked:bg-rose-600"}},size:{small:{span:"w-9 h-5 after:top-[2px] after:start-[2px] after:h-4 after:w-4"},default:{span:"w-11 h-6 after:top-0.5 after:start-[2px] after:h-5 after:w-5"},large:{span:"w-14 h-7 after:top-0.5 after:start-[4px] after:h-6 after:w-6"}}},defaultVariants:{color:"primary"}});var oP=Ht(" ",1);function Yb(r,e){_n(e,!0);let t=mt(e,"size",3,"default"),n=mt(e,"checked",15),i=mt(e,"color",3,"primary"),s=ir(e,["$$slots","$$events","$$legacy","children","size","value","checked","disabled","color","class","classes","inputClass","spanClass","offLabel"]);e.inputClass,e.spanClass;const a=Ye(()=>e.classes??{input:e.inputClass,span:e.spanClass}),o=Ji("toggle"),l=Ye(()=>aP({color:i(),checked:n(),size:t(),disabled:e.disabled,off_state_label:!!e.offLabel})),c=Ye(()=>X(l).input),d=Ye(()=>X(l).label),u=Ye(()=>X(l).span);{let h=Ye(()=>X(d)({class:Jt(o?.label,e.class)}));eP(r,{get class(){return X(h)},children:(f,m)=>{var x=oP(),g=yt(x);{var p=w=>{var T=Rt(),A=yt(T);ln(A,()=>e.offLabel),We(w,T)};Ot(g,w=>{e.offLabel&&w(p)})}var v=Ft(g,2);fn(v,w=>({type:"checkbox",value:e.value,...s,disabled:e.disabled,class:w}),[()=>X(c)({class:Jt(o?.input,X(a).input)})],void 0,void 0,void 0,!0);var b=Ft(v,2),y=Ft(b,2);{var _=w=>{var T=Rt(),A=yt(T);ln(A,()=>e.children),We(w,T)};Ot(y,w=>{e.children&&w(_)})}dr(w=>Ta(b,1,w),[()=>Ma(X(u)({class:Jt(o?.span,X(a).span)}))]),V_(v,n),We(f,x)},$$slots:{default:!0}})}wn()}te({slots:{buttonGroup:"inline-flex rounded-lg shadow-sm relative",input:"block disabled:cursor-not-allowed disabled:opacity-50 rtl:text-right focus:ring-0 focus:outline-none",inputWithIcon:"relative px-2 pr-8",iconWrapper:"pointer-events-none absolute inset-y-0 end-0 top-0 flex items-center pe-3.5",icon:"h-4 w-4 text-gray-500 dark:text-gray-400",select:"text-gray-900 disabled:text-gray-400 bg-gray-50 border border-gray-300 focus:ring-0 focus:outline-none block w-full border-l-1 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:disabled:text-gray-500 dark:focus:ring-primary-500 dark:focus:border-primary-500",button:"!rounded-r-lg",buttonIcon:"ml-2 h-4 w-4",rangeSeparator:"flex items-center justify-center px-2 text-gray-500 dark:text-gray-400",rangeInputWrapper:"relative",rangeInput:"relative pr-8",rangeButton:"pointer-events-none absolute inset-y-0 top-0 right-0 flex items-center border-0 bg-transparent pe-3.5",dropdownContent:"p-4 last:rounded-r-lg",dropdownInner:"flex flex-col space-y-4",dropdownTimeRow:"flex space-x-4",dropdownTimeCol:"flex flex-col",dropdownTimeInput:"w-24 rounded-l-lg !border-r px-2",dropdownButton:"w-full !rounded-l-lg",toggleWrapper:"flex w-full flex-col space-y-2",toggleRow:"flex items-center justify-between",toggleTimeRow:"flex space-x-4 p-2.5",toggleTimeCol:"flex flex-col",toggleTimeInput:"w-24 rounded-lg !border-r px-2",inlineGrid:"grid w-full gap-2",inlineButton:"rounded-lg"},variants:{type:{default:{input:"rounded-e-lg"},select:{input:"w-1/3 rounded-l-lg rounded-e-none",select:"rounded-r-lg rounded-l-none"},dropdown:{input:"rounded-l-lg rounded-e-none"},range:{},"timerange-dropdown":{},"timerange-toggle":{},"inline-buttons":{}},columns:{1:{inlineGrid:"grid-cols-1"},2:{inlineGrid:"grid-cols-2"},3:{inlineGrid:"grid-cols-3"},4:{inlineGrid:"grid-cols-4"}},disabled:{true:{input:"disabled:cursor-not-allowed disabled:opacity-50"}}},defaultVariants:{type:"default",columns:2,disabled:!1}});Nt(["click"]);te({base:"inline-flex items-center hover:underline",variants:{color:{primary:"text-primary-600 dark:text-primary-500",secondary:"text-secondary-600 dark:text-secondary-500",gray:"text-gray-600 dark:text-gray-500",red:"text-red-600 dark:text-red-500",orange:"text-orange-600 dark:text-orange-500",amber:"text-amber-600 dark:text-amber-500",yellow:"text-yellow-600 dark:text-yellow-500",lime:"text-lime-600 dark:text-lime-500",green:"text-green-600 dark:text-green-500",emerald:"text-emerald-600 dark:text-emerald-500",teal:"text-teal-600 dark:text-teal-500",cyan:"text-cyan-600 dark:text-cyan-500",sky:"text-sky-600 dark:text-sky-500",blue:"text-blue-600 dark:text-blue-500",indigo:"text-indigo-600 dark:text-indigo-500",violet:"text-violet-600 dark:text-violet-500",purple:"text-purple-600 dark:text-purple-500",fuchsia:"text-fuchsia-600 dark:text-fuchsia-500",pink:"text-pink-600 dark:text-pink-500",rose:"text-rose-600 dark:text-rose-500"}}});te({base:"font-semibold text-gray-900 dark:text-white",variants:{border:{true:"border-s-4 border-gray-300 dark:border-gray-500",false:""},italic:{true:"italic",false:""},bg:{true:"bg-gray-50 dark:bg-gray-800",false:""},alignment:{left:"text-left",center:"text-center",right:"text-right"},size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"}},defaultVariants:{border:!1,italic:!0,bg:!1,alignment:"left",size:"lg"}});te({variants:{tag:{dt:"text-gray-500 md:text-lg dark:text-gray-400",dd:"text-lg font-semibold"}},defaultVariants:{tag:"dt"}});te({base:"font-bold text-gray-900 dark:text-white",variants:{tag:{h1:"text-5xl font-extrabold",h2:"text-4xl",h3:"text-3xl",h4:"text-2xl",h5:"text-xl",h6:"text-lg"}},defaultVariants:{tag:"h1"}});te({slots:{base:"h-px my-8 border-0",div:"inline-flex items-center justify-center w-full",content:"absolute px-4 -translate-x-1/2 rtl:translate-x-1/2 bg-white start-1/2 dark:bg-gray-900",bg:""},variants:{withChildren:{true:{base:"w-full",div:"relative"}}},defaultVariants:{withChildren:!1}});te({slots:{base:"max-w-full h-auto",figure:"",caption:"mt-2 text-sm text-center text-gray-500 dark:text-gray-400"},variants:{size:{xs:{base:"max-w-xs",figure:"max-w-xs"},sm:{base:"max-w-sm",figure:"max-w-sm"},md:{base:"max-w-md",figure:"max-w-md"},lg:{base:"max-w-lg",figure:"max-w-lg"},xl:{base:"max-w-xl",figure:"max-w-xl"},"2xl":{base:"max-w-2xl",figure:"max-w-2xl"},full:{base:"max-w-full",figure:"max-w-full"}},effect:{grayscale:{base:"cursor-pointer rounded-lg grayscale filter transition-all duration-300 hover:grayscale-0"},blur:{base:"blur-xs transition-all duration-300 hover:blur-none"},invert:{base:"invert filter transition-all duration-300 hover:invert-0"},sepia:{base:"sepia filter transition-all duration-300 hover:sepia-0"},saturate:{base:"saturate-50 filter transition-all duration-300 hover:saturate-100"},"hue-rotate":{base:"hue-rotate-60 filter transition-all duration-300 hover:hue-rotate-0"}},align:{left:{base:"mx-0",figure:"mx-0"},center:{base:"mx-auto",figure:"mx-auto"},right:{base:"ml-auto mr-0",figure:"ml-auto mr-0"}}}});te({base:"grid grid-cols-1 sm:grid-cols-2"});te({base:"",variants:{tag:{ul:"list-disc",dl:"[&>*]:list-none list-none",ol:"list-decimal"},position:{inside:"list-inside",outside:"list-outside"}},defaultVariants:{position:"inside",tag:"ul"}});te({base:"text-white dark:bg-blue-500 bg-blue-600 px-2 rounded-sm"});te({base:"text-gray-900 dark:text-white",variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},weight:{thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},space:{tighter:"tracking-tighter",tight:"tracking-tight",normal:"tracking-normal",wide:"tracking-wide",wider:"tracking-wider",widest:"tracking-widest"},height:{none:"leading-none",tight:"leading-tight",snug:"leading-snug",normal:"leading-normal",relaxed:"leading-relaxed",loose:"leading-loose",3:"leading-3",4:"leading-4",5:"leading-5",6:"leading-6",7:"leading-7",8:"leading-8",9:"leading-9",10:"leading-10"},align:{left:"text-left",center:"text-center",right:"text-right"},whitespace:{normal:"whitespace-normal",nowrap:"whitespace-nowrap",pre:"whitespace-pre",preline:"whitespace-pre-line",prewrap:"whitespace-pre-wrap"},italic:{true:"italic"},firstUpper:{true:"first-line:uppercase first-line:tracking-widest first-letter:text-7xl first-letter:font-bold first-letter:text-gray-900 dark:first-letter:text-gray-100 first-letter:me-3 first-letter:float-left",false:""},justify:{true:"text-justify",false:""}}});te({base:"text-gray-500 dark:text-gray-400 font-semibold"});te({variants:{italic:{true:"italic"},underline:{true:"underline decoration-2 decoration-blue-400 dark:decoration-blue-600"},linethrough:{true:"line-through"},uppercase:{true:"uppercase"},gradient:{skyToEmerald:"text-transparent bg-clip-text bg-linear-to-r to-emerald-600 from-sky-400",purpleToBlue:"text-transparent bg-clip-text bg-linear-to-r from-purple-500 to-blue-500",pinkToOrange:"text-transparent bg-clip-text bg-linear-to-r from-pink-500 to-orange-400",tealToLime:"text-transparent bg-clip-text bg-linear-to-r from-teal-400 to-lime-300",redToYellow:"text-transparent bg-clip-text bg-linear-to-r from-red-600 to-yellow-500",indigoToCyan:"text-transparent bg-clip-text bg-linear-to-r from-indigo-600 to-cyan-400",fuchsiaToRose:"text-transparent bg-clip-text bg-linear-to-r from-fuchsia-500 to-rose-500",amberToEmerald:"text-transparent bg-clip-text bg-linear-to-r from-amber-400 to-emerald-500",violetToRed:"text-transparent bg-clip-text bg-linear-to-r from-violet-600 to-red-500",blueToGreen:"text-transparent bg-clip-text bg-linear-to-r from-blue-400 via-teal-500 to-green-400",orangeToPurple:"text-transparent bg-clip-text bg-linear-to-r from-orange-400 via-pink-500 to-purple-500",yellowToRed:"text-transparent bg-clip-text bg-linear-to-r from-yellow-200 via-indigo-400 to-red-600",none:""},highlight:{blue:"text-blue-600 dark:text-blue-500",green:"text-green-600 dark:text-green-500",red:"text-red-600 dark:text-red-500",yellow:"text-yellow-600 dark:text-yellow-500",purple:"text-purple-600 dark:text-purple-500",pink:"text-pink-600 dark:text-pink-500",indigo:"text-indigo-600 dark:text-indigo-500",teal:"text-teal-600 dark:text-teal-500",orange:"text-orange-600 dark:text-orange-500",cyan:"text-cyan-600 dark:text-cyan-500",fuchsia:"text-fuchsia-600 dark:text-fuchsia-500",amber:"text-amber-600 dark:text-amber-500",lime:"text-lime-600 dark:text-lime-500",none:""},decoration:{solid:"underline decoratio-solid",double:"underline decoration-double",dotted:"underline decoration-dotted",dashed:"underline decoration-dashed",wavy:"underline decoration-wavy",none:"decoration-none"},decorationColor:{primary:"underline decoration-primary-400 dark:decoration-primary-600",secondary:"underline decoration-secondary-400 dark:decoration-secondary-600",gray:"underline decoration-gray-400 dark:decoration-gray-600",orange:"underline decoration-orange-400 dark:decoration-orange-600",red:"underline decoration-red-400 dark:decoration-red-600",yellow:"underline decoration-yellow-400 dark:decoration-yellow-600",lime:"underline decoration-lime-400 dark:decoration-lime-600",green:"underline decoration-green-400 dark:decoration-green-600",emerald:"underline decoration-emerald-400 dark:decoration-emerald-600",teal:"underline decoration-teal-400 dark:decoration-teal-600",cyan:"underline decoration-cyan-400 dark:decoration-cyan-600",sky:"underline decoration-sky-400 dark:decoration-sky-600",blue:"underline decoration-blue-400 dark:decoration-blue-600",indigo:"underline decoration-indigo-400 dark:decoration-indigo-600",violet:"underline decoration-violet-400 dark:decoration-violet-600",purple:"underline decoration-purple-400 dark:decoration-purple-600",fuchsia:"underline decoration-fuchsia-400 dark:decoration-fuchsia-600",pink:"underline decoration-pink-400 dark:decoration-pink-600",rose:"underline decoration-rose-400 dark:decoration-rose-600",none:"decoration-none"},decorationThickness:{1:"underline decoration-1",2:"underline decoration-2",4:"underline decoration-4",8:"underline decoration-8",0:"decoration-0"}}});te({base:"inline-flex border border-gray-300 overflow-hidden",variants:{roundedSize:{sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}}});te({slots:{button:"relative flex items-center transition-all duration-200 focus:outline-none border-r last:border-r-0 dark:bg-white dark:text-gray-800 disabled:cursor-not-allowed disabled:opacity-50",content:"flex items-center w-full overflow-hidden relative",text:"transition-all duration-200 ml-0",icon:"absolute left-0 flex-shrink-0 text-green-600"},variants:{selected:{true:{text:"ml-5"},false:{}},size:{sm:{button:"p-1 px-2 text-sm"},md:{button:"p-2 px-4 text-base"},lg:{button:"p-3 px-5 text-lg"},xl:{button:"p-4 px-6 text-xl"}},roundedSize:{sm:{button:"first:rounded-s-sm last:rounded-e-sm"},md:{button:"first:rounded-s-md last:rounded-e-md"},lg:{button:"first:rounded-s-lg last:rounded-e-lg"},xl:{button:"first:rounded-s-xl last:rounded-e-xl"},full:{button:"first:rounded-s-full last:rounded-e-full"}},color:{primary:{button:"data-[selected=true]:bg-primary-200 data-[selected=false]:hover:bg-gray-100"},secondary:{button:"data-[selected=true]:bg-secondary-200 data-[selected=false]:hover:bg-gray-100"},gray:{button:"data-[selected=true]:bg-gray-200 data-[selected=false]:hover:bg-gray-100"},red:{button:"data-[selected=true]:bg-red-200 data-[selected=false]:hover:bg-red-50"},orange:{button:"data-[selected=true]:bg-orange-200 data-[selected=false]:hover:bg-orange-50"},amber:{button:"data-[selected=true]:bg-amber-200 data-[selected=false]:hover:bg-amber-50"},yellow:{button:"data-[selected=true]:bg-yellow-200 data-[selected=false]:hover:bg-yellow-50"},lime:{button:"data-[selected=true]:bg-lime-200 data-[selected=false]:hover:bg-lime-50"},green:{button:"data-[selected=true]:bg-green-200 data-[selected=false]:hover:bg-green-50"},emerald:{button:"data-[selected=true]:bg-emerald-200 data-[selected=false]:hover:bg-emerald-50"},teal:{button:"data-[selected=true]:bg-teal-200 data-[selected=false]:hover:bg-teal-50"},cyan:{button:"data-[selected=true]:bg-cyan-200 data-[selected=false]:hover:bg-cyan-50"},sky:{button:"data-[selected=true]:bg-sky-200 data-[selected=false]:hover:bg-sky-50"},blue:{button:"data-[selected=true]:bg-blue-200 data-[selected=false]:hover:bg-blue-50"},indigo:{button:"data-[selected=true]:bg-indigo-200 data-[selected=false]:hover:bg-indigo-50"},violet:{button:"data-[selected=true]:bg-violet-200 data-[selected=false]:hover:bg-violet-50"},purple:{button:"data-[selected=true]:bg-purple-200 data-[selected=false]:hover:bg-purple-50"},fuchsia:{button:"data-[selected=true]:bg-fuchsia-200 data-[selected=false]:hover:bg-fuchsia-50"},pink:{button:"data-[selected=true]:bg-pink-200 data-[selected=false]:hover:bg-pink-50"},rose:{button:"data-[selected=true]:bg-rose-200 data-[selected=false]:hover:bg-rose-50"},none:{}}},defaultVariants:{selected:!1,color:"primary",size:"md",roundedSize:"md"}});te({slots:{base:"relative max-w-2xl mx-auto p-4 space-y-4",inputSection:"space-y-2",inputWrapper:"flex gap-2",input:"flex-1 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-500 dark:text-white",searchWrapper:"flex gap-2",searchContainer:"relative flex-1",searchInput:"w-full rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 pl-9 pr-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-500 dark:text-white",searchIcon:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400",itemsList:"space-y-2 max-h-[500px] overflow-y-auto",emptyState:"text-center py-8",emptyIcon:"w-12 h-12 mx-auto text-gray-300 dark:text-gray-600 mb-3",emptyText:"text-sm text-gray-500 dark:text-gray-400",emptySubtext:"text-xs text-gray-400 dark:text-gray-500 mt-1",item:"group flex items-start gap-3 rounded-lg border border-gray-200 dark:border-gray-700 p-3 transition hover:bg-gray-50 dark:hover:bg-gray-800/50",itemContent:"flex-1 min-w-0",itemHeader:"flex items-center gap-2 mb-1",itemTimestamp:"text-xs text-gray-500 dark:text-gray-400",itemText:"text-sm text-gray-900 dark:text-gray-100 break-words line-clamp-2",itemActions:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",actionButton:"p-1.5 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition flex items-center justify-center",actionIcon:"w-4 h-4 flex-shrink-0",pinButton:"p-1.5 rounded transition",deleteButton:"p-1.5 rounded text-red-500 hover:bg-red-100 dark:hover:bg-red-900/20 transition",toastContainer:"fixed top-4 left-1/2 -translate-x-1/2 z-50 animate-[slideIn_0.2s_ease-out]",toast:"flex items-center gap-2 px-4 py-2 rounded-lg shadow-lg",toastIcon:"w-5 h-5",toastText:"text-sm font-medium",addToClipboard:"whitespace-nowrap rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700 disabled:opacity-50",clearAll:"rounded bg-red-600 px-4 py-2 text-white hover:bg-red-700",selectionMenu:"selection-menu fixed z-50 -translate-x-1/2 -translate-y-full",selectionBubble:"mb-2 flex items-center gap-2 rounded-lg bg-gray-900 px-3 py-2 text-white shadow-xl",selectionText:"max-w-[200px] truncate text-xs",selectionButton:"rounded bg-primary-700 px-2 py-1 text-xs font-medium whitespace-nowrap transition hover:bg-primary-500",selectionArrow:"absolute bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-gray-900"},variants:{pinned:{true:{pinButton:"text-blue-600 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/20"},false:{pinButton:"hover:bg-gray-200 dark:hover:bg-gray-700"}},type:{success:{toast:"bg-green-500 text-white"},error:{toast:"bg-red-500 text-white"},info:{toast:"bg-blue-500 text-white"}}},defaultVariants:{pinned:!1,type:"success"}});te({slots:{base:"w-full mx-auto mt-20 max-w-2xl bg-white dark:bg-gray-800 rounded-lg shadow-2xl ring-1 ring-black/5 dark:ring-white/10 overflow-hidden transform transition-all",search:"rounded-b-none border-0 py-3",list:"max-h-80 scroll-py-2 overflow-y-auto border-t border-gray-200 dark:border-gray-700",item:"cursor-pointer select-none px-4 py-2 text-sm text-gray-900 dark:text-gray-100 aria-selected:bg-primary-600 aria-selected:text-white",itemDescription:"text-xs truncate text-gray-500 dark:text-gray-400 aria-selected:text-primary-100",empty:"px-4 py-14 text-center border-t border-gray-200 dark:border-gray-700 text-sm text-gray-500 dark:text-gray-400",footer:"flex flex-wrap items-center justify-between gap-2 bg-gray-50 dark:bg-gray-900/50 px-4 py-2.5 text-xs text-gray-500 dark:text-gray-400 border-t border-gray-200 dark:border-gray-700",kbd:"inline-flex items-center gap-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-2 py-1 font-sans text-xs"},variants:{selected:{true:{}}},defaultVariants:{}});te({slots:{container:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3 md:gap-4 p-2 md:p-4",column:"w-full rounded-xl shadow-sm p-3 md:p-4 flex flex-col bg-surface-elevated text-surface-foreground transition-colors",columnTitle:"text-sm md:text-base font-semibold mb-2 md:mb-3 dark:text-white",cardList:"flex flex-col gap-2 flex-1 min-h-[60px]",card:"bg-surface text-surface-foreground rounded-lg p-2.5 md:p-3 shadow-sm cursor-grab active:cursor-grabbing transition-all hover:bg-surface-hover hover:shadow-md",cardTitle:"font-medium text-sm md:text-base",cardDescription:"text-xs md:text-sm text-muted mt-1",cardTags:"flex flex-wrap gap-1 mt-2",cardTag:"text-[10px] md:text-xs bg-primary/10 text-primary px-1.5 md:px-2 py-0.5 rounded-full",addButton:"mt-2 md:mt-3 w-full bg-primary text-primary-foreground rounded-lg py-1.5 text-xs md:text-sm dark:text-primary-500 font-medium hover:bg-primary/90 transition-colors focus:ring-2 focus:ring-primary focus:ring-offset-2"},variants:{isDragOver:{true:{column:"ring-2 ring-primary"}},isDragging:{true:{card:"opacity-50"}}}});te({slots:{card:"bg-surface text-surface-foreground rounded-lg p-2.5 md:p-3 shadow-sm shadow-black/20 dark:shadow-white/10 cursor-grab active:cursor-grabbing transition-all hover:bg-surface-hover hover:shadow-md",cardTitle:"font-medium text-sm md:text-base dark:text-white",cardDescription:"text-xs md:text-sm text-muted mt-1 dark:text-white",cardTags:"flex flex-wrap gap-1 mt-2 dark:text-white",cardTag:"text-[10px] md:text-xs bg-primary/10 text-primary px-1.5 md:px-2 py-0.5 rounded-full dark:text-white"},variants:{isDragging:{true:{card:"opacity-50"}}}});te({slots:{base:"bg-white dark:bg-gray-900 p-2 transition-all duration-300 z-40 border-b border-gray-200 dark:border-gray-700",container:"",list:"",link:"px-4 py-2.5 transition-all duration-200 cursor-pointer rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900",li:"p-2 m-1"},variants:{position:{top:{base:"top-0 left-0 right-0 w-full",container:"container mx-auto px-4",list:"flex space-x-1 overflow-x-auto scrollbar-none"},left:{base:"fixed left-0 top-0 bottom-0 h-full w-64 overflow-y-auto",container:"px-4 py-4",list:"flex flex-col space-y-1"},right:{base:"fixed right-0 top-0 bottom-0 h-full w-64 overflow-y-auto",container:"px-4 py-4",list:"flex flex-col space-y-1"}},sticky:{true:{base:""},false:{base:""}},isSticky:{true:{base:"shadow-lg"},false:{base:""}},active:{true:{link:"text-primary-700 dark:text-primary-400 bg-primary-50 dark:bg-primary-900/30 font-semibold focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900"},false:{link:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"}}},defaultVariants:{position:"top",sticky:!0,isSticky:!1,active:!1},compoundVariants:[{position:"top",sticky:!0,class:{base:"sticky"}}]});te({base:"relative flex h-full w-full overflow-hidden select-none",variants:{direction:{horizontal:"",vertical:"flex-col"}},defaultVariants:{direction:"horizontal"}});te({base:"flex flex-col relative overflow-hidden shrink-0 min-w-0 min-h-0"});te({base:"bg-gray-300 shrink-0 relative z-10 transition-colors duration-200 hover:bg-gray-400 focus:bg-gray-400 focus:outline focus:outline-2 focus:outline-blue-500 focus:-outline-offset-2",variants:{direction:{horizontal:"w-1 cursor-col-resize",vertical:"h-1 cursor-row-resize"},isDragging:{true:"bg-blue-500",false:""}},defaultVariants:{direction:"horizontal",isDragging:!1}});te({base:"absolute bg-transparent",variants:{direction:{horizontal:"w-3 h-full -left-1 top-0",vertical:"h-3 w-full -top-1 left-0"}},defaultVariants:{direction:"horizontal"}});te({slots:{base:"space-y-2 dark:text-white",label:"text-base font-semibold",container:"flex w-full justify-between gap-2",wrapper:"relative h-full w-full",step:"h-full w-full rounded-xs",glow:"absolute -inset-1 rounded-xs opacity-30 blur-sm dark:opacity-25",incomplete:"h-full w-full rounded-xs bg-gray-200 dark:bg-gray-700"},variants:{size:{xs:{container:"h-1.5"},sm:{container:"h-2"},md:{container:"h-2.5"},lg:{container:"h-3"},xl:{container:"h-4"}},color:{primary:{step:"data-[state=completed]:bg-primary-500 data-[state=completed]:dark:bg-primary-900 data-[state=current]:bg-primary-800 data-[state=current]:dark:bg-primary-400",glow:"bg-primary-800 dark:bg-primary-400"},secondary:{step:"data-[state=completed]:bg-secondary-500 data-[state=completed]:dark:bg-secondary-900 data-[state=current]:bg-secondary-800 data-[state=current]:dark:bg-secondary-400",glow:"bg-secondary-800 dark:bg-secondary-400"},gray:{step:"data-[state=completed]:bg-gray-400 data-[state=completed]:dark:bg-gray-500 data-[state=current]:bg-gray-700 data-[state=current]:dark:bg-gray-200",glow:"bg-gray-700 dark:bg-gray-200"},red:{step:"data-[state=completed]:bg-red-600 data-[state=completed]:dark:bg-red-900 data-[state=current]:bg-red-900 data-[state=current]:dark:bg-red-500",glow:"bg-red-900 dark:bg-red-500"},yellow:{step:"data-[state=completed]:bg-yellow-400 data-[state=completed]:dark:bg-yellow-600 data-[state=current]:bg-yellow-600 data-[state=current]:dark:bg-yellow-400",glow:"bg-yellow-600 dark:bg-yellow-400"},green:{step:"data-[state=completed]:bg-green-500 data-[state=completed]:dark:bg-green-900 data-[state=current]:bg-green-800 data-[state=current]:dark:bg-green-400",glow:"bg-green-800 dark:bg-green-400"},indigo:{step:"data-[state=completed]:bg-indigo-500 data-[state=completed]:dark:bg-indigo-900 data-[state=current]:bg-indigo-800 data-[state=current]:dark:bg-indigo-400",glow:"bg-indigo-800 dark:bg-indigo-400"},purple:{step:"data-[state=completed]:bg-purple-500 data-[state=completed]:dark:bg-purple-900 data-[state=current]:bg-purple-800 data-[state=current]:dark:bg-purple-400",glow:"bg-purple-800 dark:bg-purple-400"},pink:{step:"data-[state=completed]:bg-pink-500 data-[state=completed]:dark:bg-pink-900 data-[state=current]:bg-pink-800 data-[state=current]:dark:bg-pink-400",glow:"bg-pink-800 dark:bg-pink-400"},blue:{step:"data-[state=completed]:bg-blue-500 data-[state=completed]:dark:bg-blue-900 data-[state=current]:bg-blue-800 data-[state=current]:dark:bg-blue-400",glow:"bg-blue-800 dark:bg-blue-400"},custom:{step:"",glow:""}},glow:{true:{},false:{}},hideLabel:{true:{},false:{}}},compoundVariants:[{glow:!1,class:{glow:"hidden"}},{hideLabel:!0,class:{label:"hidden"}}],defaultVariants:{size:"md",color:"primary",glow:!1,hideLabel:!1}});te({slots:{base:"border border-gray-300 dark:border-gray-600 rounded-lg flex focus-within:ring-primary-500 focus-within:ring-1 focus-within:border-primary-500 scrollbar-hidden bg-gray-50 dark:bg-gray-700",tag:"flex items-center rounded-lg bg-gray-100 text-gray-900 border border-gray-300 my-1 ml-1 px-2 text-sm max-w-full min-w-fit",span:"items-center",close:"my-auto ml-1",input:"block text-sm m-2.5 p-0 bg-transparent border-none outline-none text-gray-900 h-min w-full min-w-fit focus:ring-0 placeholder-gray-400 dark:text-white disabled:cursor-not-allowed disabled:opacity-50",info:"mt-1 text-sm text-blue-500 dark:text-blue-400",warning:"mt-1 text-sm text-yellow-400 dark:text-yellow-300",error:"mt-1 text-sm text-red-500 dark:text-red-400"}});Nt(["click"]);te({slots:{overlay:"fixed inset-0 bg-black/50 backdrop-blur-sm",highlight:["fixed border-2 pointer-events-none transition-all duration-300","border-blue-500","shadow-[0_0_0_4px_rgba(59,130,246,0.2)]"],tooltip:["fixed bg-white rounded-xl shadow-2xl","w-80 max-w-[calc(100vw-2rem)]"],arrow:"absolute w-2 h-2 rotate-45 bg-white",content:"p-5 relative z-10 bg-white rounded-xl",title:"text-lg font-semibold text-gray-900 mb-3",description:"text-sm leading-relaxed text-gray-600 mb-4",progressContainer:"flex gap-2 justify-center",progressDot:["w-2 h-2 rounded-full bg-gray-300","hover:bg-gray-400 transition-all duration-200 hover:scale-110"],progressDotActive:"!bg-blue-500 !w-6 rounded",actions:["flex justify-between items-center px-5 py-4","border-t border-gray-200 relative z-10 bg-white rounded-b-xl"],navigation:"flex gap-2",button:["px-4 py-2 rounded-md text-sm font-medium","transition-all duration-200"],buttonPrimary:["text-white bg-blue-500 hover:bg-blue-600"],buttonSecondary:["text-gray-600 border border-gray-300","hover:bg-gray-50 hover:border-gray-400"]},variants:{size:{sm:{tooltip:"w-64",content:"p-4",actions:"px-4 py-3",title:"text-base",description:"text-xs",button:"px-3 py-1.5 text-xs"},md:{tooltip:"w-80",content:"p-5",actions:"px-5 py-4",title:"text-lg",description:"text-sm",button:"px-4 py-2 text-sm"},lg:{tooltip:"w-96",content:"p-6",actions:"px-6 py-5",title:"text-xl",description:"text-base",button:"px-5 py-2.5 text-base"}},color:{primary:{highlight:"border-primary-500 shadow-[0_0_0_4px_rgba(59,130,246,0.2)]",progressDotActive:"!bg-primary-500",buttonPrimary:"bg-primary-500 hover:bg-primary-600"},blue:{highlight:"border-blue-500 shadow-[0_0_0_4px_rgba(59,130,246,0.2)]",progressDotActive:"!bg-blue-500",buttonPrimary:"bg-blue-500 hover:bg-blue-600"},purple:{highlight:"border-purple-500 shadow-[0_0_0_4px_rgba(168,85,247,0.2)]",progressDotActive:"!bg-purple-500",buttonPrimary:"bg-purple-500 hover:bg-purple-600"},green:{highlight:"border-green-500 shadow-[0_0_0_4px_rgba(34,197,94,0.2)]",progressDotActive:"!bg-green-500",buttonPrimary:"bg-green-500 hover:bg-green-600"},red:{highlight:"border-red-500 shadow-[0_0_0_4px_rgba(239,68,68,0.2)]",progressDotActive:"!bg-red-500",buttonPrimary:"bg-red-500 hover:bg-red-600"}}},defaultVariants:{size:"md",color:"blue"}});te({slots:{container:"overflow-y-auto scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-transparent",spacer:"relative",content:"absolute top-0 left-0 right-0",item:""},variants:{contained:{true:{item:"[contain:layout_style_paint]"},false:{}}},defaultVariants:{contained:!1}});te({slots:{container:"overflow-y-auto scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-transparent",spacer:"relative",content:"relative w-full",item:""},variants:{contained:{true:{item:"[contain:layout_style_paint]"},false:{}}},defaultVariants:{contained:!1}});Nt(["keydown","click"]);Nt(["click","keydown"]);Nt(["click"]);Nt(["click","keydown"]);Nt(["mousedown","keydown"]);Nt(["click","keydown"]);let r2=Ut(Oi(w3()));EE(()=>{It(r2,[...w3()],!0)});const du=()=>X(r2);var lP=Ht('CSG Builder CSG Builder',1),cP=Ht('

',1),dP=Ht(" ",1);function uP(r,e){_n(e,!0);let t=mt(e,"wireframe",15),n=mt(e,"saveCameraToUrl",15);k0(()=>{const d=AE();if(d){const h=du().find(f=>f.name===d);h&&It(i,h.name,!0)}const u=TE();u&&n(!0),e.oncamerastate?.(u),d&&l(!0)});let i=Ut(void 0),s=Ut(0),a=Ut(0),o=Ut(Oi({width:0,height:0,depth:0}));const l=(d=!1)=>{const u=du().find(h=>h.name===X(i));if(u){const h=Date.now(),f=u.receiveData(),m=Array.isArray(f)?R.MERGE(f):f;It(a,m.getVertices().length/9),It(o,m.getBounds(),!0),It(s,Date.now()-h),d||Vm(u.name),e.onselect?.(u.name,f)}},c=()=>{l(!1)};OI(r,{class:"bg-gray-100",children:(d,u)=>{Np(d,{class:"border w-4/5 px-5 py-2 rounded-lg bg-white border-gray-200",children:(h,f)=>{var m=dP(),x=yt(m);BI(x,{href:"#",children:(p,v)=>{var b=lP();We(p,b)},$$slots:{default:!0}});var g=Ft(x,2);HI(g,{children:(p,v)=>{var b=Rt(),y=yt(b);{var _=w=>{var T=cP(),A=yt(T),M=Pt(A),S=Ft(M,2),E=Ft(S,2),I=Ft(A,2),O=Pt(I);Yb(O,{id:"wireframe",class:"ml-4",get checked(){return t()},set checked(H){t(H)},children:(H,F)=>{var ie=gh("Wireframe");We(H,ie)},$$slots:{default:!0}});var q=Ft(O,2);Yb(q,{id:"saveCameraToUrl",class:"ml-4",get checked(){return n()},set checked(H){n(H)},children:(H,F)=>{var ie=gh("Save camera");We(H,ie)},$$slots:{default:!0}});var z=Ft(I,2);{let H=Ye(()=>du().map(F=>({value:F.name,name:F.name})));sP(z,{class:"w-72 ml-4",get items(){return X(H)},onchange:c,placeholder:"Select model part...",size:"lg",get value(){return X(i)},set value(F){It(i,F,!0)}})}var V=Ft(z,2);II(V,{class:"ml-4",onclick:()=>e.ondownload?.(),children:(H,F)=>{var ie=gh("Download");We(H,ie)},$$slots:{default:!0}}),dr(H=>{pa(M,`${X(o).width??""} x ${X(o).height??""} x ${X(o).depth??""} `),pa(S,` ${H??""} faces `),pa(E,` ${X(s)??""} ms`)},[()=>X(a).toLocaleString()]),We(w,T)};Ot(y,w=>{du().length&&w(_)})}We(p,b)},$$slots:{default:!0}}),We(h,m)},$$slots:{default:!0}})},$$slots:{default:!0}}),wn()}var hP=Ht('
',1);function fP(r,e){_n(e,!0);let t=Ut(0),n=Ut(""),i=Ut(void 0),s=Ut(void 0),a=Ut(!1),o=Ut(!1);const l=(g,p)=>{It(n,g,!0),It(i,Array.isArray(p)?R.MERGE(p):p,!0),It(t,vE([...X(i).getVertices()]),!0)},c=g=>{It(s,g,!0)},d=()=>{if(!X(i))return;const g=X(i).getVertices(),p=SE(g);ME(X(n)+".stl",p)};Hi(()=>{!X(o)&&X(n)&&Vm(X(n))});var u=hP(),h=yt(u);uP(h,{oncamerastate:c,ondownload:d,onselect:l,get wireframe(){return X(a)},set wireframe(g){It(a,g,!0)},get saveCameraToUrl(){return X(o)},set saveCameraToUrl(g){It(o,g,!0)}});var f=Ft(h,2),m=Pt(f);{var x=g=>{var p=Rt(),v=yt(p);T_(v,()=>X(i),b=>{zA(b,{children:(y,_)=>{mR(y,{get cameraState(){return X(s)},get componentName(){return X(n)},get saveCameraToUrl(){return X(o)},get solid(){return X(i)},get volume(){return X(t)},get wireframe(){return X(a)}})},$$slots:{default:!0}})}),We(g,p)};Ot(m,g=>{X(i)&&g(x)})}We(r,u),wn()}w_(fP,{target:document.querySelector("#app")}); diff --git a/docs/assets/index-D34Lzmn4.js b/docs/assets/index-D34Lzmn4.js deleted file mode 100644 index 9baa9cd..0000000 --- a/docs/assets/index-D34Lzmn4.js +++ /dev/null @@ -1,4622 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();const N0=!1;var Rp=Array.isArray,e1=Array.prototype.indexOf,Pp=Array.from,Bb=Object.defineProperty,bs=Object.getOwnPropertyDescriptor,t1=Object.getOwnPropertyDescriptors,n1=Object.prototype,r1=Array.prototype,zb=Object.getPrototypeOf,Qg=Object.isExtensible;function xo(r){return typeof r=="function"}const zt=()=>{};function Vb(r){for(var e=0;e{r=n,e=i});return{promise:t,resolve:r,reject:e}}const vn=2,Ip=4,ph=8,li=16,Yi=32,Ca=64,gh=128,Hr=512,An=1024,tr=2048,Zi=4096,fr=8192,Ni=16384,mh=32768,si=65536,em=1<<17,Hb=1<<18,Bo=1<<19,Wb=1<<20,xa=32768,U0=1<<21,Dp=1<<22,ys=1<<23,vs=Symbol("$state"),Xb=Symbol("legacy props"),i1=Symbol(""),bo=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Lp(r){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function s1(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function a1(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function o1(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function l1(r){throw new Error("https://svelte.dev/e/effect_orphan")}function c1(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function d1(r){throw new Error("https://svelte.dev/e/props_invalid_value")}function u1(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function h1(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function f1(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function p1(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const g1=1,m1=2,x1=16,b1=1,y1=4,v1=8,_1=16,w1=4,qb=1,M1=2,gn=Symbol(),S1="http://www.w3.org/1999/xhtml",T1="http://www.w3.org/2000/svg",A1="@attach";function k1(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function E1(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Yb(r){return r===this.v}function Zb(r,e){return r!=r?e==e:r!==e||r!==null&&typeof r=="object"||typeof r=="function"}function jb(r){return!Zb(r,this.v)}let C1=!1,xn=null;function Ao(r){xn=r}function rn(r){return Kb().get(r)}function Bn(r,e){return Kb().set(r,e),e}function _n(r,e=!1,t){xn={p:xn,i:!1,c:null,e:null,s:r,x:null,l:null}}function wn(r){var e=xn,t=e.e;if(t!==null){e.e=null;for(var n of t)xy(n)}return e.i=!0,xn=e.p,{}}function $b(){return!0}function Kb(r){return xn===null&&Lp(),xn.c??=new Map(R1(xn)||void 0)}function R1(r){let e=r.p;for(;e!==null;){const t=e.c;if(t!==null)return t;e=e.p}return null}let aa=[];function Jb(){var r=aa;aa=[],Vb(r)}function Ra(r){if(aa.length===0&&!Rl){var e=aa;queueMicrotask(()=>{e===aa&&Jb()})}aa.push(r)}function P1(){for(;aa.length>0;)Jb()}function Qb(r){var e=_t;if(e===null)return xt.f|=ys,r;if((e.f&mh)===0){if((e.f&gh)===0)throw r;e.b.error(r)}else ko(r,e)}function ko(r,e){for(;e!==null;){if((e.f&gh)!==0)try{e.b.error(r);return}catch(t){r=t}e=e.parent}throw r}const Lc=new Set;let Dt=null,iu=null,Tr=null,wr=[],xh=null,F0=!1,Rl=!1;class Qr{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#r=0;#n=0;#l=null;#s=[];#i=[];skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#n>0}process(e){wr=[],iu=null,this.apply();var t={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of e)this.#a(n,t);this.is_fork||this.#d(),this.is_deferred()?(this.#o(t.effects),this.#o(t.render_effects),this.#o(t.block_effects)):(iu=this,Dt=null,tm(t.render_effects),tm(t.effects),iu=null,this.#l?.resolve()),Tr=null}#a(e,t){e.f^=An;for(var n=e.first;n!==null;){var i=n.f,s=(i&(Yi|Ca))!==0,a=s&&(i&An)!==0,o=a||(i&fr)!==0||this.skipped_effects.has(n);if((n.f&gh)!==0&&n.b?.is_pending()&&(t={parent:t,effect:n,effects:[],render_effects:[],block_effects:[]}),!o&&n.fn!==null){s?n.f^=An:(i&Ip)!==0?t.effects.push(n):vc(n)&&((n.f&li)!==0&&t.block_effects.push(n),jl(n));var l=n.first;if(l!==null){n=l;continue}}var c=n.parent;for(n=n.next;n===null&&c!==null;)c===t.effect&&(this.#o(t.effects),this.#o(t.render_effects),this.#o(t.block_effects),t=t.parent),n=c.next,c=c.parent}}#o(e){for(const t of e)((t.f&tr)!==0?this.#s:this.#i).push(t),this.#c(t.deps),kn(t,An)}#c(e){if(e!==null)for(const t of e)(t.f&vn)===0||(t.f&xa)===0||(t.f^=xa,this.#c(t.deps))}capture(e,t){this.previous.has(e)||this.previous.set(e,t),(e.f&ys)===0&&(this.current.set(e,e.v),Tr?.set(e,e.v))}activate(){Dt=this,this.apply()}deactivate(){Dt===this&&(Dt=null,Tr=null)}flush(){if(this.activate(),wr.length>0){if(ey(),Dt!==null&&Dt!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#d(){if(this.#n===0){for(const e of this.#e)e();this.#e.clear()}this.#r===0&&this.#u()}#u(){if(Lc.size>1){this.previous.clear();var e=Tr,t=!0,n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const s of Lc){if(s===this){t=!1;continue}const a=[];for(const[l,c]of this.current){if(s.current.has(l))if(t&&c!==s.current.get(l))s.current.set(l,c);else continue;a.push(l)}if(a.length===0)continue;const o=[...s.current.keys()].filter(l=>!this.current.has(l));if(o.length>0){var i=wr;wr=[];const l=new Set,c=new Map;for(const d of a)ty(d,o,l,c);if(wr.length>0){Dt=s,s.apply();for(const d of wr)s.#a(d,n);s.deactivate()}wr=i}}Dt=null,Tr=e}this.committed=!0,Lc.delete(this)}increment(e){this.#r+=1,e&&(this.#n+=1)}decrement(e){this.#r-=1,e&&(this.#n-=1),this.revive()}revive(){for(const e of this.#s)kn(e,tr),ba(e);for(const e of this.#i)kn(e,Zi),ba(e);this.#s=[],this.#i=[],this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#l??=Gb()).promise}static ensure(){if(Dt===null){const e=Dt=new Qr;Lc.add(Dt),Rl||Qr.enqueue(()=>{Dt===e&&e.flush()})}return Dt}static enqueue(e){Ra(e)}apply(){}}function I1(r){var e=Rl;Rl=!0;try{for(var t;;){if(P1(),wr.length===0&&(Dt?.flush(),wr.length===0))return xh=null,t;ey()}}finally{Rl=e}}function ey(){var r=ws;F0=!0;var e=null;try{var t=0;for(pu(!0);wr.length>0;){var n=Qr.ensure();if(t++>1e3){var i,s;D1()}n.process(wr),_s.clear()}}finally{F0=!1,pu(r),xh=null}}function D1(){try{c1()}catch(r){ko(r,xh)}}let Ai=null;function tm(r){var e=r.length;if(e!==0){for(var t=0;t0)){_s.clear();for(const i of Ai){if((i.f&(Ni|fr))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)Ai.has(a)&&(Ai.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const l=s[o];(l.f&(Ni|fr))===0&&jl(l)}}Ai.clear()}}Ai=null}}function ty(r,e,t,n){if(!t.has(r)&&(t.add(r),r.reactions!==null))for(const i of r.reactions){const s=i.f;(s&vn)!==0?ty(i,e,t,n):(s&(Dp|li))!==0&&(s&tr)===0&&ny(i,e,n)&&(kn(i,tr),ba(i))}}function ny(r,e,t){const n=t.get(r);if(n!==void 0)return n;if(r.deps!==null)for(const i of r.deps){if(e.includes(i))return!0;if((i.f&vn)!==0&&ny(i,e,t))return t.set(i,!0),!0}return t.set(r,!1),!1}function ba(r){for(var e=xh=r;e.parent!==null;){e=e.parent;var t=e.f;if(F0&&e===_t&&(t&li)!==0&&(t&Hb)===0)return;if((t&(Ca|Yi))!==0){if((t&An)===0)return;e.f^=An}}wr.push(e)}function Np(r){let e=0,t=ya(0),n;return()=>{xc()&&(z(t),Fp(()=>(e===0&&(n=di(()=>r(()=>Pl(t)))),e+=1,()=>{Ra(()=>{e-=1,e===0&&(n?.(),n=void 0,Pl(t))})})))}}var L1=si|Bo|gh;function N1(r,e,t){new U1(r,e,t)}class U1{parent;#e=!1;#t;#r=null;#n;#l;#s;#i=null;#a=null;#o=null;#c=null;#d=null;#u=0;#h=0;#p=!1;#f=null;#y=Np(()=>(this.#f=ya(this.#u),()=>{this.#f=null}));constructor(e,t,n){this.#t=e,this.#n=t,this.#l=n,this.parent=_t.b,this.#e=!!this.#n.pending,this.#s=ji(()=>{_t.b=this;{var i=this.#x();try{this.#i=Zn(()=>n(i))}catch(s){this.error(s)}this.#h>0?this.#m():this.#e=!1}return()=>{this.#d?.remove()}},L1)}#v(){try{this.#i=Zn(()=>this.#l(this.#t))}catch(e){this.error(e)}this.#e=!1}#_(){const e=this.#n.pending;e&&(this.#a=Zn(()=>e(this.#t)),Qr.enqueue(()=>{var t=this.#x();this.#i=this.#g(()=>(Qr.ensure(),Zn(()=>this.#l(t)))),this.#h>0?this.#m():(So(this.#a,()=>{this.#a=null}),this.#e=!1)}))}#x(){var e=this.#t;return this.#e&&(this.#d=zi(),this.#t.before(this.#d),e=this.#d),e}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#g(e){var t=_t,n=xt,i=xn;ai(this.#s),Jn(this.#s),Ao(this.#s.ctx);try{return e()}catch(s){return Qb(s),null}finally{ai(t),Jn(n),Ao(i)}}#m(){const e=this.#n.pending;this.#i!==null&&(this.#c=document.createDocumentFragment(),this.#c.append(this.#d),My(this.#i,this.#c)),this.#a===null&&(this.#a=Zn(()=>e(this.#t)))}#b(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(e);return}this.#h+=e,this.#h===0&&(this.#e=!1,this.#a&&So(this.#a,()=>{this.#a=null}),this.#c&&(this.#t.before(this.#c),this.#c=null))}update_pending_count(e){this.#b(e),this.#u+=e,this.#f&&Yl(this.#f,this.#u)}get_effect_pending(){return this.#y(),z(this.#f)}error(e){var t=this.#n.onerror;let n=this.#n.failed;if(this.#p||!t&&!n)throw e;this.#i&&(bn(this.#i),this.#i=null),this.#a&&(bn(this.#a),this.#a=null),this.#o&&(bn(this.#o),this.#o=null);var i=!1,s=!1;const a=()=>{if(i){E1();return}i=!0,s&&p1(),Qr.ensure(),this.#u=0,this.#o!==null&&So(this.#o,()=>{this.#o=null}),this.#e=this.has_pending_snippet(),this.#i=this.#g(()=>(this.#p=!1,Zn(()=>this.#l(this.#t)))),this.#h>0?this.#m():this.#e=!1};var o=xt;try{Jn(null),s=!0,t?.(e,a),s=!1}catch(l){ko(l,this.#s&&this.#s.parent)}finally{Jn(o)}n&&Ra(()=>{this.#o=this.#g(()=>{Qr.ensure(),this.#p=!0;try{return Zn(()=>{n(this.#t,()=>e,()=>a)})}catch(l){return ko(l,this.#s.parent),null}finally{this.#p=!1}})})}}function F1(r,e){return e}function O1(r,e,t){for(var n=[],i=e.length,s=0;s{var a=n.length===0&&t!==null;if(a){var o=t,l=o.parentNode;Z1(l),l.append(o),r.items.clear(),Kr(r,e[0].prev,e[i-1].next)}for(var c=0;c{var m=t();return Rp(m)?m:m==null?[]:Pp(m)}),u,h=!0;function f(){z1(x,u,a,e,n),c!==null&&(u.length===0?(c.fragment?(a.before(c.fragment),c.fragment=null):Bp(c.effect),g.first=c.effect):So(c.effect,()=>{c=null}))}var g=ji(()=>{u=z(d);for(var m=u.length,p=new Set,v=Dt,b=null,y=py(),_=0;_s(a))};else{var M=document.createDocumentFragment(),S=zi();M.append(S),c={fragment:M,effect:Zn(()=>s(S))}}if(!h)if(y){for(const[E,P]of o)p.has(E)||v.skipped_effects.add(P.e);v.oncommit(f),v.ondiscard(()=>{})}else f();z(d)}),x={effect:g,items:o,first:l};h=!1}function z1(r,e,t,n,i){var s=e.length,a=r.items,o=r.first,l,c=null,d=[],u=[],h,f,g,x;for(x=0;x0){var T=null;O1(r,_,T)}}}function V1(r,e,t,n,i,s,a,o){var l=(a&g1)!==0,c=(a&x1)===0,d=l?c?ly(t,!1,!1):ya(t):t,u=(a&m1)===0?i:ya(i),h={i:u,v:d,k:n,a:null,e:null,o:!1,prev:e,next:null};try{if(r===null){var f=document.createDocumentFragment();f.append(r=zi())}return h.e=Zn(()=>s(r,d,u,o)),e!==null&&(e.next=h),h}finally{}}function cf(r,e,t){for(var n=r.next?r.next.e.nodes_start:t,i=e?e.e.nodes_start:t,s=r.e.nodes_start;s!==null&&s!==n;){var a=mc(s);i.before(s),s=a}}function Kr(r,e,t){e===null?(r.first=t,r.effect.first=t&&t.e):(e.e.next&&(e.e.next.prev=null),e.next=t,e.e.next=t&&t.e),t===null?r.effect.last=e&&e.e:(t.e.prev&&(t.e.prev.next=null),t.prev=e,t.e.prev=e&&e.e)}function ry(r,e,t,n){const i=bh;if(t.length===0&&r.length===0){n(e.map(i));return}var s=Dt,a=_t,o=G1();function l(){Promise.all(t.map(c=>H1(c))).then(c=>{o();try{n([...e.map(i),...c])}catch(d){(a.f&Ni)===0&&ko(d,a)}s?.deactivate(),fu()}).catch(c=>{ko(c,a)})}r.length>0?Promise.all(r).then(()=>{o();try{return l()}finally{s?.deactivate(),fu()}}):l()}function G1(){var r=_t,e=xt,t=xn,n=Dt;return function(s=!0){ai(r),Jn(e),Ao(t),s&&n?.activate()}}function fu(){ai(null),Jn(null),Ao(null)}function bh(r){var e=vn|tr,t=xt!==null&&(xt.f&vn)!==0?xt:null;return _t!==null&&(_t.f|=Bo),{ctx:xn,deps:null,effects:null,equals:Yb,f:e,fn:r,reactions:null,rv:0,v:gn,wv:0,parent:t??_t,ac:null}}function H1(r,e){let t=_t;t===null&&s1();var n=t.b,i=void 0,s=ya(gn),a=!xt,o=new Map;return Q1(()=>{var l=Gb();i=l.promise;try{Promise.resolve(r()).then(l.resolve,l.reject).then(()=>{c===Dt&&c.committed&&c.deactivate(),fu()})}catch(h){l.reject(h),fu()}var c=Dt;if(a){var d=!n.is_pending();n.update_pending_count(1),c.increment(d),o.get(c)?.reject(bo),o.delete(c),o.set(c,l)}const u=(h,f=void 0)=>{if(c.activate(),f)f!==bo&&(s.f|=ys,Yl(s,f));else{(s.f&ys)!==0&&(s.f^=ys),Yl(s,h);for(const[g,x]of o){if(o.delete(g),g===c)break;x.reject(bo)}}a&&(n.update_pending_count(-1),c.decrement(d))};l.promise.then(u,h=>u(null,h||"unknown"))}),bc(()=>{for(const l of o.values())l.reject(bo)}),new Promise(l=>{function c(d){function u(){d===i?l(s):c(i)}d.then(u,u)}c(i)})}function Ve(r){const e=bh(r);return Sy(e),e}function iy(r){const e=bh(r);return e.equals=jb,e}function sy(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t0&&!oy&&X1()}return e}function X1(){oy=!1;var r=ws;pu(!0);const e=Array.from(O0);try{for(const t of e)(t.f&An)!==0&&kn(t,Zi),vc(t)&&jl(t)}finally{pu(r)}O0.clear()}function Pl(r){Rt(r,r.v+1)}function cy(r,e){var t=r.reactions;if(t!==null)for(var n=t.length,i=0;i{if(ua===s)return o();var l=xt,c=ua;Jn(null),am(s);var d=o();return Jn(l),am(c),d};return n&&t.set("length",Nt(r.length)),new Proxy(r,{defineProperty(o,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&u1();var d=t.get(l);return d===void 0?d=a(()=>{var u=Nt(c.value);return t.set(l,u),u}):Rt(d,c.value,!0),!0},deleteProperty(o,l){var c=t.get(l);if(c===void 0){if(l in o){const d=a(()=>Nt(gn));t.set(l,d),Pl(i)}}else Rt(c,gn),Pl(i);return!0},get(o,l,c){if(l===vs)return r;var d=t.get(l),u=l in o;if(d===void 0&&(!u||bs(o,l)?.writable)&&(d=a(()=>{var f=Li(u?o[l]:gn),g=Nt(f);return g}),t.set(l,d)),d!==void 0){var h=z(d);return h===gn?void 0:h}return Reflect.get(o,l,c)},getOwnPropertyDescriptor(o,l){var c=Reflect.getOwnPropertyDescriptor(o,l);if(c&&"value"in c){var d=t.get(l);d&&(c.value=z(d))}else if(c===void 0){var u=t.get(l),h=u?.v;if(u!==void 0&&h!==gn)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(o,l){if(l===vs)return!0;var c=t.get(l),d=c!==void 0&&c.v!==gn||Reflect.has(o,l);if(c!==void 0||_t!==null&&(!d||bs(o,l)?.writable)){c===void 0&&(c=a(()=>{var h=d?Li(o[l]):gn,f=Nt(h);return f}),t.set(l,c));var u=z(c);if(u===gn)return!1}return d},set(o,l,c,d){var u=t.get(l),h=l in o;if(n&&l==="length")for(var f=c;fNt(gn)),t.set(f+"",g))}if(u===void 0)(!h||bs(o,l)?.writable)&&(u=a(()=>Nt(void 0)),Rt(u,Li(c)),t.set(l,u));else{h=u.v!==gn;var x=a(()=>Li(c));Rt(u,x)}var m=Reflect.getOwnPropertyDescriptor(o,l);if(m?.set&&m.set.call(d,c),!h){if(n&&typeof l=="string"){var p=t.get("length"),v=Number(l);Number.isInteger(v)&&v>=p.v&&Rt(p,v+1)}Pl(i)}return!0},ownKeys(o){z(i);var l=Reflect.ownKeys(o).filter(u=>{var h=t.get(u);return h===void 0||h.v!==gn});for(var[c,d]of t)d.v!==gn&&!(c in o)&&l.push(c);return l},setPrototypeOf(){h1()}})}function nm(r){try{if(r!==null&&typeof r=="object"&&vs in r)return r[vs]}catch{}return r}function q1(r,e){return Object.is(nm(r),nm(e))}var rm,dy,uy,hy,fy;function Y1(){if(rm===void 0){rm=window,dy=document,uy=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;hy=bs(e,"firstChild").get,fy=bs(e,"nextSibling").get,Qg(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),Qg(t)&&(t.__t=void 0)}}function zi(r=""){return document.createTextNode(r)}function Ri(r){return hy.call(r)}function mc(r){return fy.call(r)}function Pt(r,e){return Ri(r)}function bt(r,e=!1){{var t=Ri(r);return t instanceof Comment&&t.data===""?mc(t):t}}function Ut(r,e=1,t=!1){let n=r;for(;e--;)n=mc(n);return n}function Z1(r){r.textContent=""}function py(){return!1}function j1(r,e){if(e){const t=document.body;r.autofocus=!0,Ra(()=>{document.activeElement===t&&r.focus()})}}let im=!1;function $1(){im||(im=!0,document.addEventListener("reset",r=>{Promise.resolve().then(()=>{if(!r.defaultPrevented)for(const e of r.target.elements)e.__on_r?.()})},{capture:!0}))}function zo(r){var e=xt,t=_t;Jn(null),ai(null);try{return r()}finally{Jn(e),ai(t)}}function gy(r,e,t,n=t){r.addEventListener(e,()=>zo(t));const i=r.__on_r;i?r.__on_r=()=>{i(),n(!0)}:r.__on_r=()=>n(!0),$1()}function my(r){_t===null&&(xt===null&&l1(),o1()),Pa&&a1()}function K1(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function ci(r,e,t){var n=_t;n!==null&&(n.f&fr)!==0&&(r|=fr);var i={ctx:xn,deps:null,nodes_start:null,nodes_end:null,f:r|tr|Hr,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(t)try{jl(i),i.f|=mh}catch(o){throw bn(i),o}else e!==null&&ba(i);var s=i;if(t&&s.deps===null&&s.teardown===null&&s.nodes_start===null&&s.first===s.last&&(s.f&Bo)===0&&(s=s.first,(r&li)!==0&&(r&si)!==0&&s!==null&&(s.f|=si)),s!==null&&(s.parent=n,n!==null&&K1(s,n),xt!==null&&(xt.f&vn)!==0&&(r&Ca)===0)){var a=xt;(a.effects??=[]).push(s)}return i}function xc(){return xt!==null&&!ei}function bc(r){const e=ci(ph,null,!1);return kn(e,An),e.teardown=r,e}function Vi(r){my();var e=_t.f,t=!xt&&(e&Yi)!==0&&(e&mh)===0;if(t){var n=xn;(n.e??=[]).push(r)}else return xy(r)}function xy(r){return ci(Ip|Wb,r,!1)}function mn(r){return my(),ci(ph|Wb,r,!0)}function J1(r){Qr.ensure();const e=ci(Ca|Bo,r,!0);return(t={})=>new Promise(n=>{t.outro?So(e,()=>{bn(e),n(void 0)}):(bn(e),n(void 0))})}function yc(r){return ci(Ip,r,!1)}function Q1(r){return ci(Dp|Bo,r,!0)}function Fp(r,e=0){return ci(ph|e,r,!0)}function dr(r,e=[],t=[],n=[]){ry(n,e,t,i=>{ci(ph,()=>r(...i.map(z)),!0)})}function ji(r,e=0){var t=ci(li|e,r,!0);return t}function Zn(r){return ci(Yi|Bo,r,!0)}function by(r){var e=r.teardown;if(e!==null){const t=Pa,n=xt;sm(!0),Jn(null);try{e.call(null)}finally{sm(t),Jn(n)}}}function yy(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){const i=t.ac;i!==null&&zo(()=>{i.abort(bo)});var n=t.next;(t.f&Ca)!==0?t.parent=null:bn(t,e),t=n}}function eM(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&Yi)===0&&bn(e),e=t}}function bn(r,e=!0){var t=!1;(e||(r.f&Hb)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(tM(r.nodes_start,r.nodes_end),t=!0),yy(r,e&&!t),gu(r,0),kn(r,Ni);var n=r.transitions;if(n!==null)for(const s of n)s.stop();by(r);var i=r.parent;i!==null&&i.first!==null&&vy(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=r.ac=null}function tM(r,e){for(;r!==null;){var t=r===e?null:mc(r);r.remove(),r=t}}function vy(r){var e=r.parent,t=r.prev,n=r.next;t!==null&&(t.next=n),n!==null&&(n.prev=t),e!==null&&(e.first===r&&(e.first=n),e.last===r&&(e.last=t))}function So(r,e,t=!0){var n=[];Op(r,n,!0),_y(n,()=>{t&&bn(r),e&&e()})}function _y(r,e){var t=r.length;if(t>0){var n=()=>--t||e();for(var i of r)i.out(n)}else e()}function Op(r,e,t){if((r.f&fr)===0){if(r.f^=fr,r.transitions!==null)for(const a of r.transitions)(a.is_global||t)&&e.push(a);for(var n=r.first;n!==null;){var i=n.next,s=(n.f&si)!==0||(n.f&Yi)!==0&&(r.f&li)!==0;Op(n,e,s?t:!1),n=i}}}function Bp(r){wy(r,!0)}function wy(r,e){if((r.f&fr)!==0){r.f^=fr,(r.f&An)===0&&(kn(r,tr),ba(r));for(var t=r.first;t!==null;){var n=t.next,i=(t.f&si)!==0||(t.f&Yi)!==0;wy(t,i?e:!1),t=n}if(r.transitions!==null)for(const s of r.transitions)(s.is_global||e)&&s.in()}}function My(r,e){for(var t=r.nodes_start,n=r.nodes_end;t!==null;){var i=t===n?null:mc(t);e.append(t),t=i}}let ws=!1;function pu(r){ws=r}let Pa=!1;function sm(r){Pa=r}let xt=null,ei=!1;function Jn(r){xt=r}let _t=null;function ai(r){_t=r}let Ui=null;function Sy(r){xt!==null&&(Ui===null?Ui=[r]:Ui.push(r))}let Nn=null,cr=0,vr=null;function nM(r){vr=r}let Ty=1,Zl=0,ua=Zl;function am(r){ua=r}function Ay(){return++Ty}function vc(r){var e=r.f;if((e&tr)!==0)return!0;if(e&vn&&(r.f&=~xa),(e&Zi)!==0){var t=r.deps;if(t!==null)for(var n=t.length,i=0;ir.wv)return!0}(e&Hr)!==0&&Tr===null&&kn(r,An)}return!1}function ky(r,e,t=!0){var n=r.reactions;if(n!==null&&!Ui?.includes(r))for(var i=0;i{r.ac.abort(bo)}),r.ac=null);try{r.f|=U0;var d=r.fn,u=d(),h=r.deps;if(Nn!==null){var f;if(gu(r,cr),h!==null&&cr>0)for(h.length=cr+Nn.length,f=0;ft?.call(this,s))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?Ra(()=>{e.addEventListener(r,i,n)}):e.addEventListener(r,i,n),i}function fM(r,e,t,n={}){var i=zp(e,r,t,n);return()=>{r.removeEventListener(e,i,n)}}function pM(r,e,t,n,i){var s={capture:n,passive:i},a=zp(r,e,t,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&bc(()=>{e.removeEventListener(r,a,s)})}function dn(r){for(var e=0;e{throw m});throw h}}finally{r.__root=e,delete r.currentTarget,Jn(d),ai(u)}}}function Iy(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("",""),e.content}function va(r,e){var t=_t;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function Ht(r,e){var t=(e&qb)!==0,n=(e&M1)!==0,i,s=!r.startsWith("");return()=>{i===void 0&&(i=Iy(s?r:""+r),t||(i=Ri(i)));var a=n||uy?document.importNode(i,!0):i.cloneNode(!0);if(t){var o=Ri(a),l=a.lastChild;va(o,l)}else va(a,a);return a}}function gM(r,e,t="svg"){var n=!r.startsWith(""),i=(e&qb)!==0,s=`<${t}>${n?r:""+r}`,a;return()=>{if(!a){var o=Iy(s),l=Ri(o);if(i)for(a=document.createDocumentFragment();Ri(l);)a.appendChild(Ri(l));else a=Ri(l)}var c=a.cloneNode(!0);if(i){var d=Ri(c),u=c.lastChild;va(d,u)}else va(c,c);return c}}function Ia(r,e){return gM(r,e,"svg")}function df(r=""){{var e=zi(r+"");return va(e,e),e}}function Ct(){var r=document.createDocumentFragment(),e=document.createComment(""),t=zi();return r.append(e,t),va(e,t),r}function Oe(r,e){r!==null&&r.before(e)}let mu=!0;function Nc(r){mu=r}function ha(r,e){var t=e==null?"":typeof e=="object"?e+"":e;t!==(r.__t??=r.nodeValue)&&(r.__t=t,r.nodeValue=t+"")}function mM(r,e){return xM(r,e)}const Oa=new Map;function xM(r,{target:e,anchor:t,props:n={},events:i,context:s,intro:a=!0}){Y1();var o=new Set,l=u=>{for(var h=0;h{var u=t??e.appendChild(zi());return N1(u,{pending:()=>{}},h=>{if(s){_n({});var f=xn;f.c=s}i&&(n.$$events=i),mu=a,c=r(h,n)||{},mu=!0,s&&wn()}),()=>{for(var h of o){e.removeEventListener(h,Ml);var f=Oa.get(h);--f===0?(document.removeEventListener(h,Ml),Oa.delete(h)):Oa.set(h,f)}B0.delete(l),u!==t&&u.parentNode?.removeChild(u)}});return bM.set(c,d),c}let bM=new WeakMap;class _c{anchor;#e=new Map;#t=new Map;#r=new Map;#n=new Set;#l=!0;constructor(e,t=!0){this.anchor=e,this.#l=t}#s=()=>{var e=Dt;if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Bp(n),this.#n.delete(t);else{var i=this.#r.get(t);i&&(this.#t.set(t,i.effect),this.#r.delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[s,a]of this.#e){if(this.#e.delete(s),s===e)break;const o=this.#r.get(a);o&&(bn(o.effect),this.#r.delete(a))}for(const[s,a]of this.#t){if(s===t||this.#n.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var c=document.createDocumentFragment();My(a,c),c.append(zi()),this.#r.set(s,{effect:a,fragment:c})}else bn(a);this.#n.delete(s),this.#t.delete(s)};this.#l||!n?(this.#n.add(s),So(a,o,!1)):o()}}};#i=e=>{this.#e.delete(e);const t=Array.from(this.#e.values());for(const[n,i]of this.#r)t.includes(n)||(bn(i.effect),this.#r.delete(n))};ensure(e,t){var n=Dt,i=py();if(t&&!this.#t.has(e)&&!this.#r.has(e))if(i){var s=document.createDocumentFragment(),a=zi();s.append(a),this.#r.set(e,{effect:Zn(()=>t(a)),fragment:s})}else this.#t.set(e,Zn(()=>t(this.anchor)));if(this.#e.set(n,e),i){for(const[o,l]of this.#t)o===e?n.skipped_effects.delete(l):n.skipped_effects.add(l);for(const[o,l]of this.#r)o===e?n.skipped_effects.delete(l.effect):n.skipped_effects.add(l.effect);n.oncommit(this.#s),n.ondiscard(this.#i)}else this.#s()}}function Ft(r,e,t=!1){var n=new _c(r),i=t?si:0;function s(a,o){n.ensure(a,o)}ji(()=>{var a=!1;e((o,l=!0)=>{a=!0,s(l,o)}),a||s(!1,null)},i)}function yM(r,e,t){var n=new _c(r);ji(()=>{var i=e();n.ensure(i,t)})}function on(r,e,...t){var n=new _c(r);ji(()=>{const i=e()??null;n.ensure(i,i&&(s=>i(s,...t)))},si)}function Ds(r,e,t){var n=new _c(r);ji(()=>{var i=e()??null;n.ensure(i,i&&(s=>t(s,i)))},si)}function vM(r,e,t,n,i,s){var a=null,o=r,l=new _c(o,!1);ji(()=>{const c=e()||null;var d=c==="svg"?T1:null;if(c===null){l.ensure(null,null),Nc(!0);return}return l.ensure(c,u=>{if(c){if(a=d?document.createElementNS(d,c):document.createElement(c),va(a,a),n){var h=a.appendChild(zi());n(a,h)}_t.nodes_end=a,u.before(a)}}),Nc(!0),()=>{c&&Nc(!1)}},si),bc(()=>{Nc(!0)})}function _M(r,e){var t=void 0,n;ji(()=>{t!==(t=e())&&(n&&(bn(n),n=null),t&&(n=Zn(()=>{yc(()=>t(r))})))})}function Dy(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e=0;){var o=a+s;(a===0||lm.includes(n[a-1]))&&(o===n.length||lm.includes(n[o]))?n=(a===0?"":n.substring(0,a))+n.substring(o+1):a=o}}return n===""?null:n}function cm(r,e=!1){var t=e?" !important;":";",n="";for(var i in r){var s=r[i];s!=null&&s!==""&&(n+=" "+i+": "+s+t)}return n}function uf(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function MM(r,e){if(e){var t="",n,i;if(Array.isArray(e)?(n=e[0],i=e[1]):n=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var s=!1,a=0,o=!1,l=[];n&&l.push(...Object.keys(n).map(uf)),i&&l.push(...Object.keys(i).map(uf));var c=0,d=-1;const x=r.length;for(var u=0;u{xu(r,r.__value)});e.observe(r,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),bc(()=>{e.disconnect()})}function TM(r,e,t=e){var n=new WeakSet,i=!0;gy(r,"change",s=>{var a=s?"[selected]":":checked",o;if(r.multiple)o=[].map.call(r.querySelectorAll(a),Il);else{var l=r.querySelector(a)??r.querySelector("option:not([disabled])");o=l&&Il(l)}t(o),Dt!==null&&n.add(Dt)}),yc(()=>{var s=e();if(r===document.activeElement){var a=iu??Dt;if(n.has(a))return}if(xu(r,s,i),i&&s===void 0){var o=r.querySelector(":checked");o!==null&&(s=Il(o),t(s))}r.__value=s,i=!1}),Ly(r)}function Il(r){return"__value"in r?r.__value:r.value}const Ko=Symbol("class"),Jo=Symbol("style"),Ny=Symbol("is custom element"),Uy=Symbol("is html");function Fy(r,e){e?r.hasAttribute("selected")||r.setAttribute("selected",""):r.removeAttribute("selected")}function na(r,e,t,n){var i=Oy(r);i[e]!==(i[e]=t)&&(e==="loading"&&(r[i1]=t),t==null?r.removeAttribute(e):typeof t!="string"&&By(r).includes(e)?r[e]=t:r.setAttribute(e,t))}function AM(r,e,t,n,i=!1,s=!1){var a=Oy(r),o=a[Ny],l=!a[Uy],c=e||{},d=r.tagName==="OPTION";for(var u in e)u in t||(t[u]=null);t.class?t.class=_a(t.class):t[Ko]&&(t.class=null),t[Jo]&&(t.style??=null);var h=By(r);for(const y in t){let _=t[y];if(d&&y==="value"&&_==null){r.value=r.__value="",c[y]=_;continue}if(y==="class"){var f=r.namespaceURI==="http://www.w3.org/1999/xhtml";wa(r,f,_,n,e?.[Ko],t[Ko]),c[y]=_,c[Ko]=t[Ko];continue}if(y==="style"){SM(r,_,e?.[Jo],t[Jo]),c[y]=_,c[Jo]=t[Jo];continue}var g=c[y];if(!(_===g&&!(_===void 0&&r.hasAttribute(y)))){c[y]=_;var x=y[0]+y[1];if(x!=="$$")if(x==="on"){const w={},T="$$"+y;let A=y.slice(2);var m=lM(A);if(aM(A)&&(A=A.slice(0,-7),w.capture=!0),!m&&g){if(_!=null)continue;r.removeEventListener(A,c[T],w),c[T]=null}if(_!=null)if(m)r[`__${A}`]=_,dn([A]);else{let M=function(S){c[y].call(this,S)};var b=M;c[T]=zp(A,r,M,w)}else m&&(r[`__${A}`]=void 0)}else if(y==="style")na(r,y,_);else if(y==="autofocus")j1(r,!!_);else if(!o&&(y==="__value"||y==="value"&&_!=null))r.value=r.__value=_;else if(y==="selected"&&d)Fy(r,_);else{var p=y;l||(p=dM(p));var v=p==="defaultValue"||p==="defaultChecked";if(_==null&&!o&&!v)if(a[y]=null,p==="value"||p==="checked"){let w=r;const T=e===void 0;if(p==="value"){let A=w.defaultValue;w.removeAttribute(p),w.defaultValue=A,w.value=w.__value=T?A:null}else{let A=w.defaultChecked;w.removeAttribute(p),w.defaultChecked=A,w.checked=T?A:!1}}else r.removeAttribute(y);else v||h.includes(p)&&(o||typeof _!="string")?(r[p]=_,p in a&&(a[p]=gn)):typeof _!="function"&&na(r,p,_)}}}return c}function fn(r,e,t=[],n=[],i=[],s,a=!1,o=!1){ry(i,t,n,l=>{var c=void 0,d={},u=r.nodeName==="SELECT",h=!1;if(ji(()=>{var g=e(...l.map(z)),x=AM(r,c,g,s,a,o);h&&u&&"value"in g&&xu(r,g.value);for(let p of Object.getOwnPropertySymbols(d))g[p]||bn(d[p]);for(let p of Object.getOwnPropertySymbols(g)){var m=g[p];p.description===A1&&(!c||m!==c[p])&&(d[p]&&bn(d[p]),d[p]=Zn(()=>_M(r,()=>m))),x[p]=m}c=x}),u){var f=r;yc(()=>{xu(f,c.value,!0),Ly(f)})}h=!0})}function Oy(r){return r.__attributes??={[Ny]:r.nodeName.includes("-"),[Uy]:r.namespaceURI===S1}}var dm=new Map;function By(r){var e=r.getAttribute("is")||r.nodeName,t=dm.get(e);if(t)return t;dm.set(e,t=[]);for(var n,i=r,s=Element.prototype;s!==i;){n=t1(i);for(var a in n)n[a].set&&t.push(a);i=zb(i)}return t}const kM=()=>performance.now(),Pi={tick:r=>requestAnimationFrame(r),now:()=>kM(),tasks:new Set};function zy(){const r=Pi.now();Pi.tasks.forEach(e=>{e.c(r)||(Pi.tasks.delete(e),e.f())}),Pi.tasks.size!==0&&Pi.tick(zy)}function EM(r){let e;return Pi.tasks.size===0&&Pi.tick(zy),{promise:new Promise(t=>{Pi.tasks.add(e={c:r,f:t})}),abort(){Pi.tasks.delete(e)}}}function Uc(r,e){zo(()=>{r.dispatchEvent(new CustomEvent(e))})}function CM(r){if(r==="float")return"cssFloat";if(r==="offset")return"cssOffset";if(r.startsWith("--"))return r;const e=r.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function um(r){const e={},t=r.split(";");for(const n of t){const[i,s]=n.split(":");if(!i||s===void 0)break;const a=CM(i.trim());e[a]=s.trim()}return e}const RM=r=>r;function PM(r,e,t,n){var i=(r&w1)!==0,s="both",a,o=e.inert,l=e.style.overflow,c,d;function u(){return zo(()=>a??=t()(e,n?.()??{},{direction:s}))}var h={is_global:i,in(){e.inert=o,Uc(e,"introstart"),c=z0(e,u(),d,1,()=>{Uc(e,"introend"),c?.abort(),c=a=void 0,e.style.overflow=l})},out(m){e.inert=!0,Uc(e,"outrostart"),d=z0(e,u(),c,0,()=>{Uc(e,"outroend"),m?.()})},stop:()=>{c?.abort(),d?.abort()}},f=_t;if((f.transitions??=[]).push(h),mu){var g=i;if(!g){for(var x=f.parent;x&&(x.f&si)!==0;)for(;(x=x.parent)&&(x.f&li)===0;);g=!x||(x.f&mh)!==0}g&&yc(()=>{di(()=>h.in())})}}function z0(r,e,t,n,i){var s=n===1;if(xo(e)){var a,o=!1;return Ra(()=>{if(!o){var m=e({direction:s?"in":"out"});a=z0(r,m,t,n,i)}}),{abort:()=>{o=!0,a?.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(t?.deactivate(),!e?.duration)return i(),{abort:zt,deactivate:zt,reset:zt,t:()=>n};const{delay:l=0,css:c,tick:d,easing:u=RM}=e;var h=[];if(s&&t===void 0&&(d&&d(0,1),c)){var f=um(c(0,1));h.push(f,f)}var g=()=>1-n,x=r.animate(h,{duration:l,fill:"forwards"});return x.onfinish=()=>{x.cancel();var m=t?.t()??1-n;t?.abort();var p=n-m,v=e.duration*Math.abs(p),b=[];if(v>0){var y=!1;if(c)for(var _=Math.ceil(v/16.666666666666668),w=0;w<=_;w+=1){var T=m+p*u(w/_),A=um(c(T,1-T));b.push(A),y||=A.overflow==="hidden"}y&&(r.style.overflow="hidden"),g=()=>{var M=x.currentTime;return m+p*u(M/v)},d&&EM(()=>{if(x.playState!=="running")return!1;var M=g();return d(M,1-M),!0})}x=r.animate(b,{duration:v,fill:"forwards"}),x.onfinish=()=>{g=()=>n,d?.(n,1-n),i()}},{abort:()=>{x&&(x.cancel(),x.effect=null,x.onfinish=zt)},deactivate:()=>{i=zt},reset:()=>{n===0&&d?.(1,0)},t:()=>g()}}function IM(r,e,t=e){gy(r,"change",n=>{var i=n?r.defaultChecked:r.checked;t(i)}),di(e)==null&&t(r.checked),Fp(()=>{var n=e();r.checked=!!n})}function hm(r,e){return r===e||r?.[vs]===e}function bu(r={},e,t,n){return yc(()=>{var i,s;return Fp(()=>{i=s,s=[],di(()=>{r!==t(...s)&&(e(r,...s),i&&hm(t(...i),r)&&e(null,...i))})}),()=>{Ra(()=>{s&&hm(t(...s),r)&&e(null,...s)})}}),r}function Vp(r,e,t){if(r==null)return e(void 0),t&&t(void 0),zt;const n=di(()=>r.subscribe(e,t));return n.unsubscribe?()=>n.unsubscribe():n}const Ba=[];function Gp(r,e){return{subscribe:Eo(r,e).subscribe}}function Eo(r,e=zt){let t=null;const n=new Set;function i(o){if(Zb(r,o)&&(r=o,t)){const l=!Ba.length;for(const c of n)c[1](),Ba.push(c,r);if(l){for(let c=0;c{n.delete(c),n.size===0&&t&&(t(),t=null)}}return{set:i,update:s,subscribe:a}}function Hp(r,e,t){const n=!Array.isArray(r),i=n?[r]:r;if(!i.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const s=e.length<2;return Gp(t,(a,o)=>{let l=!1;const c=[];let d=0,u=zt;const h=()=>{if(d)return;u();const g=e(n?c[0]:c,a,o);s?a(g):u=typeof g=="function"?g:zt},f=i.map((g,x)=>Vp(g,m=>{c[x]=m,d&=~(1<{d|=1<e=t)(),e}let Fc=!1,V0=Symbol();function DM(r,e,t){const n=t[e]??={store:null,source:ly(void 0),unsubscribe:zt};if(n.store!==r&&!(V0 in t))if(n.unsubscribe(),n.store=r??null,r==null)n.source.v=void 0,n.unsubscribe=zt;else{var i=!0;n.unsubscribe=Vp(r,s=>{i?n.source.v=s:Rt(n.source,s)}),i=!1}return r&&V0 in t?Vy(r):z(n.source)}function LM(){const r={};function e(){bc(()=>{for(var t in r)r[t].unsubscribe();Bb(r,V0,{enumerable:!1,value:!0})})}return[r,e]}function NM(r){var e=Fc;try{return Fc=!1,[r(),Fc]}finally{Fc=e}}const UM={get(r,e){if(!r.exclude.includes(e))return r.props[e]},set(r,e){return!1},getOwnPropertyDescriptor(r,e){if(!r.exclude.includes(e)&&e in r.props)return{enumerable:!0,configurable:!0,value:r.props[e]}},has(r,e){return r.exclude.includes(e)?!1:e in r.props},ownKeys(r){return Reflect.ownKeys(r.props).filter(e=>!r.exclude.includes(e))}};function rr(r,e,t){return new Proxy({props:r,exclude:e},UM)}const FM={get(r,e){let t=r.props.length;for(;t--;){let n=r.props[t];if(xo(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n)return n[e]}},set(r,e,t){let n=r.props.length;for(;n--;){let i=r.props[n];xo(i)&&(i=i());const s=bs(i,e);if(s&&s.set)return s.set(t),!0}return!1},getOwnPropertyDescriptor(r,e){let t=r.props.length;for(;t--;){let n=r.props[t];if(xo(n)&&(n=n()),typeof n=="object"&&n!==null&&e in n){const i=bs(n,e);return i&&!i.configurable&&(i.configurable=!0),i}}},has(r,e){if(e===vs||e===Xb)return!1;for(let t of r.props)if(xo(t)&&(t=t()),t!=null&&e in t)return!0;return!1},ownKeys(r){const e=[];for(let t of r.props)if(xo(t)&&(t=t()),!!t){for(const n in t)e.includes(n)||e.push(n);for(const n of Object.getOwnPropertySymbols(t))e.includes(n)||e.push(n)}return e}};function Wp(...r){return new Proxy({props:r},FM)}function pt(r,e,t,n){var i=(t&v1)!==0,s=(t&_1)!==0,a=n,o=!0,l=()=>(o&&(o=!1,a=s?di(n):n),a),c;if(i){var d=vs in r||Xb in r;c=bs(r,e)?.set??(d&&e in r?v=>r[e]=v:void 0)}var u,h=!1;i?[u,h]=NM(()=>r[e]):u=r[e],u===void 0&&n!==void 0&&(u=l(),c&&(d1(),c(u)));var f;if(f=()=>{var v=r[e];return v===void 0?l():(o=!0,v)},(t&y1)===0)return f;if(c){var g=r.$$legacy;return(function(v,b){return arguments.length>0?((!b||g||h)&&c(b?f():v),v):f()})}var x=!1,m=((t&b1)!==0?bh:iy)(()=>(x=!1,f()));i&&z(m);var p=_t;return(function(v,b){if(arguments.length>0){const y=b?z(m):i?Li(v):v;return Rt(m,y),x=!0,a!==void 0&&(a=y),v}return Pa&&x||(p.f&Ni)!==0?m.v:z(m)})}function yh(r){xn===null&&Lp(),Vi(()=>{const e=di(r);if(typeof e=="function")return e})}function wc(r){xn===null&&Lp(),yh(()=>()=>di(r))}const OM="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(OM);const fm=(r,e)=>{if(r===e)return!0;if(!r||!e)return!1;const t=r.length;if(e.length!==t)return!1;for(let n=0;n{const r=[],n={items:r,remember:(i,s)=>{for(let o=0;o{for(let s=0;s=0;--e)if(r[e]>=65535)return!0;return!1}const SS={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function vo(r,e){return new SS[r](e)}function ic(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function Pv(){const r=ic("canvas");return r.style.display="block",r}const pm={};let Ss=null;function TS(r){Ss=r}function AS(){return Ss}function sc(...r){const e="THREE."+r.shift();Ss?Ss("log",e,...r):console.log(e,...r)}function ye(...r){const e="THREE."+r.shift();Ss?Ss("warn",e,...r):console.warn(e,...r)}function tt(...r){const e="THREE."+r.shift();Ss?Ss("error",e,...r):console.error(e,...r)}function Lo(...r){const e=r.join(" ");e in pm||(pm[e]=!0,ye(...r))}function kS(r,e,t){return new Promise(function(n,i){function s(){switch(r.clientWaitSync(e,r.SYNC_FLUSH_COMMANDS_BIT,0)){case r.WAIT_FAILED:i();break;case r.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:n()}}setTimeout(s,t)})}class ui{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 i=n[e];if(i!==void 0){const s=i.indexOf(t);s!==-1&&i.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 i=n.slice(0);for(let s=0,a=i.length;s>8&255]+Mn[r>>16&255]+Mn[r>>24&255]+"-"+Mn[e&255]+Mn[e>>8&255]+"-"+Mn[e>>16&15|64]+Mn[e>>24&255]+"-"+Mn[t&63|128]+Mn[t>>8&255]+"-"+Mn[t>>16&255]+Mn[t>>24&255]+Mn[n&255]+Mn[n>>8&255]+Mn[n>>16&255]+Mn[n>>24&255]).toLowerCase()}function $e(r,e,t){return Math.max(e,Math.min(t,r))}function tg(r,e){return(r%e+e)%e}function ES(r,e,t,n,i){return n+(r-e)*(i-n)/(t-e)}function CS(r,e,t){return r!==e?(t-r)/(e-r):0}function Bl(r,e,t){return(1-t)*r+t*e}function RS(r,e,t,n){return Bl(r,e,1-Math.exp(-t*n))}function PS(r,e=1){return e-Math.abs(tg(r,e*2)-e)}function IS(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*(3-2*r))}function DS(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*r*(r*(r*6-15)+10))}function LS(r,e){return r+Math.floor(Math.random()*(e-r+1))}function NS(r,e){return r+Math.random()*(e-r)}function US(r){return r*(.5-Math.random())}function FS(r){r!==void 0&&(gm=r);let e=gm+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function OS(r){return r*ga}function BS(r){return r*No}function zS(r){return(r&r-1)===0&&r!==0}function VS(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function GS(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function HS(r,e,t,n,i){const s=Math.cos,a=Math.sin,o=s(t/2),l=a(t/2),c=s((e+n)/2),d=a((e+n)/2),u=s((e-n)/2),h=a((e-n)/2),f=s((n-e)/2),g=a((n-e)/2);switch(i){case"XYX":r.set(o*d,l*u,l*h,o*c);break;case"YZY":r.set(l*h,o*d,l*u,o*c);break;case"ZXZ":r.set(l*u,l*h,o*d,o*c);break;case"XZX":r.set(o*d,l*g,l*f,o*c);break;case"YXY":r.set(l*f,o*d,l*g,o*c);break;case"ZYZ":r.set(l*g,l*f,o*d,o*c);break;default:ye("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Un(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function ct(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}const Iv={DEG2RAD:ga,RAD2DEG:No,generateUUID:pr,clamp:$e,euclideanModulo:tg,mapLinear:ES,inverseLerp:CS,lerp:Bl,damp:RS,pingpong:PS,smoothstep:IS,smootherstep:DS,randInt:LS,randFloat:NS,randFloatSpread:US,seededRandom:FS,degToRad:OS,radToDeg:BS,isPowerOfTwo:zS,ceilPowerOfTwo:VS,floorPowerOfTwo:GS,setQuaternionFromProperEuler:HS,normalize:ct,denormalize:Un};class K{constructor(e=0,t=0){K.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,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[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=$e(this.x,e.x,t.x),this.y=$e(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=$e(this.x,e,t),this.y=$e(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar($e(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($e(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),i=Math.sin(t),s=this.x-e.x,a=this.y-e.y;return this.x=s*n-a*i+e.x,this.y=s*i+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 Cn{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,s,a,o){let l=n[i+0],c=n[i+1],d=n[i+2],u=n[i+3],h=s[a+0],f=s[a+1],g=s[a+2],x=s[a+3];if(o<=0){e[t+0]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u;return}if(o>=1){e[t+0]=h,e[t+1]=f,e[t+2]=g,e[t+3]=x;return}if(u!==x||l!==h||c!==f||d!==g){let m=l*h+c*f+d*g+u*x;m<0&&(h=-h,f=-f,g=-g,x=-x,m=-m);let p=1-o;if(m<.9995){const v=Math.acos(m),b=Math.sin(v);p=Math.sin(p*v)/b,o=Math.sin(o*v)/b,l=l*p+h*o,c=c*p+f*o,d=d*p+g*o,u=u*p+x*o}else{l=l*p+h*o,c=c*p+f*o,d=d*p+g*o,u=u*p+x*o;const v=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=v,c*=v,d*=v,u*=v}}e[t]=l,e[t+1]=c,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,i,s,a){const o=n[i],l=n[i+1],c=n[i+2],d=n[i+3],u=s[a],h=s[a+1],f=s[a+2],g=s[a+3];return e[t]=o*g+d*u+l*f-c*h,e[t+1]=l*g+d*h+c*u-o*f,e[t+2]=c*g+d*f+o*h-l*u,e[t+3]=d*g-o*u-l*h-c*f,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,i){return this._x=e,this._y=t,this._z=n,this._w=i,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,i=e._y,s=e._z,a=e._order,o=Math.cos,l=Math.sin,c=o(n/2),d=o(i/2),u=o(s/2),h=l(n/2),f=l(i/2),g=l(s/2);switch(a){case"XYZ":this._x=h*d*u+c*f*g,this._y=c*f*u-h*d*g,this._z=c*d*g+h*f*u,this._w=c*d*u-h*f*g;break;case"YXZ":this._x=h*d*u+c*f*g,this._y=c*f*u-h*d*g,this._z=c*d*g-h*f*u,this._w=c*d*u+h*f*g;break;case"ZXY":this._x=h*d*u-c*f*g,this._y=c*f*u+h*d*g,this._z=c*d*g+h*f*u,this._w=c*d*u-h*f*g;break;case"ZYX":this._x=h*d*u-c*f*g,this._y=c*f*u+h*d*g,this._z=c*d*g-h*f*u,this._w=c*d*u+h*f*g;break;case"YZX":this._x=h*d*u+c*f*g,this._y=c*f*u+h*d*g,this._z=c*d*g-h*f*u,this._w=c*d*u-h*f*g;break;case"XZY":this._x=h*d*u-c*f*g,this._y=c*f*u-h*d*g,this._z=c*d*g+h*f*u,this._w=c*d*u+h*f*g;break;default:ye("Quaternion: .setFromEuler() encountered an unknown order: "+a)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],s=t[8],a=t[1],o=t[5],l=t[9],c=t[2],d=t[6],u=t[10],h=n+o+u;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(d-l)*f,this._y=(s-c)*f,this._z=(a-i)*f}else if(n>o&&n>u){const f=2*Math.sqrt(1+n-o-u);this._w=(d-l)/f,this._x=.25*f,this._y=(i+a)/f,this._z=(s+c)/f}else if(o>u){const f=2*Math.sqrt(1+o-n-u);this._w=(s-c)/f,this._x=(i+a)/f,this._y=.25*f,this._z=(l+d)/f}else{const f=2*Math.sqrt(1+u-n-o);this._w=(a-i)/f,this._x=(s+c)/f,this._y=(l+d)/f,this._z=.25*f}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($e(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),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,i=e._y,s=e._z,a=e._w,o=t._x,l=t._y,c=t._z,d=t._w;return this._x=n*d+a*o+i*c-s*l,this._y=i*d+a*l+s*o-n*c,this._z=s*d+a*c+n*l-i*o,this._w=a*d-n*o-i*l-s*c,this._onChangeCallback(),this}slerp(e,t){if(t<=0)return this;if(t>=1)return this.copy(e);let n=e._x,i=e._y,s=e._z,a=e._w,o=this.dot(e);o<0&&(n=-n,i=-i,s=-s,a=-a,o=-o);let l=1-t;if(o<.9995){const c=Math.acos(o),d=Math.sin(c);l=Math.sin(l*c)/d,t=Math.sin(t*c)/d,this._x=this._x*l+n*t,this._y=this._y*l+i*t,this._z=this._z*l+s*t,this._w=this._w*l+a*t,this._onChangeCallback()}else this._x=this._x*l+n*t,this._y=this._y*l+i*t,this._z=this._z*l+s*t,this._w=this._w*l+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(),i=Math.sqrt(1-n),s=Math.sqrt(n);return this.set(i*Math.sin(e),i*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 C{constructor(e=0,t=0,n=0){C.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(mm.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(mm.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,s=e.elements;return this.x=s[0]*t+s[3]*n+s[6]*i,this.y=s[1]*t+s[4]*n+s[7]*i,this.z=s[2]*t+s[5]*n+s[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,s=e.elements,a=1/(s[3]*t+s[7]*n+s[11]*i+s[15]);return this.x=(s[0]*t+s[4]*n+s[8]*i+s[12])*a,this.y=(s[1]*t+s[5]*n+s[9]*i+s[13])*a,this.z=(s[2]*t+s[6]*n+s[10]*i+s[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,s=e.x,a=e.y,o=e.z,l=e.w,c=2*(a*i-o*n),d=2*(o*t-s*i),u=2*(s*n-a*t);return this.x=t+l*c+a*u-o*d,this.y=n+l*d+o*c-s*u,this.z=i+l*u+s*d-a*c,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,i=this.z,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*i,this.y=s[1]*t+s[5]*n+s[9]*i,this.z=s[2]*t+s[6]*n+s[10]*i,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=$e(this.x,e.x,t.x),this.y=$e(this.y,e.y,t.y),this.z=$e(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=$e(this.x,e,t),this.y=$e(this.y,e,t),this.z=$e(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar($e(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,i=e.y,s=e.z,a=t.x,o=t.y,l=t.z;return this.x=i*l-s*o,this.y=s*a-n*l,this.z=n*o-i*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 ff.copy(this).projectOnVector(e),this.sub(ff)}reflect(e){return this.sub(ff.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($e(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}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 i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*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(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,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 ff=new C,mm=new Cn;class at{constructor(e,t,n,i,s,a,o,l,c){at.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,s,a,o,l,c)}set(e,t,n,i,s,a,o,l,c){const d=this.elements;return d[0]=e,d[1]=i,d[2]=o,d[3]=t,d[4]=s,d[5]=l,d[6]=n,d[7]=a,d[8]=c,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,i=t.elements,s=this.elements,a=n[0],o=n[3],l=n[6],c=n[1],d=n[4],u=n[7],h=n[2],f=n[5],g=n[8],x=i[0],m=i[3],p=i[6],v=i[1],b=i[4],y=i[7],_=i[2],w=i[5],T=i[8];return s[0]=a*x+o*v+l*_,s[3]=a*m+o*b+l*w,s[6]=a*p+o*y+l*T,s[1]=c*x+d*v+u*_,s[4]=c*m+d*b+u*w,s[7]=c*p+d*y+u*T,s[2]=h*x+f*v+g*_,s[5]=h*m+f*b+g*w,s[8]=h*p+f*y+g*T,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],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],d=e[8];return t*a*d-t*o*c-n*s*d+n*o*l+i*s*c-i*a*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],d=e[8],u=d*a-o*c,h=o*l-d*s,f=c*s-a*l,g=t*u+n*h+i*f;if(g===0)return this.set(0,0,0,0,0,0,0,0,0);const x=1/g;return e[0]=u*x,e[1]=(i*c-d*n)*x,e[2]=(o*n-i*a)*x,e[3]=h*x,e[4]=(d*t-i*l)*x,e[5]=(i*s-o*t)*x,e[6]=f*x,e[7]=(n*l-c*t)*x,e[8]=(a*t-n*s)*x,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,i,s,a,o){const l=Math.cos(s),c=Math.sin(s);return this.set(n*l,n*c,-n*(l*a+c*o)+a+e,-i*c,i*l,-i*(-c*a+l*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(pf.makeScale(e,t)),this}rotate(e){return this.premultiply(pf.makeRotation(-e)),this}translate(e,t){return this.premultiply(pf.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 i=0;i<9;i++)if(t[i]!==n[i])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 pf=new at,xm=new at().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),bm=new at().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function WS(){const r={enabled:!0,workingColorSpace:Sa,spaces:{},convert:function(i,s,a){return this.enabled===!1||s===a||!s||!a||(this.spaces[s].transfer===Mt&&(i.r=Oi(i.r),i.g=Oi(i.g),i.b=Oi(i.b)),this.spaces[s].primaries!==this.spaces[a].primaries&&(i.applyMatrix3(this.spaces[s].toXYZ),i.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===Mt&&(i.r=To(i.r),i.g=To(i.g),i.b=To(i.b))),i},workingToColorSpace:function(i,s){return this.convert(i,this.workingColorSpace,s)},colorSpaceToWorking:function(i,s){return this.convert(i,s,this.workingColorSpace)},getPrimaries:function(i){return this.spaces[i].primaries},getTransfer:function(i){return i===Ii?nc:this.spaces[i].transfer},getToneMappingMode:function(i){return this.spaces[i].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(i,s=this.workingColorSpace){return i.fromArray(this.spaces[s].luminanceCoefficients)},define:function(i){Object.assign(this.spaces,i)},_getMatrix:function(i,s,a){return i.copy(this.spaces[s].toXYZ).multiply(this.spaces[a].fromXYZ)},_getDrawingBufferColorSpace:function(i){return this.spaces[i].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(i=this.workingColorSpace){return this.spaces[i].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(i,s){return Lo("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),r.workingToColorSpace(i,s)},toWorkingColorSpace:function(i,s){return Lo("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),r.colorSpaceToWorking(i,s)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return r.define({[Sa]:{primaries:e,whitePoint:n,transfer:nc,toXYZ:xm,fromXYZ:bm,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:jn},outputColorSpaceConfig:{drawingBufferColorSpace:jn}},[jn]:{primaries:e,whitePoint:n,transfer:Mt,toXYZ:xm,fromXYZ:bm,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:jn}}}),r}const ft=WS();function Oi(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function To(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}let za;class Dv{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{za===void 0&&(za=ic("canvas")),za.width=e.width,za.height=e.height;const i=za.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=za}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=ic("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),s=i.data;for(let a=0;a1),this.pmremVersion=0}get width(){return this.source.getSize(mf).x}get height(){return this.source.getSize(mf).y}get depth(){return this.source.getSize(mf).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){ye(`Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){ye(`Texture.setValues(): property '${t}' does not exist.`);continue}i&&n&&i.isVector2&&n.isVector2||i&&n&&i.isVector3&&n.isVector3||i&&n&&i.isMatrix3&&n.isMatrix3?i.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!==vh)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Jl:e.x=e.x-Math.floor(e.x);break;case Qn:e.x=e.x<0?0:1;break;case Ql: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 Jl:e.y=e.y-Math.floor(e.y);break;case Qn:e.y=e.y<0?0:1;break;case Ql: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++}}Zt.DEFAULT_IMAGE=null;Zt.DEFAULT_MAPPING=vh;Zt.DEFAULT_ANISOTROPY=1;class rt{constructor(e=0,t=0,n=0,i=1){rt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}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,i){return this.x=e,this.y=t,this.z=n,this.w=i,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,i=this.z,s=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i+a[12]*s,this.y=a[1]*t+a[5]*n+a[9]*i+a[13]*s,this.z=a[2]*t+a[6]*n+a[10]*i+a[14]*s,this.w=a[3]*t+a[7]*n+a[11]*i+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,i,s;const l=e.elements,c=l[0],d=l[4],u=l[8],h=l[1],f=l[5],g=l[9],x=l[2],m=l[6],p=l[10];if(Math.abs(d-h)<.01&&Math.abs(u-x)<.01&&Math.abs(g-m)<.01){if(Math.abs(d+h)<.1&&Math.abs(u+x)<.1&&Math.abs(g+m)<.1&&Math.abs(c+f+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const b=(c+1)/2,y=(f+1)/2,_=(p+1)/2,w=(d+h)/4,T=(u+x)/4,A=(g+m)/4;return b>y&&b>_?b<.01?(n=0,i=.707106781,s=.707106781):(n=Math.sqrt(b),i=w/n,s=T/n):y>_?y<.01?(n=.707106781,i=0,s=.707106781):(i=Math.sqrt(y),n=w/i,s=A/i):_<.01?(n=.707106781,i=.707106781,s=0):(s=Math.sqrt(_),n=T/s,i=A/s),this.set(n,i,s,t),this}let v=Math.sqrt((m-g)*(m-g)+(u-x)*(u-x)+(h-d)*(h-d));return Math.abs(v)<.001&&(v=1),this.x=(m-g)/v,this.y=(u-x)/v,this.z=(h-d)/v,this.w=Math.acos((c+f+p-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=$e(this.x,e.x,t.x),this.y=$e(this.y,e.y,t.y),this.z=$e(this.z,e.z,t.z),this.w=$e(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=$e(this.x,e,t),this.y=$e(this.y,e,t),this.z=$e(this.z,e,t),this.w=$e(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar($e(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 ng extends ui{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Jt,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 rt(0,0,e,t),this.scissorTest=!1,this.viewport=new rt(0,0,e,t);const i={width:e,height:t,depth:n.depth},s=new Zt(i);this.textures=[];const 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=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,Lr),Lr.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(Qo),Bc.subVectors(this.max,Qo),Va.subVectors(e.a,Qo),Ga.subVectors(e.b,Qo),Ha.subVectors(e.c,Qo),Qi.subVectors(Ga,Va),es.subVectors(Ha,Ga),Ls.subVectors(Va,Ha);let t=[0,-Qi.z,Qi.y,0,-es.z,es.y,0,-Ls.z,Ls.y,Qi.z,0,-Qi.x,es.z,0,-es.x,Ls.z,0,-Ls.x,-Qi.y,Qi.x,0,-es.y,es.x,0,-Ls.y,Ls.x,0];return!xf(t,Va,Ga,Ha,Bc)||(t=[1,0,0,0,1,0,0,0,1],!xf(t,Va,Ga,Ha,Bc))?!1:(zc.crossVectors(Qi,es),t=[zc.x,zc.y,zc.z],xf(t,Va,Ga,Ha,Bc))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Lr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Lr).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:(fi[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fi[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fi[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fi[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fi[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fi[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fi[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fi[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fi),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 fi=[new C,new C,new C,new C,new C,new C,new C,new C],Lr=new C,Oc=new wt,Va=new C,Ga=new C,Ha=new C,Qi=new C,es=new C,Ls=new C,Qo=new C,Bc=new C,zc=new C,Ns=new C;function xf(r,e,t,n,i){for(let s=0,a=r.length-3;s<=a;s+=3){Ns.fromArray(r,s);const o=i.x*Math.abs(Ns.x)+i.y*Math.abs(Ns.y)+i.z*Math.abs(Ns.z),l=e.dot(Ns),c=t.dot(Ns),d=n.dot(Ns);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>o)return!1}return!0}const jS=new wt,el=new C,bf=new C;class nn{constructor(e=new C,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):jS.setFromPoints(e).getCenter(n);let i=0;for(let s=0,a=e.length;sthis.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;el.subVectors(e,this.center);const t=el.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(el,i/n),this.radius+=i}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):(bf.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(el.copy(e.center).add(bf)),this.expandByPoint(el.copy(e.center).sub(bf))),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}}const pi=new C,yf=new C,Vc=new C,ts=new C,vf=new C,Gc=new C,_f=new C;class qr{constructor(e=new C,t=new C(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,pi)),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=pi.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(pi.copy(this.origin).addScaledVector(this.direction,t),pi.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){yf.copy(e).add(t).multiplyScalar(.5),Vc.copy(t).sub(e).normalize(),ts.copy(this.origin).sub(yf);const s=e.distanceTo(t)*.5,a=-this.direction.dot(Vc),o=ts.dot(this.direction),l=-ts.dot(Vc),c=ts.lengthSq(),d=Math.abs(1-a*a);let u,h,f,g;if(d>0)if(u=a*l-o,h=a*o-l,g=s*d,u>=0)if(h>=-g)if(h<=g){const x=1/d;u*=x,h*=x,f=u*(u+a*h+2*o)+h*(a*u+h+2*l)+c}else h=s,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*l)+c;else h=-s,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*l)+c;else h<=-g?(u=Math.max(0,-(-a*s+o)),h=u>0?-s:Math.min(Math.max(-s,-l),s),f=-u*u+h*(h+2*l)+c):h<=g?(u=0,h=Math.min(Math.max(-s,-l),s),f=h*(h+2*l)+c):(u=Math.max(0,-(a*s+o)),h=u>0?s:Math.min(Math.max(-s,-l),s),f=-u*u+h*(h+2*l)+c);else h=a>0?-s:s,u=Math.max(0,-(a*h+o)),f=-u*u+h*(h+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,u),i&&i.copy(yf).addScaledVector(Vc,h),f}intersectSphere(e,t){pi.subVectors(e.center,this.origin);const n=pi.dot(this.direction),i=pi.dot(pi)-n*n,s=e.radius*e.radius;if(i>s)return null;const a=Math.sqrt(s-i),o=n-a,l=n+a;return l<0?null:o<0?this.at(l,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,i,s,a,o,l;const c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,h=this.origin;return c>=0?(n=(e.min.x-h.x)*c,i=(e.max.x-h.x)*c):(n=(e.max.x-h.x)*c,i=(e.min.x-h.x)*c),d>=0?(s=(e.min.y-h.y)*d,a=(e.max.y-h.y)*d):(s=(e.max.y-h.y)*d,a=(e.min.y-h.y)*d),n>a||s>i||((s>n||isNaN(n))&&(n=s),(a=0?(o=(e.min.z-h.z)*u,l=(e.max.z-h.z)*u):(o=(e.max.z-h.z)*u,l=(e.min.z-h.z)*u),n>l||o>i)||((o>n||n!==n)&&(n=o),(l=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,pi)!==null}intersectTriangle(e,t,n,i,s){vf.subVectors(t,e),Gc.subVectors(n,e),_f.crossVectors(vf,Gc);let a=this.direction.dot(_f),o;if(a>0){if(i)return null;o=1}else if(a<0)o=-1,a=-a;else return null;ts.subVectors(this.origin,e);const l=o*this.direction.dot(Gc.crossVectors(ts,Gc));if(l<0)return null;const c=o*this.direction.dot(vf.cross(ts));if(c<0||l+c>a)return null;const d=-o*ts.dot(_f);return d<0?null:this.at(d/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 De{constructor(e,t,n,i,s,a,o,l,c,d,u,h,f,g,x,m){De.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,s,a,o,l,c,d,u,h,f,g,x,m)}set(e,t,n,i,s,a,o,l,c,d,u,h,f,g,x,m){const p=this.elements;return p[0]=e,p[4]=t,p[8]=n,p[12]=i,p[1]=s,p[5]=a,p[9]=o,p[13]=l,p[2]=c,p[6]=d,p[10]=u,p[14]=h,p[3]=f,p[7]=g,p[11]=x,p[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new De().fromArray(this.elements)}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],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/Wa.setFromMatrixColumn(e,0).length(),s=1/Wa.setFromMatrixColumn(e,1).length(),a=1/Wa.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*s,t[5]=n[5]*s,t[6]=n[6]*s,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,s=e.z,a=Math.cos(n),o=Math.sin(n),l=Math.cos(i),c=Math.sin(i),d=Math.cos(s),u=Math.sin(s);if(e.order==="XYZ"){const h=a*d,f=a*u,g=o*d,x=o*u;t[0]=l*d,t[4]=-l*u,t[8]=c,t[1]=f+g*c,t[5]=h-x*c,t[9]=-o*l,t[2]=x-h*c,t[6]=g+f*c,t[10]=a*l}else if(e.order==="YXZ"){const h=l*d,f=l*u,g=c*d,x=c*u;t[0]=h+x*o,t[4]=g*o-f,t[8]=a*c,t[1]=a*u,t[5]=a*d,t[9]=-o,t[2]=f*o-g,t[6]=x+h*o,t[10]=a*l}else if(e.order==="ZXY"){const h=l*d,f=l*u,g=c*d,x=c*u;t[0]=h-x*o,t[4]=-a*u,t[8]=g+f*o,t[1]=f+g*o,t[5]=a*d,t[9]=x-h*o,t[2]=-a*c,t[6]=o,t[10]=a*l}else if(e.order==="ZYX"){const h=a*d,f=a*u,g=o*d,x=o*u;t[0]=l*d,t[4]=g*c-f,t[8]=h*c+x,t[1]=l*u,t[5]=x*c+h,t[9]=f*c-g,t[2]=-c,t[6]=o*l,t[10]=a*l}else if(e.order==="YZX"){const h=a*l,f=a*c,g=o*l,x=o*c;t[0]=l*d,t[4]=x-h*u,t[8]=g*u+f,t[1]=u,t[5]=a*d,t[9]=-o*d,t[2]=-c*d,t[6]=f*u+g,t[10]=h-x*u}else if(e.order==="XZY"){const h=a*l,f=a*c,g=o*l,x=o*c;t[0]=l*d,t[4]=-u,t[8]=c*d,t[1]=h*u+x,t[5]=a*d,t[9]=f*u-g,t[2]=g*u-f,t[6]=o*d,t[10]=x*u+h}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose($S,e,KS)}lookAt(e,t,n){const i=this.elements;return or.subVectors(e,t),or.lengthSq()===0&&(or.z=1),or.normalize(),ns.crossVectors(n,or),ns.lengthSq()===0&&(Math.abs(n.z)===1?or.x+=1e-4:or.z+=1e-4,or.normalize(),ns.crossVectors(n,or)),ns.normalize(),Hc.crossVectors(or,ns),i[0]=ns.x,i[4]=Hc.x,i[8]=or.x,i[1]=ns.y,i[5]=Hc.y,i[9]=or.y,i[2]=ns.z,i[6]=Hc.z,i[10]=or.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,s=this.elements,a=n[0],o=n[4],l=n[8],c=n[12],d=n[1],u=n[5],h=n[9],f=n[13],g=n[2],x=n[6],m=n[10],p=n[14],v=n[3],b=n[7],y=n[11],_=n[15],w=i[0],T=i[4],A=i[8],M=i[12],S=i[1],E=i[5],P=i[9],N=i[13],L=i[2],F=i[6],B=i[10],G=i[14],O=i[3],Y=i[7],te=i[11],de=i[15];return s[0]=a*w+o*S+l*L+c*O,s[4]=a*T+o*E+l*F+c*Y,s[8]=a*A+o*P+l*B+c*te,s[12]=a*M+o*N+l*G+c*de,s[1]=d*w+u*S+h*L+f*O,s[5]=d*T+u*E+h*F+f*Y,s[9]=d*A+u*P+h*B+f*te,s[13]=d*M+u*N+h*G+f*de,s[2]=g*w+x*S+m*L+p*O,s[6]=g*T+x*E+m*F+p*Y,s[10]=g*A+x*P+m*B+p*te,s[14]=g*M+x*N+m*G+p*de,s[3]=v*w+b*S+y*L+_*O,s[7]=v*T+b*E+y*F+_*Y,s[11]=v*A+b*P+y*B+_*te,s[15]=v*M+b*N+y*G+_*de,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],s=e[12],a=e[1],o=e[5],l=e[9],c=e[13],d=e[2],u=e[6],h=e[10],f=e[14],g=e[3],x=e[7],m=e[11],p=e[15];return g*(+s*l*u-i*c*u-s*o*h+n*c*h+i*o*f-n*l*f)+x*(+t*l*f-t*c*h+s*a*h-i*a*f+i*c*d-s*l*d)+m*(+t*c*u-t*o*f-s*a*u+n*a*f+s*o*d-n*c*d)+p*(-i*o*d-t*l*u+t*o*h+i*a*u-n*a*h+n*l*d)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],s=e[3],a=e[4],o=e[5],l=e[6],c=e[7],d=e[8],u=e[9],h=e[10],f=e[11],g=e[12],x=e[13],m=e[14],p=e[15],v=u*m*c-x*h*c+x*l*f-o*m*f-u*l*p+o*h*p,b=g*h*c-d*m*c-g*l*f+a*m*f+d*l*p-a*h*p,y=d*x*c-g*u*c+g*o*f-a*x*f-d*o*p+a*u*p,_=g*u*l-d*x*l-g*o*h+a*x*h+d*o*m-a*u*m,w=t*v+n*b+i*y+s*_;if(w===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const T=1/w;return e[0]=v*T,e[1]=(x*h*s-u*m*s-x*i*f+n*m*f+u*i*p-n*h*p)*T,e[2]=(o*m*s-x*l*s+x*i*c-n*m*c-o*i*p+n*l*p)*T,e[3]=(u*l*s-o*h*s-u*i*c+n*h*c+o*i*f-n*l*f)*T,e[4]=b*T,e[5]=(d*m*s-g*h*s+g*i*f-t*m*f-d*i*p+t*h*p)*T,e[6]=(g*l*s-a*m*s-g*i*c+t*m*c+a*i*p-t*l*p)*T,e[7]=(a*h*s-d*l*s+d*i*c-t*h*c-a*i*f+t*l*f)*T,e[8]=y*T,e[9]=(g*u*s-d*x*s-g*n*f+t*x*f+d*n*p-t*u*p)*T,e[10]=(a*x*s-g*o*s+g*n*c-t*x*c-a*n*p+t*o*p)*T,e[11]=(d*o*s-a*u*s-d*n*c+t*u*c+a*n*f-t*o*f)*T,e[12]=_*T,e[13]=(d*x*i-g*u*i+g*n*h-t*x*h-d*n*m+t*u*m)*T,e[14]=(g*o*i-a*x*i-g*n*l+t*x*l+a*n*m-t*o*m)*T,e[15]=(a*u*i-d*o*i+d*n*l-t*u*l-a*n*h+t*o*h)*T,this}scale(e){const t=this.elements,n=e.x,i=e.y,s=e.z;return t[0]*=n,t[4]*=i,t[8]*=s,t[1]*=n,t[5]*=i,t[9]*=s,t[2]*=n,t[6]*=i,t[10]*=s,t[3]*=n,t[7]*=i,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),s=1-n,a=e.x,o=e.y,l=e.z,c=s*a,d=s*o;return this.set(c*a+n,c*o-i*l,c*l+i*o,0,c*o+i*l,d*o+n,d*l-i*a,0,c*l-i*o,d*l+i*a,s*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,s,a){return this.set(1,n,s,0,e,1,a,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,s=t._x,a=t._y,o=t._z,l=t._w,c=s+s,d=a+a,u=o+o,h=s*c,f=s*d,g=s*u,x=a*d,m=a*u,p=o*u,v=l*c,b=l*d,y=l*u,_=n.x,w=n.y,T=n.z;return i[0]=(1-(x+p))*_,i[1]=(f+y)*_,i[2]=(g-b)*_,i[3]=0,i[4]=(f-y)*w,i[5]=(1-(h+p))*w,i[6]=(m+v)*w,i[7]=0,i[8]=(g+b)*T,i[9]=(m-v)*T,i[10]=(1-(h+x))*T,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let s=Wa.set(i[0],i[1],i[2]).length();const a=Wa.set(i[4],i[5],i[6]).length(),o=Wa.set(i[8],i[9],i[10]).length();this.determinant()<0&&(s=-s),e.x=i[12],e.y=i[13],e.z=i[14],Nr.copy(this);const c=1/s,d=1/a,u=1/o;return Nr.elements[0]*=c,Nr.elements[1]*=c,Nr.elements[2]*=c,Nr.elements[4]*=d,Nr.elements[5]*=d,Nr.elements[6]*=d,Nr.elements[8]*=u,Nr.elements[9]*=u,Nr.elements[10]*=u,t.setFromRotationMatrix(Nr),n.x=s,n.y=a,n.z=o,this}makePerspective(e,t,n,i,s,a,o=ur,l=!1){const c=this.elements,d=2*s/(t-e),u=2*s/(n-i),h=(t+e)/(t-e),f=(n+i)/(n-i);let g,x;if(l)g=s/(a-s),x=a*s/(a-s);else if(o===ur)g=-(a+s)/(a-s),x=-2*a*s/(a-s);else if(o===Do)g=-a/(a-s),x=-a*s/(a-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return c[0]=d,c[4]=0,c[8]=h,c[12]=0,c[1]=0,c[5]=u,c[9]=f,c[13]=0,c[2]=0,c[6]=0,c[10]=g,c[14]=x,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,n,i,s,a,o=ur,l=!1){const c=this.elements,d=2/(t-e),u=2/(n-i),h=-(t+e)/(t-e),f=-(n+i)/(n-i);let g,x;if(l)g=1/(a-s),x=a/(a-s);else if(o===ur)g=-2/(a-s),x=-(a+s)/(a-s);else if(o===Do)g=-1/(a-s),x=-s/(a-s);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return c[0]=d,c[4]=0,c[8]=0,c[12]=h,c[1]=0,c[5]=u,c[9]=0,c[13]=f,c[2]=0,c[6]=0,c[10]=g,c[14]=x,c[3]=0,c[7]=0,c[11]=0,c[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;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[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const Wa=new C,Nr=new De,$S=new C(0,0,0),KS=new C(1,1,1),ns=new C,Hc=new C,or=new C,ym=new De,vm=new Cn;class gr{constructor(e=0,t=0,n=0,i=gr.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}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 order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,s=i[0],a=i[4],o=i[8],l=i[1],c=i[5],d=i[9],u=i[2],h=i[6],f=i[10];switch(t){case"XYZ":this._y=Math.asin($e(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-d,f),this._z=Math.atan2(-a,s)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-$e(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,s),this._z=0);break;case"ZXY":this._x=Math.asin($e(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-$e(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin($e(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-u,s)):(this._x=0,this._y=Math.atan2(o,f));break;case"XZY":this._z=Math.asin(-$e(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(o,s)):(this._x=Math.atan2(-d,f),this._y=0);break;default:ye("Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return ym.makeRotationFromQuaternion(e),this.setFromRotationMatrix(ym,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return vm.setFromEuler(this),this.setFromQuaternion(vm,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[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._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}gr.DEFAULT_ORDER="XYZ";class Ph{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let n=0;n0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),i.instanceInfo=this._instanceInfo.map(o=>({...o})),i.availableInstanceIds=this._availableInstanceIds.slice(),i.availableGeometryIds=this._availableGeometryIds.slice(),i.nextIndexStart=this._nextIndexStart,i.nextVertexStart=this._nextVertexStart,i.geometryCount=this._geometryCount,i.maxInstanceCount=this._maxInstanceCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.matricesTexture=this._matricesTexture.toJSON(e),i.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(i.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(i.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(i.boundingBox=this.boundingBox.toJSON()));function s(o,l){return o[l.uuid]===void 0&&(o[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=s(e.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const l=o.shapes;if(Array.isArray(l))for(let c=0,d=l.length;c0){i.children=[];for(let o=0;o0){i.animations=[];for(let o=0;o0&&(n.geometries=o),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),d.length>0&&(n.images=d),u.length>0&&(n.shapes=u),h.length>0&&(n.skeletons=h),f.length>0&&(n.animations=f),g.length>0&&(n.nodes=g)}return n.object=i,n;function a(o){const l=[];for(const c in o){const d=o[c];delete d.metadata,l.push(d)}return l}}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),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.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n0?i.multiplyScalar(1/Math.sqrt(s)):i.set(0,0,0)}static getBarycoord(e,t,n,i,s){Ur.subVectors(i,t),mi.subVectors(n,t),Mf.subVectors(e,t);const a=Ur.dot(Ur),o=Ur.dot(mi),l=Ur.dot(Mf),c=mi.dot(mi),d=mi.dot(Mf),u=a*c-o*o;if(u===0)return s.set(0,0,0),null;const h=1/u,f=(c*l-o*d)*h,g=(a*d-o*l)*h;return s.set(1-f-g,g,f)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,xi)===null?!1:xi.x>=0&&xi.y>=0&&xi.x+xi.y<=1}static getInterpolation(e,t,n,i,s,a,o,l){return this.getBarycoord(e,t,n,i,xi)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,xi.x),l.addScaledVector(a,xi.y),l.addScaledVector(o,xi.z),l)}static getInterpolatedAttribute(e,t,n,i,s,a){return kf.setScalar(0),Ef.setScalar(0),Cf.setScalar(0),kf.fromBufferAttribute(e,t),Ef.fromBufferAttribute(e,n),Cf.fromBufferAttribute(e,i),a.setScalar(0),a.addScaledVector(kf,s.x),a.addScaledVector(Ef,s.y),a.addScaledVector(Cf,s.z),a}static isFrontFacing(e,t,n,i){return Ur.subVectors(n,t),mi.subVectors(e,t),Ur.cross(mi).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),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 Ur.subVectors(this.c,this.b),mi.subVectors(this.a,this.b),Ur.cross(mi).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return kt.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return kt.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,s){return kt.getInterpolation(e,this.a,this.b,this.c,t,n,i,s)}containsPoint(e){return kt.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return kt.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,s=this.c;let a,o;Ya.subVectors(i,n),Za.subVectors(s,n),Sf.subVectors(e,n);const l=Ya.dot(Sf),c=Za.dot(Sf);if(l<=0&&c<=0)return t.copy(n);Tf.subVectors(e,i);const d=Ya.dot(Tf),u=Za.dot(Tf);if(d>=0&&u<=d)return t.copy(i);const h=l*u-d*c;if(h<=0&&l>=0&&d<=0)return a=l/(l-d),t.copy(n).addScaledVector(Ya,a);Af.subVectors(e,s);const f=Ya.dot(Af),g=Za.dot(Af);if(g>=0&&f<=g)return t.copy(s);const x=f*c-l*g;if(x<=0&&c>=0&&g<=0)return o=c/(c-g),t.copy(n).addScaledVector(Za,o);const m=d*g-f*u;if(m<=0&&u-d>=0&&f-g>=0)return Am.subVectors(s,i),o=(u-d)/(u-d+(f-g)),t.copy(i).addScaledVector(Am,o);const p=1/(m+x+h);return a=x*p,o=h*p,t.copy(n).addScaledVector(Ya,a).addScaledVector(Za,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const Lv={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},rs={h:0,s:0,l:0},Xc={h:0,s:0,l:0};function Rf(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}class Se{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 i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=jn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ft.colorSpaceToWorking(this,t),this}setRGB(e,t,n,i=ft.workingColorSpace){return this.r=e,this.g=t,this.b=n,ft.colorSpaceToWorking(this,i),this}setHSL(e,t,n,i=ft.workingColorSpace){if(e=tg(e,1),t=$e(t,0,1),n=$e(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=Rf(a,s,e+1/3),this.g=Rf(a,s,e),this.b=Rf(a,s,e-1/3)}return ft.colorSpaceToWorking(this,i),this}setStyle(e,t=jn){function n(s){s!==void 0&&parseFloat(s)<1&&ye("Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const a=i[1],o=i[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:ye("Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=i[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);ye("Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=jn){const n=Lv[e.toLowerCase()];return n!==void 0?this.setHex(n,t):ye("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=Oi(e.r),this.g=Oi(e.g),this.b=Oi(e.b),this}copyLinearToSRGB(e){return this.r=To(e.r),this.g=To(e.g),this.b=To(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=jn){return ft.workingToColorSpace(Sn.copy(this),e),Math.round($e(Sn.r*255,0,255))*65536+Math.round($e(Sn.g*255,0,255))*256+Math.round($e(Sn.b*255,0,255))}getHexString(e=jn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ft.workingColorSpace){ft.workingToColorSpace(Sn.copy(this),t);const n=Sn.r,i=Sn.g,s=Sn.b,a=Math.max(n,i,s),o=Math.min(n,i,s);let l,c;const d=(o+a)/2;if(o===a)l=0,c=0;else{const u=a-o;switch(c=d<=.5?u/(a+o):u/(2-a-o),a){case n:l=(i-s)/u+(i0!=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){ye(`Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){ye(`Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.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!==pa&&(n.blending=this.blending),this.side!==Wr&&(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!==yu&&(n.blendSrc=this.blendSrc),this.blendDst!==vu&&(n.blendDst=this.blendDst),this.blendEquation!==hs&&(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!==Ma&&(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!==Y0&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ta&&(n.stencilFail=this.stencilFail),this.stencilZFail!==ta&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==ta&&(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.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 i(s){const a=[];for(const o in s){const l=s[o];delete l.metadata,a.push(l)}return a}if(t){const s=i(e.textures),a=i(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 i=t.length;n=new Array(i);for(let s=0;s!==i;++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.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++}}class $i extends Rn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Se(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 gr,this.combine=Mc,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 Di=r3();function r3(){const r=new ArrayBuffer(4),e=new Float32Array(r),t=new Uint32Array(r),n=new Uint32Array(512),i=new Uint32Array(512);for(let l=0;l<256;++l){const c=l-127;c<-27?(n[l]=0,n[l|256]=32768,i[l]=24,i[l|256]=24):c<-14?(n[l]=1024>>-c-14,n[l|256]=1024>>-c-14|32768,i[l]=-c-1,i[l|256]=-c-1):c<=15?(n[l]=c+15<<10,n[l|256]=c+15<<10|32768,i[l]=13,i[l|256]=13):c<128?(n[l]=31744,n[l|256]=64512,i[l]=24,i[l|256]=24):(n[l]=31744,n[l|256]=64512,i[l]=13,i[l|256]=13)}const s=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let l=1;l<1024;++l){let c=l<<13,d=0;for(;(c&8388608)===0;)c<<=1,d-=8388608;c&=-8388609,d+=947912704,s[l]=c|d}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)a[l]=l<<23;a[31]=1199570944,a[32]=2147483648;for(let l=33;l<63;++l)a[l]=2147483648+(l-32<<23);a[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(o[l]=1024);return{floatView:e,uint32View:t,baseTable:n,shiftTable:i,mantissaTable:s,exponentTable:a,offsetTable:o}}function qn(r){Math.abs(r)>65504&&ye("DataUtils.toHalfFloat(): Value out of range."),r=$e(r,-65504,65504),Di.floatView[0]=r;const e=Di.uint32View[0],t=e>>23&511;return Di.baseTable[t]+((e&8388607)>>Di.shiftTable[t])}function Sl(r){const e=r>>10;return Di.uint32View[0]=Di.mantissaTable[Di.offsetTable[e]+(r&1023)]+Di.exponentTable[e],Di.floatView[0]}class i3{static toHalfFloat(e){return qn(e)}static fromHalfFloat(e){return Sl(e)}}const en=new C,qc=new K;let s3=0;class vt{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:s3++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=rc,this.updateRanges=[],this.gpuType=er,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 i=0,s=this.itemSize;it.count&&ye("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 wt);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){tt("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new C(-1/0,-1/0,-1/0),new C(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);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 l in n){const c=n[l];e.data.attributes[l]=c.toJSON(e.data)}const i={};let s=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],d=[];for(let u=0,h=c.length;u0&&(i[l]=d,s=!0)}s&&(e.data.morphAttributes=i,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 i=e.attributes;for(const c in i){const d=i[c];this.setAttribute(c,d.clone(t))}const s=e.morphAttributes;for(const c in s){const d=[],u=s[c];for(let h=0,f=u.length;h0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=i.length;s(e.far-e.near)**2))&&(km.copy(s).invert(),Us.copy(e.ray).applyMatrix4(km),!(n.boundingBox!==null&&Us.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Us)))}_computeIntersections(e,t,n){let i;const s=this.geometry,a=this.material,o=s.index,l=s.attributes.position,c=s.attributes.uv,d=s.attributes.uv1,u=s.attributes.normal,h=s.groups,f=s.drawRange;if(o!==null)if(Array.isArray(a))for(let g=0,x=h.length;gt.far?null:{distance:c,point:Jc.clone(),object:r}}function Qc(r,e,t,n,i,s,a,o,l,c){r.getVertexPosition(o,Zc),r.getVertexPosition(l,jc),r.getVertexPosition(c,$c);const d=f3(r,e,t,n,Zc,jc,$c,Cm);if(d){const u=new C;kt.getBarycoord(Cm,Zc,jc,$c,u),i&&(d.uv=kt.getInterpolatedAttribute(i,o,l,c,u,new K)),s&&(d.uv1=kt.getInterpolatedAttribute(s,o,l,c,u,new K)),a&&(d.normal=kt.getInterpolatedAttribute(a,o,l,c,u,new C),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const h={a:o,b:l,c,normal:new C,materialIndex:0};kt.getNormal(Zc,jc,$c,h.normal),d.face=h,d.barycoord=u}return d}class Wi extends ot{constructor(e=1,t=1,n=1,i=1,s=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:s,depthSegments:a};const o=this;i=Math.floor(i),s=Math.floor(s),a=Math.floor(a);const l=[],c=[],d=[],u=[];let h=0,f=0;g("z","y","x",-1,-1,n,t,e,a,s,0),g("z","y","x",1,-1,n,t,-e,a,s,1),g("x","z","y",1,1,e,n,t,i,a,2),g("x","z","y",1,-1,e,n,-t,i,a,3),g("x","y","z",1,-1,e,t,n,i,s,4),g("x","y","z",-1,-1,e,t,-n,i,s,5),this.setIndex(l),this.setAttribute("position",new ke(c,3)),this.setAttribute("normal",new ke(d,3)),this.setAttribute("uv",new ke(u,2));function g(x,m,p,v,b,y,_,w,T,A,M){const S=y/T,E=_/A,P=y/2,N=_/2,L=w/2,F=T+1,B=A+1;let G=0,O=0;const Y=new C;for(let te=0;te0?1:-1,d.push(Y.x,Y.y,Y.z),u.push(Ee/T),u.push(1-te/A),G+=1}}for(let te=0;te0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class Ih extends gt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new De,this.projectionMatrix=new De,this.projectionMatrixInverse=new De,this.coordinateSystem=ur,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.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const is=new C,Rm=new K,Pm=new K;class hn extends Ih{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,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=No*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(ga*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return No*2*Math.atan(Math.tan(ga*.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){is.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(is.x,is.y).multiplyScalar(-e/is.z),is.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(is.x,is.y).multiplyScalar(-e/is.z)}getViewSize(e,t){return this.getViewBounds(e,Rm,Pm),t.subVectors(Pm,Rm)}setViewOffset(e,t,n,i,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=i,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(ga*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,s=-.5*i;const a=this.view;if(this.view!==null&&this.view.enabled){const l=a.fullWidth,c=a.fullHeight;s+=a.offsetX*i/l,t-=a.offsetY*n/c,i*=a.width/l,n*=a.height/c}const o=this.filmOffset;o!==0&&(s+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+i,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}}const $a=-90,Ka=1;class Uv extends gt{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new hn($a,Ka,e,t);i.layers=this.layers,this.add(i);const s=new hn($a,Ka,e,t);s.layers=this.layers,this.add(s);const a=new hn($a,Ka,e,t);a.layers=this.layers,this.add(a);const o=new hn($a,Ka,e,t);o.layers=this.layers,this.add(o);const l=new hn($a,Ka,e,t);l.layers=this.layers,this.add(l);const c=new hn($a,Ka,e,t);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,i,s,a,o,l]=t;for(const c of t)this.remove(c);if(e===ur)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.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),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===Do)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.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),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of t)this.add(c),c.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,a,o,l,c,d]=this.children,u=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),g=e.xr.enabled;e.xr.enabled=!1;const x=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(t,s),e.setRenderTarget(n,1,i),e.render(t,a),e.setRenderTarget(n,2,i),e.render(t,o),e.setRenderTarget(n,3,i),e.render(t,l),e.setRenderTarget(n,4,i),e.render(t,c),n.texture.generateMipmaps=x,e.setRenderTarget(n,5,i),e.render(t,d),e.setRenderTarget(u,h,f),e.xr.enabled=g,n.texture.needsPMREMUpdate=!0}}class Tc extends Zt{constructor(e=[],t=Gi,n,i,s,a,o,l,c,d){super(e,t,n,i,s,a,o,l,c,d),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Fv extends oi{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];this.texture=new Tc(i),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 ); - - } - `},i=new Wi(5,5,5),s=new Rr({name:"CubemapFromEquirect",uniforms:Uo(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:En,blending:ii});s.uniforms.tEquirect.value=t;const a=new Qt(i,s),o=t.minFilter;return t.minFilter===ti&&(t.minFilter=Jt),new Uv(1,10,this).update(e,a),t.minFilter=o,a.geometry.dispose(),a.material.dispose(),this}clear(e,t=!0,n=!0,i=!0){const s=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,n,i);e.setRenderTarget(s)}}class _o extends gt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const x3={type:"move"};class au{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new _o,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new _o,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new C,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new C),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new _o,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new C,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new C),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,s=null,a=null;const o=this._targetRay,l=this._grip,c=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(c&&e.hand){a=!0;for(const x of e.hand.values()){const m=t.getJointPose(x,n),p=this._getHandJoint(c,x);m!==null&&(p.matrix.fromArray(m.transform.matrix),p.matrix.decompose(p.position,p.rotation,p.scale),p.matrixWorldNeedsUpdate=!0,p.jointRadius=m.radius),p.visible=m!==null}const d=c.joints["index-finger-tip"],u=c.joints["thumb-tip"],h=d.position.distanceTo(u.position),f=.02,g=.005;c.inputState.pinching&&h>f+g?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=f-g&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,n),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));o!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&s!==null&&(i=s),i!==null&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(x3)))}return o!==null&&(o.visible=i!==null),l!==null&&(l.visible=s!==null),c!==null&&(c.visible=a!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new _o;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Dh{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Se(e),this.density=t}clone(){return new Dh(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Lh{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new Se(e),this.near=t,this.far=n}clone(){return new Lh(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class ag extends gt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new gr,this.environmentIntensity=1,this.environmentRotation=new gr,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(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}}class Nh{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=rc,this.updateRanges=[],this.version=0,this.uuid=pr()}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.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,s=this.stride;ie.far||t.push({distance:l,point:rl.clone(),uv:kt.getInterpolation(rl,ed,sl,td,Im,Df,Dm,new K),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function nd(r,e,t,n,i,s){to.subVectors(r,t).addScalar(.5).multiply(n),i!==void 0?(il.x=s*to.x-i*to.y,il.y=i*to.x+s*to.y):il.copy(to),r.copy(e),r.x+=il.x,r.y+=il.y,r.applyMatrix4(Ov)}const rd=new C,Lm=new C;class zv extends gt{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,i=t.length;n0){let n,i;for(n=1,i=t.length;n0){rd.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(rd);this.getObjectForDistance(i).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){rd.setFromMatrixPosition(e.matrixWorld),Lm.setFromMatrixPosition(this.matrixWorld);const n=rd.distanceTo(Lm)/e.zoom;t[0].object.visible=!0;let i,s;for(i=1,s=t.length;i=a)t[i-1].object.visible=!1,t[i].object.visible=!0;else break}for(this._currentLevel=i-1;i1?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||w3.getNormalMatrix(e),i=this.coplanarPoint(Uf).applyMatrix4(e),s=this.normal.applyMatrix3(n).normalize();return this.constant=-i.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 Fs=new nn,M3=new K(.5,.5),ad=new C;class Ho{constructor(e=new Mr,t=new Mr,n=new Mr,i=new Mr,s=new Mr,a=new Mr){this.planes=[e,t,n,i,s,a]}set(e,t,n,i,s,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(i),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=ur,n=!1){const i=this.planes,s=e.elements,a=s[0],o=s[1],l=s[2],c=s[3],d=s[4],u=s[5],h=s[6],f=s[7],g=s[8],x=s[9],m=s[10],p=s[11],v=s[12],b=s[13],y=s[14],_=s[15];if(i[0].setComponents(c-a,f-d,p-g,_-v).normalize(),i[1].setComponents(c+a,f+d,p+g,_+v).normalize(),i[2].setComponents(c+o,f+u,p+x,_+b).normalize(),i[3].setComponents(c-o,f-u,p-x,_-b).normalize(),n)i[4].setComponents(l,h,m,y).normalize(),i[5].setComponents(c-l,f-h,p-m,_-y).normalize();else if(i[4].setComponents(c-l,f-h,p-m,_-y).normalize(),t===ur)i[5].setComponents(c+l,f+h,p+m,_+y).normalize();else if(t===Do)i[5].setComponents(l,h,m,y).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(),Fs.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Fs.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Fs)}intersectsSprite(e){Fs.center.set(0,0,0);const t=M3.distanceTo(e.center);return Fs.radius=.7071067811865476+t,Fs.applyMatrix4(e.matrixWorld),this.intersectsSphere(Fs)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(n)0?e.max.x:e.min.x,ad.y=i.normal.y>0?e.max.y:e.min.y,ad.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(ad)<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)}}const jr=new De,$r=new Ho;class Fh{constructor(){this.coordinateSystem=ur}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let n=0;n=s.length&&s.push({start:-1,count:-1,z:-1,index:-1});const o=s[this.index];a.push(o),this.index++,o.start=e,o.count=t,o.z=n,o.index=i}reset(){this.list.length=0,this.index=0}}const Wn=new De,k3=new Se(1,1,1),Hm=new Ho,E3=new Fh,od=new wt,Os=new nn,ll=new C,Wm=new C,C3=new C,Of=new A3,Tn=new Qt,ld=[];function R3(r,e,t=0){const n=e.itemSize;if(r.isInterleavedBufferAttribute||r.array.constructor!==e.array.constructor){const i=r.count;for(let s=0;s65535?new Uint32Array(i):new Uint16Array(i);t.setIndex(new vt(s,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(!e.hasAttribute(n))throw new Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const i=e.getAttribute(n),s=t.getAttribute(n);if(i.itemSize!==s.itemSize||i.normalized!==s.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new wt);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,i=t.length;n=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const n={visible:!0,active:!0,geometryIndex:e};let i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Ff),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=n):(i=this._instanceInfo.length,this._instanceInfo.push(n));const s=this._matricesTexture;Wn.identity().toArray(s.image.data,i*16),s.needsUpdate=!0;const a=this._colorsTexture;return a&&(k3.toArray(a.image.data,i*4),a.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const i={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},s=this._geometryInfo;i.vertexStart=this._nextVertexStart,i.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const a=e.getIndex();if(a!==null&&(i.indexStart=this._nextIndexStart,i.reservedIndexCount=n===-1?a.count:n),i.indexStart!==-1&&i.indexStart+i.reservedIndexCount>this._maxIndexCount||i.vertexStart+i.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let l;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Ff),l=this._availableGeometryIds.shift(),s[l]=i):(l=this._geometryCount,this._geometryCount++,s.push(i)),this.setGeometryAt(l,e),this._nextIndexStart=i.indexStart+i.reservedIndexCount,this._nextVertexStart=i.vertexStart+i.reservedVertexCount,l}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,i=n.getIndex()!==null,s=n.getIndex(),a=t.getIndex(),o=this._geometryInfo[e];if(i&&a.count>o.reservedIndexCount||t.attributes.position.count>o.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const l=o.vertexStart,c=o.reservedVertexCount;o.vertexCount=t.getAttribute("position").count;for(const d in n.attributes){const u=t.getAttribute(d),h=n.getAttribute(d);R3(u,h,l);const f=u.itemSize;for(let g=u.count,x=c;g=t.length||t[e].active===!1)return this;const n=this._instanceInfo;for(let i=0,s=n.length;io).sort((a,o)=>n[a].vertexStart-n[o].vertexStart),s=this.geometry;for(let a=0,o=n.length;a=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[e];if(i.boundingBox===null){const s=new wt,a=n.index,o=n.attributes.position;for(let l=i.start,c=i.start+i.count;l=this._geometryCount)return null;const n=this.geometry,i=this._geometryInfo[e];if(i.boundingSphere===null){const s=new nn;this.getBoundingBoxAt(e,od),od.getCenter(s.center);const a=n.index,o=n.attributes.position;let l=0;for(let c=i.start,d=i.start+i.count;co.active);if(Math.max(...n.map(o=>o.vertexStart+o.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...n.map(l=>l.indexStart+l.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const s=this.geometry;s.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new ot,this._initializeGeometry(s));const a=this.geometry;s.index&&Bs(s.index.array,a.index.array);for(const o in s.attributes)Bs(s.attributes[o].array,a.attributes[o].array)}raycast(e,t){const n=this._instanceInfo,i=this._geometryInfo,s=this.matrixWorld,a=this.geometry;Tn.material=this.material,Tn.geometry.index=a.index,Tn.geometry.attributes=a.attributes,Tn.geometry.boundingBox===null&&(Tn.geometry.boundingBox=new wt),Tn.geometry.boundingSphere===null&&(Tn.geometry.boundingSphere=new nn);for(let o=0,l=n.length;o({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,i,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const a=i.getIndex(),o=a===null?1:a.array.BYTES_PER_ELEMENT,l=this._instanceInfo,c=this._multiDrawStarts,d=this._multiDrawCounts,u=this._geometryInfo,h=this.perObjectFrustumCulled,f=this._indirectTexture,g=f.image.data,x=n.isArrayCamera?E3:Hm;h&&!n.isArrayCamera&&(Wn.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),Hm.setFromProjectionMatrix(Wn,n.coordinateSystem,n.reversedDepth));let m=0;if(this.sortObjects){Wn.copy(this.matrixWorld).invert(),ll.setFromMatrixPosition(n.matrixWorld).applyMatrix4(Wn),Wm.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(Wn);for(let b=0,y=l.length;b0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=i.length;sn)return;Bf.applyMatrix4(r.matrixWorld);const c=e.ray.origin.distanceTo(Bf);if(!(ce.far))return{distance:c,point:qm.clone().applyMatrix4(r.matrixWorld),index:a,face:null,faceIndex:null,barycoord:null,object:r}}const Ym=new C,Zm=new C;class hi extends Ts{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,s=t.count;i0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,a=i.length;si.far)return;s.push({distance:c,distanceToRay:Math.sqrt(o),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:a})}}class qv extends Zt{constructor(e,t,n,i,s=Jt,a=Jt,o,l,c){super(e,t,n,i,s,a,o,l,c),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const d=this;function u(){d.needsUpdate=!0,d._requestVideoFrameCallbackId=e.requestVideoFrameCallback(u)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(u))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&(this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),this._requestVideoFrameCallbackId=0),super.dispose()}}class P3 extends qv{constructor(e,t,n,i,s,a,o,l){super({},e,t,n,i,s,a,o,l),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class I3 extends Zt{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=yn,this.minFilter=yn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Oh extends Zt{constructor(e,t,n,i,s,a,o,l,c,d,u,h){super(null,a,o,l,c,d,i,s,u,h),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class D3 extends Oh{constructor(e,t,n,i,s,a){super(e,t,n,s,a),this.isCompressedArrayTexture=!0,this.image.depth=i,this.wrapR=Qn,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class L3 extends Oh{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,Gi),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class N3 extends Zt{constructor(e,t,n,i,s,a,o,l,c){super(e,t,n,i,s,a,o,l,c),this.isCanvasTexture=!0,this.needsUpdate=!0}}class dg extends Zt{constructor(e,t,n=Hi,i,s,a,o=yn,l=yn,c,d=Po,u=1){if(d!==Po&&d!==Io)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const h={width:e,height:t,depth:u};super(h,i,s,a,o,l,d,n,c),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new ps(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 ug extends Zt{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class Bh extends ot{constructor(e=1,t=1,n=4,i=8,s=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:i,heightSegments:s},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),i=Math.max(3,Math.floor(i)),s=Math.max(1,Math.floor(s));const a=[],o=[],l=[],c=[],d=t/2,u=Math.PI/2*e,h=t,f=2*u+h,g=n*2+s,x=i+1,m=new C,p=new C;for(let v=0;v<=g;v++){let b=0,y=0,_=0,w=0;if(v<=n){const M=v/n,S=M*Math.PI/2;y=-d-e*Math.cos(S),_=e*Math.sin(S),w=-e*Math.cos(S),b=M*u}else if(v<=n+s){const M=(v-n)/s;y=-d+M*t,_=e,w=0,b=u+M*h}else{const M=(v-n-s)/n,S=M*Math.PI/2;y=d+e*Math.sin(S),_=e*Math.cos(S),w=e*Math.sin(S),b=u+h+M*u}const T=Math.max(0,Math.min(1,b/f));let A=0;v===0?A=.5/i:v===g&&(A=-.5/i);for(let M=0;M<=i;M++){const S=M/i,E=S*Math.PI*2,P=Math.sin(E),N=Math.cos(E);p.x=-_*N,p.y=y,p.z=_*P,o.push(p.x,p.y,p.z),m.set(-_*N,w,_*P),m.normalize(),l.push(m.x,m.y,m.z),c.push(S+A,T)}if(v>0){const M=(v-1)*x;for(let S=0;S0&&b(!0),t>0&&b(!1)),this.setIndex(d),this.setAttribute("position",new ke(u,3)),this.setAttribute("normal",new ke(h,3)),this.setAttribute("uv",new ke(f,2));function v(){const y=new C,_=new C;let w=0;const T=(t-e)/n;for(let A=0;A<=s;A++){const M=[],S=A/s,E=S*(t-e)+e;for(let P=0;P<=i;P++){const N=P/i,L=N*l+o,F=Math.sin(L),B=Math.cos(L);_.x=E*F,_.y=-S*n+m,_.z=E*B,u.push(_.x,_.y,_.z),y.set(F,T,B).normalize(),h.push(y.x,y.y,y.z),f.push(N,1-S),M.push(g++)}x.push(M)}for(let A=0;A0||M!==0)&&(d.push(S,E,N),w+=3),(t>0||M!==s-1)&&(d.push(E,P,N),w+=3)}c.addGroup(p,w,0),p+=w}function b(y){const _=g,w=new K,T=new C;let A=0;const M=y===!0?e:t,S=y===!0?1:-1;for(let P=1;P<=i;P++)u.push(0,m*S,0),h.push(0,S,0),f.push(.5,.5),g++;const E=g;for(let P=0;P<=i;P++){const L=P/i*l+o,F=Math.cos(L),B=Math.sin(L);T.x=M*B,T.y=m*S,T.z=M*F,u.push(T.x,T.y,T.z),h.push(0,S,0),w.x=F*.5+.5,w.y=B*.5*S+.5,f.push(w.x,w.y),g++}for(let P=0;P.9&&T<.1&&(b<.2&&(a[v+0]+=1),y<.2&&(a[v+2]+=1),_<.2&&(a[v+4]+=1))}}function h(v){s.push(v.x,v.y,v.z)}function f(v,b){const y=v*3;b.x=e[y+0],b.y=e[y+1],b.z=e[y+2]}function g(){const v=new C,b=new C,y=new C,_=new C,w=new K,T=new K,A=new K;for(let M=0,S=0;M0)l=i-1;else{l=i;break}if(i=l,n[i]===a)return i/(s-1);const d=n[i],h=n[i+1]-d,f=(a-d)/h;return(i+f)/(s-1)}getTangent(e,t){let i=e-1e-4,s=e+1e-4;i<0&&(i=0),s>1&&(s=1);const a=this.getPoint(i),o=this.getPoint(s),l=t||(a.isVector2?new K:new C);return l.copy(o).sub(a).normalize(),l}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new C,i=[],s=[],a=[],o=new C,l=new De;for(let f=0;f<=e;f++){const g=f/e;i[f]=this.getTangentAt(g,new C)}s[0]=new C,a[0]=new C;let c=Number.MAX_VALUE;const d=Math.abs(i[0].x),u=Math.abs(i[0].y),h=Math.abs(i[0].z);d<=c&&(c=d,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),h<=c&&n.set(0,0,1),o.crossVectors(i[0],n).normalize(),s[0].crossVectors(i[0],o),a[0].crossVectors(i[0],s[0]);for(let f=1;f<=e;f++){if(s[f]=s[f-1].clone(),a[f]=a[f-1].clone(),o.crossVectors(i[f-1],i[f]),o.length()>Number.EPSILON){o.normalize();const g=Math.acos($e(i[f-1].dot(i[f]),-1,1));s[f].applyMatrix4(l.makeRotationAxis(o,g))}a[f].crossVectors(i[f],s[f])}if(t===!0){let f=Math.acos($e(s[0].dot(s[e]),-1,1));f/=e,i[0].dot(o.crossVectors(s[0],s[e]))>0&&(f=-f);for(let g=1;g<=e;g++)s[g].applyMatrix4(l.makeRotationAxis(i[g],f*g)),a[g].crossVectors(i[g],s[g])}return{tangents:i,normals:s,binormals:a}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Gh extends Yr{constructor(e=0,t=0,n=1,i=1,s=0,a=Math.PI*2,o=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=s,this.aEndAngle=a,this.aClockwise=o,this.aRotation=l}getPoint(e,t=new K){const n=t,i=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const a=Math.abs(s)i;)s-=i;s0?0:(Math.floor(Math.abs(o)/s)+1)*s:l===0&&o===s-1&&(o=s-2,l=1);let c,d;this.closed||o>0?c=i[(o-1)%s]:(md.subVectors(i[0],i[1]).add(i[0]),c=md);const u=i[o%s],h=i[(o+1)%s];if(this.closed||o+2i.length-2?i.length-1:a+1],u=i[a>i.length-3?i.length-1:a+2];return n.set(Km(o,l.x,c.x,d.x,u.x),Km(o,l.y,c.y,d.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){const a=i[s]-n,o=this.curves[s],l=o.getLength(),c=l===0?0:1-a/l;return o.getPointAt(c,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,i=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){const u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);const d=c.getPoint(1);return this.currentPoint.copy(d),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Bi extends oh{constructor(e){super(e),this.uuid=pr(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,i=this.holes.length;n80*t){o=r[0],l=r[1];let d=o,u=l;for(let h=t;hd&&(d=f),g>u&&(u=g)}c=Math.max(d-o,u-l),c=c!==0?32767/c:0}return ac(s,a,t,o,l,c,0),a}function Qv(r,e,t,n,i){let s;if(i===sT(r,e,t,n)>0)for(let a=e;a=e;a-=n)s=Jm(a/n|0,r[a],r[a+1],s);return s&&Oo(s,s.next)&&(lc(s),s=s.next),s}function ka(r,e){if(!r)return r;e||(e=r);let t=r,n;do if(n=!1,!t.steiner&&(Oo(t,t.next)||Vt(t.prev,t,t.next)===0)){if(lc(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function ac(r,e,t,n,i,s,a){if(!r)return;!a&&s&&Q3(r,n,i,s);let o=r;for(;r.prev!==r.next;){const l=r.prev,c=r.next;if(s?X3(r,n,i,s):W3(r)){e.push(l.i,r.i,c.i),lc(r),r=c.next,o=c.next;continue}if(r=c,r===o){a?a===1?(r=q3(ka(r),e),ac(r,e,t,n,i,s,2)):a===2&&Y3(r,e,t,n,i,s):ac(ka(r),e,t,n,i,s,1);break}}}function W3(r){const e=r.prev,t=r,n=r.next;if(Vt(e,t,n)>=0)return!1;const i=e.x,s=t.x,a=n.x,o=e.y,l=t.y,c=n.y,d=Math.min(i,s,a),u=Math.min(o,l,c),h=Math.max(i,s,a),f=Math.max(o,l,c);let g=n.next;for(;g!==e;){if(g.x>=d&&g.x<=h&&g.y>=u&&g.y<=f&&Tl(i,o,s,l,a,c,g.x,g.y)&&Vt(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function X3(r,e,t,n){const i=r.prev,s=r,a=r.next;if(Vt(i,s,a)>=0)return!1;const o=i.x,l=s.x,c=a.x,d=i.y,u=s.y,h=a.y,f=Math.min(o,l,c),g=Math.min(d,u,h),x=Math.max(o,l,c),m=Math.max(d,u,h),p=$0(f,g,e,t,n),v=$0(x,m,e,t,n);let b=r.prevZ,y=r.nextZ;for(;b&&b.z>=p&&y&&y.z<=v;){if(b.x>=f&&b.x<=x&&b.y>=g&&b.y<=m&&b!==i&&b!==a&&Tl(o,d,l,u,c,h,b.x,b.y)&&Vt(b.prev,b,b.next)>=0||(b=b.prevZ,y.x>=f&&y.x<=x&&y.y>=g&&y.y<=m&&y!==i&&y!==a&&Tl(o,d,l,u,c,h,y.x,y.y)&&Vt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;b&&b.z>=p;){if(b.x>=f&&b.x<=x&&b.y>=g&&b.y<=m&&b!==i&&b!==a&&Tl(o,d,l,u,c,h,b.x,b.y)&&Vt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=v;){if(y.x>=f&&y.x<=x&&y.y>=g&&y.y<=m&&y!==i&&y!==a&&Tl(o,d,l,u,c,h,y.x,y.y)&&Vt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function q3(r,e){let t=r;do{const n=t.prev,i=t.next.next;!Oo(n,i)&&t_(n,t,t.next,i)&&oc(n,i)&&oc(i,n)&&(e.push(n.i,t.i,i.i),lc(t),lc(t.next),t=r=i),t=t.next}while(t!==r);return ka(t)}function Y3(r,e,t,n,i,s){let a=r;do{let o=a.next.next;for(;o!==a.prev;){if(a.i!==o.i&&nT(a,o)){let l=n_(a,o);a=ka(a,a.next),l=ka(l,l.next),ac(a,e,t,n,i,s,0),ac(l,e,t,n,i,s,0);return}o=o.next}a=a.next}while(a!==r)}function Z3(r,e,t,n){const i=[];for(let s=0,a=e.length;s=t.next.y&&t.next.y!==t.y){const u=t.x+(i-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(u<=n&&u>s&&(s=u,a=t.x=t.x&&t.x>=l&&n!==t.x&&e_(ia.x||t.x===a.x&&J3(a,t)))&&(a=t,d=u)}t=t.next}while(t!==o);return a}function J3(r,e){return Vt(r.prev,r,e.prev)<0&&Vt(e.next,r,r.next)<0}function Q3(r,e,t,n){let i=r;do i.z===0&&(i.z=$0(i.x,i.y,e,t,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,eT(i)}function eT(r){let e,t=1;do{let n=r,i;r=null;let s=null;for(e=0;n;){e++;let a=n,o=0;for(let c=0;c0||l>0&&a;)o!==0&&(l===0||!a||n.z<=a.z)?(i=n,n=n.nextZ,o--):(i=a,a=a.nextZ,l--),s?s.nextZ=i:r=i,i.prevZ=s,s=i;n=a}s.nextZ=null,t*=2}while(e>1);return r}function $0(r,e,t,n,i){return r=(r-t)*i|0,e=(e-n)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function tT(r){let e=r,t=r;do(e.x=(r-a)*(s-o)&&(r-a)*(n-o)>=(t-a)*(e-o)&&(t-a)*(s-o)>=(i-a)*(n-o)}function Tl(r,e,t,n,i,s,a,o){return!(r===a&&e===o)&&e_(r,e,t,n,i,s,a,o)}function nT(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!rT(r,e)&&(oc(r,e)&&oc(e,r)&&iT(r,e)&&(Vt(r.prev,r,e.prev)||Vt(r,e.prev,e))||Oo(r,e)&&Vt(r.prev,r,r.next)>0&&Vt(e.prev,e,e.next)>0)}function Vt(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function Oo(r,e){return r.x===e.x&&r.y===e.y}function t_(r,e,t,n){const i=bd(Vt(r,e,t)),s=bd(Vt(r,e,n)),a=bd(Vt(t,n,r)),o=bd(Vt(t,n,e));return!!(i!==s&&a!==o||i===0&&xd(r,t,e)||s===0&&xd(r,n,e)||a===0&&xd(t,r,n)||o===0&&xd(t,e,n))}function xd(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function bd(r){return r>0?1:r<0?-1:0}function rT(r,e){let t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&t_(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function oc(r,e){return Vt(r.prev,r,r.next)<0?Vt(r,e,r.next)>=0&&Vt(r,r.prev,e)>=0:Vt(r,e,r.prev)<0||Vt(r,r.next,e)<0}function iT(r,e){let t=r,n=!1;const i=(r.x+e.x)/2,s=(r.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&i<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==r);return n}function n_(r,e){const t=K0(r.i,r.x,r.y),n=K0(e.i,e.x,e.y),i=r.next,s=e.prev;return r.next=e,e.prev=r,t.next=i,i.prev=t,n.next=t,t.prev=n,s.next=n,n.prev=s,n}function Jm(r,e,t,n){const i=K0(r,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function lc(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function K0(r,e,t){return{i:r,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function sT(r,e,t,n){let i=0;for(let s=e,a=t-n;s2&&r[e-1].equals(r[0])&&r.pop()}function ex(r,e){for(let t=0;tNumber.EPSILON){const ee=Math.sqrt(k),re=Math.sqrt(Ae*Ae+I*I),$=D.x-xe/ee,ze=D.y+Le/ee,be=ie.x-I/re,We=ie.y+Ae/re,Fe=((be-$)*I-(We-ze)*Ae)/(Le*I-xe*Ae);ce=$+Le*Fe-se.x,he=ze+xe*Fe-se.y;const ae=ce*ce+he*he;if(ae<=2)return new K(ce,he);oe=Math.sqrt(ae/2)}else{let ee=!1;Le>Number.EPSILON?Ae>Number.EPSILON&&(ee=!0):Le<-Number.EPSILON?Ae<-Number.EPSILON&&(ee=!0):Math.sign(xe)===Math.sign(I)&&(ee=!0),ee?(ce=-xe,he=Le,oe=Math.sqrt(k)):(ce=Le,he=xe,oe=Math.sqrt(k/2))}return new K(ce/oe,he/oe)}const Y=[];for(let se=0,D=F.length,ie=D-1,ce=se+1;se=0;se--){const D=se/m,ie=f*Math.cos(D*Math.PI/2),ce=g*Math.sin(D*Math.PI/2)+x;for(let he=0,oe=F.length;he=0;){const ce=ie;let he=ie-1;he<0&&(he=se.length-1);for(let oe=0,Le=d+m*2;oe0)&&f.push(b,y,w),(p!==n-1||l0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class o_ extends Rn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Se(16777215),this.specular=new Se(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Se(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new K(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new gr,this.combine=Mc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,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.flatShading=e.flatShading,this.fog=e.fog,this}}class l_ extends Rn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Se(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Se(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new K(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,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.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class c_ extends Rn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new K(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class d_ extends Rn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Se(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Se(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new K(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new gr,this.combine=Mc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,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.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,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.flatShading=e.flatShading,this.fog=e.fog,this}}class yg extends Rn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=vv,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 vg extends Rn{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}}class u_ extends Rn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Se(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new K(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this.fog=e.fog,this}}class h_ extends zn{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function da(r,e){return!r||r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)}function f_(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function p_(r){function e(i,s){return r[i]-r[s]}const t=r.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function J0(r,e,t){const n=r.length,i=new r.constructor(n);for(let s=0,a=0;a!==n;++s){const o=t[s]*e;for(let l=0;l!==e;++l)i[a++]=r[o+l]}return i}function _g(r,e,t,n){let i=1,s=r[0];for(;s!==void 0&&s[n]===void 0;)s=r[i++];if(s===void 0)return;let a=s[n];if(a!==void 0)if(Array.isArray(a))do a=s[n],a!==void 0&&(e.push(s.time),t.push(...a)),s=r[i++];while(s!==void 0);else if(a.toArray!==void 0)do a=s[n],a!==void 0&&(e.push(s.time),a.toArray(t,t.length)),s=r[i++];while(s!==void 0);else do a=s[n],a!==void 0&&(e.push(s.time),t.push(a)),s=r[i++];while(s!==void 0)}function dT(r,e,t,n,i=30){const s=r.clone();s.name=e;const a=[];for(let l=0;l=n)){u.push(c.times[f]);for(let x=0;xs.tracks[l].times[0]&&(o=s.tracks[l].times[0]);for(let l=0;l=o.times[g]){const p=g*u+d,v=p+u-d;x=o.values.slice(p,v)}else{const p=o.createInterpolant(),v=d,b=u-d;p.evaluate(s),x=p.resultBuffer.slice(v,b)}l==="quaternion"&&new Cn().fromArray(x).normalize().conjugate().toArray(x);const m=c.times.length;for(let p=0;p=s)){const o=t[1];e=s)break t}a=n,n=0;break n}break e}for(;n>>1;et;)--a;if(++a,s!==0||a!==i){s>=a&&(a=Math.max(a,1),s=a-1);const o=this.getValueSize();this.times=n.slice(s,a),this.values=this.values.slice(s*o,a*o)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(tt("KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,s=n.length;s===0&&(tt("KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let o=0;o!==s;o++){const l=n[o];if(typeof l=="number"&&isNaN(l)){tt("KeyframeTrack: Time is not a valid number.",this,o,l),e=!1;break}if(a!==null&&a>l){tt("KeyframeTrack: Out of order keys.",this,o,l,a),e=!1;break}a=l}if(i!==void 0&&f_(i))for(let o=0,l=i.length;o!==l;++o){const c=i[o];if(isNaN(c)){tt("KeyframeTrack: Value is not a valid number.",this,o,c),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===su,s=e.length-1;let a=1;for(let o=1;o0){e[a]=e[s];for(let o=s*n,l=a*n,c=0;c!==n;++c)t[l+c]=t[o+c];++a}return a!==e.length?(this.times=e.slice(0,a),this.values=t.slice(0,a*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}Ir.prototype.ValueTypeName="";Ir.prototype.TimeBufferType=Float32Array;Ir.prototype.ValueBufferType=Float32Array;Ir.prototype.DefaultInterpolation=rh;class La extends Ir{constructor(e,t,n){super(e,t,n)}}La.prototype.ValueTypeName="bool";La.prototype.ValueBufferType=Array;La.prototype.DefaultInterpolation=ec;La.prototype.InterpolantFactoryMethodLinear=void 0;La.prototype.InterpolantFactoryMethodSmooth=void 0;class Mg extends Ir{constructor(e,t,n,i){super(e,t,n,i)}}Mg.prototype.ValueTypeName="color";class cc extends Ir{constructor(e,t,n,i){super(e,t,n,i)}}cc.prototype.ValueTypeName="number";class x_ extends Cc{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const s=this.resultBuffer,a=this.sampleValues,o=this.valueSize,l=(n-t)/(i-t);let c=e*o;for(let d=c+o;c!==d;c+=4)Cn.slerpFlat(s,0,a,c-o,a,c,l);return s}}class Rc extends Ir{constructor(e,t,n,i){super(e,t,n,i)}InterpolantFactoryMethodLinear(e){return new x_(this.times,this.values,this.getValueSize(),e)}}Rc.prototype.ValueTypeName="quaternion";Rc.prototype.InterpolantFactoryMethodSmooth=void 0;class Na extends Ir{constructor(e,t,n){super(e,t,n)}}Na.prototype.ValueTypeName="string";Na.prototype.ValueBufferType=Array;Na.prototype.DefaultInterpolation=ec;Na.prototype.InterpolantFactoryMethodLinear=void 0;Na.prototype.InterpolantFactoryMethodSmooth=void 0;class dc extends Ir{constructor(e,t,n,i){super(e,t,n,i)}}dc.prototype.ValueTypeName="vector";class uc{constructor(e="",t=-1,n=[],i=Eh){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=pr(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let a=0,o=n.length;a!==o;++a)t.push(pT(n[a]).scale(i));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s.userData=JSON.parse(e.userData||"{}"),s}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let s=0,a=n.length;s!==a;++s)t.push(Ir.toJSON(n[s]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const s=t.length,a=[];for(let o=0;o1){const u=d[1];let h=i[u];h||(i[u]=h=[]),h.push(c)}}const a=[];for(const o in i)a.push(this.CreateFromMorphTargetSequence(o,i[o],t,n));return a}static parseAnimation(e,t){if(ye("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return tt("AnimationClip: No animation in JSONLoader data."),null;const n=function(u,h,f,g,x){if(f.length!==0){const m=[],p=[];_g(f,m,p,g),m.length!==0&&x.push(new u(h,m,p))}},i=[],s=e.name||"default",a=e.fps||30,o=e.blendMode;let l=e.length||-1;const c=e.hierarchy||[];for(let u=0;u{t&&t(s),this.manager.itemEnd(e)},0),s;if(bi[e]!==void 0){bi[e].push({onLoad:t,onProgress:n,onError:i});return}bi[e]=[],bi[e].push({onLoad:t,onProgress:n,onError:i});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),o=this.mimeType,l=this.responseType;fetch(a).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&ye("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const d=bi[e],u=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),f=h?parseInt(h):0,g=f!==0;let x=0;const m=new ReadableStream({start(p){v();function v(){u.read().then(({done:b,value:y})=>{if(b)p.close();else{x+=y.byteLength;const _=new ProgressEvent("progress",{lengthComputable:g,loaded:x,total:f});for(let w=0,T=d.length;w{p.error(b)})}}});return new Response(m)}else throw new gT(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>new DOMParser().parseFromString(d,o));case"json":return c.json();default:if(o==="")return c.text();{const u=/charset="?([^;"\s]*)"?/i.exec(o),h=u&&u[1]?u[1].toLowerCase():void 0,f=new TextDecoder(h);return c.arrayBuffer().then(g=>f.decode(g))}}}).then(c=>{ni.add(`file:${e}`,c);const d=bi[e];delete bi[e];for(let u=0,h=d.length;u{const d=bi[e];if(d===void 0)throw this.manager.itemError(e),c;delete bi[e];for(let u=0,h=d.length;u{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class mT extends ir{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new Xi(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(o){try{t(s.parse(JSON.parse(o)))}catch(l){i?i(l):tt(l),s.manager.itemError(e)}},n,i)}parse(e){const t=[];for(let n=0;n0:i.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const a=e.uniforms[s];switch(i.uniforms[s]={},a.type){case"t":i.uniforms[s].value=n(a.value);break;case"c":i.uniforms[s].value=new Se().setHex(a.value);break;case"v2":i.uniforms[s].value=new K().fromArray(a.value);break;case"v3":i.uniforms[s].value=new C().fromArray(a.value);break;case"v4":i.uniforms[s].value=new rt().fromArray(a.value);break;case"m3":i.uniforms[s].value=new at().fromArray(a.value);break;case"m4":i.uniforms[s].value=new De().fromArray(a.value);break;default:i.uniforms[s].value=a.value}}if(e.defines!==void 0&&(i.defines=e.defines),e.vertexShader!==void 0&&(i.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(i.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(i.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)i.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(i.lights=e.lights),e.clipping!==void 0&&(i.clipping=e.clipping),e.size!==void 0&&(i.size=e.size),e.sizeAttenuation!==void 0&&(i.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(i.map=n(e.map)),e.matcap!==void 0&&(i.matcap=n(e.matcap)),e.alphaMap!==void 0&&(i.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(i.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(i.bumpScale=e.bumpScale),e.normalMap!==void 0&&(i.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(i.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),i.normalScale=new K().fromArray(s)}return e.displacementMap!==void 0&&(i.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(i.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(i.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(i.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(i.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(i.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(i.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(i.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(i.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(i.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(i.envMap=n(e.envMap)),e.envMapRotation!==void 0&&i.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(i.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(i.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(i.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(i.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(i.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(i.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(i.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(i.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(i.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new K().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(i.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(i.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(i.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(i.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(i.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(i.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=n(e.sheenRoughnessMap)),i}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return $h.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:i_,SpriteMaterial:og,RawShaderMaterial:s_,ShaderMaterial:Rr,PointsMaterial:cg,MeshPhysicalMaterial:a_,MeshStandardMaterial:bg,MeshPhongMaterial:o_,MeshToonMaterial:l_,MeshNormalMaterial:c_,MeshLambertMaterial:d_,MeshDepthMaterial:yg,MeshDistanceMaterial:vg,MeshBasicMaterial:$i,MeshMatcapMaterial:u_,LineDashedMaterial:h_,LineBasicMaterial:zn,Material:Rn};return new t[e]}}class Q0{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class A_ extends ot{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class k_ extends ir{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new Xi(s.manager);a.setPath(s.path),a.setRequestHeader(s.requestHeader),a.setWithCredentials(s.withCredentials),a.load(e,function(o){try{t(s.parse(JSON.parse(o)))}catch(l){i?i(l):tt(l),s.manager.itemError(e)}},n,i)}parse(e){const t={},n={};function i(f,g){if(t[g]!==void 0)return t[g];const m=f.interleavedBuffers[g],p=s(f,m.buffer),v=vo(m.type,p),b=new Nh(v,m.stride);return b.uuid=m.uuid,t[g]=b,b}function s(f,g){if(n[g]!==void 0)return n[g];const m=f.arrayBuffers[g],p=new Uint32Array(m).buffer;return n[g]=p,p}const a=e.isInstancedBufferGeometry?new A_:new ot,o=e.data.index;if(o!==void 0){const f=vo(o.type,o.array);a.setIndex(new vt(f,1))}const l=e.data.attributes;for(const f in l){const g=l[f];let x;if(g.isInterleavedBufferAttribute){const m=i(e.data,g.data);x=new Ta(m,g.itemSize,g.offset,g.normalized)}else{const m=vo(g.type,g.array),p=g.isInstancedBufferAttribute?Fo:vt;x=new p(m,g.itemSize,g.normalized)}g.name!==void 0&&(x.name=g.name),g.usage!==void 0&&x.setUsage(g.usage),a.setAttribute(f,x)}const c=e.data.morphAttributes;if(c)for(const f in c){const g=c[f],x=[];for(let m=0,p=g.length;m0){const l=new Sg(t);s=new hc(l),s.setCrossOrigin(this.crossOrigin);for(let c=0,d=e.length;c0){i=new hc(this.manager),i.setCrossOrigin(this.crossOrigin);for(let a=0,o=e.length;a{let m=null,p=null;return x.boundingBox!==void 0&&(m=new wt().fromJSON(x.boundingBox)),x.boundingSphere!==void 0&&(p=new nn().fromJSON(x.boundingSphere)),{...x,boundingBox:m,boundingSphere:p}}),a._instanceInfo=e.instanceInfo,a._availableInstanceIds=e._availableInstanceIds,a._availableGeometryIds=e._availableGeometryIds,a._nextIndexStart=e.nextIndexStart,a._nextVertexStart=e.nextVertexStart,a._geometryCount=e.geometryCount,a._maxInstanceCount=e.maxInstanceCount,a._maxVertexCount=e.maxVertexCount,a._maxIndexCount=e.maxIndexCount,a._geometryInitialized=e.geometryInitialized,a._matricesTexture=c(e.matricesTexture.uuid),a._indirectTexture=c(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(a._colorsTexture=c(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(a.boundingSphere=new nn().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(a.boundingBox=new wt().fromJSON(e.boundingBox));break;case"LOD":a=new zv;break;case"Line":a=new Ts(o(e.geometry),l(e.material));break;case"LineLoop":a=new Wv(o(e.geometry),l(e.material));break;case"LineSegments":a=new hi(o(e.geometry),l(e.material));break;case"PointCloud":case"Points":a=new Xv(o(e.geometry),l(e.material));break;case"Sprite":a=new Bv(l(e.material));break;case"Group":a=new _o;break;case"Bone":a=new lg;break;default:a=new gt}if(a.uuid=e.uuid,e.name!==void 0&&(a.name=e.name),e.matrix!==void 0?(a.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(e.position!==void 0&&a.position.fromArray(e.position),e.rotation!==void 0&&a.rotation.fromArray(e.rotation),e.quaternion!==void 0&&a.quaternion.fromArray(e.quaternion),e.scale!==void 0&&a.scale.fromArray(e.scale)),e.up!==void 0&&a.up.fromArray(e.up),e.castShadow!==void 0&&(a.castShadow=e.castShadow),e.receiveShadow!==void 0&&(a.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(a.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(a.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(a.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(a.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(a.visible=e.visible),e.frustumCulled!==void 0&&(a.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(a.renderOrder=e.renderOrder),e.userData!==void 0&&(a.userData=e.userData),e.layers!==void 0&&(a.layers.mask=e.layers),e.children!==void 0){const h=e.children;for(let f=0;f"u"&&ye("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&ye("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,a=ni.get(`image-bitmap:${e}`);if(a!==void 0){if(s.manager.itemStart(e),a.then){a.then(c=>{if(qf.has(a)===!0)i&&i(qf.get(a)),s.manager.itemError(e),s.manager.itemEnd(e);else return t&&t(c),s.manager.itemEnd(e),c});return}return setTimeout(function(){t&&t(a),s.manager.itemEnd(e)},0),a}const o={};o.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",o.headers=this.requestHeader,o.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const l=fetch(e,o).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(c){return ni.add(`image-bitmap:${e}`,c),t&&t(c),s.manager.itemEnd(e),c}).catch(function(c){i&&i(c),qf.set(l,c),ni.remove(`image-bitmap:${e}`),s.manager.itemError(e),s.manager.itemEnd(e)});ni.add(`image-bitmap:${e}`,l),s.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let yd;class Ag{static getContext(){return yd===void 0&&(yd=new(window.AudioContext||window.webkitAudioContext)),yd}static setContext(e){yd=e}}class kT extends ir{constructor(e){super(e)}load(e,t,n,i){const s=this,a=new Xi(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,function(l){try{const c=l.slice(0);Ag.getContext().decodeAudioData(c,function(u){t(u)}).catch(o)}catch(c){o(c)}},n,i);function o(l){i?i(l):tt(l),s.manager.itemError(e)}}}const lx=new De,cx=new De,zs=new De;class ET{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new hn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new hn,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,zs.copy(e.projectionMatrix);const i=t.eyeSep/2,s=i*t.near/t.focus,a=t.near*Math.tan(ga*t.fov*.5)/t.zoom;let o,l;cx.elements[12]=-i,lx.elements[12]=i,o=-a*t.aspect+s,l=a*t.aspect+s,zs.elements[0]=2*t.near/(l-o),zs.elements[8]=(l+o)/(l-o),this.cameraL.projectionMatrix.copy(zs),o=-a*t.aspect-s,l=a*t.aspect-s,zs.elements[0]=2*t.near/(l-o),zs.elements[8]=(l+o)/(l-o),this.cameraR.projectionMatrix.copy(zs)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(cx),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(lx)}}class E_ extends hn{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class C_{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}const Vs=new C,Yf=new Cn,CT=new C,Gs=new C,Hs=new C;class RT extends gt{constructor(){super(),this.type="AudioListener",this.context=Ag.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new C_}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Vs,Yf,CT),Gs.set(0,0,-1).applyQuaternion(Yf),Hs.set(0,1,0).applyQuaternion(Yf),t.positionX){const n=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Vs.x,n),t.positionY.linearRampToValueAtTime(Vs.y,n),t.positionZ.linearRampToValueAtTime(Vs.z,n),t.forwardX.linearRampToValueAtTime(Gs.x,n),t.forwardY.linearRampToValueAtTime(Gs.y,n),t.forwardZ.linearRampToValueAtTime(Gs.z,n),t.upX.linearRampToValueAtTime(Hs.x,n),t.upY.linearRampToValueAtTime(Hs.y,n),t.upZ.linearRampToValueAtTime(Hs.z,n)}else t.setPosition(Vs.x,Vs.y,Vs.z),t.setOrientation(Gs.x,Gs.y,Gs.z,Hs.x,Hs.y,Hs.z)}}class R_ extends gt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){ye("Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){ye("Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){ye("Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){ye("Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,i,this._addIndex*t,1,t);for(let l=t,c=t+t;l!==c;++l)if(n[l]!==n[l+t]){o.setValue(n,i);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,i=n*this._origIndex;e.getValue(t,i);for(let s=n,a=i;s!==a;++s)t[s]=t[i+s%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let a=0;a!==s;++a)e[t+a]=e[n+a]}_slerp(e,t,n,i){Cn.slerpFlat(e,t,e,t,e,n,i)}_slerpAdditive(e,t,n,i,s){const a=this._workIndex*s;Cn.multiplyQuaternionsFlat(e,a,e,t,e,n),Cn.slerpFlat(e,t,e,t,e,a,i)}_lerp(e,t,n,i,s){const a=1-i;for(let o=0;o!==s;++o){const l=t+o;e[l]=e[l]*a+e[n+o]*i}}_lerpAdditive(e,t,n,i,s){for(let a=0;a!==s;++a){const o=t+a;e[o]=e[o]+e[n+a]*i}}}const kg="\\[\\]\\.:\\/",LT=new RegExp("["+kg+"]","g"),Eg="[^"+kg+"]",NT="[^"+kg.replace("\\.","")+"]",UT=/((?:WC+[\/:])*)/.source.replace("WC",Eg),FT=/(WCOD+)?/.source.replace("WCOD",NT),OT=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Eg),BT=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Eg),zT=new RegExp("^"+UT+FT+OT+BT+"$"),VT=["material","materials","bones","map"];class GT{constructor(e,t,n){const i=n||mt.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,s=n.length;i!==s;++i)n[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class mt{constructor(e,t,n){this.path=t,this.parsedPath=n||mt.parseTrackName(t),this.node=mt.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new mt.Composite(e,t,n):new mt(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(LT,"")}static parseTrackName(e){const t=zT.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const s=n.nodeName.substring(i+1);VT.indexOf(s)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=s)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(s){for(let a=0;a=s){const u=s++,h=e[u];t[h.uuid]=d,e[d]=h,t[c]=u,e[u]=l;for(let f=0,g=i;f!==g;++f){const x=n[f],m=x[u],p=x[d];x[d]=m,x[u]=p}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,i=n.length;let s=this.nCachedObjects_,a=e.length;for(let o=0,l=arguments.length;o!==l;++o){const c=arguments[o],d=c.uuid,u=t[d];if(u!==void 0)if(delete t[d],u0&&(t[f.uuid]=u),e[u]=f,e.pop();for(let g=0,x=i;g!==x;++g){const m=n[g];m[u]=m[h],m.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const n=this._bindingsIndicesByPath;let i=n[e];const s=this._bindings;if(i!==void 0)return s[i];const a=this._paths,o=this._parsedPaths,l=this._objects,c=l.length,d=this.nCachedObjects_,u=new Array(c);i=s.length,n[e]=i,a.push(e),o.push(t),s.push(u);for(let h=d,f=l.length;h!==f;++h){const g=l[h];u[h]=new mt(g,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){const i=this._paths,s=this._parsedPaths,a=this._bindings,o=a.length-1,l=a[o],c=e[o];t[c]=n,a[n]=l,a.pop(),s[n]=s[o],s.pop(),i[n]=i[o],i.pop()}}}class I_{constructor(e,t,n=null,i=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=i;const s=t.tracks,a=s.length,o=new Array(a),l={endingStart:la,endingEnd:la};for(let c=0;c!==a;++c){const d=s[c].createInterpolant(null);o[c]=d,d.settings=l}this._interpolantSettings=l,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=bv,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){const i=this._clip.duration,s=e._clip.duration,a=s/i,o=i/s;e.warp(1,a,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const i=this._mixer,s=i.time,a=this.timeScale;let o=this._timeScaleInterpolant;o===null&&(o=i._lendControlInterpolant(),this._timeScaleInterpolant=o);const l=o.parameterPositions,c=o.sampleValues;return l[0]=s,l[1]=s+n,c[0]=e/a,c[1]=t/a,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,i){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*n;l<0||n===0?t=0:(this._startTime=null,t=n*l)}t*=this._updateTimeScale(e);const a=this._updateTime(t),o=this._updateWeight(e);if(o>0){const l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case Qp:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(a),c[d].accumulateAdditive(o);break;case Eh:default:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(a),c[d].accumulate(i,o)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(n!==null){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(n!==null){const i=n.evaluate(e)[0];t*=i,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let i=this.time+e,s=this._loopCount;const a=n===yv;if(e===0)return s===-1?i:a&&(s&1)===1?t-i:i;if(n===xv){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(i>=t)i=t;else if(i<0)i=0;else{this.time=i;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),i>=t||i<0){const o=Math.floor(i/t);i-=t*o,s+=Math.abs(o);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=e>0?t:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const c=e<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=s,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}else this.time=i;if(a&&(s&1)===1)return t-i}return i}_setEndings(e,t,n){const i=this._interpolantSettings;n?(i.endingStart=ca,i.endingEnd=ca):(e?i.endingStart=this.zeroSlopeAtStart?ca:la:i.endingStart=tc,t?i.endingEnd=this.zeroSlopeAtEnd?ca:la:i.endingEnd=tc)}_scheduleFading(e,t,n){const i=this._mixer,s=i.time;let a=this._weightInterpolant;a===null&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,l=a.sampleValues;return o[0]=s,l[0]=t,o[1]=s+e,l[1]=n,this}}const WT=new Float32Array(1);class XT extends ui{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,i=e._clip.tracks,s=i.length,a=e._propertyBindings,o=e._interpolants,l=n.uuid,c=this._bindingsByRootAndName;let d=c[l];d===void 0&&(d={},c[l]=d);for(let u=0;u!==s;++u){const h=i[u],f=h.name;let g=d[f];if(g!==void 0)++g.referenceCount,a[u]=g;else{if(g=a[u],g!==void 0){g._cacheIndex===null&&(++g.referenceCount,this._addInactiveBinding(g,l,f));continue}const x=t&&t._propertyBindings[u].binding.parsedPath;g=new P_(mt.create(n,f,x),h.ValueTypeName,h.getValueSize()),++g.referenceCount,this._addInactiveBinding(g,l,f),a[u]=g}o[u].resultBuffer=g.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,i=e._clip.uuid,s=this._actionsByClip[i];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,i,n)}const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const s=t[n];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let n=0,i=t.length;n!==i;++n){const s=t[n];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,i=this.time+=e,s=Math.sign(e),a=this._accuIndex^=1;for(let c=0;c!==n;++c)t[c]._update(i,e,s,a);const o=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)o[c].apply(a);return this}setTime(e){this.time=0;for(let t=0;t=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}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}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))}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}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,fx).distanceTo(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}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)}}const px=new C,vd=new C,io=new C,so=new C,Zf=new C,n2=new C,r2=new C;class nr{constructor(e=new C,t=new C){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){px.subVectors(e,this.start),vd.subVectors(this.end,this.start);const n=vd.dot(vd);let s=vd.dot(px)/n;return t&&(s=$e(s,0,1)),s}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}distanceSqToLine3(e,t=n2,n=r2){const i=10000000000000001e-32;let s,a;const o=this.start,l=e.start,c=this.end,d=e.end;io.subVectors(c,o),so.subVectors(d,l),Zf.subVectors(o,l);const u=io.dot(io),h=so.dot(so),f=so.dot(Zf);if(u<=i&&h<=i)return t.copy(o),n.copy(l),t.sub(n),t.dot(t);if(u<=i)s=0,a=f/h,a=$e(a,0,1);else{const g=io.dot(Zf);if(h<=i)a=0,s=$e(-g/u,0,1);else{const x=io.dot(so),m=u*h-x*x;m!==0?s=$e((x*f-g*h)/m,0,1):s=0,a=(x*s+f)/h,a<0?(a=0,s=$e(-g/u,0,1)):a>1&&(a=1,s=$e((x-g)/u,0,1))}}return t.copy(o).add(io.multiplyScalar(s)),n.copy(l).add(so.multiplyScalar(a)),t.sub(n),t.dot(t)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const gx=new C;class i2 extends gt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new ot,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let a=0,o=1,l=32;a1)for(let u=0;u.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{vx.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(vx,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class x2 extends hi{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new ot;i.setAttribute("position",new ke(t,3)),i.setAttribute("color",new ke(n,3));const s=new zn({vertexColors:!0,toneMapped:!1});super(i,s),this.type="AxesHelper"}setColors(e,t,n){const i=new Se,s=this.geometry.attributes.color.array;return i.set(e),i.toArray(s,0),i.toArray(s,3),i.set(t),i.toArray(s,6),i.toArray(s,9),i.set(n),i.toArray(s,12),i.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class b2{constructor(){this.type="ShapePath",this.color=new Se,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new oh,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,i){return this.currentPath.quadraticCurveTo(e,t,n,i),this}bezierCurveTo(e,t,n,i,s,a){return this.currentPath.bezierCurveTo(e,t,n,i,s,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(p){const v=[];for(let b=0,y=p.length;bNumber.EPSILON){if(S<0&&(T=v[w],M=-M,A=v[_],S=-S),p.yA.y)continue;if(p.y===T.y){if(p.x===T.x)return!0}else{const E=S*(p.x-T.x)-M*(p.y-T.y);if(E===0)return!0;if(E<0)continue;y=!y}}else{if(p.y!==T.y)continue;if(A.x<=p.x&&p.x<=T.x||T.x<=p.x&&p.x<=A.x)return!0}}return y}const i=Vr.isClockWise,s=this.subPaths;if(s.length===0)return[];let a,o,l;const c=[];if(s.length===1)return o=s[0],l=new Bi,l.curves=o.curves,c.push(l),c;let d=!i(s[0].getPoints());d=e?!d:d;const u=[],h=[];let f=[],g=0,x;h[g]=void 0,f[g]=[];for(let p=0,v=s.length;p1){let p=!1,v=0;for(let b=0,y=h.length;b0&&p===!1&&(f=u)}let m;for(let p=0,v=h.length;pe?(r.repeat.x=1,r.repeat.y=t/e,r.offset.x=0,r.offset.y=(1-r.repeat.y)/2):(r.repeat.x=e/t,r.repeat.y=1,r.offset.x=(1-r.repeat.x)/2,r.offset.y=0),r}function v2(r,e){const t=r.image&&r.image.width?r.image.width/r.image.height:1;return t>e?(r.repeat.x=e/t,r.repeat.y=1,r.offset.x=(1-r.repeat.x)/2,r.offset.y=0):(r.repeat.x=1,r.repeat.y=t/e,r.offset.x=0,r.offset.y=(1-r.repeat.y)/2),r}function _2(r){return r.repeat.x=1,r.repeat.y=1,r.offset.x=0,r.offset.y=0,r}function np(r,e,t,n){const i=w2(n);switch(t){case Kp:return r*e;case Sh:return r*e/i.components*i.byteLength;case Sc:return r*e/i.components*i.byteLength;case Th:return r*e*2/i.components*i.byteLength;case Ah:return r*e*2/i.components*i.byteLength;case Jp:return r*e*3/i.components*i.byteLength;case Fn:return r*e*4/i.components*i.byteLength;case kh:return r*e*4/i.components*i.byteLength;case Nl:case Ul:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*8;case Fl:case Ol:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*16;case Ru:case Iu:return Math.max(r,16)*Math.max(e,8)/4;case Cu:case Pu:return Math.max(r,8)*Math.max(e,8)/2;case Du:case Lu:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*8;case Nu:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*16;case Uu:return Math.floor((r+3)/4)*Math.floor((e+3)/4)*16;case Fu:return Math.floor((r+4)/5)*Math.floor((e+3)/4)*16;case Ou:return Math.floor((r+4)/5)*Math.floor((e+4)/5)*16;case Bu:return Math.floor((r+5)/6)*Math.floor((e+4)/5)*16;case zu:return Math.floor((r+5)/6)*Math.floor((e+5)/6)*16;case Vu:return Math.floor((r+7)/8)*Math.floor((e+4)/5)*16;case Gu:return Math.floor((r+7)/8)*Math.floor((e+5)/6)*16;case Hu:return Math.floor((r+7)/8)*Math.floor((e+7)/8)*16;case Wu:return Math.floor((r+9)/10)*Math.floor((e+4)/5)*16;case Xu:return Math.floor((r+9)/10)*Math.floor((e+5)/6)*16;case qu:return Math.floor((r+9)/10)*Math.floor((e+7)/8)*16;case Yu:return Math.floor((r+9)/10)*Math.floor((e+9)/10)*16;case Zu:return Math.floor((r+11)/12)*Math.floor((e+9)/10)*16;case ju:return Math.floor((r+11)/12)*Math.floor((e+11)/12)*16;case $u:case Ku:case Ju:return Math.ceil(r/4)*Math.ceil(e/4)*16;case Qu:case eh:return Math.ceil(r/4)*Math.ceil(e/4)*8;case th:case nh:return Math.ceil(r/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function w2(r){switch(r){case Xr:case Yp:return{byteLength:1,components:1};case Co:case Zp:case Da:return{byteLength:2,components:1};case wh:case Mh:return{byteLength:2,components:4};case Hi:case _h:case er:return{byteLength:4,components:1};case jp:case $p:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${r}.`)}class M2{static contain(e,t){return y2(e,t)}static cover(e,t){return v2(e,t)}static fill(e){return _2(e)}static getByteLength(e,t,n,i){return np(e,t,n,i)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Vo}}));typeof window<"u"&&(window.__THREE__?ye("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Vo);function N_(){let r=null,e=!1,t=null,n=null;function i(s,a){t(s,a),n=r.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(n=r.requestAnimationFrame(i),e=!0)},stop:function(){r.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){r=s}}}function S2(r){const e=new WeakMap;function t(o,l){const c=o.array,d=o.usage,u=c.byteLength,h=r.createBuffer();r.bindBuffer(l,h),r.bufferData(l,c,d),o.onUploadCallback();let f;if(c instanceof Float32Array)f=r.FLOAT;else if(typeof Float16Array<"u"&&c instanceof Float16Array)f=r.HALF_FLOAT;else if(c instanceof Uint16Array)o.isFloat16BufferAttribute?f=r.HALF_FLOAT:f=r.UNSIGNED_SHORT;else if(c instanceof Int16Array)f=r.SHORT;else if(c instanceof Uint32Array)f=r.UNSIGNED_INT;else if(c instanceof Int32Array)f=r.INT;else if(c instanceof Int8Array)f=r.BYTE;else if(c instanceof Uint8Array)f=r.UNSIGNED_BYTE;else if(c instanceof Uint8ClampedArray)f=r.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+c);return{buffer:h,type:f,bytesPerElement:c.BYTES_PER_ELEMENT,version:o.version,size:u}}function n(o,l,c){const d=l.array,u=l.updateRanges;if(r.bindBuffer(c,o),u.length===0)r.bufferSubData(c,0,d);else{u.sort((f,g)=>f.start-g.start);let h=0;for(let f=1;f 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`,V2=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,G2=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif`,H2=`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif`,W2=`#if defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#elif defined( USE_COLOR ) - diffuseColor.rgb *= vColor; -#endif`,X2=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) - varying vec3 vColor; -#endif`,q2=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) - varying vec3 vColor; -#endif`,Y2=`#if defined( USE_COLOR_ALPHA ) - vColor = vec4( 1.0 ); -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) - vColor = vec3( 1.0 ); -#endif -#ifdef USE_COLOR - vColor *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.xyz *= instanceColor.xyz; -#endif -#ifdef USE_BATCHING_COLOR - vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); - vColor.xyz *= batchingColor.xyz; -#endif`,Z2=`#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`,j2=`#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`,$2=`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`,K2=`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif`,J2=`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,Q2=`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); - #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE - emissiveColor = sRGBTransferEOTF( emissiveColor ); - #endif - totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,eA=`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif`,tA="gl_FragColor = linearToOutputTexel( gl_FragColor );",nA=`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 ); -}`,rA=`#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 ) ); - #else - vec4 envColor = vec4( 0.0 ); - #endif - #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`,iA=`#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`,sA=`#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`,aA=`#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`,oA=`#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`,lA=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif`,cA=`#ifdef USE_FOG - varying float vFogDepth; -#endif`,dA=`#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`,uA=`#ifdef USE_FOG - uniform vec3 fogColor; - varying float vFogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif`,hA=`#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 -}`,fA=`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif`,pA=`LambertMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,gA=`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`,mA=`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`,xA=`#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`,bA=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,yA=`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`,vA=`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;`,_A=`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`,wA=`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb * ( 1.0 - 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 = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = mix( vec3( 0.04 ), 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.07, 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`,MA=`uniform sampler2D dfgLUT; -struct PhysicalMaterial { - vec3 diffuseColor; - float roughness; - vec3 specularColor; - 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; - #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 saturate(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.specularColor; - 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 a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; - float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; - float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); - return saturate( DG * RECIPROCAL_PI ); -} -vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - vec2 uv = vec2( roughness, dotNV ); - return texture2D( dfgLUT, uv ).rg; -} -vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { - vec2 fab = DFGApprox( normal, viewDir, roughness ); - 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 - vec2 fab = DFGApprox( normal, viewDir, roughness ); - #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 = DFGApprox( vec3(0.0, 0.0, 1.0), vec3(sqrt(1.0 - dotNV * dotNV), 0.0, dotNV), material.roughness ); - vec2 dfgL = DFGApprox( vec3(0.0, 0.0, 1.0), vec3(sqrt(1.0 - dotNL * dotNL), 0.0, dotNL), material.roughness ); - vec3 FssEss_V = material.specularColor * dfgV.x + material.specularF90 * dfgV.y; - vec3 FssEss_L = material.specularColor * 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.specularColor + ( 1.0 - material.specularColor ) * 0.047619; - vec3 Fms = FssEss_V * FssEss_L * Favg / ( 1.0 - Ems_V * Ems_L * Favg * 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.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - } -#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 ); - #endif - reflectedLight.directSpecular += irradiance * BRDF_GGX_Multiscatter( directLight.direction, geometryViewDir, geometryNormal, material ); - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -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 ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -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 ); - #endif - vec3 singleScattering = vec3( 0.0 ); - vec3 multiScattering = vec3( 0.0 ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - #ifdef USE_IRIDESCENCE - computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); - #else - computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); - #endif - vec3 totalScattering = singleScattering + multiScattering; - vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); - reflectedLight.indirectSpecular += radiance * singleScattering; - reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; - reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; -} -#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 ); -}`,SA=` -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.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); - 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 ) - 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`,TA=`#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( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) - iblIrradiance += getIBLIrradiance( geometryNormal ); - #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`,AA=`#if defined( RE_IndirectDiffuse ) - 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`,kA=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) - gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,EA=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif`,CA=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER - varying float vFragDepth; - varying float vIsPerspective; -#endif`,RA=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,PA=`#ifdef USE_MAP - vec4 sampledDiffuseColor = texture2D( map, vMapUv ); - #ifdef DECODE_VIDEO_TEXTURE - sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); - #endif - diffuseColor *= sampledDiffuseColor; -#endif`,IA=`#ifdef USE_MAP - uniform sampler2D map; -#endif`,DA=`#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`,LA=`#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`,NA=`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); - metalnessFactor *= texelMetalness.b; -#endif`,UA=`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif`,FA=`#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`,OA=`#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`,BA=`#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`,zA=`#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`,VA=`#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`,GA=`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;`,HA=`#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`,WA=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,XA=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,qA=`#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif`,YA=`#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`,ZA=`#ifdef USE_CLEARCOAT - vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,jA=`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,$A=`#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`,KA=`#ifdef USE_IRIDESCENCEMAP - uniform sampler2D iridescenceMap; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform sampler2D iridescenceThicknessMap; -#endif`,JA=`#ifdef OPAQUE -diffuseColor.a = 1.0; -#endif -#ifdef USE_TRANSMISSION -diffuseColor.a *= material.transmissionAlpha; -#endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,QA=`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 ) { - return depth * ( near - far ) - near; -} -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 ) { - return ( near * far ) / ( ( far - near ) * depth - far ); -}`,ek=`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif`,tk=`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;`,nk=`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,rk=`#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`,ik=`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); - roughnessFactor *= texelRoughness.g; -#endif`,sk=`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif`,ak=`#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 - uniform sampler2D directionalShadowMap[ 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 - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - 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 sampler2D pointShadowMap[ 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 - float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { - float depth = unpackRGBAToDepth( texture2D( depths, uv ) ); - #ifdef USE_REVERSED_DEPTH_BUFFER - return step( depth, compare ); - #else - return step( compare, depth ); - #endif - } - vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { - return unpackRGBATo2Half( texture2D( shadow, uv ) ); - } - float VSMShadow( sampler2D shadow, vec2 uv, float compare ) { - float occlusion = 1.0; - vec2 distribution = texture2DDistribution( shadow, uv ); - #ifdef USE_REVERSED_DEPTH_BUFFER - float hard_shadow = step( distribution.x, compare ); - #else - float hard_shadow = step( compare, distribution.x ); - #endif - if ( hard_shadow != 1.0 ) { - float distance = compare - distribution.x; - float variance = max( 0.00000, distribution.y * distribution.y ); - float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); - } - return occlusion; - } - float getShadow( sampler2D 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 ) { - #if defined( SHADOWMAP_TYPE_PCF ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx0 = - texelSize.x * shadowRadius; - float dy0 = - texelSize.y * shadowRadius; - float dx1 = + texelSize.x * shadowRadius; - float dy1 = + texelSize.y * shadowRadius; - float dx2 = dx0 / 2.0; - float dy2 = dy0 / 2.0; - float dx3 = dx1 / 2.0; - float dy3 = dy1 / 2.0; - shadow = ( - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) - ) * ( 1.0 / 17.0 ); - #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx = texelSize.x; - float dy = texelSize.y; - vec2 uv = shadowCoord.xy; - vec2 f = fract( uv * shadowMapSize + 0.5 ); - uv -= f * texelSize; - shadow = ( - texture2DCompare( shadowMap, uv, shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), - f.x ), - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), - f.x ), - f.y ) - ) * ( 1.0 / 9.0 ); - #elif defined( SHADOWMAP_TYPE_VSM ) - shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); - #else - shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); - #endif - } - return mix( 1.0, shadow, shadowIntensity ); - } - vec2 cubeToUV( vec3 v, float texelSizeY ) { - vec3 absV = abs( v ); - float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); - absV *= scaleToCube; - v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); - vec2 planar = v.xy; - float almostATexel = 1.5 * texelSizeY; - float almostOne = 1.0 - almostATexel; - if ( absV.z >= almostOne ) { - if ( v.z > 0.0 ) - planar.x = 4.0 - v.x; - } else if ( absV.x >= almostOne ) { - float signX = sign( v.x ); - planar.x = v.z * signX + 2.0 * signX; - } else if ( absV.y >= almostOne ) { - float signY = sign( v.y ); - planar.x = v.x + 2.0 * signY + 2.0; - planar.y = v.z * signY - 2.0; - } - return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); - } - float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - float shadow = 1.0; - vec3 lightToPosition = shadowCoord.xyz; - - float lightToPositionLength = length( lightToPosition ); - if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { - float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); - #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) - vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; - shadow = ( - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) - ) * ( 1.0 / 9.0 ); - #else - shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); - #endif - } - return mix( 1.0, shadow, shadowIntensity ); - } -#endif`,ok=`#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`,lk=`#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`,ck=`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 - 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; -}`,dk=`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,uk=`#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`,hk=`#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`,fk=`#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`,pk=`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif`,gk=`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif`,mk=`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,xk=`#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; }`,bk=`#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.diffuseColor, material.specularColor, 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`,yk=`#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`,vk=`#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`,_k=`#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`,wk=`#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`,Mk=`#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 Sk=`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,Tk=`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 -}`,Ak=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,kk=`#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 -}`,Ek=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,Ck=`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 -}`,Rk=`#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; -}`,Pk=`#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 -}`,Ik=`#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; -}`,Dk=`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#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 = packDepthToRGBA( dist ); -}`,Lk=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}`,Nk=`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - gl_FragColor = texture2D( tEquirect, sampleUV ); - #include - #include -}`,Uk=`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 -}`,Fk=`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 -}`,Ok=`#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 -}`,Bk=`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 -}`,zk=`#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 -}`,Vk=`#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 -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 -}`,Gk=`#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; -}`,Hk=`#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 -}`,Wk=`#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 -}`,Xk=`#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 -#include -void main() { - vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); - #include - #include - #include - #include - gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); - #ifdef OPAQUE - gl_FragColor.a = 1.0; - #endif -}`,qk=`#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 -}`,Yk=`#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 -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 -}`,Zk=`#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 -}`,jk=`#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 -#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 - float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); - outgoingLight = outgoingLight * sheenEnergyComp + 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 -}`,$k=`#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 -}`,Kk=`#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 -#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 -}`,Jk=`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 -}`,Qk=`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 -}`,eE=`#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,tE=`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include -}`,nE=`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 -}`,rE=`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 -}`,Ye={alphahash_fragment:T2,alphahash_pars_fragment:A2,alphamap_fragment:k2,alphamap_pars_fragment:E2,alphatest_fragment:C2,alphatest_pars_fragment:R2,aomap_fragment:P2,aomap_pars_fragment:I2,batching_pars_vertex:D2,batching_vertex:L2,begin_vertex:N2,beginnormal_vertex:U2,bsdfs:F2,iridescence_fragment:O2,bumpmap_pars_fragment:B2,clipping_planes_fragment:z2,clipping_planes_pars_fragment:V2,clipping_planes_pars_vertex:G2,clipping_planes_vertex:H2,color_fragment:W2,color_pars_fragment:X2,color_pars_vertex:q2,color_vertex:Y2,common:Z2,cube_uv_reflection_fragment:j2,defaultnormal_vertex:$2,displacementmap_pars_vertex:K2,displacementmap_vertex:J2,emissivemap_fragment:Q2,emissivemap_pars_fragment:eA,colorspace_fragment:tA,colorspace_pars_fragment:nA,envmap_fragment:rA,envmap_common_pars_fragment:iA,envmap_pars_fragment:sA,envmap_pars_vertex:aA,envmap_physical_pars_fragment:xA,envmap_vertex:oA,fog_vertex:lA,fog_pars_vertex:cA,fog_fragment:dA,fog_pars_fragment:uA,gradientmap_pars_fragment:hA,lightmap_pars_fragment:fA,lights_lambert_fragment:pA,lights_lambert_pars_fragment:gA,lights_pars_begin:mA,lights_toon_fragment:bA,lights_toon_pars_fragment:yA,lights_phong_fragment:vA,lights_phong_pars_fragment:_A,lights_physical_fragment:wA,lights_physical_pars_fragment:MA,lights_fragment_begin:SA,lights_fragment_maps:TA,lights_fragment_end:AA,logdepthbuf_fragment:kA,logdepthbuf_pars_fragment:EA,logdepthbuf_pars_vertex:CA,logdepthbuf_vertex:RA,map_fragment:PA,map_pars_fragment:IA,map_particle_fragment:DA,map_particle_pars_fragment:LA,metalnessmap_fragment:NA,metalnessmap_pars_fragment:UA,morphinstance_vertex:FA,morphcolor_vertex:OA,morphnormal_vertex:BA,morphtarget_pars_vertex:zA,morphtarget_vertex:VA,normal_fragment_begin:GA,normal_fragment_maps:HA,normal_pars_fragment:WA,normal_pars_vertex:XA,normal_vertex:qA,normalmap_pars_fragment:YA,clearcoat_normal_fragment_begin:ZA,clearcoat_normal_fragment_maps:jA,clearcoat_pars_fragment:$A,iridescence_pars_fragment:KA,opaque_fragment:JA,packing:QA,premultiplied_alpha_fragment:ek,project_vertex:tk,dithering_fragment:nk,dithering_pars_fragment:rk,roughnessmap_fragment:ik,roughnessmap_pars_fragment:sk,shadowmap_pars_fragment:ak,shadowmap_pars_vertex:ok,shadowmap_vertex:lk,shadowmask_pars_fragment:ck,skinbase_vertex:dk,skinning_pars_vertex:uk,skinning_vertex:hk,skinnormal_vertex:fk,specularmap_fragment:pk,specularmap_pars_fragment:gk,tonemapping_fragment:mk,tonemapping_pars_fragment:xk,transmission_fragment:bk,transmission_pars_fragment:yk,uv_pars_fragment:vk,uv_pars_vertex:_k,uv_vertex:wk,worldpos_vertex:Mk,background_vert:Sk,background_frag:Tk,backgroundCube_vert:Ak,backgroundCube_frag:kk,cube_vert:Ek,cube_frag:Ck,depth_vert:Rk,depth_frag:Pk,distanceRGBA_vert:Ik,distanceRGBA_frag:Dk,equirect_vert:Lk,equirect_frag:Nk,linedashed_vert:Uk,linedashed_frag:Fk,meshbasic_vert:Ok,meshbasic_frag:Bk,meshlambert_vert:zk,meshlambert_frag:Vk,meshmatcap_vert:Gk,meshmatcap_frag:Hk,meshnormal_vert:Wk,meshnormal_frag:Xk,meshphong_vert:qk,meshphong_frag:Yk,meshphysical_vert:Zk,meshphysical_frag:jk,meshtoon_vert:$k,meshtoon_frag:Kk,points_vert:Jk,points_frag:Qk,shadow_vert:eE,shadow_frag:tE,sprite_vert:nE,sprite_frag:rE},pe={common:{diffuse:{value:new Se(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new at}},envmap:{envMap:{value:null},envMapRotation:{value:new at},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 at}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new at}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new at},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new at},normalScale:{value:new K(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new at},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new at}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new at}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new at}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Se(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},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 Se(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0},uvTransform:{value:new at}},sprite:{diffuse:{value:new Se(16777215)},opacity:{value:1},center:{value:new K(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new at},alphaMap:{value:null},alphaMapTransform:{value:new at},alphaTest:{value:0}}},Sr={basic:{uniforms:Ln([pe.common,pe.specularmap,pe.envmap,pe.aomap,pe.lightmap,pe.fog]),vertexShader:Ye.meshbasic_vert,fragmentShader:Ye.meshbasic_frag},lambert:{uniforms:Ln([pe.common,pe.specularmap,pe.envmap,pe.aomap,pe.lightmap,pe.emissivemap,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.fog,pe.lights,{emissive:{value:new Se(0)}}]),vertexShader:Ye.meshlambert_vert,fragmentShader:Ye.meshlambert_frag},phong:{uniforms:Ln([pe.common,pe.specularmap,pe.envmap,pe.aomap,pe.lightmap,pe.emissivemap,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.fog,pe.lights,{emissive:{value:new Se(0)},specular:{value:new Se(1118481)},shininess:{value:30}}]),vertexShader:Ye.meshphong_vert,fragmentShader:Ye.meshphong_frag},standard:{uniforms:Ln([pe.common,pe.envmap,pe.aomap,pe.lightmap,pe.emissivemap,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.roughnessmap,pe.metalnessmap,pe.fog,pe.lights,{emissive:{value:new Se(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ye.meshphysical_vert,fragmentShader:Ye.meshphysical_frag},toon:{uniforms:Ln([pe.common,pe.aomap,pe.lightmap,pe.emissivemap,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.gradientmap,pe.fog,pe.lights,{emissive:{value:new Se(0)}}]),vertexShader:Ye.meshtoon_vert,fragmentShader:Ye.meshtoon_frag},matcap:{uniforms:Ln([pe.common,pe.bumpmap,pe.normalmap,pe.displacementmap,pe.fog,{matcap:{value:null}}]),vertexShader:Ye.meshmatcap_vert,fragmentShader:Ye.meshmatcap_frag},points:{uniforms:Ln([pe.points,pe.fog]),vertexShader:Ye.points_vert,fragmentShader:Ye.points_frag},dashed:{uniforms:Ln([pe.common,pe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ye.linedashed_vert,fragmentShader:Ye.linedashed_frag},depth:{uniforms:Ln([pe.common,pe.displacementmap]),vertexShader:Ye.depth_vert,fragmentShader:Ye.depth_frag},normal:{uniforms:Ln([pe.common,pe.bumpmap,pe.normalmap,pe.displacementmap,{opacity:{value:1}}]),vertexShader:Ye.meshnormal_vert,fragmentShader:Ye.meshnormal_frag},sprite:{uniforms:Ln([pe.sprite,pe.fog]),vertexShader:Ye.sprite_vert,fragmentShader:Ye.sprite_frag},background:{uniforms:{uvTransform:{value:new at},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ye.background_vert,fragmentShader:Ye.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new at}},vertexShader:Ye.backgroundCube_vert,fragmentShader:Ye.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ye.cube_vert,fragmentShader:Ye.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ye.equirect_vert,fragmentShader:Ye.equirect_frag},distanceRGBA:{uniforms:Ln([pe.common,pe.displacementmap,{referencePosition:{value:new C},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ye.distanceRGBA_vert,fragmentShader:Ye.distanceRGBA_frag},shadow:{uniforms:Ln([pe.lights,pe.fog,{color:{value:new Se(0)},opacity:{value:1}}]),vertexShader:Ye.shadow_vert,fragmentShader:Ye.shadow_frag}};Sr.physical={uniforms:Ln([Sr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new at},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new at},clearcoatNormalScale:{value:new K(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new at},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new at},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new at},sheen:{value:0},sheenColor:{value:new Se(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new at},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new at},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new at},transmissionSamplerSize:{value:new K},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new at},attenuationDistance:{value:0},attenuationColor:{value:new Se(0)},specularColor:{value:new Se(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new at},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new at},anisotropyVector:{value:new K},anisotropyMap:{value:null},anisotropyMapTransform:{value:new at}}]),vertexShader:Ye.meshphysical_vert,fragmentShader:Ye.meshphysical_frag};const Ad={r:0,b:0,g:0},qs=new gr,iE=new De;function sE(r,e,t,n,i,s,a){const o=new Se(0);let l=s===!0?0:1,c,d,u=null,h=0,f=null;function g(b){let y=b.isScene===!0?b.background:null;return y&&y.isTexture&&(y=(b.backgroundBlurriness>0?t:e).get(y)),y}function x(b){let y=!1;const _=g(b);_===null?p(o,l):_&&_.isColor&&(p(_,1),y=!0);const w=r.xr.getEnvironmentBlendMode();w==="additive"?n.buffers.color.setClear(0,0,0,1,a):w==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,a),(r.autoClear||y)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil))}function m(b,y){const _=g(y);_&&(_.isCubeTexture||_.mapping===Go)?(d===void 0&&(d=new Qt(new Wi(1,1,1),new Rr({name:"BackgroundCubeMaterial",uniforms:Uo(Sr.backgroundCube.uniforms),vertexShader:Sr.backgroundCube.vertexShader,fragmentShader:Sr.backgroundCube.fragmentShader,side:En,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),d.geometry.deleteAttribute("normal"),d.geometry.deleteAttribute("uv"),d.onBeforeRender=function(w,T,A){this.matrixWorld.copyPosition(A.matrixWorld)},Object.defineProperty(d.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(d)),qs.copy(y.backgroundRotation),qs.x*=-1,qs.y*=-1,qs.z*=-1,_.isCubeTexture&&_.isRenderTargetTexture===!1&&(qs.y*=-1,qs.z*=-1),d.material.uniforms.envMap.value=_,d.material.uniforms.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,d.material.uniforms.backgroundBlurriness.value=y.backgroundBlurriness,d.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,d.material.uniforms.backgroundRotation.value.setFromMatrix4(iE.makeRotationFromEuler(qs)),d.material.toneMapped=ft.getTransfer(_.colorSpace)!==Mt,(u!==_||h!==_.version||f!==r.toneMapping)&&(d.material.needsUpdate=!0,u=_,h=_.version,f=r.toneMapping),d.layers.enableAll(),b.unshift(d,d.geometry,d.material,0,0,null)):_&&_.isTexture&&(c===void 0&&(c=new Qt(new Xo(2,2),new Rr({name:"BackgroundMaterial",uniforms:Uo(Sr.background.uniforms),vertexShader:Sr.background.vertexShader,fragmentShader:Sr.background.fragmentShader,side:Wr,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(c)),c.material.uniforms.t2D.value=_,c.material.uniforms.backgroundIntensity.value=y.backgroundIntensity,c.material.toneMapped=ft.getTransfer(_.colorSpace)!==Mt,_.matrixAutoUpdate===!0&&_.updateMatrix(),c.material.uniforms.uvTransform.value.copy(_.matrix),(u!==_||h!==_.version||f!==r.toneMapping)&&(c.material.needsUpdate=!0,u=_,h=_.version,f=r.toneMapping),c.layers.enableAll(),b.unshift(c,c.geometry,c.material,0,0,null))}function p(b,y){b.getRGB(Ad,Nv(r)),n.buffers.color.setClear(Ad.r,Ad.g,Ad.b,y,a)}function v(){d!==void 0&&(d.geometry.dispose(),d.material.dispose(),d=void 0),c!==void 0&&(c.geometry.dispose(),c.material.dispose(),c=void 0)}return{getClearColor:function(){return o},setClearColor:function(b,y=1){o.set(b),l=y,p(o,l)},getClearAlpha:function(){return l},setClearAlpha:function(b){l=b,p(o,l)},render:x,addToRenderList:m,dispose:v}}function aE(r,e){const t=r.getParameter(r.MAX_VERTEX_ATTRIBS),n={},i=h(null);let s=i,a=!1;function o(S,E,P,N,L){let F=!1;const B=u(N,P,E);s!==B&&(s=B,c(s.object)),F=f(S,N,P,L),F&&g(S,N,P,L),L!==null&&e.update(L,r.ELEMENT_ARRAY_BUFFER),(F||a)&&(a=!1,y(S,E,P,N),L!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e.get(L).buffer))}function l(){return r.createVertexArray()}function c(S){return r.bindVertexArray(S)}function d(S){return r.deleteVertexArray(S)}function u(S,E,P){const N=P.wireframe===!0;let L=n[S.id];L===void 0&&(L={},n[S.id]=L);let F=L[E.id];F===void 0&&(F={},L[E.id]=F);let B=F[N];return B===void 0&&(B=h(l()),F[N]=B),B}function h(S){const E=[],P=[],N=[];for(let L=0;L=0){const te=L[O];let de=F[O];if(de===void 0&&(O==="instanceMatrix"&&S.instanceMatrix&&(de=S.instanceMatrix),O==="instanceColor"&&S.instanceColor&&(de=S.instanceColor)),te===void 0||te.attribute!==de||de&&te.data!==de.data)return!0;B++}return s.attributesNum!==B||s.index!==N}function g(S,E,P,N){const L={},F=E.attributes;let B=0;const G=P.getAttributes();for(const O in G)if(G[O].location>=0){let te=F[O];te===void 0&&(O==="instanceMatrix"&&S.instanceMatrix&&(te=S.instanceMatrix),O==="instanceColor"&&S.instanceColor&&(te=S.instanceColor));const de={};de.attribute=te,te&&te.data&&(de.data=te.data),L[O]=de,B++}s.attributes=L,s.attributesNum=B,s.index=N}function x(){const S=s.newAttributes;for(let E=0,P=S.length;E=0){let Y=L[G];if(Y===void 0&&(G==="instanceMatrix"&&S.instanceMatrix&&(Y=S.instanceMatrix),G==="instanceColor"&&S.instanceColor&&(Y=S.instanceColor)),Y!==void 0){const te=Y.normalized,de=Y.itemSize,Ee=e.get(Y);if(Ee===void 0)continue;const ve=Ee.buffer,Ge=Ee.type,He=Ee.bytesPerElement,J=Ge===r.INT||Ge===r.UNSIGNED_INT||Y.gpuType===_h;if(Y.isInterleavedBufferAttribute){const Q=Y.data,we=Q.stride,Be=Y.offset;if(Q.isInstancedInterleavedBuffer){for(let Ce=0;Ce0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";T="mediump"}return T==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=t.precision!==void 0?t.precision:"highp";const d=l(c);d!==c&&(ye("WebGLRenderer:",c,"not supported, using",d,"instead."),c=d);const u=t.logarithmicDepthBuffer===!0,h=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control"),f=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),g=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x=r.getParameter(r.MAX_TEXTURE_SIZE),m=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),p=r.getParameter(r.MAX_VERTEX_ATTRIBS),v=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),b=r.getParameter(r.MAX_VARYING_VECTORS),y=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),_=g>0,w=r.getParameter(r.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:a,textureTypeReadable:o,precision:c,logarithmicDepthBuffer:u,reversedDepthBuffer:h,maxTextures:f,maxVertexTextures:g,maxTextureSize:x,maxCubemapSize:m,maxAttributes:p,maxVertexUniforms:v,maxVaryings:b,maxFragmentUniforms:y,vertexTextures:_,maxSamples:w}}function cE(r){const e=this;let t=null,n=0,i=!1,s=!1;const a=new Mr,o=new at,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(u,h){const f=u.length!==0||h||n!==0||i;return i=h,n=u.length,f},this.beginShadows=function(){s=!0,d(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(u,h){t=d(u,h,0)},this.setState=function(u,h,f){const g=u.clippingPlanes,x=u.clipIntersection,m=u.clipShadows,p=r.get(u);if(!i||g===null||g.length===0||s&&!m)s?d(null):c();else{const v=s?0:n,b=v*4;let y=p.clippingState||null;l.value=y,y=d(g,h,b,f);for(let _=0;_!==b;++_)y[_]=t[_];p.clippingState=y,this.numIntersection=x?this.numPlanes:0,this.numPlanes+=v}};function c(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(u,h,f,g){const x=u!==null?u.length:0;let m=null;if(x!==0){if(m=l.value,g!==!0||m===null){const p=f+x*4,v=h.matrixWorldInverse;o.getNormalMatrix(v),(m===null||m.length0){const c=new Fv(l.height);return c.fromEquirectangularTexture(r,a),e.set(a,c),a.addEventListener("dispose",i),t(c.texture,a.mapping)}else return null}}return a}function i(a){const o=a.target;o.removeEventListener("dispose",i);const l=e.get(o);l!==void 0&&(e.delete(o),l.dispose())}function s(){e=new WeakMap}return{get:n,dispose:s}}const gs=4,_x=[.125,.215,.35,.446,.526,.582],ra=20,uE=256,ul=new Pc,wx=new Se;let Kf=null,Jf=0,Qf=0,e0=!1;const hE=new C;class rp{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._sizeLods=[],this._sigmas=[],this._lodMeshes=[],this._backgroundBox=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._blurMaterial=null,this._ggxMaterial=null}fromScene(e,t=0,n=.1,i=100,s={}){const{size:a=256,position:o=hE}=s;Kf=this._renderer.getRenderTarget(),Jf=this._renderer.getActiveCubeFace(),Qf=this._renderer.getActiveMipmapLevel(),e0=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);const l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,n,i,l,o),t>0&&this._blur(l,0,0,t),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Tx(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Sx(),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?_:0,_,_),u.setRenderTarget(i),p&&u.render(x,l),u.render(e,l)}u.toneMapping=f,u.autoClear=h,e.background=v}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===Gi||e.mapping===Ms;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=Tx()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Sx());const s=i?this._cubemapMaterial:this._equirectMaterial,a=this._lodMeshes[0];a.material=s;const o=s.uniforms;o.envMap.value=e;const l=this._cubeSize;ao(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(a,ul)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const i=this._lodMeshes.length;for(let s=1;sg-gs?n-g+gs:0),p=4*(this._cubeSize-x);l.envMap.value=e.texture,l.roughness.value=f,l.mipInt.value=g-t,ao(s,m,p,3*x,2*x),i.setRenderTarget(s),i.render(o,ul),l.envMap.value=s.texture,l.roughness.value=0,l.mipInt.value=g-n,ao(e,m,p,3*x,2*x),i.setRenderTarget(e),i.render(o,ul)}_blur(e,t,n,i,s){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,i,"latitudinal",s),this._halfBlur(a,e,n,n,i,"longitudinal",s)}_halfBlur(e,t,n,i,s,a,o){const l=this._renderer,c=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&tt("blur direction must be either latitudinal or longitudinal!");const d=3,u=this._lodMeshes[i];u.material=c;const h=c.uniforms,f=this._sizeLods[n]-1,g=isFinite(s)?Math.PI/(2*f):2*Math.PI/(2*ra-1),x=s/g,m=isFinite(s)?1+Math.floor(d*x):ra;m>ra&&ye(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${ra}`);const p=[];let v=0;for(let T=0;Tb-gs?i-b+gs:0),w=4*(this._cubeSize-y);ao(t,_,w,3*y,2*y),l.setRenderTarget(t),l.render(u,ul)}}function fE(r){const e=[],t=[],n=[];let i=r;const s=r-gs+1+_x.length;for(let a=0;ar-gs?l=_x[a-r+gs-1]:a===0&&(l=0),t.push(l);const c=1/(o-2),d=-c,u=1+c,h=[d,d,u,d,u,u,d,d,u,u,d,u],f=6,g=6,x=3,m=2,p=1,v=new Float32Array(x*g*f),b=new Float32Array(m*g*f),y=new Float32Array(p*g*f);for(let w=0;w2?0:-1,M=[T,A,0,T+2/3,A,0,T+2/3,A+1,0,T,A,0,T+2/3,A+1,0,T,A+1,0];v.set(M,x*g*w),b.set(h,m*g*w);const S=[w,w,w,w,w,w];y.set(S,p*g*w)}const _=new ot;_.setAttribute("position",new vt(v,x)),_.setAttribute("uv",new vt(b,m)),_.setAttribute("faceIndex",new vt(y,p)),n.push(new Qt(_,null)),i>gs&&i--}return{lodMeshes:n,sizeLods:e,sigmas:t}}function Mx(r,e,t){const n=new oi(r,e,t);return n.texture.mapping=Go,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function ao(r,e,t,n,i){r.viewport.set(e,t,n,i),r.scissor.set(e,t,n,i)}function pE(r,e,t){return new Rr({name:"PMREMGGXConvolution",defines:{GGX_SAMPLES:uE,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},roughness:{value:0},mipInt:{value:0}},vertexShader:Kh(),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 3.2: Transform view direction to hemisphere configuration - vec3 Vh = normalize(vec3(alpha * V.x, alpha * V.y, V.z)); - - // Section 4.1: Orthonormal basis - float lensq = Vh.x * Vh.x + Vh.y * Vh.y; - vec3 T1 = lensq > 0.0 ? vec3(-Vh.y, Vh.x, 0.0) / sqrt(lensq) : vec3(1.0, 0.0, 0.0); - vec3 T2 = cross(Vh, 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 + Vh.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)) * Vh; - - // 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:ii,depthTest:!1,depthWrite:!1})}function gE(r,e,t){const n=new Float32Array(ra),i=new C(0,1,0);return new Rr({name:"SphericalGaussianBlur",defines:{n:ra,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Kh(),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:ii,depthTest:!1,depthWrite:!1})}function Sx(){return new Rr({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Kh(),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:ii,depthTest:!1,depthWrite:!1})}function Tx(){return new Rr({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Kh(),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:ii,depthTest:!1,depthWrite:!1})}function Kh(){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 ); - - } - `}function mE(r){let e=new WeakMap,t=null;function n(o){if(o&&o.isTexture){const l=o.mapping,c=l===$l||l===Kl,d=l===Gi||l===Ms;if(c||d){let u=e.get(o);const h=u!==void 0?u.texture.pmremVersion:0;if(o.isRenderTargetTexture&&o.pmremVersion!==h)return t===null&&(t=new rp(r)),u=c?t.fromEquirectangular(o,u):t.fromCubemap(o,u),u.texture.pmremVersion=o.pmremVersion,e.set(o,u),u.texture;if(u!==void 0)return u.texture;{const f=o.image;return c&&f&&f.height>0||d&&f&&i(f)?(t===null&&(t=new rp(r)),u=c?t.fromEquirectangular(o):t.fromCubemap(o),u.texture.pmremVersion=o.pmremVersion,e.set(o,u),o.addEventListener("dispose",s),u.texture):null}}}return o}function i(o){let l=0;const c=6;for(let d=0;de.maxTextureSize&&(w=Math.ceil(_/e.maxTextureSize),_=e.maxTextureSize);const T=new Float32Array(_*w*4*u),A=new Ch(T,_,w,u);A.type=er,A.needsUpdate=!0;const M=y*4;for(let E=0;E0)return r;const i=e*t;let s=kx[i];if(s===void 0&&(s=new Float32Array(i),kx[i]=s),e!==0){n.toArray(s,0);for(let a=1,o=0;a!==e;++a)o+=t,r[a].toArray(s,o)}return s}function ln(r,e){if(r.length!==e.length)return!1;for(let t=0,n=r.length;t":" "} ${o}: ${t[a]}`)}return n.join(` -`)}const Lx=new at;function mC(r){ft._getMatrix(Lx,ft.workingColorSpace,r);const e=`mat3( ${Lx.elements.map(t=>t.toFixed(4))} )`;switch(ft.getTransfer(r)){case nc:return[e,"LinearTransferOETF"];case Mt:return[e,"sRGBTransferOETF"];default:return ye("WebGLProgram: Unsupported color space: ",r),[e,"LinearTransferOETF"]}}function Nx(r,e,t){const n=r.getShaderParameter(e,r.COMPILE_STATUS),s=(r.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+` - -`+gC(r.getShaderSource(e),o)}else return s}function xC(r,e){const t=mC(e);return[`vec4 ${r}( vec4 value ) {`,` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(` -`)}function bC(r,e){let t;switch(e){case dv:t="Linear";break;case uv:t="Reinhard";break;case hv:t="Cineon";break;case fv:t="ACESFilmic";break;case Eu:t="AgX";break;case gv:t="Neutral";break;case pv:t="Custom";break;default:ye("WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const kd=new C;function yC(){ft.getLuminanceCoefficients(kd);const r=kd.x.toFixed(4),e=kd.y.toFixed(4),t=kd.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${r}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` -`)}function vC(r){return[r.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",r.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Al).join(` -`)}function _C(r){const e=[];for(const t in r){const n=r[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(` -`)}function wC(r,e){const t={},n=r.getProgramParameter(e,r.ACTIVE_ATTRIBUTES);for(let i=0;i/gm;function ip(r){return r.replace(MC,TC)}const SC=new Map;function TC(r,e){let t=Ye[e];if(t===void 0){const n=SC.get(e);if(n!==void 0)t=Ye[n],ye('WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return ip(t)}const AC=/#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 Ox(r){return r.replace(AC,kC)}function kC(r,e,t,n){let i="";for(let s=parseInt(e);s0&&(m+=` -`),p=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(Al).join(` -`),p.length>0&&(p+=` -`)):(m=[Bx(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,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 "+d:"",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 "+l:"",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(Al).join(` -`),p=[Bx(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,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 "+c:"",t.envMap?"#define "+d:"",t.envMap?"#define "+u:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.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||t.batchingColor?"#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.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 "+l:"",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!==Fi?"#define TONE_MAPPING":"",t.toneMapping!==Fi?Ye.tonemapping_pars_fragment:"",t.toneMapping!==Fi?bC("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",Ye.colorspace_pars_fragment,xC("linearToOutputTexel",t.outputColorSpace),yC(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(Al).join(` -`)),a=ip(a),a=Ux(a,t),a=Fx(a,t),o=ip(o),o=Ux(o,t),o=Fx(o,t),a=Ox(a),o=Ox(o),t.isRawShaderMaterial!==!0&&(v=`#version 300 es -`,m=[f,"#define attribute in","#define varying out","#define texture2D texture"].join(` -`)+` -`+m,p=["#define varying in",t.glslVersion===Z0?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===Z0?"":"#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(` -`)+` -`+p);const b=v+m+a,y=v+p+o,_=Dx(i,i.VERTEX_SHADER,b),w=Dx(i,i.FRAGMENT_SHADER,y);i.attachShader(x,_),i.attachShader(x,w),t.index0AttributeName!==void 0?i.bindAttribLocation(x,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(x,0,"position"),i.linkProgram(x);function T(E){if(r.debug.checkShaderErrors){const P=i.getProgramInfoLog(x)||"",N=i.getShaderInfoLog(_)||"",L=i.getShaderInfoLog(w)||"",F=P.trim(),B=N.trim(),G=L.trim();let O=!0,Y=!0;if(i.getProgramParameter(x,i.LINK_STATUS)===!1)if(O=!1,typeof r.debug.onShaderError=="function")r.debug.onShaderError(i,x,_,w);else{const te=Nx(i,_,"vertex"),de=Nx(i,w,"fragment");tt("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(x,i.VALIDATE_STATUS)+` - -Material Name: `+E.name+` -Material Type: `+E.type+` - -Program Info Log: `+F+` -`+te+` -`+de)}else F!==""?ye("WebGLProgram: Program Info Log:",F):(B===""||G==="")&&(Y=!1);Y&&(E.diagnostics={runnable:O,programLog:F,vertexShader:{log:B,prefix:m},fragmentShader:{log:G,prefix:p}})}i.deleteShader(_),i.deleteShader(w),A=new ou(i,x),M=wC(i,x)}let A;this.getUniforms=function(){return A===void 0&&T(this),A};let M;this.getAttributes=function(){return M===void 0&&T(this),M};let S=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return S===!1&&(S=i.getProgramParameter(x,fC)),S},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(x),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=pC++,this.cacheKey=e,this.usedTimes=1,this.program=x,this.vertexShader=_,this.fragmentShader=w,this}let LC=0;class NC{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),s=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return a.has(i)===!1&&(a.add(i),i.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 UC(e),t.set(e,n)),n}}class UC{constructor(e){this.id=LC++,this.code=e,this.usedTimes=0}}function FC(r,e,t,n,i,s,a){const o=new Ph,l=new NC,c=new Set,d=[],u=i.logarithmicDepthBuffer,h=i.vertexTextures;let f=i.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",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(M){return c.add(M),M===0?"uv":`uv${M}`}function m(M,S,E,P,N){const L=P.fog,F=N.geometry,B=M.isMeshStandardMaterial?P.environment:null,G=(M.isMeshStandardMaterial?t:e).get(M.envMap||B),O=G&&G.mapping===Go?G.image.height:null,Y=g[M.type];M.precision!==null&&(f=i.getMaxPrecision(M.precision),f!==M.precision&&ye("WebGLProgram.getParameters:",M.precision,"not supported, using",f,"instead."));const te=F.morphAttributes.position||F.morphAttributes.normal||F.morphAttributes.color,de=te!==void 0?te.length:0;let Ee=0;F.morphAttributes.position!==void 0&&(Ee=1),F.morphAttributes.normal!==void 0&&(Ee=2),F.morphAttributes.color!==void 0&&(Ee=3);let ve,Ge,He,J;if(Y){const St=Sr[Y];ve=St.vertexShader,Ge=St.fragmentShader}else ve=M.vertexShader,Ge=M.fragmentShader,l.update(M),He=l.getVertexShaderID(M),J=l.getFragmentShaderID(M);const Q=r.getRenderTarget(),we=r.state.buffers.depth.getReversed(),Be=N.isInstancedMesh===!0,Ce=N.isBatchedMesh===!0,it=!!M.map,ut=!!M.matcap,Qe=!!G,se=!!M.aoMap,D=!!M.lightMap,ie=!!M.bumpMap,ce=!!M.normalMap,he=!!M.displacementMap,oe=!!M.emissiveMap,Le=!!M.metalnessMap,xe=!!M.roughnessMap,Ae=M.anisotropy>0,I=M.clearcoat>0,k=M.dispersion>0,X=M.iridescence>0,ee=M.sheen>0,re=M.transmission>0,$=Ae&&!!M.anisotropyMap,ze=I&&!!M.clearcoatMap,be=I&&!!M.clearcoatNormalMap,We=I&&!!M.clearcoatRoughnessMap,Fe=X&&!!M.iridescenceMap,ae=X&&!!M.iridescenceThicknessMap,fe=ee&&!!M.sheenColorMap,Ke=ee&&!!M.sheenRoughnessMap,Ze=!!M.specularMap,Te=!!M.specularColorMap,nt=!!M.specularIntensityMap,V=re&&!!M.transmissionMap,_e=re&&!!M.thicknessMap,ge=!!M.gradientMap,me=!!M.alphaMap,le=M.alphaTest>0,ne=!!M.alphaHash,Ne=!!M.extensions;let st=Fi;M.toneMapped&&(Q===null||Q.isXRRenderTarget===!0)&&(st=r.toneMapping);const It={shaderID:Y,shaderType:M.type,shaderName:M.name,vertexShader:ve,fragmentShader:Ge,defines:M.defines,customVertexShaderID:He,customFragmentShaderID:J,isRawShaderMaterial:M.isRawShaderMaterial===!0,glslVersion:M.glslVersion,precision:f,batching:Ce,batchingColor:Ce&&N._colorsTexture!==null,instancing:Be,instancingColor:Be&&N.instanceColor!==null,instancingMorph:Be&&N.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:Q===null?r.outputColorSpace:Q.isXRRenderTarget===!0?Q.texture.colorSpace:Sa,alphaToCoverage:!!M.alphaToCoverage,map:it,matcap:ut,envMap:Qe,envMapMode:Qe&&G.mapping,envMapCubeUVHeight:O,aoMap:se,lightMap:D,bumpMap:ie,normalMap:ce,displacementMap:h&&he,emissiveMap:oe,normalMapObjectSpace:ce&&M.normalMapType===wv,normalMapTangentSpace:ce&&M.normalMapType===ks,metalnessMap:Le,roughnessMap:xe,anisotropy:Ae,anisotropyMap:$,clearcoat:I,clearcoatMap:ze,clearcoatNormalMap:be,clearcoatRoughnessMap:We,dispersion:k,iridescence:X,iridescenceMap:Fe,iridescenceThicknessMap:ae,sheen:ee,sheenColorMap:fe,sheenRoughnessMap:Ke,specularMap:Ze,specularColorMap:Te,specularIntensityMap:nt,transmission:re,transmissionMap:V,thicknessMap:_e,gradientMap:ge,opaque:M.transparent===!1&&M.blending===pa&&M.alphaToCoverage===!1,alphaMap:me,alphaTest:le,alphaHash:ne,combine:M.combine,mapUv:it&&x(M.map.channel),aoMapUv:se&&x(M.aoMap.channel),lightMapUv:D&&x(M.lightMap.channel),bumpMapUv:ie&&x(M.bumpMap.channel),normalMapUv:ce&&x(M.normalMap.channel),displacementMapUv:he&&x(M.displacementMap.channel),emissiveMapUv:oe&&x(M.emissiveMap.channel),metalnessMapUv:Le&&x(M.metalnessMap.channel),roughnessMapUv:xe&&x(M.roughnessMap.channel),anisotropyMapUv:$&&x(M.anisotropyMap.channel),clearcoatMapUv:ze&&x(M.clearcoatMap.channel),clearcoatNormalMapUv:be&&x(M.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:We&&x(M.clearcoatRoughnessMap.channel),iridescenceMapUv:Fe&&x(M.iridescenceMap.channel),iridescenceThicknessMapUv:ae&&x(M.iridescenceThicknessMap.channel),sheenColorMapUv:fe&&x(M.sheenColorMap.channel),sheenRoughnessMapUv:Ke&&x(M.sheenRoughnessMap.channel),specularMapUv:Ze&&x(M.specularMap.channel),specularColorMapUv:Te&&x(M.specularColorMap.channel),specularIntensityMapUv:nt&&x(M.specularIntensityMap.channel),transmissionMapUv:V&&x(M.transmissionMap.channel),thicknessMapUv:_e&&x(M.thicknessMap.channel),alphaMapUv:me&&x(M.alphaMap.channel),vertexTangents:!!F.attributes.tangent&&(ce||Ae),vertexColors:M.vertexColors,vertexAlphas:M.vertexColors===!0&&!!F.attributes.color&&F.attributes.color.itemSize===4,pointsUvs:N.isPoints===!0&&!!F.attributes.uv&&(it||me),fog:!!L,useFog:M.fog===!0,fogExp2:!!L&&L.isFogExp2,flatShading:M.flatShading===!0&&M.wireframe===!1,sizeAttenuation:M.sizeAttenuation===!0,logarithmicDepthBuffer:u,reversedDepthBuffer:we,skinning:N.isSkinnedMesh===!0,morphTargets:F.morphAttributes.position!==void 0,morphNormals:F.morphAttributes.normal!==void 0,morphColors:F.morphAttributes.color!==void 0,morphTargetsCount:de,morphTextureStride:Ee,numDirLights:S.directional.length,numPointLights:S.point.length,numSpotLights:S.spot.length,numSpotLightMaps:S.spotLightMap.length,numRectAreaLights:S.rectArea.length,numHemiLights:S.hemi.length,numDirLightShadows:S.directionalShadowMap.length,numPointLightShadows:S.pointShadowMap.length,numSpotLightShadows:S.spotShadowMap.length,numSpotLightShadowsWithMaps:S.numSpotLightShadowsWithMaps,numLightProbes:S.numLightProbes,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:M.dithering,shadowMapEnabled:r.shadowMap.enabled&&E.length>0,shadowMapType:r.shadowMap.type,toneMapping:st,decodeVideoTexture:it&&M.map.isVideoTexture===!0&&ft.getTransfer(M.map.colorSpace)===Mt,decodeVideoTextureEmissive:oe&&M.emissiveMap.isVideoTexture===!0&&ft.getTransfer(M.emissiveMap.colorSpace)===Mt,premultipliedAlpha:M.premultipliedAlpha,doubleSided:M.side===$n,flipSided:M.side===En,useDepthPacking:M.depthPacking>=0,depthPacking:M.depthPacking||0,index0AttributeName:M.index0AttributeName,extensionClipCullDistance:Ne&&M.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Ne&&M.extensions.multiDraw===!0||Ce)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:M.customProgramCacheKey()};return It.vertexUv1s=c.has(1),It.vertexUv2s=c.has(2),It.vertexUv3s=c.has(3),c.clear(),It}function p(M){const S=[];if(M.shaderID?S.push(M.shaderID):(S.push(M.customVertexShaderID),S.push(M.customFragmentShaderID)),M.defines!==void 0)for(const E in M.defines)S.push(E),S.push(M.defines[E]);return M.isRawShaderMaterial===!1&&(v(S,M),b(S,M),S.push(r.outputColorSpace)),S.push(M.customProgramCacheKey),S.join()}function v(M,S){M.push(S.precision),M.push(S.outputColorSpace),M.push(S.envMapMode),M.push(S.envMapCubeUVHeight),M.push(S.mapUv),M.push(S.alphaMapUv),M.push(S.lightMapUv),M.push(S.aoMapUv),M.push(S.bumpMapUv),M.push(S.normalMapUv),M.push(S.displacementMapUv),M.push(S.emissiveMapUv),M.push(S.metalnessMapUv),M.push(S.roughnessMapUv),M.push(S.anisotropyMapUv),M.push(S.clearcoatMapUv),M.push(S.clearcoatNormalMapUv),M.push(S.clearcoatRoughnessMapUv),M.push(S.iridescenceMapUv),M.push(S.iridescenceThicknessMapUv),M.push(S.sheenColorMapUv),M.push(S.sheenRoughnessMapUv),M.push(S.specularMapUv),M.push(S.specularColorMapUv),M.push(S.specularIntensityMapUv),M.push(S.transmissionMapUv),M.push(S.thicknessMapUv),M.push(S.combine),M.push(S.fogExp2),M.push(S.sizeAttenuation),M.push(S.morphTargetsCount),M.push(S.morphAttributeCount),M.push(S.numDirLights),M.push(S.numPointLights),M.push(S.numSpotLights),M.push(S.numSpotLightMaps),M.push(S.numHemiLights),M.push(S.numRectAreaLights),M.push(S.numDirLightShadows),M.push(S.numPointLightShadows),M.push(S.numSpotLightShadows),M.push(S.numSpotLightShadowsWithMaps),M.push(S.numLightProbes),M.push(S.shadowMapType),M.push(S.toneMapping),M.push(S.numClippingPlanes),M.push(S.numClipIntersection),M.push(S.depthPacking)}function b(M,S){o.disableAll(),S.supportsVertexTextures&&o.enable(0),S.instancing&&o.enable(1),S.instancingColor&&o.enable(2),S.instancingMorph&&o.enable(3),S.matcap&&o.enable(4),S.envMap&&o.enable(5),S.normalMapObjectSpace&&o.enable(6),S.normalMapTangentSpace&&o.enable(7),S.clearcoat&&o.enable(8),S.iridescence&&o.enable(9),S.alphaTest&&o.enable(10),S.vertexColors&&o.enable(11),S.vertexAlphas&&o.enable(12),S.vertexUv1s&&o.enable(13),S.vertexUv2s&&o.enable(14),S.vertexUv3s&&o.enable(15),S.vertexTangents&&o.enable(16),S.anisotropy&&o.enable(17),S.alphaHash&&o.enable(18),S.batching&&o.enable(19),S.dispersion&&o.enable(20),S.batchingColor&&o.enable(21),S.gradientMap&&o.enable(22),M.push(o.mask),o.disableAll(),S.fog&&o.enable(0),S.useFog&&o.enable(1),S.flatShading&&o.enable(2),S.logarithmicDepthBuffer&&o.enable(3),S.reversedDepthBuffer&&o.enable(4),S.skinning&&o.enable(5),S.morphTargets&&o.enable(6),S.morphNormals&&o.enable(7),S.morphColors&&o.enable(8),S.premultipliedAlpha&&o.enable(9),S.shadowMapEnabled&&o.enable(10),S.doubleSided&&o.enable(11),S.flipSided&&o.enable(12),S.useDepthPacking&&o.enable(13),S.dithering&&o.enable(14),S.transmission&&o.enable(15),S.sheen&&o.enable(16),S.opaque&&o.enable(17),S.pointsUvs&&o.enable(18),S.decodeVideoTexture&&o.enable(19),S.decodeVideoTextureEmissive&&o.enable(20),S.alphaToCoverage&&o.enable(21),M.push(o.mask)}function y(M){const S=g[M.type];let E;if(S){const P=Sr[S];E=sg.clone(P.uniforms)}else E=M.uniforms;return E}function _(M,S){let E;for(let P=0,N=d.length;P0?n.push(p):f.transparent===!0?i.push(p):t.push(p)}function l(u,h,f,g,x,m){const p=a(u,h,f,g,x,m);f.transmission>0?n.unshift(p):f.transparent===!0?i.unshift(p):t.unshift(p)}function c(u,h){t.length>1&&t.sort(u||BC),n.length>1&&n.sort(h||zx),i.length>1&&i.sort(h||zx)}function d(){for(let u=e,h=r.length;u=s.length?(a=new Vx,s.push(a)):a=s[i],a}function t(){r=new WeakMap}return{get:e,dispose:t}}function VC(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new C,color:new Se};break;case"SpotLight":t={position:new C,direction:new C,color:new Se,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new C,color:new Se,distance:0,decay:0};break;case"HemisphereLight":t={direction:new C,skyColor:new Se,groundColor:new Se};break;case"RectAreaLight":t={color:new Se,position:new C,halfWidth:new C,halfHeight:new C};break}return r[e.id]=t,t}}}function GC(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new K};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new K};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new K,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}let HC=0;function WC(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function XC(r){const e=new VC,t=GC(),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 c=0;c<9;c++)n.probe.push(new C);const i=new C,s=new De,a=new De;function o(c){let d=0,u=0,h=0;for(let M=0;M<9;M++)n.probe[M].set(0,0,0);let f=0,g=0,x=0,m=0,p=0,v=0,b=0,y=0,_=0,w=0,T=0;c.sort(WC);for(let M=0,S=c.length;M0&&(r.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=pe.LTC_FLOAT_1,n.rectAreaLTC2=pe.LTC_FLOAT_2):(n.rectAreaLTC1=pe.LTC_HALF_1,n.rectAreaLTC2=pe.LTC_HALF_2)),n.ambient[0]=d,n.ambient[1]=u,n.ambient[2]=h;const A=n.hash;(A.directionalLength!==f||A.pointLength!==g||A.spotLength!==x||A.rectAreaLength!==m||A.hemiLength!==p||A.numDirectionalShadows!==v||A.numPointShadows!==b||A.numSpotShadows!==y||A.numSpotMaps!==_||A.numLightProbes!==T)&&(n.directional.length=f,n.spot.length=x,n.rectArea.length=m,n.point.length=g,n.hemi.length=p,n.directionalShadow.length=v,n.directionalShadowMap.length=v,n.pointShadow.length=b,n.pointShadowMap.length=b,n.spotShadow.length=y,n.spotShadowMap.length=y,n.directionalShadowMatrix.length=v,n.pointShadowMatrix.length=b,n.spotLightMatrix.length=y+_-w,n.spotLightMap.length=_,n.numSpotLightShadowsWithMaps=w,n.numLightProbes=T,A.directionalLength=f,A.pointLength=g,A.spotLength=x,A.rectAreaLength=m,A.hemiLength=p,A.numDirectionalShadows=v,A.numPointShadows=b,A.numSpotShadows=y,A.numSpotMaps=_,A.numLightProbes=T,n.version=HC++)}function l(c,d){let u=0,h=0,f=0,g=0,x=0;const m=d.matrixWorldInverse;for(let p=0,v=c.length;p=a.length?(o=new Gx(r),a.push(o)):o=a[s],o}function n(){e=new WeakMap}return{get:t,dispose:n}}const YC=`void main() { - gl_Position = vec4( position, 1.0 ); -}`,ZC=`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -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 = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function jC(r,e,t){let n=new Ho;const i=new K,s=new K,a=new rt,o=new yg({depthPacking:_v}),l=new vg,c={},d=t.maxTextureSize,u={[Wr]:En,[En]:Wr,[$n]:$n},h=new Rr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new K},radius:{value:4}},vertexShader:YC,fragmentShader:ZC}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const g=new ot;g.setAttribute("position",new vt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new Qt(g,h),m=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Xp;let p=this.type;this.render=function(w,T,A){if(m.enabled===!1||m.autoUpdate===!1&&m.needsUpdate===!1||w.length===0)return;const M=r.getRenderTarget(),S=r.getActiveCubeFace(),E=r.getActiveMipmapLevel(),P=r.state;P.setBlending(ii),P.buffers.depth.getReversed()===!0?P.buffers.color.setClear(0,0,0,0):P.buffers.color.setClear(1,1,1,1),P.buffers.depth.setTest(!0),P.setScissorTest(!1);const N=p!==Jr&&this.type===Jr,L=p===Jr&&this.type!==Jr;for(let F=0,B=w.length;Fd||i.y>d)&&(i.x>d&&(s.x=Math.floor(d/Y.x),i.x=s.x*Y.x,O.mapSize.x=s.x),i.y>d&&(s.y=Math.floor(d/Y.y),i.y=s.y*Y.y,O.mapSize.y=s.y)),O.map===null||N===!0||L===!0){const de=this.type!==Jr?{minFilter:yn,magFilter:yn}:{};O.map!==null&&O.map.dispose(),O.map=new oi(i.x,i.y,de),O.map.texture.name=G.name+".shadowMap",O.camera.updateProjectionMatrix()}r.setRenderTarget(O.map),r.clear();const te=O.getViewportCount();for(let de=0;de0||T.map&&T.alphaTest>0||T.alphaToCoverage===!0){const P=S.uuid,N=T.uuid;let L=c[P];L===void 0&&(L={},c[P]=L);let F=L[N];F===void 0&&(F=S.clone(),L[N]=F,T.addEventListener("dispose",_)),S=F}if(S.visible=T.visible,S.wireframe=T.wireframe,M===Jr?S.side=T.shadowSide!==null?T.shadowSide:T.side:S.side=T.shadowSide!==null?T.shadowSide:u[T.side],S.alphaMap=T.alphaMap,S.alphaTest=T.alphaToCoverage===!0?.5:T.alphaTest,S.map=T.map,S.clipShadows=T.clipShadows,S.clippingPlanes=T.clippingPlanes,S.clipIntersection=T.clipIntersection,S.displacementMap=T.displacementMap,S.displacementScale=T.displacementScale,S.displacementBias=T.displacementBias,S.wireframeLinewidth=T.wireframeLinewidth,S.linewidth=T.linewidth,A.isPointLight===!0&&S.isMeshDistanceMaterial===!0){const P=r.properties.get(S);P.light=A}return S}function y(w,T,A,M,S){if(w.visible===!1)return;if(w.layers.test(T.layers)&&(w.isMesh||w.isLine||w.isPoints)&&(w.castShadow||w.receiveShadow&&S===Jr)&&(!w.frustumCulled||n.intersectsObject(w))){w.modelViewMatrix.multiplyMatrices(A.matrixWorldInverse,w.matrixWorld);const N=e.update(w),L=w.material;if(Array.isArray(L)){const F=N.groups;for(let B=0,G=F.length;B=1):O.indexOf("OpenGL ES")!==-1&&(G=parseFloat(/^OpenGL ES (\d)/.exec(O)[1]),B=G>=2);let Y=null,te={};const de=r.getParameter(r.SCISSOR_BOX),Ee=r.getParameter(r.VIEWPORT),ve=new rt().fromArray(de),Ge=new rt().fromArray(Ee);function He(V,_e,ge,me){const le=new Uint8Array(4),ne=r.createTexture();r.bindTexture(V,ne),r.texParameteri(V,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(V,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let Ne=0;Ne"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new K,d=new WeakMap;let u;const h=new WeakMap;let f=!1;try{f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function g(I,k){return f?new OffscreenCanvas(I,k):ic("canvas")}function x(I,k,X){let ee=1;const re=Ae(I);if((re.width>X||re.height>X)&&(ee=X/Math.max(re.width,re.height)),ee<1)if(typeof HTMLImageElement<"u"&&I instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&I instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&I instanceof ImageBitmap||typeof VideoFrame<"u"&&I instanceof VideoFrame){const $=Math.floor(ee*re.width),ze=Math.floor(ee*re.height);u===void 0&&(u=g($,ze));const be=k?g($,ze):u;return be.width=$,be.height=ze,be.getContext("2d").drawImage(I,0,0,$,ze),ye("WebGLRenderer: Texture has been resized from ("+re.width+"x"+re.height+") to ("+$+"x"+ze+")."),be}else return"data"in I&&ye("WebGLRenderer: Image in DataTexture is too big ("+re.width+"x"+re.height+")."),I;return I}function m(I){return I.generateMipmaps}function p(I){r.generateMipmap(I)}function v(I){return I.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:I.isWebGL3DRenderTarget?r.TEXTURE_3D:I.isWebGLArrayRenderTarget||I.isCompressedArrayTexture?r.TEXTURE_2D_ARRAY:r.TEXTURE_2D}function b(I,k,X,ee,re=!1){if(I!==null){if(r[I]!==void 0)return r[I];ye("WebGLRenderer: Attempt to use non-existing WebGL internal format '"+I+"'")}let $=k;if(k===r.RED&&(X===r.FLOAT&&($=r.R32F),X===r.HALF_FLOAT&&($=r.R16F),X===r.UNSIGNED_BYTE&&($=r.R8)),k===r.RED_INTEGER&&(X===r.UNSIGNED_BYTE&&($=r.R8UI),X===r.UNSIGNED_SHORT&&($=r.R16UI),X===r.UNSIGNED_INT&&($=r.R32UI),X===r.BYTE&&($=r.R8I),X===r.SHORT&&($=r.R16I),X===r.INT&&($=r.R32I)),k===r.RG&&(X===r.FLOAT&&($=r.RG32F),X===r.HALF_FLOAT&&($=r.RG16F),X===r.UNSIGNED_BYTE&&($=r.RG8)),k===r.RG_INTEGER&&(X===r.UNSIGNED_BYTE&&($=r.RG8UI),X===r.UNSIGNED_SHORT&&($=r.RG16UI),X===r.UNSIGNED_INT&&($=r.RG32UI),X===r.BYTE&&($=r.RG8I),X===r.SHORT&&($=r.RG16I),X===r.INT&&($=r.RG32I)),k===r.RGB_INTEGER&&(X===r.UNSIGNED_BYTE&&($=r.RGB8UI),X===r.UNSIGNED_SHORT&&($=r.RGB16UI),X===r.UNSIGNED_INT&&($=r.RGB32UI),X===r.BYTE&&($=r.RGB8I),X===r.SHORT&&($=r.RGB16I),X===r.INT&&($=r.RGB32I)),k===r.RGBA_INTEGER&&(X===r.UNSIGNED_BYTE&&($=r.RGBA8UI),X===r.UNSIGNED_SHORT&&($=r.RGBA16UI),X===r.UNSIGNED_INT&&($=r.RGBA32UI),X===r.BYTE&&($=r.RGBA8I),X===r.SHORT&&($=r.RGBA16I),X===r.INT&&($=r.RGBA32I)),k===r.RGB&&(X===r.UNSIGNED_INT_5_9_9_9_REV&&($=r.RGB9_E5),X===r.UNSIGNED_INT_10F_11F_11F_REV&&($=r.R11F_G11F_B10F)),k===r.RGBA){const ze=re?nc:ft.getTransfer(ee);X===r.FLOAT&&($=r.RGBA32F),X===r.HALF_FLOAT&&($=r.RGBA16F),X===r.UNSIGNED_BYTE&&($=ze===Mt?r.SRGB8_ALPHA8:r.RGBA8),X===r.UNSIGNED_SHORT_4_4_4_4&&($=r.RGBA4),X===r.UNSIGNED_SHORT_5_5_5_1&&($=r.RGB5_A1)}return($===r.R16F||$===r.R32F||$===r.RG16F||$===r.RG32F||$===r.RGBA16F||$===r.RGBA32F)&&e.get("EXT_color_buffer_float"),$}function y(I,k){let X;return I?k===null||k===Hi||k===Ro?X=r.DEPTH24_STENCIL8:k===er?X=r.DEPTH32F_STENCIL8:k===Co&&(X=r.DEPTH24_STENCIL8,ye("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):k===null||k===Hi||k===Ro?X=r.DEPTH_COMPONENT24:k===er?X=r.DEPTH_COMPONENT32F:k===Co&&(X=r.DEPTH_COMPONENT16),X}function _(I,k){return m(I)===!0||I.isFramebufferTexture&&I.minFilter!==yn&&I.minFilter!==Jt?Math.log2(Math.max(k.width,k.height))+1:I.mipmaps!==void 0&&I.mipmaps.length>0?I.mipmaps.length:I.isCompressedTexture&&Array.isArray(I.image)?k.mipmaps.length:1}function w(I){const k=I.target;k.removeEventListener("dispose",w),A(k),k.isVideoTexture&&d.delete(k)}function T(I){const k=I.target;k.removeEventListener("dispose",T),S(k)}function A(I){const k=n.get(I);if(k.__webglInit===void 0)return;const X=I.source,ee=h.get(X);if(ee){const re=ee[k.__cacheKey];re.usedTimes--,re.usedTimes===0&&M(I),Object.keys(ee).length===0&&h.delete(X)}n.remove(I)}function M(I){const k=n.get(I);r.deleteTexture(k.__webglTexture);const X=I.source,ee=h.get(X);delete ee[k.__cacheKey],a.memory.textures--}function S(I){const k=n.get(I);if(I.depthTexture&&(I.depthTexture.dispose(),n.remove(I.depthTexture)),I.isWebGLCubeRenderTarget)for(let ee=0;ee<6;ee++){if(Array.isArray(k.__webglFramebuffer[ee]))for(let re=0;re=i.maxTextures&&ye("WebGLTextures: Trying to use "+I+" texture units while this GPU supports only "+i.maxTextures),E+=1,I}function L(I){const k=[];return k.push(I.wrapS),k.push(I.wrapT),k.push(I.wrapR||0),k.push(I.magFilter),k.push(I.minFilter),k.push(I.anisotropy),k.push(I.internalFormat),k.push(I.format),k.push(I.type),k.push(I.generateMipmaps),k.push(I.premultiplyAlpha),k.push(I.flipY),k.push(I.unpackAlignment),k.push(I.colorSpace),k.join()}function F(I,k){const X=n.get(I);if(I.isVideoTexture&&Le(I),I.isRenderTargetTexture===!1&&I.isExternalTexture!==!0&&I.version>0&&X.__version!==I.version){const ee=I.image;if(ee===null)ye("WebGLRenderer: Texture marked for update but no image data found.");else if(ee.complete===!1)ye("WebGLRenderer: Texture marked for update but image is incomplete");else{J(X,I,k);return}}else I.isExternalTexture&&(X.__webglTexture=I.sourceTexture?I.sourceTexture:null);t.bindTexture(r.TEXTURE_2D,X.__webglTexture,r.TEXTURE0+k)}function B(I,k){const X=n.get(I);if(I.isRenderTargetTexture===!1&&I.version>0&&X.__version!==I.version){J(X,I,k);return}else I.isExternalTexture&&(X.__webglTexture=I.sourceTexture?I.sourceTexture:null);t.bindTexture(r.TEXTURE_2D_ARRAY,X.__webglTexture,r.TEXTURE0+k)}function G(I,k){const X=n.get(I);if(I.isRenderTargetTexture===!1&&I.version>0&&X.__version!==I.version){J(X,I,k);return}t.bindTexture(r.TEXTURE_3D,X.__webglTexture,r.TEXTURE0+k)}function O(I,k){const X=n.get(I);if(I.version>0&&X.__version!==I.version){Q(X,I,k);return}t.bindTexture(r.TEXTURE_CUBE_MAP,X.__webglTexture,r.TEXTURE0+k)}const Y={[Jl]:r.REPEAT,[Qn]:r.CLAMP_TO_EDGE,[Ql]:r.MIRRORED_REPEAT},te={[yn]:r.NEAREST,[qp]:r.NEAREST_MIPMAP_NEAREST,[yo]:r.NEAREST_MIPMAP_LINEAR,[Jt]:r.LINEAR,[Ll]:r.LINEAR_MIPMAP_NEAREST,[ti]:r.LINEAR_MIPMAP_LINEAR},de={[Mv]:r.NEVER,[Cv]:r.ALWAYS,[Sv]:r.LESS,[eg]:r.LEQUAL,[Tv]:r.EQUAL,[Ev]:r.GEQUAL,[Av]:r.GREATER,[kv]:r.NOTEQUAL};function Ee(I,k){if(k.type===er&&e.has("OES_texture_float_linear")===!1&&(k.magFilter===Jt||k.magFilter===Ll||k.magFilter===yo||k.magFilter===ti||k.minFilter===Jt||k.minFilter===Ll||k.minFilter===yo||k.minFilter===ti)&&ye("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),r.texParameteri(I,r.TEXTURE_WRAP_S,Y[k.wrapS]),r.texParameteri(I,r.TEXTURE_WRAP_T,Y[k.wrapT]),(I===r.TEXTURE_3D||I===r.TEXTURE_2D_ARRAY)&&r.texParameteri(I,r.TEXTURE_WRAP_R,Y[k.wrapR]),r.texParameteri(I,r.TEXTURE_MAG_FILTER,te[k.magFilter]),r.texParameteri(I,r.TEXTURE_MIN_FILTER,te[k.minFilter]),k.compareFunction&&(r.texParameteri(I,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(I,r.TEXTURE_COMPARE_FUNC,de[k.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(k.magFilter===yn||k.minFilter!==yo&&k.minFilter!==ti||k.type===er&&e.has("OES_texture_float_linear")===!1)return;if(k.anisotropy>1||n.get(k).__currentAnisotropy){const X=e.get("EXT_texture_filter_anisotropic");r.texParameterf(I,X.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(k.anisotropy,i.getMaxAnisotropy())),n.get(k).__currentAnisotropy=k.anisotropy}}}function ve(I,k){let X=!1;I.__webglInit===void 0&&(I.__webglInit=!0,k.addEventListener("dispose",w));const ee=k.source;let re=h.get(ee);re===void 0&&(re={},h.set(ee,re));const $=L(k);if($!==I.__cacheKey){re[$]===void 0&&(re[$]={texture:r.createTexture(),usedTimes:0},a.memory.textures++,X=!0),re[$].usedTimes++;const ze=re[I.__cacheKey];ze!==void 0&&(re[I.__cacheKey].usedTimes--,ze.usedTimes===0&&M(k)),I.__cacheKey=$,I.__webglTexture=re[$].texture}return X}function Ge(I,k,X){return Math.floor(Math.floor(I/X)/k)}function He(I,k,X,ee){const $=I.updateRanges;if($.length===0)t.texSubImage2D(r.TEXTURE_2D,0,0,0,k.width,k.height,X,ee,k.data);else{$.sort((ae,fe)=>ae.start-fe.start);let ze=0;for(let ae=1;ae<$.length;ae++){const fe=$[ze],Ke=$[ae],Ze=fe.start+fe.count,Te=Ge(Ke.start,k.width,4),nt=Ge(fe.start,k.width,4);Ke.start<=Ze+1&&Te===nt&&Ge(Ke.start+Ke.count-1,k.width,4)===Te?fe.count=Math.max(fe.count,Ke.start+Ke.count-fe.start):(++ze,$[ze]=Ke)}$.length=ze+1;const be=r.getParameter(r.UNPACK_ROW_LENGTH),We=r.getParameter(r.UNPACK_SKIP_PIXELS),Fe=r.getParameter(r.UNPACK_SKIP_ROWS);r.pixelStorei(r.UNPACK_ROW_LENGTH,k.width);for(let ae=0,fe=$.length;ae0){V&&_e&&t.texStorage2D(r.TEXTURE_2D,me,Ze,nt[0].width,nt[0].height);for(let le=0,ne=nt.length;le0){const Ne=np(Te.width,Te.height,k.format,k.type);for(const st of k.layerUpdates){const It=Te.data.subarray(st*Ne/Te.data.BYTES_PER_ELEMENT,(st+1)*Ne/Te.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,le,0,0,st,Te.width,Te.height,1,fe,It)}k.clearLayerUpdates()}else t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,le,0,0,0,Te.width,Te.height,ae.depth,fe,Te.data)}else t.compressedTexImage3D(r.TEXTURE_2D_ARRAY,le,Ze,Te.width,Te.height,ae.depth,0,Te.data,0,0);else ye("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else V?ge&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,le,0,0,0,Te.width,Te.height,ae.depth,fe,Ke,Te.data):t.texImage3D(r.TEXTURE_2D_ARRAY,le,Ze,Te.width,Te.height,ae.depth,0,fe,Ke,Te.data)}else{V&&_e&&t.texStorage2D(r.TEXTURE_2D,me,Ze,nt[0].width,nt[0].height);for(let le=0,ne=nt.length;le0){const le=np(ae.width,ae.height,k.format,k.type);for(const ne of k.layerUpdates){const Ne=ae.data.subarray(ne*le/ae.data.BYTES_PER_ELEMENT,(ne+1)*le/ae.data.BYTES_PER_ELEMENT);t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,ne,ae.width,ae.height,1,fe,Ke,Ne)}k.clearLayerUpdates()}else t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,ae.width,ae.height,ae.depth,fe,Ke,ae.data)}else t.texImage3D(r.TEXTURE_2D_ARRAY,0,Ze,ae.width,ae.height,ae.depth,0,fe,Ke,ae.data);else if(k.isData3DTexture)V?(_e&&t.texStorage3D(r.TEXTURE_3D,me,Ze,ae.width,ae.height,ae.depth),ge&&t.texSubImage3D(r.TEXTURE_3D,0,0,0,0,ae.width,ae.height,ae.depth,fe,Ke,ae.data)):t.texImage3D(r.TEXTURE_3D,0,Ze,ae.width,ae.height,ae.depth,0,fe,Ke,ae.data);else if(k.isFramebufferTexture){if(_e)if(V)t.texStorage2D(r.TEXTURE_2D,me,Ze,ae.width,ae.height);else{let le=ae.width,ne=ae.height;for(let Ne=0;Ne>=1,ne>>=1}}else if(nt.length>0){if(V&&_e){const le=Ae(nt[0]);t.texStorage2D(r.TEXTURE_2D,me,Ze,le.width,le.height)}for(let le=0,ne=nt.length;le0&&me++;const ne=Ae(fe[0]);t.texStorage2D(r.TEXTURE_CUBE_MAP,me,nt,ne.width,ne.height)}for(let ne=0;ne<6;ne++)if(ae){V?ge&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ne,0,0,0,fe[ne].width,fe[ne].height,Ze,Te,fe[ne].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+ne,0,nt,fe[ne].width,fe[ne].height,0,Ze,Te,fe[ne].data);for(let Ne=0;Ne>$),Ke=Math.max(1,k.height>>$);re===r.TEXTURE_3D||re===r.TEXTURE_2D_ARRAY?t.texImage3D(re,$,We,fe,Ke,k.depth,0,ze,be,null):t.texImage2D(re,$,We,fe,Ke,0,ze,be,null)}t.bindFramebuffer(r.FRAMEBUFFER,I),oe(k)?o.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,ee,re,ae.__webglTexture,0,he(k)):(re===r.TEXTURE_2D||re>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&re<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,ee,re,ae.__webglTexture,$),t.bindFramebuffer(r.FRAMEBUFFER,null)}function Be(I,k,X){if(r.bindRenderbuffer(r.RENDERBUFFER,I),k.depthBuffer){const ee=k.depthTexture,re=ee&&ee.isDepthTexture?ee.type:null,$=y(k.stencilBuffer,re),ze=k.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,be=he(k);oe(k)?o.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,be,$,k.width,k.height):X?r.renderbufferStorageMultisample(r.RENDERBUFFER,be,$,k.width,k.height):r.renderbufferStorage(r.RENDERBUFFER,$,k.width,k.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,ze,r.RENDERBUFFER,I)}else{const ee=k.textures;for(let re=0;re{delete k.__boundDepthTexture,delete k.__depthDisposeCallback,ee.removeEventListener("dispose",re)};ee.addEventListener("dispose",re),k.__depthDisposeCallback=re}k.__boundDepthTexture=ee}if(I.depthTexture&&!k.__autoAllocateDepthBuffer){if(X)throw new Error("target.depthTexture not supported in Cube render targets");const ee=I.texture.mipmaps;ee&&ee.length>0?Ce(k.__webglFramebuffer[0],I):Ce(k.__webglFramebuffer,I)}else if(X){k.__webglDepthbuffer=[];for(let ee=0;ee<6;ee++)if(t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer[ee]),k.__webglDepthbuffer[ee]===void 0)k.__webglDepthbuffer[ee]=r.createRenderbuffer(),Be(k.__webglDepthbuffer[ee],I,!1);else{const re=I.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,$=k.__webglDepthbuffer[ee];r.bindRenderbuffer(r.RENDERBUFFER,$),r.framebufferRenderbuffer(r.FRAMEBUFFER,re,r.RENDERBUFFER,$)}}else{const ee=I.texture.mipmaps;if(ee&&ee.length>0?t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer[0]):t.bindFramebuffer(r.FRAMEBUFFER,k.__webglFramebuffer),k.__webglDepthbuffer===void 0)k.__webglDepthbuffer=r.createRenderbuffer(),Be(k.__webglDepthbuffer,I,!1);else{const re=I.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,$=k.__webglDepthbuffer;r.bindRenderbuffer(r.RENDERBUFFER,$),r.framebufferRenderbuffer(r.FRAMEBUFFER,re,r.RENDERBUFFER,$)}}t.bindFramebuffer(r.FRAMEBUFFER,null)}function ut(I,k,X){const ee=n.get(I);k!==void 0&&we(ee.__webglFramebuffer,I,I.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),X!==void 0&&it(I)}function Qe(I){const k=I.texture,X=n.get(I),ee=n.get(k);I.addEventListener("dispose",T);const re=I.textures,$=I.isWebGLCubeRenderTarget===!0,ze=re.length>1;if(ze||(ee.__webglTexture===void 0&&(ee.__webglTexture=r.createTexture()),ee.__version=k.version,a.memory.textures++),$){X.__webglFramebuffer=[];for(let be=0;be<6;be++)if(k.mipmaps&&k.mipmaps.length>0){X.__webglFramebuffer[be]=[];for(let We=0;We0){X.__webglFramebuffer=[];for(let be=0;be0&&oe(I)===!1){X.__webglMultisampledFramebuffer=r.createFramebuffer(),X.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,X.__webglMultisampledFramebuffer);for(let be=0;be0)for(let We=0;We0)for(let We=0;We0){if(oe(I)===!1){const k=I.textures,X=I.width,ee=I.height;let re=r.COLOR_BUFFER_BIT;const $=I.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,ze=n.get(I),be=k.length>1;if(be)for(let Fe=0;Fe0?t.bindFramebuffer(r.DRAW_FRAMEBUFFER,ze.__webglFramebuffer[0]):t.bindFramebuffer(r.DRAW_FRAMEBUFFER,ze.__webglFramebuffer);for(let Fe=0;Fe0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&k.__useRenderToTexture!==!1}function Le(I){const k=a.render.frame;d.get(I)!==k&&(d.set(I,k),I.update())}function xe(I,k){const X=I.colorSpace,ee=I.format,re=I.type;return I.isCompressedTexture===!0||I.isVideoTexture===!0||X!==Sa&&X!==Ii&&(ft.getTransfer(X)===Mt?(ee!==Fn||re!==Xr)&&ye("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):tt("WebGLTextures: Unsupported texture color space:",X)),k}function Ae(I){return typeof HTMLImageElement<"u"&&I instanceof HTMLImageElement?(c.width=I.naturalWidth||I.width,c.height=I.naturalHeight||I.height):typeof VideoFrame<"u"&&I instanceof VideoFrame?(c.width=I.displayWidth,c.height=I.displayHeight):(c.width=I.width,c.height=I.height),c}this.allocateTextureUnit=N,this.resetTextureUnits=P,this.setTexture2D=F,this.setTexture2DArray=B,this.setTexture3D=G,this.setTextureCube=O,this.rebindTextures=ut,this.setupRenderTarget=Qe,this.updateRenderTargetMipmap=se,this.updateMultisampleRenderTarget=ce,this.setupDepthRenderbuffer=it,this.setupFrameBufferTexture=we,this.useMultisampledRTT=oe}function z_(r,e){function t(n,i=Ii){let s;const a=ft.getTransfer(i);if(n===Xr)return r.UNSIGNED_BYTE;if(n===wh)return r.UNSIGNED_SHORT_4_4_4_4;if(n===Mh)return r.UNSIGNED_SHORT_5_5_5_1;if(n===jp)return r.UNSIGNED_INT_5_9_9_9_REV;if(n===$p)return r.UNSIGNED_INT_10F_11F_11F_REV;if(n===Yp)return r.BYTE;if(n===Zp)return r.SHORT;if(n===Co)return r.UNSIGNED_SHORT;if(n===_h)return r.INT;if(n===Hi)return r.UNSIGNED_INT;if(n===er)return r.FLOAT;if(n===Da)return r.HALF_FLOAT;if(n===Kp)return r.ALPHA;if(n===Jp)return r.RGB;if(n===Fn)return r.RGBA;if(n===Po)return r.DEPTH_COMPONENT;if(n===Io)return r.DEPTH_STENCIL;if(n===Sh)return r.RED;if(n===Sc)return r.RED_INTEGER;if(n===Th)return r.RG;if(n===Ah)return r.RG_INTEGER;if(n===kh)return r.RGBA_INTEGER;if(n===Nl||n===Ul||n===Fl||n===Ol)if(a===Mt)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(n===Nl)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Ul)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Fl)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Ol)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(n===Nl)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Ul)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Fl)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Ol)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Cu||n===Ru||n===Pu||n===Iu)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(n===Cu)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Ru)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Pu)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Iu)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===Du||n===Lu||n===Nu)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(n===Du||n===Lu)return a===Mt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(n===Nu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===Uu||n===Fu||n===Ou||n===Bu||n===zu||n===Vu||n===Gu||n===Hu||n===Wu||n===Xu||n===qu||n===Yu||n===Zu||n===ju)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(n===Uu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===Fu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===Ou)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===Bu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===zu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===Vu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===Gu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===Hu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===Wu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===Xu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===qu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===Yu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===Zu)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===ju)return a===Mt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===$u||n===Ku||n===Ju)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(n===$u)return a===Mt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===Ku)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===Ju)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Qu||n===eh||n===th||n===nh)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(n===Qu)return s.COMPRESSED_RED_RGTC1_EXT;if(n===eh)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===th)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===nh)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===Ro?r.UNSIGNED_INT_24_8:r[n]!==void 0?r[n]:null}return{convert:t}}const QC=` -void main() { - - gl_Position = vec4( position, 1.0 ); - -}`,eR=` -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 tR{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const n=new ug(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 Rr({vertexShader:QC,fragmentShader:eR,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Qt(new Xo(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class nR extends ui{constructor(e,t){super();const n=this;let i=null,s=1,a=null,o="local-floor",l=1,c=null,d=null,u=null,h=null,f=null,g=null;const x=typeof XRWebGLBinding<"u",m=new tR,p={},v=t.getContextAttributes();let b=null,y=null;const _=[],w=[],T=new K;let A=null;const M=new hn;M.viewport=new rt;const S=new hn;S.viewport=new rt;const E=[M,S],P=new E_;let N=null,L=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(J){let Q=_[J];return Q===void 0&&(Q=new au,_[J]=Q),Q.getTargetRaySpace()},this.getControllerGrip=function(J){let Q=_[J];return Q===void 0&&(Q=new au,_[J]=Q),Q.getGripSpace()},this.getHand=function(J){let Q=_[J];return Q===void 0&&(Q=new au,_[J]=Q),Q.getHandSpace()};function F(J){const Q=w.indexOf(J.inputSource);if(Q===-1)return;const we=_[Q];we!==void 0&&(we.update(J.inputSource,J.frame,c||a),we.dispatchEvent({type:J.type,data:J.inputSource}))}function B(){i.removeEventListener("select",F),i.removeEventListener("selectstart",F),i.removeEventListener("selectend",F),i.removeEventListener("squeeze",F),i.removeEventListener("squeezestart",F),i.removeEventListener("squeezeend",F),i.removeEventListener("end",B),i.removeEventListener("inputsourceschange",G);for(let J=0;J<_.length;J++){const Q=w[J];Q!==null&&(w[J]=null,_[J].disconnect(Q))}N=null,L=null,m.reset();for(const J in p)delete p[J];e.setRenderTarget(b),f=null,h=null,u=null,i=null,y=null,He.stop(),n.isPresenting=!1,e.setPixelRatio(A),e.setSize(T.width,T.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(J){s=J,n.isPresenting===!0&&ye("WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(J){o=J,n.isPresenting===!0&&ye("WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return c||a},this.setReferenceSpace=function(J){c=J},this.getBaseLayer=function(){return h!==null?h:f},this.getBinding=function(){return u===null&&x&&(u=new XRWebGLBinding(i,t)),u},this.getFrame=function(){return g},this.getSession=function(){return i},this.setSession=async function(J){if(i=J,i!==null){if(b=e.getRenderTarget(),i.addEventListener("select",F),i.addEventListener("selectstart",F),i.addEventListener("selectend",F),i.addEventListener("squeeze",F),i.addEventListener("squeezestart",F),i.addEventListener("squeezeend",F),i.addEventListener("end",B),i.addEventListener("inputsourceschange",G),v.xrCompatible!==!0&&await t.makeXRCompatible(),A=e.getPixelRatio(),e.getSize(T),x&&"createProjectionLayer"in XRWebGLBinding.prototype){let we=null,Be=null,Ce=null;v.depth&&(Ce=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,we=v.stencil?Io:Po,Be=v.stencil?Ro:Hi);const it={colorFormat:t.RGBA8,depthFormat:Ce,scaleFactor:s};u=this.getBinding(),h=u.createProjectionLayer(it),i.updateRenderState({layers:[h]}),e.setPixelRatio(1),e.setSize(h.textureWidth,h.textureHeight,!1),y=new oi(h.textureWidth,h.textureHeight,{format:Fn,type:Xr,depthTexture:new dg(h.textureWidth,h.textureHeight,Be,void 0,void 0,void 0,void 0,void 0,void 0,we),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0,resolveDepthBuffer:h.ignoreDepthValues===!1,resolveStencilBuffer:h.ignoreDepthValues===!1})}else{const we={antialias:v.antialias,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:s};f=new XRWebGLLayer(i,t,we),i.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),y=new oi(f.framebufferWidth,f.framebufferHeight,{format:Fn,type:Xr,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil,resolveDepthBuffer:f.ignoreDepthValues===!1,resolveStencilBuffer:f.ignoreDepthValues===!1})}y.isXRRenderTarget=!0,this.setFoveation(l),c=null,a=await i.requestReferenceSpace(o),He.setContext(i),He.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode},this.getDepthTexture=function(){return m.getDepthTexture()};function G(J){for(let Q=0;Q=0&&(w[Be]=null,_[Be].disconnect(we))}for(let Q=0;Q=w.length){w.push(we),Be=it;break}else if(w[it]===null){w[it]=we,Be=it;break}if(Be===-1)break}const Ce=_[Be];Ce&&Ce.connect(we)}}const O=new C,Y=new C;function te(J,Q,we){O.setFromMatrixPosition(Q.matrixWorld),Y.setFromMatrixPosition(we.matrixWorld);const Be=O.distanceTo(Y),Ce=Q.projectionMatrix.elements,it=we.projectionMatrix.elements,ut=Ce[14]/(Ce[10]-1),Qe=Ce[14]/(Ce[10]+1),se=(Ce[9]+1)/Ce[5],D=(Ce[9]-1)/Ce[5],ie=(Ce[8]-1)/Ce[0],ce=(it[8]+1)/it[0],he=ut*ie,oe=ut*ce,Le=Be/(-ie+ce),xe=Le*-ie;if(Q.matrixWorld.decompose(J.position,J.quaternion,J.scale),J.translateX(xe),J.translateZ(Le),J.matrixWorld.compose(J.position,J.quaternion,J.scale),J.matrixWorldInverse.copy(J.matrixWorld).invert(),Ce[10]===-1)J.projectionMatrix.copy(Q.projectionMatrix),J.projectionMatrixInverse.copy(Q.projectionMatrixInverse);else{const Ae=ut+Le,I=Qe+Le,k=he-xe,X=oe+(Be-xe),ee=se*Qe/I*Ae,re=D*Qe/I*Ae;J.projectionMatrix.makePerspective(k,X,ee,re,Ae,I),J.projectionMatrixInverse.copy(J.projectionMatrix).invert()}}function de(J,Q){Q===null?J.matrixWorld.copy(J.matrix):J.matrixWorld.multiplyMatrices(Q.matrixWorld,J.matrix),J.matrixWorldInverse.copy(J.matrixWorld).invert()}this.updateCamera=function(J){if(i===null)return;let Q=J.near,we=J.far;m.texture!==null&&(m.depthNear>0&&(Q=m.depthNear),m.depthFar>0&&(we=m.depthFar)),P.near=S.near=M.near=Q,P.far=S.far=M.far=we,(N!==P.near||L!==P.far)&&(i.updateRenderState({depthNear:P.near,depthFar:P.far}),N=P.near,L=P.far),P.layers.mask=J.layers.mask|6,M.layers.mask=P.layers.mask&3,S.layers.mask=P.layers.mask&5;const Be=J.parent,Ce=P.cameras;de(P,Be);for(let it=0;it0&&(m.alphaTest.value=p.alphaTest);const v=e.get(p),b=v.envMap,y=v.envMapRotation;b&&(m.envMap.value=b,Ys.copy(y),Ys.x*=-1,Ys.y*=-1,Ys.z*=-1,b.isCubeTexture&&b.isRenderTargetTexture===!1&&(Ys.y*=-1,Ys.z*=-1),m.envMapRotation.value.setFromMatrix4(rR.makeRotationFromEuler(Ys)),m.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,m.reflectivity.value=p.reflectivity,m.ior.value=p.ior,m.refractionRatio.value=p.refractionRatio),p.lightMap&&(m.lightMap.value=p.lightMap,m.lightMapIntensity.value=p.lightMapIntensity,t(p.lightMap,m.lightMapTransform)),p.aoMap&&(m.aoMap.value=p.aoMap,m.aoMapIntensity.value=p.aoMapIntensity,t(p.aoMap,m.aoMapTransform))}function a(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,p.map&&(m.map.value=p.map,t(p.map,m.mapTransform))}function o(m,p){m.dashSize.value=p.dashSize,m.totalSize.value=p.dashSize+p.gapSize,m.scale.value=p.scale}function l(m,p,v,b){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.size.value=p.size*v,m.scale.value=b*.5,p.map&&(m.map.value=p.map,t(p.map,m.uvTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function c(m,p){m.diffuse.value.copy(p.color),m.opacity.value=p.opacity,m.rotation.value=p.rotation,p.map&&(m.map.value=p.map,t(p.map,m.mapTransform)),p.alphaMap&&(m.alphaMap.value=p.alphaMap,t(p.alphaMap,m.alphaMapTransform)),p.alphaTest>0&&(m.alphaTest.value=p.alphaTest)}function d(m,p){m.specular.value.copy(p.specular),m.shininess.value=Math.max(p.shininess,1e-4)}function u(m,p){p.gradientMap&&(m.gradientMap.value=p.gradientMap)}function h(m,p){m.metalness.value=p.metalness,p.metalnessMap&&(m.metalnessMap.value=p.metalnessMap,t(p.metalnessMap,m.metalnessMapTransform)),m.roughness.value=p.roughness,p.roughnessMap&&(m.roughnessMap.value=p.roughnessMap,t(p.roughnessMap,m.roughnessMapTransform)),p.envMap&&(m.envMapIntensity.value=p.envMapIntensity)}function f(m,p,v){m.ior.value=p.ior,p.sheen>0&&(m.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen),m.sheenRoughness.value=p.sheenRoughness,p.sheenColorMap&&(m.sheenColorMap.value=p.sheenColorMap,t(p.sheenColorMap,m.sheenColorMapTransform)),p.sheenRoughnessMap&&(m.sheenRoughnessMap.value=p.sheenRoughnessMap,t(p.sheenRoughnessMap,m.sheenRoughnessMapTransform))),p.clearcoat>0&&(m.clearcoat.value=p.clearcoat,m.clearcoatRoughness.value=p.clearcoatRoughness,p.clearcoatMap&&(m.clearcoatMap.value=p.clearcoatMap,t(p.clearcoatMap,m.clearcoatMapTransform)),p.clearcoatRoughnessMap&&(m.clearcoatRoughnessMap.value=p.clearcoatRoughnessMap,t(p.clearcoatRoughnessMap,m.clearcoatRoughnessMapTransform)),p.clearcoatNormalMap&&(m.clearcoatNormalMap.value=p.clearcoatNormalMap,t(p.clearcoatNormalMap,m.clearcoatNormalMapTransform),m.clearcoatNormalScale.value.copy(p.clearcoatNormalScale),p.side===En&&m.clearcoatNormalScale.value.negate())),p.dispersion>0&&(m.dispersion.value=p.dispersion),p.iridescence>0&&(m.iridescence.value=p.iridescence,m.iridescenceIOR.value=p.iridescenceIOR,m.iridescenceThicknessMinimum.value=p.iridescenceThicknessRange[0],m.iridescenceThicknessMaximum.value=p.iridescenceThicknessRange[1],p.iridescenceMap&&(m.iridescenceMap.value=p.iridescenceMap,t(p.iridescenceMap,m.iridescenceMapTransform)),p.iridescenceThicknessMap&&(m.iridescenceThicknessMap.value=p.iridescenceThicknessMap,t(p.iridescenceThicknessMap,m.iridescenceThicknessMapTransform))),p.transmission>0&&(m.transmission.value=p.transmission,m.transmissionSamplerMap.value=v.texture,m.transmissionSamplerSize.value.set(v.width,v.height),p.transmissionMap&&(m.transmissionMap.value=p.transmissionMap,t(p.transmissionMap,m.transmissionMapTransform)),m.thickness.value=p.thickness,p.thicknessMap&&(m.thicknessMap.value=p.thicknessMap,t(p.thicknessMap,m.thicknessMapTransform)),m.attenuationDistance.value=p.attenuationDistance,m.attenuationColor.value.copy(p.attenuationColor)),p.anisotropy>0&&(m.anisotropyVector.value.set(p.anisotropy*Math.cos(p.anisotropyRotation),p.anisotropy*Math.sin(p.anisotropyRotation)),p.anisotropyMap&&(m.anisotropyMap.value=p.anisotropyMap,t(p.anisotropyMap,m.anisotropyMapTransform))),m.specularIntensity.value=p.specularIntensity,m.specularColor.value.copy(p.specularColor),p.specularColorMap&&(m.specularColorMap.value=p.specularColorMap,t(p.specularColorMap,m.specularColorMapTransform)),p.specularIntensityMap&&(m.specularIntensityMap.value=p.specularIntensityMap,t(p.specularIntensityMap,m.specularIntensityMapTransform))}function g(m,p){p.matcap&&(m.matcap.value=p.matcap)}function x(m,p){const v=e.get(p).light;m.referencePosition.value.setFromMatrixPosition(v.matrixWorld),m.nearDistance.value=v.shadow.camera.near,m.farDistance.value=v.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function sR(r,e,t,n){let i={},s={},a=[];const o=r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS);function l(v,b){const y=b.program;n.uniformBlockBinding(v,y)}function c(v,b){let y=i[v.id];y===void 0&&(g(v),y=d(v),i[v.id]=y,v.addEventListener("dispose",m));const _=b.program;n.updateUBOMapping(v,_);const w=e.render.frame;s[v.id]!==w&&(h(v),s[v.id]=w)}function d(v){const b=u();v.__bindingPointIndex=b;const y=r.createBuffer(),_=v.__size,w=v.usage;return r.bindBuffer(r.UNIFORM_BUFFER,y),r.bufferData(r.UNIFORM_BUFFER,_,w),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,b,y),y}function u(){for(let v=0;v0&&(y+=_-w),v.__size=y,v.__cache={},this}function x(v){const b={boundary:0,storage:0};return typeof v=="number"||typeof v=="boolean"?(b.boundary=4,b.storage=4):v.isVector2?(b.boundary=8,b.storage=8):v.isVector3||v.isColor?(b.boundary=16,b.storage=12):v.isVector4?(b.boundary=16,b.storage=16):v.isMatrix3?(b.boundary=48,b.storage=48):v.isMatrix4?(b.boundary=64,b.storage=64):v.isTexture?ye("WebGLRenderer: Texture samplers can not be part of an uniforms group."):ye("WebGLRenderer: Unsupported uniform value type.",v),b}function m(v){const b=v.target;b.removeEventListener("dispose",m);const y=a.indexOf(b.__bindingPointIndex);a.splice(y,1),r.deleteBuffer(i[b.id]),delete i[b.id],delete s[b.id]}function p(){for(const v in i)r.deleteBuffer(i[v]);a=[],i={},s={}}return{bind:l,update:c,dispose:p}}const aR=new Uint16Array([11481,15204,11534,15171,11808,15015,12385,14843,12894,14716,13396,14600,13693,14483,13976,14366,14237,14171,14405,13961,14511,13770,14605,13598,14687,13444,14760,13305,14822,13066,14876,12857,14923,12675,14963,12517,14997,12379,15025,12230,15049,12023,15070,11843,15086,11687,15100,11551,15111,11433,15120,11330,15127,11217,15132,11060,15135,10922,15138,10801,15139,10695,15139,10600,13012,14923,13020,14917,13064,14886,13176,14800,13349,14666,13513,14526,13724,14398,13960,14230,14200,14020,14383,13827,14488,13651,14583,13491,14667,13348,14740,13132,14803,12908,14856,12713,14901,12542,14938,12394,14968,12241,14992,12017,15010,11822,15024,11654,15034,11507,15041,11380,15044,11269,15044,11081,15042,10913,15037,10764,15031,10635,15023,10520,15014,10419,15003,10330,13657,14676,13658,14673,13670,14660,13698,14622,13750,14547,13834,14442,13956,14317,14112,14093,14291,13889,14407,13704,14499,13538,14586,13389,14664,13201,14733,12966,14792,12758,14842,12577,14882,12418,14915,12272,14940,12033,14959,11826,14972,11646,14980,11490,14983,11355,14983,11212,14979,11008,14971,10830,14961,10675,14950,10540,14936,10420,14923,10315,14909,10204,14894,10041,14089,14460,14090,14459,14096,14452,14112,14431,14141,14388,14186,14305,14252,14130,14341,13941,14399,13756,14467,13585,14539,13430,14610,13272,14677,13026,14737,12808,14790,12617,14833,12449,14869,12303,14896,12065,14916,11845,14929,11655,14937,11490,14939,11347,14936,11184,14930,10970,14921,10783,14912,10621,14900,10480,14885,10356,14867,10247,14848,10062,14827,9894,14805,9745,14400,14208,14400,14206,14402,14198,14406,14174,14415,14122,14427,14035,14444,13913,14469,13767,14504,13613,14548,13463,14598,13324,14651,13082,14704,12858,14752,12658,14795,12483,14831,12330,14860,12106,14881,11875,14895,11675,14903,11501,14905,11351,14903,11178,14900,10953,14892,10757,14880,10589,14865,10442,14847,10313,14827,10162,14805,9965,14782,9792,14757,9642,14731,9507,14562,13883,14562,13883,14563,13877,14566,13862,14570,13830,14576,13773,14584,13689,14595,13582,14613,13461,14637,13336,14668,13120,14704,12897,14741,12695,14776,12516,14808,12358,14835,12150,14856,11910,14870,11701,14878,11519,14882,11361,14884,11187,14880,10951,14871,10748,14858,10572,14842,10418,14823,10286,14801,10099,14777,9897,14751,9722,14725,9567,14696,9430,14666,9309,14702,13604,14702,13604,14702,13600,14703,13591,14705,13570,14707,13533,14709,13477,14712,13400,14718,13305,14727,13106,14743,12907,14762,12716,14784,12539,14807,12380,14827,12190,14844,11943,14855,11727,14863,11539,14870,11376,14871,11204,14868,10960,14858,10748,14845,10565,14829,10406,14809,10269,14786,10058,14761,9852,14734,9671,14705,9512,14674,9374,14641,9253,14608,9076,14821,13366,14821,13365,14821,13364,14821,13358,14821,13344,14821,13320,14819,13252,14817,13145,14815,13011,14814,12858,14817,12698,14823,12539,14832,12389,14841,12214,14850,11968,14856,11750,14861,11558,14866,11390,14867,11226,14862,10972,14853,10754,14840,10565,14823,10401,14803,10259,14780,10032,14754,9820,14725,9635,14694,9473,14661,9333,14627,9203,14593,8988,14557,8798,14923,13014,14922,13014,14922,13012,14922,13004,14920,12987,14919,12957,14915,12907,14909,12834,14902,12738,14894,12623,14888,12498,14883,12370,14880,12203,14878,11970,14875,11759,14873,11569,14874,11401,14872,11243,14865,10986,14855,10762,14842,10568,14825,10401,14804,10255,14781,10017,14754,9799,14725,9611,14692,9445,14658,9301,14623,9139,14587,8920,14548,8729,14509,8562,15008,12672,15008,12672,15008,12671,15007,12667,15005,12656,15001,12637,14997,12605,14989,12556,14978,12490,14966,12407,14953,12313,14940,12136,14927,11934,14914,11742,14903,11563,14896,11401,14889,11247,14879,10992,14866,10767,14851,10570,14833,10400,14812,10252,14789,10007,14761,9784,14731,9592,14698,9424,14663,9279,14627,9088,14588,8868,14548,8676,14508,8508,14467,8360,15080,12386,15080,12386,15079,12385,15078,12383,15076,12378,15072,12367,15066,12347,15057,12315,15045,12253,15030,12138,15012,11998,14993,11845,14972,11685,14951,11530,14935,11383,14920,11228,14904,10981,14887,10762,14870,10567,14850,10397,14827,10248,14803,9997,14774,9771,14743,9578,14710,9407,14674,9259,14637,9048,14596,8826,14555,8632,14514,8464,14471,8317,14427,8182,15139,12008,15139,12008,15138,12008,15137,12007,15135,12003,15130,11990,15124,11969,15115,11929,15102,11872,15086,11794,15064,11693,15041,11581,15013,11459,14987,11336,14966,11170,14944,10944,14921,10738,14898,10552,14875,10387,14850,10239,14824,9983,14794,9758,14762,9563,14728,9392,14692,9244,14653,9014,14611,8791,14569,8597,14526,8427,14481,8281,14436,8110,14391,7885,15188,11617,15188,11617,15187,11617,15186,11618,15183,11617,15179,11612,15173,11601,15163,11581,15150,11546,15133,11495,15110,11427,15083,11346,15051,11246,15024,11057,14996,10868,14967,10687,14938,10517,14911,10362,14882,10206,14853,9956,14821,9737,14787,9543,14752,9375,14715,9228,14675,8980,14632,8760,14589,8565,14544,8395,14498,8248,14451,8049,14404,7824,14357,7630,15228,11298,15228,11298,15227,11299,15226,11301,15223,11303,15219,11302,15213,11299,15204,11290,15191,11271,15174,11217,15150,11129,15119,11015,15087,10886,15057,10744,15024,10599,14990,10455,14957,10318,14924,10143,14891,9911,14856,9701,14820,9516,14782,9352,14744,9200,14703,8946,14659,8725,14615,8533,14568,8366,14521,8220,14472,7992,14423,7770,14374,7578,14315,7408,15260,10819,15260,10819,15259,10822,15258,10826,15256,10832,15251,10836,15246,10841,15237,10838,15225,10821,15207,10788,15183,10734,15151,10660,15120,10571,15087,10469,15049,10359,15012,10249,14974,10041,14937,9837,14900,9647,14860,9475,14820,9320,14779,9147,14736,8902,14691,8688,14646,8499,14598,8335,14549,8189,14499,7940,14448,7720,14397,7529,14347,7363,14256,7218,15285,10410,15285,10411,15285,10413,15284,10418,15282,10425,15278,10434,15272,10442,15264,10449,15252,10445,15235,10433,15210,10403,15179,10358,15149,10301,15113,10218,15073,10059,15033,9894,14991,9726,14951,9565,14909,9413,14865,9273,14822,9073,14777,8845,14730,8641,14682,8459,14633,8300,14583,8129,14531,7883,14479,7670,14426,7482,14373,7321,14305,7176,14201,6939,15305,9939,15305,9940,15305,9945,15304,9955,15302,9967,15298,9989,15293,10010,15286,10033,15274,10044,15258,10045,15233,10022,15205,9975,15174,9903,15136,9808,15095,9697,15053,9578,15009,9451,14965,9327,14918,9198,14871,8973,14825,8766,14775,8579,14725,8408,14675,8259,14622,8058,14569,7821,14515,7615,14460,7435,14405,7276,14350,7108,14256,6866,14149,6653,15321,9444,15321,9445,15321,9448,15320,9458,15317,9470,15314,9490,15310,9515,15302,9540,15292,9562,15276,9579,15251,9577,15226,9559,15195,9519,15156,9463,15116,9389,15071,9304,15025,9208,14978,9023,14927,8838,14878,8661,14827,8496,14774,8344,14722,8206,14667,7973,14612,7749,14556,7555,14499,7382,14443,7229,14385,7025,14322,6791,14210,6588,14100,6409,15333,8920,15333,8921,15332,8927,15332,8943,15329,8965,15326,9002,15322,9048,15316,9106,15307,9162,15291,9204,15267,9221,15244,9221,15212,9196,15175,9134,15133,9043,15088,8930,15040,8801,14990,8665,14938,8526,14886,8391,14830,8261,14775,8087,14719,7866,14661,7664,14603,7482,14544,7322,14485,7178,14426,6936,14367,6713,14281,6517,14166,6348,14054,6198,15341,8360,15341,8361,15341,8366,15341,8379,15339,8399,15336,8431,15332,8473,15326,8527,15318,8585,15302,8632,15281,8670,15258,8690,15227,8690,15191,8664,15149,8612,15104,8543,15055,8456,15001,8360,14948,8259,14892,8122,14834,7923,14776,7734,14716,7558,14656,7397,14595,7250,14534,7070,14472,6835,14410,6628,14350,6443,14243,6283,14125,6135,14010,5889,15348,7715,15348,7717,15348,7725,15347,7745,15345,7780,15343,7836,15339,7905,15334,8e3,15326,8103,15310,8193,15293,8239,15270,8270,15240,8287,15204,8283,15163,8260,15118,8223,15067,8143,15014,8014,14958,7873,14899,7723,14839,7573,14778,7430,14715,7293,14652,7164,14588,6931,14524,6720,14460,6531,14396,6362,14330,6210,14207,6015,14086,5781,13969,5576,15352,7114,15352,7116,15352,7128,15352,7159,15350,7195,15348,7237,15345,7299,15340,7374,15332,7457,15317,7544,15301,7633,15280,7703,15251,7754,15216,7775,15176,7767,15131,7733,15079,7670,15026,7588,14967,7492,14906,7387,14844,7278,14779,7171,14714,6965,14648,6770,14581,6587,14515,6420,14448,6269,14382,6123,14299,5881,14172,5665,14049,5477,13929,5310,15355,6329,15355,6330,15355,6339,15355,6362,15353,6410,15351,6472,15349,6572,15344,6688,15337,6835,15323,6985,15309,7142,15287,7220,15260,7277,15226,7310,15188,7326,15142,7318,15090,7285,15036,7239,14976,7177,14914,7045,14849,6892,14782,6736,14714,6581,14645,6433,14576,6293,14506,6164,14438,5946,14369,5733,14270,5540,14140,5369,14014,5216,13892,5043,15357,5483,15357,5484,15357,5496,15357,5528,15356,5597,15354,5692,15351,5835,15347,6011,15339,6195,15328,6317,15314,6446,15293,6566,15268,6668,15235,6746,15197,6796,15152,6811,15101,6790,15046,6748,14985,6673,14921,6583,14854,6479,14785,6371,14714,6259,14643,6149,14571,5946,14499,5750,14428,5567,14358,5401,14242,5250,14109,5111,13980,4870,13856,4657,15359,4555,15359,4557,15358,4573,15358,4633,15357,4715,15355,4841,15353,5061,15349,5216,15342,5391,15331,5577,15318,5770,15299,5967,15274,6150,15243,6223,15206,6280,15161,6310,15111,6317,15055,6300,14994,6262,14928,6208,14860,6141,14788,5994,14715,5838,14641,5684,14566,5529,14492,5384,14418,5247,14346,5121,14216,4892,14079,4682,13948,4496,13822,4330,15359,3498,15359,3501,15359,3520,15359,3598,15358,3719,15356,3860,15355,4137,15351,4305,15344,4563,15334,4809,15321,5116,15303,5273,15280,5418,15250,5547,15214,5653,15170,5722,15120,5761,15064,5763,15002,5733,14935,5673,14865,5597,14792,5504,14716,5400,14640,5294,14563,5185,14486,5041,14410,4841,14335,4655,14191,4482,14051,4325,13918,4183,13790,4012,15360,2282,15360,2285,15360,2306,15360,2401,15359,2547,15357,2748,15355,3103,15352,3349,15345,3675,15336,4020,15324,4272,15307,4496,15285,4716,15255,4908,15220,5086,15178,5170,15128,5214,15072,5234,15010,5231,14943,5206,14871,5166,14796,5102,14718,4971,14639,4833,14559,4687,14480,4541,14402,4401,14315,4268,14167,4142,14025,3958,13888,3747,13759,3556,15360,923,15360,925,15360,946,15360,1052,15359,1214,15357,1494,15356,1892,15352,2274,15346,2663,15338,3099,15326,3393,15309,3679,15288,3980,15260,4183,15226,4325,15185,4437,15136,4517,15080,4570,15018,4591,14950,4581,14877,4545,14800,4485,14720,4411,14638,4325,14556,4231,14475,4136,14395,3988,14297,3803,14145,3628,13999,3465,13861,3314,13729,3177,15360,263,15360,264,15360,272,15360,325,15359,407,15358,548,15356,780,15352,1144,15347,1580,15339,2099,15328,2425,15312,2795,15292,3133,15264,3329,15232,3517,15191,3689,15143,3819,15088,3923,15025,3978,14956,3999,14882,3979,14804,3931,14722,3855,14639,3756,14554,3645,14470,3529,14388,3409,14279,3289,14124,3173,13975,3055,13834,2848,13701,2658,15360,49,15360,49,15360,52,15360,75,15359,111,15358,201,15356,283,15353,519,15348,726,15340,1045,15329,1415,15314,1795,15295,2173,15269,2410,15237,2649,15197,2866,15150,3054,15095,3140,15032,3196,14963,3228,14888,3236,14808,3224,14725,3191,14639,3146,14553,3088,14466,2976,14382,2836,14262,2692,14103,2549,13952,2409,13808,2278,13674,2154,15360,4,15360,4,15360,4,15360,13,15359,33,15358,59,15357,112,15353,199,15348,302,15341,456,15331,628,15316,827,15297,1082,15272,1332,15241,1601,15202,1851,15156,2069,15101,2172,15039,2256,14970,2314,14894,2348,14813,2358,14728,2344,14640,2311,14551,2263,14463,2203,14376,2133,14247,2059,14084,1915,13930,1761,13784,1609,13648,1464,15360,0,15360,0,15360,0,15360,3,15359,18,15358,26,15357,53,15354,80,15348,97,15341,165,15332,238,15318,326,15299,427,15275,529,15245,654,15207,771,15161,885,15108,994,15046,1089,14976,1170,14900,1229,14817,1266,14731,1284,14641,1282,14550,1260,14460,1223,14370,1174,14232,1116,14066,1050,13909,981,13761,910,13623,839]);let yi=null;function oR(){return yi===null&&(yi=new Gr(aR,32,32,Th,Da),yi.minFilter=Jt,yi.magFilter=Jt,yi.wrapS=Qn,yi.wrapT=Qn,yi.generateMipmaps=!1,yi.needsUpdate=!0),yi}class V_{constructor(e={}){const{canvas:t=Pv(),context:n=null,depth:i=!0,stencil:s=!1,alpha:a=!1,antialias:o=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:d="default",failIfMajorPerformanceCaveat:u=!1,reversedDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let f;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");f=n.getContextAttributes().alpha}else f=a;const g=new Set([kh,Ah,Sc]),x=new Set([Xr,Hi,Co,Ro,wh,Mh]),m=new Uint32Array(4),p=new Int32Array(4);let v=null,b=null;const y=[],_=[];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=Fi,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const w=this;let T=!1;this._outputColorSpace=jn;let A=0,M=0,S=null,E=-1,P=null;const N=new rt,L=new rt;let F=null;const B=new Se(0);let G=0,O=t.width,Y=t.height,te=1,de=null,Ee=null;const ve=new rt(0,0,O,Y),Ge=new rt(0,0,O,Y);let He=!1;const J=new Ho;let Q=!1,we=!1;const Be=new De,Ce=new C,it=new rt,ut={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Qe=!1;function se(){return S===null?te:1}let D=n;function ie(R,H){return t.getContext(R,H)}try{const R={alpha:!0,depth:i,stencil:s,antialias:o,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:d,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Vo}`),t.addEventListener("webglcontextlost",le,!1),t.addEventListener("webglcontextrestored",ne,!1),t.addEventListener("webglcontextcreationerror",Ne,!1),D===null){const H="webgl2";if(D=ie(H,R),D===null)throw ie(H)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(R){throw R("WebGLRenderer: "+R.message),R}let ce,he,oe,Le,xe,Ae,I,k,X,ee,re,$,ze,be,We,Fe,ae,fe,Ke,Ze,Te,nt,V,_e;function ge(){ce=new xE(D),ce.init(),nt=new z_(D,ce),he=new lE(D,ce,e,nt),oe=new KC(D,ce),he.reversedDepthBuffer&&h&&oe.buffers.depth.setReversed(!0),Le=new vE(D),xe=new OC,Ae=new JC(D,ce,oe,xe,he,nt,Le),I=new dE(w),k=new mE(w),X=new S2(D),V=new aE(D,X),ee=new bE(D,X,Le,V),re=new wE(D,ee,X,Le),Ke=new _E(D,he,Ae),Fe=new cE(xe),$=new FC(w,I,k,ce,he,V,Fe),ze=new iR(w,xe),be=new zC,We=new qC(ce),fe=new sE(w,I,k,oe,re,f,l),ae=new jC(w,re,he),_e=new sR(D,Le,he,oe),Ze=new oE(D,ce,Le),Te=new yE(D,ce,Le),Le.programs=$.programs,w.capabilities=he,w.extensions=ce,w.properties=xe,w.renderLists=be,w.shadowMap=ae,w.state=oe,w.info=Le}ge();const me=new nR(w,D);this.xr=me,this.getContext=function(){return D},this.getContextAttributes=function(){return D.getContextAttributes()},this.forceContextLoss=function(){const R=ce.get("WEBGL_lose_context");R&&R.loseContext()},this.forceContextRestore=function(){const R=ce.get("WEBGL_lose_context");R&&R.restoreContext()},this.getPixelRatio=function(){return te},this.setPixelRatio=function(R){R!==void 0&&(te=R,this.setSize(O,Y,!1))},this.getSize=function(R){return R.set(O,Y)},this.setSize=function(R,H,Z=!0){if(me.isPresenting){ye("WebGLRenderer: Can't change size while VR device is presenting.");return}O=R,Y=H,t.width=Math.floor(R*te),t.height=Math.floor(H*te),Z===!0&&(t.style.width=R+"px",t.style.height=H+"px"),this.setViewport(0,0,R,H)},this.getDrawingBufferSize=function(R){return R.set(O*te,Y*te).floor()},this.setDrawingBufferSize=function(R,H,Z){O=R,Y=H,te=Z,t.width=Math.floor(R*Z),t.height=Math.floor(H*Z),this.setViewport(0,0,R,H)},this.getCurrentViewport=function(R){return R.copy(N)},this.getViewport=function(R){return R.copy(ve)},this.setViewport=function(R,H,Z,j){R.isVector4?ve.set(R.x,R.y,R.z,R.w):ve.set(R,H,Z,j),oe.viewport(N.copy(ve).multiplyScalar(te).round())},this.getScissor=function(R){return R.copy(Ge)},this.setScissor=function(R,H,Z,j){R.isVector4?Ge.set(R.x,R.y,R.z,R.w):Ge.set(R,H,Z,j),oe.scissor(L.copy(Ge).multiplyScalar(te).round())},this.getScissorTest=function(){return He},this.setScissorTest=function(R){oe.setScissorTest(He=R)},this.setOpaqueSort=function(R){de=R},this.setTransparentSort=function(R){Ee=R},this.getClearColor=function(R){return R.copy(fe.getClearColor())},this.setClearColor=function(){fe.setClearColor(...arguments)},this.getClearAlpha=function(){return fe.getClearAlpha()},this.setClearAlpha=function(){fe.setClearAlpha(...arguments)},this.clear=function(R=!0,H=!0,Z=!0){let j=0;if(R){let W=!1;if(S!==null){const ue=S.texture.format;W=g.has(ue)}if(W){const ue=S.texture.type,Me=x.has(ue),Ue=fe.getClearColor(),Re=fe.getClearAlpha(),je=Ue.r,et=Ue.g,Xe=Ue.b;Me?(m[0]=je,m[1]=et,m[2]=Xe,m[3]=Re,D.clearBufferuiv(D.COLOR,0,m)):(p[0]=je,p[1]=et,p[2]=Xe,p[3]=Re,D.clearBufferiv(D.COLOR,0,p))}else j|=D.COLOR_BUFFER_BIT}H&&(j|=D.DEPTH_BUFFER_BIT),Z&&(j|=D.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),D.clear(j)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",le,!1),t.removeEventListener("webglcontextrestored",ne,!1),t.removeEventListener("webglcontextcreationerror",Ne,!1),fe.dispose(),be.dispose(),We.dispose(),xe.dispose(),I.dispose(),k.dispose(),re.dispose(),V.dispose(),_e.dispose(),$.dispose(),me.dispose(),me.removeEventListener("sessionstart",qg),me.removeEventListener("sessionend",Yg),Ps.stop()};function le(R){R.preventDefault(),sc("WebGLRenderer: Context Lost."),T=!0}function ne(){sc("WebGLRenderer: Context Restored."),T=!1;const R=Le.autoReset,H=ae.enabled,Z=ae.autoUpdate,j=ae.needsUpdate,W=ae.type;ge(),Le.autoReset=R,ae.enabled=H,ae.autoUpdate=Z,ae.needsUpdate=j,ae.type=W}function Ne(R){tt("WebGLRenderer: A WebGL context could not be created. Reason: ",R.statusMessage)}function st(R){const H=R.target;H.removeEventListener("dispose",st),It(H)}function It(R){St(R),xe.remove(R)}function St(R){const H=xe.get(R).programs;H!==void 0&&(H.forEach(function(Z){$.releaseProgram(Z)}),R.isShaderMaterial&&$.releaseShaderCache(R))}this.renderBufferDirect=function(R,H,Z,j,W,ue){H===null&&(H=ut);const Me=W.isMesh&&W.matrixWorld.determinant()<0,Ue=Zw(R,H,Z,j,W);oe.setMaterial(j,Me);let Re=Z.index,je=1;if(j.wireframe===!0){if(Re=ee.getWireframeAttribute(Z),Re===void 0)return;je=2}const et=Z.drawRange,Xe=Z.attributes.position;let ht=et.start*je,Tt=(et.start+et.count)*je;ue!==null&&(ht=Math.max(ht,ue.start*je),Tt=Math.min(Tt,(ue.start+ue.count)*je)),Re!==null?(ht=Math.max(ht,0),Tt=Math.min(Tt,Re.count)):Xe!=null&&(ht=Math.max(ht,0),Tt=Math.min(Tt,Xe.count));const Wt=Tt-ht;if(Wt<0||Wt===1/0)return;V.setup(W,j,Ue,Z,Re);let Xt,Et=Ze;if(Re!==null&&(Xt=X.get(Re),Et=Te,Et.setIndex(Xt)),W.isMesh)j.wireframe===!0?(oe.setLineWidth(j.wireframeLinewidth*se()),Et.setMode(D.LINES)):Et.setMode(D.TRIANGLES);else if(W.isLine){let qe=j.linewidth;qe===void 0&&(qe=1),oe.setLineWidth(qe*se()),W.isLineSegments?Et.setMode(D.LINES):W.isLineLoop?Et.setMode(D.LINE_LOOP):Et.setMode(D.LINE_STRIP)}else W.isPoints?Et.setMode(D.POINTS):W.isSprite&&Et.setMode(D.TRIANGLES);if(W.isBatchedMesh)if(W._multiDrawInstances!==null)Lo("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Et.renderMultiDrawInstances(W._multiDrawStarts,W._multiDrawCounts,W._multiDrawCount,W._multiDrawInstances);else if(ce.get("WEBGL_multi_draw"))Et.renderMultiDraw(W._multiDrawStarts,W._multiDrawCounts,W._multiDrawCount);else{const qe=W._multiDrawStarts,Ot=W._multiDrawCounts,yt=W._multiDrawCount,sr=Re?X.get(Re).bytesPerElement:1,Fa=xe.get(j).currentProgram.getUniforms();for(let ar=0;ar{function ue(){if(j.forEach(function(Me){xe.get(Me).currentProgram.isReady()&&j.delete(Me)}),j.size===0){W(R);return}setTimeout(ue,10)}ce.get("KHR_parallel_shader_compile")!==null?ue():setTimeout(ue,10)})};let Dr=null;function Yw(R){Dr&&Dr(R)}function qg(){Ps.stop()}function Yg(){Ps.start()}const Ps=new N_;Ps.setAnimationLoop(Yw),typeof self<"u"&&Ps.setContext(self),this.setAnimationLoop=function(R){Dr=R,me.setAnimationLoop(R),R===null?Ps.stop():Ps.start()},me.addEventListener("sessionstart",qg),me.addEventListener("sessionend",Yg),this.render=function(R,H){if(H!==void 0&&H.isCamera!==!0){tt("WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(T===!0)return;if(R.matrixWorldAutoUpdate===!0&&R.updateMatrixWorld(),H.parent===null&&H.matrixWorldAutoUpdate===!0&&H.updateMatrixWorld(),me.enabled===!0&&me.isPresenting===!0&&(me.cameraAutoUpdate===!0&&me.updateCamera(H),H=me.getCamera()),R.isScene===!0&&R.onBeforeRender(w,R,H,S),b=We.get(R,_.length),b.init(H),_.push(b),Be.multiplyMatrices(H.projectionMatrix,H.matrixWorldInverse),J.setFromProjectionMatrix(Be,ur,H.reversedDepth),we=this.localClippingEnabled,Q=Fe.init(this.clippingPlanes,we),v=be.get(R,y.length),v.init(),y.push(v),me.enabled===!0&&me.isPresenting===!0){const ue=w.xr.getDepthSensingMesh();ue!==null&&of(ue,H,-1/0,w.sortObjects)}of(R,H,0,w.sortObjects),v.finish(),w.sortObjects===!0&&v.sort(de,Ee),Qe=me.enabled===!1||me.isPresenting===!1||me.hasDepthSensing()===!1,Qe&&fe.addToRenderList(v,R),this.info.render.frame++,Q===!0&&Fe.beginShadows();const Z=b.state.shadowsArray;ae.render(Z,R,H),Q===!0&&Fe.endShadows(),this.info.autoReset===!0&&this.info.reset();const j=v.opaque,W=v.transmissive;if(b.setupLights(),H.isArrayCamera){const ue=H.cameras;if(W.length>0)for(let Me=0,Ue=ue.length;Me0&&jg(j,W,R,H),Qe&&fe.render(R),Zg(v,R,H);S!==null&&M===0&&(Ae.updateMultisampleRenderTarget(S),Ae.updateRenderTargetMipmap(S)),R.isScene===!0&&R.onAfterRender(w,R,H),V.resetDefaultState(),E=-1,P=null,_.pop(),_.length>0?(b=_[_.length-1],Q===!0&&Fe.setGlobalState(w.clippingPlanes,b.state.camera)):b=null,y.pop(),y.length>0?v=y[y.length-1]:v=null};function of(R,H,Z,j){if(R.visible===!1)return;if(R.layers.test(H.layers)){if(R.isGroup)Z=R.renderOrder;else if(R.isLOD)R.autoUpdate===!0&&R.update(H);else if(R.isLight)b.pushLight(R),R.castShadow&&b.pushShadow(R);else if(R.isSprite){if(!R.frustumCulled||J.intersectsSprite(R)){j&&it.setFromMatrixPosition(R.matrixWorld).applyMatrix4(Be);const Me=re.update(R),Ue=R.material;Ue.visible&&v.push(R,Me,Ue,Z,it.z,null)}}else if((R.isMesh||R.isLine||R.isPoints)&&(!R.frustumCulled||J.intersectsObject(R))){const Me=re.update(R),Ue=R.material;if(j&&(R.boundingSphere!==void 0?(R.boundingSphere===null&&R.computeBoundingSphere(),it.copy(R.boundingSphere.center)):(Me.boundingSphere===null&&Me.computeBoundingSphere(),it.copy(Me.boundingSphere.center)),it.applyMatrix4(R.matrixWorld).applyMatrix4(Be)),Array.isArray(Ue)){const Re=Me.groups;for(let je=0,et=Re.length;je0&&Ic(W,H,Z),ue.length>0&&Ic(ue,H,Z),Me.length>0&&Ic(Me,H,Z),oe.buffers.depth.setTest(!0),oe.buffers.depth.setMask(!0),oe.buffers.color.setMask(!0),oe.setPolygonOffset(!1)}function jg(R,H,Z,j){if((Z.isScene===!0?Z.overrideMaterial:null)!==null)return;b.state.transmissionRenderTarget[j.id]===void 0&&(b.state.transmissionRenderTarget[j.id]=new oi(1,1,{generateMipmaps:!0,type:ce.has("EXT_color_buffer_half_float")||ce.has("EXT_color_buffer_float")?Da:Xr,minFilter:ti,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ft.workingColorSpace}));const ue=b.state.transmissionRenderTarget[j.id],Me=j.viewport||N;ue.setSize(Me.z*w.transmissionResolutionScale,Me.w*w.transmissionResolutionScale);const Ue=w.getRenderTarget(),Re=w.getActiveCubeFace(),je=w.getActiveMipmapLevel();w.setRenderTarget(ue),w.getClearColor(B),G=w.getClearAlpha(),G<1&&w.setClearColor(16777215,.5),w.clear(),Qe&&fe.render(Z);const et=w.toneMapping;w.toneMapping=Fi;const Xe=j.viewport;if(j.viewport!==void 0&&(j.viewport=void 0),b.setupLightsView(j),Q===!0&&Fe.setGlobalState(w.clippingPlanes,j),Ic(R,Z,j),Ae.updateMultisampleRenderTarget(ue),Ae.updateRenderTargetMipmap(ue),ce.has("WEBGL_multisampled_render_to_texture")===!1){let ht=!1;for(let Tt=0,Wt=H.length;Tt0),Xe=!!Z.morphAttributes.position,ht=!!Z.morphAttributes.normal,Tt=!!Z.morphAttributes.color;let Wt=Fi;j.toneMapped&&(S===null||S.isXRRenderTarget===!0)&&(Wt=w.toneMapping);const Xt=Z.morphAttributes.position||Z.morphAttributes.normal||Z.morphAttributes.color,Et=Xt!==void 0?Xt.length:0,qe=xe.get(j),Ot=b.state.lights;if(Q===!0&&(we===!0||R!==P)){const Pn=R===P&&j.id===E;Fe.setState(j,R,Pn)}let yt=!1;j.version===qe.__version?(qe.needsLights&&qe.lightsStateVersion!==Ot.state.version||qe.outputColorSpace!==Ue||W.isBatchedMesh&&qe.batching===!1||!W.isBatchedMesh&&qe.batching===!0||W.isBatchedMesh&&qe.batchingColor===!0&&W.colorTexture===null||W.isBatchedMesh&&qe.batchingColor===!1&&W.colorTexture!==null||W.isInstancedMesh&&qe.instancing===!1||!W.isInstancedMesh&&qe.instancing===!0||W.isSkinnedMesh&&qe.skinning===!1||!W.isSkinnedMesh&&qe.skinning===!0||W.isInstancedMesh&&qe.instancingColor===!0&&W.instanceColor===null||W.isInstancedMesh&&qe.instancingColor===!1&&W.instanceColor!==null||W.isInstancedMesh&&qe.instancingMorph===!0&&W.morphTexture===null||W.isInstancedMesh&&qe.instancingMorph===!1&&W.morphTexture!==null||qe.envMap!==Re||j.fog===!0&&qe.fog!==ue||qe.numClippingPlanes!==void 0&&(qe.numClippingPlanes!==Fe.numPlanes||qe.numIntersection!==Fe.numIntersection)||qe.vertexAlphas!==je||qe.vertexTangents!==et||qe.morphTargets!==Xe||qe.morphNormals!==ht||qe.morphColors!==Tt||qe.toneMapping!==Wt||qe.morphTargetsCount!==Et)&&(yt=!0):(yt=!0,qe.__version=j.version);let sr=qe.currentProgram;yt===!0&&(sr=Dc(j,H,W));let Fa=!1,ar=!1,$o=!1;const Bt=sr.getUniforms(),Gn=qe.uniforms;if(oe.useProgram(sr.program)&&(Fa=!0,ar=!0,$o=!0),j.id!==E&&(E=j.id,ar=!0),Fa||P!==R){oe.buffers.depth.getReversed()&&R.reversedDepth!==!0&&(R._reversedDepth=!0,R.updateProjectionMatrix()),Bt.setValue(D,"projectionMatrix",R.projectionMatrix),Bt.setValue(D,"viewMatrix",R.matrixWorldInverse);const Hn=Bt.map.cameraPosition;Hn!==void 0&&Hn.setValue(D,Ce.setFromMatrixPosition(R.matrixWorld)),he.logarithmicDepthBuffer&&Bt.setValue(D,"logDepthBufFC",2/(Math.log(R.far+1)/Math.LN2)),(j.isMeshPhongMaterial||j.isMeshToonMaterial||j.isMeshLambertMaterial||j.isMeshBasicMaterial||j.isMeshStandardMaterial||j.isShaderMaterial)&&Bt.setValue(D,"isOrthographic",R.isOrthographicCamera===!0),P!==R&&(P=R,ar=!0,$o=!0)}if(W.isSkinnedMesh){Bt.setOptional(D,W,"bindMatrix"),Bt.setOptional(D,W,"bindMatrixInverse");const Pn=W.skeleton;Pn&&(Pn.boneTexture===null&&Pn.computeBoneTexture(),Bt.setValue(D,"boneTexture",Pn.boneTexture,Ae))}W.isBatchedMesh&&(Bt.setOptional(D,W,"batchingTexture"),Bt.setValue(D,"batchingTexture",W._matricesTexture,Ae),Bt.setOptional(D,W,"batchingIdTexture"),Bt.setValue(D,"batchingIdTexture",W._indirectTexture,Ae),Bt.setOptional(D,W,"batchingColorTexture"),W._colorsTexture!==null&&Bt.setValue(D,"batchingColorTexture",W._colorsTexture,Ae));const mr=Z.morphAttributes;if((mr.position!==void 0||mr.normal!==void 0||mr.color!==void 0)&&Ke.update(W,Z,sr),(ar||qe.receiveShadow!==W.receiveShadow)&&(qe.receiveShadow=W.receiveShadow,Bt.setValue(D,"receiveShadow",W.receiveShadow)),j.isMeshGouraudMaterial&&j.envMap!==null&&(Gn.envMap.value=Re,Gn.flipEnvMap.value=Re.isCubeTexture&&Re.isRenderTargetTexture===!1?-1:1),j.isMeshStandardMaterial&&j.envMap===null&&H.environment!==null&&(Gn.envMapIntensity.value=H.environmentIntensity),Gn.dfgLUT!==void 0&&(Gn.dfgLUT.value=oR()),ar&&(Bt.setValue(D,"toneMappingExposure",w.toneMappingExposure),qe.needsLights&&jw(Gn,$o),ue&&j.fog===!0&&ze.refreshFogUniforms(Gn,ue),ze.refreshMaterialUniforms(Gn,j,te,Y,b.state.transmissionRenderTarget[R.id]),ou.upload(D,Kg(qe),Gn,Ae)),j.isShaderMaterial&&j.uniformsNeedUpdate===!0&&(ou.upload(D,Kg(qe),Gn,Ae),j.uniformsNeedUpdate=!1),j.isSpriteMaterial&&Bt.setValue(D,"center",W.center),Bt.setValue(D,"modelViewMatrix",W.modelViewMatrix),Bt.setValue(D,"normalMatrix",W.normalMatrix),Bt.setValue(D,"modelMatrix",W.matrixWorld),j.isShaderMaterial||j.isRawShaderMaterial){const Pn=j.uniformsGroups;for(let Hn=0,lf=Pn.length;Hn0&&Ae.useMultisampledRTT(R)===!1?W=xe.get(R).__webglMultisampledFramebuffer:Array.isArray(et)?W=et[Z]:W=et,N.copy(R.viewport),L.copy(R.scissor),F=R.scissorTest}else N.copy(ve).multiplyScalar(te).floor(),L.copy(Ge).multiplyScalar(te).floor(),F=He;if(Z!==0&&(W=Kw),oe.bindFramebuffer(D.FRAMEBUFFER,W)&&j&&oe.drawBuffers(R,W),oe.viewport(N),oe.scissor(L),oe.setScissorTest(F),ue){const Re=xe.get(R.texture);D.framebufferTexture2D(D.FRAMEBUFFER,D.COLOR_ATTACHMENT0,D.TEXTURE_CUBE_MAP_POSITIVE_X+H,Re.__webglTexture,Z)}else if(Me){const Re=H;for(let je=0;je=0&&H<=R.width-j&&Z>=0&&Z<=R.height-W&&(R.textures.length>1&&D.readBuffer(D.COLOR_ATTACHMENT0+Ue),D.readPixels(H,Z,j,W,nt.convert(et),nt.convert(Xe),ue))}finally{const je=S!==null?xe.get(S).__webglFramebuffer:null;oe.bindFramebuffer(D.FRAMEBUFFER,je)}}},this.readRenderTargetPixelsAsync=async function(R,H,Z,j,W,ue,Me,Ue=0){if(!(R&&R.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Re=xe.get(R).__webglFramebuffer;if(R.isWebGLCubeRenderTarget&&Me!==void 0&&(Re=Re[Me]),Re)if(H>=0&&H<=R.width-j&&Z>=0&&Z<=R.height-W){oe.bindFramebuffer(D.FRAMEBUFFER,Re);const je=R.textures[Ue],et=je.format,Xe=je.type;if(!he.textureFormatReadable(et))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!he.textureTypeReadable(Xe))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const ht=D.createBuffer();D.bindBuffer(D.PIXEL_PACK_BUFFER,ht),D.bufferData(D.PIXEL_PACK_BUFFER,ue.byteLength,D.STREAM_READ),R.textures.length>1&&D.readBuffer(D.COLOR_ATTACHMENT0+Ue),D.readPixels(H,Z,j,W,nt.convert(et),nt.convert(Xe),0);const Tt=S!==null?xe.get(S).__webglFramebuffer:null;oe.bindFramebuffer(D.FRAMEBUFFER,Tt);const Wt=D.fenceSync(D.SYNC_GPU_COMMANDS_COMPLETE,0);return D.flush(),await kS(D,Wt,4),D.bindBuffer(D.PIXEL_PACK_BUFFER,ht),D.getBufferSubData(D.PIXEL_PACK_BUFFER,0,ue),D.deleteBuffer(ht),D.deleteSync(Wt),ue}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(R,H=null,Z=0){const j=Math.pow(2,-Z),W=Math.floor(R.image.width*j),ue=Math.floor(R.image.height*j),Me=H!==null?H.x:0,Ue=H!==null?H.y:0;Ae.setTexture2D(R,0),D.copyTexSubImage2D(D.TEXTURE_2D,Z,0,0,Me,Ue,W,ue),oe.unbindTexture()};const Jw=D.createFramebuffer(),Qw=D.createFramebuffer();this.copyTextureToTexture=function(R,H,Z=null,j=null,W=0,ue=null){ue===null&&(W!==0?(Lo("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),ue=W,W=0):ue=0);let Me,Ue,Re,je,et,Xe,ht,Tt,Wt;const Xt=R.isCompressedTexture?R.mipmaps[ue]:R.image;if(Z!==null)Me=Z.max.x-Z.min.x,Ue=Z.max.y-Z.min.y,Re=Z.isBox3?Z.max.z-Z.min.z:1,je=Z.min.x,et=Z.min.y,Xe=Z.isBox3?Z.min.z:0;else{const mr=Math.pow(2,-W);Me=Math.floor(Xt.width*mr),Ue=Math.floor(Xt.height*mr),R.isDataArrayTexture?Re=Xt.depth:R.isData3DTexture?Re=Math.floor(Xt.depth*mr):Re=1,je=0,et=0,Xe=0}j!==null?(ht=j.x,Tt=j.y,Wt=j.z):(ht=0,Tt=0,Wt=0);const Et=nt.convert(H.format),qe=nt.convert(H.type);let Ot;H.isData3DTexture?(Ae.setTexture3D(H,0),Ot=D.TEXTURE_3D):H.isDataArrayTexture||H.isCompressedArrayTexture?(Ae.setTexture2DArray(H,0),Ot=D.TEXTURE_2D_ARRAY):(Ae.setTexture2D(H,0),Ot=D.TEXTURE_2D),D.pixelStorei(D.UNPACK_FLIP_Y_WEBGL,H.flipY),D.pixelStorei(D.UNPACK_PREMULTIPLY_ALPHA_WEBGL,H.premultiplyAlpha),D.pixelStorei(D.UNPACK_ALIGNMENT,H.unpackAlignment);const yt=D.getParameter(D.UNPACK_ROW_LENGTH),sr=D.getParameter(D.UNPACK_IMAGE_HEIGHT),Fa=D.getParameter(D.UNPACK_SKIP_PIXELS),ar=D.getParameter(D.UNPACK_SKIP_ROWS),$o=D.getParameter(D.UNPACK_SKIP_IMAGES);D.pixelStorei(D.UNPACK_ROW_LENGTH,Xt.width),D.pixelStorei(D.UNPACK_IMAGE_HEIGHT,Xt.height),D.pixelStorei(D.UNPACK_SKIP_PIXELS,je),D.pixelStorei(D.UNPACK_SKIP_ROWS,et),D.pixelStorei(D.UNPACK_SKIP_IMAGES,Xe);const Bt=R.isDataArrayTexture||R.isData3DTexture,Gn=H.isDataArrayTexture||H.isData3DTexture;if(R.isDepthTexture){const mr=xe.get(R),Pn=xe.get(H),Hn=xe.get(mr.__renderTarget),lf=xe.get(Pn.__renderTarget);oe.bindFramebuffer(D.READ_FRAMEBUFFER,Hn.__webglFramebuffer),oe.bindFramebuffer(D.DRAW_FRAMEBUFFER,lf.__webglFramebuffer);for(let Is=0;Is{let s=!1;const a=r.subscribe(o=>{e=o,s&&i()});return s=!0,a});function n(){return xc()?(t(),e):Vy(r)}return"set"in r?{get current(){return n()},set current(i){r.set(i)}}:{get current(){return n()}}}const Hx=Symbol(),cR=r=>typeof r?.subscribe=="function",G_=(r,e,t)=>{const n=r().map(a=>cR(a)?lh(a):Hx),i=Ve(()=>r().map((a,o)=>n[o]===Hx?a:n[o].current)),s=()=>{z(i);let a;return di(()=>{a=e(z(i))}),a};t?mn(s):Vi(s)},dR=(r,e)=>G_(r,e,!1),uR=(r,e)=>G_(r,e,!0);Object.assign(dR,{pre:uR});const Or=(r,e)=>r?.[`is${e}`]===!0,hR=typeof window<"u",ki=(r,e)=>{const t=Hp(r,s=>s);let n;const i=t.subscribe(async s=>{n&&n();const a=await e(s);a&&(n=a)});wc(()=>{i(),n&&n()})},pn=r=>{const e=Eo(r),t={set:n=>{t.current=n,e.set(n)},subscribe:e.subscribe,update:n=>{const i=n(t.current);t.current=i,e.set(i)},current:r};return t},fR=r=>({subscribe:r.subscribe,get current(){return r.current}}),H_=(r,e)=>{if(e.includes(".")){const t=e.split("."),n=t.pop();for(let i=0;i{const{dom:e,canvas:t}=r,n=pn({width:e.offsetWidth,height:e.offsetHeight});yh(()=>{const s=new ResizeObserver(()=>{const{offsetWidth:a,offsetHeight:o}=e;(n.current.width!==a||n.current.height!==o)&&n.set({width:a,height:o})});return s.observe(e),()=>{s.disconnect()}});const i={dom:e,canvas:t,size:fR(n)};return Bn("threlte-dom-context",i),i},Pg=()=>{const r=rn("threlte-dom-context");if(!r)throw new Error("useDOM can only be used in a child component to .");return r};function gR(r){return{all:r=r||new Map,on:function(e,t){var n=r.get(e);n?n.push(t):r.set(e,[t])},off:function(e,t){var n=r.get(e);n&&(t?n.splice(n.indexOf(t)>>>0,1):r.set(e,[]))},emit:function(e,t){var n=r.get(e);n&&n.slice().map(function(i){i(t)}),(n=r.get("*"))&&n.slice().map(function(i){i(e,t)})}}}const mR=gR;class ds{allVertices={};isolatedVertices={};connectedVertices={};sortedConnectedValues=[];needsSort=!1;emitter=mR();emit=this.emitter.emit.bind(this.emitter);on=this.emitter.on.bind(this.emitter);off=this.emitter.off.bind(this.emitter);get sortedVertices(){return this.mapNodes(e=>e)}moveToIsolated(e){const t=this.connectedVertices[e];t&&(this.isolatedVertices[e]=t,delete this.connectedVertices[e])}moveToConnected(e){const t=this.isolatedVertices[e];t&&(this.connectedVertices[e]=t,delete this.isolatedVertices[e])}getKey=e=>typeof e=="object"?e.key:e;add(e,t,n){if(this.allVertices[e]&&this.allVertices[e].value!==void 0)throw new Error(`A node with the key ${e.toString()} already exists`);let i=this.allVertices[e];i?i.value===void 0&&(i.value=t):(i={value:t,previous:new Set,next:new Set},this.allVertices[e]=i);const s=i.next.size>0||i.previous.size>0;if(!n?.after&&!n?.before&&!s){this.isolatedVertices[e]=i,this.emit("node:added",{key:e,type:"isolated",value:t});return}else this.connectedVertices[e]=i;if(n?.after){const a=Array.isArray(n.after)?n.after:[n.after];a.forEach(o=>{i.previous.add(this.getKey(o))}),a.forEach(o=>{const l=this.getKey(o),c=this.allVertices[l];c?(c.next.add(e),this.moveToConnected(l)):(this.allVertices[l]={value:void 0,previous:new Set,next:new Set([e])},this.connectedVertices[l]=this.allVertices[l])})}if(n?.before){const a=Array.isArray(n.before)?n.before:[n.before];a.forEach(o=>{i.next.add(this.getKey(o))}),a.forEach(o=>{const l=this.getKey(o),c=this.allVertices[l];c?(c.previous.add(e),this.moveToConnected(l)):(this.allVertices[l]={value:void 0,previous:new Set([e]),next:new Set},this.connectedVertices[l]=this.allVertices[l])})}this.emit("node:added",{key:e,type:"connected",value:t}),this.needsSort=!0}remove(e){const t=this.getKey(e);if(this.isolatedVertices[t]){delete this.isolatedVertices[t],delete this.allVertices[t],this.emit("node:removed",{key:t,type:"isolated"});return}const i=this.connectedVertices[t];i&&(i.next.forEach(s=>{const a=this.connectedVertices[s];a&&(a.previous.delete(t),a.previous.size===0&&a.next.size===0&&this.moveToIsolated(s))}),i.previous.forEach(s=>{const a=this.connectedVertices[s];a&&(a.next.delete(t),a.previous.size===0&&a.next.size===0&&this.moveToIsolated(s))}),delete this.connectedVertices[t],delete this.allVertices[t],this.emit("node:removed",{key:t,type:"connected"}),this.needsSort=!0)}mapNodes(e){this.needsSort&&this.sort();const t=[];return this.forEachNode((n,i)=>{t.push(e(n,i))}),t}forEachNode(e){this.needsSort&&this.sort();let t=0;for(;t{const i=this.isolatedVertices[n];i.value!==void 0&&e(i.value,t++)})}getValueByKey(e){return this.allVertices[e]?.value}getKeyByValue(e){return Reflect.ownKeys(this.connectedVertices).find(t=>this.connectedVertices[t].value===e)??Reflect.ownKeys(this.isolatedVertices).find(t=>this.isolatedVertices[t].value===e)}sort(){const e=new Map,t=[],n=[],i=Reflect.ownKeys(this.connectedVertices).filter(a=>this.connectedVertices[a].value!==void 0);for(i.forEach(a=>{e.set(a,0)}),i.forEach(a=>{this.connectedVertices[a].next.forEach(l=>{this.connectedVertices[l]&&e.set(l,(e.get(l)||0)+1)})}),e.forEach((a,o)=>{a===0&&t.push(o)});t.length>0;){const a=t.shift();n.push(a);const o=i.find(l=>l===a);o&&this.connectedVertices[o]?.next.forEach(l=>{const c=(e.get(l)||0)-1;e.set(l,c),c===0&&t.push(l)})}if(n.length!==i.length)throw new Error("The graph contains a cycle, and thus can not be sorted topologically.");const s=a=>a!==void 0;this.sortedConnectedValues=n.map(a=>this.connectedVertices[a].value).filter(s),this.needsSort=!1}clear(){this.allVertices={},this.isolatedVertices={},this.connectedVertices={},this.sortedConnectedValues=[],this.needsSort=!1}static isKey(e){return typeof e=="string"||typeof e=="symbol"}static isValue(e){return typeof e=="object"&&"key"in e}}class xR{key;stage;callback;runTask=!0;stop(){this.runTask=!1}start(){this.runTask=!0}constructor(e,t,n){this.stage=e,this.key=t,this.callback=n}run(e){this.runTask&&this.callback(e)}}class bR extends ds{key;scheduler;runTask=!0;stop(){this.runTask=!1}start(){this.runTask=!0}get tasks(){return this.sortedVertices}callback=(e,t)=>t();constructor(e,t,n){super(),this.scheduler=e,this.key=t,this.start=this.start.bind(this),this.stop=this.stop.bind(this),n&&(this.callback=n.bind(this))}createTask(e,t,n){const i=new xR(this,e,t);return this.add(e,i,n),i}getTask(e){return this.getValueByKey(e)}removeTask=this.remove.bind(this);run(e){this.runTask&&this.callback(e,t=>{this.forEachNode(n=>{n.run(t??e)})})}runWithTiming(e){if(!this.runTask)return{};const t={};return this.callback(e,n=>{this.forEachNode(i=>{const s=performance.now();i.run(n??e);const a=performance.now()-s;t[i.key]=a})}),t}getSchedule(){return this.mapNodes(e=>e.key.toString())}}class yR extends ds{lastTime=performance.now();clampDeltaTo=.1;get stages(){return this.sortedVertices}constructor(e){super(),e?.clampDeltaTo&&(this.clampDeltaTo=e.clampDeltaTo),this.run=this.run.bind(this)}createStage(e,t){const n=new bR(this,e,t?.callback);return this.add(e,n,{after:t?.after,before:t?.before}),n}getStage(e){return this.getValueByKey(e)}removeStage=this.remove.bind(this);run(e){const t=e-this.lastTime;this.forEachNode(n=>{n.run(Math.min(t/1e3,this.clampDeltaTo))}),this.lastTime=e}runWithTiming(e){const t=e-this.lastTime,n={},i=performance.now();return this.forEachNode(s=>{const a=performance.now(),o=s.runWithTiming(Math.min(t/1e3,this.clampDeltaTo)),l=performance.now()-a;n[s.key.toString()]={duration:l,tasks:o}}),{total:performance.now()-i,stages:n}}getSchedule(e={tasks:!0}){return{stages:this.mapNodes(t=>{if(t===void 0)throw new Error("Stage not found");return{key:t.key.toString(),tasks:e.tasks?t.getSchedule():void 0}})}}dispose(){this.clear()}}const vR=r=>{const e=new yR,t=e.createStage(Symbol("threlte-main-stage")),n={scheduler:e,frameInvalidated:!0,autoInvalidations:new Set,shouldAdvance:!1,advance:()=>{n.shouldAdvance=!0},autoRender:pn(r.autoRender??!0),renderMode:pn(r.renderMode??"on-demand"),invalidate(){n.frameInvalidated=!0},mainStage:t,shouldRender:()=>n.renderMode.current==="always"||n.renderMode.current==="on-demand"&&(n.frameInvalidated||n.autoInvalidations.size>0)||n.renderMode.current==="manual"&&n.shouldAdvance,renderStage:e.createStage(Symbol("threlte-render-stage"),{after:t,callback(i,s){n.shouldRender()&&s()}}),resetFrameInvalidation(){n.frameInvalidated=!1,n.shouldAdvance=!1}};return Vi(()=>{n.autoRender.set(r.autoRender??!0)}),Vi(()=>{n.renderMode.set(r.renderMode??"on-demand")}),wc(()=>{n.scheduler.dispose()}),Bn("threlte-scheduler-context",n),n},Qh=()=>{const r=rn("threlte-scheduler-context");if(!r)throw new Error("useScheduler can only be used in a child component to .");return r},_R=()=>{const{size:r}=Pg(),{invalidate:e}=Qh(),t=new hn(75,0,.1,1e3);t.position.z=5,t.lookAt(0,0,0);const n=pn(t);ki(r,s=>{if(n.current===t){const a=n.current;a.aspect=s.width/s.height,a.updateProjectionMatrix(),e()}}),ki(n,s=>{s===void 0&&n.set(t)});const i={camera:n};return Bn("threlte-camera-context",i),i},W_=()=>{const r=rn("threlte-camera-context");if(!r)throw new Error("useCamera can only be used in a child component to .");return r},wR=()=>{const r={removeObjectFromDisposal:e=>{r.disposableObjects.delete(e)},disposableObjectMounted:e=>{const t=r.disposableObjects.get(e);t?r.disposableObjects.set(e,t+1):r.disposableObjects.set(e,1)},disposableObjectUnmounted:e=>{const t=r.disposableObjects.get(e);t&&t>0&&(r.disposableObjects.set(e,t-1),t-1<=0&&(r.shouldDispose=!0))},disposableObjects:new Map,shouldDispose:!1,dispose:async(e=!1)=>{await iM(),!(!r.shouldDispose&&!e)&&(r.disposableObjects.forEach((t,n)=>{(t===0||e)&&(n?.dispose?.(),r.disposableObjects.delete(n))}),r.shouldDispose=!1)}};return wc(()=>{r.dispose(!0)}),Bn("threlte-disposal-context",r),r},X_=()=>{const r=rn("threlte-disposal-context");if(!r)throw new Error("useDisposal can only be used in a child component to .");return r},q_=Symbol("threlte-parent-context"),Y_=r=>{const e=pn(r);return Bn(q_,e),e},Z_=()=>rn(q_),ch=Symbol("threlte-parent-object3d-context"),MR=r=>{const e=Gp(r);return Bn(ch,e),e},SR=r=>{const e=rn(ch),t=Eo(r),n=Hp([t,e],([i,s])=>i??s);return Bn(ch,n),t},TR=()=>rn(ch);function j_(r,e,t){if(!hR)return{task:void 0,start:()=>{},stop:()=>{},started:Gp(!1)};let n,i,s;ds.isKey(r)?(n=r,i=e,s=t):(n=Symbol("useTask"),i=r,s=e);const a=Qh();let o=a.mainStage;if(s){if(s.stage)if(ds.isValue(s.stage))o=s.stage;else{const h=a.scheduler.getStage(s.stage);if(!h)throw new Error(`No stage found with key ${s.stage.toString()}`);o=h}else if(s.after)if(Array.isArray(s.after))for(let h=0;h{l.set(!0),(s?.autoInvalidate??!0)&&a.autoInvalidations.add(i),c.start()},u=()=>{l.set(!1),(s?.autoInvalidate??!0)&&a.autoInvalidations.delete(i),c.stop()};return s?.autoStart??!0?d():u(),wc(()=>{u(),o.removeTask(n)}),{task:c,start:d,stop:u,started:{subscribe:l.subscribe}}}const AR=r=>{const e={scene:new ag};return Bn("threlte-scene-context",e),e},$_=()=>{const r=rn("threlte-scene-context");if(!r)throw new Error("useScene can only be used in a child component to .");return r},kR=r=>{const{dispose:e}=X_(),{camera:t}=W_(),{scene:n}=$_(),{invalidate:i,renderStage:s,autoRender:a,scheduler:o,resetFrameInvalidation:l}=Qh(),{size:c,canvas:d}=Pg(),u=r.createRenderer?r.createRenderer(d):new V_({canvas:d,powerPreference:"high-performance",antialias:!0,alpha:!0}),h=s.createTask(Symbol("threlte-auto-render-task"),()=>{u.render(n,t.current)}),f={renderer:u,colorManagementEnabled:pn(r.colorManagementEnabled??!0),colorSpace:pn(r.colorSpace??"srgb"),dpr:pn(r.dpr??window.devicePixelRatio),shadows:pn(r.shadows??Dl),toneMapping:pn(r.toneMapping??Eu),autoRenderTask:h};Bn("threlte-renderer-context",f),ki([f.colorManagementEnabled],([m])=>{ft.enabled=m}),ki([f.colorSpace],([m])=>{"outputColorSpace"in u&&(u.outputColorSpace=m)}),ki([f.dpr],([m])=>{"setPixelRatio"in u&&u.setPixelRatio(m)});const{start:g,stop:x}=j_(()=>{!("xr"in u)||u.xr?.isPresenting||(u.setSize(c.current.width,c.current.height),i(),x())},{before:h,autoStart:!1,autoInvalidate:!1});return ki([c],()=>{g()}),ki([f.shadows],([m])=>{"shadowMap"in u&&(u.shadowMap.enabled=!!m,m&&m!==!0?u.shadowMap.type=m:m===!0&&(u.shadowMap.type=Dl))}),ki([f.toneMapping],([m])=>{"toneMapping"in u&&(u.toneMapping=m)}),ki([a],([m])=>(m?f.autoRenderTask.start():f.autoRenderTask.stop(),()=>{f.autoRenderTask.stop()})),"setAnimationLoop"in f.renderer&&f.renderer.setAnimationLoop(p=>{e(),o.run(p),l()}),wc(()=>{if("dispose"in f.renderer){const m=f.renderer.dispose;m()}}),mn(()=>{f.colorManagementEnabled.set(r.colorManagementEnabled??!0)}),mn(()=>{f.colorSpace.set(r.colorSpace??"srgb")}),mn(()=>{f.toneMapping.set(r.toneMapping??Eu)}),mn(()=>{f.shadows.set(r.shadows??Dl)}),mn(()=>{f.dpr.set(r.dpr??window.devicePixelRatio)}),f},ER=()=>{const r=rn("threlte-renderer-context");if(!r)throw new Error("useRenderer can only be used in a child component to .");return r},CR=()=>{const r=pn({});return Bn("threlte-user-context",r),r},RR=()=>{const r=rn("threlte-user-context");if(!r)throw new Error("useUserContext can only be used in a child component to .");return r},PR=r=>{const{scene:e}=AR();return{scene:e,...pR(r),...BM(),...Y_(e),...MR(e),...wR(),...vR(r),..._R(),...kR(r),...CR()}};function IR(r,e){_n(e,!0),PR(rr(e,["$$slots","$$events","$$legacy","children"]));var n=Ct(),i=bt(n);on(i,()=>e.children),Oe(r,n),wn()}var DR=Ht('
');function LR(r,e){let t=rr(e,["$$slots","$$events","$$legacy","children"]),n=Nt(void 0),i=Nt(void 0);var s=DR(),a=Pt(s),o=Pt(a);{var l=c=>{IR(c,Wp({get dom(){return z(i)},get canvas(){return z(n)}},()=>t,{children:(d,u)=>{var h=Ct(),f=bt(h);on(f,()=>e.children??zt),Oe(d,h)},$$slots:{default:!0}}))};Ft(o,c=>{z(n)&&z(i)&&c(l)})}bu(a,c=>Rt(n,c),()=>z(n)),bu(s,c=>Rt(i,c),()=>z(i)),Oe(r,s)}const ef=()=>{const r=Qh(),e=ER(),t=W_(),n=$_(),i=Pg();return{advance:r.advance,autoRender:r.autoRender,autoRenderTask:e.autoRenderTask,camera:t.camera,colorManagementEnabled:e.colorManagementEnabled,colorSpace:e.colorSpace,dpr:e.dpr,invalidate:r.invalidate,mainStage:r.mainStage,renderer:e.renderer,renderMode:r.renderMode,renderStage:r.renderStage,scheduler:r.scheduler,shadows:e.shadows,shouldRender:r.shouldRender,dom:i.dom,canvas:i.canvas,size:i.size,toneMapping:e.toneMapping,get scene(){return n.scene},set scene(a){n.scene=a}}},NR=r=>typeof r=="object"&&r!==null,UR=(r,e)=>{const{invalidate:t}=ef(),n=Ve(r),i=Ve(e),s=lh(Z_()),a=lh(TR()),o=Y_(),l=SR();mn(()=>{o.set(z(n)),Or(z(n),"Object3D")&&l.set(z(n)),t()}),mn(()=>{t();const c=z(n);if(z(i)===void 0&&Or(c,"Object3D"))return a.current?.add(c),()=>{t(),a.current?.remove(c)};if(z(i)===void 0&&NR(s.current)){const d=s.current;if(Or(c,"Material")){const u=d.material;return d.material=c,()=>{t(),d.material=u}}else if(Or(c,"BufferGeometry")){const u=d.geometry;return d.geometry=c,()=>{t(),d.geometry=u}}}if(z(i)===!1)return()=>{t()};if(typeof z(i)=="function"){const d=z(i)({ref:c,parent:s.current,parentObject3D:a.current});return()=>{t(),d?.()}}if(typeof z(i)=="string"){const{target:d,key:u}=H_(s.current,z(i));if(u in d){const h=d[u];return d[u]=c,()=>{t(),d[u]=h}}else return d[u]=c,()=>{t(),delete d[u]}}if(Or(z(i),"Object3D")&&Or(c,"Object3D"))return z(i).add(c),()=>{t(),z(i).remove(c)}})},n0=new Set,FR=(r,e,t)=>{const{invalidate:n,size:i,camera:s}=ef(),a=Ve(r),o=lh(i);mn(()=>{if(!t())return;const l=z(a);return n0.add(l),s.set(l),n(),()=>{n0.delete(l),n0.size===0&&(s.set(void 0),n())}}),mn(()=>{if(e())return;const{width:l,height:c}=o.current;Or(z(a),"PerspectiveCamera")?z(a).aspect=l/c:Or(z(a),"OrthographicCamera")&&(z(a).left=l/-2,z(a).right=l/2,z(a).top=c/2,z(a).bottom=c/-2),z(a).updateProjectionMatrix(),z(a).updateMatrixWorld(),n()})},sp=Symbol("threlte-disposable-object-context"),OR=r=>typeof r?.dispose=="function",BR=r=>{const e=rn(sp),t=Ve(()=>r()??e?.()??!0);Bn(sp,()=>z(t))},zR=r=>{const e=Ve(r),{disposableObjectMounted:t,disposableObjectUnmounted:n,removeObjectFromDisposal:i}=X_(),s=rn(sp),a=Ve(()=>s?.()??!0);Vi(()=>{if(z(a))return t(z(e)),()=>n(z(e));i(z(e))})},VR=r=>r!==null&&typeof r=="object"&&"addEventListener"in r&&"removeEventListener"in r,GR=(r,e,t)=>{const n=Ve(r);for(const i of e){const s=Ve(()=>t[i]);i.startsWith("on")&&mn(()=>{if(typeof z(s)!="function"||!VR(z(n)))return;const a=i.slice(2);return z(n).addEventListener(a,z(s)),()=>z(n).removeEventListener(a,z(s))})}};let ap;const HR=r=>{ap=r},WR=()=>{const r=ap;return ap=void 0,r},XR="threlte-plugin-context",qR=r=>{const e=rn(XR);if(!e)return;const t=[],n=Object.values(e);if(n.length>0){const i=r();for(let s=0;stypeof r=="string"||typeof r=="number"||typeof r=="boolean"||typeof r>"u"||r===null,Wx=(r,e,t)=>!Array.isArray(t)&&typeof t=="number"&&typeof r[e]=="object"&&r[e]!==null&&typeof r[e]?.setScalar=="function"&&!r[e]?.isColor?(n,i,s)=>{n[i].setScalar(s)}:typeof r[e]?.set=="function"&&typeof r[e]=="object"&&r[e]!==null?Array.isArray(t)?(n,i,s)=>{n[i].set(...s)}:(n,i,s)=>{n[i].set(s)}:(n,i,s)=>{n[i]=s},$R=()=>{const{invalidate:r}=ef(),e=new Map,t=new Map,n=(s,a,o,l)=>{if(jR(o)){const u=e.get(a);if(u&&u.instance===s&&u.value===o)return;e.set(a,{instance:s,value:o})}const{key:c,target:d}=H_(s,a);if(o!=null){const u=t.get(a);if(u)u(d,c,o);else{const h=Wx(d,c,o);t.set(a,h),h(d,c,o)}}else Wx(d,c,o)(d,c,o);l||ZR.has(c)&&(d.isPerspectiveCamera||d.isOrthographicCamera)&&d.updateProjectionMatrix()};return{updateProp:(s,a,o,l,c)=>{!YR.has(a)&&!l?.includes(a)&&n(s,a,o,c),r()}}},KR=r=>typeof r=="function"&&Function.prototype.toString.call(r).startsWith("class "),JR=(r,e)=>KR(r)?Array.isArray(e)?new r(...e):new r:r;function r0(r,e){_n(e,!0);let t=pt(e,"is",19,WR),n=pt(e,"manual",3,!1),i=pt(e,"makeDefault",3,!1),s=pt(e,"ref",15),a=rr(e,["$$slots","$$events","$$legacy","is","args","attach","manual","makeDefault","dispose","ref","oncreate","children"]);const o=Ve(()=>JR(t(),e.args));mn(()=>{s()!==z(o)&&s(z(o))});const l=qR(()=>({get ref(){return z(o)},get args(){return e.args},get attach(){return e.attach},get manual(){return n()},get makeDefault(){return i()},get dispose(){return e.dispose},get props(){return a}})),c=Object.keys(a),{updateProp:d}=$R();c.forEach(f=>{const g=Ve(()=>a[f]);mn(()=>{d(z(o),f,z(g),l?.pluginsProps,n())})}),UR(()=>z(o),()=>e.attach),mn(()=>{(Or(z(o),"PerspectiveCamera")||Or(z(o),"OrthographicCamera"))&&FR(()=>z(o),()=>n(),()=>i())}),BR(()=>e.dispose),mn(()=>{OR(z(o))&&zR(()=>z(o))}),GR(()=>z(o),c,a),Vi(()=>{z(o);let f;return di(()=>{f=e.oncreate?.(z(o))}),f});var u=Ct(),h=bt(u);on(h,()=>e.children??zt,()=>({ref:z(o)})),Oe(r,u),wn()}const QR={},cs=new Proxy(r0,{get(r,e){if(typeof e!="string")return r0;const t=QR[e]||lR[e];if(t===void 0)throw new Error(`No Three.js module found for ${e}. Did you forget to extend the catalogue?`);return HR(t),r0}});function eP(r,e,t){const n=RR();if(!n)throw new Error("No user context store found, did you invoke this function outside of your main component?");return e?(n.update(i=>{if(r in i)return i;const s=typeof e=="function"?e():e;return i[r]=s,i}),n.current[r]):Hp(n,i=>i[r])}const K_=0,tP=1,nP=2,Xx=2,i0=1.25,qx=1,Gl=32,tf=65535,rP=Math.pow(2,-24),s0=Symbol("SKIP_GENERATION");function iP(r){return r.index?r.index.count:r.attributes.position.count}function Rs(r){return iP(r)/3}function sP(r,e=ArrayBuffer){return r>65535?new Uint32Array(new e(4*r)):new Uint16Array(new e(2*r))}function aP(r,e){if(!r.index){const t=r.attributes.position.count,n=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=sP(t,n);r.setIndex(new vt(i,1));for(let s=0;sl-c);for(let l=0;la.offset-o.offset),i=n[n.length-1];i.count=Math.min(t-i.offset,i.count);let s=0;return n.forEach(({count:a})=>s+=a),t!==s}function a0(r,e,t,n,i){let s=1/0,a=1/0,o=1/0,l=-1/0,c=-1/0,d=-1/0,u=1/0,h=1/0,f=1/0,g=-1/0,x=-1/0,m=-1/0;for(let p=e*6,v=(e+t)*6;pl&&(l=w),bg&&(g=b);const T=r[p+2],A=r[p+3],M=T-A,S=T+A;Mc&&(c=S),Tx&&(x=T);const E=r[p+4],P=r[p+5],N=E-P,L=E+P;Nd&&(d=L),Em&&(m=E)}n[0]=s,n[1]=a,n[2]=o,n[3]=l,n[4]=c,n[5]=d,i[0]=u,i[1]=h,i[2]=f,i[3]=g,i[4]=x,i[5]=m}function lP(r,e=null,t=null,n=null){const i=r.attributes.position,s=r.index?r.index.array:null,a=Rs(r),o=i.normalized;let l;e===null?l=new Float32Array(a*6):l=e,t=t||0,n=n||a;const c=i.array,d=i.offset||0;let u=3;i.isInterleavedBufferAttribute&&(u=i.data.stride);const h=["getX","getY","getZ"];for(let f=t;fA&&(A=_),w>A&&(A=w);const M=(A-T)/2,S=b*2;l[x+S+0]=T+M,l[x+S+1]=M+(Math.abs(T)+M)*rP}}return l}function Yt(r,e,t){return t.min.x=e[r],t.min.y=e[r+1],t.min.z=e[r+2],t.max.x=e[r+3],t.max.y=e[r+4],t.max.z=e[r+5],t}function Yx(r){let e=-1,t=-1/0;for(let n=0;n<3;n++){const i=r[n+3]-r[n];i>t&&(t=i,e=n)}return e}function Zx(r,e){e.set(r)}function jx(r,e,t){let n,i;for(let s=0;s<3;s++){const a=s+3;n=r[s],i=e[s],t[s]=ni?n:i}}function Ed(r,e,t){for(let n=0;n<3;n++){const i=e[r+2*n],s=e[r+2*n+1],a=i-s,o=i+s;at[n+3]&&(t[n+3]=o)}}function hl(r){const e=r[3]-r[0],t=r[4]-r[1],n=r[5]-r[2];return 2*(e*t+t*n+n*e)}const Ti=32,cP=(r,e)=>r.candidate-e.candidate,as=new Array(Ti).fill().map(()=>({count:0,bounds:new Float32Array(6),rightCacheBounds:new Float32Array(6),leftCacheBounds:new Float32Array(6),candidate:0})),Cd=new Float32Array(6);function dP(r,e,t,n,i,s){let a=-1,o=0;if(s===K_)a=Yx(e),a!==-1&&(o=(e[a]+e[a+3])/2);else if(s===tP)a=Yx(r),a!==-1&&(o=uP(t,n,i,a));else if(s===nP){const l=hl(r);let c=i0*i;const d=n*6,u=(n+i)*6;for(let h=0;h<3;h++){const f=e[h],m=(e[h+3]-f)/Ti;if(i=T.candidate?Ed(y,t,T.rightCacheBounds):(Ed(y,t,T.leftCacheBounds),T.count++)}}for(let y=0;y=Ti&&(w=Ti-1);const T=as[w];T.count++,Ed(b,t,T.bounds)}const p=as[Ti-1];Zx(p.bounds,p.rightCacheBounds);for(let b=Ti-2;b>=0;b--){const y=as[b],_=as[b+1];jx(y.bounds,_.rightCacheBounds,y.rightCacheBounds)}let v=0;for(let b=0;b=l;)o--;if(a=l;)o--;if(apP)throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");return kl[t+6]=c/4,c=lp(c,o),kl[t+7]=l,c}}function mP(r,e){const t=(r.index?r.index.count:r.attributes.position.count)/3,n=t>2**16,i=n?4:2,s=e?new SharedArrayBuffer(t*i):new ArrayBuffer(t*i),a=n?new Uint32Array(s):new Uint16Array(s);for(let o=0,l=a.length;o=s&&(p=!0,a&&(console.warn(`MeshBVH: Max depth of ${s} reached when generating BVH. Consider increasing maxDepth.`),console.warn(h))),T<=o||M>=s)return b(w+T),_.offset=w,_.count=T,_;const S=dP(_.boundingData,A,e,w,T,l);if(S.axis===-1)return b(w+T),_.offset=w,_.count=T,_;const E=g(u,f,e,w,T,S);if(E===w||E===w+T)b(w+T),_.offset=w,_.count=T;else{_.splitAxis=S.axis;const P=new o0,N=w,L=E-w;_.left=P,a0(e,N,L,P.boundingData,m),y(P,N,L,m,M+1);const F=new o0,B=E,G=T-L;_.right=F,a0(e,B,G,F.boundingData,m),y(F,B,G,m,M+1)}return _}}function bP(r,e){const t=r.geometry;e.indirect&&(r._indirectBuffer=mP(t,e.useSharedArrayBuffer),oP(t,e.range)&&!e.verbose&&console.warn('MeshBVH: Provided geometry contains groups or a range that do not fully span the vertex contents while using the "indirect" option. BVH may incorrectly report intersections on unrendered portions of the geometry.')),r._indirectBuffer||aP(t,e);const n=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=J_(t,e.range),s=lP(t,null,i[0].offset,i[0].count),a=e.indirect?i:Q_(t,e.range);r._roots=a.map(o=>{const l=xP(r,s,o.offset,o.count,e),c=op(l),d=new n(Gl*c);return gP(0,l,d),d})}class qi{constructor(){this.min=1/0,this.max=-1/0}setFromPointsField(e,t){let n=1/0,i=-1/0;for(let s=0,a=e.length;si?l:i}this.min=n,this.max=i}setFromPoints(e,t){let n=1/0,i=-1/0;for(let s=0,a=t.length;si?l:i}this.min=n,this.max=i}isSeparated(e){return this.min>e.max||e.min>this.max}}qi.prototype.setFromBox=(function(){const r=new C;return function(t,n){const i=n.min,s=n.max;let a=1/0,o=-1/0;for(let l=0;l<=1;l++)for(let c=0;c<=1;c++)for(let d=0;d<=1;d++){r.x=i.x*l+s.x*(1-l),r.y=i.y*c+s.y*(1-c),r.z=i.z*d+s.z*(1-d);const u=t.dot(r);a=Math.min(u,a),o=Math.max(u,o)}this.min=a,this.max=o}})();const yP=(function(){const r=new C,e=new C,t=new C;return function(i,s,a){const o=i.start,l=r,c=s.start,d=e;t.subVectors(o,c),r.subVectors(i.end,i.start),e.subVectors(s.end,s.start);const u=t.dot(d),h=d.dot(l),f=d.dot(d),g=t.dot(l),m=l.dot(l)*f-h*h;let p,v;m!==0?p=(u*h-g*f)/m:p=0,v=(u+p*h)/f,a.x=p,a.y=v}})(),Ig=(function(){const r=new K,e=new C,t=new C;return function(i,s,a,o){yP(i,s,r);let l=r.x,c=r.y;if(l>=0&&l<=1&&c>=0&&c<=1){i.at(l,a),s.at(c,o);return}else if(l>=0&&l<=1){c<0?s.at(0,o):s.at(1,o),i.closestPointToPoint(o,!0,a);return}else if(c>=0&&c<=1){l<0?i.at(0,a):i.at(1,a),s.closestPointToPoint(a,!0,o);return}else{let d;l<0?d=i.start:d=i.end;let u;c<0?u=s.start:u=s.end;const h=e,f=t;if(i.closestPointToPoint(u,!0,e),s.closestPointToPoint(d,!0,t),h.distanceToSquared(u)<=f.distanceToSquared(d)){a.copy(h),o.copy(u);return}else{a.copy(d),o.copy(f);return}}}})(),vP=(function(){const r=new C,e=new C,t=new Mr,n=new nr;return function(s,a){const{radius:o,center:l}=s,{a:c,b:d,c:u}=a;if(n.start=c,n.end=d,n.closestPointToPoint(l,!0,r).distanceTo(l)<=o||(n.start=c,n.end=u,n.closestPointToPoint(l,!0,r).distanceTo(l)<=o)||(n.start=d,n.end=u,n.closestPointToPoint(l,!0,r).distanceTo(l)<=o))return!0;const x=a.getPlane(t);if(Math.abs(x.distanceToPoint(l))<=o){const p=x.projectPoint(l,e);if(a.containsPoint(p))return!0}return!1}})(),_P=["x","y","z"],Ei=1e-15,$x=Ei*Ei;function br(r){return Math.abs(r)new C),this.satBounds=new Array(4).fill().map(()=>new qi),this.points=[this.a,this.b,this.c],this.plane=new Mr,this.isDegenerateIntoSegment=!1,this.isDegenerateIntoPoint=!1,this.degenerateSegment=new nr,this.needsUpdate=!0}intersectsSphere(e){return vP(e,this)}update(){const e=this.a,t=this.b,n=this.c,i=this.points,s=this.satAxes,a=this.satBounds,o=s[0],l=a[0];this.getNormal(o),l.setFromPoints(o,i);const c=s[1],d=a[1];c.subVectors(e,t),d.setFromPoints(c,i);const u=s[2],h=a[2];u.subVectors(t,n),h.setFromPoints(u,i);const f=s[3],g=a[3];f.subVectors(n,e),g.setFromPoints(f,i);const x=c.length(),m=u.length(),p=f.length();this.isDegenerateIntoPoint=!1,this.isDegenerateIntoSegment=!1,x0)f(b.c,b.a,b.b,w,y,_,E,M,S,P,N);else if(A>0)f(b.b,b.a,b.c,_,y,w,S,M,E,P,N);else if(S*E>0||M!=0)f(b.a,b.b,b.c,y,_,w,M,S,E,P,N);else if(S!=0)f(b.b,b.a,b.c,_,y,w,S,M,E,P,N);else if(E!=0)f(b.c,b.a,b.b,w,y,_,E,M,S,P,N);else return!0;return!1}function x(b,y,_,w){const T=y.degenerateSegment,A=b.plane.distanceToPoint(T.start),M=b.plane.distanceToPoint(T.end);return br(A)?br(M)?h(b,y,_,w):(_&&(_.start.copy(T.start),_.end.copy(T.start)),b.containsPoint(T.start)):br(M)?(_&&(_.start.copy(T.end),_.end.copy(T.end)),b.containsPoint(T.end)):b.plane.intersectLine(T,n)!=null?(_&&(_.start.copy(n),_.end.copy(n)),b.containsPoint(n)):!1}function m(b,y,_){const w=y.a;return br(b.plane.distanceToPoint(w))&&b.containsPoint(w)?(_&&(_.start.copy(w),_.end.copy(w)),!0):!1}function p(b,y,_){const w=b.degenerateSegment,T=y.a;return w.closestPointToPoint(T,!0,n),T.distanceToSquared(n)<$x?(_&&(_.start.copy(T),_.end.copy(T)),!0):!1}function v(b,y,_,w){if(b.isDegenerateIntoSegment)if(y.isDegenerateIntoSegment){const T=b.degenerateSegment,A=y.degenerateSegment,M=i,S=s;T.delta(M),A.delta(S);const E=n.subVectors(A.start,T.start),P=M.x*S.y-M.y*S.x;if(br(P))return!1;const N=(E.x*S.y-E.y*S.x)/P,L=-(M.x*E.y-M.y*E.x)/P;if(N<0||N>1||L<0||L>1)return!1;const F=T.start.z+M.z*N,B=A.start.z+S.z*L;return br(F-B)?(_&&(_.start.copy(T.start).addScaledVector(M,N),_.end.copy(T.start).addScaledVector(M,N)),!0):!1}else return y.isDegenerateIntoPoint?p(b,y,_):x(y,b,_,w);else{if(b.isDegenerateIntoPoint)return y.isDegenerateIntoPoint?y.a.distanceToSquared(b.a)<$x?(_&&(_.start.copy(b.a),_.end.copy(b.a)),!0):!1:y.isDegenerateIntoSegment?p(y,b,_):m(y,b,_);if(y.isDegenerateIntoPoint)return m(b,y,_);if(y.isDegenerateIntoSegment)return x(b,y,_,w)}}return function(y,_=null,w=!1){this.needsUpdate&&this.update(),y.isExtendedTriangle?y.needsUpdate&&y.update():(r.copy(y),r.update(),y=r);const T=v(this,y,_,w);if(T!==void 0)return T;const A=this.plane,M=y.plane;let S=M.distanceToPoint(this.a),E=M.distanceToPoint(this.b),P=M.distanceToPoint(this.c);br(S)&&(S=0),br(E)&&(E=0),br(P)&&(P=0);const N=S*E,L=S*P;if(N>0&&L>0)return!1;let F=A.distanceToPoint(y.a),B=A.distanceToPoint(y.b),G=A.distanceToPoint(y.c);br(F)&&(F=0),br(B)&&(B=0),br(G)&&(G=0);const O=F*B,Y=F*G;if(O>0&&Y>0)return!1;i.copy(A.normal),s.copy(M.normal);const te=i.cross(s);let de=0,Ee=Math.abs(te.x);const ve=Math.abs(te.y);ve>Ee&&(Ee=ve,de=1),Math.abs(te.z)>Ee&&(de=2);const He=_P[de],J=this.a[He],Q=this.b[He],we=this.c[He],Be=y.a[He],Ce=y.b[He],it=y.c[He];if(g(this,J,Q,we,N,L,S,E,P,d,o))return h(this,y,_,w);if(g(y,Be,Ce,it,O,Y,F,B,G,u,l))return h(this,y,_,w);if(d.yd.x?_.start.copy(l.start):_.start.copy(o.start),u.ynew C),this.satAxes=new Array(3).fill().map(()=>new C),this.satBounds=new Array(3).fill().map(()=>new qi),this.alignedSatBounds=new Array(3).fill().map(()=>new qi),this.needsUpdate=!1,e&&this.min.copy(e),t&&this.max.copy(t),n&&this.matrix.copy(n)}set(e,t,n){this.min.copy(e),this.max.copy(t),this.matrix.copy(n),this.needsUpdate=!0}copy(e){this.min.copy(e.min),this.max.copy(e.max),this.matrix.copy(e.matrix),this.needsUpdate=!0}}Vn.prototype.update=(function(){return function(){const e=this.matrix,t=this.min,n=this.max,i=this.points;for(let c=0;c<=1;c++)for(let d=0;d<=1;d++)for(let u=0;u<=1;u++){const h=1*c|2*d|4*u,f=i[h];f.x=c?n.x:t.x,f.y=d?n.y:t.y,f.z=u?n.z:t.z,f.applyMatrix4(e)}const s=this.satBounds,a=this.satAxes,o=i[0];for(let c=0;c<3;c++){const d=a[c],u=s[c],h=1<new nr),t=new Array(12).fill().map(()=>new nr),n=new C,i=new C;return function(a,o=0,l=null,c=null){if(this.needsUpdate&&this.update(),this.intersectsBox(a))return(l||c)&&(a.getCenter(i),this.closestPointToPoint(i,n),a.closestPointToPoint(n,i),l&&l.copy(n),c&&c.copy(i)),0;const d=o*o,u=a.min,h=a.max,f=this.points;let g=1/0;for(let m=0;m<8;m++){const p=f[m];i.copy(p).clamp(u,h);const v=p.distanceToSquared(i);if(vnew Pr)}}const Cr=new wP;class MP{constructor(){this.float32Array=null,this.uint16Array=null,this.uint32Array=null;const e=[];let t=null;this.setBuffer=n=>{t&&e.push(t),t=n,this.float32Array=new Float32Array(n),this.uint16Array=new Uint16Array(n),this.uint32Array=new Uint32Array(n)},this.clearBuffer=()=>{t=null,this.float32Array=null,this.uint16Array=null,this.uint32Array=null,e.length!==0&&this.setBuffer(e.pop())}}}const Lt=new MP;let ms,wo;const oo=[],Rd=new Dg(()=>new wt);function SP(r,e,t,n,i,s){ms=Rd.getPrimitive(),wo=Rd.getPrimitive(),oo.push(ms,wo),Lt.setBuffer(r._roots[e]);const a=cp(0,r.geometry,t,n,i,s);Lt.clearBuffer(),Rd.releasePrimitive(ms),Rd.releasePrimitive(wo),oo.pop(),oo.pop();const o=oo.length;return o>0&&(wo=oo[o-1],ms=oo[o-2]),a}function cp(r,e,t,n,i=null,s=0,a=0){const{float32Array:o,uint16Array:l,uint32Array:c}=Lt;let d=r*2;if(Kn(d,l)){const g=hr(r,c),x=Ar(d,l);return Yt(r,o,ms),n(g,x,!1,a,s+r,ms)}else{let P=function(L){const{uint16Array:F,uint32Array:B}=Lt;let G=L*2;for(;!Kn(G,F);)L=kr(L),G=L*2;return hr(L,B)},N=function(L){const{uint16Array:F,uint32Array:B}=Lt;let G=L*2;for(;!Kn(G,F);)L=Er(L,B),G=L*2;return hr(L,B)+Ar(G,F)};var h=P,f=N;const g=kr(r),x=Er(r,c);let m=g,p=x,v,b,y,_;if(i&&(y=ms,_=wo,Yt(m,o,y),Yt(p,o,_),v=i(y),b=i(_),b(fl.copy(e).clamp(d.min,d.max),fl.distanceToSquared(e)),intersectsBounds:(d,u,h)=>h{d.closestPointToPoint(e,fl);const h=e.distanceToSquared(fl);return h=169,AP=parseInt(Vo)<=161,Zs=new C,js=new C,$s=new C,Id=new K,Dd=new K,Ld=new K,Kx=new C,Jx=new C,Qx=new C,pl=new C;function kP(r,e,t,n,i,s,a,o){let l;if(s===En?l=r.intersectTriangle(n,t,e,!0,i):l=r.intersectTriangle(e,t,n,s!==$n,i),l===null)return null;const c=r.origin.distanceTo(i);return co?null:{distance:c,point:i.clone()}}function EP(r,e,t,n,i,s,a,o,l,c,d){Zs.fromBufferAttribute(e,s),js.fromBufferAttribute(e,a),$s.fromBufferAttribute(e,o);const u=kP(r,Zs,js,$s,pl,l,c,d);if(u){if(n){Id.fromBufferAttribute(n,s),Dd.fromBufferAttribute(n,a),Ld.fromBufferAttribute(n,o),u.uv=new K;const f=kt.getInterpolation(pl,Zs,js,$s,Id,Dd,Ld,u.uv);Pd||(u.uv=f)}if(i){Id.fromBufferAttribute(i,s),Dd.fromBufferAttribute(i,a),Ld.fromBufferAttribute(i,o),u.uv1=new K;const f=kt.getInterpolation(pl,Zs,js,$s,Id,Dd,Ld,u.uv1);Pd||(u.uv1=f),AP&&(u.uv2=u.uv1)}if(t){Kx.fromBufferAttribute(t,s),Jx.fromBufferAttribute(t,a),Qx.fromBufferAttribute(t,o),u.normal=new C;const f=kt.getInterpolation(pl,Zs,js,$s,Kx,Jx,Qx,u.normal);u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1),Pd||(u.normal=f)}const h={a:s,b:a,c:o,normal:new C,materialIndex:0};if(kt.getNormal(Zs,js,$s,h.normal),u.face=h,u.faceIndex=s,Pd){const f=new C;kt.getBarycoord(pl,Zs,js,$s,f),u.barycoord=f}}return u}function nf(r,e,t,n,i,s,a){const o=n*3;let l=o+0,c=o+1,d=o+2;const u=r.index;r.index&&(l=u.getX(l),c=u.getX(c),d=u.getX(d));const{position:h,normal:f,uv:g,uv1:x}=r.attributes,m=EP(t,h,f,g,x,l,c,d,e,s,a);return m?(m.faceIndex=n,i&&i.push(m),m):null}function tn(r,e,t,n){const i=r.a,s=r.b,a=r.c;let o=e,l=e+1,c=e+2;t&&(o=t.getX(o),l=t.getX(l),c=t.getX(c)),i.x=n.getX(o),i.y=n.getY(o),i.z=n.getZ(o),s.x=n.getX(l),s.y=n.getY(l),s.z=n.getZ(l),a.x=n.getX(c),a.y=n.getY(c),a.z=n.getZ(c)}function CP(r,e,t,n,i,s,a,o){const{geometry:l,_indirectBuffer:c}=r;for(let d=n,u=n+i;dw&&(w=P),NT&&(T=N),L<_&&(_=L),L>A&&(A=L)}return l[h+0]!==b||l[h+1]!==y||l[h+2]!==_||l[h+3]!==w||l[h+4]!==T||l[h+5]!==A?(l[h+0]=b,l[h+1]=y,l[h+2]=_,l[h+3]=w,l[h+4]=T,l[h+5]=A,!0):!1}else{const p=h+8,v=a[h+6],b=p+f,y=v+f;let _=g,w=!1,T=!1;e?_||(w=e.has(b),T=e.has(y),_=!w&&!T):(w=!0,T=!0);const A=_||w,M=_||T;let S=!1;A&&(S=u(p,f,_));let E=!1;M&&(E=u(v,f,_));const P=S||E;if(P)for(let N=0;N<3;N++){const L=p+N,F=v+N,B=l[L],G=l[L+3],O=l[F],Y=l[F+3];l[h+N]=BY?G:Y}return P}}}function As(r,e,t,n,i){let s,a,o,l,c,d;const u=1/t.direction.x,h=1/t.direction.y,f=1/t.direction.z,g=t.origin.x,x=t.origin.y,m=t.origin.z;let p=e[r],v=e[r+3],b=e[r+1],y=e[r+3+1],_=e[r+2],w=e[r+3+2];return u>=0?(s=(p-g)*u,a=(v-g)*u):(s=(v-g)*u,a=(p-g)*u),h>=0?(o=(b-x)*h,l=(y-x)*h):(o=(y-x)*h,l=(b-x)*h),s>l||o>a||((o>s||isNaN(s))&&(s=o),(l=0?(c=(_-m)*f,d=(w-m)*f):(c=(w-m)*f,d=(_-m)*f),s>d||c>a)?!1:((c>s||s!==s)&&(s=c),(d=n)}function DP(r,e,t,n,i,s,a,o){const{geometry:l,_indirectBuffer:c}=r;for(let d=n,u=n+i;d=0;let x,m;g?(x=kr(r),m=Er(r,l)):(x=Er(r,l),m=kr(r));const v=As(x,a,n,i,s)?up(x,e,t,n,i,s):null;if(v){const _=v.point[h];if(g?_<=a[m+u]:_>=a[m+u+3])return v}const y=As(m,a,n,i,s)?up(m,e,t,n,i,s):null;return v&&y?v.distance<=y.distance?v:y:v||y||null}}const Nd=new wt,lo=new Pr,co=new Pr,gl=new De,eb=new Vn,Ud=new Vn;function BP(r,e,t,n){Lt.setBuffer(r._roots[e]);const i=hp(0,r,t,n);return Lt.clearBuffer(),i}function hp(r,e,t,n,i=null){const{float32Array:s,uint16Array:a,uint32Array:o}=Lt;let l=r*2;if(i===null&&(t.boundingBox||t.computeBoundingBox(),eb.set(t.boundingBox.min,t.boundingBox.max,n),i=eb),Kn(l,a)){const d=e.geometry,u=d.index,h=d.attributes.position,f=t.index,g=t.attributes.position,x=hr(r,o),m=Ar(l,a);if(gl.copy(n).invert(),t.boundsTree)return Yt(r,s,Ud),Ud.matrix.copy(gl),Ud.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:v=>Ud.intersectsBox(v),intersectsTriangle:v=>{v.a.applyMatrix4(n),v.b.applyMatrix4(n),v.c.applyMatrix4(n),v.needsUpdate=!0;for(let b=x*3,y=(m+x)*3;bc0.distanceToBox(_),intersectsBounds:(_,w,T)=>T{if(e.boundsTree)return e.boundsTree.shapecast({boundsTraverseOrder:A=>ml.distanceToBox(A),intersectsBounds:(A,M,S)=>S{for(let S=A,E=A+M;Sw&&(w=L),FT&&(T=F),B<_&&(_=B),B>A&&(A=B)}}return l[h+0]!==b||l[h+1]!==y||l[h+2]!==_||l[h+3]!==w||l[h+4]!==T||l[h+5]!==A?(l[h+0]=b,l[h+1]=y,l[h+2]=_,l[h+3]=w,l[h+4]=T,l[h+5]=A,!0):!1}else{const p=h+8,v=a[h+6],b=p+f,y=v+f;let _=g,w=!1,T=!1;e?_||(w=e.has(b),T=e.has(y),_=!w&&!T):(w=!0,T=!0);const A=_||w,M=_||T;let S=!1;A&&(S=u(p,f,_));let E=!1;M&&(E=u(v,f,_));const P=S||E;if(P)for(let N=0;N<3;N++){const L=p+N,F=v+N,B=l[L],G=l[L+3],O=l[F],Y=l[F+3];l[h+N]=BY?G:Y}return P}}}function qP(r,e,t,n,i,s,a){Lt.setBuffer(r._roots[e]),fp(0,r,t,n,i,s,a),Lt.clearBuffer()}function fp(r,e,t,n,i,s,a){const{float32Array:o,uint16Array:l,uint32Array:c}=Lt,d=r*2;if(Kn(d,l)){const h=hr(r,c),f=Ar(d,l);DP(e,t,n,h,f,i,s,a)}else{const h=kr(r);As(h,o,n,s,a)&&fp(h,e,t,n,i,s,a);const f=Er(r,c);As(f,o,n,s,a)&&fp(f,e,t,n,i,s,a)}}const YP=["x","y","z"];function ZP(r,e,t,n,i,s){Lt.setBuffer(r._roots[e]);const a=pp(0,r,t,n,i,s);return Lt.clearBuffer(),a}function pp(r,e,t,n,i,s){const{float32Array:a,uint16Array:o,uint32Array:l}=Lt;let c=r*2;if(Kn(c,o)){const u=hr(r,l),h=Ar(c,o);return LP(e,t,n,u,h,i,s)}else{const u=ew(r,l),h=YP[u],g=n.direction[h]>=0;let x,m;g?(x=kr(r),m=Er(r,l)):(x=Er(r,l),m=kr(r));const v=As(x,a,n,i,s)?pp(x,e,t,n,i,s):null;if(v){const _=v.point[h];if(g?_<=a[m+u]:_>=a[m+u+3])return v}const y=As(m,a,n,i,s)?pp(m,e,t,n,i,s):null;return v&&y?v.distance<=y.distance?v:y:v||y||null}}const Od=new wt,uo=new Pr,ho=new Pr,xl=new De,tb=new Vn,Bd=new Vn;function jP(r,e,t,n){Lt.setBuffer(r._roots[e]);const i=gp(0,r,t,n);return Lt.clearBuffer(),i}function gp(r,e,t,n,i=null){const{float32Array:s,uint16Array:a,uint32Array:o}=Lt;let l=r*2;if(i===null&&(t.boundingBox||t.computeBoundingBox(),tb.set(t.boundingBox.min,t.boundingBox.max,n),i=tb),Kn(l,a)){const d=e.geometry,u=d.index,h=d.attributes.position,f=t.index,g=t.attributes.position,x=hr(r,o),m=Ar(l,a);if(xl.copy(n).invert(),t.boundsTree)return Yt(r,s,Bd),Bd.matrix.copy(xl),Bd.needsUpdate=!0,t.boundsTree.shapecast({intersectsBounds:v=>Bd.intersectsBox(v),intersectsTriangle:v=>{v.a.applyMatrix4(n),v.b.applyMatrix4(n),v.c.applyMatrix4(n),v.needsUpdate=!0;for(let b=x,y=m+x;bd0.distanceToBox(_),intersectsBounds:(_,w,T)=>T{if(e.boundsTree){const T=e.boundsTree;return T.shapecast({boundsTraverseOrder:A=>bl.distanceToBox(A),intersectsBounds:(A,M,S)=>S{for(let S=A,E=A+M;Snew wt),fo=new wt,po=new wt,u0=new wt,h0=new wt;let f0=!1;function nI(r,e,t,n){if(f0)throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");f0=!0;const i=r._roots,s=e._roots;let a,o=0,l=0;const c=new De().copy(t).invert();for(let d=0,u=i.length;dl.slice()),index:a?a.array.slice():null,indirectBuffer:s?s.slice():null}:o={roots:i,index:a?a.array:null,indirectBuffer:s},o}static deserialize(e,t,n={}){n={setIndex:!0,indirect:!!e.indirectBuffer,...n};const{index:i,roots:s,indirectBuffer:a}=e,o=new Lg(t,{...n,[s0]:!0});if(o._roots=s,o._indirectBuffer=a||null,n.setIndex){const l=t.getIndex();if(l===null){const c=new vt(e.index,1,!1);t.setIndex(c)}else l.array!==i&&(l.array.set(i),l.needsUpdate=!0)}return o}get indirect(){return!!this._indirectBuffer}constructor(e,t={}){if(e.isBufferGeometry){if(e.index&&e.index.isInterleavedBufferAttribute)throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.")}else throw new Error("MeshBVH: Only BufferGeometries are supported.");if(t=Object.assign({...rI,[s0]:!1},t),t.useSharedArrayBuffer&&!tI())throw new Error("MeshBVH: SharedArrayBuffer is not available.");this.geometry=e,this._roots=null,this._indirectBuffer=null,t[s0]||(bP(this,t),!e.boundingBox&&t.setBoundingBox&&(e.boundingBox=this.getBoundingBox(new wt))),this.resolveTriangleIndex=t.indirect?n=>this._indirectBuffer[n]:n=>n}refit(e=null){return(this.indirect?XP:IP)(this,e)}traverse(e,t=0){const n=this._roots[t],i=new Uint32Array(n),s=new Uint16Array(n);a(0);function a(o,l=0){const c=o*2,d=s[c+15]===tf;if(d){const u=i[o+6],h=s[c+14];e(l,d,new Float32Array(n,o*4,6),u,h)}else{const u=o+Gl/4,h=i[o+6],f=i[o+7];e(l,d,new Float32Array(n,o*4,6),f)||(a(u,l+1),a(h,l+1))}}}raycast(e,t=Wr,n=0,i=1/0){const s=this._roots,a=this.geometry,o=[],l=t.isMaterial,c=Array.isArray(t),d=a.groups,u=l?t.side:t,h=this.indirect?qP:UP;for(let f=0,g=s.length;fu(h,f,g,x,m)?!0:n(h,f,this,o,g,x,t)}else a||(o?a=(u,h,f,g)=>n(u,h,this,o,f,g,t):a=(u,h,f)=>f);let l=!1,c=0;const d=this._roots;for(let u=0,h=d.length;u{const x=this.resolveTriangleIndex(g);tn(a,x*3,o,l)}:g=>{tn(a,g*3,o,l)},d=Cr.getPrimitive(),u=e.geometry.index,h=e.geometry.attributes.position,f=e.indirect?g=>{const x=e.resolveTriangleIndex(g);tn(d,x*3,u,h)}:g=>{tn(d,g*3,u,h)};if(s){const g=(x,m,p,v,b,y,_,w)=>{for(let T=p,A=p+v;TVd.intersectsBox(n),intersectsTriangle:n=>Vd.intersectsTriangle(n)})}intersectsSphere(e){return this.shapecast({intersectsBounds:t=>e.intersectsBox(t),intersectsTriangle:t=>t.intersectsSphere(e)})}closestPointToGeometry(e,t,n={},i={},s=0,a=1/0){return(this.indirect?eI:WP)(this,e,t,n,i,s,a)}closestPointToPoint(e,t={},n=0,i=1/0){return TP(this,e,t,n,i)}getBoundingBox(e){return e.makeEmpty(),this._roots.forEach(n=>{Yt(0,new Float32Array(n),nb),e.union(nb)}),e}}const iI=` - -// A stack of uint32 indices can can store the indices for -// a perfectly balanced tree with a depth up to 31. Lower stack -// depth gets higher performance. -// -// However not all trees are balanced. Best value to set this to -// is the trees max depth. -#ifndef BVH_STACK_DEPTH -#define BVH_STACK_DEPTH 60 -#endif - -#ifndef INFINITY -#define INFINITY 1e20 -#endif - -// Utilities -uvec4 uTexelFetch1D( usampler2D tex, uint index ) { - - uint width = uint( textureSize( tex, 0 ).x ); - uvec2 uv; - uv.x = index % width; - uv.y = index / width; - - return texelFetch( tex, ivec2( uv ), 0 ); - -} - -ivec4 iTexelFetch1D( isampler2D tex, uint index ) { - - uint width = uint( textureSize( tex, 0 ).x ); - uvec2 uv; - uv.x = index % width; - uv.y = index / width; - - return texelFetch( tex, ivec2( uv ), 0 ); - -} - -vec4 texelFetch1D( sampler2D tex, uint index ) { - - uint width = uint( textureSize( tex, 0 ).x ); - uvec2 uv; - uv.x = index % width; - uv.y = index / width; - - return texelFetch( tex, ivec2( uv ), 0 ); - -} - -vec4 textureSampleBarycoord( sampler2D tex, vec3 barycoord, uvec3 faceIndices ) { - - return - barycoord.x * texelFetch1D( tex, faceIndices.x ) + - barycoord.y * texelFetch1D( tex, faceIndices.y ) + - barycoord.z * texelFetch1D( tex, faceIndices.z ); - -} - -void ndcToCameraRay( - vec2 coord, mat4 cameraWorld, mat4 invProjectionMatrix, - out vec3 rayOrigin, out vec3 rayDirection -) { - - // get camera look direction and near plane for camera clipping - vec4 lookDirection = cameraWorld * vec4( 0.0, 0.0, - 1.0, 0.0 ); - vec4 nearVector = invProjectionMatrix * vec4( 0.0, 0.0, - 1.0, 1.0 ); - float near = abs( nearVector.z / nearVector.w ); - - // get the camera direction and position from camera matrices - vec4 origin = cameraWorld * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec4 direction = invProjectionMatrix * vec4( coord, 0.5, 1.0 ); - direction /= direction.w; - direction = cameraWorld * direction - origin; - - // slide the origin along the ray until it sits at the near clip plane position - origin.xyz += direction.xyz * near / dot( direction, lookDirection ); - - rayOrigin = origin.xyz; - rayDirection = direction.xyz; - -} -`,sI=` - -#ifndef TRI_INTERSECT_EPSILON -#define TRI_INTERSECT_EPSILON 1e-5 -#endif - -// Raycasting -bool intersectsBounds( vec3 rayOrigin, vec3 rayDirection, vec3 boundsMin, vec3 boundsMax, out float dist ) { - - // https://www.reddit.com/r/opengl/comments/8ntzz5/fast_glsl_ray_box_intersection/ - // https://tavianator.com/2011/ray_box.html - vec3 invDir = 1.0 / rayDirection; - - // find intersection distances for each plane - vec3 tMinPlane = invDir * ( boundsMin - rayOrigin ); - vec3 tMaxPlane = invDir * ( boundsMax - rayOrigin ); - - // get the min and max distances from each intersection - vec3 tMinHit = min( tMaxPlane, tMinPlane ); - vec3 tMaxHit = max( tMaxPlane, tMinPlane ); - - // get the furthest hit distance - vec2 t = max( tMinHit.xx, tMinHit.yz ); - float t0 = max( t.x, t.y ); - - // get the minimum hit distance - t = min( tMaxHit.xx, tMaxHit.yz ); - float t1 = min( t.x, t.y ); - - // set distance to 0.0 if the ray starts inside the box - dist = max( t0, 0.0 ); - - return t1 >= dist; - -} - -bool intersectsTriangle( - vec3 rayOrigin, vec3 rayDirection, vec3 a, vec3 b, vec3 c, - out vec3 barycoord, out vec3 norm, out float dist, out float side -) { - - // https://stackoverflow.com/questions/42740765/intersection-between-line-and-triangle-in-3d - vec3 edge1 = b - a; - vec3 edge2 = c - a; - norm = cross( edge1, edge2 ); - - float det = - dot( rayDirection, norm ); - float invdet = 1.0 / det; - - vec3 AO = rayOrigin - a; - vec3 DAO = cross( AO, rayDirection ); - - vec4 uvt; - uvt.x = dot( edge2, DAO ) * invdet; - uvt.y = - dot( edge1, DAO ) * invdet; - uvt.z = dot( AO, norm ) * invdet; - uvt.w = 1.0 - uvt.x - uvt.y; - - // set the hit information - barycoord = uvt.wxy; // arranged in A, B, C order - dist = uvt.z; - side = sign( det ); - norm = side * normalize( norm ); - - // add an epsilon to avoid misses between triangles - uvt += vec4( TRI_INTERSECT_EPSILON ); - - return all( greaterThanEqual( uvt, vec4( 0.0 ) ) ); - -} - -bool intersectTriangles( - // geometry info and triangle range - sampler2D positionAttr, usampler2D indexAttr, uint offset, uint count, - - // ray - vec3 rayOrigin, vec3 rayDirection, - - // outputs - inout float minDistance, inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord, - inout float side, inout float dist -) { - - bool found = false; - vec3 localBarycoord, localNormal; - float localDist, localSide; - for ( uint i = offset, l = offset + count; i < l; i ++ ) { - - uvec3 indices = uTexelFetch1D( indexAttr, i ).xyz; - vec3 a = texelFetch1D( positionAttr, indices.x ).rgb; - vec3 b = texelFetch1D( positionAttr, indices.y ).rgb; - vec3 c = texelFetch1D( positionAttr, indices.z ).rgb; - - if ( - intersectsTriangle( rayOrigin, rayDirection, a, b, c, localBarycoord, localNormal, localDist, localSide ) - && localDist < minDistance - ) { - - found = true; - minDistance = localDist; - - faceIndices = uvec4( indices.xyz, i ); - faceNormal = localNormal; - - side = localSide; - barycoord = localBarycoord; - dist = localDist; - - } - - } - - return found; - -} - -bool intersectsBVHNodeBounds( vec3 rayOrigin, vec3 rayDirection, sampler2D bvhBounds, uint currNodeIndex, out float dist ) { - - uint cni2 = currNodeIndex * 2u; - vec3 boundsMin = texelFetch1D( bvhBounds, cni2 ).xyz; - vec3 boundsMax = texelFetch1D( bvhBounds, cni2 + 1u ).xyz; - return intersectsBounds( rayOrigin, rayDirection, boundsMin, boundsMax, dist ); - -} - -// use a macro to hide the fact that we need to expand the struct into separate fields -#define bvhIntersectFirstHit( bvh, rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist ) _bvhIntersectFirstHit( bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents, rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist ) - -bool _bvhIntersectFirstHit( - // bvh info - sampler2D bvh_position, usampler2D bvh_index, sampler2D bvh_bvhBounds, usampler2D bvh_bvhContents, - - // ray - vec3 rayOrigin, vec3 rayDirection, - - // output variables split into separate variables due to output precision - inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord, - inout float side, inout float dist -) { - - // stack needs to be twice as long as the deepest tree we expect because - // we push both the left and right child onto the stack every traversal - int ptr = 0; - uint stack[ BVH_STACK_DEPTH ]; - stack[ 0 ] = 0u; - - float triangleDistance = INFINITY; - bool found = false; - while ( ptr > - 1 && ptr < BVH_STACK_DEPTH ) { - - uint currNodeIndex = stack[ ptr ]; - ptr --; - - // check if we intersect the current bounds - float boundsHitDistance; - if ( - ! intersectsBVHNodeBounds( rayOrigin, rayDirection, bvh_bvhBounds, currNodeIndex, boundsHitDistance ) - || boundsHitDistance > triangleDistance - ) { - - continue; - - } - - uvec2 boundsInfo = uTexelFetch1D( bvh_bvhContents, currNodeIndex ).xy; - bool isLeaf = bool( boundsInfo.x & 0xffff0000u ); - - if ( isLeaf ) { - - uint count = boundsInfo.x & 0x0000ffffu; - uint offset = boundsInfo.y; - - found = intersectTriangles( - bvh_position, bvh_index, offset, count, - rayOrigin, rayDirection, triangleDistance, - faceIndices, faceNormal, barycoord, side, dist - ) || found; - - } else { - - uint leftIndex = currNodeIndex + 1u; - uint splitAxis = boundsInfo.x & 0x0000ffffu; - uint rightIndex = boundsInfo.y; - - bool leftToRight = rayDirection[ splitAxis ] >= 0.0; - uint c1 = leftToRight ? leftIndex : rightIndex; - uint c2 = leftToRight ? rightIndex : leftIndex; - - // set c2 in the stack so we traverse it later. We need to keep track of a pointer in - // the stack while we traverse. The second pointer added is the one that will be - // traversed first - ptr ++; - stack[ ptr ] = c2; - - ptr ++; - stack[ ptr ] = c1; - - } - - } - - return found; - -} -`,aI=` -struct BVH { - - usampler2D index; - sampler2D position; - - sampler2D bvhBounds; - usampler2D bvhContents; - -}; -`,oI=aI,lI=` - ${iI} - ${sI} -`,rw=1e-6,cI=rw*.5,iw=Math.pow(10,-Math.log10(rw)),dI=cI*iw;function ri(r){return~~(r*iw+dI)}function uI(r){return`${ri(r.x)},${ri(r.y)}`}function rb(r){return`${ri(r.x)},${ri(r.y)},${ri(r.z)}`}function hI(r){return`${ri(r.x)},${ri(r.y)},${ri(r.z)},${ri(r.w)}`}function fI(r,e,t){t.direction.subVectors(e,r).normalize();const n=r.dot(t.direction);return t.origin.copy(r).addScaledVector(t.direction,-n),t}function sw(){return typeof SharedArrayBuffer<"u"}function pI(r){if(r.buffer instanceof SharedArrayBuffer)return r;const e=r.constructor,t=r.buffer,n=new SharedArrayBuffer(t.byteLength),i=new Uint8Array(t);return new Uint8Array(n).set(i,0),new e(n)}function gI(r,e=ArrayBuffer){return r>65535?new Uint32Array(new e(4*r)):new Uint16Array(new e(2*r))}function mI(r,e){if(!r.index){const t=r.attributes.position.count,n=e.useSharedArrayBuffer?SharedArrayBuffer:ArrayBuffer,i=gI(t,n);r.setIndex(new vt(i,1));for(let s=0;sl.end)){if(l.end=d.end)s(d.end,l.end)||r.splice(o+1,0,{start:d.end,end:l.end,index:l.index}),l.end=d.start,d.start=0,d.end=0;else if(l.start>=d.start&&l.end<=d.end)s(l.end,d.end)||e.splice(c+1,0,{start:l.end,end:d.end,index:d.index}),d.end=l.start,l.start=0,l.end=0;else if(l.start<=d.start&&l.end<=d.end){const u=l.end;l.end=d.start,d.start=u}else if(l.start>=d.start&&l.end>=d.end){const u=d.end;d.end=l.start,l.start=u}else throw new Error}if(t.has(l.index)||t.set(l.index,[]),t.has(d.index)||t.set(d.index,[]),t.get(l.index).push(d.index),t.get(d.index).push(l.index),a(d)&&(e.splice(c,1),c--),a(l)){r.splice(o,1),o--;break}}}i(r),i(e);function i(o){for(let l=0;lab;return l.direction.angleTo(c.direction)>ob||d}function o(l,c){const d=l.origin.distanceTo(c.origin),u=l.direction.angleTo(c.direction);return d/ab+u/ob}}}const p0=new C,g0=new C,Gd=new qr;function SI(r,e,t){const n=r.attributes,i=r.index,s=n.position,a=new Map,o=new Map,l=Array.from(e),c=new MI;for(let d=0,u=l.length;dy&&([b,y]=[y,b]),Gd.direction.dot(v.direction)<0?p.reverse.push({start:b,end:y,index:h}):p.forward.push({start:b,end:y,index:h})}return o.forEach(({forward:d,reverse:u},h)=>{wI(d,u,a,t),d.length===0&&u.length===0&&o.delete(h)}),{disjointConnectivityMap:a,fragmentMap:o}}const TI=new K,m0=new C,AI=new rt,x0=["","",""];class kI{constructor(e=null){this.data=null,this.disjointConnections=null,this.unmatchedDisjointEdges=null,this.unmatchedEdges=-1,this.matchedEdges=-1,this.useDrawRange=!0,this.useAllAttributes=!1,this.matchDisjointEdges=!1,this.degenerateEpsilon=1e-8,e&&this.updateFrom(e)}getSiblingTriangleIndex(e,t){const n=this.data[e*3+t];return n===-1?-1:~~(n/3)}getSiblingEdgeIndex(e,t){const n=this.data[e*3+t];return n===-1?-1:n%3}getDisjointSiblingTriangleIndices(e,t){const n=e*3+t,i=this.disjointConnections.get(n);return i?i.map(s=>~~(s/3)):[]}getDisjointSiblingEdgeIndices(e,t){const n=e*3+t,i=this.disjointConnections.get(n);return i?i.map(s=>s%3):[]}isFullyConnected(){return this.unmatchedEdges===0}updateFrom(e){const{useAllAttributes:t,useDrawRange:n,matchDisjointEdges:i,degenerateEpsilon:s}=this,a=t?b:v,o=new Map,{attributes:l}=e,c=t?Object.keys(l):null,d=e.index,u=l.position;let h=Ng(e);const f=h;let g=0;n&&(g=e.drawRange.start,e.drawRange.count!==1/0&&(h=~~(e.drawRange.count/3)));let x=this.data;(!x||x.length<3*f)&&(x=new Int32Array(3*f)),x.fill(-1);let m=0,p=new Set;for(let y=g,_=h*3+g;y<_;y+=3){const w=y;for(let T=0;T<3;T++){let A=w+T;d&&(A=d.getX(A)),x0[T]=a(A)}for(let T=0;T<3;T++){const A=(T+1)%3,M=x0[T],S=x0[A],E=`${S}_${M}`;if(o.has(E)){const P=w+T,N=o.get(E);x[P]=N,x[N]=P,o.delete(E),m+=2,p.delete(N)}else{const P=`${M}_${S}`,N=w+T;o.set(P,N),p.add(N)}}}if(i){const{fragmentMap:y,disjointConnectivityMap:_}=SI(e,p,s);p.clear(),y.forEach(({forward:w,reverse:T})=>{w.forEach(({index:A})=>p.add(A)),T.forEach(({index:A})=>p.add(A))}),this.unmatchedDisjointEdges=y,this.disjointConnections=_,m=h*3-p.size}this.matchedEdges=m,this.unmatchedEdges=p.size,this.data=x;function v(y){return m0.fromBufferAttribute(u,y),rb(m0)}function b(y){let _="";for(let w=0,T=c.length;w=this._pool.length&&this._pool.push(new kt),this._pool[this._index++]}clear(){this._index=0}reset(){this._pool.length=0,this._index=0}}class PI{constructor(){this.trianglePool=new RI,this.triangles=[],this.normal=new C,this.coplanarTriangleUsed=!1}initialize(e){this.reset();const{triangles:t,trianglePool:n,normal:i}=this;if(Array.isArray(e))for(let s=0,a=e.length;sy0)throw new Error("Triangle Splitter: Cannot initialize with triangles that have different normals.");const l=n.getTriangle();l.copy(o),t.push(l)}else{e.getNormal(i);const s=n.getTriangle();s.copy(e),t.push(s)}}splitByTriangle(e){const{normal:t,triangles:n}=this;if(e.getNormal(v0).normalize(),Math.abs(1-Math.abs(v0.dot(t)))0?g.push(p):x.push(p),Math.abs(b)yl)if(h!==-1){h=(h+1)%3;let p=0;p===h&&(p=(p+1)%3);let v=p+1;v===h&&(v=(v+1)%3);const b=i.getTriangle();b.a.copy(m[v]),b.b.copy($t.end),b.c.copy($t.start),fs(b)||n.push(b),o.a.copy(m[p]),o.b.copy($t.start),o.c.copy($t.end),fs(o)&&(n.splice(s,1),s--,a--)}else{const p=g.length>=2?x[0]:g[0];if(p===0){let w=$t.start;$t.start=$t.end,$t.end=w}const v=(p+1)%3,b=(p+2)%3,y=i.getTriangle(),_=i.getTriangle();m[v].distanceToSquared($t.start)t.length&&(this.expand(),t=this.array);for(let i=0,s=e.length;i=t.length;){const i={};t.push(i);for(const s in n){const a=n[s],o=new ub(a.type);o.itemSize=a.itemSize,o.normalized=a.normalized,i[s]=o}}return t[e]}getGroupAttrArray(e,t=0){const{groupAttributes:n}=this;if(!n[0][e])throw new Error(`TypedAttributeData: Attribute with "${e}" has not been initialized`);return this.getGroupAttrSet(t)[e]}initializeArray(e,t,n,i){const{groupAttributes:s}=this,o=s[0][e];if(o){if(o.type!==t)for(let l=0,c=s.length;l{for(const n in t)t[n].clear()})}delete(e){this.groupAttributes.forEach(t=>{delete t[e]})}reset(){this.groupAttributes=[],this.groupCount=0}}class hb{constructor(){this.intersectionSet={},this.ids=[]}add(e,t){const{intersectionSet:n,ids:i}=this;n[e]||(n[e]=[],i.push(e)),n[e].push(t)}}const xp=0,bp=1,LI=2,aw=3,NI=4,ow=5,lw=6,_r=new qr,fb=new De,Dn=new kt,wi=new C,pb=new rt,gb=new rt,mb=new rt,w0=new rt,Wd=new rt,Xd=new rt,xb=new nr,M0=new C,S0=1e-8,UI=1e-15,ia=-1,sa=1,cu=-2,du=2,Wl=0,Ks=1,Ug=2,FI=1e-14;let uu=null;function bb(r){uu=r}function cw(r,e){r.getMidpoint(_r.origin),r.getNormal(_r.direction);const t=e.raycastFirst(_r,$n);return!!(t&&_r.direction.dot(t.face.normal)>0)?ia:sa}function OI(r,e){function t(){return Math.random()-.5}r.getNormal(M0),_r.direction.copy(M0),r.getMidpoint(_r.origin);const n=3;let i=0,s=1/0;for(let a=0;a0)&&i++,o!==null&&(s=Math.min(s,o.distance)),s<=UI)return o.face.normal.dot(M0)>0?du:cu;if(i/n>.5||(a-i+1)/n>.5)break}return i/n>.5?ia:sa}function BI(r,e){const t=new hb,n=new hb;return fb.copy(r.matrixWorld).invert().multiply(e.matrixWorld),r.geometry.boundsTree.bvhcast(e.geometry.boundsTree,fb,{intersectsTriangles(i,s,a,o){if(!fs(i)&&!fs(s)){let l=i.intersectsTriangle(s,xb,!0);if(!l){const c=i.plane,d=s.plane,u=c.normal,h=d.normal;u.dot(h)===1&&Math.abs(c.constant-d.constant){s.push(c.x),i>1&&s.push(c.y),i>2&&s.push(c.z),i>3&&s.push(c.w)};w0.set(0,0,0,0).addScaledVector(r,n.a.x).addScaledVector(e,n.a.y).addScaledVector(t,n.a.z),Wd.set(0,0,0,0).addScaledVector(r,n.b.x).addScaledVector(e,n.b.y).addScaledVector(t,n.b.z),Xd.set(0,0,0,0).addScaledVector(r,n.c.x).addScaledVector(e,n.c.y).addScaledVector(t,n.c.z),o&&(w0.normalize(),Wd.normalize(),Xd.normalize()),l(w0),a?(l(Xd),l(Wd)):(l(Wd),l(Xd))}function A0(r,e,t,n,i,s=!1){for(const a in i){const o=e[a],l=i[a];if(!(a in e))throw new Error(`CSG Operations: Attribute ${a} no available on geometry.`);const c=o.itemSize;a==="position"?(wi.fromBufferAttribute(o,r).applyMatrix4(t),l.push(wi.x,wi.y,wi.z)):a==="normal"?(wi.fromBufferAttribute(o,r).applyNormalMatrix(n),s&&wi.multiplyScalar(-1),l.push(wi.x,wi.y,wi.z)):(l.push(o.getX(r)),c>1&&l.push(o.getY(r)),c>2&&l.push(o.getZ(r)),c>3&&l.push(o.getW(r)))}}class GI{constructor(e){this.triangle=new kt().copy(e),this.intersects={}}addTriangle(e,t){this.intersects[e]=new kt().copy(t)}getIntersectArray(){const e=[],{intersects:t}=this;for(const n in t)e.push(t[n]);return e}}class yb{constructor(){this.data={}}addTriangleIntersection(e,t,n,i){const{data:s}=this;s[e]||(s[e]=new GI(t)),s[e].addTriangle(n,i)}getTrianglesAsArray(e=null){const{data:t}=this,n=[];if(e!==null)e in t&&n.push(t[e].triangle);else for(const i in t)n.push(t[i].triangle);return n}getTriangleIndices(){return Object.keys(this.data).map(e=>parseInt(e))}getIntersectionIndices(e){const{data:t}=this;return t[e]?Object.keys(t[e].intersects).map(n=>parseInt(n)):[]}getIntersectionsAsArray(e=null,t=null){const{data:n}=this,i=new Set,s=[],a=o=>{if(n[o])if(t!==null)n[o].intersects[t]&&s.push(n[o].intersects[t]);else{const l=n[o].intersects;for(const c in l)i.has(c)||(i.add(c),s.push(l[c]))}};if(e!==null)a(e);else for(const o in n)a(o);return s}reset(){this.data={}}}class HI{constructor(){this.enabled=!1,this.triangleIntersectsA=new yb,this.triangleIntersectsB=new yb,this.intersectionEdges=[]}addIntersectingTriangles(e,t,n,i){const{triangleIntersectsA:s,triangleIntersectsB:a}=this;s.addTriangleIntersection(e,t,n,i),a.addTriangleIntersection(n,i,e,t)}addEdge(e){this.intersectionEdges.push(e.clone())}reset(){this.triangleIntersectsA.reset(),this.triangleIntersectsB.reset(),this.intersectionEdges=[]}init(){this.enabled&&(this.reset(),bb(this))}complete(){this.enabled&&bb(null)}}const xs=new De,uh=new at,Js=new kt,qd=new kt,os=new kt,Yd=new kt,Br=[],ma=[];function WI(r){for(const e of r)return e}function XI(r,e,t,n,i,s={}){const{useGroups:a=!0}=s,{aIntersections:o,bIntersections:l}=BI(r,e),c=[];let d=null,u;return u=a?0:-1,vb(r,e,o,t,!1,n,i,u),_b(r,e,o,t,!1,i,u),t.findIndex(f=>f!==lw&&f!==ow)!==-1&&(u=a?r.geometry.groups.length||1:-1,vb(e,r,l,t,!0,n,i,u),_b(e,r,l,t,!0,i,u)),Br.length=0,ma.length=0,{groups:c,materials:d}}function vb(r,e,t,n,i,s,a,o=0){const l=r.matrixWorld.determinant()<0;xs.copy(e.matrixWorld).invert().multiply(r.matrixWorld),uh.getNormalMatrix(r.matrixWorld).multiplyScalar(l?-1:1);const c=r.geometry.groupIndices,d=r.geometry.index,u=r.geometry.attributes.position,h=e.geometry.boundsTree,f=e.geometry.index,g=e.geometry.attributes.position,x=t.ids,m=t.intersectionSet;for(let p=0,v=x.length;p0;){const p=WI(x);x.delete(p),f.push(p);const v=3*p,b=d.getX(v+0),y=d.getX(v+1),_=d.getX(v+2);os.a.fromBufferAttribute(h,b).applyMatrix4(xs),os.b.fromBufferAttribute(h,y).applyMatrix4(xs),os.c.fromBufferAttribute(h,_).applyMatrix4(xs);const w=cw(os,l);ma.length=0,Br.length=0;for(let T=0,A=n.length;T0;){const T=f.pop();for(let A=0;A<3;A++){const M=g.getSiblingTriangleIndex(T,A);M!==-1&&x.has(M)&&(f.push(M),x.delete(M))}if(Br.length!==0){const A=3*T,M=d.getX(A+0),S=d.getX(A+1),E=d.getX(A+2),P=a===-1?0:c[T]+a;if(os.a.fromBufferAttribute(h,M),os.b.fromBufferAttribute(h,S),os.c.fromBufferAttribute(h,E),!fs(os))for(let N=0,L=Br.length;N{t[n.materialIndex]=e})),t}class jI{constructor(){this.triangleSplitter=new PI,this.attributeData=[],this.attributes=["position","uv","normal"],this.useGroups=!0,this.consolidateGroups=!0,this.debug=new HI}getGroupRanges(e){return!this.useGroups||e.groups.length===0?[{start:0,count:1/0,materialIndex:0}]:e.groups.map(t=>({...t}))}evaluate(e,t,n,i=new mp){let s=!0;if(Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i],s=!1),i.length!==n.length)throw new Error("Evaluator: operations and target array passed as different sizes.");e.prepareGeometry(),t.prepareGeometry();const{triangleSplitter:a,attributeData:o,attributes:l,useGroups:c,consolidateGroups:d,debug:u}=this;for(;o.length{YI(e.geometry,p.geometry,o[v],l)}),u.init(),XI(e,t,n,a,o,{useGroups:c}),u.complete();const h=this.getGroupRanges(e.geometry),f=wb(h,e.material),g=this.getGroupRanges(t.geometry),x=wb(g,t.material);g.forEach(p=>p.materialIndex+=f.length);let m=[...h,...g].map((p,v)=>({...p,index:v}));if(c){const p=[...f,...x];d&&(m=m.map(b=>{const y=p[b.materialIndex];return b.materialIndex=p.indexOf(y),b}).sort((b,y)=>b.materialIndex-y.materialIndex));const v=[];for(let b=0,y=p.length;b{b.material=v})}else m=[{start:0,count:1/0,index:0,materialIndex:0}],i.forEach(p=>{p.material=f[0]});return i.forEach((p,v)=>{const b=p.geometry;ZI(b,o[v],m),d&&qI(b.groups)}),s?i:i[0]}evaluateHierarchy(e,t=new mp){e.updateMatrixWorld(!0);const n=(s,a)=>{const o=s.children;for(let l=0,c=o.length;l{const a=s.children;let o=!1;for(let c=0,d=a.length;c{c?c=this.evaluate(c,d,d.operation):c=this.evaluate(s,d,d.operation)}),s._cachedGeometry=c.geometry,s._cachedMaterials=c.material,!0}else return o||l};return i(e),t.geometry=e._cachedGeometry,t.material=e._cachedMaterials,t}reset(){this.triangleSplitter.reset()}}const $I=r=>{if(r.length===0)return 0;let e=r[0];for(const t of r)eMath.max(Math.min(r,t),e),yr=r=>Math.round(r*100)/100,Mb=r=>({type:"straight",length:r}),Sb=(r,e)=>({type:"curve",radius:r,angle:e});class U{static evaluator=new jI;static degreesToRadians=e=>e*(Math.PI/180);static generateWedgePoints(e,t){const n=e*2,i=360-t;if(i<=0)return[];const s=this.degreesToRadians(t),a=this.degreesToRadians(360),o=Math.max(8,Math.ceil(i/15)),l=[[0,0]];for(let c=0;c<=o;c++){const d=c/o,u=s+(a-s)*d,h=Math.cos(u)*n,f=Math.sin(u)*n;l[l.length]=[h,f]}return l[l.length]=[0,0],l}brush;_color;_isNegative;constructor(e,t,n=!1){this.brush=e,this._color=t,this._isNegative=n,this.brush.updateMatrixWorld()}get color(){return this._color}get isNegative(){return this._isNegative}clone=()=>new U(this.brush.clone(!0),this._color,this._isNegative);static geometryToBrush(e){const t=new mp(e.translate(0,0,0));return t.updateMatrixWorld(),t}static cube=(e,t,n,i)=>{if(e<=0||t<=0||n<=0)throw new Error(`Cube dimensions must be positive (got width: ${e}, height: ${t}, depth: ${n})`);if(!Number.isFinite(e)||!Number.isFinite(t)||!Number.isFinite(n))throw new Error(`Cube dimensions must be finite (got width: ${e}, height: ${t}, depth: ${n})`);const s=i?.color??"gray";return new U(this.geometryToBrush(new Wi(e,t,n)),s).normalize()};static cylinder=(e,t,n)=>{if(e<=0||t<=0)throw new Error(`Cylinder dimensions must be positive (got radius: ${e}, height: ${t})`);if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error(`Cylinder dimensions must be finite (got radius: ${e}, height: ${t})`);if(n?.topRadius!==void 0){if(n.topRadius<0)throw new Error(`Cylinder topRadius must be non-negative (got ${n.topRadius})`);if(!Number.isFinite(n.topRadius))throw new Error(`Cylinder topRadius must be finite (got ${n.topRadius})`)}const i=n?.color??"gray",s=n?.angle??360,a=new U(this.geometryToBrush(new Aa(n?.topRadius??e,e,t,Zd(e*8,16,48),1,!1)),i).normalize();if(s>=360)return a;const o=this.generateWedgePoints(e,s);if(o.length===0)return a;const l=this.profilePrismFromPoints(t*2,o,{color:i});return U.SUBTRACT(a,l)};static sphere=(e,t)=>{if(e<=0)throw new Error(`Sphere radius must be positive (got ${e})`);if(!Number.isFinite(e))throw new Error(`Sphere radius must be finite (got ${e})`);const n=t?.color??"gray",i=t?.angle??360,s=new U(this.geometryToBrush(new qo(e,t?.segments??Zd(e*8,16,48),t?.segments??Zd(e*8,16,48))),n).normalize();if(i>=360)return s;const a=this.generateWedgePoints(e,i);if(a.length===0)return s;const o=this.profilePrismFromPoints(e*4,a,{color:n});return U.SUBTRACT(s,o)};static cone=(e,t,n)=>{if(e<=0||t<=0)throw new Error(`Cone dimensions must be positive (got radius: ${e}, height: ${t})`);if(!Number.isFinite(e)||!Number.isFinite(t))throw new Error(`Cone dimensions must be finite (got radius: ${e}, height: ${t})`);const i=n?.color??"gray",s=n?.angle??360,a=new U(this.geometryToBrush(new Wo(e,t,n?.segments??Zd(e*8,16,48),1,!1)),i).normalize();if(s>=360)return a;const o=this.generateWedgePoints(e,s);if(o.length===0)return a;const l=this.profilePrismFromPoints(t*2,o,{color:i});return U.SUBTRACT(a,l)};static prism=(e,t,n,i)=>{if(e<3)throw new Error(`Prism must have at least 3 sides (got ${e})`);if(!Number.isInteger(e))throw new Error(`Prism sides must be an integer (got ${e})`);if(t<=0||n<=0)throw new Error(`Prism dimensions must be positive (got radius: ${t}, height: ${n})`);if(!Number.isFinite(t)||!Number.isFinite(n))throw new Error(`Prism dimensions must be finite (got radius: ${t}, height: ${n})`);if(i?.topRadius!==void 0){if(i.topRadius<0)throw new Error(`Prism topRadius must be non-negative (got ${i.topRadius})`);if(!Number.isFinite(i.topRadius))throw new Error(`Prism topRadius must be finite (got ${i.topRadius})`)}const s=i?.color??"gray",a=i?.angle??360,o=new U(this.geometryToBrush(new Aa(i?.topRadius??t,t,n,e,1,!1)),s).normalize();if(a>=360)return o;const l=this.generateWedgePoints(t,a);if(l.length===0)return o;const c=this.profilePrismFromPoints(n*2,l,{color:s});return U.SUBTRACT(o,c)};static trianglePrism=(e,t,n)=>this.prism(3,e,t,n);static profilePrism=(e,t,n)=>{const i=n?.color??"gray",s=new Bi;t(s);const a=new Ac(s,{depth:e,bevelEnabled:!1,curveSegments:12,steps:1});return a.translate(0,0,-e/2),new U(this.geometryToBrush(a),i).normalize().rotate({x:90})};static profilePrismFromPoints=(e,t,n)=>{if(t.length<3)throw new Error("profilePrismFromPoints requires at least 3 points");return this.profilePrism(e,i=>{const[s,a]=t[0];i.moveTo(s,a);for(let o=1;o{if(t.length===0)throw new Error("profilePrismFromPath requires at least one segment");for(const[i,s]of t.entries())if(s.type==="straight"){if(s.length<=0||!Number.isFinite(s.length))throw new Error(`Invalid straight segment at index ${i}: length must be positive and finite (got ${s.length})`)}else if(s.type==="curve"){if(s.radius<0||!Number.isFinite(s.radius))throw new Error(`Invalid curve segment at index ${i}: radius must be non-negative and finite (got ${s.radius})`);if(!Number.isFinite(s.angle))throw new TypeError(`Invalid curve segment at index ${i}: angle must be finite (got ${s.angle})`)}return this.profilePrism(e,i=>{let s=0,a=0,o=0;i.moveTo(s,a);for(const l of t)if(l.type==="straight"){const c=s+l.length*Math.cos(o),d=a+l.length*Math.sin(o);i.lineTo(c,d),s=c,a=d}else if(l.type==="curve"){const{radius:c,angle:d}=l,u=this.degreesToRadians(d);if(c===0){o-=u;continue}const h=d>=0?1:-1,f=s+c*Math.sin(o)*h,g=a-c*Math.cos(o)*h,x=Math.atan2(a-g,s-f),m=x-u,p=d>=0;i.absarc(f,g,Math.abs(c),x,m,p),s=f+Math.abs(c)*Math.cos(m),a=g+Math.abs(c)*Math.sin(m),o-=u}i.lineTo(0,0)},n)};static revolutionSolid=(e,t)=>{const n=t?.angle??360,i=t?.color??"gray",s=new Bi;e(s);const a=s.getPoints(),o=Math.max(8,Math.ceil(360/15)),l=new U(this.geometryToBrush(new kc(a,o)),i).normalize();if(n>=360)return l;let c=0,d=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(const p of a)c=Math.max(c,Math.abs(p.x)),d=Math.min(d,p.y),u=Math.max(u,p.y);const h=u-d,f=(d+u)/2,g=this.generateWedgePoints(c,n);if(g.length===0)return l;const x=Math.max(h*2,c*4),m=this.profilePrismFromPoints(x,g,{color:i}).move({y:f});return U.SUBTRACT(l,m)};static revolutionSolidFromPoints=(e,t)=>{if(e.length<2)throw new Error("revolutionSolidFromPoints requires at least 2 points");const n=t?.angle??360,i=t?.color??"gray";return this.revolutionSolid(s=>{const[a,o]=e[0];s.moveTo(a,o);for(let l=1;l{if(e.length===0)throw new Error("revolutionSolidFromPath requires at least one segment");const n=t?.angle??360,i=t?.color??"gray";for(const[s,a]of e.entries())if(a.type==="straight"){if(a.length<=0||!Number.isFinite(a.length))throw new Error(`Invalid straight segment at index ${s}: length must be positive and finite (got ${a.length})`)}else if(a.type==="curve"){if(a.radius<0||!Number.isFinite(a.radius))throw new Error(`Invalid curve segment at index ${s}: radius must be non-negative and finite (got ${a.radius})`);if(!Number.isFinite(a.angle))throw new TypeError(`Invalid curve segment at index ${s}: angle must be finite (got ${a.angle})`)}return this.revolutionSolid(s=>{let a=0,o=0,l=0;s.moveTo(a,o);for(const c of e)if(c.type==="straight"){const d=a+c.length*Math.cos(l),u=o+c.length*Math.sin(l);s.lineTo(d,u),a=d,o=u}else if(c.type==="curve"){const{radius:d,angle:u}=c,h=this.degreesToRadians(u);if(d===0){l-=h;continue}const f=u>=0?1:-1,g=a+d*Math.sin(l)*f,x=o-d*Math.cos(l)*f,m=Math.atan2(o-x,a-g),p=m-h,v=u>=0;s.absarc(g,x,Math.abs(d),m,p,v),a=g+Math.abs(d)*Math.cos(p),o=x+Math.abs(d)*Math.sin(p),l-=h}},{angle:n,color:i})};at(e,t,n){return this.brush.position.set(e,t,n),this.brush.updateMatrixWorld(),this}move(e){return e.x!==void 0&&(this.brush.position.x+=e.x),e.y!==void 0&&(this.brush.position.y+=e.y),e.z!==void 0&&(this.brush.position.z+=e.z),this.brush.updateMatrixWorld(),this}angleToRadian=e=>e*(Math.PI/180);rotate(e){return e.x!==void 0&&(this.brush.rotation.x+=this.angleToRadian(e.x)),e.y!==void 0&&(this.brush.rotation.y+=this.angleToRadian(e.y)),e.z!==void 0&&(this.brush.rotation.z+=this.angleToRadian(e.z)),this.brush.updateMatrixWorld(),this}scale(e){return e.all!==void 0&&(this.brush.scale.x*=e.all,this.brush.scale.y*=e.all,this.brush.scale.z*=e.all),e.x!==void 0&&(this.brush.scale.x*=e.x),e.y!==void 0&&(this.brush.scale.y*=e.y),e.z!==void 0&&(this.brush.scale.z*=e.z),this.brush.updateMatrixWorld(),this}center(e){this.brush.geometry.applyMatrix4(this.brush.matrix),this.brush.position.set(0,0,0),this.brush.rotation.set(0,0,0),this.brush.scale.set(1,1,1),this.brush.updateMatrixWorld();const t=this.getBounds(),n=e?.x??e===void 0,i=e?.y??e===void 0,s=e?.z??e===void 0,a=n?-t.center.x:0,o=i?-t.center.y:0,l=s?-t.center.z:0;return this.brush.geometry.translate(a,o,l),this.brush.updateMatrixWorld(),this}align(e){this.brush.geometry.applyMatrix4(this.brush.matrix),this.brush.position.set(0,0,0),this.brush.rotation.set(0,0,0),this.brush.scale.set(1,1,1),this.brush.updateMatrixWorld();const t=this.getBounds();switch(e){case"bottom":{this.brush.geometry.translate(0,-t.min.y,0);break}case"top":{this.brush.geometry.translate(0,-t.max.y,0);break}case"left":{this.brush.geometry.translate(-t.min.x,0,0);break}case"right":{this.brush.geometry.translate(-t.max.x,0,0);break}case"front":{this.brush.geometry.translate(0,0,-t.min.z);break}case"back":{this.brush.geometry.translate(0,0,-t.max.z);break}}return this.brush.updateMatrixWorld(),this}static MERGE(e){if(e.length>0&&e[0].isNegative)throw new Error("First solid in MERGE cannot be negative");return e.reduce((t,n)=>{const i=U.evaluator.evaluate(t.brush,n.brush,n.isNegative?bp:xp);return new U(i,t._color)},U.emptyCube.setColor(e[0]?._color??"gray"))}static SUBTRACT(e,...t){return t.reduce((n,i)=>{const s=U.evaluator.evaluate(n.brush,i.brush,bp);return new U(s,n._color)},e)}static UNION(e,...t){return t.reduce((n,i)=>{const s=U.evaluator.evaluate(n.brush,i.brush,xp);return new U(s,n._color)},e)}static INTERSECT(e,t){return new U(U.evaluator.evaluate(e.brush,t.brush,aw),e._color)}static GRID_XYZ(e,t){const n=[],{width:i,height:s,depth:a}=e.getBounds(),o=typeof t.spacing=="number"?[t.spacing,t.spacing,t.spacing]:t.spacing??[0,0,0],[l,c,d]=o;for(let u=0;unew Float32Array(this.brush.geometry.attributes.position.array);getBounds(){this.brush.geometry.computeBoundingBox();const t=(this.brush.geometry.boundingBox||new wt).clone();t.applyMatrix4(this.brush.matrixWorld);const n=t.min.clone(),i=t.max.clone(),s=new C;return t.getCenter(s),n.set(yr(n.x),yr(n.y),yr(n.z)),i.set(yr(i.x),yr(i.y),yr(i.z)),s.set(yr(s.x),yr(s.y),yr(s.z)),{width:yr(i.x-n.x),height:yr(i.y-n.y),depth:yr(i.z-n.z),min:n,max:i,center:s}}}const KI=(r,e,t)=>(new DataView(r.buffer).setInt16(t,e,!0),t+2),JI=(r,e,t)=>(new DataView(r.buffer).setInt32(t,e,!0),t+4),jd=(r,e,t)=>(new DataView(r.buffer).setFloat32(t,e,!0),t+4),QI=r=>{if(r.length===0)throw new Error("Vertices array cannot be empty");if(r.length%9!==0)throw new Error("Vertices length must be divisible by 9");const e=new Uint8Array(84+50*(r.length/9));let t=JI(e,r.length/9,80),n=0;for(;n{const t=document.createElement("a");let n;try{document.body.append(t),t.download=r,n=URL.createObjectURL(new Blob([e])),t.href=n,t.click()}finally{if(t.remove(),n){const i=n;setTimeout(()=>URL.revokeObjectURL(i),100)}}},t5=()=>{const r=window.location.hash,e=r.indexOf("?");if(e===-1)return;const t=r.slice(Math.max(0,e+1)),n=new URLSearchParams(t);if(["px","py","pz","rx","ry","rz","tx","ty","tz","zoom"].every(a=>n.has(a)))return{px:Number.parseFloat(n.get("px")),py:Number.parseFloat(n.get("py")),pz:Number.parseFloat(n.get("pz")),rx:Number.parseFloat(n.get("rx")),ry:Number.parseFloat(n.get("ry")),rz:Number.parseFloat(n.get("rz")),tx:Number.parseFloat(n.get("tx")),ty:Number.parseFloat(n.get("ty")),tz:Number.parseFloat(n.get("tz")),zoom:Number.parseFloat(n.get("zoom"))}},n5=()=>{const r=window.location.hash;if(!r||r.length<=1)return;let e=r.slice(1);const t=e.indexOf("?");return t!==-1&&(e=e.slice(0,Math.max(0,t))),decodeURIComponent(e)},r5=(r,e)=>{let t=`#${r}`;if(e){const n=new URLSearchParams({px:e.px.toFixed(3),py:e.py.toFixed(3),pz:e.pz.toFixed(3),rx:e.rx.toFixed(3),ry:e.ry.toFixed(3),rz:e.rz.toFixed(3),tx:e.tx.toFixed(3),ty:e.ty.toFixed(3),tz:e.tz.toFixed(3),zoom:e.zoom.toFixed(3)});t+=`?${n.toString()}`}return t},Fg=(r,e)=>{const t=r5(r,e);window.location.hash=t},hu=[],uw=()=>hu;let yp;const i5=r=>{yp=r},Ki=r=>{for(const[e,t]of Object.entries(r))hu.some(n=>n.name===e)||hu.push({name:e,receiveData:t});hu.sort((e,t)=>e.name.localeCompare(t.name)),yp&&yp()},k0={},s5=(r,e)=>`${r}:${JSON.stringify(e)}`,On=(r,e)=>{if(!r)throw new Error("cacheInlineFunction requires a function name for caching purposes");return((...t)=>{const n=s5(r,t);if(n in k0)return k0[n];const i=e(...t);return k0[n]=i.clone(),i})},a5=r=>On(r.name,r),Je={HEIGHT:20,WIDTH:2,ZIGZAG_LENGTH:5,GATE_WIDTH:14},Xl={CORNER_RADIUS:8,CONNECTOR_RADIUS:6},o5=On("WallHeader",r=>{let e=U.cube(r,Je.WIDTH*2,Je.WIDTH/2,{color:"green"}).move({y:Je.HEIGHT/2+Je.WIDTH,z:Je.WIDTH*1.75});const t=U.cube(Je.ZIGZAG_LENGTH,3,Je.WIDTH).move({x:-r/2+Je.ZIGZAG_LENGTH,y:Je.HEIGHT/2+Je.WIDTH*2,z:Je.WIDTH*1.75});for(let i=0;i{const t=U.cube(r,Je.HEIGHT,Je.WIDTH,{color:"green"}),n=U.cube(r,Je.WIDTH,Je.WIDTH*4,{color:"green"}).move({y:Je.HEIGHT/2-Je.WIDTH/2}),i=n.clone().move({y:-20+Je.WIDTH}).scale({z:.5}),s=o5(r),a=s.clone().rotate({y:180});let o=U.UNION(t,n,i,s,a);if(e?.includeFootPath){const l=U.cube(r,Je.WIDTH*2,Je.WIDTH*4).align("bottom").move({y:Je.HEIGHT/2});o=U.UNION(o,l)}return o.align("bottom")}),hw=On("WallWithGate",r=>{let e=zr(r),t=U.cube(Je.GATE_WIDTH,Je.HEIGHT-Je.GATE_WIDTH/2,Je.WIDTH*4).align("bottom");const n=U.cylinder(Je.GATE_WIDTH/2,Je.WIDTH*4).move({y:Je.HEIGHT-Je.GATE_WIDTH/2}).rotate({z:90,y:90});return t=U.UNION(t,n),e=U.UNION(e,t),t.scale({x:.8,y:.95,z:2}),e=U.SUBTRACT(e,t),e}),l5={"X. Example: Wall 100":()=>zr(100),"X. Example: Wall with gate 100":()=>hw(100)},fw=On("Tower",r=>{const e=U.prism(8,r,Je.HEIGHT,{color:"red"}).align("bottom").rotate({y:22.5}),t=U.prism(8,r+2,Je.WIDTH*2).align("bottom").rotate({y:22.5}),n=U.prism(8,r+4,Je.HEIGHT/2).align("bottom").move({y:Je.HEIGHT}).rotate({y:22.5}),i=U.prism(8,r+3,Je.HEIGHT/2+1).align("bottom").move({y:Je.HEIGHT+.5}).rotate({y:22.5});let s=U.UNION(e,t,n);s=U.SUBTRACT(s,i);const a=U.cube(r*4,Je.WIDTH*2,Je.WIDTH).align("bottom").move({y:Je.HEIGHT*1.5-Je.WIDTH*2});for(let c=0;c<4;c++)s=U.SUBTRACT(s,a),a.rotate({y:45});let o=U.cone(r+4+2,Je.HEIGHT/2,{segments:8}).rotate({y:22.5}).align("bottom");const l=U.cone(r+4,Je.HEIGHT/2+2,{segments:8}).rotate({y:22.5}).align("bottom");return o=U.SUBTRACT(o,l).move({y:Je.HEIGHT+Je.HEIGHT/2}),s=U.UNION(s,o),s.align("bottom")}),El=On("CornetTower",()=>{let r=fw(Xl.CORNER_RADIUS);const e=zr(20,{includeFootPath:!0}).align("left").move({x:Xl.CORNER_RADIUS-2});r=U.SUBTRACT(r,e);const t=zr(20,{includeFootPath:!0}).align("right").rotate({y:90}).move({z:Xl.CORNER_RADIUS-2});return r=U.SUBTRACT(r,t),r}),vp=On("ConnectorTower",()=>{let r=fw(Xl.CONNECTOR_RADIUS);const e=zr(20,{includeFootPath:!0}).align("left").move({x:Xl.CONNECTOR_RADIUS-2});r=U.SUBTRACT(r,e);const t=zr(20,{includeFootPath:!0}).align("right").move({x:-4});return r=U.SUBTRACT(r,t),r}),c5={"X. Example: Corner Tower 10":()=>El(),"X. Example: Connector Tower 10":()=>vp()},d5=()=>{const r=hw(100).clone(),e=El().clone().move({x:-50}).rotate({y:90}),t=El().clone().move({x:50}).rotate({y:180}),n=zr(150).clone().move({x:-50,z:-75}).rotate({y:90}),i=vp().clone().move({x:-50,z:-150}).rotate({y:90}),s=zr(50).clone().move({x:-50,z:-175}).rotate({y:90}),a=zr(50).clone().move({x:50,z:-25}).rotate({y:90}),o=vp().clone().move({x:50,z:-50}).rotate({y:90}),l=zr(150).clone().move({x:50,z:-125}).rotate({y:90}),c=zr(100).clone().move({z:-200}),d=El().clone().move({x:-50,z:-200}).rotate({y:0}),u=El().clone().move({x:50,z:-200}).rotate({y:-90});return U.UNION(r,e,t,n,i,s,a,o,l,c,d,u)},u5={"X. Example: Whole Castle":()=>d5()};Ki({...l5,...c5,...u5});const h5=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),f5=()=>U.cube(10,10,10,{color:"red"}),p5=()=>U.cylinder(5,12,{color:"blue"}),g5=()=>U.sphere(6,{color:"green"}),m5=()=>U.cone(6,12,{color:"orange"}),x5=()=>U.trianglePrism(6,12,{color:"purple"}),b5=()=>U.prism(6,6,12,{color:"cyan"}),y5={"A1. Solids: Cube":f5,"A2. Solids: Cylinder":p5,"A3. Solids: Sphere":g5,"A4. Solids: Cone":m5,"A5. Solids: Triangle Prism":x5,"A6. Solids: Hexagonal Prism":b5},v5=()=>{const r=U.cube(10,10,10,{color:"blue"}),e=U.cube(10,10,10,{color:"blue"}).move({x:5,y:5,z:-5});return U.UNION(r,e)},_5=()=>{const r=U.cube(15,15,15,{color:"red"}),e=U.cylinder(4,20,{color:"red"}).rotate({x:90});return U.SUBTRACT(r,e)},w5=()=>{const r=U.sphere(8,{color:"green"}),e=U.sphere(4,{color:"green"}).move({x:6});return U.INTERSECT(r,e)},M5={"B1. Operations: Union":v5,"B2. Operations: Subtract":_5,"B3. Operations: Intersect":w5},S5=()=>U.cube(12,15,8,{color:"orange"}).align("bottom"),T5=()=>U.cylinder(6,18,{color:"purple"}).align("top"),A5=()=>U.sphere(7,{color:"cyan"}).center(),k5={"C1. Alignment: Bottom":S5,"C2. Alignment: Top":T5,"C3. Alignment: Center":A5},E5=()=>U.cylinder(8,10,{color:"blue",angle:90}),C5=()=>U.sphere(8,{color:"green",angle:180}),R5=()=>U.cone(8,12,{color:"red",angle:270}),P5={"D1. Partials: Cylinder 90°":E5,"D2. Partials: Sphere 180°":C5,"D3. Partials: Cone 270°":R5},Mi=3,vl=1,E0=2,go=.2,C0=.2,pw=()=>{let r=U.cube(2*Mi+2*go,2*vl+2*go,E0-C0,{color:"red"});const e=vl/2+go,t=-vl/2,n=U.cube(Mi,vl,C0).move({z:E0/2}),i=U.cube(Mi/2,vl,C0).move({z:E0/2}),s=n.clone().move({x:-Mi/2,y:e}),a=n.clone().move({x:Mi/2+go,y:e}),o=i.clone().move({x:-Mi/2-Mi/4-go,y:t}),l=n.clone().move({x:0,y:t}),c=i.clone().move({x:Mi/2+Mi/4+go,y:t});return r=U.UNION(r,s,a,o,l,c),r},gw=(r,e)=>U.GRID_XYZ(pw(),{cols:r,rows:1,levels:e}),mw=(r,e,t)=>{const n=U.cube(r,e,t,{color:"brown"}),i=2,s=U.cube(r-i*2,e-i*2,t*4,{color:"gray"}),a=U.SUBTRACT(n,s),o=U.cube(r-i*2,e-i*2,t*4,{color:"gray"}).setNegative(),l=U.cube(i,e,t-1,{color:"brown"}).move({z:-.5}),c=U.cube(r,i,t-1,{color:"brown"}).move({z:-.5});return[a,o,l,c]},I5=()=>{const r=gw(5,7).center(),e=mw(10,14,3);return U.MERGE([r,...e])},D5={"E1. Wall: Brick Item":pw,"E2. Wall: Brick Wall":()=>gw(2,2),"E3. Wall: Window":()=>mw(15,30,3),"E4. Wall: Brick Wall with Window":()=>I5()},L5=()=>U.profilePrismFromPoints(4,[[0,5],[10,5],[10,8],[15,4],[10,0],[10,3],[0,3]],{color:"orange"}).align("bottom").center({x:!0,z:!0}),N5=()=>U.profilePrism(3,r=>{r.moveTo(10*Math.cos(0),10*Math.sin(0));for(let i=1;i<=10;i++){const s=i*Math.PI/5,a=i%2===0?10:4;r.lineTo(a*Math.cos(s),a*Math.sin(s))}},{color:"gold"}).align("bottom").center({x:!0,z:!0}),U5=()=>{const r=U.profilePrism(4,n=>{n.moveTo(0,0),n.lineTo(10,0),n.lineTo(10,3),n.lineTo(3,3),n.lineTo(3,10),n.lineTo(0,10),n.lineTo(0,0)},{color:"gray"}),e=U.cylinder(1,5,{color:"gray"}).at(2,7,2),t=U.cylinder(1,5,{color:"gray"}).at(7,1.5,2);return U.SUBTRACT(r,e,t)},F5=()=>U.profilePrismFromPath(2,[Mb(20),Sb(5,180),Mb(20),Sb(5,180)],{color:"green"}),O5={"F1. Shapes: Arrow":L5,"F2. Shapes: Star":N5,"F3. Shapes: L Profile With Holes":U5,"F4. Shapes: Race Track":F5},B5=()=>U.revolutionSolidFromPoints([[0,0],[2,0],[1.5,1],[1.5,4],[3,6],[1.5,8],[2.5,10],[0,10]],{color:"white"}),z5=()=>U.revolutionSolidFromPoints([[0,0],[2,0],[1.5,1],[1.5,4],[3,6],[1.5,8],[2.5,10],[0,10]],{angle:90,color:"purple"}),V5={"G1. ShapeRevolution: Chess Pawn":B5,"G2. ShapeRevolution: Quarter Pawn":z5},G5=()=>{const r=U.cube(10,10,10,{color:"blue"}).move({x:-30}),e=U.cube(10,10,10,{color:"green"}).scale({all:2}).move({x:0}),t=U.cube(10,10,10,{color:"red"}).scale({all:.5}).move({x:30});return U.MERGE([r,e,t])},H5=()=>{const r=U.cylinder(5,10,{color:"cyan"}).rotate({z:90}).scale({x:2}).move({y:20}),e=U.sphere(8,{color:"orange"}).scale({y:.5}).move({y:0}),t=U.cube(8,8,8,{color:"purple"}).scale({x:1.5,z:2}).move({y:-20});return U.MERGE([r,e,t])},W5=()=>{const r=U.cube(10,10,10,{color:"lime"}).scale({all:2}).move({x:-30,y:15}),e=U.cube(10,10,10,{color:"yellow"}).scale({all:2,z:1.5}).move({x:0,y:15}),t=U.cube(10,10,10,{color:"magenta"}).scale({all:.5,x:3}).move({x:30,y:15}),n=U.cube(10,10,10,{color:"gray"}).move({y:-15}).center({x:!0,z:!0});return U.MERGE([r,e,t,n])},X5=()=>{const r=U.cone(5,15,{color:"teal"}).scale({all:2}).scale({y:.5}).scale({x:1.5,z:1.5}).move({x:-20}),e=U.sphere(5,{color:"pink"}).scale({x:2}).scale({x:1.5}).scale({y:.8,z:.8}).move({x:20});return U.MERGE([r,e])},q5=()=>{const r=()=>{const i=U.cube(10,15,2,{color:"brown"}),s=U.cube(8,13,1,{color:"cyan"}).move({y:0,z:.5}).center({x:!0,y:!0}),a=U.cube(.5,15,2,{color:"brown"}).center({x:!0,y:!0});return U.MERGE([i,s,a])},e=r().scale({x:1.8}).move({x:-30}),t=r().scale({y:1.5}).move({x:0}),n=r().scale({all:.6}).move({x:30});return U.MERGE([e,t,n])},xw={"H1: Uniform Scaling":G5,"H2: Individual Axis Scaling":H5,"H3: Combined Scaling":W5,"H4: Cumulative Scaling":X5,"H5: Aspect Ratio Adjustments":q5};Ki(xw);const Y5=()=>{const r=U.cylinder(3,15,{color:"red"}).rotate({z:90}).move({x:20}).rotate({y:45}),e=U.cylinder(3,15,{color:"blue"}).rotate({z:90}).rotate({y:45}).move({x:10}),t=U.sphere(2,{color:"yellow"});return U.MERGE([r,e,t])},Z5=()=>{const r=U.cube(10,20,5,{color:"green"}).center().rotate({z:45}).move({x:-30,y:15}),e=U.UNION(U.cube(10,20,5,{color:"cyan"}),U.cylinder(3,25,{color:"cyan"}).rotate({x:90})).rotate({z:30}).center().move({x:30,y:15}),t=U.cube(8,15,6,{color:"orange"}).align("bottom").center({x:!0,z:!0}).move({y:-15});return U.MERGE([r,e,t])},j5=()=>{const r=U.cube(8,8,8,{color:"purple"}).at(0,0,0).at(10,5,0).at(-30,10,0),e=U.cube(8,8,8,{color:"lime"}).move({x:10}).move({y:5}).move({x:-5,z:3}),t=U.cube(8,8,8,{color:"yellow"}).at(30,0,0).move({y:10,z:2});return U.MERGE([r,e,t])},$5=()=>{const r=U.cube(15,5,15,{color:"brown"}).align("bottom").center({x:!0,z:!0}),e=U.cylinder(4,20,{color:"gray"}).align("bottom").move({y:5}).center({x:!0,z:!0}),t=U.cone(8,10,{color:"red"}).align("bottom").move({y:25}).center({x:!0,z:!0}),n=U.cube(2,20,15,{color:"blue"}).align("right").move({x:-7.5}).align("bottom").move({y:5,x:2}),i=U.cube(2,20,15,{color:"blue"}).align("left").move({x:7.5}).align("bottom").move({y:5,x:-2});return U.MERGE([r,e,t,n,i])},K5=()=>{const r=(s,a)=>{const o=U.cube(s,a,2,{color:"brown"}),l=U.cube(s-2,a-2,3,{color:"brown"}).center({x:!0,y:!0}),c=U.cube(.8,a,2,{color:"brown"}).center({x:!0,y:!0}),d=U.SUBTRACT(o,l);return U.UNION(d,c)},e=U.cube(60,30,3,{color:"lightgray"}).align("bottom").center({x:!0,z:!0}),t=r(8,12).scale({x:1.2}).center().rotate({z:0}).move({x:-20,y:15,z:1.5}),n=r(8,12).scale({y:1.3}).center().rotate({z:0}).move({x:0,y:15,z:1.5}),i=r(8,12).center().rotate({z:10}).move({x:20,y:15,z:1.5});return U.MERGE([e,t,n,i])},bw={"I1: Transform Order":Y5,"I2: Centering in Chains":Z5,"I3: Absolute vs Relative":j5,"I4: Alignment Workflow":$5,"I5: Complete Transform Chain":K5};Ki(bw);const J5=()=>{const r=U.sphere(2,{color:"red"}),e=U.GRID_X(r,{cols:5}).center({x:!0}).move({y:20}),t=U.GRID_XY(r,{cols:5,rows:3}).center({x:!0,y:!0}).move({z:0}),n=U.GRID_XYZ(r,{cols:3,rows:3,levels:3}).center().move({y:-20});return U.MERGE([e,t,n])},Q5=()=>{const r=U.sphere(2,{color:"cyan"}),e=U.GRID_XYZ(r,{cols:3,rows:3,levels:3}).move({x:-35}),t=U.GRID_XYZ(r,{cols:3,rows:3,levels:3,spacing:[2,2,2]}).move({x:-10}),n=U.GRID_XYZ(r,{cols:3,rows:3,levels:3,spacing:[4,1,6]}).move({x:20});return U.MERGE([e,t,n])},eD=()=>{const r=U.cylinder(.8,20,{color:"gray"}),e=U.GRID_XYZ(r,{cols:4,rows:4,levels:1,spacing:[8,8,0]}).align("bottom"),t=U.cylinder(.6,32,{color:"orange"}).rotate({z:90}),n=U.GRID_XYZ(t,{cols:1,rows:4,levels:3,spacing:[0,8,8]}).align("left").move({y:4,z:4}),i=U.cylinder(.6,32,{color:"yellow"}).rotate({z:90}).rotate({x:90}),s=U.GRID_XYZ(i,{cols:4,rows:1,levels:3,spacing:[8,0,8]}).align("front").move({x:4,z:4});return U.MERGE([e,n,s])},tD=()=>{const r=U.sphere(2.5,{color:"white"}),e=U.cube(5,5,5,{color:"black"}),t=U.MERGE([U.GRID_XY(r,{cols:3,rows:3}).move({x:0,y:0,z:0})]),n=U.MERGE([U.GRID_XY(e,{cols:3,rows:3}).move({x:0,y:5,z:0})]),i=U.MERGE([U.GRID_XY(r,{cols:3,rows:3}).move({x:0,y:10,z:0})]);return U.MERGE([t,n,i]).center()},nD=()=>{const r=U.cube(2,40,2,{color:"brown"}),e=U.GRID_XYZ(r,{cols:2,rows:1,levels:2,spacing:[26,0,16]}).align("bottom").align("left").align("front"),t=U.cube(30,1.5,20,{color:"lightgray"}).align("bottom").align("left").align("front").move({y:0}),n=U.cube(30,1.5,20,{color:"lightgray"}).align("bottom").align("left").align("front").move({y:12}),i=U.cube(30,1.5,20,{color:"lightgray"}).align("bottom").align("left").align("front").move({y:24}),s=U.cube(30,1.5,20,{color:"lightgray"}).align("bottom").align("left").align("front").move({y:36}),a=U.cube(2,6,3,{color:"red"}),o=U.GRID_XY(a,{cols:8,rows:2,spacing:[1,0]}).align("bottom").move({x:3,y:13.5,z:4}),l=U.GRID_XY(a,{cols:7,rows:3,spacing:[1.5,0]}).align("bottom").move({x:5,y:25.5,z:3});return U.MERGE([e,t,n,i,s,o,l])},yw={"J1: Grid Comparison (1D/2D/3D)":J5,"J2: Spacing in 3D Grids":Q5,"J3: 3D Lattice Structure":eD,"J4: 3D Checkerboard Pattern":tD,"J5: Storage Shelf (Practical)":nD};Ki(yw);const rD=()=>{const r=U.UNION(U.cube(8,12,4,{color:"teal"}),U.cylinder(3,15,{color:"teal"}).move({y:6})),e=r.getBounds(),{width:t,height:n,depth:i,center:s}=e,a=5,o=a,l=a,c=a,d=U.GRID_XYZ(r,{cols:3,rows:2,levels:2,spacing:[o,l,c]}),u=U.cube(t,n,i,{color:"red"}).at(s.x,s.y,s.z).move({x:-30});return U.MERGE([d.center(),u])},iD=()=>{const r=[];for(let e=0;e<3;e++)for(let t=0;t<5;t++)for(let n=0;n<5;n++){const a=5+Math.sin(n*.5)*Math.cos(t*.5)*3,l=["red","green","blue"][e],c=U.cube(3,a,3,{color:l}).align("bottom").move({x:n*5,y:e*10,z:t*5});r.push(c)}return U.MERGE(r).center()},sD=()=>{const r=U.cube(6,6,6,{color:"purple"}),e=U.GRID_XYZ(r,{cols:4,rows:4,levels:4,spacing:[2,2,2]}).center(),t=U.sphere(18,{color:"purple"}),n=U.sphere(14,{color:"purple"}),i=U.SUBTRACT(t,n);return U.INTERSECT(e,i)},aD=()=>{const r=U.cube(4,2,4,{color:"gray"}).align("bottom").center({x:!0,z:!0}),e=U.cylinder(1.5,20,{color:"lightgray"}).center({x:!0,z:!0}).align("bottom").move({y:2}),t=U.cube(4,3,4,{color:"gray"}).center({x:!0,z:!0}).align("bottom").move({y:22}),n=U.MERGE([r,e,t]),i=U.GRID_X(n,{cols:4,spacing:10}).align("left").center({z:!0}),s=U.cube(50,1,15,{color:"brown"}).align("bottom").center({x:!0,z:!0}).move({y:-.5,x:22.5}),a=U.cube(50,4,12,{color:"gray"}).align("bottom").move({y:25,x:22.5}).center({z:!0});return U.MERGE([s,i,a])},oD=()=>{const r=[];for(let a=0;a<10;a++){const o=U.cube(1.5,1.5,2,{color:"blue"}),l=U.GRID_X(o,{cols:15,spacing:.5}).align("bottom").move({y:a*2,z:a*3}).center({x:!0});r.push(l)}const s=U.cube(30,.5,15,{color:"green"}).align("bottom").move({y:-1,z:-10}).center({x:!0});return r.push(s),U.MERGE(r).center({z:!0})},vw={"K1: Dynamic Spacing with getBounds()":rD,"K2: Programmatic Grid (Wave Pattern)":iD,"K3: Hollow Grid Structure":sD,"K4: Architectural Column Grid":aD,"K5: Stadium Seating":oD};Ki(vw);const lD=(r,e,t)=>{const n=U.cube(r,e,t,{color:"red"}),i=U.cylinder(e*.15,r*1.2,{color:"red"}).rotate({z:90}),s=U.SUBTRACT(n,i.move({y:e*.5,z:t*.3}),i.move({y:e*.5,z:t*.7})),a=U.cube(r*.9,e*.1,t*.05,{color:"red"}).center({x:!0,y:!0}).move({z:-t*.5}),o=U.cube(r*.9,e*.1,t*.05,{color:"red"}).center({x:!0,y:!0}).move({z:t*.5});return U.SUBTRACT(s,a,o)},R0=a5(lD),cD=()=>{const r=R0(8,3,4).move({x:-15}),e=R0(8,3,4).move({x:0}),t=R0(10,4,5).move({x:20});return U.MERGE([r,e,t])},dD=()=>{const r=On("Column",(n,i)=>{const s=U.cylinder(i*1.5,n*.1,{color:"gray"}).align("bottom");let o=U.cylinder(i,n*.7,{color:"lightgray"}).align("bottom").move({y:n*.1});for(let c=0;c<4;c++){const d=U.cylinder(i*.15,n*.72,{color:"lightgray"}).align("bottom").move({x:i*.8,y:n*.09}).rotate({y:c*45});o=U.SUBTRACT(o,d)}const l=U.cylinder(i*1.4,n*.2,{color:"gray"}).align("bottom").move({y:n*.8});return U.MERGE([s,o,l])}),e=r(20,2).move({x:-15}),t=r(20,2).move({x:15});return U.MERGE([e,t])},uD=()=>{const e=On("DecorativeTile",n=>{const i=U.cube(n,n,1,{color:"blue"}),s=U.cylinder(n*.3,2,{color:"blue"}).center({x:!0,z:!0}).move({y:.5}),a=[];for(let o=0;o<4;o++){const l=U.sphere(n*.15,{color:"blue"}).move({x:n*.35,z:n*.35}).rotate({y:o*90}).center({x:!0,z:!0}).move({y:.5});a.push(l)}return U.SUBTRACT(i,s,...a)})(5);return U.GRID_XY(e,{cols:5,rows:5,spacing:[1,1]}).center()},hD=()=>{const r=On("Window",(i,s)=>{const a=U.cube(i,s,2,{color:"brown"}),o=U.cube(i-1,s-1,1,{color:"cyan"}).center({x:!0,y:!0}).move({z:.5}),l=U.cube(.5,s,2,{color:"brown"}).center({x:!0,y:!0});return U.MERGE([a,o,l])}),e=On("WallWithWindows",(i,s)=>{const a=U.cube(i,s,3,{color:"lightgray"}),o=r(6,8).move({x:i*.2,y:s*.5,z:1.5}).center({x:!0,y:!0}),l=r(6,8).move({x:i*.5,y:s*.5,z:1.5}).center({x:!0,y:!0}),c=r(6,8).move({x:i*.8,y:s*.5,z:1.5}).center({x:!0,y:!0});return U.MERGE([a,o,l,c])}),t=e(40,20).move({z:-10}),n=e(40,20).move({z:10});return U.MERGE([t,n]).center({x:!0})},fD=()=>{const r=On("Ornament",()=>{const a=U.sphere(2,{color:"gold"}),o=U.cone(1.5,3,{color:"gold"}).align("bottom").move({y:2});return U.MERGE([a,o])}),e=On("Post",a=>{const o=U.cube(2,a,2,{color:"brown"}).align("bottom"),l=r().move({y:a}).center({x:!0,z:!0});return U.MERGE([o,l])}),t=On("Railing",a=>{const o=U.GRID_X(e(8),{cols:5,spacing:a/4-2}).align("left"),l=U.cube(a,1,1,{color:"brown"}).align("bottom").move({y:6,z:.5});return U.MERGE([o,l])}),n=t(30).move({x:-15,z:-8}),i=t(30).move({x:-15,z:8}),s=U.cube(60,1,18,{color:"gray"}).align("bottom").center({x:!0,z:!0});return U.MERGE([s,n,i])},_w={"L1: Basic cacheFunction":cD,"L2: cacheInlineFunction":dD,"L3: Cached Components in Grids":uD,"L4: Hierarchical Caching":hD,"L5: Real-World Optimization":fD};Ki(_w);const pD=()=>{const r=(s,a)=>U.cube(4,8,4,{color:"purple"}).center().scale({y:a}).rotate({y:s}).move({y:20}),e=[];for(let s=0;s<12;s++){const a=s*360/12,o=.5+s/12*1.5,l=15,c=r(a,o).move({x:Math.cos(a*Math.PI/180)*l,z:Math.sin(a*Math.PI/180)*l,y:s*3});e.push(c)}const n=U.cylinder(3,40,{color:"gold"}).align("bottom").center({x:!0,z:!0}),i=U.cylinder(20,2,{color:"gray"}).align("bottom").center({x:!0,z:!0});return U.MERGE([i,n,...e])},gD=()=>{const r={sections:6,tiersPerSection:6,seatsPerRow:20,seatWidth:1.8,tierHeight:2.5,tierDepth:3},e=On("StadiumSeat",()=>{const i=U.cube(1.5,.8,1.8,{color:"blue"}),s=U.cube(1.5,1.2,.3,{color:"blue"}).align("bottom").move({y:.3,z:-1.8/2+.15});return U.MERGE([i,s]).align("bottom")}),t=i=>{const s=[];for(let o=0;o({subscribe:r.subscribe,get current(){return r.current}});let ql=0;const Og=pn(!1),rf=pn(!1),Bg=pn(void 0),zg=pn(0),Vg=pn(0),Mw=pn([]),Gg=pn(0),{onStart:xD,onLoad:bD,onError:yD}=Ua;Ua.onStart=(r,e,t)=>{xD?.(r,e,t),rf.set(!0),Bg.set(r),zg.set(e),Vg.set(t);const n=(e-ql)/(t-ql);Gg.set(n),n===1&&Og.set(!0)};Ua.onLoad=()=>{bD?.(),rf.set(!1)};Ua.onError=r=>{yD?.(r),Mw.update(e=>[...e,r])};Ua.onProgress=(r,e,t)=>{e===t&&(ql=t),rf.set(!0),Bg.set(r),zg.set(e),Vg.set(t);const n=(e-ql)/(t-ql)||1;Gg.set(n),n===1&&Og.set(!0)};Qs(rf),Qs(Bg),Qs(zg),Qs(Vg),Qs(Mw),Qs(Gg),Qs(Og);new C;new C;new C;new nn;new De;new qr;new C;new C;new De;new C;new C;new gt;var P0;/Mac/.test((P0=globalThis?.navigator)===null||P0===void 0?void 0:P0.platform);new C;new C;new C;new K;const vD="Right",_D="Top",wD="Front",MD="Left",SD="Bottom",TD="Back";[vD,_D,wD,MD,SD,TD].map(r=>r.toLocaleLowerCase());new wt;new C;pe.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new K(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};Sr.line={uniforms:sg.merge([pe.common,pe.fog,pe.line]),vertexShader:` - #include - #include - #include - #include - #include - - uniform float linewidth; - uniform vec2 resolution; - - attribute vec3 instanceStart; - attribute vec3 instanceEnd; - - attribute vec3 instanceColorStart; - attribute vec3 instanceColorEnd; - - #ifdef WORLD_UNITS - - varying vec4 worldPos; - varying vec3 worldStart; - varying vec3 worldEnd; - - #ifdef USE_DASH - - varying vec2 vUv; - - #endif - - #else - - varying vec2 vUv; - - #endif - - #ifdef USE_DASH - - uniform float dashScale; - attribute float instanceDistanceStart; - attribute float instanceDistanceEnd; - varying float vLineDistance; - - #endif - - void trimSegment( const in vec4 start, inout vec4 end ) { - - // trim end segment so it terminates between the camera plane and the near plane - - // conservative estimate of the near plane - float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column - float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column - float nearEstimate = - 0.5 * b / a; - - float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); - - end.xyz = mix( start.xyz, end.xyz, alpha ); - - } - - void main() { - - #ifdef USE_COLOR - - vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; - - #endif - - #ifdef USE_DASH - - vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; - vUv = uv; - - #endif - - float aspect = resolution.x / resolution.y; - - // camera space - vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); - vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); - - #ifdef WORLD_UNITS - - worldStart = start.xyz; - worldEnd = end.xyz; - - #else - - vUv = uv; - - #endif - - // special case for perspective projection, and segments that terminate either in, or behind, the camera plane - // clearly the gpu firmware has a way of addressing this issue when projecting into ndc space - // but we need to perform ndc-space calculations in the shader, so we must address this issue directly - // perhaps there is a more elegant solution -- WestLangley - - bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column - - if ( perspective ) { - - if ( start.z < 0.0 && end.z >= 0.0 ) { - - trimSegment( start, end ); - - } else if ( end.z < 0.0 && start.z >= 0.0 ) { - - trimSegment( end, start ); - - } - - } - - // clip space - vec4 clipStart = projectionMatrix * start; - vec4 clipEnd = projectionMatrix * end; - - // ndc space - vec3 ndcStart = clipStart.xyz / clipStart.w; - vec3 ndcEnd = clipEnd.xyz / clipEnd.w; - - // direction - vec2 dir = ndcEnd.xy - ndcStart.xy; - - // account for clip-space aspect ratio - dir.x *= aspect; - dir = normalize( dir ); - - #ifdef WORLD_UNITS - - vec3 worldDir = normalize( end.xyz - start.xyz ); - vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) ); - vec3 worldUp = normalize( cross( worldDir, tmpFwd ) ); - vec3 worldFwd = cross( worldDir, worldUp ); - worldPos = position.y < 0.5 ? start: end; - - // height offset - float hw = linewidth * 0.5; - worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp; - - // don't extend the line if we're rendering dashes because we - // won't be rendering the endcaps - #ifndef USE_DASH - - // cap extension - worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir; - - // add width to the box - worldPos.xyz += worldFwd * hw; - - // endcaps - if ( position.y > 1.0 || position.y < 0.0 ) { - - worldPos.xyz -= worldFwd * 2.0 * hw; - - } - - #endif - - // project the worldpos - vec4 clip = projectionMatrix * worldPos; - - // shift the depth of the projected points so the line - // segments overlap neatly - vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; - clip.z = clipPose.z * clip.w; - - #else - - vec2 offset = vec2( dir.y, - dir.x ); - // undo aspect ratio adjustment - dir.x /= aspect; - offset.x /= aspect; - - // sign flip - if ( position.x < 0.0 ) offset *= - 1.0; - - // endcaps - if ( position.y < 0.0 ) { - - offset += - dir; - - } else if ( position.y > 1.0 ) { - - offset += dir; - - } - - // adjust for linewidth - offset *= linewidth; - - // adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... - offset /= resolution.y; - - // select end - vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; - - // back to clip space - offset *= clip.w; - - clip.xy += offset; - - #endif - - gl_Position = clip; - - vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation - - #include - #include - #include - - } - `,fragmentShader:` - uniform vec3 diffuse; - uniform float opacity; - uniform float linewidth; - - #ifdef USE_DASH - - uniform float dashOffset; - uniform float dashSize; - uniform float gapSize; - - #endif - - varying float vLineDistance; - - #ifdef WORLD_UNITS - - varying vec4 worldPos; - varying vec3 worldStart; - varying vec3 worldEnd; - - #ifdef USE_DASH - - varying vec2 vUv; - - #endif - - #else - - varying vec2 vUv; - - #endif - - #include - #include - #include - #include - #include - - vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { - - float mua; - float mub; - - vec3 p13 = p1 - p3; - vec3 p43 = p4 - p3; - - vec3 p21 = p2 - p1; - - float d1343 = dot( p13, p43 ); - float d4321 = dot( p43, p21 ); - float d1321 = dot( p13, p21 ); - float d4343 = dot( p43, p43 ); - float d2121 = dot( p21, p21 ); - - float denom = d2121 * d4343 - d4321 * d4321; - - float numer = d1343 * d4321 - d1321 * d4343; - - mua = numer / denom; - mua = clamp( mua, 0.0, 1.0 ); - mub = ( d1343 + d4321 * ( mua ) ) / d4343; - mub = clamp( mub, 0.0, 1.0 ); - - return vec2( mua, mub ); - - } - - void main() { - - #include - - #ifdef USE_DASH - - if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps - - if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX - - #endif - - float alpha = opacity; - - #ifdef WORLD_UNITS - - // Find the closest points on the view ray and the line segment - vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; - vec3 lineDir = worldEnd - worldStart; - vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); - - vec3 p1 = worldStart + lineDir * params.x; - vec3 p2 = rayEnd * params.y; - vec3 delta = p1 - p2; - float len = length( delta ); - float norm = len / linewidth; - - #ifndef USE_DASH - - #ifdef USE_ALPHA_TO_COVERAGE - - float dnorm = fwidth( norm ); - alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); - - #else - - if ( norm > 0.5 ) { - - discard; - - } - - #endif - - #endif - - #else - - #ifdef USE_ALPHA_TO_COVERAGE - - // artifacts appear on some hardware if a derivative is taken within a conditional - float a = vUv.x; - float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; - float len2 = a * a + b * b; - float dlen = fwidth( len2 ); - - if ( abs( vUv.y ) > 1.0 ) { - - alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); - - } - - #else - - if ( abs( vUv.y ) > 1.0 ) { - - float a = vUv.x; - float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; - float len2 = a * a + b * b; - - if ( len2 > 1.0 ) discard; - - } - - #endif - - #endif - - vec4 diffuseColor = vec4( diffuse, alpha ); - - #include - #include - - gl_FragColor = vec4( diffuseColor.rgb, alpha ); - - #include - #include - #include - #include - - } - `};new rt;new C;new C;new rt;new rt;new rt;new C;new De;new nr;new C;new wt;new nn;new rt;const Tb={type:"change"},Hg={type:"start"},Sw={type:"end"},$d=new qr,Ab=new Mr,AD=Math.cos(70*Iv.DEG2RAD),sn=new C,Xn=2*Math.PI,At={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},I0=1e-6;let kD=class extends L_{constructor(e,t=null){super(e,t),this.state=At.NONE,this.target=new C,this.cursor=new C,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:fa.ROTATE,MIDDLE:fa.DOLLY,RIGHT:fa.PAN},this.touches={ONE:oa.ROTATE,TWO:oa.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new C,this._lastQuaternion=new Cn,this._lastTargetPosition=new C,this._quat=new Cn().setFromUnitVectors(e.up,new C(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new tp,this._sphericalDelta=new tp,this._scale=1,this._panOffset=new C,this._rotateStart=new K,this._rotateEnd=new K,this._rotateDelta=new K,this._panStart=new K,this._panEnd=new K,this._panDelta=new K,this._dollyStart=new K,this._dollyEnd=new K,this._dollyDelta=new K,this._dollyDirection=new C,this._mouse=new K,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=CD.bind(this),this._onPointerDown=ED.bind(this),this._onPointerUp=RD.bind(this),this._onContextMenu=FD.bind(this),this._onMouseWheel=DD.bind(this),this._onKeyDown=LD.bind(this),this._onTouchStart=ND.bind(this),this._onTouchMove=UD.bind(this),this._onMouseDown=PD.bind(this),this._onMouseMove=ID.bind(this),this._interceptControlDown=OD.bind(this),this._interceptControlUp=BD.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(Tb),this.update(),this.state=At.NONE}update(e=null){const t=this.object.position;sn.copy(t).sub(this.target),sn.applyQuaternion(this._quat),this._spherical.setFromVector3(sn),this.autoRotate&&this.state===At.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,i=this.maxAzimuthAngle;isFinite(n)&&isFinite(i)&&(n<-Math.PI?n+=Xn:n>Math.PI&&(n-=Xn),i<-Math.PI?i+=Xn:i>Math.PI&&(i-=Xn),n<=i?this._spherical.theta=Math.max(n,Math.min(i,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+i)/2?Math.max(n,this._spherical.theta):Math.min(i,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const a=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=a!=this._spherical.radius}if(sn.setFromSpherical(this._spherical),sn.applyQuaternion(this._quatInverse),t.copy(this.target).add(sn),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let a=null;if(this.object.isPerspectiveCamera){const o=sn.length();a=this._clampDistance(o*this._scale);const l=o-a;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),s=!!l}else if(this.object.isOrthographicCamera){const o=new C(this._mouse.x,this._mouse.y,0);o.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=l!==this.object.zoom;const c=new C(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(o),this.object.updateMatrixWorld(),a=sn.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;a!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position):($d.origin.copy(this.object.position),$d.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot($d.direction))I0||8*(1-this._lastQuaternion.dot(this.object.quaternion))>I0||this._lastTargetPosition.distanceToSquared(this.target)>I0?(this.dispatchEvent(Tb),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?Xn/60*this.autoRotateSpeed*e:Xn/60/60*this.autoRotateSpeed}_getZoomScale(e){const t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){sn.setFromMatrixColumn(t,0),sn.multiplyScalar(-e),this._panOffset.add(sn)}_panUp(e,t){this.screenSpacePanning===!0?sn.setFromMatrixColumn(t,1):(sn.setFromMatrixColumn(t,0),sn.crossVectors(this.object.up,sn)),sn.multiplyScalar(e),this._panOffset.add(sn)}_pan(e,t){const n=this.domElement;if(this.object.isPerspectiveCamera){const i=this.object.position;sn.copy(i).sub(this.target);let s=sn.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*s/n.clientHeight,this.object.matrix),this._panUp(2*t*s/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),i=e-n.left,s=t-n.top,a=n.width,o=n.height;this._mouse.x=i/a*2-1,this._mouse.y=-(s/o)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Xn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Xn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(Xn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-Xn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(Xn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-Xn*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._rotateStart.set(n,i)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panStart.set(n,i)}}_handleTouchStartDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,s=Math.sqrt(n*n+i*i);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),s=.5*(e.pageY+n.y);this._rotateEnd.set(i,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const t=this.domElement;this._rotateLeft(Xn*this._rotateDelta.x/t.clientHeight),this._rotateUp(Xn*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const t=this._getSecondPointerPosition(e),n=.5*(e.pageX+t.x),i=.5*(e.pageY+t.y);this._panEnd.set(n,i)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const t=this._getSecondPointerPosition(e),n=e.pageX-t.x,i=e.pageY-t.y,s=Math.sqrt(n*n+i*i);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const a=(e.pageX+t.x)*.5,o=(e.pageY+t.y)*.5;this._updateZoomParameters(a,o)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;teP("threlte-controls",{orbitControls:Eo(void 0),trackballControls:Eo(void 0)});function VD(r,e){_n(e,!0);const t=()=>DM(o,"$parent",n),[n,i]=LM();let s=pt(e,"ref",15),a=rr(e,["$$slots","$$events","$$legacy","ref","children"]);const o=Z_(),{dom:l,invalidate:c}=ef();if(!Or(t(),"Camera"))throw new Error("Parent missing: need to be a child of a ");const d=new kD(t(),l),{orbitControls:u}=zD(),{start:h,stop:f}=j_(()=>{d.update()},{autoStart:!1,autoInvalidate:!1});mn(()=>{e.autoRotate||e.enableDamping?h():f()}),mn(()=>{const g=x=>{c(),e.onchange?.(x)};return u.set(d),d.addEventListener("change",g),()=>{u.set(void 0),d.removeEventListener("change",g)}}),cs(r,Wp({get is(){return d}},()=>a,{get ref(){return s()},set ref(g){s(g)},children:(g,x)=>{var m=Ct(),p=bt(m);on(p,()=>e.children??zt,()=>({ref:d})),Oe(g,m)},$$slots:{default:!0}})),wn(),i()}new De;new De;new Qt;`${Ye.logdepthbuf_pars_vertex}${Ye.fog_pars_vertex}${Ye.logdepthbuf_vertex}${Ye.fog_vertex}`;`${Ye.tonemapping_fragment}${Ye.colorspace_fragment}`;`${Ye.tonemapping_fragment}${Ye.colorspace_fragment}`;`${oI}${lI}${Ye.tonemapping_fragment}${Ye.colorspace_fragment}`;new wt;typeof window<"u"&&document.createElement("div");class GD{#e;#t;constructor(e,t){this.#e=e,this.#t=Np(t)}get current(){return this.#t(),this.#e()}}const HD=/\(.+\)/,WD=new Set(["all","print","screen","and","or","not","only"]);class XD extends GD{constructor(e,t){let n=HD.test(e)||e.split(/[\s,]+/).some(s=>WD.has(s.trim()))?e:`(${e})`;const i=window.matchMedia(n);super(()=>i.matches,s=>fM(i,"change",s))}}for(let r=0;r<256;r++)(r<16?"0":"")+r.toString(16);new Pc(-1,1,1,-1,0,1);class qD extends ot{constructor(){super(),this.setAttribute("position",new ke([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new ke([0,2,0,0,2,0],2))}}new qD;var Tw={exports:{}};Tw.exports=sf;Tw.exports.default=sf;function sf(r,e,t){t=t||2;var n=e&&e.length,i=n?e[0]*t:r.length,s=Aw(r,0,i,t,!0),a=[];if(!s||s.next===s.prev)return a;var o,l,c,d,u,h,f;if(n&&(s=KD(r,e,s,t)),r.length>80*t){o=c=r[0],l=d=r[1];for(var g=t;gc&&(c=u),h>d&&(d=h);f=Math.max(c-o,d-l),f=f!==0?32767/f:0}return fc(s,a,t,o,l,f,0),a}function Aw(r,e,t,n,i){var s,a;if(i===Mp(r,e,t,n)>0)for(s=e;s=e;s-=n)a=kb(s,r[s],r[s+1],a);return a&&af(a,a.next)&&(gc(a),a=a.next),a}function Ea(r,e){if(!r)return r;e||(e=r);var t=r,n;do if(n=!1,!t.steiner&&(af(t,t.next)||Gt(t.prev,t,t.next)===0)){if(gc(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function fc(r,e,t,n,i,s,a){if(r){!a&&s&&n4(r,n,i,s);for(var o=r,l,c;r.prev!==r.next;){if(l=r.prev,c=r.next,s?ZD(r,n,i,s):YD(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(c.i/t|0),gc(r),r=c.next,o=c.next;continue}if(r=c,r===o){a?a===1?(r=jD(Ea(r),e,t),fc(r,e,t,n,i,s,2)):a===2&&$D(r,e,t,n,i,s):fc(Ea(r),e,t,n,i,s,1);break}}}}function YD(r){var e=r.prev,t=r,n=r.next;if(Gt(e,t,n)>=0)return!1;for(var i=e.x,s=t.x,a=n.x,o=e.y,l=t.y,c=n.y,d=is?i>a?i:a:s>a?s:a,f=o>l?o>c?o:c:l>c?l:c,g=n.next;g!==e;){if(g.x>=d&&g.x<=h&&g.y>=u&&g.y<=f&&Mo(i,o,s,l,a,c,g.x,g.y)&&Gt(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function ZD(r,e,t,n){var i=r.prev,s=r,a=r.next;if(Gt(i,s,a)>=0)return!1;for(var o=i.x,l=s.x,c=a.x,d=i.y,u=s.y,h=a.y,f=ol?o>c?o:c:l>c?l:c,m=d>u?d>h?d:h:u>h?u:h,p=_p(f,g,e,t,n),v=_p(x,m,e,t,n),b=r.prevZ,y=r.nextZ;b&&b.z>=p&&y&&y.z<=v;){if(b.x>=f&&b.x<=x&&b.y>=g&&b.y<=m&&b!==i&&b!==a&&Mo(o,d,l,u,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0||(b=b.prevZ,y.x>=f&&y.x<=x&&y.y>=g&&y.y<=m&&y!==i&&y!==a&&Mo(o,d,l,u,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0))return!1;y=y.nextZ}for(;b&&b.z>=p;){if(b.x>=f&&b.x<=x&&b.y>=g&&b.y<=m&&b!==i&&b!==a&&Mo(o,d,l,u,c,h,b.x,b.y)&&Gt(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;y&&y.z<=v;){if(y.x>=f&&y.x<=x&&y.y>=g&&y.y<=m&&y!==i&&y!==a&&Mo(o,d,l,u,c,h,y.x,y.y)&&Gt(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function jD(r,e,t){var n=r;do{var i=n.prev,s=n.next.next;!af(i,s)&&kw(i,n,n.next,s)&&pc(i,s)&&pc(s,i)&&(e.push(i.i/t|0),e.push(n.i/t|0),e.push(s.i/t|0),gc(n),gc(n.next),n=r=s),n=n.next}while(n!==r);return Ea(n)}function $D(r,e,t,n,i,s){var a=r;do{for(var o=a.next.next;o!==a.prev;){if(a.i!==o.i&&s4(a,o)){var l=Ew(a,o);a=Ea(a,a.next),l=Ea(l,l.next),fc(a,e,t,n,i,s,0),fc(l,e,t,n,i,s,0);return}o=o.next}a=a.next}while(a!==r)}function KD(r,e,t,n){var i=[],s,a,o,l,c;for(s=0,a=e.length;s=t.next.y&&t.next.y!==t.y){var o=t.x+(i-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(o<=n&&o>s&&(s=o,a=t.x=t.x&&t.x>=c&&n!==t.x&&Mo(ia.x||t.x===a.x&&t4(a,t)))&&(a=t,u=h)),t=t.next;while(t!==l);return a}function t4(r,e){return Gt(r.prev,r,e.prev)<0&&Gt(e.next,r,r.next)<0}function n4(r,e,t,n){var i=r;do i.z===0&&(i.z=_p(i.x,i.y,e,t,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,r4(i)}function r4(r){var e,t,n,i,s,a,o,l,c=1;do{for(t=r,r=null,s=null,a=0;t;){for(a++,n=t,o=0,e=0;e0||l>0&&n;)o!==0&&(l===0||!n||t.z<=n.z)?(i=t,t=t.nextZ,o--):(i=n,n=n.nextZ,l--),s?s.nextZ=i:r=i,i.prevZ=s,s=i;t=n}s.nextZ=null,c*=2}while(a>1);return r}function _p(r,e,t,n,i){return r=(r-t)*i|0,e=(e-n)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function i4(r){var e=r,t=r;do(e.x=(r-a)*(s-o)&&(r-a)*(n-o)>=(t-a)*(e-o)&&(t-a)*(s-o)>=(i-a)*(n-o)}function s4(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!a4(r,e)&&(pc(r,e)&&pc(e,r)&&o4(r,e)&&(Gt(r.prev,r,e.prev)||Gt(r,e.prev,e))||af(r,e)&&Gt(r.prev,r,r.next)>0&&Gt(e.prev,e,e.next)>0)}function Gt(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function af(r,e){return r.x===e.x&&r.y===e.y}function kw(r,e,t,n){var i=Jd(Gt(r,e,t)),s=Jd(Gt(r,e,n)),a=Jd(Gt(t,n,r)),o=Jd(Gt(t,n,e));return!!(i!==s&&a!==o||i===0&&Kd(r,t,e)||s===0&&Kd(r,n,e)||a===0&&Kd(t,r,n)||o===0&&Kd(t,e,n))}function Kd(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function Jd(r){return r>0?1:r<0?-1:0}function a4(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&kw(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function pc(r,e){return Gt(r.prev,r,r.next)<0?Gt(r,e,r.next)>=0&&Gt(r,r.prev,e)>=0:Gt(r,e,r.prev)<0||Gt(r,r.next,e)<0}function o4(r,e){var t=r,n=!1,i=(r.x+e.x)/2,s=(r.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&i<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==r);return n}function Ew(r,e){var t=new wp(r.i,r.x,r.y),n=new wp(e.i,e.x,e.y),i=r.next,s=e.prev;return r.next=e,e.prev=r,t.next=i,i.prev=t,n.next=t,t.prev=n,s.next=n,n.prev=s,n}function kb(r,e,t,n){var i=new wp(r,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function gc(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function wp(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}sf.deviation=function(r,e,t,n){var i=e&&e.length,s=i?e[0]*t:r.length,a=Math.abs(Mp(r,0,s,t));if(i)for(var o=0,l=e.length;o0&&(n+=r[i-1].length,t.holes.push(n))}return t};new K;new K;var Eb;(r=>{function e(i){let s=i.slice();return s.sort(r.POINT_COMPARATOR),r.makeHullPresorted(s)}r.makeHull=e;function t(i){if(i.length<=1)return i.slice();let s=[];for(let o=0;o=2;){const c=s[s.length-1],d=s[s.length-2];if((c.x-d.x)*(l.y-d.y)>=(c.y-d.y)*(l.x-d.x))s.pop();else break}s.push(l)}s.pop();let a=[];for(let o=i.length-1;o>=0;o--){const l=i[o];for(;a.length>=2;){const c=a[a.length-1],d=a[a.length-2];if((c.x-d.x)*(l.y-d.y)>=(c.y-d.y)*(l.x-d.x))a.pop();else break}a.push(l)}return a.pop(),s.length==1&&a.length==1&&s[0].x==a[0].x&&s[0].y==a[0].y?s:s.concat(a)}r.makeHullPresorted=t;function n(i,s){return i.xs.x?1:i.ys.y?1:0}r.POINT_COMPARATOR=n})(Eb||(Eb={}));new $i;new C;new De;new qr;new nn;new wt;new C;new C;var l4=Ht(" ",1),c4=Ht(" ",1);function d4(r,e){_n(e,!0);const t=2;let n=Nt(void 0),i=Nt(void 0),s=Nt(void 0),a,o=!1;yh(()=>(z(n)&&z(n).computeVertexNormals(),setTimeout(()=>{e.cameraState&&z(i)&&z(s)&&l(e.cameraState),o=!0,z(s)&&z(s).addEventListener("change",d)},100),()=>{z(s)&&z(s).removeEventListener("change",d),a&&clearTimeout(a)}));const l=m=>{!z(i)||!z(s)||(z(i).position.set(m.px,m.py,m.pz),z(i).rotation.set(m.rx,m.ry,m.rz),z(s).target.set(m.tx,m.ty,m.tz),z(i).zoom=m.zoom,z(i).updateProjectionMatrix(),z(s).update())},c=()=>{if(!(!z(i)||!z(s)))return{px:z(i).position.x,py:z(i).position.y,pz:z(i).position.z,rx:z(i).rotation.x,ry:z(i).rotation.y,rz:z(i).rotation.z,tx:z(s).target.x,ty:z(s).target.y,tz:z(s).target.z,zoom:z(i).zoom}},d=()=>{o&&e.saveCameraToUrl&&(a&&clearTimeout(a),a=setTimeout(()=>{const m=c();m&&Fg(e.componentName,m)},500))};Vi(()=>{if(e.componentName,o=!1,z(i)&&z(s)){const m=t*e.volume;z(i).position.set(m,m,m),z(i).rotation.set(0,0,0),z(s).target.set(0,0,0),z(i).zoom=1,z(i).updateProjectionMatrix(),z(s).update()}});var u=c4(),h=bt(u);{let m=Ve(()=>[t*e.volume,t*e.volume,t*e.volume]);Ds(h,()=>cs.PerspectiveCamera,(p,v)=>{v(p,{makeDefault:!0,get position(){return z(m)},get ref(){return z(i)},set ref(b){Rt(i,b,!0)},children:(b,y)=>{VD(b,{get ref(){return z(s)},set ref(_){Rt(s,_,!0)}})},$$slots:{default:!0}})})}var f=Ut(h,2);{let m=Ve(()=>[0,1*e.volume,2*e.volume]);Ds(f,()=>cs.PointLight,(p,v)=>{v(p,{decay:.1,intensity:1,get position(){return z(m)}})})}var g=Ut(f,2);Ds(g,()=>cs.AmbientLight,(m,p)=>{p(m,{color:"white",intensity:.5})});var x=Ut(g,2);Ds(x,()=>cs.Mesh,(m,p)=>{p(m,{children:(v,b)=>{var y=l4(),_=bt(y);Ds(_,()=>cs.BufferGeometry,(T,A)=>{A(T,{get ref(){return z(n)},set ref(M){Rt(n,M,!0)},children:(M,S)=>{var E=Ct(),P=bt(E);{let N=Ve(()=>[e.solid.getVertices(),3]);Ds(P,()=>cs.BufferAttribute,(L,F)=>{F(L,{get args(){return z(N)},attach:"attributes.position"})})}Oe(M,E)},$$slots:{default:!0}})});var w=Ut(_,2);Ds(w,()=>cs.MeshPhongMaterial,(T,A)=>{A(T,{get color(){return e.solid.color},get side(){return $n},get wireframe(){return e.wireframe}})}),Oe(v,y)},$$slots:{default:!0}})}),Oe(r,u),wn()}function Ji(r){return rn("theme")?.[r]}var u4=/\s+/g,Sp=r=>typeof r!="string"||!r?r:r.replace(u4," ").trim(),hh=(...r)=>{let e=[],t=n=>{if(!n&&n!==0&&n!==0n)return;if(Array.isArray(n)){for(let s=0,a=n.length;s0?Sp(e.join(" ")):void 0},Cb=r=>r===!1?"false":r===!0?"true":r===0?"0":r,Yn=r=>{if(!r||typeof r!="object")return!0;for(let e in r)return!1;return!0},h4=(r,e)=>{if(r===e)return!0;if(!r||!e)return!1;let t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;for(let i=0;i{for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];t in r?r[t]=hh(r[t],n):r[t]=n}return r},Cw=(r,e)=>{for(let t=0;t{let e=[];Cw(r,e);let t=[];for(let n=0;n{let t={};for(let n in r){let i=r[n];if(n in e){let s=e[n];Array.isArray(i)||Array.isArray(s)?t[n]=Rw(s,i):typeof i=="object"&&typeof s=="object"&&i&&s?t[n]=Tp(i,s):t[n]=s+" "+i}else t[n]=i}for(let n in e)n in r||(t[n]=e[n]);return t},f4={twMerge:!0,twMergeConfig:{},responsiveVariants:!1};function p4(){let r=null,e={},t=!1;return{get cachedTwMerge(){return r},set cachedTwMerge(n){r=n},get cachedTwMergeConfig(){return e},set cachedTwMergeConfig(n){e=n},get didTwMergeConfigChange(){return t},set didTwMergeConfigChange(n){t=n},reset(){r=null,e={},t=!1}}}var Ci=p4(),g4=r=>{let e=(t,n)=>{let{extend:i=null,slots:s={},variants:a={},compoundVariants:o=[],compoundSlots:l=[],defaultVariants:c={}}=t,d={...f4,...n},u=i?.base?hh(i.base,t?.base):t?.base,h=i?.variants&&!Yn(i.variants)?Tp(a,i.variants):a,f=i?.defaultVariants&&!Yn(i.defaultVariants)?{...i.defaultVariants,...c}:c;!Yn(d.twMergeConfig)&&!h4(d.twMergeConfig,Ci.cachedTwMergeConfig)&&(Ci.didTwMergeConfigChange=!0,Ci.cachedTwMergeConfig=d.twMergeConfig);let g=Yn(i?.slots),x=Yn(s)?{}:{base:hh(t?.base,g&&i?.base),...s},m=g?x:Rb({...i?.slots},Yn(x)?{base:t?.base}:x),p=Yn(i?.compoundVariants)?o:Rw(i?.compoundVariants,o),v=y=>{if(Yn(h)&&Yn(s)&&g)return r(u,y?.class,y?.className)(d);if(p&&!Array.isArray(p))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof p}`);if(l&&!Array.isArray(l))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof l}`);let _=(L,F,B=[],G)=>{let O=B;if(typeof F=="string"){let Y=Sp(F).split(" ");for(let te=0;te0){let te=[];for(let de=0;de{let O=F[L];if(!O||Yn(O))return null;let Y=G?.[L]??y?.[L];if(Y===null)return null;let te=Cb(Y),de=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,Ee=f?.[L],ve=[];if(typeof te=="object"&&de)for(let[J,Q]of Object.entries(te)){let we=O[Q];if(J==="initial"){Ee=Q;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(J)||(ve=_(J,we,ve,B))}let Ge=te!=null&&typeof te!="object"?te:Cb(Ee),He=O[Ge||"false"];return typeof ve=="object"&&typeof B=="string"&&ve[B]?Rb(ve,He):ve.length>0?(ve.push(He),B==="base"?ve.join(" "):ve):He},T=()=>{if(!h)return null;let L=Object.keys(h),F=[];for(let B=0;B{if(!h||typeof h!="object")return null;let B=[];for(let G in h){let O=w(G,h,L,F),Y=L==="base"&&typeof O=="string"?O:O&&O[L];Y&&B.push(Y)}return B},M={};for(let L in y){let F=y[L];F!==void 0&&(M[L]=F)}let S=(L,F)=>{let B=typeof y?.[L]=="object"?{[L]:y[L]?.initial}:{};return{...f,...M,...B,...F}},E=(L=[],F)=>{let B=[],G=L.length;for(let O=0;O{let F=E(p,L);if(!Array.isArray(F))return F;let B={},G=r;for(let O=0;O{if(l.length<1)return null;let F={},B=S(null,L);for(let G=0;G{let O=P(G),Y=N(G);return F(m[B],A(B,G),O?O[B]:void 0,Y?Y[B]:void 0,G?.class,G?.className)(d)}}return L}return r(u,T(),E(p),y?.class,y?.className)(d)},b=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return v.variantKeys=b(),v.extend=i,v.base=u,v.slots=m,v.variants=h,v.defaultVariants=f,v.compoundSlots=l,v.compoundVariants=p,v};return{tv:e,createTV:t=>(n,i)=>e(n,i?Tp(t,i):t)}};const m4=(r,e)=>{const t=new Array(r.length+e.length);for(let n=0;n({classGroupId:r,validator:e}),Pw=(r=new Map,e=null,t)=>({nextPart:r,validators:e,classGroupId:t}),fh="-",Pb=[],b4="arbitrary..",y4=r=>{const e=_4(r),{conflictingClassGroups:t,conflictingClassGroupModifiers:n}=r;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return v4(a);const o=a.split(fh),l=o[0]===""&&o.length>1?1:0;return Iw(o,l,e)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=n[a],c=t[a];return l?c?m4(c,l):l:c||Pb}return t[a]||Pb}}},Iw=(r,e,t)=>{if(r.length-e===0)return t.classGroupId;const i=r[e],s=t.nextPart.get(i);if(s){const c=Iw(r,e+1,s);if(c)return c}const a=t.validators;if(a===null)return;const o=e===0?r.join(fh):r.slice(e).join(fh),l=a.length;for(let c=0;cr.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=r.slice(1,-1),t=e.indexOf(":"),n=e.slice(0,t);return n?b4+n:void 0})(),_4=r=>{const{theme:e,classGroups:t}=r;return w4(t,e)},w4=(r,e)=>{const t=Pw();for(const n in r){const i=r[n];Wg(i,t,n,e)}return t},Wg=(r,e,t,n)=>{const i=r.length;for(let s=0;s{if(typeof r=="string"){S4(r,e,t);return}if(typeof r=="function"){T4(r,e,t,n);return}A4(r,e,t,n)},S4=(r,e,t)=>{const n=r===""?e:Dw(e,r);n.classGroupId=t},T4=(r,e,t,n)=>{if(k4(r)){Wg(r(n),e,t,n);return}e.validators===null&&(e.validators=[]),e.validators.push(x4(t,r))},A4=(r,e,t,n)=>{const i=Object.entries(r),s=i.length;for(let a=0;a{let t=r;const n=e.split(fh),i=n.length;for(let s=0;s"isThemeGetter"in r&&r.isThemeGetter===!0,E4=r=>{if(r<1)return{get:()=>{},set:()=>{}};let e=0,t=Object.create(null),n=Object.create(null);const i=(s,a)=>{t[s]=a,e++,e>r&&(e=0,n=t,t=Object.create(null))};return{get(s){let a=t[s];if(a!==void 0)return a;if((a=n[s])!==void 0)return i(s,a),a},set(s,a){s in t?t[s]=a:i(s,a)}}},Ap="!",Ib=":",C4=[],Db=(r,e,t,n,i)=>({modifiers:r,hasImportantModifier:e,baseClassName:t,maybePostfixModifierPosition:n,isExternal:i}),R4=r=>{const{prefix:e,experimentalParseClassName:t}=r;let n=i=>{const s=[];let a=0,o=0,l=0,c;const d=i.length;for(let x=0;xl?c-l:void 0;return Db(s,f,h,g)};if(e){const i=e+Ib,s=n;n=a=>a.startsWith(i)?s(a.slice(i.length)):Db(C4,!1,a,void 0,!0)}if(t){const i=n;n=s=>t({className:s,parseClassName:i})}return n},P4=r=>{const e=new Map;return r.orderSensitiveModifiers.forEach((t,n)=>{e.set(t,1e6+n)}),t=>{const n=[];let i=[];for(let s=0;s0&&(i.sort(),n.push(...i),i=[]),n.push(a)):i.push(a)}return i.length>0&&(i.sort(),n.push(...i)),n}},I4=r=>({cache:E4(r.cacheSize),parseClassName:R4(r),sortModifiers:P4(r),...y4(r)}),D4=/\s+/,L4=(r,e)=>{const{parseClassName:t,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:s}=e,a=[],o=r.trim().split(D4);let l="";for(let c=o.length-1;c>=0;c-=1){const d=o[c],{isExternal:u,modifiers:h,hasImportantModifier:f,baseClassName:g,maybePostfixModifierPosition:x}=t(d);if(u){l=d+(l.length>0?" "+l:l);continue}let m=!!x,p=n(m?g.substring(0,x):g);if(!p){if(!m){l=d+(l.length>0?" "+l:l);continue}if(p=n(g),!p){l=d+(l.length>0?" "+l:l);continue}m=!1}const v=h.length===0?"":h.length===1?h[0]:s(h).join(":"),b=f?v+Ap:v,y=b+p;if(a.indexOf(y)>-1)continue;a.push(y);const _=i(p,m);for(let w=0;w<_.length;++w){const T=_[w];a.push(b+T)}l=d+(l.length>0?" "+l:l)}return l},N4=(...r)=>{let e=0,t,n,i="";for(;e{if(typeof r=="string")return r;let e,t="";for(let n=0;n{let t,n,i,s;const a=l=>{const c=e.reduce((d,u)=>u(d),r());return t=I4(c),n=t.cache.get,i=t.cache.set,s=o,o(l)},o=l=>{const c=n(l);if(c)return c;const d=L4(l,t);return i(l,d),d};return s=a,(...l)=>s(N4(...l))},U4=[],an=r=>{const e=t=>t[r]||U4;return e.isThemeGetter=!0,e},Nw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Uw=/^\((?:(\w[\w-]*):)?(.+)\)$/i,F4=/^\d+\/\d+$/,O4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,B4=/\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$/,z4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,V4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,G4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mo=r=>F4.test(r),dt=r=>!!r&&!Number.isNaN(Number(r)),ls=r=>!!r&&Number.isInteger(Number(r)),D0=r=>r.endsWith("%")&&dt(r.slice(0,-1)),Si=r=>O4.test(r),H4=()=>!0,W4=r=>B4.test(r)&&!z4.test(r),Fw=()=>!1,X4=r=>V4.test(r),q4=r=>G4.test(r),Y4=r=>!Pe(r)&&!Ie(r),Z4=r=>Zo(r,zw,Fw),Pe=r=>Nw.test(r),ea=r=>Zo(r,Vw,W4),L0=r=>Zo(r,Q4,dt),Lb=r=>Zo(r,Ow,Fw),j4=r=>Zo(r,Bw,q4),Qd=r=>Zo(r,Gw,X4),Ie=r=>Uw.test(r),_l=r=>jo(r,Vw),$4=r=>jo(r,eL),Nb=r=>jo(r,Ow),K4=r=>jo(r,zw),J4=r=>jo(r,Bw),eu=r=>jo(r,Gw,!0),Zo=(r,e,t)=>{const n=Nw.exec(r);return n?n[1]?e(n[1]):t(n[2]):!1},jo=(r,e,t=!1)=>{const n=Uw.exec(r);return n?n[1]?e(n[1]):t:!1},Ow=r=>r==="position"||r==="percentage",Bw=r=>r==="image"||r==="url",zw=r=>r==="length"||r==="size"||r==="bg-size",Vw=r=>r==="length",Q4=r=>r==="number",eL=r=>r==="family-name",Gw=r=>r==="shadow",Ep=()=>{const r=an("color"),e=an("font"),t=an("text"),n=an("font-weight"),i=an("tracking"),s=an("leading"),a=an("breakpoint"),o=an("container"),l=an("spacing"),c=an("radius"),d=an("shadow"),u=an("inset-shadow"),h=an("text-shadow"),f=an("drop-shadow"),g=an("blur"),x=an("perspective"),m=an("aspect"),p=an("ease"),v=an("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...y(),Ie,Pe],w=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],A=()=>[Ie,Pe,l],M=()=>[mo,"full","auto",...A()],S=()=>[ls,"none","subgrid",Ie,Pe],E=()=>["auto",{span:["full",ls,Ie,Pe]},ls,Ie,Pe],P=()=>[ls,"auto",Ie,Pe],N=()=>["auto","min","max","fr",Ie,Pe],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...A()],G=()=>[mo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],O=()=>[r,Ie,Pe],Y=()=>[...y(),Nb,Lb,{position:[Ie,Pe]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],de=()=>["auto","cover","contain",K4,Z4,{size:[Ie,Pe]}],Ee=()=>[D0,_l,ea],ve=()=>["","none","full",c,Ie,Pe],Ge=()=>["",dt,_l,ea],He=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Q=()=>[dt,D0,Nb,Lb],we=()=>["","none",g,Ie,Pe],Be=()=>["none",dt,Ie,Pe],Ce=()=>["none",dt,Ie,Pe],it=()=>[dt,Ie,Pe],ut=()=>[mo,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Si],breakpoint:[Si],color:[H4],container:[Si],"drop-shadow":[Si],ease:["in","out","in-out"],font:[Y4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Si],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Si],shadow:[Si],spacing:["px",dt],text:[Si],"text-shadow":[Si],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",mo,Pe,Ie,m]}],container:["container"],columns:[{columns:[dt,Pe,Ie,o]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"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"],sr:["sr-only","not-sr-only"],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:_()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:M()}],"inset-x":[{"inset-x":M()}],"inset-y":[{"inset-y":M()}],start:[{start:M()}],end:[{end:M()}],top:[{top:M()}],right:[{right:M()}],bottom:[{bottom:M()}],left:[{left:M()}],visibility:["visible","invisible","collapse"],z:[{z:[ls,"auto",Ie,Pe]}],basis:[{basis:[mo,"full","auto",o,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dt,mo,"auto","initial","none",Pe]}],grow:[{grow:["",dt,Ie,Pe]}],shrink:[{shrink:["",dt,Ie,Pe]}],order:[{order:[ls,"first","last","none",Ie,Pe]}],"grid-cols":[{"grid-cols":S()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":S()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":N()}],"auto-rows":[{"auto-rows":N()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[o,"screen",...G()]}],"min-w":[{"min-w":[o,"screen","none",...G()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",t,_l,ea]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Ie,L0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",D0,Pe]}],"font-family":[{font:[$4,Pe,e]}],"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:[i,Ie,Pe]}],"line-clamp":[{"line-clamp":[dt,"none",Ie,L0]}],leading:[{leading:[s,...A()]}],"list-image":[{"list-image":["none",Ie,Pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ie,Pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...He(),"wavy"]}],"text-decoration-thickness":[{decoration:[dt,"from-font","auto",Ie,ea]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[dt,"auto",Ie,Pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie,Pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie,Pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:de()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ls,Ie,Pe],radial:["",Ie,Pe],conic:[ls,Ie,Pe]},J4,j4]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:Ee()}],"gradient-via-pos":[{via:Ee()}],"gradient-to-pos":[{to:Ee()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:ve()}],"rounded-s":[{"rounded-s":ve()}],"rounded-e":[{"rounded-e":ve()}],"rounded-t":[{"rounded-t":ve()}],"rounded-r":[{"rounded-r":ve()}],"rounded-b":[{"rounded-b":ve()}],"rounded-l":[{"rounded-l":ve()}],"rounded-ss":[{"rounded-ss":ve()}],"rounded-se":[{"rounded-se":ve()}],"rounded-ee":[{"rounded-ee":ve()}],"rounded-es":[{"rounded-es":ve()}],"rounded-tl":[{"rounded-tl":ve()}],"rounded-tr":[{"rounded-tr":ve()}],"rounded-br":[{"rounded-br":ve()}],"rounded-bl":[{"rounded-bl":ve()}],"border-w":[{border:Ge()}],"border-w-x":[{"border-x":Ge()}],"border-w-y":[{"border-y":Ge()}],"border-w-s":[{"border-s":Ge()}],"border-w-e":[{"border-e":Ge()}],"border-w-t":[{"border-t":Ge()}],"border-w-r":[{"border-r":Ge()}],"border-w-b":[{"border-b":Ge()}],"border-w-l":[{"border-l":Ge()}],"divide-x":[{"divide-x":Ge()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Ge()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...He(),"hidden","none"]}],"divide-style":[{divide:[...He(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...He(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dt,Ie,Pe]}],"outline-w":[{outline:["",dt,_l,ea]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",d,eu,Qd]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",u,eu,Qd]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:Ge()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[dt,ea]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":Ge()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",h,eu,Qd]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[dt,Ie,Pe]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[dt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Q()}],"mask-image-linear-to-pos":[{"mask-linear-to":Q()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":Q()}],"mask-image-t-to-pos":[{"mask-t-to":Q()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":Q()}],"mask-image-r-to-pos":[{"mask-r-to":Q()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":Q()}],"mask-image-b-to-pos":[{"mask-b-to":Q()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":Q()}],"mask-image-l-to-pos":[{"mask-l-to":Q()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":Q()}],"mask-image-x-to-pos":[{"mask-x-to":Q()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":Q()}],"mask-image-y-to-pos":[{"mask-y-to":Q()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Ie,Pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Q()}],"mask-image-radial-to-pos":[{"mask-radial-to":Q()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":y()}],"mask-image-conic-pos":[{"mask-conic":[dt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Q()}],"mask-image-conic-to-pos":[{"mask-conic-to":Q()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:de()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ie,Pe]}],filter:[{filter:["","none",Ie,Pe]}],blur:[{blur:we()}],brightness:[{brightness:[dt,Ie,Pe]}],contrast:[{contrast:[dt,Ie,Pe]}],"drop-shadow":[{"drop-shadow":["","none",f,eu,Qd]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",dt,Ie,Pe]}],"hue-rotate":[{"hue-rotate":[dt,Ie,Pe]}],invert:[{invert:["",dt,Ie,Pe]}],saturate:[{saturate:[dt,Ie,Pe]}],sepia:[{sepia:["",dt,Ie,Pe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ie,Pe]}],"backdrop-blur":[{"backdrop-blur":we()}],"backdrop-brightness":[{"backdrop-brightness":[dt,Ie,Pe]}],"backdrop-contrast":[{"backdrop-contrast":[dt,Ie,Pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dt,Ie,Pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dt,Ie,Pe]}],"backdrop-invert":[{"backdrop-invert":["",dt,Ie,Pe]}],"backdrop-opacity":[{"backdrop-opacity":[dt,Ie,Pe]}],"backdrop-saturate":[{"backdrop-saturate":[dt,Ie,Pe]}],"backdrop-sepia":[{"backdrop-sepia":["",dt,Ie,Pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ie,Pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dt,"initial",Ie,Pe]}],ease:[{ease:["linear","initial",p,Ie,Pe]}],delay:[{delay:[dt,Ie,Pe]}],animate:[{animate:["none",v,Ie,Pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Ie,Pe]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:Be()}],"rotate-x":[{"rotate-x":Be()}],"rotate-y":[{"rotate-y":Be()}],"rotate-z":[{"rotate-z":Be()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:it()}],"skew-x":[{"skew-x":it()}],"skew-y":[{"skew-y":it()}],transform:[{transform:[Ie,Pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ut()}],"translate-x":[{"translate-x":ut()}],"translate-y":[{"translate-y":ut()}],"translate-z":[{"translate-z":ut()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",Ie,Pe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"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",Ie,Pe]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[dt,_l,ea,L0]}],stroke:[{stroke:["none",...O()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},tL=(r,{cacheSize:e,prefix:t,experimentalParseClassName:n,extend:i={},override:s={}})=>(Cl(r,"cacheSize",e),Cl(r,"prefix",t),Cl(r,"experimentalParseClassName",n),tu(r.theme,s.theme),tu(r.classGroups,s.classGroups),tu(r.conflictingClassGroups,s.conflictingClassGroups),tu(r.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),Cl(r,"orderSensitiveModifiers",s.orderSensitiveModifiers),nu(r.theme,i.theme),nu(r.classGroups,i.classGroups),nu(r.conflictingClassGroups,i.conflictingClassGroups),nu(r.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Hw(r,i,"orderSensitiveModifiers"),r),Cl=(r,e,t)=>{t!==void 0&&(r[e]=t)},tu=(r,e)=>{if(e)for(const t in e)Cl(r,t,e[t])},nu=(r,e)=>{if(e)for(const t in e)Hw(r,e,t)},Hw=(r,e,t)=>{const n=e[t];n!==void 0&&(r[t]=r[t]?r[t].concat(n):n)},nL=(r,...e)=>typeof r=="function"?kp(Ep,r,...e):kp(()=>tL(Ep(),r),...e),rL=kp(Ep);var iL=r=>Yn(r)?rL:nL({...r,extend:{theme:r.theme,classGroups:r.classGroups,conflictingClassGroupModifiers:r.conflictingClassGroupModifiers,conflictingClassGroups:r.conflictingClassGroups,...r.extend}}),sL=(...r)=>e=>{let t=hh(r);return!t||!e.twMerge?t:((!Ci.cachedTwMerge||Ci.didTwMergeConfigChange)&&(Ci.didTwMergeConfigChange=!1,Ci.cachedTwMerge=iL(Ci.cachedTwMergeConfig)),Ci.cachedTwMerge(t)||void 0)},{tv:q}=g4(sL);q({base:"w-full",variants:{color:{primary:"text-primary-500 dark:text-primary-400",secondary:"text-secondary-500 dark:text-secondary-400"},flush:{true:"",false:"border border-gray-200 dark:border-gray-700 rounded-t-xl"}}});q({slots:{base:"group",button:"flex items-center justify-between w-full font-medium text-left group-first:rounded-t-xl border-gray-200 dark:border-gray-700 border-b",content:"border-b border-gray-200 dark:border-gray-700",active:"bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-white focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800",inactive:"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"},variants:{flush:{true:{button:"py-5",content:"py-5"},false:{button:"p-5 border-s border-e group-first:border-t",content:"p-5 border-s border-e"}},open:{true:{},false:{}}},compoundVariants:[{flush:!0,open:!0,class:{button:"text-gray-900 dark:text-white"}},{flush:!0,open:!1,class:{button:"text-gray-500 dark:text-gray-400"}}],defaultVariants:{flush:!1,open:!1}});const aL=r=>r;function Xg(r){const e=r-1;return e*e*e+1}function Ub(r){const e=typeof r=="string"&&r.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[r,"px"]}function oL(r,{delay:e=0,duration:t=400,easing:n=aL}={}){const i=+getComputedStyle(r).opacity;return{delay:e,duration:t,easing:n,css:s=>`opacity: ${s*i}`}}function lL(r,{delay:e=0,duration:t=400,easing:n=Xg,x:i=0,y:s=0,opacity:a=0}={}){const o=getComputedStyle(r),l=+o.opacity,c=o.transform==="none"?"":o.transform,d=l*(1-a),[u,h]=Ub(i),[f,g]=Ub(s);return{delay:e,duration:t,easing:n,css:(x,m)=>` - transform: ${c} translate(${(1-x)*u}${h}, ${(1-x)*f}${g}); - opacity: ${l-d*m}`}}function Fb(r,{delay:e=0,duration:t=400,easing:n=Xg,axis:i="y"}={}){const s=getComputedStyle(r),a=+s.opacity,o=i==="y"?"height":"width",l=parseFloat(s[o]),c=i==="y"?["top","bottom"]:["left","right"],d=c.map(p=>`${p[0].toUpperCase()}${p.slice(1)}`),u=parseFloat(s[`padding${d[0]}`]),h=parseFloat(s[`padding${d[1]}`]),f=parseFloat(s[`margin${d[0]}`]),g=parseFloat(s[`margin${d[1]}`]),x=parseFloat(s[`border${d[0]}Width`]),m=parseFloat(s[`border${d[1]}Width`]);return{delay:e,duration:t,easing:n,css:p=>`overflow: hidden;opacity: ${Math.min(p*20,1)*a};${o}: ${p*l}px;padding-${c[0]}: ${p*u}px;padding-${c[1]}: ${p*h}px;margin-${c[0]}: ${p*f}px;margin-${c[1]}: ${p*g}px;border-${c[0]}-width: ${p*x}px;border-${c[1]}-width: ${p*m}px;min-${o}: 0`}}function cL(r,{delay:e=0,duration:t=400,easing:n=Xg,start:i=0,opacity:s=0}={}){const a=getComputedStyle(r),o=+a.opacity,l=a.transform==="none"?"":a.transform,c=1-i,d=o*(1-s);return{delay:e,duration:t,easing:n,css:(u,h)=>` - transform: ${l} scale(${1-c*h}); - opacity: ${o-d*h} - `}}dn(["click"]);q({base:"p-4 gap-3 text-sm",variants:{color:{primary:"bg-primary-50 dark:bg-gray-800 text-primary-800 dark:text-primary-400",secondary:"bg-secondary-50 dark:bg-secondary-800 text-secondary-800 dark:text-secondary-400",gray:"bg-gray-100 text-gray-500 focus:ring-gray-400 dark:bg-gray-700 dark:text-gray-300",red:"bg-red-100 text-red-500 focus:ring-red-400 dark:bg-red-200 dark:text-red-600",orange:"bg-orange-100 text-orange-500 focus:ring-orange-400 dark:bg-orange-200 dark:text-orange-600",amber:"bg-amber-100 text-amber-500 focus:ring-amber-400 dark:bg-amber-200 dark:text-amber-600",yellow:"bg-yellow-100 text-yellow-500 focus:ring-yellow-400 dark:bg-yellow-200 dark:text-yellow-600",lime:"bg-lime-100 text-lime-500 focus:ring-lime-400 dark:bg-lime-200 dark:text-lime-600",green:"bg-green-100 text-green-500 focus:ring-green-400 dark:bg-green-200 dark:text-green-600",emerald:"bg-emerald-100 text-emerald-500 focus:ring-emerald-400 dark:bg-emerald-200 dark:text-emerald-600",teal:"bg-teal-100 text-teal-500 focus:ring-teal-400 dark:bg-teal-200 dark:text-teal-600",cyan:"bg-cyan-100 text-cyan-500 focus:ring-cyan-400 dark:bg-cyan-200 dark:text-cyan-600",sky:"bg-sky-100 text-sky-500 focus:ring-sky-400 dark:bg-sky-200 dark:text-sky-600",blue:"bg-blue-100 text-blue-500 focus:ring-blue-400 dark:bg-blue-200 dark:text-blue-600",indigo:"bg-indigo-100 text-indigo-500 focus:ring-indigo-400 dark:bg-indigo-200 dark:text-indigo-600",violet:"bg-violet-100 text-violet-500 focus:ring-violet-400 dark:bg-violet-200 dark:text-violet-600",purple:"bg-purple-100 text-purple-500 focus:ring-purple-400 dark:bg-purple-200 dark:text-purple-600",fuchsia:"bg-fuchsia-100 text-fuchsia-500 focus:ring-fuchsia-400 dark:bg-fuchsia-200 dark:text-fuchsia-600",pink:"bg-pink-100 text-pink-500 focus:ring-pink-400 dark:bg-pink-200 dark:text-pink-600",rose:"bg-rose-100 text-rose-500 focus:ring-rose-400 dark:bg-rose-200 dark:text-rose-600"},rounded:{true:"rounded-lg"},border:{true:"border"},icon:{true:"flex items-center"},dismissable:{true:"flex items-center"}},compoundVariants:[{border:!0,color:"primary",class:"border-primary-500 dark:border-primary-200 divide-primary-500 dark:divide-primary-200"},{border:!0,color:"secondary",class:"border-secondary-500 dark:border-secondary-200 divide-secondary-500 dark:divide-secondary-200"},{border:!0,color:"gray",class:"border-gray-300 dark:border-gray-800 divide-gray-300 dark:divide-gray-800"},{border:!0,color:"red",class:"border-red-300 dark:border-red-800 divide-red-300 dark:divide-red-800"},{border:!0,color:"orange",class:"border-orange-300 dark:border-orange-800 divide-orange-300 dark:divide-orange-800"},{border:!0,color:"amber",class:"border-amber-300 dark:border-amber-800 divide-amber-300 dark:divide-amber-800"},{border:!0,color:"yellow",class:"border-yellow-300 dark:border-yellow-800 divide-yellow-300 dark:divide-yellow-800"},{border:!0,color:"lime",class:"border-lime-300 dark:border-lime-800 divide-lime-300 dark:divide-lime-800"},{border:!0,color:"green",class:"border-green-300 dark:border-green-800 divide-green-300 dark:divide-green-800"},{border:!0,color:"emerald",class:"border-emerald-300 dark:border-emerald-800 divide-emerald-300 dark:divide-emerald-800"},{border:!0,color:"teal",class:"border-teal-300 dark:border-teal-800 divide-teal-300 dark:divide-teal-800"},{border:!0,color:"cyan",class:"border-cyan-300 dark:border-cyan-800 divide-cyan-300 dark:divide-cyan-800"},{border:!0,color:"sky",class:"border-sky-300 dark:border-sky-800 divide-sky-300 dark:divide-sky-800"},{border:!0,color:"blue",class:"border-blue-300 dark:border-blue-800 divide-blue-300 dark:divide-blue-800"},{border:!0,color:"indigo",class:"border-indigo-300 dark:border-indigo-800 divide-indigo-300 dark:divide-indigo-800"},{border:!0,color:"violet",class:"border-violet-300 dark:border-violet-800 divide-violet-300 dark:divide-violet-800"},{border:!0,color:"purple",class:"border-purple-300 dark:border-purple-800 divide-purple-300 dark:divide-purple-800"},{border:!0,color:"fuchsia",class:"border-fuchsia-300 dark:border-fuchsia-800 divide-fuchsia-300 dark:divide-fuchsia-800"},{border:!0,color:"pink",class:"border-pink-300 dark:border-pink-800 divide-pink-300 dark:divide-pink-800"},{border:!0,color:"rose",class:"border-rose-300 dark:border-rose-800 divide-rose-300 dark:divide-rose-800"}],defaultVariants:{color:"primary",rounded:!0}});const dL=q({base:"focus:outline-hidden whitespace-normal disabled:cursor-not-allowed disabled:opacity-50",variants:{color:{primary:"text-primary-500 focus:ring-primary-400 hover:bg-primary-200 dark:hover:bg-primary-800 dark:hover:text-primary-300",secondary:"text-secondary-500 focus:ring-secondary-400 hover:bg-secondary-200 dark:hover:bg-secondary-800 dark:hover:text-secondary-300",gray:"text-gray-500 focus:ring-gray-400 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-gray-300",red:"text-red-500 focus:ring-red-400 hover:bg-red-200 dark:hover:bg-red-800 dark:hover:text-red-300",orange:"text-orange-500 focus:ring-orange-400 hover:bg-orange-200 dark:hover:bg-orange-800 dark:hover:text-orange-300",amber:"text-amber-500 focus:ring-amber-400 hover:bg-amber-200 dark:hover:bg-amber-800 dark:hover:text-amber-300",yellow:"text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:hover:bg-yellow-800 dark:hover:text-yellow-300",lime:"text-lime-500 focus:ring-lime-400 hover:bg-lime-200 dark:hover:bg-lime-800 dark:hover:text-lime-300",green:"text-green-500 focus:ring-green-400 hover:bg-green-200 dark:hover:bg-green-800 dark:hover:text-green-300",emerald:"text-emerald-500 focus:ring-emerald-400 hover:bg-emerald-200 dark:hover:bg-emerald-800 dark:hover:text-emerald-300",teal:"text-teal-500 focus:ring-teal-400 hover:bg-teal-200 dark:hover:bg-teal-800 dark:hover:text-teal-300",cyan:"text-cyan-500 focus:ring-cyan-400 hover:bg-cyan-200 dark:hover:bg-cyan-800 dark:hover:text-cyan-300",sky:"text-sky-500 focus:ring-sky-400 hover:bg-sky-200 dark:hover:bg-sky-800 dark:hover:text-sky-300",blue:"text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800 dark:hover:text-blue-300",indigo:"text-indigo-500 focus:ring-indigo-400 hover:bg-indigo-200 dark:hover:bg-indigo-800 dark:hover:text-indigo-300",violet:"text-violet-500 focus:ring-violet-400 hover:bg-violet-200 dark:hover:bg-violet-800 dark:hover:text-violet-300",purple:"text-purple-500 focus:ring-purple-400 hover:bg-purple-200 dark:hover:bg-purple-800 dark:hover:text-purple-300",fuchsia:"text-fuchsia-500 focus:ring-fuchsia-400 hover:bg-fuchsia-200 dark:hover:bg-fuchsia-800 dark:hover:text-fuchsia-300",pink:"text-pink-500 focus:ring-pink-400 hover:bg-pink-200 dark:hover:bg-pink-800 dark:hover:text-pink-300",rose:"text-rose-500 focus:ring-rose-400 hover:bg-rose-200 dark:hover:bg-rose-800 dark:hover:text-rose-300",none:""},size:{xs:"m-0.5 rounded-xs focus:ring-1 p-0.5",sm:"m-0.5 rounded-sm focus:ring-1 p-0.5",md:"m-0.5 rounded-lg focus:ring-2 p-1.5",lg:"m-0.5 rounded-lg focus:ring-2 p-2.5"}},defaultVariants:{color:"gray",size:"md",href:null},slots:{svg:""},compoundVariants:[{size:"xs",class:{svg:"w-3 h-3"}},{size:"sm",class:{svg:"w-3.5 h-3.5"}},{size:["md","lg"],class:{svg:"w-5 h-5"}},{size:["xs","sm","md","lg"],color:"none",class:"focus:ring-0 rounded-none m-0"}]}),Ww=Symbol("dismissable");function uL(r){return Bn(Ww,{dismiss:r})}function hL(){return rn(Ww)}var fL=Ht(' '),pL=Ia(''),gL=Ht(""),mL=Ht(' '),xL=Ia(''),bL=Ht(" ");function yL(r,e){_n(e,!0);let t=pt(e,"color",3,"gray"),n=pt(e,"name",3,"Close"),i=pt(e,"size",3,"md"),s=rr(e,["$$slots","$$events","$$legacy","children","color","onclick","name","ariaLabel","size","class","svgClass"]);const a=Ve(()=>dL({color:t(),size:i()})),o=Ve(()=>z(a).base),l=Ve(()=>z(a).svg),c=hL();function d(x){e.onclick?.(x),!x.defaultPrevented&&c?.dismiss?.(x)}var u=Ct(),h=bt(u);{var f=x=>{var m=gL();fn(m,w=>({type:"button",...s,class:w,onclick:d,"aria-label":e.ariaLabel??n()}),[()=>z(o)({class:Kt(e.class)})]);var p=Pt(m);{var v=w=>{var T=fL(),A=Pt(T);dr(()=>ha(A,n())),Oe(w,T)};Ft(p,w=>{n()&&w(v)})}var b=Ut(p,2);{var y=w=>{var T=Ct(),A=bt(T);on(A,()=>e.children),Oe(w,T)},_=w=>{var T=pL();dr(A=>wa(T,0,A),[()=>_a(z(l)({class:e.svgClass}))]),Oe(w,T)};Ft(b,w=>{e.children?w(y):w(_,!1)})}Oe(x,m)},g=x=>{var m=bL();fn(m,w=>({...s,onclick:d,class:w,"aria-label":e.ariaLabel??n()}),[()=>z(o)({class:Kt(e.class)})]);var p=Pt(m);{var v=w=>{var T=mL(),A=Pt(T);dr(()=>ha(A,n())),Oe(w,T)};Ft(p,w=>{n()&&w(v)})}var b=Ut(p,2);{var y=w=>{var T=Ct(),A=bt(T);on(A,()=>e.children),Oe(w,T)},_=w=>{var T=xL();dr(A=>wa(T,0,A),[()=>_a(z(l)())]),Oe(w,T)};Ft(b,w=>{e.children?w(y):w(_,!1)})}Oe(x,m)};Ft(h,x=>{e.href===void 0?x(f):x(g,!1)})}Oe(r,u),wn()}q({base:"relative flex items-center justify-center bg-gray-100 dark:bg-gray-600 text-gray-600 dark:text-gray-300",variants:{cornerStyle:{rounded:"rounded-sm",circular:"rounded-full"},border:{true:"p-1 ring-2 ring-gray-300 dark:ring-gray-500",false:""},stacked:{true:"border-2 not-first:-ms-4 border-white dark:border-gray-800",false:""},size:{xs:"w-6 h-6",sm:"w-8 h-8",md:"w-10 h-10",lg:"w-20 h-20",xl:"w-36 h-36"}},defaultVariants:{cornerStyle:"circular",border:!1,stacked:!1,size:"md"}});q({base:"shrink-0",variants:{color:{primary:"bg-primary-500",secondary:"bg-secondary-500",gray:"bg-gray-200",red:"bg-red-500",orange:"bg-orange-600",amber:"bg-amber-500",yellow:"bg-yellow-300",lime:"bg-lime-500",green:"bg-green-500",emerald:"bg-emerald-500",teal:"bg-teal-500",cyan:"bg-cyan-500",sky:"bg-sky-500",blue:"bg-blue-500",indigo:"bg-indigo-500",violet:"bg-violet-500",purple:"bg-purple-500",fuchsia:"bg-fuchsia-500",pink:"bg-pink-500",rose:"bg-rose-500"},size:{xs:"w-2 h-2",sm:"w-2.5 h-2.5",md:"w-3 h-3",lg:"w-3.5 h-3.5",xl:"w-6 h-6"},cornerStyle:{rounded:"rounded-sm",circular:"rounded-full"},border:{true:"border border-gray-300 dark:border-gray-300",false:{}},hasChildren:{true:"inline-flex items-center justify-center",false:{}},placement:{default:"","top-left":"absolute top-0 start-0","top-center":"absolute top-0 start-1/2 -translate-x-1/2 rtl:translate-x-1/2","top-right":"absolute top-0 end-0","center-left":"absolute top-1/2 -translate-y-1/2 start-0",center:"absolute top-1/2 -translate-y-1/2 start-1/2 -translate-x-1/2 rtl:translate-x-1/2","center-right":"absolute top-1/2 -translate-y-1/2 end-0","bottom-left":"absolute bottom-0 start-0","bottom-center":"absolute bottom-0 start-1/2 -translate-x-1/2 rtl:translate-x-1/2","bottom-right":"absolute bottom-0 end-0"},offset:{true:{},false:{}}},compoundVariants:[{placement:"top-left",offset:!0,class:"-translate-x-1/3 rtl:translate-x-1/3 -translate-y-1/3"},{placement:"top-center",offset:!0,class:"-translate-y-1/3"},{placement:"top-right",offset:!0,class:"translate-x-1/3 rtl:-translate-x-1/3 -translate-y-1/3"},{placement:"center-left",offset:!0,class:"-translate-x-1/3 rtl:translate-x-1/3"},{placement:"center-right",offset:!0,class:"translate-x-1/3 rtl:-translate-x-1/3"},{placement:"bottom-left",offset:!0,class:"-translate-x-1/3 rtl:translate-x-1/3 translate-y-1/3"},{placement:"bottom-center",offset:!0,class:"translate-y-1/3"},{placement:"bottom-right",offset:!0,class:"translate-x-1/3 rtl:-translate-x-1/3 translate-y-1/3"}],defaultVariants:{color:"primary",size:"md",cornerStyle:"circular",border:!1,offset:!0,hasChildren:!1}});q({slots:{linkClass:"flex align-middle",base:"font-medium inline-flex items-center justify-center px-2.5 py-0.5"},variants:{color:{primary:{base:"bg-primary-100 text-primary-800 dark:bg-primary-900 dark:text-primary-300"},secondary:{base:"bg-secondary-100 text-secondary-800 dark:bg-secondary-900 dark:text-secondary-300"},gray:{base:"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-300"},red:{base:"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300"},orange:{base:"bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-300"},amber:{base:"bg-amber-100 text-amber-800 dark:bg-amber-900 dark:text-amber-300"},yellow:{base:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-300"},lime:{base:"bg-lime-100 text-lime-800 dark:bg-lime-900 dark:text-lime-300"},green:{base:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-300"},emerald:{base:"bg-emerald-100 text-emerald-800 dark:bg-emerald-900 dark:text-emerald-300"},teal:{base:"bg-teal-100 text-teal-800 dark:bg-teal-900 dark:text-teal-300"},cyan:{base:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900 dark:text-cyan-300"},sky:{base:"bg-sky-100 text-sky-800 dark:bg-sky-900 dark:text-sky-300"},blue:{base:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-300"},indigo:{base:"bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-300"},violet:{base:"bg-violet-100 text-violet-800 dark:bg-violet-900 dark:text-violet-300"},fuchsia:{base:"bg-fuchsia-100 text-fuchsia-800 dark:bg-fuchsia-900 dark:text-fuchsia-300"},purple:{base:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-300"},pink:{base:"bg-pink-100 text-pink-800 dark:bg-pink-900 dark:text-pink-300"},rose:{base:"bg-rose-100 text-rose-800 dark:bg-rose-900 dark:text-rose-300"}},size:{small:"text-xs",large:"text-sm"},border:{true:{base:"border"}},rounded:{true:{base:"rounded-full"},false:"rounded-sm"}},compoundVariants:[{border:!0,color:"primary",class:"dark:bg-transparent dark:text-primary-400 border-primary-400 dark:border-primary-400"},{border:!0,color:"secondary",class:"dark:bg-transparent dark:text-secondary-400 border-secondary-400 dark:border-secondary-400"},{border:!0,color:"gray",class:"dark:bg-transparent dark:text-gray-400 border-gray-400 dark:border-gray-400"},{border:!0,color:"red",class:"dark:bg-transparent dark:text-red-400 border-red-400 dark:border-red-400"},{border:!0,color:"orange",class:"dark:bg-transparent dark:text-orange-400 border-orange-400 dark:border-orange-400"},{border:!0,color:"amber",class:"dark:bg-transparent dark:text-amber-400 border-amber-400 dark:border-amber-400"},{border:!0,color:"yellow",class:"dark:bg-transparent dark:text-yellow-300 border-yellow-300 dark:border-yellow-300"},{border:!0,color:"lime",class:"dark:bg-transparent dark:text-lime-400 border-lime-400 dark:border-lime-400"},{border:!0,color:"green",class:"dark:bg-transparent dark:text-green-400 border-green-400 dark:border-green-400"},{border:!0,color:"emerald",class:"dark:bg-transparent dark:text-emerald-400 border-emerald-400 dark:border-emerald-400"},{border:!0,color:"teal",class:"dark:bg-transparent dark:text-teal-400 border-teal-400 dark:border-teal-400"},{border:!0,color:"cyan",class:"dark:bg-transparent dark:text-cyan-400 border-cyan-400 dark:border-cyan-400"},{border:!0,color:"sky",class:"dark:bg-transparent dark:text-sky-400 border-sky-400 dark:border-sky-400"},{border:!0,color:"blue",class:"dark:bg-transparent dark:text-blue-400 border-blue-400 dark:border-blue-400"},{border:!0,color:"indigo",class:"dark:bg-transparent dark:text-indigo-400 border-indigo-400 dark:border-indigo-400"},{border:!0,color:"violet",class:"dark:bg-transparent dark:text-violet-400 border-violet-400 dark:border-violet-400"},{border:!0,color:"purple",class:"dark:bg-transparent dark:text-purple-400 border-purple-400 dark:border-purple-400"},{border:!0,color:"fuchsia",class:"dark:bg-transparent dark:text-fuchsia-400 border-fuchsia-400 dark:border-fuchsia-400"},{border:!0,color:"pink",class:"dark:bg-transparent dark:text-pink-400 border-pink-400 dark:border-pink-400"},{border:!0,color:"rose",class:"dark:bg-transparent dark:text-rose-400 border-rose-400 dark:border-rose-400"},{href:!0,color:"primary",class:"hover:bg-primary-200"},{href:!0,color:"secondary",class:"hover:bg-secondary-200"},{href:!0,color:"gray",class:"hover:bg-gray-200"},{href:!0,color:"red",class:"hover:bg-red-200"},{href:!0,color:"orange",class:"hover:bg-orange-200"},{href:!0,color:"amber",class:"hover:bg-amber-200"},{href:!0,color:"yellow",class:"hover:bg-yellow-200"},{href:!0,color:"lime",class:"hover:bg-lime-200"},{href:!0,color:"green",class:"hover:bg-green-200"},{href:!0,color:"emerald",class:"hover:bg-emerald-200"},{href:!0,color:"teal",class:"hover:bg-teal-200"},{href:!0,color:"cyan",class:"hover:bg-cyan-200"},{href:!0,color:"sky",class:"hover:bg-sky-200"},{href:!0,color:"blue",class:"hover:bg-blue-200"},{href:!0,color:"indigo",class:"hover:bg-indigo-200"},{href:!0,color:"violet",class:"hover:bg-violet-200"},{href:!0,color:"purple",class:"hover:bg-purple-200"},{href:!0,color:"fuchsia",class:"hover:bg-fuchsia-200"},{href:!0,color:"pink",class:"hover:bg-pink-200"},{href:!0,color:"rose",class:"hover:bg-rose-200"}],defaultVariants:{color:"primary",size:"small",rounded:!1}});q({slots:{base:"fixed z-50 flex justify-between p-4 mx-auto dark:bg-gray-700 dark:border-gray-600",insideDiv:"flex flex-col md:flex-row md:items-center gap-2 mx-auto",dismissable:"absolute end-2.5 top-2.5 md:static md:end-auto md:top-auto"},variants:{type:{top:{base:"top-0 start-0 w-full border-b border-gray-200 bg-gray-50"},bottom:{base:"bottom-0 start-0 w-full border-t border-gray-200 bg-gray-50"}},color:{primary:{base:"bg-primary-50 dark:bg-primary-900"},secondary:{base:"bg-secondary-50 dark:bg-secondary-900"},gray:{base:"bg-gray-50 dark:bg-gray-700"},red:{base:"bg-red-50 dark:bg-red-900"},orange:{base:"bg-orange-50 dark:bg-orange-900"},amber:{base:"bg-amber-50 dark:bg-amber-900"},yellow:{base:"bg-yellow-50 dark:bg-yellow-900"},lime:{base:"bg-lime-50 dark:bg-lime-900"},green:{base:"bg-green-50 dark:bg-green-900"},emerald:{base:"bg-emerald-50 dark:bg-emerald-900"},teal:{base:"bg-teal-50 dark:bg-teal-900"},cyan:{base:"bg-cyan-50 dark:bg-cyan-900"},sky:{base:"bg-sky-50 dark:bg-sky-900"},blue:{base:"bg-blue-50 dark:bg-blue-900"},indigo:{base:"bg-indigo-50 dark:bg-indigo-900"},violet:{base:"bg-violet-50 dark:bg-violet-900"},purple:{base:"bg-purple-50 dark:bg-purple-900"},fuchsia:{base:"bg-fuchsia-50 dark:bg-fuchsia-900"},pink:{base:"bg-pink-50 dark:bg-pink-900"},rose:{base:"bg-rose-50 dark:bg-rose-900"}}},defaultVariants:{type:"top",multiline:!0}});function wl(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}q({slots:{base:"w-full z-30 border-gray-200 dark:bg-gray-700 dark:border-gray-600",inner:"grid h-full max-w-lg mx-auto"},variants:{position:{static:{base:"static"},fixed:{base:"fixed"},absolute:{base:"absolute"},relative:{base:"relative"},sticky:{base:"sticky"}},navType:{default:{base:"bottom-0 start-0 h-16 bg-white border-t"},border:{base:"bottom-0 start-0 h-16 bg-white border-t"},application:{base:"h-16 max-w-lg -translate-x-1/2 rtl:translate-x-1/2 bg-white border rounded-full bottom-4 start-1/2"},pagination:{base:"bottom-0 h-16 -translate-x-1/2 rtl:translate-x-1/2 bg-white border-t start-1/2"},group:{base:"bottom-0 -translate-x-1/2 rtl:translate-x-1/2 bg-white border-t start-1/2"},card:{base:"bottom-0 start-0 h-16 bg-white border-t"},meeting:{base:"bottom-0 start-0 grid h-16 grid-cols-1 px-8 bg-white border-t md:grid-cols-3",inner:"flex items-center justify-center mx-auto"},video:{base:"bottom-0 start-0 grid h-24 grid-cols-1 px-8 bg-white border-t md:grid-cols-3",inner:"flex items-center w-full"}}},defaultVariants:{position:"fixed",navType:"default"}});q({slots:{base:"inline-flex flex-col items-center justify-center",span:"text-sm"},variants:{navType:{default:{base:"px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group",span:"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-500"},border:{base:"px-5 border-gray-200 border-x hover:bg-gray-50 dark:hover:bg-gray-800 group dark:border-gray-600",span:"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-500"},application:{base:"",span:"sr-only"},pagination:{base:"px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group",span:"sr-only"},group:{base:"p-4 hover:bg-gray-50 dark:hover:bg-gray-800 group",span:"sr-only"},card:{base:"px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group",span:"text-gray-500 dark:text-gray-400 group-hover:text-primary-600 dark:group-hover:text-primary-500"},meeting:{base:"",span:""},video:{base:"",span:""}},appBtnPosition:{left:{base:"px-5 rounded-s-full hover:bg-gray-50 dark:hover:bg-gray-800 group"},middle:{base:"px-5 hover:bg-gray-50 dark:hover:bg-gray-800 group"},right:{base:"px-5 rounded-e-full hover:bg-gray-50 dark:hover:bg-gray-800 group"}}},defaultVariants:{navType:"default",appBtnPosition:"middle",active:!1}});q({slots:{base:"w-full",innerDiv:"grid max-w-xs grid-cols-3 gap-1 p-1 mx-auto my-2 bg-gray-100 rounded-lg dark:bg-gray-600"}});q({base:"px-5 py-1.5 text-xs font-medium rounded-lg",variants:{active:{true:"text-white bg-gray-900 dark:bg-gray-300 dark:text-gray-900",false:"text-gray-900 hover:bg-gray-200 dark:text-white dark:hover:bg-gray-700"}}});q({slots:{base:"flex",list:"inline-flex items-center space-x-1 rtl:space-x-reverse md:space-x-3 rtl:space-x-reverse"},variants:{solid:{true:{base:"px-5 py-3 text-gray-700 border border-gray-200 rounded-lg bg-gray-50 dark:bg-gray-800 dark:border-gray-700"},false:""}},defaultVariants:{solid:!1}});q({slots:{base:"inline-flex items-center",separator:"h-6 w-6 text-gray-400 rtl:-scale-x-100"},variants:{home:{true:"",false:""},hasHref:{true:"",false:""}},compoundVariants:[{home:!0,class:{base:"inline-flex items-center text-sm font-medium text-gray-700 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white",separator:"me-2 h-4 w-4"}},{home:!1,hasHref:!0,class:{base:"ms-1 text-sm font-medium text-gray-700 hover:text-gray-900 md:ms-2 dark:text-gray-400 dark:hover:text-white"}},{home:!1,hasHref:!1,class:{base:"ms-1 text-sm font-medium text-gray-500 md:ms-2 dark:text-gray-400"}}]});q({base:"inline-flex rounded-lg shadow-xs",variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}});const vL=q({slots:{base:"text-center font-medium inline-flex items-center justify-center",outline:"bg-transparent border hover:text-white dark:bg-transparent dark:hover-text-white",shadow:"shadow-lg",spinner:"ms-2"},variants:{color:{primary:{base:"text-white bg-primary-700 hover:bg-primary-800 dark:bg-primary-600 dark:hover:bg-primary-700 focus-within:ring-primary-300 dark:focus-within:ring-primary-800",outline:"text-primary-700 border-primary-700 hover:bg-primary-800 dark:border-primary-500 dark:text-primary-500 dark:hover:bg-primary-600",shadow:"shadow-primary-500/50 dark:shadow-primary-800/80"},dark:{base:"text-white bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:hover:bg-gray-700 focus-within:ring-gray-300 dark:focus-within:ring-gray-700",outline:"text-gray-900 border-gray-800 hover:bg-gray-900 dark:border-gray-600 dark:text-gray-400 dark:hover:bg-gray-600",shadow:"shadow-gray-500/50 gray:shadow-gray-800/80"},alternative:{base:"text-gray-900 bg-transparent border border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-400 hover:text-primary-700 focus-within:text-primary-700 dark:focus-within:text-white dark:hover:text-white dark:hover:bg-gray-700 focus-within:ring-gray-200 dark:focus-within:ring-gray-700",outline:"text-gray-700 border-gray-700 hover:bg-gray-800 dark:border-gray-400 dark:text-gray-400 dark:hover:bg-gray-500",shadow:"_shadow-gray-500/50 dark:shadow-gray-800/80"},light:{base:"text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-600 focus-within:ring-gray-200 dark:focus-within:ring-gray-700",outline:"text-gray-700 border-gray-700 hover:bg-gray-800 dark:border-gray-400 dark:text-gray-400 dark:hover:bg-gray-500",shadow:"shadow-gray-500/50 dark:shadow-gray-800/80"},secondary:{base:"text-white bg-secondary-700 hover:bg-secondary-800 dark:bg-secondary-600 dark:hover:bg-secondary-700 focus-within:ring-secondary-300 dark:focus-within:ring-secondary-800",outline:"text-secondary-700 border-secondary-700 hover:bg-secondary-800 dark:border-secondary-400 dark:text-secondary-400 dark:hover:bg-secondary-500",shadow:"shadow-secondary-500/50 dark:shadow-secondary-800/80"},gray:{base:"text-white bg-gray-700 hover:bg-gray-800 dark:bg-gray-600 dark:hover:bg-gray-700 focus-within:ring-gray-300 dark:focus-within:ring-gray-800",outline:"text-gray-700 border-gray-700 hover:bg-gray-800 dark:border-gray-400 dark:text-gray-400 dark:hover:bg-gray-500",shadow:"shadow-gray-500/50 dark:shadow-gray-800/80"},red:{base:"text-white bg-red-700 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700 focus-within:ring-red-300 dark:focus-within:ring-red-900",outline:"text-red-700 border-red-700 hover:bg-red-800 dark:border-red-500 dark:text-red-500 dark:hover:bg-red-600",shadow:"shadow-red-500/50 dark:shadow-red-800/80"},orange:{base:"text-white bg-orange-700 hover:bg-orange-800 dark:bg-orange-600 dark:hover:bg-orange-700 focus-within:ring-orange-300 dark:focus-within:ring-orange-900",outline:"text-orange-700 border-orange-700 hover:bg-orange-800 dark:border-orange-400 dark:text-orange-400 dark:hover:bg-orange-500",shadow:"shadow-orange-500/50 dark:shadow-orange-800/80"},amber:{base:"text-white bg-amber-700 hover:bg-amber-800 dark:bg-amber-600 dark:hover:bg-amber-700 focus-within:ring-amber-300 dark:focus-within:ring-amber-900",outline:"text-amber-700 border-amber-700 hover:bg-amber-800 dark:border-amber-400 dark:text-amber-400 dark:hover:bg-amber-500",shadow:"shadow-amber-500/50 dark:shadow-amber-800/80"},yellow:{base:"text-white bg-yellow-400 hover:bg-yellow-500 focus-within:ring-yellow-300 dark:focus-within:ring-yellow-900",outline:"text-yellow-400 border-yellow-400 hover:bg-yellow-500 dark:border-yellow-300 dark:text-yellow-300 dark:hover:bg-yellow-400",shadow:"shadow-yellow-500/50 dark:shadow-yellow-800/80"},lime:{base:"text-white bg-lime-700 hover:bg-lime-800 dark:bg-lime-600 dark:hover:bg-lime-700 focus-within:ring-lime-300 dark:focus-within:ring-lime-800",outline:"text-lime-700 border-lime-700 hover:bg-lime-800 dark:border-lime-400 dark:text-lime-400 dark:hover:bg-lime-500",shadow:"shadow-lime-500/50 dark:shadow-lime-800/80"},green:{base:"text-white bg-green-700 hover:bg-green-800 dark:bg-green-600 dark:hover:bg-green-700 focus-within:ring-green-300 dark:focus-within:ring-green-800",outline:"text-green-700 border-green-700 hover:bg-green-800 dark:border-green-500 dark:text-green-500 dark:hover:bg-green-600",shadow:"shadow-green-500/50 dark:shadow-green-800/80"},emerald:{base:"text-white bg-emerald-700 hover:bg-emerald-800 dark:bg-emerald-600 dark:hover:bg-emerald-700 focus-within:ring-emerald-300 dark:focus-within:ring-emerald-800",outline:"text-emerald-700 border-emerald-700 hover:bg-emerald-800 dark:border-emerald-400 dark:text-emerald-400 dark:hover:bg-emerald-500",shadow:"shadow-emerald-500/50 dark:shadow-emerald-800/80"},teal:{base:"text-white bg-teal-700 hover:bg-teal-800 dark:bg-teal-600 dark:hover:bg-teal-700 focus-within:ring-teal-300 dark:focus-within:ring-teal-800",outline:"text-teal-700 border-teal-700 hover:bg-teal-800 dark:border-teal-400 dark:text-teal-400 dark:hover:bg-teal-500",shadow:"shadow-teal-500/50 dark:shadow-teal-800/80"},cyan:{base:"text-white bg-cyan-700 hover:bg-cyan-800 dark:bg-cyan-600 dark:hover:bg-cyan-700 focus-within:ring-cyan-300 dark:focus-within:ring-cyan-800",outline:"text-cyan-700 border-cyan-700 hover:bg-cyan-800 dark:border-cyan-400 dark:text-cyan-400 dark:hover:bg-cyan-500",shadow:"shadow-cyan-500/50 dark:shadow-cyan-800/80"},sky:{base:"text-white bg-sky-700 hover:bg-sky-800 dark:bg-sky-600 dark:hover:bg-sky-700 focus-within:ring-sky-300 dark:focus-within:ring-sky-800",outline:"text-sky-700 border-sky-700 hover:bg-sky-800 dark:border-sky-400 dark:text-sky-400 dark:hover:bg-sky-500",shadow:"shadow-sky-500/50 dark:shadow-sky-800/80"},blue:{base:"text-white bg-blue-700 hover:bg-blue-800 dark:bg-blue-600 dark:hover:bg-blue-700 focus-within:ring-blue-300 dark:focus-within:ring-blue-800",outline:"text-blue-700 border-blue-700 hover:bg-blue-800 dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-500",shadow:"shadow-blue-500/50 dark:shadow-blue-800/80"},indigo:{base:"text-white bg-indigo-700 hover:bg-indigo-800 dark:bg-indigo-600 dark:hover:bg-indigo-700 focus-within:ring-indigo-300 dark:focus-within:ring-indigo-800",outline:"text-indigo-700 border-indigo-700 hover:bg-indigo-800 dark:border-indigo-400 dark:text-indigo-400 dark:hover:bg-indigo-500",shadow:"shadow-indigo-500/50 dark:shadow-indigo-800/80"},violet:{base:"text-white bg-violet-700 hover:bg-violet-800 dark:bg-violet-600 dark:hover:bg-violet-700 focus-within:ring-violet-300 dark:focus-within:ring-violet-800",outline:"text-violet-700 border-violet-700 hover:bg-violet-800 dark:border-violet-400 dark:text-violet-400 dark:hover:bg-violet-500",shadow:"shadow-violet-500/50 dark:shadow-violet-800/80"},purple:{base:"text-white bg-purple-700 hover:bg-purple-800 dark:bg-purple-600 dark:hover:bg-purple-700",outline:"text-purple-700 border-purple-700 hover:bg-purple-800 dark:border-purple-400 dark:text-purple-400 dark:hover:bg-purple-500",shadow:"shadow-purple-500/50 dark:shadow-purple-800/80"},fuchsia:{base:"text-white bg-fuchsia-700 hover:bg-fuchsia-800 dark:bg-fuchsia-600 dark:hover:bg-fuchsia-700",outline:"text-fuchsia-700 border-fuchsia-700 hover:bg-fuchsia-800 dark:border-fuchsia-400 dark:text-fuchsia-400 dark:hover:bg-fuchsia-500",shadow:"shadow-fuchsia-500/50 dark:shadow-fuchsia-800/80"},pink:{base:"text-white bg-pink-700 hover:bg-pink-800 dark:bg-pink-600 dark:hover:bg-pink-700",outline:"text-pink-700 border-pink-700 hover:bg-pink-800 dark:border-pink-400 dark:text-pink-400 dark:hover:bg-pink-500",shadow:"shadow-pink-500/50 dark:shadow-pink-800/80"},rose:{base:"text-white bg-rose-700 hover:bg-rose-800 dark:bg-rose-600 dark:hover:bg-rose-700",outline:"text-rose-700 border-rose-700 hover:bg-rose-800 dark:border-rose-400 dark:text-rose-400 dark:hover:bg-rose-500",shadow:"shadow-rose-500/50 dark:shadow-rose-800/80"}},size:{xs:"px-3 py-2 text-xs",sm:"px-4 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},group:{true:"focus-within:ring-2 focus-within:z-10 [&:not(:first-child)]:rounded-s-none [&:not(:last-child)]:rounded-e-none [&:not(:last-child)]:border-e-0",false:"focus-within:ring-4 focus-within:outline-hidden"},disabled:{true:"cursor-not-allowed opacity-50",false:""},pill:{true:"rounded-full",false:"rounded-lg"},checked:{true:"",false:""}},compoundVariants:[],defaultVariants:{pill:!1}});q({slots:{base:"inline-flex items-center justify-center transition-all duration-75 ease-in text-white bg-linear-to-r ",outlineWrapper:"inline-flex items-center justify-center w-full border-0!"},variants:{color:{blue:{base:"from-blue-500 via-blue-600 to-blue-700 hover:bg-linear-to-br focus:ring-blue-300 dark:focus:ring-blue-800"},green:{base:"from-green-400 via-green-500 to-green-600 hover:bg-linear-to-br focus:ring-green-300 dark:focus:ring-green-800"},cyan:{base:"text-white bg-linear-to-r from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-linear-to-br focus:ring-cyan-300 dark:focus:ring-cyan-800"},teal:{base:"text-white bg-linear-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-linear-to-br focus:ring-teal-300 dark:focus:ring-teal-800"},lime:{base:"text-gray-900 bg-linear-to-r from-lime-200 via-lime-400 to-lime-500 hover:bg-linear-to-br focus:ring-lime-300 dark:focus:ring-lime-800"},red:{base:"text-white bg-linear-to-r from-red-400 via-red-500 to-red-600 hover:bg-linear-to-br focus:ring-red-300 dark:focus:ring-red-800"},pink:{base:"text-white bg-linear-to-r from-pink-400 via-pink-500 to-pink-600 hover:bg-linear-to-br focus:ring-pink-300 dark:focus:ring-pink-800"},purple:{base:"text-white bg-linear-to-r from-purple-500 via-purple-600 to-purple-700 hover:bg-linear-to-br focus:ring-purple-300 dark:focus:ring-purple-800"},purpleToBlue:{base:"text-white bg-linear-to-br from-purple-600 to-blue-500 hover:bg-linear-to-bl focus:ring-blue-300 dark:focus:ring-blue-800"},cyanToBlue:{base:"text-white bg-linear-to-r from-cyan-500 to-blue-500 hover:bg-linear-to-bl focus:ring-cyan-300 dark:focus:ring-cyan-800"},greenToBlue:{base:"text-white bg-linear-to-br from-green-400 to-blue-600 hover:bg-linear-to-bl focus:ring-green-200 dark:focus:ring-green-800"},purpleToPink:{base:"text-white bg-linear-to-r from-purple-500 to-pink-500 hover:bg-linear-to-l focus:ring-purple-200 dark:focus:ring-purple-800"},pinkToOrange:{base:"text-white bg-linear-to-br from-pink-500 to-orange-400 hover:bg-linear-to-bl focus:ring-pink-200 dark:focus:ring-pink-800"},tealToLime:{base:"text-gray-900 bg-linear-to-r from-teal-200 to-lime-200 hover:bg-linear-to-l focus:ring-lime-200 dark:focus:ring-teal-700"},redToYellow:{base:"text-gray-900 bg-linear-to-r from-red-200 via-red-300 to-yellow-200 hover:bg-linear-to-bl focus:ring-red-100 dark:focus:ring-red-400"}},outline:{true:{base:"p-0.5",outlineWrapper:"bg-white text-gray-900! dark:bg-gray-900 dark:text-white! hover:bg-transparent hover:text-inherit! group-hover:opacity-0! group-hover:text-inherit!"}},pill:{true:{base:"rounded-full",outlineWrapper:"rounded-full"},false:{base:"rounded-lg",outlineWrapper:"rounded-lg"}},size:{xs:"px-3 py-2 text-xs",sm:"px-4 py-2 text-sm",md:"px-5 py-2.5 text-sm",lg:"px-5 py-3 text-base",xl:"px-6 py-3.5 text-base"},shadow:{true:{base:"shadow-lg"}},group:{true:"rounded-none",false:""},disabled:{true:{base:"opacity-50 cursor-not-allowed"}}},compoundVariants:[{shadow:!0,color:"blue",class:{base:"shadow-blue-500/50 dark:shadow-blue-800/80"}},{shadow:!0,color:"green",class:{base:"shadow-green-500/50 dark:shadow-green-800/80"}},{shadow:!0,color:"cyan",class:{base:"shadow-cyan-500/50 dark:shadow-cyan-800/80"}},{shadow:!0,color:"teal",class:{base:"shadow-teal-500/50 dark:shadow-teal-800/80"}},{shadow:!0,color:"lime",class:{base:"shadow-lime-500/50 dark:shadow-lime-800/80"}},{shadow:!0,color:"red",class:{base:"shadow-red-500/50 dark:shadow-red-800/80"}},{shadow:!0,color:"pink",class:{base:"shadow-pink-500/50 dark:shadow-pink-800/80"}},{shadow:!0,color:"purple",class:{base:"shadow-purple-500/50 dark:shadow-purple-800/80"}},{shadow:!0,color:"purpleToBlue",class:{base:"shadow-blue-500/50 dark:shadow-blue-800/80"}},{shadow:!0,color:"cyanToBlue",class:{base:"shadow-cyan-500/50 dark:shadow-cyan-800/80"}},{shadow:!0,color:"greenToBlue",class:{base:"shadow-green-500/50 dark:shadow-green-800/80"}},{shadow:!0,color:"purpleToPink",class:{base:"shadow-purple-500/50 dark:shadow-purple-800/80"}},{shadow:!0,color:"pinkToOrange",class:{base:"shadow-pink-500/50 dark:shadow-pink-800/80"}},{shadow:!0,color:"tealToLime",class:{base:"shadow-lime-500/50 dark:shadow-teal-800/80"}},{shadow:!0,color:"redToYellow",class:{base:"shadow-red-500/50 dark:shadow-red-800/80"}},{group:!0,pill:!0,class:"first:rounded-s-full last:rounded-e-full"},{group:!0,pill:!1,class:"first:rounded-s-lg last:rounded-e-lg"}]});var _L=Ht(""),wL=Ht("");function ML(r,e){_n(e,!0);const t=rn("group"),n=rn("disabled");let i=pt(e,"outline",3,!1),s=pt(e,"size",3,"md"),a=pt(e,"shadow",3,!1),o=pt(e,"tag",3,"button"),l=pt(e,"loading",3,!1),c=pt(e,"spinnerProps",19,()=>({size:"4"})),d=rr(e,["$$slots","$$events","$$legacy","children","pill","outline","size","color","shadow","tag","disabled","loading","spinnerProps","class"]);const u=Ji("button");let h=Ve(()=>t?"sm":s()),f=Ve(()=>e.color??(t?i()?"dark":"alternative":"primary")),g=Ve(()=>!!n||!!e.disabled||l());const x=Ve(()=>vL({color:z(f),size:z(h),disabled:z(g),pill:e.pill,group:!!t})),m=Ve(()=>z(x).base),p=Ve(()=>z(x).outline),v=Ve(()=>z(x).shadow),b=Ve(()=>z(x).spinner);let y=Ve(()=>z(m)({class:Kt(i()&&z(p)(),a()&&z(v)(),u?.base,e.class)}));var _=Ct(),w=bt(_);{var T=M=>{var S=_L();fn(S,()=>({...d,class:z(y)}));var E=Pt(S);on(E,()=>e.children??zt),Oe(M,S)},A=M=>{var S=Ct(),E=bt(S);{var P=L=>{var F=wL();fn(F,()=>({type:"button",...d,class:z(y),disabled:z(g)}));var B=Pt(F);on(B,()=>e.children??zt);var G=Ut(B,2);{var O=Y=>{{let te=Ve(()=>z(b)());HL(Y,Wp(c,{get class(){return z(te)}}))}};Ft(G,Y=>{l()&&Y(O)})}Oe(L,F)},N=L=>{var F=Ct(),B=bt(F);vM(B,o,!1,(G,O)=>{fn(G,()=>({...d,class:z(y)}));var Y=Ct(),te=bt(Y);on(te,()=>e.children??zt),Oe(O,Y)}),Oe(L,F)};Ft(E,L=>{o()==="button"?L(P):L(N,!1)},!0)}Oe(M,S)};Ft(w,M=>{e.href!==void 0?M(T):M(A,!1)})}Oe(r,_),wn()}q({slots:{base:"w-full flex max-w-sm bg-white border border-gray-200 rounded-lg dark:bg-gray-800 dark:border-gray-700",image:"rounded-t-lg"},variants:{size:{xs:{base:"max-w-xs"},sm:{base:"max-w-sm"},md:{base:"max-w-lg"},lg:{base:"max-w-2xl"},xl:{base:"max-w-none"}},color:{gray:{base:"border-gray-200 dark:bg-gray-800 dark:border-gray-700"},primary:{base:"border-primary-200 bg-primary-400 dark:bg-primary-800 dark:border-primary-700"},secondary:{base:"border-secondary-200 bg-secondary-400 dark:bg-secondary-800 dark:border-secondary-700"},red:{base:"border-red-200 bg-red-400 dark:bg-red-800 dark:border-red-700"},orange:{base:"border-orange-200 bg-orange-400 dark:bg-orange-800 dark:border-orange-700"},amber:{base:"border-amber-200 bg-amber-400 dark:bg-amber-800 dark:border-amber-700"},yellow:{base:"border-yellow-200 bg-yellow-400 dark:bg-yellow-800 dark:border-yellow-700"},lime:{base:"border-lime-200 bg-lime-400 dark:bg-lime-800 dark:border-lime-700"},green:{base:"border-green-200 bg-green-400 dark:bg-green-800 dark:border-green-700"},emerald:{base:"border-emerald-200 bg-emerald-400 dark:bg-emerald-800 dark:border-emerald-700"},teal:{base:"border-teal-200 bg-teal-400 dark:bg-teal-800 dark:border-teal-700"},cyan:{base:"border-cyan-200 bg-cyan-400 dark:bg-cyan-800 dark:border-cyan-700"},sky:{base:"border-sky-200 bg-sky-400 dark:bg-sky-800 dark:border-sky-700"},blue:{base:"border-blue-200 bg-blue-400 dark:bg-blue-800 dark:border-blue-700"},indigo:{base:"border-indigo-200 bg-indigo-400 dark:bg-indigo-800 dark:border-indigo-700"},violet:{base:"border-violet-200 bg-violet-400 dark:bg-violet-800 dark:border-violet-700"},purple:{base:"border-purple-200 bg-purple-400 dark:bg-purple-800 dark:border-purple-700"},fuchsia:{base:"border-fuchsia-200 bg-fuchsia-400 dark:bg-fuchsia-800 dark:border-fuchsia-700"},pink:{base:"border-pink-200 bg-pink-400 dark:bg-pink-800 dark:border-pink-700"},rose:{base:"border-rose-200 bg-rose-400 dark:bg-rose-800 dark:border-rose-700"}},shadow:{xs:{base:"shadow-xs"},sm:{base:"shadow-sm"},normal:{base:"shadow"},md:{base:"shadow-md"},lg:{base:"shadow-lg"},xl:{base:"shadow-xl"},"2xl":{base:"shadow-2xl"},inner:{base:"shadow-inner"}},horizontal:{true:{base:"md:flex-row",image:"object-cover w-full h-96 md:h-auto md:w-48 md:rounded-none"}},reverse:{true:{base:"flex-col-reverse",image:"rounded-b-lg rounded-tl-none"},false:{base:"flex-col",image:"rounded-t-lg"}},href:{true:"",false:""},hasImage:{true:"",false:""}},compoundVariants:[{horizontal:!0,reverse:!0,class:{base:"md:flex-row-reverse",image:"md:rounded-e-lg"}},{horizontal:!0,reverse:!1,class:{base:"md:flex-row",image:"md:rounded-s-lg"}},{href:!0,color:"gray",class:{base:"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700"}},{href:!0,color:"primary",class:{base:"cursor-pointer hover:bg-primary-500 dark:hover:bg-primary-700"}},{href:!0,color:"secondary",class:{base:"cursor-pointer hover:bg-secondary-500 dark:hover:bg-secondary-700"}},{href:!0,color:"red",class:{base:"cursor-pointer hover:bg-red-500 dark:hover:bg-red-700"}},{href:!0,color:"orange",class:{base:"cursor-pointer hover:bg-orange-500 dark:hover:bg-orange-700"}},{href:!0,color:"amber",class:{base:"cursor-pointer hover:bg-amber-500 dark:hover:bg-amber-700"}},{href:!0,color:"yellow",class:{base:"cursor-pointer hover:bg-yellow-500 dark:hover:bg-yellow-700"}},{href:!0,color:"lime",class:{base:"cursor-pointer hover:bg-lime-500 dark:hover:bg-lime-700"}},{href:!0,color:"green",class:{base:"cursor-pointer hover:bg-green-500 dark:hover:bg-green-700"}},{href:!0,color:"emerald",class:{base:"cursor-pointer hover:bg-emerald-500 dark:hover:bg-emerald-700"}},{href:!0,color:"teal",class:{base:"cursor-pointer hover:bg-teal-500 dark:hover:bg-teal-700"}},{href:!0,color:"cyan",class:{base:"cursor-pointer hover:bg-cyan-500 dark:hover:bg-cyan-700"}},{href:!0,color:"sky",class:{base:"cursor-pointer hover:bg-sky-500 dark:hover:bg-sky-700"}},{href:!0,color:"blue",class:{base:"cursor-pointer hover:bg-blue-500 dark:hover:bg-blue-700"}},{href:!0,color:"indigo",class:{base:"cursor-pointer hover:bg-indigo-500 dark:hover:bg-indigo-700"}},{href:!0,color:"violet",class:{base:"cursor-pointer hover:bg-violet-500 dark:hover:bg-violet-700"}},{href:!0,color:"purple",class:{base:"cursor-pointer hover:bg-purple-500 dark:hover:bg-purple-700"}},{href:!0,color:"fuchsia",class:{base:"cursor-pointer hover:bg-fuchsia-500 dark:hover:bg-fuchsia-700"}},{href:!0,color:"pink",class:{base:"cursor-pointer hover:bg-pink-500 dark:hover:bg-pink-700"}},{href:!0,color:"rose",class:{base:"cursor-pointer hover:bg-rose-500 dark:hover:bg-rose-700"}}],defaultVariants:{size:"sm",shadow:"normal",horizontal:!1,reverse:!1}});q({slots:{base:"grid overflow-hidden relative rounded-lg h-56 sm:h-64 xl:h-80 2xl:h-96",slide:""},variants:{},compoundVariants:[],defaultVariants:{}});q({slots:{base:"absolute start-1/2 z-30 flex -translate-x-1/2 space-x-3 rtl:translate-x-1/2 rtl:space-x-reverse",indicator:"bg-gray-100 hover:bg-gray-300"},variants:{selected:{true:{indicator:"opacity-100"},false:{indicator:"opacity-60"}},position:{top:{base:"top-5"},bottom:{base:"bottom-5"}}}});q({slots:{base:"flex absolute top-0 z-30 justify-center items-center px-4 h-full group focus:outline-hidden text-white dark:text-gray-300",span:"inline-flex h-8 w-8 items-center justify-center rounded-full bg-white/30 group-hover:bg-white/50 group-focus:ring-4 group-focus:ring-white group-focus:outline-hidden sm:h-10 sm:w-10 dark:bg-gray-800/30 dark:group-hover:bg-gray-800/60 dark:group-focus:ring-gray-800/70"},variants:{forward:{true:"end-0",false:"start-0"}}});q({base:"flex flex-row justify-center bg-gray-100 w-full"});q({base:"",variants:{selected:{true:"opacity-100",false:"opacity-60"}},defaultVariants:{selected:!1}});q({base:"absolute block w-full h-full",variants:{fit:{contain:"object-contain",cover:"object-cover",fill:"object-fill",none:"object-none","scale-down":"object-scale-down"}},defaultVariants:{fit:"cover"}});dn(["click"]);dn(["click"]);q({base:"gap-2",variants:{embedded:{true:"px-1 py-1 focus-within:ring-0 bg-transparent hover:bg-transparent text-inherit",false:""}},defaultVariants:{embedded:!1}});q({base:"text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-hidden rounded-lg text-sm p-2.5"});q({slots:{base:"flex justify-between items-center",content:"flex flex-wrap items-center"},variants:{embedded:{true:{},false:{base:"py-2 px-3 rounded-lg dark:border"}},color:{default:{base:"bg-gray-50 dark:bg-gray-800 dark:border-gray-600",content:"divide-gray-300 dark:divide-gray-800"},primary:{base:"bg-primary-50 dark:bg-gray-800 dark:border-primary-800",content:"divide-primary-300 dark:divide-primary-800"},secondary:{base:"bg-secondary-50 dark:bg-gray-800 dark:border-secondary-800",content:"divide-secondary-300 dark:divide-primary-800"},gray:{base:"bg-gray-50 dark:bg-gray-800 dark:border-gray-800",content:"divide-gray-300 dark:divide-gray-800"},red:{base:"bg-red-50 dark:bg-gray-800 dark:border-red-800",content:"divide-red-300 dark:divide-red-800"},yellow:{base:"bg-yellow-50 dark:bg-gray-800 dark:border-yellow-800",content:"divide-yellow-300 dark:divide-yellow-800"},green:{base:"bg-green-50 dark:bg-gray-800 dark:border-green-800",content:"divide-green-300 dark:divide-green-800"},indigo:{base:"bg-indigo-50 dark:bg-gray-800 dark:border-indigo-800",content:"divide-indigo-300 dark:divide-indigo-800"},purple:{base:"bg-purple-50 dark:bg-gray-800 dark:border-purple-800",content:"divide-purple-300 dark:divide-purple-800"},pink:{base:"bg-pink-50 dark:bg-gray-800 dark:border-pink-800",content:"divide-pink-300 dark:divide-pink-800"},blue:{base:"bg-blue-50 dark:bg-gray-800 dark:border-blue-800",content:"divide-blue-300 dark:divide-blue-800"},dark:{base:"bg-gray-50 dark:bg-gray-800 dark:border-gray-800",content:"divide-gray-300 dark:divide-gray-800"}},separators:{true:{content:"sm:divide-x rtl:divide-x-reverse"}}},compoundVariants:[{embedded:!0,color:"default",class:{base:"bg-transparent"}}],defaultVariants:{color:"default"}});q({base:"flex items-center",variants:{spacing:{default:"space-x-1 rtl:space-x-reverse",tight:"space-x-0.5 rtl:space-x-reverse",loose:"space-x-2 rtl:space-x-reverse"},padding:{default:"sm:not(:last):pe-4 sm:not(:first):ps-4",none:""},position:{middle:"",first:"sm:ps-0",last:"sm:pe-0"}},compoundVariants:[{position:["first","last"],class:"sm:px-0"}],defaultVariants:{spacing:"default",padding:"default"}});q({base:"focus:outline-hidden whitespace-normal",variants:{color:{dark:"text-gray-500 hover:text-gray-900 hover:bg-gray-200 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-600",gray:"text-gray-500 focus:ring-gray-400 hover:bg-gray-200 dark:hover:bg-gray-800 dark:hover:text-gray-300",red:"text-red-500 focus:ring-red-400 hover:bg-red-200 dark:hover:bg-red-800 dark:hover:text-red-300",yellow:"text-yellow-500 focus:ring-yellow-400 hover:bg-yellow-200 dark:hover:bg-yellow-800 dark:hover:text-yellow-300",green:"text-green-500 focus:ring-green-400 hover:bg-green-200 dark:hover:bg-green-800 dark:hover:text-green-300",indigo:"text-indigo-500 focus:ring-indigo-400 hover:bg-indigo-200 dark:hover:bg-indigo-800 dark:hover:text-indigo-300",purple:"text-purple-500 focus:ring-purple-400 hover:bg-purple-200 dark:hover:bg-purple-800 dark:hover:text-purple-300",pink:"text-pink-500 focus:ring-pink-400 hover:bg-pink-200 dark:hover:bg-pink-800 dark:hover:text-pink-300",blue:"text-blue-500 focus:ring-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800 dark:hover:text-blue-300",primary:"text-primary-500 focus:ring-primary-400 hover:bg-primary-200 dark:hover:bg-primary-800 dark:hover:text-primary-300",default:"focus:ring-gray-400 hover:bg-gray-100 dark:text-gray-400 dark:hover:text-gray-50"},size:{xs:"m-0.5 rounded-xs focus:ring-1 p-0.5",sm:"m-0.5 rounded-sm focus:ring-1 p-0.5",md:"m-0.5 rounded-lg focus:ring-2 p-1.5",lg:"m-0.5 rounded-lg focus:ring-2 p-2.5"},background:{true:"",false:""}},compoundVariants:[{color:"default",background:!0,class:"dark:hover:bg-gray-600"},{color:"default",background:!1,class:"dark:hover:bg-gray-700"}],defaultVariants:{color:"default",size:"md"}});q({slots:{base:"inline-block rounded-lg bg-white dark:bg-gray-700 shadow-lg p-4",input:"w-full rounded-md border px-4 py-2 text-sm focus:ring-2 focus:outline-none outline-none dark:border-gray-600 dark:bg-gray-700 dark:text-white disabled:cursor-not-allowed disabled:opacity-50 border-gray-300 bg-gray-50 text-gray-900",titleVariant:"mb-2 text-lg font-semibold text-gray-900 dark:text-white",polite:"text-sm rounded-lg text-gray-900 dark:text-white bg-white dark:bg-gray-700 font-semibold py-2.5 px-5 hover:bg-gray-100 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-200",button:"absolute inset-y-0 right-0 flex items-center px-3 text-gray-500 focus:outline-hidden dark:text-gray-400",actionButtons:"mt-4 flex justify-between",columnHeader:"text-center text-sm font-medium text-gray-500 dark:text-gray-400",grid:"grid grid-cols-7 gap-1 w-64",nav:"mb-4 flex items-center justify-between",dayButton:"h-8 w-full block flex-1 leading-9 border-0 rounded-lg cursor-pointer text-center font-semibold text-sm day p-0",monthButton:"rounded-lg px-3 py-2 text-sm hover:bg-gray-100 focus:ring-2 focus:ring-blue-500 dark:hover:bg-gray-700",actionSlot:""},variants:{color:{primary:{input:"focus:ring-primary-500 dark:focus:ring-primary-400",dayButton:"bg-primary-300 dark:bg-primary-900"},blue:{input:"focus:ring-blue-500 dark:focus:ring-blue-400",dayButton:"bg-blue-300 dark:bg-blue-900"},red:{input:"focus:ring-red-500 dark:focus:ring-red-400",dayButton:"bg-red-300 dark:bg-red-900"},green:{input:"focus:ring-green-500 dark:focus:ring-green-400",dayButton:"bg-green-300 dark:bg-green-900"},yellow:{input:"focus:ring-yellow-500 dark:focus:ring-yellow-400",dayButton:"bg-yellow-300 dark:bg-yellow-900"},purple:{input:"focus:ring-purple-500 dark:focus:ring-purple-400",dayButton:"bg-purple-300 dark:bg-purple-900"},dark:{input:"focus:ring-gray-500 dark:focus:ring-gray-400",dayButton:"bg-gray-300 dark:bg-gray-900"},light:{input:"focus:ring-gray-500 dark:focus:ring-gray-400",dayButton:"bg-gray-300 dark:bg-gray-900"},alternative:{input:"focus:ring-alternative-500 dark:focus:ring-alternative-400",dayButton:"bg-alternative-300 dark:bg-alternative-900"},secondary:{input:"focus:ring-secondary-500 dark:focus:ring-secondary-400",dayButton:"bg-secondary-300 dark:bg-secondary-900"},gray:{input:"focus:ring-gray-500 dark:focus:ring-gray-400",dayButton:"bg-gray-300 dark:bg-gray-900"},orange:{input:"focus:ring-orange-500 dark:focus:ring-orange-400",dayButton:"bg-orange-300 dark:bg-orange-900"},amber:{input:"focus:ring-amber-500 dark:focus:ring-amber-400",dayButton:"bg-amber-300 dark:bg-amber-900"},lime:{input:"focus:ring-lime-500 dark:focus:ring-lime-400",dayButton:"bg-lime-300 dark:bg-lime-900"},emerald:{input:"focus:ring-emerald-500 dark:focus:ring-emerald-400",dayButton:"bg-emerald-300 dark:bg-emerald-900"},teal:{input:"focus:ring-teal-500 dark:focus:ring-teal-400",dayButton:"bg-teal-300 dark:bg-teal-900"},cyan:{input:"focus:ring-cyan-500 dark:focus:ring-cyan-400",dayButton:"bg-cyan-300 dark:bg-cyan-900"},sky:{input:"focus:ring-sky-500 dark:focus:ring-sky-400",dayButton:"bg-sky-300 dark:bg-sky-900"},indigo:{input:"focus:ring-indigo-500 dark:focus:ring-indigo-400",dayButton:"bg-indigo-300 dark:bg-indigo-900"},violet:{input:"focus:ring-violet-500 dark:focus:ring-violet-400",dayButton:"bg-violet-300 dark:bg-violet-900"},fuchsia:{input:"focus:ring-fuchsia-500 dark:focus:ring-fuchsia-400",dayButton:"bg-fuchsia-300 dark:bg-fuchsia-900"},pink:{input:"focus:ring-pink-500 dark:focus:ring-pink-400",dayButton:"bg-pink-300 dark:bg-pink-900"},rose:{input:"focus:ring-rose-500 dark:focus:ring-rose-400",dayButton:"bg-rose-300 dark:bg-rose-900"}},inline:{false:{base:"absolute z-10 mt-1"}},current:{true:{dayButton:"text-gray-400 dark:text-gray-500"}},today:{true:{dayButton:"font-bold"}},unavailable:{true:{dayButton:"opacity-50 cursor-not-allowed hover:bg-gray-100 dark:hover:bg-gray-700"}}},compoundVariants:[]});dn(["click"]);q({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[14px] rounded-xl h-[600px] w-[300px] shadow-xl",slot:"rounded-xl overflow-hidden w-[272px] h-[572px] bg-white dark:bg-gray-800",top:"w-[148px] h-[18px] bg-gray-800 top-0 rounded-b-[1rem] left-1/2 -translate-x-1/2 absolute",leftTop:"h-[32px] w-[3px] bg-gray-800 absolute -left-[17px] top-[72px] rounded-l-lg",leftMid:"h-[46px] w-[3px] bg-gray-800 absolute -left-[17px] top-[124px] rounded-l-lg",leftBot:"h-[46px] w-[3px] bg-gray-800 absolute -left-[17px] top-[178px] rounded-l-lg",right:"h-[64px] w-[3px] bg-gray-800 absolute -right-[17px] top-[142px] rounded-r-lg"}});q({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[14px] rounded-[2.5rem] h-[600px] w-[300px]",slot:"rounded-[2rem] overflow-hidden w-[272px] h-[572px] bg-white dark:bg-gray-800",top:"h-[32px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[72px] rounded-l-lg",leftTop:"h-[46px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[124px] rounded-l-lg",leftBot:"h-[46px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[178px] rounded-l-lg",right:"h-[64px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -right-[17px] top-[142px] rounded-r-lg"}});q({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[16px] rounded-t-xl h-[172px] max-w-[301px] md:h-[294px] md:max-w-[512px]",inner:"rounded-xl overflow-hidden h-[140px] md:h-[262px]",bot:"relative mx-auto bg-gray-900 dark:bg-gray-700 rounded-b-xl h-[24px] max-w-[301px] md:h-[42px] md:max-w-[512px]",botUnder:"relative mx-auto bg-gray-800 rounded-b-xl h-[55px] max-w-[83px] md:h-[95px] md:max-w-[142px]"}});q({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[14px] rounded-[2.5rem] h-[600px] w-[300px] shadow-xl",slot:"rounded-[2rem] overflow-hidden w-[272px] h-[572px] bg-white dark:bg-gray-800",top:"w-[148px] h-[18px] bg-gray-800 top-0 rounded-b-[1rem] left-1/2 -translate-x-1/2 absolute",leftTop:"h-[46px] w-[3px] bg-gray-800 absolute -left-[17px] top-[124px] rounded-l-lg",leftBot:"h-[46px] w-[3px] bg-gray-800 absolute -left-[17px] top-[178px] rounded-l-lg",right:"h-[64px] w-[3px] bg-gray-800 absolute -right-[17px] top-[142px] rounded-r-lg"}});q({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[8px] rounded-t-xl h-[172px] max-w-[301px] md:h-[294px] md:max-w-[512px]",inner:"rounded-lg overflow-hidden h-[156px] md:h-[278px] bg-white dark:bg-gray-800",bot:"relative mx-auto bg-gray-900 dark:bg-gray-700 rounded-b-xl rounded-t-sm h-[17px] max-w-[351px] md:h-[21px] md:max-w-[597px]",botCen:"absolute left-1/2 top-0 -translate-x-1/2 rounded-b-xl w-[56px] h-[5px] md:w-[96px] md:h-[8px] bg-gray-800"}});q({slots:{base:"relative mx-auto bg-gray-800 dark:bg-gray-700 rounded-t-[2.5rem] h-[63px] max-w-[133px]",slot:"rounded-[2rem] overflow-hidden h-[193px] w-[188px]",rightTop:"h-[41px] w-[6px] bg-gray-800 dark:bg-gray-800 absolute -right-[16px] top-[40px] rounded-r-lg",rightBot:"h-[32px] w-[6px] bg-gray-800 dark:bg-gray-800 absolute -right-[16px] top-[88px] rounded-r-lg",top:"relative mx-auto border-gray-900 dark:bg-gray-800 dark:border-gray-800 border-[10px] rounded-[2.5rem] h-[213px] w-[208px]",bot:"relative mx-auto bg-gray-800 dark:bg-gray-700 rounded-b-[2.5rem] h-[63px] max-w-[133px]"}});q({slots:{base:"relative mx-auto border-gray-800 dark:border-gray-800 bg-gray-800 border-[14px] rounded-[2.5rem] h-[454px] max-w-[341px] md:h-[682px] md:max-w-[512px]",slot:"rounded-[2rem] overflow-hidden h-[426px] md:h-[654px] bg-white dark:bg-gray-800",leftTop:"h-[32px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[72px] rounded-l-lg",leftMid:"h-[46px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[124px] rounded-l-lg",leftBot:"h-[46px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -left-[17px] top-[178px] rounded-l-lg",right:"h-[64px] w-[3px] bg-gray-800 dark:bg-gray-800 absolute -right-[17px] top-[142px] rounded-r-lg"}});const Xw=q({slots:{base:"backdrop:bg-gray-900/50 open:flex flex-col bg-white dark:bg-gray-800",form:"flex flex-col w-full border-inherit dark:border-inherit divide-inherit dark:divide-inherit",close:"absolute top-2.5 end-2.5"},variants:{},defaultVariants:{}});q({base:"mt-2 divide-y divide-gray-300 dark:divide-gray-500 overflow-hidden rounded-lg bg-white shadow-sm dark:bg-gray-700"});q({base:"my-1 h-px bg-gray-100 dark:bg-gray-500"});q({base:"px-4 py-3 text-sm text-gray-900 dark:text-white"});q({slots:{base:"block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",active:"block px-4 py-2 text-primary-700 dark:text-primary-600 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white",li:""}});q({base:"py-2 text-sm text-gray-700 dark:text-gray-200"});q({extend:Xw,slots:{base:"p-4 max-h-none max-w-none border border-gray-200 dark:border-gray-700 transform-gpu will-change-transform"},variants:{placement:{left:{base:"me-auto h-full"},right:{base:"ms-auto h-full"},top:{base:"mb-auto !w-full"},bottom:{base:"mt-auto !w-full"}},width:{default:{base:"w-80"},full:{base:"w-full"},half:{base:"w-1/2"}},modal:{false:{base:"fixed inset-0"},true:{base:""}},shifted:{true:{},false:{}}},compoundVariants:[{shifted:!1,modal:!1,class:{base:"z-50"}},{shifted:!0,placement:"left",class:{base:"-translate-x-full"}},{shifted:!0,placement:"right",class:{base:"translate-x-full"}},{shifted:!0,placement:"top",class:{base:"-translate-y-full"}},{shifted:!0,placement:"bottom",class:{base:"translate-y-full"}}],defaultVariants:{placement:"left",width:"default",modal:!0}});q({slots:{base:"flex items-center justify-between",button:"ms-auto inline-flex h-8 w-8 items-center justify-center rounded-lg bg-transparent text-sm text-gray-400 hover:bg-gray-200 hover:text-gray-900 dark:hover:bg-gray-600 dark:hover:text-white",svg:"h-4 w-4"}});q({slots:{base:"p-4 absolute flex select-none cursor-grab active:cursor-grabbing focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-300 dark:focus-visible:ring-gray-500",handle:"absolute rounded-lg bg-gray-300 dark:bg-gray-600"},variants:{placement:{left:{base:"inset-y-0 right-0 touch-pan-x",handle:"w-1 h-8 top-1/2 -translate-y-1/2"},right:{base:"inset-y-0 left-0 touch-pan-x",handle:"w-1 h-8 top-1/2 -translate-y-1/2"},top:{base:"inset-x-0 bottom-0 touch-pan-y",handle:"w-8 h-1 left-1/2 -translate-x-1/2"},bottom:{base:"inset-x-0 top-0 touch-pan-y",handle:"w-8 h-1 left-1/2 -translate-x-1/2"}}}});q({base:"bg-white dark:bg-gray-800",variants:{footerType:{default:"p-4 rounded-lg shadow md:flex md:items-center md:justify-between md:p-6",sitemap:"bg-white dark:bg-gray-900",socialmedia:"p-4 sm:p-6",logo:"p-4 rounded-lg shadow md:px-6 md:py-8",sticky:"fixed bottom-0 left-0 z-20 w-full p-4 bg-white border-t border-gray-200 shadow md:flex md:items-center md:justify-between md:p-6 dark:bg-gray-800 dark:border-gray-600"}}});q({slots:{base:"flex items-center",span:"self-center text-2xl font-semibold whitespace-nowrap dark:text-white",img:"me-3 h-8"}});q({slots:{base:"block text-sm text-gray-500 sm:text-center dark:text-gray-400",link:"hover:underline",bySpan:"ms-1"}});q({base:"text-gray-500 hover:text-gray-900 dark:hover:text-white"});q({base:"text-gray-600 dark:text-gray-400"});q({slots:{base:"me-4 last:me-0 md:me-6",link:"hover:underline"}});q({slots:{image:"h-auto max-w-full rounded-lg",div:"grid"}});q({base:"px-2 py-1.5 text-xs font-semibold text-gray-800 bg-gray-100 border border-gray-200 rounded-lg dark:bg-gray-600 dark:text-gray-100 dark:border-gray-500"});q({base:"flex bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 divide-gray-200 dark:divide-gray-600",variants:{rounded:{true:"rounded-lg",false:""},border:{true:"border border-gray-200 dark:border-gray-700",false:""},horizontal:{true:"flex-row divide-x",false:"flex-col divide-y"}},compoundVariants:[{border:!0,class:"divide-gray-200 dark:divide-gray-700"}],defaultVariants:{rounded:!0,border:!0,horizontal:!1}});q({base:"py-2 px-4 w-full text-sm font-medium list-none flex items-center text-left gap-2",variants:{state:{normal:"",current:"text-white bg-primary-700 dark:text-white dark:bg-gray-800",disabled:"text-gray-900 bg-gray-100 dark:bg-gray-600 dark:text-gray-400"},active:{true:"",false:""},horizontal:{true:"first:rounded-s-lg last:rounded-e-lg",false:"first:rounded-t-lg last:rounded-b-lg"}},compoundVariants:[{active:!0,state:"disabled",class:"cursor-not-allowed"},{active:!0,state:"normal",class:"hover:bg-gray-100 hover:text-primary-700 dark:hover:bg-gray-600 dark:hover:text-white focus:z-40 focus:outline-hidden focus:ring-2 focus:ring-primary-700 focus:text-primary-700 dark:focus:ring-gray-500 dark:focus:text-white"}]});q({slots:{base:"w-fit bg-white shadow-md dark:bg-gray-700 text-gray-700 dark:text-gray-200 rounded-lg border border-gray-100 dark:border-gray-600 divide-gray-100 dark:divide-gray-600",div:"flex flex-col md:flex-row p-4 max-w-(--breakpoint-md) justify-center mx-auto mt-2",ul:"grid grid-flow-row gap-y-4 md:gap-x-0 auto-col-max auto-row-max grid-cols-2 md:grid-cols-3 text-sm font-medium",extra:"md:w-1/3 mt-4 md:mt-0"},variants:{full:{true:{base:"border-y shadow-xs w-full ml-0 rounded-none"}},hasExtra:{true:{}}},compoundVariants:[{full:!0,hasExtra:!0,class:{ul:"grid-cols-2 md:w-2/3"}}]});q({extend:Xw,slots:{base:"w-full rounded-lg divide-y text-gray-500 dark:text-gray-400 border-gray-300 dark:border-gray-700 divide-gray-300 dark:divide-gray-700 bg-white dark:bg-gray-800 pointer-events-auto",form:"rounded-lg divide-y",header:"flex items-center p-4 md:p-5 justify-between rounded-t-lg shrink-0 text-xl font-semibold text-gray-900 dark:text-white",footer:"flex items-center p-4 md:p-5 space-x-3 rtl:space-x-reverse rounded-b-lg shrink-0",body:"p-4 md:p-5 space-y-4 overflow-y-auto overscroll-contain"},variants:{fullscreen:{true:{base:"fixed inset-0 w-screen h-screen max-w-none max-h-none m-0 p-0 border-none rounded-none bg-white dark:bg-gray-900"}},placement:{"top-left":{base:"mb-auto mr-auto"},"top-center":{base:"mb-auto mx-auto"},"top-right":{base:"mb-auto ml-auto"},"center-left":{base:"my-auto mr-auto"},center:{base:"my-auto mx-auto"},"center-right":{base:"my-auto ml-auto"},"bottom-left":{base:"mt-auto mr-auto"},"bottom-center":{base:"mt-auto mx-auto"},"bottom-right":{base:"mt-auto ml-auto"}},size:{none:{base:""},xs:{base:"max-w-md"},sm:{base:"max-w-lg"},md:{base:"max-w-2xl"},lg:{base:"max-w-4xl"},xl:{base:"max-w-7xl"}}},defaultVariants:{placement:"center",size:"md"}});const SL=q({base:"relative w-full px-2 py-2.5 sm:px-4"}),TL=q({base:"flex items-center"}),AL=q({base:"mx-auto flex flex-wrap items-center justify-between ",variants:{fluid:{true:"w-full",false:"container"}}}),kL=q({slots:{base:"",ul:"flex flex-col p-4 mt-0 rtl:space-x-reverse",active:"text-white bg-primary-700 dark:bg-primary-600",nonActive:"hover:text-primary-500 text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},variants:{breakpoint:{sm:{base:"w-full sm:block sm:w-auto",ul:"sm:flex-row sm:text-sm sm:font-medium",active:"sm:bg-transparent sm:text-primary-700 sm:dark:text-white sm:dark:bg-transparent",nonActive:"sm:hover:bg-transparent sm:border-0 sm:hover:text-primary-700 dark:sm:text-gray-400 sm:dark:hover:text-white sm:dark:hover:bg-transparent"},md:{base:"w-full md:block md:w-auto",ul:"md:flex-row md:text-sm md:font-medium",active:"md:bg-transparent md:text-primary-700 md:dark:text-white md:dark:bg-transparent",nonActive:"md:hover:bg-transparent md:border-0 md:hover:text-primary-700 dark:md:text-gray-400 md:dark:hover:text-white md:dark:hover:bg-transparent"},lg:{base:"w-full lg:block lg:w-auto",ul:"lg:flex-row lg:text-sm lg:font-medium",active:"lg:bg-transparent lg:text-primary-700 lg:dark:text-white lg:dark:bg-transparent",nonActive:"lg:hover:bg-transparent lg:border-0 lg:hover:text-primary-700 dark:lg:text-gray-400 lg:dark:hover:text-white lg:dark:hover:bg-transparent"},xl:{base:"w-full xl:block xl:w-auto",ul:"xl:flex-row xl:text-sm xl:font-medium",active:"xl:bg-transparent xl:text-primary-700 xl:dark:text-white xl:dark:bg-transparent",nonActive:"xl:hover:bg-transparent xl:border-0 xl:hover:text-primary-700 dark:xl:text-gray-400 xl:dark:hover:text-white xl:dark:hover:bg-transparent"}},hidden:{false:{base:"absolute top-full left-0 right-0 z-50 w-full",ul:"border rounded-lg bg-white shadow-lg dark:bg-gray-800 dark:border-gray-700 text-gray-700 dark:text-gray-400 border-gray-100 dark:border-gray-700 divide-gray-100 dark:divide-gray-700"},true:{base:"hidden"}}},compoundVariants:[{breakpoint:"sm",hidden:!1,class:{base:"sm:static sm:z-auto",ul:"sm:border-none sm:rounded-none sm:bg-inherit dark:sm:bg-inherit sm:shadow-none"}},{breakpoint:"md",hidden:!1,class:{base:"md:static md:z-auto",ul:"md:border-none md:rounded-none md:bg-inherit dark:md:bg-inherit md:shadow-none"}},{breakpoint:"lg",hidden:!1,class:{base:"lg:static lg:z-auto",ul:"lg:border-none lg:rounded-none lg:bg-inherit dark:lg:bg-inherit lg:shadow-none"}},{breakpoint:"xl",hidden:!1,class:{base:"xl:static xl:z-auto",ul:"xl:border-none xl:rounded-none xl:bg-inherit dark:xl:bg-inherit xl:shadow-none"}}],defaultVariants:{breakpoint:"md"}});q({base:"block py-2 pe-4 ps-3 rounded-sm",variants:{breakpoint:{sm:"sm:p-2 sm:border-0",md:"md:p-2 md:border-0",lg:"lg:p-2 lg:border-0",xl:"xl:p-2 xl:border-0"},hidden:{false:"text-gray-700 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"}},compoundVariants:[{breakpoint:"sm",hidden:!1,class:"sm:hover:bg-transparent sm:hover:text-primary-700 sm:dark:hover:text-white sm:dark:hover:bg-transparent"},{breakpoint:"md",hidden:!1,class:"md:hover:bg-transparent md:hover:text-primary-700 md:dark:hover:text-white md:dark:hover:bg-transparent"},{breakpoint:"lg",hidden:!1,class:"lg:hover:bg-transparent lg:hover:text-primary-700 lg:dark:hover:text-white lg:dark:hover:bg-transparent"},{breakpoint:"xl",hidden:!1,class:"xl:hover:bg-transparent xl:hover:text-primary-700 xl:dark:hover:text-white xl:dark:hover:bg-transparent"}],defaultVariants:{breakpoint:"md"}});q({slots:{base:"ms-3",menu:"h-6 w-6 shrink-0"},variants:{breakpoint:{sm:{base:"sm:hidden"},md:{base:"md:hidden"},lg:{base:"lg:hidden"},xl:{base:"xl:hidden"}}},defaultVariants:{breakpoint:"md"}});var EL=Ht("
");function Cp(r,e){_n(e,!0);let t=rr(e,["$$slots","$$events","$$legacy","children","fluid","class"]);const n=Ji("navbarContainer");var i=EL();fn(i,a=>({...t,class:a}),[()=>AL({fluid:e.fluid,class:Kt(n,e.class)})]);var s=Pt(i);on(s,()=>e.children??zt),Oe(r,i),wn()}var CL=Ht("");function RL(r,e){_n(e,!0);let t=pt(e,"closeOnClickOutside",3,!0),n=pt(e,"breakpoint",3,"md"),i=rr(e,["$$slots","$$events","$$legacy","children","fluid","navContainerClass","class","closeOnClickOutside","breakpoint"]);const s=Ji("navbar");let a=Li({hidden:!0});Bn("navState",a),Bn("breakpoint",n());let o,l=()=>{a.hidden=!a.hidden};function c(f){t()&&!a.hidden&&o&&!o.contains(f.target)&&(a.hidden=!0)}var d=CL();pM("click",dy,c);var u=Pt(d);fn(u,f=>({...i,class:f}),[()=>SL({class:Kt(s,e.class)})]);var h=Pt(u);{let f=Ve(()=>Kt(e.navContainerClass));Cp(h,{get fluid(){return e.fluid},get class(){return z(f)},children:(g,x)=>{var m=Ct(),p=bt(m);on(p,()=>e.children,()=>({hidden:a.hidden,toggle:l,NavContainer:Cp})),Oe(g,m)},$$slots:{default:!0}})}bu(d,f=>o=f,()=>o),Oe(r,d),wn()}var PL=Ht("");function IL(r,e){_n(e,!0);let t=rr(e,["$$slots","$$events","$$legacy","children","class"]);const n=Ji("navbarBrand");var i=PL();fn(i,a=>({...t,class:a}),[()=>TL({class:Kt(n,e.class)})]);var s=Pt(i);on(s,()=>e.children??zt),Oe(r,i),wn()}const DL=new XD("(prefers-reduced-motion: reduce)");var LL=Ht("
"),NL=Ht("
");function UL(r,e){_n(e,!0);let t=rn("navState"),n=rn("breakpoint"),i=pt(e,"transition",3,Fb),s=pt(e,"respectMotionPreference",3,!0),a=rr(e,["$$slots","$$events","$$legacy","children","activeUrl","ulClass","slideParams","transition","transitionParams","activeClass","nonActiveClass","respectMotionPreference","class","classes"]);e.ulClass,e.activeClass,e.nonActiveClass;const o=Ve(()=>e.classes??{ul:e.ulClass,active:e.activeClass,nonActive:e.nonActiveClass}),l=Ji("navbarUl"),c=M=>M===Fb?{delay:0,duration:200,easing:wl}:M===lL?{delay:0,duration:200,y:-10,easing:wl}:M===oL?{delay:0,duration:200,easing:wl}:M===cL?{delay:0,duration:200,start:.95,easing:wl}:{delay:0,duration:200,easing:wl},d=Ve(()=>c(i())),u=Ve(()=>e.transitionParams??e.slideParams??z(d)),h=Ve(()=>()=>s()&&DL.current?{...z(u),duration:0,delay:0}:z(u));let f=Ve(()=>t.hidden??!0),g=Ve(()=>kL({hidden:z(f),breakpoint:n})),x=Ve(()=>z(g).base),m=Ve(()=>z(g).ul),p=Ve(()=>z(g).active),v=Ve(()=>z(g).nonActive);Vi(()=>{t.activeClass=z(p)({class:Kt(l?.active,z(o).active)}),t.nonActiveClass=z(v)({class:Kt(l?.nonActive,z(o).nonActive)}),t.activeUrl=e.activeUrl});let b=Ve(()=>z(x)({class:Kt(l?.base,e.class)})),y=Ve(()=>z(m)({class:Kt(l?.ul,z(o).ul)}));var _=Ct(),w=bt(_);{var T=M=>{var S=LL();fn(S,()=>({...a,class:z(b)}));var E=Pt(S),P=Pt(E);on(P,()=>e.children??zt),dr(()=>wa(E,1,_a(z(y)))),PM(3,S,i,()=>z(h)()),Oe(M,S)},A=M=>{var S=NL();fn(S,()=>({...a,class:z(b)}));var E=Pt(S),P=Pt(E);on(P,()=>e.children??zt),dr(()=>wa(E,1,_a(z(y)))),Oe(M,S)};Ft(w,M=>{z(f)?M(A,!1):M(T)})}Oe(r,_),wn()}q({slots:{base:"inline-flex -space-x-px rtl:space-x-reverse items-center",tableDiv:"flex items-center text-sm mb-4",span:"font-semibold mx-1",prev:"rounded-none",next:"rounded-none",active:""},variants:{size:{default:"",large:""},layout:{table:{prev:"rounded-s bg-gray-800 hover:bg-gray-900 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white text-white hover:text-gray-200",next:"text-white bg-gray-800 border-0 border-s border-gray-700 rounded-e hover:bg-gray-900 hover:text-gray-200 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},navigation:{prev:"rounded-s-lg",next:"rounded-e-lg"},pagination:{prev:"rounded-s-lg",next:"rounded-e-lg"}}},defaultVariants:{table:!1,size:"default"}});q({base:"flex items-center font-medium",variants:{size:{default:"h-8 px-3 text-sm",large:"h-10 px-4 text-base"},active:{true:"text-primary-600 border border-gray-300 bg-primary-50 hover:bg-primary-100 hover:text-primary-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white",false:"text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},group:{true:"",false:"rounded-lg"},table:{true:"rounded-sm",false:"border"},disabled:{true:"cursor-not-allowed opacity-50",false:""}},compoundVariants:[{group:!1,table:!1,class:"rounded-lg"}],defaultVariants:{size:"default",active:!1,group:!1,table:!1}});q({base:"flex items-center font-medium",variants:{size:{default:"h-8 px-3 text-sm",large:"h-10 px-4 text-base"},active:{true:"text-primary-600 border border-gray-300 bg-primary-50 hover:bg-primary-100 hover:text-primary-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white",false:"text-gray-500 bg-white hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"},group:{true:"",false:"rounded-lg"},table:{true:"rounded-sm",false:"border"}},compoundVariants:[{group:!1,table:!1,class:"rounded-lg"}],defaultVariants:{size:"default",active:!1,group:!1,table:!1}});q({base:"inline-flex -space-x-px rtl:space-x-reverse items-center",variants:{table:{true:"divide-x rtl:divide-x-reverse dark divide-gray-700 dark:divide-gray-700",false:""},size:{default:"",large:""}},defaultVariants:{table:!1,size:"default"}});q({slots:{base:"rounded-lg shadow-md bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 border border-gray-200 dark:border-gray-700 divide-gray-200 dark:divide-gray-700",content:"p-2",title:"py-2 px-3 rounded-t-md border-b ",h3:"font-semibold"},variants:{color:{default:{title:"bg-gray-100 border-gray-200 dark:border-gray-600 dark:bg-gray-700",h3:"text-gray-900 dark:text-white"},primary:{title:"bg-primary-700",h3:"text-white"},secondary:{title:"bg-secondary-700",h3:"text-white"},gray:{title:"bg-gray-700",h3:"text-white"},red:{title:"bg-red-700",h3:"text-white"},orange:{title:"bg-orange-700",h3:"text-white"},amber:{title:"bg-amber-700",h3:"text-white"},yellow:{title:"bg-yellow-500",h3:"text-gray-800"},lime:{title:"bg-lime-700",h3:"text-white"},green:{title:"bg-green-700",h3:"text-white"},emerald:{title:"bg-emerald-700",h3:"text-white"},teal:{title:"bg-teal-700",h3:"text-white"},cyan:{title:"bg-cyan-700",h3:"text-white"},sky:{title:"bg-sky-700",h3:"text-white"},blue:{title:"bg-blue-700",h3:"text-white"},indigo:{title:"bg-indigo-700",h3:"text-white"},violet:{title:"bg-violet-700",h3:"text-white"},purple:{title:"bg-purple-700",h3:"text-white"},fuchsia:{title:"bg-fuchsia-700",h3:"text-white"},pink:{title:"bg-pink-700",h3:"text-white"},rose:{title:"bg-rose-700",h3:"text-white"}}}});q({slots:{base:"w-full bg-gray-200 rounded-full dark:bg-gray-700",label:"text-primary-100 text-xs font-medium text-center leading-none rounded-full",inside:"rounded-full",outside:"mb-1 flex justify-between",span:"text-base font-medium dark:text-white",progressCls:"text-sm font-medium dark:text-white"},variants:{color:{primary:{label:"bg-primary-600",inside:"bg-primary-600"},secondary:{label:"bg-secondary-600",inside:"bg-secondary-600"},gray:{label:"bg-gray-600 dark:bg-gray-300",inside:"bg-gray-600 dark:bg-gray-300"},red:{label:"bg-red-600 dark:bg-red-500",inside:"bg-red-600 dark:bg-red-500"},orange:{label:"bg-orange-600 dark:bg-orange-500",inside:"bg-orange-600 dark:bg-orange-500"},amber:{label:"bg-amber-600 dark:bg-amber-500",inside:"bg-amber-600 dark:bg-amber-500"},yellow:{label:"bg-yellow-400",inside:"bg-yellow-400"},lime:{label:"bg-lime-600 dark:bg-lime-500",inside:"bg-lime-600 dark:bg-lime-500"},green:{label:"bg-green-600 dark:bg-green-500",inside:"bg-green-600 dark:bg-green-500"},emerald:{label:"bg-emerald-600 dark:bg-emerald-500",inside:"bg-emerald-600 dark:bg-emerald-500"},teal:{label:"bg-teal-600 dark:bg-teal-500",inside:"bg-teal-600 dark:bg-teal-500"},cyan:{label:"bg-cyan-600 dark:bg-cyan-500",inside:"bg-cyan-600 dark:bg-cyan-500"},sky:{label:"bg-sky-600 dark:bg-sky-500",inside:"bg-sky-600 dark:bg-sky-500"},blue:{label:"bg-blue-600",inside:"bg-blue-600"},indigo:{label:"bg-indigo-600 dark:bg-indigo-500",inside:"bg-indigo-600 dark:bg-indigo-500"},violet:{label:"bg-violet-600 dark:bg-violet-500",inside:"bg-violet-600 dark:bg-violet-500"},purple:{label:"bg-purple-600 dark:bg-purple-500",inside:"bg-purple-600 dark:bg-purple-500"},fuchsia:{label:"bg-fuchsia-600 dark:bg-fuchsia-500",inside:"bg-fuchsia-600 dark:bg-fuchsia-500"},pink:{label:"bg-pink-600 dark:bg-pink-500",inside:"bg-pink-600 dark:bg-pink-500"},rose:{label:"bg-rose-600 dark:bg-rose-500",inside:"bg-rose-600 dark:bg-rose-500"}},labelInside:{true:"",false:""}},compoundVariants:[{labelInside:!0,class:{base:"text-primary-100 text-xs font-medium text-center leading-none rounded-full",label:"p-0.5"}},{labelInside:!1,class:{base:"rounded-full"}}],defaultVariants:{color:"primary",labelInside:!1}});q({slots:{base:"relative inline-flex",label:"absolute inset-0 flex items-center justify-center text-sm font-medium",background:"opacity-25",foreground:"transition-all",outside:"flex flex-col items-center mb-2 text-center",span:"text-base font-medium",progressCls:"text-sm font-medium ml-1"},variants:{color:{primary:{background:"stroke-primary-600",foreground:"stroke-primary-600"},secondary:{background:"stroke-secondary-600",foreground:"stroke-secondary-600"},gray:{background:"stroke-gray-600 dark:stroke-gray-300",foreground:"stroke-gray-600 dark:stroke-gray-300"},red:{background:"stroke-red-600 dark:stroke-red-500",foreground:"stroke-red-600 dark:stroke-red-500"},orange:{background:"stroke-orange-600 dark:stroke-orange-500",foreground:"stroke-orange-600 dark:stroke-orange-500"},amber:{background:"stroke-amber-600 dark:stroke-amber-500",foreground:"stroke-amber-600 dark:stroke-amber-500"},yellow:{background:"stroke-yellow-400",foreground:"stroke-yellow-400"},lime:{background:"stroke-lime-600 dark:stroke-lime-500",foreground:"stroke-lime-600 dark:stroke-lime-500"},green:{background:"stroke-green-600 dark:stroke-green-500",foreground:"stroke-green-600 dark:stroke-green-500"},emerald:{background:"stroke-emerald-600 dark:stroke-emerald-500",foreground:"stroke-emerald-600 dark:stroke-emerald-500"},teal:{background:"stroke-teal-600 dark:stroke-teal-500",foreground:"stroke-teal-600 dark:stroke-teal-500"},cyan:{background:"stroke-cyan-600 dark:stroke-cyan-500",foreground:"stroke-cyan-600 dark:stroke-cyan-500"},sky:{background:"stroke-sky-600 dark:stroke-sky-500",foreground:"stroke-sky-600 dark:stroke-sky-500"},blue:{background:"stroke-blue-600",foreground:"stroke-blue-600"},indigo:{background:"stroke-indigo-600 dark:stroke-indigo-500",foreground:"stroke-indigo-600 dark:stroke-indigo-500"},violet:{background:"stroke-violet-600 dark:stroke-violet-500",foreground:"stroke-violet-600 dark:stroke-violet-500"},purple:{background:"stroke-purple-600 dark:stroke-purple-500",foreground:"stroke-purple-600 dark:stroke-purple-500"},fuchsia:{background:"stroke-fuchsia-600 dark:stroke-fuchsia-500",foreground:"stroke-fuchsia-600 dark:stroke-fuchsia-500"},pink:{background:"stroke-pink-600 dark:stroke-pink-500",foreground:"stroke-pink-600 dark:stroke-pink-500"},rose:{background:"stroke-rose-600 dark:stroke-rose-500",foreground:"stroke-rose-600 dark:stroke-rose-500"}},labelInside:{true:{}}}});q({slots:{base:"flex items-center mt-4",span:"text-sm font-medium text-gray-600 dark:text-gray-500",div2:"mx-4 w-2/4 h-5 bg-gray-200 rounded-sm dark:bg-gray-700",div3:"h-5 bg-yellow-400 rounded-sm",span2:"text-sm font-medium text-gray-600 dark:text-gray-500"}});q({slots:{base:"flex items-center",p:"ms-2 text-sm font-bold text-gray-900 dark:text-white"}});q({slots:{article:"md:grid md:grid-cols-3 md:gap-8",div:"mb-6 flex items-center space-x-4 rtl:space-x-reverse",div2:"space-y-1 font-medium dark:text-white",div3:"flex items-center text-sm text-gray-500 dark:text-gray-400",img:"h-10 w-10 rounded-full",ul:"space-y-4 text-sm text-gray-500 dark:text-gray-400",li:"flex items-center"}});q({slots:{desc1:"bg-primary-100 w-8 text-primary-800 text-sm font-semibold inline-flex items-center p-1.5 rounded-sm dark:bg-primary-200 dark:text-primary-800",desc2:"ms-2 font-medium text-gray-900 dark:text-white",desc3span:"text-sm w-24 font-medium text-gray-500 dark:text-gray-400",desc3p:"text-sm w-24 font-medium text-gray-500 dark:text-gray-400",link:"ms-auto w-32 text-sm font-medium text-primary-600 hover:underline dark:text-primary-500",bar:"bg-primary-600 h-2.5 rounded-sm dark:bg-primary-500"}});q({slots:{base:"top-0 left-0 z-50 w-64 transition-transform bg-gray-50 dark:bg-gray-800",active:"flex items-center group-has-[ul]:ms-6 p-2 text-base font-normal text-gray-900 bg-gray-200 dark:bg-gray-700 rounded-sm dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700",nonactive:"flex items-center group-has-[ul]:ms-6 p-2 text-base font-normal text-gray-900 rounded-sm dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700",div:"overflow-y-auto px-3 py-4 bg-gray-50 dark:bg-gray-800",backdrop:"fixed top-0 start-0 z-40 w-full h-full"},variants:{position:{fixed:{base:"fixed"},absolute:{base:"absolute"},static:{base:"static"}},isOpen:{true:"block",false:"hidden"},breakpoint:{sm:{base:"sm:block"},md:{base:"md:block"},lg:{base:"lg:block"},xl:{base:"xl:block"},"2xl":{base:"2xl:block"}},alwaysOpen:{true:{base:"block"}},backdrop:{true:{backdrop:"bg-gray-900 opacity-75"}}},compoundVariants:[{alwaysOpen:!0,class:{base:"!block"}}]});q({slots:{base:"inline-flex items-center text-sm text-gray-500 rounded-lg hover:bg-gray-100 focus:outline-hidden focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600",svg:"h-6 w-6 m-2"},variants:{breakpoint:{sm:"sm:hidden",md:"md:hidden",lg:"lg:hidden",xl:"xl:hidden","2xl":"2xl:hidden"}}});q({slots:{base:"flex items-center ps-2.5 mb-5",img:"h-6 me-3 sm:h-7",span:"self-center text-xl font-semibold whitespace-nowrap dark:text-white"}});q({slots:{base:"p-4 mt-6 bg-primary-50 rounded-lg dark:bg-primary-900",div:"flex items-center mb-3",span:"bg-primary-100 text-primary-800 text-sm font-semibold me-2 px-2.5 py-0.5 rounded-sm dark:bg-primary-200 dark:text-primary-900"}});q({slots:{base:"group",btn:"flex items-center p-2 w-full text-base font-normal text-gray-900 rounded-sm transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700",span:"flex-1 ms-3 text-left whitespace-nowrap",svg:"h-3 w-3 text-gray-800 dark:text-white",ul:"py-2 space-y-0"}});dn(["click"]);q({slots:{base:"p-4 rounded-sm border border-gray-200 shadow-sm animate-pulse md:p-6 dark:border-gray-700",area:"mb-4 flex h-48 items-center justify-center rounded-sm bg-gray-300 dark:bg-gray-700",icon:"text-gray-200 dark:text-gray-600",line:"rounded-full bg-gray-200 dark:bg-gray-700",footer:"mt-4 flex items-center space-x-3 rtl:space-x-reverse"},variants:{size:{sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"}}}});q({slots:{base:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 rtl:space-x-reverse md:flex md:items-center",image:"flex w-full items-center justify-center rounded-sm bg-gray-300 sm:w-96 dark:bg-gray-700",svg:"text-gray-200",content:"w-full",line:"rounded-full bg-gray-200 dark:bg-gray-700"},variants:{size:{sm:{image:"h-32",content:"space-y-2"},md:{image:"h-48",content:"space-y-3"},lg:{image:"h-64",content:"space-y-4"}},rounded:{none:{image:"rounded-none",line:"rounded-none"},sm:{image:"rounded-xs",line:"rounded-xs"},md:{image:"rounded-sm",line:"rounded-sm"},lg:{image:"rounded-lg",line:"rounded-lg"},full:{image:"rounded-full",line:"rounded-full"}}}});q({slots:{base:"p-4 space-y-4 max-w-md rounded-sm border border-gray-200 divide-y divide-gray-200 shadow-sm animate-pulse dark:divide-gray-700 md:p-6 dark:border-gray-700",item:"flex items-center justify-between",content:"",title:"mb-2.5 h-2.5 w-24 rounded-full bg-gray-300 dark:bg-gray-600",subTitle:"h-2 w-32 rounded-full bg-gray-200 dark:bg-gray-700",extra:"h-2.5 w-12 rounded-full bg-gray-300 dark:bg-gray-700"},variants:{size:{sm:{base:"p-3 space-y-3 max-w-sm md:p-4",title:"mb-2 h-2 w-20",subTitle:"h-1.5 w-28",extra:"h-2 w-10"},md:{},lg:{base:"p-5 space-y-5 max-w-lg md:p-7",title:"mb-3 h-3 w-28",subTitle:"h-2.5 w-36",extra:"h-3 w-14"}},rounded:{none:{base:"rounded-none"},sm:{base:"rounded-xs"},md:{base:"rounded-sm"},lg:{base:"rounded-lg"},full:{base:"rounded-full p-8 md:p-16"}}}});q({slots:{wrapper:"animate-pulse",line:"rounded-full bg-gray-200 dark:bg-gray-700"},variants:{size:{sm:{wrapper:"max-w-sm"},md:{wrapper:"max-w-md"},lg:{wrapper:"max-w-lg"},xl:{wrapper:"max-w-xl"},"2xl":{wrapper:"max-w-2xl"}}}});q({slots:{base:"animate-pulse",lineA:"rounded-full bg-gray-200 dark:bg-gray-700",lineB:"rounded-full bg-gray-300 dark:bg-gray-700",svg:"me-2 h-10 w-10 text-gray-200 dark:text-gray-700",content:"mt-4 flex items-center justify-center"}});q({slots:{base:"space-y-2.5 animate-pulse",div:"flex items-center space-x-2 rtl:space-x-reverse",lineA:"rounded-full bg-gray-200 dark:bg-gray-700",lineB:"rounded-full bg-gray-300 dark:bg-gray-600"},variants:{size:{sm:{base:"max-w-sm"},md:{base:"max-w-md"},lg:{base:"max-w-lg"},xl:{base:"max-w-xl"},"2xl":{base:"max-w-2xl"}}}});q({base:"flex justify-center items-center h-56 bg-gray-300 rounded-lg animate-pulse dark:bg-gray-700",variants:{size:{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl"}}});q({slots:{base:"p-4 max-w-sm rounded-sm border border-gray-200 shadow-sm animate-pulse md:p-6 dark:border-gray-700",wrapper:"mt-4 flex items-baseline space-x-6 rtl:space-x-reverse",hLine:"rounded-full bg-gray-200 dark:bg-gray-700",vLine:"w-full rounded-t-lg bg-gray-200 dark:bg-gray-700"}});q({slots:{base:"group bg-transparent",popper:"flex items-center gap-2 bg-transparent text-inherit"},variants:{vertical:{true:{popper:"flex-col"}}},defaultVariants:{vertical:!1}});q({slots:{base:"w-[52px] h-[52px] shadow-xs p-0",span:"mb-px text-xs font-medium"},variants:{noTooltip:{false:{},true:{}},textOutside:{true:{base:"relative",span:"absolute -start-12 top-1/2 mb-px text-sm font-medium -translate-y-1/2"}}},compoundVariants:[{noTooltip:!0,textOutside:!1,class:{base:"flex flex-col"}}],defaultVariants:{}});q({base:"px-3 py-2 rounded-lg text-sm z-50 pointer-events-none",variants:{type:{light:"bg-white text-gray-800 dark:bg-white dark:text-gray-800 border border-gray-200 dark:border-gray-200",auto:"bg-white text-gray-800 dark:bg-gray-800 dark:text-white border border-gray-200 dark:border-gray-700",dark:"bg-gray-800 text-white dark:bg-gray-800 dark:text-white dark:border dark:border-gray-700",custom:""},color:{primary:"bg-primary-600 dark:bg-primary-600",secondary:"bg-secondary-600 dark:bg-secondary-600",gray:"bg-gray-600 dark:bg-gray-600",red:"bg-red-600 dark:bg-red-600",orange:"bg-orange-600 dark:bg-orange-600",amber:"bg-amber-600 dark:bg-amber-600",yellow:"bg-yellow-400 dark:bg-yellow-400",lime:"bg-lime-600 dark:bg-lime-600",green:"bg-green-600 dark:bg-green-600",emerald:"bg-emerald-600 dark:bg-emerald-600",teal:"bg-teal-600 dark:bg-teal-600",cyan:"bg-cyan-600 dark:bg-cyan-600",sky:"bg-sky-600 dark:bg-sky-600",blue:"bg-blue-600 dark:bg-blue-600",indigo:"bg-indigo-600 dark:bg-indigo-600",violet:"bg-violet-600 dark:bg-violet-600",purple:"bg-purple-600 dark:bg-purple-600",fuchsia:"bg-fuchsia-600 dark:bg-fuchsia-600",pink:"bg-pink-600 dark:bg-pink-600",rose:"bg-rose-800 dark:bg-rose-800"}},compoundVariants:[{color:["primary","secondary","gray","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"],class:"border-0 dark:border-0"}],defaultVariants:{type:"dark",color:void 0}});const FL=q({base:"inline-block",variants:{type:{default:"animate-spin",dots:"inline-flex items-center justify-center",bars:"inline-flex items-center justify-center",pulse:"animate-pulse",orbit:""},color:{primary:"fill-primary-600 text-gray-300",secondary:"fill-secondary-600 text-gray-300",gray:"fill-gray-600 dark:fill-gray-300 text-gray-300",red:"fill-red-600 text-gray-300",orange:"fill-orange-500 text-gray-300",amber:"fill-amber-500 text-gray-300",yellow:"fill-yellow-400 text-gray-300",lime:"fill-lime-500 text-gray-300",green:"fill-green-500 text-gray-300",emerald:"fill-emerald-500 text-gray-300",teal:"fill-teal-500 text-gray-300",cyan:"fill-cyan-500 text-gray-300",sky:"fill-sky-500 text-gray-300",blue:"fill-blue-600 text-gray-300",indigo:"fill-indigo-600 text-gray-300",violet:"fill-violet-600 text-gray-300",purple:"fill-purple-600 text-gray-300",fuchsia:"fill-fuchsia-600 text-gray-300",pink:"fill-pink-600 text-gray-300",rose:"fill-rose-600 text-gray-300"},size:{4:"w-4 h-4",5:"w-5 h-5",6:"w-6 h-6",8:"w-8 h-8",10:"w-10 h-10",12:"w-12 h-12",16:"w-16 h-16"}},defaultVariants:{type:"default",color:"primary",size:"8"}});var OL=Ia(''),BL=Ia(''),zL=Ia(''),VL=Ia(''),GL=Ia('');function HL(r,e){_n(e,!0);let t=pt(e,"type",3,"default"),n=pt(e,"color",3,"primary"),i=pt(e,"size",3,"8"),s=pt(e,"currentFill",3,"inherit"),a=pt(e,"currentColor",3,"currentColor"),o=rr(e,["$$slots","$$events","$$legacy","type","color","size","class","currentFill","currentColor"]);const l=Ji("spinner");let c=Ve(()=>FL({type:t(),color:n(),size:i(),class:Kt(l,e.class)}));var d=Ct(),u=bt(d);{var h=g=>{var x=OL();fn(x,()=>({...o,role:"status",class:z(c),viewBox:"0 0 100 101",fill:"none"}));var m=Pt(x),p=Ut(m);dr(()=>{na(m,"fill",a()),na(p,"fill",s())}),Oe(g,x)},f=g=>{var x=Ct(),m=bt(x);{var p=b=>{var y=BL();fn(y,()=>({...o,role:"status",class:z(c),viewBox:"0 0 120 30",fill:"currentColor"})),Oe(b,y)},v=b=>{var y=Ct(),_=bt(y);{var w=A=>{var M=zL();fn(M,()=>({...o,role:"status",class:z(c),viewBox:"0 0 135 140",fill:"currentColor"})),Oe(A,M)},T=A=>{var M=Ct(),S=bt(M);{var E=N=>{var L=VL();fn(L,()=>({...o,role:"status",class:z(c),viewBox:"0 0 100 100"}));var F=Pt(L),B=Ut(F),G=Ut(B);dr(()=>{na(F,"fill",s()),na(B,"fill",s()),na(G,"fill",s())}),Oe(N,L)},P=N=>{var L=Ct(),F=bt(L);{var B=G=>{var O=GL();fn(O,()=>({...o,role:"status",class:z(c),viewBox:"0 0 100 100",fill:"currentColor"})),Oe(G,O)};Ft(F,G=>{t()==="orbit"&&G(B)},!0)}Oe(N,L)};Ft(S,N=>{t()==="pulse"?N(E):N(P,!1)},!0)}Oe(A,M)};Ft(_,A=>{t()==="bars"?A(w):A(T,!1)},!0)}Oe(b,y)};Ft(m,b=>{t()==="dots"?b(p):b(v,!1)},!0)}Oe(g,x)};Ft(u,g=>{t()==="default"?g(h):g(f,!1)})}Oe(r,d),wn()}q({slots:{base:"space-y-2 dark:text-white",label:"text-base font-semibold",container:"flex w-full justify-between gap-2",wrapper:"relative h-full w-full",step:"h-full w-full rounded-xs",glow:"absolute -inset-1 rounded-xs opacity-30 blur-sm dark:opacity-25",incomplete:"h-full w-full rounded-xs bg-gray-200 dark:bg-gray-700"},variants:{size:{xs:{container:"h-1.5"},sm:{container:"h-2"},md:{container:"h-2.5"},lg:{container:"h-3"},xl:{container:"h-4"}},color:{primary:{step:"data-[state=completed]:bg-primary-500 data-[state=completed]:dark:bg-primary-900 data-[state=current]:bg-primary-800 data-[state=current]:dark:bg-primary-400",glow:"bg-primary-800 dark:bg-primary-400"},secondary:{step:"data-[state=completed]:bg-secondary-500 data-[state=completed]:dark:bg-secondary-900 data-[state=current]:bg-secondary-800 data-[state=current]:dark:bg-secondary-400",glow:"bg-secondary-800 dark:bg-secondary-400"},gray:{step:"data-[state=completed]:bg-gray-400 data-[state=completed]:dark:bg-gray-500 data-[state=current]:bg-gray-700 data-[state=current]:dark:bg-gray-200",glow:"bg-gray-700 dark:bg-gray-200"},red:{step:"data-[state=completed]:bg-red-600 data-[state=completed]:dark:bg-red-900 data-[state=current]:bg-red-900 data-[state=current]:dark:bg-red-500",glow:"bg-red-900 dark:bg-red-500"},yellow:{step:"data-[state=completed]:bg-yellow-400 data-[state=completed]:dark:bg-yellow-600 data-[state=current]:bg-yellow-600 data-[state=current]:dark:bg-yellow-400",glow:"bg-yellow-600 dark:bg-yellow-400"},green:{step:"data-[state=completed]:bg-green-500 data-[state=completed]:dark:bg-green-900 data-[state=current]:bg-green-800 data-[state=current]:dark:bg-green-400",glow:"bg-green-800 dark:bg-green-400"},indigo:{step:"data-[state=completed]:bg-indigo-500 data-[state=completed]:dark:bg-indigo-900 data-[state=current]:bg-indigo-800 data-[state=current]:dark:bg-indigo-400",glow:"bg-indigo-800 dark:bg-indigo-400"},purple:{step:"data-[state=completed]:bg-purple-500 data-[state=completed]:dark:bg-purple-900 data-[state=current]:bg-purple-800 data-[state=current]:dark:bg-purple-400",glow:"bg-purple-800 dark:bg-purple-400"},pink:{step:"data-[state=completed]:bg-pink-500 data-[state=completed]:dark:bg-pink-900 data-[state=current]:bg-pink-800 data-[state=current]:dark:bg-pink-400",glow:"bg-pink-800 dark:bg-pink-400"},blue:{step:"data-[state=completed]:bg-blue-500 data-[state=completed]:dark:bg-blue-900 data-[state=current]:bg-blue-800 data-[state=current]:dark:bg-blue-400",glow:"bg-blue-800 dark:bg-blue-400"},custom:{step:"",glow:""}},glow:{true:{},false:{}},hideLabel:{true:{},false:{}}},compoundVariants:[{glow:!1,class:{glow:"hidden"}},{hideLabel:!0,class:{label:"hidden"}}],defaultVariants:{size:"md",color:"primary",glow:!1,hideLabel:!1}});q({slots:{base:"flex items-center w-full text-sm font-medium text-center text-gray-500 dark:text-gray-400 sm:text-base",item:"flex items-center",content:"flex items-center"},variants:{status:{completed:{item:"text-primary-600 dark:text-primary-500 md:w-full sm:after:content-[''] after:w-full after:h-1 after:border-b after:border-gray-200 after:border-1 after:hidden sm:after:inline-block after:mx-6 xl:after:mx-10 dark:after:border-gray-700",content:"after:content-['/'] sm:after:hidden after:mx-2 after:text-gray-200 dark:after:text-gray-500"},current:{item:"md:w-full sm:after:content-[''] after:w-full after:h-1 after:border-b after:border-gray-200 after:border-1 after:hidden sm:after:inline-block after:mx-6 xl:after:mx-10 dark:after:border-gray-700",content:"after:content-['/'] sm:after:hidden after:mx-2 after:text-gray-200 dark:after:text-gray-500"},pending:{item:"md:w-full sm:after:content-[''] after:w-full after:h-1 after:border-b after:border-gray-200 after:border-1 after:hidden sm:after:inline-block after:mx-6 xl:after:mx-10 dark:after:border-gray-700",content:"after:content-['/'] sm:after:hidden after:mx-2 after:text-gray-200 dark:after:text-gray-500"}},isLast:{true:{item:"after:content-none after:hidden",content:"after:content-none"},false:{}}},defaultVariants:{status:"pending",isLast:!1}});q({slots:{base:"flex items-center w-full",item:"flex items-center w-full",circle:"flex items-center justify-center w-10 h-10 rounded-full lg:h-12 lg:w-12 shrink-0"},variants:{status:{completed:{item:"text-primary-600 dark:text-primary-500 after:content-[''] after:w-full after:h-1 after:border-b after:border-primary-100 after:border-4 after:inline-block dark:after:border-primary-800",circle:"bg-primary-100 dark:bg-primary-800"},current:{item:"after:content-[''] after:w-full after:h-1 after:border-b after:border-gray-100 after:border-4 after:inline-block dark:after:border-gray-700",circle:"bg-gray-100 dark:bg-gray-700"},pending:{item:"after:content-[''] after:w-full after:h-1 after:border-b after:border-gray-100 after:border-4 after:inline-block dark:after:border-gray-700",circle:"bg-gray-100 dark:bg-gray-700"}},isLast:{true:{item:"after:content-none"},false:{}}},defaultVariants:{status:"pending",isLast:!1}});q({slots:{base:"items-center w-full space-y-4 sm:flex sm:space-x-8 sm:space-y-0 rtl:space-x-reverse",item:"flex items-center space-x-2.5 rtl:space-x-reverse",indicator:"flex items-center justify-center w-8 h-8 rounded-full shrink-0"},variants:{status:{completed:{item:"text-primary-600 dark:text-primary-500",indicator:"border border-primary-600 dark:border-primary-500 bg-primary-600 dark:bg-primary-500 text-white"},current:{item:"text-gray-500 dark:text-gray-400",indicator:"border border-gray-500 dark:border-gray-400 text-gray-500 dark:text-gray-400"},pending:{item:"text-gray-500 dark:text-gray-400",indicator:"border border-gray-500 dark:border-gray-400 text-gray-500 dark:text-gray-400"}}},defaultVariants:{status:"pending"}});q({slots:{base:"space-y-4 w-72",card:"w-full p-4 border rounded-lg",content:"flex items-center justify-between"},variants:{status:{completed:{card:"text-green-700 border-green-300 bg-green-50 dark:bg-gray-800 dark:border-green-800 dark:text-green-400"},current:{card:"text-primary-700 bg-primary-100 border-primary-300 dark:bg-gray-800 dark:border-primary-800 dark:text-primary-400"},pending:{card:"text-gray-900 bg-gray-100 border-gray-300 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400"}}},defaultVariants:{status:"pending"}});q({slots:{base:"flex items-center w-full p-3 space-x-2 text-sm font-medium text-center text-gray-500 bg-white border border-gray-200 rounded-lg shadow-xs dark:text-gray-400 sm:text-base dark:bg-gray-800 dark:border-gray-700 sm:p-4 sm:space-x-4 rtl:space-x-reverse",item:"flex items-center",indicator:"flex items-center justify-center w-5 h-5 me-2 text-xs rounded-full shrink-0"},variants:{status:{completed:{item:"text-primary-600 dark:text-primary-500",indicator:"border border-primary-600 dark:border-primary-500 bg-primary-600 dark:bg-primary-500 text-white"},current:{item:"text-gray-500 dark:text-gray-400",indicator:"border border-gray-500 dark:border-gray-400 text-gray-500 dark:text-gray-400"},pending:{item:"text-gray-500 dark:text-gray-400",indicator:"border border-gray-500 dark:border-gray-400 text-gray-500 dark:text-gray-400"}},hasChevron:{true:{},false:{}}},defaultVariants:{status:"pending",hasChevron:!1}});q({slots:{base:"relative text-gray-500 border-s border-gray-200 dark:border-gray-700 dark:text-gray-400",item:"ms-6",circle:"absolute flex items-center justify-center w-8 h-8 rounded-full -start-4 ring-4 ring-white dark:ring-gray-900"},variants:{status:{completed:{circle:"bg-green-200 dark:bg-green-900"},current:{circle:"bg-gray-100 dark:bg-gray-700"},pending:{circle:"bg-gray-100 dark:bg-gray-700"}},isLast:{true:{},false:{item:"mb-10"}}},defaultVariants:{status:"pending",isLast:!1}});q({slots:{base:"flex space-x-2 rtl:space-x-reverse",content:"p-4 bg-gray-50 rounded-lg dark:bg-gray-800 mt-4",divider:"h-px bg-gray-200 dark:bg-gray-700",active:"p-4 text-primary-600 bg-gray-100 rounded-t-lg dark:bg-gray-800 dark:text-primary-500",inactive:"p-4 text-gray-500 rounded-t-lg hover:text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300"},variants:{tabStyle:{full:{active:"p-4 w-full rounded-none group-first:rounded-s-lg group-last:rounded-e-lg text-gray-900 bg-gray-100 focus:ring-4 focus:ring-primary-300 focus:outline-hidden dark:bg-gray-700 dark:text-white",inactive:"p-4 w-full rounded-none group-first:rounded-s-lg group-last:rounded-e-lg text-gray-500 dark:text-gray-400 bg-white hover:text-gray-700 hover:bg-gray-50 focus:ring-4 focus:ring-primary-300 focus:outline-hidden dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700"},pill:{active:"py-3 px-4 text-white bg-primary-600 rounded-lg",inactive:"py-3 px-4 text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white"},underline:{base:"-mb-px",active:"p-4 text-primary-600 border-b-2 border-primary-600 dark:text-primary-500 dark:border-primary-500 bg-transparent",inactive:"p-4 border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:hover:text-gray-300 text-gray-500 dark:text-gray-400 bg-transparent"},none:{active:"",inactive:""}},hasDivider:{true:{}}},compoundVariants:[{tabStyle:["full","pill"],hasDivider:!0,class:{divider:"hidden"}}],defaultVariants:{tabStyle:"none",hasDivider:!0}});q({slots:{base:"group focus-within:z-10",button:"inline-block text-sm font-medium text-center disabled:cursor-not-allowed"},variants:{open:{true:{button:"active"}},disabled:{true:{button:"cursor-not-allowed"}}},compoundVariants:[{open:!0,class:{button:""}},{open:!1,class:{button:""}}],defaultVariants:{open:!1,disabled:!1}});dn(["click"]);q({slots:{div:"relative overflow-x-auto",table:"w-full text-left text-sm"},variants:{color:{default:{table:"text-gray-500 dark:text-gray-400"},primary:{table:"text-primary-100 dark:text-primary-100"},secondary:{table:"text-secondary-100 dark:text-secondary-100"},gray:{table:"text-gray-100 dark:text-gray-100"},red:{table:"text-red-100 dark:text-red-100"},orange:{table:"text-orange-100 dark:text-orange-100"},amber:{table:"text-amber-100 dark:text-amber-100"},yellow:{table:"text-yellow-100 dark:text-yellow-100"},lime:{table:"text-lime-100 dark:text-lime-100"},green:{table:"text-green-100 dark:text-green-100"},emerald:{table:"text-emerald-100 dark:text-emerald-100"},teal:{table:"text-teal-100 dark:text-teal-100"},cyan:{table:"text-cyan-100 dark:text-cyan-100"},sky:{table:"text-sky-100 dark:text-sky-100"},blue:{table:"text-blue-100 dark:text-blue-100"},indigo:{table:"text-indigo-100 dark:text-indigo-100"},violet:{table:"text-violet-100 dark:text-violet-100"},purple:{table:"text-purple-100 dark:text-purple-100"},fuchsia:{table:"text-fuchsia-100 dark:text-fuchsia-100"},pink:{table:"text-pink-100 dark:text-pink-100"},rose:{table:"text-rose-100 dark:text-rose-100"}},shadow:{true:{div:"shadow-md sm:rounded-lg"}}}});q({base:"",variants:{color:{default:"bg-white dark:bg-gray-800 dark:border-gray-700",primary:"bg-white bg-primary-500 border-primary-400",secondary:"bg-white bg-secondary-500 border-secondary-400",gray:"bg-gray-500 border-gray-400",red:"bg-red-500 border-red-400",orange:"bg-orange-500 border-orange-400",amber:"bg-amber-500 border-amber-400",yellow:"bg-yellow-500 border-yellow-400",lime:"bg-lime-500 border-lime-400",green:"bg-white bg-green-500 border-green-400",emerald:"bg-emerald-500 border-emerald-400",teal:"bg-teal-500 border-teal-400",cyan:"bg-cyan-500 border-cyan-400",sky:"bg-sky-500 border-sky-400",blue:"bg-white bg-blue-500 border-blue-400",indigo:"bg-indigo-500 border-indigo-400",violet:"bg-violet-500 border-violet-400",purple:"bg-purple-500 border-purple-400",fuchsia:"bg-fuchsia-500 border-fuchsia-400",pink:"bg-pink-500 border-pink-400",rose:"bg-rose-500 border-rose-400"},hoverable:{true:""},striped:{true:""},border:{true:"border-b last:border-b-0"}},compoundVariants:[{hoverable:!0,color:"default",class:"hover:bg-gray-50 dark:hover:bg-gray-600"},{hoverable:!0,color:"primary",class:"hover:bg-primary-400 dark:hover:bg-primary-400"},{hoverable:!0,color:"secondary",class:"hover:bg-secondary-400 dark:hover:bg-secondary-400"},{hoverable:!0,color:"gray",class:"hover:bg-gray-400 dark:hover:bg-gray-400"},{hoverable:!0,color:"red",class:"hover:bg-red-400 dark:hover:bg-red-400"},{hoverable:!0,color:"orange",class:"hover:bg-orange-400 dark:hover:bg-orange-400"},{hoverable:!0,color:"amber",class:"hover:bg-amber-400 dark:hover:bg-amber-400"},{hoverable:!0,color:"yellow",class:"hover:bg-yellow-400 dark:hover:bg-yellow-400"},{hoverable:!0,color:"lime",class:"hover:bg-lime-400 dark:hover:bg-lime-400"},{hoverable:!0,color:"green",class:"hover:bg-green-400 dark:hover:bg-green-400"},{hoverable:!0,color:"emerald",class:"hover:bg-emerald-400 dark:hover:bg-emerald-400"},{hoverable:!0,color:"teal",class:"hover:bg-teal-400 dark:hover:bg-teal-400"},{hoverable:!0,color:"cyan",class:"hover:bg-cyan-400 dark:hover:bg-cyan-400"},{hoverable:!0,color:"sky",class:"hover:bg-sky-400 dark:hover:bg-sky-400"},{hoverable:!0,color:"blue",class:"hover:bg-blue-400 dark:hover:bg-blue-400"},{hoverable:!0,color:"indigo",class:"hover:bg-indigo-400 dark:hover:bg-indigo-400"},{hoverable:!0,color:"violet",class:"hover:bg-violet-400 dark:hover:bg-violet-400"},{hoverable:!0,color:"purple",class:"hover:bg-purple-400 dark:hover:bg-purple-400"},{hoverable:!0,color:"fuchsia",class:"hover:bg-fuchsia-400 dark:hover:bg-fuchsia-400"},{hoverable:!0,color:"pink",class:"hover:bg-pink-400 dark:hover:bg-pink-400"},{hoverable:!0,color:"rose",class:"hover:bg-rose-400 dark:hover:bg-rose-400"},{striped:!0,color:"default",class:"odd:bg-white even:bg-gray-50 dark:odd:bg-gray-800 dark:even:bg-gray-700"},{striped:!0,color:"primary",class:"odd:bg-primary-500 even:bg-primary-600 dark:odd:bg-primary-500 dark:even:bg-primary-600"},{striped:!0,color:"secondary",class:"odd:bg-secondary-500 even:bg-secondary-600 dark:odd:bg-secondary-500 dark:even:bg-secondary-600"},{striped:!0,color:"gray",class:"odd:bg-gray-500 even:bg-gray-600 dark:odd:bg-gray-500 dark:even:bg-gray-600"},{striped:!0,color:"red",class:"odd:bg-red-500 even:bg-red-600 dark:odd:bg-red-500 dark:even:bg-red-600"},{striped:!0,color:"orange",class:"odd:bg-orange-500 even:bg-orange-600 dark:odd:bg-orange-500 dark:even:bg-orange-600"},{striped:!0,color:"amber",class:"odd:bg-amber-500 even:bg-amber-600 dark:odd:bg-amber-500 dark:even:bg-amber-600"},{striped:!0,color:"yellow",class:"odd:bg-yellow-500 even:bg-yellow-600 dark:odd:bg-yellow-500 dark:even:bg-yellow-600"},{striped:!0,color:"lime",class:"odd:bg-lime-500 even:bg-lime-600 dark:odd:bg-lime-500 dark:even:bg-lime-600"},{striped:!0,color:"green",class:"odd:bg-green-500 even:bg-green-600 dark:odd:bg-green-500 dark:even:bg-green-600"},{striped:!0,color:"emerald",class:"odd:bg-emerald-500 even:bg-emerald-600 dark:odd:bg-emerald-500 dark:even:bg-emerald-600"},{striped:!0,color:"teal",class:"odd:bg-teal-500 even:bg-teal-600 dark:odd:bg-teal-500 dark:even:bg-teal-600"},{striped:!0,color:"cyan",class:"odd:bg-cyan-500 even:bg-cyan-600 dark:odd:bg-cyan-500 dark:even:bg-cyan-600"},{striped:!0,color:"sky",class:"odd:bg-sky-500 even:bg-sky-600 dark:odd:bg-sky-500 dark:even:bg-sky-600"},{striped:!0,color:"blue",class:"odd:bg-blue-500 even:bg-blue-600 dark:odd:bg-blue-500 dark:even:bg-blue-600"},{striped:!0,color:"indigo",class:"odd:bg-indigo-500 even:bg-indigo-600 dark:odd:bg-indigo-500 dark:even:bg-indigo-600"},{striped:!0,color:"violet",class:"odd:bg-violet-500 even:bg-violet-600 dark:odd:bg-violet-500 dark:even:bg-violet-600"},{striped:!0,color:"purple",class:"odd:bg-purple-500 even:bg-purple-600 dark:odd:bg-purple-500 dark:even:bg-purple-600"},{striped:!0,color:"fuchsia",class:"odd:bg-fuchsia-500 even:bg-fuchsia-600 dark:odd:bg-fuchsia-500 dark:even:bg-fuchsia-600"},{striped:!0,color:"pink",class:"odd:bg-pink-500 even:bg-pink-600 dark:odd:bg-pink-500 dark:even:bg-pink-600"},{striped:!0,color:"rose",class:"odd:bg-rose-500 even:bg-rose-600 dark:odd:bg-rose-500 dark:even:bg-rose-600"}]});q({base:"text-xs uppercase",variants:{color:{default:"text-gray-700 dark:text-gray-400 bg-gray-50 dark:bg-gray-700",primary:"text-white dark:text-white bg-primary-700 dark:bg-primary-700",secondary:"text-white dark:text-white bg-secondary-700 dark:bg-secondary-700",gray:"text-white dark:text-white bg-gray-700 dark:bg-gray-700",red:"text-white dark:text-white bg-red-700 dark:bg-red-700",orange:"text-white dark:text-white bg-orange-700 dark:bg-orange-700",amber:"text-white dark:text-white bg-amber-700 dark:bg-amber-700",yellow:"text-white dark:text-white bg-yellow-700 dark:bg-yellow-700",lime:"text-white dark:text-white bg-lime-700 dark:bg-lime-700",green:"text-white dark:text-white bg-green-700 dark:bg-green-700",emerald:"text-white dark:text-white bg-emerald-700 dark:bg-emerald-700",teal:"text-white dark:text-white bg-teal-700 dark:bg-teal-700",cyan:"text-white dark:text-white bg-cyan-700 dark:bg-cyan-700",sky:"text-white dark:text-white bg-sky-700 dark:bg-sky-700",blue:"text-white dark:text-white bg-blue-700 dark:bg-blue-700",indigo:"text-white dark:text-white bg-indigo-700 dark:bg-indigo-700",violet:"text-white dark:text-white bg-violet-700 dark:bg-violet-700",purple:"text-white dark:text-white bg-purple-700 dark:bg-purple-700",fuchsia:"text-white dark:text-white bg-fuchsia-700 dark:bg-fuchsia-700",pink:"text-white dark:text-white bg-pink-700 dark:bg-pink-700",rose:"text-white dark:text-white bg-rose-700 dark:bg-rose-700"},border:{true:"",false:""},striped:{true:"",false:""}},compoundVariants:[{color:"default",border:!0,class:""},{color:"default",striped:!0,class:""},{striped:!0,color:"blue",class:"border-blue-400"},{striped:!0,color:"green",class:"border-green-400"},{striped:!0,color:"red",class:"border-red-400"},{striped:!0,color:"yellow",class:"border-yellow-400"},{striped:!0,color:"purple",class:"border-purple-400"},{striped:!0,color:"indigo",class:"border-indigo-400"},{striped:!0,color:"pink",class:"border-pink-400"}]});q({base:"px-6 py-4 whitespace-nowrap font-medium"});q({base:"px-6 py-3"});q({slots:{root:"relative overflow-x-auto shadow-md sm:rounded-lg",inner:"p-4",search:"relative mt-1",svgDiv:"absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none",svg:"w-5 h-5",input:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-80 p-2.5 ps-10 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",table:"w-full text-left text-sm"},variants:{color:{default:{svg:"text-gray-500 dark:text-gray-400",table:"text-gray-500 dark:text-gray-400"},blue:{svg:"text-blue-500 dark:text-blue-400",table:"text-blue-100 dark:text-blue-100"},green:{svg:"text-green-500 dark:text-green-400",table:"text-green-100 dark:text-green-100"},red:{svg:"text-red-500 dark:text-red-400",table:"text-red-100 dark:text-red-100"},yellow:{svg:"text-yellow-500 dark:text-yellow-400",table:"text-yellow-100 dark:text-yellow-100"},purple:{svg:"text-purple-500 dark:text-purple-400",table:"text-purple-100 dark:text-purple-100"},indigo:{svg:"text-indigo-500 dark:text-indigo-400",table:"text-indigo-100 dark:text-indigo-100"},pink:{svg:"text-pink-500 dark:text-pink-400",table:"text-pink-100 dark:text-pink-100"}},striped:{true:{table:"[&_tbody_tr:nth-child(odd)]:bg-white [&_tbody_tr:nth-child(odd)]:dark:bg-gray-900 [&_tbody_tr:nth-child(even)]:bg-gray-50 [&_tbody_tr:nth-child(even)]:dark:bg-gray-800"},false:{}},hoverable:{true:{table:"[&_tbody_tr]:hover:bg-gray-50 [&_tbody_tr]:dark:hover:bg-gray-600"},false:{}}},defaultVariants:{color:"default",striped:!1,hoverable:!1}});dn(["click"]);q({base:"relative border-s border-gray-200 dark:border-gray-700"});q({slots:{li:"mb-10 ms-6",span:"flex absolute -start-3 justify-center items-center w-6 h-6 bg-blue-200 rounded-full ring-8 ring-white dark:ring-gray-900 dark:bg-blue-900",img:"rounded-full shadow-lg",outer:"p-4 bg-white rounded-lg border border-gray-200 shadow-xs dark:bg-gray-700 dark:border-gray-600",inner:"justify-between items-center mb-3 sm:flex",time:"mb-1 text-xs font-normal text-gray-400 sm:order-last sm:mb-0",title:"text-sm font-normal text-gray-500 lex dark:text-gray-300",text:"p-3 text-xs italic font-normal text-gray-500 bg-gray-50 rounded-lg border border-gray-200 dark:bg-gray-600 dark:border-gray-500 dark:text-gray-300"}});q({slots:{div:"p-5 mb-4 bg-gray-50 rounded-lg border border-gray-100 dark:bg-gray-800 dark:border-gray-700",time:"text-lg font-semibold text-gray-900 dark:text-white",ol:"mt-3 divide-y divider-gray-200 dark:divide-gray-700"}});q({slots:{base:"",a:"block items-center p-3 sm:flex hover:bg-gray-100 dark:hover:bg-gray-700",img:"me-3 mb-3 w-12 h-12 rounded-full sm:mb-0",div:"text-gray-600 dark:text-gray-400",title:"text-base font-normal",span:"inline-flex items-center text-xs font-normal text-gray-500 dark:text-gray-400",svg:"me-1 h-3 w-3"}});const lt={primary:{dot:"bg-primary-200 dark:bg-primary-900",ring:"ring-white dark:ring-gray-900",icon:"text-primary-600 dark:text-primary-400"},green:{dot:"bg-green-200 dark:bg-green-900",ring:"ring-white dark:ring-gray-900",icon:"text-green-600 dark:text-green-400"},orange:{dot:"bg-orange-200 dark:bg-orange-900",ring:"ring-white dark:ring-gray-900",icon:"text-orange-600 dark:text-orange-400"},red:{dot:"bg-red-200 dark:bg-red-900",ring:"ring-white dark:ring-gray-900",icon:"text-red-600 dark:text-red-400"},blue:{dot:"bg-blue-200 dark:bg-blue-900",ring:"ring-white dark:ring-gray-900",icon:"text-blue-600 dark:text-blue-400"},purple:{dot:"bg-purple-200 dark:bg-purple-900",ring:"ring-white dark:ring-gray-900",icon:"text-purple-600 dark:text-purple-400"},gray:{dot:"bg-gray-200 dark:bg-gray-700",ring:"ring-white dark:ring-gray-900",icon:"text-gray-600 dark:text-gray-400"}};q({variants:{order:{group:"p-5 mb-4 bg-gray-50 rounded-lg border border-gray-100 dark:bg-gray-800 dark:border-gray-700",horizontal:"sm:flex",activity:"relative",vertical:"relative",default:"relative border-s border-gray-200 dark:border-gray-700"}},defaultVariants:{order:"default"}});q({slots:{base:"relative",div:"",time:"",h3:"",svg:"w-4 h-4",connector:"absolute top-6 left-3 w-px h-full"},variants:{order:{default:{base:"mb-10 ms-4",div:"absolute w-3 h-3 bg-gray-200 rounded-full mt-1.5 -left-1.5 border border-white dark:border-gray-900 dark:bg-gray-700",time:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500",h3:"text-lg font-semibold text-gray-900 dark:text-white"},vertical:{base:"mb-10 ms-6 relative",div:"flex absolute -left-4 top-1.5 justify-center items-center w-6 h-6 rounded-full ring-8",time:"mb-1 pl-4 text-sm font-normal leading-none text-gray-400 dark:text-gray-500",h3:"flex ml-4 items-center mb-1 text-lg font-semibold text-gray-900 dark:text-white",connector:"absolute top-7 -left-1.5 w-px h-full"},horizontal:{base:"relative mb-6 sm:mb-0",div:"flex items-center",time:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500",h3:"text-lg font-semibold text-gray-900 dark:text-white"},activity:{base:"mb-10 ms-6 relative",div:"flex absolute -left-4 top-1.5 justify-center items-center w-6 h-6 rounded-full ring-8",time:"mb-1 text-sm font-normal leading-none text-gray-400 dark:text-gray-500",h3:"text-lg font-semibold text-gray-900 dark:text-white",connector:"absolute top-7 -left-4 w-px h-full"},group:{base:"",div:"p-5 mb-4 bg-gray-50 rounded-lg border border-gray-100 dark:bg-gray-800 dark:border-gray-700",time:"text-lg font-semibold text-gray-900 dark:text-white",h3:"text-lg font-semibold text-gray-900 dark:text-white"}},color:{primary:{},green:{},orange:{},red:{},blue:{},purple:{},gray:{}},isLast:{true:{},false:{}}},compoundVariants:[{order:"vertical",color:"primary",class:{div:lt.primary.dot+" "+lt.primary.ring,svg:lt.primary.icon,connector:"bg-primary-200 dark:bg-primary-700"}},{order:"vertical",color:"green",class:{div:lt.green.dot+" "+lt.green.ring,svg:lt.green.icon,connector:"bg-green-200 dark:bg-green-700"}},{order:"vertical",color:"orange",class:{div:lt.orange.dot+" "+lt.orange.ring,svg:lt.orange.icon,connector:"bg-orange-200 dark:bg-orange-700"}},{order:"vertical",color:"red",class:{div:lt.red.dot+" "+lt.red.ring,svg:lt.red.icon,connector:"bg-red-200 dark:bg-red-700"}},{order:"vertical",color:"blue",class:{div:lt.blue.dot+" "+lt.blue.ring,svg:lt.blue.icon,connector:"bg-blue-200 dark:bg-blue-700"}},{order:"vertical",color:"purple",class:{div:lt.purple.dot+" "+lt.purple.ring,svg:lt.purple.icon,connector:"bg-purple-200 dark:bg-purple-700"}},{order:"vertical",color:"gray",class:{div:lt.gray.dot+" "+lt.gray.ring,svg:lt.gray.icon,connector:"bg-gray-200 dark:bg-gray-700"}},{order:"horizontal",color:"primary",class:{div:lt.primary.dot+" "+lt.primary.ring,svg:lt.primary.icon}},{order:"horizontal",color:"green",class:{div:lt.green.dot+" "+lt.green.ring,svg:lt.green.icon}},{order:"horizontal",color:"orange",class:{div:lt.orange.dot+" "+lt.orange.ring,svg:lt.orange.icon}},{order:"horizontal",color:"red",class:{div:lt.red.dot+" "+lt.red.ring,svg:lt.red.icon}},{order:"horizontal",color:"blue",class:{div:lt.blue.dot+" "+lt.blue.ring,svg:lt.blue.icon}},{order:"horizontal",color:"purple",class:{div:lt.purple.dot+" "+lt.purple.ring,svg:lt.purple.icon}},{order:"horizontal",color:"gray",class:{div:lt.gray.dot+" "+lt.gray.ring,svg:lt.gray.icon}},{isLast:!0,class:{connector:"hidden"}}],defaultVariants:{order:"default",color:"primary",isLast:!1}});q({slots:{base:"flex w-full max-w-xs p-4 text-gray-500 bg-white rounded-lg shadow-sm dark:text-gray-400 dark:bg-gray-800 gap-3",icon:"w-8 h-8 inline-flex items-center justify-center shrink-0 rounded-lg",content:"w-full text-sm font-normal",close:"ms-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex items-center justify-center h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700"},variants:{position:{"top-left":{base:"absolute top-5 start-5"},"top-right":{base:"absolute top-5 end-5"},"bottom-left":{base:"absolute bottom-5 start-5"},"bottom-right":{base:"absolute bottom-5 end-5"}},color:{primary:{icon:"text-primary-500 bg-primary-100 dark:bg-primary-800 dark:text-primary-200",close:"text-primary-500 dark:text-primary-200 hover:text-primary-600 dark:hover:text-primary-500"},gray:{icon:"text-gray-500 bg-gray-100 dark:bg-gray-700 dark:text-gray-200",close:"text-gray-500 dark:text-gray-200 hover:text-gray-600 dark:hover:text-gray-500"},red:{icon:"text-red-500 bg-red-100 dark:bg-red-800 dark:text-red-200",close:"text-red-500 dark:text-red-200 hover:text-red-600 dark:hover:text-red-500"},orange:{icon:"text-orange-500 bg-orange-100 dark:bg-orange-700 dark:text-orange-200",close:"text-orange-500 dark:text-orange-200 hover:text-orange-600 dark:hover:text-orange-500"},amber:{icon:"text-amber-500 bg-amber-100 dark:bg-amber-700 dark:text-amber-200",close:"text-amber-500 dark:text-amber-200 hover:text-amber-600 dark:hover:text-amber-500"},yellow:{icon:"text-yellow-500 bg-yellow-100 dark:bg-yellow-800 dark:text-yellow-200",close:"text-yellow-500 dark:text-yellow-200 hover:text-yellow-600 dark:hover:text-yellow-500"},lime:{icon:"text-lime-500 bg-lime-100 dark:bg-lime-700 dark:text-lime-200",close:"text-lime-500 dark:text-lime-200 hover:text-lime-600 dark:hover:text-lime-500"},green:{icon:"text-green-500 bg-green-100 dark:bg-green-800 dark:text-green-200",close:"text-green-500 dark:text-green-200 hover:text-green-600 dark:hover:text-green-500"},emerald:{icon:"text-emerald-500 bg-emerald-100 dark:bg-emerald-800 dark:text-emerald-200",close:"text-emerald-500 dark:text-emerald-200 hover:text-emerald-600 dark:hover:text-emerald-500"},teal:{icon:"text-teal-500 bg-teal-100 dark:bg-teal-800 dark:text-teal-200",close:"text-teal-500 dark:text-teal-200 hover:text-teal-600 dark:hover:text-teal-500"},cyan:{icon:"text-cyan-500 bg-cyan-100 dark:bg-cyan-800 dark:text-cyan-200",close:"text-cyan-500 dark:text-cyan-200 hover:text-cyan-600 dark:hover:text-cyan-500"},sky:{icon:"text-sky-500 bg-sky-100 dark:bg-sky-800 dark:text-sky-200",close:"text-sky-500 dark:text-sky-200 hover:text-sky-600 dark:hover:text-sky-500"},blue:{icon:"text-blue-500 bg-blue-100 dark:bg-blue-800 dark:text-blue-200",close:"text-blue-500 dark:text-blue-200 hover:text-blue-600 dark:hover:text-blue-500"},indigo:{icon:"text-indigo-500 bg-indigo-100 dark:bg-indigo-800 dark:text-indigo-200",close:"text-indigo-500 dark:text-indigo-200 hover:text-indigo-600 dark:hover:text-indigo-500"},violet:{icon:"text-violet-500 bg-violet-100 dark:bg-violet-800 dark:text-violet-200",close:"text-violet-500 dark:text-violet-200 hover:text-violet-600 dark:hover:text-violet-500"},purple:{icon:"text-purple-500 bg-purple-100 dark:bg-purple-800 dark:text-purple-200",close:"text-purple-500 dark:text-purple-200 hover:text-purple-600 dark:hover:text-purple-500"},fuchsia:{icon:"text-fuchsia-500 bg-fuchsia-100 dark:bg-fuchsia-800 dark:text-fuchsia-200",close:"text-fuchsia-500 dark:text-fuchsia-200 hover:text-fuchsia-600 dark:hover:text-fuchsia-500"},pink:{icon:"text-pink-500 bg-pink-100 dark:bg-pink-700 dark:text-pink-200",close:"text-pink-500 dark:text-pink-200 hover:text-pink-600 dark:hover:text-pink-500"},rose:{icon:"text-rose-500 bg-rose-100 dark:bg-rose-700 dark:text-rose-200",close:"text-rose-500 dark:text-rose-200 hover:text-rose-600 dark:hover:text-rose-500"}},align:{true:{base:"items-center"},false:{base:"items-start"}}}});q({base:"fixed z-50 space-y-3"});q({base:"inline-flex border border-gray-300 overflow-hidden",variants:{roundedSize:{sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}}});q({slots:{button:"relative flex items-center transition-all duration-200 focus:outline-none border-r last:border-r-0 dark:bg-white dark:text-gray-800 disabled:cursor-not-allowed disabled:opacity-50",content:"flex items-center w-full overflow-hidden relative",text:"transition-all duration-200 ml-0",icon:"absolute left-0 flex-shrink-0 text-green-600"},variants:{selected:{true:{text:"ml-5"},false:{}},size:{sm:{button:"p-1 px-2 text-sm"},md:{button:"p-2 px-4 text-base"},lg:{button:"p-3 px-5 text-lg"},xl:{button:"p-4 px-6 text-xl"}},roundedSize:{sm:{button:"first:rounded-s-sm last:rounded-e-sm"},md:{button:"first:rounded-s-md last:rounded-e-md"},lg:{button:"first:rounded-s-lg last:rounded-e-lg"},xl:{button:"first:rounded-s-xl last:rounded-e-xl"},full:{button:"first:rounded-s-full last:rounded-e-full"}},color:{primary:{button:"data-[selected=true]:bg-primary-200 data-[selected=false]:hover:bg-gray-100"},secondary:{button:"data-[selected=true]:bg-secondary-200 data-[selected=false]:hover:bg-gray-100"},gray:{button:"data-[selected=true]:bg-gray-200 data-[selected=false]:hover:bg-gray-100"},red:{button:"data-[selected=true]:bg-red-200 data-[selected=false]:hover:bg-red-50"},orange:{button:"data-[selected=true]:bg-orange-200 data-[selected=false]:hover:bg-orange-50"},amber:{button:"data-[selected=true]:bg-amber-200 data-[selected=false]:hover:bg-amber-50"},yellow:{button:"data-[selected=true]:bg-yellow-200 data-[selected=false]:hover:bg-yellow-50"},lime:{button:"data-[selected=true]:bg-lime-200 data-[selected=false]:hover:bg-lime-50"},green:{button:"data-[selected=true]:bg-green-200 data-[selected=false]:hover:bg-green-50"},emerald:{button:"data-[selected=true]:bg-emerald-200 data-[selected=false]:hover:bg-emerald-50"},teal:{button:"data-[selected=true]:bg-teal-200 data-[selected=false]:hover:bg-teal-50"},cyan:{button:"data-[selected=true]:bg-cyan-200 data-[selected=false]:hover:bg-cyan-50"},sky:{button:"data-[selected=true]:bg-sky-200 data-[selected=false]:hover:bg-sky-50"},blue:{button:"data-[selected=true]:bg-blue-200 data-[selected=false]:hover:bg-blue-50"},indigo:{button:"data-[selected=true]:bg-indigo-200 data-[selected=false]:hover:bg-indigo-50"},violet:{button:"data-[selected=true]:bg-violet-200 data-[selected=false]:hover:bg-violet-50"},purple:{button:"data-[selected=true]:bg-purple-200 data-[selected=false]:hover:bg-purple-50"},fuchsia:{button:"data-[selected=true]:bg-fuchsia-200 data-[selected=false]:hover:bg-fuchsia-50"},pink:{button:"data-[selected=true]:bg-pink-200 data-[selected=false]:hover:bg-pink-50"},rose:{button:"data-[selected=true]:bg-rose-200 data-[selected=false]:hover:bg-rose-50"},none:{}}},defaultVariants:{selected:!1,color:"primary",size:"md",roundedSize:"md"}});q({slots:{base:"w-4 h-4 bg-gray-100 border-gray-300 dark:ring-offset-gray-800 focus:ring-2 me-2 rounded-sm",div:"flex items-center"},variants:{color:{primary:{base:"text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600"},secondary:{base:"text-secondary-600 focus:ring-secondary-500 dark:focus:ring-secondary-600"},gray:{base:"text-gray-600 focus:ring-gray-600 dark:ring-offset-gray-800 dark:focus:ring-gray-600"},red:{base:"text-red-600 focus:ring-red-600 dark:ring-offset-red-600 dark:focus:ring-red-600"},orange:{base:"text-orange-600 focus:ring-orange-600 dark:ring-offset-orange-600 dark:focus:ring-orange-600"},amber:{base:"text-amber-600 focus:ring-amber-600 dark:ring-offset-amber-600 dark:focus:ring-amber-600"},yellow:{base:"text-yellow-400 focus:ring-yellow-400 dark:ring-offset-yellow-400 dark:focus:ring-yellow-400"},lime:{base:"text-lime-700 focus:ring-lime-700 dark:ring-offset-lime-700 dark:focus:ring-lime-700"},green:{base:"text-green-600 focus:ring-green-600 dark:ring-offset-green-600 dark:focus:ring-green-600"},emerald:{base:"text-emerald-600 focus:ring-emerald-600 dark:ring-offset-emerald-600 dark:focus:ring-emerald-600"},teal:{base:"text-teal-600 focus:ring-teal-600 dark:ring-offset-teal-600 dark:focus:ring-teal-600"},cyan:{base:"text-cyan-600 focus:ring-cyan-600 dark:ring-offset-cyan-600 dark:focus:ring-cyan-600"},sky:{base:"text-sky-600 focus:ring-sky-600 dark:ring-offset-sky-600 dark:focus:ring-sky-600"},blue:{base:"text-blue-700 focus:ring-blue-600 dark:ring-offset-blue-700 dark:focus:ring-blue-700"},indigo:{base:"text-indigo-700 focus:ring-indigo-700 dark:ring-offset-indigo-700 dark:focus:ring-indigo-700"},violet:{base:"text-violet-600 focus:ring-violet-600 dark:ring-offset-violet-600 dark:focus:ring-violet-600"},purple:{base:"text-purple-600 focus:ring-purple-600 dark:ring-offset-purple-600 dark:focus:ring-purple-600"},fuchsia:{base:"text-fuchsia-600 focus:ring-fuchsia-600 dark:ring-offset-fuchsia-600 dark:focus:ring-fuchsia-600"},pink:{base:"text-pink-600 focus:ring-pink-600 dark:ring-offset-pink-600 dark:focus:ring-pink-600"},rose:{base:"text-rose-600 focus:ring-rose-600 dark:ring-offset-rose-600 dark:focus:ring-rose-600"}},tinted:{true:{base:"dark:bg-gray-600 dark:border-gray-500"},false:{base:"dark:bg-gray-700 dark:border-gray-600"}},custom:{true:{base:"sr-only peer"}},rounded:{true:{base:"rounded-sm"}},inline:{true:{div:"inline-flex",false:"flex items-center"}},disabled:{true:{base:"cursor-not-allowed opacity-50 bg-gray-200 border-gray-300",div:"cursor-not-allowed opacity-70"},false:{}}},defaultVariants:{color:"primary",disabled:!1}});q({base:"",variants:{inline:{true:"inline-flex",false:"flex"},checked:{true:"outline-4 outline-green-500"}},defaultVariants:{inline:!0}});const WL=q({base:"text-sm rtl:text-right font-medium block",variants:{color:{disabled:"text-gray-500 dark:text-gray-500",primary:"text-primary-700 dark:text-primary-500",secondary:"text-secondary-700 dark:text-secondary-500",green:"text-green-700 dark:text-green-500",emerald:"text-emerald-700 dark:text-emerald-500",red:"text-red-700 dark:text-red-500",blue:"text-blue-700 dark:text-blue-500",yellow:"text-yellow-700 dark:text-yellow-500",orange:"text-orange-700 dark:text-orange-500",gray:"text-gray-700 dark:text-gray-200",teal:"text-teal-700 dark:text-teal-500",cyan:"text-cyan-700 dark:text-cyan-500",sky:"text-sky-700 dark:text-sky-500",indigo:"text-indigo-700 dark:text-indigo-500",lime:"text-lime-700 dark:text-lime-500",amber:"text-amber-700 dark:text-amber-500",violet:"text-violet-700 dark:text-violet-500",purple:"text-purple-700 dark:text-purple-500",fuchsia:"text-fuchsia-700 dark:text-fuchsia-500",pink:"text-pink-700 dark:text-pink-500",rose:"text-rose-700 dark:text-rose-500"}}});var XL=Ht("");function qL(r,e){_n(e,!0);let t=pt(e,"color",3,"gray"),n=pt(e,"show",3,!0),i=rr(e,["$$slots","$$events","$$legacy","children","color","show","class"]);const s=Ji("label");let a=Ve(()=>WL({color:t(),class:Kt(s,e.class)}));var o=Ct(),l=bt(o);{var c=u=>{var h=XL();fn(h,()=>({...i,class:z(a)}));var f=Pt(h);on(f,()=>e.children),Oe(u,h)},d=u=>{var h=Ct(),f=bt(h);on(f,()=>e.children),Oe(u,h)};Ft(l,u=>{n()?u(c):u(d,!1)})}Oe(r,o),wn()}q({base:"flex flex-col justify-center items-center w-full h-64 bg-gray-50 rounded-lg border-2 border-gray-300 border-dashed cursor-pointer dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600"});q({slots:{base:"block w-full disabled:cursor-not-allowed disabled:opacity-50 rtl:text-right p-2.5 focus:border-primary-500 focus:ring-primary-500 dark:focus:border-primary-500 dark:focus:ring-primary-500 bg-gray-50 text-gray-900 dark:bg-gray-700 dark:placeholder-gray-400 border-gray-300 dark:border-gray-600 text-sm rounded-lg border p-0! dark:text-gray-400",wrapper:"relative w-full",close:"flex absolute inset-y-0 items-center text-gray-500 dark:text-gray-400 end-0 p-2.5",svg:""},variants:{size:{sm:{base:"text-xs ps-9 pe-9 p-2"},md:{base:"text-sm ps-10 pe-10 p-2.5"},lg:{base:"sm:text-base ps-11 pe-11 p-3"}}}});q({slots:{base:"relative",input:"block w-full text-sm text-gray-900 bg-transparent appearance-none dark:text-white focus:outline-hidden focus:ring-0 peer disabled:cursor-not-allowed disabled:opacity-50",label:"absolute text-sm duration-300 transform scale-75 z-10 origin-left rtl:origin-right peer-placeholder-shown:scale-100 peer-focus:scale-75",close:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black",combo:"absolute top-full right-0 left-0 z-10 mt-1 max-h-60 overflow-y-auto rounded-md border border-gray-200 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-800",svg:""},variants:{variant:{filled:{base:"relative",input:"rounded-t-lg border-0 border-b-2 bg-gray-50 dark:bg-gray-700",label:"-translate-y-4 start-2.5 peer-placeholder-shown:translate-y-0 peer-focus:-translate-y-4"},outlined:{base:"relative",input:"rounded-lg border",label:"-translate-y-4 bg-white dark:bg-gray-900 px-2 peer-focus:px-2 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:-translate-y-4 start-1"},standard:{base:"relative z-0",input:"border-0 border-b-2",label:"-translate-y-6 -z-10 peer-focus:start-0 peer-placeholder-shown:translate-y-0 peer-focus:-translate-y-6"}},size:{small:{},default:{}},color:{default:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-primary-500 focus:border-primary-600",label:"text-gray-500 dark:text-gray-400 peer-focus:text-primary-600 dark:peer-focus:text-primary-500"},primary:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-primary-500 focus:border-primary-600",label:"text-primary-500 dark:text-primary-400 peer-focus:text-primary-600 dark:peer-focus:text-primary-500"},secondary:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-secondary-500 focus:border-secondary-600",label:"text-secondary-500 dark:text-secondary-400 peer-focus:text-secondary-600 dark:peer-focus:text-secondary-500"},gray:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-gray-500 focus:border-gray-600",label:"text-gray-500 dark:text-gray-400 peer-focus:text-gray-600 dark:peer-focus:text-gray-500"},red:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-red-500 focus:border-red-600",label:"text-red-500 dark:text-red-400 peer-focus:text-red-600 dark:peer-focus:text-red-500"},orange:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-orange-500 focus:border-orange-600",label:"text-orange-500 dark:text-orange-400 peer-focus:text-orange-600 dark:peer-focus:text-orange-500"},amber:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-amber-500 focus:border-amber-600",label:"text-amber-500 dark:text-amber-400 peer-focus:text-amber-600 dark:peer-focus:text-amber-500"},yellow:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-yellow-500 focus:border-yellow-600",label:"text-yellow-500 dark:text-yellow-400 peer-focus:text-yellow-600 dark:peer-focus:text-yellow-500"},lime:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-lime-500 focus:border-lime-600",label:"text-lime-500 dark:text-lime-400 peer-focus:text-lime-600 dark:peer-focus:text-lime-500"},green:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-green-500 focus:border-green-600",label:"text-green-500 dark:text-green-400 peer-focus:text-green-600 dark:peer-focus:text-green-500"},emerald:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-emerald-500 focus:border-emerald-600",label:"text-emerald-500 dark:text-emerald-400 peer-focus:text-emerald-600 dark:peer-focus:text-emerald-500"},teal:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-teal-500 focus:border-teal-600",label:"text-teal-500 dark:text-teal-400 peer-focus:text-teal-600 dark:peer-focus:text-teal-500"},cyan:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-cyan-500 focus:border-cyan-600",label:"text-cyan-500 dark:text-cyan-400 peer-focus:text-cyan-600 dark:peer-focus:text-cyan-500"},sky:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-sky-500 focus:border-sky-600",label:"text-sky-500 dark:text-sky-400 peer-focus:text-sky-600 dark:peer-focus:text-sky-500"},blue:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-blue-500 focus:border-blue-600",label:"text-blue-500 dark:text-blue-400 peer-focus:text-blue-600 dark:peer-focus:text-blue-500"},indigo:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-indigo-500 focus:border-indigo-600",label:"text-indigo-500 dark:text-indigo-400 peer-focus:text-indigo-600 dark:peer-focus:text-indigo-500"},violet:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-violet-500 focus:border-violet-600",label:"text-violet-600 dark:text-violet-500 peer-focus:text-violet-600 dark:peer-focus:text-violet-500"},purple:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-purple-500 focus:border-purple-600",label:"text-purple-600 dark:text-purple-500 peer-focus:text-purple-600 dark:peer-focus:text-purple-500"},fuchsia:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-fuchsia-500 focus:border-fuchsia-600",label:"text-fuchsia-600 dark:text-fuchsia-500 peer-focus:text-fuchsia-600 dark:peer-focus:text-fuchsia-500"},pink:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-pink-500 focus:border-pink-600",label:"text-pink-600 dark:text-pink-500 peer-focus:text-pink-600 dark:peer-focus:text-pink-500"},rose:{input:"border-gray-300 dark:border-gray-600 dark:focus:border-rose-500 focus:border-rose-600",label:"text-rose-600 dark:text-rose-500 peer-focus:text-rose-600 dark:peer-focus:text-rose-500"}}},compoundVariants:[{variant:"filled",size:"small",class:{input:"px-2.5 pb-1.5 pt-4",label:"top-3"}},{variant:"filled",size:"default",class:{input:"px-2.5 pb-2.5 pt-5",label:"top-4"}},{variant:"outlined",size:"small",class:{input:"px-2.5 pb-1.5 pt-3",label:"top-1"}},{variant:"outlined",size:"default",class:{input:"px-2.5 pb-2.5 pt-4",label:"top-2"}},{variant:"standard",size:"small",class:{input:"py-2 px-0",label:"top-3"}},{variant:"standard",size:"default",class:{input:"py-2.5 px-0",label:"top-3"}},{variant:"filled",color:"primary",class:{input:"dark:focus:border-primary-500 focus:border-primary-600"}}],defaultVariants:{variant:"standard",size:"default",color:"primary"}});dn(["click"]);q({base:"text-xs font-normal text-gray-500 dark:text-gray-300",variants:{color:{disabled:"text-gray-400 dark:text-gray-500",primary:"text-primary-500 dark:text-primary-400",secondary:"text-secondary-500 dark:text-secondary-400",green:"text-green-500 dark:text-green-400",emerald:"text-emerald-500 dark:text-emerald-400",red:"text-red-500 dark:text-red-400",blue:"text-blue-500 dark:text-blue-400",yellow:"text-yellow-500 dark:text-yellow-400",orange:"text-orange-500 dark:text-orange-400",gray:"text-gray-500 dark:text-gray-400",teal:"text-teal-500 dark:text-teal-400",cyan:"text-cyan-500 dark:text-cyan-400",sky:"text-sky-500 dark:text-sky-400",indigo:"text-indigo-500 dark:text-indigo-400",lime:"text-lime-500 dark:text-lime-400",amber:"text-amber-500 dark:text-amber-400",violet:"text-violet-500 dark:text-violet-400",purple:"text-purple-500 dark:text-purple-400",fuchsia:"text-fuchsia-500 dark:text-fuchsia-400",pink:"text-pink-500 dark:text-pink-400",rose:"text-rose-500 dark:text-rose-400"}}});q({slots:{base:"relative w-full",input:"block w-full disabled:cursor-not-allowed disabled:opacity-50 rtl:text-right focus:outline-hidden",left:"flex absolute inset-y-0 items-center text-gray-500 dark:text-gray-400 pointer-events-none start-0 p-2.5",right:"flex absolute inset-y-0 items-center text-gray-500 dark:text-gray-400 end-0 p-2.5",close:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black",combo:"absolute top-full right-0 left-0 z-20 mt-1 max-h-60 overflow-y-auto rounded-md border border-gray-200 bg-white shadow-lg dark:border-gray-700 dark:bg-gray-800",comboItem:"text-gray-900 dark:text-gray-50",div:"",svg:""},variants:{size:{sm:{input:"text-xs px-2 py-1"},md:{input:"text-sm px-2.5 py-2.5"},lg:{input:"sm:text-base px-3 py-3"}},color:{default:{input:"border border-gray-300 dark:border-gray-600 focus:border-primary-500 focus:ring-primary-500 dark:focus:border-primary-500 dark:focus:ring-primary-500 bg-gray-50 text-gray-900 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 bg-gray-50 text-gray-900 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400"},tinted:{input:"border border-gray-300 dark:border-gray-500 bg-gray-50 text-gray-900 dark:bg-gray-600 dark:text-white dark:placeholder-gray-400"},primary:{input:"border border-primary-200 dark:border-primary-400 focus:ring-primary-500 focus:border-primary-600 dark:focus:ring-primary-500 dark:focus:border-primary-500 bg-primary-50 text-primary-900 placeholder-primary-700 dark:text-primary-400 dark:placeholder-primary-500 dark:bg-gray-700"},secondary:{input:"border border-secondary-200 dark:border-secondary-400 focus:ring-secondary-500 focus:border-secondary-600 dark:focus:ring-secondary-500 dark:focus:border-secondary-500 bg-secondary-50 text-secondary-900 placeholder-secondary-700 dark:text-secondary-400 dark:placeholder-secondary-500 dark:bg-gray-700"},green:{input:"border border-green-200 dark:border-green-400 focus:ring-green-500 focus:border-green-600 dark:focus:ring-green-500 dark:focus:border-green-500 bg-green-50 text-green-900 placeholder-green-700 dark:text-green-400 dark:placeholder-green-500 dark:bg-gray-700"},emerald:{input:"border border-emerald-200 dark:border-emerald-400 focus:ring-emerald-500 focus:border-emerald-600 dark:focus:ring-emerald-500 dark:focus:border-emerald-500 bg-emerald-50 text-emerald-900 placeholder-emerald-700 dark:text-emerald-400 dark:placeholder-emerald-500 dark:bg-gray-700"},red:{input:"border border-red-200 dark:border-red-400 focus:ring-red-500 focus:border-red-600 dark:focus:ring-red-500 dark:focus:border-red-500 bg-red-50 text-red-900 placeholder-red-700 dark:text-red-400 dark:placeholder-red-500 dark:bg-gray-700"},blue:{input:"border border-blue-200 dark:border-blue-400 focus:ring-blue-500 focus:border-blue-600 dark:focus:ring-blue-500 dark:focus:border-blue-500 bg-blue-50 text-blue-900 placeholder-blue-700 dark:text-blue-400 dark:placeholder-blue-500 dark:bg-gray-700"},yellow:{input:"border border-yellow-200 dark:border-yellow-400 focus:ring-yellow-500 focus:border-yellow-600 dark:focus:ring-yellow-500 dark:focus:border-yellow-500 bg-yellow-50 text-yellow-900 placeholder-yellow-700 dark:text-yellow-400 dark:placeholder-yellow-500 dark:bg-gray-700"},orange:{input:"border border-orange-200 dark:border-orange-400 focus:ring-orange-500 focus:border-orange-600 dark:focus:ring-orange-500 dark:focus:border-orange-500 bg-orange-50 text-orange-900 placeholder-orange-700 dark:text-orange-400 dark:placeholder-orange-500 dark:bg-gray-700"},gray:{input:"border border-gray-200 dark:border-gray-400 focus:ring-gray-500 focus:border-gray-600 dark:focus:ring-gray-500 dark:focus:border-gray-500 bg-gray-50 text-gray-900 placeholder-gray-700 dark:text-gray-400 dark:placeholder-gray-500 dark:bg-gray-700"},teal:{input:"border border-teal-200 dark:border-teal-400 focus:ring-teal-500 focus:border-teal-600 dark:focus:ring-teal-500 dark:focus:border-teal-500 bg-teal-50 text-teal-900 placeholder-teal-700 dark:text-teal-400 dark:placeholder-teal-500 dark:bg-gray-700"},cyan:{input:"border border-cyan-200 dark:border-cyan-400 focus:ring-cyan-500 focus:border-cyan-600 dark:focus:ring-cyan-500 dark:focus:border-cyan-500 bg-cyan-50 text-cyan-900 placeholder-cyan-700 dark:text-cyan-400 dark:placeholder-cyan-500 dark:bg-gray-700"},sky:{input:"border border-sky-200 dark:border-sky-400 focus:ring-sky-500 focus:border-sky-600 dark:focus:ring-sky-500 dark:focus:border-sky-500 bg-sky-50 text-sky-900 placeholder-sky-700 dark:text-sky-400 dark:placeholder-sky-500 dark:bg-gray-700"},indigo:{input:"border border-indigo-200 dark:border-indigo-400 focus:ring-indigo-500 focus:border-indigo-600 dark:focus:ring-indigo-500 dark:focus:border-indigo-500 bg-indigo-50 text-indigo-900 placeholder-indigo-700 dark:text-indigo-400 dark:placeholder-indigo-500 dark:bg-gray-700"},lime:{input:"border border-lime-200 dark:border-lime-400 focus:ring-lime-500 focus:border-lime-600 dark:focus:ring-lime-500 dark:focus:border-lime-500 bg-lime-50 text-lime-900 placeholder-lime-700 dark:text-lime-400 dark:placeholder-lime-500 dark:bg-gray-700"},amber:{input:"border border-amber-200 dark:border-amber-400 focus:ring-amber-500 focus:border-amber-600 dark:focus:ring-amber-500 dark:focus:border-amber-500 bg-amber-50 text-amber-900 placeholder-amber-700 dark:text-amber-400 dark:placeholder-amber-500 dark:bg-gray-700"},violet:{input:"border border-violet-200 dark:border-violet-400 focus:ring-violet-500 focus:border-violet-600 dark:focus:ring-violet-500 dark:focus:border-violet-500 bg-violet-50 text-violet-900 placeholder-violet-700 dark:text-violet-400 dark:placeholder-violet-500 dark:bg-gray-700"},purple:{input:"border border-purple-200 dark:border-purple-400 focus:ring-purple-500 focus:border-purple-600 dark:focus:ring-purple-500 dark:focus:border-purple-500 bg-purple-50 text-purple-900 placeholder-purple-700 dark:text-purple-400 dark:placeholder-purple-500 dark:bg-gray-700"},fuchsia:{input:"border border-fuchsia-200 dark:border-fuchsia-400 focus:ring-fuchsia-500 focus:border-fuchsia-600 dark:focus:ring-fuchsia-500 dark:focus:border-fuchsia-500 bg-fuchsia-50 text-fuchsia-900 placeholder-fuchsia-700 dark:text-fuchsia-400 dark:placeholder-fuchsia-500 dark:bg-gray-700"},pink:{input:"border border-pink-200 dark:border-pink-400 focus:ring-pink-500 focus:border-pink-600 dark:focus:ring-pink-500 dark:focus:border-pink-500 bg-pink-50 text-pink-900 placeholder-pink-700 dark:text-pink-400 dark:placeholder-pink-500 dark:bg-gray-700"},rose:{input:"border border-rose-200 dark:border-rose-400 focus:ring-rose-500 focus:border-rose-600 dark:focus:ring-rose-500 dark:focus:border-rose-500 bg-rose-50 text-rose-900 placeholder-rose-700 dark:text-rose-400 dark:placeholder-rose-500 dark:bg-gray-700"}},grouped:{false:{base:"rounded-lg",input:"rounded-lg"},true:{base:"first:rounded-s-lg last:rounded-e-lg not-first:-ms-px group",input:"group-first:rounded-s-lg group-last:rounded-e-lg group-not-first:-ms-px h-full"}}},defaultVariants:{size:"md",color:"default"}});dn(["click"]);q({slots:{div:"absolute inset-y-0 start-0 top-0 flex items-center ps-3.5 pointer-events-none",svg:"w-4 h-4 text-gray-500 dark:text-gray-400",input:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 disabled:cursor-not-allowed disabled:opacity-50",span:"absolute start-0 bottom-3 text-gray-500 dark:text-gray-400",floatingInput:"block py-2.5 ps-6 pe-0 w-full text-sm text-gray-900 bg-transparent border-0 border-b-2 border-gray-300 appearance-none dark:text-white dark:border-gray-600 dark:focus:border-primary-500 focus:outline-none focus:ring-0 focus:border-primary-600 peer disabled:cursor-not-allowed disabled:opacity-50",label:"absolute text-sm text-gray-500 dark:text-gray-400 duration-300 transform -translate-y-6 scale-75 top-3 origin-[0] peer-placeholder-shown:start-6 peer-focus:start-0 peer-focus:text-primary-600 peer-focus:dark:text-primary-500 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-6 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto"},variants:{phoneType:{default:{},floating:{svg:"w-4 h-4 rtl:rotate-[270deg]"},countryCode:{input:"rounded-none rounded-e-lg"},copy:{},advanced:{}},phoneIcon:{true:{input:"ps-10"},false:{}}}});const YL=q({slots:{base:"relative w-full",select:"block w-full rtl:text-right",close:"absolute right-8 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black",svg:""},variants:{underline:{true:{select:"text-gray-500 bg-transparent rounded-none! border-0 border-b-2 border-gray-200 appearance-none dark:text-gray-400 dark:border-gray-700 focus:outline-hidden focus:ring-0 focus:border-gray-200 peer px-0!"},false:{select:"text-gray-900 bg-gray-50 border border-gray-300 focus:outline-hidden focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500"}},size:{sm:{select:"text-xs px-2.5 py-2.5"},md:{select:"text-sm px-2.5 py-2.5"},lg:{select:"text-base py-3 px-4"}},disabled:{true:{select:"cursor-not-allowed opacity-50"},false:{}},grouped:{false:{base:"rounded-lg",select:"rounded-lg"},true:{base:"first:rounded-s-lg last:rounded-e-lg not-first:-ms-px group",select:"group-first:rounded-s-lg group-last:rounded-e-lg group-not-first:-ms-px h-full"}}},defaultVariants:{underline:!1,size:"md"}});q({slots:{base:"relative border border-gray-300 w-full flex items-center gap-2 dark:border-gray-600 ring-primary-500 dark:ring-primary-500 focus-visible:outline-hidden",select:"",dropdown:"absolute z-50 p-3 flex flex-col gap-1 max-h-64 bg-white border border-gray-300 dark:bg-gray-700 dark:border-gray-600 start-0 top-[calc(100%+1rem)] rounded-lg cursor-pointer overflow-y-scroll w-full",item:"py-2 px-3 rounded-lg text-gray-600 hover:text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:text-gray-300 dark:hover:bg-gray-600",close:"p-0 focus:ring-gray-400 dark:text-white",span:"",placeholder:"text-gray-400",svg:"ms-1 h-3 w-3 cursor-pointer text-gray-800 dark:text-white"},variants:{size:{sm:"px-2.5 py-2.5 min-h-[2.4rem] text-xs",md:"px-2.5 py-2.5 min-h-[2.7rem] text-sm",lg:"px-3 py-3 min-h-[3.2rem] sm:text-base"},disabled:{true:{base:"cursor-not-allowed opacity-50 pointer-events-none",item:"cursor-not-allowed opacity-50",close:"cursor-not-allowed"},false:{base:"focus-within:border-primary-500 dark:focus-within:border-primary-500 focus-within:ring-1"}},active:{true:{item:"bg-primary-100 text-primary-500 dark:bg-primary-500 dark:text-primary-100 hover:bg-primary-100 dark:hover:bg-primary-500 hover:text-primary-600 dark:hover:text-primary-100"}},selected:{true:{item:"bg-gray-100 text-black font-semibold hover:text-black dark:text-white dark:bg-gray-600 dark:hover:text-white"}},grouped:{false:{base:"rounded-lg",select:"rounded-lg"},true:{base:"first:rounded-s-lg last:rounded-e-lg not-first:-ms-px group",select:"group-first:rounded-s-lg group-last:rounded-e-lg group-not-first:-ms-px h-full"}}},compoundVariants:[{selected:!0,active:!0,class:{item:"bg-primary-200 dark:bg-primary-600 text-primary-700 dark:text-primary-100 font-semibold"}}],defaultVariants:{underline:!1,size:"md"}});var ZL=Ht(""),jL=Ht(""),$L=Ht("
");function KL(r,e){_n(e,!0);let t=pt(e,"value",15),n=pt(e,"elementRef",15),i=pt(e,"size",3,"md"),s=pt(e,"placeholder",3,"Choose option ..."),a=pt(e,"clearableColor",3,"none"),o=rr(e,["$$slots","$$events","$$legacy","children","items","value","elementRef","underline","size","disabled","placeholder","clearable","clearableColor","clearableOnClick","onClear","clearableSvgClass","clearableClass","selectClass","class","classes"]);e.selectClass,e.clearableSvgClass,e.clearableClass;const l=Ve(()=>e.classes??{select:e.selectClass,svg:e.clearableSvgClass,close:e.clearableClass}),c=Ji("select");let d=rn("group");const u=Ve(()=>YL({underline:e.underline,size:i(),disabled:e.disabled,grouped:!!d})),h=Ve(()=>z(u).base),f=Ve(()=>z(u).select),g=Ve(()=>z(u).close);uL(()=>{n()&&(n(n().value="",!0),n().dispatchEvent(new Event("change",{bubbles:!0}))),t(""),e.onClear&&e.onClear(),e.clearableOnClick&&e.clearableOnClick()});var m=$L(),p=Pt(m);fn(p,S=>({disabled:e.disabled,...o,class:S}),[()=>z(f)({class:Kt(c?.select,z(l).select)})]);var v=Pt(p);{var b=S=>{var E=ZL(),P=Pt(E);E.value=E.__value="",dr(()=>{Fy(E,t()===""||t()===void 0),ha(P,s())}),Oe(S,E)};Ft(v,S=>{s()&&S(b)})}var y=Ut(v);{var _=S=>{var E=Ct(),P=bt(E);B1(P,17,()=>e.items,F1,(N,L)=>{var F=jL(),B=Pt(F),G={};dr(()=>{F.disabled=z(L).disabled,ha(B,z(L).name),G!==(G=z(L).value)&&(F.value=(F.__value=z(L).value)??"")}),Oe(N,F)}),Oe(S,E)};Ft(y,S=>{e.items&&S(_)})}var w=Ut(y);{var T=S=>{var E=Ct(),P=bt(E);on(P,()=>e.children),Oe(S,E)};Ft(w,S=>{e.children&&S(T)})}bu(p,S=>n(S),()=>n());var A=Ut(p,2);{var M=S=>{{let E=Ve(()=>z(g)({class:Kt(c?.close,z(l).close)})),P=Ve(()=>Kt(z(l).svg));yL(S,{get class(){return z(E)},get color(){return a()},"aria-label":"Clear search value",get svgClass(){return z(P)},get disabled(){return e.disabled}})}};Ft(A,S=>{t()!==void 0&&t()!==""&&e.clearable&&S(M)})}dr(S=>wa(m,1,S),[()=>_a(z(h)({class:Kt(c?.base,e.class)}))]),TM(p,t),Oe(r,m),wn()}dn(["change","click"]);q({slots:{input:"flex items-center w-4 h-4 bg-gray-100 border-gray-300 dark:ring-offset-gray-800 focus:ring-2 mr-2",label:"flex items-center"},variants:{color:{primary:{input:"text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600"},secondary:{input:"text-secondary-600 focus:ring-secondary-500 dark:focus:ring-secondary-600"},gray:{input:"text-gray-600 focus:ring-gray-500 dark:focus:ring-gray-600"},red:{input:"text-red-600 focus:ring-red-500 dark:focus:ring-red-600"},orange:{input:"text-orange-500 focus:ring-orange-500 dark:focus:ring-orange-600"},amber:{input:"text-amber-600 focus:ring-amber-500 dark:focus:ring-amber-600"},yellow:{input:"text-yellow-400 focus:ring-yellow-500 dark:focus:ring-yellow-600"},lime:{input:"text-lime-600 focus:ring-lime-500 dark:focus:ring-lime-600"},green:{input:"text-green-600 focus:ring-green-500 dark:focus:ring-green-600"},emerald:{input:"text-emerald-600 focus:ring-emerald-500 dark:focus:ring-emerald-600"},teal:{input:"text-teal-600 focus:ring-teal-500 dark:focus:ring-teal-600"},cyan:{input:"text-cyan-600 focus:ring-cyan-500 dark:focus:ring-cyan-600"},sky:{input:"text-sky-600 focus:ring-sky-500 dark:focus:ring-sky-600"},blue:{input:"text-blue-600 focus:ring-blue-500 dark:focus:ring-blue-600"},indigo:{input:"text-indigo-600 focus:ring-indigo-500 dark:focus:ring-indigo-600"},violet:{input:"text-violet-600 focus:ring-violet-500 dark:focus:ring-violet-600"},purple:{input:"text-purple-600 focus:ring-purple-500 dark:focus:ring-purple-600"},fuchsia:{input:"text-fuchsia-600 focus:ring-fuchsia-500 dark:focus:ring-fuchsia-600"},pink:{input:"text-pink-600 focus:ring-pink-500 dark:focus:ring-pink-600"},rose:{input:"text-rose-600 focus:ring-rose-500 dark:focus:ring-rose-600"}},tinted:{true:{input:"dark:bg-gray-600 dark:border-gray-500"},false:{input:"dark:bg-gray-700 dark:border-gray-600"}},custom:{true:{input:"sr-only peer"},false:{input:"relative"}},inline:{true:{label:"inline-flex"},false:{label:"flex"}}},defaultVariants:{color:"primary"}});q({base:"",variants:{inline:{true:"inline-flex",false:"flex"}},defaultVariants:{inline:!0}});q({base:"w-full bg-gray-200 rounded-lg cursor-pointer dark:bg-gray-700",variants:{size:{sm:"h-1 range-sm",md:"h-2",lg:"h-3 range-lg"},color:{gray:"",red:"",blue:"",indigo:"",violet:"",purple:"",fuchsia:"",pink:"",rose:""},appearance:{auto:"range accent-red-500",none:"appearance-none"}},compoundVariants:[{appearance:"auto",color:"gray",class:"accent-gray-500"},{appearance:"auto",color:"red",class:"accent-red-500"},{appearance:"auto",color:"blue",class:"accent-blue-500"},{appearance:"auto",color:"indigo",class:"accent-indigo-500"},{appearance:"auto",color:"violet",class:"accent-violet-500"},{appearance:"auto",color:"purple",class:"accent-purple-500"},{appearance:"auto",color:"fuchsia",class:"accent-fuchsia-500"},{appearance:"auto",color:"pink",class:"accent-pink-500"},{appearance:"auto",color:"rose",class:"accent-rose-500"}]});q({slots:{base:"relative w-full",left:"absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none",icon:"text-gray-500 dark:text-gray-400",content:"absolute inset-y-0 end-0 flex items-center text-gray-500 dark:text-gray-400",input:"block w-full text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500 disabled:cursor-not-allowed disabled:opacity-50",close:"absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-black",svg:""},variants:{size:{sm:{input:"text-xs p-2 ps-9 pe-9 ",icon:"w-3 h-3"},md:{input:"text-sm p-2.5 ps-10 pe-10",icon:"w-4 h-4"},lg:{input:"sm:text-base p-3 ps-11 pe-11",icon:"w-6 h-6"}}},defaultVariants:{size:"lg"}});q({base:"text-gray-900 dark:text-white",variants:{size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"},weight:{thin:"font-thin",extralight:"font-extralight",light:"font-light",normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extrabold:"font-extrabold",black:"font-black"},space:{tighter:"tracking-tighter",tight:"tracking-tight",normal:"tracking-normal",wide:"tracking-wide",wider:"tracking-wider",widest:"tracking-widest"},height:{none:"leading-none",tight:"leading-tight",snug:"leading-snug",normal:"leading-normal",relaxed:"leading-relaxed",loose:"leading-loose",3:"leading-3",4:"leading-4",5:"leading-5",6:"leading-6",7:"leading-7",8:"leading-8",9:"leading-9",10:"leading-10"},align:{left:"text-left",center:"text-center",right:"text-right"},whitespace:{normal:"whitespace-normal",nowrap:"whitespace-nowrap",pre:"whitespace-pre",preline:"whitespace-pre-line",prewrap:"whitespace-pre-wrap"},italic:{true:"italic"},firstUpper:{true:"first-line:uppercase first-line:tracking-widest first-letter:text-7xl first-letter:font-bold first-letter:text-gray-900 dark:first-letter:text-gray-100 first-letter:me-3 first-letter:float-left",false:""},justify:{true:"text-justify",false:""}}});q({slots:{base:"border border-gray-300 dark:border-gray-600 rounded-lg flex focus-within:ring-primary-500 focus-within:ring-1 focus-within:border-primary-500 scrollbar-hidden bg-gray-50 dark:bg-gray-700",tag:"flex items-center rounded-lg bg-gray-100 text-gray-900 border border-gray-300 my-1 ml-1 px-2 text-sm max-w-full min-w-fit",span:"items-center",close:"my-auto ml-1",input:"block text-sm m-2.5 p-0 bg-transparent border-none outline-none text-gray-900 h-min w-full min-w-fit focus:ring-0 placeholder-gray-400 dark:text-white disabled:cursor-not-allowed disabled:opacity-50",info:"mt-1 text-sm text-blue-500 dark:text-blue-400",warning:"mt-1 text-sm text-yellow-400 dark:text-yellow-300",error:"mt-1 text-sm text-red-500 dark:text-red-400"}});dn(["click"]);q({slots:{div:"relative",base:"block w-full text-sm border-0 px-0 bg-inherit dark:bg-inherit focus:outline-hidden focus:ring-0 disabled:cursor-not-allowed disabled:opacity-50",wrapper:"text-sm rounded-lg bg-gray-50 dark:bg-gray-600 text-gray-900 dark:placeholder-gray-400 dark:text-white border border-gray-200 dark:border-gray-500 disabled:cursor-not-allowed disabled:opacity-50",inner:"py-2 px-4 bg-white dark:bg-gray-800",header:"py-2 px-3 border-gray-200 dark:border-gray-500",footer:"py-2 px-3 border-gray-200 dark:border-gray-500",addon:"absolute top-2 right-2 z-10",close:"absolute right-2 top-5 -translate-y-1/2 text-gray-400 hover:text-black",svg:""},variants:{wrapped:{false:{wrapper:"p-2.5 text-sm focus:outline-hidden focus:ring-primary-500 border-gray-300 focus:border-primary-500 dark:focus:ring-primary-500 dark:focus:border-primary-500 disabled:cursor-not-allowed disabled:opacity-50"}},hasHeader:{true:{header:"border-b"},false:{inner:"rounded-t-lg"}},hasFooter:{true:{footer:"border-t"},false:{inner:"rounded-b-lg"}}}});const JL=q({slots:{span:"me-3 shrink-0 bg-gray-200 rounded-full peer-focus:ring-4 peer-checked:after:translate-x-full peer-checked:rtl:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:bg-white after:border-gray-300 after:border after:rounded-full after:transition-all dark:bg-gray-600 dark:border-gray-500 relative ",label:"flex items-center",input:"w-4 h-4 bg-gray-100 border-gray-300 dark:ring-offset-gray-800 focus:ring-2 rounded-sm dark:bg-gray-700 dark:border-gray-600 sr-only peer"},variants:{disabled:{true:{label:"cursor-not-allowed opacity-50"}},checked:{true:"",false:""},off_state_label:{true:{span:"ms-3"}},color:{primary:{span:"peer-focus:ring-primary-300 dark:peer-focus:ring-primary-800 peer-checked:bg-primary-600"},secondary:{span:"peer-focus:ring-secondary-300 dark:peer-focus:ring-secondary-800 peer-checked:bg-secondary-600"},gray:{span:"peer-focus:ring-gray-300 dark:peer-focus:ring-gray-800 peer-checked:bg-gray-500"},red:{span:"peer-focus:ring-red-300 dark:peer-focus:ring-red-800 peer-checked:bg-red-600"},orange:{span:"peer-focus:ring-orange-300 dark:peer-focus:ring-orange-800 peer-checked:bg-orange-500"},amber:{span:"peer-focus:ring-amber-300 dark:peer-focus:ring-amber-800 peer-checked:bg-amber-600"},yellow:{span:"peer-focus:ring-yellow-300 dark:peer-focus:ring-yellow-800 peer-checked:bg-yellow-400"},lime:{span:"peer-focus:ring-lime-300 dark:peer-focus:ring-lime-800 peer-checked:bg-lime-500"},green:{span:"peer-focus:ring-green-300 dark:peer-focus:ring-green-800 peer-checked:bg-green-600"},emerald:{span:"peer-focus:ring-emerald-300 dark:peer-focus:ring-emerald-800 peer-checked:bg-emerald-600"},teal:{span:"peer-focus:ring-teal-300 dark:peer-focus:ring-teal-800 peer-checked:bg-teal-600"},cyan:{span:"peer-focus:ring-cyan-300 dark:peer-focus:ring-cyan-800 peer-checked:bg-cyan-600"},sky:{span:"peer-focus:ring-sky-300 dark:peer-focus:ring-sky-800 peer-checked:bg-sky-600"},blue:{span:"peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 peer-checked:bg-blue-600"},indigo:{span:"peer-focus:ring-indigo-300 dark:peer-focus:ring-indigo-800 peer-checked:bg-indigo-600"},violet:{span:"peer-focus:ring-violet-300 dark:peer-focus:ring-violet-800 peer-checked:bg-violet-600"},purple:{span:"peer-focus:ring-purple-300 dark:peer-focus:ring-purple-800 peer-checked:bg-purple-600"},fuchsia:{span:"peer-focus:ring-fuchsia-300 dark:peer-focus:ring-fuchsia-800 peer-checked:bg-fuchsia-600"},pink:{span:"peer-focus:ring-pink-300 dark:peer-focus:ring-pink-800 peer-checked:bg-pink-600"},rose:{span:"peer-focus:ring-rose-300 dark:peer-focus:ring-rose-800 peer-checked:bg-rose-600"}},size:{small:{span:"w-9 h-5 after:top-[2px] after:start-[2px] after:h-4 after:w-4"},default:{span:"w-11 h-6 after:top-0.5 after:start-[2px] after:h-5 after:w-5"},large:{span:"w-14 h-7 after:top-0.5 after:start-[4px] after:h-6 after:w-6"}}},defaultVariants:{color:"primary"}});var QL=Ht(" ",1);function Ob(r,e){_n(e,!0);let t=pt(e,"size",3,"default"),n=pt(e,"checked",15),i=pt(e,"color",3,"primary"),s=rr(e,["$$slots","$$events","$$legacy","children","size","value","checked","disabled","color","class","classes","inputClass","spanClass","offLabel"]);e.inputClass,e.spanClass;const a=Ve(()=>e.classes??{input:e.inputClass,span:e.spanClass}),o=Ji("toggle"),l=Ve(()=>JL({color:i(),checked:n(),size:t(),disabled:e.disabled,off_state_label:!!e.offLabel})),c=Ve(()=>z(l).input),d=Ve(()=>z(l).label),u=Ve(()=>z(l).span);{let h=Ve(()=>z(d)({class:Kt(o?.label,e.class)}));qL(r,{get class(){return z(h)},children:(f,g)=>{var x=QL(),m=bt(x);{var p=w=>{var T=Ct(),A=bt(T);on(A,()=>e.offLabel),Oe(w,T)};Ft(m,w=>{e.offLabel&&w(p)})}var v=Ut(m,2);fn(v,w=>({type:"checkbox",value:e.value,...s,disabled:e.disabled,class:w}),[()=>z(c)({class:Kt(o?.input,z(a).input)})],void 0,void 0,void 0,!0);var b=Ut(v,2),y=Ut(b,2);{var _=w=>{var T=Ct(),A=bt(T);on(A,()=>e.children),Oe(w,T)};Ft(y,w=>{e.children&&w(_)})}dr(w=>wa(b,1,w),[()=>_a(z(u)({class:Kt(o?.span,z(a).span)}))]),IM(v,n),Oe(f,x)},$$slots:{default:!0}})}wn()}q({slots:{buttonGroup:"inline-flex rounded-lg shadow-sm relative",input:"block disabled:cursor-not-allowed disabled:opacity-50 rtl:text-right focus:ring-0 focus:outline-none",inputWithIcon:"relative px-2 pr-8",iconWrapper:"pointer-events-none absolute inset-y-0 end-0 top-0 flex items-center pe-3.5",icon:"h-4 w-4 text-gray-500 dark:text-gray-400",select:"text-gray-900 disabled:text-gray-400 bg-gray-50 border border-gray-300 focus:ring-0 focus:outline-none block w-full border-l-1 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:disabled:text-gray-500 dark:focus:ring-primary-500 dark:focus:border-primary-500",button:"!rounded-r-lg",buttonIcon:"ml-2 h-4 w-4",rangeSeparator:"flex items-center justify-center px-2 text-gray-500 dark:text-gray-400",rangeInputWrapper:"relative",rangeInput:"relative pr-8",rangeButton:"pointer-events-none absolute inset-y-0 top-0 right-0 flex items-center border-0 bg-transparent pe-3.5",dropdownContent:"p-4 last:rounded-r-lg",dropdownInner:"flex flex-col space-y-4",dropdownTimeRow:"flex space-x-4",dropdownTimeCol:"flex flex-col",dropdownTimeInput:"w-24 rounded-l-lg !border-r px-2",dropdownButton:"w-full !rounded-l-lg",toggleWrapper:"flex w-full flex-col space-y-2",toggleRow:"flex items-center justify-between",toggleTimeRow:"flex space-x-4 p-2.5",toggleTimeCol:"flex flex-col",toggleTimeInput:"w-24 rounded-lg !border-r px-2",inlineGrid:"grid w-full gap-2",inlineButton:"rounded-lg"},variants:{type:{default:{input:"rounded-e-lg"},select:{input:"w-1/3 rounded-l-lg rounded-e-none",select:"rounded-r-lg rounded-l-none"},dropdown:{input:"rounded-l-lg rounded-e-none"},range:{},"timerange-dropdown":{},"timerange-toggle":{},"inline-buttons":{}},columns:{1:{inlineGrid:"grid-cols-1"},2:{inlineGrid:"grid-cols-2"},3:{inlineGrid:"grid-cols-3"},4:{inlineGrid:"grid-cols-4"}},disabled:{true:{input:"disabled:cursor-not-allowed disabled:opacity-50"}}},defaultVariants:{type:"default",columns:2,disabled:!1}});dn(["click"]);q({base:"inline-flex items-center hover:underline",variants:{color:{primary:"text-primary-600 dark:text-primary-500",secondary:"text-secondary-600 dark:text-secondary-500",gray:"text-gray-600 dark:text-gray-500",red:"text-red-600 dark:text-red-500",orange:"text-orange-600 dark:text-orange-500",amber:"text-amber-600 dark:text-amber-500",yellow:"text-yellow-600 dark:text-yellow-500",lime:"text-lime-600 dark:text-lime-500",green:"text-green-600 dark:text-green-500",emerald:"text-emerald-600 dark:text-emerald-500",teal:"text-teal-600 dark:text-teal-500",cyan:"text-cyan-600 dark:text-cyan-500",sky:"text-sky-600 dark:text-sky-500",blue:"text-blue-600 dark:text-blue-500",indigo:"text-indigo-600 dark:text-indigo-500",violet:"text-violet-600 dark:text-violet-500",purple:"text-purple-600 dark:text-purple-500",fuchsia:"text-fuchsia-600 dark:text-fuchsia-500",pink:"text-pink-600 dark:text-pink-500",rose:"text-rose-600 dark:text-rose-500"}}});q({base:"font-semibold text-gray-900 dark:text-white",variants:{border:{true:"border-s-4 border-gray-300 dark:border-gray-500",false:""},italic:{true:"italic",false:""},bg:{true:"bg-gray-50 dark:bg-gray-800",false:""},alignment:{left:"text-left",center:"text-center",right:"text-right"},size:{xs:"text-xs",sm:"text-sm",base:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl","5xl":"text-5xl","6xl":"text-6xl","7xl":"text-7xl","8xl":"text-8xl","9xl":"text-9xl"}},defaultVariants:{border:!1,italic:!0,bg:!1,alignment:"left",size:"lg"}});q({variants:{tag:{dt:"text-gray-500 md:text-lg dark:text-gray-400",dd:"text-lg font-semibold"}},defaultVariants:{tag:"dt"}});q({base:"font-bold text-gray-900 dark:text-white",variants:{tag:{h1:"text-5xl font-extrabold",h2:"text-4xl",h3:"text-3xl",h4:"text-2xl",h5:"text-xl",h6:"text-lg"}},defaultVariants:{tag:"h1"}});q({slots:{base:"h-px my-8 border-0",div:"inline-flex items-center justify-center w-full",content:"absolute px-4 -translate-x-1/2 rtl:translate-x-1/2 bg-white start-1/2 dark:bg-gray-900",bg:""},variants:{withChildren:{true:{base:"w-full",div:"relative"}}},defaultVariants:{withChildren:!1}});q({slots:{base:"max-w-full h-auto",figure:"",caption:"mt-2 text-sm text-center text-gray-500 dark:text-gray-400"},variants:{size:{xs:{base:"max-w-xs",figure:"max-w-xs"},sm:{base:"max-w-sm",figure:"max-w-sm"},md:{base:"max-w-md",figure:"max-w-md"},lg:{base:"max-w-lg",figure:"max-w-lg"},xl:{base:"max-w-xl",figure:"max-w-xl"},"2xl":{base:"max-w-2xl",figure:"max-w-2xl"},full:{base:"max-w-full",figure:"max-w-full"}},effect:{grayscale:{base:"cursor-pointer rounded-lg grayscale filter transition-all duration-300 hover:grayscale-0"},blur:{base:"blur-xs transition-all duration-300 hover:blur-none"},invert:{base:"invert filter transition-all duration-300 hover:invert-0"},sepia:{base:"sepia filter transition-all duration-300 hover:sepia-0"},saturate:{base:"saturate-50 filter transition-all duration-300 hover:saturate-100"},"hue-rotate":{base:"hue-rotate-60 filter transition-all duration-300 hover:hue-rotate-0"}},align:{left:{base:"mx-0",figure:"mx-0"},center:{base:"mx-auto",figure:"mx-auto"},right:{base:"ml-auto mr-0",figure:"ml-auto mr-0"}}}});q({base:"grid grid-cols-1 sm:grid-cols-2"});q({base:"",variants:{tag:{ul:"list-disc",dl:"list-none",ol:"list-decimal"},position:{inside:"list-inside",outside:"list-outside"}},defaultVariants:{position:"inside",tag:"ul"}});q({base:"text-white dark:bg-blue-500 bg-blue-600 px-2 rounded-sm"});q({base:"text-gray-500 dark:text-gray-400 font-semibold"});q({variants:{italic:{true:"italic"},underline:{true:"underline decoration-2 decoration-blue-400 dark:decoration-blue-600"},linethrough:{true:"line-through"},uppercase:{true:"uppercase"},gradient:{skyToEmerald:"text-transparent bg-clip-text bg-linear-to-r to-emerald-600 from-sky-400",purpleToBlue:"text-transparent bg-clip-text bg-linear-to-r from-purple-500 to-blue-500",pinkToOrange:"text-transparent bg-clip-text bg-linear-to-r from-pink-500 to-orange-400",tealToLime:"text-transparent bg-clip-text bg-linear-to-r from-teal-400 to-lime-300",redToYellow:"text-transparent bg-clip-text bg-linear-to-r from-red-600 to-yellow-500",indigoToCyan:"text-transparent bg-clip-text bg-linear-to-r from-indigo-600 to-cyan-400",fuchsiaToRose:"text-transparent bg-clip-text bg-linear-to-r from-fuchsia-500 to-rose-500",amberToEmerald:"text-transparent bg-clip-text bg-linear-to-r from-amber-400 to-emerald-500",violetToRed:"text-transparent bg-clip-text bg-linear-to-r from-violet-600 to-red-500",blueToGreen:"text-transparent bg-clip-text bg-linear-to-r from-blue-400 via-teal-500 to-green-400",orangeToPurple:"text-transparent bg-clip-text bg-linear-to-r from-orange-400 via-pink-500 to-purple-500",yellowToRed:"text-transparent bg-clip-text bg-linear-to-r from-yellow-200 via-indigo-400 to-red-600",none:""},highlight:{blue:"text-blue-600 dark:text-blue-500",green:"text-green-600 dark:text-green-500",red:"text-red-600 dark:text-red-500",yellow:"text-yellow-600 dark:text-yellow-500",purple:"text-purple-600 dark:text-purple-500",pink:"text-pink-600 dark:text-pink-500",indigo:"text-indigo-600 dark:text-indigo-500",teal:"text-teal-600 dark:text-teal-500",orange:"text-orange-600 dark:text-orange-500",cyan:"text-cyan-600 dark:text-cyan-500",fuchsia:"text-fuchsia-600 dark:text-fuchsia-500",amber:"text-amber-600 dark:text-amber-500",lime:"text-lime-600 dark:text-lime-500",none:""},decoration:{solid:"underline decoratio-solid",double:"underline decoration-double",dotted:"underline decoration-dotted",dashed:"underline decoration-dashed",wavy:"underline decoration-wavy",none:"decoration-none"},decorationColor:{primary:"underline decoration-primary-400 dark:decoration-primary-600",secondary:"underline decoration-secondary-400 dark:decoration-secondary-600",gray:"underline decoration-gray-400 dark:decoration-gray-600",orange:"underline decoration-orange-400 dark:decoration-orange-600",red:"underline decoration-red-400 dark:decoration-red-600",yellow:"underline decoration-yellow-400 dark:decoration-yellow-600",lime:"underline decoration-lime-400 dark:decoration-lime-600",green:"underline decoration-green-400 dark:decoration-green-600",emerald:"underline decoration-emerald-400 dark:decoration-emerald-600",teal:"underline decoration-teal-400 dark:decoration-teal-600",cyan:"underline decoration-cyan-400 dark:decoration-cyan-600",sky:"underline decoration-sky-400 dark:decoration-sky-600",blue:"underline decoration-blue-400 dark:decoration-blue-600",indigo:"underline decoration-indigo-400 dark:decoration-indigo-600",violet:"underline decoration-violet-400 dark:decoration-violet-600",purple:"underline decoration-purple-400 dark:decoration-purple-600",fuchsia:"underline decoration-fuchsia-400 dark:decoration-fuchsia-600",pink:"underline decoration-pink-400 dark:decoration-pink-600",rose:"underline decoration-rose-400 dark:decoration-rose-600",none:"decoration-none"},decorationThickness:{1:"underline decoration-1",2:"underline decoration-2",4:"underline decoration-4",8:"underline decoration-8",0:"decoration-0"}}});q({slots:{base:"relative max-w-2xl mx-auto p-4 space-y-4",inputSection:"space-y-2",inputWrapper:"flex gap-2",input:"flex-1 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-500 dark:text-white",searchWrapper:"flex gap-2",searchContainer:"relative flex-1",searchInput:"w-full rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 pl-9 pr-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-500 dark:text-white",searchIcon:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400",itemsList:"space-y-2 max-h-[500px] overflow-y-auto",emptyState:"text-center py-8",emptyIcon:"w-12 h-12 mx-auto text-gray-300 dark:text-gray-600 mb-3",emptyText:"text-sm text-gray-500 dark:text-gray-400",emptySubtext:"text-xs text-gray-400 dark:text-gray-500 mt-1",item:"group flex items-start gap-3 rounded-lg border border-gray-200 dark:border-gray-700 p-3 transition hover:bg-gray-50 dark:hover:bg-gray-800/50",itemContent:"flex-1 min-w-0",itemHeader:"flex items-center gap-2 mb-1",itemTimestamp:"text-xs text-gray-500 dark:text-gray-400",itemText:"text-sm text-gray-900 dark:text-gray-100 break-words line-clamp-2",itemActions:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",actionButton:"p-1.5 rounded hover:bg-gray-200 dark:hover:bg-gray-700 transition flex items-center justify-center",actionIcon:"w-4 h-4 flex-shrink-0",pinButton:"p-1.5 rounded transition",deleteButton:"p-1.5 rounded text-red-500 hover:bg-red-100 dark:hover:bg-red-900/20 transition",toastContainer:"fixed top-4 left-1/2 -translate-x-1/2 z-50 animate-[slideIn_0.2s_ease-out]",toast:"flex items-center gap-2 px-4 py-2 rounded-lg shadow-lg",toastIcon:"w-5 h-5",toastText:"text-sm font-medium",addToClipboard:"whitespace-nowrap rounded bg-blue-600 px-4 py-2 text-white hover:bg-blue-700 disabled:opacity-50",clearAll:"rounded bg-red-600 px-4 py-2 text-white hover:bg-red-700",selectionMenu:"selection-menu fixed z-50 -translate-x-1/2 -translate-y-full",selectionBubble:"mb-2 flex items-center gap-2 rounded-lg bg-gray-900 px-3 py-2 text-white shadow-xl",selectionText:"max-w-[200px] truncate text-xs",selectionButton:"rounded bg-primary-700 px-2 py-1 text-xs font-medium whitespace-nowrap transition hover:bg-primary-500",selectionArrow:"absolute bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-gray-900"},variants:{pinned:{true:{pinButton:"text-blue-600 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/20"},false:{pinButton:"hover:bg-gray-200 dark:hover:bg-gray-700"}},type:{success:{toast:"bg-green-500 text-white"},error:{toast:"bg-red-500 text-white"},info:{toast:"bg-blue-500 text-white"}}},defaultVariants:{pinned:!1,type:"success"}});dn(["keydown","click"]);q({slots:{base:"w-full mx-auto mt-20 max-w-2xl bg-white dark:bg-gray-800 rounded-lg shadow-2xl ring-1 ring-black/5 dark:ring-white/10 overflow-hidden transform transition-all",search:"rounded-b-none border-0 py-3",list:"max-h-80 scroll-py-2 overflow-y-auto border-t border-gray-200 dark:border-gray-700",item:"cursor-pointer select-none px-4 py-2 text-sm text-gray-900 dark:text-gray-100 aria-selected:bg-primary-600 aria-selected:text-white",itemDescription:"text-xs truncate text-gray-500 dark:text-gray-400 aria-selected:text-primary-100",empty:"px-4 py-14 text-center border-t border-gray-200 dark:border-gray-700 text-sm text-gray-500 dark:text-gray-400",footer:"flex flex-wrap items-center justify-between gap-2 bg-gray-50 dark:bg-gray-900/50 px-4 py-2.5 text-xs text-gray-500 dark:text-gray-400 border-t border-gray-200 dark:border-gray-700",kbd:"inline-flex items-center gap-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 px-2 py-1 font-sans text-xs"},variants:{selected:{true:{}}},defaultVariants:{}});dn(["click","keydown"]);q({slots:{container:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-3 md:gap-4 p-2 md:p-4",column:"w-full rounded-xl shadow-sm p-3 md:p-4 flex flex-col bg-surface-elevated text-surface-foreground transition-colors",columnTitle:"text-sm md:text-base font-semibold mb-2 md:mb-3 dark:text-white",cardList:"flex flex-col gap-2 flex-1 min-h-[60px]",card:"bg-surface text-surface-foreground rounded-lg p-2.5 md:p-3 shadow-sm cursor-grab active:cursor-grabbing transition-all hover:bg-surface-hover hover:shadow-md",cardTitle:"font-medium text-sm md:text-base",cardDescription:"text-xs md:text-sm text-muted mt-1",cardTags:"flex flex-wrap gap-1 mt-2",cardTag:"text-[10px] md:text-xs bg-primary/10 text-primary px-1.5 md:px-2 py-0.5 rounded-full",addButton:"mt-2 md:mt-3 w-full bg-primary text-primary-foreground rounded-lg py-1.5 text-xs md:text-sm dark:text-primary-500 font-medium hover:bg-primary/90 transition-colors focus:ring-2 focus:ring-primary focus:ring-offset-2"},variants:{isDragOver:{true:{column:"ring-2 ring-primary"}},isDragging:{true:{card:"opacity-50"}}}});q({slots:{card:"bg-surface text-surface-foreground rounded-lg p-2.5 md:p-3 shadow-sm shadow-black/20 dark:shadow-white/10 cursor-grab active:cursor-grabbing transition-all hover:bg-surface-hover hover:shadow-md",cardTitle:"font-medium text-sm md:text-base dark:text-white",cardDescription:"text-xs md:text-sm text-muted mt-1 dark:text-white",cardTags:"flex flex-wrap gap-1 mt-2 dark:text-white",cardTag:"text-[10px] md:text-xs bg-primary/10 text-primary px-1.5 md:px-2 py-0.5 rounded-full dark:text-white"},variants:{isDragging:{true:{card:"opacity-50"}}}});dn(["click"]);q({slots:{base:"bg-white dark:bg-gray-900 p-2 transition-all duration-300 z-40 border-b border-gray-200 dark:border-gray-700",container:"",list:"",link:"px-4 py-2.5 transition-all duration-200 cursor-pointer rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900",li:"p-2 m-1"},variants:{position:{top:{base:"top-0 left-0 right-0 w-full",container:"container mx-auto px-4",list:"flex space-x-1 overflow-x-auto scrollbar-none"},left:{base:"fixed left-0 top-0 bottom-0 h-full w-64 overflow-y-auto",container:"px-4 py-4",list:"flex flex-col space-y-1"},right:{base:"fixed right-0 top-0 bottom-0 h-full w-64 overflow-y-auto",container:"px-4 py-4",list:"flex flex-col space-y-1"}},sticky:{true:{base:""},false:{base:""}},isSticky:{true:{base:"shadow-lg"},false:{base:""}},active:{true:{link:"text-primary-700 dark:text-primary-400 bg-primary-50 dark:bg-primary-900/30 font-semibold focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900"},false:{link:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800"}}},defaultVariants:{position:"top",sticky:!0,isSticky:!1,active:!1},compoundVariants:[{position:"top",sticky:!0,class:{base:"sticky"}}]});dn(["click","keydown"]);q({base:"relative flex h-full w-full overflow-hidden select-none",variants:{direction:{horizontal:"",vertical:"flex-col"}},defaultVariants:{direction:"horizontal"}});q({base:"flex flex-col relative overflow-hidden shrink-0 min-w-0 min-h-0"});q({base:"bg-gray-300 shrink-0 relative z-10 transition-colors duration-200 hover:bg-gray-400 focus:bg-gray-400 focus:outline focus:outline-2 focus:outline-blue-500 focus:-outline-offset-2",variants:{direction:{horizontal:"w-1 cursor-col-resize",vertical:"h-1 cursor-row-resize"},isDragging:{true:"bg-blue-500",false:""}},defaultVariants:{direction:"horizontal",isDragging:!1}});q({base:"absolute bg-transparent",variants:{direction:{horizontal:"w-3 h-full -left-1 top-0",vertical:"h-3 w-full -top-1 left-0"}},defaultVariants:{direction:"horizontal"}});dn(["mousedown","keydown"]);q({slots:{overlay:"fixed inset-0 bg-black/50 backdrop-blur-sm",highlight:["fixed border-2 pointer-events-none transition-all duration-300","border-blue-500","shadow-[0_0_0_4px_rgba(59,130,246,0.2)]"],tooltip:["fixed bg-white rounded-xl shadow-2xl","w-80 max-w-[calc(100vw-2rem)]"],arrow:"absolute w-2 h-2 rotate-45 bg-white",content:"p-5 relative z-10 bg-white rounded-xl",title:"text-lg font-semibold text-gray-900 mb-3",description:"text-sm leading-relaxed text-gray-600 mb-4",progressContainer:"flex gap-2 justify-center",progressDot:["w-2 h-2 rounded-full bg-gray-300","hover:bg-gray-400 transition-all duration-200 hover:scale-110"],progressDotActive:"!bg-blue-500 !w-6 rounded",actions:["flex justify-between items-center px-5 py-4","border-t border-gray-200 relative z-10 bg-white rounded-b-xl"],navigation:"flex gap-2",button:["px-4 py-2 rounded-md text-sm font-medium","transition-all duration-200"],buttonPrimary:["text-white bg-blue-500 hover:bg-blue-600"],buttonSecondary:["text-gray-600 border border-gray-300","hover:bg-gray-50 hover:border-gray-400"]},variants:{size:{sm:{tooltip:"w-64",content:"p-4",actions:"px-4 py-3",title:"text-base",description:"text-xs",button:"px-3 py-1.5 text-xs"},md:{tooltip:"w-80",content:"p-5",actions:"px-5 py-4",title:"text-lg",description:"text-sm",button:"px-4 py-2 text-sm"},lg:{tooltip:"w-96",content:"p-6",actions:"px-6 py-5",title:"text-xl",description:"text-base",button:"px-5 py-2.5 text-base"}},color:{primary:{highlight:"border-primary-500 shadow-[0_0_0_4px_rgba(59,130,246,0.2)]",progressDotActive:"!bg-primary-500",buttonPrimary:"bg-primary-500 hover:bg-primary-600"},blue:{highlight:"border-blue-500 shadow-[0_0_0_4px_rgba(59,130,246,0.2)]",progressDotActive:"!bg-blue-500",buttonPrimary:"bg-blue-500 hover:bg-blue-600"},purple:{highlight:"border-purple-500 shadow-[0_0_0_4px_rgba(168,85,247,0.2)]",progressDotActive:"!bg-purple-500",buttonPrimary:"bg-purple-500 hover:bg-purple-600"},green:{highlight:"border-green-500 shadow-[0_0_0_4px_rgba(34,197,94,0.2)]",progressDotActive:"!bg-green-500",buttonPrimary:"bg-green-500 hover:bg-green-600"},red:{highlight:"border-red-500 shadow-[0_0_0_4px_rgba(239,68,68,0.2)]",progressDotActive:"!bg-red-500",buttonPrimary:"bg-red-500 hover:bg-red-600"}}},defaultVariants:{size:"md",color:"blue"}});dn(["click","keydown"]);q({slots:{container:"overflow-y-auto scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-transparent",spacer:"relative",content:"absolute top-0 left-0 right-0",item:""},variants:{contained:{true:{item:"[contain:layout_style_paint]"},false:{}}},defaultVariants:{contained:!1}});q({slots:{container:"overflow-y-auto scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-transparent",spacer:"relative",content:"relative w-full",item:""},variants:{contained:{true:{item:"[contain:layout_style_paint]"},false:{}}},defaultVariants:{contained:!1}});let qw=Nt(Li(uw()));i5(()=>{Rt(qw,[...uw()],!0)});const ru=()=>z(qw);var eN=Ht('CSG Builder CSG Builder',1),tN=Ht('

',1),nN=Ht(" ",1);function rN(r,e){_n(e,!0);let t=pt(e,"wireframe",15),n=pt(e,"saveCameraToUrl",15);yh(()=>{const d=n5();if(d){const h=ru().find(f=>f.name===d);h&&Rt(i,h.name,!0)}const u=t5();u&&n(!0),e.oncamerastate?.(u),d&&l(!0)});let i=Nt(void 0),s=Nt(0),a=Nt(0),o=Nt(Li({width:0,height:0,depth:0}));const l=(d=!1)=>{const u=ru().find(h=>h.name===z(i));if(u){const h=Date.now(),f=u.receiveData(),g=Array.isArray(f)?U.MERGE(f):f;Rt(a,g.getVertices().length/9),Rt(o,g.getBounds(),!0),Rt(s,Date.now()-h),d||Fg(u.name),e.onselect?.(u.name,f)}},c=()=>{l(!1)};RL(r,{class:"bg-gray-100",children:(d,u)=>{Cp(d,{class:"border w-4/5 px-5 py-2 rounded-lg bg-white border-gray-200",children:(h,f)=>{var g=nN(),x=bt(g);IL(x,{href:"#",children:(p,v)=>{var b=eN();Oe(p,b)},$$slots:{default:!0}});var m=Ut(x,2);UL(m,{children:(p,v)=>{var b=Ct(),y=bt(b);{var _=w=>{var T=tN(),A=bt(T),M=Pt(A),S=Ut(M,2),E=Ut(S,2),P=Ut(A,2),N=Pt(P);Ob(N,{id:"wireframe",class:"ml-4",get checked(){return t()},set checked(G){t(G)},children:(G,O)=>{var Y=df("Wireframe");Oe(G,Y)},$$slots:{default:!0}});var L=Ut(N,2);Ob(L,{id:"saveCameraToUrl",class:"ml-4",get checked(){return n()},set checked(G){n(G)},children:(G,O)=>{var Y=df("Save camera");Oe(G,Y)},$$slots:{default:!0}});var F=Ut(P,2);{let G=Ve(()=>ru().map(O=>({value:O.name,name:O.name})));KL(F,{class:"w-72 ml-4",get items(){return z(G)},onchange:c,placeholder:"Select model part...",size:"lg",get value(){return z(i)},set value(O){Rt(i,O,!0)}})}var B=Ut(F,2);ML(B,{class:"ml-4",onclick:()=>e.ondownload?.(),children:(G,O)=>{var Y=df("Download");Oe(G,Y)},$$slots:{default:!0}}),dr(G=>{ha(M,`${z(o).width??""} x ${z(o).height??""} x ${z(o).depth??""} `),ha(S,` ${G??""} faces `),ha(E,` ${z(s)??""} ms`)},[()=>z(a).toLocaleString()]),Oe(w,T)};Ft(y,w=>{ru().length&&w(_)})}Oe(p,b)},$$slots:{default:!0}}),Oe(h,g)},$$slots:{default:!0}})},$$slots:{default:!0}}),wn()}var iN=Ht('
',1);function sN(r,e){_n(e,!0);let t=Nt(0),n=Nt(""),i=Nt(void 0),s=Nt(void 0),a=Nt(!1),o=Nt(!1);const l=(m,p)=>{Rt(n,m,!0),Rt(i,Array.isArray(p)?U.MERGE(p):p,!0),Rt(t,$I([...z(i).getVertices()]),!0)},c=m=>{Rt(s,m,!0)},d=()=>{if(!z(i))return;const m=z(i).getVertices(),p=QI(m);e5(z(n)+".stl",p)};Vi(()=>{!z(o)&&z(n)&&Fg(z(n))});var u=iN(),h=bt(u);rN(h,{oncamerastate:c,ondownload:d,onselect:l,get wireframe(){return z(a)},set wireframe(m){Rt(a,m,!0)},get saveCameraToUrl(){return z(o)},set saveCameraToUrl(m){Rt(o,m,!0)}});var f=Ut(h,2),g=Pt(f);{var x=m=>{var p=Ct(),v=bt(p);yM(v,()=>z(i),b=>{LR(b,{children:(y,_)=>{d4(y,{get cameraState(){return z(s)},get componentName(){return z(n)},get saveCameraToUrl(){return z(o)},get solid(){return z(i)},get volume(){return z(t)},get wireframe(){return z(a)}})},$$slots:{default:!0}})}),Oe(m,p)};Ft(g,m=>{z(i)&&m(x)})}Oe(r,u),wn()}mM(sN,{target:document.querySelector("#app")}); diff --git a/docs/assets/index-ozVgP4u8.css b/docs/assets/index-ozVgP4u8.css new file mode 100644 index 0000000..6d88e9a --- /dev/null +++ b/docs/assets/index-ozVgP4u8.css @@ -0,0 +1 @@ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-50:oklch(98.4% .014 180.72);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-200:oklch(91% .096 180.426);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-teal-700:oklch(51.1% .096 186.391);--color-teal-800:oklch(43.7% .078 188.216);--color-teal-900:oklch(38.6% .063 188.416);--color-cyan-50:oklch(98.4% .019 200.873);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-cyan-700:oklch(52% .105 223.128);--color-cyan-800:oklch(45% .085 224.283);--color-cyan-900:oklch(39.8% .07 227.392);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-900:oklch(38% .189 293.745);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-fuchsia-50:oklch(97.7% .017 320.058);--color-fuchsia-100:oklch(95.2% .037 318.852);--color-fuchsia-200:oklch(90.3% .076 319.62);--color-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-fuchsia-600:oklch(59.1% .293 322.896);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-fuchsia-800:oklch(45.2% .211 324.591);--color-fuchsia-900:oklch(40.1% .17 325.612);--color-pink-50:oklch(97.1% .014 343.198);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-200:oklch(89.9% .061 343.231);--color-pink-300:oklch(82.3% .12 346.018);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--color-pink-700:oklch(52.5% .223 3.958);--color-pink-800:oklch(45.9% .187 3.815);--color-pink-900:oklch(40.8% .153 2.432);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-900:oklch(41% .159 10.272);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-md:48rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-4xl:56rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--ease-in:cubic-bezier(.4,0,1,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-xs:4px;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.tooltip-arrow,.tooltip-arrow:before{background:inherit;width:8px;height:8px;position:absolute}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{content:"";visibility:visible;transform:rotate(45deg)}[data-tooltip-style^=light]+.tooltip>.tooltip-arrow:before{border-style:solid;border-color:var(--color-gray-200)}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=top]>.tooltip-arrow:before{border-bottom-width:1px;border-right-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=right]>.tooltip-arrow:before{border-bottom-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=bottom]>.tooltip-arrow:before{border-top-width:1px;border-left-width:1px}[data-tooltip-style^=light]+.tooltip[data-popper-placement^=left]>.tooltip-arrow:before{border-top-width:1px;border-right-width:1px}.tooltip[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.tooltip[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.tooltip[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.tooltip[data-popper-placement^=right]>.tooltip-arrow{left:-4px}.tooltip.invisible>.tooltip-arrow:before{visibility:hidden}[data-popper-arrow],[data-popper-arrow]:before{background:inherit;width:8px;height:8px;position:absolute}[data-popper-arrow]{visibility:hidden}[data-popper-arrow]:before{content:"";visibility:visible;transform:rotate(45deg)}[data-popper-arrow]:after{content:"";visibility:visible;background:inherit;width:9px;height:9px;position:absolute;transform:rotate(45deg)}[role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:var(--color-gray-200)}.dark [role=tooltip]>[data-popper-arrow]:before{border-style:solid;border-color:var(--color-gray-600)}[role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:var(--color-gray-200)}.dark [role=tooltip]>[data-popper-arrow]:after{border-style:solid;border-color:var(--color-gray-600)}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:before,[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]:after{border-bottom-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:before,[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]:after{border-bottom-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:before,[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]:after{border-top-width:1px;border-left-width:1px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:before,[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]:after{border-top-width:1px;border-right-width:1px}[data-popover][role=tooltip][data-popper-placement^=top]>[data-popper-arrow]{bottom:-5px}[data-popover][role=tooltip][data-popper-placement^=bottom]>[data-popper-arrow]{top:-5px}[data-popover][role=tooltip][data-popper-placement^=left]>[data-popper-arrow]{right:-5px}[data-popover][role=tooltip][data-popper-placement^=right]>[data-popper-arrow]{left:-5px}[role=tooltip].invisible>[data-popper-arrow]:before,[role=tooltip].invisible>[data-popper-arrow]:after{visibility:hidden}[type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{appearance:none;border-color:var(--color-gray-500);--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is([type=text],[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:var(--color-blue-600);--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);border-color:var(--color-blue-600);outline:2px solid #0000}input::placeholder,textarea::placeholder{color:var(--color-gray-500);opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}select:not([size]){print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 10 6'%3e %3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 1 4 4 4-4'/%3e %3c/svg%3e");background-position:right .75rem center;background-repeat:no-repeat;background-size:.75em .75em;padding-right:2.5rem}[dir=rtl] select:not([size]){background-position:.75rem;padding-left:0;padding-right:.75rem}[multiple]{background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;print-color-adjust:unset;padding-right:.75rem}[type=checkbox],[type=radio]{appearance:none;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;width:1rem;height:1rem;color:var(--color-blue-600);border-color:--color-gray-500;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;flex-shrink:0;padding:0;display:inline-block}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:var(--color-blue-600);--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);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked,.dark [type=checkbox]:checked,.dark [type=radio]:checked{background-position:50%;background-repeat:no-repeat;background-size:.55em .55em;background-color:currentColor!important;border-color:#0000!important}[type=checkbox]:checked{print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M1 5.917 5.724 10.5 15 1.5'/%3e %3c/svg%3e");background-repeat:no-repeat;background-size:.55em .55em}[type=radio]:checked,.dark [type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");background-size:1em 1em}[type=checkbox]:indeterminate{print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 12'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M0.5 6h14'/%3e %3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:.55em .55em;background-color:currentColor!important;border-color:#0000!important}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{background-color:currentColor!important;border-color:#0000!important}[type=file]{background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}[type=file]:focus{outline:1px auto inherit}input[type=file]::file-selector-button{color:#fff;background:var(--color-gray-800);cursor:pointer;border:0;margin-inline:-1rem 1rem;padding:.625rem 1rem .625rem 2rem;font-size:.875rem;font-weight:500}input[type=file]::file-selector-button:hover{background:var(--color-gray-700)}[dir=rtl] input[type=file]::file-selector-button{padding-left:1rem;padding-right:2rem}.dark input[type=file]::file-selector-button{color:#fff;background:var(--color-gray-600)}.dark input[type=file]::file-selector-button:hover{background:var(--color-gray-500)}input[type=range]::-webkit-slider-thumb{background:var(--color-blue-600);appearance:none;cursor:pointer;border:0;border-radius:9999px;width:1.25rem;height:1.25rem}input[type=range]:disabled::-webkit-slider-thumb{background:var(--color-gray-400)}.dark input[type=range]:disabled::-webkit-slider-thumb{background:var(--color-gray-500)}input[type=range]:focus::-webkit-slider-thumb{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(4px + 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-opacity:1;--tw-ring-color:rgb(164 202 254/var(--tw-ring-opacity));outline:2px solid #0000}input[type=range]::-moz-range-thumb{background:var(--color-blue-600);appearance:none;cursor:pointer;border:0;border-radius:9999px;width:1.25rem;height:1.25rem}input[type=range]:disabled::-moz-range-thumb{background:var(--color-gray-400)}.dark input[type=range]:disabled::-moz-range-thumb{background:var(--color-gray-500)}input[type=range]::-moz-range-progress{background:var(--color-blue-500)}input[type=range]::-ms-fill-lower{background:var(--color-blue-500)}input[type=range].range-sm::-webkit-slider-thumb{width:1rem;height:1rem}input[type=range].range-lg::-webkit-slider-thumb{width:1.5rem;height:1.5rem}input[type=range].range-sm::-moz-range-thumb{width:1rem;height:1rem}input[type=range].range-lg::-moz-range-thumb{width:1.5rem;height:1.5rem}.toggle-bg:after{content:"";border-color:var(--color-gray-300);width:1.25rem;height:1.25rem;box-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);background:#fff;border-width:1px;border-radius:9999px;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;position:absolute;top:.125rem;left:.125rem}input:checked+.toggle-bg:after{border-color:#fff;transform:translate(100%)}input:checked+.toggle-bg{background:var(--color-blue-600);border-color:var(--color-blue-600)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.visible\!{visibility:visible!important}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.\!sticky{position:sticky!important}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-1{inset:calc(var(--spacing)*-1)}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.-start-3{inset-inline-start:calc(var(--spacing)*-3)}.-start-4{inset-inline-start:calc(var(--spacing)*-4)}.-start-12{inset-inline-start:calc(var(--spacing)*-12)}.start-0{inset-inline-start:calc(var(--spacing)*0)}.start-1{inset-inline-start:calc(var(--spacing)*1)}.start-1\/2{inset-inline-start:50%}.start-2\.5{inset-inline-start:calc(var(--spacing)*2.5)}.start-5{inset-inline-start:calc(var(--spacing)*5)}.end-0{inset-inline-end:calc(var(--spacing)*0)}.end-2\.5{inset-inline-end:calc(var(--spacing)*2.5)}.end-5{inset-inline-end:calc(var(--spacing)*5)}.-top-1{top:calc(var(--spacing)*-1)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-1\.5{top:calc(var(--spacing)*1.5)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-2\.5{top:calc(var(--spacing)*2.5)}.top-3{top:calc(var(--spacing)*3)}.top-4{top:calc(var(--spacing)*4)}.top-5{top:calc(var(--spacing)*5)}.top-6{top:calc(var(--spacing)*6)}.top-7{top:calc(var(--spacing)*7)}.top-\[40px\]{top:40px}.top-\[72px\]{top:72px}.top-\[88px\]{top:88px}.top-\[124px\]{top:124px}.top-\[142px\]{top:142px}.top-\[178px\]{top:178px}.top-\[calc\(100\%\+1rem\)\]{top:calc(100% + 1rem)}.top-full{top:100%}.-right-\[16px\]{right:-16px}.-right-\[17px\]{right:-17px}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.right-4{right:calc(var(--spacing)*4)}.right-8{right:calc(var(--spacing)*8)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-1{bottom:calc(var(--spacing)*1)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-4{bottom:calc(var(--spacing)*4)}.bottom-5{bottom:calc(var(--spacing)*5)}.-left-1{left:calc(var(--spacing)*-1)}.-left-1\.5{left:calc(var(--spacing)*-1.5)}.-left-4{left:calc(var(--spacing)*-4)}.-left-\[17px\]{left:-17px}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.left-4{left:calc(var(--spacing)*4)}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.-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-\[9998\]{z-index:9998}.z-\[9999\]{z-index:9999}.z-\[10001\]{z-index:10001}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.m-0\.5{margin:calc(var(--spacing)*.5)}.m-1{margin:calc(var(--spacing)*1)}.m-2{margin:calc(var(--spacing)*2)}.m-2\.5{margin:calc(var(--spacing)*2.5)}.-mx-1\.5{margin-inline:calc(var(--spacing)*-1.5)}.mx-0{margin-inline:calc(var(--spacing)*0)}.mx-0\.5{margin-inline:calc(var(--spacing)*.5)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-4{margin-inline:calc(var(--spacing)*4)}.mx-auto{margin-inline:auto}.-my-1\.5{margin-block:calc(var(--spacing)*-1.5)}.my-1{margin-block:calc(var(--spacing)*1)}.my-2{margin-block:calc(var(--spacing)*2)}.my-8{margin-block:calc(var(--spacing)*8)}.my-auto{margin-block:auto}.ms-1{margin-inline-start:calc(var(--spacing)*1)}.ms-1\.5{margin-inline-start:calc(var(--spacing)*1.5)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-3{margin-inline-start:calc(var(--spacing)*3)}.ms-4{margin-inline-start:calc(var(--spacing)*4)}.ms-6{margin-inline-start:calc(var(--spacing)*6)}.ms-auto{margin-inline-start:auto}.-me-1\.5{margin-inline-end:calc(var(--spacing)*-1.5)}.me-0{margin-inline-end:calc(var(--spacing)*0)}.me-1{margin-inline-end:calc(var(--spacing)*1)}.me-2{margin-inline-end:calc(var(--spacing)*2)}.me-2\.5{margin-inline-end:calc(var(--spacing)*2.5)}.me-3{margin-inline-end:calc(var(--spacing)*3)}.me-4{margin-inline-end:calc(var(--spacing)*4)}.me-auto{margin-inline-end:auto}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-20{margin-top:calc(var(--spacing)*20)}.mt-auto{margin-top:auto}.mr-0{margin-right:calc(var(--spacing)*0)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-auto{margin-right:auto}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-2\.5{margin-bottom:calc(var(--spacing)*2.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.mb-auto{margin-bottom:auto}.mb-px{margin-bottom:1px}.ml-0{margin-left:calc(var(--spacing)*0)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-5{margin-left:calc(var(--spacing)*5)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\!block{display:block!important}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.hidden\!{display:none!important}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.h-1{height:calc(var(--spacing)*1)}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-15{height:calc(var(--spacing)*15)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-36{height:calc(var(--spacing)*36)}.h-48{height:calc(var(--spacing)*48)}.h-56{height:calc(var(--spacing)*56)}.h-64{height:calc(var(--spacing)*64)}.h-72{height:calc(var(--spacing)*72)}.h-80{height:calc(var(--spacing)*80)}.h-96{height:calc(var(--spacing)*96)}.h-\[5px\]{height:5px}.h-\[10px\]{height:10px}.h-\[17px\]{height:17px}.h-\[18px\]{height:18px}.h-\[24px\]{height:24px}.h-\[32px\]{height:32px}.h-\[41px\]{height:41px}.h-\[46px\]{height:46px}.h-\[52px\]{height:52px}.h-\[55px\]{height:55px}.h-\[63px\]{height:63px}.h-\[64px\]{height:64px}.h-\[140px\]{height:140px}.h-\[156px\]{height:156px}.h-\[172px\]{height:172px}.h-\[193px\]{height:193px}.h-\[213px\]{height:213px}.h-\[426px\]{height:426px}.h-\[454px\]{height:454px}.h-\[572px\]{height:572px}.h-\[600px\]{height:600px}.h-auto{height:auto}.h-full{height:100%}.h-min{height:min-content}.h-px{height:1px}.h-screen{height:100vh}.max-h-48{max-height:calc(var(--spacing)*48)}.max-h-60{max-height:calc(var(--spacing)*60)}.max-h-64{max-height:calc(var(--spacing)*64)}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-\[500px\]{max-height:500px}.max-h-none{max-height:none}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-\[2\.4rem\]{min-height:2.4rem}.min-h-\[2\.7rem\]{min-height:2.7rem}.min-h-\[3\.2rem\]{min-height:3.2rem}.min-h-\[60px\]{min-height:60px}.\!w-6{width:calc(var(--spacing)*6)!important}.\!w-full{width:100%!important}.w-1{width:calc(var(--spacing)*1)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-2\/4{width:50%}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-8\/12{width:66.6667%}.w-9{width:calc(var(--spacing)*9)}.w-9\/12{width:75%}.w-10{width:calc(var(--spacing)*10)}.w-10\/12{width:83.3333%}.w-11{width:calc(var(--spacing)*11)}.w-11\/12{width:91.6667%}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-15{width:calc(var(--spacing)*15)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-28{width:calc(var(--spacing)*28)}.w-32{width:calc(var(--spacing)*32)}.w-36{width:calc(var(--spacing)*36)}.w-48{width:calc(var(--spacing)*48)}.w-64{width:calc(var(--spacing)*64)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-96{width:calc(var(--spacing)*96)}.w-\[3px\]{width:3px}.w-\[6px\]{width:6px}.w-\[10px\]{width:10px}.w-\[52px\]{width:52px}.w-\[56px\]{width:56px}.w-\[148px\]{width:148px}.w-\[188px\]{width:188px}.w-\[208px\]{width:208px}.w-\[272px\]{width:272px}.w-\[300px\]{width:300px}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-\(--breakpoint-md\){max-width:var(--breakpoint-md)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[83px\]{max-width:83px}.max-w-\[133px\]{max-width:133px}.max-w-\[200px\]{max-width:200px}.max-w-\[301px\]{max-width:301px}.max-w-\[341px\]{max-width:341px}.max-w-\[351px\]{max-width:351px}.max-w-\[540px\]{max-width:540px}.max-w-\[640px\]{max-width:640px}.max-w-\[calc\(100vw-2rem\)\]{max-width:calc(100vw - 2rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-fit{min-width:fit-content}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.origin-\[0\],.origin-left{transform-origin:0}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-1\/3{--tw-translate-x:calc(calc(1/3*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-1\/3{--tw-translate-x:calc(1/3*100%);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/3{--tw-translate-y:calc(calc(1/3*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-4{--tw-translate-y:calc(var(--spacing)*-4);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-6{--tw-translate-y:calc(var(--spacing)*-6);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-full{--tw-translate-y:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-1\/3{--tw-translate-y:calc(1/3*100%);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-y-full{--tw-translate-y:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-none{translate:none}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x)var(--tw-scale-y)var(--tw-scale-z)}.-rotate-45{rotate:-45deg}.-rotate-135{rotate:-135deg}.rotate-45{rotate:45deg}.rotate-135{rotate:135deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.transform-gpu{transform:translateZ(0)var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-\[slideIn_0\.2s_ease-out\]{animation:.2s ease-out slideIn}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-row-resize{cursor:row-resize}.touch-pan-x{--tw-pan-x:pan-x;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.touch-pan-y{--tw-pan-y:pan-y;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,)var(--tw-pan-y,)var(--tw-pinch-zoom,)}.resize{resize:both}.scroll-py-2{scroll-padding-block:calc(var(--spacing)*2)}.list-inside{list-style-position:inside}.list-outside{list-style-position:outside}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.appearance-none{appearance:none}.grid-flow-row{grid-auto-flow:row}.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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing)*1)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-8{gap:calc(var(--spacing)*8)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*8)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}:where(.-space-x-px>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(-1px*var(--tw-space-x-reverse));margin-inline-end:calc(-1px*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-0\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*.5)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*1)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-6>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*6)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-4{row-gap:calc(var(--spacing)*4)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}:where(.divide-amber-300>:not(:last-child)){border-color:var(--color-amber-300)}:where(.divide-blue-300>:not(:last-child)){border-color:var(--color-blue-300)}:where(.divide-cyan-300>:not(:last-child)){border-color:var(--color-cyan-300)}:where(.divide-emerald-300>:not(:last-child)){border-color:var(--color-emerald-300)}:where(.divide-fuchsia-300>:not(:last-child)){border-color:var(--color-fuchsia-300)}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}:where(.divide-gray-200>:not(:last-child)){border-color:var(--color-gray-200)}:where(.divide-gray-300>:not(:last-child)){border-color:var(--color-gray-300)}:where(.divide-gray-700>:not(:last-child)){border-color:var(--color-gray-700)}:where(.divide-green-300>:not(:last-child)){border-color:var(--color-green-300)}:where(.divide-indigo-300>:not(:last-child)){border-color:var(--color-indigo-300)}:where(.divide-inherit>:not(:last-child)){border-color:inherit}:where(.divide-lime-300>:not(:last-child)){border-color:var(--color-lime-300)}:where(.divide-orange-300>:not(:last-child)){border-color:var(--color-orange-300)}:where(.divide-pink-300>:not(:last-child)){border-color:var(--color-pink-300)}:where(.divide-primary-300>:not(:last-child)){border-color:#ffd5cc}:where(.divide-primary-500>:not(:last-child)){border-color:#fe795d}:where(.divide-purple-300>:not(:last-child)){border-color:var(--color-purple-300)}:where(.divide-red-300>:not(:last-child)){border-color:var(--color-red-300)}:where(.divide-rose-300>:not(:last-child)){border-color:var(--color-rose-300)}:where(.divide-sky-300>:not(:last-child)){border-color:var(--color-sky-300)}:where(.divide-teal-300>:not(:last-child)){border-color:var(--color-teal-300)}:where(.divide-violet-300>:not(:last-child)){border-color:var(--color-violet-300)}:where(.divide-yellow-300>:not(:last-child)){border-color:var(--color-yellow-300)}.self-center{align-self:center}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.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-y-scroll{overflow-y:scroll}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-\[2\.5rem\]{border-radius:2.5rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-none{border-radius:0}.rounded-none\!{border-radius:0!important}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-s-full{border-start-start-radius:3.40282e38px;border-end-start-radius:3.40282e38px}.rounded-s-lg{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-e-full{border-start-end-radius:3.40282e38px;border-end-end-radius:3.40282e38px}.rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.rounded-e-none{border-start-end-radius:0;border-end-end-radius:0}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-t-\[2\.5rem\]{border-top-left-radius:2.5rem;border-top-right-radius:2.5rem}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.\!rounded-l-lg{border-top-left-radius:var(--radius-lg)!important;border-bottom-left-radius:var(--radius-lg)!important}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-l-lg{border-top-left-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tl{border-top-left-radius:.25rem}.rounded-tl-none{border-top-left-radius:0}.\!rounded-r-lg{border-top-right-radius:var(--radius-lg)!important;border-bottom-right-radius:var(--radius-lg)!important}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-b-\[1rem\]{border-bottom-right-radius:1rem;border-bottom-left-radius:1rem}.rounded-b-\[2\.5rem\]{border-bottom-right-radius:2.5rem;border-bottom-left-radius:2.5rem}.rounded-b-lg{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-b-xl{border-bottom-right-radius:var(--radius-xl);border-bottom-left-radius:var(--radius-xl)}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-0\!{border-style:var(--tw-border-style)!important;border-width:0!important}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[8px\]{border-style:var(--tw-border-style);border-width:8px}.border-\[10px\]{border-style:var(--tw-border-style);border-width:10px}.border-\[14px\]{border-style:var(--tw-border-style);border-width:14px}.border-\[16px\]{border-style:var(--tw-border-style);border-width:16px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-4{border-inline-start-style:var(--tw-border-style);border-inline-start-width:4px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\!border-r{border-right-style:var(--tw-border-style)!important;border-right-width:1px!important}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l,.border-l-1{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.dark .apexcharts-canvas .apexcharts-tooltip{background-color:var(--color-gray-700)!important;color:var(--color-gray-400)!important;border-color:#0000!important;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a!important}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-title{background-color:var(--color-gray-600)!important;border-color:var(--color-gray-500)!important;color:var(--color-gray-500)!important}.dark .apexcharts-canvas .apexcharts-xaxistooltip{color:var(--color-gray-400)!important;background-color:var(--color-gray-700)!important}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-label{color:var(--color-gray-400)!important}.dark .apexcharts-canvas .apexcharts-tooltip .apexcharts-tooltip-text-y-value{color:#fff!important}.dark .apexcharts-canvas .apexcharts-xaxistooltip:after,.dark .apexcharts-canvas .apexcharts-xaxistooltip:before{border-bottom-color:var(--color-gray-700)!important}.dark .apexcharts-canvas .apexcharts-tooltip-series-group.apexcharts-active{background-color:var(--color-gray-700)!important;color:var(--color-gray-400)!important}.dark .apexcharts-canvas .apexcharts-legend-text{color:var(--color-gray-400)!important}.dark .apexcharts-canvas .apexcharts-legend-text:not(.apexcharts-inactive-legend):hover{color:#fff!important}.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-value{fill:#fff!important}.dark .apexcharts-canvas .apexcharts-datalabels-group .apexcharts-text.apexcharts-datalabel-label{fill:var(--color-gray-400)!important}.dark .apexcharts-gridline,.dark .apexcharts-xcrosshairs,.dark .apexcharts-ycrosshairs{stroke:var(--color-gray-700)!important}.dark .datatable-wrapper .datatable-search .datatable-input,.dark .datatable-wrapper .datatable-input{color:#fff;background-color:var(--color-gray-800);border:1px solid var(--color-gray-700)}.dark .datatable-wrapper thead th .datatable-input{background-color:var(--color-gray-700);border-color:var(--color-gray-600);color:#fff}.dark .datatable-wrapper .datatable-top .datatable-dropdown{color:var(--color-gray-400)}.dark .datatable-wrapper .datatable-top .datatable-dropdown .datatable-selector{background-color:var(--color-gray-800);border:1px solid var(--color-gray-700);color:#fff}.dark .datatable-wrapper .datatable-table{color:var(--color-gray-400)}.dark .datatable-wrapper .datatable-table thead{color:var(--color-gray-400);background-color:var(--color-gray-800)}.dark .datatable-wrapper .datatable-table thead th .datatable-sorter:hover,.dark .datatable-wrapper .datatable-table thead th.datatable-ascending .datatable-sorter,.dark .datatable-wrapper .datatable-table thead th.datatable-descending .datatable-sorter{color:#fff}.dark .datatable-wrapper .datatable-table tbody tr{border-bottom:1px solid var(--color-gray-700)}.dark .datatable-wrapper .datatable-bottom .datatable-info{color:var(--color-gray-400)}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link{color:var(--color-gray-400);border-color:var(--color-gray-700)}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link,.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link{color:#0000}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:after{content:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='oklch(70.7%25 0.022 261.325)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3e %3c/svg%3e")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link:hover:after{content:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m14 8-4 4 4 4'/%3e %3c/svg%3e")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:after{content:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='oklch(70.7%25 0.022 261.325)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3e %3c/svg%3e")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:last-of-type .datatable-pagination-list-item-link:hover:after{content:url("data:image/svg+xml,%3csvg aria-hidden='true' xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' viewBox='0 0 24 24'%3e %3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m10 16 4-4-4-4'/%3e %3c/svg%3e")}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item:first-of-type .datatable-pagination-list-item-link{border-left:1px solid var(--color-gray-700)}.dark .datatable-wrapper .datatable-bottom .datatable-pagination .datatable-pagination-list-item-link:hover{background-color:var(--color-gray-700);color:#fff}.border-amber-200{border-color:var(--color-amber-200)}.border-amber-300{border-color:var(--color-amber-300)}.border-amber-400{border-color:var(--color-amber-400)}.border-amber-700{border-color:var(--color-amber-700)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-400{border-color:var(--color-blue-400)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-700{border-color:var(--color-blue-700)}.border-cyan-200{border-color:var(--color-cyan-200)}.border-cyan-300{border-color:var(--color-cyan-300)}.border-cyan-400{border-color:var(--color-cyan-400)}.border-cyan-700{border-color:var(--color-cyan-700)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-300{border-color:var(--color-emerald-300)}.border-emerald-400{border-color:var(--color-emerald-400)}.border-emerald-700{border-color:var(--color-emerald-700)}.border-fuchsia-200{border-color:var(--color-fuchsia-200)}.border-fuchsia-300{border-color:var(--color-fuchsia-300)}.border-fuchsia-400{border-color:var(--color-fuchsia-400)}.border-fuchsia-700{border-color:var(--color-fuchsia-700)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-gray-500{border-color:var(--color-gray-500)}.border-gray-700{border-color:var(--color-gray-700)}.border-gray-800{border-color:var(--color-gray-800)}.border-gray-900{border-color:var(--color-gray-900)}.border-green-200{border-color:var(--color-green-200)}.border-green-300{border-color:var(--color-green-300)}.border-green-400{border-color:var(--color-green-400)}.border-green-500{border-color:var(--color-green-500)}.border-green-700{border-color:var(--color-green-700)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-indigo-400{border-color:var(--color-indigo-400)}.border-indigo-700{border-color:var(--color-indigo-700)}.border-inherit{border-color:inherit}.border-lime-200{border-color:var(--color-lime-200)}.border-lime-300{border-color:var(--color-lime-300)}.border-lime-400{border-color:var(--color-lime-400)}.border-lime-700{border-color:var(--color-lime-700)}.border-orange-200{border-color:var(--color-orange-200)}.border-orange-300{border-color:var(--color-orange-300)}.border-orange-400{border-color:var(--color-orange-400)}.border-orange-700{border-color:var(--color-orange-700)}.border-pink-200{border-color:var(--color-pink-200)}.border-pink-300{border-color:var(--color-pink-300)}.border-pink-400{border-color:var(--color-pink-400)}.border-pink-700{border-color:var(--color-pink-700)}.border-primary-200{border-color:#ffe4de}.border-primary-300{border-color:#ffd5cc}.border-primary-400{border-color:#ffbcad}.border-primary-500{border-color:#fe795d}.border-primary-600{border-color:#ef562f}.border-primary-700{border-color:#eb4f27}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-300{border-color:var(--color-purple-300)}.border-purple-400{border-color:var(--color-purple-400)}.border-purple-500{border-color:var(--color-purple-500)}.border-purple-700{border-color:var(--color-purple-700)}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-400{border-color:var(--color-red-400)}.border-red-500{border-color:var(--color-red-500)}.border-red-700{border-color:var(--color-red-700)}.border-rose-200{border-color:var(--color-rose-200)}.border-rose-300{border-color:var(--color-rose-300)}.border-rose-400{border-color:var(--color-rose-400)}.border-rose-700{border-color:var(--color-rose-700)}.border-sky-200{border-color:var(--color-sky-200)}.border-sky-300{border-color:var(--color-sky-300)}.border-sky-400{border-color:var(--color-sky-400)}.border-sky-700{border-color:var(--color-sky-700)}.border-teal-200{border-color:var(--color-teal-200)}.border-teal-300{border-color:var(--color-teal-300)}.border-teal-400{border-color:var(--color-teal-400)}.border-teal-700{border-color:var(--color-teal-700)}.border-transparent{border-color:#0000}.border-violet-200{border-color:var(--color-violet-200)}.border-violet-300{border-color:var(--color-violet-300)}.border-violet-400{border-color:var(--color-violet-400)}.border-violet-700{border-color:var(--color-violet-700)}.border-white{border-color:var(--color-white)}.border-yellow-200{border-color:var(--color-yellow-200)}.border-yellow-300{border-color:var(--color-yellow-300)}.border-yellow-400{border-color:var(--color-yellow-400)}.datatable-wrapper .datatable-table tbody tr.selected{background-color:var(--color-gray-100)}.dark .datatable-wrapper .datatable-table tbody tr.selected{background-color:var(--color-gray-700)}.\!bg-blue-500{background-color:var(--color-blue-500)!important}.\!bg-green-500{background-color:var(--color-green-500)!important}.\!bg-primary-500{background-color:#fe795d!important}.\!bg-purple-500{background-color:var(--color-purple-500)!important}.\!bg-red-500{background-color:var(--color-red-500)!important}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-300{background-color:var(--color-amber-300)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-600{background-color:var(--color-amber-600)}.bg-amber-700{background-color:var(--color-amber-700)}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-200{background-color:var(--color-blue-200)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-700{background-color:var(--color-blue-700)}.bg-blue-800{background-color:var(--color-blue-800)}.bg-cyan-50{background-color:var(--color-cyan-50)}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-300{background-color:var(--color-cyan-300)}.bg-cyan-400{background-color:var(--color-cyan-400)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-cyan-600{background-color:var(--color-cyan-600)}.bg-cyan-700{background-color:var(--color-cyan-700)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-300{background-color:var(--color-emerald-300)}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-emerald-700{background-color:var(--color-emerald-700)}.bg-fuchsia-50{background-color:var(--color-fuchsia-50)}.bg-fuchsia-100{background-color:var(--color-fuchsia-100)}.bg-fuchsia-300{background-color:var(--color-fuchsia-300)}.bg-fuchsia-400{background-color:var(--color-fuchsia-400)}.bg-fuchsia-500{background-color:var(--color-fuchsia-500)}.bg-fuchsia-600{background-color:var(--color-fuchsia-600)}.bg-fuchsia-700{background-color:var(--color-fuchsia-700)}.bg-gray-50{background-color:var(--color-gray-50)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-gray-500{background-color:var(--color-gray-500)}.bg-gray-600{background-color:var(--color-gray-600)}.bg-gray-700{background-color:var(--color-gray-700)}.bg-gray-800{background-color:var(--color-gray-800)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-100{background-color:var(--color-green-100)}.bg-green-200{background-color:var(--color-green-200)}.bg-green-300{background-color:var(--color-green-300)}.bg-green-400{background-color:var(--color-green-400)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-600{background-color:var(--color-green-600)}.bg-green-700{background-color:var(--color-green-700)}.bg-green-800{background-color:var(--color-green-800)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-300{background-color:var(--color-indigo-300)}.bg-indigo-400{background-color:var(--color-indigo-400)}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-indigo-700{background-color:var(--color-indigo-700)}.bg-indigo-800{background-color:var(--color-indigo-800)}.bg-inherit{background-color:inherit}.bg-lime-50{background-color:var(--color-lime-50)}.bg-lime-100{background-color:var(--color-lime-100)}.bg-lime-300{background-color:var(--color-lime-300)}.bg-lime-400{background-color:var(--color-lime-400)}.bg-lime-500{background-color:var(--color-lime-500)}.bg-lime-600{background-color:var(--color-lime-600)}.bg-lime-700{background-color:var(--color-lime-700)}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-200{background-color:var(--color-orange-200)}.bg-orange-300{background-color:var(--color-orange-300)}.bg-orange-400{background-color:var(--color-orange-400)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-600{background-color:var(--color-orange-600)}.bg-orange-700{background-color:var(--color-orange-700)}.bg-pink-50{background-color:var(--color-pink-50)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-pink-300{background-color:var(--color-pink-300)}.bg-pink-400{background-color:var(--color-pink-400)}.bg-pink-500{background-color:var(--color-pink-500)}.bg-pink-600{background-color:var(--color-pink-600)}.bg-pink-700{background-color:var(--color-pink-700)}.bg-pink-800{background-color:var(--color-pink-800)}.bg-primary-50{background-color:#fff5f2}.bg-primary-100{background-color:#fff1ee}.bg-primary-200{background-color:#ffe4de}.bg-primary-300{background-color:#ffd5cc}.bg-primary-400{background-color:#ffbcad}.bg-primary-500{background-color:#fe795d}.bg-primary-600{background-color:#ef562f}.bg-primary-700{background-color:#eb4f27}.bg-primary-800{background-color:#cc4522}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-200{background-color:var(--color-purple-200)}.bg-purple-300{background-color:var(--color-purple-300)}.bg-purple-400{background-color:var(--color-purple-400)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-purple-700{background-color:var(--color-purple-700)}.bg-purple-800{background-color:var(--color-purple-800)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-red-200{background-color:var(--color-red-200)}.bg-red-300{background-color:var(--color-red-300)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-600{background-color:var(--color-red-600)}.bg-red-700{background-color:var(--color-red-700)}.bg-red-900{background-color:var(--color-red-900)}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-300{background-color:var(--color-rose-300)}.bg-rose-400{background-color:var(--color-rose-400)}.bg-rose-500{background-color:var(--color-rose-500)}.bg-rose-600{background-color:var(--color-rose-600)}.bg-rose-700{background-color:var(--color-rose-700)}.bg-rose-800{background-color:var(--color-rose-800)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-300{background-color:var(--color-sky-300)}.bg-sky-400{background-color:var(--color-sky-400)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-sky-600{background-color:var(--color-sky-600)}.bg-sky-700{background-color:var(--color-sky-700)}.bg-teal-50{background-color:var(--color-teal-50)}.bg-teal-100{background-color:var(--color-teal-100)}.bg-teal-300{background-color:var(--color-teal-300)}.bg-teal-400{background-color:var(--color-teal-400)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-600{background-color:var(--color-teal-600)}.bg-teal-700{background-color:var(--color-teal-700)}.bg-transparent{background-color:#0000}.bg-violet-50{background-color:var(--color-violet-50)}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-300{background-color:var(--color-violet-300)}.bg-violet-400{background-color:var(--color-violet-400)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-violet-600{background-color:var(--color-violet-600)}.bg-violet-700{background-color:var(--color-violet-700)}.bg-white{background-color:var(--color-white)}.bg-white\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.bg-white\/30{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.bg-yellow-50{background-color:var(--color-yellow-50)}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-300{background-color:var(--color-yellow-300)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-600{background-color:var(--color-yellow-600)}.bg-yellow-700{background-color:var(--color-yellow-700)}.dark .selectedCell{background-color:var(--color-gray-700)}.bg-linear-to-br{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-br{--tw-gradient-position:to bottom right in oklab}}.bg-linear-to-br{background-image:linear-gradient(var(--tw-gradient-stops))}.bg-linear-to-r{--tw-gradient-position:to right}@supports (background-image:linear-gradient(in lab,red,red)){.bg-linear-to-r{--tw-gradient-position:to right in oklab}}.bg-linear-to-r{background-image:linear-gradient(var(--tw-gradient-stops))}.from-amber-400{--tw-gradient-from:var(--color-amber-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-400{--tw-gradient-from:var(--color-blue-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-blue-500{--tw-gradient-from:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-cyan-400{--tw-gradient-from:var(--color-cyan-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-cyan-500{--tw-gradient-from:var(--color-cyan-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-fuchsia-500{--tw-gradient-from:var(--color-fuchsia-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-green-400{--tw-gradient-from:var(--color-green-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-indigo-600{--tw-gradient-from:var(--color-indigo-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-lime-200{--tw-gradient-from:var(--color-lime-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-orange-400{--tw-gradient-from:var(--color-orange-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-pink-400{--tw-gradient-from:var(--color-pink-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-pink-500{--tw-gradient-from:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-500{--tw-gradient-from:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-purple-600{--tw-gradient-from:var(--color-purple-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-200{--tw-gradient-from:var(--color-red-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-400{--tw-gradient-from:var(--color-red-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-red-600{--tw-gradient-from:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-sky-400{--tw-gradient-from:var(--color-sky-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-teal-200{--tw-gradient-from:var(--color-teal-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-teal-400{--tw-gradient-from:var(--color-teal-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-violet-600{--tw-gradient-from:var(--color-violet-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-yellow-200{--tw-gradient-from:var(--color-yellow-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-blue-600{--tw-gradient-via:var(--color-blue-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-cyan-500{--tw-gradient-via:var(--color-cyan-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-green-500{--tw-gradient-via:var(--color-green-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-indigo-400{--tw-gradient-via:var(--color-indigo-400);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-lime-400{--tw-gradient-via:var(--color-lime-400);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-pink-500{--tw-gradient-via:var(--color-pink-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-purple-600{--tw-gradient-via:var(--color-purple-600);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-red-300{--tw-gradient-via:var(--color-red-300);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-red-500{--tw-gradient-via:var(--color-red-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-teal-500{--tw-gradient-via:var(--color-teal-500);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-500{--tw-gradient-to:var(--color-blue-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-600{--tw-gradient-to:var(--color-blue-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-blue-700{--tw-gradient-to:var(--color-blue-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-cyan-400{--tw-gradient-to:var(--color-cyan-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-cyan-600{--tw-gradient-to:var(--color-cyan-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-emerald-500{--tw-gradient-to:var(--color-emerald-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-emerald-600{--tw-gradient-to:var(--color-emerald-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-green-400{--tw-gradient-to:var(--color-green-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-green-600{--tw-gradient-to:var(--color-green-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-lime-200{--tw-gradient-to:var(--color-lime-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-lime-300{--tw-gradient-to:var(--color-lime-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-lime-500{--tw-gradient-to:var(--color-lime-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-orange-400{--tw-gradient-to:var(--color-orange-400);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-500{--tw-gradient-to:var(--color-pink-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-pink-600{--tw-gradient-to:var(--color-pink-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-purple-500{--tw-gradient-to:var(--color-purple-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-purple-700{--tw-gradient-to:var(--color-purple-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-red-500{--tw-gradient-to:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-red-600{--tw-gradient-to:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-rose-500{--tw-gradient-to:var(--color-rose-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-teal-600{--tw-gradient-to:var(--color-teal-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-yellow-200{--tw-gradient-to:var(--color-yellow-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-yellow-500{--tw-gradient-to:var(--color-yellow-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.fill-amber-500{fill:var(--color-amber-500)}.fill-blue-600{fill:var(--color-blue-600)}.fill-cyan-500{fill:var(--color-cyan-500)}.fill-emerald-500{fill:var(--color-emerald-500)}.fill-fuchsia-600{fill:var(--color-fuchsia-600)}.fill-gray-600{fill:var(--color-gray-600)}.fill-green-500{fill:var(--color-green-500)}.fill-indigo-600{fill:var(--color-indigo-600)}.fill-lime-500{fill:var(--color-lime-500)}.fill-orange-500{fill:var(--color-orange-500)}.fill-pink-600{fill:var(--color-pink-600)}.fill-primary-600{fill:#ef562f}.fill-purple-600{fill:var(--color-purple-600)}.fill-red-600{fill:var(--color-red-600)}.fill-rose-600{fill:var(--color-rose-600)}.fill-sky-500{fill:var(--color-sky-500)}.fill-teal-500{fill:var(--color-teal-500)}.fill-violet-600{fill:var(--color-violet-600)}.fill-yellow-400{fill:var(--color-yellow-400)}.stroke-amber-600{stroke:var(--color-amber-600)}.stroke-blue-600{stroke:var(--color-blue-600)}.stroke-cyan-600{stroke:var(--color-cyan-600)}.stroke-emerald-600{stroke:var(--color-emerald-600)}.stroke-fuchsia-600{stroke:var(--color-fuchsia-600)}.stroke-gray-600{stroke:var(--color-gray-600)}.stroke-green-600{stroke:var(--color-green-600)}.stroke-indigo-600{stroke:var(--color-indigo-600)}.stroke-lime-600{stroke:var(--color-lime-600)}.stroke-orange-600{stroke:var(--color-orange-600)}.stroke-pink-600{stroke:var(--color-pink-600)}.stroke-primary-600{stroke:#ef562f}.stroke-purple-600{stroke:var(--color-purple-600)}.stroke-red-600{stroke:var(--color-red-600)}.stroke-rose-600{stroke:var(--color-rose-600)}.stroke-sky-600{stroke:var(--color-sky-600)}.stroke-teal-600{stroke:var(--color-teal-600)}.stroke-violet-600{stroke:var(--color-violet-600)}.stroke-yellow-400{stroke:var(--color-yellow-400)}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.object-fill{object-fit:fill}.object-none{object-fit:none}.object-scale-down{object-fit:scale-down}.p-0{padding:calc(var(--spacing)*0)}.p-0\!{padding:calc(var(--spacing)*0)!important}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-2\.5{padding:calc(var(--spacing)*2.5)}.p-3{padding:calc(var(--spacing)*3)}.p-3\!{padding:calc(var(--spacing)*3)!important}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-0\!{padding-inline:calc(var(--spacing)*0)!important}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-0{padding-block:calc(var(--spacing)*0)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-3\.5{padding-block:calc(var(--spacing)*3.5)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-8{padding-block:calc(var(--spacing)*8)}.py-14{padding-block:calc(var(--spacing)*14)}.ps-2\.5{padding-inline-start:calc(var(--spacing)*2.5)}.ps-3{padding-inline-start:calc(var(--spacing)*3)}.ps-3\.5{padding-inline-start:calc(var(--spacing)*3.5)}.ps-4{padding-inline-start:calc(var(--spacing)*4)}.ps-6{padding-inline-start:calc(var(--spacing)*6)}.ps-9{padding-inline-start:calc(var(--spacing)*9)}.ps-10{padding-inline-start:calc(var(--spacing)*10)}.ps-11{padding-inline-start:calc(var(--spacing)*11)}.pe-0{padding-inline-end:calc(var(--spacing)*0)}.pe-3\.5{padding-inline-end:calc(var(--spacing)*3.5)}.pe-4{padding-inline-end:calc(var(--spacing)*4)}.pe-9{padding-inline-end:calc(var(--spacing)*9)}.pe-10{padding-inline-end:calc(var(--spacing)*10)}.pe-11{padding-inline-end:calc(var(--spacing)*11)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-8{padding-right:calc(var(--spacing)*8)}.pb-1\.5{padding-bottom:calc(var(--spacing)*1.5)}.pb-2\.5{padding-bottom:calc(var(--spacing)*2.5)}.pl-4{padding-left:calc(var(--spacing)*4)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-7xl{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.text-8xl{font-size:var(--text-8xl);line-height:var(--tw-leading,var(--text-8xl--line-height))}.text-9xl{font-size:var(--text-9xl);line-height:var(--tw-leading,var(--text-9xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-5{--tw-leading:calc(var(--spacing)*5);line-height:calc(var(--spacing)*5)}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.leading-7{--tw-leading:calc(var(--spacing)*7);line-height:calc(var(--spacing)*7)}.leading-8{--tw-leading:calc(var(--spacing)*8);line-height:calc(var(--spacing)*8)}.leading-9{--tw-leading:calc(var(--spacing)*9);line-height:calc(var(--spacing)*9)}.leading-10{--tw-leading:calc(var(--spacing)*10);line-height:calc(var(--spacing)*10)}.leading-loose{--tw-leading:var(--leading-loose);line-height:var(--leading-loose)}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-extralight{--tw-font-weight:var(--font-weight-extralight);font-weight:var(--font-weight-extralight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin{--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-wrap{text-wrap:wrap}.break-words{overflow-wrap:break-word}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-100{color:var(--color-amber-100)}.text-amber-500{color:var(--color-amber-500)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-black{color:var(--color-black)}.text-blue-100{color:var(--color-blue-100)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-blue-900{color:var(--color-blue-900)}.text-cyan-100{color:var(--color-cyan-100)}.text-cyan-500{color:var(--color-cyan-500)}.text-cyan-600{color:var(--color-cyan-600)}.text-cyan-700{color:var(--color-cyan-700)}.text-cyan-800{color:var(--color-cyan-800)}.text-cyan-900{color:var(--color-cyan-900)}.text-emerald-100{color:var(--color-emerald-100)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-fuchsia-100{color:var(--color-fuchsia-100)}.text-fuchsia-500{color:var(--color-fuchsia-500)}.text-fuchsia-600{color:var(--color-fuchsia-600)}.text-fuchsia-700{color:var(--color-fuchsia-700)}.text-fuchsia-800{color:var(--color-fuchsia-800)}.text-fuchsia-900{color:var(--color-fuchsia-900)}.text-gray-100{color:var(--color-gray-100)}.text-gray-200{color:var(--color-gray-200)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-gray-900\!{color:var(--color-gray-900)!important}.text-green-100{color:var(--color-green-100)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-green-900{color:var(--color-green-900)}.text-indigo-100{color:var(--color-indigo-100)}.text-indigo-500{color:var(--color-indigo-500)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-indigo-900{color:var(--color-indigo-900)}.text-inherit{color:inherit}.text-lime-100{color:var(--color-lime-100)}.text-lime-500{color:var(--color-lime-500)}.text-lime-600{color:var(--color-lime-600)}.text-lime-700{color:var(--color-lime-700)}.text-lime-800{color:var(--color-lime-800)}.text-lime-900{color:var(--color-lime-900)}.text-orange-100{color:var(--color-orange-100)}.text-orange-500{color:var(--color-orange-500)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-orange-800{color:var(--color-orange-800)}.text-orange-900{color:var(--color-orange-900)}.text-pink-100{color:var(--color-pink-100)}.text-pink-500{color:var(--color-pink-500)}.text-pink-600{color:var(--color-pink-600)}.text-pink-700{color:var(--color-pink-700)}.text-pink-800{color:var(--color-pink-800)}.text-pink-900{color:var(--color-pink-900)}.text-primary-100{color:#fff1ee}.text-primary-500{color:#fe795d}.text-primary-600{color:#ef562f}.text-primary-700{color:#eb4f27}.text-primary-800{color:#cc4522}.text-primary-900{color:#a5371b}.text-purple-100{color:var(--color-purple-100)}.text-purple-500{color:var(--color-purple-500)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-purple-800{color:var(--color-purple-800)}.text-purple-900{color:var(--color-purple-900)}.text-red-100{color:var(--color-red-100)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-red-900{color:var(--color-red-900)}.text-rose-100{color:var(--color-rose-100)}.text-rose-500{color:var(--color-rose-500)}.text-rose-600{color:var(--color-rose-600)}.text-rose-700{color:var(--color-rose-700)}.text-rose-800{color:var(--color-rose-800)}.text-rose-900{color:var(--color-rose-900)}.text-sky-100{color:var(--color-sky-100)}.text-sky-500{color:var(--color-sky-500)}.text-sky-600{color:var(--color-sky-600)}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-sky-900{color:var(--color-sky-900)}.text-teal-100{color:var(--color-teal-100)}.text-teal-500{color:var(--color-teal-500)}.text-teal-600{color:var(--color-teal-600)}.text-teal-700{color:var(--color-teal-700)}.text-teal-800{color:var(--color-teal-800)}.text-teal-900{color:var(--color-teal-900)}.text-transparent{color:#0000}.text-violet-100{color:var(--color-violet-100)}.text-violet-500{color:var(--color-violet-500)}.text-violet-600{color:var(--color-violet-600)}.text-violet-700{color:var(--color-violet-700)}.text-violet-800{color:var(--color-violet-800)}.text-violet-900{color:var(--color-violet-900)}.text-white{color:var(--color-white)}.text-yellow-100{color:var(--color-yellow-100)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.text-yellow-900{color:var(--color-yellow-900)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.decoration-blue-400{-webkit-text-decoration-color:var(--color-blue-400);text-decoration-color:var(--color-blue-400)}.decoration-cyan-400{-webkit-text-decoration-color:var(--color-cyan-400);text-decoration-color:var(--color-cyan-400)}.decoration-emerald-400{-webkit-text-decoration-color:var(--color-emerald-400);text-decoration-color:var(--color-emerald-400)}.decoration-fuchsia-400{-webkit-text-decoration-color:var(--color-fuchsia-400);text-decoration-color:var(--color-fuchsia-400)}.decoration-gray-400{-webkit-text-decoration-color:var(--color-gray-400);text-decoration-color:var(--color-gray-400)}.decoration-green-400{-webkit-text-decoration-color:var(--color-green-400);text-decoration-color:var(--color-green-400)}.decoration-indigo-400{-webkit-text-decoration-color:var(--color-indigo-400);text-decoration-color:var(--color-indigo-400)}.decoration-lime-400{-webkit-text-decoration-color:var(--color-lime-400);text-decoration-color:var(--color-lime-400)}.decoration-orange-400{-webkit-text-decoration-color:var(--color-orange-400);text-decoration-color:var(--color-orange-400)}.decoration-pink-400{-webkit-text-decoration-color:var(--color-pink-400);text-decoration-color:var(--color-pink-400)}.decoration-primary-400{text-decoration-color:#ffbcad}.decoration-purple-400{-webkit-text-decoration-color:var(--color-purple-400);text-decoration-color:var(--color-purple-400)}.decoration-red-400{-webkit-text-decoration-color:var(--color-red-400);text-decoration-color:var(--color-red-400)}.decoration-rose-400{-webkit-text-decoration-color:var(--color-rose-400);text-decoration-color:var(--color-rose-400)}.decoration-sky-400{-webkit-text-decoration-color:var(--color-sky-400);text-decoration-color:var(--color-sky-400)}.decoration-teal-400{-webkit-text-decoration-color:var(--color-teal-400);text-decoration-color:var(--color-teal-400)}.decoration-violet-400{-webkit-text-decoration-color:var(--color-violet-400);text-decoration-color:var(--color-violet-400)}.decoration-yellow-400{-webkit-text-decoration-color:var(--color-yellow-400);text-decoration-color:var(--color-yellow-400)}.decoration-dashed{text-decoration-style:dashed}.decoration-dotted{text-decoration-style:dotted}.decoration-double{text-decoration-style:double}.decoration-wavy{text-decoration-style:wavy}.decoration-0{text-decoration-thickness:0}.decoration-1{text-decoration-thickness:1px}.decoration-2{text-decoration-thickness:2px}.decoration-4{text-decoration-thickness:4px}.decoration-8{text-decoration-thickness:8px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.placeholder-amber-700::placeholder{color:var(--color-amber-700)}.placeholder-blue-700::placeholder{color:var(--color-blue-700)}.placeholder-cyan-700::placeholder{color:var(--color-cyan-700)}.placeholder-emerald-700::placeholder{color:var(--color-emerald-700)}.placeholder-fuchsia-700::placeholder{color:var(--color-fuchsia-700)}.placeholder-gray-400::placeholder{color:var(--color-gray-400)}.placeholder-gray-700::placeholder{color:var(--color-gray-700)}.placeholder-green-700::placeholder{color:var(--color-green-700)}.placeholder-indigo-700::placeholder{color:var(--color-indigo-700)}.placeholder-lime-700::placeholder{color:var(--color-lime-700)}.placeholder-orange-700::placeholder{color:var(--color-orange-700)}.placeholder-pink-700::placeholder{color:var(--color-pink-700)}.placeholder-primary-700::placeholder{color:#eb4f27}.placeholder-purple-700::placeholder{color:var(--color-purple-700)}.placeholder-red-700::placeholder{color:var(--color-red-700)}.placeholder-rose-700::placeholder{color:var(--color-rose-700)}.placeholder-sky-700::placeholder{color:var(--color-sky-700)}.placeholder-teal-700::placeholder{color:var(--color-teal-700)}.placeholder-violet-700::placeholder{color:var(--color-violet-700)}.placeholder-yellow-700::placeholder{color:var(--color-yellow-700)}.accent-blue-500{accent-color:var(--color-blue-500)}.accent-fuchsia-500{accent-color:var(--color-fuchsia-500)}.accent-gray-500{accent-color:var(--color-gray-500)}.accent-indigo-500{accent-color:var(--color-indigo-500)}.accent-pink-500{accent-color:var(--color-pink-500)}.accent-purple-500{accent-color:var(--color-purple-500)}.accent-red-500{accent-color:var(--color-red-500)}.accent-rose-500{accent-color:var(--color-rose-500)}.accent-violet-500{accent-color:var(--color-violet-500)}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow\!{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_4px_rgba\(34\,197\,94\,0\.2\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,#22c55e33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_4px_rgba\(59\,130\,246\,0\.2\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,#3b82f633);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_4px_rgba\(168\,85\,247\,0\.2\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,#a855f733);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_4px_rgba\(239\,68\,68\,0\.2\)\]{--tw-shadow:0 0 0 4px var(--tw-shadow-color,#ef444433);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-4{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-8{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(8px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-amber-500\/50{--tw-shadow-color:#f99c0080}@supports (color:color-mix(in lab,red,red)){.shadow-amber-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-amber-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab,red,red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)20%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-blue-500\/50{--tw-shadow-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.shadow-blue-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-cyan-500\/50{--tw-shadow-color:#00b7d780}@supports (color:color-mix(in lab,red,red)){.shadow-cyan-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-cyan-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-emerald-500\/50{--tw-shadow-color:#00bb7f80}@supports (color:color-mix(in lab,red,red)){.shadow-emerald-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-emerald-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-fuchsia-500\/50{--tw-shadow-color:#e12afb80}@supports (color:color-mix(in lab,red,red)){.shadow-fuchsia-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-fuchsia-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-gray-500\/50{--tw-shadow-color:#6a728280}@supports (color:color-mix(in lab,red,red)){.shadow-gray-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-gray-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-green-500\/50{--tw-shadow-color:#00c75880}@supports (color:color-mix(in lab,red,red)){.shadow-green-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-green-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-indigo-500\/50{--tw-shadow-color:#625fff80}@supports (color:color-mix(in lab,red,red)){.shadow-indigo-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-indigo-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-lime-500\/50{--tw-shadow-color:#80cd0080}@supports (color:color-mix(in lab,red,red)){.shadow-lime-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-lime-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-orange-500\/50{--tw-shadow-color:#fe6e0080}@supports (color:color-mix(in lab,red,red)){.shadow-orange-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-orange-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-pink-500\/50{--tw-shadow-color:#f6339a80}@supports (color:color-mix(in lab,red,red)){.shadow-pink-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-pink-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-primary-500\/50{--tw-shadow-color:#fe795d80}@supports (color:color-mix(in lab,red,red)){.shadow-primary-500\/50{--tw-shadow-color:color-mix(in oklab,oklab(72.6768% .1406 .0925087/.5) var(--tw-shadow-alpha),transparent)}}.shadow-purple-500\/50{--tw-shadow-color:#ac4bff80}@supports (color:color-mix(in lab,red,red)){.shadow-purple-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-purple-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-red-500\/50{--tw-shadow-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.shadow-red-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-red-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-rose-500\/50{--tw-shadow-color:#ff235780}@supports (color:color-mix(in lab,red,red)){.shadow-rose-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-rose-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-sky-500\/50{--tw-shadow-color:#00a5ef80}@supports (color:color-mix(in lab,red,red)){.shadow-sky-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-sky-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-teal-500\/50{--tw-shadow-color:#00baa780}@supports (color:color-mix(in lab,red,red)){.shadow-teal-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-teal-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-violet-500\/50{--tw-shadow-color:#8d54ff80}@supports (color:color-mix(in lab,red,red)){.shadow-violet-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-violet-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-yellow-500\/50{--tw-shadow-color:#edb20080}@supports (color:color-mix(in lab,red,red)){.shadow-yellow-500\/50{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-yellow-500)50%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-black\/5{--tw-ring-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.ring-black\/5{--tw-ring-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.ring-gray-300{--tw-ring-color:var(--color-gray-300)}.ring-primary-500{--tw-ring-color:#fe795d}.ring-white{--tw-ring-color:var(--color-white)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.outline-4{outline-style:var(--tw-outline-style);outline-width:4px}.outline-green-500{outline-color:var(--color-green-500)}.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-sm{--tw-blur:blur(var(--blur-sm));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-xs{--tw-blur:blur(var(--blur-xs));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{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a))drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a)drop-shadow(0 1px 1px #0000000f);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,)}.grayscale{--tw-grayscale:grayscale(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,)}.hue-rotate-60{--tw-hue-rotate:hue-rotate(60deg);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,)}.saturate-50{--tw-saturate:saturate(50%);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,)}.sepia{--tw-sepia:sepia(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,)}.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,)!important}.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-sm{--tw-backdrop-blur:blur(var(--blur-sm));-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-grayscale{--tw-backdrop-grayscale:grayscale(100%);-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-invert{--tw-backdrop-invert:invert(100%);-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-sepia{--tw-backdrop-sepia:sepia(100%);-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-filter{-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,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.will-change-transform{will-change:transform}.\[contain\:layout_style_paint\]{contain:layout style paint}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.ring-inset{--tw-ring-inset:inset}.not-first\:-ms-4:not(:first-child){margin-inline-start:calc(var(--spacing)*-4)}.not-first\:-ms-px:not(:first-child),.group-not-first\:-ms-px:is(:where(.group):not(:first-child) *){margin-inline-start:-1px}.group-first\:rounded-s-lg:is(:where(.group):first-child *){border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.group-first\:rounded-t-xl:is(:where(.group):first-child *){border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.group-first\:border-t:is(:where(.group):first-child *){border-top-style:var(--tw-border-style);border-top-width:1px}.group-last\:rounded-e-lg:is(:where(.group):last-child *){border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}@media(hover:hover){.group-hover\:rotate-45:is(:where(.group):hover *){rotate:45deg}.group-hover\:bg-white\/50:is(:where(.group):hover *){background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-white\/50:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.group-hover\:text-inherit\!:is(:where(.group):hover *){color:inherit!important}.group-hover\:text-primary-600:is(:where(.group):hover *){color:#ef562f}.group-hover\:opacity-0\!:is(:where(.group):hover *){opacity:0!important}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-focus\:ring-4:is(:where(.group):focus *){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-focus\:ring-white:is(:where(.group):focus *){--tw-ring-color:var(--color-white)}.group-focus\:outline-hidden:is(:where(.group):focus *){--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.group-focus\:outline-hidden:is(:where(.group):focus *){outline-offset:2px;outline:2px solid #0000}}.group-has-\[ul\]\:ms-6:is(:where(.group):has(:is(ul)) *){margin-inline-start:calc(var(--spacing)*6)}.peer-checked\:bg-amber-600:is(:where(.peer):checked~*){background-color:var(--color-amber-600)}.peer-checked\:bg-blue-600:is(:where(.peer):checked~*){background-color:var(--color-blue-600)}.peer-checked\:bg-cyan-600:is(:where(.peer):checked~*){background-color:var(--color-cyan-600)}.peer-checked\:bg-emerald-600:is(:where(.peer):checked~*){background-color:var(--color-emerald-600)}.peer-checked\:bg-fuchsia-600:is(:where(.peer):checked~*){background-color:var(--color-fuchsia-600)}.peer-checked\:bg-gray-500:is(:where(.peer):checked~*){background-color:var(--color-gray-500)}.peer-checked\:bg-green-600:is(:where(.peer):checked~*){background-color:var(--color-green-600)}.peer-checked\:bg-indigo-600:is(:where(.peer):checked~*){background-color:var(--color-indigo-600)}.peer-checked\:bg-lime-500:is(:where(.peer):checked~*){background-color:var(--color-lime-500)}.peer-checked\:bg-orange-500:is(:where(.peer):checked~*){background-color:var(--color-orange-500)}.peer-checked\:bg-pink-600:is(:where(.peer):checked~*){background-color:var(--color-pink-600)}.peer-checked\:bg-primary-600:is(:where(.peer):checked~*){background-color:#ef562f}.peer-checked\:bg-purple-600:is(:where(.peer):checked~*){background-color:var(--color-purple-600)}.peer-checked\:bg-red-600:is(:where(.peer):checked~*){background-color:var(--color-red-600)}.peer-checked\:bg-rose-600:is(:where(.peer):checked~*){background-color:var(--color-rose-600)}.peer-checked\:bg-sky-600:is(:where(.peer):checked~*){background-color:var(--color-sky-600)}.peer-checked\:bg-teal-600:is(:where(.peer):checked~*){background-color:var(--color-teal-600)}.peer-checked\:bg-violet-600:is(:where(.peer):checked~*){background-color:var(--color-violet-600)}.peer-checked\:bg-yellow-400:is(:where(.peer):checked~*){background-color:var(--color-yellow-400)}.peer-placeholder-shown\:start-6:is(:where(.peer):placeholder-shown~*){inset-inline-start:calc(var(--spacing)*6)}.peer-placeholder-shown\:top-1\/2:is(:where(.peer):placeholder-shown~*){top:50%}.peer-placeholder-shown\:-translate-y-1\/2:is(:where(.peer):placeholder-shown~*){--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-placeholder-shown\:translate-y-0:is(:where(.peer):placeholder-shown~*){--tw-translate-y:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-placeholder-shown\:scale-100:is(:where(.peer):placeholder-shown~*){--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.peer-focus\:start-0:is(:where(.peer):focus~*){inset-inline-start:calc(var(--spacing)*0)}.peer-focus\:top-2:is(:where(.peer):focus~*){top:calc(var(--spacing)*2)}.peer-focus\:-translate-y-4:is(:where(.peer):focus~*){--tw-translate-y:calc(var(--spacing)*-4);translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-focus\:-translate-y-6:is(:where(.peer):focus~*){--tw-translate-y:calc(var(--spacing)*-6);translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-focus\:scale-75:is(:where(.peer):focus~*){--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.peer-focus\:px-2:is(:where(.peer):focus~*){padding-inline:calc(var(--spacing)*2)}.peer-focus\:text-amber-600:is(:where(.peer):focus~*){color:var(--color-amber-600)}.peer-focus\:text-blue-600:is(:where(.peer):focus~*){color:var(--color-blue-600)}.peer-focus\:text-cyan-600:is(:where(.peer):focus~*){color:var(--color-cyan-600)}.peer-focus\:text-emerald-600:is(:where(.peer):focus~*){color:var(--color-emerald-600)}.peer-focus\:text-fuchsia-600:is(:where(.peer):focus~*){color:var(--color-fuchsia-600)}.peer-focus\:text-gray-600:is(:where(.peer):focus~*){color:var(--color-gray-600)}.peer-focus\:text-green-600:is(:where(.peer):focus~*){color:var(--color-green-600)}.peer-focus\:text-indigo-600:is(:where(.peer):focus~*){color:var(--color-indigo-600)}.peer-focus\:text-lime-600:is(:where(.peer):focus~*){color:var(--color-lime-600)}.peer-focus\:text-orange-600:is(:where(.peer):focus~*){color:var(--color-orange-600)}.peer-focus\:text-pink-600:is(:where(.peer):focus~*){color:var(--color-pink-600)}.peer-focus\:text-primary-600:is(:where(.peer):focus~*){color:#ef562f}.peer-focus\:text-purple-600:is(:where(.peer):focus~*){color:var(--color-purple-600)}.peer-focus\:text-red-600:is(:where(.peer):focus~*){color:var(--color-red-600)}.peer-focus\:text-rose-600:is(:where(.peer):focus~*){color:var(--color-rose-600)}.peer-focus\:text-sky-600:is(:where(.peer):focus~*){color:var(--color-sky-600)}.peer-focus\:text-teal-600:is(:where(.peer):focus~*){color:var(--color-teal-600)}.peer-focus\:text-violet-600:is(:where(.peer):focus~*){color:var(--color-violet-600)}.peer-focus\:text-yellow-600:is(:where(.peer):focus~*){color:var(--color-yellow-600)}.peer-focus\:ring-4:is(:where(.peer):focus~*){--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.peer-focus\:ring-amber-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-amber-300)}.peer-focus\:ring-blue-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-blue-300)}.peer-focus\:ring-cyan-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-cyan-300)}.peer-focus\:ring-emerald-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-emerald-300)}.peer-focus\:ring-fuchsia-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-fuchsia-300)}.peer-focus\:ring-gray-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-gray-300)}.peer-focus\:ring-green-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-green-300)}.peer-focus\:ring-indigo-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-indigo-300)}.peer-focus\:ring-lime-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-lime-300)}.peer-focus\:ring-orange-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-orange-300)}.peer-focus\:ring-pink-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-pink-300)}.peer-focus\:ring-primary-300:is(:where(.peer):focus~*){--tw-ring-color:#ffd5cc}.peer-focus\:ring-purple-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-purple-300)}.peer-focus\:ring-red-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-red-300)}.peer-focus\:ring-rose-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-rose-300)}.peer-focus\:ring-sky-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-sky-300)}.peer-focus\:ring-teal-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-teal-300)}.peer-focus\:ring-violet-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-violet-300)}.peer-focus\:ring-yellow-300:is(:where(.peer):focus~*){--tw-ring-color:var(--color-yellow-300)}.first-letter\:float-left:first-letter{float:left}.first-letter\:me-3:first-letter{margin-inline-end:calc(var(--spacing)*3)}.first-letter\:text-7xl:first-letter{font-size:var(--text-7xl);line-height:var(--tw-leading,var(--text-7xl--line-height))}.first-letter\:font-bold:first-letter{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.first-letter\:text-gray-900:first-letter{color:var(--color-gray-900)}.first-line\:tracking-widest:first-line{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.first-line\:uppercase:first-line{text-transform:uppercase}.backdrop\:bg-gray-900\/50::backdrop{background-color:#10182880}@supports (color:color-mix(in lab,red,red)){.backdrop\:bg-gray-900\/50::backdrop{background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-\[2px\]:after{content:var(--tw-content);inset-inline-start:2px}.after\:start-\[4px\]:after{content:var(--tw-content);inset-inline-start:4px}.after\:top-0\.5:after{content:var(--tw-content);top:calc(var(--spacing)*.5)}.after\:top-\[2px\]:after{content:var(--tw-content);top:2px}.after\:mx-2:after{content:var(--tw-content);margin-inline:calc(var(--spacing)*2)}.after\:mx-6:after{content:var(--tw-content);margin-inline:calc(var(--spacing)*6)}.after\:\!hidden:after{content:var(--tw-content);display:none!important}.after\:hidden:after{content:var(--tw-content);display:none}.after\:inline-block:after{content:var(--tw-content);display:inline-block}.after\:h-1:after{content:var(--tw-content);height:calc(var(--spacing)*1)}.after\:h-4:after{content:var(--tw-content);height:calc(var(--spacing)*4)}.after\:h-5:after{content:var(--tw-content);height:calc(var(--spacing)*5)}.after\:h-6:after{content:var(--tw-content);height:calc(var(--spacing)*6)}.after\:w-4:after{content:var(--tw-content);width:calc(var(--spacing)*4)}.after\:w-5:after{content:var(--tw-content);width:calc(var(--spacing)*5)}.after\:w-6:after{content:var(--tw-content);width:calc(var(--spacing)*6)}.after\:w-full:after{content:var(--tw-content);width:100%}.after\:rounded-full:after{content:var(--tw-content);border-radius:3.40282e38px}.after\:border:after,.after\:border-1:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:1px}.after\:border-4:after{content:var(--tw-content);border-style:var(--tw-border-style);border-width:4px}.after\:border-b:after{content:var(--tw-content);border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.after\:border-gray-100:after{content:var(--tw-content);border-color:var(--color-gray-100)}.after\:border-gray-200:after{content:var(--tw-content);border-color:var(--color-gray-200)}.after\:border-gray-300:after{content:var(--tw-content);border-color:var(--color-gray-300)}.after\:border-primary-100:after{content:var(--tw-content);border-color:#fff1ee}.after\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\:text-gray-200:after{content:var(--tw-content);color:var(--color-gray-200)}.after\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.after\:content-\[\'\/\'\]:after{--tw-content:"/";content:var(--tw-content)}.after\:content-none:after{content:var(--tw-content);--tw-content:none;content:none}.peer-checked\:after\:translate-x-full:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-checked\:after\:border-white:is(:where(.peer):checked~*):after{content:var(--tw-content);border-color:var(--color-white)}.first\:rounded-s-full:first-child{border-start-start-radius:3.40282e38px;border-end-start-radius:3.40282e38px}.first\:rounded-s-lg:first-child{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.first\:rounded-s-md:first-child{border-start-start-radius:var(--radius-md);border-end-start-radius:var(--radius-md)}.first\:rounded-s-sm:first-child{border-start-start-radius:var(--radius-sm);border-end-start-radius:var(--radius-sm)}.first\:rounded-s-xl:first-child{border-start-start-radius:var(--radius-xl);border-end-start-radius:var(--radius-xl)}.first\:rounded-t-lg:first-child{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.last\:me-0:last-child{margin-inline-end:calc(var(--spacing)*0)}.last\:rounded-e-full:last-child{border-start-end-radius:3.40282e38px;border-end-end-radius:3.40282e38px}.last\:rounded-e-lg:last-child{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.last\:rounded-e-md:last-child{border-start-end-radius:var(--radius-md);border-end-end-radius:var(--radius-md)}.last\:rounded-e-sm:last-child{border-start-end-radius:var(--radius-sm);border-end-end-radius:var(--radius-sm)}.last\:rounded-e-xl:last-child{border-start-end-radius:var(--radius-xl);border-end-end-radius:var(--radius-xl)}.last\:rounded-r-lg:last-child{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.last\:rounded-b-lg:last-child{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.last\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.odd\:bg-amber-500:nth-child(odd){background-color:var(--color-amber-500)}.odd\:bg-blue-500:nth-child(odd){background-color:var(--color-blue-500)}.odd\:bg-cyan-500:nth-child(odd){background-color:var(--color-cyan-500)}.odd\:bg-emerald-500:nth-child(odd){background-color:var(--color-emerald-500)}.odd\:bg-fuchsia-500:nth-child(odd){background-color:var(--color-fuchsia-500)}.odd\:bg-gray-500:nth-child(odd){background-color:var(--color-gray-500)}.odd\:bg-green-500:nth-child(odd){background-color:var(--color-green-500)}.odd\:bg-indigo-500:nth-child(odd){background-color:var(--color-indigo-500)}.odd\:bg-lime-500:nth-child(odd){background-color:var(--color-lime-500)}.odd\:bg-orange-500:nth-child(odd){background-color:var(--color-orange-500)}.odd\:bg-pink-500:nth-child(odd){background-color:var(--color-pink-500)}.odd\:bg-primary-500:nth-child(odd){background-color:#fe795d}.odd\:bg-purple-500:nth-child(odd){background-color:var(--color-purple-500)}.odd\:bg-red-500:nth-child(odd){background-color:var(--color-red-500)}.odd\:bg-rose-500:nth-child(odd){background-color:var(--color-rose-500)}.odd\:bg-sky-500:nth-child(odd){background-color:var(--color-sky-500)}.odd\:bg-teal-500:nth-child(odd){background-color:var(--color-teal-500)}.odd\:bg-violet-500:nth-child(odd){background-color:var(--color-violet-500)}.odd\:bg-white:nth-child(odd){background-color:var(--color-white)}.odd\:bg-yellow-500:nth-child(odd){background-color:var(--color-yellow-500)}.even\:bg-amber-600:nth-child(2n){background-color:var(--color-amber-600)}.even\:bg-blue-600:nth-child(2n){background-color:var(--color-blue-600)}.even\:bg-cyan-600:nth-child(2n){background-color:var(--color-cyan-600)}.even\:bg-emerald-600:nth-child(2n){background-color:var(--color-emerald-600)}.even\:bg-fuchsia-600:nth-child(2n){background-color:var(--color-fuchsia-600)}.even\:bg-gray-50:nth-child(2n){background-color:var(--color-gray-50)}.even\:bg-gray-600:nth-child(2n){background-color:var(--color-gray-600)}.even\:bg-green-600:nth-child(2n){background-color:var(--color-green-600)}.even\:bg-indigo-600:nth-child(2n){background-color:var(--color-indigo-600)}.even\:bg-lime-600:nth-child(2n){background-color:var(--color-lime-600)}.even\:bg-orange-600:nth-child(2n){background-color:var(--color-orange-600)}.even\:bg-pink-600:nth-child(2n){background-color:var(--color-pink-600)}.even\:bg-primary-600:nth-child(2n){background-color:#ef562f}.even\:bg-purple-600:nth-child(2n){background-color:var(--color-purple-600)}.even\:bg-red-600:nth-child(2n){background-color:var(--color-red-600)}.even\:bg-rose-600:nth-child(2n){background-color:var(--color-rose-600)}.even\:bg-sky-600:nth-child(2n){background-color:var(--color-sky-600)}.even\:bg-teal-600:nth-child(2n){background-color:var(--color-teal-600)}.even\:bg-violet-600:nth-child(2n){background-color:var(--color-violet-600)}.even\:bg-yellow-600:nth-child(2n){background-color:var(--color-yellow-600)}.open\:flex:is([open],:popover-open,:open){display:flex}.focus-within\:z-10:focus-within{z-index:10}.focus-within\:border-primary-500:focus-within{border-color:#fe795d}.focus-within\:text-primary-700:focus-within{color:#eb4f27}.focus-within\:ring-0:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-2:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-4:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-amber-300:focus-within{--tw-ring-color:var(--color-amber-300)}.focus-within\:ring-blue-300:focus-within{--tw-ring-color:var(--color-blue-300)}.focus-within\:ring-cyan-300:focus-within{--tw-ring-color:var(--color-cyan-300)}.focus-within\:ring-emerald-300:focus-within{--tw-ring-color:var(--color-emerald-300)}.focus-within\:ring-gray-200:focus-within{--tw-ring-color:var(--color-gray-200)}.focus-within\:ring-gray-300:focus-within{--tw-ring-color:var(--color-gray-300)}.focus-within\:ring-green-300:focus-within{--tw-ring-color:var(--color-green-300)}.focus-within\:ring-indigo-300:focus-within{--tw-ring-color:var(--color-indigo-300)}.focus-within\:ring-lime-300:focus-within{--tw-ring-color:var(--color-lime-300)}.focus-within\:ring-orange-300:focus-within{--tw-ring-color:var(--color-orange-300)}.focus-within\:ring-primary-300:focus-within{--tw-ring-color:#ffd5cc}.focus-within\:ring-primary-500:focus-within{--tw-ring-color:#fe795d}.focus-within\:ring-red-300:focus-within{--tw-ring-color:var(--color-red-300)}.focus-within\:ring-sky-300:focus-within{--tw-ring-color:var(--color-sky-300)}.focus-within\:ring-teal-300:focus-within{--tw-ring-color:var(--color-teal-300)}.focus-within\:ring-violet-300:focus-within{--tw-ring-color:var(--color-violet-300)}.focus-within\:ring-yellow-300:focus-within{--tw-ring-color:var(--color-yellow-300)}.focus-within\:outline-hidden:focus-within{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus-within\:outline-hidden:focus-within{outline-offset:2px;outline:2px solid #0000}}@media(hover:hover){.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:border-gray-300:hover{border-color:var(--color-gray-300)}.hover\:border-gray-400:hover{border-color:var(--color-gray-400)}.hover\:bg-amber-200:hover{background-color:var(--color-amber-200)}.hover\:bg-amber-400:hover{background-color:var(--color-amber-400)}.hover\:bg-amber-500:hover{background-color:var(--color-amber-500)}.hover\:bg-amber-800:hover{background-color:var(--color-amber-800)}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-blue-200:hover{background-color:var(--color-blue-200)}.hover\:bg-blue-400:hover{background-color:var(--color-blue-400)}.hover\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-blue-800:hover{background-color:var(--color-blue-800)}.hover\:bg-cyan-200:hover{background-color:var(--color-cyan-200)}.hover\:bg-cyan-400:hover{background-color:var(--color-cyan-400)}.hover\:bg-cyan-500:hover{background-color:var(--color-cyan-500)}.hover\:bg-cyan-800:hover{background-color:var(--color-cyan-800)}.hover\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\:bg-emerald-400:hover{background-color:var(--color-emerald-400)}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-emerald-800:hover{background-color:var(--color-emerald-800)}.hover\:bg-fuchsia-200:hover{background-color:var(--color-fuchsia-200)}.hover\:bg-fuchsia-400:hover{background-color:var(--color-fuchsia-400)}.hover\:bg-fuchsia-500:hover{background-color:var(--color-fuchsia-500)}.hover\:bg-fuchsia-800:hover{background-color:var(--color-fuchsia-800)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:bg-gray-200:hover{background-color:var(--color-gray-200)}.hover\:bg-gray-300:hover{background-color:var(--color-gray-300)}.hover\:bg-gray-400:hover{background-color:var(--color-gray-400)}.hover\:bg-gray-800:hover{background-color:var(--color-gray-800)}.hover\:bg-gray-900:hover{background-color:var(--color-gray-900)}.hover\:bg-green-200:hover{background-color:var(--color-green-200)}.hover\:bg-green-400:hover{background-color:var(--color-green-400)}.hover\:bg-green-500:hover{background-color:var(--color-green-500)}.hover\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\:bg-green-800:hover{background-color:var(--color-green-800)}.hover\:bg-indigo-200:hover{background-color:var(--color-indigo-200)}.hover\:bg-indigo-400:hover{background-color:var(--color-indigo-400)}.hover\:bg-indigo-500:hover{background-color:var(--color-indigo-500)}.hover\:bg-indigo-800:hover{background-color:var(--color-indigo-800)}.hover\:bg-lime-200:hover{background-color:var(--color-lime-200)}.hover\:bg-lime-400:hover{background-color:var(--color-lime-400)}.hover\:bg-lime-500:hover{background-color:var(--color-lime-500)}.hover\:bg-lime-800:hover{background-color:var(--color-lime-800)}.hover\:bg-orange-200:hover{background-color:var(--color-orange-200)}.hover\:bg-orange-400:hover{background-color:var(--color-orange-400)}.hover\:bg-orange-500:hover{background-color:var(--color-orange-500)}.hover\:bg-orange-800:hover{background-color:var(--color-orange-800)}.hover\:bg-pink-200:hover{background-color:var(--color-pink-200)}.hover\:bg-pink-400:hover{background-color:var(--color-pink-400)}.hover\:bg-pink-500:hover{background-color:var(--color-pink-500)}.hover\:bg-pink-800:hover{background-color:var(--color-pink-800)}.hover\:bg-primary-100:hover{background-color:#fff1ee}.hover\:bg-primary-200:hover{background-color:#ffe4de}.hover\:bg-primary-400:hover{background-color:#ffbcad}.hover\:bg-primary-500:hover{background-color:#fe795d}.hover\:bg-primary-600:hover{background-color:#ef562f}.hover\:bg-primary-800:hover{background-color:#cc4522}.hover\:bg-purple-200:hover{background-color:var(--color-purple-200)}.hover\:bg-purple-400:hover{background-color:var(--color-purple-400)}.hover\:bg-purple-500:hover{background-color:var(--color-purple-500)}.hover\:bg-purple-600:hover{background-color:var(--color-purple-600)}.hover\:bg-purple-800:hover{background-color:var(--color-purple-800)}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-200:hover{background-color:var(--color-red-200)}.hover\:bg-red-400:hover{background-color:var(--color-red-400)}.hover\:bg-red-500:hover{background-color:var(--color-red-500)}.hover\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-red-800:hover{background-color:var(--color-red-800)}.hover\:bg-rose-200:hover{background-color:var(--color-rose-200)}.hover\:bg-rose-400:hover{background-color:var(--color-rose-400)}.hover\:bg-rose-500:hover{background-color:var(--color-rose-500)}.hover\:bg-rose-800:hover{background-color:var(--color-rose-800)}.hover\:bg-sky-200:hover{background-color:var(--color-sky-200)}.hover\:bg-sky-400:hover{background-color:var(--color-sky-400)}.hover\:bg-sky-500:hover{background-color:var(--color-sky-500)}.hover\:bg-sky-800:hover{background-color:var(--color-sky-800)}.hover\:bg-teal-200:hover{background-color:var(--color-teal-200)}.hover\:bg-teal-400:hover{background-color:var(--color-teal-400)}.hover\:bg-teal-500:hover{background-color:var(--color-teal-500)}.hover\:bg-teal-800:hover{background-color:var(--color-teal-800)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:bg-violet-200:hover{background-color:var(--color-violet-200)}.hover\:bg-violet-400:hover{background-color:var(--color-violet-400)}.hover\:bg-violet-500:hover{background-color:var(--color-violet-500)}.hover\:bg-violet-800:hover{background-color:var(--color-violet-800)}.hover\:bg-yellow-200:hover{background-color:var(--color-yellow-200)}.hover\:bg-yellow-400:hover{background-color:var(--color-yellow-400)}.hover\:bg-yellow-500:hover{background-color:var(--color-yellow-500)}.hover\:bg-linear-to-bl:hover{--tw-gradient-position:to bottom left}@supports (background-image:linear-gradient(in lab,red,red)){.hover\:bg-linear-to-bl:hover{--tw-gradient-position:to bottom left in oklab}}.hover\:bg-linear-to-bl:hover{background-image:linear-gradient(var(--tw-gradient-stops))}.hover\:bg-linear-to-br:hover{--tw-gradient-position:to bottom right}@supports (background-image:linear-gradient(in lab,red,red)){.hover\:bg-linear-to-br:hover{--tw-gradient-position:to bottom right in oklab}}.hover\:bg-linear-to-br:hover{background-image:linear-gradient(var(--tw-gradient-stops))}.hover\:bg-linear-to-l:hover{--tw-gradient-position:to left}@supports (background-image:linear-gradient(in lab,red,red)){.hover\:bg-linear-to-l:hover{--tw-gradient-position:to left in oklab}}.hover\:bg-linear-to-l:hover{background-image:linear-gradient(var(--tw-gradient-stops))}.hover\:text-amber-600:hover{color:var(--color-amber-600)}.hover\:text-black:hover{color:var(--color-black)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-cyan-600:hover{color:var(--color-cyan-600)}.hover\:text-emerald-600:hover{color:var(--color-emerald-600)}.hover\:text-fuchsia-600:hover{color:var(--color-fuchsia-600)}.hover\:text-gray-200:hover{color:var(--color-gray-200)}.hover\:text-gray-600:hover{color:var(--color-gray-600)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}.hover\:text-gray-900:hover{color:var(--color-gray-900)}.hover\:text-green-600:hover{color:var(--color-green-600)}.hover\:text-indigo-600:hover{color:var(--color-indigo-600)}.hover\:text-inherit\!:hover{color:inherit!important}.hover\:text-lime-600:hover{color:var(--color-lime-600)}.hover\:text-orange-600:hover{color:var(--color-orange-600)}.hover\:text-pink-600:hover{color:var(--color-pink-600)}.hover\:text-primary-500:hover{color:#fe795d}.hover\:text-primary-600:hover{color:#ef562f}.hover\:text-primary-700:hover{color:#eb4f27}.hover\:text-primary-900:hover{color:#a5371b}.hover\:text-purple-600:hover{color:var(--color-purple-600)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-rose-600:hover{color:var(--color-rose-600)}.hover\:text-sky-600:hover{color:var(--color-sky-600)}.hover\:text-teal-600:hover{color:var(--color-teal-600)}.hover\:text-violet-600:hover{color:var(--color-violet-600)}.hover\:text-white:hover{color:var(--color-white)}.hover\:text-yellow-600:hover{color:var(--color-yellow-600)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-75:hover{opacity:.75}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:blur-none:hover{--tw-blur: ;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,)}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);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,)}.hover\:grayscale-0:hover{--tw-grayscale:grayscale(0%);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,)}.hover\:hue-rotate-0:hover{--tw-hue-rotate:hue-rotate(0deg);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,)}.hover\:invert-0:hover{--tw-invert:invert(0%);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,)}.hover\:saturate-100:hover{--tw-saturate:saturate(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,)}.hover\:sepia-0:hover{--tw-sepia:sepia(0%);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\:z-40:focus{z-index:40}.focus\:border-amber-600:focus{border-color:var(--color-amber-600)}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:border-blue-600:focus{border-color:var(--color-blue-600)}.focus\:border-cyan-600:focus{border-color:var(--color-cyan-600)}.focus\:border-emerald-600:focus{border-color:var(--color-emerald-600)}.focus\:border-fuchsia-600:focus{border-color:var(--color-fuchsia-600)}.focus\:border-gray-200:focus{border-color:var(--color-gray-200)}.focus\:border-gray-600:focus{border-color:var(--color-gray-600)}.focus\:border-green-600:focus{border-color:var(--color-green-600)}.focus\:border-indigo-600:focus{border-color:var(--color-indigo-600)}.focus\:border-lime-600:focus{border-color:var(--color-lime-600)}.focus\:border-orange-600:focus{border-color:var(--color-orange-600)}.focus\:border-pink-600:focus{border-color:var(--color-pink-600)}.focus\:border-primary-500:focus{border-color:#fe795d}.focus\:border-primary-600:focus{border-color:#ef562f}.focus\:border-purple-600:focus{border-color:var(--color-purple-600)}.focus\:border-red-600:focus{border-color:var(--color-red-600)}.focus\:border-rose-600:focus{border-color:var(--color-rose-600)}.focus\:border-sky-600:focus{border-color:var(--color-sky-600)}.focus\:border-teal-600:focus{border-color:var(--color-teal-600)}.focus\:border-violet-600:focus{border-color:var(--color-violet-600)}.focus\:border-yellow-600:focus{border-color:var(--color-yellow-600)}.focus\:bg-gray-400:focus{background-color:var(--color-gray-400)}.focus\:text-primary-700:focus{color:#eb4f27}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-4:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(4px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-amber-400:focus{--tw-ring-color:var(--color-amber-400)}.focus\:ring-amber-500:focus{--tw-ring-color:var(--color-amber-500)}.focus\:ring-amber-600:focus{--tw-ring-color:var(--color-amber-600)}.focus\:ring-blue-300:focus{--tw-ring-color:var(--color-blue-300)}.focus\:ring-blue-400:focus{--tw-ring-color:var(--color-blue-400)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\:ring-cyan-300:focus{--tw-ring-color:var(--color-cyan-300)}.focus\:ring-cyan-400:focus{--tw-ring-color:var(--color-cyan-400)}.focus\:ring-cyan-500:focus{--tw-ring-color:var(--color-cyan-500)}.focus\:ring-cyan-600:focus{--tw-ring-color:var(--color-cyan-600)}.focus\:ring-emerald-400:focus{--tw-ring-color:var(--color-emerald-400)}.focus\:ring-emerald-500:focus{--tw-ring-color:var(--color-emerald-500)}.focus\:ring-emerald-600:focus{--tw-ring-color:var(--color-emerald-600)}.focus\:ring-fuchsia-400:focus{--tw-ring-color:var(--color-fuchsia-400)}.focus\:ring-fuchsia-500:focus{--tw-ring-color:var(--color-fuchsia-500)}.focus\:ring-fuchsia-600:focus{--tw-ring-color:var(--color-fuchsia-600)}.focus\:ring-gray-200:focus{--tw-ring-color:var(--color-gray-200)}.focus\:ring-gray-300:focus{--tw-ring-color:var(--color-gray-300)}.focus\:ring-gray-400:focus{--tw-ring-color:var(--color-gray-400)}.focus\:ring-gray-500:focus{--tw-ring-color:var(--color-gray-500)}.focus\:ring-gray-600:focus{--tw-ring-color:var(--color-gray-600)}.focus\:ring-green-200:focus{--tw-ring-color:var(--color-green-200)}.focus\:ring-green-300:focus{--tw-ring-color:var(--color-green-300)}.focus\:ring-green-400:focus{--tw-ring-color:var(--color-green-400)}.focus\:ring-green-500:focus{--tw-ring-color:var(--color-green-500)}.focus\:ring-green-600:focus{--tw-ring-color:var(--color-green-600)}.focus\:ring-indigo-400:focus{--tw-ring-color:var(--color-indigo-400)}.focus\:ring-indigo-500:focus{--tw-ring-color:var(--color-indigo-500)}.focus\:ring-indigo-700:focus{--tw-ring-color:var(--color-indigo-700)}.focus\:ring-lime-200:focus{--tw-ring-color:var(--color-lime-200)}.focus\:ring-lime-300:focus{--tw-ring-color:var(--color-lime-300)}.focus\:ring-lime-400:focus{--tw-ring-color:var(--color-lime-400)}.focus\:ring-lime-500:focus{--tw-ring-color:var(--color-lime-500)}.focus\:ring-lime-700:focus{--tw-ring-color:var(--color-lime-700)}.focus\:ring-orange-400:focus{--tw-ring-color:var(--color-orange-400)}.focus\:ring-orange-500:focus{--tw-ring-color:var(--color-orange-500)}.focus\:ring-orange-600:focus{--tw-ring-color:var(--color-orange-600)}.focus\:ring-pink-200:focus{--tw-ring-color:var(--color-pink-200)}.focus\:ring-pink-300:focus{--tw-ring-color:var(--color-pink-300)}.focus\:ring-pink-400:focus{--tw-ring-color:var(--color-pink-400)}.focus\:ring-pink-500:focus{--tw-ring-color:var(--color-pink-500)}.focus\:ring-pink-600:focus{--tw-ring-color:var(--color-pink-600)}.focus\:ring-primary-300:focus{--tw-ring-color:#ffd5cc}.focus\:ring-primary-400:focus{--tw-ring-color:#ffbcad}.focus\:ring-primary-500:focus{--tw-ring-color:#fe795d}.focus\:ring-primary-700:focus{--tw-ring-color:#eb4f27}.focus\:ring-purple-200:focus{--tw-ring-color:var(--color-purple-200)}.focus\:ring-purple-300:focus{--tw-ring-color:var(--color-purple-300)}.focus\:ring-purple-400:focus{--tw-ring-color:var(--color-purple-400)}.focus\:ring-purple-500:focus{--tw-ring-color:var(--color-purple-500)}.focus\:ring-purple-600:focus{--tw-ring-color:var(--color-purple-600)}.focus\:ring-red-100:focus{--tw-ring-color:var(--color-red-100)}.focus\:ring-red-300:focus{--tw-ring-color:var(--color-red-300)}.focus\:ring-red-400:focus{--tw-ring-color:var(--color-red-400)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-red-600:focus{--tw-ring-color:var(--color-red-600)}.focus\:ring-rose-400:focus{--tw-ring-color:var(--color-rose-400)}.focus\:ring-rose-500:focus{--tw-ring-color:var(--color-rose-500)}.focus\:ring-rose-600:focus{--tw-ring-color:var(--color-rose-600)}.focus\:ring-sky-400:focus{--tw-ring-color:var(--color-sky-400)}.focus\:ring-sky-500:focus{--tw-ring-color:var(--color-sky-500)}.focus\:ring-sky-600:focus{--tw-ring-color:var(--color-sky-600)}.focus\:ring-teal-300:focus{--tw-ring-color:var(--color-teal-300)}.focus\:ring-teal-400:focus{--tw-ring-color:var(--color-teal-400)}.focus\:ring-teal-500:focus{--tw-ring-color:var(--color-teal-500)}.focus\:ring-teal-600:focus{--tw-ring-color:var(--color-teal-600)}.focus\:ring-violet-400:focus{--tw-ring-color:var(--color-violet-400)}.focus\:ring-violet-500:focus{--tw-ring-color:var(--color-violet-500)}.focus\:ring-violet-600:focus{--tw-ring-color:var(--color-violet-600)}.focus\:ring-yellow-400:focus{--tw-ring-color:var(--color-yellow-400)}.focus\:ring-yellow-500:focus{--tw-ring-color:var(--color-yellow-500)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline:focus{outline-style:var(--tw-outline-style);outline-width:1px}.focus\:outline-2:focus{outline-style:var(--tw-outline-style);outline-width:2px}.focus\:-outline-offset-2:focus{outline-offset:-2px}.focus\:outline-blue-500:focus{outline-color:var(--color-blue-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus\:first\:rounded-s-lg:focus:first-child{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.focus\:first\:rounded-t-lg:focus:first-child{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.focus\:last\:rounded-e-lg:focus:last-child{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.focus\:last\:rounded-b-lg:focus:last-child{border-bottom-right-radius:var(--radius-lg);border-bottom-left-radius:var(--radius-lg)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-gray-300:focus-visible{--tw-ring-color:var(--color-gray-300)}.focus-visible\:ring-primary-500:focus-visible{--tw-ring-color:#fe795d}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:text-gray-400:disabled{color:var(--color-gray-400)}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-primary-600[aria-selected=true]{background-color:#ef562f}.aria-selected\:text-primary-100[aria-selected=true]{color:#fff1ee}.aria-selected\:text-white[aria-selected=true]{color:var(--color-white)}@media(hover:hover){.data-\[selected\=false\]\:hover\:bg-amber-50[data-selected=false]:hover{background-color:var(--color-amber-50)}.data-\[selected\=false\]\:hover\:bg-blue-50[data-selected=false]:hover{background-color:var(--color-blue-50)}.data-\[selected\=false\]\:hover\:bg-cyan-50[data-selected=false]:hover{background-color:var(--color-cyan-50)}.data-\[selected\=false\]\:hover\:bg-emerald-50[data-selected=false]:hover{background-color:var(--color-emerald-50)}.data-\[selected\=false\]\:hover\:bg-fuchsia-50[data-selected=false]:hover{background-color:var(--color-fuchsia-50)}.data-\[selected\=false\]\:hover\:bg-gray-100[data-selected=false]:hover{background-color:var(--color-gray-100)}.data-\[selected\=false\]\:hover\:bg-green-50[data-selected=false]:hover{background-color:var(--color-green-50)}.data-\[selected\=false\]\:hover\:bg-indigo-50[data-selected=false]:hover{background-color:var(--color-indigo-50)}.data-\[selected\=false\]\:hover\:bg-lime-50[data-selected=false]:hover{background-color:var(--color-lime-50)}.data-\[selected\=false\]\:hover\:bg-orange-50[data-selected=false]:hover{background-color:var(--color-orange-50)}.data-\[selected\=false\]\:hover\:bg-pink-50[data-selected=false]:hover{background-color:var(--color-pink-50)}.data-\[selected\=false\]\:hover\:bg-purple-50[data-selected=false]:hover{background-color:var(--color-purple-50)}.data-\[selected\=false\]\:hover\:bg-red-50[data-selected=false]:hover{background-color:var(--color-red-50)}.data-\[selected\=false\]\:hover\:bg-rose-50[data-selected=false]:hover{background-color:var(--color-rose-50)}.data-\[selected\=false\]\:hover\:bg-sky-50[data-selected=false]:hover{background-color:var(--color-sky-50)}.data-\[selected\=false\]\:hover\:bg-teal-50[data-selected=false]:hover{background-color:var(--color-teal-50)}.data-\[selected\=false\]\:hover\:bg-violet-50[data-selected=false]:hover{background-color:var(--color-violet-50)}.data-\[selected\=false\]\:hover\:bg-yellow-50[data-selected=false]:hover{background-color:var(--color-yellow-50)}}.data-\[selected\=true\]\:bg-amber-200[data-selected=true]{background-color:var(--color-amber-200)}.data-\[selected\=true\]\:bg-blue-200[data-selected=true]{background-color:var(--color-blue-200)}.data-\[selected\=true\]\:bg-cyan-200[data-selected=true]{background-color:var(--color-cyan-200)}.data-\[selected\=true\]\:bg-emerald-200[data-selected=true]{background-color:var(--color-emerald-200)}.data-\[selected\=true\]\:bg-fuchsia-200[data-selected=true]{background-color:var(--color-fuchsia-200)}.data-\[selected\=true\]\:bg-gray-200[data-selected=true]{background-color:var(--color-gray-200)}.data-\[selected\=true\]\:bg-green-200[data-selected=true]{background-color:var(--color-green-200)}.data-\[selected\=true\]\:bg-indigo-200[data-selected=true]{background-color:var(--color-indigo-200)}.data-\[selected\=true\]\:bg-lime-200[data-selected=true]{background-color:var(--color-lime-200)}.data-\[selected\=true\]\:bg-orange-200[data-selected=true]{background-color:var(--color-orange-200)}.data-\[selected\=true\]\:bg-pink-200[data-selected=true]{background-color:var(--color-pink-200)}.data-\[selected\=true\]\:bg-primary-200[data-selected=true]{background-color:#ffe4de}.data-\[selected\=true\]\:bg-purple-200[data-selected=true]{background-color:var(--color-purple-200)}.data-\[selected\=true\]\:bg-red-200[data-selected=true]{background-color:var(--color-red-200)}.data-\[selected\=true\]\:bg-rose-200[data-selected=true]{background-color:var(--color-rose-200)}.data-\[selected\=true\]\:bg-sky-200[data-selected=true]{background-color:var(--color-sky-200)}.data-\[selected\=true\]\:bg-teal-200[data-selected=true]{background-color:var(--color-teal-200)}.data-\[selected\=true\]\:bg-violet-200[data-selected=true]{background-color:var(--color-violet-200)}.data-\[selected\=true\]\:bg-yellow-200[data-selected=true]{background-color:var(--color-yellow-200)}.data-\[state\=completed\]\:bg-blue-500[data-state=completed]{background-color:var(--color-blue-500)}.data-\[state\=completed\]\:bg-gray-400[data-state=completed]{background-color:var(--color-gray-400)}.data-\[state\=completed\]\:bg-green-500[data-state=completed]{background-color:var(--color-green-500)}.data-\[state\=completed\]\:bg-indigo-500[data-state=completed]{background-color:var(--color-indigo-500)}.data-\[state\=completed\]\:bg-pink-500[data-state=completed]{background-color:var(--color-pink-500)}.data-\[state\=completed\]\:bg-primary-500[data-state=completed]{background-color:#fe795d}.data-\[state\=completed\]\:bg-purple-500[data-state=completed]{background-color:var(--color-purple-500)}.data-\[state\=completed\]\:bg-red-600[data-state=completed]{background-color:var(--color-red-600)}.data-\[state\=completed\]\:bg-yellow-400[data-state=completed]{background-color:var(--color-yellow-400)}.data-\[state\=current\]\:bg-blue-800[data-state=current]{background-color:var(--color-blue-800)}.data-\[state\=current\]\:bg-gray-700[data-state=current]{background-color:var(--color-gray-700)}.data-\[state\=current\]\:bg-green-800[data-state=current]{background-color:var(--color-green-800)}.data-\[state\=current\]\:bg-indigo-800[data-state=current]{background-color:var(--color-indigo-800)}.data-\[state\=current\]\:bg-pink-800[data-state=current]{background-color:var(--color-pink-800)}.data-\[state\=current\]\:bg-primary-800[data-state=current]{background-color:#cc4522}.data-\[state\=current\]\:bg-purple-800[data-state=current]{background-color:var(--color-purple-800)}.data-\[state\=current\]\:bg-red-900[data-state=current]{background-color:var(--color-red-900)}.data-\[state\=current\]\:bg-yellow-600[data-state=current]{background-color:var(--color-yellow-600)}@media(min-width:40rem){.sm\:static{position:static}.sm\:z-auto{z-index:auto}.sm\:order-last{order:9999}.sm\:ms-2{margin-inline-start:calc(var(--spacing)*2)}.sm\:ms-4{margin-inline-start:calc(var(--spacing)*4)}.sm\:mb-0{margin-bottom:calc(var(--spacing)*0)}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:grid{display:grid}.sm\:hidden{display:none}.sm\:inline-flex{display:inline-flex}.sm\:h-4{height:calc(var(--spacing)*4)}.sm\:h-6{height:calc(var(--spacing)*6)}.sm\:h-7{height:calc(var(--spacing)*7)}.sm\:h-10{height:calc(var(--spacing)*10)}.sm\:h-18{height:calc(var(--spacing)*18)}.sm\:h-64{height:calc(var(--spacing)*64)}.sm\:w-4{width:calc(var(--spacing)*4)}.sm\:w-6{width:calc(var(--spacing)*6)}.sm\:w-10{width:calc(var(--spacing)*10)}.sm\:w-96{width:calc(var(--spacing)*96)}.sm\:w-auto{width:auto}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}:where(.sm\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.sm\:space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}:where(.sm\:space-x-8>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*8)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-x-reverse)))}:where(.sm\:divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px*var(--tw-divide-x-reverse));border-inline-end-width:calc(1px*calc(1 - var(--tw-divide-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius-lg)}.sm\:rounded-none{border-radius:0}.sm\:border-0{border-style:var(--tw-border-style);border-width:0}.sm\:border-none{--tw-border-style:none;border-style:none}.sm\:bg-inherit{background-color:inherit}.sm\:bg-transparent{background-color:#0000}.sm\:p-2{padding:calc(var(--spacing)*2)}.sm\:p-4{padding:calc(var(--spacing)*4)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:px-0{padding-inline:calc(var(--spacing)*0)}.sm\:px-4{padding-inline:calc(var(--spacing)*4)}.sm\:ps-0{padding-inline-start:calc(var(--spacing)*0)}.sm\:pe-0{padding-inline-end:calc(var(--spacing)*0)}.sm\:text-center{text-align:center}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.sm\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.sm\:text-primary-700{color:#eb4f27}.sm\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.sm\:after\:hidden:after{content:var(--tw-content);display:none}.sm\:after\:inline-block:after{content:var(--tw-content);display:inline-block}.sm\:after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}@media(hover:hover){.sm\:hover\:bg-transparent:hover{background-color:#0000}.sm\:hover\:text-primary-700:hover{color:#eb4f27}}}@media(min-width:48rem){.md\:static{position:static}.md\:end-auto{inset-inline-end:auto}.md\:top-auto{top:auto}.md\:z-auto{z-index:auto}.md\:ms-2{margin-inline-start:calc(var(--spacing)*2)}.md\:me-6{margin-inline-end:calc(var(--spacing)*6)}.md\:mt-0{margin-top:calc(var(--spacing)*0)}.md\:mt-3{margin-top:calc(var(--spacing)*3)}.md\:mb-3{margin-bottom:calc(var(--spacing)*3)}.md\:block{display:block}.md\:flex{display:flex}.md\:grid{display:grid}.md\:hidden{display:none}.md\:h-\[8px\]{height:8px}.md\:h-\[21px\]{height:21px}.md\:h-\[42px\]{height:42px}.md\:h-\[95px\]{height:95px}.md\:h-\[262px\]{height:262px}.md\:h-\[278px\]{height:278px}.md\:h-\[294px\]{height:294px}.md\:h-\[654px\]{height:654px}.md\:h-\[682px\]{height:682px}.md\:h-auto{height:auto}.md\:w-1\/3{width:33.3333%}.md\:w-2\/3{width:66.6667%}.md\:w-48{width:calc(var(--spacing)*48)}.md\:w-\[96px\]{width:96px}.md\:w-auto{width:auto}.md\:w-full{width:100%}.md\:max-w-\[142px\]{max-width:142px}.md\:max-w-\[512px\]{max-width:512px}.md\:max-w-\[597px\]{max-width:597px}.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\:flex-row{flex-direction:row}.md\:flex-row-reverse{flex-direction:row-reverse}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:gap-4{gap:calc(var(--spacing)*4)}.md\:gap-8{gap:calc(var(--spacing)*8)}:where(.md\:space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}.md\:gap-x-0{column-gap:calc(var(--spacing)*0)}:where(.md\:space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*3)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-x-reverse)))}:where(.md\:space-x-8>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*8)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*8)*calc(1 - var(--tw-space-x-reverse)))}.md\:rounded-none{border-radius:0}.md\:rounded-s-lg{border-start-start-radius:var(--radius-lg);border-end-start-radius:var(--radius-lg)}.md\:rounded-e-lg{border-start-end-radius:var(--radius-lg);border-end-end-radius:var(--radius-lg)}.md\:border-0{border-style:var(--tw-border-style);border-width:0}.md\:border-none{--tw-border-style:none;border-style:none}.md\:bg-inherit{background-color:inherit}.md\:bg-transparent{background-color:#0000}.md\:p-2{padding:calc(var(--spacing)*2)}.md\:p-3{padding:calc(var(--spacing)*3)}.md\:p-4{padding:calc(var(--spacing)*4)}.md\:p-5{padding:calc(var(--spacing)*5)}.md\:p-6{padding:calc(var(--spacing)*6)}.md\:p-7{padding:calc(var(--spacing)*7)}.md\:p-16{padding:calc(var(--spacing)*16)}.md\:px-2{padding-inline:calc(var(--spacing)*2)}.md\:px-6{padding-inline:calc(var(--spacing)*6)}.md\:py-8{padding-block:calc(var(--spacing)*8)}.md\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.md\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.md\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.md\:text-primary-700{color:#eb4f27}.md\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.md\:hover\:bg-transparent:hover{background-color:#0000}.md\:hover\:text-primary-700:hover{color:#eb4f27}}}@media(min-width:64rem){.lg\:static{position:static}.lg\:z-auto{z-index:auto}.lg\:block{display:block}.lg\:hidden{display:none}.lg\:h-6{height:calc(var(--spacing)*6)}.lg\:h-12{height:calc(var(--spacing)*12)}.lg\:w-6{width:calc(var(--spacing)*6)}.lg\:w-12{width:calc(var(--spacing)*12)}.lg\:w-auto{width:auto}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:rounded-none{border-radius:0}.lg\:border-0{border-style:var(--tw-border-style);border-width:0}.lg\:border-none{--tw-border-style:none;border-style:none}.lg\:bg-inherit{background-color:inherit}.lg\:bg-transparent{background-color:#0000}.lg\:p-2{padding:calc(var(--spacing)*2)}.lg\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.lg\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.lg\:text-primary-700{color:#eb4f27}.lg\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@media(hover:hover){.lg\:hover\:bg-transparent:hover{background-color:#0000}.lg\:hover\:text-primary-700:hover{color:#eb4f27}}}@media(min-width:80rem){.xl\:static{position:static}.xl\:z-auto{z-index:auto}.xl\:block{display:block}.xl\:hidden{display:none}.xl\:h-80{height:calc(var(--spacing)*80)}.xl\:w-auto{width:auto}.xl\:flex-row{flex-direction:row}.xl\:rounded-none{border-radius:0}.xl\:border-0{border-style:var(--tw-border-style);border-width:0}.xl\:border-none{--tw-border-style:none;border-style:none}.xl\:bg-inherit{background-color:inherit}.xl\:bg-transparent{background-color:#0000}.xl\:p-2{padding:calc(var(--spacing)*2)}.xl\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.xl\:font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.xl\:text-primary-700{color:#eb4f27}.xl\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.xl\:after\:mx-10:after{content:var(--tw-content);margin-inline:calc(var(--spacing)*10)}@media(hover:hover){.xl\:hover\:bg-transparent:hover{background-color:#0000}.xl\:hover\:text-primary-700:hover{color:#eb4f27}}}@media(min-width:96rem){.\32xl\:block{display:block}.\32xl\:hidden{display:none}.\32xl\:h-96{height:calc(var(--spacing)*96)}}.rtl\:origin-right:where(:dir(rtl),[dir=rtl],[dir=rtl] *){transform-origin:100%}.rtl\:-translate-x-1\/3:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x:calc(calc(1/3*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.rtl\:translate-x-1\/2:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x: 50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rtl\:translate-x-1\/3:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-translate-x:calc(1/3*100%);translate:var(--tw-translate-x)var(--tw-translate-y)}.rtl\:-scale-x-100:where(:dir(rtl),[dir=rtl],[dir=rtl] *){--tw-scale-x: -100% ;scale:var(--tw-scale-x)var(--tw-scale-y)}.rtl\:rotate-180:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:180deg}.rtl\:rotate-\[270deg\]:where(:dir(rtl),[dir=rtl],[dir=rtl] *){rotate:270deg}:where(.rtl\:space-x-reverse:where(:dir(rtl),[dir=rtl],[dir=rtl] *)>:not(:last-child)){--tw-space-x-reverse:1}.rtl\:text-right:where(:dir(rtl),[dir=rtl],[dir=rtl] *){text-align:right}:where(.rtl\:divide-x-reverse:where(:dir(rtl),[dir=rtl],[dir=rtl] *)>:not(:last-child)){--tw-divide-x-reverse:1}.rtl\:peer-focus\:left-auto:where(:dir(rtl),[dir=rtl],[dir=rtl] *):is(:where(.peer):focus~*){left:auto}.rtl\:peer-focus\:translate-x-1\/4:where(:dir(rtl),[dir=rtl],[dir=rtl] *):is(:where(.peer):focus~*){--tw-translate-x: 25% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.peer-checked\:rtl\:after\:-translate-x-full:is(:where(.peer):checked~*):where(:dir(rtl),[dir=rtl],[dir=rtl] *):after{content:var(--tw-content);--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}:where(.dark\:divide-amber-800:is(.dark *)>:not(:last-child)){border-color:var(--color-amber-800)}:where(.dark\:divide-blue-800:is(.dark *)>:not(:last-child)){border-color:var(--color-blue-800)}:where(.dark\:divide-cyan-800:is(.dark *)>:not(:last-child)){border-color:var(--color-cyan-800)}:where(.dark\:divide-emerald-800:is(.dark *)>:not(:last-child)){border-color:var(--color-emerald-800)}:where(.dark\:divide-fuchsia-800:is(.dark *)>:not(:last-child)){border-color:var(--color-fuchsia-800)}:where(.dark\:divide-gray-500:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-500)}:where(.dark\:divide-gray-600:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-600)}:where(.dark\:divide-gray-700:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-700)}:where(.dark\:divide-gray-800:is(.dark *)>:not(:last-child)){border-color:var(--color-gray-800)}:where(.dark\:divide-green-800:is(.dark *)>:not(:last-child)){border-color:var(--color-green-800)}:where(.dark\:divide-indigo-800:is(.dark *)>:not(:last-child)){border-color:var(--color-indigo-800)}:where(.dark\:divide-inherit:is(.dark *)>:not(:last-child)){border-color:inherit}:where(.dark\:divide-lime-800:is(.dark *)>:not(:last-child)){border-color:var(--color-lime-800)}:where(.dark\:divide-orange-800:is(.dark *)>:not(:last-child)){border-color:var(--color-orange-800)}:where(.dark\:divide-pink-800:is(.dark *)>:not(:last-child)){border-color:var(--color-pink-800)}:where(.dark\:divide-primary-200:is(.dark *)>:not(:last-child)){border-color:#ffe4de}:where(.dark\:divide-primary-800:is(.dark *)>:not(:last-child)){border-color:#cc4522}:where(.dark\:divide-purple-800:is(.dark *)>:not(:last-child)){border-color:var(--color-purple-800)}:where(.dark\:divide-red-800:is(.dark *)>:not(:last-child)){border-color:var(--color-red-800)}:where(.dark\:divide-rose-800:is(.dark *)>:not(:last-child)){border-color:var(--color-rose-800)}:where(.dark\:divide-sky-800:is(.dark *)>:not(:last-child)){border-color:var(--color-sky-800)}:where(.dark\:divide-teal-800:is(.dark *)>:not(:last-child)){border-color:var(--color-teal-800)}:where(.dark\:divide-violet-800:is(.dark *)>:not(:last-child)){border-color:var(--color-violet-800)}:where(.dark\:divide-yellow-800:is(.dark *)>:not(:last-child)){border-color:var(--color-yellow-800)}.dark\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.dark\:border-0:is(.dark *){border-style:var(--tw-border-style);border-width:0}.dark\:border-amber-400:is(.dark *){border-color:var(--color-amber-400)}.dark\:border-amber-700:is(.dark *){border-color:var(--color-amber-700)}.dark\:border-amber-800:is(.dark *){border-color:var(--color-amber-800)}.dark\:border-blue-400:is(.dark *){border-color:var(--color-blue-400)}.dark\:border-blue-500:is(.dark *){border-color:var(--color-blue-500)}.dark\:border-blue-700:is(.dark *){border-color:var(--color-blue-700)}.dark\:border-blue-800:is(.dark *){border-color:var(--color-blue-800)}.dark\:border-cyan-400:is(.dark *){border-color:var(--color-cyan-400)}.dark\:border-cyan-700:is(.dark *){border-color:var(--color-cyan-700)}.dark\:border-cyan-800:is(.dark *){border-color:var(--color-cyan-800)}.dark\:border-emerald-400:is(.dark *){border-color:var(--color-emerald-400)}.dark\:border-emerald-700:is(.dark *){border-color:var(--color-emerald-700)}.dark\:border-emerald-800:is(.dark *){border-color:var(--color-emerald-800)}.dark\:border-fuchsia-400:is(.dark *){border-color:var(--color-fuchsia-400)}.dark\:border-fuchsia-700:is(.dark *){border-color:var(--color-fuchsia-700)}.dark\:border-fuchsia-800:is(.dark *){border-color:var(--color-fuchsia-800)}.dark\:border-gray-200:is(.dark *){border-color:var(--color-gray-200)}.dark\:border-gray-300:is(.dark *){border-color:var(--color-gray-300)}.dark\:border-gray-400:is(.dark *){border-color:var(--color-gray-400)}.dark\:border-gray-500:is(.dark *){border-color:var(--color-gray-500)}.dark\:border-gray-600:is(.dark *){border-color:var(--color-gray-600)}.dark\:border-gray-700:is(.dark *){border-color:var(--color-gray-700)}.dark\:border-gray-800:is(.dark *){border-color:var(--color-gray-800)}.dark\:border-gray-900:is(.dark *){border-color:var(--color-gray-900)}.dark\:border-green-400:is(.dark *){border-color:var(--color-green-400)}.dark\:border-green-500:is(.dark *){border-color:var(--color-green-500)}.dark\:border-green-700:is(.dark *){border-color:var(--color-green-700)}.dark\:border-green-800:is(.dark *){border-color:var(--color-green-800)}.dark\:border-indigo-400:is(.dark *){border-color:var(--color-indigo-400)}.dark\:border-indigo-700:is(.dark *){border-color:var(--color-indigo-700)}.dark\:border-indigo-800:is(.dark *){border-color:var(--color-indigo-800)}.dark\:border-inherit:is(.dark *){border-color:inherit}.dark\:border-lime-400:is(.dark *){border-color:var(--color-lime-400)}.dark\:border-lime-700:is(.dark *){border-color:var(--color-lime-700)}.dark\:border-lime-800:is(.dark *){border-color:var(--color-lime-800)}.dark\:border-orange-400:is(.dark *){border-color:var(--color-orange-400)}.dark\:border-orange-700:is(.dark *){border-color:var(--color-orange-700)}.dark\:border-orange-800:is(.dark *){border-color:var(--color-orange-800)}.dark\:border-pink-400:is(.dark *){border-color:var(--color-pink-400)}.dark\:border-pink-700:is(.dark *){border-color:var(--color-pink-700)}.dark\:border-pink-800:is(.dark *){border-color:var(--color-pink-800)}.dark\:border-primary-200:is(.dark *){border-color:#ffe4de}.dark\:border-primary-400:is(.dark *){border-color:#ffbcad}.dark\:border-primary-500:is(.dark *){border-color:#fe795d}.dark\:border-primary-700:is(.dark *){border-color:#eb4f27}.dark\:border-primary-800:is(.dark *){border-color:#cc4522}.dark\:border-purple-400:is(.dark *){border-color:var(--color-purple-400)}.dark\:border-purple-700:is(.dark *){border-color:var(--color-purple-700)}.dark\:border-purple-800:is(.dark *){border-color:var(--color-purple-800)}.dark\:border-red-400:is(.dark *){border-color:var(--color-red-400)}.dark\:border-red-500:is(.dark *){border-color:var(--color-red-500)}.dark\:border-red-700:is(.dark *){border-color:var(--color-red-700)}.dark\:border-red-800:is(.dark *){border-color:var(--color-red-800)}.dark\:border-rose-400:is(.dark *){border-color:var(--color-rose-400)}.dark\:border-rose-700:is(.dark *){border-color:var(--color-rose-700)}.dark\:border-rose-800:is(.dark *){border-color:var(--color-rose-800)}.dark\:border-sky-400:is(.dark *){border-color:var(--color-sky-400)}.dark\:border-sky-700:is(.dark *){border-color:var(--color-sky-700)}.dark\:border-sky-800:is(.dark *){border-color:var(--color-sky-800)}.dark\:border-teal-400:is(.dark *){border-color:var(--color-teal-400)}.dark\:border-teal-700:is(.dark *){border-color:var(--color-teal-700)}.dark\:border-teal-800:is(.dark *){border-color:var(--color-teal-800)}.dark\:border-violet-400:is(.dark *){border-color:var(--color-violet-400)}.dark\:border-violet-700:is(.dark *){border-color:var(--color-violet-700)}.dark\:border-violet-800:is(.dark *){border-color:var(--color-violet-800)}.dark\:border-yellow-300:is(.dark *){border-color:var(--color-yellow-300)}.dark\:border-yellow-400:is(.dark *){border-color:var(--color-yellow-400)}.dark\:border-yellow-700:is(.dark *){border-color:var(--color-yellow-700)}.dark\:border-yellow-800:is(.dark *){border-color:var(--color-yellow-800)}.dark\:border-e-gray-600:is(.dark *){border-inline-end-color:var(--color-gray-600)}.dark\:border-e-gray-700:is(.dark *){border-inline-end-color:var(--color-gray-700)}.dark\:bg-amber-200:is(.dark *){background-color:var(--color-amber-200)}.dark\:bg-amber-500:is(.dark *){background-color:var(--color-amber-500)}.dark\:bg-amber-600:is(.dark *){background-color:var(--color-amber-600)}.dark\:bg-amber-700:is(.dark *){background-color:var(--color-amber-700)}.dark\:bg-amber-800:is(.dark *){background-color:var(--color-amber-800)}.dark\:bg-amber-900:is(.dark *){background-color:var(--color-amber-900)}.dark\:bg-blue-200:is(.dark *){background-color:var(--color-blue-200)}.dark\:bg-blue-400:is(.dark *){background-color:var(--color-blue-400)}.dark\:bg-blue-500:is(.dark *){background-color:var(--color-blue-500)}.dark\:bg-blue-600:is(.dark *){background-color:var(--color-blue-600)}.dark\:bg-blue-700:is(.dark *){background-color:var(--color-blue-700)}.dark\:bg-blue-800:is(.dark *){background-color:var(--color-blue-800)}.dark\:bg-blue-900:is(.dark *){background-color:var(--color-blue-900)}.dark\:bg-cyan-200:is(.dark *){background-color:var(--color-cyan-200)}.dark\:bg-cyan-500:is(.dark *){background-color:var(--color-cyan-500)}.dark\:bg-cyan-600:is(.dark *){background-color:var(--color-cyan-600)}.dark\:bg-cyan-700:is(.dark *){background-color:var(--color-cyan-700)}.dark\:bg-cyan-800:is(.dark *){background-color:var(--color-cyan-800)}.dark\:bg-cyan-900:is(.dark *){background-color:var(--color-cyan-900)}.dark\:bg-emerald-200:is(.dark *){background-color:var(--color-emerald-200)}.dark\:bg-emerald-500:is(.dark *){background-color:var(--color-emerald-500)}.dark\:bg-emerald-600:is(.dark *){background-color:var(--color-emerald-600)}.dark\:bg-emerald-700:is(.dark *){background-color:var(--color-emerald-700)}.dark\:bg-emerald-800:is(.dark *){background-color:var(--color-emerald-800)}.dark\:bg-emerald-900:is(.dark *){background-color:var(--color-emerald-900)}.dark\:bg-fuchsia-200:is(.dark *){background-color:var(--color-fuchsia-200)}.dark\:bg-fuchsia-500:is(.dark *){background-color:var(--color-fuchsia-500)}.dark\:bg-fuchsia-600:is(.dark *){background-color:var(--color-fuchsia-600)}.dark\:bg-fuchsia-700:is(.dark *){background-color:var(--color-fuchsia-700)}.dark\:bg-fuchsia-800:is(.dark *){background-color:var(--color-fuchsia-800)}.dark\:bg-fuchsia-900:is(.dark *){background-color:var(--color-fuchsia-900)}.dark\:bg-gray-200:is(.dark *){background-color:var(--color-gray-200)}.dark\:bg-gray-300:is(.dark *){background-color:var(--color-gray-300)}.dark\:bg-gray-500:is(.dark *){background-color:var(--color-gray-500)}.dark\:bg-gray-600:is(.dark *){background-color:var(--color-gray-600)}.dark\:bg-gray-700:is(.dark *){background-color:var(--color-gray-700)}.dark\:bg-gray-800:is(.dark *){background-color:var(--color-gray-800)}.dark\:bg-gray-800\/30:is(.dark *){background-color:#1e29394d}@supports (color:color-mix(in lab,red,red)){.dark\:bg-gray-800\/30:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-800)30%,transparent)}}.dark\:bg-gray-900:is(.dark *){background-color:var(--color-gray-900)}.dark\:bg-gray-900\/50:is(.dark *){background-color:#10182880}@supports (color:color-mix(in lab,red,red)){.dark\:bg-gray-900\/50:is(.dark *){background-color:color-mix(in oklab,var(--color-gray-900)50%,transparent)}}.dark\:bg-green-200:is(.dark *){background-color:var(--color-green-200)}.dark\:bg-green-400:is(.dark *){background-color:var(--color-green-400)}.dark\:bg-green-500:is(.dark *){background-color:var(--color-green-500)}.dark\:bg-green-600:is(.dark *){background-color:var(--color-green-600)}.dark\:bg-green-700:is(.dark *){background-color:var(--color-green-700)}.dark\:bg-green-800:is(.dark *){background-color:var(--color-green-800)}.dark\:bg-green-900:is(.dark *){background-color:var(--color-green-900)}.dark\:bg-indigo-200:is(.dark *){background-color:var(--color-indigo-200)}.dark\:bg-indigo-400:is(.dark *){background-color:var(--color-indigo-400)}.dark\:bg-indigo-500:is(.dark *){background-color:var(--color-indigo-500)}.dark\:bg-indigo-600:is(.dark *){background-color:var(--color-indigo-600)}.dark\:bg-indigo-700:is(.dark *){background-color:var(--color-indigo-700)}.dark\:bg-indigo-800:is(.dark *){background-color:var(--color-indigo-800)}.dark\:bg-indigo-900:is(.dark *){background-color:var(--color-indigo-900)}.dark\:bg-inherit:is(.dark *){background-color:inherit}.dark\:bg-lime-200:is(.dark *){background-color:var(--color-lime-200)}.dark\:bg-lime-500:is(.dark *){background-color:var(--color-lime-500)}.dark\:bg-lime-600:is(.dark *){background-color:var(--color-lime-600)}.dark\:bg-lime-700:is(.dark *){background-color:var(--color-lime-700)}.dark\:bg-lime-800:is(.dark *){background-color:var(--color-lime-800)}.dark\:bg-lime-900:is(.dark *){background-color:var(--color-lime-900)}.dark\:bg-orange-200:is(.dark *){background-color:var(--color-orange-200)}.dark\:bg-orange-500:is(.dark *){background-color:var(--color-orange-500)}.dark\:bg-orange-600:is(.dark *){background-color:var(--color-orange-600)}.dark\:bg-orange-700:is(.dark *){background-color:var(--color-orange-700)}.dark\:bg-orange-800:is(.dark *){background-color:var(--color-orange-800)}.dark\:bg-orange-900:is(.dark *){background-color:var(--color-orange-900)}.dark\:bg-pink-200:is(.dark *){background-color:var(--color-pink-200)}.dark\:bg-pink-400:is(.dark *){background-color:var(--color-pink-400)}.dark\:bg-pink-500:is(.dark *){background-color:var(--color-pink-500)}.dark\:bg-pink-600:is(.dark *){background-color:var(--color-pink-600)}.dark\:bg-pink-700:is(.dark *){background-color:var(--color-pink-700)}.dark\:bg-pink-800:is(.dark *){background-color:var(--color-pink-800)}.dark\:bg-pink-900:is(.dark *){background-color:var(--color-pink-900)}.dark\:bg-primary-200:is(.dark *){background-color:#ffe4de}.dark\:bg-primary-400:is(.dark *){background-color:#ffbcad}.dark\:bg-primary-500:is(.dark *){background-color:#fe795d}.dark\:bg-primary-600:is(.dark *){background-color:#ef562f}.dark\:bg-primary-700:is(.dark *){background-color:#eb4f27}.dark\:bg-primary-800:is(.dark *){background-color:#cc4522}.dark\:bg-primary-900:is(.dark *){background-color:#a5371b}.dark\:bg-primary-900\/30:is(.dark *){background-color:#a5371b4d}.dark\:bg-purple-200:is(.dark *){background-color:var(--color-purple-200)}.dark\:bg-purple-400:is(.dark *){background-color:var(--color-purple-400)}.dark\:bg-purple-500:is(.dark *){background-color:var(--color-purple-500)}.dark\:bg-purple-600:is(.dark *){background-color:var(--color-purple-600)}.dark\:bg-purple-700:is(.dark *){background-color:var(--color-purple-700)}.dark\:bg-purple-800:is(.dark *){background-color:var(--color-purple-800)}.dark\:bg-purple-900:is(.dark *){background-color:var(--color-purple-900)}.dark\:bg-red-200:is(.dark *){background-color:var(--color-red-200)}.dark\:bg-red-500:is(.dark *){background-color:var(--color-red-500)}.dark\:bg-red-600:is(.dark *){background-color:var(--color-red-600)}.dark\:bg-red-700:is(.dark *){background-color:var(--color-red-700)}.dark\:bg-red-800:is(.dark *){background-color:var(--color-red-800)}.dark\:bg-red-900:is(.dark *){background-color:var(--color-red-900)}.dark\:bg-rose-200:is(.dark *){background-color:var(--color-rose-200)}.dark\:bg-rose-500:is(.dark *){background-color:var(--color-rose-500)}.dark\:bg-rose-600:is(.dark *){background-color:var(--color-rose-600)}.dark\:bg-rose-700:is(.dark *){background-color:var(--color-rose-700)}.dark\:bg-rose-800:is(.dark *){background-color:var(--color-rose-800)}.dark\:bg-rose-900:is(.dark *){background-color:var(--color-rose-900)}.dark\:bg-sky-200:is(.dark *){background-color:var(--color-sky-200)}.dark\:bg-sky-500:is(.dark *){background-color:var(--color-sky-500)}.dark\:bg-sky-600:is(.dark *){background-color:var(--color-sky-600)}.dark\:bg-sky-700:is(.dark *){background-color:var(--color-sky-700)}.dark\:bg-sky-800:is(.dark *){background-color:var(--color-sky-800)}.dark\:bg-sky-900:is(.dark *){background-color:var(--color-sky-900)}.dark\:bg-teal-200:is(.dark *){background-color:var(--color-teal-200)}.dark\:bg-teal-500:is(.dark *){background-color:var(--color-teal-500)}.dark\:bg-teal-600:is(.dark *){background-color:var(--color-teal-600)}.dark\:bg-teal-700:is(.dark *){background-color:var(--color-teal-700)}.dark\:bg-teal-800:is(.dark *){background-color:var(--color-teal-800)}.dark\:bg-teal-900:is(.dark *){background-color:var(--color-teal-900)}.dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:bg-violet-200:is(.dark *){background-color:var(--color-violet-200)}.dark\:bg-violet-500:is(.dark *){background-color:var(--color-violet-500)}.dark\:bg-violet-600:is(.dark *){background-color:var(--color-violet-600)}.dark\:bg-violet-700:is(.dark *){background-color:var(--color-violet-700)}.dark\:bg-violet-800:is(.dark *){background-color:var(--color-violet-800)}.dark\:bg-violet-900:is(.dark *){background-color:var(--color-violet-900)}.dark\:bg-white:is(.dark *){background-color:var(--color-white)}.dark\:bg-yellow-200:is(.dark *){background-color:var(--color-yellow-200)}.dark\:bg-yellow-400:is(.dark *){background-color:var(--color-yellow-400)}.dark\:bg-yellow-700:is(.dark *){background-color:var(--color-yellow-700)}.dark\:bg-yellow-800:is(.dark *){background-color:var(--color-yellow-800)}.dark\:bg-yellow-900:is(.dark *){background-color:var(--color-yellow-900)}.dark\:fill-gray-300:is(.dark *){fill:var(--color-gray-300)}.dark\:stroke-amber-500:is(.dark *){stroke:var(--color-amber-500)}.dark\:stroke-cyan-500:is(.dark *){stroke:var(--color-cyan-500)}.dark\:stroke-emerald-500:is(.dark *){stroke:var(--color-emerald-500)}.dark\:stroke-fuchsia-500:is(.dark *){stroke:var(--color-fuchsia-500)}.dark\:stroke-gray-300:is(.dark *){stroke:var(--color-gray-300)}.dark\:stroke-green-500:is(.dark *){stroke:var(--color-green-500)}.dark\:stroke-indigo-500:is(.dark *){stroke:var(--color-indigo-500)}.dark\:stroke-lime-500:is(.dark *){stroke:var(--color-lime-500)}.dark\:stroke-orange-500:is(.dark *){stroke:var(--color-orange-500)}.dark\:stroke-pink-500:is(.dark *){stroke:var(--color-pink-500)}.dark\:stroke-purple-500:is(.dark *){stroke:var(--color-purple-500)}.dark\:stroke-red-500:is(.dark *){stroke:var(--color-red-500)}.dark\:stroke-rose-500:is(.dark *){stroke:var(--color-rose-500)}.dark\:stroke-sky-500:is(.dark *){stroke:var(--color-sky-500)}.dark\:stroke-teal-500:is(.dark *){stroke:var(--color-teal-500)}.dark\:stroke-violet-500:is(.dark *){stroke:var(--color-violet-500)}.dark\:text-amber-100:is(.dark *){color:var(--color-amber-100)}.dark\:text-amber-200:is(.dark *){color:var(--color-amber-200)}.dark\:text-amber-300:is(.dark *){color:var(--color-amber-300)}.dark\:text-amber-400:is(.dark *){color:var(--color-amber-400)}.dark\:text-amber-500:is(.dark *){color:var(--color-amber-500)}.dark\:text-amber-600:is(.dark *){color:var(--color-amber-600)}.dark\:text-blue-100:is(.dark *){color:var(--color-blue-100)}.dark\:text-blue-200:is(.dark *){color:var(--color-blue-200)}.dark\:text-blue-300:is(.dark *){color:var(--color-blue-300)}.dark\:text-blue-400:is(.dark *){color:var(--color-blue-400)}.dark\:text-blue-500:is(.dark *){color:var(--color-blue-500)}.dark\:text-blue-600:is(.dark *){color:var(--color-blue-600)}.dark\:text-cyan-100:is(.dark *){color:var(--color-cyan-100)}.dark\:text-cyan-200:is(.dark *){color:var(--color-cyan-200)}.dark\:text-cyan-300:is(.dark *){color:var(--color-cyan-300)}.dark\:text-cyan-400:is(.dark *){color:var(--color-cyan-400)}.dark\:text-cyan-500:is(.dark *){color:var(--color-cyan-500)}.dark\:text-cyan-600:is(.dark *){color:var(--color-cyan-600)}.dark\:text-emerald-100:is(.dark *){color:var(--color-emerald-100)}.dark\:text-emerald-200:is(.dark *){color:var(--color-emerald-200)}.dark\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\:text-emerald-400:is(.dark *){color:var(--color-emerald-400)}.dark\:text-emerald-500:is(.dark *){color:var(--color-emerald-500)}.dark\:text-emerald-600:is(.dark *){color:var(--color-emerald-600)}.dark\:text-fuchsia-100:is(.dark *){color:var(--color-fuchsia-100)}.dark\:text-fuchsia-200:is(.dark *){color:var(--color-fuchsia-200)}.dark\:text-fuchsia-300:is(.dark *){color:var(--color-fuchsia-300)}.dark\:text-fuchsia-400:is(.dark *){color:var(--color-fuchsia-400)}.dark\:text-fuchsia-500:is(.dark *){color:var(--color-fuchsia-500)}.dark\:text-fuchsia-600:is(.dark *){color:var(--color-fuchsia-600)}.dark\:text-gray-50:is(.dark *){color:var(--color-gray-50)}.dark\:text-gray-100:is(.dark *){color:var(--color-gray-100)}.dark\:text-gray-200:is(.dark *){color:var(--color-gray-200)}.dark\:text-gray-300:is(.dark *){color:var(--color-gray-300)}.dark\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.dark\:text-gray-500:is(.dark *){color:var(--color-gray-500)}.dark\:text-gray-600:is(.dark *){color:var(--color-gray-600)}.dark\:text-gray-700:is(.dark *){color:var(--color-gray-700)}.dark\:text-gray-800:is(.dark *){color:var(--color-gray-800)}.dark\:text-gray-900:is(.dark *){color:var(--color-gray-900)}.dark\:text-green-100:is(.dark *){color:var(--color-green-100)}.dark\:text-green-200:is(.dark *){color:var(--color-green-200)}.dark\:text-green-300:is(.dark *){color:var(--color-green-300)}.dark\:text-green-400:is(.dark *){color:var(--color-green-400)}.dark\:text-green-500:is(.dark *){color:var(--color-green-500)}.dark\:text-green-600:is(.dark *){color:var(--color-green-600)}.dark\:text-indigo-100:is(.dark *){color:var(--color-indigo-100)}.dark\:text-indigo-200:is(.dark *){color:var(--color-indigo-200)}.dark\:text-indigo-300:is(.dark *){color:var(--color-indigo-300)}.dark\:text-indigo-400:is(.dark *){color:var(--color-indigo-400)}.dark\:text-indigo-500:is(.dark *){color:var(--color-indigo-500)}.dark\:text-indigo-600:is(.dark *){color:var(--color-indigo-600)}.dark\:text-lime-100:is(.dark *){color:var(--color-lime-100)}.dark\:text-lime-200:is(.dark *){color:var(--color-lime-200)}.dark\:text-lime-300:is(.dark *){color:var(--color-lime-300)}.dark\:text-lime-400:is(.dark *){color:var(--color-lime-400)}.dark\:text-lime-500:is(.dark *){color:var(--color-lime-500)}.dark\:text-lime-600:is(.dark *){color:var(--color-lime-600)}.dark\:text-orange-100:is(.dark *){color:var(--color-orange-100)}.dark\:text-orange-200:is(.dark *){color:var(--color-orange-200)}.dark\:text-orange-300:is(.dark *){color:var(--color-orange-300)}.dark\:text-orange-400:is(.dark *){color:var(--color-orange-400)}.dark\:text-orange-500:is(.dark *){color:var(--color-orange-500)}.dark\:text-orange-600:is(.dark *){color:var(--color-orange-600)}.dark\:text-pink-100:is(.dark *){color:var(--color-pink-100)}.dark\:text-pink-200:is(.dark *){color:var(--color-pink-200)}.dark\:text-pink-300:is(.dark *){color:var(--color-pink-300)}.dark\:text-pink-400:is(.dark *){color:var(--color-pink-400)}.dark\:text-pink-500:is(.dark *){color:var(--color-pink-500)}.dark\:text-pink-600:is(.dark *){color:var(--color-pink-600)}.dark\:text-primary-100:is(.dark *){color:#fff1ee}.dark\:text-primary-200:is(.dark *){color:#ffe4de}.dark\:text-primary-300:is(.dark *){color:#ffd5cc}.dark\:text-primary-400:is(.dark *){color:#ffbcad}.dark\:text-primary-500:is(.dark *){color:#fe795d}.dark\:text-primary-600:is(.dark *){color:#ef562f}.dark\:text-primary-700:is(.dark *){color:#eb4f27}.dark\:text-primary-800:is(.dark *){color:#cc4522}.dark\:text-primary-900:is(.dark *){color:#a5371b}.dark\:text-purple-100:is(.dark *){color:var(--color-purple-100)}.dark\:text-purple-200:is(.dark *){color:var(--color-purple-200)}.dark\:text-purple-300:is(.dark *){color:var(--color-purple-300)}.dark\:text-purple-400:is(.dark *){color:var(--color-purple-400)}.dark\:text-purple-500:is(.dark *){color:var(--color-purple-500)}.dark\:text-purple-600:is(.dark *){color:var(--color-purple-600)}.dark\:text-red-100:is(.dark *){color:var(--color-red-100)}.dark\:text-red-200:is(.dark *){color:var(--color-red-200)}.dark\:text-red-300:is(.dark *){color:var(--color-red-300)}.dark\:text-red-400:is(.dark *){color:var(--color-red-400)}.dark\:text-red-500:is(.dark *){color:var(--color-red-500)}.dark\:text-red-600:is(.dark *){color:var(--color-red-600)}.dark\:text-rose-100:is(.dark *){color:var(--color-rose-100)}.dark\:text-rose-200:is(.dark *){color:var(--color-rose-200)}.dark\:text-rose-300:is(.dark *){color:var(--color-rose-300)}.dark\:text-rose-400:is(.dark *){color:var(--color-rose-400)}.dark\:text-rose-500:is(.dark *){color:var(--color-rose-500)}.dark\:text-rose-600:is(.dark *){color:var(--color-rose-600)}.dark\:text-sky-100:is(.dark *){color:var(--color-sky-100)}.dark\:text-sky-200:is(.dark *){color:var(--color-sky-200)}.dark\:text-sky-300:is(.dark *){color:var(--color-sky-300)}.dark\:text-sky-400:is(.dark *){color:var(--color-sky-400)}.dark\:text-sky-500:is(.dark *){color:var(--color-sky-500)}.dark\:text-sky-600:is(.dark *){color:var(--color-sky-600)}.dark\:text-teal-100:is(.dark *){color:var(--color-teal-100)}.dark\:text-teal-200:is(.dark *){color:var(--color-teal-200)}.dark\:text-teal-300:is(.dark *){color:var(--color-teal-300)}.dark\:text-teal-400:is(.dark *){color:var(--color-teal-400)}.dark\:text-teal-500:is(.dark *){color:var(--color-teal-500)}.dark\:text-teal-600:is(.dark *){color:var(--color-teal-600)}.dark\:text-violet-100:is(.dark *){color:var(--color-violet-100)}.dark\:text-violet-200:is(.dark *){color:var(--color-violet-200)}.dark\:text-violet-300:is(.dark *){color:var(--color-violet-300)}.dark\:text-violet-400:is(.dark *){color:var(--color-violet-400)}.dark\:text-violet-500:is(.dark *){color:var(--color-violet-500)}.dark\:text-violet-600:is(.dark *){color:var(--color-violet-600)}.dark\:text-white:is(.dark *){color:var(--color-white)}.dark\:text-white\!:is(.dark *){color:var(--color-white)!important}.dark\:text-yellow-100:is(.dark *){color:var(--color-yellow-100)}.dark\:text-yellow-200:is(.dark *){color:var(--color-yellow-200)}.dark\:text-yellow-300:is(.dark *){color:var(--color-yellow-300)}.dark\:text-yellow-400:is(.dark *){color:var(--color-yellow-400)}.dark\:text-yellow-500:is(.dark *){color:var(--color-yellow-500)}.dark\:text-yellow-600:is(.dark *){color:var(--color-yellow-600)}.dark\:decoration-blue-600:is(.dark *){-webkit-text-decoration-color:var(--color-blue-600);text-decoration-color:var(--color-blue-600)}.dark\:decoration-cyan-600:is(.dark *){-webkit-text-decoration-color:var(--color-cyan-600);text-decoration-color:var(--color-cyan-600)}.dark\:decoration-emerald-600:is(.dark *){-webkit-text-decoration-color:var(--color-emerald-600);text-decoration-color:var(--color-emerald-600)}.dark\:decoration-fuchsia-600:is(.dark *){-webkit-text-decoration-color:var(--color-fuchsia-600);text-decoration-color:var(--color-fuchsia-600)}.dark\:decoration-gray-600:is(.dark *){-webkit-text-decoration-color:var(--color-gray-600);text-decoration-color:var(--color-gray-600)}.dark\:decoration-green-600:is(.dark *){-webkit-text-decoration-color:var(--color-green-600);text-decoration-color:var(--color-green-600)}.dark\:decoration-indigo-600:is(.dark *){-webkit-text-decoration-color:var(--color-indigo-600);text-decoration-color:var(--color-indigo-600)}.dark\:decoration-lime-600:is(.dark *){-webkit-text-decoration-color:var(--color-lime-600);text-decoration-color:var(--color-lime-600)}.dark\:decoration-orange-600:is(.dark *){-webkit-text-decoration-color:var(--color-orange-600);text-decoration-color:var(--color-orange-600)}.dark\:decoration-pink-600:is(.dark *){-webkit-text-decoration-color:var(--color-pink-600);text-decoration-color:var(--color-pink-600)}.dark\:decoration-primary-600:is(.dark *){text-decoration-color:#ef562f}.dark\:decoration-purple-600:is(.dark *){-webkit-text-decoration-color:var(--color-purple-600);text-decoration-color:var(--color-purple-600)}.dark\:decoration-red-600:is(.dark *){-webkit-text-decoration-color:var(--color-red-600);text-decoration-color:var(--color-red-600)}.dark\:decoration-rose-600:is(.dark *){-webkit-text-decoration-color:var(--color-rose-600);text-decoration-color:var(--color-rose-600)}.dark\:decoration-sky-600:is(.dark *){-webkit-text-decoration-color:var(--color-sky-600);text-decoration-color:var(--color-sky-600)}.dark\:decoration-teal-600:is(.dark *){-webkit-text-decoration-color:var(--color-teal-600);text-decoration-color:var(--color-teal-600)}.dark\:decoration-violet-600:is(.dark *){-webkit-text-decoration-color:var(--color-violet-600);text-decoration-color:var(--color-violet-600)}.dark\:decoration-yellow-600:is(.dark *){-webkit-text-decoration-color:var(--color-yellow-600);text-decoration-color:var(--color-yellow-600)}.dark\:placeholder-amber-500:is(.dark *)::placeholder{color:var(--color-amber-500)}.dark\:placeholder-blue-500:is(.dark *)::placeholder{color:var(--color-blue-500)}.dark\:placeholder-cyan-500:is(.dark *)::placeholder{color:var(--color-cyan-500)}.dark\:placeholder-emerald-500:is(.dark *)::placeholder{color:var(--color-emerald-500)}.dark\:placeholder-fuchsia-500:is(.dark *)::placeholder{color:var(--color-fuchsia-500)}.dark\:placeholder-gray-400:is(.dark *)::placeholder{color:var(--color-gray-400)}.dark\:placeholder-gray-500:is(.dark *)::placeholder{color:var(--color-gray-500)}.dark\:placeholder-green-500:is(.dark *)::placeholder{color:var(--color-green-500)}.dark\:placeholder-indigo-500:is(.dark *)::placeholder{color:var(--color-indigo-500)}.dark\:placeholder-lime-500:is(.dark *)::placeholder{color:var(--color-lime-500)}.dark\:placeholder-orange-500:is(.dark *)::placeholder{color:var(--color-orange-500)}.dark\:placeholder-pink-500:is(.dark *)::placeholder{color:var(--color-pink-500)}.dark\:placeholder-primary-500:is(.dark *)::placeholder{color:#fe795d}.dark\:placeholder-purple-500:is(.dark *)::placeholder{color:var(--color-purple-500)}.dark\:placeholder-red-500:is(.dark *)::placeholder{color:var(--color-red-500)}.dark\:placeholder-rose-500:is(.dark *)::placeholder{color:var(--color-rose-500)}.dark\:placeholder-sky-500:is(.dark *)::placeholder{color:var(--color-sky-500)}.dark\:placeholder-teal-500:is(.dark *)::placeholder{color:var(--color-teal-500)}.dark\:placeholder-violet-500:is(.dark *)::placeholder{color:var(--color-violet-500)}.dark\:placeholder-yellow-500:is(.dark *)::placeholder{color:var(--color-yellow-500)}.dark\:opacity-25:is(.dark *){opacity:.25}.dark\:shadow-amber-800\/80:is(.dark *){--tw-shadow-color:#953d00cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-amber-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-amber-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color:#193cb8cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-blue-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-blue-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color:#005f78cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-cyan-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-cyan-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-emerald-800\/80:is(.dark *){--tw-shadow-color:#005f46cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-emerald-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-emerald-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-fuchsia-800\/80:is(.dark *){--tw-shadow-color:#8a0194cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-fuchsia-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-fuchsia-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-gray-800\/80:is(.dark *){--tw-shadow-color:#1e2939cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-gray-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-gray-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color:#016630cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-green-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-green-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-indigo-800\/80:is(.dark *){--tw-shadow-color:#372aaccc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-indigo-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-indigo-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color:#3d6300cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-lime-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-lime-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-orange-800\/80:is(.dark *){--tw-shadow-color:#9f2d00cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-orange-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-orange-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color:#a2004ccc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-pink-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-pink-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-primary-800\/80:is(.dark *){--tw-shadow-color:#cc4522cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-primary-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,oklab(57.5989% .145025 .102079/.8) var(--tw-shadow-alpha),transparent)}}.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color:#6e11b0cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-purple-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-purple-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color:#9f0712cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-red-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-red-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-rose-800\/80:is(.dark *){--tw-shadow-color:#a30037cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-rose-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-rose-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-sky-800\/80:is(.dark *){--tw-shadow-color:#005986cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-sky-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-sky-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color:#005f5acc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-teal-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-teal-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-violet-800\/80:is(.dark *){--tw-shadow-color:#5d0ec0cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-violet-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-violet-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-white\/10:is(.dark *){--tw-shadow-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-white\/10:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-white)10%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:shadow-yellow-800\/80:is(.dark *){--tw-shadow-color:#874b00cc}@supports (color:color-mix(in lab,red,red)){.dark\:shadow-yellow-800\/80:is(.dark *){--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-yellow-800)80%,transparent)var(--tw-shadow-alpha),transparent)}}.dark\:ring-gray-500:is(.dark *){--tw-ring-color:var(--color-gray-500)}.dark\:ring-gray-900:is(.dark *){--tw-ring-color:var(--color-gray-900)}.dark\:ring-primary-500:is(.dark *){--tw-ring-color:#fe795d}.dark\:ring-white\/10:is(.dark *){--tw-ring-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.dark\:ring-white\/10:is(.dark *){--tw-ring-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.dark\:ring-offset-amber-600:is(.dark *){--tw-ring-offset-color:var(--color-amber-600)}.dark\:ring-offset-blue-700:is(.dark *){--tw-ring-offset-color:var(--color-blue-700)}.dark\:ring-offset-cyan-600:is(.dark *){--tw-ring-offset-color:var(--color-cyan-600)}.dark\:ring-offset-emerald-600:is(.dark *){--tw-ring-offset-color:var(--color-emerald-600)}.dark\:ring-offset-fuchsia-600:is(.dark *){--tw-ring-offset-color:var(--color-fuchsia-600)}.dark\:ring-offset-gray-800:is(.dark *){--tw-ring-offset-color:var(--color-gray-800)}.dark\:ring-offset-green-600:is(.dark *){--tw-ring-offset-color:var(--color-green-600)}.dark\:ring-offset-indigo-700:is(.dark *){--tw-ring-offset-color:var(--color-indigo-700)}.dark\:ring-offset-lime-700:is(.dark *){--tw-ring-offset-color:var(--color-lime-700)}.dark\:ring-offset-orange-600:is(.dark *){--tw-ring-offset-color:var(--color-orange-600)}.dark\:ring-offset-pink-600:is(.dark *){--tw-ring-offset-color:var(--color-pink-600)}.dark\:ring-offset-purple-600:is(.dark *){--tw-ring-offset-color:var(--color-purple-600)}.dark\:ring-offset-red-600:is(.dark *){--tw-ring-offset-color:var(--color-red-600)}.dark\:ring-offset-rose-600:is(.dark *){--tw-ring-offset-color:var(--color-rose-600)}.dark\:ring-offset-sky-600:is(.dark *){--tw-ring-offset-color:var(--color-sky-600)}.dark\:ring-offset-teal-600:is(.dark *){--tw-ring-offset-color:var(--color-teal-600)}.dark\:ring-offset-violet-600:is(.dark *){--tw-ring-offset-color:var(--color-violet-600)}.dark\:ring-offset-yellow-400:is(.dark *){--tw-ring-offset-color:var(--color-yellow-400)}@media(hover:hover){.dark\:group-hover\:bg-gray-800\/60:is(.dark *):is(:where(.group):hover *){background-color:#1e293999}@supports (color:color-mix(in lab,red,red)){.dark\:group-hover\:bg-gray-800\/60:is(.dark *):is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-gray-800)60%,transparent)}}.dark\:group-hover\:text-primary-500:is(.dark *):is(:where(.group):hover *){color:#fe795d}}.dark\:group-focus\:ring-gray-800\/70:is(.dark *):is(:where(.group):focus *){--tw-ring-color:#1e2939b3}@supports (color:color-mix(in lab,red,red)){.dark\:group-focus\:ring-gray-800\/70:is(.dark *):is(:where(.group):focus *){--tw-ring-color:color-mix(in oklab,var(--color-gray-800)70%,transparent)}}.dark\:peer-focus\:text-amber-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-amber-500)}.dark\:peer-focus\:text-blue-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-blue-500)}.dark\:peer-focus\:text-cyan-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-cyan-500)}.dark\:peer-focus\:text-emerald-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-emerald-500)}.dark\:peer-focus\:text-fuchsia-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-fuchsia-500)}.dark\:peer-focus\:text-gray-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-gray-500)}.dark\:peer-focus\:text-green-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-green-500)}.dark\:peer-focus\:text-indigo-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-indigo-500)}.dark\:peer-focus\:text-lime-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-lime-500)}.dark\:peer-focus\:text-orange-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-orange-500)}.dark\:peer-focus\:text-pink-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-pink-500)}.dark\:peer-focus\:text-primary-500:is(.dark *):is(:where(.peer):focus~*){color:#fe795d}.dark\:peer-focus\:text-purple-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-purple-500)}.dark\:peer-focus\:text-red-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-red-500)}.dark\:peer-focus\:text-rose-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-rose-500)}.dark\:peer-focus\:text-sky-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-sky-500)}.dark\:peer-focus\:text-teal-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-teal-500)}.dark\:peer-focus\:text-violet-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-violet-500)}.dark\:peer-focus\:text-yellow-500:is(.dark *):is(:where(.peer):focus~*){color:var(--color-yellow-500)}.peer-focus\:dark\:text-primary-500:is(:where(.peer):focus~*):is(.dark *){color:#fe795d}.dark\:peer-focus\:ring-amber-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-amber-800)}.dark\:peer-focus\:ring-blue-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-blue-800)}.dark\:peer-focus\:ring-cyan-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-cyan-800)}.dark\:peer-focus\:ring-emerald-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-emerald-800)}.dark\:peer-focus\:ring-fuchsia-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-fuchsia-800)}.dark\:peer-focus\:ring-gray-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-gray-800)}.dark\:peer-focus\:ring-green-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-green-800)}.dark\:peer-focus\:ring-indigo-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-indigo-800)}.dark\:peer-focus\:ring-lime-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-lime-800)}.dark\:peer-focus\:ring-orange-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-orange-800)}.dark\:peer-focus\:ring-pink-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-pink-800)}.dark\:peer-focus\:ring-primary-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:#cc4522}.dark\:peer-focus\:ring-purple-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-purple-800)}.dark\:peer-focus\:ring-red-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-red-800)}.dark\:peer-focus\:ring-rose-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-rose-800)}.dark\:peer-focus\:ring-sky-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-sky-800)}.dark\:peer-focus\:ring-teal-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-teal-800)}.dark\:peer-focus\:ring-violet-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-violet-800)}.dark\:peer-focus\:ring-yellow-800:is(.dark *):is(:where(.peer):focus~*){--tw-ring-color:var(--color-yellow-800)}.dark\:first-letter\:text-gray-100:is(.dark *):first-letter{color:var(--color-gray-100)}.dark\:after\:border-gray-700:is(.dark *):after{content:var(--tw-content);border-color:var(--color-gray-700)}.dark\:after\:border-primary-800:is(.dark *):after{content:var(--tw-content);border-color:#cc4522}.dark\:after\:text-gray-500:is(.dark *):after{content:var(--tw-content);color:var(--color-gray-500)}.dark\:last\:border-e-gray-500:is(.dark *):last-child{border-inline-end-color:var(--color-gray-500)}.dark\:last\:border-e-gray-600:is(.dark *):last-child{border-inline-end-color:var(--color-gray-600)}.dark\:odd\:bg-amber-500:is(.dark *):nth-child(odd){background-color:var(--color-amber-500)}.dark\:odd\:bg-blue-500:is(.dark *):nth-child(odd){background-color:var(--color-blue-500)}.dark\:odd\:bg-cyan-500:is(.dark *):nth-child(odd){background-color:var(--color-cyan-500)}.dark\:odd\:bg-emerald-500:is(.dark *):nth-child(odd){background-color:var(--color-emerald-500)}.dark\:odd\:bg-fuchsia-500:is(.dark *):nth-child(odd){background-color:var(--color-fuchsia-500)}.dark\:odd\:bg-gray-500:is(.dark *):nth-child(odd){background-color:var(--color-gray-500)}.dark\:odd\:bg-gray-800:is(.dark *):nth-child(odd){background-color:var(--color-gray-800)}.dark\:odd\:bg-green-500:is(.dark *):nth-child(odd){background-color:var(--color-green-500)}.dark\:odd\:bg-indigo-500:is(.dark *):nth-child(odd){background-color:var(--color-indigo-500)}.dark\:odd\:bg-lime-500:is(.dark *):nth-child(odd){background-color:var(--color-lime-500)}.dark\:odd\:bg-orange-500:is(.dark *):nth-child(odd){background-color:var(--color-orange-500)}.dark\:odd\:bg-pink-500:is(.dark *):nth-child(odd){background-color:var(--color-pink-500)}.dark\:odd\:bg-primary-500:is(.dark *):nth-child(odd){background-color:#fe795d}.dark\:odd\:bg-purple-500:is(.dark *):nth-child(odd){background-color:var(--color-purple-500)}.dark\:odd\:bg-red-500:is(.dark *):nth-child(odd){background-color:var(--color-red-500)}.dark\:odd\:bg-rose-500:is(.dark *):nth-child(odd){background-color:var(--color-rose-500)}.dark\:odd\:bg-sky-500:is(.dark *):nth-child(odd){background-color:var(--color-sky-500)}.dark\:odd\:bg-teal-500:is(.dark *):nth-child(odd){background-color:var(--color-teal-500)}.dark\:odd\:bg-violet-500:is(.dark *):nth-child(odd){background-color:var(--color-violet-500)}.dark\:odd\:bg-yellow-500:is(.dark *):nth-child(odd){background-color:var(--color-yellow-500)}.dark\:even\:bg-amber-600:is(.dark *):nth-child(2n){background-color:var(--color-amber-600)}.dark\:even\:bg-blue-600:is(.dark *):nth-child(2n){background-color:var(--color-blue-600)}.dark\:even\:bg-cyan-600:is(.dark *):nth-child(2n){background-color:var(--color-cyan-600)}.dark\:even\:bg-emerald-600:is(.dark *):nth-child(2n){background-color:var(--color-emerald-600)}.dark\:even\:bg-fuchsia-600:is(.dark *):nth-child(2n){background-color:var(--color-fuchsia-600)}.dark\:even\:bg-gray-600:is(.dark *):nth-child(2n){background-color:var(--color-gray-600)}.dark\:even\:bg-gray-700:is(.dark *):nth-child(2n){background-color:var(--color-gray-700)}.dark\:even\:bg-green-600:is(.dark *):nth-child(2n){background-color:var(--color-green-600)}.dark\:even\:bg-indigo-600:is(.dark *):nth-child(2n){background-color:var(--color-indigo-600)}.dark\:even\:bg-lime-600:is(.dark *):nth-child(2n){background-color:var(--color-lime-600)}.dark\:even\:bg-orange-600:is(.dark *):nth-child(2n){background-color:var(--color-orange-600)}.dark\:even\:bg-pink-600:is(.dark *):nth-child(2n){background-color:var(--color-pink-600)}.dark\:even\:bg-primary-600:is(.dark *):nth-child(2n){background-color:#ef562f}.dark\:even\:bg-purple-600:is(.dark *):nth-child(2n){background-color:var(--color-purple-600)}.dark\:even\:bg-red-600:is(.dark *):nth-child(2n){background-color:var(--color-red-600)}.dark\:even\:bg-rose-600:is(.dark *):nth-child(2n){background-color:var(--color-rose-600)}.dark\:even\:bg-sky-600:is(.dark *):nth-child(2n){background-color:var(--color-sky-600)}.dark\:even\:bg-teal-600:is(.dark *):nth-child(2n){background-color:var(--color-teal-600)}.dark\:even\:bg-violet-600:is(.dark *):nth-child(2n){background-color:var(--color-violet-600)}.dark\:even\:bg-yellow-600:is(.dark *):nth-child(2n){background-color:var(--color-yellow-600)}.dark\:focus-within\:border-primary-500:is(.dark *):focus-within{border-color:#fe795d}.dark\:focus-within\:text-white:is(.dark *):focus-within{color:var(--color-white)}.dark\:focus-within\:ring-amber-900:is(.dark *):focus-within{--tw-ring-color:var(--color-amber-900)}.dark\:focus-within\:ring-blue-800:is(.dark *):focus-within{--tw-ring-color:var(--color-blue-800)}.dark\:focus-within\:ring-cyan-800:is(.dark *):focus-within{--tw-ring-color:var(--color-cyan-800)}.dark\:focus-within\:ring-emerald-800:is(.dark *):focus-within{--tw-ring-color:var(--color-emerald-800)}.dark\:focus-within\:ring-gray-700:is(.dark *):focus-within{--tw-ring-color:var(--color-gray-700)}.dark\:focus-within\:ring-gray-800:is(.dark *):focus-within{--tw-ring-color:var(--color-gray-800)}.dark\:focus-within\:ring-green-800:is(.dark *):focus-within{--tw-ring-color:var(--color-green-800)}.dark\:focus-within\:ring-indigo-800:is(.dark *):focus-within{--tw-ring-color:var(--color-indigo-800)}.dark\:focus-within\:ring-lime-800:is(.dark *):focus-within{--tw-ring-color:var(--color-lime-800)}.dark\:focus-within\:ring-orange-900:is(.dark *):focus-within{--tw-ring-color:var(--color-orange-900)}.dark\:focus-within\:ring-primary-800:is(.dark *):focus-within{--tw-ring-color:#cc4522}.dark\:focus-within\:ring-red-900:is(.dark *):focus-within{--tw-ring-color:var(--color-red-900)}.dark\:focus-within\:ring-sky-800:is(.dark *):focus-within{--tw-ring-color:var(--color-sky-800)}.dark\:focus-within\:ring-teal-800:is(.dark *):focus-within{--tw-ring-color:var(--color-teal-800)}.dark\:focus-within\:ring-violet-800:is(.dark *):focus-within{--tw-ring-color:var(--color-violet-800)}.dark\:focus-within\:ring-yellow-900:is(.dark *):focus-within{--tw-ring-color:var(--color-yellow-900)}@media(hover:hover){.dark\:hover\:border-gray-500:is(.dark *):hover{border-color:var(--color-gray-500)}.dark\:hover\:border-gray-600:is(.dark *):hover{border-color:var(--color-gray-600)}.dark\:hover\:bg-amber-400:is(.dark *):hover{background-color:var(--color-amber-400)}.dark\:hover\:bg-amber-500:is(.dark *):hover{background-color:var(--color-amber-500)}.dark\:hover\:bg-amber-700:is(.dark *):hover{background-color:var(--color-amber-700)}.dark\:hover\:bg-amber-800:is(.dark *):hover{background-color:var(--color-amber-800)}.dark\:hover\:bg-blue-400:is(.dark *):hover{background-color:var(--color-blue-400)}.dark\:hover\:bg-blue-500:is(.dark *):hover{background-color:var(--color-blue-500)}.dark\:hover\:bg-blue-700:is(.dark *):hover{background-color:var(--color-blue-700)}.dark\:hover\:bg-blue-800:is(.dark *):hover{background-color:var(--color-blue-800)}.dark\:hover\:bg-blue-900\/20:is(.dark *):hover{background-color:#1c398e33}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-blue-900\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-blue-900)20%,transparent)}}.dark\:hover\:bg-cyan-400:is(.dark *):hover{background-color:var(--color-cyan-400)}.dark\:hover\:bg-cyan-500:is(.dark *):hover{background-color:var(--color-cyan-500)}.dark\:hover\:bg-cyan-700:is(.dark *):hover{background-color:var(--color-cyan-700)}.dark\:hover\:bg-cyan-800:is(.dark *):hover{background-color:var(--color-cyan-800)}.dark\:hover\:bg-emerald-400:is(.dark *):hover{background-color:var(--color-emerald-400)}.dark\:hover\:bg-emerald-500:is(.dark *):hover{background-color:var(--color-emerald-500)}.dark\:hover\:bg-emerald-700:is(.dark *):hover{background-color:var(--color-emerald-700)}.dark\:hover\:bg-emerald-800:is(.dark *):hover{background-color:var(--color-emerald-800)}.dark\:hover\:bg-fuchsia-400:is(.dark *):hover{background-color:var(--color-fuchsia-400)}.dark\:hover\:bg-fuchsia-500:is(.dark *):hover{background-color:var(--color-fuchsia-500)}.dark\:hover\:bg-fuchsia-700:is(.dark *):hover{background-color:var(--color-fuchsia-700)}.dark\:hover\:bg-fuchsia-800:is(.dark *):hover{background-color:var(--color-fuchsia-800)}.dark\:hover\:bg-gray-400:is(.dark *):hover{background-color:var(--color-gray-400)}.dark\:hover\:bg-gray-500:is(.dark *):hover{background-color:var(--color-gray-500)}.dark\:hover\:bg-gray-600:is(.dark *):hover{background-color:var(--color-gray-600)}.dark\:hover\:bg-gray-700:is(.dark *):hover{background-color:var(--color-gray-700)}.dark\:hover\:bg-gray-800:is(.dark *):hover{background-color:var(--color-gray-800)}.dark\:hover\:bg-gray-800\/50:is(.dark *):hover{background-color:#1e293980}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-gray-800\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-gray-800)50%,transparent)}}.dark\:hover\:bg-green-400:is(.dark *):hover{background-color:var(--color-green-400)}.dark\:hover\:bg-green-600:is(.dark *):hover{background-color:var(--color-green-600)}.dark\:hover\:bg-green-700:is(.dark *):hover{background-color:var(--color-green-700)}.dark\:hover\:bg-green-800:is(.dark *):hover{background-color:var(--color-green-800)}.dark\:hover\:bg-indigo-400:is(.dark *):hover{background-color:var(--color-indigo-400)}.dark\:hover\:bg-indigo-500:is(.dark *):hover{background-color:var(--color-indigo-500)}.dark\:hover\:bg-indigo-700:is(.dark *):hover{background-color:var(--color-indigo-700)}.dark\:hover\:bg-indigo-800:is(.dark *):hover{background-color:var(--color-indigo-800)}.dark\:hover\:bg-lime-400:is(.dark *):hover{background-color:var(--color-lime-400)}.dark\:hover\:bg-lime-500:is(.dark *):hover{background-color:var(--color-lime-500)}.dark\:hover\:bg-lime-700:is(.dark *):hover{background-color:var(--color-lime-700)}.dark\:hover\:bg-lime-800:is(.dark *):hover{background-color:var(--color-lime-800)}.dark\:hover\:bg-orange-400:is(.dark *):hover{background-color:var(--color-orange-400)}.dark\:hover\:bg-orange-500:is(.dark *):hover{background-color:var(--color-orange-500)}.dark\:hover\:bg-orange-700:is(.dark *):hover{background-color:var(--color-orange-700)}.dark\:hover\:bg-orange-800:is(.dark *):hover{background-color:var(--color-orange-800)}.dark\:hover\:bg-pink-400:is(.dark *):hover{background-color:var(--color-pink-400)}.dark\:hover\:bg-pink-500:is(.dark *):hover{background-color:var(--color-pink-500)}.dark\:hover\:bg-pink-700:is(.dark *):hover{background-color:var(--color-pink-700)}.dark\:hover\:bg-pink-800:is(.dark *):hover{background-color:var(--color-pink-800)}.dark\:hover\:bg-primary-400:is(.dark *):hover{background-color:#ffbcad}.dark\:hover\:bg-primary-500:is(.dark *):hover{background-color:#fe795d}.dark\:hover\:bg-primary-600:is(.dark *):hover{background-color:#ef562f}.dark\:hover\:bg-primary-700:is(.dark *):hover{background-color:#eb4f27}.dark\:hover\:bg-primary-800:is(.dark *):hover{background-color:#cc4522}.dark\:hover\:bg-purple-400:is(.dark *):hover{background-color:var(--color-purple-400)}.dark\:hover\:bg-purple-500:is(.dark *):hover{background-color:var(--color-purple-500)}.dark\:hover\:bg-purple-700:is(.dark *):hover{background-color:var(--color-purple-700)}.dark\:hover\:bg-purple-800:is(.dark *):hover{background-color:var(--color-purple-800)}.dark\:hover\:bg-red-400:is(.dark *):hover{background-color:var(--color-red-400)}.dark\:hover\:bg-red-600:is(.dark *):hover{background-color:var(--color-red-600)}.dark\:hover\:bg-red-700:is(.dark *):hover{background-color:var(--color-red-700)}.dark\:hover\:bg-red-800:is(.dark *):hover{background-color:var(--color-red-800)}.dark\:hover\:bg-red-900\/20:is(.dark *):hover{background-color:#82181a33}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-red-900\/20:is(.dark *):hover{background-color:color-mix(in oklab,var(--color-red-900)20%,transparent)}}.dark\:hover\:bg-rose-400:is(.dark *):hover{background-color:var(--color-rose-400)}.dark\:hover\:bg-rose-500:is(.dark *):hover{background-color:var(--color-rose-500)}.dark\:hover\:bg-rose-700:is(.dark *):hover{background-color:var(--color-rose-700)}.dark\:hover\:bg-rose-800:is(.dark *):hover{background-color:var(--color-rose-800)}.dark\:hover\:bg-sky-400:is(.dark *):hover{background-color:var(--color-sky-400)}.dark\:hover\:bg-sky-500:is(.dark *):hover{background-color:var(--color-sky-500)}.dark\:hover\:bg-sky-700:is(.dark *):hover{background-color:var(--color-sky-700)}.dark\:hover\:bg-sky-800:is(.dark *):hover{background-color:var(--color-sky-800)}.dark\:hover\:bg-teal-400:is(.dark *):hover{background-color:var(--color-teal-400)}.dark\:hover\:bg-teal-500:is(.dark *):hover{background-color:var(--color-teal-500)}.dark\:hover\:bg-teal-700:is(.dark *):hover{background-color:var(--color-teal-700)}.dark\:hover\:bg-teal-800:is(.dark *):hover{background-color:var(--color-teal-800)}.dark\:hover\:bg-violet-400:is(.dark *):hover{background-color:var(--color-violet-400)}.dark\:hover\:bg-violet-500:is(.dark *):hover{background-color:var(--color-violet-500)}.dark\:hover\:bg-violet-700:is(.dark *):hover{background-color:var(--color-violet-700)}.dark\:hover\:bg-violet-800:is(.dark *):hover{background-color:var(--color-violet-800)}.dark\:hover\:bg-yellow-400:is(.dark *):hover{background-color:var(--color-yellow-400)}.dark\:hover\:bg-yellow-700:is(.dark *):hover{background-color:var(--color-yellow-700)}.dark\:hover\:bg-yellow-800:is(.dark *):hover{background-color:var(--color-yellow-800)}.dark\:hover\:text-amber-300:is(.dark *):hover{color:var(--color-amber-300)}.dark\:hover\:text-amber-500:is(.dark *):hover{color:var(--color-amber-500)}.dark\:hover\:text-blue-300:is(.dark *):hover{color:var(--color-blue-300)}.dark\:hover\:text-blue-500:is(.dark *):hover{color:var(--color-blue-500)}.dark\:hover\:text-cyan-300:is(.dark *):hover{color:var(--color-cyan-300)}.dark\:hover\:text-cyan-500:is(.dark *):hover{color:var(--color-cyan-500)}.dark\:hover\:text-emerald-300:is(.dark *):hover{color:var(--color-emerald-300)}.dark\:hover\:text-emerald-500:is(.dark *):hover{color:var(--color-emerald-500)}.dark\:hover\:text-fuchsia-300:is(.dark *):hover{color:var(--color-fuchsia-300)}.dark\:hover\:text-fuchsia-500:is(.dark *):hover{color:var(--color-fuchsia-500)}.dark\:hover\:text-gray-50:is(.dark *):hover{color:var(--color-gray-50)}.dark\:hover\:text-gray-300:is(.dark *):hover{color:var(--color-gray-300)}.dark\:hover\:text-gray-500:is(.dark *):hover{color:var(--color-gray-500)}.dark\:hover\:text-green-300:is(.dark *):hover{color:var(--color-green-300)}.dark\:hover\:text-green-500:is(.dark *):hover{color:var(--color-green-500)}.dark\:hover\:text-indigo-300:is(.dark *):hover{color:var(--color-indigo-300)}.dark\:hover\:text-indigo-500:is(.dark *):hover{color:var(--color-indigo-500)}.dark\:hover\:text-lime-300:is(.dark *):hover{color:var(--color-lime-300)}.dark\:hover\:text-lime-500:is(.dark *):hover{color:var(--color-lime-500)}.dark\:hover\:text-orange-300:is(.dark *):hover{color:var(--color-orange-300)}.dark\:hover\:text-orange-500:is(.dark *):hover{color:var(--color-orange-500)}.dark\:hover\:text-pink-300:is(.dark *):hover{color:var(--color-pink-300)}.dark\:hover\:text-pink-500:is(.dark *):hover{color:var(--color-pink-500)}.dark\:hover\:text-primary-100:is(.dark *):hover{color:#fff1ee}.dark\:hover\:text-primary-300:is(.dark *):hover{color:#ffd5cc}.dark\:hover\:text-primary-500:is(.dark *):hover{color:#fe795d}.dark\:hover\:text-primary-900:is(.dark *):hover{color:#a5371b}.dark\:hover\:text-purple-300:is(.dark *):hover{color:var(--color-purple-300)}.dark\:hover\:text-purple-500:is(.dark *):hover{color:var(--color-purple-500)}.dark\:hover\:text-red-300:is(.dark *):hover{color:var(--color-red-300)}.dark\:hover\:text-red-500:is(.dark *):hover{color:var(--color-red-500)}.dark\:hover\:text-rose-300:is(.dark *):hover{color:var(--color-rose-300)}.dark\:hover\:text-rose-500:is(.dark *):hover{color:var(--color-rose-500)}.dark\:hover\:text-sky-300:is(.dark *):hover{color:var(--color-sky-300)}.dark\:hover\:text-sky-500:is(.dark *):hover{color:var(--color-sky-500)}.dark\:hover\:text-teal-300:is(.dark *):hover{color:var(--color-teal-300)}.dark\:hover\:text-teal-500:is(.dark *):hover{color:var(--color-teal-500)}.dark\:hover\:text-violet-300:is(.dark *):hover{color:var(--color-violet-300)}.dark\:hover\:text-violet-500:is(.dark *):hover{color:var(--color-violet-500)}.dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}.dark\:hover\:text-yellow-300:is(.dark *):hover{color:var(--color-yellow-300)}.dark\:hover\:text-yellow-500:is(.dark *):hover{color:var(--color-yellow-500)}}.dark\:focus\:border-amber-500:is(.dark *):focus{border-color:var(--color-amber-500)}.dark\:focus\:border-blue-500:is(.dark *):focus{border-color:var(--color-blue-500)}.dark\:focus\:border-cyan-500:is(.dark *):focus{border-color:var(--color-cyan-500)}.dark\:focus\:border-emerald-500:is(.dark *):focus{border-color:var(--color-emerald-500)}.dark\:focus\:border-fuchsia-500:is(.dark *):focus{border-color:var(--color-fuchsia-500)}.dark\:focus\:border-gray-500:is(.dark *):focus{border-color:var(--color-gray-500)}.dark\:focus\:border-green-500:is(.dark *):focus{border-color:var(--color-green-500)}.dark\:focus\:border-indigo-500:is(.dark *):focus{border-color:var(--color-indigo-500)}.dark\:focus\:border-lime-500:is(.dark *):focus{border-color:var(--color-lime-500)}.dark\:focus\:border-orange-500:is(.dark *):focus{border-color:var(--color-orange-500)}.dark\:focus\:border-pink-500:is(.dark *):focus{border-color:var(--color-pink-500)}.dark\:focus\:border-primary-500:is(.dark *):focus{border-color:#fe795d}.dark\:focus\:border-purple-500:is(.dark *):focus{border-color:var(--color-purple-500)}.dark\:focus\:border-red-500:is(.dark *):focus{border-color:var(--color-red-500)}.dark\:focus\:border-rose-500:is(.dark *):focus{border-color:var(--color-rose-500)}.dark\:focus\:border-sky-500:is(.dark *):focus{border-color:var(--color-sky-500)}.dark\:focus\:border-teal-500:is(.dark *):focus{border-color:var(--color-teal-500)}.dark\:focus\:border-violet-500:is(.dark *):focus{border-color:var(--color-violet-500)}.dark\:focus\:border-yellow-500:is(.dark *):focus{border-color:var(--color-yellow-500)}.dark\:focus\:text-white:is(.dark *):focus{color:var(--color-white)}.dark\:focus\:ring-amber-400:is(.dark *):focus{--tw-ring-color:var(--color-amber-400)}.dark\:focus\:ring-amber-500:is(.dark *):focus{--tw-ring-color:var(--color-amber-500)}.dark\:focus\:ring-amber-600:is(.dark *):focus{--tw-ring-color:var(--color-amber-600)}.dark\:focus\:ring-blue-400:is(.dark *):focus{--tw-ring-color:var(--color-blue-400)}.dark\:focus\:ring-blue-500:is(.dark *):focus{--tw-ring-color:var(--color-blue-500)}.dark\:focus\:ring-blue-600:is(.dark *):focus{--tw-ring-color:var(--color-blue-600)}.dark\:focus\:ring-blue-700:is(.dark *):focus{--tw-ring-color:var(--color-blue-700)}.dark\:focus\:ring-blue-800:is(.dark *):focus{--tw-ring-color:var(--color-blue-800)}.dark\:focus\:ring-cyan-400:is(.dark *):focus{--tw-ring-color:var(--color-cyan-400)}.dark\:focus\:ring-cyan-500:is(.dark *):focus{--tw-ring-color:var(--color-cyan-500)}.dark\:focus\:ring-cyan-600:is(.dark *):focus{--tw-ring-color:var(--color-cyan-600)}.dark\:focus\:ring-cyan-800:is(.dark *):focus{--tw-ring-color:var(--color-cyan-800)}.dark\:focus\:ring-emerald-400:is(.dark *):focus{--tw-ring-color:var(--color-emerald-400)}.dark\:focus\:ring-emerald-500:is(.dark *):focus{--tw-ring-color:var(--color-emerald-500)}.dark\:focus\:ring-emerald-600:is(.dark *):focus{--tw-ring-color:var(--color-emerald-600)}.dark\:focus\:ring-fuchsia-400:is(.dark *):focus{--tw-ring-color:var(--color-fuchsia-400)}.dark\:focus\:ring-fuchsia-500:is(.dark *):focus{--tw-ring-color:var(--color-fuchsia-500)}.dark\:focus\:ring-fuchsia-600:is(.dark *):focus{--tw-ring-color:var(--color-fuchsia-600)}.dark\:focus\:ring-gray-400:is(.dark *):focus{--tw-ring-color:var(--color-gray-400)}.dark\:focus\:ring-gray-500:is(.dark *):focus{--tw-ring-color:var(--color-gray-500)}.dark\:focus\:ring-gray-600:is(.dark *):focus{--tw-ring-color:var(--color-gray-600)}.dark\:focus\:ring-gray-800:is(.dark *):focus{--tw-ring-color:var(--color-gray-800)}.dark\:focus\:ring-green-400:is(.dark *):focus{--tw-ring-color:var(--color-green-400)}.dark\:focus\:ring-green-500:is(.dark *):focus{--tw-ring-color:var(--color-green-500)}.dark\:focus\:ring-green-600:is(.dark *):focus{--tw-ring-color:var(--color-green-600)}.dark\:focus\:ring-green-800:is(.dark *):focus{--tw-ring-color:var(--color-green-800)}.dark\:focus\:ring-indigo-400:is(.dark *):focus{--tw-ring-color:var(--color-indigo-400)}.dark\:focus\:ring-indigo-500:is(.dark *):focus{--tw-ring-color:var(--color-indigo-500)}.dark\:focus\:ring-indigo-600:is(.dark *):focus{--tw-ring-color:var(--color-indigo-600)}.dark\:focus\:ring-indigo-700:is(.dark *):focus{--tw-ring-color:var(--color-indigo-700)}.dark\:focus\:ring-lime-400:is(.dark *):focus{--tw-ring-color:var(--color-lime-400)}.dark\:focus\:ring-lime-500:is(.dark *):focus{--tw-ring-color:var(--color-lime-500)}.dark\:focus\:ring-lime-600:is(.dark *):focus{--tw-ring-color:var(--color-lime-600)}.dark\:focus\:ring-lime-700:is(.dark *):focus{--tw-ring-color:var(--color-lime-700)}.dark\:focus\:ring-lime-800:is(.dark *):focus{--tw-ring-color:var(--color-lime-800)}.dark\:focus\:ring-orange-400:is(.dark *):focus{--tw-ring-color:var(--color-orange-400)}.dark\:focus\:ring-orange-500:is(.dark *):focus{--tw-ring-color:var(--color-orange-500)}.dark\:focus\:ring-orange-600:is(.dark *):focus{--tw-ring-color:var(--color-orange-600)}.dark\:focus\:ring-pink-400:is(.dark *):focus{--tw-ring-color:var(--color-pink-400)}.dark\:focus\:ring-pink-500:is(.dark *):focus{--tw-ring-color:var(--color-pink-500)}.dark\:focus\:ring-pink-600:is(.dark *):focus{--tw-ring-color:var(--color-pink-600)}.dark\:focus\:ring-pink-800:is(.dark *):focus{--tw-ring-color:var(--color-pink-800)}.dark\:focus\:ring-primary-400:is(.dark *):focus{--tw-ring-color:#ffbcad}.dark\:focus\:ring-primary-500:is(.dark *):focus{--tw-ring-color:#fe795d}.dark\:focus\:ring-primary-600:is(.dark *):focus{--tw-ring-color:#ef562f}.dark\:focus\:ring-purple-400:is(.dark *):focus{--tw-ring-color:var(--color-purple-400)}.dark\:focus\:ring-purple-500:is(.dark *):focus{--tw-ring-color:var(--color-purple-500)}.dark\:focus\:ring-purple-600:is(.dark *):focus{--tw-ring-color:var(--color-purple-600)}.dark\:focus\:ring-purple-800:is(.dark *):focus{--tw-ring-color:var(--color-purple-800)}.dark\:focus\:ring-red-400:is(.dark *):focus{--tw-ring-color:var(--color-red-400)}.dark\:focus\:ring-red-500:is(.dark *):focus{--tw-ring-color:var(--color-red-500)}.dark\:focus\:ring-red-600:is(.dark *):focus{--tw-ring-color:var(--color-red-600)}.dark\:focus\:ring-red-800:is(.dark *):focus{--tw-ring-color:var(--color-red-800)}.dark\:focus\:ring-rose-400:is(.dark *):focus{--tw-ring-color:var(--color-rose-400)}.dark\:focus\:ring-rose-500:is(.dark *):focus{--tw-ring-color:var(--color-rose-500)}.dark\:focus\:ring-rose-600:is(.dark *):focus{--tw-ring-color:var(--color-rose-600)}.dark\:focus\:ring-sky-400:is(.dark *):focus{--tw-ring-color:var(--color-sky-400)}.dark\:focus\:ring-sky-500:is(.dark *):focus{--tw-ring-color:var(--color-sky-500)}.dark\:focus\:ring-sky-600:is(.dark *):focus{--tw-ring-color:var(--color-sky-600)}.dark\:focus\:ring-teal-400:is(.dark *):focus{--tw-ring-color:var(--color-teal-400)}.dark\:focus\:ring-teal-500:is(.dark *):focus{--tw-ring-color:var(--color-teal-500)}.dark\:focus\:ring-teal-600:is(.dark *):focus{--tw-ring-color:var(--color-teal-600)}.dark\:focus\:ring-teal-700:is(.dark *):focus{--tw-ring-color:var(--color-teal-700)}.dark\:focus\:ring-teal-800:is(.dark *):focus{--tw-ring-color:var(--color-teal-800)}.dark\:focus\:ring-violet-400:is(.dark *):focus{--tw-ring-color:var(--color-violet-400)}.dark\:focus\:ring-violet-500:is(.dark *):focus{--tw-ring-color:var(--color-violet-500)}.dark\:focus\:ring-violet-600:is(.dark *):focus{--tw-ring-color:var(--color-violet-600)}.dark\:focus\:ring-yellow-400:is(.dark *):focus{--tw-ring-color:var(--color-yellow-400)}.dark\:focus\:ring-yellow-500:is(.dark *):focus{--tw-ring-color:var(--color-yellow-500)}.dark\:focus\:ring-yellow-600:is(.dark *):focus{--tw-ring-color:var(--color-yellow-600)}.dark\:focus-visible\:ring-gray-500:is(.dark *):focus-visible{--tw-ring-color:var(--color-gray-500)}.dark\:focus-visible\:ring-offset-gray-900:is(.dark *):focus-visible{--tw-ring-offset-color:var(--color-gray-900)}.dark\:disabled\:text-gray-500:is(.dark *):disabled{color:var(--color-gray-500)}.data-\[state\=completed\]\:dark\:bg-blue-900[data-state=completed]:is(.dark *){background-color:var(--color-blue-900)}.data-\[state\=completed\]\:dark\:bg-gray-500[data-state=completed]:is(.dark *){background-color:var(--color-gray-500)}.data-\[state\=completed\]\:dark\:bg-green-900[data-state=completed]:is(.dark *){background-color:var(--color-green-900)}.data-\[state\=completed\]\:dark\:bg-indigo-900[data-state=completed]:is(.dark *){background-color:var(--color-indigo-900)}.data-\[state\=completed\]\:dark\:bg-pink-900[data-state=completed]:is(.dark *){background-color:var(--color-pink-900)}.data-\[state\=completed\]\:dark\:bg-primary-900[data-state=completed]:is(.dark *){background-color:#a5371b}.data-\[state\=completed\]\:dark\:bg-purple-900[data-state=completed]:is(.dark *){background-color:var(--color-purple-900)}.data-\[state\=completed\]\:dark\:bg-red-900[data-state=completed]:is(.dark *){background-color:var(--color-red-900)}.data-\[state\=completed\]\:dark\:bg-yellow-600[data-state=completed]:is(.dark *){background-color:var(--color-yellow-600)}.data-\[state\=current\]\:dark\:bg-blue-400[data-state=current]:is(.dark *){background-color:var(--color-blue-400)}.data-\[state\=current\]\:dark\:bg-gray-200[data-state=current]:is(.dark *){background-color:var(--color-gray-200)}.data-\[state\=current\]\:dark\:bg-green-400[data-state=current]:is(.dark *){background-color:var(--color-green-400)}.data-\[state\=current\]\:dark\:bg-indigo-400[data-state=current]:is(.dark *){background-color:var(--color-indigo-400)}.data-\[state\=current\]\:dark\:bg-pink-400[data-state=current]:is(.dark *){background-color:var(--color-pink-400)}.data-\[state\=current\]\:dark\:bg-primary-400[data-state=current]:is(.dark *){background-color:#ffbcad}.data-\[state\=current\]\:dark\:bg-purple-400[data-state=current]:is(.dark *){background-color:var(--color-purple-400)}.data-\[state\=current\]\:dark\:bg-red-500[data-state=current]:is(.dark *){background-color:var(--color-red-500)}.data-\[state\=current\]\:dark\:bg-yellow-400[data-state=current]:is(.dark *){background-color:var(--color-yellow-400)}@media(min-width:40rem){.dark\:sm\:bg-inherit:is(.dark *){background-color:inherit}.sm\:dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:sm\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.sm\:dark\:text-white:is(.dark *){color:var(--color-white)}@media(hover:hover){.sm\:dark\:hover\:bg-transparent:is(.dark *):hover{background-color:#0000}.sm\:dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}}}@media(min-width:48rem){.dark\:md\:bg-inherit:is(.dark *){background-color:inherit}.md\:dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:md\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.md\:dark\:text-white:is(.dark *){color:var(--color-white)}@media(hover:hover){.md\:dark\:hover\:bg-transparent:is(.dark *):hover{background-color:#0000}.md\:dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}}}@media(min-width:64rem){.dark\:lg\:bg-inherit:is(.dark *){background-color:inherit}.lg\:dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:lg\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.lg\:dark\:text-white:is(.dark *){color:var(--color-white)}@media(hover:hover){.lg\:dark\:hover\:bg-transparent:is(.dark *):hover{background-color:#0000}.lg\:dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}}}@media(min-width:80rem){.dark\:xl\:bg-inherit:is(.dark *){background-color:inherit}.xl\:dark\:bg-transparent:is(.dark *){background-color:#0000}.dark\:xl\:text-gray-400:is(.dark *){color:var(--color-gray-400)}.xl\:dark\:text-white:is(.dark *){color:var(--color-white)}@media(hover:hover){.xl\:dark\:hover\:bg-transparent:is(.dark *):hover{background-color:#0000}.xl\:dark\:hover\:text-white:is(.dark *):hover{color:var(--color-white)}}}@media(hover:hover){.\[\&_tbody_tr\]\:hover\:bg-gray-50 tbody tr:hover{background-color:var(--color-gray-50)}.\[\&_tbody_tr\]\:dark\:hover\:bg-gray-600 tbody tr:is(.dark *):hover{background-color:var(--color-gray-600)}}.\[\&_tbody_tr\:nth-child\(even\)\]\:bg-gray-50 tbody tr:nth-child(2n){background-color:var(--color-gray-50)}.\[\&_tbody_tr\:nth-child\(even\)\]\:dark\:bg-gray-800 tbody tr:nth-child(2n):is(.dark *){background-color:var(--color-gray-800)}.\[\&_tbody_tr\:nth-child\(odd\)\]\:bg-white tbody tr:nth-child(odd){background-color:var(--color-white)}.\[\&_tbody_tr\:nth-child\(odd\)\]\:dark\:bg-gray-900 tbody tr:nth-child(odd):is(.dark *){background-color:var(--color-gray-900)}.\[\&\:not\(\:first-child\)\]\:rounded-s-none:not(:first-child){border-start-start-radius:0;border-end-start-radius:0}.\[\&\:not\(\:last-child\)\]\:rounded-e-none:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}.\[\&\:not\(\:last-child\)\]\:border-e-0:not(:last-child){border-inline-end-style:var(--tw-border-style);border-inline-end-width:0}.\[\&\>\*\]\:list-none>*{list-style-type:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}div.svelte-clyidt{position:relative;width:100%;height:100%}canvas.svelte-clyidt{display:block;position:relative;width:100%;height:100%}.clip{clip-path:polygon(0 0,0% 100%,100% 100%,100% 85%,15% 0)}body{background-color:#f3f4f6}.canvasContainer.svelte-1n46o8q{width:100%;height:calc(100vh - 120px)} diff --git a/docs/index.html b/docs/index.html index 521169e..c98212e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,8 +6,8 @@ CSG Builder - - + + diff --git a/package-lock.json b/package-lock.json index 236729a..05f2add 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,37 +11,37 @@ "@sveltejs/vite-plugin-svelte": "^6.2.1", "@tailwindcss/postcss": "^4.1.17", "@tailwindcss/vite": "^4.1.17", - "@threlte/core": "^8.3.0", - "@threlte/extras": "^9.7.0", + "@threlte/core": "^8.3.1", + "@threlte/extras": "^9.7.1", "@tsconfig/svelte": "^5.0.6", "@types/node": "^24.10.1", "@types/three": "^0.181.0", - "@typescript-eslint/eslint-plugin": "^8.47.0", - "@typescript-eslint/parser": "^8.47.0", - "@vitest/coverage-v8": "^4.0.13", - "@vitest/ui": "^4.0.13", + "@typescript-eslint/eslint-plugin": "^8.48.1", + "@typescript-eslint/parser": "^8.48.1", + "@vitest/coverage-v8": "^4.0.15", + "@vitest/ui": "^4.0.15", "autoprefixer": "^10.4.22", "commander": "^14.0.2", "eslint": "^9.39.1", "eslint-config-prettier": "^10.1.8", "eslint-plugin-simple-import-sort": "^12.1.1", - "eslint-plugin-svelte": "^3.13.0", + "eslint-plugin-svelte": "^3.13.1", "eslint-plugin-unicorn": "^62.0.0", - "flowbite-svelte": "^1.28.1", + "flowbite-svelte": "^1.29.1", "postcss": "^8.5.6", - "prettier": "^3.6.2", + "prettier": "^3.7.4", "prettier-plugin-svelte": "^3.4.0", - "svelte": "^5.43.14", + "svelte": "^5.45.5", "svelte-check": "^4.3.4", "svelte-preprocess": "^6.0.3", "tailwindcss": "^4.1.17", "three": "^0.181.2", "three-bvh-csg": "^0.0.17", "tslib": "^2.8.1", - "tsx": "^4.20.6", + "tsx": "^4.21.0", "typescript": "^5.9.3", - "vite": "^7.2.4", - "vitest": "^4.0.13" + "vite": "^7.2.6", + "vitest": "^4.0.15" }, "engines": { "node": ">=22.0.0", @@ -129,9 +129,9 @@ "license": "Apache-2.0" }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", - "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.1.tgz", + "integrity": "sha512-HHB50pdsBX6k47S4u5g/CaLjqS3qwaOVE5ILsq64jyzgMhLuCuZ8rGzM9yhsAjfjkbgUPMzZEPa7DAp7yz6vuA==", "cpu": [ "ppc64" ], @@ -146,9 +146,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", - "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.1.tgz", + "integrity": "sha512-kFqa6/UcaTbGm/NncN9kzVOODjhZW8e+FRdSeypWe6j33gzclHtwlANs26JrupOntlcWmB0u8+8HZo8s7thHvg==", "cpu": [ "arm" ], @@ -163,9 +163,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", - "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.1.tgz", + "integrity": "sha512-45fuKmAJpxnQWixOGCrS+ro4Uvb4Re9+UTieUY2f8AEc+t7d4AaZ6eUJ3Hva7dtrxAAWHtlEFsXFMAgNnGU9uQ==", "cpu": [ "arm64" ], @@ -180,9 +180,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", - "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.1.tgz", + "integrity": "sha512-LBEpOz0BsgMEeHgenf5aqmn/lLNTFXVfoWMUox8CtWWYK9X4jmQzWjoGoNb8lmAYml/tQ/Ysvm8q7szu7BoxRQ==", "cpu": [ "x64" ], @@ -197,9 +197,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", - "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.1.tgz", + "integrity": "sha512-veg7fL8eMSCVKL7IW4pxb54QERtedFDfY/ASrumK/SbFsXnRazxY4YykN/THYqFnFwJ0aVjiUrVG2PwcdAEqQQ==", "cpu": [ "arm64" ], @@ -214,9 +214,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", - "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.1.tgz", + "integrity": "sha512-+3ELd+nTzhfWb07Vol7EZ+5PTbJ/u74nC6iv4/lwIU99Ip5uuY6QoIf0Hn4m2HoV0qcnRivN3KSqc+FyCHjoVQ==", "cpu": [ "x64" ], @@ -231,9 +231,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", - "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.1.tgz", + "integrity": "sha512-/8Rfgns4XD9XOSXlzUDepG8PX+AVWHliYlUkFI3K3GB6tqbdjYqdhcb4BKRd7C0BhZSoaCxhv8kTcBrcZWP+xg==", "cpu": [ "arm64" ], @@ -248,9 +248,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", - "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.1.tgz", + "integrity": "sha512-GITpD8dK9C+r+5yRT/UKVT36h/DQLOHdwGVwwoHidlnA168oD3uxA878XloXebK4Ul3gDBBIvEdL7go9gCUFzQ==", "cpu": [ "x64" ], @@ -265,9 +265,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", - "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.1.tgz", + "integrity": "sha512-ieMID0JRZY/ZeCrsFQ3Y3NlHNCqIhTprJfDgSB3/lv5jJZ8FX3hqPyXWhe+gvS5ARMBJ242PM+VNz/ctNj//eA==", "cpu": [ "arm" ], @@ -282,9 +282,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", - "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.1.tgz", + "integrity": "sha512-W9//kCrh/6in9rWIBdKaMtuTTzNj6jSeG/haWBADqLLa9P8O5YSRDzgD5y9QBok4AYlzS6ARHifAb75V6G670Q==", "cpu": [ "arm64" ], @@ -299,9 +299,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", - "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.1.tgz", + "integrity": "sha512-VIUV4z8GD8rtSVMfAj1aXFahsi/+tcoXXNYmXgzISL+KB381vbSTNdeZHHHIYqFyXcoEhu9n5cT+05tRv13rlw==", "cpu": [ "ia32" ], @@ -316,9 +316,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", - "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.1.tgz", + "integrity": "sha512-l4rfiiJRN7sTNI//ff65zJ9z8U+k6zcCg0LALU5iEWzY+a1mVZ8iWC1k5EsNKThZ7XCQ6YWtsZ8EWYm7r1UEsg==", "cpu": [ "loong64" ], @@ -333,9 +333,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", - "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.1.tgz", + "integrity": "sha512-U0bEuAOLvO/DWFdygTHWY8C067FXz+UbzKgxYhXC0fDieFa0kDIra1FAhsAARRJbvEyso8aAqvPdNxzWuStBnA==", "cpu": [ "mips64el" ], @@ -350,9 +350,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", - "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.1.tgz", + "integrity": "sha512-NzdQ/Xwu6vPSf/GkdmRNsOfIeSGnh7muundsWItmBsVpMoNPVpM61qNzAVY3pZ1glzzAxLR40UyYM23eaDDbYQ==", "cpu": [ "ppc64" ], @@ -367,9 +367,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", - "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.1.tgz", + "integrity": "sha512-7zlw8p3IApcsN7mFw0O1Z1PyEk6PlKMu18roImfl3iQHTnr/yAfYv6s4hXPidbDoI2Q0pW+5xeoM4eTCC0UdrQ==", "cpu": [ "riscv64" ], @@ -384,9 +384,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", - "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.1.tgz", + "integrity": "sha512-cGj5wli+G+nkVQdZo3+7FDKC25Uh4ZVwOAK6A06Hsvgr8WqBBuOy/1s+PUEd/6Je+vjfm6stX0kmib5b/O2Ykw==", "cpu": [ "s390x" ], @@ -401,9 +401,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", - "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.1.tgz", + "integrity": "sha512-z3H/HYI9MM0HTv3hQZ81f+AKb+yEoCRlUby1F80vbQ5XdzEMyY/9iNlAmhqiBKw4MJXwfgsh7ERGEOhrM1niMA==", "cpu": [ "x64" ], @@ -418,9 +418,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", - "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.1.tgz", + "integrity": "sha512-wzC24DxAvk8Em01YmVXyjl96Mr+ecTPyOuADAvjGg+fyBpGmxmcr2E5ttf7Im8D0sXZihpxzO1isus8MdjMCXQ==", "cpu": [ "arm64" ], @@ -435,9 +435,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", - "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.1.tgz", + "integrity": "sha512-1YQ8ybGi2yIXswu6eNzJsrYIGFpnlzEWRl6iR5gMgmsrR0FcNoV1m9k9sc3PuP5rUBLshOZylc9nqSgymI+TYg==", "cpu": [ "x64" ], @@ -452,9 +452,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", - "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.1.tgz", + "integrity": "sha512-5Z+DzLCrq5wmU7RDaMDe2DVXMRm2tTDvX2KU14JJVBN2CT/qov7XVix85QoJqHltpvAOZUAc3ndU56HSMWrv8g==", "cpu": [ "arm64" ], @@ -469,9 +469,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", - "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.1.tgz", + "integrity": "sha512-Q73ENzIdPF5jap4wqLtsfh8YbYSZ8Q0wnxplOlZUOyZy7B4ZKW8DXGWgTCZmF8VWD7Tciwv5F4NsRf6vYlZtqg==", "cpu": [ "x64" ], @@ -486,9 +486,9 @@ } }, "node_modules/@esbuild/openharmony-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", - "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.1.tgz", + "integrity": "sha512-ajbHrGM/XiK+sXM0JzEbJAen+0E+JMQZ2l4RR4VFwvV9JEERx+oxtgkpoKv1SevhjavK2z2ReHk32pjzktWbGg==", "cpu": [ "arm64" ], @@ -503,9 +503,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", - "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.1.tgz", + "integrity": "sha512-IPUW+y4VIjuDVn+OMzHc5FV4GubIwPnsz6ubkvN8cuhEqH81NovB53IUlrlBkPMEPxvNnf79MGBoz8rZ2iW8HA==", "cpu": [ "x64" ], @@ -520,9 +520,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", - "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.1.tgz", + "integrity": "sha512-RIVRWiljWA6CdVu8zkWcRmGP7iRRIIwvhDKem8UMBjPql2TXM5PkDVvvrzMtj1V+WFPB4K7zkIGM7VzRtFkjdg==", "cpu": [ "arm64" ], @@ -537,9 +537,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", - "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.1.tgz", + "integrity": "sha512-2BR5M8CPbptC1AK5JbJT1fWrHLvejwZidKx3UMSF0ecHMa+smhi16drIrCEggkgviBwLYd5nwrFLSl5Kho96RQ==", "cpu": [ "ia32" ], @@ -554,9 +554,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", - "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.1.tgz", + "integrity": "sha512-d5X6RMYv6taIymSk8JBP+nxv8DQAMY6A51GPgusqLdK9wBz5wWIXy1KjTck6HnjE9hqJzJRdk+1p/t5soSbCtw==", "cpu": [ "x64" ], @@ -665,9 +665,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", - "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.3.tgz", + "integrity": "sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==", "dev": true, "license": "MIT", "dependencies": { @@ -677,7 +677,7 @@ "globals": "^14.0.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", + "js-yaml": "^4.1.1", "minimatch": "^3.1.2", "strip-json-comments": "^3.1.1" }, @@ -889,44 +889,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/@polka/url": { "version": "1.0.0-next.29", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.29.tgz", @@ -993,10 +955,17 @@ } } }, + "node_modules/@rollup/pluginutils/node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.2.tgz", - "integrity": "sha512-yDPzwsgiFO26RJA4nZo8I+xqzh7sJTZIWQOxn+/XOdPE31lAvLIYCKqjV+lNH/vxE2L2iH3plKxDCRK6i+CwhA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.53.3.tgz", + "integrity": "sha512-mRSi+4cBjrRLoaal2PnqH82Wqyb+d3HsPUN/W+WslCXsZsyHa9ZeQQX/pQsZaVIWDkPcpV6jJ+3KLbTbgnwv8w==", "cpu": [ "arm" ], @@ -1008,9 +977,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.2.tgz", - "integrity": "sha512-k8FontTxIE7b0/OGKeSN5B6j25EuppBcWM33Z19JoVT7UTXFSo3D9CdU39wGTeb29NO3XxpMNauh09B+Ibw+9g==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.53.3.tgz", + "integrity": "sha512-CbDGaMpdE9sh7sCmTrTUyllhrg65t6SwhjlMJsLr+J8YjFuPmCEjbBSx4Z/e4SmDyH3aB5hGaJUP2ltV/vcs4w==", "cpu": [ "arm64" ], @@ -1022,9 +991,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.2.tgz", - "integrity": "sha512-A6s4gJpomNBtJ2yioj8bflM2oogDwzUiMl2yNJ2v9E7++sHrSrsQ29fOfn5DM/iCzpWcebNYEdXpaK4tr2RhfQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.53.3.tgz", + "integrity": "sha512-Nr7SlQeqIBpOV6BHHGZgYBuSdanCXuw09hon14MGOLGmXAFYjx1wNvquVPmpZnl0tLjg25dEdr4IQ6GgyToCUA==", "cpu": [ "arm64" ], @@ -1036,9 +1005,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.2.tgz", - "integrity": "sha512-e6XqVmXlHrBlG56obu9gDRPW3O3hLxpwHpLsBJvuI8qqnsrtSZ9ERoWUXtPOkY8c78WghyPHZdmPhHLWNdAGEw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.53.3.tgz", + "integrity": "sha512-DZ8N4CSNfl965CmPktJ8oBnfYr3F8dTTNBQkRlffnUarJ2ohudQD17sZBa097J8xhQ26AwhHJ5mvUyQW8ddTsQ==", "cpu": [ "x64" ], @@ -1050,9 +1019,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.2.tgz", - "integrity": "sha512-v0E9lJW8VsrwPux5Qe5CwmH/CF/2mQs6xU1MF3nmUxmZUCHazCjLgYvToOk+YuuUqLQBio1qkkREhxhc656ViA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.53.3.tgz", + "integrity": "sha512-yMTrCrK92aGyi7GuDNtGn2sNW+Gdb4vErx4t3Gv/Tr+1zRb8ax4z8GWVRfr3Jw8zJWvpGHNpss3vVlbF58DZ4w==", "cpu": [ "arm64" ], @@ -1064,9 +1033,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.2.tgz", - "integrity": "sha512-ClAmAPx3ZCHtp6ysl4XEhWU69GUB1D+s7G9YjHGhIGCSrsg00nEGRRZHmINYxkdoJehde8VIsDC5t9C0gb6yqA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.53.3.tgz", + "integrity": "sha512-lMfF8X7QhdQzseM6XaX0vbno2m3hlyZFhwcndRMw8fbAGUGL3WFMBdK0hbUBIUYcEcMhVLr1SIamDeuLBnXS+Q==", "cpu": [ "x64" ], @@ -1078,9 +1047,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.2.tgz", - "integrity": "sha512-EPlb95nUsz6Dd9Qy13fI5kUPXNSljaG9FiJ4YUGU1O/Q77i5DYFW5KR8g1OzTcdZUqQQ1KdDqsTohdFVwCwjqg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.53.3.tgz", + "integrity": "sha512-k9oD15soC/Ln6d2Wv/JOFPzZXIAIFLp6B+i14KhxAfnq76ajt0EhYc5YPeX6W1xJkAdItcVT+JhKl1QZh44/qw==", "cpu": [ "arm" ], @@ -1092,9 +1061,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.2.tgz", - "integrity": "sha512-BOmnVW+khAUX+YZvNfa0tGTEMVVEerOxN0pDk2E6N6DsEIa2Ctj48FOMfNDdrwinocKaC7YXUZ1pHlKpnkja/Q==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.53.3.tgz", + "integrity": "sha512-vTNlKq+N6CK/8UktsrFuc+/7NlEYVxgaEgRXVUVK258Z5ymho29skzW1sutgYjqNnquGwVUObAaxae8rZ6YMhg==", "cpu": [ "arm" ], @@ -1106,9 +1075,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.2.tgz", - "integrity": "sha512-Xt2byDZ+6OVNuREgBXr4+CZDJtrVso5woFtpKdGPhpTPHcNG7D8YXeQzpNbFRxzTVqJf7kvPMCub/pcGUWgBjA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.53.3.tgz", + "integrity": "sha512-RGrFLWgMhSxRs/EWJMIFM1O5Mzuz3Xy3/mnxJp/5cVhZ2XoCAxJnmNsEyeMJtpK+wu0FJFWz+QF4mjCA7AUQ3w==", "cpu": [ "arm64" ], @@ -1120,9 +1089,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.2.tgz", - "integrity": "sha512-+LdZSldy/I9N8+klim/Y1HsKbJ3BbInHav5qE9Iy77dtHC/pibw1SR/fXlWyAk0ThnpRKoODwnAuSjqxFRDHUQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.53.3.tgz", + "integrity": "sha512-kASyvfBEWYPEwe0Qv4nfu6pNkITLTb32p4yTgzFCocHnJLAHs+9LjUu9ONIhvfT/5lv4YS5muBHyuV84epBo/A==", "cpu": [ "arm64" ], @@ -1134,9 +1103,9 @@ ] }, "node_modules/@rollup/rollup-linux-loong64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.2.tgz", - "integrity": "sha512-8ms8sjmyc1jWJS6WdNSA23rEfdjWB30LH8Wqj0Cqvv7qSHnvw6kgMMXRdop6hkmGPlyYBdRPkjJnj3KCUHV/uQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.53.3.tgz", + "integrity": "sha512-JiuKcp2teLJwQ7vkJ95EwESWkNRFJD7TQgYmCnrPtlu50b4XvT5MOmurWNrCj3IFdyjBQ5p9vnrX4JM6I8OE7g==", "cpu": [ "loong64" ], @@ -1148,9 +1117,9 @@ ] }, "node_modules/@rollup/rollup-linux-ppc64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.2.tgz", - "integrity": "sha512-3HRQLUQbpBDMmzoxPJYd3W6vrVHOo2cVW8RUo87Xz0JPJcBLBr5kZ1pGcQAhdZgX9VV7NbGNipah1omKKe23/g==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.53.3.tgz", + "integrity": "sha512-EoGSa8nd6d3T7zLuqdojxC20oBfNT8nexBbB/rkxgKj5T5vhpAQKKnD+h3UkoMuTyXkP5jTjK/ccNRmQrPNDuw==", "cpu": [ "ppc64" ], @@ -1162,9 +1131,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.2.tgz", - "integrity": "sha512-fMjKi+ojnmIvhk34gZP94vjogXNNUKMEYs+EDaB/5TG/wUkoeua7p7VCHnE6T2Tx+iaghAqQX8teQzcvrYpaQA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.53.3.tgz", + "integrity": "sha512-4s+Wped2IHXHPnAEbIB0YWBv7SDohqxobiiPA1FIWZpX+w9o2i4LezzH/NkFUl8LRci/8udci6cLq+jJQlh+0g==", "cpu": [ "riscv64" ], @@ -1176,9 +1145,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.2.tgz", - "integrity": "sha512-XuGFGU+VwUUV5kLvoAdi0Wz5Xbh2SrjIxCtZj6Wq8MDp4bflb/+ThZsVxokM7n0pcbkEr2h5/pzqzDYI7cCgLQ==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.53.3.tgz", + "integrity": "sha512-68k2g7+0vs2u9CxDt5ktXTngsxOQkSEV/xBbwlqYcUrAVh6P9EgMZvFsnHy4SEiUl46Xf0IObWVbMvPrr2gw8A==", "cpu": [ "riscv64" ], @@ -1190,9 +1159,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.2.tgz", - "integrity": "sha512-w6yjZF0P+NGzWR3AXWX9zc0DNEGdtvykB03uhonSHMRa+oWA6novflo2WaJr6JZakG2ucsyb+rvhrKac6NIy+w==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.53.3.tgz", + "integrity": "sha512-VYsFMpULAz87ZW6BVYw3I6sWesGpsP9OPcyKe8ofdg9LHxSbRMd7zrVrr5xi/3kMZtpWL/wC+UIJWJYVX5uTKg==", "cpu": [ "s390x" ], @@ -1204,9 +1173,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.2.tgz", - "integrity": "sha512-yo8d6tdfdeBArzC7T/PnHd7OypfI9cbuZzPnzLJIyKYFhAQ8SvlkKtKBMbXDxe1h03Rcr7u++nFS7tqXz87Gtw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.53.3.tgz", + "integrity": "sha512-3EhFi1FU6YL8HTUJZ51imGJWEX//ajQPfqWLI3BQq4TlvHy4X0MOr5q3D2Zof/ka0d5FNdPwZXm3Yyib/UEd+w==", "cpu": [ "x64" ], @@ -1218,9 +1187,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.2.tgz", - "integrity": "sha512-ah59c1YkCxKExPP8O9PwOvs+XRLKwh/mV+3YdKqQ5AMQ0r4M4ZDuOrpWkUaqO7fzAHdINzV9tEVu8vNw48z0lA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.53.3.tgz", + "integrity": "sha512-eoROhjcc6HbZCJr+tvVT8X4fW3/5g/WkGvvmwz/88sDtSJzO7r/blvoBDgISDiCjDRZmHpwud7h+6Q9JxFwq1Q==", "cpu": [ "x64" ], @@ -1232,9 +1201,9 @@ ] }, "node_modules/@rollup/rollup-openharmony-arm64": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.2.tgz", - "integrity": "sha512-4VEd19Wmhr+Zy7hbUsFZ6YXEiP48hE//KPLCSVNY5RMGX2/7HZ+QkN55a3atM1C/BZCGIgqN+xrVgtdak2S9+A==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.53.3.tgz", + "integrity": "sha512-OueLAWgrNSPGAdUdIjSWXw+u/02BRTcnfw9PN41D2vq/JSEPnJnVuBgw18VkN8wcd4fjUs+jFHVM4t9+kBSNLw==", "cpu": [ "arm64" ], @@ -1246,9 +1215,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.2.tgz", - "integrity": "sha512-IlbHFYc/pQCgew/d5fslcy1KEaYVCJ44G8pajugd8VoOEI8ODhtb/j8XMhLpwHCMB3yk2J07ctup10gpw2nyMA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.53.3.tgz", + "integrity": "sha512-GOFuKpsxR/whszbF/bzydebLiXIHSgsEUp6M0JI8dWvi+fFa1TD6YQa4aSZHtpmh2/uAlj/Dy+nmby3TJ3pkTw==", "cpu": [ "arm64" ], @@ -1260,9 +1229,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.2.tgz", - "integrity": "sha512-lNlPEGgdUfSzdCWU176ku/dQRnA7W+Gp8d+cWv73jYrb8uT7HTVVxq62DUYxjbaByuf1Yk0RIIAbDzp+CnOTFg==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.53.3.tgz", + "integrity": "sha512-iah+THLcBJdpfZ1TstDFbKNznlzoxa8fmnFYK4V67HvmuNYkVdAywJSoteUszvBQ9/HqN2+9AZghbajMsFT+oA==", "cpu": [ "ia32" ], @@ -1274,9 +1243,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-gnu": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.2.tgz", - "integrity": "sha512-S6YojNVrHybQis2lYov1sd+uj7K0Q05NxHcGktuMMdIQ2VixGwAfbJ23NnlvvVV1bdpR2m5MsNBViHJKcA4ADw==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.53.3.tgz", + "integrity": "sha512-J9QDiOIZlZLdcot5NXEepDkstocktoVjkaKUtqzgzpt2yWjGlbYiKyp05rWwk4nypbYUNoFAztEgixoLaSETkg==", "cpu": [ "x64" ], @@ -1288,9 +1257,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.2.tgz", - "integrity": "sha512-k+/Rkcyx//P6fetPoLMb8pBeqJBNGx81uuf7iljX9++yNBVRDQgD04L+SVXmXmh5ZP4/WOp4mWF0kmi06PW2tA==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.53.3.tgz", + "integrity": "sha512-UhTd8u31dXadv0MopwGgNOBpUVROFKWVQgAg5N1ESyCz8AuBcMqm4AuTjrwgQKGDfoFuz02EuMRHQIw/frmYKQ==", "cpu": [ "x64" ], @@ -1309,9 +1278,9 @@ "license": "MIT" }, "node_modules/@sveltejs/acorn-typescript": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.7.tgz", - "integrity": "sha512-znp1A/Y1Jj4l/Zy7PX5DZKBE0ZNY+5QBngiE21NJkfSTyzzC5iKNWOtwFXKtIrn7MXEFBck4jD95iBNkGjK92Q==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.8.tgz", + "integrity": "sha512-esgN+54+q0NjB0Y/4BomT9samII7jGwNy/2a3wNZbT2A2RpmXsXwUt24LvLhx6jUq2gVk4cWEvcRO6MFQbOfNA==", "dev": true, "license": "MIT", "peerDependencies": { @@ -1724,9 +1693,9 @@ } }, "node_modules/@threlte/core": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@threlte/core/-/core-8.3.0.tgz", - "integrity": "sha512-5APdWBjrUuk2sYFILsH8lfHOWCzQy2dcvploEx60uaGlf9ckj0zWolBEtuwx3Ab9fEyhWqw2HlJm6Ff8lgZozw==", + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@threlte/core/-/core-8.3.1.tgz", + "integrity": "sha512-qKjjNCQ+40hyeBcfOMh/8ef5x/j5PG5Wmo/L9Ye0aDCcdD6fCewWxfp7tV/J3CxPzX1dEp1JGK7sjyc7ntZSrg==", "dev": true, "license": "MIT", "dependencies": { @@ -1738,14 +1707,14 @@ } }, "node_modules/@threlte/extras": { - "version": "9.7.0", - "resolved": "https://registry.npmjs.org/@threlte/extras/-/extras-9.7.0.tgz", - "integrity": "sha512-aAuroZR4sqTbSWJ6XtRiNG7ksOv0W9dCFC4TA0hvNwJ+5IRjqXgBg2Mr3pSxrINonAT3psUsYwLvuq0QgoehWA==", + "version": "9.7.1", + "resolved": "https://registry.npmjs.org/@threlte/extras/-/extras-9.7.1.tgz", + "integrity": "sha512-SGm59HDCdHxADFHuweHfFDknwubkCPodyK0pbfsVtOWWOX26gE2xfK7aKolh6YFDiPAjWjGxN0jIgkNbbr1ohg==", "dev": true, "license": "MIT", "dependencies": { "@threejs-kit/instanced-sprite-mesh": "^2.5.1", - "camera-controls": "^2.10.1", + "camera-controls": "^3.1.2", "three-mesh-bvh": "^0.9.1", "three-perf": "^1.0.11", "three-viewport-gizmo": "^2.2.0", @@ -1852,17 +1821,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.47.0.tgz", - "integrity": "sha512-fe0rz9WJQ5t2iaLfdbDc9T80GJy0AeO453q8C3YCilnGozvOyCG5t+EZtg7j7D88+c3FipfP/x+wzGnh1xp8ZA==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.48.1.tgz", + "integrity": "sha512-X63hI1bxl5ohelzr0LY5coufyl0LJNthld+abwxpCoo6Gq+hSqhKwci7MUWkXo67mzgUK6YFByhmaHmUcuBJmA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.47.0", - "@typescript-eslint/type-utils": "8.47.0", - "@typescript-eslint/utils": "8.47.0", - "@typescript-eslint/visitor-keys": "8.47.0", + "@typescript-eslint/scope-manager": "8.48.1", + "@typescript-eslint/type-utils": "8.48.1", + "@typescript-eslint/utils": "8.48.1", + "@typescript-eslint/visitor-keys": "8.48.1", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -1876,23 +1845,23 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.47.0", + "@typescript-eslint/parser": "^8.48.1", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.47.0.tgz", - "integrity": "sha512-lJi3PfxVmo0AkEY93ecfN+r8SofEqZNGByvHAI3GBLrvt1Cw6H5k1IM02nSzu0RfUafr2EvFSw0wAsZgubNplQ==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.48.1.tgz", + "integrity": "sha512-PC0PDZfJg8sP7cmKe6L3QIL8GZwU5aRvUFedqSIpw3B+QjRSUZeeITC2M5XKeMXEzL6wccN196iy3JLwKNvDVA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@typescript-eslint/scope-manager": "8.47.0", - "@typescript-eslint/types": "8.47.0", - "@typescript-eslint/typescript-estree": "8.47.0", - "@typescript-eslint/visitor-keys": "8.47.0", + "@typescript-eslint/scope-manager": "8.48.1", + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/typescript-estree": "8.48.1", + "@typescript-eslint/visitor-keys": "8.48.1", "debug": "^4.3.4" }, "engines": { @@ -1908,14 +1877,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.47.0.tgz", - "integrity": "sha512-2X4BX8hUeB5JcA1TQJ7GjcgulXQ+5UkNb0DL8gHsHUHdFoiCTJoYLTpib3LtSDPZsRET5ygN4qqIWrHyYIKERA==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.48.1.tgz", + "integrity": "sha512-HQWSicah4s9z2/HifRPQ6b6R7G+SBx64JlFQpgSSHWPKdvCZX57XCbszg/bapbRsOEv42q5tayTYcEFpACcX1w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.47.0", - "@typescript-eslint/types": "^8.47.0", + "@typescript-eslint/tsconfig-utils": "^8.48.1", + "@typescript-eslint/types": "^8.48.1", "debug": "^4.3.4" }, "engines": { @@ -1930,14 +1899,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.47.0.tgz", - "integrity": "sha512-a0TTJk4HXMkfpFkL9/WaGTNuv7JWfFTQFJd6zS9dVAjKsojmv9HT55xzbEpnZoY+VUb+YXLMp+ihMLz/UlZfDg==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.48.1.tgz", + "integrity": "sha512-rj4vWQsytQbLxC5Bf4XwZ0/CKd362DkWMUkviT7DCS057SK64D5lH74sSGzhI6PDD2HCEq02xAP9cX68dYyg1w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.47.0", - "@typescript-eslint/visitor-keys": "8.47.0" + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/visitor-keys": "8.48.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1948,9 +1917,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.47.0.tgz", - "integrity": "sha512-ybUAvjy4ZCL11uryalkKxuT3w3sXJAuWhOoGS3T/Wu+iUu1tGJmk5ytSY8gbdACNARmcYEB0COksD2j6hfGK2g==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.48.1.tgz", + "integrity": "sha512-k0Jhs4CpEffIBm6wPaCXBAD7jxBtrHjrSgtfCjUvPp9AZ78lXKdTR8fxyZO5y4vWNlOvYXRtngSZNSn+H53Jkw==", "dev": true, "license": "MIT", "engines": { @@ -1965,15 +1934,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.47.0.tgz", - "integrity": "sha512-QC9RiCmZ2HmIdCEvhd1aJELBlD93ErziOXXlHEZyuBo3tBiAZieya0HLIxp+DoDWlsQqDawyKuNEhORyku+P8A==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.48.1.tgz", + "integrity": "sha512-1jEop81a3LrJQLTf/1VfPQdhIY4PlGDBc/i67EVWObrtvcziysbLN3oReexHOM6N3jyXgCrkBsZpqwH0hiDOQg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.47.0", - "@typescript-eslint/typescript-estree": "8.47.0", - "@typescript-eslint/utils": "8.47.0", + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/typescript-estree": "8.48.1", + "@typescript-eslint/utils": "8.48.1", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -1990,9 +1959,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.47.0.tgz", - "integrity": "sha512-nHAE6bMKsizhA2uuYZbEbmp5z2UpffNrPEqiKIeN7VsV6UY/roxanWfoRrf6x/k9+Obf+GQdkm0nPU+vnMXo9A==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.48.1.tgz", + "integrity": "sha512-+fZ3LZNeiELGmimrujsDCT4CRIbq5oXdHe7chLiW8qzqyPMnn1puNstCrMNVAqwcl2FdIxkuJ4tOs/RFDBVc/Q==", "dev": true, "license": "MIT", "engines": { @@ -2004,21 +1973,20 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.47.0.tgz", - "integrity": "sha512-k6ti9UepJf5NpzCjH31hQNLHQWupTRPhZ+KFF8WtTuTpy7uHPfeg2NM7cP27aCGajoEplxJDFVCEm9TGPYyiVg==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.48.1.tgz", + "integrity": "sha512-/9wQ4PqaefTK6POVTjJaYS0bynCgzh6ClJHGSBj06XEHjkfylzB+A3qvyaXnErEZSaxhIo4YdyBgq6j4RysxDg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.47.0", - "@typescript-eslint/tsconfig-utils": "8.47.0", - "@typescript-eslint/types": "8.47.0", - "@typescript-eslint/visitor-keys": "8.47.0", + "@typescript-eslint/project-service": "8.48.1", + "@typescript-eslint/tsconfig-utils": "8.48.1", + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/visitor-keys": "8.48.1", "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", "minimatch": "^9.0.4", "semver": "^7.6.0", + "tinyglobby": "^0.2.15", "ts-api-utils": "^2.1.0" }, "engines": { @@ -2033,16 +2001,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.47.0.tgz", - "integrity": "sha512-g7XrNf25iL4TJOiPqatNuaChyqt49a/onq5YsJ9+hXeugK+41LVg7AxikMfM02PC6jbNtZLCJj6AUcQXJS/jGQ==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.48.1.tgz", + "integrity": "sha512-fAnhLrDjiVfey5wwFRwrweyRlCmdz5ZxXz2G/4cLn0YDLjTapmN4gcCsTBR1N2rWnZSDeWpYtgLDsJt+FpmcwA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.47.0", - "@typescript-eslint/types": "8.47.0", - "@typescript-eslint/typescript-estree": "8.47.0" + "@typescript-eslint/scope-manager": "8.48.1", + "@typescript-eslint/types": "8.48.1", + "@typescript-eslint/typescript-estree": "8.48.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2057,13 +2025,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.47.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.47.0.tgz", - "integrity": "sha512-SIV3/6eftCy1bNzCQoPmbWsRLujS8t5iDIZ4spZOBHqrM+yfX2ogg8Tt3PDTAVKw3sSCiUgg30uOAvK2r9zGjQ==", + "version": "8.48.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.48.1.tgz", + "integrity": "sha512-BmxxndzEWhE4TIEEMBs8lP3MBWN3jFPs/p6gPm/wkv02o41hI6cq9AuSmGAaTTHPtA1FTi2jBre4A9rm5ZmX+Q==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.47.0", + "@typescript-eslint/types": "8.48.1", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -2088,21 +2056,21 @@ } }, "node_modules/@vitest/coverage-v8": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.0.13.tgz", - "integrity": "sha512-w77N6bmtJ3CFnL/YHiYotwW/JI3oDlR3K38WEIqegRfdMSScaYxwYKB/0jSNpOTZzUjQkG8HHEz4sdWQMWpQ5g==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.0.15.tgz", + "integrity": "sha512-FUJ+1RkpTFW7rQITdgTi93qOCWJobWhBirEPCeXh2SW2wsTlFxy51apDz5gzG+ZEYt/THvWeNmhdAoS9DTwpCw==", "dev": true, "license": "MIT", "dependencies": { "@bcoe/v8-coverage": "^1.0.2", - "@vitest/utils": "4.0.13", + "@vitest/utils": "4.0.15", "ast-v8-to-istanbul": "^0.3.8", - "debug": "^4.4.3", "istanbul-lib-coverage": "^3.2.2", "istanbul-lib-report": "^3.0.1", "istanbul-lib-source-maps": "^5.0.6", "istanbul-reports": "^3.2.0", "magicast": "^0.5.1", + "obug": "^2.1.1", "std-env": "^3.10.0", "tinyrainbow": "^3.0.3" }, @@ -2110,8 +2078,8 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "@vitest/browser": "4.0.13", - "vitest": "4.0.13" + "@vitest/browser": "4.0.15", + "vitest": "4.0.15" }, "peerDependenciesMeta": { "@vitest/browser": { @@ -2120,16 +2088,16 @@ } }, "node_modules/@vitest/expect": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.13.tgz", - "integrity": "sha512-zYtcnNIBm6yS7Gpr7nFTmq8ncowlMdOJkWLqYvhr/zweY6tFbDkDi8BPPOeHxEtK1rSI69H7Fd4+1sqvEGli6w==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.15.tgz", + "integrity": "sha512-Gfyva9/GxPAWXIWjyGDli9O+waHDC0Q0jaLdFP1qPAUUfo1FEXPXUfUkp3eZA0sSq340vPycSyOlYUeM15Ft1w==", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.0.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.0.13", - "@vitest/utils": "4.0.13", + "@vitest/spy": "4.0.15", + "@vitest/utils": "4.0.15", "chai": "^6.2.1", "tinyrainbow": "^3.0.3" }, @@ -2138,13 +2106,13 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.13.tgz", - "integrity": "sha512-eNCwzrI5djoauklwP1fuslHBjrbR8rqIVbvNlAnkq1OTa6XT+lX68mrtPirNM9TnR69XUPt4puBCx2Wexseylg==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.15.tgz", + "integrity": "sha512-CZ28GLfOEIFkvCFngN8Sfx5h+Se0zN+h4B7yOsPVCcgtiO7t5jt9xQh2E1UkFep+eb9fjyMfuC5gBypwb07fvQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.0.13", + "@vitest/spy": "4.0.15", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -2164,20 +2132,10 @@ } } }, - "node_modules/@vitest/mocker/node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, "node_modules/@vitest/pretty-format": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.13.tgz", - "integrity": "sha512-ooqfze8URWbI2ozOeLDMh8YZxWDpGXoeY3VOgcDnsUxN0jPyPWSUvjPQWqDGCBks+opWlN1E4oP1UYl3C/2EQA==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.15.tgz", + "integrity": "sha512-SWdqR8vEv83WtZcrfLNqlqeQXlQLh2iilO1Wk1gv4eiHKjEzvgHb2OVc3mIPyhZE6F+CtfYjNlDJwP5MN6Km7A==", "dev": true, "license": "MIT", "dependencies": { @@ -2188,13 +2146,13 @@ } }, "node_modules/@vitest/runner": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.13.tgz", - "integrity": "sha512-9IKlAru58wcVaWy7hz6qWPb2QzJTKt+IOVKjAx5vb5rzEFPTL6H4/R9BMvjZ2ppkxKgTrFONEJFtzvnyEpiT+A==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.15.tgz", + "integrity": "sha512-+A+yMY8dGixUhHmNdPUxOh0la6uVzun86vAbuMT3hIDxMrAOmn5ILBHm8ajrqHE0t8R9T1dGnde1A5DTnmi3qw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.0.13", + "@vitest/utils": "4.0.15", "pathe": "^2.0.3" }, "funding": { @@ -2202,13 +2160,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.13.tgz", - "integrity": "sha512-hb7Usvyika1huG6G6l191qu1urNPsq1iFc2hmdzQY3F5/rTgqQnwwplyf8zoYHkpt7H6rw5UfIw6i/3qf9oSxQ==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.15.tgz", + "integrity": "sha512-A7Ob8EdFZJIBjLjeO0DZF4lqR6U7Ydi5/5LIZ0xcI+23lYlsYJAfGn8PrIWTYdZQRNnSRlzhg0zyGu37mVdy5g==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.0.13", + "@vitest/pretty-format": "4.0.15", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -2217,9 +2175,9 @@ } }, "node_modules/@vitest/spy": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.13.tgz", - "integrity": "sha512-hSu+m4se0lDV5yVIcNWqjuncrmBgwaXa2utFLIrBkQCQkt+pSwyZTPFQAZiiF/63j8jYa8uAeUZ3RSfcdWaYWw==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.15.tgz", + "integrity": "sha512-+EIjOJmnY6mIfdXtE/bnozKEvTC4Uczg19yeZ2vtCz5Yyb0QQ31QWVQ8hswJ3Ysx/K2EqaNsVanjr//2+P3FHw==", "dev": true, "license": "MIT", "funding": { @@ -2227,14 +2185,14 @@ } }, "node_modules/@vitest/ui": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.0.13.tgz", - "integrity": "sha512-MFV6GhTflgBj194+vowTB2iLI5niMZhqiW7/NV7U4AfWbX/IAtsq4zA+gzCLyGzpsQUdJlX26hrQ1vuWShq2BQ==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.0.15.tgz", + "integrity": "sha512-sxSyJMaKp45zI0u+lHrPuZM1ZJQ8FaVD35k+UxVrha1yyvQ+TZuUYllUixwvQXlB7ixoDc7skf3lQPopZIvaQw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@vitest/utils": "4.0.13", + "@vitest/utils": "4.0.15", "fflate": "^0.8.2", "flatted": "^3.3.3", "pathe": "^2.0.3", @@ -2246,17 +2204,17 @@ "url": "https://opencollective.com/vitest" }, "peerDependencies": { - "vitest": "4.0.13" + "vitest": "4.0.15" } }, "node_modules/@vitest/utils": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.13.tgz", - "integrity": "sha512-ydozWyQ4LZuu8rLp47xFUWis5VOKMdHjXCWhs1LuJsTNKww+pTHQNK4e0assIB9K80TxFyskENL6vCu3j34EYA==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.15.tgz", + "integrity": "sha512-HXjPW2w5dxhTD0dLwtYHDnelK3j8sR8cWIaLxr22evTyY6q8pRCjZSmhRWVjBaOVXChQd6AwMzi9pucorXCPZA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.0.13", + "@vitest/pretty-format": "4.0.15", "tinyrainbow": "^3.0.3" }, "funding": { @@ -2264,9 +2222,9 @@ } }, "node_modules/@webgpu/types": { - "version": "0.1.66", - "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.66.tgz", - "integrity": "sha512-YA2hLrwLpDsRueNDXIMqN9NTzD6bCDkuXbOSe0heS+f8YE8usA6Gbv1prj81pzVHrbaAma7zObnIC+I6/sXJgA==", + "version": "0.1.67", + "resolved": "https://registry.npmjs.org/@webgpu/types/-/types-0.1.67.tgz", + "integrity": "sha512-uk53+2ECGUkWoDFez/hymwpRfdgdIn6y1ref70fEecGMe5607f4sozNFgBk0oxlr7j2CRGWBEc3IBYMmFdGGTQ==", "dev": true, "license": "BSD-3-Clause" }, @@ -2388,16 +2346,6 @@ "js-tokens": "^9.0.1" } }, - "node_modules/ast-v8-to-istanbul/node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" - } - }, "node_modules/autoprefixer": { "version": "10.4.22", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.22.tgz", @@ -2454,9 +2402,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.8.29.tgz", - "integrity": "sha512-sXdt2elaVnhpDNRDz+1BDx1JQoJRuNk7oVlAlbGiFkLikHCAQiccexF/9e91zVi6RCgqspl04aP+6Cnl9zRLrA==", + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.9.3.tgz", + "integrity": "sha512-8QdH6czo+G7uBsNo0GiUfouPN1lRzKdJTGnKXwe12gkFbnnOUaUKGN55dMkfy+mnxmvjwl9zcI4VncczcVXDhA==", "dev": true, "license": "Apache-2.0", "bin": { @@ -2483,23 +2431,10 @@ "balanced-match": "^1.0.0" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/browserslist": { - "version": "4.28.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.0.tgz", - "integrity": "sha512-tbydkR/CxfMwelN0vwdP/pLkDwyAASZ+VfWm4EOwlB6SWhx1sYnWLqo8N5j0rAzPfzfRaxt0mM/4wPU/Su84RQ==", + "version": "4.28.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", + "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", "dev": true, "funding": [ { @@ -2518,11 +2453,11 @@ "license": "MIT", "peer": true, "dependencies": { - "baseline-browser-mapping": "^2.8.25", - "caniuse-lite": "^1.0.30001754", - "electron-to-chromium": "^1.5.249", + "baseline-browser-mapping": "^2.9.0", + "caniuse-lite": "^1.0.30001759", + "electron-to-chromium": "^1.5.263", "node-releases": "^2.0.27", - "update-browserslist-db": "^1.1.4" + "update-browserslist-db": "^1.2.0" }, "bin": { "browserslist": "cli.js" @@ -2555,19 +2490,23 @@ } }, "node_modules/camera-controls": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/camera-controls/-/camera-controls-2.10.1.tgz", - "integrity": "sha512-KnaKdcvkBJ1Irbrzl8XD6WtZltkRjp869Jx8c0ujs9K+9WD+1D7ryBsCiVqJYUqt6i/HR5FxT7RLASieUD+Q5w==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/camera-controls/-/camera-controls-3.1.2.tgz", + "integrity": "sha512-xkxfpG2ECZ6Ww5/9+kf4mfg1VEYAoe9aDSY+IwF0UEs7qEzwy0aVRfs2grImIECs/PoBtWFrh7RXsQkwG922JA==", "dev": true, "license": "MIT", + "engines": { + "node": ">=22.0.0", + "npm": ">=10.5.1" + }, "peerDependencies": { "three": ">=0.126.1" } }, "node_modules/caniuse-lite": { - "version": "1.0.30001755", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001755.tgz", - "integrity": "sha512-44V+Jm6ctPj7R52Na4TLi3Zri4dWUljJd+RDm+j8LtNCc/ihLCT+X1TzoOAkRETEWqjuLnh9581Tl80FvK7jVA==", + "version": "1.0.30001759", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001759.tgz", + "integrity": "sha512-Pzfx9fOKoKvevQf8oCXoyNRQ5QyxJj+3O0Rqx2V5oxT61KGx8+n6hV/IUyJeifUci2clnmmKVpvtiqRzgiWjSw==", "dev": true, "funding": [ { @@ -2819,6 +2758,13 @@ "node": ">=8" } }, + "node_modules/devalue": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.5.0.tgz", + "integrity": "sha512-69sM5yrHfFLJt0AZ9QqZXGCPfJ7fQjvpln3Rq5+PS03LD32Ost1Q9N+eEnaQwGRIriKkMImXD56ocjQmfjbV3w==", + "dev": true, + "license": "MIT" + }, "node_modules/diet-sprite": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/diet-sprite/-/diet-sprite-0.0.1.tgz", @@ -2834,9 +2780,9 @@ "license": "ISC" }, "node_modules/electron-to-chromium": { - "version": "1.5.255", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.255.tgz", - "integrity": "sha512-Z9oIp4HrFF/cZkDPMpz2XSuVpc1THDpT4dlmATFlJUIBVCy9Vap5/rIXsASP1CscBacBqhabwh8vLctqBwEerQ==", + "version": "1.5.266", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.266.tgz", + "integrity": "sha512-kgWEglXvkEfMH7rxP5OSZZwnaDWT7J9EoZCujhnpLbfi0bbNtRkgdX2E3gt0Uer11c61qCYktB3hwkAS325sJg==", "dev": true, "license": "ISC" }, @@ -2862,9 +2808,9 @@ "license": "MIT" }, "node_modules/esbuild": { - "version": "0.25.12", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", - "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "version": "0.27.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.1.tgz", + "integrity": "sha512-yY35KZckJJuVVPXpvjgxiCuVEJT67F6zDeVTv4rizyPrfGBUpZQsvmxnN+C371c2esD/hNMjj4tpBhuueLN7aA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -2875,32 +2821,32 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.12", - "@esbuild/android-arm": "0.25.12", - "@esbuild/android-arm64": "0.25.12", - "@esbuild/android-x64": "0.25.12", - "@esbuild/darwin-arm64": "0.25.12", - "@esbuild/darwin-x64": "0.25.12", - "@esbuild/freebsd-arm64": "0.25.12", - "@esbuild/freebsd-x64": "0.25.12", - "@esbuild/linux-arm": "0.25.12", - "@esbuild/linux-arm64": "0.25.12", - "@esbuild/linux-ia32": "0.25.12", - "@esbuild/linux-loong64": "0.25.12", - "@esbuild/linux-mips64el": "0.25.12", - "@esbuild/linux-ppc64": "0.25.12", - "@esbuild/linux-riscv64": "0.25.12", - "@esbuild/linux-s390x": "0.25.12", - "@esbuild/linux-x64": "0.25.12", - "@esbuild/netbsd-arm64": "0.25.12", - "@esbuild/netbsd-x64": "0.25.12", - "@esbuild/openbsd-arm64": "0.25.12", - "@esbuild/openbsd-x64": "0.25.12", - "@esbuild/openharmony-arm64": "0.25.12", - "@esbuild/sunos-x64": "0.25.12", - "@esbuild/win32-arm64": "0.25.12", - "@esbuild/win32-ia32": "0.25.12", - "@esbuild/win32-x64": "0.25.12" + "@esbuild/aix-ppc64": "0.27.1", + "@esbuild/android-arm": "0.27.1", + "@esbuild/android-arm64": "0.27.1", + "@esbuild/android-x64": "0.27.1", + "@esbuild/darwin-arm64": "0.27.1", + "@esbuild/darwin-x64": "0.27.1", + "@esbuild/freebsd-arm64": "0.27.1", + "@esbuild/freebsd-x64": "0.27.1", + "@esbuild/linux-arm": "0.27.1", + "@esbuild/linux-arm64": "0.27.1", + "@esbuild/linux-ia32": "0.27.1", + "@esbuild/linux-loong64": "0.27.1", + "@esbuild/linux-mips64el": "0.27.1", + "@esbuild/linux-ppc64": "0.27.1", + "@esbuild/linux-riscv64": "0.27.1", + "@esbuild/linux-s390x": "0.27.1", + "@esbuild/linux-x64": "0.27.1", + "@esbuild/netbsd-arm64": "0.27.1", + "@esbuild/netbsd-x64": "0.27.1", + "@esbuild/openbsd-arm64": "0.27.1", + "@esbuild/openbsd-x64": "0.27.1", + "@esbuild/openharmony-arm64": "0.27.1", + "@esbuild/sunos-x64": "0.27.1", + "@esbuild/win32-arm64": "0.27.1", + "@esbuild/win32-ia32": "0.27.1", + "@esbuild/win32-x64": "0.27.1" } }, "node_modules/escalade": { @@ -3014,9 +2960,9 @@ } }, "node_modules/eslint-plugin-svelte": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-3.13.0.tgz", - "integrity": "sha512-2ohCCQJJTNbIpQCSDSTWj+FN0OVfPmSO03lmSNT7ytqMaWF6kpT86LdzDqtm4sh7TVPl/OEWJ/d7R87bXP2Vjg==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-3.13.1.tgz", + "integrity": "sha512-Ng+kV/qGS8P/isbNYVE3sJORtubB+yLEcYICMkUWNaDTb0SwZni/JhAYXh/Dz/q2eThUwWY0VMPZ//KYD1n3eQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3238,9 +3184,9 @@ } }, "node_modules/esrap": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.1.3.tgz", - "integrity": "sha512-T/Dhhv/QH+yYmiaLz9SA3PW+YyenlnRKDNdtlYJrSOBmNsH4nvPux+mTwx7p+wAedlJrGoZtXNI0a0MjQ2QkVg==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/esrap/-/esrap-2.2.1.tgz", + "integrity": "sha512-GiYWG34AN/4CUyaWAgunGt0Rxvr1PTMlGC0vvEov/uOQYWne2bpN03Um+k8jT+q3op33mKouP2zeJ6OlM+qeUg==", "dev": true, "license": "MIT", "dependencies": { @@ -3271,11 +3217,14 @@ } }, "node_modules/estree-walker": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } }, "node_modules/esutils": { "version": "2.0.3", @@ -3304,36 +3253,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -3348,16 +3267,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/fdir": { "version": "6.5.0", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", @@ -3396,19 +3305,6 @@ "node": ">=16.0.0" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -3497,21 +3393,21 @@ } }, "node_modules/flowbite-svelte": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/flowbite-svelte/-/flowbite-svelte-1.28.1.tgz", - "integrity": "sha512-7zSa1A3tBjEBV7eVFVyE7O7vTkEZmP2a8pt58h4ul6VZcPZ6RVodk43AypWLGG/IKiSPm4L2GqPoNqbIpJ3FEA==", + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/flowbite-svelte/-/flowbite-svelte-1.29.1.tgz", + "integrity": "sha512-rwqQQmB5BtHzCWbJ5pm6wVxSwazr0ETvZBawx7odTiOT0wB7R/BAFjgZuKJ11dqeQGtv1PoHkWK+66J/SHMw0g==", "dev": true, "license": "MIT", "dependencies": { "@floating-ui/dom": "^1.7.4", "@floating-ui/utils": "^0.2.10", - "apexcharts": "^5.3.5", + "apexcharts": "^5.3.6", "clsx": "^2.1.1", "date-fns": "^4.1.0", "esm-env": "^1.2.2", "flowbite": "^3.1.2", - "tailwind-merge": "^3.3.1", - "tailwind-variants": "^3.1.1" + "tailwind-merge": "^3.4.0", + "tailwind-variants": "^3.2.2" }, "peerDependencies": { "svelte": "^5.29.0", @@ -3752,16 +3648,6 @@ "dev": true, "license": "MIT" }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/is-reference": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.3.tgz", @@ -4278,16 +4164,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, "node_modules/meshoptimizer": { "version": "0.22.0", "resolved": "https://registry.npmjs.org/meshoptimizer/-/meshoptimizer-0.22.0.tgz", @@ -4295,33 +4171,6 @@ "dev": true, "license": "MIT" }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "dev": true, - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/mini-svg-data-uri": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz", @@ -4425,6 +4274,17 @@ "node": ">=0.10.0" } }, + "node_modules/obug": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", + "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT" + }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -4677,9 +4537,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz", - "integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", + "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", "dev": true, "license": "MIT", "dependencies": { @@ -4708,9 +4568,9 @@ } }, "node_modules/prettier": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", - "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "version": "3.7.4", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz", + "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==", "dev": true, "license": "MIT", "peer": true, @@ -4745,27 +4605,6 @@ "node": ">=6" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/readdirp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", @@ -4854,21 +4693,10 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "dev": true, - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, "node_modules/rollup": { - "version": "4.53.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.2.tgz", - "integrity": "sha512-MHngMYwGJVi6Fmnk6ISmnk7JAHRNF0UkuucA0CUW3N3a4KnONPEZz+vUanQP/ZC/iY1Qkf3bwPWzyY84wEks1g==", + "version": "4.53.3", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.53.3.tgz", + "integrity": "sha512-w8GmOxZfBmKknvdXU1sdM9NHcoQejwF/4mNgj2JuEEdRaHwwF12K7e9eXn1nLZ07ad+du76mkVsyeb2rKGllsA==", "dev": true, "license": "MIT", "peer": true, @@ -4883,55 +4711,31 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.53.2", - "@rollup/rollup-android-arm64": "4.53.2", - "@rollup/rollup-darwin-arm64": "4.53.2", - "@rollup/rollup-darwin-x64": "4.53.2", - "@rollup/rollup-freebsd-arm64": "4.53.2", - "@rollup/rollup-freebsd-x64": "4.53.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.53.2", - "@rollup/rollup-linux-arm-musleabihf": "4.53.2", - "@rollup/rollup-linux-arm64-gnu": "4.53.2", - "@rollup/rollup-linux-arm64-musl": "4.53.2", - "@rollup/rollup-linux-loong64-gnu": "4.53.2", - "@rollup/rollup-linux-ppc64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-gnu": "4.53.2", - "@rollup/rollup-linux-riscv64-musl": "4.53.2", - "@rollup/rollup-linux-s390x-gnu": "4.53.2", - "@rollup/rollup-linux-x64-gnu": "4.53.2", - "@rollup/rollup-linux-x64-musl": "4.53.2", - "@rollup/rollup-openharmony-arm64": "4.53.2", - "@rollup/rollup-win32-arm64-msvc": "4.53.2", - "@rollup/rollup-win32-ia32-msvc": "4.53.2", - "@rollup/rollup-win32-x64-gnu": "4.53.2", - "@rollup/rollup-win32-x64-msvc": "4.53.2", + "@rollup/rollup-android-arm-eabi": "4.53.3", + "@rollup/rollup-android-arm64": "4.53.3", + "@rollup/rollup-darwin-arm64": "4.53.3", + "@rollup/rollup-darwin-x64": "4.53.3", + "@rollup/rollup-freebsd-arm64": "4.53.3", + "@rollup/rollup-freebsd-x64": "4.53.3", + "@rollup/rollup-linux-arm-gnueabihf": "4.53.3", + "@rollup/rollup-linux-arm-musleabihf": "4.53.3", + "@rollup/rollup-linux-arm64-gnu": "4.53.3", + "@rollup/rollup-linux-arm64-musl": "4.53.3", + "@rollup/rollup-linux-loong64-gnu": "4.53.3", + "@rollup/rollup-linux-ppc64-gnu": "4.53.3", + "@rollup/rollup-linux-riscv64-gnu": "4.53.3", + "@rollup/rollup-linux-riscv64-musl": "4.53.3", + "@rollup/rollup-linux-s390x-gnu": "4.53.3", + "@rollup/rollup-linux-x64-gnu": "4.53.3", + "@rollup/rollup-linux-x64-musl": "4.53.3", + "@rollup/rollup-openharmony-arm64": "4.53.3", + "@rollup/rollup-win32-arm64-msvc": "4.53.3", + "@rollup/rollup-win32-ia32-msvc": "4.53.3", + "@rollup/rollup-win32-x64-gnu": "4.53.3", + "@rollup/rollup-win32-x64-msvc": "4.53.3", "fsevents": "~2.3.2" } }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/sade": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", @@ -5080,9 +4884,9 @@ } }, "node_modules/svelte": { - "version": "5.43.14", - "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.43.14.tgz", - "integrity": "sha512-pHeUrp1A5S6RGaXhJB7PtYjL1VVjbVrJ2EfuAoPu9/1LeoMaJa/pcdCsCSb0gS4eUHAHnhCbUDxORZyvGK6kOQ==", + "version": "5.45.5", + "resolved": "https://registry.npmjs.org/svelte/-/svelte-5.45.5.tgz", + "integrity": "sha512-2074U+vObO5Zs8/qhxtBwdi6ZXNIhEBTzNmUFjiZexLxTdt9vq96D/0pnQELl6YcpLMD7pZ2dhXKByfGS8SAdg==", "dev": true, "license": "MIT", "peer": true, @@ -5095,8 +4899,9 @@ "aria-query": "^5.3.1", "axobject-query": "^4.1.0", "clsx": "^2.1.1", + "devalue": "^5.5.0", "esm-env": "^1.2.1", - "esrap": "^2.1.0", + "esrap": "^2.2.1", "is-reference": "^3.0.3", "locate-character": "^3.0.0", "magic-string": "^0.30.11", @@ -5131,9 +4936,9 @@ } }, "node_modules/svelte-eslint-parser": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-1.4.0.tgz", - "integrity": "sha512-fjPzOfipR5S7gQ/JvI9r2H8y9gMGXO3JtmrylHLLyahEMquXI0lrebcjT+9/hNgDej0H7abTyox5HpHmW1PSWA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-1.4.1.tgz", + "integrity": "sha512-1eqkfQ93goAhjAXxZiu1SaKI9+0/sxp4JIWQwUpsz7ybehRE5L8dNuz7Iry7K22R47p5/+s9EM+38nHV2OlgXA==", "dev": true, "license": "MIT", "dependencies": { @@ -5146,7 +4951,7 @@ }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0", - "pnpm": "10.18.3" + "pnpm": "10.24.0" }, "funding": { "url": "https://github.com/sponsors/ota-meshi" @@ -5242,9 +5047,9 @@ } }, "node_modules/tailwind-variants": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/tailwind-variants/-/tailwind-variants-3.1.1.tgz", - "integrity": "sha512-ftLXe3krnqkMHsuBTEmaVUXYovXtPyTK7ckEfDRXS8PBZx0bAUas+A0jYxuKA5b8qg++wvQ3d2MQ7l/xeZxbZQ==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/tailwind-variants/-/tailwind-variants-3.2.2.tgz", + "integrity": "sha512-Mi4kHeMTLvKlM98XPnK+7HoBPmf4gygdFmqQPaDivc3DpYS6aIY6KiG/PgThrGvii5YZJqRsPz0aPyhoFzmZgg==", "dev": true, "license": "MIT", "engines": { @@ -5316,9 +5121,9 @@ } }, "node_modules/three-mesh-bvh": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.9.2.tgz", - "integrity": "sha512-W0oUU4AZv0QwisjlkYlLVaYTVxijhMXCztyNvVlDmTK/u0QB16Xbfem5nWkQBsz3oTzztA1B/ouiz4wYCMj78g==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.9.3.tgz", + "integrity": "sha512-LaxfvQpF+At96fS90GnQxHpff9bu78UL5eooJNxYyBbyiWrOBpjRx+5yn/+Dj2lQVhz5A/jHqwpVchYYnz/hWQ==", "dev": true, "license": "MIT", "peer": true, @@ -5358,11 +5163,14 @@ "license": "MIT" }, "node_modules/tinyexec": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", - "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=18" + } }, "node_modules/tinyglobby": { "version": "0.2.15", @@ -5391,19 +5199,6 @@ "node": ">=14.0.0" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/totalist": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", @@ -5468,14 +5263,14 @@ "license": "0BSD" }, "node_modules/tsx": { - "version": "4.20.6", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.6.tgz", - "integrity": "sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", + "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "esbuild": "~0.25.0", + "esbuild": "~0.27.0", "get-tsconfig": "^4.7.5" }, "bin": { @@ -5534,9 +5329,9 @@ "license": "MIT" }, "node_modules/update-browserslist-db": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.4.tgz", - "integrity": "sha512-q0SPT4xyU84saUX+tomz1WLkxUbuaJnR1xWt17M7fJtEJigJeWUNGUqrauFXsHnqev9y9JTRGwk13tFBuKby4A==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.2.tgz", + "integrity": "sha512-E85pfNzMQ9jpKkA7+TJAi4TJN+tBCuWh5rUcS/sv6cFi+1q9LYDwDI5dpUL0u/73EElyQ8d3TEaeW4sPedBqYA==", "dev": true, "funding": [ { @@ -5582,9 +5377,9 @@ "license": "MIT" }, "node_modules/vite": { - "version": "7.2.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.4.tgz", - "integrity": "sha512-NL8jTlbo0Tn4dUEXEsUg8KeyG/Lkmc4Fnzb8JXN/Ykm9G4HNImjtABMJgkQoVjOBN/j2WAwDTRytdqJbZsah7w==", + "version": "7.2.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.2.6.tgz", + "integrity": "sha512-tI2l/nFHC5rLh7+5+o7QjKjSR04ivXDF4jcgV0f/bTQ+OJiITy5S6gaynVsEM+7RqzufMnVbIon6Sr5x1SDYaQ==", "dev": true, "license": "MIT", "peer": true, @@ -5657,6 +5452,490 @@ } } }, + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, "node_modules/vitefu": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.1.1.tgz", @@ -5678,29 +5957,29 @@ } }, "node_modules/vitest": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.13.tgz", - "integrity": "sha512-QSD4I0fN6uZQfftryIXuqvqgBxTvJ3ZNkF6RWECd82YGAYAfhcppBLFXzXJHQAAhVFyYEuFTrq6h0hQqjB7jIQ==", + "version": "4.0.15", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.15.tgz", + "integrity": "sha512-n1RxDp8UJm6N0IbJLQo+yzLZ2sQCDyl1o0LeugbPWf8+8Fttp29GghsQBjYJVmWq3gBFfe9Hs1spR44vovn2wA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@vitest/expect": "4.0.13", - "@vitest/mocker": "4.0.13", - "@vitest/pretty-format": "4.0.13", - "@vitest/runner": "4.0.13", - "@vitest/snapshot": "4.0.13", - "@vitest/spy": "4.0.13", - "@vitest/utils": "4.0.13", - "debug": "^4.4.3", + "@vitest/expect": "4.0.15", + "@vitest/mocker": "4.0.15", + "@vitest/pretty-format": "4.0.15", + "@vitest/runner": "4.0.15", + "@vitest/snapshot": "4.0.15", + "@vitest/spy": "4.0.15", + "@vitest/utils": "4.0.15", "es-module-lexer": "^1.7.0", "expect-type": "^1.2.2", "magic-string": "^0.30.21", + "obug": "^2.1.1", "pathe": "^2.0.3", "picomatch": "^4.0.3", "std-env": "^3.10.0", "tinybench": "^2.9.0", - "tinyexec": "^0.3.2", + "tinyexec": "^1.0.2", "tinyglobby": "^0.2.15", "tinyrainbow": "^3.0.3", "vite": "^6.0.0 || ^7.0.0", @@ -5718,12 +5997,11 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", - "@types/debug": "^4.1.12", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.0.13", - "@vitest/browser-preview": "4.0.13", - "@vitest/browser-webdriverio": "4.0.13", - "@vitest/ui": "4.0.13", + "@vitest/browser-playwright": "4.0.15", + "@vitest/browser-preview": "4.0.15", + "@vitest/browser-webdriverio": "4.0.15", + "@vitest/ui": "4.0.15", "happy-dom": "*", "jsdom": "*" }, @@ -5734,9 +6012,6 @@ "@opentelemetry/api": { "optional": true }, - "@types/debug": { - "optional": true - }, "@types/node": { "optional": true }, diff --git a/package.json b/package.json index 9a3239e..658d7b9 100644 --- a/package.json +++ b/package.json @@ -28,36 +28,36 @@ "@sveltejs/vite-plugin-svelte": "^6.2.1", "@tailwindcss/postcss": "^4.1.17", "@tailwindcss/vite": "^4.1.17", - "@threlte/core": "^8.3.0", - "@threlte/extras": "^9.7.0", + "@threlte/core": "^8.3.1", + "@threlte/extras": "^9.7.1", "@tsconfig/svelte": "^5.0.6", "@types/node": "^24.10.1", "@types/three": "^0.181.0", - "@typescript-eslint/eslint-plugin": "^8.47.0", - "@typescript-eslint/parser": "^8.47.0", - "@vitest/coverage-v8": "^4.0.13", - "@vitest/ui": "^4.0.13", + "@typescript-eslint/eslint-plugin": "^8.48.1", + "@typescript-eslint/parser": "^8.48.1", + "@vitest/coverage-v8": "^4.0.15", + "@vitest/ui": "^4.0.15", "autoprefixer": "^10.4.22", "commander": "^14.0.2", "eslint": "^9.39.1", "eslint-config-prettier": "^10.1.8", "eslint-plugin-simple-import-sort": "^12.1.1", - "eslint-plugin-svelte": "^3.13.0", + "eslint-plugin-svelte": "^3.13.1", "eslint-plugin-unicorn": "^62.0.0", - "flowbite-svelte": "^1.28.1", + "flowbite-svelte": "^1.29.1", "postcss": "^8.5.6", - "prettier": "^3.6.2", + "prettier": "^3.7.4", "prettier-plugin-svelte": "^3.4.0", - "svelte": "^5.43.14", + "svelte": "^5.45.5", "svelte-check": "^4.3.4", "svelte-preprocess": "^6.0.3", "tailwindcss": "^4.1.17", "three": "^0.181.2", "three-bvh-csg": "^0.0.17", "tslib": "^2.8.1", - "tsx": "^4.20.6", + "tsx": "^4.21.0", "typescript": "^5.9.3", - "vite": "^7.2.4", - "vitest": "^4.0.13" + "vite": "^7.2.6", + "vitest": "^4.0.15" } } diff --git a/projects/examples/A.solids.ts b/projects/examples/A.solids.ts index 1396f64..156df22 100644 --- a/projects/examples/A.solids.ts +++ b/projects/examples/A.solids.ts @@ -67,6 +67,34 @@ export const hexagonalPrism = (): Solid => { return Solid.prism(6, 6, 12, { color: 'cyan' }); // 6-sided, radius 6, height 12 }; +/** + * Rounded Box - box with filleted/rounded edges + * Parameters: width (X), height (Y), depth (Z), options object with color, radius, segments + * Note: Radius defaults to 10% of smallest dimension. Segments control rounding quality. + */ +export const roundedBox = (): Solid => { + return Solid.roundedBox(10, 10, 10, { color: 'teal', radius: 2 }); // 10×10×10 with 2-unit radius +}; + +/** + * Text - 3D extruded text + * Parameters: text string, options object with color, size, height (extrusion depth) + * Note: Uses Helvetiker Regular font. Text is centered on XZ plane and aligned to Y=0 + */ +export const textShape = (): Solid => { + return Solid.text('CSG', { color: 'blue', size: 8, height: 3 }); // "CSG" text +}; + +/** + * Text as Cutter - demonstrates using text in CSG subtraction (embossing/engraving) + * Creates a plate with text cut into it + */ +export const textCutter = (): Solid => { + const plate = Solid.cube(30, 20, 5, { color: 'gray' }).center().align('bottom'); + const text = Solid.text('HELLO', { size: 4, height: 10, color: 'gray' }).move({ y: 10 }); + return Solid.SUBTRACT(plate, text); +}; + /** * Component registration map * Keys: Component names (appear in UI dropdown) @@ -80,5 +108,8 @@ export const components: ComponentsMap = { 'A3. Solids: Sphere': sphere, 'A4. Solids: Cone': cone, 'A5. Solids: Triangle Prism': trianglePrism, - 'A6. Solids: Hexagonal Prism': hexagonalPrism + 'A6. Solids: Hexagonal Prism': hexagonalPrism, + 'A7. Solids: Rounded Box': roundedBox, + 'A8. Solids: Text': textShape, + 'A9. Solids: Text Cutter': textCutter }; diff --git a/projects/examples/N-importing.ts b/projects/examples/N-importing.ts new file mode 100644 index 0000000..d570ce4 --- /dev/null +++ b/projects/examples/N-importing.ts @@ -0,0 +1,290 @@ +/** + * N. Import Capabilities - Loading External Files + * + * This file demonstrates how to import external geometries and SVG paths + * to create 3D components. Import capabilities allow you to: + * - Load STL files (binary or ASCII format) as Solid components + * - Import SVG paths and extrude them into 3D profiles + * - Use imported geometries in CSG operations (union, subtract, intersect) + * + * Key concepts: + * - Vite import syntax: import file from './path/file.ext?raw' + * - Solid.fromSTL() - Creates Solid from STL file data + * - Solid.profilePrismFromSVG() - Extrudes SVG path into 3D solid + * - All imported Solids work with standard CSG operations + * - No new dependencies needed - STLLoader and SVGLoader included in Three.js + */ + +import { Solid } from '$lib/3d/Solid'; +import type { ComponentsMap } from '$stores/componentStore'; + +// Import STL file using Vite's import syntax +// The ?raw suffix tells Vite to import the file as a string (ASCII STL) +// For binary STL files, use ?url and fetch the data as ArrayBuffer +import sampleStl from './assets/sample.stl?raw'; + +/** + * ============================================================================ + * SECTION 1: STL Import Examples + * ============================================================================ + */ + +/** + * Basic STL Import + * Loads an ASCII STL file and creates a Solid component + */ +export const importedSTL = (): Solid => { + // Load STL data and create Solid (automatically normalized) + return Solid.fromSTL(sampleStl, { color: 'blue' }); +}; + +/** + * STL with Transformations + * Import STL and apply transformations (position, rotation, scale) + */ +export const transformedSTL = (): Solid => { + return Solid.fromSTL(sampleStl, { color: 'green' }) + .scale({ all: 0.5 }) // Scale down to 50% + .rotate({ y: 45 }) // Rotate 45° around Y-axis + .move({ y: 10 }); // Move up by 10 units +}; + +/** + * ============================================================================ + * SECTION 2: Boolean Operations with Imported STL + * ============================================================================ + */ + +/** + * Subtract STL from Cube + * Demonstrates using imported geometry in CSG operations + */ +export const subtractSTL = (): Solid => { + // Create a cube + const cube = Solid.cube(20, 20, 20, { color: 'red' }); + + // Import STL and position it + const imported = Solid.fromSTL(sampleStl, { color: 'blue' }).move({ x: 5, y: 5, z: 5 }); + + // Subtract imported geometry from cube + return Solid.SUBTRACT(cube, imported); +}; + +/** + * Union STL with Primitives + * Combine imported geometry with basic shapes + */ +export const unionSTL = (): Solid => { + // Import STL + const imported = Solid.fromSTL(sampleStl, { color: 'purple' }); + + // Create a base platform + const base = Solid.cube(15, 2, 15, { color: 'purple' }).align('bottom'); + + // Combine them + return Solid.UNION(imported, base); +}; + +/** + * Intersect STL with Sphere + * Extract the overlapping volume between imported geometry and a primitive + */ +export const intersectSTL = (): Solid => { + const imported = Solid.fromSTL(sampleStl, { color: 'cyan' }).scale({ all: 2 }); + const sphere = Solid.sphere(8, { color: 'cyan' }).move({ x: 5, y: 5, z: 5 }); + + return Solid.INTERSECT(imported, sphere); +}; + +/** + * ============================================================================ + * SECTION 3: SVG Path Import Examples + * ============================================================================ + */ + +/** + * Simple SVG Rectangle + * Basic SVG path extrusion from rectangle path + */ +export const svgRectangle = (): Solid => { + // SVG path data: M = move to, L = line to, Z = close path + const rectPath = 'M 0 0 L 20 0 L 20 10 L 0 10 Z'; + + return Solid.profilePrismFromSVG(rectPath, 5, { color: 'orange' }); +}; + +/** + * SVG Star Shape + * More complex SVG path with multiple points + */ +export const svgStar = (): Solid => { + // 5-pointed star path + const starPath = 'M 10 0 L 12 8 L 20 8 L 14 13 L 16 21 L 10 16 L 4 21 L 6 13 L 0 8 L 8 8 Z'; + + return Solid.profilePrismFromSVG(starPath, 3, { color: 'gold' }); +}; + +/** + * SVG with Curves (Bezier) + * Demonstrates SVG paths with curved segments using quadratic bezier (Q) + */ +export const svgCurved = (): Solid => { + // Wavy path: Q = quadratic bezier (control point, end point) + // Creates two waves going up and down + const curvedPath = 'M 0 5 Q 5 0, 10 5 Q 15 10, 20 5 L 20 10 L 0 10 Z'; + + return Solid.profilePrismFromSVG(curvedPath, 8, { color: 'pink' }); +}; + +/** + * SVG Heart Shape + * Actual heart shape with cubic bezier curves + */ +export const svgHeart = (): Solid => { + // Proper heart shape using cubic bezier curves + // Two humps at top, point at bottom + const heartPath = + 'M 10 6 Q 10 4, 8 3 Q 6 2, 5 4 Q 4 6, 5 8 L 10 14 L 15 8 Q 16 6, 15 4 Q 14 2, 12 3 Q 10 4, 10 6 Z'; + + return Solid.profilePrismFromSVG(heartPath, 2, { color: 'red' }).scale({ all: 0.8 }); +}; + +/** + * ============================================================================ + * SECTION 4: Boolean Operations with SVG Imports + * ============================================================================ + */ + +/** + * SVG Profile as Cutter + * Use imported SVG path to cut holes in primitives + */ +export const svgCutter = (): Solid => { + // Create a thick plate + const plate = Solid.cube(30, 20, 5, { color: 'gray' }); + + // Import star shape as a cutter + const starPath = 'M 5 0 L 6 4 L 10 4 L 7 6 L 8 10 L 5 8 L 2 10 L 3 6 L 0 4 L 4 4 Z'; + const starCutter = Solid.profilePrismFromSVG(starPath, 10, { color: 'gray' }).move({ + x: -5, + y: 0, + z: 0 + }); + + return Solid.SUBTRACT(plate, starCutter); +}; + +/** + * Multiple SVG Shapes Combined + * Combine multiple imported SVG profiles + */ +export const multipleSVG = (): Solid => { + // Use simple rectangle shapes instead of complex arcs + const rect1 = 'M 0 0 L 10 0 L 10 10 L 0 10 Z'; + const rect2 = 'M 0 0 L 10 0 L 10 10 L 0 10 Z'; + + const shape1 = Solid.profilePrismFromSVG(rect1, 8, { color: 'teal' }).move({ x: -5 }); + const shape2 = Solid.profilePrismFromSVG(rect2, 8, { color: 'teal' }).move({ x: 5 }); + + return Solid.UNION(shape1, shape2); +}; + +/** + * ============================================================================ + * SECTION 5: Advanced Import Combinations + * ============================================================================ + */ + +/** + * STL + SVG Combination + * Combine imported STL with SVG profile extrusion + */ +export const stlPlusSVG = (): Solid => { + // Import STL as base + const base = Solid.fromSTL(sampleStl, { color: 'brown' }).align('bottom'); + + // Create SVG profile as decoration + const decorPath = 'M 0 0 L 5 0 L 5 5 L 0 5 Z'; + const decoration = Solid.profilePrismFromSVG(decorPath, 2, { color: 'brown' }).move({ + x: 2, + y: 8, + z: 2 + }); + + return Solid.UNION(base, decoration); +}; + +/** + * Parametric SVG Import + * Generate SVG paths programmatically and extrude them + */ +export const parametricSVG = (sides: number = 6): Solid => { + // Generate a regular polygon SVG path + const radius = 8; + const angleStep = (2 * Math.PI) / sides; + + let path = 'M '; + for (let index = 0; index < sides; index++) { + const x = radius + radius * Math.cos(index * angleStep); + const y = radius + radius * Math.sin(index * angleStep); + path += `${index === 0 ? '' : 'L '}${x.toFixed(2)} ${y.toFixed(2)} `; + } + path += 'Z'; + + return Solid.profilePrismFromSVG(path, 6, { color: 'lime' }); +}; + +/** + * Import with Grid Pattern + * Create grid array from imported geometry + */ +export const importedGrid = (): Solid => { + // Import small STL + const imported = Solid.fromSTL(sampleStl, { color: 'violet' }).scale({ all: 0.3 }); + + // Create 3×3 grid + return Solid.GRID_XY(imported, { cols: 3, rows: 3, spacing: [5, 5] }); +}; + +/** + * ============================================================================ + * Component Registration + * ============================================================================ + */ + +/** + * Component registration map + * All import examples organized by section + * + * 💡 These components demonstrate: + * - Loading external STL files + * - Importing SVG paths for 3D extrusion + * - Boolean operations with imported geometries + * - Combining imports with primitives + * - Advanced compositions with multiple import types + */ +export const components: ComponentsMap = { + // STL Import Examples + 'N1. Import: STL Basic': importedSTL, + 'N2. Import: STL Transformed': transformedSTL, + + // Boolean Operations with STL + 'N3. Import: Subtract STL': subtractSTL, + 'N4. Import: Union STL': unionSTL, + 'N5. Import: Intersect STL': intersectSTL, + + // SVG Path Import Examples + 'N6. Import: SVG Rectangle': svgRectangle, + 'N7. Import: SVG Star': svgStar, + 'N8. Import: SVG Curved': svgCurved, + 'N9. Import: SVG Heart': svgHeart, + + // Boolean Operations with SVG + 'NA. Import: SVG Cutter': svgCutter, + 'NB. Import: Multiple SVG': multipleSVG, + + // Advanced Combinations + 'NC. Import: STL + SVG': stlPlusSVG, + 'ND. Import: Parametric SVG': () => parametricSVG(6), + 'NE. Import: Grid from STL': importedGrid +}; diff --git a/projects/examples/O.circularArrays.ts b/projects/examples/O.circularArrays.ts new file mode 100644 index 0000000..d89cec8 --- /dev/null +++ b/projects/examples/O.circularArrays.ts @@ -0,0 +1,240 @@ +/** + * X. Circular Arrays - Polar Patterns + * + * This file demonstrates the ARRAY_CIRCULAR method for creating circular/radial patterns. + * Elements are arranged in a circle in the XZ plane (horizontal, around Y-axis). + * + * Key concepts: + * - Circular arrays distribute copies evenly around a circle + * - By default, elements rotate to face outward (like gear teeth) + * - Supports partial circles using startAngle/endAngle + * - Common use cases: gears, bolt holes, spokes, decorative patterns + */ + +import { Solid } from '$lib/3d/Solid'; +import type { ComponentsMap } from '$stores/componentStore'; + +/** + * Basic Circular Array - Simple decorative pattern + * + * Demonstrates the simplest usage: spheres arranged in a circle + * Using rotateElements: false since spheres look the same from any angle + */ +export const basicCircle = (): Solid => { + const sphere = Solid.sphere(2, { color: 'blue' }); + + return Solid.ARRAY_CIRCULAR(sphere, { + count: 12, + radius: 15, + rotateElements: false // Spheres don't need rotation + }); +}; + +/** + * Gear Teeth Pattern - Classic mechanical design + * + * Creates a gear-like pattern with teeth facing outward + * Default rotateElements: true makes teeth face radially + */ +export const gearTeeth = (): Solid => { + // Create center disk first + const disk = Solid.cylinder(15, 8, { color: 'gray' }).align('bottom'); + + // Create a tooth shape - must extend in +X direction to face outward when rotated + // Width (X) should be larger than depth (Z) so tooth points radially + const tooth = Solid.cube(3, 10, 2, { color: 'gray' }) + .center({ x: true, z: true }) + .align('bottom') + .rotate({ y: 180 }) + .move({ y: -6 }); // Position on top of disk + + // Arrange teeth in circle (rotates outward by default, positions at radius) + const teeth = Solid.ARRAY_CIRCULAR(tooth, { + count: 24, + radius: 15 // Distance from center to teeth + }); + + return Solid.UNION(disk, teeth); +}; + +/** + * Bolt Hole Pattern - Circular mounting holes + * + * Creates a flange with evenly spaced bolt holes + * Demonstrates using negative solids in circular arrays + */ +export const boltHoles = (): Solid => { + // Create base plate/flange + const plate = Solid.cylinder(30, 5, { color: 'blue' }).align('bottom'); + + // Create hole pattern (negative solids) + const hole = Solid.cylinder(2, 12, { color: 'blue' }); + const holePattern = Solid.ARRAY_CIRCULAR(hole, { + count: 8, + radius: 20, + rotateElements: false // Holes don't need rotation + }).setNegative(); + + // Center hole + const centerHole = Solid.cylinder(5, 10, { color: 'blue' }).setNegative(); + + return Solid.MERGE([plate, holePattern, centerHole]); +}; + +/** + * Wheel with Spokes - Radial structural pattern + * + * Creates a wheel with spokes radiating from center + * Demonstrates using radius: 0 to rotate from center + */ +export const wheelSpokes = (): Solid => { + // Create a spoke + const spoke = Solid.cube(1, 20, 2, { color: 'silver' }) + .center({ x: true, z: true }) + .rotate({ y: 45 }) + .align('bottom'); + + // Arrange spokes (rotates from center) + const spokes = Solid.ARRAY_CIRCULAR(spoke, { + count: 8, + radius: 11 // No radial offset, just rotation + }); + + // Add rim + const rim = Solid.cylinder(12, 3, { color: 'black' }).align('bottom').move({ y: 8.5 }); + + // Add hub + const hub = Solid.cylinder(3, 4, { color: 'silver' }).align('bottom'); + + return Solid.UNION(spokes, rim, hub); +}; + +/** + * Half Circle Pattern - Partial arc (amphitheater seating) + * + * Demonstrates using startAngle/endAngle for partial circles + * Useful for semicircular or arc patterns + */ +export const halfCircle = (): Solid => { + // Create a seat + const seat = Solid.cube(2, 1, 2, { color: 'red' }).align('bottom'); + + // Arrange in half circle (0° to 180°) + const seating = Solid.ARRAY_CIRCULAR(seat, { + count: 15, + radius: 25, + startAngle: 0, + endAngle: 180 // Half circle + }); + + // Add stage + const stage = Solid.cube(30, 1, 12, { color: 'brown' }).center().align('bottom').move({ z: -20 }); + + return Solid.UNION(seating, stage); +}; + +/** + * Clock Face - 12 hour markers + * + * Creates clock hour markers using exact angles + * Demonstrates precise angular positioning + */ +export const clockFace = (): Solid => { + // Hour marker - center it for proper rotation + const hourMarker = Solid.cube(1, 3, 1, { color: 'black' }) + .center({ x: true, z: true }) + .align('bottom'); + + const hourMarkers = Solid.ARRAY_CIRCULAR(hourMarker, { + count: 12, + radius: 18 // Distance from center to markers + }); + + // Clock face + const face = Solid.cylinder(20, 2, { color: 'white' }).align('bottom'); + + // Center dot + const center = Solid.cylinder(1.5, 3, { color: 'black' }).align('bottom'); + + return Solid.UNION(face, hourMarkers, center); +}; + +/** + * Decorative Rosette - Multiple circular layers + * + * Combines multiple circular arrays at different radii + * Creates ornamental/architectural decoration pattern + */ +export const rosette = (): Solid => { + // Inner ring - small spheres + const innerOrb = Solid.sphere(1.5, { color: 'gold' }); + const innerRing = Solid.ARRAY_CIRCULAR(innerOrb, { + count: 8, + radius: 8, + rotateElements: false + }); + + // Middle ring - larger spheres + const middleOrb = Solid.sphere(2, { color: 'gold' }); + const middleRing = Solid.ARRAY_CIRCULAR(middleOrb, { + count: 12, + radius: 15, + rotateElements: false + }); + + // Outer ring - decorative elements + const outerElement = Solid.cube(2, 4, 2, { color: 'gold' }) + .center({ x: true, z: true }) + .align('bottom'); + const outerRing = Solid.ARRAY_CIRCULAR(outerElement, { + count: 16, + radius: 20 // Distance from center + }); + + // Center piece + const center = Solid.sphere(5, { color: 'gold' }); + + return Solid.UNION(innerRing, middleRing, outerRing, center); +}; + +/** + * Ventilation Grille - Arc of radial slots + * + * Creates ventilation slots in an arc pattern + * Demonstrates partial circle with negative solids + */ +export const ventGrille = (): Solid => { + // Base panel + const panel = Solid.cube(30, 2, 30, { color: 'gray' }).center().align('bottom'); + + // Ventilation slot (negative) - center for proper rotation + const slot = Solid.cube(2, 10, 0.5, { color: 'gray' }) + .center({ x: true, z: true }) + .align('front'); + + // Create arc pattern (90° arc) + const slotPattern = Solid.ARRAY_CIRCULAR(slot, { + count: 11, + radius: 12, // Distance from center + startAngle: -45, + endAngle: 45 // 90° total arc + }).setNegative(); + + return Solid.MERGE([panel, slotPattern]); +}; + +/** + * Component registration map + * Keys: Component names (appear in UI dropdown) + * Values: Functions that return Solid instances + */ +export const components: ComponentsMap = { + 'O1. Circular: Basic Circle': basicCircle, + 'O2. Circular: Gear Teeth': gearTeeth, + 'O3. Circular: Bolt Holes': boltHoles, + 'O4. Circular: Wheel Spokes': wheelSpokes, + 'O5. Circular: Half Circle (Amphitheater)': halfCircle, + 'O6. Circular: Clock Face': clockFace, + 'O7. Circular: Rosette (Layers)': rosette, + 'O8. Circular: Ventilation Grille': ventGrille +}; diff --git a/projects/examples/P.mirror.ts b/projects/examples/P.mirror.ts new file mode 100644 index 0000000..00ecb69 --- /dev/null +++ b/projects/examples/P.mirror.ts @@ -0,0 +1,181 @@ +/** + * P. Mirror Operations - Reflection and Symmetry + * + * This file demonstrates the MIRROR method for creating reflections and symmetric objects. + * MIRROR creates a reflected copy across a specified axis plane (X, Y, or Z). + * + * Key concepts: + * - MIRROR returns only the reflected copy (not combined with original) + * - Use UNION to combine original + mirror for symmetry + * - Can chain mirrors for full 3D symmetry + * - Works with all primitives, CSG operations, and negative solids + * + * Axis behavior: + * - 'X': Mirrors across YZ plane (flips X coordinates) + * - 'Y': Mirrors across XZ plane (flips Y coordinates) + * - 'Z': Mirrors across XY plane (flips Z coordinates) + */ + +import { Solid } from '$lib/3d/Solid'; +import type { ComponentsMap } from '$stores/componentStore'; + +/** + * Simple Mirror - Basic reflection + * + * Demonstrates the simplest mirror usage: + * Create an asymmetric shape and mirror it + */ +export const simpleMirror = (): Solid => { + // Create asymmetric shape + const shape = Solid.cube(10, 5, 3, { color: 'blue' }).move({ x: 8 }); + + // Create mirrored copy + const mirrored = Solid.MIRROR(shape, 'X'); + + // Show both original and mirror + return Solid.UNION(shape, mirrored); +}; + +/** + * Bilateral Symmetry - Left/Right mirror + * + * Creates a symmetric object from one half + * Common in mechanical parts, architectural elements, and organic forms + */ +export const bilateralSymmetry = (): Solid => { + // Design one half of a decorative bracket + const half = Solid.cube(15, 25, 5, { color: 'brown' }).move({ x: 7.5 }).align('bottom'); + + // Add a curved cutout (using cylinder as cutter) + const cutout = Solid.cylinder(8, 10, { color: 'brown' }).rotate({ x: 90 }).move({ x: 15, y: 12 }); + const halfWithCutout = Solid.SUBTRACT(half, cutout); + + // Create full symmetric bracket + return Solid.UNION(halfWithCutout, Solid.MIRROR(halfWithCutout, 'X')); +}; + +/** + * Quadrant Symmetry - 2-axis mirror + * + * Mirrors across two axes to create four-way symmetry + * Useful for table legs, cross patterns, decorative elements + */ +export const quadrantSymmetry = (): Solid => { + // Create one quarter of a decorative cross + const quarter = Solid.cube(15, 5, 3, { color: 'red' }).move({ x: 7.5 }).align('bottom'); + + // Mirror across X to get half + const half = Solid.UNION(quarter, Solid.MIRROR(quarter, 'X')); + + return Solid.UNION(quarter, half); +}; + +/** + * Octant Symmetry - Full 3D symmetry + * + * Mirrors across all three axes + * Creates perfectly symmetric 3D objects from one octant + */ +export const octantSymmetry = (): Solid => { + // Design one eighth of a decorative sphere + const octant = Solid.sphere(12, { color: 'purple' }).move({ x: 5, y: 5, z: 5 }); + + // Add detail: subtract a small sphere from corner + const detail = Solid.sphere(3, { color: 'purple' }).move({ x: 10, y: 10, z: 10 }); + const octantWithDetail = Solid.SUBTRACT(octant, detail); + + // Mirror across X + const halfX = Solid.UNION(octantWithDetail, Solid.MIRROR(octantWithDetail, 'X')); + + // Mirror across Y + const halfY = Solid.UNION(halfX, Solid.MIRROR(halfX, 'Y')); + + // Mirror across Z for full 3D symmetry + return Solid.UNION(halfY, Solid.MIRROR(halfY, 'Z')); +}; + +/** + * Symmetric Gear - Mirrored teeth pattern + * + * Creates a gear with symmetric teeth using mirror + * Demonstrates combining MIRROR with circular arrays + */ +export const symmetricGear = (): Solid => { + // Center disk + const disk = Solid.cylinder(15, 8, { color: 'gray' }).align('bottom'); + + // Create one tooth shape (asymmetric profile) + const tooth = Solid.cube(4, 12, 2, { color: 'gray' }) + .center({ x: true, z: true }) + .align('bottom') + .move({ x: 16, y: 8 }); + + // Create symmetric tooth pair + const toothPair = Solid.UNION(tooth, Solid.MIRROR(tooth, 'Z')); + + // Arrange pairs in circle + const teeth = Solid.ARRAY_CIRCULAR(toothPair, { + count: 12, + radius: 1, + rotateElements: true + }); + + return Solid.UNION(disk, teeth); +}; + +/** + * Mirrored Holes - Symmetric mounting pattern + * + * Creates symmetrically placed holes using negative solids + * Demonstrates MIRROR with negative flag preservation + */ +export const mirroredHoles = (): Solid => { + // Base plate + const plate = Solid.cube(40, 30, 5, { color: 'blue' }).center().align('bottom'); + + // Create hole pattern on one side (negative) + const hole = Solid.cylinder(2, 10, { color: 'blue' }).move({ x: 12, z: 8 }).setNegative(); + + // Mirror to create symmetric hole pattern + const mirroredHole = Solid.MIRROR(hole, 'X'); + + // Combine with base + return Solid.MERGE([plate, hole, mirroredHole]); +}; + +/** + * Architectural Arch - Symmetric structure + * + * Creates an archway using mirrored columns and cap + * Demonstrates practical architectural use of symmetry + */ +export const archway = (): Solid => { + // Create one pillar (half of arch) + const pillar = Solid.cube(5, 30, 8, { color: 'brown' }).move({ x: 15 }).align('bottom'); + + // Create arch cap (one half) + const capHalf = Solid.cylinder(15, 8, { color: 'brown', angle: 180 }) + .rotate({ x: 90, z: 90 }) + .move({ x: 7.5, y: 30, z: 4 }); + + // Combine half arch elements + const half = Solid.UNION(pillar, capHalf); + + // Mirror to create full arch + return Solid.UNION(half, Solid.MIRROR(half, 'X')); +}; + +/** + * Component registration map + * Keys: Component names (appear in UI dropdown) + * Values: Functions that return Solid instances + */ +export const components: ComponentsMap = { + 'P1. Mirror: Simple Mirror': simpleMirror, + 'P2. Mirror: Bilateral Symmetry': bilateralSymmetry, + 'P3. Mirror: Quadrant Symmetry (2-axis)': quadrantSymmetry, + 'P4. Mirror: Octant Symmetry (3-axis)': octantSymmetry, + 'P5. Mirror: Symmetric Gear': symmetricGear, + 'P6. Mirror: Mirrored Holes': mirroredHoles, + 'P7. Mirror: Archway': archway +}; diff --git a/projects/examples/assets/sample.stl b/projects/examples/assets/sample.stl new file mode 100644 index 0000000..797a788 --- /dev/null +++ b/projects/examples/assets/sample.stl @@ -0,0 +1,86 @@ +solid cube + facet normal 0 0 -1 + outer loop + vertex 0 0 0 + vertex 5 0 0 + vertex 5 5 0 + endloop + endfacet + facet normal 0 0 -1 + outer loop + vertex 0 0 0 + vertex 5 5 0 + vertex 0 5 0 + endloop + endfacet + facet normal 0 0 1 + outer loop + vertex 0 0 5 + vertex 5 5 5 + vertex 5 0 5 + endloop + endfacet + facet normal 0 0 1 + outer loop + vertex 0 0 5 + vertex 0 5 5 + vertex 5 5 5 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 0 0 0 + vertex 5 0 5 + vertex 5 0 0 + endloop + endfacet + facet normal 0 -1 0 + outer loop + vertex 0 0 0 + vertex 0 0 5 + vertex 5 0 5 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 0 5 0 + vertex 5 5 0 + vertex 5 5 5 + endloop + endfacet + facet normal 0 1 0 + outer loop + vertex 0 5 0 + vertex 5 5 5 + vertex 0 5 5 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0 0 0 + vertex 0 5 0 + vertex 0 5 5 + endloop + endfacet + facet normal -1 0 0 + outer loop + vertex 0 0 0 + vertex 0 5 5 + vertex 0 0 5 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 5 0 0 + vertex 5 5 5 + vertex 5 5 0 + endloop + endfacet + facet normal 1 0 0 + outer loop + vertex 5 0 0 + vertex 5 0 5 + vertex 5 5 5 + endloop + endfacet +endsolid cube diff --git a/projects/examples/index.ts b/projects/examples/index.ts index 20e1149..641177a 100644 --- a/projects/examples/index.ts +++ b/projects/examples/index.ts @@ -13,13 +13,16 @@ * F. Custom Profile Prisms (2D profiles extruded to 3D) * G. Revolution Solids (Rotational symmetry: chess pieces, vases) * - * ADVANCED (H-M): + * ADVANCED (H-X): * H. Scaling Fundamentals (Uniform, axis-specific, cumulative scaling) * I. Complex Transform Chains (Order of operations, positioning patterns) * J. 3D Grid Patterns (GRID_XYZ, spacing, volumetric arrays) * K. Advanced 3D Spatial Arrangements (Programmatic generation, getBounds) * L. Performance & Caching (cacheFunction, optimization patterns) * M. Complex Multi-Concept Composition (Production-ready complete structures) + * N. Import Capabilities (STL files, SVG paths, boolean operations with imports) + * O. Circular Arrays (Polar patterns: gears, bolt holes, spokes, decorative) + * P. Mirror Operations (Reflection and symmetry across axis planes) * * All components are registered via addToComponentStore() and become available in the UI dropdown. */ @@ -39,6 +42,9 @@ import { components as grid3dComponents } from './J.grid3d'; import { components as patterns3dComponents } from './K.patterns3d'; import { components as optimizationComponents } from './L.optimization'; import { components as compositionComponents } from './M.composition'; +import { components as importingComponents } from './N-importing'; +import { components as circularArraysComponents } from './O.circularArrays'; +import { components as mirrorComponents } from './P.mirror'; // Register all example components in the global component store // The spread operator merges all component maps into a single object @@ -55,5 +61,8 @@ addToComponentStore({ ...grid3dComponents, ...patterns3dComponents, ...optimizationComponents, - ...compositionComponents + ...compositionComponents, + ...importingComponents, + ...circularArraysComponents, + ...mirrorComponents }); diff --git a/src/lib/3d/Solid.ts b/src/lib/3d/Solid.ts index f01d369..b567890 100644 --- a/src/lib/3d/Solid.ts +++ b/src/lib/3d/Solid.ts @@ -2,47 +2,76 @@ import { Box3, BoxGeometry, + BufferAttribute, BufferGeometry, ConeGeometry, CylinderGeometry, ExtrudeGeometry, LatheGeometry, + Matrix4, Shape, SphereGeometry, Vector3 } from 'three'; +import helvetikerFont from 'three/examples/fonts/helvetiker_regular.typeface.json'; +import { RoundedBoxGeometry } from 'three/examples/jsm/geometries/RoundedBoxGeometry.js'; +import { TextGeometry } from 'three/examples/jsm/geometries/TextGeometry.js'; +import type { Font } from 'three/examples/jsm/loaders/FontLoader.js'; +import { FontLoader } from 'three/examples/jsm/loaders/FontLoader.js'; +import { STLLoader } from 'three/examples/jsm/loaders/STLLoader.js'; +import { SVGLoader } from 'three/examples/jsm/loaders/SVGLoader.js'; import { ADDITION, Brush, Evaluator, INTERSECTION, SUBTRACTION } from 'three-bvh-csg'; import { MathMinMax, MathRoundTo2 } from '$lib/Math'; -// Path segment type definitions -export type StraightSegment = { - type: 'straight'; - length: number; -}; - -export type CurveSegment = { - type: 'curve'; - radius: number; - angle: number; // degrees, positive = right turn, negative = left turn -}; - -export type PathSegment = StraightSegment | CurveSegment; - -// Factory functions for path segments -export const straight = (length: number): StraightSegment => ({ - type: 'straight', - length -}); - -export const curve = (radius: number, angle: number): CurveSegment => ({ - type: 'curve', - radius, - angle -}); +// Re-export path segment types and factories for backward compatibility +export type { CurveSegment, PathSegment, StraightSegment } from './path-factories'; +export { curve, straight } from './path-factories'; + +// Import for internal use +import type { PathSegment } from './path-factories'; + +/** + * ============================================================================ + * TABLE OF CONTENTS + * ============================================================================ + * + * This file contains the core Solid class for 3D mesh creation using CSG operations. + * Total lines: ~1100 + * + * SECTIONS: + * 1. Static Utilities (private) - Lines ~45-90 - evaluator, degreesToRadians, generateWedgePoints + * 2. Constructor & Properties - Lines ~92-111 - Constructor, getters, clone + * 3. Geometry Conversion - Lines ~113-126 - geometryToBrush helper + * 4. Primitive Factories (static) - Lines ~128-366 - cube, roundedBox, cylinder, sphere, cone, prism, trianglePrism, text + * 4.5. Import Methods (static) - Lines ~368-450 - fromSTL, profilePrismFromSVG + * 5. Custom Profile Methods (static) - Lines ~452-672 - profilePrism, profilePrismFromPoints, profilePrismFromPath + * 6. Revolution Methods (static) - Lines ~674-992 - revolutionSolid, revolutionSolidFromPoints, revolutionSolidFromPath + * 7. Transform Methods - Lines ~994-1033 - at, move, rotate, scale + * 8. Alignment Methods - Lines ~1035-1103- center, align, getBounds + * 9. CSG Operations (static) - Lines ~1105-1138- MERGE, SUBTRACT, UNION, INTERSECT + * 10. Grid & Array Operations (static) - Lines ~1370-1510- GRID_XYZ, GRID_XY, GRID_X, ARRAY_CIRCULAR + * 11. Utility Methods - Lines ~1512+ - normalize, setNegative, setColor, getVertices, getBounds + * + * ============================================================================ + */ export class Solid { + // ============================================================================ + // SECTION 1: Static Utilities (Private) + // ============================================================================ + private static evaluator: Evaluator = new Evaluator(); + private static defaultFont: Font | undefined = undefined; + + // Helper to load and cache the default font for text geometry + private static getDefaultFont(): Font { + if (!this.defaultFont) { + const loader = new FontLoader(); + this.defaultFont = loader.parse(helvetikerFont); + } + return this.defaultFont; + } // Helper to convert degrees to radians private static degreesToRadians = (degrees: number): number => degrees * (Math.PI / 180); @@ -88,6 +117,10 @@ export class Solid { return points; } + // ============================================================================ + // SECTION 2: Constructor & Properties + // ============================================================================ + public brush: Brush; private _color: string; private _isNegative: boolean; @@ -109,14 +142,20 @@ export class Solid { public clone = (): Solid => new Solid(this.brush.clone(true), this._color, this._isNegative); + // ============================================================================ + // SECTION 3: Geometry Conversion Helper + // ============================================================================ + private static geometryToBrush( geometry: | BoxGeometry + | RoundedBoxGeometry | CylinderGeometry | SphereGeometry | ConeGeometry | ExtrudeGeometry | LatheGeometry + | TextGeometry | BufferGeometry ): Brush { const result = new Brush(geometry.translate(0, 0, 0)); @@ -124,25 +163,67 @@ export class Solid { return result; } + // ============================================================================ + // SECTION 4: Primitive Factories (Static) + // ============================================================================ + static cube = ( width: number, height: number, depth: number, options?: { color?: string } ): Solid => { - // Validate dimensions + // Validate dimensions (check finite first, then positive) + if (!Number.isFinite(width) || !Number.isFinite(height) || !Number.isFinite(depth)) + throw new Error( + `Cube dimensions must be finite (got width: ${width}, height: ${height}, depth: ${depth})` + ); if (width <= 0 || height <= 0 || depth <= 0) throw new Error( `Cube dimensions must be positive (got width: ${width}, height: ${height}, depth: ${depth})` ); + + const color = options?.color ?? 'gray'; + return new Solid( + this.geometryToBrush(new BoxGeometry(width, height, depth)), + color + ).normalize(); + }; + + static roundedBox = ( + width: number, + height: number, + depth: number, + options?: { + color?: string; + radius?: number; + segments?: number; + } + ): Solid => { + // Validate dimensions (check finite first, then positive) if (!Number.isFinite(width) || !Number.isFinite(height) || !Number.isFinite(depth)) throw new Error( - `Cube dimensions must be finite (got width: ${width}, height: ${height}, depth: ${depth})` + `RoundedBox dimensions must be finite (got width: ${width}, height: ${height}, depth: ${depth})` + ); + if (width <= 0 || height <= 0 || depth <= 0) + throw new Error( + `RoundedBox dimensions must be positive (got width: ${width}, height: ${height}, depth: ${depth})` ); const color = options?.color ?? 'gray'; + const radius = options?.radius ?? Math.min(width, height, depth) * 0.1; + const segments = options?.segments ?? 2; + + // Validate radius is within bounds + const maxRadius = Math.min(width, height, depth) / 2; + if (radius > maxRadius) + throw new Error( + `RoundedBox radius (${radius}) cannot exceed half of smallest dimension (${maxRadius})` + ); + if (radius < 0) throw new Error(`RoundedBox radius must be non-negative (got ${radius})`); + return new Solid( - this.geometryToBrush(new BoxGeometry(width, height, depth)), + this.geometryToBrush(new RoundedBoxGeometry(width, height, depth, segments, radius)), color ).normalize(); }; @@ -156,20 +237,20 @@ export class Solid { topRadius?: number; } ): Solid => { - // Validate dimensions - if (radius <= 0 || height <= 0) - throw new Error( - `Cylinder dimensions must be positive (got radius: ${radius}, height: ${height})` - ); + // Validate dimensions (check finite first, then positive) if (!Number.isFinite(radius) || !Number.isFinite(height)) throw new Error( `Cylinder dimensions must be finite (got radius: ${radius}, height: ${height})` ); + if (radius <= 0 || height <= 0) + throw new Error( + `Cylinder dimensions must be positive (got radius: ${radius}, height: ${height})` + ); if (options?.topRadius !== undefined) { - if (options.topRadius < 0) - throw new Error(`Cylinder topRadius must be non-negative (got ${options.topRadius})`); if (!Number.isFinite(options.topRadius)) throw new Error(`Cylinder topRadius must be finite (got ${options.topRadius})`); + if (options.topRadius < 0) + throw new Error(`Cylinder topRadius must be non-negative (got ${options.topRadius})`); } const color = options?.color ?? 'gray'; @@ -213,9 +294,9 @@ export class Solid { segments?: number; } ): Solid => { - // Validate dimensions - if (radius <= 0) throw new Error(`Sphere radius must be positive (got ${radius})`); + // Validate dimensions (check finite first, then positive) if (!Number.isFinite(radius)) throw new Error(`Sphere radius must be finite (got ${radius})`); + if (radius <= 0) throw new Error(`Sphere radius must be positive (got ${radius})`); const color = options?.color ?? 'gray'; const angle = options?.angle ?? 360; @@ -256,13 +337,13 @@ export class Solid { segments?: number; } ): Solid => { - // Validate dimensions + // Validate dimensions (check finite first, then positive) + if (!Number.isFinite(radius) || !Number.isFinite(height)) + throw new Error(`Cone dimensions must be finite (got radius: ${radius}, height: ${height})`); if (radius <= 0 || height <= 0) throw new Error( `Cone dimensions must be positive (got radius: ${radius}, height: ${height})` ); - if (!Number.isFinite(radius) || !Number.isFinite(height)) - throw new Error(`Cone dimensions must be finite (got radius: ${radius}, height: ${height})`); const color = options?.color ?? 'gray'; const angle = options?.angle ?? 360; @@ -306,20 +387,20 @@ export class Solid { topRadius?: number; } ): Solid => { - // Validate dimensions + // Validate dimensions (check finite first, then positive/constraints) if (sides < 3) throw new Error(`Prism must have at least 3 sides (got ${sides})`); if (!Number.isInteger(sides)) throw new Error(`Prism sides must be an integer (got ${sides})`); + if (!Number.isFinite(radius) || !Number.isFinite(height)) + throw new Error(`Prism dimensions must be finite (got radius: ${radius}, height: ${height})`); if (radius <= 0 || height <= 0) throw new Error( `Prism dimensions must be positive (got radius: ${radius}, height: ${height})` ); - if (!Number.isFinite(radius) || !Number.isFinite(height)) - throw new Error(`Prism dimensions must be finite (got radius: ${radius}, height: ${height})`); if (options?.topRadius !== undefined) { - if (options.topRadius < 0) - throw new Error(`Prism topRadius must be non-negative (got ${options.topRadius})`); if (!Number.isFinite(options.topRadius)) throw new Error(`Prism topRadius must be finite (got ${options.topRadius})`); + if (options.topRadius < 0) + throw new Error(`Prism topRadius must be non-negative (got ${options.topRadius})`); } const color = options?.color ?? 'gray'; @@ -363,6 +444,206 @@ export class Solid { } ): Solid => this.prism(3, radius, height, options); + static text = ( + text: string, + options?: { + color?: string; + size?: number; + height?: number; + curveSegments?: number; + bevelEnabled?: boolean; + } + ): Solid => { + // Validate text parameter + if (!text || text.length === 0) throw new Error('Text cannot be empty'); + + const color = options?.color ?? 'gray'; + const size = options?.size ?? 10; + const height = options?.height ?? 2; + const curveSegments = options?.curveSegments ?? 12; + const bevelEnabled = options?.bevelEnabled ?? false; + + // Get the default font + const font = this.getDefaultFont(); + + // Create text geometry + // Note: TextGeometry's 'depth' parameter is what we call 'height' (extrusion depth) + const geometry = new TextGeometry(text, { + font, + size, + depth: height, + curveSegments, + bevelEnabled + }); + + // Create solid and normalize + const solid = new Solid(this.geometryToBrush(geometry), color).normalize(); + + // Center text on XZ plane and align to bottom (Y=0) + // This makes text easier to position and orient consistently + return solid.center({ x: true, z: true }).align('bottom'); + }; + + // ============================================================================ + // SECTION 4.5: Import Methods (Static) + // ============================================================================ + + /** + * Creates a Solid from STL file data (binary or ASCII format). + * STL files can be imported using Vite's import syntax with ?raw or ?url. + * + * @param data - STL file data as ArrayBuffer (binary) or string (ASCII) + * @param options - Configuration options + * @param options.color - Material color (default: 'gray') + * @returns Solid created from the imported STL geometry + * + * @example + * // Import STL file via Vite + * import stlData from './model.stl?raw'; + * + * // Create component from STL + * const importedModel = Solid.fromSTL(stlData, { color: 'blue' }); + * + * @example + * // Use in boolean operations + * const stl = Solid.fromSTL(stlData, { color: 'red' }); + * const cube = Solid.cube(20, 20, 20, { color: 'blue' }); + * const result = Solid.SUBTRACT(cube, stl); + */ + static fromSTL = (data: ArrayBuffer | string, options?: { color?: string }): Solid => { + const color = options?.color ?? 'gray'; + const loader = new STLLoader(); + + // Parse STL data (loader handles both binary and ASCII formats) + let geometry = loader.parse(data); + + // Validate that geometry was created successfully + if (!geometry.attributes['position'] || geometry.attributes['position'].count === 0) { + throw new Error('Failed to parse STL data - file may be corrupted or invalid'); + } + + // STL geometries are usually non-indexed, but ensure it's converted + // This is required for proper CSG operations + if (geometry.index) { + geometry = geometry.toNonIndexed(); + } + + // Ensure geometry has proper normals + if (!geometry.attributes['normal']) { + geometry.computeVertexNormals(); + } + + // Add UV coordinates if missing (required for CSG operations) + if (!geometry.attributes['uv']) { + const vertexCount = geometry.attributes['position'].count; + const uvs = new Float32Array(vertexCount * 2); + // Simple planar UV mapping (all zeros is acceptable for CSG) + for (let index = 0; index < vertexCount; index++) { + uvs[index * 2] = 0; + uvs[index * 2 + 1] = 0; + } + geometry.setAttribute('uv', new BufferAttribute(uvs, 2)); + } + + // Convert to Brush and create Solid + const brush = this.geometryToBrush(geometry); + + // STL geometries are already complete - no need to normalize + // Normalize() can cause issues with externally loaded geometry + return new Solid(brush, color); + }; + + /** + * Creates a profile prism from an SVG path string. + * The SVG path is extruded along the Y-axis to create a 3D solid. + * + * @param svgPathData - SVG path data string (the 'd' attribute value) + * @param height - Extrusion height along Y-axis + * @param options - Configuration options + * @param options.color - Material color (default: 'gray') + * @returns Solid created from the extruded SVG path + * + * @example + * // Simple rectangle path + * const rect = Solid.profilePrismFromSVG( + * 'M 0 0 L 20 0 L 20 10 L 0 10 Z', + * 5, + * { color: 'blue' } + * ); + * + * @example + * // Curved path with bezier + * const curve = Solid.profilePrismFromSVG( + * 'M 0 0 C 10 0, 10 10, 20 10 L 20 15 L 0 15 Z', + * 8, + * { color: 'red' } + * ); + * + * @example + * // Import SVG and use path + * const svgPath = 'M 10 10 L 50 10 L 50 50 L 10 50 Z'; + * const logo = Solid.profilePrismFromSVG(svgPath, 3, { color: 'green' }); + */ + static profilePrismFromSVG = ( + svgPathData: string, + height: number, + options?: { color?: string } + ): Solid => { + const color = options?.color ?? 'gray'; + + // Wrap path data in minimal SVG structure + const svgString = ``; + + // Parse SVG data + const loader = new SVGLoader(); + const svgData = loader.parse(svgString); + + // Check if we have any paths + if (svgData.paths.length === 0) { + throw new Error('No paths found in SVG data'); + } + + // Get shapes from the first path + const shapes = SVGLoader.createShapes(svgData.paths[0]); + + if (shapes.length === 0) { + throw new Error('No valid shapes extracted from SVG path'); + } + + // Use the first shape to create extruded geometry + const geometry = new ExtrudeGeometry(shapes[0], { + depth: height, + bevelEnabled: false, + curveSegments: 12, + steps: 1 + }); + + // Validate that geometry was created successfully + if (!geometry.attributes['position'] || geometry.attributes['position'].count === 0) { + throw new Error('Failed to create valid geometry from SVG path - check path syntax'); + } + + // Ensure geometry has proper normals and is computed + if (!geometry.attributes['normal']) { + geometry.computeVertexNormals(); + } + + // Center geometry along extrusion axis + geometry.translate(0, 0, -height / 2); + + // SVG coordinate system has Y pointing down, Three.js has Y pointing up + // Rotate so extrusion direction (Z-axis) becomes height (Y-axis) + // and flip to correct the Y-axis orientation + return new Solid(this.geometryToBrush(geometry), color) + .normalize() + .rotate({ x: 90 }) + .scale({ z: -1 }); // Flip Z to correct for SVG Y-down coordinate system + }; + + // ============================================================================ + // SECTION 5: Custom Profile Methods (Static) + // ============================================================================ + /** * Creates a custom profile prism by extruding a 2D shape along the Z-axis. * Provides flexible Shape API for defining complex profiles with curves, arcs, etc. @@ -586,6 +867,10 @@ export class Solid { ); }; + // ============================================================================ + // SECTION 6: Revolution Methods (Static) + // ============================================================================ + /** * Creates a body of revolution by rotating a 2D profile around the Y-axis. * Perfect for creating rotationally symmetric objects like chess pieces, vases, bottles, etc. @@ -878,8 +1163,17 @@ export class Solid { ); }; + // ============================================================================ + // SECTION 7: Transform Methods + // ============================================================================ + // Absolute positioning public at(x: number, y: number, z: number): Solid { + // Validate coordinates + if (!Number.isFinite(x) || !Number.isFinite(y) || !Number.isFinite(z)) { + throw new TypeError(`Position coordinates must be finite (got x: ${x}, y: ${y}, z: ${z})`); + } + this.brush.position.set(x, y, z); this.brush.updateMatrixWorld(); return this; @@ -887,6 +1181,12 @@ export class Solid { // Relative movement with object parameters public move(delta: { x?: number; y?: number; z?: number }): Solid { + // Validate and sanitize deltas (getBounds() may return NaN for complex CSG results) + // Treat NaN/Infinity as 0 to maintain backward compatibility + if (delta.x !== undefined && !Number.isFinite(delta.x)) delta.x = 0; + if (delta.y !== undefined && !Number.isFinite(delta.y)) delta.y = 0; + if (delta.z !== undefined && !Number.isFinite(delta.z)) delta.z = 0; + if (delta.x !== undefined) this.brush.position.x += delta.x; if (delta.y !== undefined) this.brush.position.y += delta.y; if (delta.z !== undefined) this.brush.position.z += delta.z; @@ -898,6 +1198,19 @@ export class Solid { private angleToRadian = (degree: number) => degree * (Math.PI / 180); public rotate(angles: { x?: number; y?: number; z?: number }): Solid { + // Validate all angles + const allAngles = [ + { value: angles.x, name: 'x' }, + { value: angles.y, name: 'y' }, + { value: angles.z, name: 'z' } + ].filter((a) => a.value !== undefined); + + for (const angle of allAngles) { + if (!Number.isFinite(angle.value)) { + throw new TypeError(`Rotation angle '${angle.name}' must be finite (got ${angle.value})`); + } + } + if (angles.x !== undefined) this.brush.rotation.x += this.angleToRadian(angles.x); if (angles.y !== undefined) this.brush.rotation.y += this.angleToRadian(angles.y); if (angles.z !== undefined) this.brush.rotation.z += this.angleToRadian(angles.z); @@ -907,6 +1220,25 @@ export class Solid { // Scaling with object parameters (multiplicative) public scale(factors: { all?: number; x?: number; y?: number; z?: number }): Solid { + // Validate all factors + const allFactors = [ + { value: factors.all, name: 'all' }, + { value: factors.x, name: 'x' }, + { value: factors.y, name: 'y' }, + { value: factors.z, name: 'z' } + ].filter((f) => f.value !== undefined); + + for (const factor of allFactors) { + if (!Number.isFinite(factor.value)) { + throw new TypeError(`Scale factor '${factor.name}' must be finite (got ${factor.value})`); + } + if (factor.value === 0) { + throw new Error( + `Scale factor '${factor.name}' cannot be zero (creates degenerate geometry)` + ); + } + } + if (factors.all !== undefined) { this.brush.scale.x *= factors.all; this.brush.scale.y *= factors.all; @@ -919,6 +1251,10 @@ export class Solid { return this; } + // ============================================================================ + // SECTION 8: Alignment Methods + // ============================================================================ + // Centering method public center(axes?: { x?: boolean; y?: boolean; z?: boolean }): Solid { // First, bake all transformations (position, rotation, scale) into geometry @@ -989,6 +1325,10 @@ export class Solid { return this; } + // ============================================================================ + // SECTION 9: CSG Operations (Static) + // ============================================================================ + // Explicit CSG operations public static MERGE(solids: Solid[]): Solid { if (solids.length > 0 && solids[0].isNegative) @@ -1024,6 +1364,10 @@ export class Solid { return new Solid(Solid.evaluator.evaluate(a.brush, b.brush, INTERSECTION), a._color); } + // ============================================================================ + // SECTION 10: Grid & Array Operations (Static) + // ============================================================================ + public static GRID_XYZ( solid: Solid, options: { @@ -1076,6 +1420,187 @@ export class Solid { }); } + /** + * Creates a circular array of solids arranged in a circle + * + * Elements are distributed evenly around a circle in the XZ plane (horizontal, around Y-axis). + * By default, elements rotate to face outward (radial orientation) like gear teeth. + * + * @param solid - The solid to duplicate in a circular pattern + * @param options - Configuration options + * @param options.count - Number of copies to create (must be >= 1) + * @param options.radius - Radius of the circular arrangement (must be > 0) + * @param options.startAngle - Starting angle in degrees (default: 0) + * @param options.endAngle - Ending angle in degrees (default: 360) + * @param options.rotateElements - Whether to rotate elements to face outward (default: true) + * + * @returns A single merged Solid containing all elements in the circular pattern + * + * @example + * // Gear teeth - 24 teeth facing outward + * const tooth = Solid.cube(2, 10, 3).move({ z: 15 }); + * const gear = Solid.ARRAY_CIRCULAR(tooth, { count: 24, radius: 15 }); + * + * @example + * // Bolt holes in a circle - 8 holes, no rotation needed + * const hole = Solid.cylinder(2, 10).setNegative(); + * const pattern = Solid.ARRAY_CIRCULAR(hole, { count: 8, radius: 20, rotateElements: false }); + * + * @example + * // Half circle of seats (0° to 180°) + * const seat = Solid.cube(2, 1, 2); + * const seating = Solid.ARRAY_CIRCULAR(seat, { count: 10, radius: 30, startAngle: 0, endAngle: 180 }); + */ + public static ARRAY_CIRCULAR( + solid: Solid, + options: { + count: number; + radius: number; + startAngle?: number; + endAngle?: number; + rotateElements?: boolean; + } + ): Solid { + // Validate inputs + if (!Number.isFinite(options.count) || options.count < 1) + throw new Error(`count must be at least 1 (got ${options.count})`); + if (!Number.isFinite(options.radius) || options.radius <= 0) + throw new Error(`radius must be positive (got ${options.radius})`); + + // Set defaults + const startAngle = options.startAngle ?? 0; + const endAngle = options.endAngle ?? 360; + const rotateElements = options.rotateElements ?? true; + + // Validate angles + if (!Number.isFinite(startAngle) || !Number.isFinite(endAngle)) + throw new Error(`angles must be finite (got start: ${startAngle}, end: ${endAngle})`); + + // Calculate angular spacing + const totalAngle = endAngle - startAngle; + const angleStep = totalAngle / options.count; + + // Build array of positioned solids + const solids: Solid[] = []; + + for (let index = 0; index < options.count; index++) { + // Calculate angle for this element (in degrees) + const angleDeg = startAngle + index * angleStep; + const angleRad = this.degreesToRadians(angleDeg); + + // Calculate position in XZ plane (horizontal circle around Y-axis) + const x = options.radius * Math.cos(angleRad); + const z = options.radius * Math.sin(angleRad); + + // Clone and transform the solid + const element = solid.clone(); + + // Get the element's current Y position (preserve vertical positioning) + const bounds = element.getBounds(); + const currentY = bounds.center.y; + + // Rotate element to face outward if requested + if (rotateElements) element.rotate({ y: angleDeg }); + + // Position the element (preserve Y, set X and Z for circular arrangement) + element.at(x, currentY, z); + + solids.push(element); + } + + // Merge all solids into one + return Solid.MERGE(solids); + } + + /** + * Mirrors a solid across a specified axis plane. + * + * Creates a reflected copy of the geometry across the plane perpendicular to the specified axis. + * The original solid is not modified - a new mirrored Solid is returned. + * + * **Mirroring behavior:** + * - 'X': Mirrors across YZ plane (flips X coordinates) + * - 'Y': Mirrors across XZ plane (flips Y coordinates) + * - 'Z': Mirrors across XY plane (flips Z coordinates) + * + * **Common use cases:** + * - Creating bilateral symmetry with UNION + * - Mirroring asymmetric parts + * - Creating full 3D symmetry by chaining multiple MIRROR calls + * + * @param solid - The solid to mirror + * @param axis - The axis perpendicular to the mirror plane ('X', 'Y', or 'Z') + * @returns A new Solid with mirrored geometry + * + * @example + * // Create a simple asymmetric shape and mirror it + * const shape = Solid.cube(10, 5, 3).move({ x: 5 }); + * const mirrored = Solid.MIRROR(shape, 'X'); + * + * @example + * // Create bilateral symmetry + * const half = Solid.cube(10, 20, 5).move({ x: 10 }); + * const symmetric = Solid.UNION(half, Solid.MIRROR(half, 'X')); + * + * @example + * // Create full 3D symmetry by chaining mirrors + * const quarter = Solid.cylinder(5, 10).move({ x: 10, z: 10 }); + * const halfX = Solid.UNION(quarter, Solid.MIRROR(quarter, 'X')); + * const full = Solid.UNION(halfX, Solid.MIRROR(halfX, 'Z')); + * + * @example + * // Mirror works with negative solids for composition + * const hole = Solid.cylinder(2, 20).move({ x: 5 }).setNegative(); + * const holes = Solid.MERGE([ + * Solid.cube(30, 30, 5), + * hole, + * Solid.MIRROR(hole, 'X') + * ]); + */ + public static MIRROR(solid: Solid, axis: 'X' | 'Y' | 'Z'): Solid { + // Validate axis + if (!['X', 'Y', 'Z'].includes(axis)) { + throw new Error(`axis must be 'X', 'Y', or 'Z' (got '${axis}')`); + } + + // Clone the solid to avoid modifying the original + const mirrored = solid.clone(); + + // Brush.clone() doesn't deep clone geometry, so we need to clone it manually + mirrored.brush.geometry = mirrored.brush.geometry.clone(); + + // Update matrix before baking to ensure it's current + mirrored.brush.updateMatrixWorld(); + + // Bake all transformations (position, rotation, scale) into geometry + mirrored.brush.geometry.applyMatrix4(mirrored.brush.matrix); + mirrored.brush.position.set(0, 0, 0); + mirrored.brush.rotation.set(0, 0, 0); + mirrored.brush.scale.set(1, 1, 1); + mirrored.brush.updateMatrixWorld(); + + // Apply negative scale to the specified axis to mirror the geometry + const scaleX = axis === 'X' ? -1 : 1; + const scaleY = axis === 'Y' ? -1 : 1; + const scaleZ = axis === 'Z' ? -1 : 1; + + // Create scale matrix and apply it to geometry + const scaleMatrix = new Matrix4().makeScale(scaleX, scaleY, scaleZ); + mirrored.brush.geometry.applyMatrix4(scaleMatrix); + + // Invalidate bounding box so it gets recalculated + // eslint-disable-next-line unicorn/no-null + mirrored.brush.geometry.boundingBox = null; + mirrored.brush.updateMatrixWorld(); + + // Return the mirrored solid + return mirrored; + } + + // ============================================================================ + // SECTION 11: Utility Methods + // ============================================================================ + // Geometry normalization private static emptyCube = new Solid(this.geometryToBrush(new BoxGeometry(0, 0, 0)), 'white'); public normalize(): Solid { diff --git a/src/lib/3d/path-factories.ts b/src/lib/3d/path-factories.ts new file mode 100644 index 0000000..9988fdf --- /dev/null +++ b/src/lib/3d/path-factories.ts @@ -0,0 +1,78 @@ +/** + * Path segment type definitions and factory functions for creating custom profiles. + * Used with `profilePrismFromPath()` and `revolutionSolidFromPath()`. + */ + +/** + * Represents a straight line segment in a path. + */ +export type StraightSegment = { + type: 'straight'; + length: number; +}; + +/** + * Represents a curved arc segment in a path. + * Positive angle = right turn, negative angle = left turn, zero radius = sharp corner. + */ +export type CurveSegment = { + type: 'curve'; + radius: number; + angle: number; // degrees, positive = right turn, negative = left turn +}; + +/** + * Union type for all path segment types. + */ +export type PathSegment = StraightSegment | CurveSegment; + +/** + * Creates a straight line segment for use in path-based geometry. + * + * @param length - Length of the straight segment + * @returns StraightSegment object + * + * @example + * import { straight, curve } from '$lib/3d/path-factories'; + * import { Solid } from '$lib/3d/Solid'; + * + * const shape = Solid.profilePrismFromPath(10, [ + * straight(20), + * curve(5, 90), + * straight(10) + * ]); + */ +export const straight = (length: number): StraightSegment => ({ + type: 'straight', + length +}); + +/** + * Creates a curved arc segment for use in path-based geometry. + * Positive angle produces a right turn, negative angle produces a left turn. + * Zero radius creates a sharp corner (no arc, just direction change). + * + * @param radius - Radius of the arc (0 for sharp corners) + * @param angle - Turn angle in degrees (positive = right, negative = left) + * @returns CurveSegment object + * + * @example + * import { straight, curve } from '$lib/3d/path-factories'; + * import { Solid } from '$lib/3d/Solid'; + * + * const roundedRect = Solid.profilePrismFromPath(10, [ + * straight(20), + * curve(5, 90), // Right turn with radius 5 + * straight(10), + * curve(5, 90), + * straight(20), + * curve(5, 90), + * straight(10), + * curve(5, 90) + * ]); + */ +export const curve = (radius: number, angle: number): CurveSegment => ({ + type: 'curve', + radius, + angle +}); diff --git a/tests/unit/lib/3d/Solid.grids.test.ts b/tests/unit/lib/3d/Solid.grids.test.ts index c8289e9..dc82ffe 100644 --- a/tests/unit/lib/3d/Solid.grids.test.ts +++ b/tests/unit/lib/3d/Solid.grids.test.ts @@ -159,7 +159,7 @@ describe('Solid - Grid Operations', () => { it('should create large 2D grid', () => { const cube = Solid.cube(2, 2, 2); - const grid = Solid.GRID_XY(cube, { cols: 5, rows: 5, spacing: 1 }); + const grid = Solid.GRID_XY(cube, { cols: 3, rows: 3, spacing: 1 }); expectValidVertexCount(grid); }); @@ -203,7 +203,7 @@ describe('Solid - Grid Operations', () => { it('should create checkerboard pattern', () => { const cube = Solid.cube(5, 5, 5); - const grid = Solid.GRID_XY(cube, { cols: 8, rows: 8, spacing: 0 }); + const grid = Solid.GRID_XY(cube, { cols: 4, rows: 4, spacing: 0 }); expectValidVertexCount(grid); }); @@ -323,41 +323,12 @@ describe('Solid - Grid Operations', () => { it('should create rubiks cube-like structure', () => { const cube = Solid.cube(3, 3, 3); - const grid = Solid.GRID_XYZ(cube, { cols: 3, rows: 3, levels: 3, spacing: 0.5 }); + const grid = Solid.GRID_XYZ(cube, { cols: 2, rows: 2, levels: 2, spacing: 0.5 }); expectValidVertexCount(grid); }); }); - describe('Grid with CSG Operations', () => { - it('should subtract from grid', () => { - const cube = Solid.cube(5, 5, 5); - const grid = Solid.GRID_XY(cube, { cols: 3, rows: 3, spacing: 1 }); - const hole = Solid.cylinder(20, 10).rotate({ x: 90 }); - - const result = Solid.SUBTRACT(grid, hole); - expectValidVertexCount(result); - }); - - it('should union grids', () => { - const cube = Solid.cube(5, 5, 5); - const grid1 = Solid.GRID_X(cube, { cols: 5, spacing: 2 }); - const grid2 = Solid.GRID_X(cube, { cols: 5, spacing: 2 }).rotate({ z: 90 }); - - const result = Solid.UNION(grid1, grid2); - expectValidVertexCount(result); - }); - - it('should create grid of CSG results', () => { - const base = Solid.cube(5, 5, 5); - const hole = Solid.cylinder(1, 10); - const unit = Solid.SUBTRACT(base, hole); - - const grid = Solid.GRID_XY(unit, { cols: 3, rows: 3, spacing: 1 }); - expectValidVertexCount(grid); - }); - }); - describe('Grid with Transformations', () => { it('should transform grid after creation', () => { const cube = Solid.cube(5, 5, 5); @@ -413,4 +384,257 @@ describe('Solid - Grid Operations', () => { expectValidVertexCount(grid); }); }); + + describe('MIRROR() - Reflection Operations', () => { + describe('Basic Mirroring', () => { + it('should mirror across X axis (YZ plane)', () => { + const cube = Solid.cube(10, 5, 3, { color: 'blue' }).move({ x: 5 }); + const mirrored = Solid.MIRROR(cube, 'X'); + + expectValidVertexCount(mirrored); + + // Mirrored cube should have same dimensions + const originalBounds = cube.getBounds(); + const mirroredBounds = mirrored.getBounds(); + expectCloseTo(originalBounds.width, mirroredBounds.width, 0.5); + expectCloseTo(originalBounds.height, mirroredBounds.height, 0.5); + expectCloseTo(originalBounds.depth, mirroredBounds.depth, 0.5); + + // Center X should be negated + expectCloseTo(mirroredBounds.center.x, -originalBounds.center.x, 0.5); + }); + + it('should mirror across Y axis (XZ plane)', () => { + const cube = Solid.cube(5, 10, 3, { color: 'red' }).move({ y: 5 }); + const mirrored = Solid.MIRROR(cube, 'Y'); + + expectValidVertexCount(mirrored); + + const originalBounds = cube.getBounds(); + const mirroredBounds = mirrored.getBounds(); + expectCloseTo(originalBounds.width, mirroredBounds.width, 0.5); + expectCloseTo(originalBounds.height, mirroredBounds.height, 0.5); + expectCloseTo(originalBounds.depth, mirroredBounds.depth, 0.5); + + // Center Y should be negated + expectCloseTo(mirroredBounds.center.y, -originalBounds.center.y, 0.5); + }); + + it('should mirror across Z axis (XY plane)', () => { + const cube = Solid.cube(5, 3, 10, { color: 'green' }).move({ z: 5 }); + const mirrored = Solid.MIRROR(cube, 'Z'); + + expectValidVertexCount(mirrored); + + const originalBounds = cube.getBounds(); + const mirroredBounds = mirrored.getBounds(); + expectCloseTo(originalBounds.width, mirroredBounds.width, 0.5); + expectCloseTo(originalBounds.height, mirroredBounds.height, 0.5); + expectCloseTo(originalBounds.depth, mirroredBounds.depth, 0.5); + + // Center Z should be negated + expectCloseTo(mirroredBounds.center.z, -originalBounds.center.z, 0.5); + }); + }); + + describe('Symmetry Composition', () => { + it('should create bilateral symmetry with UNION', () => { + const half = Solid.cube(10, 20, 5, { color: 'blue' }).move({ x: 10 }); + const symmetric = Solid.UNION(half, Solid.MIRROR(half, 'X')); + + expectValidVertexCount(symmetric); + + // Symmetric object should be centered around origin + const bounds = symmetric.getBounds(); + expectCloseTo(bounds.center.x, 0, 1); + }); + + it('should create full 3D symmetry by chaining mirrors', () => { + const quarter = Solid.cube(5, 5, 5, { color: 'red' }).move({ x: 10, z: 10 }); + const halfX = Solid.UNION(quarter, Solid.MIRROR(quarter, 'X')); + const full = Solid.UNION(halfX, Solid.MIRROR(halfX, 'Z')); + + expectValidVertexCount(full); + + // Full symmetric object should be centered + const bounds = full.getBounds(); + expectCloseTo(bounds.center.x, 0, 1); + expectCloseTo(bounds.center.z, 0, 1); + }); + + it('should create octant symmetry (mirror all 3 axes)', () => { + const octant = Solid.cube(5, 5, 5, { color: 'purple' }).move({ x: 10, y: 10, z: 10 }); + const mirrorX = Solid.UNION(octant, Solid.MIRROR(octant, 'X')); + const mirrorY = Solid.UNION(mirrorX, Solid.MIRROR(mirrorX, 'Y')); + const mirrorZ = Solid.UNION(mirrorY, Solid.MIRROR(mirrorY, 'Z')); + + expectValidVertexCount(mirrorZ); + + const bounds = mirrorZ.getBounds(); + expectCloseTo(bounds.center.x, 0, 1); + expectCloseTo(bounds.center.y, 0, 1); + expectCloseTo(bounds.center.z, 0, 1); + }); + }); + + describe('Different Primitives', () => { + it('should mirror cylinders', () => { + const cylinder = Solid.cylinder(5, 10, { color: 'blue' }).move({ x: 10 }); + const mirrored = Solid.MIRROR(cylinder, 'X'); + + expectValidVertexCount(mirrored); + }); + + it('should mirror spheres', () => { + const sphere = Solid.sphere(5, { color: 'red' }).move({ y: 10 }); + const mirrored = Solid.MIRROR(sphere, 'Y'); + + expectValidVertexCount(mirrored); + }); + + it('should mirror cones', () => { + const cone = Solid.cone(5, 10, { color: 'green' }).move({ z: 10 }); + const mirrored = Solid.MIRROR(cone, 'Z'); + + expectValidVertexCount(mirrored); + }); + + it('should mirror complex CSG shapes', () => { + const base = Solid.cube(10, 10, 5, { color: 'gray' }); + const hole = Solid.cylinder(2, 10, { color: 'gray' }); + const shape = Solid.SUBTRACT(base, hole).move({ x: 15 }); + + const mirrored = Solid.MIRROR(shape, 'X'); + + expectValidVertexCount(mirrored); + }); + }); + + describe('Negative Solids', () => { + it('should mirror negative solids', () => { + const hole = Solid.cylinder(2, 20, { color: 'blue' }).move({ x: 5 }).setNegative(); + const mirrored = Solid.MIRROR(hole, 'X'); + + expectValidVertexCount(mirrored); + expect(mirrored._isNegative).toBe(true); + }); + + it('should work with negative solids in MERGE', () => { + const base = Solid.cube(30, 30, 5, { color: 'gray' }); + const hole = Solid.cylinder(2, 10, { color: 'gray' }).move({ x: 5 }).setNegative(); + const result = Solid.MERGE([base, hole, Solid.MIRROR(hole, 'X')]); + + expectValidVertexCount(result); + }); + }); + + describe('Transformed Solids', () => { + it('should mirror rotated solids', () => { + const shape = Solid.cube(10, 5, 3, { color: 'blue' }).rotate({ z: 45 }).move({ x: 10 }); + const mirrored = Solid.MIRROR(shape, 'X'); + + expectValidVertexCount(mirrored); + }); + + it('should mirror scaled solids', () => { + const shape = Solid.cube(10, 5, 3, { color: 'red' }) + .scale({ x: 2, y: 0.5 }) + .move({ y: 10 }); + const mirrored = Solid.MIRROR(shape, 'Y'); + + expectValidVertexCount(mirrored); + }); + + it('should mirror complex transformed solids', () => { + const shape = Solid.cylinder(5, 10, { color: 'green' }) + .rotate({ x: 45 }) + .scale({ all: 1.5 }) + .move({ x: 5, y: 5, z: 5 }); + const mirrored = Solid.MIRROR(shape, 'X'); + + expectValidVertexCount(mirrored); + }); + }); + + describe('Immutability', () => { + it('should not mutate original solid', () => { + const cube = Solid.cube(10, 10, 10, { color: 'blue' }).move({ x: 5 }); + const originalVertices = cube.getVertices().length; + const originalBounds = cube.getBounds(); + + Solid.MIRROR(cube, 'X'); + + expect(cube.getVertices().length).toBe(originalVertices); + expectCloseTo(cube.getBounds().center.x, originalBounds.center.x, 0.1); + }); + + it('should be chainable', () => { + const cube = Solid.cube(10, 10, 10, { color: 'blue' }).move({ x: 5 }); + const mirrored = Solid.MIRROR(cube, 'X').rotate({ y: 45 }).scale({ all: 2 }); + + expectValidVertexCount(mirrored); + }); + }); + + describe('Error Handling', () => { + it('should throw error for invalid axis', () => { + const cube = Solid.cube(10, 10, 10, { color: 'blue' }); + + expect(() => { + // @ts-expect-error - Testing invalid axis + Solid.MIRROR(cube, 'W'); + }).toThrow("axis must be 'X', 'Y', or 'Z'"); + }); + + it('should throw error for lowercase axis', () => { + const cube = Solid.cube(10, 10, 10, { color: 'blue' }); + + expect(() => { + // @ts-expect-error - Testing lowercase axis + Solid.MIRROR(cube, 'x'); + }).toThrow("axis must be 'X', 'Y', or 'Z'"); + }); + }); + + describe('Edge Cases', () => { + it('should mirror centered solid', () => { + const cube = Solid.cube(10, 10, 10, { color: 'blue' }).center(); + const mirrored = Solid.MIRROR(cube, 'X'); + + expectValidVertexCount(mirrored); + + // Centered solid mirrored should remain in same position + const bounds = mirrored.getBounds(); + expectCloseTo(bounds.center.x, 0, 0.5); + }); + + it('should mirror aligned solid', () => { + const cube = Solid.cube(10, 10, 10, { color: 'red' }).align('bottom'); + const mirrored = Solid.MIRROR(cube, 'Y'); + + expectValidVertexCount(mirrored); + }); + + it('should mirror very small solid', () => { + const tiny = Solid.cube(0.5, 0.5, 0.5, { color: 'green' }).move({ x: 1 }); + const mirrored = Solid.MIRROR(tiny, 'X'); + + expectValidVertexCount(mirrored); + }); + + it('should mirror very large solid', () => { + const large = Solid.cube(100, 100, 100, { color: 'blue' }).move({ z: 50 }); + const mirrored = Solid.MIRROR(large, 'Z'); + + expectValidVertexCount(mirrored); + }); + + it('should mirror partial cylinder', () => { + const partial = Solid.cylinder(10, 5, { color: 'orange', angle: 180 }).move({ x: 10 }); + const mirrored = Solid.MIRROR(partial, 'X'); + + expectValidVertexCount(mirrored); + }); + }); + }); }); diff --git a/tests/unit/lib/3d/Solid.validation.test.ts b/tests/unit/lib/3d/Solid.validation.test.ts new file mode 100644 index 0000000..41408c0 --- /dev/null +++ b/tests/unit/lib/3d/Solid.validation.test.ts @@ -0,0 +1,380 @@ +import { describe, expect, it } from 'vitest'; + +import { Solid } from '$lib/3d/Solid'; + +describe('Solid - Validation', () => { + describe('Primitive Validation - cube()', () => { + it('should reject zero dimensions', () => { + expect(() => Solid.cube(0, 10, 10)).toThrow('must be positive'); + expect(() => Solid.cube(10, 0, 10)).toThrow('must be positive'); + expect(() => Solid.cube(10, 10, 0)).toThrow('must be positive'); + }); + + it('should reject negative dimensions', () => { + expect(() => Solid.cube(-5, 10, 10)).toThrow('must be positive'); + expect(() => Solid.cube(10, -5, 10)).toThrow('must be positive'); + expect(() => Solid.cube(10, 10, -5)).toThrow('must be positive'); + }); + + it('should reject NaN dimensions', () => { + expect(() => Solid.cube(Number.NaN, 10, 10)).toThrow('must be finite'); + expect(() => Solid.cube(10, Number.NaN, 10)).toThrow('must be finite'); + expect(() => Solid.cube(10, 10, Number.NaN)).toThrow('must be finite'); + }); + + it('should reject Infinity dimensions', () => { + expect(() => Solid.cube(Infinity, 10, 10)).toThrow('must be finite'); + expect(() => Solid.cube(10, Infinity, 10)).toThrow('must be finite'); + expect(() => Solid.cube(10, 10, Infinity)).toThrow('must be finite'); + expect(() => Solid.cube(-Infinity, 10, 10)).toThrow('must be finite'); + }); + }); + + describe('Primitive Validation - cylinder()', () => { + it('should reject zero dimensions', () => { + expect(() => Solid.cylinder(0, 10)).toThrow('must be positive'); + expect(() => Solid.cylinder(10, 0)).toThrow('must be positive'); + }); + + it('should reject negative dimensions', () => { + expect(() => Solid.cylinder(-5, 10)).toThrow('must be positive'); + expect(() => Solid.cylinder(10, -5)).toThrow('must be positive'); + }); + + it('should reject NaN dimensions', () => { + expect(() => Solid.cylinder(Number.NaN, 10)).toThrow('must be finite'); + expect(() => Solid.cylinder(10, Number.NaN)).toThrow('must be finite'); + }); + + it('should reject Infinity dimensions', () => { + expect(() => Solid.cylinder(Infinity, 10)).toThrow('must be finite'); + expect(() => Solid.cylinder(10, Infinity)).toThrow('must be finite'); + }); + + it('should reject negative topRadius', () => { + expect(() => Solid.cylinder(10, 10, { topRadius: -5 })).toThrow( + 'topRadius must be non-negative' + ); + }); + + it('should reject NaN topRadius', () => { + expect(() => Solid.cylinder(10, 10, { topRadius: Number.NaN })).toThrow( + 'topRadius must be finite' + ); + }); + + it('should reject Infinity topRadius', () => { + expect(() => Solid.cylinder(10, 10, { topRadius: Infinity })).toThrow( + 'topRadius must be finite' + ); + }); + }); + + describe('Primitive Validation - sphere()', () => { + it('should reject zero radius', () => { + expect(() => Solid.sphere(0)).toThrow('must be positive'); + }); + + it('should reject negative radius', () => { + expect(() => Solid.sphere(-5)).toThrow('must be positive'); + }); + + it('should reject NaN radius', () => { + expect(() => Solid.sphere(Number.NaN)).toThrow('must be finite'); + }); + + it('should reject Infinity radius', () => { + expect(() => Solid.sphere(Infinity)).toThrow('must be finite'); + expect(() => Solid.sphere(-Infinity)).toThrow('must be finite'); + }); + }); + + describe('Primitive Validation - cone()', () => { + it('should reject zero dimensions', () => { + expect(() => Solid.cone(0, 10)).toThrow('must be positive'); + expect(() => Solid.cone(10, 0)).toThrow('must be positive'); + }); + + it('should reject negative dimensions', () => { + expect(() => Solid.cone(-5, 10)).toThrow('must be positive'); + expect(() => Solid.cone(10, -5)).toThrow('must be positive'); + }); + + it('should reject NaN dimensions', () => { + expect(() => Solid.cone(Number.NaN, 10)).toThrow('must be finite'); + expect(() => Solid.cone(10, Number.NaN)).toThrow('must be finite'); + }); + + it('should reject Infinity dimensions', () => { + expect(() => Solid.cone(Infinity, 10)).toThrow('must be finite'); + expect(() => Solid.cone(10, Infinity)).toThrow('must be finite'); + }); + }); + + describe('Primitive Validation - prism()', () => { + it('should reject less than 3 sides', () => { + expect(() => Solid.prism(2, 5, 10)).toThrow('must have at least 3 sides'); + expect(() => Solid.prism(1, 5, 10)).toThrow('must have at least 3 sides'); + expect(() => Solid.prism(0, 5, 10)).toThrow('must have at least 3 sides'); + }); + + it('should reject non-integer sides', () => { + expect(() => Solid.prism(3.5, 5, 10)).toThrow('sides must be an integer'); + expect(() => Solid.prism(5.1, 5, 10)).toThrow('sides must be an integer'); + }); + + it('should reject zero dimensions', () => { + expect(() => Solid.prism(6, 0, 10)).toThrow('must be positive'); + expect(() => Solid.prism(6, 10, 0)).toThrow('must be positive'); + }); + + it('should reject negative dimensions', () => { + expect(() => Solid.prism(6, -5, 10)).toThrow('must be positive'); + expect(() => Solid.prism(6, 10, -5)).toThrow('must be positive'); + }); + + it('should reject NaN dimensions', () => { + expect(() => Solid.prism(6, Number.NaN, 10)).toThrow('must be finite'); + expect(() => Solid.prism(6, 10, Number.NaN)).toThrow('must be finite'); + }); + + it('should reject Infinity dimensions', () => { + expect(() => Solid.prism(6, Infinity, 10)).toThrow('must be finite'); + expect(() => Solid.prism(6, 10, Infinity)).toThrow('must be finite'); + }); + + it('should reject negative topRadius', () => { + expect(() => Solid.prism(6, 10, 10, { topRadius: -5 })).toThrow( + 'topRadius must be non-negative' + ); + }); + + it('should reject NaN topRadius', () => { + expect(() => Solid.prism(6, 10, 10, { topRadius: Number.NaN })).toThrow( + 'topRadius must be finite' + ); + }); + + it('should reject Infinity topRadius', () => { + expect(() => Solid.prism(6, 10, 10, { topRadius: Infinity })).toThrow( + 'topRadius must be finite' + ); + }); + }); + + describe('Transform Validation - scale()', () => { + it('should reject NaN in scale.all', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ all: Number.NaN })).toThrow("Scale factor 'all' must be finite"); + }); + + it('should reject Infinity in scale.all', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ all: Infinity })).toThrow("Scale factor 'all' must be finite"); + expect(() => cube.scale({ all: -Infinity })).toThrow("Scale factor 'all' must be finite"); + }); + + it('should reject zero in scale.all', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ all: 0 })).toThrow( + "Scale factor 'all' cannot be zero (creates degenerate geometry)" + ); + }); + + it('should reject NaN in scale.x', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ x: Number.NaN })).toThrow("Scale factor 'x' must be finite"); + }); + + it('should reject NaN in scale.y', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ y: Number.NaN })).toThrow("Scale factor 'y' must be finite"); + }); + + it('should reject NaN in scale.z', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ z: Number.NaN })).toThrow("Scale factor 'z' must be finite"); + }); + + it('should reject zero in scale.x', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ x: 0 })).toThrow( + "Scale factor 'x' cannot be zero (creates degenerate geometry)" + ); + }); + + it('should reject zero in scale.y', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ y: 0 })).toThrow( + "Scale factor 'y' cannot be zero (creates degenerate geometry)" + ); + }); + + it('should reject zero in scale.z', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ z: 0 })).toThrow( + "Scale factor 'z' cannot be zero (creates degenerate geometry)" + ); + }); + + it('should reject Infinity in individual scale factors', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ x: Infinity })).toThrow("Scale factor 'x' must be finite"); + expect(() => cube.scale({ y: Infinity })).toThrow("Scale factor 'y' must be finite"); + expect(() => cube.scale({ z: Infinity })).toThrow("Scale factor 'z' must be finite"); + }); + + it('should allow negative scale factors (mirroring)', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ all: -1 })).not.toThrow(); + expect(() => cube.scale({ x: -2 })).not.toThrow(); + }); + }); + + describe('Transform Validation - rotate()', () => { + it('should reject NaN in rotate.x', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.rotate({ x: Number.NaN })).toThrow("Rotation angle 'x' must be finite"); + }); + + it('should reject NaN in rotate.y', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.rotate({ y: Number.NaN })).toThrow("Rotation angle 'y' must be finite"); + }); + + it('should reject NaN in rotate.z', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.rotate({ z: Number.NaN })).toThrow("Rotation angle 'z' must be finite"); + }); + + it('should reject Infinity in rotate.x', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.rotate({ x: Infinity })).toThrow("Rotation angle 'x' must be finite"); + expect(() => cube.rotate({ x: -Infinity })).toThrow("Rotation angle 'x' must be finite"); + }); + + it('should reject Infinity in rotate.y', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.rotate({ y: Infinity })).toThrow("Rotation angle 'y' must be finite"); + }); + + it('should reject Infinity in rotate.z', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.rotate({ z: Infinity })).toThrow("Rotation angle 'z' must be finite"); + }); + + it('should allow zero rotation', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.rotate({ x: 0 })).not.toThrow(); + }); + + it('should allow negative rotation', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.rotate({ x: -90 })).not.toThrow(); + }); + }); + + describe('Transform Validation - move()', () => { + it('should sanitize NaN to 0 in move.x', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.move({ x: Number.NaN })).not.toThrow(); + // NaN is treated as 0, so position should stay at 0 + expect(cube.getBounds().center.x).toBe(0); + }); + + it('should sanitize NaN to 0 in move.y', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.move({ y: Number.NaN })).not.toThrow(); + expect(cube.getBounds().center.y).toBe(0); + }); + + it('should sanitize NaN to 0 in move.z', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.move({ z: Number.NaN })).not.toThrow(); + expect(cube.getBounds().center.z).toBe(0); + }); + + it('should sanitize Infinity to 0 in move.x', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.move({ x: Infinity })).not.toThrow(); + expect(() => cube.move({ x: -Infinity })).not.toThrow(); + }); + + it('should sanitize Infinity to 0 in move.y', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.move({ y: Infinity })).not.toThrow(); + }); + + it('should sanitize Infinity to 0 in move.z', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.move({ z: Infinity })).not.toThrow(); + }); + + it('should allow zero movement', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.move({ x: 0 })).not.toThrow(); + }); + + it('should allow negative movement', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.move({ x: -10 })).not.toThrow(); + }); + }); + + describe('Transform Validation - at()', () => { + it('should reject NaN in x coordinate', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.at(Number.NaN, 0, 0)).toThrow('Position coordinates must be finite'); + }); + + it('should reject NaN in y coordinate', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.at(0, Number.NaN, 0)).toThrow('Position coordinates must be finite'); + }); + + it('should reject NaN in z coordinate', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.at(0, 0, Number.NaN)).toThrow('Position coordinates must be finite'); + }); + + it('should reject Infinity in any coordinate', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.at(Infinity, 0, 0)).toThrow('Position coordinates must be finite'); + expect(() => cube.at(0, Infinity, 0)).toThrow('Position coordinates must be finite'); + expect(() => cube.at(0, 0, Infinity)).toThrow('Position coordinates must be finite'); + expect(() => cube.at(-Infinity, 0, 0)).toThrow('Position coordinates must be finite'); + }); + + it('should allow zero coordinates', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.at(0, 0, 0)).not.toThrow(); + }); + + it('should allow negative coordinates', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.at(-10, -20, -30)).not.toThrow(); + }); + }); + + describe('Edge Cases', () => { + it('should handle very small but valid dimensions', () => { + expect(() => Solid.cube(0.001, 0.001, 0.001)).not.toThrow(); + expect(() => Solid.sphere(0.001)).not.toThrow(); + }); + + it('should handle very large but valid dimensions', () => { + expect(() => Solid.cube(1_000_000, 1_000_000, 1_000_000)).not.toThrow(); + expect(() => Solid.sphere(1_000_000)).not.toThrow(); + }); + + it('should handle very small but valid scale factors', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ all: 0.001 })).not.toThrow(); + }); + + it('should handle very large but valid scale factors', () => { + const cube = Solid.cube(10, 10, 10); + expect(() => cube.scale({ all: 1000 })).not.toThrow(); + }); + }); +});