diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 0000000..6fa991d --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,8 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "typescript", "oxc"], + "rules": { + "react/rules-of-hooks": "error", + "react/only-export-components": ["warn", { "allowConstantExport": true }] + } +} diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index e169c5a..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,140 +0,0 @@ -# Furniture Optimizer (hackathon project) - -A web tool for venues (events, banquets, conferences) to lay out furniture in a room and, eventually, auto-optimize the layout. - -## Current scope: Phases 1-5 (UI, scoring, optimizer) - -Layout and editing UI. No optimizer yet. - -**Layout (Phase 1)** -- Left sidebar (palette): one tile per furniture type (built-in chair, table, screen + any custom) and a dashed "Custom" tile. Resizable by dragging its right edge (default 264px, min 152, max 600); tiles live in an auto-fill grid and stretch in width only (84px tall). The sidebar scrolls vertically. -- Room in the center (fixed 10m x 8m), scaled to fill the space (`pxPerM` from `fitScale`, recomputed by a ResizeObserver in `App.tsx`), with a "1 m" scale bar. No grid, NO snapping: items land exactly where dropped. -- Drag a tile into the room to create an item (tile stays). Click (<5px movement) a tile to open its type menu (takes over the sidebar; Escape / Back closes): "Available" wheel (min = placed) and, if the type has seats, a seats wheel. Badge = available - placed; at 0 the tile greys out and can't be dragged. -- Items are free-placed, clamped to the room, no overlap (touching is fine). Red outline while the position is invalid, green when valid; invalid drop snaps back (or cancels a new add). -- Wheels (`components/Wheel.tsx`) are iOS-timer style: 1:1 drag, momentum fling, press to stop, spring settle, mouse wheel/trackpad, tap a row, arrow keys, and hover + type a number (Enter, leaving, or 1.5 s idle commits; Escape cancels). Props: `step`, `wrap`, `rows`, `disabled`, `format`. If the parent rejects a change the wheel glides back to the real value. - -**Editing (Phase 2)** -- Click an item to select it (blue outline); click empty floor to deselect (Escape/Done too). Dragging still moves. Selecting opens the item panel in the sidebar (replaces tiles / type menu). -- Item panel (chairs have no rotation controls; every other type does): a circular angle dial (`AngleDial`: drag the knob around the ring, Shift snaps to 15°, arrows/scroll nudge 1°, hover + type an angle); Lock/Unlock; Delete (also Delete/Backspace key, ignored while typing in an input); "Seats at this table" wheel for tables (per-item override, "Reset to default" link when overridden); Size wheels (0.3-6 m, 0.1 steps; screens show only Length). -- Rotation turns around the item's center and collision/wall clamping use the rotated bounding box (`boundsOf`). A rotate/size change is pushed back inside the walls, then rejected if it would overlap (`tryUpdate`). -- Locked items can't be dragged or rotated and show a padlock. (Size, seats and delete are still allowed on locked items.) -- Delete frees inventory automatically (remaining is derived from `items`). -- Screens: while selected, unlocked and unrotated, left/right end handles change their length (`resizeLength`, min 0.5 m). Thickness is only changed by size wheels, never handles (top-down view). -- Custom furniture: "Custom" tile opens a form (name, Seating/Table, width, length, seats, available). Saving adds a config + palette tile. Custom seating draws as a chair, custom tables as a table. - -**Room features (Phase 3)** -- A Layout / Room toggle sits at the top of the sidebar. Switching closes menus and deselects. In Room mode furniture is visible but can't be moved or selected. -- Room panel: width and length wheels (3-60 m, step 0.1; the room grows/shrinks from its top-left). It can't shrink past the bounding box of placed furniture, obstacles and wall items (`minRoomSize`; anything else that would clash is rejected via `tryResizeRoom` and the wheel glides back). Add door / Add screen (max 2) / Add obstacle, Export room, Import room. -- Walls are drawn inside the canvas (`WALL_PX`); a door is a gap in the wall plus a quarter-circle swing arc. Doors and wall screens slide along their own wall only (no corner-hopping to adjacent walls). Door panel: width 0.7-4 m, "Loading door" toggle, delete (the last door can't be deleted). Wall-screen panel: width 1-12 m, delete. Obstacles (default 0.6 x 0.6 m, 0.2-10 m) drag anywhere; width/length wheels, delete. Delete/Backspace also deletes the selected room element. -- Keep-clear zones: the door swing square and the 0.6 m strip inside the opening, the 0.3 m strip under a wall screen, and obstacles. `getBlockedRects(room)` returns them all and `isValidPlacement` reads it, so furniture can't overlap them (red outline, drop blocked). Doors/screens can't sit on furniture or obstacles or share wall length; obstacles can't overlap furniture, each other, or door/screen zones. -- Export downloads `room.json` (width, height, doors, screens, obstacles; no furniture). Import validates with `parseRoom` (`roomSchema.ts`) and shows a clear error; if furniture is placed it asks for confirmation first, and if the placed furniture doesn't fit the imported room it clears all furniture and warns. - -**Rules and scoring (Phase 4)** - measures the layout. -- All scoring is pure TS in `src/scoring/` (no React/Konva): `scoreLayout(room, items, configs, rules, weights, {debug})` returns the five sub-scores (0..1 or `null` = n/a), the 0-100 overall (`overallScore`, weighted average of the non-null scores by the 0-10 priority weights), issues (text + item ids), rule violations and optional overlay data. Roughly 12 ms for a 10x8 room, 85 ms for 60x60 with 120 items. -- `seats.ts` `getSeatPoints`: N points evenly around a table's perimeter (seatsOverride, else type default); standalone seating = its center, or `seats` points along its long side; a single chair within 0.8 m of a table edge is that table's seat and isn't counted again. -- `occupancy.ts`: internal 0.1 m grid (never drawn, nothing snaps to it) from `getBlockedRects` + the true rotated furniture, with a chamfer clearance transform and a Dial's-algorithm `reachFrom`. Cached per variant and rebuilt only when the room or items arrays change. Door keep-clear zones are walkable for pathfinding. -- loadingScore: paths from loading doors (any door if none is marked) through >= 0.9 m clear width; 0.6 * fraction of items reachable + 0.4 * (1 - normalized avg path length). screenScore: per seat, angle off the screen normal (ideal <= 45 deg), distance (ideal 1.5-6x screen width), obstacles block line of sight (furniture doesn't); null with no screen. accessScore: per table, fraction of perimeter with 0.6 m free clearance reachable from a door; null with no tables. comfortScore: seat spacing (0.9 m), door distance (1.5 m), not flush to obstacles, blended with crowding (> 0.9 seats/m2). -- Rules mode (third tab): list editor for keepApart, keepNear, screenDistance, doorDistance, againstWall, each with a priority (Required, High 3, Medium 2, Low 1). `evaluateRules` returns violations (rule id, item ids, meters off); `rulesScore = 1 - weighted violated fraction` over non-required rules. Required violations outline items in orange and are listed in the score panel but never block dragging. -- Score panel (top of the sidebar in Layout mode, collapsible): overall number, five labeled bars with priority wheels, required violations, top issues (click to highlight items), and overlay toggles (loading paths, sight lines, table clearance; off by default). Weights and rules live in the store. During a drag the score recomputes at most ~10x/s. -- Tests: `npm test` (vitest) covers seat points, empty room, reachable vs walled-off table, blocked line of sight, comfort, rules and the weighted overall. - -**Optimizer (Phase 5)** -- Simulated annealing in a Web Worker (`src/optimizer/worker.ts`); pure core in `anneal.ts` (no React/Konva). State = x, y, rotation of every unlocked item; locked items never move or rotate. Objective = the weighted overall score. Moves: nudge (shrinking with temperature), relocate, rotate 90 (rotatable types only), swap two items of one type, shift a table with the chairs within 0.8 m. Hard constraints (`constraints.ts`): inside the room, no overlap with furniture, none with `getBlockedRects`, no Required-rule violations. If the start breaks Required rules, a repair phase (up to 20% of the budget) minimizes the violation count first and the result reports what remains. Geometric cooling with 3 restarts from the best state; seeded RNG (`rng.ts`, mulberry32) so the same seed + iteration budget gives the same result. -- Speed: search scores at a 0.2 m occupancy grid (`ScoreOpts.res`), the final before/after at 0.1 m. About 5,000 steps/s on a 10x8 room (idle machine); no incremental rescoring, every step rescoring everything. -- Auto-fill (`autofill.ts`): with "Seats needed" > 0, tables (most seats first) then loose chairs are placed from remaining inventory at random valid spots until seats >= needed; if inventory/space runs out it says so. "Only place remaining inventory" makes only those new items movable. -- Optimize tab: duration 5-60 s (default 15), seats needed, seed (blank = random), Optimize / Cancel (terminates the worker and discards). While running: progress bar, best score, steps; the canvas shows the best layout (posted every ~300 ms), not draggable. On finish: before/after for the overall and the five sub-scores, locked-items-skipped count, auto-fill message, unresolved Required violations, Apply / Revert. Leaving the tab cancels or drops a pending result. -- Undo/redo: snapshot history (`past[]`, `future[]` of items + room) in the store; Apply is one undo step. Add/move/update/remove/room changes are undoable too (rapid repeats on the same item coalesce for 700 ms). Cmd/Ctrl+Z, Shift+Cmd/Ctrl+Z (or Ctrl+Y), and Undo/Redo buttons in the Optimize tab. - -Out of scope: phone scanning, templates, export to image, non-rectangular rooms, neural networks, incremental rescoring, floor plan image import, phone scanning, placement rules, scoring, optimization. Do not design in a way that blocks the roadmap below. - -## Tech stack - -- React + TypeScript, Vite -- react-konva (Konva) for the canvas -- State: single top-level store (useState/useReducer). Keep it centralized so an optimizer can read and write it later. - -## Data model - -```ts -type FurnitureType = string; // config id: "chair" | "table" | "screen" | "custom-1" ... -type Shape = "chair" | "table" | "screen"; // how a type is drawn - -interface FurnitureItem { - id: string; - type: FurnitureType; // config id - x: number; // meters, top-left of the UNROTATED rect, room coordinates - y: number; - width: number; // meters - height: number; - rotation: number; // degrees, around the rect's center - locked: boolean; - seatsOverride?: number; // tables: overrides config.seatsPerUnit -} - -type Wall = "top" | "bottom" | "left" | "right"; -// offset = meters from the wall's start (top/bottom start at the left, left/right at the top) to the near edge -interface Door { id: string; wall: Wall; offset: number; width: number; isLoading: boolean; } -interface RoomScreen { id: string; wall: Wall; offset: number; width: number; } // spec calls it "Screen"; renamed to avoid clashing with the screen furniture type / DOM Screen -interface Obstacle { id: string; x: number; y: number; width: number; height: number; } -interface Room { width: number; height: number; doors: Door[]; screens: RoomScreen[]; obstacles: Obstacle[]; } // meters - -interface FurnitureTypeConfig { - id: FurnitureType; name: string; shape: Shape; - defaultWidth: number; defaultHeight: number; // meters - isTable: boolean; - rotatable: boolean; // chairs: false (no rotation controls) - available: number; // inventory count - seatsPerUnit?: number; // type-level seats -} -// remaining = available - items.filter(i => i.type === type).length (derived, never stored) -// seats for an item = item.seatsOverride ?? config.seatsPerUnit (effectiveSeats) -``` - -Rules/weights: `type Priority = "required"|"high"|"medium"|"low"`; `Rule { id; kind: keepApart|keepNear|screenDistance|doorDistance|againstWall; priority; typeA; typeB?; min?; max? }`; `ScoreWeights { loading, screen, access, comfort, rules }` (0-10, default 5). - -Store (`store.ts`; `setRoom` replaces the room, optionally clearing furniture): `{ room, items, configs: Record, typeOrder: id[], rules, weights }`. Defaults live in the configs (chair 0.5x0.5, table 1.8x0.8 w/ 8 seats, screen 2x0.2). Chairs and table seats are independent. - -## Conventions - -- Store everything in meters. Convert to pixels only at render time using the dynamic `pxPerM` scale (`fitScale` in `geometry.ts`). -- Collision = axis-aligned bounding boxes of the rotated rect (`boundsOf`). Keep collision and clamping logic in pure functions (no React or Konva imports) so the optimizer can reuse them. -- Keep geometry/rules logic separate from rendering components. -- Small, typed, readable code. No new dependencies without a good reason. -- Keep the UI minimal: light grey app background, room centered in the remaining space. - -## File layout - -- `src/types.ts`; `src/geometry.ts` (pure: `boundsOf`, `clampToRoom`, `overlaps`, `isValidPlacement`, `tryUpdate`, `resizeLength`, `fitScale`, plus room rules: `getBlockedRects`, `isValidWallItem`, `isValidObstacle`, `isLayoutValid`, `minRoomSize`, `tryResizeRoom`, `findWallSpot`, `findObstacleSpot`); `src/roomSchema.ts` (pure: `parseRoom`, `exportRoom`); `src/inventory.ts` (pure: `placedCount`, `remaining`, `effectiveSeats`); `src/store.ts` (reducer + built-in configs). -- `src/optimizer/`: `anneal.ts`, `autofill.ts`, `constraints.ts`, `rng.ts`, `worker.ts`, `messages.ts`, `useOptimizer.ts` (React hook that drives the worker), `anneal.test.ts`. -- `src/scoring/`: `index.ts` (`scoreLayout`, `overallScore`), `seats.ts`, `occupancy.ts`, `loading.ts`, `screen.ts`, `access.ts`, `comfort.ts`, `rules.ts`, `geom.ts`, `types.ts`, `scoring.test.ts`. -- `src/App.tsx`: owns the store, selection, sidebar mode, palette drag, room scale, Delete key. -- `src/components/`: `Palette`, `TypeMenu`, `ItemPanel`, `CustomForm`, `ModeToggle`, `RoomPanels`, `ScorePanel`, `RulesPanel`, `OptimizePanel`, `Wheel`, `Room` (Konva), `FurnitureShape`, `Icons`, `ScaleBar`, `panelStyles`. - -## Roadmap (not built yet, don't block) - -Venue-focused features planned for later phases: - -- Furniture inventory: set X amount of each furniture type -- Semi-custom furniture: couches, chairs, tables of any size and seating count -- Room import -- Furniture placement rules -- Locking furniture in place -- Custom seating limits (per table or global) -- Optimizers for: room loading/unloading flow, screen visibility, max comfort, max table access -- Optimization approach idea: user-set rule priorities, possibly a neural net with weights and biases to score "optimal placements" (undecided; start with hard constraints like no overlap, then weighted scoring) -- Input ideas: phone scanning of a room, manual entry - -## Commands - -``` -npm install -npm run dev # start dev server -npm run build # production build -npx tsc --noEmit # type check -``` - -## Working agreement - -- Ask before expanding scope past Phase 5. Commit and push after each finished change (a teammate works in the same repo): fetch first, rebase if needed. Don't commit `dist/` or `node_modules/` changes. -- After changes, make sure the app builds and type checks. -- Hackathon pace: prefer simple and working over clever. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..d6af7e3 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# React + TypeScript + Vite + +This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules. + +Currently, two official plugins are available: + +- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs) +- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) + +## React Compiler + +The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation). + +## Expanding the Oxlint configuration + +If you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`: + +```json +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "typescript", "oxc"], + "options": { + "typeAware": true + }, + "rules": { + "react/rules-of-hooks": "error", + "react/only-export-components": ["warn", { "allowConstantExport": true }] + } +} +``` + +See the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories. diff --git a/dist/assets/index-CikQ7moU.js b/dist/assets/index-CikQ7moU.js deleted file mode 100644 index 0b7cfca..0000000 --- a/dist/assets/index-CikQ7moU.js +++ /dev/null @@ -1,41 +0,0 @@ -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&O(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function ee(){return g?!0:!(e.unstable_now()-Tt&&ee());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&O(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(E)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=E,D=function(){ne.postMessage(null)}}else D=function(){_(E,0)};function O(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,O(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},ee=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var O=/\/+/g;function re(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function k(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function A(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,A(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+re(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(O,`$&/`)+`/`),A(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(O,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u{t.exports=f()})),m=o((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=d(),n=p(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1xe||(e.current=be[xe],be[xe]=null,xe--)}function P(e,t){xe++,be[xe]=e.current,e.current=t}var we=Se(null),Te=Se(null),Ee=Se(null),De=Se(null);function Oe(e,t){switch(P(Ee,t),P(Te,e),P(we,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}Ce(we),P(we,e)}function ke(){Ce(we),Ce(Te),Ce(Ee)}function Ae(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,P(De,e)),t=we.current;var n=dp(t,e.type);t!==n&&(P(Te,e),P(we,n))}function je(e){Te.current===e&&(Ce(we),Ce(Te)),De.current===e&&(Ce(De),sh._currentValue=ye)}var Me,F;function Ne(e){if(Me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Me=t&&t[1]||``,F=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Pe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ne(n):``}function Ie(e,t){switch(e.tag){case 26:case 27:case 5:return Ne(e.type);case 16:return Ne(`Lazy`);case 13:return e.child!==t&&t!==null?Ne(`Suspense Fallback`):Ne(`Suspense`);case 19:return Ne(`SuspenseList`);case 0:case 15:return Fe(e.type,!1);case 11:return Fe(e.type.render,!1);case 1:return Fe(e.type,!0);case 31:return Ne(`Activity`);case 30:return Ne(`ViewTransition`);default:return``}}function Le(e){try{var t=``,n=null;do t+=Ie(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var Re=Object.prototype.hasOwnProperty,ze=t.unstable_scheduleCallback,Be=t.unstable_cancelCallback,Ve=t.unstable_shouldYield,He=t.unstable_requestPaint,Ue=t.unstable_now,We=t.unstable_getCurrentPriorityLevel,Ge=t.unstable_ImmediatePriority,Ke=t.unstable_UserBlockingPriority,I=t.unstable_NormalPriority,qe=t.unstable_LowPriority,Je=t.unstable_IdlePriority,Ye=t.log,Xe=t.unstable_setDisableYieldValue,Ze=null,Qe=null;function $e(e){if(typeof Ye==`function`&&Xe(e),Qe&&typeof Qe.setStrictMode==`function`)try{Qe.setStrictMode(Ze,e)}catch{}}var et=Math.clz32?Math.clz32:rt,tt=Math.log,nt=Math.LN2;function rt(e){return e>>>=0,e===0?32:31-(tt(e)/nt|0)|0}var it=256,at=262144,ot=4194304;function st(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ct(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=st(n))):i=st(o):i=st(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=st(n))):i=st(o)):i=st(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function lt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ut(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function mt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ht(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0=lr),fr=` `,pr=!1;function mr(e,t){switch(e){case`keyup`:return sr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function hr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var gr=!1;function _r(e,t){switch(e){case`compositionend`:return hr(t);case`keypress`:return t.which===32?(pr=!0,fr):null;case`textInput`:return e=t.data,e===fr&&pr?null:e;default:return null}}function vr(e,t){if(gr)return e===`compositionend`||!cr&&mr(e,t)?(e=An(),kn=On=Dn=null,gr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Br(n)}}function Hr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ur(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=zr(e.document)}return t}function Wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Gr=wn&&`documentMode`in document&&11>=document.documentMode,Kr=null,qr=null,Jr=null,Yr=!1;function Xr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yr||Kr==null||Kr!==zr(r)||(r=Kr,`selectionStart`in r&&Wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jr&&Rr(Jr,r)||(Jr=r,r=qf(qr,`onSelect`),0>=o,i-=o,Ki=1<<32-et(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),G&&Ji(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),G&&Ji(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return G&&Ji(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),G&&Ji(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===O&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case te:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===O){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),to(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===M&&Ja(l)===r.type){n(e,r.sibling),c=a(r,o.props),to(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===O?(c=Ni(o.props.children,e.mode,c,o.key),to(c,o),c.return=e,e=c):(c=Mi(o.type,o.key,o.props,null,e.mode,c),to(c,o),c.return=e,e=c)}return s(e);case ne:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ii(o,e.mode,c),c.return=e,e=c}return s(e);case M:return o=Ja(o),_(e,r,o,c)}if(_e(o))return h(e,r,o,c);if(me(o)){if(l=me(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,eo(o),c);if(o.$$typeof===ie)return _(e,r,ba(e,o),c);no(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{$a=0;var i=_(e,t,n,r);return Qa=null,i}catch(t){if(t===Ha||t===Wa)throw t;var a=Oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var io=ro(!0),ao=ro(!1),oo=!1;function so(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function co(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function lo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function uo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Yu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ti(e),wi(e,null,n),t}return xi(e,r,t,n),Ti(e)}function fo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_t(e,n)}}function po(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var mo=!1;function J(){if(mo){var e=Na;if(e!==null)throw e}}function ho(e,t,n,r){mo=!1;var i=e.updateQueue;oo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Z&f)===f:(r&f)===f){f!==0&&f===Ma&&(mo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=E({},d,f);break a;case 2:oo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),rd|=o,e.lanes=o,e.memoizedState=d}}function go(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function _o(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=N.T,s={};s.types=o===null?null:o.types,N.T=s,rc(e,!1,t,n);try{var c=i(),l=N.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?nc(e,t,Ia(c,r),Od(e)):nc(e,t,r,Od(e))}catch(n){nc(e,t,{then:function(){},status:`rejected`,reason:n},Od())}finally{ve.p=a,o!==null&&s.types!==null&&(o.types=s.types),N.T=o}}function Ks(){}function qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Js(e).queue;Gs(e,a,t,ye,n===null?Ks:function(){return Ys(e),n(r)})}function Js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ye,baseState:ye,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:ye},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ys(e){var t=Js(e);t.next===null&&(t=e.alternate.memoizedState),nc(e,t.next.queue,{},Od())}function Xs(){return ya(sh)}function Zs(){return $o().memoizedState}function Qs(){return $o().memoizedState}function $s(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Od();e=lo(n);var r=uo(t,e,n);r!==null&&(jd(r,t,n),fo(r,t,n)),t={cache:Ea()},e.payload=t;return}t=t.return}}function ec(e,t,n){var r=Od();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ic(e)?ac(t,n):(n=Si(e,t,n,r),n!==null&&(jd(n,e,r),oc(n,t,r)))}function tc(e,t,n){nc(e,t,n,Od())}function nc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ic(e))ac(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Lr(s,o))return xi(e,t,i,0),Xu===null&&bi(),!1}catch{}if(n=Si(e,t,i,r),n!==null)return jd(n,e,r),oc(n,t,r),!0}return!1}function rc(e,t,n,r){if(r={lane:2,revertLane:Mf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ic(e)){if(t)throw Error(i(479))}else t=Si(e,n,r,2),t!==null&&jd(t,e,2)}function ic(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function ac(e,t){Ro=Lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function oc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_t(e,n)}}var sc={readContext:ya,use:ns,useCallback:Uo,useContext:Uo,useEffect:Uo,useImperativeHandle:Uo,useLayoutEffect:Uo,useInsertionEffect:Uo,useMemo:Uo,useReducer:Uo,useRef:Uo,useState:Uo,useDebugValue:Uo,useDeferredValue:Uo,useTransition:Uo,useSyncExternalStore:Uo,useId:Uo,useHostTransitionStatus:Uo,useFormState:Uo,useActionState:Uo,useOptimistic:Uo,useMemoCache:Uo,useCacheRefresh:Uo,useEffectEvent:Uo},cc={readContext:ya,use:ns,useCallback:function(e,t){return Qo().memoizedState=[e,t===void 0?null:t],e},useContext:ya,useEffect:Ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),As(4194308,4,Rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return As(4194308,4,e,t)},useInsertionEffect:function(e,t){As(4,2,e,t)},useMemo:function(e,t){var n=Qo();t=t===void 0?null:t;var r=e();if(X){$e(!0);try{e()}finally{$e(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Qo();if(n!==void 0){var i=n(t);if(X){$e(!0);try{n(t)}finally{$e(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ec.bind(null,Y,e),[r.memoizedState,e]},useRef:function(e){var t=Qo();return e={current:e},t.memoizedState=e},useState:function(e){e=ms(e);var t=e.queue,n=tc.bind(null,Y,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Bs,useDeferredValue:function(e,t){return Us(Qo(),e,t)},useTransition:function(){var e=ms(!1);return e=Gs.bind(null,Y,e.queue,!0,!1),Qo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Y,a=Qo();if(G){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Xu===null)throw Error(i(349));Z&127||ls(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ms(ds.bind(null,r,o,e),[e]),r.flags|=2048,Os(9,{destroy:void 0},us.bind(null,r,o,n,t),null),n},useId:function(){var e=Qo(),t=Xu.identifierPrefix;if(G){var n=qi,r=Ki;n=(r&~(1<<32-et(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=zo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[L]=t,o[wt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(np(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ol(t)}}return dl(t),t.subtreeFlags&=-33554433,sl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ol(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ee.current,oa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Qi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[L]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||$f(e.nodeValue,n)),e||ra(t,!0)}else e=lp(e).createTextNode(r),e[L]=t,t.stateNode=e}return dl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=oa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[L]=t}else sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),e=!1}else n=ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ko(t),t):(ko(t),null);if(t.flags&128)throw Error(i(558))}return dl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=oa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[L]=t}else sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dl(t),a=!1}else a=ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ko(t),t):(ko(t),null)}return ko(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ll(t,t.updateQueue),dl(t),null);case 4:return ke(),e===null&&Uf(t.stateNode.containerInfo),t.flags|=67108864,dl(t),null;case 10:return K(t.type),dl(t),null;case 19:if(Mo(t),r=t.memoizedState,r===null)return dl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)ul(r,!1);else{if(nd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=No(e),o!==null){for(t.flags|=128,ul(r,!1),e=o.updateQueue,t.updateQueue=e,ll(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ji(n,e),n=n.sibling;return jo(t,Ao.current&1|2),G&&Ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ue()>pd&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}}else{if(!a){if(e=No(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ll(t,e),ul(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!G)return dl(t),null}else 2*Ue()-r.renderingStartTime>pd&&n!==536870912&&(t.flags|=128,a=!0,ul(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ue(),e.sibling=null,o=Ao.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||G?jo(t,o):(n=o,P(Co,t),P(Ao,n),wo===null&&(wo=t)),G&&Ji(t,r.treeForkCount),e}return dl(t),null;case 22:case 23:return ko(t),So(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(dl(t),t.subtreeFlags&6&&(t.flags|=8192)):dl(t),n=t.updateQueue,n!==null&&ll(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Ce(Ra),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),K(Ta),dl(t),null;case 25:return null;case 30:return t.flags|=33554432,dl(t),null}throw Error(i(156,t.tag))}function pl(e,t){switch(W(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return K(Ta),ke(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return je(t),null;case 31:if(t.memoizedState!==null){if(ko(t),t.alternate===null)throw Error(i(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ko(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mo(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return ke(),null;case 10:return K(t.type),null;case 22:case 23:return ko(t),So(),e!==null&&Ce(Ra),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return K(Ta),null;case 25:return null;default:return null}}function ml(e,t){switch(W(t),t.tag){case 3:K(Ta),ke();break;case 26:case 27:case 5:je(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&ko(t);break;case 13:ko(t);break;case 19:Mo(t);break;case 10:K(t.type);break;case 22:case 23:ko(t),So(),e!==null&&Ce(Ra);break;case 24:K(Ta)}}function hl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){df(t,t.return,e)}}function gl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){df(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){df(t,t.return,e)}}function _l(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{_o(t,n)}catch(t){df(e,e.return,t)}}}function vl(e,t,n){n.props=hc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){df(e,t,n)}}function yl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=pi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Pp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Fp(e);m(e.child,!1,Qp,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){df(e,t,n)}}function bl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){df(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){df(e,t,n)}else n.current=null}}function xl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n title`))),np(r,t,n),r[L]=e,Lt(r),t=r;break a;case`link`:if(o=Gm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;sg&&(o=g,g=h,h=o);var _=Vr(s,h),v=Vr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,N.T=null,n=xd,xd=null;var o=_d,s=yd;if(gd=0,vd=_d=null,yd=0,Yu&6)throw Error(i(331));var c=Yu;if(Yu|=4,Wu(o.current),Iu(o,o.current,s,n),Yu=c,Tf(0,!1),Qe&&typeof Qe.onPostCommitFiberRoot==`function`)try{Qe.onPostCommitFiberRoot(Ze,o)}catch{}return!0}finally{ve.p=a,N.T=r,sf(e,t)}}function uf(e,t,n){t=Ri(n,t),t=xc(e.stateNode,t,2),e=uo(e,t,2),e!==null&&(mt(e,2),wf(e))}function df(e,t,n){if(e.tag===3)uf(e,e,n);else for(;t!==null;){if(t.tag===3){uf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(hd===null||!hd.has(r))){e=Ri(n,e),n=Sc(2),r=uo(t,n,2),r!==null&&(Cc(n,r,t,e),mt(r,2),wf(r));break}}t=t.return}}function ff(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ju;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(ed=!0,i.add(n),e=pf.bind(null,e,t,n),t.then(e,e))}function pf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Xu===e&&(Z&n)===n&&(nd===4||nd===3&&(Z&62914560)===Z&&300>Ue()-dd?Yu&2?ad|=n:Rd(e,0):ad|=n,sd===Z&&(sd=0)),wf(e)}function mf(e,t){t===0&&(t=ft()),e=Ci(e,t),e!==null&&(mt(e,t),wf(e))}function hf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),mf(e,n)}function gf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),mf(e,n)}function _f(e,t){return ze(e,t)}var vf=null,yf=null,bf=!1,xf=!1,Sf=!1,Cf=0;function wf(e){e!==yf&&e.next===null&&(yf===null?vf=yf=e:yf=yf.next=e),xf=!0,bf||(bf=!0,jf())}function Tf(e,t){if(!Sf&&xf){Sf=!0;do for(var n=!1,r=vf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-et(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Af(r,a))}else a=Z,a=ct(r,r===Xu?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||lt(r,a)||(n=!0,Af(r,a))}r=r.next}while(n);Sf=!1}}function Ef(){Df()}function Df(){xf=bf=!1;var e=0;Cf!==0&&hp()&&(e=Cf);for(var t=Ue(),n=null,r=vf;r!==null;){var i=r.next,a=Of(r,t);a===0?(r.next=null,n===null?vf=i:n.next=i,i===null&&(yf=n)):(n=r,(e!==0||a&3)&&(xf=!0)),r=i}gd!==0&&gd!==5||Tf(e,!1),Cf!==0&&(Cf=0)}function Of(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&ap(d)&&(c=c.responseEnd,o+=u*(c$m){s.length=o;break}f=new Promise(jp.bind(f)),s.push(f)}}}if(0`u`?null:document;function Tm(e,t,n){var r=wm;if(r&&typeof t==`string`&&t){var i=tn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),ym.has(i)||(ym.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),np(t,`link`,e),Lt(t),r.head.appendChild(t)))}}function Em(e){xm.D(e),Tm(`dns-prefetch`,e,null)}function Dm(e,t){xm.C(e,t),Tm(`preconnect`,e,t)}function Om(e,t,n){xm.L(e,t,n);var r=wm;if(r&&e&&t){var i=`link[rel="preload"][as="`+tn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+tn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+tn(n.imageSizes)+`"]`)):i+=`[href="`+tn(e)+`"]`;var a=i;switch(t){case`style`:a=Pm(e);break;case`script`:a=Rm(e)}if(!(vm.has(a)||(e=E({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Fm(a))||t===`script`&&r.querySelector(zm(a))))){var o=r.createElement(`link`);np(o,`link`,e),t===`style`&&(o[jt]=!0,o.onload=o.onerror=function(){Rt(o)}),Lt(o),r.head.appendChild(o)}}}function km(e,t){xm.m(e,t);var n=wm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+tn(r)+`"][href="`+tn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rm(e)}if(!vm.has(a)&&(e=E({rel:`modulepreload`,href:e},t),vm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zm(a)))return}r=n.createElement(`link`),np(r,`link`,e),Lt(r),n.head.appendChild(r)}}}function Am(e,t,n){xm.S(e,t,n);var r=wm;if(r&&e){var i=It(r).hoistableStyles,a=Pm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Fm(a)))s.loading=5;else{e=E({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vm.get(a))&&Hm(e,n);var c=o=r.createElement(`link`);Lt(c),np(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jm(e,t){xm.X(e,t);var n=wm;if(n&&e){var r=It(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Lt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mm(e,t){xm.M(e,t);var n=wm;if(n&&e){var r=It(n).hoistableScripts,i=Rm(e),a=r.get(i);a||(a=n.querySelector(zm(i)),a||(e=E({src:e,async:!0,type:`module`},t),(t=vm.get(i))&&Um(e,t),a=n.createElement(`script`),Lt(a),np(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t,n,r){var a=(a=Ee.current)?bm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Pm(n.href),t=It(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pm(n.href);var o=It(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Fm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=vm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vm.set(e,o)),Lm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Rm(n),t=It(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pm(e){return`href="`+tn(e)+`"`}function Fm(e){return`link[rel="stylesheet"][`+e+`]`}function Im(e){return E({},e,{"data-precedence":e.precedence,precedence:null})}function Lm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[jt]){r.loading=1;return}}else t=e.createElement(`link`),t[jt]=!0,t.onload=t.onerror=Rt.bind(null,t),np(t,`link`,n),Lt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Rm(e){return`[src="`+tn(e)+`"]`}function zm(e){return`script[async]`+e}function Bm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+tn(n.href)+`"]`);if(r)return t.instance=r,Lt(r),r;var a=E({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Lt(r),np(r,`style`,a),Vm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pm(n.href);var o=e.querySelector(Fm(a));if(o)return t.state.loading|=4,t.instance=o,Lt(o),o;r=Im(n),(a=vm.get(a))&&Hm(r,a),o=(e.ownerDocument||e).createElement(`link`),Lt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),np(o,`link`,r),t.state.loading|=4,Vm(o,n.precedence,e),t.instance=o;case`script`:return o=Rm(n.src),(a=e.querySelector(zm(o)))?(t.instance=a,Lt(a),a):(r=n,(a=vm.get(o))&&(r=E({},n),Um(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Lt(a),np(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vm(r,n.precedence,e));return t.instance}function Vm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pm(r.href),a=t.querySelector(Fm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Lt(a);return}a=t.ownerDocument||t,r=Im(r),(i=vm.get(i))&&Hm(r,i),a=a.createElement(`link`),Lt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),np(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(p(),1),y=_(),b=(e,t,n)=>Math.max(1,Math.min(t/e.width,n/e.height)),x=1.2,S={width:10,height:8,doors:[{id:`door-1`,wall:`bottom`,offset:8.8/2,width:x,isLoading:!1}],screens:[],obstacles:[]},C={min:3,max:60},w={min:.7,max:4},T={min:1,max:12},ee={min:.2,max:10},E=.6,D=.3,te=1e-6,ne=[`top`,`bottom`,`left`,`right`],O=(e,t)=>t===`top`||t===`bottom`?e.width:e.height;function re(e,t,n,r,i){switch(t){case`top`:return{x:n,y:0,width:r,height:i};case`bottom`:return{x:n,y:e.height-i,width:r,height:i};case`left`:return{x:0,y:n,width:i,height:r};case`right`:return{x:e.width-i,y:n,width:i,height:r}}}var k=(e,t)=>re(e,t.wall,t.offset,t.width,t.width),A=(e,t)=>[re(e,t.wall,t.offset,t.width,E),k(e,t)],ie=(e,t)=>re(e,t.wall,t.offset,t.width,D);function ae(e){return[...e.doors.flatMap(t=>A(e,t)),...e.screens.map(t=>ie(e,t)),...e.obstacles]}var j=(e,t,n)=>Math.min(Math.max(e,t),n);function oe(e){let t=(e.rotation??0)*Math.PI/180,n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),i=e.width*n+e.height*r,a=e.width*r+e.height*n,o=e.x+e.width/2,s=e.y+e.height/2;return{x:o-i/2,y:s-a/2,width:i,height:a}}function se(e,t){let n=oe(e),r=j(n.x,0,t.width-n.width)-n.x,i=j(n.y,0,t.height-n.height)-n.y;return{...e,x:e.x+r,y:e.y+i}}function M(e,t){let n=1e-9;return e.xt.x+n&&e.yt.y+n}function ce(e,t){let n=1e-9;return e.x>=-1e-9&&e.y>=-1e-9&&e.x+e.width<=t.width+n&&e.y+e.height<=t.height+n}function le(e,t,n,r){let i=oe(e);return ce(i,n)&&!t.some(e=>e.id!==r&&M(i,oe(e)))&&!ae(n).some(e=>M(i,e))}function ue(e,t,n,r){let i={...e,...t};return t.x===void 0&&t.y===void 0&&(i.x=e.x+e.width/2-i.width/2,i.y=e.y+e.height/2-i.height/2),i=se(i,r),le(i,n,r,e.id)?i:null}var de=(e,t)=>t.kind===`door`?A(e,{id:t.id,wall:t.wall,offset:t.offset,width:t.width,isLoading:!1}):[re(e,t.wall,t.offset,t.width,D)];function fe(e,t,n){if(n.offset<-1e-6||n.offset+n.width>O(e,n.wall)+te||[...e.doors.filter(e=>e.id!==n.id),...e.screens.filter(e=>e.id!==n.id)].some(e=>e.wall===n.wall&&n.offsete.offset+te))return!1;let r=t.map(oe);return de(e,n).every(t=>ce(t,e)&&!r.some(e=>M(t,e))&&!e.obstacles.some(e=>M(t,e)))}function pe(e,t,n){return!ce(n,e)||t.some(e=>M(n,oe(e)))||e.obstacles.some(e=>e.id!==n.id&&M(n,e))?!1:![...e.doors.flatMap(t=>A(e,t)),...e.screens.map(t=>ie(e,t))].some(e=>M(n,e))}function me(e,t){return e.doors.length<1||e.screens.length>2?!1:[...e.doors.map(e=>({...e,kind:`door`})),...e.screens.map(e=>({...e,kind:`screen`}))].every(n=>fe(e,t,n))&&e.obstacles.every(n=>pe(e,t,n))&&t.every(n=>le(n,t,e,n.id))}var he=e=>Math.ceil(e*10-1e-6)/10;function ge(e,t){let n=C.min,r=C.min,i=e=>{n=Math.max(n,e.x+e.width),r=Math.max(r,e.y+e.height)};t.map(oe).forEach(i),e.obstacles.forEach(i);let a=e=>{e.wall===`top`||e.wall===`bottom`?n=Math.max(n,e.offset+e.width):r=Math.max(r,e.offset+e.width)};e.screens.forEach(a);for(let t of e.doors)a(t),t.wall===`top`||t.wall===`bottom`?r=Math.max(r,t.width):n=Math.max(n,t.width);return{width:he(n),height:he(r)}}function _e(e,t,n){let r={...e,...n};return r.widthe.d-t.d),pe(e,t,{x:i,y:a,width:n,height:r,id:`__new`}))return{x:i,y:a};for(let i of s)if(pe(e,t,{id:`__new`,x:i.x,y:i.y,width:n,height:r}))return{x:i.x,y:i.y};return null}var ye=.5;function be(e,t,n,r){if(t===`right`)return{...e,width:j(n-e.x,ye,r.width-e.x)};let i=e.x+e.width,a=j(n,0,i-ye);return{...e,x:a,width:i-a}}var xe=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Se=e=>typeof e==`number`&&Number.isFinite(e),Ce=(e,t)=>e>=t.min-1e-6&&e<=t.max+1e-6,P=e=>Math.round(e*10)/10;function we(e){let{width:t,height:n,doors:r,screens:i,obstacles:a}=e;return JSON.stringify({width:t,height:n,doors:r,screens:i,obstacles:a},null,2)}function Te(e){let t;try{t=JSON.parse(e)}catch{return{ok:!1,error:`Not valid JSON.`}}if(!xe(t))return{ok:!1,error:`Expected a JSON object with width, height, doors, screens and obstacles.`};let n=e=>({ok:!1,error:e});if(!Se(t.width)||!Se(t.height))return n(`width and height must be numbers.`);if(!Ce(t.width,C)||!Ce(t.height,C))return n(`Room width and height must be between ${C.min} and ${C.max} m.`);if(!Array.isArray(t.doors)||!Array.isArray(t.screens)||!Array.isArray(t.obstacles))return n(`doors, screens and obstacles must all be arrays.`);let r=new Set,i=(e,t)=>typeof e!=`string`||!e?`${t}: id must be a non-empty string.`:r.has(e)?`${t}: duplicate id "${e}".`:(r.add(e),null),a=e=>typeof e==`string`&&ne.includes(e),o=[];for(let[e,r]of t.doors.entries()){let t=`Door ${e+1}`;if(!xe(r))return n(`${t} must be an object.`);let s=i(r.id,t);if(s)return n(s);if(!a(r.wall))return n(`${t}: wall must be top, bottom, left or right.`);if(!Se(r.offset)||!Se(r.width))return n(`${t}: offset and width must be numbers.`);if(!Ce(r.width,w))return n(`${t}: width must be ${w.min}-${w.max} m.`);if(typeof r.isLoading!=`boolean`)return n(`${t}: isLoading must be true or false.`);o.push({id:r.id,wall:r.wall,offset:r.offset,width:r.width,isLoading:r.isLoading})}if(o.length<1)return n(`A room needs at least one door.`);if(t.screens.length>2)return n(`At most 2 screens are allowed.`);let s=[];for(let[e,r]of t.screens.entries()){let t=`Screen ${e+1}`;if(!xe(r))return n(`${t} must be an object.`);let o=i(r.id,t);if(o)return n(o);if(!a(r.wall))return n(`${t}: wall must be top, bottom, left or right.`);if(!Se(r.offset)||!Se(r.width))return n(`${t}: offset and width must be numbers.`);if(!Ce(r.width,T))return n(`${t}: width must be ${T.min}-${T.max} m.`);s.push({id:r.id,wall:r.wall,offset:r.offset,width:r.width})}let c=[];for(let[e,r]of t.obstacles.entries()){let t=`Obstacle ${e+1}`;if(!xe(r))return n(`${t} must be an object.`);let a=i(r.id,t);if(a)return n(a);if(!Se(r.x)||!Se(r.y)||!Se(r.width)||!Se(r.height))return n(`${t}: x, y, width and height must be numbers.`);if(!Ce(r.width,ee)||!Ce(r.height,ee))return n(`${t}: size must be ${ee.min}-${ee.max} m.`);c.push({id:r.id,x:r.x,y:r.y,width:r.width,height:r.height})}let l={width:P(t.width),height:P(t.height),doors:o,screens:s,obstacles:c};return me(l,[])?{ok:!0,room:l}:n(`The doors, screens and obstacles don't fit together (overlap or outside the room).`)}var Ee=[{id:`chair`,name:`Chair`,shape:`chair`,defaultWidth:.5,defaultHeight:.5,isTable:!1,rotatable:!1,available:20},{id:`table`,name:`Table`,shape:`table`,defaultWidth:1.8,defaultHeight:.8,isTable:!0,rotatable:!0,available:6,seatsPerUnit:8},{id:`screen`,name:`Screen`,shape:`screen`,defaultWidth:2,defaultHeight:.2,isTable:!1,rotatable:!0,available:2}],De={room:S,items:[],configs:Object.fromEntries(Ee.map(e=>[e.id,e])),typeOrder:Ee.map(e=>e.id)};function Oe(e,t){switch(t.kind){case`add`:{let n=e.configs[t.type],r={id:t.id,type:t.type,x:t.x,y:t.y,width:n.defaultWidth,height:n.defaultHeight,rotation:0,locked:!1};return{...e,items:[...e.items,r]}}case`move`:return{...e,items:e.items.map(e=>e.id===t.id?{...e,x:t.x,y:t.y}:e)};case`update`:return{...e,items:e.items.map(e=>e.id===t.id?{...e,...t.patch}:e)};case`setRoom`:return{...e,room:t.room,items:t.clearItems?[]:e.items};case`remove`:return{...e,items:e.items.filter(e=>e.id!==t.id)};case`setAvailable`:return{...e,configs:{...e.configs,[t.type]:{...e.configs[t.type],available:t.value}}};case`setSeats`:return{...e,configs:{...e.configs,[t.type]:{...e.configs[t.type],seatsPerUnit:t.value}}};case`addConfig`:return{...e,configs:{...e.configs,[t.config.id]:t.config},typeOrder:[...e.typeOrder,t.config.id]}}}var ke=(e,t)=>e.filter(e=>e.type===t).length,Ae=(e,t,n)=>n-ke(e,t),je=(e,t)=>e.seatsOverride??t.seatsPerUnit,Me=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),F=o(((e,t)=>{t.exports=Me()}))();function Ne({size:e=36}){return(0,F.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 36 36`,children:[(0,F.jsx)(`rect`,{x:`4`,y:`4`,width:`28`,height:`28`,rx:`3`,fill:`#8fb4d9`,stroke:`#3b3b3b`,strokeWidth:`1.5`}),(0,F.jsx)(`rect`,{x:`4`,y:`4`,width:`28`,height:`8`,rx:`3`,fill:`#4a6f96`})]})}function Pe({size:e=36}){return(0,F.jsx)(`svg`,{width:e,height:e,viewBox:`0 0 36 36`,children:(0,F.jsx)(`rect`,{x:`2`,y:`9`,width:`32`,height:`18`,rx:`3`,fill:`#d9b382`,stroke:`#3b3b3b`,strokeWidth:`1.5`})})}function Fe({size:e=36}){return(0,F.jsxs)(`svg`,{width:e,height:e,viewBox:`0 0 36 36`,children:[(0,F.jsx)(`rect`,{x:`2`,y:`14`,width:`32`,height:`8`,rx:`2`,fill:`#2d3748`,stroke:`#3b3b3b`,strokeWidth:`1.5`}),(0,F.jsx)(`rect`,{x:`4`,y:`16`,width:`28`,height:`4`,fill:`#63b3ed`})]})}function Ie({shape:e,size:t}){return e===`table`?(0,F.jsx)(Pe,{size:t}):e===`screen`?(0,F.jsx)(Fe,{size:t}):(0,F.jsx)(Ne,{size:t})}var Le=5,Re={width:`100%`,height:84,boxSizing:`border-box`,background:`#fff`,border:`1px solid #cfcfcf`,borderRadius:8,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,gap:6,cursor:`grab`,userSelect:`none`,touchAction:`none`,font:`12px system-ui, sans-serif`,color:`#444`},ze=152,Be=600;function Ve({config:e,remaining:t,onStartDrag:n,onOpenMenu:r}){let i=e.id,a=t<=0,o=e=>{e.preventDefault();let{clientX:t,clientY:o}=e,s=!1,c=e=>{s||a||Math.hypot(e.clientX-t,e.clientY-o)>=Le&&(s=!0,u(),n(i,e.clientX,e.clientY))},l=e=>{u(),(Math.hypot(e.clientX-t,e.clientY-o){window.removeEventListener(`pointermove`,c),window.removeEventListener(`pointerup`,l)};window.addEventListener(`pointermove`,c),window.addEventListener(`pointerup`,l)};return(0,F.jsxs)(`div`,{role:`button`,"aria-label":`${e.name} (${t} remaining)`,style:{...Re,position:`relative`,opacity:a?.45:1,filter:a?`grayscale(1)`:void 0,cursor:a?`pointer`:`grab`},onPointerDown:o,children:[(0,F.jsx)(`span`,{style:{position:`absolute`,top:6,right:6,minWidth:20,height:20,padding:`0 6px`,boxSizing:`border-box`,borderRadius:10,background:a?`#888`:`#2b2b2b`,color:`#fff`,font:`600 11px/20px system-ui, sans-serif`,textAlign:`center`},children:t}),(0,F.jsx)(Ie,{shape:e.shape}),e.name]})}function He({onClick:e}){return(0,F.jsxs)(`div`,{role:`button`,"aria-label":`New custom furniture`,onClick:e,style:{...Re,border:`1.5px dashed #9a9a9a`,background:`transparent`,cursor:`pointer`},children:[(0,F.jsx)(`span`,{style:{font:`300 30px/30px system-ui, sans-serif`,color:`#666`},children:`+`}),`Custom`]})}function Ue({types:e,remaining:t,onStartDrag:n,onOpenMenu:r,onNewCustom:i,header:a,panel:o}){let[s,c]=(0,v.useState)(264);return(0,F.jsxs)(`aside`,{style:{position:`relative`,width:s,flexShrink:0,borderRight:`1px solid #d4d4d4`,background:`#ececec`},children:[(0,F.jsxs)(`div`,{style:{height:`100%`,boxSizing:`border-box`,overflowY:`auto`,padding:16,display:`grid`,gridTemplateColumns:`repeat(auto-fill, minmax(84px, 1fr))`,alignContent:`start`,gap:12},children:[a,o??(0,F.jsxs)(F.Fragment,{children:[e.map(e=>(0,F.jsx)(Ve,{config:e,remaining:t[e.id],onStartDrag:n,onOpenMenu:r},e.id)),(0,F.jsx)(He,{onClick:i})]})]}),(0,F.jsx)(`div`,{onPointerDown:e=>{e.preventDefault();let t=e.clientX,n=s,r=e=>c(Math.min(Be,Math.max(ze,n+e.clientX-t))),i=()=>{window.removeEventListener(`pointermove`,r),window.removeEventListener(`pointerup`,i)};window.addEventListener(`pointermove`,r),window.addEventListener(`pointerup`,i)},style:{position:`absolute`,top:0,right:-3,width:6,height:`100%`,cursor:`col-resize`,touchAction:`none`}})]})}var We=Math.PI/180;function Ge(){return typeof window<`u`&&({}.toString.call(window)===`[object Window]`||{}.toString.call(window)===`[object global]`)}var Ke=typeof global<`u`?global:typeof window<`u`?window:typeof WorkerGlobalScope<`u`?self:{},I={_global:Ke,version:`10.9.0`,isBrowser:Ge(),isUnminified:/param/.test(function(e){}.toString()),dblClickWindow:400,getAngle(e){return I.angleDeg?e*We:e},enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_renderBackend:`web`,legacyTextRendering:!1,pixelRatio:typeof window<`u`&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging(){return I.DD.isDragging},isTransforming(){return I.Transformer?.isTransforming()??!1},isDragReady(){return!!I.DD.node},releaseCanvasOnDestroy:!0,document:Ke.document,_injectGlobal(e){Ke.Konva!==void 0&&console.error(`Several Konva instances detected. It is not recommended to use multiple Konva instances in the same environment.`),Ke.Konva=e}},qe=new Set,Je=(e,t=!1)=>{I[e.prototype.getClassName()]=e,t&&qe.add(e)};I._injectGlobal(I);var Ye=`Konva.js unsupported environment. - -Looks like you are trying to use Konva.js in Node.js environment (or in a Web Worker), because "document" object is undefined. - -To use Konva.js in Node.js environment, you need to use the "canvas-backend" or "skia-backend" module. - -bash: npm install canvas -js: import "konva/canvas-backend"; - -or - -bash: npm install skia-canvas -js: import "konva/skia-backend"; -`,Xe=()=>{if(typeof document>`u`)throw Error(Ye)},Ze=class e{constructor(e){this.dirty=!1,this.m=e?e.slice():[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new e(this.m)}copyInto(e){e.m[0]=this.m[0],e.m[1]=this.m[1],e.m[2]=this.m[2],e.m[3]=this.m[3],e.m[4]=this.m[4],e.m[5]=this.m[5]}point(e){let t=this.m;return{x:t[0]*e.x+t[2]*e.y+t[4],y:t[1]*e.x+t[3]*e.y+t[5]}}_getTransformedRect(e){let[t,n,r,i,a,o]=this.m,s=e.x,c=e.y,l=e.x+e.width,u=e.y+e.height,d=[t*s+r*c+a,t*l+r*c+a,t*l+r*u+a,t*s+r*u+a],f=[n*s+i*c+o,n*l+i*c+o,n*l+i*u+o,n*s+i*u+o],p=Math.min(d[0],d[1],d[2],d[3]),m=Math.min(f[0],f[1],f[2],f[3]);return{x:p,y:m,width:Math.max(d[0],d[1],d[2],d[3])-p,height:Math.max(f[0],f[1],f[2],f[3])-m}}translate(e,t){return this.m[4]+=this.m[0]*e+this.m[2]*t,this.m[5]+=this.m[1]*e+this.m[3]*t,this}scale(e,t){return this.m[0]*=e,this.m[1]*=e,this.m[2]*=t,this.m[3]*=t,this}rotate(e){let t=Math.cos(e),n=Math.sin(e),r=this.m[0]*t+this.m[2]*n,i=this.m[1]*t+this.m[3]*n,a=this.m[0]*-n+this.m[2]*t,o=this.m[1]*-n+this.m[3]*t;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(e,t){let n=this.m[0]+this.m[2]*t,r=this.m[1]+this.m[3]*t,i=this.m[2]+this.m[0]*e,a=this.m[3]+this.m[1]*e;return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this}multiply(e){let t=this.m[0]*e.m[0]+this.m[2]*e.m[1],n=this.m[1]*e.m[0]+this.m[3]*e.m[1],r=this.m[0]*e.m[2]+this.m[2]*e.m[3],i=this.m[1]*e.m[2]+this.m[3]*e.m[3],a=this.m[0]*e.m[4]+this.m[2]*e.m[5]+this.m[4],o=this.m[1]*e.m[4]+this.m[3]*e.m[5]+this.m[5];return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}isInvertible(){return this.m[0]*this.m[3]-this.m[1]*this.m[2]!==0}invert(){let e=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),t=this.m[3]*e,n=-this.m[1]*e,r=-this.m[2]*e,i=this.m[0]*e,a=e*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=e*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=t,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}getMatrix(){return this.m}decompose(){let e=this.m[0],t=this.m[1],n=this.m[2],r=this.m[3],i=this.m[4],a=this.m[5],o=e*r-t*n,s={x:i,y:a,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(e!=0||t!=0){let i=Math.sqrt(e*e+t*t);s.rotation=t>0?Math.acos(e/i):-Math.acos(e/i),s.scaleX=i,s.scaleY=o/i,s.skewX=o&&(e*n+t*r)/o,s.skewY=0}else if(n!=0||r!=0){let i=Math.sqrt(n*n+r*r);s.rotation=Math.PI/2-(r>0?Math.acos(-n/i):-Math.acos(n/i)),s.scaleX=o/i,s.scaleY=i,s.skewX=0,s.skewY=o&&(e*n+t*r)/o}return s.rotation=L._getRotation(s.rotation),s}},Qe=`[object Array]`,$e=`[object Number]`,et=`[object String]`,tt=`[object Boolean]`,nt=Math.PI/180,rt=180/Math.PI,it=`#`,at=``,ot=`0`,st=`Konva warning: `,ct=`Konva error: `,lt={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[0,0,0,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},ut=null,dt=typeof window<`u`?window:{},ft=new WeakMap,pt=(e,t)=>{typeof e.requestAnimationFrame==`function`?e.requestAnimationFrame(t):typeof requestAnimationFrame<`u`?requestAnimationFrame(t):setTimeout(t,16)},mt=new Map,ht=Object.getPrototypeOf(Int8Array),gt=e=>{let t=e.trim();return t.indexOf(`,`)===-1?t.split(/\s*\/\s*|\s+/):t.split(/\s*,\s*/)},_t=`[+-]?(?:\\d+\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?`,vt=RegExp(`^(${_t})(%?)$`,`i`),yt=(e,t)=>{let n=vt.exec(e);if(!n)return NaN;let r=n[2]?Number(n[1])/100*t:Number(n[1]);return Math.min(Math.max(r,0),t)},bt=/^#[0-9a-f]+$/i,xt=RegExp(`^(${_t})(deg|grad|rad|turn)?$`,`i`),St={deg:1,grad:.9,rad:rt,turn:360};function Ct(e,t){return Math.min(Math.max(e||0,0),t)}var L={_isElement(e){return!!(e&&e.nodeType==1)},_isFunction(e){return!!(e&&e.constructor&&e.call&&e.apply)},_isPlainObject(e){return!!e&&e.constructor===Object},_isArray(e){return Object.prototype.toString.call(e)===Qe},_isNumber(e){return Object.prototype.toString.call(e)===$e&&!isNaN(e)&&isFinite(e)},_isString(e){return Object.prototype.toString.call(e)===et},_isBoolean(e){return Object.prototype.toString.call(e)===tt},isObject(e){return e instanceof Object},isValidSelector(e){if(typeof e!=`string`)return!1;let t=e[0];return t===`#`||t===`.`||t===t.toUpperCase()},_sign(e){return e===0||e>0?1:-1},requestAnimFrame(e,t){let n=t&&!t.closed&&t||dt,r=ft.get(n);r||(r=[],ft.set(n,r),pt(n,function(){ft.delete(n),r.forEach(function(e){e()})})),r.push(e)},createCanvasElement(){Xe();let e=document.createElement(`canvas`);try{e.style=e.style||{}}catch{}return e},createImageElement(){return Xe(),document.createElement(`img`)},_urlToImage(e,t,n){let r=L.createImageElement();r.onload=function(){t(r)},r.onerror=e=>{n?.(e instanceof Error?e:Error(`Unable to load image.`))},r.src=e},_rgbToHex(e,t,n){return((1<<24)+(e<<16)+(t<<8)+n).toString(16).slice(1)},_hexToRgb(e){e=e.replace(it,at);let t=parseInt(e,16);return{r:t>>16&255,g:t>>8&255,b:t&255}},getRandomColor(){let e=(Math.random()*16777215|0).toString(16);for(;e.length<6;)e=ot+e;return it+e},isCanvasFarblingActive(){if(ut!==null)return ut;if(typeof document>`u`)return ut=!1,!1;let e=this.createCanvasElement();e.width=10,e.height=10;let t=e.getContext(`2d`,{willReadFrequently:!0});t.clearRect(0,0,10,10),t.fillStyle=`#282828`,t.fillRect(0,0,10,10);let n=t.getImageData(0,0,10,10).data,r=!1;for(let e=0;e<100;e++)if(n[e*4]!==40||n[e*4+1]!==40||n[e*4+2]!==40||n[e*4+3]!==255){r=!0;break}return ut=r,this.releaseCanvas(e),ut},getHitColor(){let e=()=>Math.random()*256|0;return this.getHitColorKey(e(),e(),e())},getHitColorKey(e,t,n){let r=this.isCanvasFarblingActive()?5:3,i=e=>Math.round(e/r)*r;return it+this._rgbToHex(i(e),i(t),i(n))},getSnappedHexColor(e){let{r:t,g:n,b:r}=this._hexToRgb(e);return this.getHitColorKey(t,n,r)},getRGB(e){let{r:t=0,g:n=0,b:r=0}=L.colorToRGBA(e)??{};return{r:t,g:n,b:r}},colorToRGBA(e){e=(e||``).trim()||`black`;let t=L._namedColorToRBA(e)||L._hex3ColorToRGBA(e)||L._hex4ColorToRGBA(e)||L._hex6ColorToRGBA(e)||L._hex8ColorToRGBA(e)||L._rgbColorToRGBA(e)||L._hslColorToRGBA(e);if(t&&[t.r,t.g,t.b,t.a].every(L._isNumber))return t},_namedColorToRBA(e){let t=lt[e.toLowerCase()];return t?{r:t[0],g:t[1],b:t[2],a:t.length>3?t[3]:1}:null},_rgbColorToRGBA(e){let t=/^rgba?\(([^)]*)\)$/i.exec(e);if(!t)return;let n=gt(t[1]);if(!(n.length<3||n.length>4))return{r:yt(n[0],255),g:yt(n[1],255),b:yt(n[2],255),a:n.length>3?yt(n[3],1):1}},_hex8ColorToRGBA(e){if(e.length===9&&bt.test(e))return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:parseInt(e.slice(7,9),16)/255}},_hex6ColorToRGBA(e){if(e.length===7&&bt.test(e))return{r:parseInt(e.slice(1,3),16),g:parseInt(e.slice(3,5),16),b:parseInt(e.slice(5,7),16),a:1}},_hex4ColorToRGBA(e){if(e.length===5&&bt.test(e))return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:parseInt(e[4]+e[4],16)/255}},_hex3ColorToRGBA(e){if(e.length===4&&bt.test(e))return{r:parseInt(e[1]+e[1],16),g:parseInt(e[2]+e[2],16),b:parseInt(e[3]+e[3],16),a:1}},_hslColorToRGBA(e){let t=/^hsla?\(([^)]*)\)$/i.exec(e);if(!t)return;let n=gt(t[1]);if(n.length<3||n.length>4)return;let r=xt.exec(n[0]);if(!r)return;let i=r[2],a=Number(r[1])*(i?St[i.toLowerCase()]:1);if(!isFinite(a))return;let o=(a%360+360)%360/360,s=yt(n[1],100)/100,c=yt(n[2],100)/100,l=n.length>3?yt(n[3],1):1,u=c<.5?c*(1+s):c+s-c*s,d=2*c-u,f=[0,0,0];for(let e=0;e<3;e++){let t=o+1/3*-(e-1);t<0&&t++,t>1&&t--;let n;n=6*t<1?d+(u-d)*6*t:2*t<1?u:3*t<2?d+(u-d)*(2/3-t)*6:d,f[e]=n*255}return{r:Math.round(f[0]),g:Math.round(f[1]),b:Math.round(f[2]),a:l}},_getPointsRect(e){let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a=0;ae.x+e.width||t.x+t.widthe.y+e.height||t.y+t.heighttypeof e==`object`)?e.map(L._cloneValue):e.slice():L._isPlainObject(e)?L.cloneObject(e):e instanceof ht?e.slice():e},cloneArray(e){return e.slice(0)},degToRad(e){return e*nt},radToDeg(e){return e*rt},_getRotation(e){return I.angleDeg?L.radToDeg(e):e},_capitalize(e){let t=mt.get(e);if(t!==void 0)return t;let n=e.charAt(0).toUpperCase()+e.slice(1);return mt.set(e,n),n},throw(e){throw Error(ct+e)},error(e){console.error(ct+e)},warn(e){I.showWarnings&&console.warn(st+e)},_batchEvents(e,t){if(!e)return t();let n=!1,r=!0;try{e(()=>{n||!r?L.warn(`eventBatchFunc must call its argument exactly once, synchronously.`):(n=!0,t())})}finally{r=!1,n||L.warn(`eventBatchFunc must call its argument synchronously.`)}},each(e,t){for(let n in e)t(n,e[n])},_inRange(e,t,n){return t<=e&&e1?(o=n,s=r,c=(n-i)*(n-i)+(r-a)*(r-a)):(o=e+u*(n-e),s=t+u*(r-t),c=(o-i)*(o-i)+(s-a)*(s-a))}return[o,s,c]},_getProjectionToLine(e,t,n){let r=L.cloneObject(e),i=Number.MAX_VALUE;return t.forEach(function(a,o){if(!n&&o===t.length-1)return;let s=t[(o+1)%t.length],c=L._getProjectionToSegment(a.x,a.y,s.x,s.y,e.x,e.y),l=c[0],u=c[1],d=c[2];dt.length){let n=t;t=e,e=n}for(let t=0;t=0?`pointer`:e.indexOf(`touch`)>=0?`touch`:`mouse`},_getFirstPointerId(e){return e.touches?e.changedTouches[0].identifier:e.pointerId??999},releaseCanvas(...e){I.releaseCanvasOnDestroy&&e.forEach(e=>{e.width=0,e.height=0})},_cornerRadii(e,t,n){let r=Math.min(t,n)/2;if(typeof e==`number`){let t=Ct(e,r);return[t,t,t,t]}return[Ct(e[0],r),Ct(e[1],r),Ct(e[2],r),Ct(e[3],r)]},drawRoundedRectPath(e,t,n,r){let i=t<0?t:0,a=n<0?n:0;t=Math.abs(t),n=Math.abs(n);let[o,s,c,l]=L._cornerRadii(r,t,n);e.moveTo(i+o,a),e.lineTo(i+t-s,a),e.arc(i+t-s,a+s,s,Math.PI*3/2,0,!1),e.lineTo(i+t,a+n-c),e.arc(i+t-c,a+n-c,c,0,Math.PI/2,!1),e.lineTo(i+l,a+n),e.arc(i+l,a+n-l,l,Math.PI/2,Math.PI,!1),e.lineTo(i,a+o),e.arc(i+o,a+o,o,Math.PI,Math.PI*3/2,!1)},drawRoundedPolygonPath(e,t,n,r,i){r=Math.abs(r);for(let a=0;atypeof e==`number`?Math.floor(e):e)),i+=Et+c.join(Tt)+Dt)):(i+=o.property,e||(i+=At+o.val)),i+=Ot;return i}clearTrace(){this.traceArr=[]}_trace(e){let t=this.traceArr,n;t.push(e),n=t.length,n>=Nt&&t.shift()}reset(){let e=this.getCanvas().getPixelRatio();this.setTransform(1*e,0,0,1*e,0,0)}getCanvas(){return this.canvas}clear(e){let t=this.getCanvas();e?this.clearRect(e.x||0,e.y||0,e.width||0,e.height||0):this.clearRect(0,0,t.getWidth()/t.pixelRatio,t.getHeight()/t.pixelRatio)}_drawDeviceBuffer(e){let{x:t,y:n,width:r,height:i}=e._isolationRect;this.setTransform(1,0,0,1,0,0),this.imageSmoothingEnabled=!1,this.drawImage(e._canvas,0,0,r,i,t,n,r,i)}_applyLineCap(e){let t=e.attrs.lineCap;t&&this.setAttr(`lineCap`,t)}_getOpacity(e){if(!this._opacityRoot)return e.getAbsoluteOpacity();let t=e.opacity(),n=e.parent;for(;n&&n!==this._opacityRoot;)t*=n.opacity(),n=n.parent;return t}_applyOpacity(e){let t=this._getOpacity(e);t!==1&&this.setAttr(`globalAlpha`,t)}_applyLineJoin(e){let t=e.attrs.lineJoin;t&&this.setAttr(`lineJoin`,t)}_applyMiterLimit(e){let t=e.attrs.miterLimit;t!=null&&this.setAttr(`miterLimit`,t)}setAttr(e,t){this._context[e]=t}arc(e,t,n,r,i,a){this._context.arc(e,t,n,r,i,a)}arcTo(e,t,n,r,i){this._context.arcTo(e,t,n,r,i)}beginPath(){this._context.beginPath()}bezierCurveTo(e,t,n,r,i,a){this._context.bezierCurveTo(e,t,n,r,i,a)}clearRect(e,t,n,r){this._context.clearRect(e,t,n,r)}clip(...e){this._context.clip.apply(this._context,e)}closePath(){this._context.closePath()}createImageData(e,t){let n=arguments;if(n.length===2)return this._context.createImageData(e,t);if(n.length===1)return this._context.createImageData(e)}createLinearGradient(e,t,n,r){return this._context.createLinearGradient(e,t,n,r)}createPattern(e,t){return this._context.createPattern(e,t)}createRadialGradient(e,t,n,r,i,a){return this._context.createRadialGradient(e,t,n,r,i,a)}drawImage(e,t,n,r,i,a,o,s,c){let l=arguments,u=this._context;l.length===3?u.drawImage(e,t,n):l.length===5?u.drawImage(e,t,n,r,i):l.length===9&&u.drawImage(e,t,n,r,i,a,o,s,c)}ellipse(e,t,n,r,i,a,o,s){this._context.ellipse(e,t,n,r,i,a,o,s)}isPointInPath(e,t,n,r){return n?this._context.isPointInPath(n,e,t,r):this._context.isPointInPath(e,t,r)}fill(...e){this._context.fill.apply(this._context,e)}fillRect(e,t,n,r){this._context.fillRect(e,t,n,r)}strokeRect(e,t,n,r){this._context.strokeRect(e,t,n,r)}fillText(e,t,n,r){r?this._context.fillText(e,t,n,r):this._context.fillText(e,t,n)}measureText(e){return this._context.measureText(e)}getImageData(e,t,n,r){return this._context.getImageData(e,t,n,r)}lineTo(e,t){this._context.lineTo(e,t)}moveTo(e,t){this._context.moveTo(e,t)}rect(e,t,n,r){this._context.rect(e,t,n,r)}roundRect(e,t,n,r,i){this._context.roundRect(e,t,n,r,i)}putImageData(e,t,n){this._context.putImageData(e,t,n)}quadraticCurveTo(e,t,n,r){this._context.quadraticCurveTo(e,t,n,r)}restore(){this._context.restore()}rotate(e){this._context.rotate(e)}save(){this._context.save()}scale(e,t){this._context.scale(e,t)}setLineDash(e){this._context.setLineDash(e)}getLineDash(){return this._context.getLineDash()}setTransform(e,t,n,r,i,a){this._context.setTransform(e,t,n,r,i,a)}stroke(e){e?this._context.stroke(e):this._context.stroke()}strokeText(e,t,n,r){this._context.strokeText(e,t,n,r)}transform(e,t,n,r,i,a){this._context.transform(e,t,n,r,i,a)}translate(e,t){this._context.translate(e,t)}_enableTrace(){let e=this,t=jt.length,n=this.setAttr,r,i,a=function(t){let n=e[t],r;e[t]=function(){return i=wt(Array.prototype.slice.call(arguments,0)),r=n.apply(e,arguments),e._trace({method:t,args:i}),r}};for(r=0;r0&&f>0||(l=u=0,d=f=1);let p=this._isolationCanvas||=new e({width:0,height:0,pixelRatio:this.pixelRatio});if(p.widthMath.min(r,Math.ceil((n4*t.width*t.height?e._isolationLowFrames+1:0,e._isolationLowFrames>=10?this._releaseIsolationCanvas():(t.width=t.height=0,e._trimIsolationCanvas())}_releaseIsolationCanvas(){let e=this._isolationCanvas;e&&(e._releaseIsolationCanvas(),L.releaseCanvas(e._canvas),this._isolationCanvas=void 0)}setSize(e,t){this._releaseIsolationCanvas(),super.setSize(e,t)}constructor(e={width:0,height:0,willReadFrequently:!1}){super(e),this._isolationPeak={width:0,height:0},this._isolationLowFrames=0,this.context=new Lt(this,{willReadFrequently:e.willReadFrequently}),this.setSize(e.width,e.height)}},Vt=class extends zt{constructor(e={width:0,height:0}){super(e),this.hitCanvas=!0,this.context=new Rt(this),this.context.imageSmoothingEnabled=!1,this.setSize(e.width,e.height)}},R={get isDragging(){let e=!1;return R._dragElements.forEach(t=>{t.dragStatus===`dragging`&&(e=!0)}),e},get node(){let e;for(let t of R._dragElements.values()){if(t.dragStatus===`dragging`)return t.node;e=t.node}return e},_dragElements:new Map,_listenToWindow(e){let t=t=>R._endDragBefore(t,e),n=t=>R._batchEvents(()=>R._drag(t,e),e),r=e=>R._batchEvents(()=>R._endDragAfter(e));e.addEventListener(`mouseup`,t,!0),e.addEventListener(`touchend`,t,!0),e.addEventListener(`touchcancel`,t,!0),e.addEventListener(`mousemove`,n),e.addEventListener(`touchmove`,n),e.addEventListener(`mouseup`,r,!1),e.addEventListener(`touchend`,r,!1),e.addEventListener(`touchcancel`,r,!1)},_batchEvents(e,t){if(!R._dragElements.size)return;let n=new Set;for(let{node:e}of R._dragElements.values()){let r=e.getStage();if(!r||t&&r._getOwnerWindow()!==t)continue;let i=r.eventBatchFunc();i&&n.add(i)}let r=e;for(let e of n){let t=r;r=()=>L._batchEvents(e,t)}r()},_drag(e,t){let n=[],r=new Set;R._dragElements.forEach((i,a)=>{let{node:o}=i,s=o.getStage();if(t&&s._getOwnerWindow()!==t||(r.has(s)||(s.setPointersPositions(e),r.add(s)),i.pointerEventType&&i.pointerEventType!==s._pointerEventType))return;i.pointerId===void 0&&(i.pointerId=L._getFirstPointerId(e),i.pointerEventType=s._pointerEventType,i.dragStatus===`dragging`&&s._cancelClick(i.pointerId,i.pointerEventType));let c=s._changedPointerPositions.find(e=>e.id===i.pointerId);if(c){if(i.dragStatus!==`dragging`){let t=o.dragDistance();if(Math.max(Math.abs(c.x-i.startPointerPos.x),Math.abs(c.y-i.startPointerPos.y)){t.getStage()&&t.fire(`dragmove`,{type:`dragmove`,target:t,evt:e},!0)})},_endDragBefore(e,t,n){let r=[],i=new Set;R._dragElements.forEach((a,o)=>{let{node:s}=a;if(n&&a!==n&&a.pointerId!==n.pointerId)return;let c=s.getStage();if(e&&!i.has(c)&&(!t||c._getOwnerWindow()===t)&&(c.setPointersPositions(e),i.add(c)),n||(!e||!a.pointerEventType||a.pointerEventType===L._getEventType(e.type))&&(a.pointerId===void 0||c._changedPointerPositions.some(e=>e.id===a.pointerId))){if(a.dragStatus===`ready`)R._dragElements.delete(o);else{c._cancelClick(a.pointerId,a.pointerEventType),a.dragStatus=`stopped`;let e=s.getLayer()||c;e&&r.indexOf(e)===-1&&r.push(e)}}}),r.forEach(e=>{e.draw()})},_endDragAfter(e,t){R._dragElements.forEach((n,r)=>{n.dragStatus!==`stopped`||t&&n!==t&&n.pointerId!==t.pointerId||(n.node.fire(`dragend`,{type:`dragend`,target:n.node,evt:e},!0),n.dragStatus!==`dragging`&&R._dragElements.delete(r))})}},Ht=new Map,Ut=I._global.PointerEvent!==void 0;function Wt(e,t){let n=Ht.get(e);return n&&(!t||n.stage===t)?n.shape:void 0}function Gt(e,t,n){e._fire(t,{evt:new PointerEvent(t,{pointerId:n}),pointerId:n})}function z(e,t){return Ht.get(e)?.shape===t}function Kt(e,t){var n;Jt(e);let r=t.getStage();if(r&&(Ht.set(e,{shape:t,stage:r}),Ut)){try{(n=r.content)==null||n.setPointerCapture(e)}catch{}Gt(t,`gotpointercapture`,e)}}function qt(e){Ht.forEach(({shape:t,stage:n},r)=>{(t===e||n===e)&&Jt(r)})}function Jt(e,t){var n;let r=Ht.get(e);if(!r||t&&r.shape!==t)return;let{shape:i,stage:a}=r;if(Ht.delete(e),Ut){try{(n=a.content)==null||n.releasePointerCapture(e)}catch{}Gt(i,`lostpointercapture`,e)}}function Yt(e){return L._isString(e)?`"`+e+`"`:Object.prototype.toString.call(e)===`[object Number]`||L._isBoolean(e)?e:Object.prototype.toString.call(e)}function Xt(e){return e>255?255:e<0?0:Math.round(e)}function B(){if(I.isUnminified)return function(e,t){return L._isNumber(e)||L.warn(Yt(e)+` is a not valid value for "`+t+`" attribute. The value should be a number.`),e}}function Zt(e){if(I.isUnminified)return function(t,n){let r=L._isNumber(t),i=L._isArray(t)&&t.length==e;return!r&&!i&&L.warn(Yt(t)+` is a not valid value for "`+n+`" attribute. The value should be a number or Array(`+e+`)`),t}}function Qt(){if(I.isUnminified)return function(e,t){return L._isNumber(e)||e===`auto`||L.warn(Yt(e)+` is a not valid value for "`+t+`" attribute. The value should be a number or "auto".`),e}}function $t(){if(I.isUnminified)return function(e,t){return L._isString(e)||L.warn(Yt(e)+` is a not valid value for "`+t+`" attribute. The value should be a string.`),e}}function en(){if(I.isUnminified)return function(e,t){let n=L._isString(e),r=Object.prototype.toString.call(e)===`[object CanvasGradient]`||e&&e.addColorStop;return n||r||L.warn(Yt(e)+` is a not valid value for "`+t+`" attribute. The value should be a string or a native gradient.`),e}}function tn(){if(I.isUnminified)return function(e,t){return e instanceof ht||(L._isArray(e)?e.forEach(function(e){L._isNumber(e)||L.warn(`"`+t+`" attribute has non numeric element `+e+`. Make sure that all elements are numbers.`)}):L.warn(Yt(e)+` is a not valid value for "`+t+`" attribute. The value should be a array of numbers.`)),e}}function nn(){if(I.isUnminified)return function(e,t){return e!==!0&&e!==!1&&L.warn(Yt(e)+` is a not valid value for "`+t+`" attribute. The value should be a boolean.`),e}}function rn(e){if(I.isUnminified)return function(t,n){return t==null||L.isObject(t)||L.warn(Yt(t)+` is a not valid value for "`+n+`" attribute. The value should be an object with properties `+e),t}}var an=`get`,on=`set`,V={addGetterSetter(e,t,n,r,i){V.addGetter(e,t,n),V.addSetter(e,t,r,i),V.addOverloadedGetterSetter(e,t)},addGetter(e,t,n){let r=an+L._capitalize(t),i=Array.isArray(n),a=function(){let e=this.attrs[t];return e===void 0?i?n.slice():n:e};a._def=n,e.prototype[r]=e.prototype[r]||a},addSetter(e,t,n,r){let i=on+L._capitalize(t);e.prototype[i]||V.overWriteSetter(e,t,n,r)},overWriteSetter(e,t,n,r){let i=on+L._capitalize(t);e.prototype[i]=function(e){return n&&e!=null&&(e=n.call(this,e,t)),this._setAttr(t,e),r&&r.call(this),this}},addComponentsGetterSetter(e,t,n,r,i){let a=n.length,o=L._capitalize,s=an+o(t),c=on+o(t),l=n.map(e=>t+o(e)),u=l.map(e=>an+o(e));e.prototype[s]=function(){let e={};for(let t=0;t{this._setAttr(t+o(e),void 0)}),this._fireChangeEvent(t,a,e),i&&i.call(this),this},V.addOverloadedGetterSetter(e,t)},addOverloadedGetterSetter(e,t){let n=L._capitalize(t),r=on+n,i=an+n,a=function(){return arguments.length?(this[r](arguments[0]),this):this[i]()};e.prototype[t]=a},backCompat(e,t){L.each(t,function(t,n){let r=e.prototype[n],i=an+L._capitalize(t),a=on+L._capitalize(t);function o(){return L.error(`"`+t+`" method is deprecated and will be removed soon. Use ""`+n+`" instead.`),r.apply(this,arguments)}e.prototype[t]=o,e.prototype[i]=o,e.prototype[a]=o})},afterSetFilter(){this._filterUpToDate=!1}};function sn(e){let t=[],n=/(\w+)\(([^)]*)\)/g,r;for(;(r=n.exec(e))!==null;){let[,e,n]=r;if(![`blur`,`brightness`,`contrast`,`grayscale`,`sepia`,`invert`].includes(e)){L.warn(`CSS filter "${e}" is not supported in fallback mode. Consider using function filters for better compatibility.`);continue}let i=n.trim()===``?e===`blur`?0:1:parseFloat(n)/(n.includes(`%`)?100:1);t.push({name:e,value:i})}return function(e,n=1){for(let{name:r,value:i}of t){if([`grayscale`,`sepia`,`invert`].includes(r)){let t=Math.min(1,Math.max(0,i)),n=e.data;for(let e=0;e0?e._pendingUpdates.add(t):t()}static _flushUpdateBatch(){if(e._updateBatchDepth>0)return;let t=e._pendingUpdates;t.size&&(e._pendingUpdates=new Set,t.forEach(e=>e()))}static _updateBatch(t){e._updateBatchDepth++;try{return t()}finally{e._updateBatchDepth--,e._flushUpdateBatch()}}static _beginUpdateBatch(){e._updateBatchDepth++;let t=!1;return()=>{t||(t=!0,e._updateBatchDepth--,e._flushUpdateBatch())}}clearCache(){return this._releaseCanvasCache(),this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(e){let t=e||{},n={};if(t.x===void 0||t.y===void 0||t.width===void 0||t.height===void 0){let e=this._isUnderCache;this._isUnderCache=!0,n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}),this._isUnderCache=e}let r=t.x===void 0?Math.floor(n.x):t.x,i=t.y===void 0?Math.floor(n.y):t.y,a=Math.ceil(t.width||n.x+n.width-r),o=Math.ceil(t.height||n.y+n.height-i),s=t.pixelRatio,c=t.offset||0,l=t.drawBorder||!1,u=t.hitCanvasPixelRatio||1;if(a<=0||o<=0||!isFinite(r+i+a+o))return L.error(`Can not cache the node. Its size is 0 or its bounds are not finite numbers (${r}, ${i}, ${a}x${o}). Caching is skipped.`),this;a+=c*2,o+=c*2,r-=c,i-=c;let d=new Bt({pixelRatio:s,width:a,height:o}),f=new Bt({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),p=d.getContext();d.isCache=!0,this._releaseCanvasCache(),this._filterUpToDate=!1,t.imageSmoothingEnabled===!1&&(d.getContext()._context.imageSmoothingEnabled=!1,f.getContext()._context.imageSmoothingEnabled=!1),p.save(),p.translate(-r,-i),this._isUnderCache=!0,this._clearSelfAndDescendantCache(cn);try{this.drawScene(d,this)}catch(e){throw L.releaseCanvas(d._canvas),e}finally{this._isUnderCache=!1,this._clearSelfAndDescendantCache(cn),p.restore(),d._releaseIsolationCanvas()}return l&&(p.save(),p.beginPath(),p.rect(0,0,a,o),p.closePath(),p.setAttr(`strokeStyle`,`red`),p.setAttr(`lineWidth`,5),p.stroke(),p.restore()),this._canvasCache={scene:d,filter:f,hit:null,hitConfig:{pixelRatio:u,width:a,height:o},x:r,y:i},this._clearSelfAndDescendantCache(),this._requestDraw(),this}_getCachedHitCanvas(e){if(e===this)return null;let t=this._getCanvasCache();if(!t)return null;if(t.hit)return t.hit;let n=new Vt(t.hitConfig);n.isCache=!0;let r=n.getContext();return r.save(),r.translate(-t.x,-t.y),this.drawHit(n,this),r.restore(),t.hit=n,n}isCached(){return!!this._canvasCache}getClientRect(e){throw Error(`abstract "getClientRect" method call`)}_getCachedSceneRect(e){let t=e._forDrawing&&!this._isUnderCache&&this._getCanvasCache();if(!t)return;let n={x:t.x,y:t.y,width:t.scene.width/t.scene.pixelRatio,height:t.scene.height/t.scene.pixelRatio};return e.skipTransform?n:this._transformedRect(n,e.relativeTo)}_transformedRect(e,t){return this.getAbsoluteTransform(t)._getTransformedRect(e)}_drawCachedSceneCanvas(e){e.save(),e._applyOpacity(this),e._applyGlobalCompositeOperation(this);let t=this._getCanvasCache();e.translate(t.x,t.y);let n=this._getCachedSceneCanvas(),r=n.pixelRatio;e.drawImage(n._canvas,0,0,n.width/r,n.height/r),e.restore()}_drawCachedHitCanvas(e,t){let n=this._getCanvasCache();e.save(),e.translate(n.x,n.y),e.drawImage(t._canvas,0,0,t.width/t.pixelRatio,t.height/t.pixelRatio),e.restore()}_getCachedSceneCanvas(){let e=this.filters(),t=this._getCanvasCache(),n=t.scene,r=t.filter,i=r.getContext(),a,o,s,c;if(!e||e.length===0)return n;if(this._filterUpToDate)return r;let l=!0;for(let t=0;tt===void 0?e:`${Number(t)*u}${n}`);return i.clear(),i.save(),i.setAttr(`filter`,t),i.drawImage(n._canvas,0,0,n.getWidth()/u,n.getHeight()/u),i.restore(),this._filterUpToDate=!0,r}try{for(a=e.length,i.clear(),i.drawImage(n._canvas,0,0,n.getWidth()/u,n.getHeight()/u),o=i.getImageData(0,0,r.getWidth(),r.getHeight()),s=0;s{this.isAncestorOf(e.node)&&R._dragElements.delete(t)}),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(ln),this._clearSelfAndDescendantCache(cn),this._clearSelfAndDescendantCache(vn),this._clearSelfAndDescendantCache(xn),this._clearSelfAndDescendantCache(pn)}_remove(){let e=this.getParent();e&&e.children&&(e.children.splice(this.index,1),e._setChildrenIndices(),this.parent=null),this._clearCaches()}destroy(){return this._fire(`destroy`,{target:this}),qt(this),this.remove(),this.clearCache(),this}getAttr(e){let t=`get`+L._capitalize(e);return L._isFunction(this[t])?this[t]():this.attrs[e]}getAncestors(){let e=this.getParent(),t=[];for(;e;)t.push(e),e=e.getParent();return t}getAttrs(){return this.attrs||{}}setAttrs(e){return this._batchTransformChanges(()=>{let t,n;if(!e)return this;for(t in e)t!==dn&&(n=hn+L._capitalize(t),L._isFunction(this[n])?this[n](e[t]):this._setAttr(t,e[t]))}),this}isListening(){return this._getCache(pn,this._isListening)}_isListening(e){if(!this.listening())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isListening(e):!0}isVisible(){return this._getCache(xn,this._isVisible)}_isVisible(e){if(!this.visible())return!1;let t=this.getParent();return t&&t!==e&&this!==e?t._isVisible(e):!0}shouldDrawHit(e){return e?this._isVisible(e)&&this._isListening(e):this.isListening()&&this.isVisible()}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let e=this.getDepth(),t=this,n=0,r,i,a,o;function s(c){for(r=[],i=c.length,a=0;a0&&r[0].getDepth()<=e&&s(r)}let c=this.getStage();return t.nodeType!==bn&&c&&s(c.children),n}getDepth(){let e=0,t=this.parent;for(;t;)e++,t=t.parent;return e}_batchTransformChanges(t){this._batchingTransformChange?t():e._updateBatch(()=>{this._batchingTransformChange=!0;try{t()}finally{this._batchingTransformChange=!1,this._needClearTransformCache&&(this._needClearTransformCache=!1,this._clearCache(yn),this._clearSelfAndDescendantCache(ln))}})}setPosition(e){return this._batchTransformChanges(()=>{this.x(e.x),this.y(e.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){let e=this.getStage();if(!e)return null;let t=e.getPointerPosition();if(!t)return null;let n=this.getAbsoluteTransform().copy();return n.invert(),n.point(t)}getAbsolutePosition(e){let t=this.getAbsoluteTransform(e).getMatrix(),n=new Ze,r=this.offset();return n.m=t.slice(),n.translate(r.x,r.y),n.getTranslation()}setAbsolutePosition(e){let{x:t,y:n,...r}=this._clearTransform();this.attrs.x=t,this.attrs.y=n,this._clearCache(yn);let i=this._getAbsoluteTransform().copy(),a=i.isInvertible();i.invert(),i.translate(e.x,e.y);let{x:o,y:s}=i.getTranslation();return this._setTransform(r),a?this.setPosition({x:this.attrs.x+o,y:this.attrs.y+s}):L.warn(`Cannot set the absolute position: the absolute transform is not invertible (an ancestor has a zero scale).`),this._clearCache(yn),this._clearSelfAndDescendantCache(ln),this}_setTransform(e){let t;for(t in e)this.attrs[t]=e[t]}_clearTransform(){let e={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,e}move(e){let t=e.x,n=e.y,r=this.x(),i=this.y();return t!==void 0&&(r+=t),n!==void 0&&(i+=n),this.setPosition({x:r,y:i}),this}rotate(e){return this.rotation(this.rotation()+e),this}moveToTop(){if(!this.parent)return L.warn(`Node has no parent. moveToTop function is ignored.`),!1;let e=this.index;return e0&&(this.parent.children.splice(e,1),this.parent.children.splice(e-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return L.warn(`Node has no parent. moveToBottom function is ignored.`),!1;let e=this.index;return e>0&&(this.parent.children.splice(e,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(e){if(!this.parent)return L.warn(`Node has no parent. zIndex parameter is ignored.`),this;(e<0||e>=this.parent.children.length)&&L.warn(`Unexpected value `+e+` for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to `+(this.parent.children.length-1)+`.`);let t=this.index;return this.parent.children.splice(t,1),this.parent.children.splice(e,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(cn,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let e=this.opacity(),t=this.getParent();return t&&!t._isUnderCache&&(e*=t.getAbsoluteOpacity()),e}moveTo(e){return this.getParent()!==e&&(this._remove(),e.add(this)),this}toObject(){let e=this.getAttrs(),t,n,r,i={attrs:{},className:this.getClassName()};for(t in e)n=e[t],n instanceof ht&&(n=Array.from(n)),r=L.isObject(n)&&!L._isPlainObject(n)&&!L._isArray(n),!r&&(this[`get`+L._capitalize(t)]?._def!==n||t===`brightness`||t===`threshold`)&&(i.attrs[t]=t===`filters`&&L._isArray(n)?n.filter(e=>typeof e==`string`):L.isObject(n)?L._prepareToStringify(n):n);return i}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(e,t,n){let r=[];t&&this._isMatch(e)&&r.push(this);let i=this.parent;for(;i;){if(i===n)return r;i._isMatch(e)&&r.push(i),i=i.parent}return r}isAncestorOf(e){return!1}findAncestor(e,t,n){return this.findAncestors(e,t,n)[0]}_isMatch(e){if(!e)return!1;if(typeof e==`function`)return e(this);let t=e.replace(/ /g,``).split(`,`),n=t.length,r,i;for(r=0;r{try{let{callback:r,...i}=e||{};L._urlToImage(this.toDataURL(i),function(e){t(e),r?.(e)},n)}catch(e){n(e)}})}toBlob(e){return new Promise((t,n)=>{try{this.toCanvas(e).toBlob(r=>{var i;r?(t(r),(i=e?.callback)==null||i.call(e,r)):n(Error(`Konva: toBlob() failed, the canvas was not encoded`))},e?.mimeType,e?.quality)}catch(e){n(e)}})}setSize(e){return this.width(e.width),this.height(e.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return this.attrs.dragDistance===void 0?this.parent?this.parent.getDragDistance():I.dragDistance:this.attrs.dragDistance}_off(e,t,n){let r=this.eventListeners[e],i,a,o;for(i=0;i=0)||R._dragElements.has(this._id))return;let t=!1;R._dragElements.forEach(e=>{this.isAncestorOf(e.node)&&(t=!0)}),t||this._createDragElement(e)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;let e=R._dragElements.get(this._id),t=e&&e.dragStatus===`dragging`,n=e&&e.dragStatus===`ready`;t?this.stopDrag():n&&R._dragElements.delete(this._id)}}_dragCleanup(){this.off(`mousedown.konva`),this.off(`touchstart.konva`)}isClientRectOnScreen(e={x:0,y:0}){let t=this.getStage();if(!t)return!1;let n={x:-e.x,y:-e.y,width:t.width()+2*e.x,height:t.height()+2*e.y};return L.haveIntersection(n,this.getClientRect())}static create(e,t){return L._isString(e)&&(e=JSON.parse(e)),this._createNode(e,t)}static _createNode(t,n){let r=e.prototype.getClassName.call(t),i=t.children,a,o,s;if(n&&(t.attrs.container=n),!I[r]){let e=i?`Group`:`Shape`;L.warn(`Can not find a node with class name "`+r+`". Fallback to "${e}".`),r=e}let c=I[r];if(a=new c(t.attrs),i)for(o=i.length,s=0;s0}removeChildren(){return this._clearChildren(`remove`)}destroyChildren(){return this._clearChildren(`destroy`)}_clearChildren(e){return H._updateBatch(()=>(this.children.forEach(t=>{t.parent=null,t.index=0,t[e]()}),this.children=[],this._notifySubtreeChange(),this._requestDraw(),this))}add(...e){if(e.length===0)return this;if(e.length>1){for(let t=0;t0?t[0]:void 0}_generalFind(e,t){let n=[];return this._descendants(r=>{let i=r._isMatch(e);return i&&n.push(r),!!(i&&t)}),n}_descendants(e){let t=!1;for(let n of this.children)if(t=e(n),t||n.hasChildren()&&(t=n._descendants(e),t))return!0;return!1}toObject(){let e=H.prototype.toObject.call(this);return e.children=[],this.children.forEach(t=>{e.children.push(t.toObject())}),e}isAncestorOf(e){let t=e.getParent();for(;t;){if(t._id===this._id)return!0;t=t.getParent()}return!1}clone(e){let t=H.prototype.clone.call(this,e);return this.children.forEach(function(e){t.add(e.clone())}),t}getAllIntersections(e){let t=[];return this.find(`Shape`).forEach(n=>{n.isVisible()&&n.intersects(e)&&t.push(n)}),t}_clearSelfAndDescendantCache(e){var t;let n=e===void 0||e===`absoluteTransform`;n&&H._updateBatchDepth++;try{if(super._clearSelfAndDescendantCache(e),e===`absoluteTransform`&&this.isCached())return;(t=this.children)==null||t.forEach(function(t){t._clearSelfAndDescendantCache(e)})}finally{n&&--H._updateBatchDepth===0&&H._flushUpdateBatch()}}_setChildrenIndices(){var e;(e=this.children)==null||e.forEach(function(e,t){e.index=t}),this._notifySubtreeChange(),this._requestDraw()}drawScene(e,t){let n=this.getLayer(),r=e||n&&n.getCanvas(),i=r&&r.getContext(),a=this._getCanvasCache(),o=a&&a.scene,s=t===this;if(!(t?this._isVisible(t):this.isVisible())&&!s)return this;if(o){i.save();let e=this.getAbsoluteTransform(t).getMatrix();i.transform(e[0],e[1],e[2],e[3],e[4],e[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren(`drawScene`,r,t);return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;let n=this.getLayer(),r=e||n&&n.hitCanvas,i=r&&r.getContext(),a=this._getCachedHitCanvas(t);if(a){i.save();let e=this.getAbsoluteTransform(t).getMatrix();i.transform(e[0],e[1],e[2],e[3],e[4],e[5]),this._drawCachedHitCanvas(i,a),i.restore()}else this._drawChildren(`drawHit`,r,t);return this}_drawChildren(e,t,n){let r=t&&t.getContext(),i=this.clipWidth(),a=this.clipHeight(),o=this.clipFunc(),s=typeof i==`number`&&typeof a==`number`||o,c=n===this;if(s){r.save();let e=this.getAbsoluteTransform(n),t=e.getMatrix();r.transform(t[0],t[1],t[2],t[3],t[4],t[5]),r.beginPath();let s;if(o)s=o.call(this,r,this);else{let e=this.clipX(),t=this.clipY();r.rect(e||0,t||0,i,a)}r.clip.apply(r,s),t=e.copy().invert().getMatrix(),r.transform(t[0],t[1],t[2],t[3],t[4],t[5])}let l=!c&&this.globalCompositeOperation()!==`source-over`&&e===`drawScene`;l&&(r.save(),r._applyGlobalCompositeOperation(this));try{this._drawChildNodes(e,t,n)}finally{l&&r.restore(),s&&r.restore()}}_drawChildNodes(e,t,n){var r;(r=this.children)==null||r.forEach(function(r){r[e](t,n)})}getClientRect(e={}){var t;let n=this._getCachedSceneRect(e);if(n)return n;let r=e.skipTransform,i=e.relativeTo,[a,o,s,c]=this.getAbsoluteTransform().getMatrix(),l=!r&&(e._forDrawing||a*c-o*s===0),u,d,f,p,m={x:1/0,y:1/0,width:0,height:0},h=this;return(t=this.children)==null||t.forEach(function(t){if(!t.visible())return;let n=t.getClientRect({relativeTo:l?i:h,_forDrawing:e._forDrawing,skipShadow:e.skipShadow,skipStroke:e.skipStroke});n.width===0&&n.height===0||!isFinite(n.x+n.y+n.width+n.height)||(u===void 0?(u=n.x,d=n.y,f=n.x+n.width,p=n.y+n.height):(u=Math.min(u,n.x),d=Math.min(d,n.y),f=Math.max(f,n.x+n.width),p=Math.max(p,n.y+n.height)))}),m=u===void 0?{x:0,y:0,width:0,height:0}:{x:u,y:d,width:f-u,height:p-d},!r&&!l?this._transformedRect(m,i):m}};V.addComponentsGetterSetter(Tn,`clip`,[`x`,`y`,`width`,`height`]),V.addGetterSetter(Tn,`clipX`,void 0,B()),V.addGetterSetter(Tn,`clipY`,void 0,B()),V.addGetterSetter(Tn,`clipWidth`,void 0,B()),V.addGetterSetter(Tn,`clipHeight`,void 0,B()),V.addGetterSetter(Tn,`clipFunc`);var En=`Stage`,Dn=`string`,On=`px`,kn=`mouseout`,An=`mouseleave`,jn=`mouseover`,Mn=`mouseenter`,Nn=`mousemove`,Pn=`mousedown`,Fn=`mouseup`,In=`pointermove`,Ln=`pointerdown`,Rn=`pointerup`,zn=`pointercancel`,Bn=`lostpointercapture`,Vn=`pointerout`,Hn=`pointerleave`,Un=`pointerover`,Wn=`pointerenter`,Gn=`contextmenu`,Kn=`touchstart`,qn=`touchend`,Jn=`touchmove`,Yn=`touchcancel`,Xn=`wheel`,Zn=5,Qn=[[Mn,`_pointerenter`],[Pn,`_pointerdown`],[Nn,`_pointermove`],[Fn,`_pointerup`],[An,`_pointerleave`],[Kn,`_pointerdown`],[Jn,`_pointermove`],[qn,`_pointerup`],[Yn,`_pointercancel`],[jn,`_pointerover`],[Xn,`_wheel`],[Gn,`_contextmenu`],[Ln,`_pointerdown`],[In,`_pointermove`],[Rn,`_pointerup`],[zn,`_pointercancel`],[Hn,`_pointerleave`],[Bn,`_lostpointercapture`]],$n={mouse:{[Vn]:kn,[Hn]:An,[Un]:jn,[Wn]:Mn,[In]:Nn,[Ln]:Pn,[Rn]:Fn,[zn]:`mousecancel`,pointerclick:`click`,pointerdblclick:`dblclick`},touch:{[Vn]:`touchout`,[Hn]:`touchleave`,[Un]:`touchover`,[Wn]:`touchenter`,[In]:Jn,[Ln]:Kn,[Rn]:qn,[zn]:Yn,pointerclick:`tap`,pointerdblclick:`dbltap`},pointer:{[Vn]:Vn,[Hn]:Hn,[Un]:Un,[Wn]:Wn,[In]:In,[Ln]:Ln,[Rn]:Rn,[zn]:zn,pointerclick:`pointerclick`,pointerdblclick:`pointerdblclick`}},er=e=>{let t=L._getEventType(e);if(t===`pointer`)return I.pointerEventsEnabled&&$n.pointer;if(t===`touch`)return $n.touch;if(t===`mouse`)return $n.mouse};function tr(e={}){return(e.clipFunc||e.clipWidth||e.clipHeight)&&L.warn(`Stage does not support clipping. Please use clip for Layers or Groups.`),e}var nr=`Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);`,rr=[],ir=new WeakSet,ar=e=>{e&&!ir.has(e)&&(ir.add(e),R._listenToWindow(e),e.document.addEventListener(`visibilitychange`,()=>{rr.forEach(e=>{e.batchDraw()})}))},or=class extends Tn{constructor(e){super(tr(e)),this._pointerPositions=[],this._changedPointerPositions=[],this._pointerStates=new Map,this._lastClicks={},this._buildDOM(),this._bindContentEvents(),rr.push(this),this.on(`widthChange.konva heightChange.konva`,this._resizeDOM),this.on(`visibleChange.konva`,this._checkVisibility),this.on(`clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva`,()=>{tr(this.attrs)}),this._checkVisibility()}_validateAdd(e){let t=e.getType()===`Layer`,n=e.getType()===`FastLayer`;t||n||L.throw(`You may only add layers to the stage.`)}_checkVisibility(){if(!this.content)return;let e=this.visible()?``:`none`;this.content.style.display=e}_getOwnerWindow(){return(this.content||this.container())?.ownerDocument?.defaultView||(I.isBrowser?window:null)}setContainer(e){if(typeof e===Dn){let t;if(e.charAt(0)===`.`){let t=e.slice(1);e=document.getElementsByClassName(t)[0]}else t=e.charAt(0)===`#`?e.slice(1):e,e=document.getElementById(t);if(!e)throw`Can not find container in document with id `+t}return this._setAttr(`container`,e),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),e.appendChild(this.content),ar(this._getOwnerWindow())),this}shouldDrawHit(){return!0}clear(){let e=this.children,t=e.length;for(let n=0;n-1&&rr.splice(n,1),L.releaseCanvas(this.bufferHitCanvas._canvas),this}getPointerPosition(){let e=this._pointerPositions[0]||this._changedPointerPositions[0];return e?{x:e.x,y:e.y}:(L.warn(nr),null)}_getPointerById(e){return this._pointerPositions.find(t=>t.id===e)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(e){e={...e},e.x=e.x||0,e.y=e.y||0,e.width=e.width||this.width(),e.height=e.height||this.height();let t=new Bt({width:e.width,height:e.height,pixelRatio:e.pixelRatio||1}),n=t.getContext()._context,r=this.children;return(e.x||e.y)&&n.translate(-1*e.x,-1*e.y),r.forEach(function(t){if(!t.isVisible())return;let r=t._toKonvaCanvas(e);n.drawImage(r._canvas,e.x,e.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio()),L.releaseCanvas(r._canvas)}),t}getIntersection(e){if(!e)return null;let t=this.children,n=t.length-1;for(let r=n;r>=0;r--){let n=t[r].getIntersection(e);if(n)return n}return null}_resizeDOM(){let e=this.width(),t=this.height();this.content&&(this.content.style.width=e+On,this.content.style.height=t+On),this.children.forEach(n=>{n._setSize({width:e,height:t}),n.draw()})}add(e,...t){if(arguments.length>1){for(let e=0;eZn&&L.warn(`The stage has `+n+` layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.`),e._setSize({width:this.width(),height:this.height()}),e.draw(),I.isBrowser&&this.content.appendChild(e.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(e){return z(e,this)}setPointerCapture(e){Kt(e,this)}releaseCapture(e){Jt(e,this)}getLayers(){return this.getChildren()}_bindContentEvents(){I.isBrowser&&Qn.forEach(([e,t])=>{this.content.addEventListener(e,e=>{this._batchEvents(()=>this[t](e))},{passive:!1})})}_batchEvents(e){L._batchEvents(this.eventBatchFunc(),e)}_pointerenter(e){this.setPointersPositions(e);let t=er(e.type);t&&this._fire(t.pointerenter,{evt:e,target:this,currentTarget:this})}_pointerover(e){this.setPointersPositions(e);let t=er(e.type);t&&this._fire(t.pointerover,{evt:e,target:this,currentTarget:this})}_pointerEventsEnabled(){if(I.hitOnDragEnabled)return!0;for(let{node:e,dragStatus:t}of R._dragElements.values())if(t===`dragging`&&e.getStage()===this)return!1;return!this.getLayers().some(e=>I.Transformer?._isLayerTransforming(e))}_cancelClick(e,t){let n=t?[t]:[`mouse`,`touch`,`pointer`];for(let t of n){let n=this._pointerStates.get(`${t}:${e}`);n&&(n.clickStartShape=void 0,n.relatedPointer&&(n.relatedPointer.clickStartShape=void 0))}}_pointerleave(e){let t=er(e.type),n=L._getEventType(e.type);if(!t)return;this.setPointersPositions(e);let r=this._changedPointerPositions[0]?.id,i=`${n}:${r}`,a=this._pointerStates.get(i),o=(a?.targetShape)?.getStage()===this?a.targetShape:void 0,s=this._pointerEventsEnabled()||e.pointerType===`touch`&&!a?.downPosition;s&&(a?.clickStartShape===void 0?this._pointerStates.delete(i):a.targetShape=void 0),o&&s?(o._fireAndBubble(t.pointerout,{evt:e,pointerId:r}),o._fireAndBubble(t.pointerleave,{evt:e,pointerId:r}),this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this})):s&&(this._fire(t.pointerleave,{evt:e,target:this,currentTarget:this}),this._fire(t.pointerout,{evt:e,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[],this._changedPointerPositions=[],this._pointerEventType=void 0}_pointerdown(e){let t=er(e.type),n=L._getEventType(e.type);if(!t)return;this.setPointersPositions(e);let r=!1;this._changedPointerPositions.forEach(i=>{let a=this.getIntersection(i),o=`${n}:${i.id}`,s={targetShape:this._pointerStates.get(o)?.targetShape,clickStartShape:a&&a.isListening()?a:null,lastClick:this._lastClicks[n],downPosition:i,pointerType:e.pointerType};if(this._pointerStates.delete(o),n!==`pointer`){for(let[e,t]of[...this._pointerStates].reverse())if(!(!e.startsWith(`pointer:`)||!t.downPosition||n===`touch`&&t.relatedPointer)&&(n===`mouse`?t.pointerType!==`touch`:t.pointerType===`touch`&&t.downPosition.x===i.x&&t.downPosition.y===i.y)){s.relatedPointer=t,t.relatedPointer=s,t.clickStartShape===void 0&&(s.clickStartShape=void 0);break}}this._pointerStates.set(o,s);for(let e of R._dragElements.values())e.dragStatus===`dragging`&&(e.pointerId===void 0||e.pointerEventType===n&&e.pointerId===i.id||e.pointerEventType===`mouse`&&n===`pointer`&&s.pointerType!==`touch`)&&e.node.getStage()===this&&(e.pointerId===void 0&&n!==`pointer`&&(e.pointerId=i.id,e.pointerEventType=n),this._cancelClick(i.id,n));if(!a||!a.isListening())return;I.capturePointerEventsEnabled&&a.setPointerCapture(i.id),a._fireAndBubble(t.pointerdown,{evt:e,pointerId:i.id}),r=!0;let c=e.type.indexOf(`touch`)>=0;a.preventDefault()&&e.cancelable&&c&&e.preventDefault()}),r||this._fire(t.pointerdown,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointermove(e){let t=er(e.type),n=L._getEventType(e.type);if(!t)return;let r=e.type.indexOf(`touch`)>=0||e.pointerType===`touch`;if(e.cancelable&&r){for(let{node:t,dragStatus:n}of R._dragElements.values())if(n===`dragging`&&t.getStage()===this&&t.preventDefault()){e.preventDefault();break}}if(this.setPointersPositions(e),!this._pointerEventsEnabled())return;let i={},a=!1;this._changedPointerPositions.forEach(r=>{let o=`${n}:${r.id}`,s=this._pointerStates.get(o);s||(s={},this._pointerStates.set(o,s));let c=Wt(r.id)||this.getIntersection(r),l=s.targetShape===c||s.targetShape?.getStage()===this?s.targetShape:void 0,u=r.id,d={evt:e,pointerId:u},f=l!==c;s.targetShape=c&&c.isListening()?c:void 0,f&&l&&(l._fireAndBubble(t.pointerout,{...d},c),l._fireAndBubble(t.pointerleave,{...d},c)),c&&c.isListening()?(a=!0,f&&(c._fireAndBubble(t.pointerover,{...d},l),c._fireAndBubble(t.pointerenter,{...d},l)),i[c._id]||(i[c._id]=!0,c._fireAndBubble(t.pointermove,{...d}))):l&&this._fire(t.pointerover,{evt:e,target:this,currentTarget:this,pointerId:u})}),a||this._fire(t.pointermove,{evt:e,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(e){let t=er(e.type),n=L._getEventType(e.type);if(!t)return;this.setPointersPositions(e);let r={},i=!1;this._changedPointerPositions.forEach(a=>{let o=`${n}:${a.id}`,s=this._pointerStates.get(o),c=s?.clickStartShape!==void 0,l=s?.clickStartShape;s?.targetShape&&n!==`touch`?this._pointerStates.set(o,{targetShape:s.targetShape}):this._pointerStates.delete(o);let u=Wt(a.id)||this.getIntersection(a),d=u&&r[u._id];u&&(u.releaseCapture(a.id),r[u._id]=!0);let f=a.id,p={evt:e,pointerId:f},m=u&&u.isListening()?u:null,h=this._lastClicks[n],g=c&&(!m||l===m),_=g&&h&&s?.lastClick===h&&h.shape===m&&Date.now()-h.time{let r=L._getEventType(e.type),i=`${r}:${n.id}`;this._cancelClick(n.id,r);let a=this._pointerStates.get(i)?.targetShape;a&&r!==`touch`?this._pointerStates.set(i,{targetShape:a}):this._pointerStates.delete(i);let o=Wt(n.id)||this.getIntersection(n),s={evt:e,pointerId:n.id};o?(t&&o._fireAndBubble(t.pointercancel,{...s}),o._fireAndBubble(Rn,{...s})):t&&this._fire(t.pointercancel,{...s,target:this,currentTarget:this}),Jt(n.id),t&&r===`touch`&&a?.getStage()===this&&(a._fireAndBubble(t.pointerout,{...s}),a._fireAndBubble(t.pointerleave,{...s}))})}_lostpointercapture(e){Wt(e.pointerId,this)&&Jt(e.pointerId)}setPointersPositions(e){let t=this._getContentPosition(),n=null,r=null;e||=window.event,e.touches===void 0?(this._pointerEventType=e.pointerId===void 0?`mouse`:`pointer`,n=(e.clientX-t.left)/t.scaleX,r=(e.clientY-t.top)/t.scaleY,this.pointerPos={x:n,y:r},this._pointerPositions=[{x:n,y:r,id:L._getFirstPointerId(e)}],this._changedPointerPositions=[{x:n,y:r,id:L._getFirstPointerId(e)}]):(this._pointerEventType=`touch`,this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(e.touches,e=>{this._pointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}),Array.prototype.forEach.call(e.changedTouches||e.touches,e=>{this._changedPointerPositions.push({id:e.identifier,x:(e.clientX-t.left)/t.scaleX,y:(e.clientY-t.top)/t.scaleY})}))}_setPointerPosition(e){L.warn(`Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.`),this.setPointersPositions(e)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};let e=this.content.getBoundingClientRect();return{top:e.top,left:e.left,scaleX:e.width/this.content.clientWidth||1,scaleY:e.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferHitCanvas=new Vt({pixelRatio:1,width:0,height:0}),!I.isBrowser)return;let e=this.container();if(!e)throw`Stage has no container. A container is required.`;e.innerHTML=``,this.content=e.ownerDocument.createElement(`div`),this.content.style.position=`relative`,this.content.style.userSelect=`none`,this.content.className=`konvajs-content`,this.content.setAttribute(`role`,`presentation`),e.appendChild(this.content),ar(this._getOwnerWindow()),this._resizeDOM()}cache(){return L.warn(`Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.`),this}clearCache(){return this}batchDraw(){var e;return(e=this.children)==null||e.forEach(function(e){e.batchDraw()}),this}};or.prototype.nodeType=En,Je(or),V.addGetterSetter(or,`container`),V.addGetterSetter(or,`eventBatchFunc`);var sr=`hasShadow`,cr=`hasFill`,lr=`hasStroke`,ur=`shadowRGBA`,dr=`patternImage`,fr=`linearGradient`,pr=`radialGradient`,mr;function hr(){return mr||(mr=L.createCanvasElement().getContext(`2d`),mr)}var gr={};function _r(e){let t=this.attrs.fillRule;t?e.fill(t):e.fill()}function vr(e){e.stroke()}function yr(){this._clearCache(sr)}function br(){this._clearCache(cr)}function xr(){this._clearCache(lr)}function Sr(){this._clearCache(ur)}function Cr(){this._clearCache(dr)}function wr(){this._clearCache(fr)}function Tr(){this._clearCache(pr)}var U=class e extends H{constructor(e){super(e);let t,n=0;for(;t=L.getHitColor(),!t||t in gr;)if(n++,n>=1e4){L.warn(`Failed to find a unique color key for a shape. Konva may work incorrectly. Most likely your browser is using canvas farbling. Consider disabling it.`),t=L.getRandomColor();break}this.colorKey=t,gr[t]=this}getContext(){return L.warn(`shape.getContext() method is deprecated. Please do not use it.`),this.getLayer().getContext()}getCanvas(){return L.warn(`shape.getCanvas() method is deprecated. Please do not use it.`),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(sr,this._hasShadow)}_hasShadow(){return this.shadowEnabled()&&this.shadowOpacity()!==0&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(dr,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let e=hr().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||`repeat`);if(e&&e.setTransform){let t=new Ze;t.translate(this.fillPatternX(),this.fillPatternY()),t.rotate(I.getAngle(this.fillPatternRotation())),t.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),t.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let n=t.getMatrix(),r=typeof DOMMatrix>`u`?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);e.setTransform(r)}return e}}_getLinearGradient(){return this._getCache(fr,this.__getLinearGradient)}__getLinearGradient(){let e=this.fillLinearGradientColorStops();if(e){let t=hr(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=t.createLinearGradient(n.x,n.y,r.x,r.y);for(let t=0;t0}destroy(){return H.prototype.destroy.call(this),delete gr[this.colorKey],delete this.colorKey,this}_useBufferCanvas(e,t=this.getAbsoluteOpacity()){if(!(this.attrs.perfectDrawEnabled??!0))return!1;let n=e||this.hasFill(),r=this.hasStroke(),i=!this._isUnderCache&&t!==1;if(n&&r&&i)return!0;let a=this.hasShadow(),o=this.shadowForStrokeEnabled();return!!(n&&r&&a&&o)}setStrokeHitEnabled(e){L.warn(`strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.`),e?this.hitStrokeWidth(`auto`):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return this.hitStrokeWidth()!==0}getSelfRect(){let e=this.attrs.selfRectFunc;if(e)return{...e.call(this,this)};let t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}_getSelfRectForDrawing(){return this.getSelfRect()}getClientRect(e={}){let t=this._getCachedSceneRect(e);if(t)return t;let n=e.skipTransform,r=e.relativeTo,i=e._forDrawing,a=i?this._getSelfRectForDrawing():this.getSelfRect();i&&!this.strokeScaleEnabled()?a=this._transformedRect(a,r):(a.width<0||a.height<0)&&(a=new Ze()._getTransformedRect(a));let o=!e.skipStroke&&this.hasStroke()?i?this._getStrokePadding()*2:this.strokeWidth():0,s=o,c=o,l;if(!i&&o&&!this.strokeScaleEnabled()){let e=this;for(;e&&!e.isCached()&&!e._isUnderCache;)e=e.parent;let[t,i,a,o]=this.getAbsoluteTransform(e).getMatrix(),u=Math.abs(t*o-i*a);if(u)s*=Math.hypot(a,o)/u,c*=Math.hypot(t,i)/u;else if(!n&&(s=c=0,l=e?e.getAbsoluteTransform().copy():new Ze,r)){let e=r.getAbsoluteTransform(),[t,n,i,a]=e.getMatrix();l=t*a-n*i?e.copy().invert().multiply(l):new Ze}}let u={x:a.x-s/2,y:a.y-c/2,width:a.width+s,height:a.height+c};if(i&&this.strokeScaleEnabled()&&(u=this._transformedRect(u,r)),!e.skipShadow&&this.hasShadow()){let e=i?this.getAbsoluteScale():{x:1,y:1},t=this.shadowOffsetX()*e.x,n=this.shadowOffsetY()*e.y,r=this.shadowBlur()*(i?2*Math.min(Math.abs(e.x),Math.abs(e.y)):1);u.x+=Math.min(0,t)-r,u.y+=Math.min(0,n)-r,u.width+=Math.abs(t)+r*2,u.height+=Math.abs(n)+r*2}if(i)return u;if(!n){let e=this._transformedRect(u,r);if(l){let[t,n,r,i]=l.getMatrix(),a=o*Math.hypot(t,r)/2,s=o*Math.hypot(n,i)/2;e.x-=a,e.y-=s,e.width+=a*2,e.height+=s*2}return e}return u}_getStrokePadding(e=this.miterLimit()||10){return this.attrs.sceneFunc&&(e=this.miterLimit()||10),Math.abs(this.strokeWidth())/2*Math.max(this.lineCap()===`square`?Math.SQRT2:1,(this.lineJoin()||`miter`)===`miter`?e:1)}drawScene(t,n){let r=this.getLayer(),i=t||r.getCanvas(),a=i.getContext(),o=this._getCanvasCache(),s=this.getSceneFunc(),c=this.hasShadow(),l=n===this;if(!(n?this._isVisible(n):this.isVisible())&&!l)return this;if(o){a.save();let e=this.getAbsoluteTransform(n).getMatrix();return a.transform(e[0],e[1],e[2],e[3],e[4],e[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!s)return this;a.save();try{if(i.width&&i.height&&this._useBufferCanvas(void 0,a._getOpacity(this))){let t=!!a._opacityRoot||!!this.attrs.selfRectFunc&&this.getSelfRect===e.prototype.getSelfRect||!this.attrs.sceneFunc&&!this.attrs.charRenderFunc&&qe.has(this.constructor),r=i._prepareIsolationCanvas(t?this.getClientRect({_forDrawing:!0,relativeTo:n,skipShadow:!0}):void 0),o=r.getContext();o.save(),o._applyLineJoin(this),o._applyMiterLimit(this);let u=this.getAbsoluteTransform(n).getMatrix();o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),s.call(this,o,this),o.restore(),c&&a._applyShadow(this),l||(a._applyOpacity(this),a._applyGlobalCompositeOperation(this)),a._drawDeviceBuffer(r)}else{if(a._applyLineJoin(this),a._applyMiterLimit(this),!l){let e=this.getAbsoluteTransform(n).getMatrix();a.transform(e[0],e[1],e[2],e[3],e[4],e[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)}c&&a._applyShadow(this),s.call(this,a,this)}}catch(e){throw i._releaseIsolationCanvas(),e}finally{a.restore()}return this}drawHit(e,t){if(!this.shouldDrawHit(t))return this;let n=this.getLayer(),r=e||n.hitCanvas,i=r&&r.getContext(),a=this.hitFunc()||this.sceneFunc(),o=this._getCachedHitCanvas(t);if(this.colorKey||L.warn(`Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()`),o){i.save();let e=this.getAbsoluteTransform(t).getMatrix();return i.transform(e[0],e[1],e[2],e[3],e[4],e[5]),this._drawCachedHitCanvas(i,o),i.restore(),this}if(!a)return this;if(i.save(),i._applyLineJoin(this),i._applyMiterLimit(this),this!==t){let e=this.getAbsoluteTransform(t).getMatrix();i.transform(e[0],e[1],e[2],e[3],e[4],e[5])}try{a.call(this,i,this)}finally{i.restore()}return this}drawHitFromCache(e=0){let t=this._getCachedSceneCanvas(),n=this._getCachedHitCanvas(),r=n.getContext(),i=n.getWidth(),a=n.getHeight();r.clear(),r.drawImage(t._canvas,0,0,i/n.pixelRatio,a/n.pixelRatio);try{let t=r.getImageData(0,0,i,a),n=t.data,o=n.length,s=L._hexToRgb(this.colorKey);for(let t=0;te?(n[t]=s.r,n[t+1]=s.g,n[t+2]=s.b,n[t+3]=255):n[t+3]=0;r.putImageData(t,0,0)}catch(e){L.error(`Unable to draw hit graph from cached scene canvas. `+e.message)}return this}hasPointerCapture(e){return z(e,this)}setPointerCapture(e){Kt(e,this)}releaseCapture(e){Jt(e,this)}};U.prototype._fillFunc=_r,U.prototype._strokeFunc=vr,U.prototype._fillFuncHit=_r,U.prototype._strokeFuncHit=vr,U.prototype._centroid=!1,U.prototype.nodeType=`Shape`,Je(U),U.prototype.on(`shadowColorChange.konva shadowBlurChange.konva shadowOffsetXChange.konva shadowOffsetYChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,yr),U.prototype.on(`shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva`,Sr),U.prototype.on(`fillEnabledChange.konva fillChange.konva fillPatternImageChange.konva fillLinearGradientColorStopsChange.konva fillRadialGradientColorStopsChange.konva`,br),U.prototype.on(`strokeEnabledChange.konva strokeWidthChange.konva strokeChange.konva strokeLinearGradientColorStopsChange.konva`,xr),U.prototype.on(`fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva`,Cr),U.prototype.on(`fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva`,wr),U.prototype.on(`fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva`,Tr),V.addGetterSetter(U,`stroke`,void 0,en()),V.addGetterSetter(U,`strokeWidth`,2,B()),V.addGetterSetter(U,`fillAfterStrokeEnabled`,!1),V.addGetterSetter(U,`hitStrokeWidth`,`auto`,Qt()),V.addGetterSetter(U,`strokeHitEnabled`,!0,nn()),V.addGetterSetter(U,`perfectDrawEnabled`,!0,nn()),V.addGetterSetter(U,`shadowForStrokeEnabled`,!0,nn()),V.addGetterSetter(U,`lineJoin`),V.addGetterSetter(U,`lineCap`),V.addGetterSetter(U,`miterLimit`),V.addGetterSetter(U,`sceneFunc`),V.addGetterSetter(U,`hitFunc`),V.addGetterSetter(U,`selfRectFunc`),V.addGetterSetter(U,`dash`),V.addGetterSetter(U,`dashOffset`,0,B()),V.addGetterSetter(U,`shadowColor`,void 0,$t()),V.addGetterSetter(U,`shadowBlur`,0,B()),V.addGetterSetter(U,`shadowOpacity`,1,B()),V.addComponentsGetterSetter(U,`shadowOffset`,[`x`,`y`]),V.addGetterSetter(U,`shadowOffsetX`,0,B()),V.addGetterSetter(U,`shadowOffsetY`,0,B()),V.addGetterSetter(U,`fillPatternImage`),V.addGetterSetter(U,`fill`,void 0,en()),V.addGetterSetter(U,`fillPatternX`,0,B()),V.addGetterSetter(U,`fillPatternY`,0,B()),V.addGetterSetter(U,`fillLinearGradientColorStops`),V.addGetterSetter(U,`strokeLinearGradientColorStops`),V.addGetterSetter(U,`fillRadialGradientStartRadius`,0),V.addGetterSetter(U,`fillRadialGradientEndRadius`,0),V.addGetterSetter(U,`fillRadialGradientColorStops`),V.addGetterSetter(U,`fillPatternRepeat`,`repeat`),V.addGetterSetter(U,`fillEnabled`,!0),V.addGetterSetter(U,`strokeEnabled`,!0),V.addGetterSetter(U,`shadowEnabled`,!0),V.addGetterSetter(U,`dashEnabled`,!0),V.addGetterSetter(U,`strokeScaleEnabled`,!0),V.addGetterSetter(U,`fillPriority`,`color`),V.addComponentsGetterSetter(U,`fillPatternOffset`,[`x`,`y`]),V.addGetterSetter(U,`fillPatternOffsetX`,0,B()),V.addGetterSetter(U,`fillPatternOffsetY`,0,B()),V.addComponentsGetterSetter(U,`fillPatternScale`,[`x`,`y`]),V.addGetterSetter(U,`fillPatternScaleX`,1,B()),V.addGetterSetter(U,`fillPatternScaleY`,1,B()),V.addComponentsGetterSetter(U,`fillLinearGradientStartPoint`,[`x`,`y`]),V.addComponentsGetterSetter(U,`strokeLinearGradientStartPoint`,[`x`,`y`]),V.addGetterSetter(U,`fillLinearGradientStartPointX`,0),V.addGetterSetter(U,`strokeLinearGradientStartPointX`,0),V.addGetterSetter(U,`fillLinearGradientStartPointY`,0),V.addGetterSetter(U,`strokeLinearGradientStartPointY`,0),V.addComponentsGetterSetter(U,`fillLinearGradientEndPoint`,[`x`,`y`]),V.addComponentsGetterSetter(U,`strokeLinearGradientEndPoint`,[`x`,`y`]),V.addGetterSetter(U,`fillLinearGradientEndPointX`,0),V.addGetterSetter(U,`strokeLinearGradientEndPointX`,0),V.addGetterSetter(U,`fillLinearGradientEndPointY`,0),V.addGetterSetter(U,`strokeLinearGradientEndPointY`,0),V.addComponentsGetterSetter(U,`fillRadialGradientStartPoint`,[`x`,`y`]),V.addGetterSetter(U,`fillRadialGradientStartPointX`,0),V.addGetterSetter(U,`fillRadialGradientStartPointY`,0),V.addComponentsGetterSetter(U,`fillRadialGradientEndPoint`,[`x`,`y`]),V.addGetterSetter(U,`fillRadialGradientEndPointX`,0),V.addGetterSetter(U,`fillRadialGradientEndPointY`,0),V.addGetterSetter(U,`fillPatternRotation`,0),V.addGetterSetter(U,`fillRule`,void 0,$t()),V.backCompat(U,{dashArray:`dash`,getDashArray:`getDash`,setDashArray:`setDash`,drawFunc:`sceneFunc`,getDrawFunc:`getSceneFunc`,setDrawFunc:`setSceneFunc`,drawHitFunc:`hitFunc`,getDrawHitFunc:`getHitFunc`,setDrawHitFunc:`setHitFunc`});var Er=`beforeDraw`,Dr=`draw`,Or=10,kr=256;function Ar(e,t){return e[t+3]>=128?gr[L.getHitColorKey(e[t],e[t+1],e[t+2])]:void 0}var jr=class extends Tn{constructor(e){super(e),this.canvas=new Bt,this.hitCanvas=new Vt({pixelRatio:1}),this._waitingForDraw=!1,this.on(`visibleChange.konva`,this._checkVisibility),this._checkVisibility(),this.on(`imageSmoothingEnabledChange.konva`,this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(e){return this.getContext().clear(e),this.getHitCanvas().getContext().clear(e),this}setZIndex(e){super.setZIndex(e);let t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),e{this._waitingForDraw=!1,this.draw()},this.getStage()?._getOwnerWindow())),this}getIntersection(e){if(!this.isListening()||!this.isVisible())return null;let t=this._getIntersection(e);if(t.shape)return t.shape;if(!t.antialiased)return null;let n=this.hitCanvas.pixelRatio,r=Math.floor(e.x*n),i=Math.floor(e.y*n),a=e=>this.hitCanvas.context.getImageData(r-e,i-e,e*2+1,e*2+1).data,o=Or,s=o*2+1,c=a(o),l=c[(o*s+o)*4+3];for(let e=1;e<=kr;e++){e>o&&(o=Math.min(kr,o*2),s=o*2+1,c=a(o));let t=0;for(let n=-e;n<=e;n++){let r=Math.abs(n)===e?1:e*2;for(let i=-e;i<=e;i+=r){let e=((n+o)*s+i+o)*4,r=Ar(c,e);if(r)return r;t=Math.max(t,c[e+3])}}if(t<=l&&t!==255)return null;l=t}return null}_getIntersection(e){if(!this.hitCanvas.width||!this.hitCanvas.height)return{};let t=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.floor(e.x*t),Math.floor(e.y*t),1,1).data,r=Ar(n,0);return r?{shape:r}:n[3]>0?{antialiased:!0}:{}}drawScene(e,t){let n=this.getLayer(),r=e||n&&n.getCanvas();return this._fire(Er,{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),Tn.prototype.drawScene.call(this,r,t),r._trimIsolationCanvas(),this._fire(Dr,{node:this}),this}shouldDrawHit(e){if(!super.shouldDrawHit(e))return!1;if(e||I.hitOnDragEnabled)return!0;let t=!1;return R._dragElements.forEach(e=>{e.dragStatus===`dragging`&&(e.node===this.getStage()||e.node.getLayer()===this)&&(t=!0)}),!t&&!I.Transformer?._isLayerTransforming(this)}drawHit(e,t){let n=this.getLayer(),r=e||n&&n.hitCanvas;return!e&&n&&(n._syncHitCanvasSize(),n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear()),Tn.prototype.drawHit.call(this,r,t),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(e){L.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening(e)}getHitGraphEnabled(e){return L.warn(`hitGraphEnabled method is deprecated. Please use layer.listening() instead.`),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;let e=this.parent;this.hitCanvas._canvas.parentNode?e.content.removeChild(this.hitCanvas._canvas):e.content.appendChild(this.hitCanvas._canvas)}destroy(){return this.getCanvas()._releaseIsolationCanvas(),L.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}};jr.prototype.nodeType=`Layer`,Je(jr),V.addGetterSetter(jr,`imageSmoothingEnabled`,!0),V.addGetterSetter(jr,`clearBeforeDraw`,!0),V.addOverloadedGetterSetter(jr,`hitGraphEnabled`);var Mr=class extends jr{constructor(e){super(e),this.listening(!1),L.warn(`Konva.FastLayer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.`)}};Mr.prototype.nodeType=`FastLayer`,Je(Mr);var Nr=class extends Tn{_validateAdd(e){let t=e.getType();t!==`Group`&&t!==`Shape`&&L.throw(`You may only add groups and shapes to groups.`)}_drawChildNodes(e,t,n){if(e!==`drawScene`||!this.isolated()||n===this)return super._drawChildNodes(e,t,n);if(!t.width||!t.height)return;let r=t.getContext(),i=t._prepareIsolationCanvas(this.getClientRect({_forDrawing:!0,relativeTo:n})),a=i.getContext();a._opacityRoot=this,r.save();try{super._drawChildNodes(e,i,n),r._applyOpacity(this),r._drawDeviceBuffer(i)}catch(e){throw t._releaseIsolationCanvas(),e}finally{r.restore(),a._opacityRoot=void 0}}};V.addGetterSetter(Nr,`isolated`,!1,nn()),Nr.prototype.nodeType=`Group`,Je(Nr);var Pr=Ke.performance?.now?()=>Ke.performance.now():Date.now,Fr=class e{constructor(t,n){this.id=e.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:Pr(),frameRate:0},this.func=t,this.setLayers(n)}setLayers(e){return this.layers=e?[].concat(e):[],this}getLayers(){return this.layers}addLayer(e){let t=this.layers,n=t.length;for(let r=0;r{Array.from(this.animations).forEach(t=>{this.animations.has(t)&&(t._updateFrameObject(Pr()),!(t.func&&t.func.call(t,t.frame)===!1)&&t.layers.forEach(t=>t&&e.add(t)))})}),e.forEach(e=>e.batchDraw())}static _animationLoop(){let t=e;t.animations.size?(t._runFrames(),L.requestAnimFrame(t._animationLoop)):t.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,L.requestAnimFrame(this._animationLoop))}};Fr.animations=new Set,Fr.animIdCounter=0,Fr.animRunning=!1;var Ir={node:1,duration:1,easing:1,onFinish:1,onUpdate:1,onReset:1,yoyo:1},Lr=1,Rr=2,zr=3,Br=[`fill`,`stroke`,`shadowColor`],Vr=0;function Hr(e){return L.colorToRGBA(e)||L.throw(`can not tween the color "`+e+`", because it is not a valid color.`)}function Ur(e,t){return{r:t.r-e.r,g:t.g-e.g,b:t.b-e.b,a:t.a-e.a}}function Wr(e,t,n){return`rgba(`+Math.round(e.r+t.r*n)+`,`+Math.round(e.g+t.g*n)+`,`+Math.round(e.b+t.b*n)+`,`+(e.a+t.a*n)+`)`}var Gr=class{constructor(e,t,n,r,i,a,o){this.prop=e,this.propFunc=t,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=i-this.begin,this.pause()}fire(e){let t=this[e];t&&t()}setTime(e){e>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():e<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=e,this.update())}getTime(){return this._time}setPosition(e){this.prevPos=this._pos,this.propFunc(e),this._pos=e}getPosition(e){return e===void 0&&(e=this._time),this.func(e,this.begin,this._change,this.duration)}play(){this.state=Rr,this._startTime=this.getTimer()-this._time,this.fire(`onPlay`),this.onEnterFrame()}reverse(){this.state=zr,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.fire(`onReverse`),this.onEnterFrame()}seek(e){this.pause(),this._time=e,this.update(),this.fire(`onSeek`)}reset(){this.pause(),this._time=0,this.update(),this.fire(`onReset`)}finish(){this.pause(),this._time=this.duration,this.update(),this.fire(`onFinish`)}update(){this.setPosition(this.getPosition(this._time)),this.fire(`onUpdate`)}onEnterFrame(){let e=this.getTimer()-this._startTime;this.state===Rr?this.setTime(e):this.state===zr&&this.setTime(this.duration-e)}pause(){this.state=Lr,this.fire(`onPause`)}getTimer(){return Date.now()}},Kr=class e{constructor(t){let n=this,r=t.node,i=r._id,a=t.easing||qr.Linear,o=!!t.yoyo,s,c;s=t.duration===void 0?.3:t.duration===0?.001:t.duration,this.node=r,this._id=Vr++;let l=r.getLayer()||(r instanceof I.Stage?r.getLayers():null);for(c in l||L.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new Fr(function(){n.tween.onEnterFrame()},l),this.tween=new Gr(c,function(e){n._tweenFunc(e)},a,0,1,s*1e3,o),this._addListeners(),e.attrs[i]||(e.attrs[i]={}),e.attrs[i][this._id]||(e.attrs[i][this._id]={}),e.tweens[i]||(e.tweens[i]={}),t)Ir[c]===void 0&&this._addAttr(c,t[c]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,n){if(L._isPlainObject(n)){for(let e in n)this._addAttr(t+L._capitalize(e),n[e]);return}let r=this.node,i=r._id,a,o,s,c,l=e.tweens[i][t];l!==void 0&&delete e.attrs[i][l][t];let u=r.getAttr(t);if(L._isArray(n)||L._isArray(u)){if(a=[],c=u,s=n,u=L._isArray(u)?u.slice():Array(n.length).fill(u||0),L._isArray(n)||(n=Array(u.length).fill(n)),o=Math.max(n.length,u.length),t===`points`&&n.length!==u.length&&(n.length>u.length?u=L._prepareArrayForTween(u,n,r.closed()):n=L._prepareArrayForTween(n,u,r.closed())),t.endsWith(`ColorStops`))for(let e=0;ethis.destroy(),r=()=>{this.node.off(t).on(t,n),this.anim.start()};this.tween.onPlay=r,this.tween.onReverse=r,this.tween.onPause=()=>{this.node.off(t),this.anim.stop()};let i=(t,n)=>{let r=e.attrs[this.node._id]?.[this._id];if(r){for(let e in r)r[e][t]!==void 0&&this.node.setAttr(e,r[e][t]);n?.call(this)}};this.tween.onFinish=()=>i(`trueEnd`,this.onFinish),this.tween.onReset=()=>i(`trueStart`,this.onReset),this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(e){return this.tween.seek(e*1e3),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){let t=this.node._id,n=this._id,r=e.attrs[t]?.[n],i=e.tweens[t];if(this.pause(),this.anim&&this.anim.stop(),r){if(i){for(let e in r)delete i[e];Object.keys(i).length===0&&delete e.tweens[t]}delete e.attrs[t][n],Object.keys(e.attrs[t]).length===0&&delete e.attrs[t]}}};Kr.attrs={},Kr.tweens={},H.prototype.to=function(e){let t=e.onFinish,n=new Kr({...e,node:this,onFinish(){n.destroy(),t&&t()}});return n.play(),n};var qr={BackEaseIn(e,t,n,r){return n*(e/=r)*e*(2.70158*e-1.70158)+t},BackEaseOut(e,t,n,r){return n*((e=e/r-1)*e*(2.70158*e+1.70158)+1)+t},BackEaseInOut(e,t,n,r){let i=1.70158;return(e/=r/2)<1?n/2*(e*e*(((i*=1.525)+1)*e-i))+t:n/2*((e-=2)*e*(((i*=1.525)+1)*e+i)+2)+t},ElasticEaseIn(e,t,n,r,i,a){let o=0;return e===0?t:(e/=r)===1?t+n:(a||=r*.3,!i||i=o?o:(s%o+o)%o,l=Math.cos(Math.min(c,Math.PI)),u=Math.sin(Math.min(Math.max(Math.PI,c),3*Math.PI/2)),d=Math.sin(Math.min(c,Math.PI/2)),f=l*(l>0?n:r),p=1*r,m=u*(u>0?n:r),h=d*(d>0?r:n);return{x:f,y:i?-1*h:m,width:p-f,height:h-m}}};Yr.prototype._centroid=!0,Yr.prototype.className=`Arc`,Yr.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`,`angle`,`clockwise`],Je(Yr,!0),V.addGetterSetter(Yr,`innerRadius`,0,B()),V.addGetterSetter(Yr,`outerRadius`,0,B()),V.addGetterSetter(Yr,`angle`,0,B()),V.addGetterSetter(Yr,`clockwise`,!1,nn());var Xr=[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],Zr=[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],Qr=(e,t,n)=>{let r=n/2,i=0;for(let n=0;nQr([e[0],e[0]+2/3*(e[1]-e[0]),e[2]+2/3*(e[1]-e[2]),e[2]],[t[0],t[0]+2/3*(t[1]-t[0]),t[2]+2/3*(t[1]-t[2]),t[2]],n);function ei(e,t,n){let r=1-n,i=r*r,a=2*r*n,o=n*n,s=i*(3*(e[1]-e[0]))+a*(3*(e[2]-e[1]))+o*(3*(e[3]-e[2])),c=i*(3*(t[1]-t[0]))+a*(3*(t[2]-t[1]))+o*(3*(t[3]-t[2]));return Math.sqrt(s*s+c*c)}var ti=(e,t,n)=>{let r=1,i=e/t,a=(e-n(i))/t,o=0;for(;r>.001;){let s=n(i+a),c=Math.abs(e-s)/t;if(c500)break}return i},ni=(e,t,n,r)=>{let i=1-r;return i*i*e+2*i*r*t+r*r*n},ri=(e,t,n,r,i,a)=>{let o=[];for(let s of[[e,n,i],[t,r,a]]){let c=(s[0]-s[1])/(s[0]-2*s[1]+s[2]);c>0&&c<1&&o.push(ni(e,n,i,c),ni(t,r,a,c))}return o},ii=(e,t,n,r,i)=>{let a=1-i;return a*a*a*e+3*a*a*i*t+3*a*i*i*n+i*i*i*r},ai=(e,t,n,r,i,a,o,s)=>{let c=[];for(let l of[[e,n,i,o],[t,r,a,s]]){let u=-3*l[0]+9*l[1]-9*l[2]+3*l[3],d=6*l[0]-12*l[1]+6*l[2],f=-3*l[0]+3*l[1],p=d*d-4*u*f;if(p<0)continue;let m=-(d+(d<0?-1:1)*Math.sqrt(p))/2;for(let l of[m/u,f/m])l>0&&l<1&&c.push(ii(e,n,i,o,l),ii(t,r,a,s,l))}return c};function oi(e,t,n,r,i,a,o){let s=Math.sqrt((n-e)**2+(r-t)**2),c=Math.sqrt((i-n)**2+(a-r)**2),l=s+c;if(l===0)return[n,r,n,r];let u=o*s/l,d=o*c/l;return[n-u*(i-e),r-u*(a-t),n+d*(i-e),r+d*(a-t)]}function si(e,t){let n=e.length,r=[];for(let i=2;i4}_eachTensionSegment(e,t){let n=this.points(),r=n.length,i=this.closed(),a=this.getTensionPoints(),o=a.length,s=n[0],c=n[1],l=i?0:4;for(i||(e(s,c,a[0],a[1],a[2],a[3]),s=a[2],c=a[3]);le.quadraticCurveTo(r,i,a,o),(t,n,r,i,a,o,s,c)=>e.bezierCurveTo(r,i,a,o,s,c));else if(i)for(a=2;at.push(a,o,...ri(e,n,r,i,a,o)),(e,n,r,i,a,o,s,c)=>t.push(s,c,...ai(e,n,r,i,a,o,s,c))),e=t}else this.bezier()&&(e=[e[0],e[1],...ci(e)]);return L._getPointsRect(e)}};li.prototype.className=`Line`,li.prototype._attrsAffectingSize=[`points`,`bezier`,`tension`,`closed`],Je(li,!0),V.addGetterSetter(li,`closed`,!1),V.addGetterSetter(li,`bezier`,!1),V.addGetterSetter(li,`tension`,0,B()),V.addGetterSetter(li,`points`,[],tn());var ui={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},di=Math.PI*2,fi=class e extends U{constructor(e){super(e),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on(`dataChange.konva`,function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=e.parsePathData(this.data()),this.pathLength=e.getPathLength(this.dataArray)}_sceneFunc(e){let t=this.dataArray;e.beginPath();let n=!1;for(let r=0;r{if(((n-s)*Math.sign(c)%di+di)%di0&&t<=o;)o-=n[--a].pathLength;for(t-=o;an[a].pathLength;){let e=n[a].pathLength;t-=e,o+=e,++a}if(r&&aQr([c.start.x,l[0],l[2],l[4]],[c.start.y,l[1],l[3],l[5]],e)),c.start.x,c.start.y,l[0],l[1],l[2],l[3],l[4],l[5]);case`Q`:return e.getPointOnQuadraticBezier(ti(t,c.pathLength,e=>$r([c.start.x,l[0],l[2]],[c.start.y,l[1],l[3]],e)),c.start.x,c.start.y,l[0],l[1],l[2],l[3]);case`A`:return e.getPointOnEllipticalArc(l[0],l[1],l[2],l[3],l[2]===l[3]?l[4]+l[5]*t/c.pathLength:e._walkArc(l,t).theta,l[6])}return null}static getPointOnLine(e,t,n,r,i,a,o){a??=t,o??=n;let s=this.getLineLength(t,n,r,i);if(s<1e-10)return{x:t,y:n};if(r===t)return{x:a,y:o+(i>n?e:-e)};let c=(i-n)/(r-t),l=Math.sqrt(e*e/(1+c*c))*(r1&&(t[0]===`0`||t[0]===`1`);)f.push(+t[0]),p++,t=t.slice(1);let n=parseFloat(t);f.push(isNaN(n)?0:n),p>=0&&(p=(p+1)%7)}let m=0;for(;m=n)return{theta:d+(p-d)*((n-f)/h),length:n};f+=h,u=m,d=p}return{theta:d,length:f}}static calcLength(t,n,r,i){let a=e;switch(r){case`L`:return a.getLineLength(t,n,i[0],i[1]);case`C`:return Qr([t,i[0],i[2],i[4]],[n,i[1],i[3],i[5]],1);case`Q`:return $r([t,i[0],i[2]],[n,i[1],i[3]],1);case`A`:return a._walkArc(i,1/0).length}return 0}static convertEndpointToCenterParameterization(e,t,n,r,i,a,o,s,c){let l=Math.PI/180*c,u=Math.cos(l)*(e-n)/2+Math.sin(l)*(t-r)/2,d=-1*Math.sin(l)*(e-n)/2+Math.cos(l)*(t-r)/2,f=u*u/(o*o)+d*d/(s*s);f>1&&(o*=Math.sqrt(f),s*=Math.sqrt(f));let p=Math.sqrt((o*o*(s*s)-o*o*(d*d)-s*s*(u*u))/(o*o*(d*d)+s*s*(u*u)));i===a&&(p*=-1),isNaN(p)&&(p=0);let m=p*o*d/s,h=p*-s*u/o,g=(e+n)/2+Math.cos(l)*m-Math.sin(l)*h,_=(t+r)/2+Math.sin(l)*m+Math.cos(l)*h,v=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])},y=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(v(e)*v(t))},b=function(e,t){return(e[0]*t[1]=1&&(w=0),a===0&&w>0&&(w-=2*Math.PI),a===1&&w<0&&(w+=2*Math.PI),[g,_,o,s,x,w,l,a]}};fi.prototype.className=`Path`,fi.prototype._attrsAffectingSize=[`data`],Je(fi,!0),V.addGetterSetter(fi,`data`);var pi=class extends li{_getStrokePadding(){return super._getStrokePadding(this.pointerAtBeginning()||this.pointerAtEnding()?this.miterLimit()||10:void 0)}_sceneFunc(e){super._sceneFunc(e);let t=this.points(),n=t.length;if(n<4)return;let r=this.pointerLength(),i=this.pointerWidth();this.pointerAtEnding()&&(e.save(),e.beginPath(),e.translate(t[n-2],t[n-1]),e.rotate(this._getPointerAngle(!1)),e.moveTo(0,0),e.lineTo(-r,i/2),e.lineTo(-r,-i/2),e.closePath(),e.restore(),this.__fillStroke(e)),this.pointerAtBeginning()&&(e.save(),e.beginPath(),e.translate(t[0],t[1]),e.rotate(this._getPointerAngle(!0)),e.moveTo(0,0),e.lineTo(-r,i/2),e.lineTo(-r,-i/2),e.closePath(),e.restore(),this.__fillStroke(e))}_getPointerAngle(e){let t=this.points(),n=t.length,r=this.tension()!==0&&n>4,i=r?this.getTensionPoints():t,a=e?t[0]:t[n-2],o=e?t[1]:t[n-1],s=0,c=0;if(r&&e)s=a-(i[0]+i[2])/2,c=o-(i[1]+i[3])/2;else if(r){let e=i[i.length-4],t=i[i.length-3],n=i[i.length-2],r=i[i.length-1],l=fi.calcLength(e,t,`Q`,[n,r,a,o]),u=fi.getPointOnQuadraticBezier(l?Math.max(0,1-this.pointerLength()/l):0,e,t,n,r,a,o);s=a-u.x,c=o-u.y}for(let t=e?0:i.length-2;!s&&!c&&t>=0&&t{this._requestDraw()},this.on(`imageChange.konva`,e=>{this._removeImageLoad(e.oldVal),this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){var e;let t=this.image();t?.complete&&t.src||t?.readyState>=2||(e=t?.addEventListener)==null||e.call(t,`videoWidth`in t?`loadeddata`:`load`,this._loadListener)}_removeImageLoad(e){var t;(t=e?.removeEventListener)==null||t.call(e,`videoWidth`in e?`loadeddata`:`load`,this._loadListener)}destroy(){return this._removeImageLoad(this.image()),super.destroy(),this}_useBufferCanvas(e,t=this.getAbsoluteOpacity()){if(this.attrs.perfectDrawEnabled===!1)return!1;let n=!!this.cornerRadius(),r=this.hasShadow();return n&&r?!0:super._useBufferCanvas(!0,t)}_getStrokePadding(){return super._getStrokePadding(this.strokeScaleEnabled()?1:void 0)}_sceneFunc(e){let t=this.getWidth(),n=this.getHeight(),r=this.cornerRadius(),i=this.attrs.image;if((this.hasFill()||this.hasStroke()||r)&&(e.beginPath(),r?L.drawRoundedRectPath(e,t,n,r):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)),i){r&&e.clip();let a=this.attrs.cropWidth,o=this.attrs.cropHeight;a&&o?e.drawImage(i,this.cropX(),this.cropY(),a,o,0,0,t,n):e.drawImage(i,0,0,t,n)}}_hitFunc(e){let t=this.width(),n=this.height(),r=this.cornerRadius();e.beginPath(),r?L.drawRoundedRectPath(e,t,n,r):e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}getWidth(){let e=this.image();return this.attrs.width??e?.videoWidth??e?.width??0}getHeight(){let e=this.image();return this.attrs.height??e?.videoHeight??e?.height??0}static fromURL(t,n,r=null){let i=L.createImageElement();i.onload=()=>{i.onload=i.onerror=null,n(new e({image:i}))},i.onerror=r,i.crossOrigin=`Anonymous`,i.src=t}};gi.prototype.className=`Image`,gi.prototype._attrsAffectingSize=[`image`],Je(gi,!0),V.addGetterSetter(gi,`cornerRadius`,0,Zt(4)),V.addGetterSetter(gi,`image`),V.addComponentsGetterSetter(gi,`crop`,[`x`,`y`,`width`,`height`]),V.addGetterSetter(gi,`cropX`,0,B()),V.addGetterSetter(gi,`cropY`,0,B()),V.addGetterSetter(gi,`cropWidth`,0,B()),V.addGetterSetter(gi,`cropHeight`,0,B());var _i=typeof Intl<`u`&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:`grapheme`}):null;function vi(e){return e/15}function yi(e){return _i?Array.from(_i.segment(e),e=>e.segment):e.match(/\p{RI}\p{RI}|\P{M}(?:\p{M}|\p{Emoji_Modifier}|\uFE0F|\u200D\P{M})*|\p{M}+/gu)||[]}var bi=`auto`,xi=`center`,Si=`inherit`,Ci=`justify`,wi=`Change.konva`,Ti=`2d`,Ei=`-`,Di=`left`,Oi=`text`,ki=`Text`,Ai=`top`,ji=`bottom`,Mi=`middle`,Ni=`normal`,Pi=`px `,Fi=` `,Ii=`right`,Li=`rtl`,Ri=`word`,zi=`char`,Bi=`none`,Vi=`…`,Hi=[`direction`,`fontFamily`,`fontSize`,`fontStyle`,`fontVariant`,`padding`,`align`,`verticalAlign`,`lineHeight`,`text`,`width`,`height`,`wrap`,`ellipsis`,`letterSpacing`],Ui=null;function Wi(){if(Ui!==null)return Ui;Ui=!1;let e;try{e=L.createCanvasElement(),e.width=10,e.height=10;let t=e.getContext(Ti);if(t){t.globalAlpha=0,t.shadowColor=`black`,t.shadowBlur=5,t.shadowOffsetX=5,t.shadowOffsetY=5,t.fillStyle=`black`,t.font=`10px Arial`,t.fillText(`X`,0,10);let e=t.getImageData(0,0,10,10).data;for(let t=3;t0){Ui=!0;break}}}catch{}finally{e&&L.releaseCanvas(e)}return Ui}function Gi(e){return e.split(`,`).map(e=>{e=e.trim();let t=e.indexOf(` `)>=0,n=e.indexOf(`"`)>=0||e.indexOf(`'`)>=0;return t&&!n&&(e=`"${e}"`),e}).join(`, `)}var Ki;function qi(){return Ki||(Ki=L.createCanvasElement().getContext(Ti),Ki)}function Ji(e){this._partialFillStyle&&e.setAttr(`fillStyle`,this._partialFillStyle),e.fillText(this._partialText,this._partialTextX,this._partialTextY)}function Yi(e){e.setAttr(`miterLimit`,2),this._partialStrokeStyle&&e.setAttr(`strokeStyle`,this._partialStrokeStyle),e.strokeText(this._partialText,this._partialTextX,this._partialTextY)}function Xi(e){return e||={},e.fill||e.fillLinearGradientColorStops||e.fillRadialGradientColorStops||e.fillPatternImage?e:{...e,fill:`black`}}var W=class extends U{constructor(e){super(Xi(e)),this._partialTextX=0,this._partialTextY=0,this._baselineShift=0,this._setTextData()}_sceneFunc(e){let t=this.textArr,n=t.length;if(!this.text())return;let r=this.padding(),i=this.fontSize(),a=this.lineHeight()*i,o=this.direction(),s=this.align(),c=this.getWidth(),l=this.letterSpacing(),u=this.charRenderFunc(),d=this.textDecoration(),f=d.indexOf(`underline`)!==-1,p=d.indexOf(`line-through`)!==-1,m,h=a/2,g=Mi;if(!I.legacyTextRendering){let e=this.measureSize(`M`);g=`alphabetic`,h=((e.fontBoundingBoxAscent??e.actualBoundingBoxAscent)-(e.fontBoundingBoxDescent??e.actualBoundingBoxDescent))/2+a/2}if(o===Si?o=e.direction:e.setAttr(`direction`,o),e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,g),e.setAttr(`textAlign`,Di),e.translate(r,this._getTextTop()),u){let t=e._getFillStyle(this);t!==void 0&&(e.fillStyle=t),this.hasStroke()&&e._applyStrokeStyle(this)}let _=u?e.fillStyle:void 0,v=u?e.strokeStyle:void 0,y=0;for(m=0;m1&&(h+=a)}}_getTextTop(){let e=this.padding(),t=this.getHeight()-this.textArr.length*this.lineHeight()*this.fontSize()-e*2,n=this.verticalAlign();return n===Mi?e+t/2:n===ji?e+t:e}_getUnderlineOffset(){return this.underlineOffset()??Math.round(this.fontSize()/(I.legacyTextRendering?2:4))}getSelfRect(){let e=super.getSelfRect(),t=this.textArr.length;if(!t||this.textDecoration().indexOf(`underline`)===-1)return e;let n=this.fontSize(),r=this.lineHeight()*n,i=this._getTextTop()+t*r-r/2;return I.legacyTextRendering||(i+=this._baselineShift),i+=this._getUnderlineOffset()+vi(n)/2,e.height=Math.max(e.y+e.height,i)-e.y,e}_getSelfRectForDrawing(){let e=this.getSelfRect(),t=this.fontSize(),n=this.padding(),r=this.lineHeight()*t,i=this.getWidth()-n*2,a=this.align(),o=this.textArr.length*r,s=this._getTextTop(),c=e.x,l=e.x+e.width;for(let{text:e,width:t}of this.textArr){let r=n+(a===Ii?i-t:a===xi?(i-t)/2:0),o=Math.min(0,this.letterSpacing())*e.length;c=Math.min(c,r+o),l=Math.max(l,r+t-o)}let u=this.textDecoration().includes(`underline`),d=Math.min(e.y,s+(u?Math.min(0,this._getUnderlineOffset()):0));return{x:c-t,y:d-t,width:l-c+t*2,height:Math.max(e.y+e.height,s+o)-d+t*2}}_hitFunc(e){let t=this.getWidth(),n=this.getHeight();e.beginPath(),e.rect(0,0,t,n),e.closePath(),e.fillStrokeShape(this)}setText(e){let t=L._isString(e)?e:e==null?``:e+``;return this._setAttr(Oi,t),this}getWidth(){return this.attrs.width===bi||this.attrs.width===void 0?this.getTextWidth()+this.padding()*2:this.attrs.width}getHeight(){return this.attrs.height===bi||this.attrs.height===void 0?this.fontSize()*this.textArr.length*this.lineHeight()+this.padding()*2:this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return L.warn(`text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.`),this.textHeight}measureSize(e){let t=qi(),n=this.fontSize(),r;t.save(),t.font=this._getContextFont(),r=t.measureText(e),t.restore();let i=n/100;return{actualBoundingBoxAscent:r.actualBoundingBoxAscent??71.58203125*i,actualBoundingBoxDescent:r.actualBoundingBoxDescent??0,actualBoundingBoxLeft:r.actualBoundingBoxLeft??-7.421875*i,actualBoundingBoxRight:r.actualBoundingBoxRight??75.732421875*i,alphabeticBaseline:r.alphabeticBaseline??0,emHeightAscent:r.emHeightAscent??100*i,emHeightDescent:r.emHeightDescent??-20*i,fontBoundingBoxAscent:r.fontBoundingBoxAscent??91*i,fontBoundingBoxDescent:r.fontBoundingBoxDescent??21*i,hangingBaseline:r.hangingBaseline??72.80000305175781*i,ideographicBaseline:r.ideographicBaseline??-21*i,width:r.width,height:n}}_getContextFont(){return this.fontStyle()+Fi+this.fontVariant()+Fi+(this.fontSize()+Pi)+Gi(this.fontFamily())}_addTextLine(e){this.align()===Ci&&(e=e.trim());let t=this._getTextWidth(e);return this.textArr.push({text:e,width:t,lastInParagraph:!1})}_getTextWidth(e,t){let n=this.letterSpacing(),r=n?n*(t??yi(e).length):0;return qi().measureText(e).width+r}_setTextData(){let e=this.text().split(` -`),t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.width,i=this.attrs.height,a=r!==bi&&r!==void 0,o=i!==bi&&i!==void 0,s=this.padding(),c=r-s*2,l=i-s*2,u=0,d=this.wrap(),f=d!==zi&&d!==Bi,p=this.ellipsis(),m=this.measureSize(`M`);this._baselineShift=(m.fontBoundingBoxAscent-m.fontBoundingBoxDescent)/2,this.textArr=[];let h=qi();h.font=this._getContextFont(),h.fontKerning=this.direction()!==Li&&(this.letterSpacing()!==0||this.align()===Ci||this.charRenderFunc())?`none`:`auto`;let g=p?this._getTextWidth(Vi):0;for(let t=0,r=e.length;tc){let e=yi(i),a=e.length,d=0,m=t=>e.slice(d,t).join(``),h=e=>e===Fi||e===Ei,_=Math.max(1,Math.ceil(a*c/s));for(;dl?g:0,s=e=>!(this._getTextWidth(m(e),e-d)+i>c),v=d,y=Math.min(a,d+_);for(;s(y)&&(v=y,y!==a);)y=Math.min(a,y+(y-d));for(;y-v>1;){let e=v+y>>>1;s(e)?v=e:y=e}if(v===d)break;if(v===a){this._addTextLine(m(a)),u+=n,o&&u+n>l&&t=d&&!h(e[t]);)t--;t>=d&&(v=t+1)}if(this._addTextLine(m(v).trimRight()),u+=n,this._shouldHandleEllipsis(u)){this._tryToAddEllipsisToLastLine();break}for(d=v;dl&&tl)break}this.textHeight=t,this.textWidth=this.textArr.reduce((e,t)=>Math.max(e,t.width),0)}_shouldHandleEllipsis(e){let t=+this.fontSize(),n=this.lineHeight()*t,r=this.attrs.height,i=r!==bi&&r!==void 0,a=r-this.padding()*2;return this.wrap()===Bi||i&&e+n>a}_tryToAddEllipsisToLastLine(){let e=this.attrs.width,t=e!==bi&&e!==void 0,n=e-this.padding()*2,r=this.ellipsis(),i=this.textArr[this.textArr.length-1];if(!i||!r)return;let a=i.text+Vi;if(t){let e=yi(i.text);for(;e.length&&this._getTextWidth(a)>n;)e.pop(),a=e.join(``)+Vi;this._getTextWidth(a)>n&&(a=``)}i.text=a,i.width=this._getTextWidth(a)}getStrokeScaleEnabled(){return!0}_getStrokePadding(){return super._getStrokePadding(2)}_useBufferCanvas(e,t=this.getAbsoluteOpacity()){if(this.attrs.perfectDrawEnabled===!1)return!1;let n=this.textDecoration().indexOf(`underline`)!==-1||this.textDecoration().indexOf(`line-through`)!==-1,r=this.hasShadow();return n&&r||r&&t!==1&&Wi()?!0:super._useBufferCanvas(e,t)}};W.prototype._fillFunc=Ji,W.prototype._strokeFunc=Yi,W.prototype.className=ki,W.prototype._attrsAffectingSize=Hi.filter(e=>e!==`width`&&e!==`height`).concat([`textDecoration`,`underlineOffset`]),Je(W,!0),W.prototype.on(Hi.map(e=>e+wi).join(` `),function(){this._setTextData()}),V.overWriteSetter(W,`width`,Qt()),V.overWriteSetter(W,`height`,Qt()),V.addGetterSetter(W,`direction`,Si),V.addGetterSetter(W,`fontFamily`,`Arial`),V.addGetterSetter(W,`fontSize`,12,B()),V.addGetterSetter(W,`fontStyle`,Ni),V.addGetterSetter(W,`fontVariant`,Ni),V.addGetterSetter(W,`padding`,0,B()),V.addGetterSetter(W,`align`,Di),V.addGetterSetter(W,`verticalAlign`,Ai),V.addGetterSetter(W,`lineHeight`,1,B()),V.addGetterSetter(W,`wrap`,Ri),V.addGetterSetter(W,`ellipsis`,!1,nn()),V.addGetterSetter(W,`letterSpacing`,0,B()),V.addGetterSetter(W,`text`,``,$t()),V.addGetterSetter(W,`textDecoration`,``),V.addGetterSetter(W,`underlineOffset`,void 0,B()),V.addGetterSetter(W,`charRenderFunc`,void 0);var Zi=[...W.prototype._attrsAffectingSize,`width`,`height`,`pointerDirection`,`pointerWidth`,`pointerHeight`].map(e=>e+`Change.konva`).join(` `),Qi=`none`,$i=`up`,G=`right`,ea=`down`,ta=`left`,na=class extends Nr{constructor(e){super(e),this._sync=this._sync.bind(this),this.on(`add.konva`,function(e){e.child.off(Zi,this._sync).on(Zi,this._sync),this._sync()})}getText(){return this.find(`Text`)[0]}getTag(){return this.find(`Tag`)[0]}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let e=this.getText(),t=this.getTag(),n,r,i,a,o,s,c;if(e&&t){switch(n=e.width(),r=e.height(),i=t.pointerDirection(),a=t.pointerWidth(),c=t.pointerHeight(),o=0,s=0,i){case $i:o=n/2,s=-1*c;break;case G:o=n+a,s=r/2;break;case ea:o=n/2,s=r+c;break;case ta:o=-1*a,s=r/2}t.setAttrs({x:-1*o,y:-1*s,width:n,height:r}),e.setAttrs({x:-1*o,y:-1*s})}}};na.prototype.className=`Label`,Je(na);var ra=class extends U{_sceneFunc(e){let t=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius(),[s,c,l,u]=L._cornerRadii(o,t,n);e.beginPath(),e.moveTo(s,0),r===$i&&(e.lineTo((t-i)/2,0),e.lineTo(t/2,-1*a),e.lineTo((t+i)/2,0)),e.lineTo(t-c,0),e.arc(t-c,c,c,Math.PI*3/2,0,!1),r===G&&(e.lineTo(t,(n-a)/2),e.lineTo(t+i,n/2),e.lineTo(t,(n+a)/2)),e.lineTo(t,n-l),e.arc(t-l,n-l,l,0,Math.PI/2,!1),r===ea&&(e.lineTo((t+i)/2,n),e.lineTo(t/2,n+a),e.lineTo((t-i)/2,n)),e.lineTo(u,n),e.arc(u,n-u,u,Math.PI/2,Math.PI,!1),r===ta&&(e.lineTo(0,(n+a)/2),e.lineTo(-1*i,n/2),e.lineTo(0,(n-a)/2)),e.lineTo(0,s),e.arc(s,s,s,Math.PI,Math.PI*3/2,!1),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){let e=this.pointerWidth(),t=this.pointerHeight(),n=this.pointerDirection(),r=this.width(),i=this.height();return n===$i||n===ea?{x:Math.min(0,(r-e)/2),y:n===$i?-t:0,width:Math.max(r,e),height:i+t}:n===ta||n===G?{x:n===ta?-e:0,y:Math.min(0,(i-t)/2),width:r+e,height:Math.max(i,t)}:{x:0,y:0,width:r,height:i}}};ra.prototype.className=`Tag`,Je(ra,!0),V.addGetterSetter(ra,`pointerDirection`,Qi),V.addGetterSetter(ra,`pointerWidth`,0,B()),V.addGetterSetter(ra,`pointerHeight`,0,B()),V.addGetterSetter(ra,`cornerRadius`,0,Zt(4));var ia=class extends U{_getStrokePadding(){return super._getStrokePadding(this.strokeScaleEnabled()?1:void 0)}_sceneFunc(e){let t=this.cornerRadius(),n=this.width(),r=this.height();e.beginPath(),t?L.drawRoundedRectPath(e,n,r,t):e.rect(0,0,n,r),e.closePath(),e.fillStrokeShape(this)}};ia.prototype.className=`Rect`,Je(ia,!0),V.addGetterSetter(ia,`cornerRadius`,0,Zt(4));var aa=class extends U{_sceneFunc(e){let t=this._getPoints(),n=this.radius(),r=this.sides(),i=this.cornerRadius();if(t.length){if(e.beginPath(),i)L.drawRoundedPolygonPath(e,t,r,n,i);else{e.moveTo(t[0].x,t[0].y);for(let n=1;n{t=Math.min(t,e.x),n=Math.max(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.y)}),{x:t,y:r,width:n-t,height:i-r}}getWidth(){return this.radius()*2}getHeight(){return this.radius()*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};aa.prototype.className=`RegularPolygon`,aa.prototype._centroid=!0,aa.prototype._attrsAffectingSize=[`radius`,`sides`],Je(aa,!0),V.addGetterSetter(aa,`radius`,0,B()),V.addGetterSetter(aa,`sides`,0,B()),V.addGetterSetter(aa,`cornerRadius`,0,Zt(4));var oa=Math.PI*2,sa=class extends U{_getStrokePadding(){return super._getStrokePadding(1)}_sceneFunc(e){let t=Math.abs(this.innerRadius()),n=Math.abs(this.outerRadius());e.beginPath(),e.arc(0,0,t,0,oa,!1),e.moveTo(n,0),e.arc(0,0,n,oa,0,!0),e.closePath(),e.fillStrokeShape(this)}getSelfRect(){let e=Math.max(Math.abs(this.innerRadius()),Math.abs(this.outerRadius()));return{x:-e,y:-e,width:e*2,height:e*2}}getWidth(){return Math.abs(this.outerRadius())*2}getHeight(){return Math.abs(this.outerRadius())*2}setWidth(e){this.outerRadius(e/2)}setHeight(e){this.outerRadius(e/2)}};sa.prototype.className=`Ring`,sa.prototype._centroid=!0,sa.prototype._attrsAffectingSize=[`innerRadius`,`outerRadius`],Je(sa,!0),V.addGetterSetter(sa,`innerRadius`,0,B()),V.addGetterSetter(sa,`outerRadius`,0,B());var ca=class extends U{constructor(e){super(e),this._updated=!0,this.anim=new Fr(()=>{let e=this._updated;return this._updated=!1,e}),this.on(`animationChange.konva`,function(){this.frameIndex(0)}),this.on(`frameIndexChange.konva`,function(){this._updated=!0}),this.on(`frameRateChange.konva`,function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_getFrame(){let e=this.animation(),t=this.animations()?.[e],n=this.frameIndex(),r=n*4;if(!t||!Number.isInteger(n)||r<0||r+4>t.length)return;let i=this.frameOffsets()?.[e]||[];return{x:t[r],y:t[r+1],width:t[r+2],height:t[r+3],offsetX:i[n*2]||0,offsetY:i[n*2+1]||0}}_getStrokePadding(){return super._getStrokePadding(this.strokeScaleEnabled()?1:void 0)}_sceneFunc(e){let t=this._getFrame();if(!t)return;let{x:n,y:r,width:i,height:a,offsetX:o,offsetY:s}=t,c=this.image();(this.hasFill()||this.hasStroke())&&(e.beginPath(),e.rect(o,s,i,a),e.closePath(),e.fillStrokeShape(this)),c&&e.drawImage(c,n,r,i,a,o,s,i,a)}_hitFunc(e){let{x:t,y:n,width:r,height:i}=this.getSelfRect();e.beginPath(),e.rect(t,n,r,i),e.closePath(),e.fillShape(this)}getSelfRect(){let e=this._getFrame();return e?{x:e.offsetX,y:e.offsetY,width:e.width,height:e.height}:{x:0,y:0,width:0,height:0}}_useBufferCanvas(e,t=this.getAbsoluteOpacity()){return super._useBufferCanvas(!0,t)}_setInterval(){let e=this;this.interval=setInterval(function(){e._updateIndex()},1e3/this.frameRate())}start(){if(this.isRunning())return;let e=this.getLayer();this.anim.setLayers(e),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}destroy(){return this.stop(),super.destroy()}isRunning(){return this.anim.isRunning()}_updateIndex(){let e=this.frameIndex(),t=this.animations()?.[this.animation()],n=t?t.length/4:0;this.frameIndex(ethis.pathLength?null:fi.getPointAtLengthOfDataArray(e,this.dataArray,t)}_readDataAttribute(){this.dataArray=fi.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(e){e.setAttr(`font`,this._getContextFont()),e.setAttr(`textBaseline`,this.textBaseline()),e.setAttr(`textAlign`,`left`),e.save();let t=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo,a=t.indexOf(`underline`)!==-1,o=t.indexOf(`line-through`)!==-1;a&&e.beginPath();for(let t=0;t=1){let n=t[0].p0;e.moveTo(n.x,n.y)}for(let n=0;n0)try{a=t(e[i-1],e[i])*this.fontSize()}catch{}n.push({char:e[i],width:this._getTextSize(e[i]).width,kern:a}),r+=n[i].width+a}let{width:i,height:a}=this._getTextSize(this.attrs.text);if(this.textWidth=r,this.textHeight=a,this.glyphInfo=[],!this.attrs.data)return null;let o=this.letterSpacing(),s=this.align(),c=s===`justify`?this.text().split(` `).length-1:0,l=Math.max(0,r-i),u=Math.max(this.textWidth+(e.length-1)*o,0),d=0;s===`center`&&(d=Math.max(0,this.pathLength/2-u/2)),s===`right`&&(d=Math.max(0,this.pathLength-u));let f=d,p=this.dataArray.some((e,t)=>t>0&&e.command===`M`)?void 0:{index:0,offset:0};for(let t=0;tthis.pathLength&&d-this.pathLength<=l?this.pathLength:d,p);if(!m)return;let h=fi.getLineLength(r.x,r.y,m.x,m.y),g=Math.atan2(m.y-r.y,m.x-r.x);this.glyphInfo.push({text:e[t],rotation:g,p0:r,p1:m,width:h}),f+=a}}getSelfRect(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};let e=[];this.glyphInfo.forEach(function(t){e.push(t.p0.x),e.push(t.p0.y),e.push(t.p1.x),e.push(t.p1.y)});let t=L._getPointsRect(e),n=this.fontSize();return{x:t.x-n/2,y:t.y-n/2,width:t.width+n,height:t.height+n}}getStrokeScaleEnabled(){return!0}_getSelfRectForDrawing(){let e=this.getSelfRect(),t=this.fontSize();return{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}}};K.prototype._fillFunc=fa,K.prototype._strokeFunc=pa,K.prototype._fillFuncHit=fa,K.prototype._strokeFuncHit=pa,K.prototype.className=`TextPath`,K.prototype._attrsAffectingSize=[`text`,`fontSize`,`data`,`align`,`letterSpacing`,`kerningFunc`,`fontFamily`,`fontStyle`,`fontVariant`,`direction`],Je(K,!0),K.prototype.on(`dataChange.konva`,function(){this._readDataAttribute(),this._setTextData()}),K.prototype.on(K.prototype._attrsAffectingSize.filter(e=>e!==`data`).map(e=>e+`Change.konva`).join(` `),function(){this._setTextData()}),V.addGetterSetter(K,`data`),V.addGetterSetter(K,`fontFamily`,`Arial`),V.addGetterSetter(K,`fontSize`,12,B()),V.addGetterSetter(K,`fontStyle`,da),V.addGetterSetter(K,`align`,`left`),V.addGetterSetter(K,`letterSpacing`,0,B()),V.addGetterSetter(K,`textBaseline`,`middle`),V.addGetterSetter(K,`fontVariant`,da),V.addGetterSetter(K,`text`,ua),V.addGetterSetter(K,`textDecoration`,``),V.addGetterSetter(K,`kerningFunc`,void 0),V.addGetterSetter(K,`direction`,`inherit`);var ma=`tr-konva`,ha=[`resizeEnabledChange`,`rotateAnchorOffsetChange`,`rotateAnchorAngleChange`,`rotateEnabledChange`,`rotateModeChange`,`enabledAnchorsChange`,`anchorSizeChange`,`borderEnabledChange`,`shouldOverdrawWholeAreaChange`,`borderStrokeChange`,`borderStrokeWidthChange`,`borderDashChange`,`anchorStrokeChange`,`anchorStrokeWidthChange`,`anchorFillChange`,`anchorCornerRadiusChange`,`ignoreStrokeChange`,`anchorStyleFuncChange`,`paddingChange`].map(e=>e+`.${ma}`).join(` `),ga=`nodesRect`,_a=[`widthChange`,`heightChange`,`scaleXChange`,`scaleYChange`,`skewXChange`,`skewYChange`,`rotationChange`,`offsetXChange`,`offsetYChange`,`transformsEnabledChange`,`strokeWidthChange`,`strokeChange`,`selfRectFuncChange`,`strokeLinearGradientColorStopsChange`,`strokeScaleEnabledChange`,`strokeEnabledChange`,`draggableChange`],va={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},ya=`ontouchstart`in I._global,ba=[`rotater-top-left`,`rotater-top-right`,`rotater-bottom-left`,`rotater-bottom-right`];function xa(e){return e.startsWith(`rotater`)}var Sa=Math.PI/12;function Ca(e,t){let n=``;return`url("data:image/svg+xml,${encodeURIComponent(n)}") 12 12, ${t}`}function wa(e,t,n){if(e===`rotater`)return n;if(xa(e)){let r=e.slice(8);return Ca(Math.round(L.radToDeg(t)+va[r]-45),n)}t+=L.degToRad(va[e]||0);let r=(L.radToDeg(t)%360+360)%360;return L._inRange(r,337.5,360)||L._inRange(r,0,22.5)?`ns-resize`:L._inRange(r,22.5,67.5)?`nesw-resize`:L._inRange(r,67.5,112.5)?`ew-resize`:L._inRange(r,112.5,157.5)?`nwse-resize`:L._inRange(r,157.5,202.5)?`ns-resize`:L._inRange(r,202.5,247.5)?`nesw-resize`:L._inRange(r,247.5,292.5)?`ew-resize`:L._inRange(r,292.5,337.5)?`nwse-resize`:(L.error(`Transformer has unknown angle for cursor detection: `+r),`pointer`)}var Ta=[`top-left`,`top-center`,`top-right`,`middle-right`,`middle-left`,`bottom-left`,`bottom-center`,`bottom-right`];function Ea(e){return{x:e.x+e.width/2*Math.cos(e.rotation)+e.height/2*Math.sin(-e.rotation),y:e.y+e.height/2*Math.cos(e.rotation)+e.width/2*Math.sin(e.rotation)}}function Da(e,t,n){let r=n.x+(e.x-n.x)*Math.cos(t)-(e.y-n.y)*Math.sin(t),i=n.y+(e.x-n.x)*Math.sin(t)+(e.y-n.y)*Math.cos(t);return{...e,rotation:e.rotation+t,x:r,y:i}}function Oa(e,t){return Da(e,t,Ea(e))}function ka(e,t,n){let r=t,i=n;for(let n=0;n0&&(c=Math.min(c,(n-s)/a)),i<0?c=Math.min(c,-o/i):i>0&&(c=Math.min(c,(t-o)/i));let l=o+i*c,u=s+a*c,d=e.rotateAnchorOffset()+e.padding();return{edgeX:l,edgeY:u,endX:l+i*d,endY:u+a*d}}var ja=new Set,q=class extends Nr{static _isLayerTransforming(e){for(let t of ja)if(t.getLayer()===e||t._nodes.some(t=>t.getLayer()===e))return!0;return!1}constructor(e){super(e),this._movingAnchorName=null,this._anchors={},this._transforming=!1,this._fitting=!1,this._transformWindow=null,this._elementsCreated=!1,this._updatePending=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this._syncUpdate=this._syncUpdate.bind(this),this.on(ha,e=>{e.type===`ignoreStrokeChange`&&this._resetTransformCache(),this.update()}),this.on(`rotationChange.${ma}`,()=>this._clearCache(ga)),this.getNode()&&this.update()}attachTo(e){return this.setNode(e),this}setNode(e){return L.warn(`tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead.`),this.setNodes([e])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return ma+this._id}setNodes(e=[]){this._nodes&&this._nodes.length&&this.detach();let t=new Set(e);for(let e of t)e.isAncestorOf(this)&&(L.error(`Konva.Transformer cannot be an a child of the node you are trying to attach`),t.delete(e));let n=Array.from(t).filter(e=>{for(let n=e.getParent();n;n=n.getParent())if(t.has(n))return!1;return!0});return this._nodes=e=n,this._resetRotation(),this._nodes.forEach(e=>{let t=()=>{var t;this._fitting?(t=this._nodeRectCache)==null||t.delete(e):(this.nodes().length===1&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(e),this.isDragging()||this._scheduleUpdate())};if(e._attrsAffectingSize.length){let n=e._attrsAffectingSize.map(e=>e+`Change.`+this._getEventNamespace()).join(` `);e.on(n,t)}e.on(_a.map(e=>e+`.${this._getEventNamespace()}`).join(` `),t),e.on(`absoluteTransformChange.${this._getEventNamespace()}`,t),e instanceof Tn&&e._addSubtreeObserver(this),e.on(`destroy.${this._getEventNamespace()}`,()=>{this._removeNode(e)}),this._proxyDrag(e)}),this._resetTransformCache(),this._elementsCreated&&this.update(),this}_proxyDrag(e){let t;e.on(`dragstart.${this._getEventNamespace()}`,n=>{t=e.getAbsolutePosition(),!this.isDragging()&&e!==this._back&&this.startDrag(n,!1)}),e.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!t)return;let r=e.getAbsolutePosition(),i=r.x-t.x,a=r.y-t.y;this.nodes().forEach(t=>{if(t===e||t.isDragging())return;let r=t.getAbsolutePosition();t.setAbsolutePosition({x:r.x+i,y:r.y+a}),t.startDrag(n)}),t=null})}_detachNode(e){e.off(`.`+this._getEventNamespace()),e._removeSubtreeObserver(this)}_resetRotation(){let e=this._nodes.length===1&&this.useSingleNodeRotation();this.rotation(e?this._nodes[0].getAbsoluteRotation():0)}_removeNode(e){this._detachNode(e),this._nodes=this._nodes.filter(t=>t!==e),this._resetRotation(),this._resetTransformCache(e),this._scheduleUpdate()}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){var e,t;(e=this._nodes)==null||e.forEach(e=>this._detachNode(e)),this._nodes=[],this._updatePending=!1,this._resetTransformCache(),(t=this.getLayer())==null||t.batchDraw()}_resetTransformCache(e){var t,n;e?(t=this._nodeRectCache)==null||t.delete(e):(n=this._nodeRectCache)==null||n.clear(),this._clearCache(ga),this._clearCache(`transform`),this._clearSelfAndDescendantCache(`absoluteTransform`)}_onSubtreeChange(e){var t;this._fitting||((!this._updatePending||this._cache[ga])&&this._resetTransformCache(e),H._updateBatchDepth>0?this._scheduleUpdate():this._updatePending||(this._updatePending=!0,L.requestAnimFrame(this._syncUpdate,this.getStage()?._getOwnerWindow()),(t=this.getLayer())==null||t.batchDraw()))}_syncUpdate(){this._updatePending&&!this._fitting&&!this.isDragging()&&this._update()}drawScene(e,t){return this._syncUpdate(),super.drawScene(e,t)}drawHit(e,t){return this._syncUpdate(),super.drawHit(e,t)}_getNodeRect(){return this._getCache(ga,this.__getNodeRect)}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};let e=I.getAngle(this.rotation()),t=this.ignoreStroke(),n=new Ze;n.rotate(-e);let r=this._nodeRectCache||=new Map,i=1/0,a=1/0,o=-1/0,s=-1/0;for(let c of this.nodes()){let l=c instanceof U&&c.getSelfRect===U.prototype.getSelfRect&&!c.attrs.selfRectFunc&&!c._hasCachedAncestor(),u=l?c.width():0,d=l?c.height():0;l&&(c._attrsVersion??=0);let f=l?r.get(c):void 0;if(!f||f.rotation!==e||f.ignoreStroke!==t||f.version!==c._attrsVersion||f.width!==u||f.height!==d){let i=c.getAbsoluteTransform(),[a,o,s,p]=i.getMatrix(),m=a*p-o*s===0,h=c.getClientRect({skipTransform:!m,skipShadow:!0,skipStroke:t}),g=[{x:h.x,y:h.y},{x:h.x+h.width,y:h.y},{x:h.x+h.width,y:h.y+h.height},{x:h.x,y:h.y+h.height}];m&&(i=new Ze),f={rotation:e,ignoreStroke:t,width:u,height:d,version:c._attrsVersion||0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};for(let e of g){let t=n.point(i.point(e));f.minX=Math.min(f.minX,t.x),f.minY=Math.min(f.minY,t.y),f.maxX=Math.max(f.maxX,t.x),f.maxY=Math.max(f.maxY,t.y)}l&&r.set(c,f)}i=Math.min(i,f.minX),a=Math.min(a,f.minY),o=Math.max(o,f.maxX),s=Math.max(s,f.maxY)}n.invert();let c=n.point({x:i,y:a});return{x:c.x,y:c.y,width:o-i,height:s-a,rotation:I.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),ba.forEach(e=>{this._createAnchor(e,`_rotate-zone`).setAttrs({fill:`transparent`,strokeEnabled:!1,visible:!1})}),Ta.forEach(e=>{this._createAnchor(e)}),this._createAnchor(`rotater`),this._elementsCreated=!0}_createAnchor(e,t=`_anchor`){let n=new ia({stroke:`rgb(0, 161, 255)`,fill:`white`,strokeWidth:1,name:e+` `+t,dragDistance:0,draggable:!0,hitStrokeWidth:ya?10:`auto`});this._anchors[e]=n;let r=this;return n.on(`mousedown touchstart`,function(e){r._handleMouseDown(e)}),n.on(`dragstart`,e=>{n.stopDrag(),e.cancelBubble=!0}),n.on(`dragend`,e=>{e.cancelBubble=!0}),n.on(`mouseenter`,()=>{this.isTransforming()||(this._setAnchorCursor(e),this._cursorChange=!0)}),n.on(`mouseout`,()=>{this._cursorChange=!1,!this.isTransforming()&&n.getStage().content&&(n.getStage().content.style.cursor=``)}),this.add(n),n}_setAnchorCursor(e,t=I.getAngle(this.rotation())){let n=this.getStage()?.content;n&&(n.style.cursor=wa(e,t,this.rotateAnchorCursor()))}_createBack(){let e=new U({name:`back`,width:0,height:0,sceneFunc(e,t){let n=t.getParent();if(!n.borderEnabled())return;let r=n.padding(),i=t.width(),a=t.height();if(e.beginPath(),e.rect(-r,-r,i+r*2,a+r*2),n.rotateEnabled()&&n.rotateLineVisible()&&n.rotateMode()!==`corners`){let t=Aa(n,i,a);e.moveTo(t.edgeX,t.edgeY),e.lineTo(t.endX,t.endY)}e.fillStrokeShape(t)},hitFunc:(e,t)=>{if(!this.shouldOverdrawWholeArea())return;let n=this.padding();e.beginPath(),e.rect(-n,-n,t.width()+n*2,t.height()+n*2),e.fillStrokeShape(t)}});this._back=e,this.add(e),this._proxyDrag(e),e.on(`dragstart`,e=>{e.cancelBubble=!0}),e.on(`dragmove`,e=>{e.cancelBubble=!0}),e.on(`dragend`,e=>{e.cancelBubble=!0}),this.on(`dragmove`,e=>{this.update()})}_handleMouseDown(e){if(e.evt.button!==void 0&&!I.dragButtons.includes(e.evt.button)||this._transforming)return;this._movingAnchorName=e.target.name().split(` `)[0];let t=this._getNodeRect(),n=t.width,r=t.height,i=Math.sqrt(n**2+r**2);this.sin=Math.abs(r/i),this.cos=Math.abs(n/i);let a=this.getStage()?._getOwnerWindow();this._transformWindow=a||null,a&&(a.addEventListener(`mousemove`,this._handleMouseMove),a.addEventListener(`touchmove`,this._handleMouseMove),a.addEventListener(`mouseup`,this._handleMouseUp,!0),a.addEventListener(`touchend`,this._handleMouseUp,!0),a.addEventListener(`touchcancel`,this._handleMouseUp,!0)),this._transforming=!0,this._pointerId=e.pointerId??L._getFirstPointerId(e.evt);let o=e.target.getAbsolutePosition(),s=e.target.getStage()._getPointerById(this._pointerId);if(this._anchorDragOffset={x:s.x-o.x,y:s.y-o.y},xa(this._movingAnchorName)){let e=Ea(t);this._rotateStart={pointerAngle:Math.atan2(s.y-e.y,s.x-e.x),rotation:t.rotation}}ja.add(this),this._fire(`transformstart`,{evt:e.evt,target:this.getNode()}),this._nodes.forEach(t=>{t._fire(`transformstart`,{evt:e.evt,target:t})})}_handleMouseMove(e){var t;(t=this.getStage())==null||t._batchEvents(()=>this._moveTransform(e))}_moveTransform(e){this._syncUpdate();let t,n,r,i=this._anchors[this._movingAnchorName],a=i.getStage();a.setPointersPositions(e);let o=a._getPointerById(this._pointerId);if(!o)return;let s={x:o.x-this._anchorDragOffset.x,y:o.y-this._anchorDragOffset.y},c=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(s=this.anchorDragBoundFunc()(c,s,e)),i.setAbsolutePosition(s);let l=i.getAbsolutePosition();if(c.x===l.x&&c.y===l.y)return;if(xa(this._movingAnchorName)){let t=this._getNodeRect(),n=Ea(t),r=this._rotateStart,i={x:l.x+this._anchorDragOffset.x,y:l.y+this._anchorDragOffset.y},a=Math.atan2(i.y-n.y,i.x-n.x),o=r.rotation+a-r.pointerAngle,s;if(e.shiftKey&&this.shiftBehavior()!==`none`)s=Math.round(o/Sa)*Sa;else{let e=I.getAngle(this.rotationSnapTolerance());s=ka(this.rotationSnaps(),o,e)}this._movingAnchorName!==`rotater`&&this._setAnchorCursor(this._movingAnchorName,s);let c=Oa(t,s-t.rotation);this._fitNodesInto(c,e);return}let u=this.shiftBehavior(),d;d=u===`inverted`?this.keepRatio()&&!e.shiftKey:u===`none`?this.keepRatio():this.keepRatio()||e.shiftKey;let f=this.centeredScaling()||e.altKey,p=!1;if(this._movingAnchorName===`top-left`){if(d){p=!0;let e=f?{x:this.width()/2,y:this.height()/2}:{x:this._anchors[`bottom-right`].x(),y:this._anchors[`bottom-right`].y()};r=Math.sqrt((e.x-i.x())**2+(e.y-i.y())**2);let a=this._anchors[`top-left`].x()>e.x?-1:1,o=this._anchors[`top-left`].y()>e.y?-1:1;t=r*this.cos*a,n=r*this.sin*o,this._anchors[`top-left`].x(e.x-t),this._anchors[`top-left`].y(e.y-n)}}else if(this._movingAnchorName===`top-center`)this._anchors[`top-left`].y(i.y());else if(this._movingAnchorName===`top-right`){if(d){p=!0;let e=f?{x:this.width()/2,y:this.height()/2}:{x:this._anchors[`bottom-left`].x(),y:this._anchors[`bottom-left`].y()};r=Math.sqrt((i.x()-e.x)**2+(e.y-i.y())**2);let a=this._anchors[`top-right`].x()e.y?-1:1;t=r*this.cos*a,n=r*this.sin*o,this._anchors[`top-right`].x(e.x+t),this._anchors[`top-right`].y(e.y-n)}var m=i.position();this._anchors[`top-left`].y(m.y),this._anchors[`bottom-right`].x(m.x)}else if(this._movingAnchorName===`middle-left`)this._anchors[`top-left`].x(i.x());else if(this._movingAnchorName===`middle-right`)this._anchors[`bottom-right`].x(i.x());else if(this._movingAnchorName===`bottom-left`){if(d){p=!0;let e=f?{x:this.width()/2,y:this.height()/2}:{x:this._anchors[`top-right`].x(),y:this._anchors[`top-right`].y()};r=Math.sqrt((e.x-i.x())**2+(i.y()-e.y)**2);let a=e.xe.id===this._pointerId))||(t?t._batchEvents(()=>this._removeEvents(e)):this._removeEvents(e))}getAbsoluteTransform(e){let t=this.getTransform();return e?e.getAbsoluteTransform().copy().invert().multiply(t):t}_removeEvents(e){var t;if(this._transforming){this._transforming=!1;let n=this.getStage()?.content;n&&!this._cursorChange&&(n.style.cursor=``);let r=this._transformWindow;this._transformWindow=null,r&&(r.removeEventListener(`mousemove`,this._handleMouseMove),r.removeEventListener(`touchmove`,this._handleMouseMove),r.removeEventListener(`mouseup`,this._handleMouseUp,!0),r.removeEventListener(`touchend`,this._handleMouseUp,!0),r.removeEventListener(`touchcancel`,this._handleMouseUp,!0));let i=this.getNode();ja.delete(this),this._fire(`transformend`,{evt:e,target:i}),(t=this.getLayer())==null||t.batchDraw(),i&&this._nodes.forEach(t=>{var n;t._fire(`transformend`,{evt:e,target:t}),(n=t.getLayer())==null||n.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(e,t,n=!1){this._fitting=!0;try{return this._doFitNodesInto(e,t,n)}finally{this._fitting=!1}}_doFitNodesInto(e,t,n=!1){let r=this._getNodeRect();if(!r.width||!r.height||L._inRange(e.width,-this.padding()*2-1,1)||L._inRange(e.height,-this.padding()*2-1,1)){this.update();return}let i=new Ze;i.rotate(I.getAngle(this.rotation()));let a=n?0:this.padding()*2,o=null,s=null;if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`left`)>=0){let t=i.point({x:-a,y:0});e.x+=t.x,e.y+=t.y,e.width+=a,o={axis:`width`,from:`left`,to:`right`,offset:t}}else if(this._movingAnchorName&&e.width<0&&this._movingAnchorName.indexOf(`right`)>=0){let t=i.point({x:a,y:0});e.width+=a,o={axis:`width`,from:`right`,to:`left`,offset:t}}if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`top`)>=0){let t=i.point({x:0,y:-a});e.x+=t.x,e.y+=t.y,e.height+=a,s={axis:`height`,from:`top`,to:`bottom`,offset:t}}else if(this._movingAnchorName&&e.height<0&&this._movingAnchorName.indexOf(`bottom`)>=0){let t=i.point({x:0,y:a});e.height+=a,s={axis:`height`,from:`bottom`,to:`top`,offset:t}}if(this.boundBoxFunc()){let t=this.boundBoxFunc()(r,e);t?e=t:L.warn(`boundBoxFunc returned falsy. You should return new bound rect from it!`)}for(let t of[o,s])t&&e[t.axis]<0&&this._movingAnchorName&&(this._movingAnchorName=this._movingAnchorName.replace(t.from,t.to),this._anchorDragOffset.x-=t.offset.x,this._anchorDragOffset.y-=t.offset.y);let c=1e7,l=new Ze;l.translate(r.x,r.y),l.rotate(r.rotation),l.scale(r.width/c,r.height/c);let u=new Ze,d=e.width/c,f=e.height/c;this.flipEnabled()===!1?(u.translate(e.x,e.y),u.rotate(e.rotation),u.translate(e.width<0?e.width:0,e.height<0?e.height:0),u.scale(Math.abs(d),Math.abs(f))):(u.translate(e.x,e.y),u.rotate(e.rotation),u.scale(d,f));let p=u.multiply(l.invert()),m=new Set;this._nodes.forEach(e=>{if(!e.getStage())return;let t=e.getParent().getAbsoluteTransform(),n=e.getTransform().copy();n.translate(e.offsetX(),e.offsetY());let r=new Ze;r.multiply(t.copy().invert()).multiply(p).multiply(t).multiply(n);let i=r.decompose();e.setAttrs(i);let a=e.getLayer();a&&m.add(a)}),this.rotation(L._getRotation(e.rotation)),this._nodes.forEach(e=>{this._fire(`transform`,{evt:t,target:e}),e._fire(`transform`,{evt:t,target:e})}),this._resetTransformCache(),this.update(),m.add(this.getLayer()),m.forEach(e=>e&&e.batchDraw())}_scheduleUpdate(){this._updatePending=!0,H._runAfterUpdateBatch(this._syncUpdate)}forceUpdate(){this._resetTransformCache(),this.update()}update(){this._lastNodeRect=void 0,this._update()}_update(){var e;this._updatePending=!1;let t=this._getNodeRect();this._updateElements(t);let n=this.nodes().some(e=>e.draggable());this._back.draggable()!==n&&this._back.draggable(n);let r=this.anchorStyleFunc();r&&Object.values(this._anchors).forEach(e=>e.hasName(`_anchor`)&&r(e)),(e=this.getLayer())==null||e.batchDraw()}_updateElements(e){let t=this._lastNodeRect;if(t&&!this.anchorStyleFunc()&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height&&e.rotation===t.rotation)return;this._lastNodeRect={...e};let n=e.width,r=e.height,i=this.enabledAnchors(),a=this.resizeEnabled(),o=this.padding(),s=this.anchorSize();Object.values(this._anchors).filter(e=>e.hasName(`_anchor`)).forEach(e=>{e.setAttrs({width:s,height:s,offsetX:s/2,offsetY:s/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._anchors[`top-left`].setAttrs({x:0,y:0,offsetX:s/2+o,offsetY:s/2+o,visible:a&&i.indexOf(`top-left`)>=0}),this._anchors[`top-center`].setAttrs({x:n/2,y:0,offsetY:s/2+o,visible:a&&i.indexOf(`top-center`)>=0}),this._anchors[`top-right`].setAttrs({x:n,y:0,offsetX:s/2-o,offsetY:s/2+o,visible:a&&i.indexOf(`top-right`)>=0}),this._anchors[`middle-left`].setAttrs({x:0,y:r/2,offsetX:s/2+o,visible:a&&i.indexOf(`middle-left`)>=0}),this._anchors[`middle-right`].setAttrs({x:n,y:r/2,offsetX:s/2-o,visible:a&&i.indexOf(`middle-right`)>=0}),this._anchors[`bottom-left`].setAttrs({x:0,y:r,offsetX:s/2+o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-left`)>=0}),this._anchors[`bottom-center`].setAttrs({x:n/2,y:r,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-center`)>=0}),this._anchors[`bottom-right`].setAttrs({x:n,y:r,offsetX:s/2-o,offsetY:s/2-o,visible:a&&i.indexOf(`bottom-right`)>=0});let c=this.rotateMode(),l=Aa(this,n,r);this._anchors.rotater.setAttrs({x:l.endX,y:l.endY,visible:this.rotateEnabled()&&c!==`corners`});let u=s*2,d=this.rotateEnabled()&&c!==`handle`,f=-o-u;ba.forEach(e=>{this._anchors[e].setAttrs({x:e.includes(`left`)?f:n+o,y:e.includes(`top`)?f:r+o,width:u,height:u,visible:d})}),this._back.setAttrs({width:n,height:r,visible:this.borderEnabled()||this.shouldOverdrawWholeArea(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0})}isTransforming(){return this._transforming}stopTransform(){this._transforming&&this._removeEvents()}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=``),Nr.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}add(...e){return this._elementsCreated?(L.error(`You cannot add external nodes to the Transformer. Use tr.nodes([node]) instead.`),this):super.add(...e)}toObject(){return H.prototype.toObject.call(this)}clone(e){return H.prototype.clone.call(this,e)}getClientRect(e){return this._syncUpdate(),this.nodes().length>0?super.getClientRect(e):{x:0,y:0,width:0,height:0}}};q.isTransforming=()=>ja.size>0;function Ma(e){return e instanceof Array||L.warn(`enabledAnchors value should be an array`),e instanceof Array&&e.forEach(function(e){Ta.indexOf(e)===-1&&L.warn(`Unknown anchor name: `+e+`. Available names are: `+Ta.join(`, `))}),e||[]}q.prototype.className=`Transformer`,Je(q),V.addGetterSetter(q,`enabledAnchors`,Ta,Ma),V.addGetterSetter(q,`flipEnabled`,!0,nn()),V.addGetterSetter(q,`resizeEnabled`,!0),V.addGetterSetter(q,`anchorSize`,10,B()),V.addGetterSetter(q,`rotateEnabled`,!0),V.addGetterSetter(q,`rotateLineVisible`,!0),V.addGetterSetter(q,`rotationSnaps`,[]),V.addGetterSetter(q,`rotateAnchorOffset`,50,B()),V.addGetterSetter(q,`rotateAnchorAngle`,0,B()),V.addGetterSetter(q,`rotateAnchorCursor`,`crosshair`),V.addGetterSetter(q,`rotateMode`,`handle`),V.addGetterSetter(q,`rotationSnapTolerance`,5,B()),V.addGetterSetter(q,`borderEnabled`,!0),V.addGetterSetter(q,`anchorStroke`,`rgb(0, 161, 255)`),V.addGetterSetter(q,`anchorStrokeWidth`,1,B()),V.addGetterSetter(q,`anchorFill`,`white`),V.addGetterSetter(q,`anchorCornerRadius`,0,B()),V.addGetterSetter(q,`borderStroke`,`rgb(0, 161, 255)`),V.addGetterSetter(q,`borderStrokeWidth`,1,B()),V.addGetterSetter(q,`borderDash`),V.addGetterSetter(q,`keepRatio`,!0),V.addGetterSetter(q,`shiftBehavior`,`default`),V.addGetterSetter(q,`centeredScaling`,!1),V.addGetterSetter(q,`ignoreStroke`,!1),V.addGetterSetter(q,`padding`,0,B()),V.addGetterSetter(q,`nodes`),V.addGetterSetter(q,`node`),V.addGetterSetter(q,`boundBoxFunc`),V.addGetterSetter(q,`anchorDragBoundFunc`),V.addGetterSetter(q,`anchorStyleFunc`),V.addGetterSetter(q,`shouldOverdrawWholeArea`,!1),V.addGetterSetter(q,`useSingleNodeRotation`,!0),V.backCompat(q,{lineEnabled:`borderEnabled`,rotateHandlerOffset:`rotateAnchorOffset`,enabledHandlers:`enabledAnchors`});var Na=class extends U{_sceneFunc(e){e.beginPath(),e.arc(0,0,Math.abs(this.radius()),0,I.getAngle(this.angle()),this.clockwise()),e.lineTo(0,0),e.closePath(),e.fillStrokeShape(this)}getWidth(){return Math.abs(this.radius())*2}getHeight(){return Math.abs(this.radius())*2}setWidth(e){this.radius(e/2)}setHeight(e){this.radius(e/2)}};Na.prototype.className=`Wedge`,Na.prototype._centroid=!0,Na.prototype._attrsAffectingSize=[`radius`],Je(Na,!0),V.addGetterSetter(Na,`radius`,0,B()),V.addGetterSetter(Na,`angle`,0,B()),V.addGetterSetter(Na,`clockwise`,!1),V.backCompat(Na,{angleDeg:`angle`,getAngleDeg:`getAngle`,setAngleDeg:`setAngle`});function Pa(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var Fa=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Ia=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function La(e,t){return t===255?e:e*t/255}var Ra=180;function za(e,t){let n=e.data,r=e.width,i=e.height,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t+t+1,ee=r-1,E=i-1,D=t+1,te=D*(D+1)/2,ne=new Pa,O=t<=Ra?Fa[t]/2**Ia[t]:1/(D*D),re=null,k=ne,A=null,ie=null;for(let e=1;e0?(C=255/C,n[a]=Math.floor(c*O)*C,n[a+1]=Math.floor(l*O)*C,n[a+2]=Math.floor(u*O)*C):n[a]=n[a+1]=n[a+2]=0,c-=f,l-=p,u-=m,d-=h,f-=A.r,p-=A.g,m-=A.b,h-=A.a,a=e+((a=t+D)0&&za(e,n)};V.addGetterSetter(H,`blurRadius`,0,B(),V.afterSetFilter);var Va=function(e){let t=this.brightness()*255,n=e.data,r=n.length;for(let e=0;e255?255:i,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,n[e]=i,n[e+1]=a,n[e+2]=o};V.addGetterSetter(H,`contrast`,0,B(),V.afterSetFilter);var Wa=function(e){let t=e.data,n=e.width,r=e.height,i=Math.min(1,Math.max(0,this.embossStrength?.call(this)??.5)),a=Math.min(1,Math.max(0,this.embossWhiteLevel?.call(this)??.5)),o={"top-left":315,top:270,"top-right":225,right:180,"bottom-right":135,bottom:90,"bottom-left":45,left:0}[this.embossDirection?.call(this)??`top-left`]??315,s=!!(this.embossBlend?.call(this)??!1),c=i*10,l=a*255,u=o*Math.PI/180,d=Math.cos(u),f=Math.sin(u),p=128/1020*c,m=new Float32Array(n*r);for(let e=0,n=0;ne<0?0:e>255?255:e;for(let e=0;ei&&(i=a),c=t[e+1],cs&&(s=c),d=t[e+2],du&&(u=d);i===r&&(i=255,r=0),s===o&&(s=255,o=0),u===l&&(u=255,l=0);let p,m,h,g,_,v;if(f>0)p=i+f*(255-i),m=r-f*(r-0),h=s+f*(255-s),g=o-f*(o-0),_=u+f*(255-u),v=l-f*(l-0);else{let e=(i+r)*.5;p=i+f*(i-e),m=r+f*(r-e);let t=(s+o)*.5;h=s+f*(s-t),g=o+f*(o-t);let n=(u+l)*.5;_=u+f*(u-n),v=l+f*(l-n)}for(let e=0;el?f:l;let p=o,m=a,h=360/m*Math.PI/180;for(let e=0;el?f:l;let p=o,m=a,h=n.polarRotation||0,g,_;for(u=0;ut&&(y=v,b=0,x=-1),i=0;i=0&&d=0&&f=0&&d=0&&f=1020?255:0}return o}function so(e,t,n){let r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[];for(let s=0;s=0&&d=0&&fMath.min(1,Math.max(0,e)),V.afterSetFilter),V.addGetterSetter(H,`threshold`,.5,B(),V.afterSetFilter),Jr.Util._assign(Jr,{Arc:Yr,Arrow:pi,Circle:mi,Ellipse:hi,Image:gi,Label:na,Tag:ra,Line:li,Path:fi,Rect:ia,RegularPolygon:aa,Ring:sa,Sprite:ca,Star:la,Text:W,TextPath:K,Transformer:q,Wedge:Na,Filters:{Blur:Ba,Brightness:Ha,Brighten:Va,Contrast:Ua,Emboss:Wa,Enhance:Ka,Grayscale:qa,HSL:Ja,HSV:Ya,Invert:Xa,Kaleidoscope:$a,Mask:function(e){let t=ro(e,this.attrs.threshold??10);return t&&(t=ao(t,e.width,e.height),t=oo(t,e.width,e.height),t=so(t,e.width,e.height),io(e,t)),e},Noise:function(e){let t=this.noise()*255,n=e.data,r=n.length,i=t/2;for(let e=0;e=128&&(t[e]=255-n,t[e+1]=255-r,t[e+2]=255-i)}return e},Threshold:function(e){let t=this.threshold()*255,n=e.data,r=n.length;for(let e=0;e{t.exports=function(e){function t(e,t,n,r){return new Qa(e,t,n,r)}function n(){}function r(e){var t=`https://react.dev/errors/`+e;if(1Sl||(e.current=xl[Sl],xl[Sl]=null,Sl--)}function h(e,t){Sl++,xl[Sl]=e.current,e.current=t}function g(e){return e>>>=0,e===0?32:31-(Tl(e)/El|0)|0}function _(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function v(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=_(n))):i=_(o):i=_(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=_(n))):i=_(o)):i=_(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function y(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function b(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0n;n++)t.push(e);return t}function w(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function T(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Yl=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ae(n):``}function oe(e,t){switch(e.tag){case 26:case 27:case 5:return ae(e.type);case 16:return ae(`Lazy`);case 13:return e.child!==t&&t!==null?ae(`Suspense Fallback`):ae(`Suspense`);case 19:return ae(`SuspenseList`);case 0:case 15:return j(e.type,!1);case 11:return j(e.type.render,!1);case 1:return j(e.type,!0);case 31:return ae(`Activity`);case 30:return ae(`ViewTransition`);default:return``}}function se(e){try{var t=``,n=null;do t+=oe(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}function M(e,t){if(typeof e==`object`&&e){var n=Xl.get(e);return n===void 0?(t={value:e,source:t,stack:se(t)},Xl.set(e,t),t):n}return{value:e,source:t,stack:se(t)}}function ce(e,t){Zl[Ql++]=eu,Zl[Ql++]=$l,$l=e,eu=t}function le(e,t,n){tu[nu++]=iu,tu[nu++]=au,tu[nu++]=ru,ru=e;var r=iu;e=au;var i=32-wl(r)-1;r&=~(1<>=o,i-=o,iu=1<<32-wl(t)+i|n<f?(p=d,d=null):p=d.sibling;var _=h(t,d,o[f],c);if(_===null){d===null&&(d=p);break}e&&d&&_.alternate===null&&n(t,d),r=s(_,r,f),u===null?l=_:u.sibling=_,u=_,d=p}if(f===o.length)return i(t,d),fu&&ce(t,f),l;if(d===null){for(;fp?(_=f,f=null):_=f.sibling;var y=h(t,f,v.value,l);if(y===null){f===null&&(f=_);break}e&&f&&y.alternate===null&&n(t,f),o=s(y,o,p),d===null?u=y:d.sibling=y,d=y,f=_}if(v.done)return i(t,f),fu&&ce(t,p),u;if(f===null){for(;!v.done;p++,v=c.next())v=m(t,v.value,l),v!==null&&(o=s(v,o,p),d===null?u=v:d.sibling=v,d=v);return fu&&ce(t,p),u}for(f=a(f);!v.done;p++,v=c.next())v=g(f,t,p,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&f.delete(_.key===null?p:_.key)),o=s(v,o,p),d===null?u=v:d.sibling=v,d=v);return e&&f.forEach(function(e){return n(t,e)}),fu&&ce(t,p),u}function y(e,t,a,s){if(typeof a==`object`&&a&&a.type===xo&&a.key===null&&a.props.ref===void 0&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case yo:a:{for(var u=a.key;t!==null;){if(t.key===u){if(u=a.type,u===xo){if(t.tag===7){i(e,t.sibling),s=o(t,a.props.children),rt(s,a),s.return=e,e=s;break a}}else if(t.elementType===u||typeof u==`object`&&u&&u.$$typeof===Ao&&$e(u)===t.type){i(e,t.sibling),s=o(t,a.props),rt(s,a),s.return=e,e=s;break a}i(e,t);break}n(e,t),t=t.sibling}a.type===xo?(s=ro(a.props.children,e.mode,s,a.key),rt(s,a),s.return=e,e=s):(s=no(a.type,a.key,a.props,null,e.mode,s),rt(s,a),s.return=e,e=s)}return c(e);case bo:a:{for(u=a.key;t!==null;){if(t.key===u){if(t.tag===4&&t.stateNode.containerInfo===a.containerInfo&&t.stateNode.implementation===a.implementation){i(e,t.sibling),s=o(t,a.children||[]),s.return=e,e=s;break a}i(e,t);break}n(e,t),t=t.sibling}s=oo(a,e.mode,s),s.return=e,e=s}return c(e);case Ao:return a=$e(a),y(e,t,a,s)}if(Ro(a))return _(e,t,a,s);if(l(a)){if(u=l(a),typeof u!=`function`)throw Error(r(150));return a=u.call(a),v(e,t,a,s)}if(typeof a.then==`function`)return y(e,t,nt(a),s);if(a.$$typeof===To)return y(e,t,Ae(e,a),s);it(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,t!==null&&t.tag===6?(i(e,t.sibling),s=o(t,a),s.return=e,e=s):(i(e,t),s=io(a,e.mode,s),s.return=e,e=s),c(e)):i(e,t)}return function(e,n,r,i){try{Hu=0;var a=y(e,n,r,i);return Vu=null,a}catch(n){if(n===Iu||n===Ru)throw n;var o=t(29,n,null,e.mode);return o.lanes=i,o.return=e,o}}}function ot(){for(var e=Ku,t=qu=Ku=0;ta?a:8);var o=X.T,s={};s.types=o===null?null:o.types,X.T=s,zn(e,!1,t,n);try{var c=i(),l=X.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Rn(e,t,I(c,r),da(e)):Rn(e,t,r,da(e))}catch(n){Rn(e,t,{then:function(){},status:`rejected`,reason:n},da())}finally{ss(a),o!==null&&s.types!==null&&(o.types=s.types),X.T=o}}function jn(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:bs,baseState:bs,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:z,lastRenderedState:bs},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:z,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Mn(){return ke(xs)}function Nn(){return R().memoizedState}function Pn(){return R().memoizedState}function Fn(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=da();e=mt(n);var r=ht(t,e,n);r!==null&&(K(r,t,n),gt(r,t,n)),t={cache:Me()},e.payload=t;return}t=t.return}}function In(e,t,n){var r=da();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bn(e)?Vn(t,n):(n=ct(e,t,n,r),n!==null&&(K(n,e,r),Hn(n,t,r)))}function Ln(e,t,n){Rn(e,t,n,da())}function Rn(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bn(e))Vn(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Wl(s,o))return st(e,t,i,0),Gd===null&&ot(),!1}catch{}if(n=ct(e,t,i,r),n!==null)return K(n,e,r),Hn(n,t,r),!0}return!1}function zn(e,t,n,i){if(i={lane:2,revertLane:We(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Bn(e)){if(t)throw Error(r(479))}else t=ct(e,n,i,2),t!==null&&K(t,e,2)}function Bn(e){var t=e.alternate;return e===$||t!==null&&t===$}function Vn(e,t){rd=nd=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hn(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,E(e,n)}}function Un(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:_o({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}function Wn(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Xe(n,r)||!Xe(i,a):!0}function Gn(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&pd.enqueueReplaceState(t,t.state,null)}function Kn(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=_o({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qn(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Jn(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Yn(e,t,n){return n=mt(n),n.tag=3,n.payload={element:null},n.callback=function(){qn(e,t)},n}function Xn(e){return e=mt(e),e.tag=3,e}function Zn(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Jn(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Jn(t,n,r),typeof i!=`function`&&(mf===null?mf=new Set([this]):mf.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Qn(e,t,n,i,a){if(n.flags|=32768,typeof i==`object`&&i&&typeof i.then==`function`){if(t=n.alternate,t!==null&&Ee(t,n,a,!0),n=Z.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Q===null?Ta():n.alternate===null&&ef===0&&(ef=3),n.flags&=-257,n.flags|=65536,n.lanes=a,i===zu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),Ka(e,i,a)),!1;case 22:return n.flags|=65536,i===zu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),Ka(e,i,a)),!1}throw Error(r(435,n.tag))}return Ka(e,i,a),Ta(),!1}if(fu)return t=Z.current,t===null?(i!==hu&&(t=Error(r(423),{cause:i}),Se(M(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,i=M(i,n),a=Yn(e.stateNode,i,a),_t(e,a),ef!==4&&(ef=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,i!==hu&&(e=Error(r(422),{cause:i}),Se(M(e,n)))),!1;var o=Error(r(520),{cause:i});if(o=M(o,n),sf===null?sf=[o]:sf.push(o),ef!==4&&(ef=2),t===null)return!0;i=M(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Yn(n.stateNode,i,e),_t(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(mf===null||!mf.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Xn(a),Zn(a,e,n,i),_t(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}function $n(e,t,n,r){t.child=e===null?Wu(t,null,n,r):Uu(t,e.child,n,r)}function er(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Oe(t),r=Pt(e,t,n,o,a,i),s=Rt(),e!==null&&!hd?(zt(e,t,i),Er(e,t,i)):(fu&&s&&ue(t),t.flags|=1,$n(e,t,r,i),t.child)}function tr(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!$a(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,nr(e,t,a,r,i)):(e=no(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Dr(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Xe:n,n(o,r)&&e.ref===t.ref)return Er(e,t,i)}return t.flags|=1,e=eo(a,r),e.ref=t.ref,e.return=t,t.child=e}function nr(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Xe(a,r)&&e.ref===t.ref){if(hd=!1,t.pendingProps=r=a,Dr(e,i))e.flags&131072&&(hd=!0);else return t.lanes=e.lanes,Er(e,t,i)}}return ur(e,t,n,r,i)}function rr(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return ar(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Je(t,a===null?null:a.cachePool),a===null?Ct():St(t,a),Et(t);else return r=t.lanes=536870912,ar(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Je(t,null),Ct(),Dt()):(Je(t,a.cachePool),St(t,a),Dt(),t.memoizedState=null);return $n(e,t,i,n),t.child}function ir(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ar(e,t,n,r,i){var a=qe();return a=a===null?null:{parent:ts?Su._currentValue:Su._currentValue2,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Je(t,null),Ct(),Et(t),e!==null&&Ee(e,t,r,!0),t.childLanes=i,null}function or(e,t){return t=vr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function sr(e,t,n){return Uu(t,e.child,null,n),e=or(t,t.pendingProps),e.flags|=2,Ot(t),t.memoizedState=null,e}function cr(e,t,n){var i=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(fu){if(i.mode===`hidden`)return e=or(t,i),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},ir(null,e);if(Tt(t),(e=du)?(e=Pc(e,mu),e!==null&&(t.memoizedState={dehydrated:e,treeContext:ru===null?null:{id:iu,overflow:au},retryLane:536870912,hydrationErrors:null},n=ao(e),n.return=t,t.child=n,uu=t,du=null)):e=null,e===null)throw _e(t);return t.lanes=536870912,null}return or(t,i)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Tt(t),a){if(t.flags&256)t.flags&=-257,t=sr(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558))}else if(hd||Ee(e,t,n,!1),a=(n&e.childLanes)!==0,hd||a){if(Xu.current===null){if(i=Gd,i!==null&&(s=D(i,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,lt(e,s),K(i,e,s),md;Ta()}t=sr(e,t,n)}else e=o.treeContext,is&&(du=kc(s),uu=t,fu=!0,pu=null,mu=!1,e!==null&&fe(t,e)),t=or(t,i),t.flags|=134221824;return t}return e=eo(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lr(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function ur(e,t,n,r,i){return Oe(t),n=Pt(e,t,n,r,void 0,i),r=Rt(),e!==null&&!hd?(zt(e,t,i),Er(e,t,i)):(fu&&r&&ue(t),t.flags|=1,$n(e,t,n,i),t.child)}function dr(e,t,n,r,i,a){return Oe(t),t.updateQueue=null,n=It(t,r,n,i),Ft(e),r=Rt(),e!==null&&!hd?(zt(e,t,a),Er(e,t,a)):(fu&&r&&ue(t),t.flags|=1,$n(e,t,n,a),t.child)}function fr(e,t,n,r,i){if(Oe(t),t.stateNode===null){var a=Cl,o=n.contextType;typeof o==`object`&&o&&(a=ke(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=pd,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ft(t),o=n.contextType,a.context=typeof o==`object`&&o?ke(o):Cl,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Un(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&pd.enqueueReplaceState(a,a.state,null),yt(t,r,a,i),vt(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Kn(n,s);a.props=c;var l=a.context,u=n.contextType;o=Cl,typeof u==`object`&&u&&(o=ke(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gn(t,a,r,o),Ju=!1;var f=t.memoizedState;a.state=f,yt(t,r,a,i),vt(),l=t.memoizedState,s||f!==l||Ju?(typeof d==`function`&&(Un(t,n,d,r),l=t.memoizedState),(c=Ju||Wn(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,pt(e,t),o=t.memoizedProps,u=Kn(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Cl,typeof l==`object`&&l&&(c=ke(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gn(t,a,r,c),Ju=!1,f=t.memoizedState,a.state=f,yt(t,r,a,i),vt();var p=t.memoizedState;o!==d||f!==p||Ju||e!==null&&e.dependencies!==null&&De(e.dependencies)?(typeof s==`function`&&(Un(t,n,s,r),p=t.memoizedState),(u=Ju||Wn(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&De(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,lr(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Uu(t,e.child,null,i),t.child=Uu(t,null,n,i)):$n(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Er(e,t,i),e}function pr(e,t,n,r){return be(),t.flags|=256,$n(e,t,n,r),t.child}function mr(e){return{baseLanes:e,cachePool:Ye()}}function hr(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=af),e}function gr(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Qu.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(fu){if(i?wt(t):Dt(),(e=du)?(e=Fc(e,mu),e!==null&&(t.memoizedState={dehydrated:e,treeContext:ru===null?null:{id:iu,overflow:au},retryLane:536870912,hydrationErrors:null},n=ao(e),n.return=t,t.child=n,uu=t,du=null)):e=null,e===null)throw _e(t);return t.lanes=bc(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Dt(),i=t.mode,a=vr({mode:`hidden`,children:a},i),r=ro(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=mr(n),r.childLanes=hr(e,o,n),t.memoizedState=gd,ir(null,r)):(wt(t),_r(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return br(e,t,a,o,r,c,s,n)}return i?(Dt(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=eo(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=ro(i,a,n,null),i.flags|=2):i=eo(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,ir(null,r),r=t.child,i=e.child.memoizedState,i===null?i=mr(n):(a=i.cachePool,a===null?a=Ye():(s=ts?Su._currentValue:Su._currentValue2,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=hr(e,o,n),t.memoizedState=gd,ir(e.child,r)):(wt(t),n=e.child,e=n.sibling,n=eo(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function _r(e,t){return t=vr({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function vr(e,n){return e=t(22,e,null,n),e.lanes=0,e}function yr(e,t,n){return Uu(t,e.child,null,n),e=_r(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function br(e,t,n,i,a,o,s,c){if(n)return t.flags&256?(wt(t),t.flags&=-257,yr(e,t,c)):t.memoizedState===null?(Dt(),o=a.fallback,s=t.mode,a=vr({mode:`visible`,children:a.children},s),o=ro(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,Uu(t,e.child,null,c),a=t.child,a.memoizedState=mr(c),a.childLanes=hr(e,i,c),t.memoizedState=gd,ir(null,a)):(Dt(),t.child=e.child,t.flags|=128,null);if(wt(t),bc(o))return i=xc(o).digest,i!==``&&(a=Error(r(419)),a.stack=``,a.digest=i,Se({value:a,source:null,stack:null})),yr(e,t,c);if(hd||Ee(e,t,c,!1),i=(c&e.childLanes)!==0,hd||i){if(Xu.current!==null)return yr(e,t,c);if(i=Gd,i!==null&&(a=D(i,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,lt(e,a),K(i,e,a),md;return yc(o)||Ta(),yr(e,t,c)}return yc(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,is&&(du=Ac(o),uu=t,fu=!0,pu=null,mu=!1,e!==null&&fe(t,e)),t=_r(t,a.children),t.flags|=134221824,t)}function xr(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),we(e.return,t,n)}function Sr(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&jt(n)===null&&(t=e),e=e.sibling}return t}function Cr(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function wr(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function Tr(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Qu.current;if(t.flags&128)return kt(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,kt(t,o),i===`backwards`&&e!==null?(wr(e),$n(e,t,r,n),wr(e)):$n(e,t,r,n),r=fu?eu:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xr(e,n,t);else if(e.tag===19)xr(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=Sr(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,wr(t)),Cr(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&jt(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Cr(t,!0,n,null,a,r);break;case`together`:Cr(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=Sr(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Cr(t,!1,i,n,a,r)}return t.child}function U(e,t,n){var r=t.pendingProps;return Ce(t,t.type,r.value),$n(e,t,r.children,n),t.child}function Er(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tf|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Ee(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=eo(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=eo(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Dr(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&De(e)))}function Or(e,t,n){switch(t.tag){case 3:pe(t,t.stateNode.containerInfo),Ce(t,Su,e.memoizedState.cache),be();break;case 27:case 5:he(t);break;case 4:pe(t,t.stateNode.containerInfo);break;case 10:Ce(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Tt(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return wt(t),t.flags|=128,null;r=Ee(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?gr(e,t,n):(wt(t),e=Er(e,t,n),e===null?null:e.sibling)}wt(t);break;case 19:if(t.flags&128)return Tr(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(Ee(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Tr(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),kt(t,Qu.current),r)break;return null;case 22:return t.lanes=0,rr(e,t,n,t.pendingProps);case 24:Ce(t,Su,e.memoizedState.cache)}return Er(e,t,n)}function kr(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)hd=!0;else{if(!Dr(e,n)&&!(t.flags&128))return hd=!1,Or(e,t,n);hd=!!(e.flags&131072)}}else hd=!1,fu&&t.flags&1048576&&le(t,eu,t.index);switch(t.lanes=0,t.tag){case 16:a:{var i=t.pendingProps;if(e=$e(t.elementType),t.type=e,typeof e==`function`)$a(e)?(i=Kn(e,i),t.tag=1,t=fr(null,t,e,i,n)):(t.tag=0,t=ur(null,t,e,i,n));else{if(e!=null){var a=e.$$typeof;if(a===Eo){t.tag=11,t=er(null,t,e,i,n);break a}if(a===ko){t.tag=14,t=tr(null,t,e,i,n);break a}if(a===To){t.tag=10,t.type=e,t=U(null,t,n);break a}}throw t=u(e)||e,Error(r(306,t,``))}}return t;case 0:return ur(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,a=Kn(i,t.pendingProps),fr(e,t,i,a,n);case 3:a:{if(pe(t,t.stateNode.containerInfo),e===null)throw Error(r(387));var o=t.pendingProps;a=t.memoizedState,i=a.element,pt(e,t),yt(t,o,null,n);var s=t.memoizedState;if(o=s.cache,Ce(t,Su,o),o!==a.cache&&Te(t,[Su],n,!0),vt(),o=s.element,is&&a.isDehydrated){if(a={element:o,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=pr(e,t,o,n);break a}if(o!==i){i=M(Error(r(424)),t),Se(i),t=pr(e,t,o,n);break a}for(is&&(du=Oc(t.stateNode.containerInfo),uu=t,fu=!0,pu=null,mu=!0),n=Wu(t,null,o,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(be(),o===i){t=Er(e,t,n);break a}$n(e,t,o,n)}t=t.child}return t;case 26:if(tl)return lr(e,t),e===null?(n=il(t.type,null,t.pendingProps,null))?t.memoizedState=n:fu||(t.stateNode=ul(t.type,t.pendingProps,cu.current,t)):t.memoizedState=il(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:if(hl)return he(t),e===null&&hl&&fu&&(i=t.stateNode=gl(t.type,t.pendingProps,cu.current,ou.current,!1),uu=t,mu=!0,du=jc(t.type,i,du)),$n(e,t,t.pendingProps.children,n),lr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&fu&&($c(t.type,t.pendingProps,ou.current),(a=i=du)&&(i=Mc(i,t.type,t.pendingProps,mu),i===null?a=!1:(t.stateNode=i,uu=t,du=Dc(i),mu=!1,a=!0)),a||_e(t)),he(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,i=o.children,Xo(a,o)?i=null:s!==null&&Xo(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Pt(e,t,Lt,null,null,n),ts?xs._currentValue=a:xs._currentValue2=a),lr(e,t),$n(e,t,i,n),t.child;case 6:return e===null&&fu&&(el(t.pendingProps,ou.current),(e=n=du)&&(n=Nc(n,t.pendingProps,mu),n===null?e=!1:(t.stateNode=n,uu=t,du=null,e=!0)),e||_e(t)),null;case 13:return gr(e,t,n);case 4:return pe(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Uu(t,null,i,n):$n(e,t,i,n),t.child;case 11:return er(e,t,t.type,t.pendingProps,n);case 7:return i=t.pendingProps,lr(e,t),$n(e,t,i,n),t.child;case 8:return $n(e,t,t.pendingProps.children,n),t.child;case 12:return $n(e,t,t.pendingProps.children,n),t.child;case 10:return U(e,t,n);case 9:return a=t.type._context,i=t.pendingProps.children,Oe(t),a=ke(a),i=i(a),t.flags|=1,$n(e,t,i,n),t.child;case 14:return tr(e,t,t.type,t.pendingProps,n);case 15:return nr(e,t,t.type,t.pendingProps,n);case 19:return Tr(e,t,n);case 31:return cr(e,t,n);case 22:return rr(e,t,n,t.pendingProps);case 24:return Oe(t),i=ke(Su),e===null?(a=qe(),a===null&&(a=Gd,o=Me(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:i,cache:a},ft(t),Ce(t,Su,a)):((e.lanes&n)!==0&&(pt(e,t),yt(t,null,null,n),vt()),a=e.memoizedState,o=t.memoizedState,a.parent===i?(i=o.cache,Ce(t,Su,i),i!==a.cache&&Te(t,[Su],n,!0)):(a={parent:i,cache:i},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ce(t,Su,i))),$n(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),i=t.pendingProps,i.name!=null&&i.name!==`auto`?t.flags|=e===null?18882560:18874368:fu&&ue(t),e!==null&&e.memoizedProps.name!==i.name?t.flags|=4194816:lr(e,t),$n(e,t,i.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function Ar(e){e.flags|=4}function jr(e){rs&&(e.flags|=8)}function Mr(e,t){if(e!==null&&e.child===t.child)return!1;if(t.flags&16)return!0;for(e=t.child;e!==null;){if(e.flags&8218||e.subtreeFlags&8218)return!0;e=e.sibling}return!1}function Nr(e,t,n,r){if(ns)for(n=t.child;n!==null;){if(n.tag===5||n.tag===6)Jo(e,n.stateNode);else if(!(n.tag===4||hl&&n.tag===27)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}else if(rs)for(var i=t.child;i!==null;){if(i.tag===5){var a=i.stateNode;n&&r&&(a=_c(a,i.type,i.memoizedProps)),Jo(e,a)}else if(i.tag===6)a=i.stateNode,n&&r&&(a=vc(a,i.memoizedProps)),Jo(e,a);else if(i.tag!==4){if(i.tag===22&&i.memoizedState!==null)a=i.child,a!==null&&(a.return=i),Nr(e,i,!0,!0);else if(i.child!==null){i.child.return=i,i=i.child;continue}}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}}function Pr(e,t,n,r){var i=!1;if(rs)for(var a=t.child;a!==null;){if(a.tag===5){var o=a.stateNode;n&&r&&(o=_c(o,a.type,a.memoizedProps)),mc(e,o)}else if(a.tag===6)o=a.stateNode,n&&r&&(o=vc(o,a.memoizedProps)),mc(e,o);else if(a.tag!==4){if(a.tag===22&&a.memoizedState!==null)i=a.child,i!==null&&(i.return=a),Pr(e,a,!0,!0),i=!0;else if(a.child!==null){a.child.return=a,a=a.child;continue}}if(a===t)break;for(;a.sibling===null;){if(a.return===null||a.return===t)return i;a=a.return}a.sibling.return=a.return,a=a.sibling}return i}function Fr(e,t){if(rs&&Mr(e,t)){e=t.stateNode;var n=e.containerInfo,r=pc();Pr(r,t,!1,!1),e.pendingChildren=r,Ar(t),hc(n,r)}}function Ir(e,t,n,r){if(ns)e.memoizedProps!==r&&Ar(t);else if(rs){var i=e.stateNode,a=e.memoizedProps;if((e=Mr(e,t))||a!==r){var o=ou.current;a=fc(i,n,a,r,!e,null),a===i?t.stateNode=i:(jr(t),Yo(a,n,r,o)&&Ar(t),t.stateNode=a,e&&Nr(a,t,!1,!1))}else t.stateNode=i}}function Lr(e,t,n,r,i){if(e.mode&32&&(n===null?fs(t,r):ps(t,n,r))){if(e.flags|=16777216,(i&335544128)===i||ms(t,r)){if(hs(e.stateNode,t,r))e.flags|=8192;else if(Sa())e.flags|=8192;else throw Bu=zu,Lu}}else e.flags&=-16777217}function Rr(e,t){if(fl(t)){if(e.flags|=16777216,!pl(t)){if(Sa())e.flags|=8192;else throw Bu=zu,Lu}}else e.flags&=-16777217}function zr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:S(),e.lanes|=t,of|=t)}function Br(e,t){if(!fu)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Vr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Hr(e,t,n){var i=t.pendingProps;switch(de(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vr(t),null;case 1:return Vr(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),P(Su),me(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ye(t)?Ar(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,xe())),Fr(e,t),Vr(t),null;case 26:if(tl){var a=t.type,o=t.memoizedState;return e===null?(Ar(t),o===null?(Vr(t),Lr(t,a,null,i,n)):(Vr(t),Rr(t,o))):o?o===e.memoizedState?(Vr(t),t.flags&=-16777217):(Ar(t),Vr(t),Rr(t,o)):(o=e.memoizedProps,ns?o!==i&&Ar(t):Ir(e,t,a,i),Vr(t),Lr(t,a,o,i,n)),null}case 27:if(hl){if(ge(t),n=cu.current,a=t.type,e!==null&&t.stateNode!=null)ns?e.memoizedProps!==i&&Ar(t):Ir(e,t,a,i);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Vr(t),t.subtreeFlags&=-33554433,null}e=ou.current,ye(t)?N(t,e):(e=gl(a,i,n,e,!0),t.stateNode=e,Ar(t))}return Vr(t),t.subtreeFlags&=-33554433,null}case 5:if(ge(t),a=t.type,e!==null&&t.stateNode!=null)Ir(e,t,a,i);else{if(!i){if(t.stateNode===null)throw Error(r(166));return Vr(t),t.subtreeFlags&=-33554433,null}if(o=ou.current,ye(t))N(t,o),Kc(t.stateNode,a,i,o)&&(t.flags|=64);else{var s=qo(a,i,cu.current,o,t);jr(t),Nr(s,t,!1,!1),t.stateNode=s,Yo(s,a,i,o)&&Ar(t)}}return Vr(t),t.subtreeFlags&=-33554433,Lr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)n=e.memoizedProps,ns?n!==i&&Ar(t):rs&&(n===i?t.stateNode=e.stateNode:(e=cu.current,n=ou.current,jr(t),t.stateNode=Zo(i,e,n,t)));else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(e=cu.current,n=ou.current,ye(t)){if(!is)throw Error(r(176));if(e=t.stateNode,n=t.memoizedProps,i=null,a=uu,a!==null)switch(a.tag){case 27:case 5:i=a.memoizedProps}Lc(e,n,t,i)||_e(t,!0)}else jr(t),t.stateNode=Zo(i,e,n,t)}return Vr(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=ye(t),n!==null){if(e===null){if(!i)throw Error(r(318));if(!is)throw Error(r(556));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(557));Rc(e,t)}else be(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vr(t),e=!1}else n=xe(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Ot(t),t):(Ot(t),null);if(t.flags&128)throw Error(r(558))}return Vr(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ye(t),i!==null&&i.dehydrated!==null){if(e===null){if(!a)throw Error(r(318));if(!is)throw Error(r(344));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(r(317));zc(a,t)}else be(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Vr(t),a=!1}else a=xe(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Ot(t),t):(Ot(t),null)}return Ot(t),t.flags&128?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,a=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(a=i.alternate.memoizedState.cachePool.pool),o=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(o=i.memoizedState.cachePool.pool),o!==a&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),zr(t,t.updateQueue),Vr(t),null);case 4:return me(),Fr(e,t),e===null&&os(t.stateNode.containerInfo),t.flags|=67108864,Vr(t),null;case 10:return P(t.type),Vr(t),null;case 19:if(At(t),i=t.memoizedState,i===null)return Vr(t),null;if(a=!!(t.flags&128),o=i.rendering,o===null){if(a)Br(i,!1);else{if(ef!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=jt(e),o!==null){for(t.flags|=128,Br(i,!1),e=o.updateQueue,t.updateQueue=e,zr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)to(n,e),n=n.sibling;return kt(t,Qu.current&1|2),fu&&ce(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Pl()>ff&&(t.flags|=128,a=!0,Br(i,!1),t.lanes=4194304)}}else{if(!a){if(e=jt(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,zr(t,e),Br(i,!0),i.tail===null&&i.tailMode!==`collapsed`&&i.tailMode!==`visible`&&!o.alternate&&!fu)return Vr(t),null}else 2*Pl()-i.renderingStartTime>ff&&n!==536870912&&(t.flags|=128,a=!0,Br(i,!1),t.lanes=4194304)}i.isBackwards?(o.sibling=t.child,t.child=o):(e=i.last,e===null?t.child=o:e.sibling=o,i.last=o)}if(i.tail!==null){e=i.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Pl(),e.sibling=null,o=Qu.current,o=a?o&1|2:o&1,i.tailMode===`visible`||i.tailMode===`collapsed`||!n||fu?kt(t,o):(n=o,h(Z,t),h(Qu,n),Q===null&&(Q=t)),fu&&ce(t,i.treeForkCount),e}return Vr(t),null;case 22:case 23:return Ot(t),L(),i=t.memoizedState!==null,e===null?i&&(t.flags|=8192):e.memoizedState!==null!==i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(Vr(t),t.subtreeFlags&6&&(t.flags|=8192)):Vr(t),n=t.updateQueue,n!==null&&zr(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&m(Fu),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),P(Su),Vr(t),null;case 25:return null;case 30:return t.flags|=33554432,Vr(t),null}throw Error(r(156,t.tag))}function Ur(e,t){switch(de(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return P(Su),me(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ge(t),null;case 31:if(t.memoizedState!==null){if(Ot(t),t.alternate===null)throw Error(r(340));be()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ot(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));be()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return At(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return me(),null;case 10:return P(t.type),null;case 22:case 23:return Ot(t),L(),e!==null&&m(Fu),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return P(Su),null;case 25:return null;default:return null}}function Wr(e,t){switch(de(t),t.tag){case 3:P(Su),me();break;case 26:case 27:case 5:ge(t);break;case 4:me();break;case 31:t.memoizedState!==null&&Ot(t);break;case 13:Ot(t);break;case 19:At(t);break;case 10:P(t.type);break;case 22:case 23:Ot(t),L(),e!==null&&m(Fu);break;case 24:P(Su)}}function Gr(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ga(t,t.return,e)}}function Kr(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ga(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ga(t,t.return,e)}}function qr(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{xt(t,n)}catch(t){Ga(e,e.return,t)}}}function Jr(e,t,n){n.props=Kn(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ga(e,t,n)}}function Yr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=Ho(e.stateNode);break;case 30:var i=e.stateNode,a=re(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=oc(a)),r=i.ref;break;case 7:e.stateNode===null&&(e.stateNode=cc(e)),r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ga(e,t,n)}}function Xr(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Ga(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ga(e,t,n)}else n.current=null}}function Zr(){var e=_d;return _d=!1,e}function Qr(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n`;case Rd:return`:has(`+(ca(e)||``)+`)`;case zd:return`[role="`+e.value+`"]`;case Vd:return`"`+e.value+`"`;case Bd:return`[data-testname="`+e.value+`"]`;default:throw Error(r(365))}}function la(e,t){var n=[];e=[e,0];for(var r=0;rn?32:n;n=X.T;var a=cs();try{ss(i),X.T=null,i=bf,bf=null;var o=gf,s=vf;if(hf=0,_f=gf=null,vf=0,Wd&6)throw Error(r(331));var c=Wd;if(Wd|=4,ra(o.current),Zi(o,o.current,s,i),Wd=c,Le(0,!1),Hl&&typeof Hl.onPostCommitFiberRoot==`function`)try{Hl.onPostCommitFiberRoot(Vl,o)}catch{}return!0}finally{ss(a),X.T=n,Va(e,t)}}function Wa(e,t,n){t=M(n,t),t=Yn(e.stateNode,t,2),e=ht(e,t,2),e!==null&&(w(e,2),Ie(e))}function Ga(e,t,n){if(e.tag===3)Wa(e,e,n);else for(;t!==null;){if(t.tag===3){Wa(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(mf===null||!mf.has(r))){e=M(n,e),n=Xn(2),r=ht(t,n,2),r!==null&&(Zn(n,r,t,e),w(r,2),Ie(r));break}}t=t.return}}function Ka(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ud;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Qd=!0,i.add(n),e=qa.bind(null,e,t,n),t.then(e,e))}function qa(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Gd===e&&(qd&n)===n&&(ef===4||ef===3&&(qd&62914560)===qd&&300>Pl()-uf?Wd&2?rf|=n:ba(e,0):rf|=n,of===qd&&(of=0)),Ie(e)}function Ja(e,t){t===0&&(t=S()),e=lt(e,t),e!==null&&(w(e,t),Ie(e))}function Ya(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ja(e,n)}function Xa(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(r(314))}i!==null&&i.delete(t),Ja(e,n)}function Za(e,t){return Al(e,t)}function Qa(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $a(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eo(e,n){var r=e.alternate;return r===null?(r=t(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&1206910976,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function to(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function no(e,n,i,a,o,s){var c=0;if(a=e,typeof a==`function`)$a(a)&&(c=1);else if(typeof a==`string`)c=tl&&hl?nl(e,i,ou.current)?26:yl(e)?27:5:tl?nl(e,i,ou.current)?26:5:hl&&yl(e)?27:5;else a:switch(a){case jo:return e=t(31,i,n,o),e.elementType=jo,e.lanes=s,e;case xo:return ro(i.children,o,s,n);case So:c=8,o|=24;break;case Co:return e=t(12,i,n,o|2),e.elementType=Co,e.lanes=s,e;case Do:return e=t(13,i,n,o),e.elementType=Do,e.lanes=s,e;case Oo:return e=t(19,i,n,o),e.elementType=Oo,e.lanes=s,e;case Mo:case Po:return e=o|32,e=t(30,i,n,e),e.elementType=Po,e.lanes=s,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof a==`object`&&a)switch(a.$$typeof){case To:c=10;break a;case wo:c=9;break a;case Eo:c=11;break a;case ko:c=14;break a;case Ao:c=16,a=null;break a}c=29,i=Error(r(130,e===null?`null`:typeof e,``)),a=null}return n=t(c,i,n,o),n.elementType=e,n.type=a,n.lanes=s,n}function ro(e,n,r,i){return e=t(7,e,i,n),e.lanes=r,e}function io(e,n,r){return e=t(6,e,null,n),e.lanes=r,e}function ao(e){var n=t(18,null,null,0);return n.stateNode=e,n}function oo(e,n,r){return n=t(4,e.children===null?[]:e.children,e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function so(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=es,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=C(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=C(0),this.hiddenUpdates=C(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function co(e,n,r,i,a,o,s,c,l,u,d,f){return e=new so(e,n,r,s,l,u,d,f,c),n=1,!0===o&&(n|=24),o=t(3,null,null,n),e.current=o,o.stateNode=e,n=Me(),n.refCount++,e.pooledCache=n,n.refCount++,o.memoizedState={element:i,isDehydrated:r,cache:n},ft(o),e}function lo(e){return e?(e=Cl,e):Cl}function uo(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=o(t),e=e===null?null:s(e),e===null?null:Ho(e.stateNode)}function fo(e,t,n,r,i,a){i=lo(i),r.context===null?r.context=i:r.pendingContext=i,r=mt(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=ht(e,r,t),n!==null&&(K(n,e,t),gt(n,e,t))}function po(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n=u&&o>=f&&a<=d&&s<=p){e.splice(t,1);break}if(!(i!==u||n.width!==l.width||ps)){f>o&&(l.height+=f-o,l.y=o),pa)){u>i&&(l.width+=u-i,l.x=i),dn&&(n=c)),c `)+` - -No matching component was found for: - `)+e.join(` > `)}return null},J.getPublicRootInstance=function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 27:case 5:return Ho(e.child.stateNode);default:return e.child.stateNode}},J.injectIntoDevTools=function(){var e={bundleType:0,version:zo,rendererPackageName:Bo,currentDispatcherRef:X,reconcilerVersion:`19.3.0`};if(Vo!==null&&(e.rendererConfig=Vo),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{Vl=t.inject(e),Hl=t}catch{}e=!!t.checkDCE}}return e},J.isAlreadyRendering=function(){return!!(Wd&6)},J.observeVisibleRects=function(e,t,n,i){if(!Ts)throw Error(r(363));e=ua(e,t);var a=Ms(e,n,i).disconnect;return{disconnect:function(){a()}}},J.shouldError=function(){return null},J.shouldSuspend=function(){return!1},J.startHostTransition=function(e,t,i,a){if(e.tag!==5)throw Error(r(476));var o=jn(e).queue;An(e,o,t,bs,i===null?n:function(){var t=jn(e);return t.next===null&&(t=e.alternate.memoizedState),Rn(e,t.next.queue,{},da()),i(a)})},J.updateContainer=function(e,t,n,r){var i=t.current,a=da();return fo(i,a,e,t,n,r),a},J.updateContainerSync=function(e,t,n,r){return fo(t.current,2,e,t,n,r),2},J},t.exports.default=t.exports,Object.defineProperty(t.exports,"__esModule",{value:!0})})),fo=o(((e,t)=>{t.exports=uo()})),po=o((e=>{e.ConcurrentRoot=1,e.DefaultEventPriority=32,e.DiscreteEventPriority=2})),mo=o(((e,t)=>{t.exports=po()})),J=l(fo()),ho=mo(),go={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,eventBatchFunc:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0},_o=!1,vo=!1,yo=`.react-konva-event`,bo=!1,xo=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. -Position of a node will be changed during drag&drop, so you should update state of the react app as well. -Consider to add onDragMove or onDragEnd events. -For more info see: https://github.com/konvajs/react-konva/issues/256 -`,So=`ReactKonva: You are using "zIndex" attribute for a Konva node. -react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. -For more info see: https://github.com/konvajs/react-konva/issues/194 -`,Co={};function wo(e,t,n=Co){if(!_o&&`zIndex`in t&&(console.warn(So),_o=!0),!vo&&t.draggable){var r=t.x!==void 0||t.y!==void 0,i=t.onDragEnd||t.onDragMove;r&&!i&&(console.warn(xo),vo=!0)}var a={},o=!1;for(var s in n)if(!go[s]){var c=s.slice(0,2)===`on`,l=n[s]!==t[s];if(c&&l){var u=s.substr(2).toLowerCase();u.substr(0,7)===`content`&&(u=`content`+u.substr(7,1).toUpperCase()+u.substr(8)),e.off(u+yo)}var d=!t.hasOwnProperty(s);!c&&d&&(a[s]=void 0,o=!0)}var f=bo||t._useStrictMode;let p={};for(var s in t)if(!go[s]){var c=s.slice(0,2)===`on`,m=n[s]!==t[s];if(c&&m){var u=s.substr(2).toLowerCase();u.substr(0,7)===`content`&&(u=`content`+u.substr(7,1).toUpperCase()+u.substr(8)),t[s]&&(p[u]=t[s])}!c&&(t[s]!==n[s]||f&&t[s]!==e.getAttr(s))&&(o=!0,a[s]=t[s])}for(var u in o&&(e.setAttrs(a),To(e)),p)e.off(u+yo),e.on(u+yo,p[u])}function To(e){if(!I.autoDrawEnabled){var t=e.getLayer()||e.getStage();t&&t.batchDraw()}}var Eo=d(),Do=new Set,Oo=new Set,ko=typeof queueMicrotask==`function`?queueMicrotask:e=>Promise.resolve().then(e),Ao=0,jo=new WeakMap;function Mo(e){return Oo.add(e),()=>{Oo.delete(e)}}function No(){for(let e of Oo)e()}function Po(e){if(!e)return Fo;let t=jo.get(e);return t||(t=t=>Fo(()=>e(t)),jo.set(e,t)),t}function Y(e){let t=()=>{Do.delete(t)&&(No(),e())};Do.add(t),ko(t)}function Fo(e){if(Ao)return e();Ao++;try{(0,co.flushSync)(e)}finally{try{for(;Do.size;)(0,co.flushSync)(()=>{for(let e of Do)e()})}finally{Ao--}}}var Io=s({HostTransitionContext:()=>Ws,NotPendingTransition:()=>Us,afterActiveInstanceBlur:()=>xs,appendChild:()=>rs,appendChildToContainer:()=>is,appendInitialChild:()=>X,beforeActiveInstanceBlur:()=>bs,bindToConsole:()=>ys,cancelTimeout:()=>ts,clearContainer:()=>gs,commitMount:()=>us,commitNewChildToFragmentInstance:()=>Go,commitTextUpdate:()=>ls,commitUpdate:()=>ds,createFragmentInstance:()=>Uo,createInstance:()=>zo,createTextInstance:()=>Bo,createViewTransitionInstance:()=>Ns,deleteChildFromFragmentInstance:()=>Ko,detachDeletedInstance:()=>_s,finalizeInitialChildren:()=>Vo,getChildHostContext:()=>$o,getCurrentUpdatePriority:()=>Ts,getInstanceFromNode:()=>vs,getInstanceFromScope:()=>Cs,getPublicInstance:()=>Ho,getRootHostContext:()=>Qo,getSuspendedCommitReason:()=>Hs,hideInstance:()=>fs,hideTextInstance:()=>ps,idlePriority:()=>Eo.unstable_IdlePriority,insertBefore:()=>as,insertInContainerBefore:()=>os,isPrimaryRenderer:()=>!1,maySuspendCommit:()=>Ms,maySuspendCommitInSyncRender:()=>Fs,maySuspendCommitOnUpdate:()=>Ps,noTimeout:()=>-1,now:()=>Eo.unstable_now,preloadInstance:()=>Ls,prepareForCommit:()=>Jo,preparePortalMount:()=>Yo,prepareScopeUpdate:()=>Ss,removeChild:()=>ss,removeChildFromContainer:()=>cs,requestPostPaintCallback:()=>js,resetAfterCommit:()=>Xo,resetFormInstance:()=>Gs,resetTextContent:()=>Zo,resolveEventTimeStamp:()=>As,resolveEventType:()=>ks,resolveUpdatePriority:()=>Es,run:()=>Eo.unstable_runWithPriority,scheduleMicrotask:()=>Y,scheduleTimeout:()=>es,setCurrentUpdatePriority:()=>ws,shouldAttemptEagerTransition:()=>Ds,shouldSetTextContent:()=>ns,startSuspendingCommit:()=>Rs,startViewTransition:()=>Is,supportsHydration:()=>!1,supportsMicrotasks:()=>!0,supportsMutation:()=>!0,supportsPersistence:()=>!1,suspendInstance:()=>zs,suspendOnActiveViewTransition:()=>Bs,trackSchedulerEvent:()=>Os,unhideInstance:()=>ms,unhideTextInstance:()=>hs,updateFragmentInstanceFiber:()=>Wo,waitForCommitToBeReady:()=>Vs,warnsIfNotActing:()=>!1}),Lo={};lo.Node.prototype._applyProps=wo;var Ro=ho.DefaultEventPriority;function X(e,t){typeof t==`string`?console.error(`Do not use plain text as child of Konva.Node. You are using text: ${t}`):(e.add(t),To(e))}function zo(e,t,n){let r=lo[e];r||=(console.error(`Konva has no node with the type ${e}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${e}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),lo.Group);let i={},a={};for(var o in t)o!==`ref`&&(o.slice(0,2)===`on`?a[o]=t[o]:i[o]=t[o]);let s=new r(i);return wo(s,a),s}function Bo(e,t,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${e}"`)}function Vo(e,t,n){return!1}function Ho(e){return e}function Uo(){return null}function Wo(){}function Go(){}function Ko(){}var qo;function Jo(){return qo=lo.beginUpdateBatch?.(),null}function Yo(){return null}function Xo(){let e=qo;qo=void 0,e?.()}function Zo(e){}function Qo(){return Lo}function $o(){return Lo}var es=setTimeout,ts=clearTimeout;function ns(e,t){return!1}function rs(e,t){t.parent===e?t.moveToTop():e.add(t),To(e)}var is=rs;function as(e,t,n){t._remove(),e.add(t),t.setZIndex(n.getZIndex()),To(e)}var os=as;function ss(e,t){t.destroy(),t.off(yo),To(e)}var cs=ss;function ls(e,t,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function us(e,t,n){}function ds(e,t,n,r){wo(e,r,n)}function fs(e){e.hide(),To(e)}function ps(e){}function ms(e,t){(t.visible==null||t.visible)&&(e.show(),To(e))}function hs(e,t){}function gs(e){}function _s(e){e.off(yo)}function vs(){return null}function ys(e,t){return console[e].bind(console,...t)}function bs(){}function xs(){}function Ss(){}function Cs(){return null}function ws(e){Ro=e}function Ts(){return Ro}function Es(){return ho.DiscreteEventPriority}function Ds(){return!1}function Os(){}function ks(){return null}function As(){return-1.1}function js(){}function Ms(){throw Error(`ViewTransition is not supported inside a Stage. Place ViewTransition around Stage to animate its DOM container.`)}var Ns=Ms,Ps=Ms,Fs=Ms;function Is(e,t,n,r,i,a,o,s,c,l,u){return r(),i(),u?.(),o(),null}function Ls(){return!0}function Rs(){}function zs(){}function Bs(){}function Vs(){return null}function Hs(){return null}var Us=Object.freeze({pending:!1,data:null,method:null,action:null}),Ws=v.createContext(Us);function Gs(){}typeof window<`u`&&(window.document?.createElement||window.navigator?.product===`ReactNative`)?v.useLayoutEffect:v.useEffect;function Ks(e,t,n){if(!e)return;if(n(e)===!0)return e;let r=t?e.return:e.child;for(;r;){let e=Ks(r,t,n);if(e)return e;r=t?null:r.sibling}}function qs(e){try{return Object.defineProperties(e,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return e}}var Js=qs(v.createContext(null)),Ys=class extends v.Component{render(){return v.createElement(Js.Provider,{value:this._reactInternals},this.props.children)}};function Xs(){let e=v.useContext(Js);if(e===null)throw Error(`its-fine: useFiber must be called within a !`);let t=v.useId();return v.useMemo(()=>{for(let n of[e,e?.alternate]){if(!n)continue;let e=Ks(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}var Zs=Symbol.for(`react.context`),Qs=e=>typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Zs;function $s(){let e=Xs(),[t]=v.useState(()=>new Map);t.clear();let n=e;for(;n;){let e=n.type;Qs(e)&&e!==Js&&!t.has(e)&&t.set(e,v.use(qs(e))),n=n.return}return t}function ec(){let e=$s();return v.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>v.createElement(t,null,v.createElement(n.Provider,{...r,value:e.get(n)})),e=>v.createElement(Ys,{...e})),[e])}var[tc,nc]=`19.3.1`.split(`.`).map(Number);if(tc!==19||nc<3)throw Error(`react-konva requires React 19.3 or later within React 19. Install matching versions of react and react-dom. For React 19.2, use react-konva 19.2. For React 18, use react-konva 18.`);function rc({promise:e}){throw e}var ic=e=>{let t=v.useRef(null),n=v.useRef(null),r=v.useRef(null),i=v.useRef(null),a=v.useRef(null),o=v.useId(),s=(0,co.useFormStatus)(),c=v.useRef({}),l=c.current,u=ec(),d=!!Ks(Xs(),!0,e=>e.type===v.StrictMode),f=v.useRef(!1),p=v.useRef(!1),m=v.useRef(null);v.useInsertionEffect(()=>(p.current=!1,()=>{p.current=!0,f.current&&n.current&&h()}),[]);let h=()=>{m.current?.(),m.current=null,No(),pc.flushSyncFromReconciler(()=>{pc.updateContainer(null,r.current,null)}),n.current?.destroy(),n.current?.off(yo),n.current=null,a.current?.resolve(),a.current=null},g=e=>{if(e===`suspended`){if(!a.current){let e,t=new Promise(t=>{e=t});a.current={promise:t,resolve:e}}}else a.current?.resolve(),a.current=null;pc.updateContainer(v.createElement(v.Activity,{mode:e===`hidden`?`hidden`:`visible`,children:v.createElement(v.Suspense,{fallback:null},i.current,a.current&&v.createElement(rc,{promise:a.current.promise}))}),r.current,null),No(),pc.flushSyncWork()};return v.useLayoutEffect(()=>(m.current?.(),m.current=null,n.current||(n.current=new lo.Stage({width:e.width,height:e.height,container:t.current}),r.current=pc.createContainer(n.current,ho.ConcurrentRoot,null,d,null,o,console.error,console.error,console.error,null,null)),()=>{p.current?h():(m.current=Mo(()=>{p.current&&(m.current?.(),m.current=null,pc.updateContainer(null,r.current,null))}),g(`suspended`))}),[]),v.useEffect(()=>(f.current=!1,()=>{f.current=!0,n.current&&(p.current?h():g(`hidden`))}),[]),v.useLayoutEffect(()=>{typeof n.current.eventBatchFunc==`function`&&n.current.eventBatchFunc(Po(e.eventBatchFunc))},[e.eventBatchFunc]),v.useImperativeHandle(e.forwardedRef,()=>n.current,[]),v.useLayoutEffect(()=>{c.current=e,wo(n.current,e,l),i.current=v.createElement(Ws.Provider,{value:s},v.createElement(u,{},e.children)),g(`visible`)}),v.createElement(`div`,{ref:t,id:e.id,accessKey:e.accessKey,className:e.className,role:e.role,style:e.style,tabIndex:e.tabIndex,title:e.title})},ac=`Layer`,oc=`Group`,sc=`Rect`,cc=`Line`,lc=`Path`,uc=`RegularPolygon`,dc=`19.3.2`,fc={...Io,HostTransitionContext:Ws,rendererVersion:dc,rendererPackageName:`react-konva`,extraDevToolsConfig:null},pc=(0,J.default)(fc);pc.injectIntoDevTools();var mc=v.forwardRef((e,t)=>v.createElement(Ys,{},v.createElement(ic,{...e,forwardedRef:t}))),hc={normal:`#3b3b3b`,selected:`#1c7ed6`,valid:`#2f9e44`,invalid:`#e03131`};function gc({shape:e,width:t,height:n,pxPerM:r,outline:i,opacity:a=1}){let o=t*r,s=n*r,c=hc[i],l=i===`normal`?1.5:3;if(e===`screen`){let e=Math.min(3,s/4);return(0,F.jsxs)(oc,{opacity:a,children:[(0,F.jsx)(sc,{width:o,height:s,fill:`#2d3748`,stroke:c,strokeWidth:l,cornerRadius:2}),(0,F.jsx)(sc,{x:e,y:e,width:Math.max(0,o-e*2),height:Math.max(0,s-e*2),fill:`#63b3ed`,listening:!1})]})}if(e===`table`)return(0,F.jsx)(oc,{opacity:a,children:(0,F.jsx)(sc,{width:o,height:s,fill:`#d9b382`,stroke:c,strokeWidth:l,cornerRadius:3})});let u=Math.max(4,s*.2);return(0,F.jsxs)(oc,{opacity:a,children:[(0,F.jsx)(sc,{width:o,height:s,fill:`#8fb4d9`,stroke:c,strokeWidth:l,cornerRadius:3}),(0,F.jsx)(sc,{width:o,height:u,fill:`#4a6f96`,cornerRadius:[3,3,0,0],listening:!1})]})}var _c=10,vc=6,yc=`#2b2b2b`,bc=`#1c7ed6`,xc=`#e03131`,Sc=`#2f9e44`;function Cc(e){let t=[];for(let n of[`top`,`bottom`,`left`,`right`]){let r=O(e,n),i=e.doors.filter(e=>e.wall===n).sort((e,t)=>e.offset-t.offset),a=0;for(let e of i)e.offset>a+1e-6&&t.push({wall:n,a,b:e.offset}),a=Math.max(a,e.offset+e.width);ase({...e,x:t.x()/l-e.width/2,y:t.y()/l-e.height/2},a),ne=E+12,A=D+12,ie=(e,t)=>((e===`top`||e===`bottom`?t.x:t.y)-vc)/l,ae=(e,t,i,s,c,u)=>(0,F.jsx)(sc,{x:u.x*l,y:u.y*l,width:u.width*l,height:u.height*l,fill:`transparent`,draggable:!0,dragBoundFunc:function(){return this.absolutePosition()},onMouseDown:()=>n({kind:e,id:t}),onTouchStart:()=>n({kind:e,id:t}),onDragStart:e=>{e.cancelBubble=!0;let t=e.target.getStage()?.getPointerPosition();t&&(w.current={along:ie(i,t),offset:s})},onDragMove:n=>{let r=n.target.getStage()?.getPointerPosition(),s=w.current;if(!r||!s)return;let l=Math.min(Math.max(s.offset+ie(i,r)-s.along,0),O(a,i)-c);C({kind:e,id:t,offset:l,valid:fe(a,o,{id:t,kind:e,wall:i,offset:l,width:c})})},onDragEnd:()=>{S?.valid&&r(e,t,S.offset),C(null),w.current=null},onMouseEnter:e=>{let t=e.target.getStage()?.container();t&&(t.style.cursor=i===`top`||i===`bottom`?`ew-resize`:`ns-resize`)},onMouseLeave:e=>{let t=e.target.getStage()?.container();t&&(t.style.cursor=``)}},`hit-${t}`),j=(e,n,r)=>S?.kind===e&&S.id===n?S.valid?Sc:xc:t?.kind===e&&t.id===n?bc:r;return(0,F.jsx)(`div`,{style:{width:ne,height:A,background:`#fff`,boxShadow:`0 4px 18px rgba(0,0,0,0.12)`,touchAction:`none`},ref:u,children:(0,F.jsx)(mc,{width:ne,height:A,onMouseDown:e=>{e.target===e.target.getStage()&&(h?f(null):n(null))},onTouchStart:e=>{e.target===e.target.getStage()&&(h?f(null):n(null))},children:(0,F.jsxs)(ac,{x:vc,y:vc,children:[(0,F.jsx)(sc,{width:E,height:D,fill:`#fff`,listening:!1}),Cc(a).map((e,t)=>{let n=e.a*l,r=(e.b-e.a)*l,i=e.wall===`top`?{x:n,y:-6,width:r,height:vc}:e.wall===`bottom`?{x:n,y:D,width:r,height:vc}:e.wall===`left`?{x:-6,y:n,width:vc,height:r}:{x:E,y:n,width:vc,height:r};return(0,F.jsx)(sc,{...i,fill:yc,listening:!1},t)}),[[-6,-6],[E,-6],[-6,D],[E,D]].map(([e,t])=>(0,F.jsx)(sc,{x:e,y:t,width:vc,height:vc,fill:yc,listening:!1},`${e},${t}`)),a.doors.map(e=>{let t=S?.kind===`door`&&S.id===e.id?{...e,offset:S.offset}:e;return(0,F.jsx)(Ec,{room:a,door:t,px:l,color:j(`door`,e.id,e.isLoading?`#c05621`:`#4a5568`)},e.id)}),a.screens.map(e=>{let t=S?.kind===`screen`&&S.id===e.id?{...e,offset:S.offset}:e;return(0,F.jsx)(Oc,{room:a,screen:t,px:l,outline:j(`screen`,e.id,yc)},e.id)}),a.obstacles.map(e=>{let r=T?.id===e.id?T.valid?Sc:xc:t?.kind===`obstacle`&&t.id===e.id?bc:`#4a4a4a`;return(0,F.jsx)(sc,{x:e.x*l,y:e.y*l,width:e.width*l,height:e.height*l,fill:`#9aa0a6`,stroke:r,strokeWidth:r===`#4a4a4a`?1.5:3,cornerRadius:2,listening:!h,draggable:!h,onMouseDown:()=>n({kind:`obstacle`,id:e.id}),onTouchStart:()=>n({kind:`obstacle`,id:e.id}),dragBoundFunc:t=>({x:Math.min(Math.max(t.x,vc),vc+E-e.width*l),y:Math.min(Math.max(t.y,vc),vc+D-e.height*l)}),onDragMove:t=>ee({id:e.id,valid:pe(a,o,{...e,x:t.target.x()/l,y:t.target.y()/l})}),onDragEnd:t=>{let n=t.target.x()/l,r=t.target.y()/l,s=pe(a,o,{...e,x:n,y:r});t.target.position({x:(s?n:e.x)*l,y:(s?r:e.y)*l}),s&&i(e.id,n,r),ee(null)},onMouseEnter:e=>{let t=e.target.getStage()?.container();t&&!h&&(t.style.cursor=`grab`)},onMouseLeave:e=>{let t=e.target.getStage()?.container();t&&(t.style.cursor=``)}},e.id)}),o.map(e=>{let t=s[e.type]?.shape??`chair`,n=y?.id===e.id,r=n?y.rect:e,i=n?y.valid?`valid`:`invalid`:g?.id===e.id?g.valid?`valid`:`invalid`:d===e.id?`selected`:`normal`,c=oe({...r,rotation:e.rotation}),u=r.width*l,m=r.height*l;return(0,F.jsxs)(oc,{x:(r.x+r.width/2)*l,y:(r.y+r.height/2)*l,offsetX:u/2,offsetY:m/2,rotation:e.rotation,listening:h,draggable:h&&!e.locked,onMouseDown:()=>f(e.id),onTouchStart:()=>f(e.id),dragBoundFunc:e=>{let t=c.width/2*l,n=c.height/2*l;return{x:Math.min(Math.max(e.x,vc+t),vc+E-t),y:Math.min(Math.max(e.y,vc+n),vc+D-n)}},onDragStart:e=>{e.target.moveToTop()},onDragMove:t=>{let n=te(e,t.target);_({id:e.id,valid:le(n,o,a,e.id)})},onDragEnd:t=>{let n=t.target,r=te(e,n),i=le(r,o,a,e.id),s=i?r:e;n.position({x:(s.x+e.width/2)*l,y:(s.y+e.height/2)*l}),i&&p(e.id,r.x,r.y),_(null)},onMouseEnter:t=>{let n=t.target.getStage()?.container();n&&(n.style.cursor=e.locked?`not-allowed`:`grab`)},onMouseLeave:e=>{let t=e.target.getStage()?.container();t&&(t.style.cursor=``)},children:[(0,F.jsx)(gc,{shape:t,width:r.width,height:r.height,pxPerM:l,outline:i}),e.locked&&(0,F.jsx)(Ac,{w:u,h:m,rotation:e.rotation})]},e.id)}),o.map(e=>{let t=s[e.type]?.shape===`screen`;if(!h||e.id!==d||!t||e.locked||e.rotation!==0||g?.id===e.id)return null;let n=y?.id===e.id?y.rect:e,r={left:[n.x,n.y+n.height/2],right:[n.x+n.width,n.y+n.height/2]};return kc.map(t=>(0,F.jsx)(sc,{x:r[t][0]*l,y:r[t][1]*l,offsetX:_c/2,offsetY:_c/2,width:_c,height:_c,fill:`#fff`,stroke:`#1c7ed6`,strokeWidth:2,cornerRadius:2,hitStrokeWidth:12,draggable:!0,dragBoundFunc:function(){return this.absolutePosition()},onDragStart:t=>{t.cancelBubble=!0,x.current={x:e.x,y:e.y,width:e.width,height:e.height}},onDragMove:n=>{let r=n.target.getStage()?.getPointerPosition(),i=x.current;if(!r||!i)return;let s=be(i,t,(r.x-vc)/l,a);b({id:e.id,rect:s,valid:le({...e,...s},o,a,e.id)})},onDragEnd:()=>{y?.valid&&m(e.id,y.rect),b(null),x.current=null},onMouseEnter:e=>{let t=e.target.getStage()?.container();t&&(t.style.cursor=`ew-resize`)},onMouseLeave:e=>{let t=e.target.getStage()?.container();t&&(t.style.cursor=``)}},`${e.id}-${t}`))}),!h&&a.doors.map(e=>{let t=S?.kind===`door`&&S.id===e.id?S.offset:e.offset;return ae(`door`,e.id,e.wall,t,e.width,k(a,{...e,offset:t}))}),!h&&a.screens.map(e=>{let t=S?.kind===`screen`&&S.id===e.id?S.offset:e.offset;return ae(`screen`,e.id,e.wall,t,e.width,re(a,e.wall,t,e.width,.3))}),c&&(0,F.jsx)(`Group`,{x:c.x*l,y:c.y*l,listening:!1,children:(0,F.jsx)(gc,{shape:c.shape,width:c.width,height:c.height,pxPerM:l,outline:c.valid?`valid`:`invalid`,opacity:.85})})]})})})}function Mc({mode:e,onChange:t}){let n=t=>({flex:1,height:30,border:`none`,borderRadius:6,cursor:`pointer`,font:`600 13px system-ui, sans-serif`,background:e===t?`#fff`:`transparent`,color:e===t?`#222`:`#666`,boxShadow:e===t?`0 1px 3px rgba(0,0,0,0.15)`:`none`});return(0,F.jsxs)(`div`,{style:{gridColumn:`1 / -1`,display:`flex`,gap:2,padding:3,background:`#d9d9d9`,borderRadius:9},children:[(0,F.jsx)(`button`,{style:n(`layout`),onClick:()=>t(`layout`),children:`Layout`}),(0,F.jsx)(`button`,{style:n(`room`),onClick:()=>t(`room`),children:`Room`})]})}var Nc=34,Pc=4,Fc=7,Ic=12,Lc=4,Rc=40,zc=40;function Bc({value:e,min:t,max:n=999,step:r=1,wrap:i=!1,rows:a=5,disabled:o=!1,format:s,onChange:c}){let l=e=>Math.round(e/r),u=(String(r).split(`.`)[1]??``).length,[d,f]=(0,v.useState)(l(e)),[p,m]=(0,v.useState)(!1),[h,g]=(0,v.useState)(!1),[_,y]=(0,v.useState)(``),b=(0,v.useRef)(l(e)),x=(0,v.useRef)(l(e)),S=(0,v.useRef)(0),C=(0,v.useRef)(0),w=(0,v.useRef)(l(e)),T=(0,v.useRef)(null),ee=(0,v.useRef)(null),E=(0,v.useRef)([]),D=l(t),te=l(n),ne=te-D+1,O=(0,v.useRef)({imin:D,imax:te,n:ne,wrap:i,step:r,onChange:c,valueIdx:l(e)});O.current={imin:D,imax:te,n:ne,wrap:i,step:r,onChange:c,valueIdx:l(e)};let re=e=>O.current.imin+((e-O.current.imin)%O.current.n+O.current.n)%O.current.n,k=e=>O.current.wrap?re(e):e,A=e=>O.current.wrap?e:Math.min(O.current.imax,Math.max(O.current.imin,e)),ie=e=>{let t=A(e);b.current=t,f(t);let n=k(Math.round(t));return n!==x.current&&(x.current=n,O.current.onChange(Math.round(n*O.current.step*1e3)/1e3)),t},ae=()=>{cancelAnimationFrame(S.current),S.current=0,window.clearTimeout(C.current),C.current=0},j=()=>{let e=Math.round(b.current);if(!O.current.wrap)return O.current.valueIdx;let t=re(O.current.valueIdx-e+O.current.imin)-O.current.imin;return e+(t>O.current.n/2?t-O.current.n:t)},oe=()=>{S.current=requestAnimationFrame(()=>{S.current=0,!ee.current&&k(Math.round(b.current))!==O.current.valueIdx&&(x.current=O.current.valueIdx,M(j(),0))})},se=e=>{ae();let t=A(Math.round(e));w.current=t;let n=performance.now(),r=e=>{let i=Math.min(.05,(e-n)/1e3);n=e;let a=b.current+(t-b.current)*(1-Math.exp(-7*i));Math.abs(t-a)<.003?(ie(t),S.current=0,oe()):(ie(a),S.current=requestAnimationFrame(r))};S.current=requestAnimationFrame(r)};function M(e,t){ae();let n=A(Math.round(e));w.current=n;let r=b.current-n,i=Math.abs(r),a=i>0&&Math.sign(t)===-Math.sign(r)?Math.max(Ic,Math.abs(t)/i):Ic,o=t+a*r,s=performance.now(),c=e=>{let t=(e-s)/1e3,i=Math.exp(-a*t),l=n+(r+o*t)*i,u=(o-a*(r+o*t))*i;Math.abs(l-n)<.003&&Math.abs(u)<.05||t>1.5?(ie(n),S.current=0,oe()):(ie(l),S.current=requestAnimationFrame(c))};S.current=requestAnimationFrame(c)}(0,v.useEffect)(()=>{if(ee.current||S.current)return;let e=j();b.current=e,x.current=k(Math.round(e)),f(e)},[e]),(0,v.useEffect)(()=>ae,[]);let ce=(0,v.useRef)(``),le=(0,v.useRef)(0),ue=()=>{window.clearTimeout(le.current);let e=ce.current;ce.current=``,y(``);let t=parseFloat(e);if(Number.isNaN(t))return;let n=O.current,r=Math.round(t/n.step);if(n.wrap){let e=re(r)-re(Math.round(b.current));r=Math.round(b.current)+(Math.abs(e)>n.n/2?e-Math.sign(e)*n.n:e)}else r=Math.min(n.imax,Math.max(n.imin,r));se(r)},de=e=>{ce.current=e,y(e),window.clearTimeout(le.current),e&&(le.current=window.setTimeout(ue,1500))};(0,v.useEffect)(()=>{if(!h||o)return;let e=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return;let t=ce.current,n=()=>{e.preventDefault(),e.stopImmediatePropagation()};/^[0-9]$/.test(e.key)||e.key===`.`&&u>0&&!t.includes(`.`)?(n(),t.length<6&&(ae(),de(t+e.key))):e.key===`Backspace`||e.key===`Delete`?(n(),de(t.slice(0,-1))):e.key===`Enter`&&t?(n(),ue()):e.key===`Escape`&&t&&(n(),de(``))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[h,o,u]),(0,v.useEffect)(()=>()=>window.clearTimeout(le.current),[]);let fe=e=>{if(o)return;e.currentTarget.setPointerCapture(e.pointerId);let t=S.current!==0||C.current!==0;ae(),ee.current={y0:e.clientY,pos0:b.current,moved:!1,wasMoving:t},E.current=[{t:performance.now(),pos:b.current}],m(!0)},pe=e=>{let t=ee.current;if(!t)return;let n=e.clientY-t.y0;Math.abs(n)>Pc&&(t.moved=!0);let r=ie(t.pos0-n/Nc),i=performance.now();E.current.push({t:i,pos:r}),E.current=E.current.filter(e=>i-e.t<100)},me=e=>{let t=ee.current;if(ee.current=null,m(!1),!t)return;if(!t.moved){if(t.wasMoving)M(b.current,0);else{let n=T.current.getBoundingClientRect(),r=Math.round((e.clientY-n.top-a*Nc/2)/Nc);b.current=t.pos0,se(Math.round(t.pos0)+r)}return}let n=performance.now(),r=E.current,i=0;if(r.length>1&&n-r[r.length-1].t<80){let e=r[0],t=(r[r.length-1].t-e.t)/1e3;t>.005&&(i=(r[r.length-1].pos-e.pos)/t)}i=Math.max(-40,Math.min(Rc,i)),Math.abs(i){if(!o){if(Math.abs(e.deltaY)>=zc){let t=S.current?w.current:Math.round(b.current);se(t+Math.sign(e.deltaY))}else ae(),ie(b.current+e.deltaY/(Nc*1.5)),C.current=window.setTimeout(()=>{C.current=0,M(b.current,0)},120)}},ge=e=>{if(!o){if(e.key===`ArrowUp`)se(Math.round(b.current)+1);else if(e.key===`ArrowDown`)se(Math.round(b.current)-1);else return;e.preventDefault()}},_e=Math.floor(a/2)+1,N=Math.round(d),ve=i?N-_e:Math.max(D,N-_e),ye=i?N+_e:Math.min(te,N+_e),be=[];for(let e=ve;e<=ye;e++){let t=e-d,n=(i?re(e):e)*r;be.push((0,F.jsx)(`div`,{style:{position:`absolute`,left:0,right:0,height:Nc,display:`flex`,alignItems:`center`,justifyContent:`center`,font:`600 20px system-ui, sans-serif`,color:`#222`,opacity:Math.max(0,1-Math.abs(t)*(a<=3?.55:.38)),transform:`translateY(${((a-1)/2+t)*Nc}px) scale(${1-Math.min(1,Math.abs(t))*.12})`,pointerEvents:`none`},children:s?s(n):n.toFixed(u)},e))}return(0,F.jsxs)(`div`,{ref:T,tabIndex:o?-1:0,role:`spinbutton`,"aria-valuenow":e,"aria-valuemin":t,"aria-valuemax":n,"aria-disabled":o,onPointerDown:fe,onPointerMove:pe,onPointerUp:me,onPointerCancel:me,onWheel:he,onKeyDown:ge,onMouseEnter:()=>g(!0),onMouseLeave:()=>{g(!1),ce.current&&ue()},title:o?void 0:`Scroll, drag, or hover and type a number`,style:{position:`relative`,width:`100%`,height:a*Nc,overflow:`hidden`,background:`#f4f4f4`,borderRadius:10,cursor:o?`not-allowed`:p?`grabbing`:`ns-resize`,opacity:o?.45:1,userSelect:`none`,touchAction:`none`,outline:`none`},children:[(0,F.jsx)(`div`,{style:{position:`absolute`,left:6,right:6,top:(a-1)/2*Nc,height:Nc,background:`rgba(0,0,0,0.08)`,borderRadius:8,pointerEvents:`none`}}),be,_&&(0,F.jsxs)(`div`,{style:{position:`absolute`,left:6,right:6,top:(a-1)/2*Nc,height:Nc,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`#fff`,border:`1.5px solid #1c7ed6`,borderRadius:8,boxSizing:`border-box`,font:`600 20px system-ui, sans-serif`,color:`#1c7ed6`,pointerEvents:`none`},children:[_,(0,F.jsx)(`span`,{style:{width:1.5,height:20,background:`#1c7ed6`,marginLeft:2}})]})]})}var Vc={gridColumn:`1 / -1`,display:`flex`,flexDirection:`column`,gap:14},Hc={font:`600 12px system-ui, sans-serif`,color:`#555`,marginBottom:4},Uc={font:`12px system-ui, sans-serif`,color:`#888`,marginTop:4},Wc={font:`600 15px system-ui, sans-serif`,color:`#222`},Gc={alignSelf:`flex-start`,border:`none`,background:`none`,padding:0,cursor:`pointer`,font:`13px system-ui, sans-serif`,color:`#555`},Kc={height:32,padding:`0 12px`,border:`1px solid #c4c4c4`,background:`#fff`,borderRadius:8,cursor:`pointer`,font:`13px system-ui, sans-serif`,color:`#222`},qc={display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(96px, 1fr))`,gap:12},Jc=e=>e.toFixed(1);function Yc(e){(0,v.useEffect)(()=>{let t=t=>t.key===`Escape`&&e();return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e])}var Xc={...Kc,color:`#e03131`,borderColor:`#e8a8a8`};function Zc({room:e,minSize:t,notice:n,onResize:r,onAddDoor:i,onAddScreen:a,onAddObstacle:o,onExport:s,onImport:c}){let l=(0,v.useRef)(null),u=t.width>C.min||t.height>C.min;return(0,F.jsxs)(`div`,{style:Vc,children:[(0,F.jsx)(`div`,{style:Wc,children:`Room`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Size (m)`}),(0,F.jsxs)(`div`,{style:qc,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Uc,children:`Width`}),(0,F.jsx)(Bc,{value:e.width,min:t.width,max:C.max,step:.1,rows:3,format:Jc,onChange:e=>r({width:e})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Uc,children:`Length`}),(0,F.jsx)(Bc,{value:e.height,min:t.height,max:C.max,step:.1,rows:3,format:Jc,onChange:e=>r({height:e})})]})]}),u&&(0,F.jsxs)(`div`,{style:Uc,children:[`The room can't shrink past what's placed in it (min `,Jc(t.width),` × `,Jc(t.height),` m).`]})]}),(0,F.jsxs)(`div`,{style:{display:`grid`,gap:8},children:[(0,F.jsx)(`button`,{style:Kc,onClick:i,children:`Add door`}),(0,F.jsx)(`button`,{style:{...Kc,opacity:e.screens.length>=2?.45:1},disabled:e.screens.length>=2,onClick:a,children:`Add screen`}),e.screens.length>=2&&(0,F.jsxs)(`div`,{style:{...Uc,marginTop:-4},children:[`Maximum of `,2,` screens.`]}),(0,F.jsx)(`button`,{style:Kc,onClick:o,children:`Add obstacle`})]}),n&&(0,F.jsx)(`div`,{style:{...Uc,color:`#e03131`,marginTop:0},children:n}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,F.jsx)(`button`,{style:{...Kc,flex:1},onClick:s,children:`Export room`}),(0,F.jsx)(`button`,{style:{...Kc,flex:1},onClick:()=>l.current?.click(),children:`Import room`}),(0,F.jsx)(`input`,{ref:l,type:`file`,accept:`application/json,.json`,style:{display:`none`},onChange:e=>{let t=e.target.files?.[0];e.target.value=``,t&&c(t)}})]}),(0,F.jsx)(`div`,{style:Uc,children:`Furniture isn't included in room.json.`})]})}function Qc({door:e,isLast:t,notice:n,onPatch:r,onDelete:i,onClose:a}){return Yc(a),(0,F.jsxs)(`div`,{style:Vc,children:[(0,F.jsx)(`button`,{onClick:a,style:Gc,children:`← Done`}),(0,F.jsx)(`div`,{style:Wc,children:`Door`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Width (m)`}),(0,F.jsx)(Bc,{value:e.width,min:w.min,max:w.max,step:.1,rows:3,format:Jc,onChange:e=>r({width:e})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`button`,{style:{...Kc,width:`100%`,background:e.isLoading?`#2b2b2b`:`#fff`,color:e.isLoading?`#fff`:`#222`},onClick:()=>r({isLoading:!e.isLoading}),children:[`Loading door: `,e.isLoading?`on`:`off`]}),(0,F.jsx)(`div`,{style:Uc,children:`Furniture is carried through a loading door.`})]}),(0,F.jsx)(`div`,{style:Uc,children:`The swing area and 0.6 m inside the opening stay clear of furniture.`}),n&&(0,F.jsx)(`div`,{style:{...Uc,color:`#e03131`,marginTop:0},children:n}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`button`,{style:{...Xc,width:`100%`,opacity:t?.45:1,cursor:t?`not-allowed`:`pointer`},disabled:t,onClick:i,children:`Delete door`}),t&&(0,F.jsx)(`div`,{style:Uc,children:`A room needs at least one door.`})]})]})}function $c({screen:e,notice:t,onPatch:n,onDelete:r,onClose:i}){return Yc(i),(0,F.jsxs)(`div`,{style:Vc,children:[(0,F.jsx)(`button`,{onClick:i,style:Gc,children:`← Done`}),(0,F.jsx)(`div`,{style:Wc,children:`Screen`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Width (m)`}),(0,F.jsx)(Bc,{value:e.width,min:T.min,max:T.max,step:.1,rows:3,format:Jc,onChange:e=>n({width:e})})]}),(0,F.jsx)(`div`,{style:Uc,children:`Drag it along its wall. A 0.3 m strip in front of the wall stays clear.`}),t&&(0,F.jsx)(`div`,{style:{...Uc,color:`#e03131`,marginTop:0},children:t}),(0,F.jsx)(`button`,{style:Xc,onClick:r,children:`Delete screen`})]})}function el({obstacle:e,notice:t,onPatch:n,onDelete:r,onClose:i}){return Yc(i),(0,F.jsxs)(`div`,{style:Vc,children:[(0,F.jsx)(`button`,{onClick:i,style:Gc,children:`← Done`}),(0,F.jsx)(`div`,{style:Wc,children:`Obstacle`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Size (m)`}),(0,F.jsxs)(`div`,{style:qc,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Uc,children:`Width`}),(0,F.jsx)(Bc,{value:e.width,min:ee.min,max:ee.max,step:.1,rows:3,format:Jc,onChange:e=>n({width:e})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Uc,children:`Length`}),(0,F.jsx)(Bc,{value:e.height,min:ee.min,max:ee.max,step:.1,rows:3,format:Jc,onChange:e=>n({height:e})})]})]})]}),t&&(0,F.jsx)(`div`,{style:{...Uc,color:`#e03131`,marginTop:0},children:t}),(0,F.jsx)(`button`,{style:Xc,onClick:r,children:`Delete obstacle`})]})}function tl({pxPerM:e,roomWidthPx:t}){return(0,F.jsx)(`div`,{style:{width:t,height:40,display:`flex`,alignItems:`flex-end`,paddingBottom:4,boxSizing:`border-box`},children:(0,F.jsxs)(`div`,{style:{font:`12px system-ui, sans-serif`,color:`#555`},children:[(0,F.jsx)(`div`,{style:{width:e,height:6,borderBottom:`2px solid #555`,borderLeft:`2px solid #555`,borderRight:`2px solid #555`,boxSizing:`border-box`,marginBottom:2}}),`1 m`]})})}function nl({config:e,placed:t,onSetAvailable:n,onSetSeats:r,onClose:i}){return(0,v.useEffect)(()=>{let e=e=>e.key===`Escape`&&i();return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i]),(0,F.jsxs)(`div`,{style:Vc,children:[(0,F.jsx)(`button`,{onClick:i,style:Gc,children:`← Back`}),(0,F.jsx)(`div`,{style:Wc,children:e.name}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Available`}),(0,F.jsx)(Bc,{value:e.available,min:t,onChange:n}),(0,F.jsxs)(`div`,{style:Uc,children:[t,` placed`]})]}),e.shape===`screen`&&(0,F.jsx)(`div`,{style:Uc,children:`Click a placed screen, then drag an end handle (or use the Length wheel) to change its length.`}),e.seatsPerUnit!==void 0&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:e.isTable?`Seats per table`:`Seats each`}),(0,F.jsx)(Bc,{value:e.seatsPerUnit,min:1,onChange:r})]})]})}var rl=120,il=46;function al({value:e,disabled:t=!1,onChange:n}){let r=(0,v.useRef)(null),i=(0,v.useRef)(!1),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(``),l=(0,v.useRef)(``),u=(0,v.useRef)(0),d=(0,v.useRef)({onChange:n});d.current={onChange:n};let f=e=>{l.current=e,c(e),window.clearTimeout(u.current),e&&(u.current=window.setTimeout(p,1500))};function p(){window.clearTimeout(u.current);let e=parseInt(l.current,10);l.current=``,c(``),Number.isNaN(e)||d.current.onChange((e%360+360)%360)}(0,v.useEffect)(()=>{if(!a||t)return;let e=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return;let t=l.current,n=()=>{e.preventDefault(),e.stopImmediatePropagation()};/^[0-9]$/.test(e.key)?(n(),t.length<3&&f(t+e.key)):e.key===`Backspace`||e.key===`Delete`?(n(),f(t.slice(0,-1))):e.key===`Enter`&&t?(n(),p()):e.key===`Escape`&&t&&(n(),f(``))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[a,t]),(0,v.useEffect)(()=>()=>window.clearTimeout(u.current),[]);let m=e=>(Math.round(e)%360+360)%360,h=e=>{let t=r.current.getBoundingClientRect(),n=e.clientX-(t.left+t.width/2),i=e.clientY-(t.top+t.height/2),a=Math.atan2(n,-i)*180/Math.PI;return e.shiftKey&&(a=Math.round(a/15)*15),m(a)},g=e=>{t||(e.currentTarget.setPointerCapture(e.pointerId),i.current=!0,n(h(e)))},_=e=>{i.current&&n(h(e))},y=()=>{i.current=!1},b=e*Math.PI/180,x=rl/2,S=x+il*Math.sin(b),C=x-il*Math.cos(b);return(0,F.jsxs)(`svg`,{ref:r,width:`100%`,viewBox:`0 0 ${rl} ${rl}`,style:{maxWidth:160,display:`block`,margin:`0 auto`,touchAction:`none`,userSelect:`none`,opacity:t?.45:1,cursor:t?`not-allowed`:`pointer`,outline:`none`},tabIndex:t?-1:0,role:`slider`,"aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":359,onMouseEnter:()=>o(!0),onMouseLeave:()=>{o(!1),l.current&&p()},onPointerDown:g,onPointerMove:_,onPointerUp:y,onPointerCancel:y,onWheel:r=>!t&&n(m(e+Math.sign(r.deltaY))),onKeyDown:r=>{if(!t){if(r.key===`ArrowRight`||r.key===`ArrowUp`)n(m(e+1));else if(r.key===`ArrowLeft`||r.key===`ArrowDown`)n(m(e-1));else return;r.preventDefault()}},children:[(0,F.jsx)(`circle`,{cx:x,cy:x,r:56,fill:`#f4f4f4`}),(0,F.jsx)(`circle`,{cx:x,cy:x,r:il,fill:`#fff`,stroke:`#bbb`,strokeWidth:2}),[0,90,180,270].map(e=>{let t=e*Math.PI/180;return(0,F.jsx)(`line`,{x1:x+40*Math.sin(t),y1:x-40*Math.cos(t),x2:x+il*Math.sin(t),y2:x-il*Math.cos(t),stroke:`#bbb`,strokeWidth:2},e)}),(0,F.jsx)(`line`,{x1:x,y1:x,x2:S,y2:C,stroke:`#1c7ed6`,strokeWidth:2,opacity:.5}),(0,F.jsx)(`circle`,{cx:S,cy:C,r:9,fill:`#1c7ed6`,stroke:`#fff`,strokeWidth:2}),(0,F.jsx)(`text`,{x,y:66,textAnchor:`middle`,style:{font:`600 18px system-ui, sans-serif`,fill:s?`#1c7ed6`:`#222`},children:s?`${s}|`:`${e}°`})]})}var ol=.3,sl=6,cl=e=>e.toFixed(1);function ll({item:e,config:t,onPatch:n,onDelete:r,onClose:i}){let[a,o]=(0,v.useState)(``);(0,v.useEffect)(()=>{let e=e=>e.key===`Escape`&&i();return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[i]);let s=e=>{let t=n(e);o(t?``:`No room for that change.`)},c=t.shape===`screen`,l=je(e,t)??1,u=e.seatsOverride!==void 0,d=(e,t)=>Math.min(t,e);return(0,F.jsxs)(`div`,{style:Vc,children:[(0,F.jsx)(`button`,{onClick:i,style:Gc,children:`← Done`}),(0,F.jsxs)(`div`,{style:Wc,children:[t.name,e.locked?` 🔒`:``]}),t.rotatable&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Rotation`}),(0,F.jsx)(al,{value:e.rotation,disabled:e.locked,onChange:e=>s({rotation:e})})]}),t.isTable&&(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Seats at this table`}),(0,F.jsx)(Bc,{value:l,min:1,max:99,rows:3,format:e=>String(e),onChange:e=>s({seatsOverride:e})}),u&&(0,F.jsxs)(`button`,{onClick:()=>s({seatsOverride:void 0}),style:{...Uc,border:`none`,background:`none`,padding:0,cursor:`pointer`,color:`#1c7ed6`,textDecoration:`underline`},children:[`Reset to default (`,t.seatsPerUnit??1,`)`]})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Size (m)`}),(0,F.jsx)(`div`,{style:qc,children:c?(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Uc,children:`Length`}),(0,F.jsx)(Bc,{value:e.width,min:.5,max:sl,step:.1,rows:3,format:cl,onChange:e=>s({width:e})})]}):(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Uc,children:`Width`}),(0,F.jsx)(Bc,{value:e.width,min:d(e.width,ol),max:sl,step:.1,rows:3,format:cl,onChange:e=>s({width:e})})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Uc,children:`Length`}),(0,F.jsx)(Bc,{value:e.height,min:d(e.height,ol),max:sl,step:.1,rows:3,format:cl,onChange:e=>s({height:e})})]})]})})]}),a&&(0,F.jsx)(`div`,{style:{...Uc,color:`#e03131`,marginTop:0},children:a}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,F.jsx)(`button`,{style:{...Kc,flex:1},onClick:()=>s({locked:!e.locked}),children:e.locked?`Unlock`:`Lock`}),(0,F.jsx)(`button`,{style:{...Kc,flex:1,color:`#e03131`,borderColor:`#e8a8a8`},onClick:r,children:`Delete`})]})]})}var ul=e=>e.toFixed(1),dl={width:.5,height:.5,seats:1},fl={width:1.8,height:.8,seats:8};function pl({onSave:e,onCancel:t}){let[n,r]=(0,v.useState)(``),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(dl.width),[c,l]=(0,v.useState)(dl.height),[u,d]=(0,v.useState)(dl.seats),[f,p]=(0,v.useState)(10);(0,v.useEffect)(()=>{let e=e=>e.key===`Escape`&&t();return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[t]);let m=e=>{a(e);let t=e?fl:dl;s(t.width),l(t.height),d(t.seats)},h=n.trim().length>0,g=e=>({...Kc,flex:1,background:e?`#2b2b2b`:`#fff`,color:e?`#fff`:`#222`});return(0,F.jsxs)(`div`,{style:Vc,children:[(0,F.jsx)(`button`,{onClick:t,style:Gc,children:`← Cancel`}),(0,F.jsx)(`div`,{style:Wc,children:`New furniture`}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Name`}),(0,F.jsx)(`input`,{value:n,autoFocus:!0,maxLength:24,placeholder:`e.g. Couch`,onChange:e=>r(e.target.value),style:{width:`100%`,boxSizing:`border-box`,height:32,padding:`0 10px`,border:`1px solid #c4c4c4`,borderRadius:8,font:`14px system-ui, sans-serif`}})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Type`}),(0,F.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,F.jsx)(`button`,{style:g(!i),onClick:()=>m(!1),children:`Seating`}),(0,F.jsx)(`button`,{style:g(i),onClick:()=>m(!0),children:`Table`})]})]}),(0,F.jsxs)(`div`,{style:qc,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Width (m)`}),(0,F.jsx)(Bc,{value:o,min:.3,max:6,step:.1,rows:3,format:ul,onChange:s})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Length (m)`}),(0,F.jsx)(Bc,{value:c,min:.3,max:6,step:.1,rows:3,format:ul,onChange:l})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Seats`}),(0,F.jsx)(Bc,{value:u,min:1,max:99,rows:3,onChange:d})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`div`,{style:Hc,children:`Available`}),(0,F.jsx)(Bc,{value:f,min:1,max:999,rows:3,onChange:p})]})]}),!h&&(0,F.jsx)(`div`,{style:Uc,children:`Enter a name to save.`}),(0,F.jsx)(`button`,{style:{...Kc,background:h?`#2b2b2b`:`#ddd`,color:h?`#fff`:`#999`,cursor:h?`pointer`:`not-allowed`},disabled:!h,onClick:()=>e({name:n.trim(),isTable:i,width:o,height:c,seats:u,available:f}),children:`Save`})]})}var ml=40;function hl(){let[e,t]=(0,v.useReducer)(Oe,De),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)({kind:`tiles`}),[o,s]=(0,v.useState)(null),c=(0,v.useRef)(null),l=(0,v.useRef)(null),u=(0,v.useRef)(e.room);u.current=e.room;let[d,f]=(0,v.useState)(60),[p,m]=(0,v.useState)(`layout`),[h,g]=(0,v.useState)(null),[_,y]=(0,v.useState)(``),S=(0,v.useRef)(1),C=(0,v.useRef)(1),w=e.items.find(e=>e.id===o)??null,T=(0,v.useCallback)(e=>{s(e),e&&a({kind:`tiles`})},[]),ee=e=>{s(null),a(e)},E=(0,v.useCallback)(()=>a({kind:`tiles`}),[]),D=(0,v.useCallback)(()=>s(null),[]),te=e=>{m(e),s(null),g(null),y(``),a({kind:`tiles`})},ne=(0,v.useCallback)(()=>{g(null),y(``)},[]),re=(0,v.useCallback)(()=>{o&&(t({kind:`remove`,id:o}),s(null))},[o]);(0,v.useEffect)(()=>{let e=e=>{if(e.key!==`Delete`&&e.key!==`Backspace`)return;let t=e.target;(!t||t.tagName!==`INPUT`&&t.tagName!==`TEXTAREA`&&!t.isContentEditable)&&(h?(e.preventDefault(),P()):o&&(e.preventDefault(),re()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[o,re,h,e.room]),(0,v.useEffect)(()=>{let e=l.current;if(!e)return;let t=new ResizeObserver(([e])=>{let{width:t,height:n}=e.contentRect;f(b(u.current,t-12,n-12-ml))});return t.observe(e),()=>t.disconnect()},[e.room.width,e.room.height]);let k=t=>{let n=c.current?.getBoundingClientRect();if(!n)return null;let r=(n.width-e.room.width*d)/2,i=t.clientX-n.left-r,a=t.clientY-n.top-r;if(i<0||a<0||i>e.room.width*d||a>e.room.height*d)return null;let{defaultWidth:o,defaultHeight:s}=e.configs[t.type];return se({x:i/d-o/2,y:a/d-s/2,width:o,height:s},e.room)};(0,v.useEffect)(()=>{if(!n)return;let i=n.type,a=e=>r({type:i,clientX:e.clientX,clientY:e.clientY}),o=n=>{let a=k({type:i,clientX:n.clientX,clientY:n.clientY});a&&Ae(e.items,i,e.configs[i].available)>0&&le(a,e.items,e.room)&&t({kind:`add`,id:`item-${S.current++}`,type:i,x:a.x,y:a.y}),r(null)},s=()=>r(null);return window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o),window.addEventListener(`pointercancel`,s),()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o),window.removeEventListener(`pointercancel`,s)}},[n?.type,e.items,e.room,e.configs,d]);let A=(0,v.useMemo)(()=>{if(!n)return null;let t=k(n);return t?{shape:e.configs[n.type].shape,...t,valid:le(t,e.items,e.room)}:null},[n,e.items,e.room,d]),ie=(e,t,n)=>{a({kind:`tiles`}),r({type:e,clientX:t,clientY:n})},ae=(n,r)=>{if(!(`rotation`in r||`width`in r||`height`in r))return t({kind:`update`,id:n.id,patch:r}),!0;let i=ue(n,r,e.items,e.room);return i?(t({kind:`update`,id:n.id,patch:{...r,x:i.x,y:i.y}}),!0):!1},j=e.room,oe=e=>{t({kind:`setRoom`,room:e}),y(``)},M=e=>y(e),ce=e=>`${e}-${Math.random().toString(36).slice(2,8)}`,de=t=>{let n=_e(j,e.items,t);n?oe(n):M(`Can't shrink past what's placed in the room.`)},he=()=>{for(let t of[`bottom`,`right`,`left`,`top`]){let n=N(j,e.items,`door`,t,x);if(n===null)continue;let r={id:ce(`door`),wall:t,offset:n,width:x,isLoading:!1};oe({...j,doors:[...j.doors,r]}),g({kind:`door`,id:r.id});return}M(`No free space on any wall for a door.`)},ye=()=>{if(!(j.screens.length>=2)){for(let t of[`top`,`left`,`right`,`bottom`]){let n=Math.min(4,O(j,t)),r=N(j,e.items,`screen`,t,n);if(r===null)continue;let i={id:ce(`screen`),wall:t,offset:r,width:n};oe({...j,screens:[...j.screens,i]}),g({kind:`screen`,id:i.id});return}M(`No free space on any wall for a screen.`)}},be=()=>{let t=ve(j,e.items,.6,.6);if(!t)return M(`No free space for an obstacle.`);let n={id:ce(`obstacle`),...t,width:.6,height:.6};oe({...j,obstacles:[...j.obstacles,n]}),g({kind:`obstacle`,id:n.id})},xe=(t,n)=>{let r=j.doors.find(e=>e.id===t);if(!r)return;let i={...r,...n};if(i.offset=Math.max(0,Math.min(i.offset,O(j,i.wall)-i.width)),!fe(j,e.items,{id:t,kind:`door`,wall:i.wall,offset:i.offset,width:i.width}))return M(`No room for that change.`);oe({...j,doors:j.doors.map(e=>e.id===t?i:e)})},Se=(t,n)=>{let r=j.screens.find(e=>e.id===t);if(!r)return;let i={...r,...n};if(i.offset=Math.max(0,Math.min(i.offset,O(j,i.wall)-i.width)),!fe(j,e.items,{id:t,kind:`screen`,wall:i.wall,offset:i.offset,width:i.width}))return M(`No room for that change.`);oe({...j,screens:j.screens.map(e=>e.id===t?i:e)})},Ce=(t,n)=>{let r=j.obstacles.find(e=>e.id===t);if(!r)return;let i=se({...r,...n},j);if(!pe(j,e.items,i))return M(`No room for that change.`);oe({...j,obstacles:j.obstacles.map(e=>e.id===t?i:e)})},P=()=>{if(h){if(h.kind===`door`){if(j.doors.length<=1)return M(`A room needs at least one door.`);oe({...j,doors:j.doors.filter(e=>e.id!==h.id)})}else h.kind===`screen`?oe({...j,screens:j.screens.filter(e=>e.id!==h.id)}):oe({...j,obstacles:j.obstacles.filter(e=>e.id!==h.id)});g(null)}},Ee=()=>{let e=URL.createObjectURL(new Blob([we(j)],{type:`application/json`})),t=document.createElement(`a`);t.href=e,t.download=`room.json`,t.click(),URL.revokeObjectURL(e)},je=async n=>{let r=Te(await n.text());if(!r.ok)return M(`Import failed: ${r.error}`);if(e.items.length>0&&!window.confirm(`Importing replaces the current room. Continue?`))return;let i=e.items.length>0&&!me(r.room,e.items);t({kind:`setRoom`,room:r.room,clearItems:i}),s(null),g(null),y(i?`Furniture was cleared because it didn't fit the imported room.`:``)},Me=e=>{let n=`custom-${C.current++}`;t({kind:`addConfig`,config:{id:n,name:e.name,shape:e.isTable?`table`:`chair`,defaultWidth:e.width,defaultHeight:e.height,isTable:e.isTable,rotatable:!0,available:e.available,seatsPerUnit:e.seats}}),a({kind:`tiles`})},Ne=Object.fromEntries(e.typeOrder.map(t=>[t,Ae(e.items,t,e.configs[t].available)])),Pe=null;if(p===`room`){let t=h?.kind===`door`?j.doors.find(e=>e.id===h.id):void 0,n=h?.kind===`screen`?j.screens.find(e=>e.id===h.id):void 0,r=h?.kind===`obstacle`?j.obstacles.find(e=>e.id===h.id):void 0;Pe=t?(0,F.jsx)(Qc,{door:t,isLast:j.doors.length<=1,notice:_,onPatch:e=>xe(t.id,e),onDelete:P,onClose:ne},t.id):n?(0,F.jsx)($c,{screen:n,notice:_,onPatch:e=>Se(n.id,e),onDelete:P,onClose:ne},n.id):r?(0,F.jsx)(el,{obstacle:r,notice:_,onPatch:e=>Ce(r.id,e),onDelete:P,onClose:ne},r.id):(0,F.jsx)(Zc,{room:j,minSize:ge(j,e.items),notice:_,onResize:de,onAddDoor:he,onAddScreen:ye,onAddObstacle:be,onExport:Ee,onImport:je})}else if(w)Pe=(0,F.jsx)(ll,{item:w,config:e.configs[w.type],onPatch:e=>ae(w,e),onDelete:re,onClose:D},w.id);else if(i.kind===`type`){let n=i.id;Pe=(0,F.jsx)(nl,{config:e.configs[n],placed:ke(e.items,n),onSetAvailable:e=>t({kind:`setAvailable`,type:n,value:e}),onSetSeats:e=>t({kind:`setSeats`,type:n,value:e}),onClose:E})}else i.kind===`custom`&&(Pe=(0,F.jsx)(pl,{onSave:Me,onCancel:E}));return(0,F.jsxs)(`div`,{style:{display:`flex`,height:`100vh`,background:`#e9e9e9`,cursor:n?`grabbing`:void 0},children:[(0,F.jsx)(Ue,{types:e.typeOrder.map(t=>e.configs[t]),remaining:Ne,onStartDrag:ie,onOpenMenu:e=>ee({kind:`type`,id:e}),onNewCustom:()=>ee({kind:`custom`}),header:(0,F.jsx)(Mc,{mode:p,onChange:te}),panel:Pe}),(0,F.jsxs)(`main`,{ref:l,style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,padding:24},children:[(0,F.jsx)(jc,{mode:p,roomSel:h,onSelectRoom:e=>{g(e),y(``)},onMoveWallItem:(e,t,n)=>e===`door`?xe(t,{offset:n}):Se(t,{offset:n}),onMoveObstacle:(e,t,n)=>Ce(e,{x:t,y:n}),pxPerM:d,room:e.room,items:e.items,configs:e.configs,preview:A,floorRef:c,selectedId:o,onSelect:T,onMove:(e,n,r)=>t({kind:`move`,id:e,x:n,y:r}),onResize:(e,n)=>t({kind:`update`,id:e,patch:{...n}})}),(0,F.jsx)(tl,{pxPerM:d,roomWidthPx:e.room.width*d+12})]}),n&&!A&&(0,F.jsx)(`div`,{style:{position:`fixed`,left:n.clientX,top:n.clientY,transform:`translate(-50%, -50%)`,pointerEvents:`none`,opacity:.8},children:(0,F.jsx)(Ie,{shape:e.configs[n.type].shape})})]})}document.body.style.margin=`0`,(0,y.createRoot)(document.getElementById(`root`)).render((0,F.jsx)(hl,{})); \ No newline at end of file diff --git a/dist/index.html b/dist/index.html index cc028d5..ae67e6d 100644 --- a/dist/index.html +++ b/dist/index.html @@ -2,9 +2,11 @@ + - FurnOp - + furniture-app + +
diff --git a/index.html b/index.html index 6e0ce70..439efcc 100644 --- a/index.html +++ b/index.html @@ -2,8 +2,9 @@ + - FurnOp + furniture-app
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 7209859..065f44f 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1,6 +1,6 @@ { - "name": "furniture-optimizer", - "version": "0.0.1", + "name": "furniture-app", + "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { @@ -14,176 +14,17 @@ "url": "https://github.com/sponsors/oxc-project" } }, - "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.14.tgz", - "integrity": "sha512-aWR+XKH9+rW7m5fWq/5360J3mHycrx/o6xZM2DQFdJnTMdyP7/WzxPjhtLbVWdKo2y612/4U1bWqb3HQhiF7vg==", - "cpu": [ - "arm" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.14.tgz", - "integrity": "sha512-QiVxHofl6A8lQU7WAtOUY4QMVZXohxwz7WJJoeh8NBEUyKfIkMRKhYyq8az/1RypNiIXzNTtiS6KwHz0erxYRQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.14.tgz", - "integrity": "sha512-lTQOzHuBIooh3jIr5XINQkjPGEuGy+Dsy0meXDr6Sjty0b99kYgGh4uBC/8mJX1T0kC8d6S0aPP1Y+bHkh6aBw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.14.tgz", - "integrity": "sha512-hyMKEGatjmBYCs/Q4sbIcL/GqpFEqsX3wc+HYVQ/85A4rxc1o7rPm4DUI4GV4k/h0ITddwFSGpqQunI14GXjTA==", + "node_modules/@oxlint/binding-linux-x64-gnu": { + "version": "1.88.0", + "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.88.0.tgz", + "integrity": "sha512-og/XHVDOD9ZJgRiZkT9DgzQd4sr+JZW7e4l17Q/jVMZiIbeEd4uIu9iAoUbTF1gIvVZoRc4QDOxyVUvQGp4WHg==", "cpu": [ "x64" ], "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" + "libc": [ + "glibc" ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.14.tgz", - "integrity": "sha512-u371GbXoVXrEgP20PwzoGNOdAOqAMhzo19JzzY+V4YmmnC+DTOoqdbMu+O+54emM59Mik/UdrtWgcuEDKWRPKA==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.14.tgz", - "integrity": "sha512-BqwKsdZQf6EqVWr8fv2MrDYzAvOZ7+NYFSJESRGs87fkseEhs0TU9TXgRJTkZoRRkxTizyEg1LKUXfU3/78uqg==", - "cpu": [ - "arm" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.14.tgz", - "integrity": "sha512-SD9kY8M009x/7s57Z1dgUVlP5+uYBgKQK0Tkr1WIWngrtUJmRCW1RJFMY7QDla2khXhmg2i5Io7MUjcmZNZ/KQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.14.tgz", - "integrity": "sha512-BJ2CL19M6uuWesMgnqJzgxoI+N+eV7b0A9O9vLV42y+gitC41fNa8KElau1tHVzuLWX5GzEuxMPhAO0tQXQMkg==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.14.tgz", - "integrity": "sha512-4+Kl8daPV8NDHaD7mfCcc1pRM+Qg7ab8DyMm5FG5WoZgv4h2i3KFN1CybYBNbQqmuYm7ftJLvmMI1eHYJ22S/Q==", - "cpu": [ - "ppc64" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.14.tgz", - "integrity": "sha512-V/h8ePq1fKDrmtFMz6xcCN3DKvuvMRrwwD1q0PkBeeo4DpK64biaKvqWGVxqCeYKqeRk7gE7/iKPxLCn08O97A==", - "cpu": [ - "s390x" - ], - "dev": true, - "ideallyInert": true, "license": "MIT", "optional": true, "os": [ @@ -201,7 +42,9 @@ "x64" ], "dev": true, - "ideallyInert": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -211,78 +54,6 @@ "node": "^20.19.0 || >=22.12.0" } }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.14.tgz", - "integrity": "sha512-3G3tnAmTpdk9jO3GQtyHXqeFD2SlecfTws/Y3M2mmj9nMBwwuLT4kur8sZKeu7ENUHSpVO3cIsm5A52LEWWwlg==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.14.tgz", - "integrity": "sha512-qyr5XiNGxm2ytx17vvtcJ9nXn6v1gENETi503bJx3OGwZ1tSonj7BosxbMa/xeAfSl5iS9X6KjEWYXLu6v1L7Q==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "openharmony" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.14.tgz", - "integrity": "sha512-oA4o5o0S2yB199YyYXDzKUv1Z56Rc+mgOjwm7Z/vJ9Z8igiDPYvoOuDyo6g7AK/ZaF09nPhDKVnGBcYHO11GXA==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, - "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.14.tgz", - "integrity": "sha512-9mE94bf2GZUaR/fUSXCMpBoWkctu421Mi0ORpm4zqfbkjKep7RxzPFa5etcGs5h+2KApoWBOA/hAJa/7saGgEQ==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": "^20.19.0 || >=22.12.0" - } - }, "node_modules/@rolldown/pluginutils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", @@ -290,10 +61,21 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "24.19.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.19.2.tgz", + "integrity": "sha512-93d49wCWJkCyN87MxLpNN6KXPCwFw7bVUg79mGUV1OS40JGWwVCr8n61DXCSqz7CV6/VfPkb7xec7uP2M+QHWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": ">=7.24.0 <7.24.7" + } + }, "node_modules/@types/react": { "version": "19.3.0", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz", "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==", + "dev": true, "license": "MIT", "dependencies": { "csstype": "^3.2.2" @@ -309,374 +91,6 @@ "@types/react": "^19.3.0" } }, - "node_modules/@types/react-reconciler": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.34.0.tgz", - "integrity": "sha512-zVDzX0Fk1XgDP2IutTpSrxd57jwOHlX3rlPrFz68Sc+06tpgOFRlqSUK2ZiqQeQXqnIfUb2cfJQUupXBKy498w==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*" - } - }, - "node_modules/@typescript/typescript-aix-ppc64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", - "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", - "cpu": [ - "ppc64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "aix" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-darwin-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", - "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-darwin-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", - "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-freebsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", - "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-freebsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", - "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-arm": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", - "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", - "cpu": [ - "arm" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", - "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-loong64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", - "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", - "cpu": [ - "loong64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-mips64el": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", - "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", - "cpu": [ - "mips64el" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-ppc64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", - "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", - "cpu": [ - "ppc64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-riscv64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", - "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", - "cpu": [ - "riscv64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-s390x": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", - "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", - "cpu": [ - "s390x" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-linux-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", - "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-netbsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", - "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-netbsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", - "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-openbsd-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", - "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-openbsd-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", - "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-sunos-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", - "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-win32-arm64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", - "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=16.20.0" - } - }, - "node_modules/@typescript/typescript-win32-x64": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", - "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=16.20.0" - } - }, "node_modules/@vitejs/plugin-react": { "version": "6.1.2", "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.1.2.tgz", @@ -711,6 +125,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, "license": "MIT" }, "node_modules/detect-libc": { @@ -741,74 +156,6 @@ } } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/its-fine": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/its-fine/-/its-fine-2.1.1.tgz", - "integrity": "sha512-C5ZoVkeqSt0Aje0tzESO+iT/EQpNFNL39GkP7mCACtoZUFD6GcyerFCr6kp0ZtiII4W9HoYkY48Soy5xE/uHKw==", - "license": "MIT", - "dependencies": { - "@types/react-reconciler": "^0.28.9" - }, - "peerDependencies": { - "react": "^19.0.0" - } - }, - "node_modules/its-fine/node_modules/@types/react-reconciler": { - "version": "0.28.9", - "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.28.9.tgz", - "integrity": "sha512-HHM3nxyUZ3zAylX8ZEyrDNd2XZOnQ0D5XfunJF5FLQnZbHHYq4UWvW1QfelQNXv1ICNkwYhfxjwfnqivYB6bFg==", - "license": "MIT", - "peerDependencies": { - "@types/react": "*" - } - }, - "node_modules/konva": { - "version": "10.9.0", - "resolved": "https://registry.npmjs.org/konva/-/konva-10.9.0.tgz", - "integrity": "sha512-3NOOlcbimFDp4+/DfXGTBkfn3cn3VP1BESPySQ6ayCzgMA9JSMGJNNxeIKw5jpHL6SAl6gHsrv10DUEjNRL0Qg==", - "funding": [ - { - "type": "patreon", - "url": "https://www.patreon.com/lavrton" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/konva" - }, - { - "type": "github", - "url": "https://github.com/sponsors/lavrton" - } - ], - "license": "MIT", - "peerDependencies": { - "canvas": "^3.0.0", - "skia-canvas": "^3.0.0" - }, - "peerDependenciesMeta": { - "canvas": { - "optional": true - }, - "skia-canvas": { - "optional": true - } - } - }, "node_modules/lightningcss": { "version": "1.33.0", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", @@ -839,159 +186,6 @@ "lightningcss-win32-x64-msvc": "1.33.0" } }, - "node_modules/lightningcss-android-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", - "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", - "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", - "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", - "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", - "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", - "cpu": [ - "arm" - ], - "dev": true, - "ideallyInert": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", - "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", - "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, "node_modules/lightningcss-linux-x64-gnu": { "version": "1.33.0", "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", @@ -1000,7 +194,9 @@ "x64" ], "dev": true, - "ideallyInert": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -1014,72 +210,6 @@ "url": "https://opencollective.com/parcel" } }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", - "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", - "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", - "cpu": [ - "arm64" - ], - "dev": true, - "ideallyInert": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", - "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", - "cpu": [ - "x64" - ], - "dev": true, - "ideallyInert": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - } - }, "node_modules/nanoid": { "version": "3.3.20", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", @@ -1099,6 +229,55 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/oxlint": { + "version": "1.88.0", + "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.88.0.tgz", + "integrity": "sha512-uIcFgw8BmqvFRGzH5+r7d2zJMEexwNSrEmM6WQNnGh3VkO0XYTEFoyxyNE6tjKMUib9Cue4XJA2DoWruO5D6aw==", + "dev": true, + "license": "MIT", + "bin": { + "oxlint": "bin/oxlint" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/oxc-project" + }, + "optionalDependencies": { + "@oxlint/binding-android-arm-eabi": "1.88.0", + "@oxlint/binding-android-arm64": "1.88.0", + "@oxlint/binding-darwin-arm64": "1.88.0", + "@oxlint/binding-darwin-x64": "1.88.0", + "@oxlint/binding-freebsd-x64": "1.88.0", + "@oxlint/binding-linux-arm-gnueabihf": "1.88.0", + "@oxlint/binding-linux-arm-musleabihf": "1.88.0", + "@oxlint/binding-linux-arm64-gnu": "1.88.0", + "@oxlint/binding-linux-arm64-musl": "1.88.0", + "@oxlint/binding-linux-ppc64-gnu": "1.88.0", + "@oxlint/binding-linux-riscv64-gnu": "1.88.0", + "@oxlint/binding-linux-riscv64-musl": "1.88.0", + "@oxlint/binding-linux-s390x-gnu": "1.88.0", + "@oxlint/binding-linux-x64-gnu": "1.88.0", + "@oxlint/binding-linux-x64-musl": "1.88.0", + "@oxlint/binding-openharmony-arm64": "1.88.0", + "@oxlint/binding-win32-arm64-msvc": "1.88.0", + "@oxlint/binding-win32-ia32-msvc": "1.88.0", + "@oxlint/binding-win32-x64-msvc": "1.88.0" + }, + "peerDependencies": { + "oxlint-tsgolint": ">=7.0.2003", + "vite-plus": "*" + }, + "peerDependenciesMeta": { + "oxlint-tsgolint": { + "optional": true + }, + "vite-plus": { + "optional": true + } + } + }, "node_modules/picocolors": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", @@ -1169,52 +348,6 @@ "react": "^19.3.1" } }, - "node_modules/react-konva": { - "version": "19.3.2", - "resolved": "https://registry.npmjs.org/react-konva/-/react-konva-19.3.2.tgz", - "integrity": "sha512-Uv0xlWoRSCByHinqs/03SFL8E28fYbe59sQ+2EJpwa1O4Zlz0+T+8DaKwlma9C2rkYwYj6j8eHD41F5oJafagg==", - "funding": [ - { - "type": "patreon", - "url": "https://www.patreon.com/lavrton" - }, - { - "type": "opencollective", - "url": "https://opencollective.com/konva" - }, - { - "type": "github", - "url": "https://github.com/sponsors/lavrton" - } - ], - "license": "MIT", - "dependencies": { - "@types/react-reconciler": "0.34.0", - "its-fine": "^2.1.1", - "react-reconciler": "0.34.0", - "scheduler": "0.28.0" - }, - "peerDependencies": { - "konva": "^8.0.1 || ^7.2.5 || ^9.0.0 || ^10.0.0", - "react": "^19.3.0", - "react-dom": "^19.3.0" - } - }, - "node_modules/react-reconciler": { - "version": "0.34.0", - "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.34.0.tgz", - "integrity": "sha512-eVibvB1fc9j5Qf1KRkiM3GzRPBdjg2P6G6QV2f3P6Eb3OGMxRBhdg2rrUwjbV5JrQaJj8nOa8uajmmJA5tJWjQ==", - "license": "MIT", - "dependencies": { - "scheduler": "^0.28.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "react": "^19.3.0" - } - }, "node_modules/rolldown": { "version": "1.2.14", "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.14.tgz", @@ -1283,40 +416,26 @@ } }, "node_modules/typescript": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", - "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", "bin": { - "tsc": "bin/tsc" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=16.20.0" - }, - "optionalDependencies": { - "@typescript/typescript-aix-ppc64": "7.0.2", - "@typescript/typescript-darwin-arm64": "7.0.2", - "@typescript/typescript-darwin-x64": "7.0.2", - "@typescript/typescript-freebsd-arm64": "7.0.2", - "@typescript/typescript-freebsd-x64": "7.0.2", - "@typescript/typescript-linux-arm": "7.0.2", - "@typescript/typescript-linux-arm64": "7.0.2", - "@typescript/typescript-linux-loong64": "7.0.2", - "@typescript/typescript-linux-mips64el": "7.0.2", - "@typescript/typescript-linux-ppc64": "7.0.2", - "@typescript/typescript-linux-riscv64": "7.0.2", - "@typescript/typescript-linux-s390x": "7.0.2", - "@typescript/typescript-linux-x64": "7.0.2", - "@typescript/typescript-netbsd-arm64": "7.0.2", - "@typescript/typescript-netbsd-x64": "7.0.2", - "@typescript/typescript-openbsd-arm64": "7.0.2", - "@typescript/typescript-openbsd-x64": "7.0.2", - "@typescript/typescript-sunos-x64": "7.0.2", - "@typescript/typescript-win32-arm64": "7.0.2", - "@typescript/typescript-win32-x64": "7.0.2" + "node": ">=14.17" } }, + "node_modules/undici-types": { + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", + "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", + "dev": true, + "license": "MIT" + }, "node_modules/vite": { "version": "8.3.4", "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.4.tgz", diff --git a/node_modules/.vite/deps/_metadata.json b/node_modules/.vite/deps/_metadata.json deleted file mode 100644 index b1ed9c7..0000000 --- a/node_modules/.vite/deps/_metadata.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "hash": "41d54556", - "configHash": "c0b3aa3e", - "lockfileHash": "100e1e11", - "browserHash": "6670cfb6", - "optimized": { - "react-dom": { - "src": "../../react-dom/index.js", - "file": "react-dom.js", - "fileHash": "151627ba", - "needsInterop": true - }, - "react-dom/client": { - "src": "../../react-dom/client.js", - "file": "react-dom_client.js", - "fileHash": "d1503977", - "needsInterop": true - }, - "react-konva": { - "src": "../../react-konva/es/ReactKonva.js", - "file": "react-konva.js", - "fileHash": "c3e12e6a", - "needsInterop": false - }, - "react": { - "src": "../../react/index.js", - "file": "react.js", - "fileHash": "db2c97c2", - "needsInterop": true - }, - "react/jsx-dev-runtime": { - "src": "../../react/jsx-dev-runtime.js", - "file": "react_jsx-dev-runtime.js", - "fileHash": "2812f2b3", - "needsInterop": true - }, - "react/jsx-runtime": { - "src": "../../react/jsx-runtime.js", - "file": "react_jsx-runtime.js", - "fileHash": "d5e07ba3", - "needsInterop": true - } - }, - "chunks": { - "react-Bk9vEtng": { - "file": "react-Bk9vEtng.js", - "isDynamicEntry": false - }, - "react-dom-f6U-7Wx1": { - "file": "react-dom-f6U-7Wx1.js", - "isDynamicEntry": false - }, - "rolldown-runtime-Bk_YeHJf": { - "file": "rolldown-runtime-Bk_YeHJf.js", - "isDynamicEntry": false - }, - "scheduler-B49edKHR": { - "file": "scheduler-B49edKHR.js", - "isDynamicEntry": false - } - } -} \ No newline at end of file diff --git a/node_modules/.vite/deps/package.json b/node_modules/.vite/deps/package.json deleted file mode 100644 index 3dbc1ca..0000000 --- a/node_modules/.vite/deps/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "module" -} diff --git a/node_modules/.vite/deps/react-Bk9vEtng.js b/node_modules/.vite/deps/react-Bk9vEtng.js deleted file mode 100644 index 5bf56b1..0000000 --- a/node_modules/.vite/deps/react-Bk9vEtng.js +++ /dev/null @@ -1,787 +0,0 @@ -import { t as __commonJSMin } from "./rolldown-runtime-Bk_YeHJf.js"; -//#region node_modules/react/cjs/react.development.js -/** -* @license React -* react.development.js -* -* Copyright (c) Meta Platforms, Inc. and affiliates. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ -var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module) => { - (function() { - function defineDeprecationWarning(methodName, info) { - Object.defineProperty(Component.prototype, methodName, { get: function() { - console.warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]); - } }); - } - function getIteratorFn(maybeIterable) { - if (null === maybeIterable || "object" !== typeof maybeIterable) return null; - maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; - return "function" === typeof maybeIterable ? maybeIterable : null; - } - function warnNoop(publicInstance, callerName) { - publicInstance = (publicInstance = publicInstance.constructor) && (publicInstance.displayName || publicInstance.name) || "ReactClass"; - var warningKey = publicInstance + "." + callerName; - didWarnStateUpdateForUnmountedComponent[warningKey] || (console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, publicInstance), didWarnStateUpdateForUnmountedComponent[warningKey] = !0); - } - function Component(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - function ComponentDummy() {} - function PureComponent(props, context, updater) { - this.props = props; - this.context = context; - this.refs = emptyObject; - this.updater = updater || ReactNoopUpdateQueue; - } - function noop() {} - function testStringCoercion(value) { - return "" + value; - } - function checkKeyStringCoercion(value) { - try { - testStringCoercion(value); - var JSCompiler_inline_result = !1; - } catch (e) { - JSCompiler_inline_result = !0; - } - if (JSCompiler_inline_result) { - JSCompiler_inline_result = console; - var JSCompiler_temp_const = JSCompiler_inline_result.error; - var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; - JSCompiler_temp_const.call(JSCompiler_inline_result, "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", JSCompiler_inline_result$jscomp$0); - return testStringCoercion(value); - } - } - function getComponentNameFromType(type) { - if (null == type) return null; - if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; - if ("string" === typeof type) return type; - switch (type) { - case REACT_FRAGMENT_TYPE: return "Fragment"; - case REACT_PROFILER_TYPE: return "Profiler"; - case REACT_STRICT_MODE_TYPE: return "StrictMode"; - case REACT_SUSPENSE_TYPE: return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList"; - case REACT_ACTIVITY_TYPE: return "Activity"; - case REACT_VIEW_TRANSITION_TYPE: return "ViewTransition"; - } - if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) { - case REACT_PORTAL_TYPE: return "Portal"; - case REACT_CONTEXT_TYPE: return type.displayName || "Context"; - case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer"; - case REACT_FORWARD_REF_TYPE: - var innerType = type.render; - type = type.displayName; - type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); - return type; - case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; - case REACT_LAZY_TYPE: - innerType = type._payload; - type = type._init; - try { - return getComponentNameFromType(type(innerType)); - } catch (x) {} - } - return null; - } - function getTaskName(type) { - if (type === REACT_FRAGMENT_TYPE) return "<>"; - if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE) return "<...>"; - try { - var name = getComponentNameFromType(type); - return name ? "<" + name + ">" : "<...>"; - } catch (x) { - return "<...>"; - } - } - function getOwner() { - var dispatcher = ReactSharedInternals.A; - return null === dispatcher ? null : dispatcher.getOwner(); - } - function UnknownOwner() { - return Error("react-stack-top-frame"); - } - function hasValidKey(config) { - if (hasOwnProperty.call(config, "key")) { - var getter = Object.getOwnPropertyDescriptor(config, "key").get; - if (getter && getter.isReactWarning) return !1; - } - return void 0 !== config.key; - } - function defineKeyPropWarningGetter(props, displayName) { - function warnAboutAccessingKey() { - specialPropKeyWarningShown || (specialPropKeyWarningShown = !0, console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)", displayName)); - } - warnAboutAccessingKey.isReactWarning = !0; - Object.defineProperty(props, "key", { - get: warnAboutAccessingKey, - configurable: !0 - }); - } - function elementRefGetterWithDeprecationWarning() { - var componentName = getComponentNameFromType(this.type); - didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = !0, console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")); - componentName = this.props.ref; - return void 0 !== componentName ? componentName : null; - } - function ReactElement(type, key, props, owner, debugStack, debugTask) { - var refProp = props.ref; - type = { - $$typeof: REACT_ELEMENT_TYPE, - type, - key, - props, - _owner: owner - }; - null !== (void 0 !== refProp ? refProp : null) ? Object.defineProperty(type, "ref", { - enumerable: !1, - get: elementRefGetterWithDeprecationWarning - }) : Object.defineProperty(type, "ref", { - enumerable: !1, - value: null - }); - type._store = {}; - Object.defineProperty(type._store, "validated", { - configurable: !1, - enumerable: !1, - writable: !0, - value: 0 - }); - Object.defineProperty(type, "_debugInfo", { - configurable: !1, - enumerable: !1, - writable: !0, - value: null - }); - Object.defineProperty(type, "_debugStack", { - configurable: !1, - enumerable: !1, - writable: !0, - value: debugStack - }); - Object.defineProperty(type, "_debugTask", { - configurable: !1, - enumerable: !1, - writable: !0, - value: debugTask - }); - Object.freeze && (Object.freeze(type.props), Object.freeze(type)); - return type; - } - function cloneAndReplaceKey(oldElement, newKey) { - newKey = ReactElement(oldElement.type, newKey, oldElement.props, oldElement._owner, oldElement._debugStack, oldElement._debugTask); - oldElement._store && (newKey._store.validated = oldElement._store.validated); - return newKey; - } - function validateChildKeys(node) { - isValidElement(node) ? node._store && (node._store.validated = 1) : "object" === typeof node && null !== node && node.$$typeof === REACT_LAZY_TYPE && ("fulfilled" === node._payload.status ? isValidElement(node._payload.value) && node._payload.value._store && (node._payload.value._store.validated = 1) : node._store && (node._store.validated = 1)); - } - function isValidElement(object) { - return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE; - } - function escape(key) { - var escaperLookup = { - "=": "=0", - ":": "=2" - }; - return "$" + key.replace(/[=:]/g, function(match) { - return escaperLookup[match]; - }); - } - function getElementKey(element, index) { - return "object" === typeof element && null !== element && null != element.key ? (checkKeyStringCoercion(element.key), escape("" + element.key)) : index.toString(36); - } - function resolveThenable(thenable) { - switch (thenable.status) { - case "fulfilled": return thenable.value; - case "rejected": throw thenable.reason; - default: switch ("string" === typeof thenable.status ? thenable.then(noop, noop) : (thenable.status = "pending", thenable.then(function(fulfilledValue) { - "pending" === thenable.status && (thenable.status = "fulfilled", thenable.value = fulfilledValue); - }, function(error) { - "pending" === thenable.status && (thenable.status = "rejected", thenable.reason = error); - })), thenable.status) { - case "fulfilled": return thenable.value; - case "rejected": throw thenable.reason; - } - } - throw thenable; - } - function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) { - var type = typeof children; - if ("undefined" === type || "boolean" === type) children = null; - var invokeCallback = !1; - if (null === children) invokeCallback = !0; - else switch (type) { - case "bigint": - case "string": - case "number": - invokeCallback = !0; - break; - case "object": switch (children.$$typeof) { - case REACT_ELEMENT_TYPE: - case REACT_PORTAL_TYPE: - invokeCallback = !0; - break; - case REACT_LAZY_TYPE: return invokeCallback = children._init, mapIntoArray(invokeCallback(children._payload), array, escapedPrefix, nameSoFar, callback); - } - } - if (invokeCallback) { - invokeCallback = children; - callback = callback(invokeCallback); - var childKey = "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar; - isArrayImpl(callback) ? (escapedPrefix = "", null != childKey && (escapedPrefix = childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"), mapIntoArray(callback, array, escapedPrefix, "", function(c) { - return c; - })) : null != callback && (isValidElement(callback) && (null != callback.key && (invokeCallback && invokeCallback.key === callback.key || checkKeyStringCoercion(callback.key)), escapedPrefix = cloneAndReplaceKey(callback, escapedPrefix + (null == callback.key || invokeCallback && invokeCallback.key === callback.key ? "" : ("" + callback.key).replace(userProvidedKeyEscapeRegex, "$&/") + "/") + childKey), "" !== nameSoFar && null != invokeCallback && isValidElement(invokeCallback) && null == invokeCallback.key && invokeCallback._store && !invokeCallback._store.validated && (escapedPrefix._store.validated = 2), callback = escapedPrefix), array.push(callback)); - return 1; - } - invokeCallback = 0; - childKey = "" === nameSoFar ? "." : nameSoFar + ":"; - if (isArrayImpl(children)) for (var i = 0; i < children.length; i++) nameSoFar = children[i], type = childKey + getElementKey(nameSoFar, i), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback); - else if (i = getIteratorFn(children), "function" === typeof i) for (i === children.entries && (didWarnAboutMaps || console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), didWarnAboutMaps = !0), children = i.call(children), i = 0; !(nameSoFar = children.next()).done;) nameSoFar = nameSoFar.value, type = childKey + getElementKey(nameSoFar, i++), invokeCallback += mapIntoArray(nameSoFar, array, escapedPrefix, type, callback); - else if ("object" === type) { - if ("function" === typeof children.then) return mapIntoArray(resolveThenable(children), array, escapedPrefix, nameSoFar, callback); - array = String(children); - throw Error("Objects are not valid as a React child (found: " + ("[object Object]" === array ? "object with keys {" + Object.keys(children).join(", ") + "}" : array) + "). If you meant to render a collection of children, use an array instead."); - } - return invokeCallback; - } - function mapChildren(children, func, context) { - if (null == children) return children; - var result = [], count = 0; - mapIntoArray(children, result, "", "", function(child) { - return func.call(context, child, count++); - }); - return result; - } - function lazyInitializer(payload) { - if (-1 === payload._status) { - var resolveDebugValue = null, rejectDebugValue = null, ioInfo = payload._ioInfo; - null != ioInfo && (ioInfo.start = ioInfo.end = performance.now(), ioInfo.value = new Promise(function(resolve, reject) { - resolveDebugValue = resolve; - rejectDebugValue = reject; - })); - ioInfo = payload._result; - var thenable = ioInfo(); - thenable.then(function(moduleObject) { - if (0 === payload._status || -1 === payload._status) { - payload._status = 1; - payload._result = moduleObject; - var _ioInfo = payload._ioInfo; - if (null != _ioInfo) { - _ioInfo.end = performance.now(); - var debugValue = null == moduleObject ? void 0 : moduleObject.default; - resolveDebugValue(debugValue); - _ioInfo.value.status = "fulfilled"; - _ioInfo.value.value = debugValue; - } - void 0 === thenable.status && (thenable.status = "fulfilled", thenable.value = moduleObject); - } - }, function(error) { - if (0 === payload._status || -1 === payload._status) { - payload._status = 2; - payload._result = error; - var _ioInfo2 = payload._ioInfo; - null != _ioInfo2 && (_ioInfo2.end = performance.now(), _ioInfo2.value.then(noop, noop), rejectDebugValue(error), _ioInfo2.value.status = "rejected", _ioInfo2.value.reason = error); - void 0 === thenable.status && (thenable.status = "rejected", thenable.reason = error); - } - }); - ioInfo = payload._ioInfo; - if (null != ioInfo) { - var displayName = thenable.displayName; - "string" === typeof displayName && (ioInfo.name = displayName); - } - -1 === payload._status && (payload._status = 0, payload._result = thenable); - } - if (1 === payload._status) return ioInfo = payload._result, void 0 === ioInfo && console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", ioInfo), "default" in ioInfo || console.error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", ioInfo), ioInfo.default; - throw payload._result; - } - function resolveDispatcher() { - var dispatcher = ReactSharedInternals.H; - null === dispatcher && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."); - return dispatcher; - } - function releaseAsyncTransition() { - ReactSharedInternals.asyncTransitions--; - } - function startTransition(scope) { - var prevTransition = ReactSharedInternals.T, currentTransition = {}; - currentTransition.types = null !== prevTransition ? prevTransition.types : null; - currentTransition._updatedFibers = /* @__PURE__ */ new Set(); - ReactSharedInternals.T = currentTransition; - try { - var returnValue = scope(), onStartTransitionFinish = ReactSharedInternals.S; - null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue); - "object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then && (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(noop, reportGlobalError)); - } catch (error) { - reportGlobalError(error); - } finally { - null === prevTransition && currentTransition._updatedFibers && (scope = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < scope && console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")), null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition; - } - } - function addTransitionType(type) { - var transition = ReactSharedInternals.T; - if (null !== transition) { - var transitionTypes = transition.types; - null === transitionTypes ? transition.types = [type] : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type); - } else 0 === ReactSharedInternals.asyncTransitions && console.error("addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition."), startTransition(addTransitionType.bind(null, type)); - } - function enqueueTask(task) { - if (null === enqueueTaskImpl) try { - var requireString = ("require" + Math.random()).slice(0, 7); - enqueueTaskImpl = (module && module[requireString]).call(module, "timers").setImmediate; - } catch (_err) { - enqueueTaskImpl = function(callback) { - !1 === didWarnAboutMessageChannel && (didWarnAboutMessageChannel = !0, "undefined" === typeof MessageChannel && console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.")); - var channel = new MessageChannel(); - channel.port1.onmessage = callback; - channel.port2.postMessage(void 0); - }; - } - return enqueueTaskImpl(task); - } - function aggregateErrors(errors) { - return 1 < errors.length && "function" === typeof AggregateError ? new AggregateError(errors) : errors[0]; - } - function popActScope(prevActQueue, prevActScopeDepth) { - prevActScopeDepth !== actScopeDepth - 1 && console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "); - actScopeDepth = prevActScopeDepth; - } - function recursivelyFlushAsyncActWork(returnValue, resolve, reject) { - var queue = ReactSharedInternals.actQueue; - if (null !== queue) if (0 !== queue.length) try { - flushActQueue(queue); - enqueueTask(function() { - return recursivelyFlushAsyncActWork(returnValue, resolve, reject); - }); - return; - } catch (error) { - ReactSharedInternals.thrownErrors.push(error); - } - else ReactSharedInternals.actQueue = null; - 0 < ReactSharedInternals.thrownErrors.length ? (queue = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(queue)) : resolve(returnValue); - } - function flushActQueue(queue) { - if (!isFlushing) { - isFlushing = !0; - var i = 0; - try { - for (; i < queue.length; i++) { - var callback = queue[i]; - do { - ReactSharedInternals.didUsePromise = !1; - var continuation = callback(!1); - if (null !== continuation) { - if (ReactSharedInternals.didUsePromise) { - queue[i] = callback; - queue.splice(0, i); - return; - } - callback = continuation; - } else break; - } while (1); - } - queue.length = 0; - } catch (error) { - queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error); - } finally { - isFlushing = !1; - } - } - } - "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); - var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator, didWarnStateUpdateForUnmountedComponent = {}, ReactNoopUpdateQueue = { - isMounted: function() { - return !1; - }, - enqueueForceUpdate: function(publicInstance) { - warnNoop(publicInstance, "forceUpdate"); - }, - enqueueReplaceState: function(publicInstance) { - warnNoop(publicInstance, "replaceState"); - }, - enqueueSetState: function(publicInstance) { - warnNoop(publicInstance, "setState"); - } - }, assign = Object.assign, emptyObject = {}; - Object.freeze(emptyObject); - Component.prototype.isReactComponent = {}; - Component.prototype.setState = function(partialState, callback) { - if ("object" !== typeof partialState && "function" !== typeof partialState && null != partialState) throw Error("takes an object of state variables to update or a function which returns an object of state variables."); - this.updater.enqueueSetState(this, partialState, callback, "setState"); - }; - Component.prototype.forceUpdate = function(callback) { - this.updater.enqueueForceUpdate(this, callback, "forceUpdate"); - }; - var deprecatedAPIs = { - isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."], - replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."] - }; - for (fnName in deprecatedAPIs) deprecatedAPIs.hasOwnProperty(fnName) && defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); - ComponentDummy.prototype = Component.prototype; - deprecatedAPIs = PureComponent.prototype = new ComponentDummy(); - deprecatedAPIs.constructor = PureComponent; - assign(deprecatedAPIs, Component.prototype); - deprecatedAPIs.isPureReactComponent = !0; - var isArrayImpl = Array.isArray, REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = { - H: null, - A: null, - T: null, - S: null, - actQueue: null, - asyncTransitions: 0, - isBatchingLegacy: !1, - didScheduleLegacyUpdate: !1, - didUsePromise: !1, - thrownErrors: [], - getCurrentStack: null, - recentlyCreatedOwnerStacks: 0 - }, hasOwnProperty = Object.prototype.hasOwnProperty, createTask = console.createTask ? console.createTask : function() { - return null; - }; - deprecatedAPIs = { react_stack_bottom_frame: function(callStackForError) { - return callStackForError(); - } }; - var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime; - var didWarnAboutElementRef = {}; - var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(deprecatedAPIs, UnknownOwner)(); - var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner)); - var didWarnAboutMaps = !1, userProvidedKeyEscapeRegex = /\/+/g, reportGlobalError = "function" === typeof reportError ? reportError : function(error) { - if ("object" === typeof window && "function" === typeof window.ErrorEvent) { - var event = new window.ErrorEvent("error", { - bubbles: !0, - cancelable: !0, - message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error), - error - }); - if (!window.dispatchEvent(event)) return; - } else if ("object" === typeof process && "function" === typeof process.emit) { - process.emit("uncaughtException", error); - return; - } - console.error(error); - }, didWarnAboutMessageChannel = !1, enqueueTaskImpl = null, actScopeDepth = 0, didWarnNoAwaitAct = !1, isFlushing = !1, queueSeveralMicrotasks = "function" === typeof queueMicrotask ? function(callback) { - queueMicrotask(function() { - return queueMicrotask(callback); - }); - } : enqueueTask; - deprecatedAPIs = Object.freeze({ - __proto__: null, - c: function(size) { - return resolveDispatcher().useMemoCache(size); - } - }); - var fnName = { - map: mapChildren, - forEach: function(children, forEachFunc, forEachContext) { - mapChildren(children, function() { - forEachFunc.apply(this, arguments); - }, forEachContext); - }, - count: function(children) { - var n = 0; - mapChildren(children, function() { - n++; - }); - return n; - }, - toArray: function(children) { - return mapChildren(children, function(child) { - return child; - }) || []; - }, - only: function(children) { - if (!isValidElement(children)) throw Error("React.Children.only expected to receive a single React element child."); - return children; - } - }; - exports.Activity = REACT_ACTIVITY_TYPE; - exports.Children = fnName; - exports.Component = Component; - exports.Fragment = REACT_FRAGMENT_TYPE; - exports.Profiler = REACT_PROFILER_TYPE; - exports.PureComponent = PureComponent; - exports.StrictMode = REACT_STRICT_MODE_TYPE; - exports.Suspense = REACT_SUSPENSE_TYPE; - exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE; - exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = ReactSharedInternals; - exports.__COMPILER_RUNTIME = deprecatedAPIs; - exports.act = function(callback) { - var prevActQueue = ReactSharedInternals.actQueue, prevActScopeDepth = actScopeDepth; - actScopeDepth++; - var queue = ReactSharedInternals.actQueue = null !== prevActQueue ? prevActQueue : [], didAwaitActCall = !1; - try { - var result = callback(); - } catch (error) { - ReactSharedInternals.thrownErrors.push(error); - } - if (0 < ReactSharedInternals.thrownErrors.length) throw popActScope(prevActQueue, prevActScopeDepth), callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback; - if (null !== result && "object" === typeof result && "function" === typeof result.then) { - var thenable = result; - queueSeveralMicrotasks(function() { - didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);")); - }); - return { then: function(resolve, reject) { - didAwaitActCall = !0; - thenable.then(function(returnValue) { - popActScope(prevActQueue, prevActScopeDepth); - if (0 === prevActScopeDepth) { - try { - flushActQueue(queue), enqueueTask(function() { - return recursivelyFlushAsyncActWork(returnValue, resolve, reject); - }); - } catch (error$0) { - ReactSharedInternals.thrownErrors.push(error$0); - } - if (0 < ReactSharedInternals.thrownErrors.length) { - var _thrownError = aggregateErrors(ReactSharedInternals.thrownErrors); - ReactSharedInternals.thrownErrors.length = 0; - reject(_thrownError); - } - } else resolve(returnValue); - }, function(error) { - popActScope(prevActQueue, prevActScopeDepth); - 0 < ReactSharedInternals.thrownErrors.length ? (error = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, reject(error)) : reject(error); - }); - } }; - } - var returnValue$jscomp$0 = result; - popActScope(prevActQueue, prevActScopeDepth); - 0 === prevActScopeDepth && (flushActQueue(queue), 0 !== queue.length && queueSeveralMicrotasks(function() { - didAwaitActCall || didWarnNoAwaitAct || (didWarnNoAwaitAct = !0, console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)")); - }), ReactSharedInternals.actQueue = null); - if (0 < ReactSharedInternals.thrownErrors.length) throw callback = aggregateErrors(ReactSharedInternals.thrownErrors), ReactSharedInternals.thrownErrors.length = 0, callback; - return { then: function(resolve, reject) { - didAwaitActCall = !0; - 0 === prevActScopeDepth ? (ReactSharedInternals.actQueue = queue, enqueueTask(function() { - return recursivelyFlushAsyncActWork(returnValue$jscomp$0, resolve, reject); - })) : resolve(returnValue$jscomp$0); - } }; - }; - exports.addTransitionType = addTransitionType; - exports.cache = function(fn) { - return function() { - return fn.apply(null, arguments); - }; - }; - exports.cacheSignal = function() { - return null; - }; - exports.captureOwnerStack = function() { - var getCurrentStack = ReactSharedInternals.getCurrentStack; - return null === getCurrentStack ? null : getCurrentStack(); - }; - exports.cloneElement = function(element, config, children) { - if (null === element || void 0 === element) throw Error("The argument must be a React element, but you passed " + element + "."); - var props = assign({}, element.props), key = element.key, owner = element._owner; - if (null != config) { - var JSCompiler_inline_result; - a: { - if (hasOwnProperty.call(config, "ref") && (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(config, "ref").get) && JSCompiler_inline_result.isReactWarning) { - JSCompiler_inline_result = !1; - break a; - } - JSCompiler_inline_result = void 0 !== config.ref; - } - JSCompiler_inline_result && (owner = getOwner()); - hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key); - for (propName in config) !hasOwnProperty.call(config, propName) || "key" === propName || "__self" === propName || "__source" === propName || "ref" === propName && void 0 === config.ref || (props[propName] = config[propName]); - } - var propName = arguments.length - 2; - if (1 === propName) props.children = children; - else if (1 < propName) { - JSCompiler_inline_result = Array(propName); - for (var i = 0; i < propName; i++) JSCompiler_inline_result[i] = arguments[i + 2]; - props.children = JSCompiler_inline_result; - } - props = ReactElement(element.type, key, props, owner, element._debugStack, element._debugTask); - for (key = 2; key < arguments.length; key++) validateChildKeys(arguments[key]); - return props; - }; - exports.createContext = function(defaultValue) { - defaultValue = { - $$typeof: REACT_CONTEXT_TYPE, - _currentValue: defaultValue, - _currentValue2: defaultValue, - _threadCount: 0, - Provider: null, - Consumer: null - }; - defaultValue.Provider = defaultValue; - defaultValue.Consumer = { - $$typeof: REACT_CONSUMER_TYPE, - _context: defaultValue - }; - defaultValue._currentRenderer = null; - defaultValue._currentRenderer2 = null; - return defaultValue; - }; - exports.createElement = function(type, config, children) { - for (var i = 2; i < arguments.length; i++) validateChildKeys(arguments[i]); - var propName; - i = {}; - var key = null; - if (null != config) for (propName in didWarnAboutOldJSXRuntime || !("__self" in config) || "key" in config || (didWarnAboutOldJSXRuntime = !0, console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")), hasValidKey(config) && (checkKeyStringCoercion(config.key), key = "" + config.key), config) hasOwnProperty.call(config, propName) && "key" !== propName && "__self" !== propName && "__source" !== propName && (i[propName] = config[propName]); - var childrenLength = arguments.length - 2; - if (1 === childrenLength) i.children = children; - else if (1 < childrenLength) { - for (var childArray = Array(childrenLength), _i = 0; _i < childrenLength; _i++) childArray[_i] = arguments[_i + 2]; - Object.freeze && Object.freeze(childArray); - i.children = childArray; - } - if (type && type.defaultProps) for (propName in childrenLength = type.defaultProps, childrenLength) void 0 === i[propName] && (i[propName] = childrenLength[propName]); - key && defineKeyPropWarningGetter(i, "function" === typeof type ? type.displayName || type.name || "Unknown" : type); - (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++) ? (childArray = Error.stackTraceLimit, Error.stackTraceLimit = 10, childrenLength = Error("react-stack-top-frame"), Error.stackTraceLimit = childArray) : childrenLength = unknownOwnerDebugStack; - return ReactElement(type, key, i, getOwner(), childrenLength, propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask); - }; - exports.createRef = function() { - var refObject = { current: null }; - Object.seal(refObject); - return refObject; - }; - exports.forwardRef = function(render) { - null != render && render.$$typeof === REACT_MEMO_TYPE ? console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).") : "function" !== typeof render ? console.error("forwardRef requires a render function but was given %s.", null === render ? "null" : typeof render) : 0 !== render.length && 2 !== render.length && console.error("forwardRef render functions accept exactly two parameters: props and ref. %s", 1 === render.length ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined."); - null != render && null != render.defaultProps && console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"); - var elementType = { - $$typeof: REACT_FORWARD_REF_TYPE, - render - }, ownName; - Object.defineProperty(elementType, "displayName", { - enumerable: !1, - configurable: !0, - get: function() { - return ownName; - }, - set: function(name) { - ownName = name; - render.name || render.displayName || (Object.defineProperty(render, "name", { value: name }), render.displayName = name); - } - }); - return elementType; - }; - exports.isValidElement = isValidElement; - exports.lazy = function(ctor) { - ctor = { - _status: -1, - _result: ctor - }; - var lazyType = { - $$typeof: REACT_LAZY_TYPE, - _payload: ctor, - _init: lazyInitializer - }, ioInfo = { - name: "lazy", - start: -1, - end: -1, - value: null, - owner: null, - debugStack: Error("react-stack-top-frame"), - debugTask: console.createTask ? console.createTask("lazy()") : null - }; - ctor._ioInfo = ioInfo; - lazyType._debugInfo = [{ awaited: ioInfo }]; - return lazyType; - }; - exports.memo = function(type, compare) { - type ?? console.error("memo: The first argument must be a component. Instead received: %s", null === type ? "null" : typeof type); - compare = { - $$typeof: REACT_MEMO_TYPE, - type, - compare: void 0 === compare ? null : compare - }; - var ownName; - Object.defineProperty(compare, "displayName", { - enumerable: !1, - configurable: !0, - get: function() { - return ownName; - }, - set: function(name) { - ownName = name; - type.name || type.displayName || (Object.defineProperty(type, "name", { value: name }), type.displayName = name); - } - }); - return compare; - }; - exports.startTransition = startTransition; - exports.unstable_useCacheRefresh = function() { - return resolveDispatcher().useCacheRefresh(); - }; - exports.use = function(usable) { - return resolveDispatcher().use(usable); - }; - exports.useActionState = function(action, initialState, permalink) { - return resolveDispatcher().useActionState(action, initialState, permalink); - }; - exports.useCallback = function(callback, deps) { - return resolveDispatcher().useCallback(callback, deps); - }; - exports.useContext = function(Context) { - var dispatcher = resolveDispatcher(); - Context.$$typeof === REACT_CONSUMER_TYPE && console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"); - return dispatcher.useContext(Context); - }; - exports.useDebugValue = function(value, formatterFn) { - return resolveDispatcher().useDebugValue(value, formatterFn); - }; - exports.useDeferredValue = function(value, initialValue) { - return resolveDispatcher().useDeferredValue(value, initialValue); - }; - exports.useEffect = function(create, deps) { - create ?? console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"); - return resolveDispatcher().useEffect(create, deps); - }; - exports.useEffectEvent = function(callback) { - return resolveDispatcher().useEffectEvent(callback); - }; - exports.useId = function() { - return resolveDispatcher().useId(); - }; - exports.useImperativeHandle = function(ref, create, deps) { - return resolveDispatcher().useImperativeHandle(ref, create, deps); - }; - exports.useInsertionEffect = function(create, deps) { - create ?? console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"); - return resolveDispatcher().useInsertionEffect(create, deps); - }; - exports.useLayoutEffect = function(create, deps) { - create ?? console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"); - return resolveDispatcher().useLayoutEffect(create, deps); - }; - exports.useMemo = function(create, deps) { - return resolveDispatcher().useMemo(create, deps); - }; - exports.useOptimistic = function(passthrough, reducer) { - return resolveDispatcher().useOptimistic(passthrough, reducer); - }; - exports.useReducer = function(reducer, initialArg, init) { - return resolveDispatcher().useReducer(reducer, initialArg, init); - }; - exports.useRef = function(initialValue) { - return resolveDispatcher().useRef(initialValue); - }; - exports.useState = function(initialState) { - return resolveDispatcher().useState(initialState); - }; - exports.useSyncExternalStore = function(subscribe, getSnapshot, getServerSnapshot) { - return resolveDispatcher().useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot); - }; - exports.useTransition = function() { - return resolveDispatcher().useTransition(); - }; - exports.version = "19.3.1"; - "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); - })(); -})); -//#endregion -//#region node_modules/react/index.js -var require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => { - module.exports = require_react_development(); -})); -//#endregion -export { require_react as t }; diff --git a/node_modules/.vite/deps/react-Bk9vEtng.js.map b/node_modules/.vite/deps/react-Bk9vEtng.js.map deleted file mode 100644 index 54739e2..0000000 --- a/node_modules/.vite/deps/react-Bk9vEtng.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"react-Bk9vEtng.js","names":[],"sources":["../../react/cjs/react.development.js","../../react/index.js"],"sourcesContent":["/**\n * @license React\n * react.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function defineDeprecationWarning(methodName, info) {\n Object.defineProperty(Component.prototype, methodName, {\n get: function () {\n console.warn(\n \"%s(...) is deprecated in plain JavaScript React classes. %s\",\n info[0],\n info[1]\n );\n }\n });\n }\n function getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable)\n return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n }\n function warnNoop(publicInstance, callerName) {\n publicInstance =\n ((publicInstance = publicInstance.constructor) &&\n (publicInstance.displayName || publicInstance.name)) ||\n \"ReactClass\";\n var warningKey = publicInstance + \".\" + callerName;\n didWarnStateUpdateForUnmountedComponent[warningKey] ||\n (console.error(\n \"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.\",\n callerName,\n publicInstance\n ),\n (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));\n }\n function Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function ComponentDummy() {}\n function PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n }\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n case REACT_VIEW_TRANSITION_TYPE:\n return \"ViewTransition\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(type, key, props, owner, debugStack, debugTask) {\n var refProp = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== refProp ? refProp : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function cloneAndReplaceKey(oldElement, newKey) {\n newKey = ReactElement(\n oldElement.type,\n newKey,\n oldElement.props,\n oldElement._owner,\n oldElement._debugStack,\n oldElement._debugTask\n );\n oldElement._store &&\n (newKey._store.validated = oldElement._store.validated);\n return newKey;\n }\n function validateChildKeys(node) {\n isValidElement(node)\n ? node._store && (node._store.validated = 1)\n : \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_LAZY_TYPE &&\n (\"fulfilled\" === node._payload.status\n ? isValidElement(node._payload.value) &&\n node._payload.value._store &&\n (node._payload.value._store.validated = 1)\n : node._store && (node._store.validated = 1));\n }\n function isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n }\n function escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n }\n function getElementKey(element, index) {\n return \"object\" === typeof element &&\n null !== element &&\n null != element.key\n ? (checkKeyStringCoercion(element.key), escape(\"\" + element.key))\n : index.toString(36);\n }\n function resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"),\n (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n }\n function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback) {\n invokeCallback = children;\n callback = callback(invokeCallback);\n var childKey =\n \"\" === nameSoFar ? \".\" + getElementKey(invokeCallback, 0) : nameSoFar;\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != childKey &&\n (escapedPrefix =\n childKey.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (null != callback.key &&\n ((invokeCallback && invokeCallback.key === callback.key) ||\n checkKeyStringCoercion(callback.key)),\n (escapedPrefix = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (invokeCallback && invokeCallback.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n childKey\n )),\n \"\" !== nameSoFar &&\n null != invokeCallback &&\n isValidElement(invokeCallback) &&\n null == invokeCallback.key &&\n invokeCallback._store &&\n !invokeCallback._store.validated &&\n (escapedPrefix._store.validated = 2),\n (callback = escapedPrefix)),\n array.push(callback));\n return 1;\n }\n invokeCallback = 0;\n childKey = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = childKey + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n i === children.entries &&\n (didWarnAboutMaps ||\n console.warn(\n \"Using Maps as children is not supported. Use an array of keyed ReactElements instead.\"\n ),\n (didWarnAboutMaps = !0)),\n children = i.call(children),\n i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = childKey + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n }\n function mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n }\n function lazyInitializer(payload) {\n if (-1 === payload._status) {\n var resolveDebugValue = null,\n rejectDebugValue = null,\n ioInfo = payload._ioInfo;\n null != ioInfo &&\n ((ioInfo.start = ioInfo.end = performance.now()),\n (ioInfo.value = new Promise(function (resolve, reject) {\n resolveDebugValue = resolve;\n rejectDebugValue = reject;\n })));\n ioInfo = payload._result;\n var thenable = ioInfo();\n thenable.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 1;\n payload._result = moduleObject;\n var _ioInfo = payload._ioInfo;\n if (null != _ioInfo) {\n _ioInfo.end = performance.now();\n var debugValue =\n null == moduleObject ? void 0 : moduleObject.default;\n resolveDebugValue(debugValue);\n _ioInfo.value.status = \"fulfilled\";\n _ioInfo.value.value = debugValue;\n }\n void 0 === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = moduleObject));\n }\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status) {\n payload._status = 2;\n payload._result = error;\n var _ioInfo2 = payload._ioInfo;\n null != _ioInfo2 &&\n ((_ioInfo2.end = performance.now()),\n _ioInfo2.value.then(noop, noop),\n rejectDebugValue(error),\n (_ioInfo2.value.status = \"rejected\"),\n (_ioInfo2.value.reason = error));\n void 0 === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n }\n );\n ioInfo = payload._ioInfo;\n if (null != ioInfo) {\n var displayName = thenable.displayName;\n \"string\" === typeof displayName && (ioInfo.name = displayName);\n }\n -1 === payload._status &&\n ((payload._status = 0), (payload._result = thenable));\n }\n if (1 === payload._status)\n return (\n (ioInfo = payload._result),\n void 0 === ioInfo &&\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\\n\\nDid you accidentally put curly braces around the import?\",\n ioInfo\n ),\n \"default\" in ioInfo ||\n console.error(\n \"lazy: Expected the result of a dynamic import() call. Instead received: %s\\n\\nYour code should look like: \\n const MyComponent = lazy(() => import('./MyComponent'))\",\n ioInfo\n ),\n ioInfo.default\n );\n throw payload._result;\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n function releaseAsyncTransition() {\n ReactSharedInternals.asyncTransitions--;\n }\n function startTransition(scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n currentTransition.types =\n null !== prevTransition ? prevTransition.types : null;\n currentTransition._updatedFibers = new Set();\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n (ReactSharedInternals.asyncTransitions++,\n returnValue.then(releaseAsyncTransition, releaseAsyncTransition),\n returnValue.then(noop, reportGlobalError));\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null === prevTransition &&\n currentTransition._updatedFibers &&\n ((scope = currentTransition._updatedFibers.size),\n currentTransition._updatedFibers.clear(),\n 10 < scope &&\n console.warn(\n \"Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.\"\n )),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (null !== prevTransition.types &&\n prevTransition.types !== currentTransition.types &&\n console.error(\n \"We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.\"\n ),\n (prevTransition.types = currentTransition.types)),\n (ReactSharedInternals.T = prevTransition);\n }\n }\n function addTransitionType(type) {\n var transition = ReactSharedInternals.T;\n if (null !== transition) {\n var transitionTypes = transition.types;\n null === transitionTypes\n ? (transition.types = [type])\n : -1 === transitionTypes.indexOf(type) && transitionTypes.push(type);\n } else\n 0 === ReactSharedInternals.asyncTransitions &&\n console.error(\n \"addTransitionType can only be called inside a `startTransition()` callback. It must be associated with a specific Transition.\"\n ),\n startTransition(addTransitionType.bind(null, type));\n }\n function enqueueTask(task) {\n if (null === enqueueTaskImpl)\n try {\n var requireString = (\"require\" + Math.random()).slice(0, 7);\n enqueueTaskImpl = (module && module[requireString]).call(\n module,\n \"timers\"\n ).setImmediate;\n } catch (_err) {\n enqueueTaskImpl = function (callback) {\n !1 === didWarnAboutMessageChannel &&\n ((didWarnAboutMessageChannel = !0),\n \"undefined\" === typeof MessageChannel &&\n console.error(\n \"This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.\"\n ));\n var channel = new MessageChannel();\n channel.port1.onmessage = callback;\n channel.port2.postMessage(void 0);\n };\n }\n return enqueueTaskImpl(task);\n }\n function aggregateErrors(errors) {\n return 1 < errors.length && \"function\" === typeof AggregateError\n ? new AggregateError(errors)\n : errors[0];\n }\n function popActScope(prevActQueue, prevActScopeDepth) {\n prevActScopeDepth !== actScopeDepth - 1 &&\n console.error(\n \"You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. \"\n );\n actScopeDepth = prevActScopeDepth;\n }\n function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {\n var queue = ReactSharedInternals.actQueue;\n if (null !== queue)\n if (0 !== queue.length)\n try {\n flushActQueue(queue);\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(returnValue, resolve, reject);\n });\n return;\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n else ReactSharedInternals.actQueue = null;\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(queue))\n : resolve(returnValue);\n }\n function flushActQueue(queue) {\n if (!isFlushing) {\n isFlushing = !0;\n var i = 0;\n try {\n for (; i < queue.length; i++) {\n var callback = queue[i];\n do {\n ReactSharedInternals.didUsePromise = !1;\n var continuation = callback(!1);\n if (null !== continuation) {\n if (ReactSharedInternals.didUsePromise) {\n queue[i] = callback;\n queue.splice(0, i);\n return;\n }\n callback = continuation;\n } else break;\n } while (1);\n }\n queue.length = 0;\n } catch (error) {\n queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);\n } finally {\n isFlushing = !1;\n }\n }\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator,\n didWarnStateUpdateForUnmountedComponent = {},\n ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function (publicInstance) {\n warnNoop(publicInstance, \"forceUpdate\");\n },\n enqueueReplaceState: function (publicInstance) {\n warnNoop(publicInstance, \"replaceState\");\n },\n enqueueSetState: function (publicInstance) {\n warnNoop(publicInstance, \"setState\");\n }\n },\n assign = Object.assign,\n emptyObject = {};\n Object.freeze(emptyObject);\n Component.prototype.isReactComponent = {};\n Component.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n };\n Component.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n };\n var deprecatedAPIs = {\n isMounted: [\n \"isMounted\",\n \"Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.\"\n ],\n replaceState: [\n \"replaceState\",\n \"Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).\"\n ]\n };\n for (fnName in deprecatedAPIs)\n deprecatedAPIs.hasOwnProperty(fnName) &&\n defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);\n ComponentDummy.prototype = Component.prototype;\n deprecatedAPIs = PureComponent.prototype = new ComponentDummy();\n deprecatedAPIs.constructor = PureComponent;\n assign(deprecatedAPIs, Component.prototype);\n deprecatedAPIs.isPureReactComponent = !0;\n var isArrayImpl = Array.isArray,\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals = {\n H: null,\n A: null,\n T: null,\n S: null,\n actQueue: null,\n asyncTransitions: 0,\n isBatchingLegacy: !1,\n didScheduleLegacyUpdate: !1,\n didUsePromise: !1,\n thrownErrors: [],\n getCurrentStack: null,\n recentlyCreatedOwnerStacks: 0\n },\n hasOwnProperty = Object.prototype.hasOwnProperty,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n deprecatedAPIs = {\n react_stack_bottom_frame: function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(\n deprecatedAPIs,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutMaps = !1,\n userProvidedKeyEscapeRegex = /\\/+/g,\n reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n didWarnAboutMessageChannel = !1,\n enqueueTaskImpl = null,\n actScopeDepth = 0,\n didWarnNoAwaitAct = !1,\n isFlushing = !1,\n queueSeveralMicrotasks =\n \"function\" === typeof queueMicrotask\n ? function (callback) {\n queueMicrotask(function () {\n return queueMicrotask(callback);\n });\n }\n : enqueueTask;\n deprecatedAPIs = Object.freeze({\n __proto__: null,\n c: function (size) {\n return resolveDispatcher().useMemoCache(size);\n }\n });\n var fnName = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\n exports.Activity = REACT_ACTIVITY_TYPE;\n exports.Children = fnName;\n exports.Component = Component;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.PureComponent = PureComponent;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;\n exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\n exports.__COMPILER_RUNTIME = deprecatedAPIs;\n exports.act = function (callback) {\n var prevActQueue = ReactSharedInternals.actQueue,\n prevActScopeDepth = actScopeDepth;\n actScopeDepth++;\n var queue = (ReactSharedInternals.actQueue =\n null !== prevActQueue ? prevActQueue : []),\n didAwaitActCall = !1;\n try {\n var result = callback();\n } catch (error) {\n ReactSharedInternals.thrownErrors.push(error);\n }\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n (popActScope(prevActQueue, prevActScopeDepth),\n (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n if (\n null !== result &&\n \"object\" === typeof result &&\n \"function\" === typeof result.then\n ) {\n var thenable = result;\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);\"\n ));\n });\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n thenable.then(\n function (returnValue) {\n popActScope(prevActQueue, prevActScopeDepth);\n if (0 === prevActScopeDepth) {\n try {\n flushActQueue(queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue,\n resolve,\n reject\n );\n });\n } catch (error$0) {\n ReactSharedInternals.thrownErrors.push(error$0);\n }\n if (0 < ReactSharedInternals.thrownErrors.length) {\n var _thrownError = aggregateErrors(\n ReactSharedInternals.thrownErrors\n );\n ReactSharedInternals.thrownErrors.length = 0;\n reject(_thrownError);\n }\n } else resolve(returnValue);\n },\n function (error) {\n popActScope(prevActQueue, prevActScopeDepth);\n 0 < ReactSharedInternals.thrownErrors.length\n ? ((error = aggregateErrors(\n ReactSharedInternals.thrownErrors\n )),\n (ReactSharedInternals.thrownErrors.length = 0),\n reject(error))\n : reject(error);\n }\n );\n }\n };\n }\n var returnValue$jscomp$0 = result;\n popActScope(prevActQueue, prevActScopeDepth);\n 0 === prevActScopeDepth &&\n (flushActQueue(queue),\n 0 !== queue.length &&\n queueSeveralMicrotasks(function () {\n didAwaitActCall ||\n didWarnNoAwaitAct ||\n ((didWarnNoAwaitAct = !0),\n console.error(\n \"A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\\n\\nawait act(() => ...)\"\n ));\n }),\n (ReactSharedInternals.actQueue = null));\n if (0 < ReactSharedInternals.thrownErrors.length)\n throw (\n ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),\n (ReactSharedInternals.thrownErrors.length = 0),\n callback)\n );\n return {\n then: function (resolve, reject) {\n didAwaitActCall = !0;\n 0 === prevActScopeDepth\n ? ((ReactSharedInternals.actQueue = queue),\n enqueueTask(function () {\n return recursivelyFlushAsyncActWork(\n returnValue$jscomp$0,\n resolve,\n reject\n );\n }))\n : resolve(returnValue$jscomp$0);\n }\n };\n };\n exports.addTransitionType = addTransitionType;\n exports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n };\n exports.cacheSignal = function () {\n return null;\n };\n exports.captureOwnerStack = function () {\n var getCurrentStack = ReactSharedInternals.getCurrentStack;\n return null === getCurrentStack ? null : getCurrentStack();\n };\n exports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" +\n element +\n \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = element._owner;\n if (null != config) {\n var JSCompiler_inline_result;\n a: {\n if (\n hasOwnProperty.call(config, \"ref\") &&\n (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(\n config,\n \"ref\"\n ).get) &&\n JSCompiler_inline_result.isReactWarning\n ) {\n JSCompiler_inline_result = !1;\n break a;\n }\n JSCompiler_inline_result = void 0 !== config.ref;\n }\n JSCompiler_inline_result && (owner = getOwner());\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key));\n for (propName in config)\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n }\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n JSCompiler_inline_result = Array(propName);\n for (var i = 0; i < propName; i++)\n JSCompiler_inline_result[i] = arguments[i + 2];\n props.children = JSCompiler_inline_result;\n }\n props = ReactElement(\n element.type,\n key,\n props,\n owner,\n element._debugStack,\n element._debugTask\n );\n for (key = 2; key < arguments.length; key++)\n validateChildKeys(arguments[key]);\n return props;\n };\n exports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n defaultValue._currentRenderer = null;\n defaultValue._currentRenderer2 = null;\n return defaultValue;\n };\n exports.createElement = function (type, config, children) {\n for (var i = 2; i < arguments.length; i++)\n validateChildKeys(arguments[i]);\n var propName;\n i = {};\n var key = null;\n if (null != config)\n for (propName in (didWarnAboutOldJSXRuntime ||\n !(\"__self\" in config) ||\n \"key\" in config ||\n ((didWarnAboutOldJSXRuntime = !0),\n console.warn(\n \"Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform\"\n )),\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (key = \"\" + config.key)),\n config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (i[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) i.children = children;\n else if (1 < childrenLength) {\n for (\n var childArray = Array(childrenLength), _i = 0;\n _i < childrenLength;\n _i++\n )\n childArray[_i] = arguments[_i + 2];\n Object.freeze && Object.freeze(childArray);\n i.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === i[propName] && (i[propName] = childrenLength[propName]);\n key &&\n defineKeyPropWarningGetter(\n i,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n (propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)\n ? ((childArray = Error.stackTraceLimit),\n (Error.stackTraceLimit = 10),\n (childrenLength = Error(\"react-stack-top-frame\")),\n (Error.stackTraceLimit = childArray))\n : (childrenLength = unknownOwnerDebugStack);\n return ReactElement(\n type,\n key,\n i,\n getOwner(),\n childrenLength,\n propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.createRef = function () {\n var refObject = { current: null };\n Object.seal(refObject);\n return refObject;\n };\n exports.forwardRef = function (render) {\n null != render && render.$$typeof === REACT_MEMO_TYPE\n ? console.error(\n \"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).\"\n )\n : \"function\" !== typeof render\n ? console.error(\n \"forwardRef requires a render function but was given %s.\",\n null === render ? \"null\" : typeof render\n )\n : 0 !== render.length &&\n 2 !== render.length &&\n console.error(\n \"forwardRef render functions accept exactly two parameters: props and ref. %s\",\n 1 === render.length\n ? \"Did you forget to use the ref parameter?\"\n : \"Any additional parameter will be undefined.\"\n );\n null != render &&\n null != render.defaultProps &&\n console.error(\n \"forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?\"\n );\n var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },\n ownName;\n Object.defineProperty(elementType, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n render.name ||\n render.displayName ||\n (Object.defineProperty(render, \"name\", { value: name }),\n (render.displayName = name));\n }\n });\n return elementType;\n };\n exports.isValidElement = isValidElement;\n exports.lazy = function (ctor) {\n ctor = { _status: -1, _result: ctor };\n var lazyType = {\n $$typeof: REACT_LAZY_TYPE,\n _payload: ctor,\n _init: lazyInitializer\n },\n ioInfo = {\n name: \"lazy\",\n start: -1,\n end: -1,\n value: null,\n owner: null,\n debugStack: Error(\"react-stack-top-frame\"),\n debugTask: console.createTask ? console.createTask(\"lazy()\") : null\n };\n ctor._ioInfo = ioInfo;\n lazyType._debugInfo = [{ awaited: ioInfo }];\n return lazyType;\n };\n exports.memo = function (type, compare) {\n null == type &&\n console.error(\n \"memo: The first argument must be a component. Instead received: %s\",\n null === type ? \"null\" : typeof type\n );\n compare = {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n var ownName;\n Object.defineProperty(compare, \"displayName\", {\n enumerable: !1,\n configurable: !0,\n get: function () {\n return ownName;\n },\n set: function (name) {\n ownName = name;\n type.name ||\n type.displayName ||\n (Object.defineProperty(type, \"name\", { value: name }),\n (type.displayName = name));\n }\n });\n return compare;\n };\n exports.startTransition = startTransition;\n exports.unstable_useCacheRefresh = function () {\n return resolveDispatcher().useCacheRefresh();\n };\n exports.use = function (usable) {\n return resolveDispatcher().use(usable);\n };\n exports.useActionState = function (action, initialState, permalink) {\n return resolveDispatcher().useActionState(\n action,\n initialState,\n permalink\n );\n };\n exports.useCallback = function (callback, deps) {\n return resolveDispatcher().useCallback(callback, deps);\n };\n exports.useContext = function (Context) {\n var dispatcher = resolveDispatcher();\n Context.$$typeof === REACT_CONSUMER_TYPE &&\n console.error(\n \"Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?\"\n );\n return dispatcher.useContext(Context);\n };\n exports.useDebugValue = function (value, formatterFn) {\n return resolveDispatcher().useDebugValue(value, formatterFn);\n };\n exports.useDeferredValue = function (value, initialValue) {\n return resolveDispatcher().useDeferredValue(value, initialValue);\n };\n exports.useEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useEffect(create, deps);\n };\n exports.useEffectEvent = function (callback) {\n return resolveDispatcher().useEffectEvent(callback);\n };\n exports.useId = function () {\n return resolveDispatcher().useId();\n };\n exports.useImperativeHandle = function (ref, create, deps) {\n return resolveDispatcher().useImperativeHandle(ref, create, deps);\n };\n exports.useInsertionEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useInsertionEffect(create, deps);\n };\n exports.useLayoutEffect = function (create, deps) {\n null == create &&\n console.warn(\n \"React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?\"\n );\n return resolveDispatcher().useLayoutEffect(create, deps);\n };\n exports.useMemo = function (create, deps) {\n return resolveDispatcher().useMemo(create, deps);\n };\n exports.useOptimistic = function (passthrough, reducer) {\n return resolveDispatcher().useOptimistic(passthrough, reducer);\n };\n exports.useReducer = function (reducer, initialArg, init) {\n return resolveDispatcher().useReducer(reducer, initialArg, init);\n };\n exports.useRef = function (initialValue) {\n return resolveDispatcher().useRef(initialValue);\n };\n exports.useState = function (initialState) {\n return resolveDispatcher().useState(initialState);\n };\n exports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n ) {\n return resolveDispatcher().useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n };\n exports.useTransition = function () {\n return resolveDispatcher().useTransition();\n };\n exports.version = \"19.3.1\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n"],"mappings":"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"} \ No newline at end of file diff --git a/node_modules/.vite/deps/react-dom-f6U-7Wx1.js b/node_modules/.vite/deps/react-dom-f6U-7Wx1.js deleted file mode 100644 index cbc5fb8..0000000 --- a/node_modules/.vite/deps/react-dom-f6U-7Wx1.js +++ /dev/null @@ -1,197 +0,0 @@ -import { t as __commonJSMin } from "./rolldown-runtime-Bk_YeHJf.js"; -import { t as require_react } from "./react-Bk9vEtng.js"; -//#region node_modules/react-dom/cjs/react-dom.development.js -/** -* @license React -* react-dom.development.js -* -* Copyright (c) Meta Platforms, Inc. and affiliates. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ -var require_react_dom_development = /* @__PURE__ */ __commonJSMin(((exports) => { - (function() { - function noop() {} - function testStringCoercion(value) { - return "" + value; - } - function createPortal$1(children, containerInfo, implementation) { - var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null; - if (null == key) key = null; - else if (key === REACT_OPTIMISTIC_KEY) key = REACT_OPTIMISTIC_KEY; - else { - try { - testStringCoercion(key); - var JSCompiler_inline_result = !1; - } catch (e) { - JSCompiler_inline_result = !0; - } - JSCompiler_inline_result && (console.error("The provided key is an unsupported type %s. This value must be coerced to a string before using it here.", "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"), testStringCoercion(key)); - key = "" + key; - } - return { - $$typeof: REACT_PORTAL_TYPE, - key, - children, - containerInfo, - implementation - }; - } - function getCrossOriginStringAs(as, input) { - if ("font" === as) return ""; - if ("string" === typeof input) return "use-credentials" === input ? input : ""; - } - function getValueDescriptorExpectingObjectForWarning(thing) { - return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "something with type \"" + typeof thing + "\""; - } - function getValueDescriptorExpectingEnumForWarning(thing) { - return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : "string" === typeof thing ? JSON.stringify(thing) : "number" === typeof thing ? "`" + thing + "`" : "something with type \"" + typeof thing + "\""; - } - function resolveDispatcher() { - var dispatcher = ReactSharedInternals.H; - null === dispatcher && console.error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."); - return dispatcher; - } - "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()); - var React = require_react(), Internals = { - d: { - f: noop, - r: function() { - throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React."); - }, - D: noop, - C: noop, - L: noop, - m: noop, - X: noop, - S: noop, - M: noop - }, - p: 0, - findDOMNode: null - }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_RECOVERABLE_TYPE = Symbol.for("react.recoverable"), REACT_OPTIMISTIC_KEY = Symbol.for("react.optimistic_key"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE; - "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"); - exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals; - exports.browser = function(reason) { - return { - $$typeof: REACT_RECOVERABLE_TYPE, - _reason: reason - }; - }; - exports.createPortal = function(children, container) { - var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null; - if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType) throw Error("Target container is not a DOM element."); - return createPortal$1(children, container, null, key); - }; - exports.flushSync = function(fn) { - var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p; - try { - if (ReactSharedInternals.T = null, Internals.p = 2, fn) return fn(); - } finally { - ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."); - } - }; - exports.preconnect = function(href, options) { - "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.", getValueDescriptorExpectingEnumForWarning(options)) : null != options && "string" !== typeof options.crossOrigin && console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.", getValueDescriptorExpectingObjectForWarning(options.crossOrigin)) : console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", getValueDescriptorExpectingObjectForWarning(href)); - "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options)); - }; - exports.prefetchDNS = function(href) { - if ("string" !== typeof href || !href) console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", getValueDescriptorExpectingObjectForWarning(href)); - else if (1 < arguments.length) { - var options = arguments[1]; - "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", getValueDescriptorExpectingEnumForWarning(options)) : console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.", getValueDescriptorExpectingEnumForWarning(options)); - } - "string" === typeof href && Internals.d.D(href); - }; - exports.preinit = function(href, options) { - "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.", getValueDescriptorExpectingEnumForWarning(options)) : "style" !== options.as && "script" !== options.as && console.error("ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".", getValueDescriptorExpectingEnumForWarning(options.as)) : console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.", getValueDescriptorExpectingObjectForWarning(href)); - if ("string" === typeof href && options && "string" === typeof options.as) { - var as = options.as, crossOrigin = getCrossOriginStringAs(as, options.crossOrigin), integrity = "string" === typeof options.integrity ? options.integrity : void 0, fetchPriority = "string" === typeof options.fetchPriority ? options.fetchPriority : void 0; - "style" === as ? Internals.d.S(href, "string" === typeof options.precedence ? options.precedence : void 0, { - crossOrigin, - integrity, - fetchPriority - }) : "script" === as && Internals.d.X(href, { - crossOrigin, - integrity, - fetchPriority, - nonce: "string" === typeof options.nonce ? options.nonce : void 0 - }); - } - }; - exports.preinitModule = function(href, options) { - var encountered = ""; - "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."); - void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "script" !== options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + "."); - if (encountered) console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s", encountered); - else switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) { - case "script": break; - default: encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error("ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)", encountered, href); - } - if ("string" === typeof href) if ("object" === typeof options && null !== options) { - if (null == options.as || "script" === options.as) encountered = getCrossOriginStringAs(options.as, options.crossOrigin), Internals.d.M(href, { - crossOrigin: encountered, - integrity: "string" === typeof options.integrity ? options.integrity : void 0, - nonce: "string" === typeof options.nonce ? options.nonce : void 0, - fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0 - }); - } else options ?? Internals.d.M(href); - }; - exports.preload = function(href, options) { - var encountered = ""; - "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."); - null == options || "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : "string" === typeof options.as && options.as || (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + "."); - encountered && console.error("ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `` tag.%s", encountered); - if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) { - encountered = options.as; - var crossOrigin = getCrossOriginStringAs(encountered, options.crossOrigin); - Internals.d.L(href, encountered, { - crossOrigin, - integrity: "string" === typeof options.integrity ? options.integrity : void 0, - nonce: "string" === typeof options.nonce ? options.nonce : void 0, - type: "string" === typeof options.type ? options.type : void 0, - fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0, - referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0, - imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0, - imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0, - media: "string" === typeof options.media ? options.media : void 0 - }); - } - }; - exports.preloadModule = function(href, options) { - var encountered = ""; - "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + "."); - void 0 !== options && "object" !== typeof options ? encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + "." : options && "as" in options && "string" !== typeof options.as && (encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + "."); - encountered && console.error("ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `` tag.%s", encountered); - "string" === typeof href && (options ? (encountered = getCrossOriginStringAs(options.as, options.crossOrigin), Internals.d.m(href, { - as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0, - crossOrigin: encountered, - integrity: "string" === typeof options.integrity ? options.integrity : void 0, - nonce: "string" === typeof options.nonce ? options.nonce : void 0, - fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0 - })) : Internals.d.m(href)); - }; - exports.requestFormReset = function(form) { - Internals.d.r(form); - }; - exports.unstable_batchedUpdates = function(fn, a) { - return fn(a); - }; - exports.useFormState = function(action, initialState, permalink) { - return resolveDispatcher().useFormState(action, initialState, permalink); - }; - exports.useFormStatus = function() { - return resolveDispatcher().useHostTransitionStatus(); - }; - exports.version = "19.3.1"; - "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error()); - })(); -})); -//#endregion -//#region node_modules/react-dom/index.js -var require_react_dom = /* @__PURE__ */ __commonJSMin(((exports, module) => { - module.exports = require_react_dom_development(); -})); -//#endregion -export { require_react_dom as t }; diff --git a/node_modules/.vite/deps/react-dom-f6U-7Wx1.js.map b/node_modules/.vite/deps/react-dom-f6U-7Wx1.js.map deleted file mode 100644 index 4ea61d8..0000000 --- a/node_modules/.vite/deps/react-dom-f6U-7Wx1.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"react-dom-f6U-7Wx1.js","names":[],"sources":["../../react-dom/cjs/react-dom.development.js","../../react-dom/index.js"],"sourcesContent":["/**\n * @license React\n * react-dom.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function noop() {}\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n if (null == key) key = null;\n else if (key === REACT_OPTIMISTIC_KEY) key = REACT_OPTIMISTIC_KEY;\n else {\n try {\n testStringCoercion(key);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n JSCompiler_inline_result &&\n (console.error(\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n key[Symbol.toStringTag]) ||\n key.constructor.name ||\n \"Object\"\n ),\n testStringCoercion(key));\n key = \"\" + key;\n }\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n }\n function getCrossOriginStringAs(as, input) {\n if (\"font\" === as) return \"\";\n if (\"string\" === typeof input)\n return \"use-credentials\" === input ? input : \"\";\n }\n function getValueDescriptorExpectingObjectForWarning(thing) {\n return null === thing\n ? \"`null`\"\n : void 0 === thing\n ? \"`undefined`\"\n : \"\" === thing\n ? \"an empty string\"\n : 'something with type \"' + typeof thing + '\"';\n }\n function getValueDescriptorExpectingEnumForWarning(thing) {\n return null === thing\n ? \"`null`\"\n : void 0 === thing\n ? \"`undefined`\"\n : \"\" === thing\n ? \"an empty string\"\n : \"string\" === typeof thing\n ? JSON.stringify(thing)\n : \"number\" === typeof thing\n ? \"`\" + thing + \"`\"\n : 'something with type \"' + typeof thing + '\"';\n }\n function resolveDispatcher() {\n var dispatcher = ReactSharedInternals.H;\n null === dispatcher &&\n console.error(\n \"Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\\n1. You might have mismatching versions of React and the renderer (such as React DOM)\\n2. You might be breaking the Rules of Hooks\\n3. You might have more than one copy of React in the same app\\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.\"\n );\n return dispatcher;\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n Internals = {\n d: {\n f: noop,\n r: function () {\n throw Error(\n \"Invalid form element. requestFormReset must be passed a form that was rendered by React.\"\n );\n },\n D: noop,\n C: noop,\n L: noop,\n m: noop,\n X: noop,\n S: noop,\n M: noop\n },\n p: 0,\n findDOMNode: null\n },\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_RECOVERABLE_TYPE = Symbol.for(\"react.recoverable\"),\n REACT_OPTIMISTIC_KEY = Symbol.for(\"react.optimistic_key\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\n (\"function\" === typeof Map &&\n null != Map.prototype &&\n \"function\" === typeof Map.prototype.forEach &&\n \"function\" === typeof Set &&\n null != Set.prototype &&\n \"function\" === typeof Set.prototype.clear &&\n \"function\" === typeof Set.prototype.forEach) ||\n console.error(\n \"React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills\"\n );\n exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n Internals;\n exports.browser = function (reason) {\n return { $$typeof: REACT_RECOVERABLE_TYPE, _reason: reason };\n };\n exports.createPortal = function (children, container) {\n var key =\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n if (\n !container ||\n (1 !== container.nodeType &&\n 9 !== container.nodeType &&\n 11 !== container.nodeType)\n )\n throw Error(\"Target container is not a DOM element.\");\n return createPortal$1(children, container, null, key);\n };\n exports.flushSync = function (fn) {\n var previousTransition = ReactSharedInternals.T,\n previousUpdatePriority = Internals.p;\n try {\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))\n return fn();\n } finally {\n (ReactSharedInternals.T = previousTransition),\n (Internals.p = previousUpdatePriority),\n Internals.d.f() &&\n console.error(\n \"flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.\"\n );\n }\n };\n exports.preconnect = function (href, options) {\n \"string\" === typeof href && href\n ? null != options && \"object\" !== typeof options\n ? console.error(\n \"ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.\",\n getValueDescriptorExpectingEnumForWarning(options)\n )\n : null != options &&\n \"string\" !== typeof options.crossOrigin &&\n console.error(\n \"ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.\",\n getValueDescriptorExpectingObjectForWarning(options.crossOrigin)\n )\n : console.error(\n \"ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n getValueDescriptorExpectingObjectForWarning(href)\n );\n \"string\" === typeof href &&\n (options\n ? ((options = options.crossOrigin),\n (options =\n \"string\" === typeof options\n ? \"use-credentials\" === options\n ? options\n : \"\"\n : void 0))\n : (options = null),\n Internals.d.C(href, options));\n };\n exports.prefetchDNS = function (href) {\n if (\"string\" !== typeof href || !href)\n console.error(\n \"ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n getValueDescriptorExpectingObjectForWarning(href)\n );\n else if (1 < arguments.length) {\n var options = arguments[1];\n \"object\" === typeof options && options.hasOwnProperty(\"crossOrigin\")\n ? console.error(\n \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n getValueDescriptorExpectingEnumForWarning(options)\n )\n : console.error(\n \"ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.\",\n getValueDescriptorExpectingEnumForWarning(options)\n );\n }\n \"string\" === typeof href && Internals.d.D(href);\n };\n exports.preinit = function (href, options) {\n \"string\" === typeof href && href\n ? null == options || \"object\" !== typeof options\n ? console.error(\n \"ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.\",\n getValueDescriptorExpectingEnumForWarning(options)\n )\n : \"style\" !== options.as &&\n \"script\" !== options.as &&\n console.error(\n 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are \"style\" and \"script\".',\n getValueDescriptorExpectingEnumForWarning(options.as)\n )\n : console.error(\n \"ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.\",\n getValueDescriptorExpectingObjectForWarning(href)\n );\n if (\n \"string\" === typeof href &&\n options &&\n \"string\" === typeof options.as\n ) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n integrity =\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n fetchPriority =\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0;\n \"style\" === as\n ? Internals.d.S(\n href,\n \"string\" === typeof options.precedence\n ? options.precedence\n : void 0,\n {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n }\n )\n : \"script\" === as &&\n Internals.d.X(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n };\n exports.preinitModule = function (href, options) {\n var encountered = \"\";\n (\"string\" === typeof href && href) ||\n (encountered +=\n \" The `href` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(href) +\n \".\");\n void 0 !== options && \"object\" !== typeof options\n ? (encountered +=\n \" The `options` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options) +\n \".\")\n : options &&\n \"as\" in options &&\n \"script\" !== options.as &&\n (encountered +=\n \" The `as` option encountered was \" +\n getValueDescriptorExpectingEnumForWarning(options.as) +\n \".\");\n if (encountered)\n console.error(\n \"ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s\",\n encountered\n );\n else\n switch (\n ((encountered =\n options && \"string\" === typeof options.as ? options.as : \"script\"),\n encountered)\n ) {\n case \"script\":\n break;\n default:\n (encountered =\n getValueDescriptorExpectingEnumForWarning(encountered)),\n console.error(\n 'ReactDOM.preinitModule(): Currently the only supported \"as\" type for this function is \"script\" but received \"%s\" instead. This warning was generated for `href` \"%s\". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',\n encountered,\n href\n );\n }\n if (\"string\" === typeof href)\n if (\"object\" === typeof options && null !== options) {\n if (null == options.as || \"script\" === options.as)\n (encountered = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n )),\n Internals.d.M(href, {\n crossOrigin: encountered,\n integrity:\n \"string\" === typeof options.integrity\n ? options.integrity\n : void 0,\n nonce:\n \"string\" === typeof options.nonce ? options.nonce : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0\n });\n } else null == options && Internals.d.M(href);\n };\n exports.preload = function (href, options) {\n var encountered = \"\";\n (\"string\" === typeof href && href) ||\n (encountered +=\n \" The `href` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(href) +\n \".\");\n null == options || \"object\" !== typeof options\n ? (encountered +=\n \" The `options` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options) +\n \".\")\n : (\"string\" === typeof options.as && options.as) ||\n (encountered +=\n \" The `as` option encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options.as) +\n \".\");\n encountered &&\n console.error(\n 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `` tag.%s',\n encountered\n );\n if (\n \"string\" === typeof href &&\n \"object\" === typeof options &&\n null !== options &&\n \"string\" === typeof options.as\n ) {\n encountered = options.as;\n var crossOrigin = getCrossOriginStringAs(\n encountered,\n options.crossOrigin\n );\n Internals.d.L(href, encountered, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n type: \"string\" === typeof options.type ? options.type : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0,\n referrerPolicy:\n \"string\" === typeof options.referrerPolicy\n ? options.referrerPolicy\n : void 0,\n imageSrcSet:\n \"string\" === typeof options.imageSrcSet\n ? options.imageSrcSet\n : void 0,\n imageSizes:\n \"string\" === typeof options.imageSizes\n ? options.imageSizes\n : void 0,\n media: \"string\" === typeof options.media ? options.media : void 0\n });\n }\n };\n exports.preloadModule = function (href, options) {\n var encountered = \"\";\n (\"string\" === typeof href && href) ||\n (encountered +=\n \" The `href` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(href) +\n \".\");\n void 0 !== options && \"object\" !== typeof options\n ? (encountered +=\n \" The `options` argument encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options) +\n \".\")\n : options &&\n \"as\" in options &&\n \"string\" !== typeof options.as &&\n (encountered +=\n \" The `as` option encountered was \" +\n getValueDescriptorExpectingObjectForWarning(options.as) +\n \".\");\n encountered &&\n console.error(\n 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `` tag.%s',\n encountered\n );\n \"string\" === typeof href &&\n (options\n ? ((encountered = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n )),\n Internals.d.m(href, {\n as:\n \"string\" === typeof options.as && \"script\" !== options.as\n ? options.as\n : void 0,\n crossOrigin: encountered,\n integrity:\n \"string\" === typeof options.integrity\n ? options.integrity\n : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0\n }))\n : Internals.d.m(href));\n };\n exports.requestFormReset = function (form) {\n Internals.d.r(form);\n };\n exports.unstable_batchedUpdates = function (fn, a) {\n return fn(a);\n };\n exports.useFormState = function (action, initialState, permalink) {\n return resolveDispatcher().useFormState(action, initialState, permalink);\n };\n exports.useFormStatus = function () {\n return resolveDispatcher().useHostTransitionStatus();\n };\n exports.version = \"19.3.1\";\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n"],"mappings":"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"} \ No newline at end of file diff --git a/node_modules/.vite/deps/react-dom.js b/node_modules/.vite/deps/react-dom.js deleted file mode 100644 index 2058e65..0000000 --- a/node_modules/.vite/deps/react-dom.js +++ /dev/null @@ -1,2 +0,0 @@ -import { t as require_react_dom } from "./react-dom-f6U-7Wx1.js"; -export default require_react_dom(); diff --git a/node_modules/.vite/deps/react-dom_client.js b/node_modules/.vite/deps/react-dom_client.js deleted file mode 100644 index 6d2eaca..0000000 --- a/node_modules/.vite/deps/react-dom_client.js +++ /dev/null @@ -1,15603 +0,0 @@ -import { t as __commonJSMin } from "./rolldown-runtime-Bk_YeHJf.js"; -import { t as require_react } from "./react-Bk9vEtng.js"; -import { t as require_react_dom } from "./react-dom-f6U-7Wx1.js"; -import { t as require_scheduler } from "./scheduler-B49edKHR.js"; -//#region node_modules/react-dom/cjs/react-dom-client.development.js -/** -* @license React -* react-dom-client.development.js -* -* Copyright (c) Meta Platforms, Inc. and affiliates. -* -* This source code is licensed under the MIT license found in the -* LICENSE file in the root directory of this source tree. -*/ -var require_react_dom_client_development = /* @__PURE__ */ __commonJSMin(((exports) => { - (function() { - function findHook(fiber, id) { - for (fiber = fiber.memoizedState; null !== fiber && 0 < id;) fiber = fiber.next, id--; - return fiber; - } - function copyWithSetImpl(obj, path, index, value) { - if (index >= path.length) return value; - var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj); - updated[key] = copyWithSetImpl(obj[key], path, index + 1, value); - return updated; - } - function copyWithRename(obj, oldPath, newPath) { - if (oldPath.length !== newPath.length) console.warn("copyWithRename() expects paths of the same length"); - else { - for (var i = 0; i < newPath.length - 1; i++) if (oldPath[i] !== newPath[i]) { - console.warn("copyWithRename() expects paths to be the same except for the deepest key"); - return; - } - return copyWithRenameImpl(obj, oldPath, newPath, 0); - } - } - function copyWithRenameImpl(obj, oldPath, newPath, index) { - var oldKey = oldPath[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj); - index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(obj[oldKey], oldPath, newPath, index + 1); - return updated; - } - function copyWithDeleteImpl(obj, path, index) { - var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj); - if (index + 1 === path.length) return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated; - updated[key] = copyWithDeleteImpl(obj[key], path, index + 1); - return updated; - } - function shouldSuspendImpl() { - return !1; - } - function shouldErrorImpl() { - return null; - } - function warnInvalidHookAccess() { - console.error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks"); - } - function warnInvalidContextAccess() { - console.error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo()."); - } - function noop() {} - function warnForMissingKey() {} - function setToSortedString(set) { - var array = []; - set.forEach(function(value) { - array.push(value); - }); - return array.sort().join(", "); - } - function createFiber(tag, pendingProps, key, mode) { - return new FiberNode(tag, pendingProps, key, mode); - } - function scheduleRoot(root, element) { - root.context === emptyContextObject && (updateContainerImpl(root.current, 2, element, root, null, null), flushSyncWork$1()); - } - function scheduleRefresh(root, update) { - if (null !== resolveFamily) { - var staleFamilies = update.staleFamilies; - update = update.updatedFamilies; - flushPendingEffects(); - scheduleFibersWithFamiliesRecursively(root.current, update, staleFamilies); - flushSyncWork$1(); - } - } - function setRefreshHandler(handler) { - resolveFamily = handler; - } - function isValidContainer(node) { - return !(!node || 1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType); - } - function getNearestMountedFiber(fiber) { - for (var node = fiber, nextNode = node; nextNode && !nextNode.alternate;) node = nextNode, 0 !== (node.flags & 4098) && (fiber = node.return), nextNode = node.return; - for (; node.return;) node = node.return; - return 3 === node.tag ? fiber : null; - } - function getSuspenseInstanceFromFiber(fiber) { - if (13 === fiber.tag) { - var suspenseState = fiber.memoizedState; - null === suspenseState && (fiber = fiber.alternate, null !== fiber && (suspenseState = fiber.memoizedState)); - if (null !== suspenseState) return suspenseState.dehydrated; - } - return null; - } - function getActivityInstanceFromFiber(fiber) { - if (31 === fiber.tag) { - var activityState = fiber.memoizedState; - null === activityState && (fiber = fiber.alternate, null !== fiber && (activityState = fiber.memoizedState)); - if (null !== activityState) return activityState.dehydrated; - } - return null; - } - function assertIsMounted(fiber) { - if (getNearestMountedFiber(fiber) !== fiber) throw Error("Unable to find node on an unmounted component."); - } - function findCurrentFiberUsingSlowPath(fiber) { - var alternate = fiber.alternate; - if (!alternate) { - alternate = getNearestMountedFiber(fiber); - if (null === alternate) throw Error("Unable to find node on an unmounted component."); - return alternate !== fiber ? null : fiber; - } - for (var a = fiber, b = alternate;;) { - var parentA = a.return; - if (null === parentA) break; - var parentB = parentA.alternate; - if (null === parentB) { - b = parentA.return; - if (null !== b) { - a = b; - continue; - } - break; - } - if (parentA.child === parentB.child) { - for (parentB = parentA.child; parentB;) { - if (parentB === a) return assertIsMounted(parentA), fiber; - if (parentB === b) return assertIsMounted(parentA), alternate; - parentB = parentB.sibling; - } - throw Error("Unable to find node on an unmounted component."); - } - if (a.return !== b.return) a = parentA, b = parentB; - else { - for (var didFindChild = !1, _child = parentA.child; _child;) { - if (_child === a) { - didFindChild = !0; - a = parentA; - b = parentB; - break; - } - if (_child === b) { - didFindChild = !0; - b = parentA; - a = parentB; - break; - } - _child = _child.sibling; - } - if (!didFindChild) { - for (_child = parentB.child; _child;) { - if (_child === a) { - didFindChild = !0; - a = parentB; - b = parentA; - break; - } - if (_child === b) { - didFindChild = !0; - b = parentB; - a = parentA; - break; - } - _child = _child.sibling; - } - if (!didFindChild) throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."); - } - } - if (a.alternate !== b) throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."); - } - if (3 !== a.tag) throw Error("Unable to find node on an unmounted component."); - return a.stateNode.current === a ? fiber : alternate; - } - function findCurrentHostFiberImpl(node) { - var tag = node.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node; - for (node = node.child; null !== node;) { - tag = findCurrentHostFiberImpl(node); - if (null !== tag) return tag; - node = node.sibling; - } - return null; - } - function traverseFragmentInstancesAndTextInstances(fragmentFiber, fn, a, b, c) { - traverseVisibleInstancesAndTextInstances(fragmentFiber.child, !1, fn, a, b, c); - } - function traverseVisibleInstancesAndTextInstances(child, searchWithinHosts, fn, a, b, c) { - for (; null !== child;) { - if ((5 === child.tag || 27 === child.tag || 6 === child.tag) && fn(child, a, b, c) || (22 !== child.tag || null === child.memoizedState) && (searchWithinHosts || 5 !== child.tag && 27 !== child.tag) && traverseVisibleInstancesAndTextInstances(child.child, searchWithinHosts, fn, a, b, c)) return !0; - child = child.sibling; - } - return !1; - } - function getFragmentParentInstanceOrContainerFiber(fiber) { - for (fiber = fiber.return; null !== fiber;) { - if (3 === fiber.tag || 5 === fiber.tag || 27 === fiber.tag) return fiber; - fiber = fiber.return; - } - return null; - } - function fiberIsPortaledIntoHost(fiber) { - var foundPortalParent = !1; - for (fiber = fiber.return; null !== fiber;) { - 4 === fiber.tag && (foundPortalParent = !0); - if (3 === fiber.tag || 5 === fiber.tag || 27 === fiber.tag) break; - fiber = fiber.return; - } - return foundPortalParent; - } - function getFragmentInstanceOrTextInstanceSiblings(fiber) { - var result = [null, null], parentHostFiber = getFragmentParentInstanceOrContainerFiber(fiber); - if (null === parentHostFiber) return result; - findFragmentInstanceOrTextInstanceSiblings(result, fiber, parentHostFiber.child, { foundSelf: !1 }); - return result; - } - function findFragmentInstanceOrTextInstanceSiblings(result, self, child, state) { - for (; null !== child;) { - if (child === self) state.foundSelf = !0; - else if (5 === child.tag || 27 === child.tag || 6 === child.tag) { - if (state.foundSelf) return result[1] = child, !0; - result[0] = child; - } else if ((22 !== child.tag || null === child.memoizedState) && findFragmentInstanceOrTextInstanceSiblings(result, self, child.child, state)) return !0; - child = child.sibling; - } - return !1; - } - function getInstanceFromHostFiber(fiber) { - switch (fiber.tag) { - case 5: - case 27: - case 6: return fiber.stateNode; - case 3: return fiber.stateNode.containerInfo; - default: throw Error("Expected to find a host node. This is a bug in React."); - } - } - function isFiberPrecedingCheck(child, target, boundary) { - return child === boundary ? !0 : child === target ? (searchTarget = child, !0) : !1; - } - function isFiberFollowingCheck(child, target, boundary) { - return child === boundary ? (searchBoundary = child, !1) : child === target ? (null !== searchBoundary && (searchTarget = child), !0) : !1; - } - function getParentForFragmentAncestors(inst) { - if (null === inst) return null; - do - inst = null === inst ? null : inst.return; - while (inst && 5 !== inst.tag && 27 !== inst.tag && 3 !== inst.tag); - return inst ? inst : null; - } - function getLowestCommonAncestor(instA, instB, getParent) { - for (var depthA = 0, tempA = instA; tempA; tempA = getParent(tempA)) depthA++; - tempA = 0; - for (var tempB = instB; tempB; tempB = getParent(tempB)) tempA++; - for (; 0 < depthA - tempA;) instA = getParent(instA), depthA--; - for (; 0 < tempA - depthA;) instB = getParent(instB), tempA--; - for (; depthA--;) { - if (instA === instB || null !== instB && instA === instB.alternate) return instA; - instA = getParent(instA); - instB = getParent(instB); - } - return null; - } - function getIteratorFn(maybeIterable) { - if (null === maybeIterable || "object" !== typeof maybeIterable) return null; - maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"]; - return "function" === typeof maybeIterable ? maybeIterable : null; - } - function getComponentNameFromType(type) { - if (null == type) return null; - if ("function" === typeof type) return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null; - if ("string" === typeof type) return type; - switch (type) { - case REACT_FRAGMENT_TYPE: return "Fragment"; - case REACT_PROFILER_TYPE: return "Profiler"; - case REACT_STRICT_MODE_TYPE: return "StrictMode"; - case REACT_SUSPENSE_TYPE: return "Suspense"; - case REACT_SUSPENSE_LIST_TYPE: return "SuspenseList"; - case REACT_ACTIVITY_TYPE: return "Activity"; - case REACT_VIEW_TRANSITION_TYPE: return "ViewTransition"; - } - if ("object" === typeof type) switch ("number" === typeof type.tag && console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), type.$$typeof) { - case REACT_PORTAL_TYPE: return "Portal"; - case REACT_CONTEXT_TYPE: return type.displayName || "Context"; - case REACT_CONSUMER_TYPE: return (type._context.displayName || "Context") + ".Consumer"; - case REACT_FORWARD_REF_TYPE: - var innerType = type.render; - type = type.displayName; - type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"); - return type; - case REACT_MEMO_TYPE: return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo"; - case REACT_LAZY_TYPE: - innerType = type._payload; - type = type._init; - try { - return getComponentNameFromType(type(innerType)); - } catch (x) {} - } - return null; - } - function getComponentNameFromOwner(owner) { - return "number" === typeof owner.tag ? getComponentNameFromFiber(owner) : "string" === typeof owner.name ? owner.name : null; - } - function getComponentNameFromFiber(fiber) { - var type = fiber.type; - switch (fiber.tag) { - case 31: return "Activity"; - case 24: return "Cache"; - case 9: return (type._context.displayName || "Context") + ".Consumer"; - case 10: return type.displayName || "Context"; - case 18: return "DehydratedFragment"; - case 11: return fiber = type.render, fiber = fiber.displayName || fiber.name || "", type.displayName || ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef"); - case 7: return "Fragment"; - case 26: - case 27: - case 5: return type; - case 4: return "Portal"; - case 3: return "Root"; - case 6: return "Text"; - case 16: return getComponentNameFromType(type); - case 8: return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode"; - case 22: - if (null !== fiber.return) return getComponentNameFromFiber(fiber.return); - break; - case 12: return "Profiler"; - case 21: return "Scope"; - case 13: return "Suspense"; - case 19: return "SuspenseList"; - case 25: return "TracingMarker"; - case 30: return "ViewTransition"; - case 1: - case 0: - case 14: - case 15: - if ("function" === typeof type) return type.displayName || type.name || null; - if ("string" === typeof type) return type; - break; - case 29: - type = fiber._debugInfo; - if (null != type) { - for (var i = type.length - 1; 0 <= i; i--) if ("string" === typeof type[i].name) return type[i].name; - } - if (null !== fiber.return) return getComponentNameFromFiber(fiber.return); - } - return null; - } - function createCursor(defaultValue) { - return { current: defaultValue }; - } - function pop(cursor, fiber) { - 0 > index$jscomp$0 ? console.error("Unexpected pop.") : (fiber !== fiberStack[index$jscomp$0] && console.error("Unexpected Fiber popped."), cursor.current = valueStack[index$jscomp$0], valueStack[index$jscomp$0] = null, fiberStack[index$jscomp$0] = null, index$jscomp$0--); - } - function push(cursor, value, fiber) { - index$jscomp$0++; - valueStack[index$jscomp$0] = cursor.current; - fiberStack[index$jscomp$0] = fiber; - cursor.current = value; - } - function requiredContext(c) { - null === c && console.error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."); - return c; - } - function pushHostContainer(fiber, nextRootInstance) { - push(rootInstanceStackCursor, nextRootInstance, fiber); - push(contextFiberStackCursor, fiber, fiber); - push(contextStackCursor, null, fiber); - var nextRootContext = nextRootInstance.nodeType; - switch (nextRootContext) { - case 9: - case 11: - nextRootContext = 9 === nextRootContext ? "#document" : "#fragment"; - nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) ? (nextRootInstance = nextRootInstance.namespaceURI) ? getOwnHostContext(nextRootInstance) : HostContextNamespaceNone : HostContextNamespaceNone; - break; - default: if (nextRootContext = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI) nextRootInstance = getOwnHostContext(nextRootInstance), nextRootInstance = getChildHostContextProd(nextRootInstance, nextRootContext); - else switch (nextRootContext) { - case "svg": - nextRootInstance = HostContextNamespaceSvg; - break; - case "math": - nextRootInstance = HostContextNamespaceMath; - break; - default: nextRootInstance = HostContextNamespaceNone; - } - } - nextRootContext = nextRootContext.toLowerCase(); - nextRootContext = updatedAncestorInfoDev(null, nextRootContext); - nextRootContext = { - context: nextRootInstance, - ancestorInfo: nextRootContext - }; - pop(contextStackCursor, fiber); - push(contextStackCursor, nextRootContext, fiber); - } - function popHostContainer(fiber) { - pop(contextStackCursor, fiber); - pop(contextFiberStackCursor, fiber); - pop(rootInstanceStackCursor, fiber); - } - function getHostContext() { - return requiredContext(contextStackCursor.current); - } - function pushHostContext(fiber) { - var stateHook = fiber.memoizedState; - null !== stateHook && (HostTransitionContext._currentValue = stateHook.memoizedState, push(hostTransitionProviderCursor, fiber, fiber)); - stateHook = requiredContext(contextStackCursor.current); - var type = fiber.type; - var nextContext = getChildHostContextProd(stateHook.context, type); - type = updatedAncestorInfoDev(stateHook.ancestorInfo, type); - nextContext = { - context: nextContext, - ancestorInfo: type - }; - stateHook !== nextContext && (push(contextFiberStackCursor, fiber, fiber), push(contextStackCursor, nextContext, fiber)); - } - function popHostContext(fiber) { - contextFiberStackCursor.current === fiber && (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber)); - hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), HostTransitionContext._currentValue = NotPendingTransition); - } - function disabledLog() {} - function disableLogs() { - if (0 === disabledDepth) { - prevLog = console.log; - prevInfo = console.info; - prevWarn = console.warn; - prevError = console.error; - prevGroup = console.group; - prevGroupCollapsed = console.groupCollapsed; - prevGroupEnd = console.groupEnd; - var props = { - configurable: !0, - enumerable: !0, - value: disabledLog, - writable: !0 - }; - Object.defineProperties(console, { - info: props, - log: props, - warn: props, - error: props, - group: props, - groupCollapsed: props, - groupEnd: props - }); - } - disabledDepth++; - } - function reenableLogs() { - disabledDepth--; - if (0 === disabledDepth) { - var props = { - configurable: !0, - enumerable: !0, - writable: !0 - }; - Object.defineProperties(console, { - log: assign({}, props, { value: prevLog }), - info: assign({}, props, { value: prevInfo }), - warn: assign({}, props, { value: prevWarn }), - error: assign({}, props, { value: prevError }), - group: assign({}, props, { value: prevGroup }), - groupCollapsed: assign({}, props, { value: prevGroupCollapsed }), - groupEnd: assign({}, props, { value: prevGroupEnd }) - }); - } - 0 > disabledDepth && console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue."); - } - function formatOwnerStack(error) { - var prevPrepareStackTrace = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - error = error.stack; - Error.prepareStackTrace = prevPrepareStackTrace; - error.startsWith("Error: react-stack-top-frame\n") && (error = error.slice(29)); - prevPrepareStackTrace = error.indexOf("\n"); - -1 !== prevPrepareStackTrace && (error = error.slice(prevPrepareStackTrace + 1)); - prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame"); - -1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error.lastIndexOf("\n", prevPrepareStackTrace)); - if (-1 !== prevPrepareStackTrace) error = error.slice(0, prevPrepareStackTrace); - else return ""; - return error; - } - function describeBuiltInComponentFrame(name) { - if (void 0 === prefix) try { - throw Error(); - } catch (x) { - var match = x.stack.trim().match(/\n( *(at )?)/); - prefix = match && match[1] || ""; - suffix = -1 < x.stack.indexOf("\n at") ? " ()" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : ""; - } - return "\n" + prefix + name + suffix; - } - function describeNativeComponentFrame(fn, construct) { - if (!fn || reentry) return ""; - var frame = componentFrameCache.get(fn); - if (void 0 !== frame) return frame; - reentry = !0; - frame = Error.prepareStackTrace; - Error.prepareStackTrace = void 0; - var previousDispatcher = null; - previousDispatcher = ReactSharedInternals.H; - ReactSharedInternals.H = null; - disableLogs(); - try { - var RunInRootFrame = { DetermineComponentFrameRoot: function() { - try { - if (construct) { - var Fake = function() { - throw Error(); - }; - Object.defineProperty(Fake.prototype, "props", { set: function() { - throw Error(); - } }); - if ("object" === typeof Reflect && Reflect.construct) { - try { - Reflect.construct(Fake, []); - } catch (x) { - var control = x; - } - Reflect.construct(fn, [], Fake); - } else { - try { - Fake.call(); - } catch (x$0) { - control = x$0; - } - Fake = !1; - try { - var prevProps = Object.getOwnPropertyDescriptor(fn.prototype, "props"); - Object.defineProperty(fn.prototype, "props", { - configurable: !0, - set: function() { - throw Error(); - } - }); - Fake = !0; - new fn(); - } finally { - Fake && (void 0 !== prevProps ? Object.defineProperty(fn.prototype, "props", prevProps) : delete fn.prototype.props); - } - } - } else { - try { - throw Error(); - } catch (x$1) { - control = x$1; - } - (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {}); - } - } catch (sample) { - if (sample && control && "string" === typeof sample.stack) return [sample.stack, control.stack]; - } - return [null, null]; - } }; - RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot"; - var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, "name"); - namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, "name", { value: "DetermineComponentFrameRoot" }); - var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1]; - if (sampleStack && controlStack) { - var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n"); - for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes("DetermineComponentFrameRoot");) namePropDescriptor++; - for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes("DetermineComponentFrameRoot");) _RunInRootFrame$Deter++; - if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length) for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter];) _RunInRootFrame$Deter--; - for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--) if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) { - if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) do - if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) { - var _frame = "\n" + sampleLines[namePropDescriptor].replace(" at new ", " at "); - fn.displayName && _frame.includes("") && (_frame = _frame.replace("", fn.displayName)); - "function" === typeof fn && componentFrameCache.set(fn, _frame); - return _frame; - } - while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter); - break; - } - } - } finally { - reentry = !1, ReactSharedInternals.H = previousDispatcher, reenableLogs(), Error.prepareStackTrace = frame; - } - sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : ""; - "function" === typeof fn && componentFrameCache.set(fn, sampleLines); - return sampleLines; - } - function describeFiber(fiber, childFiber) { - switch (fiber.tag) { - case 26: - case 27: - case 5: return describeBuiltInComponentFrame(fiber.type); - case 16: return describeBuiltInComponentFrame("Lazy"); - case 13: return fiber.child !== childFiber && null !== childFiber ? describeBuiltInComponentFrame("Suspense Fallback") : describeBuiltInComponentFrame("Suspense"); - case 19: return describeBuiltInComponentFrame("SuspenseList"); - case 0: - case 15: return describeNativeComponentFrame(fiber.type, !1); - case 11: return describeNativeComponentFrame(fiber.type.render, !1); - case 1: return describeNativeComponentFrame(fiber.type, !0); - case 31: return describeBuiltInComponentFrame("Activity"); - case 30: return describeBuiltInComponentFrame("ViewTransition"); - default: return ""; - } - } - function getStackByFiberInDevAndProd(workInProgress) { - try { - var info = "", previous = null; - do { - info += describeFiber(workInProgress, previous); - var debugInfo = workInProgress._debugInfo; - if (debugInfo) for (var i = debugInfo.length - 1; 0 <= i; i--) { - var entry = debugInfo[i]; - if ("string" === typeof entry.name) { - var JSCompiler_temp_const = info; - a: { - var name = entry.name, env = entry.env, location = entry.debugLocation; - if (null != location) { - var childStack = formatOwnerStack(location), idx = childStack.lastIndexOf("\n"), lastLine = -1 === idx ? childStack : childStack.slice(idx + 1); - if (-1 !== lastLine.indexOf(name)) { - var JSCompiler_inline_result = "\n" + lastLine; - break a; - } - } - JSCompiler_inline_result = describeBuiltInComponentFrame(name + (env ? " [" + env + "]" : "")); - } - info = JSCompiler_temp_const + JSCompiler_inline_result; - } - } - previous = workInProgress; - workInProgress = workInProgress.return; - } while (workInProgress); - return info; - } catch (x) { - return "\nError generating stack: " + x.message + "\n" + x.stack; - } - } - function describeFunctionComponentFrameWithoutLineNumber(fn) { - return (fn = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(fn) : ""; - } - function getCurrentFiberOwnerNameInDevOrNull() { - if (null === current) return null; - var owner = current._debugOwner; - return null != owner ? getComponentNameFromOwner(owner) : null; - } - function getCurrentFiberStackInDev() { - if (null === current) return ""; - var workInProgress = current; - try { - var info = ""; - 6 === workInProgress.tag && (workInProgress = workInProgress.return); - switch (workInProgress.tag) { - case 26: - case 27: - case 5: - info += describeBuiltInComponentFrame(workInProgress.type); - break; - case 13: - info += describeBuiltInComponentFrame("Suspense"); - break; - case 19: - info += describeBuiltInComponentFrame("SuspenseList"); - break; - case 31: - info += describeBuiltInComponentFrame("Activity"); - break; - case 30: - info += describeBuiltInComponentFrame("ViewTransition"); - break; - case 0: - case 15: - case 1: - workInProgress._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(workInProgress.type)); - break; - case 11: workInProgress._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(workInProgress.type.render)); - } - for (; workInProgress;) if ("number" === typeof workInProgress.tag) { - var fiber = workInProgress; - workInProgress = fiber._debugOwner; - var debugStack = fiber._debugStack; - if (workInProgress && debugStack) { - var formattedStack = formatOwnerStack(debugStack); - "" !== formattedStack && (info += "\n" + formattedStack); - } - } else if (null != workInProgress.debugStack) { - var ownerStack = workInProgress.debugStack; - (workInProgress = workInProgress.owner) && ownerStack && (info += "\n" + formatOwnerStack(ownerStack)); - } else break; - var JSCompiler_inline_result = info; - } catch (x) { - JSCompiler_inline_result = "\nError generating stack: " + x.message + "\n" + x.stack; - } - return JSCompiler_inline_result; - } - function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) { - var previousFiber = current; - setCurrentFiber(fiber); - try { - return null !== fiber && fiber._debugTask ? fiber._debugTask.run(callback.bind(null, arg0, arg1, arg2, arg3, arg4)) : callback(arg0, arg1, arg2, arg3, arg4); - } finally { - setCurrentFiber(previousFiber); - } - throw Error("runWithFiberInDEV should never be called in production. This is a bug in React."); - } - function setCurrentFiber(fiber) { - ReactSharedInternals.getCurrentStack = null === fiber ? null : getCurrentFiberStackInDev; - isRendering = !1; - current = fiber; - } - function typeName(value) { - return "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object"; - } - function willCoercionThrow(value) { - try { - return testStringCoercion(value), !1; - } catch (e) { - return !0; - } - } - function testStringCoercion(value) { - return "" + value; - } - function checkAttributeStringCoercion(value, attributeName) { - if (willCoercionThrow(value)) return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.", attributeName, typeName(value)), testStringCoercion(value); - } - function checkCSSPropertyStringCoercion(value, propName) { - if (willCoercionThrow(value)) return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.", propName, typeName(value)), testStringCoercion(value); - } - function checkFormFieldValueStringCoercion(value) { - if (willCoercionThrow(value)) return console.error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.", typeName(value)), testStringCoercion(value); - } - function injectInternals(internals) { - if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; - var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__; - if (hook.isDisabled) return !0; - if (!hook.supportsFiber) return console.error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools"), !0; - try { - rendererID = hook.inject(internals), injectedHook = hook; - } catch (err) { - console.error("React instrumentation encountered an error: %o.", err); - } - return hook.checkDCE ? !0 : !1; - } - function setIsStrictModeForDevtools(newIsStrictMode) { - "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode); - if (injectedHook && "function" === typeof injectedHook.setStrictMode) try { - injectedHook.setStrictMode(rendererID, newIsStrictMode); - } catch (err) { - hasLoggedError || (hasLoggedError = !0, console.error("React instrumentation encountered an error: %o", err)); - } - } - function clz32Fallback(x) { - x >>>= 0; - return 0 === x ? 32 : 31 - (log(x) / LN2 | 0) | 0; - } - function getHighestPriorityLanes(lanes) { - var pendingSyncLanes = lanes & 42; - if (0 !== pendingSyncLanes) return pendingSyncLanes; - switch (lanes & -lanes) { - case 1: return 1; - case 2: return 2; - case 4: return 4; - case 8: return 8; - case 16: return 16; - case 32: return 32; - case 64: return 64; - case 128: return 128; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: return lanes & -lanes; - case 262144: - case 524288: - case 1048576: - case 2097152: return lanes & 3932160; - case 4194304: - case 8388608: - case 16777216: - case 33554432: return lanes & 62914560; - case 67108864: return 67108864; - case 134217728: return 134217728; - case 268435456: return 268435456; - case 536870912: return 536870912; - case 1073741824: return 0; - default: return console.error("Should have found matching lanes. This is a bug in React."), lanes; - } - } - function getNextLanes(root, wipLanes, rootHasPendingCommit) { - var pendingLanes = root.pendingLanes; - if (0 === pendingLanes) return 0; - var nextLanes = 0, suspendedLanes = root.suspendedLanes, pingedLanes = root.pingedLanes; - root = root.warmLanes; - var nonIdlePendingLanes = pendingLanes & 134217727; - 0 !== nonIdlePendingLanes ? (pendingLanes = nonIdlePendingLanes & ~suspendedLanes, 0 !== pendingLanes ? nextLanes = getHighestPriorityLanes(pendingLanes) : (pingedLanes &= nonIdlePendingLanes, 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = nonIdlePendingLanes & ~root, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))))) : (nonIdlePendingLanes = pendingLanes & ~suspendedLanes, 0 !== nonIdlePendingLanes ? nextLanes = getHighestPriorityLanes(nonIdlePendingLanes) : 0 !== pingedLanes ? nextLanes = getHighestPriorityLanes(pingedLanes) : rootHasPendingCommit || (rootHasPendingCommit = pendingLanes & ~root, 0 !== rootHasPendingCommit && (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))); - return 0 === nextLanes ? 0 : 0 !== wipLanes && wipLanes !== nextLanes && 0 === (wipLanes & suspendedLanes) && (suspendedLanes = nextLanes & -nextLanes, rootHasPendingCommit = wipLanes & -wipLanes, suspendedLanes >= rootHasPendingCommit || 32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)) ? wipLanes : nextLanes; - } - function checkIfRootIsPrerendering(root, renderLanes) { - return 0 === (root.pendingLanes & ~(root.suspendedLanes & ~root.pingedLanes) & renderLanes); - } - function getEntangledLanes(root, renderLanes) { - 0 !== (renderLanes & 8) && (renderLanes |= renderLanes & 32); - var allEntangledLanes = root.entangledLanes; - if (0 !== allEntangledLanes) for (root = root.entanglements, allEntangledLanes &= renderLanes; 0 < allEntangledLanes;) { - var index = 31 - clz32(allEntangledLanes), lane = 1 << index; - renderLanes |= root[index]; - allEntangledLanes &= ~lane; - } - return renderLanes; - } - function computeExpirationTime(lane, currentTime) { - switch (lane) { - case 1: - case 2: - case 4: - case 8: - case 64: return currentTime + 250; - case 16: - case 32: - case 128: - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: return currentTime + 5e3; - case 4194304: - case 8388608: - case 16777216: - case 33554432: return -1; - case 67108864: - case 134217728: - case 268435456: - case 536870912: - case 1073741824: return -1; - default: return console.error("Should have found matching lanes. This is a bug in React."), -1; - } - } - function claimNextRetryLane() { - var lane = nextRetryLane; - nextRetryLane <<= 1; - 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304); - return lane; - } - function createLaneMap(initial) { - for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial); - return laneMap; - } - function markRootUpdated$1(root, updateLane) { - root.pendingLanes |= updateLane; - 268435456 !== updateLane && (root.suspendedLanes = 0, root.pingedLanes = 0, root.warmLanes = 0); - } - function markRootFinished(root, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) { - var previouslyPendingLanes = root.pendingLanes; - root.pendingLanes = remainingLanes; - root.suspendedLanes = 0; - root.pingedLanes = 0; - root.warmLanes = 0; - root.expiredLanes &= remainingLanes; - root.entangledLanes &= remainingLanes; - root.errorRecoveryDisabledLanes &= remainingLanes; - root.shellSuspendCounter = 0; - var entanglements = root.entanglements, expirationTimes = root.expirationTimes, hiddenUpdates = root.hiddenUpdates; - for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes;) { - var index = 31 - clz32(remainingLanes), lane = 1 << index; - entanglements[index] = 0; - expirationTimes[index] = -1; - var hiddenUpdatesForLane = hiddenUpdates[index]; - if (null !== hiddenUpdatesForLane) for (hiddenUpdates[index] = null, index = 0; index < hiddenUpdatesForLane.length; index++) { - var update = hiddenUpdatesForLane[index]; - null !== update && (update.lane &= -536870913); - } - remainingLanes &= ~lane; - } - 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0); - 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root.tag && (root.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes)); - } - function markSpawnedDeferredLane(root, spawnedLane, entangledLanes) { - root.pendingLanes |= spawnedLane; - root.suspendedLanes &= ~spawnedLane; - var spawnedLaneIndex = 31 - clz32(spawnedLane); - root.entangledLanes |= spawnedLane; - root.entanglements[spawnedLaneIndex] = root.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 261930; - } - function markRootEntangled(root, entangledLanes) { - var rootEntangledLanes = root.entangledLanes |= entangledLanes; - for (root = root.entanglements; rootEntangledLanes;) { - var index = 31 - clz32(rootEntangledLanes), lane = 1 << index; - lane & entangledLanes | root[index] & entangledLanes && (root[index] |= entangledLanes); - rootEntangledLanes &= ~lane; - } - } - function getBumpedLaneForHydration(root, renderLanes) { - var renderLane = renderLanes & -renderLanes; - renderLane = 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane); - return 0 !== (renderLane & (root.suspendedLanes | renderLanes)) ? 0 : renderLane; - } - function getBumpedLaneForHydrationByLane(lane) { - switch (lane) { - case 2: - lane = 1; - break; - case 8: - lane = 4; - break; - case 32: - lane = 16; - break; - case 256: - case 512: - case 1024: - case 2048: - case 4096: - case 8192: - case 16384: - case 32768: - case 65536: - case 131072: - case 262144: - case 524288: - case 1048576: - case 2097152: - case 4194304: - case 8388608: - case 16777216: - case 33554432: - lane = 128; - break; - case 268435456: - lane = 134217728; - break; - default: lane = 0; - } - return lane; - } - function addFiberToLanesMap(root, fiber, lanes) { - if (isDevToolsPresent) for (root = root.pendingUpdatersLaneMap; 0 < lanes;) { - var index = 31 - clz32(lanes), lane = 1 << index; - root[index].add(fiber); - lanes &= ~lane; - } - } - function movePendingFibersToMemoized(root, lanes) { - if (isDevToolsPresent) for (var pendingUpdatersLaneMap = root.pendingUpdatersLaneMap, memoizedUpdaters = root.memoizedUpdaters; 0 < lanes;) { - var index = 31 - clz32(lanes); - root = 1 << index; - index = pendingUpdatersLaneMap[index]; - 0 < index.size && (index.forEach(function(fiber) { - var alternate = fiber.alternate; - null !== alternate && memoizedUpdaters.has(alternate) || memoizedUpdaters.add(fiber); - }), index.clear()); - lanes &= ~root; - } - } - function lanesToEventPriority(lanes) { - lanes &= -lanes; - return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes ? 0 !== (lanes & 134217727) ? DefaultEventPriority : IdleEventPriority : ContinuousEventPriority : DiscreteEventPriority; - } - function resolveUpdatePriority() { - var updatePriority = ReactDOMSharedInternals.p; - if (0 !== updatePriority) return updatePriority; - updatePriority = window.event; - return void 0 === updatePriority ? DefaultEventPriority : getEventPriority(updatePriority.type); - } - function runWithPriority(priority, fn) { - var previousPriority = ReactDOMSharedInternals.p; - try { - return ReactDOMSharedInternals.p = priority, fn(); - } finally { - ReactDOMSharedInternals.p = previousPriority; - } - } - function detachDeletedInstance(node) { - delete node[internalInstanceKey]; - delete node[internalPropsKey]; - delete node[internalEventHandlerListenersKey]; - delete node[internalEventHandlesSetKey]; - } - function getClosestInstanceFromNode(targetNode) { - var targetInst; - if (targetInst = targetNode[internalInstanceKey]) return targetInst; - for (var parentNode = targetNode.parentNode; parentNode;) { - if (targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]) { - parentNode = targetInst.alternate; - if (null !== targetInst.child || null !== parentNode && null !== parentNode.child) for (targetNode = getParentHydrationBoundary(targetNode); null !== targetNode;) { - if (parentNode = targetNode[internalInstanceKey]) return parentNode; - targetNode = getParentHydrationBoundary(targetNode); - } - return targetInst; - } - targetNode = parentNode; - parentNode = targetNode.parentNode; - } - return null; - } - function getInstanceFromNode(node) { - if (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) { - var tag = node.tag; - if (5 === tag || 6 === tag || 13 === tag || 31 === tag || 26 === tag || 27 === tag || 3 === tag) return node; - } - return null; - } - function getNodeFromInstance(inst) { - var tag = inst.tag; - if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode; - throw Error("getNodeFromInstance: Invalid argument."); - } - function getResourcesFromRoot(root) { - var resources = root[internalRootNodeResourcesKey]; - resources || (resources = root[internalRootNodeResourcesKey] = { - hoistableStyles: /* @__PURE__ */ new Map(), - hoistableScripts: /* @__PURE__ */ new Map() - }); - return resources; - } - function markNodeAsHoistable(node) { - node[internalHoistableMarker] = !0; - } - function clearPendingLoadOnNode(node) { - node[internalLoadPendingKey] = void 0; - } - function registerTwoPhaseEvent(registrationName, dependencies) { - registerDirectEvent(registrationName, dependencies); - registerDirectEvent(registrationName + "Capture", dependencies); - } - function registerDirectEvent(registrationName, dependencies) { - registrationNameDependencies[registrationName] && console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName); - registrationNameDependencies[registrationName] = dependencies; - var lowerCasedName = registrationName.toLowerCase(); - possibleRegistrationNames[lowerCasedName] = registrationName; - "onDoubleClick" === registrationName && (possibleRegistrationNames.ondblclick = registrationName); - for (registrationName = 0; registrationName < dependencies.length; registrationName++) allNativeEvents.add(dependencies[registrationName]); - } - function checkControlledValueProps(tagName, props) { - hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || null == props.value || ("select" === tagName ? console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.") : console.error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")); - props.onChange || props.readOnly || props.disabled || null == props.checked || console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`."); - } - function isAttributeNameSafe(attributeName) { - if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) return !0; - if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1; - if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) return validatedAttributeNameCache[attributeName] = !0; - illegalAttributeNameCache[attributeName] = !0; - console.error("Invalid attribute name: `%s`", attributeName); - return !1; - } - function pushMutationContext() { - var prev = viewTransitionMutationContext; - viewTransitionMutationContext = !1; - return prev; - } - function getValueForAttributeOnCustomComponent(node, name, expected) { - if (isAttributeNameSafe(name)) { - if (!node.hasAttribute(name)) { - switch (typeof expected) { - case "symbol": - case "object": return expected; - case "function": return expected; - case "boolean": if (!1 === expected) return expected; - } - return void 0 === expected ? void 0 : null; - } - node = "nonce" === name.toLowerCase() ? node.nonce : node.getAttribute(name); - if ("" === node && !0 === expected) return !0; - checkAttributeStringCoercion(expected, name); - return node === "" + expected ? expected : node; - } - } - function setValueForAttribute(node, name, value) { - if (isAttributeNameSafe(name)) if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - node.removeAttribute(name); - return; - case "boolean": - var prefix = name.toLowerCase().slice(0, 5); - if ("data-" !== prefix && "aria-" !== prefix) { - node.removeAttribute(name); - return; - } - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, value); - } - } - function setValueForKnownAttribute(node, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttribute(name, value); - } - } - function setValueForNamespacedAttribute(node, namespace, name, value) { - if (null === value) node.removeAttribute(name); - else { - switch (typeof value) { - case "undefined": - case "function": - case "symbol": - case "boolean": - node.removeAttribute(name); - return; - } - checkAttributeStringCoercion(value, name); - node.setAttributeNS(namespace, name, value); - } - } - function getToStringValue(value) { - switch (typeof value) { - case "bigint": - case "boolean": - case "number": - case "string": - case "undefined": return value; - case "object": return checkFormFieldValueStringCoercion(value), value; - default: return ""; - } - } - function isCheckable(elem) { - var type = elem.type; - return (elem = elem.nodeName) && "input" === elem.toLowerCase() && ("checkbox" === type || "radio" === type); - } - function trackValueOnNode(node, valueField, currentValue) { - var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField); - if (!node.hasOwnProperty(valueField) && "undefined" !== typeof descriptor && "function" === typeof descriptor.get && "function" === typeof descriptor.set) { - var get = descriptor.get, set = descriptor.set; - Object.defineProperty(node, valueField, { - configurable: !0, - get: function() { - return get.call(this); - }, - set: function(value) { - checkFormFieldValueStringCoercion(value); - currentValue = "" + value; - set.call(this, value); - } - }); - Object.defineProperty(node, valueField, { enumerable: descriptor.enumerable }); - return { - getValue: function() { - return currentValue; - }, - setValue: function(value) { - checkFormFieldValueStringCoercion(value); - currentValue = "" + value; - }, - stopTracking: function() { - node._valueTracker = null; - delete node[valueField]; - } - }; - } - } - function track(node) { - if (!node._valueTracker) { - var valueField = isCheckable(node) ? "checked" : "value"; - node._valueTracker = trackValueOnNode(node, valueField, "" + node[valueField]); - } - } - function updateValueIfChanged(node) { - if (!node) return !1; - var tracker = node._valueTracker; - if (!tracker) return !0; - var lastValue = tracker.getValue(); - var value = ""; - node && (value = isCheckable(node) ? node.checked ? "true" : "false" : node.value); - node = value; - return node !== lastValue ? (tracker.setValue(node), !0) : !1; - } - function escapeSelectorAttributeValueInsideDoubleQuotes(value) { - return value.replace(escapeSelectorAttributeValueInsideDoubleQuotesRegex, function(ch) { - return "\\" + ch.charCodeAt(0).toString(16) + " "; - }); - } - function validateInputProps(element, props) { - void 0 === props.checked || void 0 === props.defaultChecked || didWarnCheckedDefaultChecked || (console.error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type), didWarnCheckedDefaultChecked = !0); - void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue$1 || (console.error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type), didWarnValueDefaultValue$1 = !0); - } - function updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) { - element.name = ""; - null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type ? (checkAttributeStringCoercion(type, "type"), element.type = type) : element.removeAttribute("type"); - if (null != value) if ("number" === type) { - if (0 === value && "" === element.value || element.value != value) element.value = "" + getToStringValue(value); - } else element.value !== "" + getToStringValue(value) && (element.value = "" + getToStringValue(value)); - else "submit" !== type && "reset" !== type || element.removeAttribute("value"); - null != value ? "number" === type && element.value == value ? setDefaultValue(element, getToStringValue(element.value)) : setDefaultValue(element, getToStringValue(value)) : null != defaultValue ? setDefaultValue(element, getToStringValue(defaultValue)) : null != lastDefaultValue && element.removeAttribute("value"); - null == checked && null != defaultChecked && (element.defaultChecked = !!defaultChecked); - null != checked && (element.checked = checked && "function" !== typeof checked && "symbol" !== typeof checked); - null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name ? (checkAttributeStringCoercion(name, "name"), element.name = "" + getToStringValue(name)) : element.removeAttribute("name"); - } - function initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating) { - null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type && (checkAttributeStringCoercion(type, "type"), element.type = type); - if (null != value || null != defaultValue) { - if (!("submit" !== type && "reset" !== type || void 0 !== value && null !== value)) { - track(element); - return; - } - defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : ""; - value = null != value ? "" + getToStringValue(value) : defaultValue; - isHydrating || value === element.value || (element.value = value); - element.defaultValue = value; - } - checked = null != checked ? checked : defaultChecked; - checked = "function" !== typeof checked && "symbol" !== typeof checked && !!checked; - element.checked = isHydrating ? element.checked : !!checked; - element.defaultChecked = !!checked; - null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name && (checkAttributeStringCoercion(name, "name"), element.name = name); - track(element); - } - function setDefaultValue(node, value) { - node.defaultValue !== "" + value && (node.defaultValue = "" + value); - } - function validateOptionProps(element, props) { - props.value ?? ("object" === typeof props.children && null !== props.children ? React.Children.forEach(props.children, function(child) { - null == child || "string" === typeof child || "number" === typeof child || "bigint" === typeof child || didWarnInvalidChild || (didWarnInvalidChild = !0, console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to