@sheetxl/utils-react 0.7.17 → 0.7.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("._fullscreen-portal-root_1mjsr_4{pointer-events:none;position:absolute;inset:0;width:100%;height:100%;z-index:1200}._fullscreen-portal-root_1mjsr_4>*{pointer-events:auto}:root{--icon-size-sm: calc(var(--icon-size, 1rem), * .875);--icon-size-md: var(--icon-size, 1rem);--icon-size-lg: calc(var(--icon-size, 1rem) * 1.25);--icon-size-xl: calc(var(--icon-size, 1rem) * 1.5)}._Icon_17dpm_10{font-size:var(--icon-size, var(--icon-size-md));min-width:var(--icon-size, var(--icon-size-md));min-height:var(--icon-size, var(--icon-size-md));--icon-stroke-em: .085em;--icon-color: currentColor;--icon-secondary-color: color-mix(in oklab, currentColor 65%, transparent);--icon-tertiary-color: color-mix(in oklab, currentColor 40%, transparent);--icon-line-color: currentColor;--icon-main-opacity: 1;--icon-secondary-opacity: .45;--icon-tertiary-opacity: .25;--icon-line-opacity: 1;--icon-filter: none;filter:var(--icon-filter);display:inline-flex;align-items:center;justify-content:center;line-height:1;vertical-align:middle;flex:0 0 auto}._Icon_17dpm_10 .sm{--font-size: var(--icon-size-sm)}._Icon_17dpm_10 .md{--font-size: var(--icon-size-md)}._Icon_17dpm_10 .lg{--font-size: var(--icon-size-lg)}._Icon_17dpm_10 .xl{--font-size: var(--icon-size-xl)}._Icon_17dpm_10>svg{width:var(--icon-size);height:var(--icon-size)}._Icon_17dpm_10>img{aspect-ratio:1 / 1;display:block;line-height:1}._Icon_17dpm_10 .fill,._Icon_17dpm_10 .line{--layer-color: var(--icon-color);--layer-opacity: var(--icon-main-opacity)}._Icon_17dpm_10 .secondary{--layer-color: var(--icon-secondary-color)}._Icon_17dpm_10 .tertiary{--layer-color: var(--icon-tertiary-color)}._Icon_17dpm_10 .primary{--layer-color: var(--sxl-app-color-primary, var(--icon-primary, #595b5e))}._Icon_17dpm_10 .secondary{--layer-color: var(--sxl-app-color-secondary, #9c27b0)}._Icon_17dpm_10 .secondary.light{--layer-color: var(--sxl-app-color-secondary-light, #a060ac)}._Icon_17dpm_10 .success{--layer-color: var(--sxl-app-color-success, #22c55e)}._Icon_17dpm_10 .success.light{--layer-color: var(--sxl-app-color-success-light, #22c55e)}._Icon_17dpm_10 .info{--layer-color: var(--sxl-app-color-info, #3b82f6)}._Icon_17dpm_10 .warn{--layer-color: var(--sxl-app-color-warn, #f59e0b)}._Icon_17dpm_10 .error{--layer-color: var(--sxl-app-color-error, #ef4444)}._Icon_17dpm_10 .error.light{--layer-color: var(--sxl-app-color-error-light, #f87171)}._Icon_17dpm_10 .grey{--layer-color: var(--sxl-app-color-grey, #cccccc)}._Icon_17dpm_10 .shadow{--layer-color: var(--sxl-app-color-shadow, #cccccc)}._Icon_17dpm_10 .fill:not(.fixed):not([fill]){fill:var(--layer-color);opacity:var(--layer-opacity);stroke:none}._Icon_17dpm_10 .line:not(.fixed):not([stroke]){fill:none;stroke:var(--layer-color, var(--icon-line-color));stroke-width:var(--icon-stroke-em);opacity:var(--layer-opacity, var(--icon-line-opacity));vector-effect:non-scaling-stroke;pointer-events:none;stroke-linecap:var(--icon-linecap, round);stroke-linejoin:var(--icon-linejoin, round);stroke-miterlimit:var(--icon-miter, 4)}@media (prefers-color-scheme: dark){._Icon_17dpm_10 .invert-dark{filter:invert(1) hue-rotate(180deg)}}._Icon_17dpm_10 .muted{opacity:calc(var(--layer-opacity, 1) * .6)}@keyframes _sxl-walk_17dpm_1{to{stroke-dashoffset:0}}.icon.walking .walkable.line{stroke-dasharray:var(--walk-dash-length, 5px) var(--walk-dash-gap, 2px);stroke-dashoffset:calc(var(--walk-dash-length, 5px) + var(--walk-dash-gap, 2px));animation:_sxl-walk_17dpm_1 var(--walk-duration, .96s) linear infinite;will-change:stroke-dashoffset}:root{--scrollbar-track-color: rgba(0,0,0,.06);--scrollbar-thumb-color: rgba(0,0,0,.35);--scrollbar-button-color: var(--scrollbar-thumb-color);--scrollbar-active-color: rgba(0,0,0,.55);--scrollbar-corner-color: transparent;--scrollbar-border-color: transparent}:root .has-touch-thumb,:root .has-touch-thumb *{--scrollbar-size: 4px;--scrollbar-border-width: 0px;--scrollbar-width: var(--scrollbar-size);--scrollbar-height: var(--scrollbar-size)}:root{--scrollbar-width: var(--scrollbar-size);--scrollbar-height: var(--scrollbar-size);--scrollbar-border-radius: 9999px;--scrollbar-border-width: 2px;--scrollbar-min-thumb-size: 24px}._scrollbar_15caq_24 ::-webkit-scrollbar-button{background:transparent}._scrollbar_15caq_24{display:flex;overflow:hidden;border-radius:var(--scrollbar-border-radius);align-items:center;border:var(--scrollbar-border-width) solid transparent}._scrollbar_15caq_24 ._track_15caq_34{background:var(--scrollbar-track-color);border-radius:var(--scrollbar-border-radius);position:relative;flex:1 1 100%;border:var(--scrollbar-border-width) solid transparent;touch-action:none;box-sizing:border-box;overflow:hidden}._scrollbar_15caq_24 ._thumb_15caq_46{background:var(--scrollbar-thumb-color);border-radius:var(--scrollbar-border-radius);transition:background .12s;touch-action:none}._scrollbar_15caq_24 ._thumb_15caq_46:hover{background:var(--scrollbar-active-color)}._scrollbar_15caq_24.vertical{flex-direction:column;min-width:var(--scrollbar-width, 0px)}._scrollbar_15caq_24.vertical ._thumb_15caq_46{min-height:var(--scrollbar-min-thumb-size)}._scrollbar_15caq_24.vertical ._track_15caq_34{width:100%}._scrollbar_15caq_24.horizontal{flex-direction:row;min-height:var(--scrollbar-height, 0px)}._scrollbar_15caq_24.horizontal ._thumb_15caq_46{min-width:var(--scrollbar-min-thumb-size)}._scrollbar_15caq_24.horizontal ._track_15caq_34{height:100%}._scrollbar_15caq_24.dragging ._thumb_15caq_46{background:var(--scrollbar-active-color)}._scrollbar_15caq_24 ._scrollbar-button_15caq_86{display:flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0}._scrollbar_15caq_24 ._scrollbar-button_15caq_86>*{fill:var(--scrollbar-button-color);transition:fill .12s ease}._scrollbar_15caq_24 ._scrollbar-button_15caq_86:hover:not([disabled])>*{fill:var(--scrollbar-active-color)}._scrollbar_15caq_24 ._scrollbar-button_15caq_86[disabled]>*{fill:var(--scrollbar-button-color);opacity:.5}._scrollbar_15caq_24 ._scrollbar-button_15caq_86.vertical{width:var(--scrollbar-width)}._scrollbar_15caq_24 ._scrollbar-button_15caq_86.horizontal{height:var(--scrollbar-height)}._touch-thumb_15caq_121{position:absolute;cursor:grab;pointer-events:all;transition-property:opacity;border-radius:9999px;will-change:opacity;opacity:.7}._touch-thumb_15caq_121:hover,._touch-thumb_15caq_121.dragging{opacity:1}")),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { CommonUtils as ee, DefaultNotifier as yn, Notifier as be, InternalClipboard as ot, ClipboardUtils as ht, MimeType as dt } from "@sheetxl/utils";
3
- import ae, { useRef as I, useReducer as Ut, useMemo as K, useEffect as H, useState as Y, version as vn, memo as me, forwardRef as Ee, useCallback as U, useLayoutEffect as Et, createContext as Xt, useContext as Yt, createElement as wn, useImperativeHandle as bn, Component as xn } from "react";
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode("._fullscreen-portal-root_1mjsr_4{pointer-events:none;position:absolute;inset:0;width:100%;height:100%;z-index:1200}._fullscreen-portal-root_1mjsr_4>*{pointer-events:auto}:root{--icon-size-sm: calc(var(--icon-size, 1rem), * .875);--icon-size-md: var(--icon-size, 1rem);--icon-size-lg: calc(var(--icon-size, 1rem) * 1.25);--icon-size-xl: calc(var(--icon-size, 1rem) * 1.5)}._Icon_17dpm_10{font-size:var(--icon-size, var(--icon-size-md));min-width:var(--icon-size, var(--icon-size-md));min-height:var(--icon-size, var(--icon-size-md));--icon-stroke-em: .085em;--icon-color: currentColor;--icon-secondary-color: color-mix(in oklab, currentColor 65%, transparent);--icon-tertiary-color: color-mix(in oklab, currentColor 40%, transparent);--icon-line-color: currentColor;--icon-main-opacity: 1;--icon-secondary-opacity: .45;--icon-tertiary-opacity: .25;--icon-line-opacity: 1;--icon-filter: none;filter:var(--icon-filter);display:inline-flex;align-items:center;justify-content:center;line-height:1;vertical-align:middle;flex:0 0 auto}._Icon_17dpm_10 .sm{--font-size: var(--icon-size-sm)}._Icon_17dpm_10 .md{--font-size: var(--icon-size-md)}._Icon_17dpm_10 .lg{--font-size: var(--icon-size-lg)}._Icon_17dpm_10 .xl{--font-size: var(--icon-size-xl)}._Icon_17dpm_10>svg{width:var(--icon-size);height:var(--icon-size)}._Icon_17dpm_10>img{aspect-ratio:1 / 1;display:block;line-height:1}._Icon_17dpm_10 .fill,._Icon_17dpm_10 .line{--layer-color: var(--icon-color);--layer-opacity: var(--icon-main-opacity)}._Icon_17dpm_10 .secondary{--layer-color: var(--icon-secondary-color)}._Icon_17dpm_10 .tertiary{--layer-color: var(--icon-tertiary-color)}._Icon_17dpm_10 .primary{--layer-color: var(--sxl-app-color-primary, var(--icon-primary, #595b5e))}._Icon_17dpm_10 .secondary{--layer-color: var(--sxl-app-color-secondary, #9c27b0)}._Icon_17dpm_10 .secondary.light{--layer-color: var(--sxl-app-color-secondary-light, #a060ac)}._Icon_17dpm_10 .success{--layer-color: var(--sxl-app-color-success, #22c55e)}._Icon_17dpm_10 .success.light{--layer-color: var(--sxl-app-color-success-light, #22c55e)}._Icon_17dpm_10 .info{--layer-color: var(--sxl-app-color-info, #3b82f6)}._Icon_17dpm_10 .warn{--layer-color: var(--sxl-app-color-warn, #f59e0b)}._Icon_17dpm_10 .error{--layer-color: var(--sxl-app-color-error, #ef4444)}._Icon_17dpm_10 .error.light{--layer-color: var(--sxl-app-color-error-light, #f87171)}._Icon_17dpm_10 .grey{--layer-color: var(--sxl-app-color-grey, #cccccc)}._Icon_17dpm_10 .shadow{--layer-color: var(--sxl-app-color-shadow, #cccccc)}._Icon_17dpm_10 .fill:not(.fixed):not([fill]){fill:var(--layer-color);opacity:var(--layer-opacity);stroke:none}._Icon_17dpm_10 .line:not(.fixed):not([stroke]){fill:none;stroke:var(--layer-color, var(--icon-line-color));stroke-width:var(--icon-stroke-em);opacity:var(--layer-opacity, var(--icon-line-opacity));vector-effect:non-scaling-stroke;pointer-events:none;stroke-linecap:var(--icon-linecap, round);stroke-linejoin:var(--icon-linejoin, round);stroke-miterlimit:var(--icon-miter, 4)}@media (prefers-color-scheme: dark){._Icon_17dpm_10 .invert-dark{filter:invert(1) hue-rotate(180deg)}}._Icon_17dpm_10 .muted{opacity:calc(var(--layer-opacity, 1) * .6)}@keyframes _sxl-walk_17dpm_1{to{stroke-dashoffset:0}}.icon.walking .walkable.line{stroke-dasharray:var(--walk-dash-length, 5px) var(--walk-dash-gap, 2px);stroke-dashoffset:calc(var(--walk-dash-length, 5px) + var(--walk-dash-gap, 2px));animation:_sxl-walk_17dpm_1 var(--walk-duration, .96s) linear infinite;will-change:stroke-dashoffset}:root{--scrollbar-track-color: rgba(0,0,0,.06);--scrollbar-thumb-color: rgba(0,0,0,.35);--scrollbar-button-color: var(--scrollbar-thumb-color);--scrollbar-active-color: rgba(0,0,0,.55);--scrollbar-corner-color: transparent;--scrollbar-border-color: transparent}:root .has-touch-thumb,:root .has-touch-thumb *{--scrollbar-size: 4px;--scrollbar-border-width: 0px;--scrollbar-width: var(--scrollbar-size);--scrollbar-height: var(--scrollbar-size)}:root{--scrollbar-width: var(--scrollbar-size);--scrollbar-height: var(--scrollbar-size);--scrollbar-border-radius: 9999px;--scrollbar-border-width: 2px;--scrollbar-min-thumb-size: 24px}._scrollbar_gqxsx_24 ::-webkit-scrollbar-button{background:transparent}._scrollbar_gqxsx_24{display:flex;flex:1 1 100%;overflow:hidden;border-radius:var(--scrollbar-border-radius);align-items:center;border:var(--scrollbar-border-width) solid transparent}._scrollbar_gqxsx_24 ._track_gqxsx_35{background:var(--scrollbar-track-color);border-radius:var(--scrollbar-border-radius);position:relative;flex:1 1 100%;border:var(--scrollbar-border-width) solid transparent;touch-action:none;box-sizing:border-box;overflow:hidden}._scrollbar_gqxsx_24 ._thumb_gqxsx_47{background:var(--scrollbar-thumb-color);border-radius:var(--scrollbar-border-radius);transition:background .12s;touch-action:none}._scrollbar_gqxsx_24 ._thumb_gqxsx_47:hover{background:var(--scrollbar-active-color)}._scrollbar_gqxsx_24.vertical{flex-direction:column;min-width:var(--scrollbar-width, 0px);max-width:var(--scrollbar-width, 100%)}._scrollbar_gqxsx_24.vertical ._thumb_gqxsx_47{min-height:var(--scrollbar-min-thumb-size)}._scrollbar_gqxsx_24.vertical ._track_gqxsx_35{width:100%}._scrollbar_gqxsx_24.horizontal{flex-direction:row;min-height:var(--scrollbar-height, 0px);max-height:var(--scrollbar-height, 100%)}._scrollbar_gqxsx_24.horizontal ._thumb_gqxsx_47{min-width:var(--scrollbar-min-thumb-size)}._scrollbar_gqxsx_24.horizontal ._track_gqxsx_35{height:100%}._scrollbar_gqxsx_24.dragging ._thumb_gqxsx_47{background:var(--scrollbar-active-color)}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89{display:flex;align-items:center;justify-content:center;border:none;background:transparent;padding:0}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89>*{fill:var(--scrollbar-button-color);transition:fill .12s ease}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89:hover:not([disabled])>*{fill:var(--scrollbar-active-color)}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89[disabled]>*{fill:var(--scrollbar-button-color);opacity:.5}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89.vertical{width:var(--scrollbar-width)}._scrollbar_gqxsx_24 ._scrollbar-button_gqxsx_89.horizontal{height:var(--scrollbar-height)}._touch-thumb_gqxsx_124{position:absolute;cursor:grab;pointer-events:all;transition-property:opacity;border-radius:9999px;will-change:opacity;opacity:.7}._touch-thumb_gqxsx_124:hover,._touch-thumb_gqxsx_124.dragging{opacity:1}._scrollpane_1fbi8_2{position:relative;display:flex}._vertical-container_1fbi8_7{display:flex;flex:0}._horizontal-corner-container_1fbi8_12{display:flex;flex:none;flex-direction:row;align-items:stretch;justify-content:center}._horizontal-container_1fbi8_20{display:flex;flex:1 1 100%;flex-direction:column}._scrollbar-sizer_1fbi8_26{display:flex;flex:1 1 100%;align-items:stretch;justify-content:stretch}._scrollpane-content_1fbi8_34{position:relative;width:100%;flex:1 1 100%;display:flex;flex-direction:column;box-sizing:border-box}._scrollpane-content-element_1fbi8_43{display:flex;flex:1 1 100%;overflow:hidden}")),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { CommonUtils as te, DefaultNotifier as vn, Notifier as we, InternalClipboard as rt, ClipboardUtils as dt, MimeType as pt } from "@sheetxl/utils";
3
+ import ae, { useRef as K, useReducer as Yt, useMemo as R, useEffect as W, useState as q, version as bn, memo as me, forwardRef as Ee, useCallback as U, useLayoutEffect as Mt, createContext as Gt, useContext as qt, createElement as wn, useImperativeHandle as xn, Component as Sn } from "react";
4
4
  import { jsx as P, jsxs as pe, Fragment as fe } from "react/jsx-runtime";
5
- import { createRoot as Sn } from "react-dom/client";
6
- import { unstable_batchedUpdates as En, createPortal as Mn } from "react-dom";
5
+ import { createRoot as En } from "react-dom/client";
6
+ import { unstable_batchedUpdates as Mn, createPortal as Ln } from "react-dom";
7
7
  /**
8
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.17
8
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.18
9
9
  *
10
10
  * (C) 2025-present SheetXL Inc. & Michael T. Ford
11
11
  * License: The license can be found at https://www.sheetxl.com/license.
12
12
  */
13
- const Io = { General: "general", Left: "left", Right: "right", Center: "center", Justify: "justify", Fill: "fill", Distributed: "distributed", CenterContinuous: "centerContinuous" }, Z = { Shift: "shift", Alt: "alt", Ctrl: "ctrl", Meta: "meta" }, $o = { BackSpace: 8, Tab: 9, Clear: 12, Enter: 13, Shift: 16, Control: 17, Alt: 18, Pause: 19, CapsLock: 20, Escape: 27, Space: 32, PageUp: 33, PageDown: 34, End: 35, Home: 36, Left: 37, Up: 38, Right: 39, Down: 40, Insert: 45, Delete: 46, Digit_8: 56, Y: 89, Z: 90, Meta: 91, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, NumLock: 144, ScrollLock: 145, BackSlash: 220, Slash: 191, BracketRight: 221, BracketLeft: 219 }, Ko = { Left: 1, Middle: 2, Right: 3 };
14
- class yt {
13
+ const Vo = { General: "general", Left: "left", Right: "right", Center: "center", Justify: "justify", Fill: "fill", Distributed: "distributed", CenterContinuous: "centerContinuous" }, Q = { Shift: "shift", Alt: "alt", Ctrl: "ctrl", Meta: "meta" }, Fo = { BackSpace: 8, Tab: 9, Clear: 12, Enter: 13, Shift: 16, Control: 17, Alt: 18, Pause: 19, CapsLock: 20, Escape: 27, Space: 32, PageUp: 33, PageDown: 34, End: 35, Home: 36, Left: 37, Up: 38, Right: 39, Down: 40, Insert: 45, Delete: 46, Digit_8: 56, Y: 89, Z: 90, Meta: 91, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, NumLock: 144, ScrollLock: 145, BackSlash: 220, Slash: 191, BracketRight: 221, BracketLeft: 219 }, jo = { Left: 1, Middle: 2, Right: 3 };
14
+ class vt {
15
15
  constructor(e, t, n, r) {
16
16
  this._listenersProperties = /* @__PURE__ */ new Set(), this._listenersExecute = /* @__PURE__ */ new Set(), this._key = e, this._target = t, this._applyProps(n || {}), this._callback = r, r === void 0 && (this._callback = () => {
17
17
  console.log(`implement: ${this.label()} : ${this.description()}`);
@@ -122,21 +122,21 @@ class yt {
122
122
  }), t;
123
123
  }
124
124
  }
125
- class pt extends yt {
125
+ class ft extends vt {
126
126
  }
127
- var oe = typeof window < "u" ? window : { screen: {}, navigator: {} }, De = (oe.matchMedia || function() {
127
+ var re = typeof window < "u" ? window : { screen: {}, navigator: {} }, De = (re.matchMedia || function() {
128
128
  return { matches: !1 };
129
- }).bind(oe), Gt = !1, Ln = { get passive() {
130
- return Gt = !0;
131
- } }, Pt = function() {
129
+ }).bind(re), Zt = !1, Cn = { get passive() {
130
+ return Zt = !0;
131
+ } }, Dt = function() {
132
132
  };
133
- oe.addEventListener && oe.addEventListener("p", Pt, Ln), oe.removeEventListener && oe.removeEventListener("p", Pt, !1);
134
- var Cn = Gt, Tn = "PointerEvent" in oe, Mt = "ontouchstart" in oe, qt = Mt || "TouchEvent" in oe && De("(any-pointer: coarse)").matches, Dt = (oe.navigator.maxTouchPoints || 0) > 0 || qt, Zt = oe.navigator.userAgent || "", kn = De("(pointer: coarse)").matches && /iPad|Macintosh/.test(Zt) && Math.min(oe.screen.width || 0, oe.screen.height || 0) >= 768, Jt = (De("(pointer: coarse)").matches || !De("(pointer: fine)").matches && Mt) && !/Windows.*Firefox/.test(Zt), Pn = De("(any-pointer: fine)").matches || De("(any-hover: hover)").matches || kn || !Mt, vt = !Dt || !Pn && Jt ? Dt ? "touchOnly" : "mouseOnly" : "hybrid", Dn = vt === "mouseOnly" ? "mouse" : vt === "touchOnly" || Jt ? "touch" : "mouse";
135
- const An = Object.freeze(Object.defineProperty({ __proto__: null, deviceType: vt, primaryInput: Dn, supportsPassiveEvents: Cn, supportsPointerEvents: Tn, supportsTouchEvents: qt }, Symbol.toStringTag, { value: "Module" })), zn = /* @__PURE__ */ new Set(["INPUT", "TEXTAREA", "SELECT"]), Qt = {};
133
+ re.addEventListener && re.addEventListener("p", Dt, Cn), re.removeEventListener && re.removeEventListener("p", Dt, !1);
134
+ var Tn = Zt, kn = "PointerEvent" in re, Lt = "ontouchstart" in re, Jt = Lt || "TouchEvent" in re && De("(any-pointer: coarse)").matches, At = (re.navigator.maxTouchPoints || 0) > 0 || Jt, Qt = re.navigator.userAgent || "", Pn = De("(pointer: coarse)").matches && /iPad|Macintosh/.test(Qt) && Math.min(re.screen.width || 0, re.screen.height || 0) >= 768, en = (De("(pointer: coarse)").matches || !De("(pointer: fine)").matches && Lt) && !/Windows.*Firefox/.test(Qt), Dn = De("(any-pointer: fine)").matches || De("(any-hover: hover)").matches || Pn || !Lt, bt = !At || !Dn && en ? At ? "touchOnly" : "mouseOnly" : "hybrid", An = bt === "mouseOnly" ? "mouse" : bt === "touchOnly" || en ? "touch" : "mouse";
135
+ const zn = Object.freeze(Object.defineProperty({ __proto__: null, deviceType: bt, primaryInput: An, supportsPassiveEvents: Tn, supportsPointerEvents: kn, supportsTouchEvents: Jt }, Symbol.toStringTag, { value: "Module" })), Bn = /* @__PURE__ */ new Set(["INPUT", "TEXTAREA", "SELECT"]), tn = {};
136
136
  function $e() {
137
- return An;
137
+ return zn;
138
138
  }
139
- const en = (o) => o === "BracketLeft" ? "[" : o === "BracketRight" ? "]" : ee.camelToPrettyCase(o), et = (o, e) => {
139
+ const nn = (o) => o === "BracketLeft" ? "[" : o === "BracketRight" ? "]" : te.camelToPrettyCase(o), tt = (o, e) => {
140
140
  let t = !1, n = !1;
141
141
  const r = { nativeEvent: o, currentTarget: e || o.currentTarget, target: o.target, bubbles: o.bubbles, cancelable: o.cancelable, defaultPrevented: o.defaultPrevented, eventPhase: o.eventPhase, isTrusted: o.isTrusted, preventDefault: () => {
142
142
  t = !0, o.preventDefault();
@@ -146,12 +146,12 @@ const en = (o) => o === "BracketLeft" ? "[" : o === "BracketRight" ? "]" : ee.ca
146
146
  }, timeStamp: o.timeStamp, type: o.type };
147
147
  for (const i in o) i in r || typeof o[i] == "function" || (r[i] = o[i]);
148
148
  return r;
149
- }, Ro = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: Qt, boundPixel: function(o, e = !1, t = 0) {
149
+ }, Uo = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: tn, boundPixel: function(o, e = !1, t = 0) {
150
150
  return o;
151
- }, createSyntheticEvent: et, detectIt: $e, focusableNodeNames: zn, toPrettyKeyCode: en }, Symbol.toStringTag, { value: "Module" }));
152
- class tn {
151
+ }, createSyntheticEvent: tt, detectIt: $e, focusableNodeNames: Bn, toPrettyKeyCode: nn }, Symbol.toStringTag, { value: "Module" }));
152
+ class on {
153
153
  constructor(e, t) {
154
- this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = ee.uuidV4(), this._target = e, this._groupKey = t ?? null, this._root = this, this._nodes = /* @__PURE__ */ new Map(), this._nodes.set(t, this), this._children = /* @__PURE__ */ new Map(), this._listeners = /* @__PURE__ */ new Set(), this._commandsByKey = /* @__PURE__ */ new Map(), this._commandsByShortcut = /* @__PURE__ */ new Map();
154
+ this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = te.uuidV4(), this._target = e, this._groupKey = t ?? null, this._root = this, this._nodes = /* @__PURE__ */ new Map(), this._nodes.set(t, this), this._children = /* @__PURE__ */ new Map(), this._listeners = /* @__PURE__ */ new Set(), this._commandsByKey = /* @__PURE__ */ new Map(), this._commandsByShortcut = /* @__PURE__ */ new Map();
155
155
  const n = this;
156
156
  this._unListenersByCommand = /* @__PURE__ */ new Map(), this._listenersByKey = /* @__PURE__ */ new Map(), this._commandsPropertyListener = (r, i) => {
157
157
  const a = n._root._listenersByKey, u = i.key(), l = a.get(u);
@@ -176,7 +176,7 @@ class tn {
176
176
  l && (r = l), u = u._parent;
177
177
  }
178
178
  }
179
- r || (r = new tn(e, t), r._parent = this, r._root = this._root, r._unListenersByCommand = null, r._listenersByKey = null, r._commandsPropertyListener = null);
179
+ r || (r = new on(e, t), r._parent = this, r._root = this._root, r._unListenersByCommand = null, r._listenersByKey = null, r._commandsPropertyListener = null);
180
180
  const i = (u, l) => {
181
181
  !u.has(t) || n ? u.set(t, l) : n === void 0 && console.warn("commandGroup already registered", t);
182
182
  };
@@ -242,7 +242,7 @@ class tn {
242
242
  }
243
243
  findCommandByEvent(e) {
244
244
  const t = [];
245
- e.altKey && t.push(Z.Alt), e.shiftKey && t.push(Z.Shift), e.ctrlKey && t.push(Z.Ctrl), e.metaKey && t.push(Z.Meta);
245
+ e.altKey && t.push(Q.Alt), e.shiftKey && t.push(Q.Shift), e.ctrlKey && t.push(Q.Ctrl), e.metaKey && t.push(Q.Meta);
246
246
  let n = Oe({ key: e.code, modifiers: t });
247
247
  const r = this._commandsByShortcut;
248
248
  let i = r.get(n);
@@ -303,17 +303,17 @@ class tn {
303
303
  }), e;
304
304
  }
305
305
  }
306
- const Bn = ee.getOS() === ee.OSType.MacOS || ee.getOS() === ee.OSType.IOS ? "Cmd" : "Ctrl", On = ee.getOS() === ee.OSType.MacOS || ee.getOS() === ee.OSType.IOS ? "⌘" : "^", Oe = (o, e = !1) => {
306
+ const On = te.getOS() === te.OSType.MacOS || te.getOS() === te.OSType.IOS ? "Cmd" : "Ctrl", In = te.getOS() === te.OSType.MacOS || te.getOS() === te.OSType.IOS ? "⌘" : "^", Oe = (o, e = !1) => {
307
307
  const t = {};
308
308
  for (let r = 0; o.modifiers && r < o.modifiers.length; r++) t[o.modifiers[r]] = !0;
309
309
  let n = "";
310
- return (t?.[Z.Ctrl] || t?.[Z.Meta]) && (n += (n.length > 0 ? "+" : "") + (e ? On : Bn)), t?.[Z.Alt] && (n += e ? "⌥" : "Alt"), t?.[Z.Shift] && (n += (n.length > 0 ? "+" : "") + (e ? "⇧" : "Shift")), n += (n.length > 0 ? "+" : "") + en(o.key), n;
310
+ return (t?.[Q.Ctrl] || t?.[Q.Meta]) && (n += (n.length > 0 ? "+" : "") + (e ? In : On)), t?.[Q.Alt] && (n += e ? "⌥" : "Alt"), t?.[Q.Shift] && (n += (n.length > 0 ? "+" : "") + (e ? "⇧" : "Shift")), n += (n.length > 0 ? "+" : "") + nn(o.key), n;
311
311
  };
312
- function No(o, e = null) {
313
- const t = I(e);
312
+ function Xo(o, e = null) {
313
+ const t = K(e);
314
314
  t.current = e;
315
- const [n, r] = Ut((a) => a + 1, 0), i = K(() => Array.isArray(o) ? o : [o], [o]);
316
- return H(() => {
315
+ const [n, r] = Yt((a) => a + 1, 0), i = R(() => Array.isArray(o) ? o : [o], [o]);
316
+ return W(() => {
317
317
  if (!i || i.length === 0) return;
318
318
  const a = (s, c) => {
319
319
  t.current?.onChange?.(c), r();
@@ -325,7 +325,7 @@ function No(o, e = null) {
325
325
  t.current?.onError?.(s, c, h);
326
326
  } });
327
327
  const l = /* @__PURE__ */ new Set();
328
- for (let s = 0; s < i.length; s++) l.add(i[s]?.addPropertyListener(ee.debounce(a, 0), !0)), e && l.add(i[s]?.addExecuteListener(u));
328
+ for (let s = 0; s < i.length; s++) l.add(i[s]?.addPropertyListener(te.debounce(a, 0), !0)), e && l.add(i[s]?.addExecuteListener(u));
329
329
  return () => {
330
330
  l.forEach((s) => {
331
331
  s?.();
@@ -333,8 +333,8 @@ function No(o, e = null) {
333
333
  };
334
334
  }, [o]), n;
335
335
  }
336
- const qe = (o, e) => {
337
- if (!e || !o || e.length === 0) return ee.EmptyArray;
336
+ const Ze = (o, e) => {
337
+ if (!e || !o || e.length === 0) return te.EmptyArray;
338
338
  const t = e.length, n = new Array(t);
339
339
  for (let r = 0; r < t; r++) {
340
340
  const i = e[r], a = i ? o.getCommand(i) : null;
@@ -342,36 +342,36 @@ const qe = (o, e) => {
342
342
  }
343
343
  return n;
344
344
  };
345
- function Ho(o, e = null, t = null, n) {
346
- const r = I(t);
345
+ function Yo(o, e = null, t = null, n) {
346
+ const r = K(t);
347
347
  r.current = t, e && !Array.isArray(e) && (e = [e]);
348
- const [i, a] = Y(qe(o, e)), u = n ? [...n, o] : [o];
349
- return H(() => {
348
+ const [i, a] = q(Ze(o, e)), u = n ? [...n, o] : [o];
349
+ return W(() => {
350
350
  const l = { onGroupChange: () => {
351
- const d = qe(o, e);
351
+ const d = Ze(o, e);
352
352
  a(d), r.current?.onChange?.(this);
353
353
  } };
354
354
  let s;
355
355
  e && e.length > 0 && (s = { keys: e }, l.onCommandChange = (d, f) => {
356
- r.current?.onChange?.(o), a(qe(o, e));
356
+ r.current?.onChange?.(o), a(Ze(o, e));
357
357
  });
358
- const c = o?.addListener(l, s), h = qe(o, e);
358
+ const c = o?.addListener(l, s), h = Ze(o, e);
359
359
  return a(h), r.current?.onChange && r.current?.onChange(o), () => {
360
360
  c?.();
361
361
  };
362
362
  }, u), i;
363
363
  }
364
- const Wo = { Toolbar: "toolbar", Menuitem: "menuitem" }, Vo = { BottomEnd: "bottom-end", BottomStart: "bottom-start", Bottom: "bottom", LeftEnd: "left-end", LeftStart: "left-start", Left: "left", RightEnd: "right-end", RightStart: "right-start", Right: "right", TopEnd: "top-end", TopStart: "top-start", Top: "top" };
365
- function ft(o, e) {
364
+ const Go = { Toolbar: "toolbar", Menuitem: "menuitem" }, qo = { BottomEnd: "bottom-end", BottomStart: "bottom-start", Bottom: "bottom", LeftEnd: "left-end", LeftStart: "left-start", Left: "left", RightEnd: "right-end", RightStart: "right-start", Right: "right", TopEnd: "top-end", TopStart: "top-start", Top: "top" };
365
+ function mt(o, e) {
366
366
  if (typeof o == "function") return o(e);
367
367
  o && (o.current = e);
368
368
  }
369
- var Ae = parseInt(vn.split(".")[0], 10) >= 19 ? function(o) {
369
+ var Ae = parseInt(bn.split(".")[0], 10) >= 19 ? function(o) {
370
370
  return (e) => {
371
371
  const t = [];
372
372
  for (const n of o) {
373
- const r = ft(n, e), i = typeof r == "function";
374
- t.push(i ? r : () => ft(n, null));
373
+ const r = mt(n, e), i = typeof r == "function";
374
+ t.push(i ? r : () => mt(n, null));
375
375
  }
376
376
  return () => {
377
377
  for (const n of t) n();
@@ -379,11 +379,11 @@ var Ae = parseInt(vn.split(".")[0], 10) >= 19 ? function(o) {
379
379
  };
380
380
  } : function(o) {
381
381
  return (e) => {
382
- for (const t of o) ft(t, e);
382
+ for (const t of o) mt(t, e);
383
383
  };
384
384
  };
385
- const Fo = me(Ee((o, e) => {
386
- const { refFocusStart: t, ...n } = o, r = I(null), i = U(() => {
385
+ const Zo = me(Ee((o, e) => {
386
+ const { refFocusStart: t, ...n } = o, r = K(null), i = U(() => {
387
387
  if (t) return void t?.current?.focus();
388
388
  const a = r.current.parentElement.children;
389
389
  let u = [];
@@ -398,10 +398,10 @@ const Fo = me(Ee((o, e) => {
398
398
  }, [t]);
399
399
  return P("div", { tabIndex: 0, ref: Ae([r, e]), onFocus: i, ...n });
400
400
  }));
401
- var In = function() {
402
- }, nn = typeof window < "u", $n = nn ? Et : H, At = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
403
- const Se = nn && window.ResizeObserver !== void 0 ? function() {
404
- var o = Y(null), e = o[0], t = o[1], n = Y(At), r = n[0], i = n[1], a = K(function() {
401
+ var $n = function() {
402
+ }, rn = typeof window < "u", Kn = rn ? Mt : W, zt = { x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, bottom: 0, right: 0 };
403
+ const Se = rn && window.ResizeObserver !== void 0 ? function() {
404
+ var o = q(null), e = o[0], t = o[1], n = q(zt), r = n[0], i = n[1], a = R(function() {
405
405
  return new window.ResizeObserver(function(u) {
406
406
  if (u[0]) {
407
407
  var l = u[0].contentRect, s = l.x, c = l.y, h = l.width, d = l.height, f = l.top, m = l.left, p = l.bottom, x = l.right;
@@ -409,66 +409,66 @@ const Se = nn && window.ResizeObserver !== void 0 ? function() {
409
409
  }
410
410
  });
411
411
  }, []);
412
- return $n(function() {
412
+ return Kn(function() {
413
413
  if (e) return a.observe(e), function() {
414
414
  a.disconnect();
415
415
  };
416
416
  }, [e]), [t, r];
417
417
  } : function() {
418
- return [In, At];
419
- }, jo = me(Ee((o, e) => {
420
- const { className: t, style: n, children: r, radius: i = 4, strokeWidth: a = 1, strokeColor: u = "grey", ...l } = o, [s, { width: c, height: h }] = Se(), d = I(null), f = (T, _ = 0) => {
421
- const w = T / 2, y = h - w + _;
422
- return (function(z, E, B = !1) {
423
- if (E === 0) return z;
424
- function $(g, L, R) {
425
- let N = L.x - g.x, G = L.y - g.y, D = Math.sqrt(N * N + G * G);
426
- return S(g, L, Math.min(1, R / D));
418
+ return [$n, zt];
419
+ }, Jo = me(Ee((o, e) => {
420
+ const { className: t, style: n, children: r, radius: i = 4, strokeWidth: a = 1, strokeColor: u = "grey", ...l } = o, [s, { width: c, height: h }] = Se(), d = K(null), f = (L, y = 0) => {
421
+ const _ = L / 2, v = h - _ + y;
422
+ return (function(B, S, O = !1) {
423
+ if (S === 0) return B;
424
+ function I(T, g, A) {
425
+ let H = g.x - T.x, X = g.y - T.y, D = Math.sqrt(H * H + X * X);
426
+ return M(T, g, Math.min(1, A / D));
427
427
  }
428
- function S(g, L, R) {
429
- return { x: g.x + (L.x - g.x) * R, y: g.y + (L.y - g.y) * R };
428
+ function M(T, g, A) {
429
+ return { x: T.x + (g.x - T.x) * A, y: T.y + (g.y - T.y) * A };
430
430
  }
431
- function b(g, L) {
432
- g.length > 2 && (g[g.length - 2] = L.x, g[g.length - 1] = L.y);
431
+ function b(T, g) {
432
+ T.length > 2 && (T[T.length - 2] = g.x, T[T.length - 1] = g.y);
433
433
  }
434
- function C(g) {
435
- return { x: parseFloat(g[g.length - 2]), y: parseFloat(g[g.length - 1]) };
434
+ function C(T) {
435
+ return { x: parseFloat(T[T.length - 2]), y: parseFloat(T[T.length - 1]) };
436
436
  }
437
- let M = z.split(/[,\s]/).reduce(function(g, L) {
438
- let R = L.match("([a-zA-Z])(.+)");
439
- return R ? (g.push(R[1]), g.push(R[2])) : g.push(L), g;
440
- }, []).reduce(function(g, L) {
441
- return parseFloat(L) == L && g.length ? g[g.length - 1].push(L) : g.push([L]), g;
442
- }, []), O = [];
443
- if (M.length > 1) {
444
- let g = C(M[0]), L = null;
445
- M[M.length - 1][0] === "Z" && M[0].length > 2 && (L = ["L", g.x, g.y], M[M.length - 1] = L), O.push(M[0]);
446
- for (let R = 1; R < M.length; R++) {
447
- let N = O[O.length - 1], G = M[R], D = G === L ? M[1] : M[R + 1];
448
- if (D && N && N.length > 2 && G[0] === "L" && D.length > 2 && D[0] === "L") {
449
- let F, W, X = C(N), J = C(G), Me = C(D);
450
- B ? (F = S(J, N.origPoint || X, E), W = S(J, D.origPoint || Me, E)) : (F = $(J, X, E), W = $(J, Me, E)), b(G, F), G.origPoint = J, O.push(G);
451
- let _e = S(F, J, 0.5), Le = S(J, W, 0.5), ge = ["C", _e.x, _e.y, Le.x, Le.y, W.x, W.y];
452
- ge.origPoint = J, O.push(ge);
453
- } else O.push(G);
437
+ let E = B.split(/[,\s]/).reduce(function(T, g) {
438
+ let A = g.match("([a-zA-Z])(.+)");
439
+ return A ? (T.push(A[1]), T.push(A[2])) : T.push(g), T;
440
+ }, []).reduce(function(T, g) {
441
+ return parseFloat(g) == g && T.length ? T[T.length - 1].push(g) : T.push([g]), T;
442
+ }, []), $ = [];
443
+ if (E.length > 1) {
444
+ let T = C(E[0]), g = null;
445
+ E[E.length - 1][0] === "Z" && E[0].length > 2 && (g = ["L", T.x, T.y], E[E.length - 1] = g), $.push(E[0]);
446
+ for (let A = 1; A < E.length; A++) {
447
+ let H = $[$.length - 1], X = E[A], D = X === g ? E[1] : E[A + 1];
448
+ if (D && H && H.length > 2 && X[0] === "L" && D.length > 2 && D[0] === "L") {
449
+ let F, V, Y = C(H), ee = C(X), Me = C(D);
450
+ O ? (F = M(ee, H.origPoint || Y, S), V = M(ee, D.origPoint || Me, S)) : (F = I(ee, Y, S), V = I(ee, Me, S)), b(X, F), X.origPoint = ee, $.push(X);
451
+ let _e = M(F, ee, 0.5), Le = M(ee, V, 0.5), ge = ["C", _e.x, _e.y, Le.x, Le.y, V.x, V.y];
452
+ ge.origPoint = ee, $.push(ge);
453
+ } else $.push(X);
454
454
  }
455
- if (L) {
456
- let R = C(O[O.length - 1]);
457
- O.push(["Z"]), b(O[0], R);
455
+ if (g) {
456
+ let A = C($[$.length - 1]);
457
+ $.push(["Z"]), b($[0], A);
458
458
  }
459
- } else O = M;
460
- return O.reduce(function(g, L) {
461
- return g + L.join(" ") + " ";
459
+ } else $ = E;
460
+ return $.reduce(function(T, g) {
461
+ return T + g.join(" ") + " ";
462
462
  }, "");
463
- })(`${`M 0 ${w} L ${i - 0.5} ${w} L ${i - 0.5} ${y} L ${2 * i} ${y}`} ${`L ${c - 2 * i} ${y}`} ${`M ${c - 2 * i} ${y} L ${c - i} ${y} L ${c - i} ${w} L ${c} ${w}`}`, i);
464
- }, m = K(() => f(a), [c, h, i, a]), p = K(() => {
463
+ })(`${`M 0 ${_} L ${i - 0.5} ${_} L ${i - 0.5} ${v} L ${2 * i} ${v}`} ${`L ${c - 2 * i} ${v}`} ${`M ${c - 2 * i} ${v} L ${c - i} ${v} L ${c - i} ${_} L ${c} ${_}`}`, i);
464
+ }, m = R(() => f(a), [c, h, i, a]), p = R(() => {
465
465
  if (i === 0) return;
466
- const T = i / 2;
467
- return f(i) + `L ${c} 0 L 0 0 L 0 ${T}`;
468
- }, [m, i, a]), x = K(() => ({ style: { clipPath: `path('${p}')` } }), [p]);
466
+ const L = i / 2;
467
+ return f(i) + `L ${c} 0 L 0 0 L 0 ${L}`;
468
+ }, [m, i, a]), x = R(() => ({ style: { clipPath: `path('${p}')` } }), [p]);
469
469
  return pe("div", { className: t, style: { display: "flex", flexDirection: "row", ...n }, ...l, ref: Ae([d, s, e]), children: [ae.isValidElement(r) ? ae.cloneElement(r, x) : P(fe, {}), P("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: c, height: h, viewBox: `0 0 ${c} ${h}`, children: P("path", { d: m, stroke: u, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: a }) })] });
470
- })), zt = { Default: "default", Error: "error", Success: "success", Warning: "warning", Info: "info" };
471
- class Kn extends yn {
470
+ })), Bt = { Default: "default", Error: "error", Success: "success", Warning: "warning", Info: "info" };
471
+ class Nn extends vn {
472
472
  setOverrides(e) {
473
473
  super.setOverrides(e);
474
474
  }
@@ -478,7 +478,7 @@ class Kn extends yn {
478
478
  showMessage(e, t) {
479
479
  const n = this.getDelegate();
480
480
  if (n?.showMessage) return n.showMessage(e, t);
481
- t?.type !== zt.Warning ? t?.type !== zt.Error ? be.log(e) : be.error(e) : be.warn(e);
481
+ t?.type !== Bt.Warning ? t?.type !== Bt.Error ? we.log(e) : we.error(e) : we.warn(e);
482
482
  }
483
483
  showBusy(e, t) {
484
484
  const n = this.getDelegate();
@@ -493,7 +493,7 @@ class Kn extends yn {
493
493
  }
494
494
  showError(e) {
495
495
  const t = this.getDelegate();
496
- t?.showError ? t.showError(e) : be.error(e);
496
+ t?.showError ? t.showError(e) : we.error(e);
497
497
  }
498
498
  showOptions(e) {
499
499
  const t = this.getDelegate();
@@ -504,52 +504,52 @@ class Kn extends yn {
504
504
  return t?.showInput ? t.showInput(e) : Promise.resolve({ input: "", option: "" });
505
505
  }
506
506
  }
507
- const on = Xt(new Kn()), Uo = ({ children: o, notifier: e }) => (ae.useEffect(() => {
508
- const t = be.getOverrides();
509
- return be.setOverrides(e), () => {
510
- be.setOverrides(t);
507
+ const sn = Gt(new Nn()), Qo = ({ children: o, notifier: e }) => (ae.useEffect(() => {
508
+ const t = we.getOverrides();
509
+ return we.setOverrides(e), () => {
510
+ we.setOverrides(t);
511
511
  };
512
- }, [e]), ae.createElement(on.Provider, { value: e }, o)), it = () => Yt(on), Rn = 3, Nn = 0.5, Hn = 50, mt = (o) => ({ x: o.x, y: o.y, width: o.width, height: o.height, top: o.top, left: o.left, right: o.right, bottom: o.bottom });
513
- function Wn(o = {}) {
514
- const { threshold: e = Nn, stillnessThreshold: t = Rn, maxHierarchyDepth: n = Hn } = o, [r, i] = Se(), a = I(null), [u, l] = Ut((m) => m + 1, 0), s = I(void 0), c = I({ x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0 }), h = U((m) => {
512
+ }, [e]), ae.createElement(sn.Provider, { value: e }, o)), st = () => qt(sn), Rn = 3, Hn = 0.5, Wn = 50, _t = (o) => ({ x: o.x, y: o.y, width: o.width, height: o.height, top: o.top, left: o.left, right: o.right, bottom: o.bottom });
513
+ function Vn(o = {}) {
514
+ const { threshold: e = Hn, stillnessThreshold: t = Rn, maxHierarchyDepth: n = Wn } = o, [r, i] = Se(), a = K(null), [u, l] = Yt((m) => m + 1, 0), s = K(void 0), c = K({ x: 0, y: 0, width: 0, height: 0, top: 0, left: 0, right: 0, bottom: 0 }), h = U((m) => {
515
515
  a.current = m, typeof r == "function" && r(m);
516
- }, [r]), [d, f] = Y(i);
517
- return H(() => {
516
+ }, [r]), [d, f] = q(i);
517
+ return W(() => {
518
518
  i && !d && f(i);
519
- }, [i, d]), H(() => {
519
+ }, [i, d]), W(() => {
520
520
  const m = a.current;
521
521
  if (!m) return;
522
522
  let p = !1, x = 0;
523
- const T = () => {
523
+ const L = () => {
524
524
  if (!m) return;
525
- const E = m.getBoundingClientRect(), B = c.current;
526
- Math.abs(E.x - B.x) > e || Math.abs(E.y - B.y) > e || Math.abs(E.width - B.width) > e || Math.abs(E.height - B.height) > e ? (p || (p = !0, f(mt(E)), l()), x = 0) : x++, p && x >= t && (p = !1, f(mt(E)), l()), c.current = mt(E), s.current = requestAnimationFrame(T);
525
+ const S = m.getBoundingClientRect(), O = c.current;
526
+ Math.abs(S.x - O.x) > e || Math.abs(S.y - O.y) > e || Math.abs(S.width - O.width) > e || Math.abs(S.height - O.height) > e ? (p || (p = !0, f(_t(S)), l()), x = 0) : x++, p && x >= t && (p = !1, f(_t(S)), l()), c.current = _t(S), s.current = requestAnimationFrame(L);
527
527
  };
528
- s.current = requestAnimationFrame(T);
529
- const _ = (E) => {
528
+ s.current = requestAnimationFrame(L);
529
+ const y = (S) => {
530
530
  p = !0, l();
531
- }, w = (E) => {
531
+ }, _ = (S) => {
532
532
  p = !1, x = t, l();
533
533
  };
534
- let y = m;
535
- const z = [];
536
- for (; y && y !== document.documentElement && (y.addEventListener("animationstart", _, !0), y.addEventListener("animationend", w, !0), y.addEventListener("transitionstart", _, !0), y.addEventListener("transitionend", w, !0), z.push(y), y = y.parentElement, !(z.length > n)); ) ;
534
+ let v = m;
535
+ const B = [];
536
+ for (; v && v !== document.documentElement && (v.addEventListener("animationstart", y, !0), v.addEventListener("animationend", _, !0), v.addEventListener("transitionstart", y, !0), v.addEventListener("transitionend", _, !0), B.push(v), v = v.parentElement, !(B.length > n)); ) ;
537
537
  return () => {
538
- s.current && cancelAnimationFrame(s.current), z.forEach((E) => {
539
- E.removeEventListener("animationstart", _, !0), E.removeEventListener("animationend", w, !0), E.removeEventListener("transitionstart", _, !0), E.removeEventListener("transitionend", w, !0);
538
+ s.current && cancelAnimationFrame(s.current), B.forEach((S) => {
539
+ S.removeEventListener("animationstart", y, !0), S.removeEventListener("animationend", _, !0), S.removeEventListener("transitionstart", y, !0), S.removeEventListener("transitionend", _, !0);
540
540
  });
541
541
  };
542
542
  }, [u, i, e, t, n]), [h, d];
543
543
  }
544
544
  const k = (o, e) => {
545
- const t = U((...i) => o?.(...i), e), n = I(null);
545
+ const t = U((...i) => o?.(...i), e), n = K(null);
546
546
  n.current = t;
547
547
  const r = U((...i) => n.current?.(...i), []);
548
548
  if (n.current) return r;
549
549
  };
550
- function Xo(o) {
551
- const [e, t] = Y(typeof window < "u" ? window.devicePixelRatio : 1), n = I(null);
552
- return H(() => {
550
+ function er(o) {
551
+ const [e, t] = q(typeof window < "u" ? window.devicePixelRatio : 1), n = K(null);
552
+ return W(() => {
553
553
  if (!(typeof window < "u" && "matchMedia" in window)) return;
554
554
  const r = () => {
555
555
  const i = window.matchMedia(`screen and (resolution: ${window.devicePixelRatio}dppx)`);
@@ -560,14 +560,14 @@ function Xo(o) {
560
560
  };
561
561
  }, [o]), e;
562
562
  }
563
- function Yo(o) {
563
+ function tr(o) {
564
564
  if (typeof window > "u") return 1;
565
565
  const { defaultDpr: e = 1, maxDpr: t = 3, round: n = !0 } = o || {}, r = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : e;
566
566
  return Math.min(Math.max(1, n ? Math.floor(r) : r), t);
567
567
  }
568
- function Go(o, e, t) {
568
+ function nr(o, e, t) {
569
569
  const n = k(e, [e]);
570
- H(() => {
570
+ W(() => {
571
571
  const r = (i) => {
572
572
  o.current && !o.current.contains(i.target) && n(i);
573
573
  };
@@ -576,232 +576,232 @@ function Go(o, e, t) {
576
576
  };
577
577
  }, [o]);
578
578
  }
579
- let Ze = 0;
580
- function Vn() {
581
- const [o, e] = Y(!!document.fullscreenElement), t = U(() => {
579
+ let Je = 0;
580
+ function Fn() {
581
+ const [o, e] = q(!!document.fullscreenElement), t = U(() => {
582
582
  const n = document.fullscreenElement;
583
583
  return n ? n.querySelector(".fullscreen-portal-root") || n : document.body;
584
584
  }, []);
585
- return H(() => {
585
+ return W(() => {
586
586
  function n() {
587
587
  const r = document.fullscreenElement;
588
588
  if (e(!!r), !r) return;
589
589
  let i = r.querySelector(".fullscreen-portal-root");
590
590
  i || (i = document.createElement("div"), i.className = "fullscreen-portal-root _fullscreen-portal-root_1mjsr_4", r.appendChild(i));
591
591
  }
592
- return Ze++, n(), document.addEventListener("fullscreenchange", n), () => {
593
- document.removeEventListener("fullscreenchange", n), Ze--, Ze <= 0 && (document.querySelectorAll(".fullscreen-portal-root").forEach((r) => {
592
+ return Je++, n(), document.addEventListener("fullscreenchange", n), () => {
593
+ document.removeEventListener("fullscreenchange", n), Je--, Je <= 0 && (document.querySelectorAll(".fullscreen-portal-root").forEach((r) => {
594
594
  r.parentNode && r.parentNode.removeChild(r);
595
- }), Ze = 0);
595
+ }), Je = 0);
596
596
  };
597
597
  }, []), { getPortalContainer: t, isFullscreen: o };
598
598
  }
599
- function rn(o) {
599
+ function ln(o) {
600
600
  if (!o) throw new Error("must have a PointerHandlerOptions");
601
- const { onPointerDown: e, onPointerUp: t, onPointerMoveOrWait: n, processTouch: r = !1, consumeTouch: i = !0 } = o, a = k(e, [e]), u = k(t, [t]), l = k(n, [n]), s = I(!1), c = o?.timerInitial ?? 230, h = o?.timerContinuous ?? c / 2, d = I(null), f = I(null), m = I(null), p = I(null), x = U(() => {
601
+ const { onPointerDown: e, onPointerUp: t, onPointerMoveOrWait: n, processTouch: r = !1, consumeTouch: i = !0 } = o, a = k(e, [e]), u = k(t, [t]), l = k(n, [n]), s = K(!1), c = o?.timerInitial ?? 230, h = o?.timerContinuous ?? c / 2, d = K(null), f = K(null), m = K(null), p = K(null), x = U(() => {
602
602
  p.current && (clearTimeout(p.current), p.current = null);
603
- }, []), T = U((b) => {
603
+ }, []), L = U((b) => {
604
604
  p.current = setTimeout(() => {
605
605
  window.requestAnimationFrame(() => {
606
606
  if (s.current === !1) return;
607
- const C = f.current, M = d.current, O = et(C, M.currentTarget);
608
- l?.(O, m.current, M);
609
- }), T(h);
607
+ const C = f.current, E = d.current, $ = tt(C, E.currentTarget);
608
+ l?.($, m.current, E);
609
+ }), L(h);
610
610
  }, b ?? c);
611
611
  }, []);
612
- H(() => () => x(), []);
613
- const _ = r ? "pointer" : "mouse", w = U((b) => {
612
+ W(() => () => x(), []);
613
+ const y = r ? "pointer" : "mouse", _ = U((b) => {
614
614
  b.stopPropagation(), b.stopImmediatePropagation(), b.preventDefault();
615
- }, []), y = k((b) => {
616
- document.removeEventListener(`${_}move`, B), document.removeEventListener(`${_}up`, y), document.removeEventListener("keydown", $), document.removeEventListener("keyup", S), document.removeEventListener("touchstart", w, { capture: !0 }), document.removeEventListener("touchmove", w, { capture: !0 }), window.removeEventListener("blur", z), x(), window.requestAnimationFrame(() => {
615
+ }, []), v = k((b) => {
616
+ document.removeEventListener(`${y}move`, O), document.removeEventListener(`${y}up`, v), document.removeEventListener("keydown", I), document.removeEventListener("keyup", M), document.removeEventListener("touchstart", _, { capture: !0 }), document.removeEventListener("touchmove", _, { capture: !0 }), window.removeEventListener("blur", B), x(), window.requestAnimationFrame(() => {
617
617
  if (s.current === !1) return;
618
618
  s.current = !1;
619
- const C = b, M = d.current, O = et(C, M.currentTarget);
620
- u?.(O, m.current, M), m.current = null;
619
+ const C = b, E = d.current, $ = tt(C, E.currentTarget);
620
+ u?.($, m.current, E), m.current = null;
621
621
  });
622
- }, []), z = U(() => {
623
- s.current !== !1 && (s.current = !1, y(f.current));
624
- }, []), E = k(() => {
625
- x(), T(h), window.requestAnimationFrame(() => {
622
+ }, []), B = U(() => {
623
+ s.current !== !1 && (s.current = !1, v(f.current));
624
+ }, []), S = k(() => {
625
+ x(), L(h), window.requestAnimationFrame(() => {
626
626
  if (s.current === !1) return;
627
- const b = f.current, C = d.current, M = et(b, C.currentTarget);
628
- l?.(M, m.current, C);
627
+ const b = f.current, C = d.current, E = tt(b, C.currentTarget);
628
+ l?.(E, m.current, C);
629
629
  });
630
- }, [h]), B = k((b) => {
631
- f.current = b, E();
632
- }, []), $ = k((b) => {
633
- m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, E();
634
- }, []), S = k((b) => {
635
- m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, E();
630
+ }, [h]), O = k((b) => {
631
+ f.current = b, S();
632
+ }, []), I = k((b) => {
633
+ m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, S();
634
+ }, []), M = k((b) => {
635
+ m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, S();
636
636
  }, [h]);
637
637
  return k((b) => {
638
- b.isDefaultPrevented() || (m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, a(b, m.current) !== !1 && (d.current = b, f.current = b.nativeEvent, document.addEventListener(`${_}up`, y, { passive: !1 }), document.addEventListener(`${_}move`, B, { passive: !1 }), document.addEventListener("keydown", $, { passive: !1 }), document.addEventListener("keyup", S, { passive: !1 }), window.addEventListener("blur", z, { passive: !0 }), r && i && (document.addEventListener("touchstart", w, { passive: !1, capture: !0 }), document.addEventListener("touchmove", w, { passive: !1, capture: !0 })), s.current = !0, T(c)));
638
+ b.isDefaultPrevented() || (m.current = { ctrlKey: b.ctrlKey, shiftKey: b.shiftKey, altKey: b.altKey, metaKey: b.metaKey }, a(b, m.current) !== !1 && (d.current = b, f.current = b.nativeEvent, document.addEventListener(`${y}up`, v, { passive: !1 }), document.addEventListener(`${y}move`, O, { passive: !1 }), document.addEventListener("keydown", I, { passive: !1 }), document.addEventListener("keyup", M, { passive: !1 }), window.addEventListener("blur", B, { passive: !0 }), r && i && (document.addEventListener("touchstart", _, { passive: !1, capture: !0 }), document.addEventListener("touchmove", _, { passive: !1, capture: !0 })), s.current = !0, L(c)));
639
639
  }, [c, r]);
640
640
  }
641
- function qo(o, e) {
642
- return rn({ onPointerDown: o, onPointerMoveOrWait: (t, n, r) => {
641
+ function or(o, e) {
642
+ return ln({ onPointerDown: o, onPointerMoveOrWait: (t, n, r) => {
643
643
  o?.(r);
644
644
  }, ...e });
645
645
  }
646
- const Fn = ({ initValue: o, useHookBody: e, applyStateChange: t }) => {
647
- const n = I(o);
646
+ const jn = ({ initValue: o, useHookBody: e, applyStateChange: t }) => {
647
+ const n = K(o);
648
648
  if (typeof e != "function") throw new Error("function expected as hook body parameter. got " + typeof e);
649
649
  const r = e();
650
- return Et(() => {
650
+ return Mt(() => {
651
651
  n.current !== r && (n.current = r, t(r));
652
652
  }, [t, r]), null;
653
653
  }, wt = (o) => {
654
654
  console && console.warn && console.warn(o);
655
- }, _t = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || void 0;
656
- let jn = 1, bt = !1, sn = !1;
657
- const tt = [], Pe = [], rt = () => {
655
+ }, gt = typeof self == "object" && self.self === self && self || typeof global == "object" && global.global === global && global || void 0;
656
+ let Un = 1, xt = !1, an = !1;
657
+ const nt = [], Pe = [], it = () => {
658
658
  Pe.forEach((o) => o());
659
- }, Un = ({ automaticContainerInternalUseOnly: o }) => {
660
- const [e, t] = Y([]), n = I([]);
661
- return n.current = e, o || bt !== !1 || (sn = !0), H(() => {
659
+ }, Xn = ({ automaticContainerInternalUseOnly: o }) => {
660
+ const [e, t] = q([]), n = K([]);
661
+ return n.current = e, o || xt !== !1 || (an = !0), W(() => {
662
662
  let r = !0;
663
663
  function i() {
664
- if (r) return Pe[0] !== i ? (o || bt !== !0 || wt("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void t((a) => [])) : void t([...tt]);
664
+ if (r) return Pe[0] !== i ? (o || xt !== !0 || wt("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void t((a) => [])) : void t([...nt]);
665
665
  }
666
- return Pe.push(i), rt(), () => {
667
- r = !1, n.current?.length > 0 && wt("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), Pe.splice(Pe.indexOf(i), 1), rt();
666
+ return Pe.push(i), it(), () => {
667
+ r = !1, n.current?.length > 0 && wt("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), Pe.splice(Pe.indexOf(i), 1), it();
668
668
  };
669
- }, [o]), P(fe, { children: e.map(({ hook: r, key: i }) => wn(Fn, { ...r, key: i })) });
670
- }, Xn = (o) => {
671
- const e = jn++;
672
- return tt.push({ hook: o, key: e }), Pe.length === 0 && sn === !1 && (bt = !0, ((t) => {
673
- if (_t.document && _t.document.createElement) {
674
- const n = _t.document.createElement("div");
675
- Sn(n).render(P(t, { automaticContainerInternalUseOnly: !0 }));
669
+ }, [o]), P(fe, { children: e.map(({ hook: r, key: i }) => wn(jn, { ...r, key: i })) });
670
+ }, Yn = (o) => {
671
+ const e = Un++;
672
+ return nt.push({ hook: o, key: e }), Pe.length === 0 && an === !1 && (xt = !0, ((t) => {
673
+ if (gt.document && gt.document.createElement) {
674
+ const n = gt.document.createElement("div");
675
+ En(n).render(P(t, { automaticContainerInternalUseOnly: !0 }));
676
676
  } else wt("Can not mount SingletonHooksContainer on server side. Did you manage to run useEffect on server? Please mount SingletonHooksContainer into your components tree manually.");
677
- })(Un)), rt(), () => {
678
- tt.splice(tt.findIndex((t) => t.key === e), 1), rt();
677
+ })(Xn)), it(), () => {
678
+ nt.splice(nt.findIndex((t) => t.key === e), 1), it();
679
679
  };
680
680
  };
681
- let xt = null;
682
- xt || (xt = (o, e, t = {}) => {
681
+ let St = null;
682
+ St || (St = (o, e, t = {}) => {
683
683
  let n, r, i = !1, a = !1, u = [], { unmountIfNoConsumers: l = !1 } = t;
684
684
  const s = (h) => {
685
- r = h, En(() => u.forEach((d) => d(h)));
685
+ r = h, Mn(() => u.forEach((d) => d(h)));
686
686
  }, c = () => (a || (r = typeof o == "function" ? o() : o, a = !0), r);
687
687
  return () => {
688
- const [h, d] = Y(c);
689
- return H(() => (i || (i = !0, n = Xn({ initValue: o, useHookBody: e, applyStateChange: s })), u.push(d), r !== h && d(r), () => {
688
+ const [h, d] = q(c);
689
+ return W(() => (i || (i = !0, n = Yn({ initValue: o, useHookBody: e, applyStateChange: s })), u.push(d), r !== h && d(r), () => {
690
690
  u.splice(u.indexOf(d), 1), u.length === 0 && l && (n(), i = !1);
691
691
  }), []), h;
692
692
  };
693
693
  });
694
- const ln = xt;
695
- let an = () => {
694
+ const cn = St;
695
+ let un = () => {
696
696
  console.warn("You must call useEditMode before setting its state.");
697
697
  };
698
- const Yn = ln(null, () => {
699
- const [o, e] = Y(null);
700
- return an = e, o;
701
- }), Zo = () => {
702
- const o = Yn();
703
- return K(() => ({ setMode: (e) => {
704
- an((t) => (typeof e == "function" && (e = e(t)), e?.onModeChange?.(e ?? null), e));
698
+ const Gn = cn(null, () => {
699
+ const [o, e] = q(null);
700
+ return un = e, o;
701
+ }), rr = () => {
702
+ const o = Gn();
703
+ return R(() => ({ setMode: (e) => {
704
+ un((t) => (typeof e == "function" && (e = e(t)), e?.onModeChange?.(e ?? null), e));
705
705
  }, getMode: () => o }), [o]);
706
- }, Gn = ln({ setClipboard: (o) => {
706
+ }, qn = cn({ setClipboard: (o) => {
707
707
  throw new Error("This is only available via the useClipboard.");
708
- }, getClipboard: () => ot.Global, refNativeCopy: { current: null }, refNativeLastKey: { current: null } }, () => {
709
- const [o, e] = Y(ot.Global);
710
- return { setClipboard: (t) => e(t), getClipboard: () => o, refNativeCopy: I(null), refNativeLastKey: I(null) };
711
- }), Jo = (o) => {
712
- const { source: e, target: t, onPaste: n, onClipboardUpdate: r, commands: i } = o, a = it(), u = k(r, [r]), l = k(n, [n]), { getClipboard: s, refNativeCopy: c } = Gn(), h = s();
713
- K(() => {
714
- const _ = e?.element, w = t?.element ?? e?.element;
708
+ }, getClipboard: () => rt.Global, refNativeCopy: { current: null }, refNativeLastKey: { current: null } }, () => {
709
+ const [o, e] = q(rt.Global);
710
+ return { setClipboard: (t) => e(t), getClipboard: () => o, refNativeCopy: K(null), refNativeLastKey: K(null) };
711
+ }), ir = (o) => {
712
+ const { source: e, target: t, onPaste: n, onClipboardUpdate: r, commands: i } = o, a = st(), u = k(r, [r]), l = k(n, [n]), { getClipboard: s, refNativeCopy: c } = qn(), h = s();
713
+ R(() => {
714
+ const y = e?.element, _ = t?.element ?? e?.element;
715
715
  if (!i) return;
716
- const y = [new pt("cut", _, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", icon: "cut", shortcut: { key: "X", modifiers: [Z.Ctrl] } }), new pt("copy", _, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", icon: "copy", shortcut: { key: "C", modifiers: [Z.Ctrl] } }), new pt("paste", w, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste.yellow", shortcut: [{ key: "V", modifiers: [Z.Ctrl] }, { key: "F8", modifiers: [Z.Ctrl] }] })];
717
- i?.addCommands(y, !0);
716
+ const v = [new ft("cut", y, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", icon: "cut", shortcut: { key: "X", modifiers: [Q.Ctrl] } }), new ft("copy", y, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", icon: "copy", shortcut: { key: "C", modifiers: [Q.Ctrl] } }), new ft("paste", _, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste.yellow", shortcut: [{ key: "V", modifiers: [Q.Ctrl] }, { key: "F8", modifiers: [Q.Ctrl] }] })];
717
+ i?.addCommands(v, !0);
718
718
  }, [i]);
719
- const d = k(async (_) => {
719
+ const d = k(async (y) => {
720
720
  if (!e?.element) return;
721
- let w = null;
721
+ let _ = null;
722
722
  try {
723
- w = e.doCopy?.(_), typeof w == "string" ? await h.writeText(w) : await h.writeReference(w);
724
- } catch (y) {
725
- throw y;
723
+ _ = e.doCopy?.(y), typeof _ == "string" ? await h.writeText(_) : await h.writeReference(_);
724
+ } catch (v) {
725
+ throw v;
726
726
  }
727
- }, [e, a]), f = k(async (_) => {
728
- const w = e?.element?.();
729
- if (w) {
730
- c.current = { sourceElement: w, args: _ };
727
+ }, [e, a]), f = k(async (y) => {
728
+ const _ = e?.element?.();
729
+ if (_) {
730
+ c.current = { sourceElement: _, args: y };
731
731
  try {
732
- await d(_);
733
- } catch (y) {
734
- a.showError?.(y);
732
+ await d(y);
733
+ } catch (v) {
734
+ a.showError?.(v);
735
735
  }
736
736
  }
737
737
  }, [e?.element, a]), m = U(() => {
738
738
  f({ isCut: !0 });
739
- }, []), p = k(async (_, w, y) => {
739
+ }, []), p = k(async (y, _, v) => {
740
740
  try {
741
- if (await _.doPaste(w, y) === !1) return;
742
- l?.(w, y);
743
- } catch (z) {
744
- a.showError?.(z);
741
+ if (await y.doPaste(_, v) === !1) return;
742
+ l?.(_, v);
743
+ } catch (B) {
744
+ a.showError?.(B);
745
745
  }
746
- }, [l]), x = k(async (_, w, y) => {
747
- const z = t?.element?.();
748
- if (z && await ee.whenFocus(z), !_ && !w) return;
749
- const E = await a.showBusy?.("Pasting...");
750
- if (w) try {
751
- return await p(t, w, y), void E?.();
752
- } catch (S) {
753
- E?.(), a.showError?.(S);
746
+ }, [l]), x = k(async (y, _, v) => {
747
+ const B = t?.element?.();
748
+ if (B && await te.whenFocus(B), !y && !_) return;
749
+ const S = await a.showBusy?.("Pasting...");
750
+ if (_) try {
751
+ return await p(t, _, v), void S?.();
752
+ } catch (M) {
753
+ S?.(), a.showError?.(M);
754
754
  }
755
- let B, $ = t.importFromExternal;
756
- $ || ($ = (S, b) => ({ getItemType: () => "text", toText: () => _.text, isClipboardItem: !0 }));
755
+ let O, I = t.importFromExternal;
756
+ I || (I = (M, b) => ({ getItemType: () => "text", toText: () => y.text, isClipboardItem: !0 }));
757
757
  try {
758
- B = await $(_, { isCut: !1 });
759
- } catch (S) {
760
- E?.(), a.showError?.(S);
758
+ O = await I(y, { isCut: !1 });
759
+ } catch (M) {
760
+ S?.(), a.showError?.(M);
761
761
  }
762
- if (B) try {
763
- const S = await Promise.resolve(B);
764
- await p(t, S, y), E?.();
765
- } catch (S) {
766
- E?.(), a.showError?.(S);
762
+ if (O) try {
763
+ const M = await Promise.resolve(O);
764
+ await p(t, M, v), S?.();
765
+ } catch (M) {
766
+ S?.(), a.showError?.(M);
767
767
  }
768
- else E?.();
769
- }, [p, t, a]), T = k(async (_) => {
768
+ else S?.();
769
+ }, [p, t, a]), L = k(async (y) => {
770
770
  if (t?.element) try {
771
- const w = await h.readReference();
772
- if (w) return void await x(null, w, _);
773
- const y = [];
774
- y[0] = await ht.readStringFromClipboard(h, dt.plain), y[1] = await ht.readHTMLFromClipboard(h, dt.html), y[2] = await ht.readBlobFromClipboard(h, dt.png);
775
- const z = { text: y[0] ?? null, html: y[1] ?? null, image: y[2] ?? null };
776
- await x(z, null, _);
777
- } catch (w) {
778
- if (w?.message === "Document is not focused.") return;
779
- a.showError?.(w);
771
+ const _ = await h.readReference();
772
+ if (_) return void await x(null, _, y);
773
+ const v = [];
774
+ v[0] = await dt.readStringFromClipboard(h, pt.plain), v[1] = await dt.readHTMLFromClipboard(h, pt.html), v[2] = await dt.readBlobFromClipboard(h, pt.png);
775
+ const B = { text: v[0] ?? null, html: v[1] ?? null, image: v[2] ?? null };
776
+ await x(B, null, y);
777
+ } catch (_) {
778
+ if (_?.message === "Document is not focused.") return;
779
+ a.showError?.(_);
780
780
  }
781
781
  }, [x, t?.element, a]);
782
- return k(async (_) => {
783
- }, [e?.element]), k(async (_) => {
784
- }, [t?.element, x, a]), H(() => {
782
+ return k(async (y) => {
783
+ }, [e?.element]), k(async (y) => {
784
+ }, [t?.element, x, a]), W(() => {
785
785
  if (!h) return;
786
- const _ = async (z) => {
787
- const E = await h.readReference();
788
- u?.(E);
789
- }, w = (z) => {
790
- a.showMessage?.(ot.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
791
- }, y = (z) => {
792
- a.showMessage?.(ot.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
786
+ const y = async (B) => {
787
+ const S = await h.readReference();
788
+ u?.(S);
789
+ }, _ = (B) => {
790
+ a.showMessage?.(rt.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
791
+ }, v = (B) => {
792
+ a.showMessage?.(rt.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
793
793
  };
794
- return h.addEventListener("clipboardchange", _), h.addEventListener("clipboarderrorread", w), h.addEventListener("clipboarderrorwrite", y), () => {
795
- h.removeEventListener("clipboardchange", _), h.removeEventListener("clipboarderrorread", w), h.removeEventListener("clipboarderrorwrite", y);
794
+ return h.addEventListener("clipboardchange", y), h.addEventListener("clipboarderrorread", _), h.addEventListener("clipboarderrorwrite", v), () => {
795
+ h.removeEventListener("clipboardchange", y), h.removeEventListener("clipboarderrorread", _), h.removeEventListener("clipboarderrorwrite", v);
796
796
  };
797
- }, [h, a]), H(() => {
798
- }, [d, x, e, t]), H(() => {
799
- i?.getCommand("cut")?.updateCallback(m).update({ disabled: !e || !t }), i?.getCommand("copy")?.updateCallback(f).update({ disabled: !e }), i?.getCommand("paste")?.updateCallback(T).update({ disabled: !t });
800
- }, [e, t, i]), { paste: T, copy: f, clipboard: h };
797
+ }, [h, a]), W(() => {
798
+ }, [d, x, e, t]), W(() => {
799
+ i?.getCommand("cut")?.updateCallback(m).update({ disabled: !e || !t }), i?.getCommand("copy")?.updateCallback(f).update({ disabled: !e }), i?.getCommand("paste")?.updateCallback(L).update({ disabled: !t });
800
+ }, [e, t, i]), { paste: L, copy: f, clipboard: h };
801
801
  };
802
- function Qo(o, e = !0) {
803
- const t = I(o);
804
- H(() => {
802
+ function sr(o, e = !0) {
803
+ const t = K(o);
804
+ W(() => {
805
805
  if (e) {
806
806
  const n = Object.entries(o).reduce((r, [i, a]) => (t.current[i] !== a && (r[i] = [t.current[i], a]), r), {});
807
807
  Object.keys(n).length > 0 && console.log("Changed props:", n);
@@ -809,19 +809,19 @@ function Qo(o, e = !0) {
809
809
  t.current = o;
810
810
  });
811
811
  }
812
- let gt = !1, qn = 0;
813
- var Zn = typeof document < "u" ? Et : H;
814
- const Bt = () => "sheetxl-ui-" + qn++, Ot = ae.useId, er = Ot ?? function() {
815
- const [o, e] = ae.useState(() => gt ? Bt() : void 0);
816
- return Zn(() => {
817
- o == null && e(Bt());
812
+ let yt = !1, Zn = 0;
813
+ var Jn = typeof document < "u" ? Mt : W;
814
+ const Ot = () => "sheetxl-ui-" + Zn++, It = ae.useId, lr = It ?? function() {
815
+ const [o, e] = ae.useState(() => yt ? Ot() : void 0);
816
+ return Jn(() => {
817
+ o == null && e(Ot());
818
818
  }, []), ae.useEffect(() => {
819
- gt || (gt = !0);
819
+ yt || (yt = !0);
820
820
  }, []), o;
821
- }, Jn = [];
822
- function Lt(o, e, t = Jn) {
823
- const n = I(null);
824
- return bn(o, () => {
821
+ }, Qn = [];
822
+ function Ct(o, e, t = Qn) {
823
+ const n = K(null);
824
+ return xn(o, () => {
825
825
  if (!n.current) return;
826
826
  const r = n.current, i = e?.();
827
827
  if (!i || typeof i != "object") throw new Error("attributes must return a plain object of values");
@@ -833,8 +833,8 @@ function Lt(o, e, t = Jn) {
833
833
  return r;
834
834
  }, t), n;
835
835
  }
836
- const It = "Undo the last action.", $t = "Repeat the last action or undo the redo.", Qn = (o) => `Redo ${o}`, tr = ({ manager: o, commands: e, disabled: t }) => {
837
- const n = it(), r = k((a) => {
836
+ const $t = "Undo the last action.", Kt = "Repeat the last action or undo the redo.", eo = (o) => `Redo ${o}`, ar = ({ manager: o, commands: e, disabled: t }) => {
837
+ const n = st(), r = k((a) => {
838
838
  try {
839
839
  o?.undo(a);
840
840
  } catch (u) {
@@ -847,19 +847,19 @@ const It = "Undo the last action.", $t = "Repeat the last action or undo the red
847
847
  n.error(u);
848
848
  }
849
849
  }, [o]);
850
- return K(() => {
850
+ return R(() => {
851
851
  if (!e) return;
852
852
  const a = { contains: (l) => !0, focus() {
853
- } }, u = [new yt("undo", a, { label: "Undo", description: It, shortcut: { key: "z", modifiers: [Z.Ctrl] }, disabled: !0 }, r), new yt("redo", a, { label: "Redo", description: $t, shortcut: [{ key: "y", modifiers: [Z.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [Z.Alt] }], disabled: !0 }, i)];
853
+ } }, u = [new vt("undo", a, { label: "Undo", description: $t, shortcut: { key: "z", modifiers: [Q.Ctrl] }, disabled: !0 }, r), new vt("redo", a, { label: "Redo", description: Kt, shortcut: [{ key: "y", modifiers: [Q.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [Q.Alt] }], disabled: !0 }, i)];
854
854
  e?.addCommands(u, !0);
855
- }, [e]), H(() => {
855
+ }, [e]), W(() => {
856
856
  if (!e) return;
857
857
  const a = () => {
858
858
  const l = o?.getTopUndoDescription(), s = {};
859
859
  var c;
860
- e.getCommand("undo").update({ disabled: t || !o || !o.hasUndo(), description: l ? (c = l, `Undo ${c}`) : It, state: s, context: { undoManager: o } });
860
+ e.getCommand("undo").update({ disabled: t || !o || !o.hasUndo(), description: l ? (c = l, `Undo ${c}`) : $t, state: s, context: { undoManager: o } });
861
861
  const h = o?.getTopRedoDescription();
862
- e.getCommand("redo").update({ disabled: t || !o || !o.hasRedo(), description: h ? Qn(h) : $t, state: s, context: { undoManager: o } });
862
+ e.getCommand("redo").update({ disabled: t || !o || !o.hasRedo(), description: h ? eo(h) : Kt, state: s, context: { undoManager: o } });
863
863
  };
864
864
  if (a(), !o) return;
865
865
  const u = o.addListener({ onStackChange() {
@@ -868,7 +868,7 @@ const It = "Undo the last action.", $t = "Repeat the last action or undo the red
868
868
  return () => u?.();
869
869
  }, [o, e, t]), { undo: r, redo: i };
870
870
  };
871
- class eo extends xn {
871
+ class to extends Sn {
872
872
  static getDerivedStateFromError() {
873
873
  return { hasError: !0 };
874
874
  }
@@ -879,13 +879,13 @@ class eo extends xn {
879
879
  return this.props.children;
880
880
  }
881
881
  }
882
- const nr = ({ children: o }) => {
883
- const e = it(), t = U((n) => {
882
+ const cr = ({ children: o }) => {
883
+ const e = st(), t = U((n) => {
884
884
  e.showError(n);
885
885
  }, [e]);
886
- return P(eo, { onError: t, children: o });
886
+ return P(to, { onError: t, children: o });
887
887
  };
888
- class to {
888
+ class no {
889
889
  constructor(e) {
890
890
  this.notifier = e, this.handleUnhandledRejection = (t) => {
891
891
  const n = t.reason;
@@ -901,85 +901,85 @@ class to {
901
901
  window.removeEventListener("unhandledrejection", this.handleUnhandledRejection), window.removeEventListener("error", this.handleGlobalError);
902
902
  }
903
903
  }
904
- const or = ({ children: o }) => {
905
- const e = it();
906
- return H(() => {
907
- const t = new to(e);
904
+ const ur = ({ children: o }) => {
905
+ const e = st();
906
+ return W(() => {
907
+ const t = new no(e);
908
908
  return () => {
909
909
  t.cleanup();
910
910
  };
911
911
  }, [e]), P(fe, { children: o });
912
- }, rr = () => null;
913
- function cn(o) {
912
+ }, hr = () => null;
913
+ function hn(o) {
914
914
  var e, t, n = "";
915
915
  if (typeof o == "string" || typeof o == "number") n += o;
916
916
  else if (typeof o == "object") if (Array.isArray(o)) {
917
917
  var r = o.length;
918
- for (e = 0; e < r; e++) o[e] && (t = cn(o[e])) && (n && (n += " "), n += t);
918
+ for (e = 0; e < r; e++) o[e] && (t = hn(o[e])) && (n && (n += " "), n += t);
919
919
  } else for (t in o) o[t] && (n && (n += " "), n += t);
920
920
  return n;
921
921
  }
922
- function le() {
923
- for (var o, e, t = 0, n = "", r = arguments.length; t < r; t++) (o = arguments[t]) && (e = cn(o)) && (n && (n += " "), n += e);
922
+ function G() {
923
+ for (var o, e, t = 0, n = "", r = arguments.length; t < r; t++) (o = arguments[t]) && (e = hn(o)) && (n && (n += " "), n += e);
924
924
  return n;
925
925
  }
926
- const no = {}, oo = (o) => {
927
- const { onPointerDown: e, style: t, splitDirection: n, paddingBefore: r = 0, paddingAfter: i = 0, disabled: a, key: u, hitAreaProps: l = no, ...s } = o, c = n === "row", { style: h, className: d, ...f } = l;
928
- return P("div", { style: { ...t, position: "relative" }, ...s, children: P("div", { className: le("hit-box", d), style: { left: (c ? -r : 0) + "px", width: `calc(100% + ${c ? r + i : 0}px)`, top: (c ? 0 : -r) + "px", height: `calc(100% + ${c ? 0 : r + i}px)`, position: "absolute", ...h }, onPointerDown: a ? void 0 : e, ...f }) }, u);
929
- }, Je = {}, we = (o, e, t = !0) => o === null ? null : o.pixels !== null ? t ? o.pixels : e - o.pixels : (t ? o.percent : 100 - o.percent) / 100 * e, Qe = (o, e = !0) => o?.percent ? `${e ? o.percent : 100 - o.percent}%` : o?.pixels ? `${o.pixels}px` : void 0, he = (o, e) => {
926
+ const oo = {}, ro = (o) => {
927
+ const { onPointerDown: e, style: t, splitDirection: n, paddingBefore: r = 0, paddingAfter: i = 0, disabled: a, key: u, hitAreaProps: l = oo, ...s } = o, c = n === "row", { style: h, className: d, ...f } = l;
928
+ return P("div", { style: { ...t, position: "relative" }, ...s, children: P("div", { className: G("hit-box", d), style: { left: (c ? -r : 0) + "px", width: `calc(100% + ${c ? r + i : 0}px)`, top: (c ? 0 : -r) + "px", height: `calc(100% + ${c ? 0 : r + i}px)`, position: "absolute", ...h }, onPointerDown: a ? void 0 : e, ...f }) }, u);
929
+ }, Qe = {}, be = (o, e, t = !0) => o === null ? null : o.pixels !== null ? t ? o.pixels : e - o.pixels : (t ? o.percent : 100 - o.percent) / 100 * e, et = (o, e = !0) => o?.percent ? `${e ? o.percent : 100 - o.percent}%` : o?.pixels ? `${o.pixels}px` : void 0, he = (o, e) => {
930
930
  if (o == null) return null;
931
931
  const t = { percent: null, pixels: null };
932
932
  let n = e;
933
933
  return typeof o == "string" && ((o = o.trim().toLowerCase()).endsWith("px") ? (o = o.substring(0, o.length - 2), n = !1) : o.endsWith("%") && (o = o.substring(0, o.length - 1), n = !0), o = parseFloat(o)), n ? t.percent = o : t.pixels = o, Object.freeze(t);
934
- }, ro = me(Ee((o, e) => {
935
- const { elementBefore: t, elementAfter: n, splitDirection: r = "row", fixedPane: i = null, position: a, onPositionChange: u, minBefore: l, maxBefore: s, minAfter: c, maxAfter: h, children: d, className: f, style: m, disabled: p = !1, onDragStart: x, onDragResize: T, onDragFinish: _, resizerProps: w = Je, paneProps: y = Je, paneBeforeProps: z = Je, paneAfterProps: E = Je, createResizer: B = oo } = o;
934
+ }, io = me(Ee((o, e) => {
935
+ const { elementBefore: t, elementAfter: n, splitDirection: r = "row", fixedPane: i = null, position: a, onPositionChange: u, minBefore: l, maxBefore: s, minAfter: c, maxAfter: h, children: d, className: f, style: m, disabled: p = !1, onDragStart: x, onDragResize: L, onDragFinish: y, resizerProps: _ = Qe, paneProps: v = Qe, paneBeforeProps: B = Qe, paneAfterProps: S = Qe, createResizer: O = ro } = o;
936
936
  if (d) throw new Error("Use elementBefore and elementAfter instead of children.");
937
- const $ = K(() => ae.isValidElement(n) && ae.isValidElement(t), [n, t]), S = K(() => {
938
- let A = null;
939
- i && (i === "before" ? A = 0 : i === "after" && (A = 1));
940
- const j = A === null;
941
- return { fixedPaneOffset: A, isPercent: j, minBefore: he(l, j), maxBefore: he(s, j), minAfter: he(c, j), maxAfter: he(h, j) };
942
- }, [l, s, c, h]), b = k(u, [u]), [C, M] = Y(() => he(a, i === null));
943
- H(() => {
944
- M(he(a, i === null));
937
+ const I = R(() => ae.isValidElement(n) && ae.isValidElement(t), [n, t]), M = R(() => {
938
+ let z = null;
939
+ i && (i === "before" ? z = 0 : i === "after" && (z = 1));
940
+ const j = z === null;
941
+ return { fixedPaneOffset: z, isPercent: j, minBefore: he(l, j), maxBefore: he(s, j), minAfter: he(c, j), maxAfter: he(h, j) };
942
+ }, [l, s, c, h]), b = k(u, [u]), [C, E] = q(() => he(a, i === null));
943
+ W(() => {
944
+ E(he(a, i === null));
945
945
  }, [a, i]);
946
- const [O, { width: g, height: L }] = Se(), [R, { width: N, height: G }] = Se(), D = r === "row" ? N : G, F = r === "row" ? g : L, W = K(() => ((A, j, ne, q) => {
947
- const ce = [null, null], se = [null, null];
948
- if (A || (A = { percent: q.fixedPaneOffset === null ? 50 : null, pixels: q.fixedPaneOffset === null ? null : 0 }), j === 0) return A?.pixels != null ? q.fixedPaneOffset !== 1 ? (ce[0] = A?.pixels, se[1] = 100) : (ce[1] = A?.pixels - ne, se[0] = 100) : A?.percent != null && (q.fixedPaneOffset !== 1 ? (se[0] = A?.percent, se[1] = 100 - A?.percent) : (se[1] = A?.percent, se[0] = 100 - A?.percent)), { percents: se, pixels: ce, minBefore: Qe(q.minBefore, !0), maxBefore: Qe(q.maxBefore, !0), minAfter: Qe(q.minAfter), maxAfter: Qe(q.maxAfter) };
949
- let ue = we(A, j, q.fixedPaneOffset !== 1), re = j - ne, Ct = we(q.minBefore, re, !0) ?? 0, _n = we(q.maxBefore, re, !0) ?? re, Ge = 0, ut = 0, Tt = 0, kt = re;
950
- Ge = (we(q.maxAfter, j, !1) ?? ne) - ne, ut = we(q.minAfter, j, !1) ?? j, Tt = Math.max(Ct, Ge), kt = Math.min(_n, ut), ue = Math.max(Tt, Math.min(ue, kt)), ut = Math.min(re - ue, we(q.maxAfter, re - ue, !0) ?? re), Ge = Math.min(re - ue, we(q.minAfter, re - ue, !0) ?? re), ce[0] = ue, ce[1] = re - ce[0];
951
- const gn = Math.max(0, Math.min(100, ue / re * 100));
952
- return se[0] = gn, se[1] = 100 - se[0], { percents: se, pixels: ce, minBefore: `${Ct}px`, minAfter: `${Ge}px`, maxBefore: `${ce[0]}px`, maxAfter: `${ce[1]}px` };
953
- })(C, F, D, S), [S, C, F, D, r]), [X, J] = Y(!1), Me = k(x, [x]), _e = k(T, [T]), Le = k(_, [_]), ge = I(null), st = I(null), Re = I(null), { style: lt, className: Ne, ...He } = y, We = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...lt }, { className: at, style: Ve, ...Fe } = z, { className: je, style: Ue, ...Ce } = E, ze = { flex: "1 1 100%", width: "100%", ...m, flexDirection: r, display: "flex" }, { className: ie, style: Te, onPointerDown: Xe, ...Ye } = w, Be = k((A) => {
954
- const j = he(A, i === null);
955
- M(j);
956
- }, [i]), v = k((A) => {
957
- if (p || !X) return;
946
+ const [$, { width: T, height: g }] = Se(), [A, { width: H, height: X }] = Se(), D = r === "row" ? H : X, F = r === "row" ? T : g, V = R(() => ((z, j, oe, J) => {
947
+ const ce = [null, null], le = [null, null];
948
+ if (z || (z = { percent: J.fixedPaneOffset === null ? 50 : null, pixels: J.fixedPaneOffset === null ? null : 0 }), j === 0) return z?.pixels != null ? J.fixedPaneOffset !== 1 ? (ce[0] = z?.pixels, le[1] = 100) : (ce[1] = z?.pixels - oe, le[0] = 100) : z?.percent != null && (J.fixedPaneOffset !== 1 ? (le[0] = z?.percent, le[1] = 100 - z?.percent) : (le[1] = z?.percent, le[0] = 100 - z?.percent)), { percents: le, pixels: ce, minBefore: et(J.minBefore, !0), maxBefore: et(J.maxBefore, !0), minAfter: et(J.minAfter), maxAfter: et(J.maxAfter) };
949
+ let ue = be(z, j, J.fixedPaneOffset !== 1), ie = j - oe, Tt = be(J.minBefore, ie, !0) ?? 0, gn = be(J.maxBefore, ie, !0) ?? ie, qe = 0, ht = 0, kt = 0, Pt = ie;
950
+ qe = (be(J.maxAfter, j, !1) ?? oe) - oe, ht = be(J.minAfter, j, !1) ?? j, kt = Math.max(Tt, qe), Pt = Math.min(gn, ht), ue = Math.max(kt, Math.min(ue, Pt)), ht = Math.min(ie - ue, be(J.maxAfter, ie - ue, !0) ?? ie), qe = Math.min(ie - ue, be(J.minAfter, ie - ue, !0) ?? ie), ce[0] = ue, ce[1] = ie - ce[0];
951
+ const yn = Math.max(0, Math.min(100, ue / ie * 100));
952
+ return le[0] = yn, le[1] = 100 - le[0], { percents: le, pixels: ce, minBefore: `${Tt}px`, minAfter: `${qe}px`, maxBefore: `${ce[0]}px`, maxAfter: `${ce[1]}px` };
953
+ })(C, F, D, M), [M, C, F, D, r]), [Y, ee] = q(!1), Me = k(x, [x]), _e = k(L, [L]), Le = k(y, [y]), ge = K(null), lt = K(null), Ne = K(null), { style: at, className: Re, ...He } = v, We = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", height: "100%", widthResizer: "100%", display: "flex", overflow: "hidden", position: "relative", ...at }, { className: ct, style: Ve, ...Fe } = B, { className: je, style: Ue, ...Ce } = S, ze = { flex: "1 1 100%", width: "100%", ...m, flexDirection: r, display: "flex" }, { className: se, style: Te, onPointerDown: Xe, ...Ye } = _, Be = k((z) => {
954
+ const j = he(z, i === null);
955
+ E(j);
956
+ }, [i]), w = k((z) => {
957
+ if (p || !Y) return;
958
958
  const j = ye.current?.getBoundingClientRect();
959
- let ne = 0;
960
- ne = r === "row" ? (A.clientX ?? A.touches?.[0]?.clientX) - j.x : (A.clientY ?? A.touches?.[0]?.clientY) - j.y, ne = Math.max(0, Math.min(F, ne)), S.fixedPaneOffset === 1 && (ne = F - ne), a && C.pixels === ne || M({ pixels: ne, percent: null }), _e?.(ne), A.stopPropagation(), A.preventDefault();
961
- }, [S, r, p, X, C, F]), V = k((A) => {
962
- if (document.removeEventListener("pointermove", v), document.removeEventListener("touchmove", v), document.removeEventListener("pointerup", V), !!X && (J(!1), !!C)) {
959
+ let oe = 0;
960
+ oe = r === "row" ? (z.clientX ?? z.touches?.[0]?.clientX) - j.x : (z.clientY ?? z.touches?.[0]?.clientY) - j.y, oe = Math.max(0, Math.min(F, oe)), M.fixedPaneOffset === 1 && (oe = F - oe), a && C.pixels === oe || E({ pixels: oe, percent: null }), _e?.(oe), z.stopPropagation(), z.preventDefault();
961
+ }, [M, r, p, Y, C, F]), N = k((z) => {
962
+ if (document.removeEventListener("pointermove", w), document.removeEventListener("touchmove", w), document.removeEventListener("pointerup", N), !!Y && (ee(!1), !!C)) {
963
963
  if (Le(C.pixels), !he(a, i === null) || C.pixels !== a) {
964
964
  const j = { ...C };
965
965
  j.percent === null && (j.percent = j.pixels / F * 100), b(j);
966
966
  }
967
- A.stopPropagation(), A.preventDefault();
967
+ z.stopPropagation(), z.preventDefault();
968
968
  }
969
- }, [C, X, a, i, F]), Q = k((A) => {
970
- Xe?.(A), A.defaultPrevented || p || X || (J(!0), Me(), document.addEventListener("pointermove", v, { passive: !1 }), document.addEventListener("touchmove", v, { passive: !1 }), document.addEventListener("pointerup", V, { passive: !1 }));
971
- }, [Xe]), ye = Lt(e, () => ({ setPosition: Be, isSplitPane: () => !0 }), []), ke = K(() => $ ? B?.({ key: "resizer", ref: Ae([R, st]), className: le("resizer", ie), onPointerDownCapture: Q, style: { cursor: p ? void 0 : r === "row" ? "ew-resize" : "ns-resize", minWidth: r === "row" ? "2px" : void 0, minHeight: r !== "row" ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...Te }, splitDirection: r, disabled: p, ...Ye }) : null, [$, ie, Ye, r, Te, p]), ve = r === "row" ? "Width" : "Height", ct = K(() => {
969
+ }, [C, Y, a, i, F]), Z = k((z) => {
970
+ Xe?.(z), z.defaultPrevented || p || Y || (ee(!0), Me(), document.addEventListener("pointermove", w, { passive: !1 }), document.addEventListener("touchmove", w, { passive: !1 }), document.addEventListener("pointerup", N, { passive: !1 }));
971
+ }, [Xe]), ye = Ct(e, () => ({ setPosition: Be, isSplitPane: () => !0 }), []), ke = R(() => I ? O?.({ key: "resizer", ref: Ae([A, lt]), className: G("resizer", se), onPointerDownCapture: Z, style: { cursor: p ? void 0 : r === "row" ? "ew-resize" : "ns-resize", minWidth: r === "row" ? "2px" : void 0, minHeight: r !== "row" ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...Te }, splitDirection: r, disabled: p, ...Ye }) : null, [I, se, Ye, r, Te, p]), ve = r === "row" ? "Width" : "Height", ut = R(() => {
972
972
  if (!t) return null;
973
- const A = { ...We, ...Ve, flex: S.fixedPaneOffset === 0 && W?.pixels[0] !== null ? `0 0 ${Math.round(W?.pixels[0])}px` : `1 1 ${Math.round(W?.percents[0] ?? 100)}%`, [`min${ve}`]: W?.minBefore, [`max${ve}`]: n ? W?.maxBefore : "100%" };
974
- return P("div", { ref: ge, className: le("before", Ne, at), style: A, ...He, ...Fe, children: t }, "before");
975
- }, [t, y, z, S, W]), mn = K(() => {
973
+ const z = { ...We, ...Ve, flex: M.fixedPaneOffset === 0 && V?.pixels[0] !== null ? `0 0 ${Math.round(V?.pixels[0])}px` : `1 1 ${Math.round(V?.percents[0] ?? 100)}%`, [`min${ve}`]: V?.minBefore, [`max${ve}`]: n ? V?.maxBefore : "100%" };
974
+ return P("div", { ref: ge, className: G("before", Re, ct), style: z, ...He, ...Fe, children: t }, "before");
975
+ }, [t, v, B, M, V]), Ge = R(() => {
976
976
  if (!n) return null;
977
- const A = { ...We, ...Ue, flex: S.fixedPaneOffset === 1 && W?.pixels[1] !== null ? `0 0 ${Math.round(W?.pixels[1])}px` : `1 1 ${Math.round(W?.percents[1] ?? 100)}%`, [`min${ve}`]: W?.minAfter, [`max${ve}`]: t ? W?.maxAfter : "100%" };
978
- return P("div", { ref: Re, className: le("after", Ne, je), style: A, ...He, ...Ce, children: n }, "after");
979
- }, [n, y, E, S, W]);
980
- return pe("div", { ref: Ae([O, ye]), className: le("splitPane", r === "row" ? "vertical" : "horizontal", { dragging: X }, f), style: ze, children: [ct, ke, mn] });
977
+ const z = { ...We, ...Ue, flex: M.fixedPaneOffset === 1 && V?.pixels[1] !== null ? `0 0 ${Math.round(V?.pixels[1])}px` : `1 1 ${Math.round(V?.percents[1] ?? 100)}%`, [`min${ve}`]: V?.minAfter, [`max${ve}`]: t ? V?.maxAfter : "100%" };
978
+ return P("div", { ref: Ne, className: G("after", Re, je), style: z, ...He, ...Ce, children: n }, "after");
979
+ }, [n, v, S, M, V]);
980
+ return pe("div", { ref: Ae([$, ye]), className: G("splitPane", r === "row" ? "vertical" : "horizontal", { dragging: Y }, f), style: ze, children: [ut, ke, Ge] });
981
981
  }));
982
- function io(o) {
982
+ function so(o) {
983
983
  if (typeof o == "function") return o;
984
984
  if (typeof o == "string") {
985
985
  const e = o.trim();
@@ -1013,12 +1013,12 @@ function io(o) {
1013
1013
  return null;
1014
1014
  }
1015
1015
  })(e);
1016
- if (t) return Nt(t);
1016
+ if (t) return Ht(t);
1017
1017
  }
1018
1018
  if (e.startsWith("<")) {
1019
- if (/^<\s*svg\b/i.test(e)) return Nt(e);
1019
+ if (/^<\s*svg\b/i.test(e)) return Ht(e);
1020
1020
  if (/^<\s*path\b/i.test(e)) {
1021
- const t = Kt(e);
1021
+ const t = Nt(e);
1022
1022
  if (t) return { paths: [{ d: t }] };
1023
1023
  }
1024
1024
  return { paths: [{ d: e }] };
@@ -1030,7 +1030,7 @@ function io(o) {
1030
1030
  for (const t of o) if (typeof t == "string") {
1031
1031
  const n = String(t).trim();
1032
1032
  if (n.startsWith("<path")) {
1033
- const r = Kt(n);
1033
+ const r = Nt(n);
1034
1034
  r && e.push({ d: r });
1035
1035
  } else e.push({ d: n });
1036
1036
  } else t && typeof t == "object" && "d" in t && typeof t.d == "string" && e.push({ ...t });
@@ -1038,12 +1038,12 @@ function io(o) {
1038
1038
  }
1039
1039
  return o;
1040
1040
  }
1041
- function Kt(o) {
1041
+ function Nt(o) {
1042
1042
  const e = /\bd\s*=\s*(?:"([^"]+)"|'([^']+)')/i.exec(o);
1043
1043
  return e ? e[1] ?? e[2] ?? null : null;
1044
1044
  }
1045
1045
  function Rt(o) {
1046
- if ("svg" in o) return { ...o, svg: io(o.svg) };
1046
+ if ("svg" in o) return { ...o, svg: so(o.svg) };
1047
1047
  if ("url" in o) {
1048
1048
  const e = typeof o.url == "string" ? { src: o.url } : o.url;
1049
1049
  return { ...o, url: e };
@@ -1054,7 +1054,7 @@ function Rt(o) {
1054
1054
  }
1055
1055
  return o;
1056
1056
  }
1057
- function Nt(o) {
1057
+ function Ht(o) {
1058
1058
  try {
1059
1059
  if (typeof DOMParser < "u") {
1060
1060
  const a = new DOMParser().parseFromString(o, "image/svg+xml"), u = a.querySelector("svg"), l = u?.getAttribute("viewBox") ?? void 0, s = [];
@@ -1069,10 +1069,10 @@ function Nt(o) {
1069
1069
  p && (d.stroke = p);
1070
1070
  const x = c.getAttribute("opacity");
1071
1071
  x && (d.opacity = Number(x));
1072
- const T = c.getAttribute("fill-rule");
1073
- T && (d.fillRule = T);
1074
- const _ = c.getAttribute("clip-rule");
1075
- _ && (d.clipRule = _), s.push(d);
1072
+ const L = c.getAttribute("fill-rule");
1073
+ L && (d.fillRule = L);
1074
+ const y = c.getAttribute("clip-rule");
1075
+ y && (d.clipRule = y), s.push(d);
1076
1076
  }), { viewBox: l, paths: s };
1077
1077
  }
1078
1078
  } catch {
@@ -1082,7 +1082,7 @@ function Nt(o) {
1082
1082
  for (; i = r.exec(o); ) n.push({ d: i[1] });
1083
1083
  return { viewBox: t, paths: n };
1084
1084
  }
1085
- function Ht(o) {
1085
+ function Wt(o) {
1086
1086
  const e = {};
1087
1087
  for (const [i, a] of Object.entries(o.icons)) e[i] = Rt(a);
1088
1088
  const t = { label: o.meta?.label ?? "Unnamed", version: o.meta?.version ?? "1.0.0", license: o.meta?.license ?? "MIT", defaultViewBox: "0 0 24 24", extends: o.meta?.extends ?? [] };
@@ -1099,7 +1099,7 @@ function Ht(o) {
1099
1099
  }
1100
1100
  return n;
1101
1101
  }
1102
- function so() {
1102
+ function lo() {
1103
1103
  const o = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map();
1104
1104
  let t = "base", n = /* @__PURE__ */ new Map();
1105
1105
  async function r(l) {
@@ -1110,7 +1110,7 @@ function so() {
1110
1110
  if (!s.loader) throw new Error(`No loader for icon pack: ${l}`);
1111
1111
  s.loading = s.loader().then((c) => {
1112
1112
  const h = c && typeof c == "object" && "default" in c ? c.default : c;
1113
- s.pack = Ht(h);
1113
+ s.pack = Wt(h);
1114
1114
  }).catch((c) => {
1115
1115
  throw s.loading = void 0, c;
1116
1116
  });
@@ -1153,7 +1153,7 @@ function so() {
1153
1153
  }
1154
1154
  return { register: function(l, s) {
1155
1155
  const c = o.get(l) ?? {};
1156
- typeof s == "function" ? c.loader = s : c.pack = Ht(s), o.set(l, c), t || (t = l);
1156
+ typeof s == "function" ? c.loader = s : c.pack = Wt(s), o.set(l, c), t || (t = l);
1157
1157
  }, prefetch: async function(l = t) {
1158
1158
  const s = Array.isArray(l) ? l : [l];
1159
1159
  await Promise.all(s.map(r));
@@ -1205,56 +1205,56 @@ function so() {
1205
1205
  return n.set(l, c), c;
1206
1206
  } };
1207
1207
  }
1208
- ro.displayName = "SplitPane";
1209
- const nt = so();
1210
- nt.register("base", () => import("./DQXf4a-Nh3ZMvJdj.mjs"));
1211
- const Wt = (o) => P("svg", { ...o, children: P("path", {}) }), lo = { Icon: "_Icon_17dpm_10" }, ao = me((o) => {
1208
+ io.displayName = "SplitPane";
1209
+ const ot = lo();
1210
+ ot.register("base", () => import("./Du8tayDoOWvYYmxJ.mjs"));
1211
+ const Vt = (o) => P("svg", { ...o, children: P("path", {}) }), ao = { Icon: "_Icon_17dpm_10" }, co = me((o) => {
1212
1212
  const { iconKey: e, packKey: t, className: n, style: r, role: i, title: a, size: u, ariaHidden: l, sourceProps: s, children: c, ...h } = o, [d, f] = ae.useState(null);
1213
1213
  ae.useEffect(() => {
1214
- let M = !0, O = t, g = e;
1215
- if (!g) {
1216
- const L = nt.getPack(O);
1217
- return void f({ glyph: L ? { svg: ee.EmptyArray } : void 0, pack: L ?? void 0, packKey: O ?? nt.getActive() });
1214
+ let E = !0, $ = t, T = e;
1215
+ if (!T) {
1216
+ const g = ot.getPack($);
1217
+ return void f({ glyph: g ? { svg: te.EmptyArray } : void 0, pack: g ?? void 0, packKey: $ ?? ot.getActive() });
1218
1218
  }
1219
- if (g.includes(":")) {
1220
- const [L, R] = g.split(":");
1221
- O = L, g = R;
1219
+ if (T.includes(":")) {
1220
+ const [g, A] = T.split(":");
1221
+ $ = g, T = A;
1222
1222
  }
1223
- return nt.resolve(g, { packKey: O }).then((L) => {
1224
- M && f(L);
1223
+ return ot.resolve(T, { packKey: $ }).then((g) => {
1224
+ E && f(g);
1225
1225
  }), () => {
1226
- M = !1;
1226
+ E = !1;
1227
1227
  };
1228
1228
  }, [e, t]);
1229
1229
  const m = d?.pack, p = d?.glyph, x = d?.packKey;
1230
- let T = p ? p.svg : void 0;
1231
- const _ = p && !T ? p.url : void 0, w = !p || T || _ ? void 0 : p.emoji, y = u != null ? typeof u == "number" ? `${u}px` : u : void 0, z = K(() => [lo.Icon, "icon", n].filter(Boolean).join(" "), [n]), E = K(() => {
1232
- const M = { ...r };
1233
- return M["--icon-size"] = y, M;
1234
- }, [r, y]), B = i ?? (a ? "img" : "presentation"), $ = l ?? (!a || void 0), S = (M) => P("span", { className: z, style: E, role: B, "aria-hidden": $, title: a, "data-icon-glyph": e, "data-icon-pack": x, ...h, children: M });
1235
- if (c) return S(c);
1236
- if (w) return S(P("span", { children: typeof w == "string" ? w : w.text }));
1237
- if (_) return S(P("img", { src: _.src, alt: a ?? "" }));
1230
+ let L = p ? p.svg : void 0;
1231
+ const y = p && !L ? p.url : void 0, _ = !p || L || y ? void 0 : p.emoji, v = u != null ? typeof u == "number" ? `${u}px` : u : void 0, B = R(() => [ao.Icon, "icon", n].filter(Boolean).join(" "), [n]), S = R(() => {
1232
+ const E = { ...r };
1233
+ return E["--icon-size"] = v, E;
1234
+ }, [r, v]), O = i ?? (a ? "img" : "presentation"), I = l ?? (!a || void 0), M = (E) => P("span", { className: B, style: S, role: O, "aria-hidden": I, title: a, "data-icon-glyph": e, "data-icon-pack": x, ...h, children: E });
1235
+ if (c) return M(c);
1236
+ if (_) return M(P("span", { children: typeof _ == "string" ? _ : _.text }));
1237
+ if (y) return M(P("img", { src: y.src, alt: a ?? "" }));
1238
1238
  if (p && "react" in p) {
1239
- const M = p.react, O = { className: z, style: E, role: B, "aria-hidden": $, title: a, ...h, ...s };
1240
- return S(P(M, { ...O }));
1241
- }
1242
- const b = { viewBox: T?.viewBox ?? m?.meta.defaultViewBox ?? "0 0 24 24" };
1243
- if (typeof T == "function")
1244
- return S(T(b) ?? P(Wt, { ...b }));
1245
- if (!T) return S(P(Wt, { ...b }));
1246
- const C = T.paths;
1247
- return S(P("svg", { ...b, children: C ? C.map((M, O) => P("path", { d: M.d, className: M.className, fill: M.fill, stroke: M.stroke, opacity: M.opacity, fillRule: M.fillRule, clipRule: M.clipRule }, O)) : null }));
1239
+ const E = p.react, $ = { className: B, style: S, role: O, "aria-hidden": I, title: a, ...h, ...s };
1240
+ return M(P(E, { ...$ }));
1241
+ }
1242
+ const b = { viewBox: L?.viewBox ?? m?.meta.defaultViewBox ?? "0 0 24 24" };
1243
+ if (typeof L == "function")
1244
+ return M(L(b) ?? P(Vt, { ...b }));
1245
+ if (!L) return M(P(Vt, { ...b }));
1246
+ const C = L.paths;
1247
+ return M(P("svg", { ...b, children: C ? C.map((E, $) => P("path", { d: E.d, className: E.className, fill: E.fill, stroke: E.stroke, opacity: E.opacity, fillRule: E.fillRule, clipRule: E.clipRule }, $)) : null }));
1248
1248
  });
1249
- function ir(o) {
1250
- const { isWalking: e = !1, themedType: t = "info", speed: n = 120, dashGap: r = 3, dashLength: i = 5, iconKey: a, packKey: u, style: l, className: s, ...c } = o, h = K(() => {
1249
+ function dr(o) {
1250
+ const { isWalking: e = !1, themedType: t = "info", speed: n = 120, dashGap: r = 3, dashLength: i = 5, iconKey: a, packKey: u, style: l, className: s, ...c } = o, h = R(() => {
1251
1251
  if (!e) return;
1252
1252
  const f = { "--walk-duration": `${n * (r + i)}ms`, "--walk-dash-length": `${i}px`, "--walk-dash-gap": `${r}px` };
1253
1253
  return t && t !== "accent" && (f["--icon-accent"] = `var(--icon-${t})`), f;
1254
- }, [e, n, r, i, t]), d = K(() => e ? s + " walking" : s, [e, s]);
1255
- return P(ao, { iconKey: a, packKey: u, className: d, style: { ...l, ...h }, ...c });
1254
+ }, [e, n, r, i, t]), d = R(() => e ? s + " walking" : s, [e, s]);
1255
+ return P(co, { iconKey: a, packKey: u, className: d, style: { ...l, ...h }, ...c });
1256
1256
  }
1257
- class St {
1257
+ class Et {
1258
1258
  constructor() {
1259
1259
  this.store = /* @__PURE__ */ new Map();
1260
1260
  }
@@ -1268,11 +1268,11 @@ class St {
1268
1268
  this.store.delete(e);
1269
1269
  }
1270
1270
  }
1271
- const un = Xt(null), hn = { parse: (o) => o ? JSON.parse(o) : null, stringify: JSON.stringify }, co = { store: new St(), namespace: "", serializer: hn, debounceMs: 0, crossTabSync: !1, notify: () => {
1271
+ const dn = Gt(null), pn = { parse: (o) => o ? JSON.parse(o) : null, stringify: JSON.stringify }, uo = { store: new Et(), namespace: "", serializer: pn, debounceMs: 0, crossTabSync: !1, notify: () => {
1272
1272
  }, subscribeKey: () => () => {
1273
1273
  } };
1274
- function sr(o, e, t = uo) {
1275
- const { store: n, namespace: r, serializer: i, debounceMs: a, subscribeKey: u } = Yt(un) || co, l = t.serializer ?? i ?? hn, s = K(() => `${r}:${o}`, [r, o]), c = I(null), h = `${s}::v`, [d, f] = Y(() => {
1274
+ function pr(o, e, t = ho) {
1275
+ const { store: n, namespace: r, serializer: i, debounceMs: a, subscribeKey: u } = qt(dn) || uo, l = t.serializer ?? i ?? pn, s = R(() => `${r}:${o}`, [r, o]), c = K(null), h = `${s}::v`, [d, f] = q(() => {
1276
1276
  let p;
1277
1277
  try {
1278
1278
  if (typeof window < "u" && "localStorage" in window && s.startsWith(r)) {
@@ -1287,21 +1287,21 @@ function sr(o, e, t = uo) {
1287
1287
  }
1288
1288
  return p;
1289
1289
  });
1290
- H(() => {
1290
+ W(() => {
1291
1291
  let p = !0;
1292
1292
  return (async () => {
1293
- const [x, T] = await Promise.all([n.getItem(s), n.getItem(h)]);
1294
- let _;
1293
+ const [x, L] = await Promise.all([n.getItem(s), n.getItem(h)]);
1294
+ let y;
1295
1295
  try {
1296
- _ = x == null ? void 0 : l.parse(x);
1296
+ y = x == null ? void 0 : l.parse(x);
1297
1297
  } catch {
1298
1298
  }
1299
- const w = T == null ? void 0 : Number.parseInt(T, 10);
1300
- _ === void 0 ? !t.lazy && e !== void 0 && (_ = typeof e == "function" ? e() : e, await n.setItem(s, l.stringify(_)), t.version != null && await n.setItem(h, String(t.version))) : t.version != null && w !== void 0 && w !== t.version && t.migrate && (_ = t.migrate(_, w), await n.setItem(s, l.stringify(_)), await n.setItem(h, String(t.version))), p && _ !== void 0 && f(_);
1299
+ const _ = L == null ? void 0 : Number.parseInt(L, 10);
1300
+ y === void 0 ? !t.lazy && e !== void 0 && (y = typeof e == "function" ? e() : e, await n.setItem(s, l.stringify(y)), t.version != null && await n.setItem(h, String(t.version))) : t.version != null && _ !== void 0 && _ !== t.version && t.migrate && (y = t.migrate(y, _), await n.setItem(s, l.stringify(y)), await n.setItem(h, String(t.version))), p && y !== void 0 && f(y);
1301
1301
  })(), () => {
1302
1302
  p = !1;
1303
1303
  };
1304
- }, [n, s, h, t.version, t.migrate, t.lazy]), H(() => u(o, async () => {
1304
+ }, [n, s, h, t.version, t.migrate, t.lazy]), W(() => u(o, async () => {
1305
1305
  const p = await n.getItem(s);
1306
1306
  if (p != null) try {
1307
1307
  f(l.parse(p));
@@ -1313,10 +1313,10 @@ function sr(o, e, t = uo) {
1313
1313
  };
1314
1314
  return [d, (p) => {
1315
1315
  f((x) => {
1316
- const T = typeof p == "function" ? p(x) : p;
1316
+ const L = typeof p == "function" ? p(x) : p;
1317
1317
  return c.current && clearTimeout(c.current), a > 0 ? c.current = setTimeout(() => {
1318
- m(T);
1319
- }, a) : m(T), T;
1318
+ m(L);
1319
+ }, a) : m(L), L;
1320
1320
  });
1321
1321
  }, () => {
1322
1322
  if (c.current && clearTimeout(c.current), n.removeItem(s), n.removeItem(h), e !== void 0) {
@@ -1325,9 +1325,9 @@ function sr(o, e, t = uo) {
1325
1325
  } else f(void 0);
1326
1326
  }];
1327
1327
  }
1328
- const uo = {};
1329
- function lr(o) {
1330
- const { store: e, namespace: t = "", serializer: n = ho, debounceMs: r = 0, crossTabSync: i = !0, children: a } = o, u = K(() => typeof window > "u" ? new St() : e ?? new St(), [e]), l = I(/* @__PURE__ */ new Map()), s = K(() => ({ store: u, namespace: t, serializer: n, debounceMs: r, crossTabSync: i, notify(c) {
1328
+ const ho = {};
1329
+ function fr(o) {
1330
+ const { store: e, namespace: t = "", serializer: n = po, debounceMs: r = 0, crossTabSync: i = !0, children: a } = o, u = R(() => typeof window > "u" ? new Et() : e ?? new Et(), [e]), l = K(/* @__PURE__ */ new Map()), s = R(() => ({ store: u, namespace: t, serializer: n, debounceMs: r, crossTabSync: i, notify(c) {
1331
1331
  const h = l.current.get(c);
1332
1332
  h && h.forEach((d) => d());
1333
1333
  }, subscribeKey(c, h) {
@@ -1337,16 +1337,16 @@ function lr(o) {
1337
1337
  m && (m.delete(h), m.size === 0 && d.delete(c));
1338
1338
  };
1339
1339
  } }), [u, t, n, r, i]);
1340
- return H(() => {
1340
+ return W(() => {
1341
1341
  if (s.crossTabSync && s.store.subscribe) return s.store.subscribe((c) => {
1342
1342
  if (!c.startsWith(s.namespace + ":")) return;
1343
1343
  const h = c.slice(s.namespace.length + 1);
1344
1344
  s.notify(h);
1345
1345
  });
1346
- }, [s]), P(un.Provider, { value: s, children: a });
1346
+ }, [s]), P(dn.Provider, { value: s, children: a });
1347
1347
  }
1348
- const ho = { parse: (o) => o == null ? null : JSON.parse(o), stringify: JSON.stringify };
1349
- class ar {
1348
+ const po = { parse: (o) => o == null ? null : JSON.parse(o), stringify: JSON.stringify };
1349
+ class mr {
1350
1350
  constructor(e = window.localStorage) {
1351
1351
  this.storage = e;
1352
1352
  }
@@ -1376,152 +1376,158 @@ class ar {
1376
1376
  return window.addEventListener("storage", t), () => window.removeEventListener("storage", t);
1377
1377
  }
1378
1378
  }
1379
- const te = { Horizontal: "horizontal", Vertical: "vertical" }, xe = { scrollbar: "_scrollbar_15caq_24", track: "_track_15caq_34", thumb: "_thumb_15caq_46", "scrollbar-button": "_scrollbar-button_15caq_86", "touch-thumb": "_touch-thumb_15caq_121" }, dn = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", pn = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", po = { transform: "rotate(180deg)" }, fo = (o) => {
1380
- const { style: e, orientation: t = te.Vertical, disabled: n, ...r } = o, i = t === te.Vertical ? dn : pn;
1381
- return P("button", { style: e, className: le(xe["scrollbar-button"], t, "scroll-button"), disabled: n, ...r, children: P("svg", { width: "9", height: "9", viewBox: "0 0 9 9", children: P("path", { d: i }) }) });
1382
- }, mo = (o) => {
1383
- const { style: e, orientation: t = te.Vertical, disabled: n, ...r } = o, i = t === te.Vertical ? dn : pn;
1384
- return P("button", { style: e, className: le(xe["scrollbar-button"], t, "scroll-button"), disabled: n, ...r, children: P("svg", { width: "9", height: "9", viewBox: "0 0 9 9", style: po, children: P("path", { d: i }) }) });
1385
- }, cr = (o) => {
1386
- const { style: e, orientation: t = te.Vertical, ...n } = o, r = t === te.Vertical;
1379
+ const ne = { Horizontal: "horizontal", Vertical: "vertical" }, xe = { scrollbar: "_scrollbar_gqxsx_24", track: "_track_gqxsx_35", thumb: "_thumb_gqxsx_47", "scrollbar-button": "_scrollbar-button_gqxsx_89", "touch-thumb": "_touch-thumb_gqxsx_124" }, fn = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", mn = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", fo = { transform: "rotate(180deg)" }, mo = (o) => {
1380
+ const { style: e, orientation: t = ne.Vertical, disabled: n, ...r } = o, i = t === ne.Vertical ? fn : mn;
1381
+ return P("button", { style: e, className: G(xe["scrollbar-button"], t, "scroll-button"), disabled: n, ...r, children: P("svg", { width: "9", height: "9", viewBox: "0 0 9 9", children: P("path", { d: i }) }) });
1382
+ }, _o = (o) => {
1383
+ const { style: e, orientation: t = ne.Vertical, disabled: n, ...r } = o, i = t === ne.Vertical ? fn : mn;
1384
+ return P("button", { style: e, className: G(xe["scrollbar-button"], t, "scroll-button"), disabled: n, ...r, children: P("svg", { width: "9", height: "9", viewBox: "0 0 9 9", style: fo, children: P("path", { d: i }) }) });
1385
+ }, _r = (o) => {
1386
+ const { style: e, orientation: t = ne.Vertical, ...n } = o, r = t === ne.Vertical;
1387
1387
  return P("div", { style: { display: "flex", justifyContent: "center", alignItems: "end", transition: "fill-opacity 1s", zIndex: 1, width: "24px", height: "24px", ...e }, className: `scrollbar-button ${r ? "vertical" : "horizontal"} edge`, ...n, children: P("svg", { width: "24", height: "24", viewBox: "0 0 24 24", transform: r ? "rotate(90) " : "", children: P("path", { style: { transition: "opacity 240ms ease 0s", opacity: o.disabled ? 0 : 1 }, d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }) }) });
1388
- }, _o = $e().supportsTouchEvents, fn = me(Ee((o, e) => {
1389
- const { borderColor: t = "var(--sxl-app-color-primary, rgb(33, 115, 70))", backgroundColor: n = "var(--sxl-app-color-background, white)", fillColor: r = "var(--sxl-app-color-grey, grey)", borderWidth: i = 3, size: a = 22, style: u, className: l, onPointerDown: s, onPointerMove: c, onPointerUp: h, orientation: d = te.Vertical, offset: f = 0, currentTouchAnchor: m, elementParent: p, elementRoot: x, key: T, ..._ } = o;
1390
- if (!_o) return null;
1391
- const w = k(s, [s]), y = k(c, [c]), z = k(h, [h]), E = d === te.Vertical, [B, $] = Y(!1), S = rn(K(() => ({ processTouch: !0, consumeTouch: !0, onPointerDown: (D, F) => {
1392
- $(!0), w?.(D), D.preventDefault(), D.stopPropagation();
1393
- }, onPointerMoveOrWait: (D, F, W) => {
1394
- y?.(D);
1395
- }, onPointerUp: (D, F, W) => {
1396
- $(!1), z?.(W), D.preventDefault(), D.stopPropagation();
1397
- } }), [])), b = K(() => {
1388
+ }, go = $e().supportsTouchEvents, _n = me(Ee((o, e) => {
1389
+ const { borderColor: t = "var(--sxl-app-color-primary, rgb(33, 115, 70))", backgroundColor: n = "var(--sxl-app-color-background, white)", fillColor: r = "var(--sxl-app-color-grey, grey)", borderWidth: i = 3, size: a = 22, style: u, className: l, onPointerDown: s, onPointerMove: c, onPointerUp: h, orientation: d = ne.Vertical, offset: f = 0, currentTouchAnchor: m, elementParent: p, elementRoot: x, key: L, ...y } = o;
1390
+ if (!go) return null;
1391
+ const _ = k(s, [s]), v = k(c, [c]), B = k(h, [h]), S = d === ne.Vertical, [O, I] = q(!1), M = ln(R(() => ({ processTouch: !0, consumeTouch: !0, onPointerDown: (D, F) => {
1392
+ I(!0), _?.(D), D.preventDefault(), D.stopPropagation();
1393
+ }, onPointerMoveOrWait: (D, F, V) => {
1394
+ v?.(D);
1395
+ }, onPointerUp: (D, F, V) => {
1396
+ I(!1), B?.(V), D.preventDefault(), D.stopPropagation();
1397
+ } }), [])), b = R(() => {
1398
1398
  const D = a / 2 + i / 2 + 6;
1399
- return { x: E ? -D : f + a, y: E ? f + a : -D, width: 0, height: 0 };
1400
- }, [E, f, a]), [C, { y: M, x: O }] = Wn(), g = I(null), { getPortalContainer: L, isFullscreen: R } = Vn(), [N, G] = Y(null);
1401
- return H(() => {
1402
- const D = g.current?.getBoundingClientRect();
1403
- if (!D) return void G(null);
1404
- let F = 0, W = 0, X = p;
1405
- for (; X; ) F += X.scrollLeft, W += X.scrollTop, X = x && X === x.parentElement ? null : X.parentElement;
1406
- G(Mn(P("div", { className: le("touch-thumb", xe["touch-thumb"], l, xe, { dragging: B }), ref: e, style: { left: F + (D?.x ?? 0) - (a + i) / 2, top: W + (D?.y ?? 0) - (a + i) / 2, width: E ? a : 1.8 * a, height: E ? 1.8 * a : a, borderWidth: `${i}px`, boxShadow: B ? `${n} 0px 0px 0px 1.5px` : void 0, borderStyle: "solid", borderColor: t, backgroundColor: n, opacity: m ? 0 : void 0, transitionDuration: "160ms", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${r}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center center", ...u }, tabIndex: -1, onPointerDown: S, ..._ }), x ?? L(), T));
1407
- }, [M, B, t, n, r, O, b?.x, b?.y, b?.width, b?.height, l, m, n, a, i, t, p, R, T]), b ? pe(fe, { children: [P("div", { ref: Ae([C, g]), style: { position: "absolute", left: b.x, top: b.y, opacity: 0 } }), N] }) : null;
1399
+ return { x: S ? -D : f + a, y: S ? f + a : -D, width: 0, height: 0 };
1400
+ }, [S, f, a]), [C, { y: E, x: $ }] = Vn(), T = K(null), { getPortalContainer: g, isFullscreen: A } = Fn(), [H, X] = q(null);
1401
+ return W(() => {
1402
+ const D = T.current?.getBoundingClientRect();
1403
+ if (!D) return void X(null);
1404
+ let F = 0, V = 0, Y = p;
1405
+ for (; Y; ) F += Y.scrollLeft, V += Y.scrollTop, Y = x && Y === x.parentElement ? null : Y.parentElement;
1406
+ X(Ln(P("div", { className: G("touch-thumb", xe["touch-thumb"], l, xe, { dragging: O }), ref: e, style: { left: F + (D?.x ?? 0) - (a + i) / 2, top: V + (D?.y ?? 0) - (a + i) / 2, width: S ? a : 1.8 * a, height: S ? 1.8 * a : a, borderWidth: `${i}px`, boxShadow: O ? `${n} 0px 0px 0px 1.5px` : void 0, borderStyle: "solid", borderColor: t, backgroundColor: n, opacity: m ? 0 : void 0, transitionDuration: "160ms", backgroundImage: `url("data:image/svg+xml,%3Csvg width='6.4' height='12' viewBox='0 0 9.6 16' version='1.1' fill='${r}' xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg'%3E%3Cpath d='M 9.60008,14.40009 C 9.60008,15.28374 8.88368,16 8.00003,16 7.11639,16 6.40012,15.28374 6.40012,14.40009 c 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40012 c 0,0.88364 -0.7164,1.60004 -1.60005,1.60004 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60004 0,-0.88365 0.71627,-1.60005 1.59991,-1.60005 0.88365,0 1.60005,0.7164 1.60005,1.60005 m 0,-6.40006 c 0,0.88365 -0.7164,1.60005 -1.60005,1.60005 -0.88364,0 -1.59991,-0.7164 -1.59991,-1.60005 C 6.40012,0.71626 7.11639,0 8.00003,0 8.88368,0 9.60008,0.71626 9.60008,1.59991 M 3.19996,14.40009 C 3.19996,15.28374 2.48369,16 1.60005,16 0.7164,16 0,15.28374 0,14.40009 c 0,-0.88365 0.7164,-1.60005 1.60005,-1.60005 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40012 c 0,0.88364 -0.71627,1.60004 -1.59991,1.60004 C 0.7164,9.60001 0,8.88361 0,7.99997 0,7.11632 0.7164,6.39992 1.60005,6.39992 c 0.88364,0 1.59991,0.7164 1.59991,1.60005 m 0,-6.40006 c 0,0.88365 -0.71627,1.60005 -1.59991,1.60005 C 0.7164,3.19996 0,2.48356 0,1.59991 0,0.71626 0.7164,0 1.60005,0 2.48369,0 3.19996,0.71626 3.19996,1.59991' /%3E%3C/svg%3E%0A")`, backgroundRepeat: "no-repeat", backgroundPosition: "center center", ...u }, tabIndex: -1, onPointerDown: M, ...y }), x ?? g(), L));
1407
+ }, [E, O, t, n, r, $, b?.x, b?.y, b?.width, b?.height, l, m, n, a, i, t, p, A, L]), b ? pe(fe, { children: [P("div", { ref: Ae([C, T]), style: { position: "absolute", left: b.x, top: b.y, opacity: 0 } }), H] }) : null;
1408
1408
  }));
1409
- fn.displayName = "TouchThumbHandle";
1410
- const go = 24, yo = me(Ee((o, e) => {
1411
- const { offset: t = 0, totalSize: n = 0, viewportSize: r = 0, style: i, className: a, orientation: u = te.Vertical, onScrollOffset: l, onScroll: s, showCustomScrollButtons: c, scrollButtonIncrement: h = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: f = 120, minThumbSize: m = go, maxThumbSize: p, createScrollStartButton: x = fo, createScrollEndButton: T = mo, touchThumbProps: _, thumbProps: w, onMouseDown: y, ...z } = o, E = $e().primaryInput === "touch", B = c ?? !E;
1409
+ _n.displayName = "TouchThumbHandle";
1410
+ const yo = 24, vo = me(Ee((o, e) => {
1411
+ const { offset: t = 0, totalSize: n = 0, viewportSize: r = 0, style: i, className: a, orientation: u = ne.Vertical, onScrollOffset: l, onScroll: s, showCustomScrollButtons: c, scrollButtonIncrement: h = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: f = 120, minThumbSize: m = yo, maxThumbSize: p, createScrollStartButton: x = mo, createScrollEndButton: L = _o, touchThumbProps: y, thumbProps: _, onMouseDown: v, ...B } = o, S = $e().primaryInput === "touch", O = c ?? !S;
1412
1412
  k(s, [s]);
1413
- const [$, S] = Y({ offset: 0, length: 0 }), b = I(-1), C = u === te.Vertical, [M, { width: O, height: g }] = Se(), L = C ? g : O, R = k((v, V, Q) => {
1414
- if (V === 0 || Q === 0) return void S({ offset: 0, length: m });
1415
- const ye = Q / L, ke = V / ye, ve = Math.min(Math.max(m, ke), Math.min(L, p ?? Number.MAX_SAFE_INTEGER)), ct = v / ye;
1416
- return { offset: Math.min(Math.max(0, ct), L - ve), length: ve };
1417
- }, [L, m, p]), N = k((v) => {
1418
- const V = n / L, Q = Math.round(v * V);
1419
- S(R(Q, r, n)), l?.(Q, r, n), b.current = v;
1420
- }, [l, r, n, L, $]), G = k((v) => {
1421
- S(R(v, r, n)), l?.(v, r, n), b.current = v;
1413
+ const [I, M] = q({ offset: 0, length: 0, disabled: !1 }), b = K(-1), C = u === ne.Vertical, [E, { width: $, height: T }] = Se(), g = C ? T : $, A = k((w, N, Z) => {
1414
+ if (N === 0 || Z === 0) {
1415
+ const Ge = { offset: 0, length: m, disabled: !0 };
1416
+ return M(Ge), Ge;
1417
+ }
1418
+ if (N >= Z) return { offset: 0, length: g, disabled: !0 };
1419
+ const ye = Z / g, ke = N / ye, ve = Math.min(Math.max(m, ke), Math.min(g, p ?? Number.MAX_SAFE_INTEGER)), ut = w / ye;
1420
+ return { offset: Math.min(Math.max(0, ut), g - ve), length: ve, disabled: !1 };
1421
+ }, [g, m, p]), H = k((w) => {
1422
+ const N = n / g, Z = Math.round(w * N);
1423
+ M(A(Z, r, n)), l?.(Z, r, n), b.current = w;
1424
+ }, [l, r, n, g, I]), X = k((w) => {
1425
+ M(A(w, r, n)), l?.(w, r, n), b.current = w;
1422
1426
  }, [l, r, n]);
1423
- H(() => {
1424
- b.current !== t && L !== 0 && (b.current = -1, S(R(t, r, n)));
1425
- }, [t]), H(() => {
1426
- L !== 0 && S(R(t, r, n));
1427
- }, [r, n, C, L]);
1428
- const D = Math.max(0, n - r), [F, W] = Y(!1), X = I(0), J = I(0), Me = Lt(e, () => ({ isScrollbar: () => !0 }), []), _e = k((v) => {
1429
- W(!0), X.current = C ? v.clientY : v.clientX, J.current = $.offset;
1430
- }, [C, $]), Le = k((v) => {
1431
- v.currentTarget.setPointerCapture(v.pointerId), _e(v), v.stopPropagation();
1432
- }, [y]), ge = k((v) => {
1427
+ W(() => {
1428
+ b.current !== t && g !== 0 && (b.current = -1, M(A(t, r, n)));
1429
+ }, [t]), W(() => {
1430
+ g !== 0 && M(A(t, r, n));
1431
+ }, [r, n, C, g]);
1432
+ const D = Math.max(0, n - r), [F, V] = q(!1), Y = K(0), ee = K(0), Me = Ct(e, () => ({ isScrollbar: () => !0 }), []), _e = k((w) => {
1433
+ V(!0), Y.current = C ? w.clientY : w.clientX, ee.current = I.offset;
1434
+ }, [C, I]), Le = k((w) => {
1435
+ w.currentTarget.setPointerCapture(w.pointerId), _e(w), w.stopPropagation();
1436
+ }, [v]), ge = k((w) => {
1433
1437
  if (!F) return;
1434
- const V = (C ? v.clientY : v.clientX) - X.current, Q = J.current + V;
1435
- N(Q);
1436
- }, [F, C]), st = k((v) => {
1437
- ge(v);
1438
- }, []), Re = k((v) => {
1439
- W(!1);
1440
- }, []), lt = k((v) => {
1438
+ const N = (C ? w.clientY : w.clientX) - Y.current, Z = ee.current + N;
1439
+ H(Z);
1440
+ }, [F, C]), lt = k((w) => {
1441
+ ge(w);
1442
+ }, []), Ne = k((w) => {
1443
+ V(!1);
1444
+ }, []), at = k((w) => {
1441
1445
  try {
1442
- v.currentTarget.releasePointerCapture(v.pointerId);
1446
+ w.currentTarget.releasePointerCapture(w.pointerId);
1443
1447
  } catch {
1444
1448
  }
1445
- Re(v);
1446
- }, []), Ne = k((v) => {
1447
- if (!v.currentTarget) return;
1448
- const V = v.currentTarget.getBoundingClientRect(), Q = C ? v.clientY - V.top : v.clientX - V.left;
1449
- N(Q);
1450
- }, [C, $, r, n]), He = k((v) => {
1451
- const V = Math.max(1, Math.floor(0.9 * r));
1452
- C ? (v.key === "ArrowDown" && N(Math.min(D, t + 1)), v.key === "ArrowUp" && N(Math.max(0, t - 1)), v.key === "PageDown" && N(Math.min(D, t + V)), v.key === "PageUp" && N(Math.max(0, t - V)), v.key === "Home" && N(0), v.key === "End" && N(D)) : (v.key === "ArrowRight" && N(Math.min(D, t + 1)), v.key === "ArrowLeft" && N(Math.max(0, t - 1)), v.key === "PageDown" && N(Math.min(D, t + V)), v.key === "PageUp" && N(Math.max(0, t - V)), v.key === "Home" && N(0), v.key === "End" && N(D));
1453
- }, [C, r, n, t, D]), We = I(null), at = K(() => {
1454
- const v = P("div", { ...w, className: le(xe.thumb), ref: We, role: "slider", "aria-label": C ? "Rows" : "Columns", "aria-orientation": C ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": D, "aria-valuenow": t, tabIndex: 0, style: { ...w?.style, position: "relative", [C ? "height" : "width"]: `${$.length}px`, [C ? "width" : "height"]: "100%", transform: C ? `translateY(${$.offset}px)` : `translateX(${$.offset}px)`, [C ? "minHeight" : "minWidth"]: `${m}px` }, onMouseDown: y, onPointerDown: Le, onPointerMove: st, onPointerUp: lt });
1455
- return E ? pe(fe, { children: [v, P(fn, { ..._, offset: $.offset, orientation: C ? te.Vertical : te.Horizontal, onPointerDown: _e, onPointerMove: ge, onPointerUp: Re })] }) : v;
1456
- }, [$, m, D, t, C, E, y, _, w]), [Ve, Fe] = Y(null), je = k(() => {
1457
- let v;
1458
- v = typeof h == "function" ? h(t, r, n) : t - h;
1459
- const V = Math.max(0, v);
1460
- return G(V), Fe(V), V;
1449
+ Ne(w);
1450
+ }, []), Re = k((w) => {
1451
+ if (!w.currentTarget) return;
1452
+ const N = w.currentTarget.getBoundingClientRect(), Z = C ? w.clientY - N.top : w.clientX - N.left;
1453
+ H(Z);
1454
+ }, [C, I, r, n]), He = k((w) => {
1455
+ const N = Math.max(1, Math.floor(0.9 * r));
1456
+ C ? (w.key === "ArrowDown" && H(Math.min(D, t + 1)), w.key === "ArrowUp" && H(Math.max(0, t - 1)), w.key === "PageDown" && H(Math.min(D, t + N)), w.key === "PageUp" && H(Math.max(0, t - N)), w.key === "Home" && H(0), w.key === "End" && H(D)) : (w.key === "ArrowRight" && H(Math.min(D, t + 1)), w.key === "ArrowLeft" && H(Math.max(0, t - 1)), w.key === "PageDown" && H(Math.min(D, t + N)), w.key === "PageUp" && H(Math.max(0, t - N)), w.key === "Home" && H(0), w.key === "End" && H(D));
1457
+ }, [C, r, n, t, D]), We = K(null), ct = R(() => {
1458
+ const w = I.disabled;
1459
+ if (w) return null;
1460
+ const N = P("div", { ..._, className: G(xe.thumb, { disabled: w }), ref: We, role: "slider", "aria-label": C ? "Rows" : "Columns", "aria-orientation": C ? "vertical" : "horizontal", "aria-valuemin": 0, "aria-valuemax": D, "aria-valuenow": t, tabIndex: 0, style: { ..._?.style, position: "relative", [C ? "height" : "width"]: `${I.length}px`, [C ? "width" : "height"]: "100%", transform: C ? `translateY(${I.offset}px)` : `translateX(${I.offset}px)`, [C ? "minHeight" : "minWidth"]: `${m}px` }, onMouseDown: v, onPointerDown: Le, onPointerMove: lt, onPointerUp: at });
1461
+ return !S || w ? N : pe(fe, { children: [N, P(_n, { ...y, offset: I.offset, orientation: C ? ne.Vertical : ne.Horizontal, onPointerDown: _e, onPointerMove: ge, onPointerUp: Ne })] });
1462
+ }, [I, m, D, t, C, S, v, y, _]), [Ve, Fe] = q(null), je = k(() => {
1463
+ let w;
1464
+ w = typeof h == "function" ? h(t, r, n) : t - h;
1465
+ const N = Math.max(0, w);
1466
+ return X(N), Fe(N), N;
1461
1467
  }, [h, t, r, n]), Ue = k(() => {
1462
- let v;
1463
- v = typeof h == "function" ? h(t, r, n) : t + h;
1464
- const V = Math.min(D, v);
1465
- return G(V), Fe(V), V;
1466
- }, [h, t, D, r, n]), Ce = I(null), ze = I(null), ie = U(() => {
1468
+ let w;
1469
+ w = typeof h == "function" ? h(t, r, n) : t + h;
1470
+ const N = Math.min(D, w);
1471
+ return X(N), Fe(N), N;
1472
+ }, [h, t, D, r, n]), Ce = K(null), ze = K(null), se = U(() => {
1467
1473
  Ce.current && (clearTimeout(Ce.current), Ce.current = null, ze.current = null);
1468
- }, []), Te = U((v, V, Q, ye = d) => {
1469
- ze.current = v, Ce.current = setTimeout(() => {
1470
- const ke = Q ? je() : Ue();
1471
- ke !== ze.current ? Te(ke, !1, Q, f) : ie();
1472
- }, V ? 0 : ye);
1473
- }, [je, Ue, ie]);
1474
- H(() => () => ie(), [ie]);
1475
- const Xe = K(() => {
1476
- if (!B) return null;
1477
- const v = { orientation: u, disabled: t <= 0, onMouseUp: ie, onMouseLeave: ie, onMouseDown: () => Te(t, !0, !0) };
1478
- return x?.(v);
1479
- }, [B, u, t, Ve]), Ye = K(() => {
1480
- if (!B) return null;
1481
- const v = { orientation: u, disabled: t >= D, onMouseUp: ie, onMouseLeave: ie, onMouseDown: () => Te(t, !0, !1) };
1482
- return T?.(v);
1483
- }, [B, u, t, D, Ve]), Be = C ? "vertical" : "horizontal";
1484
- return pe("div", { ref: Ae([Me, e]), className: le(a, xe.scrollbar, Be, { dragging: F, "has-touch-thumb": E }), style: i, ...z, children: [Xe, P("div", { ref: M, role: "scrollbar", "aria-orientation": Be, "aria-valuemin": 0, "aria-valuemax": D, "aria-valuenow": t, tabIndex: 0, className: le(xe.track, "track", Be), onMouseDown: y, onPointerDown: Ne, onKeyDown: He, children: at }), Ye] });
1474
+ }, []), Te = U((w, N, Z, ye = d) => {
1475
+ ze.current = w, Ce.current = setTimeout(() => {
1476
+ const ke = Z ? je() : Ue();
1477
+ ke !== ze.current ? Te(ke, !1, Z, f) : se();
1478
+ }, N ? 0 : ye);
1479
+ }, [je, Ue, se]);
1480
+ W(() => () => se(), [se]);
1481
+ const Xe = R(() => {
1482
+ if (!O) return null;
1483
+ const w = { orientation: u, disabled: t <= 0, onMouseUp: se, onMouseLeave: se, onMouseDown: () => Te(t, !0, !0) };
1484
+ return x?.(w);
1485
+ }, [O, u, t, Ve]), Ye = R(() => {
1486
+ if (!O) return null;
1487
+ const w = { orientation: u, disabled: t >= D, onMouseUp: se, onMouseLeave: se, onMouseDown: () => Te(t, !0, !1) };
1488
+ return L?.(w);
1489
+ }, [O, u, t, D, Ve]), Be = C ? "vertical" : "horizontal";
1490
+ return pe("div", { ref: Ae([Me, e]), className: G(a, xe.scrollbar, Be, { dragging: F, "has-touch-thumb": S }), style: i, ...B, children: [Xe, P("div", { ref: E, role: "scrollbar", "aria-orientation": Be, "aria-valuemin": 0, "aria-valuemax": D, "aria-valuenow": t, tabIndex: 0, className: G(xe.track, "track", Be), onMouseDown: v, onPointerDown: Re, onKeyDown: He, children: ct }), Ye] });
1485
1491
  }));
1486
- let Vt = Date.now, Ft = 1e3, de = {}, vo = 1;
1492
+ let Ft = Date.now, jt = 1e3, de = {}, bo = 1;
1487
1493
  const Ie = (o) => {
1488
1494
  let e = de[o] !== null;
1489
1495
  return e && (de[o] = null), e;
1490
- }, jt = (o, e, t, n = 0, r) => {
1491
- let i = Vt(), a = i, u = 0, l = 0, s = 0, c = vo++;
1496
+ }, Ut = (o, e, t, n = 0, r) => {
1497
+ let i = Ft(), a = i, u = 0, l = 0, s = 0, c = bo++;
1492
1498
  if (c % 20 == 0) {
1493
1499
  const d = {};
1494
1500
  for (let f in de) d[f] = !0;
1495
1501
  de = d;
1496
1502
  }
1497
1503
  const h = function(d) {
1498
- let f = d !== !0, m = Vt(), p = !0;
1504
+ let f = d !== !0, m = Ft(), p = !0;
1499
1505
  try {
1500
1506
  p = (!e || e(c)) ?? !0;
1501
1507
  } catch {
1502
1508
  p = !1;
1503
1509
  }
1504
- if (!de[c] || !p) return de[c] = null, void t?.(60 - l / ((m - i) / Ft), c, !1);
1510
+ if (!de[c] || !p) return de[c] = null, void t?.(60 - l / ((m - i) / jt), c, !1);
1505
1511
  if (f) {
1506
1512
  s = Math.round((m - a) / 16.666666666666668) - 1;
1507
- for (let _ = 0; _ < Math.min(s, 4); _++) h(!0), l++;
1513
+ for (let y = 0; y < Math.min(s, 4); y++) h(!0), l++;
1508
1514
  }
1509
1515
  n && (u = (m - i) / n, u > 1 && (u = 1));
1510
- let x = r ? r(u) : u, T = !1;
1516
+ let x = r ? r(u) : u, L = !1;
1511
1517
  try {
1512
- T = o(x, m, f);
1518
+ L = o(x, m, f);
1513
1519
  } catch {
1514
- T = !1;
1520
+ L = !1;
1515
1521
  }
1516
- T !== !1 && u !== 1 || !f ? f && (a = m, requestAnimationFrame(h)) : (de[c] = null, t?.(60 - l / ((m - i) / Ft), c, u === 1 || n == null));
1522
+ L !== !1 && u !== 1 || !f ? f && (a = m, requestAnimationFrame(h)) : (de[c] = null, t?.(60 - l / ((m - i) / jt), c, u === 1 || n == null));
1517
1523
  };
1518
1524
  return de[c] = !0, requestAnimationFrame(h), c;
1519
1525
  }, wo = function(o) {
1520
1526
  return Math.pow(o - 1, 3) + 1;
1521
- }, bo = function(o) {
1527
+ }, xo = function(o) {
1522
1528
  return (o /= 0.5) < 1 ? 0.5 * Math.pow(o, 3) : 0.5 * (Math.pow(o - 2, 3) + 2);
1523
1529
  };
1524
- class xo {
1530
+ class So {
1525
1531
  constructor(e, t) {
1526
1532
  this.__isSingleTouch = !1, this.__isTracking = !1, this.__didDecelerationComplete = !1, this.__isGesturing = !1, this.__isDragging = !1, this.__isDecelerating = 0, this.__isAnimating = 0, this.__interruptedAnimation = !1, this.__lastScale = 1, this.__enableScrollX = !0, this.__enableScrollY = !0, this.__clientLeft = 0, this.__clientTop = 0, this.__clientWidth = 0, this.__clientHeight = 0, this.__contentWidth = 0, this.__contentHeight = 0, this.__snapWidth = 100, this.__snapHeight = 100, this.__zoomLevel = 1, this.__scrollLeft = 0, this.__scrollTop = 0, this.__maxScrollLeft = 0, this.__maxScrollTop = 0, this.__scheduledLeft = 0, this.__scheduledTop = 0, this.__scheduledZoom = 0, this.__lastTouchLeft = 0, this.__lastTouchTop = 0, this.__lastTouchMove = 0, this.__positions = [], this.__initialTouchLeft = 0, this.__initialTouchTop = 0, this.__zoomLevelStart = 1, this.__minDecelerationScrollLeft = null, this.__minDecelerationScrollTop = null, this.__maxDecelerationScrollLeft = null, this.__maxDecelerationScrollTop = null, this.__decelerationVelocityX = null, this.__decelerationVelocityY = 0, this.__callback = e, this.options = { scrollingX: !0, scrollingY: !0, animating: !0, animationDuration: 250, bouncing: !0, locking: !0, paging: !1, snapping: !1, zooming: !1, minZoom: 0.5, maxZoom: 3, speedMultiplier: 1, scrollingComplete: void 0, penetrationDeceleration: 0.03, penetrationAcceleration: 0.08, ...t };
1527
1533
  }
@@ -1632,14 +1638,14 @@ class xo {
1632
1638
  const i = this.__isAnimating;
1633
1639
  if (i && (Ie(i), this.__isAnimating = 0), r && this.options.animating) {
1634
1640
  this.__scheduledLeft = e, this.__scheduledTop = t, this.__scheduledZoom = n;
1635
- const a = this.__scrollLeft, u = this.__scrollTop, l = this.__zoomLevel, s = e - a, c = t - u, h = n - l, d = function(p, x, T) {
1636
- T && (this.__scrollLeft = a + s * p, this.__scrollTop = u + c * p, this.__zoomLevel = l + h * p, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
1641
+ const a = this.__scrollLeft, u = this.__scrollTop, l = this.__zoomLevel, s = e - a, c = t - u, h = n - l, d = function(p, x, L) {
1642
+ L && (this.__scrollLeft = a + s * p, this.__scrollTop = u + c * p, this.__zoomLevel = l + h * p, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
1637
1643
  }.bind(this), f = function(p) {
1638
1644
  return this.__isAnimating === p;
1639
- }.bind(this), m = function(p, x, T) {
1640
- x === this.__isAnimating && (this.__isAnimating = !1), (this.__didDecelerationComplete || T) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
1645
+ }.bind(this), m = function(p, x, L) {
1646
+ x === this.__isAnimating && (this.__isAnimating = !1), (this.__didDecelerationComplete || L) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
1641
1647
  }.bind(this);
1642
- this.__isAnimating = jt(d, f, m, this.options.animationDuration, i ? wo : bo);
1648
+ this.__isAnimating = Ut(d, f, m, this.options.animationDuration, i ? wo : xo);
1643
1649
  } else this.__scheduledLeft = this.__scrollLeft = e, this.__scheduledTop = this.__scrollTop = t, this.__scheduledZoom = this.__zoomLevel = n, this.__callback && this.__callback(e, t, n), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
1644
1650
  }
1645
1651
  __computeScrollMax(e = this.__zoomLevel) {
@@ -1658,7 +1664,7 @@ class xo {
1658
1664
  }.bind(this), i = function(a, u, l) {
1659
1665
  this.__isDecelerating = 0, this.__didDecelerationComplete && this.options.scrollingComplete?.(), this.scrollTo(this.__scrollLeft, this.__scrollTop, this.options.snapping);
1660
1666
  }.bind(this);
1661
- this.__isDecelerating = jt(t, r, i);
1667
+ this.__isDecelerating = Ut(t, r, i);
1662
1668
  }
1663
1669
  __stepThroughDeceleration(e) {
1664
1670
  let t = this.__scrollLeft + this.__decelerationVelocityX, n = this.__scrollTop + this.__decelerationVelocityY;
@@ -1674,7 +1680,7 @@ class xo {
1674
1680
  }
1675
1681
  }
1676
1682
  }
1677
- const Ke = (o, e) => P(yo, { ...o, ref: e }), ur = Object.freeze(Object.defineProperty({ __proto__: null, defaultCreateScrollbar: Ke, getScrollTo: (o, e, t, n, r = 0) => {
1683
+ const Ke = (o, e) => P(vo, { ...o, ref: e }), gr = Object.freeze(Object.defineProperty({ __proto__: null, defaultCreateScrollbar: Ke, getScrollTo: (o, e, t, n, r = 0) => {
1678
1684
  for (let i = 0; i < t.length; i++) {
1679
1685
  const a = t[i].getBoundingClientRect();
1680
1686
  let u = a.left - e, l = u + a.width;
@@ -1683,124 +1689,124 @@ const Ke = (o, e) => P(yo, { ...o, ref: e }), ur = Object.freeze(Object.definePr
1683
1689
  } else if (Math.ceil(l) > Math.ceil(o) + 2) return l;
1684
1690
  }
1685
1691
  return r;
1686
- } }, Symbol.toStringTag, { value: "Module" })), So = ({ width: o, height: e }) => P("div", { className: "corner", style: { minWidth: `${o}px`, width: `${o}px`, minHeight: `${e}px`, height: `${e}px` } }), Eo = me(Ee((o, e) => {
1687
- const { children: t, viewport: n, onScrollViewport: r, showHorizontalScrollbar: i = !0, showVerticalScrollbar: a = !0, createScrollCorner: u = So, createHorizontalScrollbar: l = Ke, createVerticalScrollbar: s = Ke, style: c, touchElement: h, disableTouch: d, ...f } = o, m = i && l, p = a && s, x = k(r, [r]), T = Lt(e, () => ({ isScrollPane: () => !0 }), []), _ = I(null);
1688
- H(() => {
1692
+ } }, Symbol.toStringTag, { value: "Module" })), Eo = "_scrollpane_1fbi8_2", Mo = "_vertical-container_1fbi8_7", Lo = "_horizontal-corner-container_1fbi8_12", Co = "_horizontal-container_1fbi8_20", To = "_scrollbar-sizer_1fbi8_26", ko = "_scrollpane-content_1fbi8_34", Xt = "_scrollpane-content-element_1fbi8_43", Po = ({ width: o, height: e }) => P("div", { className: "corner", style: { minWidth: `${o}px`, width: `${o}px`, minHeight: `${e}px`, height: `${e}px` } }), Do = me(Ee((o, e) => {
1693
+ const { children: t, viewport: n, onScrollViewport: r, showHorizontalScrollbar: i = !0, showVerticalScrollbar: a = !0, createScrollCorner: u = Po, createHorizontalScrollbar: l = Ke, createVerticalScrollbar: s = Ke, style: c, className: h, touchElement: d, disableTouch: f, ...m } = o, p = i && l, x = a && s, L = k(r, [r]), y = Ct(e, () => ({ isScrollPane: () => !0 }), []), _ = K(null);
1694
+ W(() => {
1689
1695
  _.current && (_.current.__scrollTop === n?.top && _.current.__scrollLeft === n?.left || _.current.__isDecelerating || _.current?.scrollTo(n?.left, n?.top, !1));
1690
- }, [n?.left, n?.top, h]);
1691
- const w = U((g, L) => {
1692
- x?.({ left: g, top: L });
1693
- }, []), y = U((g) => {
1696
+ }, [n?.left, n?.top, d]);
1697
+ const v = U((g, A) => {
1698
+ L?.({ left: g, top: A });
1699
+ }, []), B = U((g) => {
1694
1700
  _.current?.doTouchStart(g.touches, g.timeStamp);
1695
- }, []), z = U((g) => {
1701
+ }, []), S = U((g) => {
1696
1702
  g.preventDefault(), _.current?.doTouchMove(g.touches, g.timeStamp);
1697
- }, []), E = U((g) => {
1703
+ }, []), O = U((g) => {
1698
1704
  _.current?.doTouchEnd(g.timeStamp);
1699
- }, []), B = U(({ containerWidth: g, containerHeight: L, totalWidth: R, totalHeight: N }) => {
1700
- _.current.setDimensions(g, L, R, N);
1705
+ }, []), I = U(({ containerWidth: g, containerHeight: A, totalWidth: H, totalHeight: X }) => {
1706
+ _.current.setDimensions(g, A, H, X);
1701
1707
  }, []);
1702
- H(() => {
1703
- const g = h ?? T.current;
1704
- if (!d && $e().supportsTouchEvents && g && n) {
1708
+ W(() => {
1709
+ const g = d ?? y.current;
1710
+ if (!f && $e().supportsTouchEvents && g && n) {
1705
1711
  if (!_.current) {
1706
- const L = { scrollingX: !0, scrollingY: !0, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
1707
- _.current = new xo(w, L);
1712
+ const A = { scrollingX: !0, scrollingY: !0, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
1713
+ _.current = new So(v, A);
1708
1714
  }
1709
- $e().supportsTouchEvents && (g.addEventListener("touchstart", y), g.addEventListener("touchend", E), g.addEventListener("touchmove", z)), B({ containerWidth: n?.width, containerHeight: n?.height, totalWidth: n?.totalWidth, totalHeight: n?.totalHeight });
1715
+ $e().supportsTouchEvents && (g.addEventListener("touchstart", B), g.addEventListener("touchend", O), g.addEventListener("touchmove", S)), I({ containerWidth: n?.width, containerHeight: n?.height, totalWidth: n?.totalWidth, totalHeight: n?.totalHeight });
1710
1716
  }
1711
1717
  return () => {
1712
- g?.removeEventListener("touchstart", y), g?.removeEventListener("touchend", E), g?.removeEventListener("touchmove", z);
1718
+ g?.removeEventListener("touchstart", B), g?.removeEventListener("touchend", O), g?.removeEventListener("touchmove", S);
1713
1719
  };
1714
- }, [n?.width, n?.height, n?.totalWidth, n?.totalHeight, d, h]);
1715
- const [$, { width: S }] = Se(), [b, { height: C }] = Se(), M = K(() => {
1716
- if (!p) return null;
1717
- const g = s({ orientation: te.Vertical, offset: n?.top, viewportSize: n?.height, totalSize: n?.totalHeight, onScrollOffset: (L) => {
1718
- x?.({ top: L });
1720
+ }, [n?.width, n?.height, n?.totalWidth, n?.totalHeight, f, d]);
1721
+ const [M, { width: b }] = Se(), [C, { height: E }] = Se(), $ = R(() => {
1722
+ if (!x) return null;
1723
+ const g = s({ orientation: ne.Vertical, offset: n?.top, viewportSize: n?.height, totalSize: n?.totalHeight, onScrollOffset: (A) => {
1724
+ L?.({ top: A });
1719
1725
  } });
1720
- return P("div", { style: { display: "flex", flex: "0" }, ref: $, children: g });
1721
- }, [s, n?.top, n?.height, n?.totalHeight]), O = K(() => {
1722
- if (!m) return null;
1723
- const g = l({ orientation: te.Horizontal, offset: n?.left, viewportSize: n?.width, totalSize: n?.totalWidth, onScrollOffset: (L) => {
1724
- x?.({ left: L });
1726
+ return P("div", { className: G("vertical-container", Mo), ref: M, children: g });
1727
+ }, [s, n?.top, n?.height, n?.totalHeight]), T = R(() => {
1728
+ if (!p) return null;
1729
+ const g = l({ orientation: ne.Horizontal, offset: n?.left, viewportSize: n?.width, totalSize: n?.totalWidth, onScrollOffset: (A) => {
1730
+ L?.({ left: A });
1725
1731
  } });
1726
- return pe("div", { style: { display: "flex", flex: "none", flexDirection: "row", alignItems: "stretch", justifyContent: "center" }, children: [P("div", { style: { display: "flex", flex: "1 1 100%", flexDirection: "column", width: `calc(100% - ${S}px)` }, children: P("div", { ref: b, className: "sizer", children: g }) }), p ? u({ width: S, height: C }) : P(fe, {})] });
1727
- }, [l, n?.left, n?.width, n?.totalWidth, p, u, S, C]);
1728
- return P("div", { style: { position: "relative", display: "flex", minWidth: p ? `${S}px` : void 0, minHeight: m ? `${C}px` : void 0, ...c }, ...f, ref: T, children: pe("div", { style: { position: "relative", width: "100%", flex: "1 1 100%", display: "flex", flexDirection: "column", boxSizing: "border-box" }, children: [pe("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: [P("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: t }), p ? M : P(fe, {})] }), m ? O : P(fe, {})] }) });
1732
+ return pe("div", { className: G("horizontal-corner-container", Lo), children: [P("div", { className: G("horizontal-container", Co), style: { width: `calc(100% - ${b}px)` }, children: P("div", { ref: C, className: G("scrollbar-sizer", To), children: g }) }), x ? u({ width: b, height: E }) : P(fe, {})] });
1733
+ }, [l, n?.left, n?.width, n?.totalWidth, x, u, b, E]);
1734
+ return P("div", { className: G(h, "scrollpane", Eo), style: { minWidth: x ? `${b}px` : void 0, minHeight: p ? `${E}px` : void 0, ...c }, ...m, ref: y, children: pe("div", { className: G("scrollpane-content", ko), children: [pe("div", { className: G("scrollpane-content-element", Xt), children: [P("div", { className: G("scrollpane-content-element", Xt), children: t }), x ? $ : P(fe, {})] }), p ? T : P(fe, {})] }) });
1729
1735
  }));
1730
- Eo.displayName = "ScrollPane";
1731
- const Mo = 300, Lo = 100, Co = 1e6, To = 100, ko = 50, Po = me(Ee((o, e) => {
1732
- const { offset: t = 0, viewportSize: n = 0, totalSize: r = 0, minSize: i = 0, endGap: a = Mo, endScrollIncrement: u = Lo, style: l = Qt, onMouseDown: s, onScrollOffset: c, onScroll: h, scaleLimit: d = Co, scaleFactor: f = To, precisionFactor: m = ko, createScrollbar: p = Ke, ...x } = o;
1736
+ Do.displayName = "ScrollPane";
1737
+ const Ao = 300, zo = 100, Bo = 1e6, Oo = 100, Io = 50, $o = me(Ee((o, e) => {
1738
+ const { offset: t = 0, viewportSize: n = 0, totalSize: r = 0, minSize: i = 0, endGap: a = Ao, endScrollIncrement: u = zo, style: l = tn, onMouseDown: s, onScrollOffset: c, onScroll: h, scaleLimit: d = Bo, scaleFactor: f = Oo, precisionFactor: m = Io, createScrollbar: p = Ke, ...x } = o;
1733
1739
  h && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
1734
- const T = k(s, [s]), [_, w] = Y(!1), y = K(() => {
1735
- const S = d === 0 ? r : Math.min(r ?? 0, Math.max(i ?? 0, (t ?? 0) + (n ?? 0)) + (a ?? 0)), b = d !== 0 && S > d ? f : 1, C = b / m, M = Math.ceil(S / b);
1736
- return { offset: Math.ceil(t / b), totalSize: M, viewportSize: Math.ceil(n / b), scaledOffset: t, scaledTotalSize: r, scaledViewportSize: n, factor: b, precision: C };
1737
- }, [t, r, n, _, i, a, u]), z = k((S, b, C) => {
1738
- const M = y.offset;
1739
- Math.abs(S - M) < y.precision && (S = M), c?.(S * y.factor, M, y.viewportSize);
1740
- }, [c, y]), E = U((S) => {
1741
- }, []), B = U((S) => {
1742
- document.removeEventListener("mousemove", E), document.removeEventListener("mouseup", B), w(!1);
1743
- }, []), $ = U((S) => {
1744
- w(!0), T?.(S), document.addEventListener("mousemove", E, { passive: !0 }), document.addEventListener("mouseup", B, { passive: !0 });
1745
- }, [E, B]);
1746
- return Ke({ style: l, ...x, offset: y.offset, totalSize: y.totalSize, viewportSize: y.viewportSize, onMouseDown: $, onScrollOffset: z }, e);
1740
+ const L = k(s, [s]), [y, _] = q(!1), v = R(() => {
1741
+ const M = d === 0 ? r : Math.min(r ?? 0, Math.max(i ?? 0, (t ?? 0) + (n ?? 0)) + (a ?? 0)), b = d !== 0 && M > d ? f : 1, C = b / m, E = Math.ceil(M / b);
1742
+ return { offset: Math.ceil(t / b), totalSize: E, viewportSize: Math.ceil(n / b), scaledOffset: t, scaledTotalSize: r, scaledViewportSize: n, factor: b, precision: C };
1743
+ }, [t, r, n, y, i, a, u]), B = k((M, b, C) => {
1744
+ const E = v.offset;
1745
+ Math.abs(M - E) < v.precision && (M = E), c?.(M * v.factor, E, v.viewportSize);
1746
+ }, [c, v]), S = U((M) => {
1747
+ }, []), O = U((M) => {
1748
+ document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", O), _(!1);
1749
+ }, []), I = U((M) => {
1750
+ _(!0), L?.(M), document.addEventListener("mousemove", S, { passive: !0 }), document.addEventListener("mouseup", O, { passive: !0 });
1751
+ }, [S, O]);
1752
+ return Ke({ style: l, ...x, offset: v.offset, totalSize: v.totalSize, viewportSize: v.viewportSize, onMouseDown: I, onScrollOffset: B }, e);
1747
1753
  }));
1748
- Po.displayName = "VirtualScrollbar";
1754
+ $o.displayName = "VirtualScrollbar";
1749
1755
  export {
1750
- yt as Command,
1751
- Wo as CommandButtonType,
1752
- tn as CommandGroup,
1753
- nt as DefaultDynamicIconService,
1754
- Kn as DefaultReactNotifier,
1755
- ao as DynamicIcon,
1756
- rr as ErrorTestPanel,
1757
- Fo as FocusKeyNavigation,
1758
- Io as HorizontalAlignment,
1759
- St as InMemoryStore,
1760
- $o as KeyCodes,
1761
- Z as KeyModifiers,
1762
- ar as LocalStorageStore,
1763
- Ko as MouseButtonCodes,
1764
- Uo as NotifierProvider,
1765
- zt as NotifierType,
1766
- lr as PersistenceStateProvider,
1767
- nr as ReactErrorBoundary,
1768
- Ro as ReactUtils,
1769
- jo as RoundedTab,
1770
- Eo as ScrollPane,
1771
- ur as ScrollUtils,
1772
- yo as Scrollbar,
1773
- te as ScrollbarOrientation,
1774
- pt as SimpleCommand,
1775
- ro as SplitPane,
1776
- oo as SplitPaneResizer,
1777
- Vo as ToolTipPlacement,
1778
- or as UncaughtErrorBoundary,
1779
- Po as VirtualScrollbar,
1780
- ir as WalkingIcon,
1781
- so as createDynamicIconService,
1782
- So as defaultCreateScrollCorner,
1783
- cr as defaultCreateScrollEdgeButton,
1784
- mo as defaultCreateScrollEndButton,
1785
- fo as defaultCreateScrollStartButton,
1786
- Yo as getDevicePixelRatio,
1756
+ vt as Command,
1757
+ Go as CommandButtonType,
1758
+ on as CommandGroup,
1759
+ ot as DefaultDynamicIconService,
1760
+ Nn as DefaultReactNotifier,
1761
+ co as DynamicIcon,
1762
+ hr as ErrorTestPanel,
1763
+ Zo as FocusKeyNavigation,
1764
+ Vo as HorizontalAlignment,
1765
+ Et as InMemoryStore,
1766
+ Fo as KeyCodes,
1767
+ Q as KeyModifiers,
1768
+ mr as LocalStorageStore,
1769
+ jo as MouseButtonCodes,
1770
+ Qo as NotifierProvider,
1771
+ Bt as NotifierType,
1772
+ fr as PersistenceStateProvider,
1773
+ cr as ReactErrorBoundary,
1774
+ Uo as ReactUtils,
1775
+ Jo as RoundedTab,
1776
+ Do as ScrollPane,
1777
+ gr as ScrollUtils,
1778
+ vo as Scrollbar,
1779
+ ne as ScrollbarOrientation,
1780
+ ft as SimpleCommand,
1781
+ io as SplitPane,
1782
+ ro as SplitPaneResizer,
1783
+ qo as ToolTipPlacement,
1784
+ ur as UncaughtErrorBoundary,
1785
+ $o as VirtualScrollbar,
1786
+ dr as WalkingIcon,
1787
+ lo as createDynamicIconService,
1788
+ Po as defaultCreateScrollCorner,
1789
+ _r as defaultCreateScrollEdgeButton,
1790
+ _o as defaultCreateScrollEndButton,
1791
+ mo as defaultCreateScrollStartButton,
1792
+ tr as getDevicePixelRatio,
1787
1793
  Oe as toShortcutString,
1788
- Wn as useAnimatedMeasure,
1794
+ Vn as useAnimatedMeasure,
1789
1795
  k as useCallbackRef,
1790
- No as useCommand,
1791
- Ho as useCommands,
1792
- Jo as useCopyPaste,
1793
- Xo as useDevicePixelRatio,
1794
- Zo as useEditMode,
1795
- Vn as useFullscreenPortal,
1796
- Gn as useGlobalClipboard,
1797
- er as useId,
1798
- Lt as useImperativeElement,
1799
- qo as useMouseDownAndHoldListener,
1800
- it as useNotifier,
1801
- Go as useOnClickOrFocusAway,
1802
- sr as usePersistenceState,
1803
- rn as useSynchronizedPointerHandler,
1804
- Qo as useTraceUpdate,
1805
- tr as useUndoManager
1796
+ Xo as useCommand,
1797
+ Yo as useCommands,
1798
+ ir as useCopyPaste,
1799
+ er as useDevicePixelRatio,
1800
+ rr as useEditMode,
1801
+ Fn as useFullscreenPortal,
1802
+ qn as useGlobalClipboard,
1803
+ lr as useId,
1804
+ Ct as useImperativeElement,
1805
+ or as useMouseDownAndHoldListener,
1806
+ st as useNotifier,
1807
+ nr as useOnClickOrFocusAway,
1808
+ pr as usePersistenceState,
1809
+ ln as useSynchronizedPointerHandler,
1810
+ sr as useTraceUpdate,
1811
+ ar as useUndoManager
1806
1812
  };