radar-ui 1.1.43 → 1.1.46

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.
package/dist/index.js CHANGED
@@ -1,1025 +1,411 @@
1
1
 
2
2
  (function() {
3
3
  const style = document.createElement('style');
4
- style.textContent = ".radar-table-container{display:flex;flex-direction:column;gap:16px;position:relative}.radar-table{width:100%;border-collapse:separate;border-spacing:0;font-family:inherit;overflow:clip;scroll-snap-type:x mandatory;scroll-behavior:smooth;table-layout:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.radar-table-default{border-radius:12px;background-color:#fff}.radar-table-pagination-container{position:sticky;bottom:-16px;left:0;background-color:#fff;padding:16px;border-top:1px solid #E8E8E8;width:100%}.radar-table *,.radar-table *:before,.radar-table *:after{box-sizing:border-box}@-moz-document url-prefix(){.radar-table{border-collapse:separate;border-spacing:0}.radar-table__body-row{box-sizing:border-box}.radar-table__body-cell{vertical-align:top;box-sizing:border-box}.radar-table__body-cell-wrapper,.radar-table__header-cell-wrapper{display:flex!important;align-items:center!important;box-sizing:border-box!important;padding:9px 12px!important;height:1px;min-height:32px;vertical-align:top}.radar-table-default__body-cell-wrapper,.radar-table-simple__body-cell-wrapper{line-height:1!important;padding:9px 12px!important;font-size:14px!important}.radar-table-default__header-cell-wrapper{padding:9px 12px!important}.radar-table-simple__header-cell-wrapper{padding:20px 10px!important}}.radar-table__header{text-align:left;z-index:1}.radar-table-default__header{background-color:#f7f6fe}.radar-table-simple__header{background-color:#fff}.radar-table__header-group-cell{scroll-snap-align:start}.radar-table-simple__header-group-cell{font-family:inherit;font-weight:700;font-size:18px;line-height:1.2;letter-spacing:0%;color:#1a1a1a;box-sizing:border-box;vertical-align:top}.radar-table__header-group-cell-wrapper{width:100%}.radar-table-simple__header-group-cell-wrapper{padding:12px 10px;display:flex;gap:8px;align-items:center;box-sizing:border-box;min-height:44px}.radar-table__header-cell{scroll-snap-align:start;box-sizing:border-box}.radar-table-default__header-cell{font-family:Manrope,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen;font-weight:500!important;font-size:14px;line-height:100%;letter-spacing:0%;color:#8c8c8c;background-color:#f7f6fe;box-sizing:border-box}.radar-table-simple__header-cell{font-weight:500!important;font-size:16px;line-height:1.2;letter-spacing:0%;color:#8c8c8c;background-color:#fff;box-sizing:border-box;vertical-align:top}.radar-table-default__header-cell:first-child{border-top-left-radius:12px;border-bottom-left-radius:12px}.radar-table-default__header-cell:last-child{border-top-right-radius:12px;border-bottom-right-radius:12px}.radar-table__header-cell-wrapper{width:100%;position:relative;box-sizing:border-box;padding-right:25px!important}.radar-table__header-cell-wrapper:hover .radar-table__resize-button{opacity:1}.radar-table__header-cell-wrapper:hover{width:100%;position:relative;box-sizing:border-box;padding-right:25px!important}.radar-table-default__header-cell-wrapper{padding:9px 12px;display:flex;gap:8px;align-items:center;box-sizing:border-box}.radar-table-simple__header-cell-wrapper{padding:20px 10px;display:flex;gap:8px;align-items:center;box-sizing:border-box;min-height:60px}.radar-table__header-cell-text-wrapper{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.radar-table__sort-button-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.radar-table__sort-button{border:none;background-color:transparent;color:inherit;cursor:pointer;font-size:inherit;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.radar-table__sort-button svg{width:1em;height:1em}.radar-table__sort-button:hover{opacity:.75}.radar-table__drag-handle{display:flex;align-items:center;justify-content:center;cursor:move;opacity:.5;transition:opacity .2s ease;padding:2px;margin-right:4px}.radar-table__drag-handle:hover{opacity:.8}.radar-table__drag-handle.dragging{opacity:1}.radar-table__header-cell.dragging{opacity:.5;transform:rotate(2deg);z-index:1000}.radar-table__header-cell.drag-over.valid-drop-zone,.radar-table__header-cell.drag-over.invalid-drop-zone{transition:all .2s ease;z-index:1000}.radar-table__drag-handle{cursor:grab;transition:transform .2s ease}.radar-table__drag-handle:hover{transform:scale(1.1)}.radar-table__drag-handle.dragging{cursor:grabbing}.radar-table__header-cell.group-header{cursor:default!important}.radar-table__header-cell.group-header{cursor:grab}.radar-table__header-cell.group-header.dragging{cursor:grabbing}.radar-table__body-row[draggable=true]{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.radar-table__body-row.dragging{opacity:.25;cursor:grabbing;border-radius:20px}.radar-table__body-row.drag-over{border-top:2px solid #5329FF!important}.radar-table__body-row[draggable=true]{cursor:grab}.radar-table__body-row[draggable=true]:active{cursor:grabbing}.radar-table__body-cell{scroll-snap-align:start;box-sizing:border-box;vertical-align:top}.radar-table-default__body-cell,.radar-table-simple__body-cell{height:1px}.radar-table__body-cell-wrapper{width:100%;height:100%;font-family:inherit;background-color:#fff;display:flex;align-items:center}.radar-table__expander-btn{width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;padding:0;line-height:16px;font-size:12px;color:#1a1a1a;cursor:pointer;transition:transform .15s ease}.radar-table__expander-btn:focus{outline:none}.radar-table-default__body-cell-wrapper{padding:7px 12px;display:flex;gap:8px;border-bottom:1px solid #E8E8E8;font-weight:500;font-size:14px;line-height:1.2;letter-spacing:0%;color:#1a1a1a;box-sizing:border-box;align-items:center}.radar-table-simple__body-cell-wrapper{padding:18px 12px;display:flex;gap:8px;border-bottom:1px solid #E8E8E8;font-weight:500;font-size:16px;line-height:1.2;letter-spacing:0%;color:#1a1a1a;box-sizing:border-box;align-items:center}.radar-table-default__body-row:last-of-type .radar-table-default__body-cell-wrapper{border-bottom:none}.radar-table-simple__body-row:last-of-type .radar-table-simple__body-cell-wrapper{border-bottom:none}.radar-table__body-noData{padding:18px 12px;display:flex;align-items:center;font-size:16px;line-height:1.2;width:100%}.radar-table__body-noData_width{padding:18px 12px;display:flex;justify-content:center;align-items:center;font-size:16px;line-height:1.2}.radar-table__body-cell-wrapper--stretch,.radar-table-default__body-cell-wrapper--stretch,.radar-table-simple__body-cell-wrapper--stretch{align-items:stretch!important}.radar-table__body-cell-wrapper .salary-cell,.radar-table-default__body-cell-wrapper .salary-cell,.radar-table-simple__body-cell-wrapper .salary-cell{width:100%;height:auto;min-height:auto}.radar-table__custom-content-wrapper{width:100%;height:auto;min-height:100%}.radar-table__footer{pointer-events:auto}.radar-table__footer.resizing{pointer-events:none}.radar-table-default__footer,.radar-table-simple__footer{background-color:#fff}.radar-table-default__footer-cell,.radar-table-simple__footer-cell{border-top:1px solid #E8E8E8}.radar-table__footer-cell-wrapper{width:100%;font-family:inherit}.radar-table-default__footer-cell-wrapper,.radar-table-simple__footer-cell-wrapper{padding:12px 0;display:flex;gap:8px}.radar-table__resize-button{opacity:0;position:absolute;right:0;top:50%;transform:translateY(-50%);height:32px;width:20px;padding-right:6px;background-color:transparent;cursor:col-resize;border:none;display:flex;justify-content:flex-end;align-items:center;transition:all .2s cubic-bezier(.4,0,.2,1)}.radar-table__resize-button:hover{cursor:col-resize!important}.radar-table__resize-button div{background-color:#8c8c8c;width:2px;height:50%;opacity:1;transition:all .3s cubic-bezier(.4,0,.2,1);border-radius:1px}.radar-table__resize-button:hover div{opacity:.5}.radar-table__resize-button:active div{background-color:#5329ff;opacity:1}.radar-table__resize-line{display:none;position:fixed;width:2px;background-color:#5329ff80;z-index:9999;pointer-events:none;opacity:.5;will-change:transform;transform:translateZ(0);backface-visibility:hidden}.radar-table__pagination{display:flex;align-items:center;gap:24px}.radar-table__pagination-main{display:grid;grid-template-rows:32px;gap:4px}.radar-table__pagination-button{width:100%;height:100%;max-width:32px;max-height:32px;border-radius:8px;border:none;cursor:pointer;background-color:#f7f7f7;font-family:inherit;font-weight:500;font-size:14px;line-height:100%;letter-spacing:0%;color:#8c8c8c;opacity:1;transition:all .2s ease;display:flex;align-items:center;justify-content:center;border:1px solid #F7F7F7}.radar-table__pagination-button_active{color:#5329ff;background-color:#eeeaff;border:1px solid #5329FF}.radar-table__pagination-button_control{background-color:transparent;border:none}.radar-table__pagination-button_control:hover{background-color:#f7f7f7}.radar-table__pagination-button:hover{opacity:.75}.radar-table__pagination-quick-jumper{display:flex;align-items:center;gap:8px;font-family:inherit;font-weight:500;font-style:Medium;font-size:14px;line-height:100%;letter-spacing:0%;color:#1a1a1a}.radar-table__pagination-input{width:32px;height:32px;border-radius:8px;border:1px solid #F7F7F7;background-color:#f7f7f7;font-family:inherit;font-weight:500;font-size:14px;line-height:100%;letter-spacing:0%;color:#5329ff;background-color:#eeeaff;text-align:center;outline:none;border:none}.radar-table__tooltip-button{border:none;display:flex;align-items:center;justify-content:center;background-color:transparent;color:inherit;cursor:pointer;font-size:inherit;position:relative}.radar-table__tooltip-button:hover{color:#5329ff}.radar-table__tooltip-text{position:absolute;top:calc(100% + 10px);left:20px;background-color:#fff;padding:8px;width:250px;transform:scale(0);opacity:0;transition:all .2s ease;transform-origin:top left;border-radius:8px;box-shadow:0 0 20px #00000014;white-space:pre-line;text-align:left;font-family:inherit;font-weight:500;font-size:12px;line-height:120%;letter-spacing:0%;color:#1a1a1a;z-index:1000}.radar-table__tooltip-text_visible{transform:scale(1);opacity:1}.radar-table__tooltip-text--right{left:auto!important;right:20px!important;transform-origin:top right!important}.radar-table__tooltip-text--right.radar-table__tooltip-text_visible{transform:scale(1)!important}.radar-table__drag-handle{height:20px;cursor:grab;border-radius:4px;border:none}.radar-title{font-family:Manrope,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen;color:#1a1a1a;margin:0;padding:0}.radar-title_h1{font-size:22px;font-weight:600;line-height:100%;letter-spacing:0%}.radar-title_h2{font-size:18px;font-weight:600;line-height:100%;letter-spacing:0%}.radar-text{font-family:Manrope,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen;color:#1a1a1a;margin:0;padding:0}.radar-text_m{font-size:14px}.radar-text_s{font-size:12px}.radar-text_medium{font-weight:500}.radar-text_semibold{font-weight:600}.radar-text_bold{font-weight:700}\n";
4
+ style.textContent = ".radar-table-container{display:flex;flex-direction:column;gap:16px;position:relative}.radar-table{width:100%;border-collapse:separate;border-spacing:0;font-family:inherit;overflow:clip;scroll-snap-type:x mandatory;scroll-behavior:smooth;table-layout:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.radar-table-default{border-radius:12px;background-color:#fff}.radar-table-pagination-container{position:sticky;bottom:-16px;left:0;background-color:#fff;padding:16px;border-top:1px solid #E8E8E8;width:100%}.radar-table *,.radar-table *:before,.radar-table *:after{box-sizing:border-box}@-moz-document url-prefix(){.radar-table{border-collapse:separate;border-spacing:0}.radar-table__body-row{box-sizing:border-box}.radar-table__body-cell{vertical-align:top;box-sizing:border-box}.radar-table__body-cell-wrapper,.radar-table__header-cell-wrapper{display:flex!important;align-items:center!important;box-sizing:border-box!important;padding:9px 12px!important;height:1px;min-height:32px;vertical-align:top}.radar-table-default__body-cell-wrapper,.radar-table-simple__body-cell-wrapper{line-height:1!important;padding:9px 12px!important;font-size:14px!important}.radar-table-default__header-cell-wrapper{padding:9px 12px!important}.radar-table-simple__header-cell-wrapper{padding:20px 10px!important}}.radar-table__header{text-align:left;z-index:1}.radar-table-default__header{background-color:#f7f6fe}.radar-table-simple__header{background-color:#fff}.radar-table__header-group-cell{scroll-snap-align:start}.radar-table-simple__header-group-cell{font-family:inherit;font-weight:700;font-size:18px;line-height:1.2;letter-spacing:0%;color:#1a1a1a;box-sizing:border-box;vertical-align:top}.radar-table__header-group-cell-wrapper{width:100%}.radar-table-simple__header-group-cell-wrapper{padding:12px 10px;display:flex;gap:8px;align-items:center;box-sizing:border-box;min-height:44px}.radar-table__header-cell{scroll-snap-align:start;box-sizing:border-box}.radar-table-default__header-cell{font-family:Manrope,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen;font-weight:500!important;font-size:14px;line-height:100%;letter-spacing:0%;color:#8c8c8c;background-color:#f7f6fe;box-sizing:border-box}.radar-table-simple__header-cell{font-weight:500!important;font-size:16px;line-height:1.2;letter-spacing:0%;color:#8c8c8c;background-color:#fff;box-sizing:border-box;vertical-align:top}.radar-table-default__header-cell:first-child{border-top-left-radius:12px;border-bottom-left-radius:12px}.radar-table-default__header-cell:last-child{border-top-right-radius:12px;border-bottom-right-radius:12px}.radar-table__header-cell-wrapper{width:100%;position:relative;box-sizing:border-box;padding-right:25px!important}.radar-table__header-cell-wrapper:hover .radar-table__resize-button{opacity:1}.radar-table__header-cell-wrapper:hover{width:100%;position:relative;box-sizing:border-box;padding-right:25px!important}.radar-table-default__header-cell-wrapper{padding:9px 12px;display:flex;gap:8px;align-items:center;box-sizing:border-box}.radar-table-simple__header-cell-wrapper{padding:20px 10px;display:flex;gap:8px;align-items:center;box-sizing:border-box;min-height:60px}.radar-table__header-cell-text-wrapper{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis}.radar-table__sort-button-wrapper{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}.radar-table__sort-button{border:none;background-color:transparent;color:inherit;cursor:pointer;font-size:inherit;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.radar-table__sort-button svg{width:1em;height:1em}.radar-table__sort-button:hover{opacity:.75}.radar-table__drag-handle{display:flex;align-items:center;justify-content:center;cursor:move;opacity:.5;transition:opacity .2s ease;padding:2px;margin-right:4px}.radar-table__drag-handle:hover{opacity:.8}.radar-table__drag-handle.dragging{opacity:1}.radar-table__header-cell.dragging{opacity:.5;transform:rotate(2deg);z-index:1000}.radar-table__header-cell.drag-over.valid-drop-zone,.radar-table__header-cell.drag-over.invalid-drop-zone{transition:all .2s ease;z-index:1000}.radar-table__drag-handle{cursor:grab;transition:transform .2s ease}.radar-table__drag-handle:hover{transform:scale(1.1)}.radar-table__drag-handle.dragging{cursor:grabbing}.radar-table__header-cell.group-header{cursor:default!important}.radar-table__header-cell.group-header{cursor:grab}.radar-table__header-cell.group-header.dragging{cursor:grabbing}.radar-table__body-row[draggable=true]{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.radar-table__body-row.dragging{opacity:.25;cursor:grabbing;border-radius:20px}.radar-table__body-row.drag-over{border-top:2px solid #5329FF!important}.radar-table__body-row[draggable=true]{cursor:grab}.radar-table__body-row[draggable=true]:active{cursor:grabbing}.radar-table__body-cell{scroll-snap-align:start;box-sizing:border-box;vertical-align:top}.radar-table-default__body-cell,.radar-table-simple__body-cell{height:1px}.radar-table__body-cell-wrapper{width:100%;height:100%;font-family:inherit;background-color:#fff;display:flex;align-items:center}.radar-table__expander-btn{width:16px;height:16px;display:inline-flex;align-items:center;justify-content:center;padding:0;line-height:16px;font-size:12px;color:#1a1a1a;cursor:pointer;transition:transform .15s ease}.radar-table__expander-btn:focus{outline:none}.radar-table-default__body-cell-wrapper{padding:7px 12px;display:flex;gap:8px;border-bottom:1px solid #E8E8E8;font-weight:500;font-size:14px;line-height:1.2;letter-spacing:0%;color:#1a1a1a;box-sizing:border-box;align-items:center}.radar-table-simple__body-cell-wrapper{padding:18px 12px;display:flex;gap:8px;border-bottom:1px solid #E8E8E8;font-weight:500;font-size:16px;line-height:1.2;letter-spacing:0%;color:#1a1a1a;box-sizing:border-box;align-items:center}.radar-table-default__body-row:last-of-type .radar-table-default__body-cell-wrapper{border-bottom:none}.radar-table-simple__body-row:last-of-type .radar-table-simple__body-cell-wrapper{border-bottom:none}.radar-table__body-noData{padding:18px 12px;display:flex;align-items:center;font-size:16px;line-height:1.2;width:100%}.radar-table__body-noData_width{padding:18px 12px;display:flex;justify-content:center;align-items:center;font-size:16px;line-height:1.2}.radar-table__body-cell-wrapper--stretch,.radar-table-default__body-cell-wrapper--stretch,.radar-table-simple__body-cell-wrapper--stretch{align-items:stretch!important}.radar-table__body-cell-wrapper .salary-cell,.radar-table-default__body-cell-wrapper .salary-cell,.radar-table-simple__body-cell-wrapper .salary-cell{width:100%;height:auto;min-height:auto}.radar-table__custom-content-wrapper{width:100%;height:auto;min-height:100%}.radar-table__footer{pointer-events:auto}.radar-table__footer.resizing{pointer-events:none}.radar-table-default__footer,.radar-table-simple__footer{background-color:#fff}.radar-table-default__footer-cell,.radar-table-simple__footer-cell{border-top:1px solid #E8E8E8}.radar-table__footer-cell-wrapper{width:100%;font-family:inherit}.radar-table-default__footer-cell-wrapper,.radar-table-simple__footer-cell-wrapper{padding:12px 0;display:flex;gap:8px}.radar-table__resize-button{opacity:0;position:absolute;right:0;top:50%;transform:translateY(-50%);height:32px;width:20px;padding-right:6px;background-color:transparent;cursor:col-resize;border:none;display:flex;justify-content:flex-end;align-items:center}.radar-table__resize-button:hover{cursor:col-resize!important}.radar-table__resize-button div{background-color:#8c8c8c;width:2px;height:50%;opacity:1;transition:all .3s cubic-bezier(.4,0,.2,1);border-radius:1px}.radar-table__resize-button:hover div{opacity:.5}.radar-table__resize-button:active div{background-color:#5329ff;opacity:1}.radar-table__resize-line{position:fixed;width:2px;background-color:#5329ff80;z-index:9999;pointer-events:none;opacity:.5;will-change:transform;transform:translateZ(0);backface-visibility:hidden}.radar-table__pagination{display:flex;align-items:center;gap:24px}.radar-table__pagination-main{display:grid;grid-template-rows:32px;gap:4px}.radar-table__pagination-button{width:100%;height:100%;max-width:32px;max-height:32px;border-radius:8px;border:none;cursor:pointer;background-color:#f7f7f7;font-family:inherit;font-weight:500;font-size:14px;line-height:100%;letter-spacing:0%;color:#8c8c8c;opacity:1;transition:all .2s ease;display:flex;align-items:center;justify-content:center;border:1px solid #F7F7F7}.radar-table__pagination-button_active{color:#5329ff;background-color:#eeeaff;border:1px solid #5329FF}.radar-table__pagination-button_control{background-color:transparent;border:none}.radar-table__pagination-button_control:hover{background-color:#f7f7f7}.radar-table__pagination-button:hover{opacity:.75}.radar-table__pagination-quick-jumper{display:flex;align-items:center;gap:8px;font-family:inherit;font-weight:500;font-style:Medium;font-size:14px;line-height:100%;letter-spacing:0%;color:#1a1a1a}.radar-table__pagination-input{width:32px;height:32px;border-radius:8px;border:1px solid #F7F7F7;background-color:#f7f7f7;font-family:inherit;font-weight:500;font-size:14px;line-height:100%;letter-spacing:0%;color:#5329ff;background-color:#eeeaff;text-align:center;outline:none;border:none}.radar-table__tooltip-button{border:none;display:flex;align-items:center;justify-content:center;background-color:transparent;color:inherit;cursor:pointer;font-size:inherit;position:relative}.radar-table__tooltip-button:hover{color:#5329ff}.radar-table__tooltip-text{position:absolute;top:calc(100% + 10px);left:20px;background-color:#fff;padding:8px;width:250px;transform:scale(0);opacity:0;transition:all .2s ease;transform-origin:top left;border-radius:8px;box-shadow:0 0 20px #00000014;white-space:pre-line;text-align:left;font-family:inherit;font-weight:500;font-size:12px;line-height:120%;letter-spacing:0%;color:#1a1a1a;z-index:1000}.radar-table__tooltip-text_visible{transform:scale(1);opacity:1}.radar-table__tooltip-text--right{left:auto!important;right:20px!important;transform-origin:top right!important}.radar-table__tooltip-text--right.radar-table__tooltip-text_visible{transform:scale(1)!important}.radar-table__drag-handle{height:20px;cursor:grab;border-radius:4px;border:none}.radar-title{font-family:Manrope,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen;color:#1a1a1a;margin:0;padding:0}.radar-title_h1{font-size:22px;font-weight:600;line-height:100%;letter-spacing:0%}.radar-title_h2{font-size:18px;font-weight:600;line-height:100%;letter-spacing:0%}.radar-text{font-family:Manrope,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen;color:#1a1a1a;margin:0;padding:0}.radar-text_m{font-size:14px}.radar-text_s{font-size:12px}.radar-text_medium{font-weight:500}.radar-text_semibold{font-weight:600}.radar-text_bold{font-weight:700}\n";
5
5
  document.head.appendChild(style);
6
6
  })();
7
- import * as Je from "react";
8
- import qe, { useState as we, useRef as Ee, useCallback as ue, startTransition as Ft, useEffect as Ie, createContext as $t, useContext as Dt, useMemo as Ye, useLayoutEffect as Xe } from "react";
9
- import { useSensors as It, useSensor as ot, PointerSensor as Lt, KeyboardSensor as Mt, pointerWithin as Wt, rectIntersection as Pt, DndContext as Nt, DragOverlay as At, useDraggable as zt, useDroppable as Bt } from "@dnd-kit/core";
10
- import { sortableKeyboardCoordinates as Vt } from "@dnd-kit/sortable";
11
- import { flushSync as Kt } from "react-dom";
12
- var Qe = { exports: {} }, Ve = {};
13
- /**
14
- * @license React
15
- * react-jsx-runtime.production.min.js
16
- *
17
- * Copyright (c) Facebook, Inc. and its affiliates.
18
- *
19
- * This source code is licensed under the MIT license found in the
20
- * LICENSE file in the root directory of this source tree.
21
- */
22
- var at;
23
- function qt() {
24
- if (at) return Ve;
25
- at = 1;
26
- var t = qe, i = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, s = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
27
- function a(c, f, _) {
28
- var h, k = {}, V = null, W = null;
29
- _ !== void 0 && (V = "" + _), f.key !== void 0 && (V = "" + f.key), f.ref !== void 0 && (W = f.ref);
30
- for (h in f) n.call(f, h) && !o.hasOwnProperty(h) && (k[h] = f[h]);
31
- if (c && c.defaultProps) for (h in f = c.defaultProps, f) k[h] === void 0 && (k[h] = f[h]);
32
- return { $$typeof: i, type: c, key: V, ref: W, props: k, _owner: s.current };
33
- }
34
- return Ve.Fragment = r, Ve.jsx = a, Ve.jsxs = a, Ve;
35
- }
36
- var Ke = {};
37
- /**
38
- * @license React
39
- * react-jsx-runtime.development.js
40
- *
41
- * Copyright (c) Facebook, Inc. and its affiliates.
42
- *
43
- * This source code is licensed under the MIT license found in the
44
- * LICENSE file in the root directory of this source tree.
45
- */
46
- var lt;
47
- function Ht() {
48
- return lt || (lt = 1, process.env.NODE_ENV !== "production" && function() {
49
- var t = qe, i = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), k = Symbol.for("react.memo"), V = Symbol.for("react.lazy"), W = Symbol.for("react.offscreen"), P = Symbol.iterator, H = "@@iterator";
50
- function re(e) {
51
- if (e === null || typeof e != "object")
52
- return null;
53
- var u = P && e[P] || e[H];
54
- return typeof u == "function" ? u : null;
55
- }
56
- var J = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
57
- function g(e) {
58
- {
59
- for (var u = arguments.length, v = new Array(u > 1 ? u - 1 : 0), B = 1; B < u; B++)
60
- v[B - 1] = arguments[B];
61
- Q("error", e, v);
62
- }
63
- }
64
- function Q(e, u, v) {
65
- {
66
- var B = J.ReactDebugCurrentFrame, he = B.getStackAddendum();
67
- he !== "" && (u += "%s", v = v.concat([he]));
68
- var me = v.map(function(oe) {
69
- return String(oe);
70
- });
71
- me.unshift("Warning: " + u), Function.prototype.apply.call(console[e], console, me);
72
- }
73
- }
74
- var E = !1, N = !1, ae = !1, p = !1, w = !1, y;
75
- y = Symbol.for("react.module.reference");
76
- function b(e) {
77
- return !!(typeof e == "string" || typeof e == "function" || e === n || e === o || w || e === s || e === _ || e === h || p || e === W || E || N || ae || typeof e == "object" && e !== null && (e.$$typeof === V || e.$$typeof === k || e.$$typeof === a || e.$$typeof === c || e.$$typeof === f || // This needs to include all possible module reference object
78
- // types supported by any Flight configuration anywhere since
79
- // we don't know which Flight build this will end up being used
80
- // with.
81
- e.$$typeof === y || e.getModuleId !== void 0));
82
- }
83
- function m(e, u, v) {
84
- var B = e.displayName;
85
- if (B)
86
- return B;
87
- var he = u.displayName || u.name || "";
88
- return he !== "" ? v + "(" + he + ")" : v;
89
- }
90
- function j(e) {
91
- return e.displayName || "Context";
92
- }
93
- function R(e) {
94
- if (e == null)
95
- return null;
96
- if (typeof e.tag == "number" && g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
97
- return e.displayName || e.name || null;
98
- if (typeof e == "string")
99
- return e;
100
- switch (e) {
101
- case n:
102
- return "Fragment";
103
- case r:
104
- return "Portal";
105
- case o:
106
- return "Profiler";
107
- case s:
108
- return "StrictMode";
109
- case _:
110
- return "Suspense";
111
- case h:
112
- return "SuspenseList";
113
- }
114
- if (typeof e == "object")
115
- switch (e.$$typeof) {
116
- case c:
117
- var u = e;
118
- return j(u) + ".Consumer";
119
- case a:
120
- var v = e;
121
- return j(v._context) + ".Provider";
122
- case f:
123
- return m(e, e.render, "ForwardRef");
124
- case k:
125
- var B = e.displayName || null;
126
- return B !== null ? B : R(e.type) || "Memo";
127
- case V: {
128
- var he = e, me = he._payload, oe = he._init;
129
- try {
130
- return R(oe(me));
131
- } catch {
132
- return null;
133
- }
134
- }
135
- }
136
- return null;
137
- }
138
- var M = Object.assign, G = 0, F, U, te, I, z, K, $;
139
- function le() {
140
- }
141
- le.__reactDisabledLog = !0;
142
- function A() {
143
- {
144
- if (G === 0) {
145
- F = console.log, U = console.info, te = console.warn, I = console.error, z = console.group, K = console.groupCollapsed, $ = console.groupEnd;
146
- var e = {
147
- configurable: !0,
148
- enumerable: !0,
149
- value: le,
150
- writable: !0
151
- };
152
- Object.defineProperties(console, {
153
- info: e,
154
- log: e,
155
- warn: e,
156
- error: e,
157
- group: e,
158
- groupCollapsed: e,
159
- groupEnd: e
160
- });
161
- }
162
- G++;
163
- }
164
- }
165
- function O() {
166
- {
167
- if (G--, G === 0) {
168
- var e = {
169
- configurable: !0,
170
- enumerable: !0,
171
- writable: !0
172
- };
173
- Object.defineProperties(console, {
174
- log: M({}, e, {
175
- value: F
176
- }),
177
- info: M({}, e, {
178
- value: U
179
- }),
180
- warn: M({}, e, {
181
- value: te
182
- }),
183
- error: M({}, e, {
184
- value: I
185
- }),
186
- group: M({}, e, {
187
- value: z
188
- }),
189
- groupCollapsed: M({}, e, {
190
- value: K
191
- }),
192
- groupEnd: M({}, e, {
193
- value: $
194
- })
195
- });
196
- }
197
- G < 0 && g("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
198
- }
199
- }
200
- var S = J.ReactCurrentDispatcher, C;
201
- function X(e, u, v) {
202
- {
203
- if (C === void 0)
204
- try {
205
- throw Error();
206
- } catch (he) {
207
- var B = he.stack.trim().match(/\n( *(at )?)/);
208
- C = B && B[1] || "";
209
- }
210
- return `
211
- ` + C + e;
212
- }
213
- }
214
- var D = !1, ee;
215
- {
216
- var fe = typeof WeakMap == "function" ? WeakMap : Map;
217
- ee = new fe();
218
- }
219
- function ie(e, u) {
220
- if (!e || D)
221
- return "";
222
- {
223
- var v = ee.get(e);
224
- if (v !== void 0)
225
- return v;
226
- }
227
- var B;
228
- D = !0;
229
- var he = Error.prepareStackTrace;
230
- Error.prepareStackTrace = void 0;
231
- var me;
232
- me = S.current, S.current = null, A();
233
- try {
234
- if (u) {
235
- var oe = function() {
236
- throw Error();
237
- };
238
- if (Object.defineProperty(oe.prototype, "props", {
239
- set: function() {
240
- throw Error();
241
- }
242
- }), typeof Reflect == "object" && Reflect.construct) {
243
- try {
244
- Reflect.construct(oe, []);
245
- } catch (je) {
246
- B = je;
247
- }
248
- Reflect.construct(e, [], oe);
249
- } else {
250
- try {
251
- oe.call();
252
- } catch (je) {
253
- B = je;
254
- }
255
- e.call(oe.prototype);
256
- }
257
- } else {
258
- try {
259
- throw Error();
260
- } catch (je) {
261
- B = je;
262
- }
263
- e();
264
- }
265
- } catch (je) {
266
- if (je && B && typeof je.stack == "string") {
267
- for (var se = je.stack.split(`
268
- `), Se = B.stack.split(`
269
- `), xe = se.length - 1, _e = Se.length - 1; xe >= 1 && _e >= 0 && se[xe] !== Se[_e]; )
270
- _e--;
271
- for (; xe >= 1 && _e >= 0; xe--, _e--)
272
- if (se[xe] !== Se[_e]) {
273
- if (xe !== 1 || _e !== 1)
274
- do
275
- if (xe--, _e--, _e < 0 || se[xe] !== Se[_e]) {
276
- var Te = `
277
- ` + se[xe].replace(" at new ", " at ");
278
- return e.displayName && Te.includes("<anonymous>") && (Te = Te.replace("<anonymous>", e.displayName)), typeof e == "function" && ee.set(e, Te), Te;
279
- }
280
- while (xe >= 1 && _e >= 0);
281
- break;
282
- }
283
- }
284
- } finally {
285
- D = !1, S.current = me, O(), Error.prepareStackTrace = he;
286
- }
287
- var Ne = e ? e.displayName || e.name : "", We = Ne ? X(Ne) : "";
288
- return typeof e == "function" && ee.set(e, We), We;
289
- }
290
- function q(e, u, v) {
291
- return ie(e, !1);
292
- }
293
- function ne(e) {
294
- var u = e.prototype;
295
- return !!(u && u.isReactComponent);
296
- }
297
- function L(e, u, v) {
298
- if (e == null)
299
- return "";
300
- if (typeof e == "function")
301
- return ie(e, ne(e));
302
- if (typeof e == "string")
303
- return X(e);
304
- switch (e) {
305
- case _:
306
- return X("Suspense");
307
- case h:
308
- return X("SuspenseList");
309
- }
310
- if (typeof e == "object")
311
- switch (e.$$typeof) {
312
- case f:
313
- return q(e.render);
314
- case k:
315
- return L(e.type, u, v);
316
- case V: {
317
- var B = e, he = B._payload, me = B._init;
318
- try {
319
- return L(me(he), u, v);
320
- } catch {
321
- }
322
- }
323
- }
324
- return "";
325
- }
326
- var ce = Object.prototype.hasOwnProperty, ye = {}, pe = J.ReactDebugCurrentFrame;
327
- function ve(e) {
328
- if (e) {
329
- var u = e._owner, v = L(e.type, e._source, u ? u.type : null);
330
- pe.setExtraStackFrame(v);
331
- } else
332
- pe.setExtraStackFrame(null);
333
- }
334
- function Re(e, u, v, B, he) {
335
- {
336
- var me = Function.call.bind(ce);
337
- for (var oe in e)
338
- if (me(e, oe)) {
339
- var se = void 0;
340
- try {
341
- if (typeof e[oe] != "function") {
342
- var Se = Error((B || "React class") + ": " + v + " type `" + oe + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[oe] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
343
- throw Se.name = "Invariant Violation", Se;
344
- }
345
- se = e[oe](u, oe, B, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
346
- } catch (xe) {
347
- se = xe;
348
- }
349
- se && !(se instanceof Error) && (ve(he), g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", B || "React class", v, oe, typeof se), ve(null)), se instanceof Error && !(se.message in ye) && (ye[se.message] = !0, ve(he), g("Failed %s type: %s", v, se.message), ve(null));
350
- }
351
- }
352
- }
353
- var d = Array.isArray;
354
- function T(e) {
355
- return d(e);
356
- }
357
- function Y(e) {
358
- {
359
- var u = typeof Symbol == "function" && Symbol.toStringTag, v = u && e[Symbol.toStringTag] || e.constructor.name || "Object";
360
- return v;
361
- }
362
- }
363
- function x(e) {
364
- try {
365
- return Z(e), !1;
366
- } catch {
367
- return !0;
368
- }
369
- }
370
- function Z(e) {
371
- return "" + e;
372
- }
373
- function ge(e) {
374
- if (x(e))
375
- return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Y(e)), Z(e);
376
- }
377
- var de = J.ReactCurrentOwner, ke = {
378
- key: !0,
379
- ref: !0,
380
- __self: !0,
381
- __source: !0
382
- }, be, Ce;
383
- function Oe(e) {
384
- if (ce.call(e, "ref")) {
385
- var u = Object.getOwnPropertyDescriptor(e, "ref").get;
386
- if (u && u.isReactWarning)
387
- return !1;
388
- }
389
- return e.ref !== void 0;
390
- }
391
- function Fe(e) {
392
- if (ce.call(e, "key")) {
393
- var u = Object.getOwnPropertyDescriptor(e, "key").get;
394
- if (u && u.isReactWarning)
395
- return !1;
396
- }
397
- return e.key !== void 0;
398
- }
399
- function Le(e, u) {
400
- typeof e.ref == "string" && de.current;
401
- }
402
- function ze(e, u) {
403
- {
404
- var v = function() {
405
- be || (be = !0, g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", u));
406
- };
407
- v.isReactWarning = !0, Object.defineProperty(e, "key", {
408
- get: v,
409
- configurable: !0
410
- });
411
- }
412
- }
413
- function Me(e, u) {
414
- {
415
- var v = function() {
416
- Ce || (Ce = !0, g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", u));
417
- };
418
- v.isReactWarning = !0, Object.defineProperty(e, "ref", {
419
- get: v,
420
- configurable: !0
421
- });
422
- }
423
- }
424
- var He = function(e, u, v, B, he, me, oe) {
425
- var se = {
426
- // This tag allows us to uniquely identify this as a React Element
427
- $$typeof: i,
428
- // Built-in properties that belong on the element
429
- type: e,
430
- key: u,
431
- ref: v,
432
- props: oe,
433
- // Record the component responsible for creating this element.
434
- _owner: me
435
- };
436
- return se._store = {}, Object.defineProperty(se._store, "validated", {
437
- configurable: !1,
438
- enumerable: !1,
439
- writable: !0,
440
- value: !1
441
- }), Object.defineProperty(se, "_self", {
442
- configurable: !1,
443
- enumerable: !1,
444
- writable: !1,
445
- value: B
446
- }), Object.defineProperty(se, "_source", {
447
- configurable: !1,
448
- enumerable: !1,
449
- writable: !1,
450
- value: he
451
- }), Object.freeze && (Object.freeze(se.props), Object.freeze(se)), se;
452
- };
453
- function Ue(e, u, v, B, he) {
454
- {
455
- var me, oe = {}, se = null, Se = null;
456
- v !== void 0 && (ge(v), se = "" + v), Fe(u) && (ge(u.key), se = "" + u.key), Oe(u) && (Se = u.ref, Le(u, he));
457
- for (me in u)
458
- ce.call(u, me) && !ke.hasOwnProperty(me) && (oe[me] = u[me]);
459
- if (e && e.defaultProps) {
460
- var xe = e.defaultProps;
461
- for (me in xe)
462
- oe[me] === void 0 && (oe[me] = xe[me]);
463
- }
464
- if (se || Se) {
465
- var _e = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
466
- se && ze(oe, _e), Se && Me(oe, _e);
467
- }
468
- return He(e, se, Se, he, B, de.current, oe);
469
- }
470
- }
471
- var Pe = J.ReactCurrentOwner, $e = J.ReactDebugCurrentFrame;
472
- function De(e) {
473
- if (e) {
474
- var u = e._owner, v = L(e.type, e._source, u ? u.type : null);
475
- $e.setExtraStackFrame(v);
476
- } else
477
- $e.setExtraStackFrame(null);
478
- }
479
- var Be;
480
- Be = !1;
481
- function Ze(e) {
482
- return typeof e == "object" && e !== null && e.$$typeof === i;
483
- }
484
- function et() {
485
- {
486
- if (Pe.current) {
487
- var e = R(Pe.current.type);
488
- if (e)
489
- return `
490
-
491
- Check the render method of \`` + e + "`.";
492
- }
493
- return "";
494
- }
495
- }
496
- function _t(e) {
497
- return "";
498
- }
499
- var tt = {};
500
- function wt(e) {
501
- {
502
- var u = et();
503
- if (!u) {
504
- var v = typeof e == "string" ? e : e.displayName || e.name;
505
- v && (u = `
506
-
507
- Check the top-level render call using <` + v + ">.");
508
- }
509
- return u;
510
- }
511
- }
512
- function rt(e, u) {
513
- {
514
- if (!e._store || e._store.validated || e.key != null)
515
- return;
516
- e._store.validated = !0;
517
- var v = wt(u);
518
- if (tt[v])
519
- return;
520
- tt[v] = !0;
521
- var B = "";
522
- e && e._owner && e._owner !== Pe.current && (B = " It was passed a child from " + R(e._owner.type) + "."), De(e), g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, B), De(null);
523
- }
524
- }
525
- function nt(e, u) {
526
- {
527
- if (typeof e != "object")
528
- return;
529
- if (T(e))
530
- for (var v = 0; v < e.length; v++) {
531
- var B = e[v];
532
- Ze(B) && rt(B, u);
533
- }
534
- else if (Ze(e))
535
- e._store && (e._store.validated = !0);
536
- else if (e) {
537
- var he = re(e);
538
- if (typeof he == "function" && he !== e.entries)
539
- for (var me = he.call(e), oe; !(oe = me.next()).done; )
540
- Ze(oe.value) && rt(oe.value, u);
541
- }
542
- }
543
- }
544
- function Ct(e) {
545
- {
546
- var u = e.type;
547
- if (u == null || typeof u == "string")
548
- return;
549
- var v;
550
- if (typeof u == "function")
551
- v = u.propTypes;
552
- else if (typeof u == "object" && (u.$$typeof === f || // Note: Memo only checks outer props here.
553
- // Inner props are checked in the reconciler.
554
- u.$$typeof === k))
555
- v = u.propTypes;
556
- else
557
- return;
558
- if (v) {
559
- var B = R(u);
560
- Re(v, e.props, "prop", B, e);
561
- } else if (u.PropTypes !== void 0 && !Be) {
562
- Be = !0;
563
- var he = R(u);
564
- g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", he || "Unknown");
565
- }
566
- typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
567
- }
568
- }
569
- function Et(e) {
570
- {
571
- for (var u = Object.keys(e.props), v = 0; v < u.length; v++) {
572
- var B = u[v];
573
- if (B !== "children" && B !== "key") {
574
- De(e), g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", B), De(null);
575
- break;
576
- }
577
- }
578
- e.ref !== null && (De(e), g("Invalid attribute `ref` supplied to `React.Fragment`."), De(null));
579
- }
580
- }
581
- var st = {};
582
- function it(e, u, v, B, he, me) {
583
- {
584
- var oe = b(e);
585
- if (!oe) {
586
- var se = "";
587
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (se += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
588
- var Se = _t();
589
- Se ? se += Se : se += et();
590
- var xe;
591
- e === null ? xe = "null" : T(e) ? xe = "array" : e !== void 0 && e.$$typeof === i ? (xe = "<" + (R(e.type) || "Unknown") + " />", se = " Did you accidentally export a JSX literal instead of a component?") : xe = typeof e, g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", xe, se);
592
- }
593
- var _e = Ue(e, u, v, he, me);
594
- if (_e == null)
595
- return _e;
596
- if (oe) {
597
- var Te = u.children;
598
- if (Te !== void 0)
599
- if (B)
600
- if (T(Te)) {
601
- for (var Ne = 0; Ne < Te.length; Ne++)
602
- nt(Te[Ne], e);
603
- Object.freeze && Object.freeze(Te);
604
- } else
605
- g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
606
- else
607
- nt(Te, e);
608
- }
609
- if (ce.call(u, "key")) {
610
- var We = R(e), je = Object.keys(u).filter(function(Rt) {
611
- return Rt !== "key";
612
- }), Ge = je.length > 0 ? "{key: someKey, " + je.join(": ..., ") + ": ...}" : "{key: someKey}";
613
- if (!st[We + Ge]) {
614
- var Tt = je.length > 0 ? "{" + je.join(": ..., ") + ": ...}" : "{}";
615
- g(`A props object containing a "key" prop is being spread into JSX:
616
- let props = %s;
617
- <%s {...props} />
618
- React keys must be passed directly to JSX without using spread:
619
- let props = %s;
620
- <%s key={someKey} {...props} />`, Ge, We, Tt, We), st[We + Ge] = !0;
621
- }
622
- }
623
- return e === n ? Et(_e) : Ct(_e), _e;
624
- }
625
- }
626
- function St(e, u, v) {
627
- return it(e, u, v, !0);
628
- }
629
- function kt(e, u, v) {
630
- return it(e, u, v, !1);
631
- }
632
- var jt = kt, Ot = St;
633
- Ke.Fragment = n, Ke.jsx = jt, Ke.jsxs = Ot;
634
- }()), Ke;
635
- }
636
- process.env.NODE_ENV === "production" ? Qe.exports = qt() : Qe.exports = Ht();
637
- var l = Qe.exports;
638
- const Ut = ({
639
- column: t,
640
- currWidth: i,
641
- currMinWidth: r,
642
- onResize: n,
643
- scrollContainerRef: s,
644
- onResizeStart: o,
645
- onResizeFrame: a,
646
- onResizeEnd: c
7
+ import { jsxs as ge, Fragment as Se, jsx as n } from "react/jsx-runtime";
8
+ import Le, { useState as ue, useRef as ye, useCallback as Y, startTransition as Ke, useEffect as _e, createContext as He, useContext as qe, useMemo as ke, useLayoutEffect as Fe } from "react";
9
+ import { useSensors as Re, useSensor as Ne, PointerSensor as Ve, KeyboardSensor as Ze, pointerWithin as Xe, rectIntersection as Je, DndContext as Ge, DragOverlay as je, useDraggable as Ue, useDroppable as Qe } from "@dnd-kit/core";
10
+ import { sortableKeyboardCoordinates as Ye } from "@dnd-kit/sortable";
11
+ import { useVirtualizer as et } from "@tanstack/react-virtual";
12
+ const tt = ({
13
+ column: e,
14
+ currWidth: t,
15
+ currMinWidth: i,
16
+ onResize: h,
17
+ scrollContainerRef: F,
18
+ onResizeStart: _,
19
+ onResizeFrame: v,
20
+ onResizeEnd: q,
21
+ resizeMode: B = "instant"
647
22
  }) => {
648
- const [f, _] = we(!1), [h, k] = we(null), [V, W] = we(0), [P, H] = we(0), [re, J] = we(null), g = Ee(null);
649
- Ee(0);
650
- const Q = Ee(!1), E = Ee(null), N = Ee(0), ae = Ee(0), p = Ee(null), w = Ee(null), y = Ee(!1), b = Ee(null), m = ue((M) => {
651
- !f || !h || !t || (b.current = M, !y.current && (y.current = !0, w.current = requestAnimationFrame((G) => {
652
- var S;
653
- y.current = !1, a == null || a(G);
654
- const F = b.current;
655
- if (!F) return;
656
- const U = F.clientX - V, te = t.minWidth || 50;
657
- let I = P + U;
658
- I < te && (I = te), t.maxWidth && I > t.maxWidth && (I = t.maxWidth), N.current = I;
659
- const z = I - P;
660
- p.current && (p.current.style.transform = `translateX(${z}px)`);
661
- const K = (C) => {
662
- var X;
663
- return typeof window < "u" && ((X = window.CSS) != null && X.escape) ? window.CSS.escape(C) : C.replace(/([#.;?\[\]\s])/g, "\\$1");
664
- }, $ = K(t.key), le = (S = E.current) == null ? void 0 : S.closest("table");
665
- if (!le) return;
666
- const A = le.querySelector(`th[data-column-key="${$}"]`);
667
- if (A && (A.style.width = `${I}px`, A.style.minWidth = `${I}px`), le.querySelectorAll(`td[data-column-key="${$}"]`).forEach((C) => {
668
- const X = C;
669
- X.style.width = `${I}px`, X.style.minWidth = `${I}px`;
670
- }), t.fixed) {
671
- const C = (ie) => window.getComputedStyle(ie).position === "sticky", D = Array.from(
672
- le.querySelectorAll("th.radar-table__header-cell.leaf-header")
673
- ).filter((ie) => C(ie)), ee = A, fe = ee ? D.indexOf(ee) : -1;
674
- if (fe !== -1) {
675
- let ie = parseFloat(D[fe].style.left || "0") || 0, q = D[fe].getBoundingClientRect().width;
676
- for (let ne = fe + 1; ne < D.length; ne++) {
677
- ie += Math.floor(q), D[ne].style.left = `${ie}px`;
678
- const L = D[ne].getAttribute("data-column-key");
679
- if (L) {
680
- const ce = K(L);
681
- le.querySelectorAll(`td[data-column-key="${ce}"]`).forEach((pe) => {
682
- const ve = pe;
683
- window.getComputedStyle(ve).position === "sticky" && (ve.style.left = `${ie}px`);
684
- });
23
+ const [z, j] = ue(!1), [M, ie] = ue(null), [X, Q] = ue(0), [R, re] = ue(0), [ee, y] = ue(null), K = ye(null);
24
+ ye(0);
25
+ const L = ye(!1), c = ye(null), G = ye(0), o = ye(0), a = ye(null), s = ye(null), g = ye(!1), l = ye(null), d = Y((H) => {
26
+ !z || !M || !e || (l.current = H, !g.current && (g.current = !0, s.current = requestAnimationFrame((P) => {
27
+ var p;
28
+ g.current = !1, v == null || v(P);
29
+ const W = l.current;
30
+ if (!W) return;
31
+ const E = W.clientX - X, U = e.minWidth || 50;
32
+ let m = R + E;
33
+ m < U && (m = U), e.maxWidth && m > e.maxWidth && (m = e.maxWidth), G.current = m;
34
+ const V = m - R;
35
+ if (B === "line")
36
+ a.current && (a.current.style.transform = `translateX(${V}px)`), c.current && (c.current.style.transform = `translateX(${V}px)`);
37
+ else {
38
+ const I = (x) => {
39
+ var $;
40
+ return typeof window < "u" && (($ = window.CSS) != null && $.escape) ? window.CSS.escape(x) : x.replace(/([#.;?\[\]\s])/g, "\\$1");
41
+ }, C = I(e.key), k = (p = c.current) == null ? void 0 : p.closest("table");
42
+ if (!k) return;
43
+ const w = k.querySelector(`th[data-column-key="${C}"]`);
44
+ if (w && (w.style.width = `${m}px`, w.style.minWidth = `${m}px`), k.querySelectorAll(`td[data-column-key="${C}"]`).forEach((x) => {
45
+ const $ = x;
46
+ $.style.width = `${m}px`, $.style.minWidth = `${m}px`;
47
+ }), e.fixed) {
48
+ const x = (ne) => window.getComputedStyle(ne).position === "sticky", Z = Array.from(
49
+ k.querySelectorAll("th.radar-table__header-cell.leaf-header")
50
+ ).filter((ne) => x(ne)), te = w, ae = te ? Z.indexOf(te) : -1;
51
+ if (ae !== -1) {
52
+ let ne = parseFloat(Z[ae].style.left || "0") || 0, N = Z[ae].getBoundingClientRect().width;
53
+ for (let O = ae + 1; O < Z.length; O++) {
54
+ ne += Math.floor(N), Z[O].style.left = `${ne}px`;
55
+ const D = Z[O].getAttribute("data-column-key");
56
+ if (D) {
57
+ const ce = I(D);
58
+ k.querySelectorAll(`td[data-column-key="${ce}"]`).forEach((le) => {
59
+ const fe = le;
60
+ window.getComputedStyle(fe).position === "sticky" && (fe.style.left = `${ne}px`);
61
+ });
62
+ }
63
+ N = Z[O].getBoundingClientRect().width;
685
64
  }
686
- q = D[ne].getBoundingClientRect().width;
687
65
  }
688
66
  }
689
67
  }
690
68
  })));
691
- }, [f, V, P, h, s, t, a]), j = ue(() => {
692
- var A;
693
- if (E.current.style.opacity = "", !f || !h) return;
694
- const M = t.minWidth || 50;
695
- let G = N.current || P;
696
- G < M && (G = M), t != null && t.maxWidth && G > t.maxWidth && (G = t.maxWidth);
697
- const F = G, U = h;
698
- w.current && (cancelAnimationFrame(w.current), w.current = null), y.current = !1, b.current = null, g.current && (clearInterval(g.current), g.current = null), Q.current = !1, p.current && (p.current.style.transform = "translateX(0px)"), _(!1), W(0), H(0), k(null), J(null), N.current = 0, ae.current = 0, document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", j);
699
- const te = (O) => {
700
- var S;
701
- return typeof window < "u" && ((S = window.CSS) != null && S.escape) ? window.CSS.escape(O) : O.replace(/([#.;?\[\]\s])/g, "\\$1");
702
- }, I = te(U), z = (A = E.current) == null ? void 0 : A.closest("table");
703
- if (!z) return;
704
- const K = z.querySelector(`th[data-column-key="${I}"]`);
705
- if (K && (K.style.width = `${F}px`, K.style.minWidth = `${F}px`), z.querySelectorAll(`td[data-column-key="${I}"]`).forEach((O) => {
706
- const S = O;
707
- S.style.width = `${F}px`, S.style.minWidth = `${F}px`;
708
- }), t.fixed) {
709
- const O = (ee) => window.getComputedStyle(ee).position === "sticky", C = Array.from(
710
- z.querySelectorAll("th.radar-table__header-cell.leaf-header")
711
- ).filter((ee) => O(ee)), X = K, D = X ? C.indexOf(X) : -1;
712
- if (D !== -1) {
713
- let ee = parseFloat(C[D].style.left || "0") || 0, fe = C[D].getBoundingClientRect().width;
714
- for (let ie = D + 1; ie < C.length; ie++) {
715
- ee += Math.floor(fe), C[ie].style.left = `${ee}px`;
716
- const q = C[ie].getAttribute("data-column-key");
717
- if (q) {
718
- const ne = te(q);
719
- z.querySelectorAll(`td[data-column-key="${ne}"]`).forEach((ce) => {
720
- const ye = ce;
721
- window.getComputedStyle(ye).position === "sticky" && (ye.style.left = `${ee}px`);
69
+ }, [z, X, R, M, F, e, v]), S = Y(() => {
70
+ var k;
71
+ if (c.current.style.opacity = "", !z || !M) return;
72
+ const H = e.minWidth || 50;
73
+ let P = G.current || R;
74
+ P < H && (P = H), e != null && e.maxWidth && P > e.maxWidth && (P = e.maxWidth);
75
+ const W = P, E = M;
76
+ s.current && (cancelAnimationFrame(s.current), s.current = null), g.current = !1, l.current = null, K.current && (clearInterval(K.current), K.current = null), L.current = !1, a.current && (a.current.style.transform = "translateX(0px)"), c.current && B === "line" && (c.current.style.position = "", c.current.style.left = "", c.current.style.top = "", c.current.style.transform = ""), j(!1), Q(0), re(0), ie(null), y(null), G.current = 0, o.current = 0, document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", S);
77
+ const U = (w) => {
78
+ var b;
79
+ return typeof window < "u" && ((b = window.CSS) != null && b.escape) ? window.CSS.escape(w) : w.replace(/([#.;?\[\]\s])/g, "\\$1");
80
+ }, m = U(E), V = (k = c.current) == null ? void 0 : k.closest("table");
81
+ if (!V) return;
82
+ const p = V.querySelector(`th[data-column-key="${m}"]`);
83
+ if (p && (p.style.width = `${W}px`, p.style.minWidth = `${W}px`), V.querySelectorAll(`td[data-column-key="${m}"]`).forEach((w) => {
84
+ const b = w;
85
+ b.style.width = `${W}px`, b.style.minWidth = `${W}px`;
86
+ }), e.fixed) {
87
+ const w = (te) => window.getComputedStyle(te).position === "sticky", x = Array.from(
88
+ V.querySelectorAll("th.radar-table__header-cell.leaf-header")
89
+ ).filter((te) => w(te)), $ = p, Z = $ ? x.indexOf($) : -1;
90
+ if (Z !== -1) {
91
+ let te = parseFloat(x[Z].style.left || "0") || 0, ae = x[Z].getBoundingClientRect().width;
92
+ for (let ne = Z + 1; ne < x.length; ne++) {
93
+ te += Math.floor(ae), x[ne].style.left = `${te}px`;
94
+ const N = x[ne].getAttribute("data-column-key");
95
+ if (N) {
96
+ const O = U(N);
97
+ V.querySelectorAll(`td[data-column-key="${O}"]`).forEach((ce) => {
98
+ const de = ce;
99
+ window.getComputedStyle(de).position === "sticky" && (de.style.left = `${te}px`);
722
100
  });
723
101
  }
724
- fe = C[ie].getBoundingClientRect().width;
102
+ ae = x[ne].getBoundingClientRect().width;
725
103
  }
726
104
  }
727
105
  }
728
- const le = setTimeout(() => {
729
- var C;
730
- const O = (C = E == null ? void 0 : E.current) == null ? void 0 : C.closest("th"), S = (O == null ? void 0 : O.getBoundingClientRect().width) ?? F;
731
- Ft(() => {
732
- n == null || n(U, S);
733
- }), c == null || c();
106
+ const C = setTimeout(() => {
107
+ var x;
108
+ const w = (x = c == null ? void 0 : c.current) == null ? void 0 : x.closest("th"), b = (w == null ? void 0 : w.getBoundingClientRect().width) ?? W;
109
+ Ke(() => {
110
+ h == null || h(E, b);
111
+ }), q == null || q();
734
112
  }, 0);
735
- return () => clearTimeout(le);
736
- }, [f, h, t, P, n, m, c]), R = ue((M, G, F) => {
737
- if (M.preventDefault(), o == null || o(), !E.current) return;
738
- const U = E.current.closest("th"), te = (U == null ? void 0 : U.getBoundingClientRect().width) ?? F;
739
- _(!0), W(M.clientX), H(te), k(G), E.current.style.opacity = "1", E.current.classList.add("radar-table__resize-button_active");
740
- const I = E.current.getBoundingClientRect(), z = s == null ? void 0 : s.current, K = E.current.closest("table");
741
- if (z) {
742
- const $ = z.getBoundingClientRect();
743
- J({
744
- top: $.top + I.height * 2,
745
- height: $.height - I.height * 2
113
+ return () => clearTimeout(C);
114
+ }, [z, M, e, R, h, d, q]), J = Y((H, P, W) => {
115
+ if (H.preventDefault(), _ == null || _(), !c.current) return;
116
+ const E = c.current.closest("th"), U = (E == null ? void 0 : E.getBoundingClientRect().width) ?? W;
117
+ j(!0), Q(H.clientX), re(U), ie(P), c.current.style.opacity = "1", c.current.classList.add("radar-table__resize-button_active");
118
+ const m = c.current.getBoundingClientRect();
119
+ if (B === "line") {
120
+ const I = m.left + m.width / 2;
121
+ if (o.current = I, a.current && (a.current.style.left = `${I}px`, a.current.style.transform = "translateX(0px)"), c.current) {
122
+ const C = m.top;
123
+ c.current.style.position = "fixed", c.current.style.left = `${I - 11}px`, c.current.style.top = `${C}px`, c.current.style.transform = "translateX(0px)";
124
+ }
125
+ }
126
+ const V = F == null ? void 0 : F.current, p = c.current.closest("table");
127
+ if (V) {
128
+ const I = V.getBoundingClientRect();
129
+ y({
130
+ top: I.top + m.height * 2,
131
+ height: I.height - m.height * 2
746
132
  });
747
- } else if (K) {
748
- const $ = K.getBoundingClientRect();
749
- J({
750
- top: $.top,
751
- height: $.height
133
+ } else if (p) {
134
+ const I = p.getBoundingClientRect();
135
+ y({
136
+ top: I.top,
137
+ height: I.height
752
138
  });
753
139
  }
754
- }, [s, o]);
755
- return Ie(() => {
756
- f && (document.addEventListener("mousemove", m), document.addEventListener("mouseup", j));
757
- }, [f, m, j]), Ie(() => () => {
758
- w.current && (cancelAnimationFrame(w.current), w.current = null), y.current = !1, b.current = null, document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", j);
759
- }, [m, j]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
760
- /* @__PURE__ */ l.jsx(
140
+ }, [F, _]);
141
+ return _e(() => {
142
+ z && (document.addEventListener("mousemove", d), document.addEventListener("mouseup", S));
143
+ }, [z, d, S, B]), _e(() => () => {
144
+ s.current && (cancelAnimationFrame(s.current), s.current = null), g.current = !1, l.current = null, document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", S);
145
+ }, [d, S]), /* @__PURE__ */ ge(Se, { children: [
146
+ /* @__PURE__ */ n(
761
147
  "button",
762
148
  {
763
- ref: E,
149
+ ref: c,
764
150
  className: "radar-table__resize-button",
765
- onMouseDown: (M) => R(M, t.key, i || r || 200),
151
+ onMouseDown: (H) => J(H, e.key, t || i || 200),
766
152
  title: "Изменить ширину колонки",
767
- children: /* @__PURE__ */ l.jsx("div", {})
153
+ children: /* @__PURE__ */ n("div", {})
768
154
  }
769
155
  ),
770
- f && re && /* @__PURE__ */ l.jsx(
156
+ z && ee && B === "line" && /* @__PURE__ */ n(
771
157
  "div",
772
158
  {
773
- ref: p,
159
+ ref: a,
774
160
  className: "radar-table__resize-line",
775
161
  style: {
776
- left: `${ae.current}px`,
777
- top: `${re.top}px`,
778
- height: `${re.height}px`,
162
+ left: `${o.current}px`,
163
+ top: `${ee.top}px`,
164
+ height: `${ee.height}px`,
779
165
  transform: "translateX(0px)",
780
166
  willChange: "transform"
781
167
  }
782
168
  }
783
169
  )
784
170
  ] });
785
- }, Yt = ({ text: t, children: i, containerRef: r }) => {
786
- const [n, s] = we(!1), [o, a] = we("left"), c = Ee(null), f = () => {
787
- var _;
788
- if (c.current) {
789
- const h = c.current.getBoundingClientRect(), k = ((_ = r == null ? void 0 : r.current) == null ? void 0 : _.clientWidth) ?? window.innerWidth, V = 250, W = 20, P = k - h.left, H = h.right;
790
- P < V + W && H > V + W ? a("right") : a("left");
791
- }
792
- s(!0);
793
- };
794
- return /* @__PURE__ */ l.jsxs(
171
+ }, rt = ({ text: e, children: t, containerRef: i }) => {
172
+ const [h, F] = ue(!1), [_, v] = ue("left"), q = ye(null);
173
+ return /* @__PURE__ */ ge(
795
174
  "button",
796
175
  {
797
- ref: c,
176
+ ref: q,
798
177
  className: "radar-table__tooltip-button",
799
- onMouseOver: f,
800
- onMouseOut: () => s(!1),
178
+ onMouseOver: () => {
179
+ var z;
180
+ if (q.current) {
181
+ const j = q.current.getBoundingClientRect(), M = ((z = i == null ? void 0 : i.current) == null ? void 0 : z.clientWidth) ?? window.innerWidth, ie = 250, X = 20, Q = M - j.left, R = j.right;
182
+ Q < ie + X && R > ie + X ? v("right") : v("left");
183
+ }
184
+ F(!0);
185
+ },
186
+ onMouseOut: () => F(!1),
801
187
  children: [
802
- i || /* @__PURE__ */ l.jsxs("svg", { width: "1.5em", height: "1em", viewBox: "0 0 24 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
803
- /* @__PURE__ */ l.jsx("rect", { stroke: "currentColor", x: "0.75", y: "0.75", width: "18.5", height: "18.5", rx: "9.25", strokeOpacity: "0.25", strokeWidth: "1.5" }),
804
- /* @__PURE__ */ l.jsx("path", { fill: "currentColor", d: "M9.064 15V7.958H10.338V15H9.064ZM8.952 6.418V5.046H10.464V6.418H8.952Z", fillOpacity: "0.5" })
188
+ t || /* @__PURE__ */ ge("svg", { width: "1.5em", height: "1em", viewBox: "0 0 24 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
189
+ /* @__PURE__ */ n("rect", { stroke: "currentColor", x: "0.75", y: "0.75", width: "18.5", height: "18.5", rx: "9.25", strokeOpacity: "0.25", strokeWidth: "1.5" }),
190
+ /* @__PURE__ */ n("path", { fill: "currentColor", d: "M9.064 15V7.958H10.338V15H9.064ZM8.952 6.418V5.046H10.464V6.418H8.952Z", fillOpacity: "0.5" })
805
191
  ] }),
806
- /* @__PURE__ */ l.jsx(
192
+ /* @__PURE__ */ n(
807
193
  "div",
808
194
  {
809
- className: `radar-table__tooltip-text ${n ? "radar-table__tooltip-text_visible" : ""} radar-table__tooltip-text--${o}`,
810
- children: t
195
+ className: `radar-table__tooltip-text ${h ? "radar-table__tooltip-text_visible" : ""} radar-table__tooltip-text--${_}`,
196
+ children: e
811
197
  }
812
198
  )
813
199
  ]
814
200
  }
815
201
  );
816
- }, bt = $t(null), Jt = () => {
817
- const t = Dt(bt);
818
- return t || {
202
+ }, Oe = He(null), nt = () => {
203
+ const e = qe(Oe);
204
+ return e || {
819
205
  activeColumn: null,
820
206
  isValidDropZone: () => !1
821
207
  };
822
208
  };
823
- function Zt({
824
- children: t,
825
- fullConfig: i,
826
- onColumnReorder: r,
827
- scrollContainerRef: n
209
+ function st({
210
+ children: e,
211
+ fullConfig: t,
212
+ onColumnReorder: i,
213
+ scrollContainerRef: h
828
214
  }) {
829
- const [s, o] = we(null), [a, c] = we(40), [f, _] = we(200), [h, k] = we(null), V = It(
830
- ot(Lt, {
215
+ const [F, _] = ue(null), [v, q] = ue(40), [B, z] = ue(200), [j, M] = ue(null), ie = Re(
216
+ Ne(Ve, {
831
217
  activationConstraint: {
832
218
  distance: 5
833
219
  // Уменьшили дистанцию
834
220
  }
835
221
  }),
836
- ot(Mt, {
837
- coordinateGetter: Vt
222
+ Ne(Ze, {
223
+ coordinateGetter: Ye
838
224
  })
839
- ), W = ue((p) => {
840
- const w = Wt(p);
841
- if (w.length > 0) {
842
- const m = w.filter(
843
- (j) => j.id.toString().startsWith("drop-zone-")
225
+ ), X = Y((o) => {
226
+ const a = Xe(o);
227
+ if (a.length > 0) {
228
+ const l = a.filter(
229
+ (d) => d.id.toString().startsWith("drop-zone-")
844
230
  );
845
- if (m.length > 0)
846
- return m;
231
+ if (l.length > 0)
232
+ return l;
847
233
  }
848
- const b = Pt(p).filter(
849
- (m) => m.id.toString().startsWith("drop-zone-")
234
+ const g = Je(o).filter(
235
+ (l) => l.id.toString().startsWith("drop-zone-")
850
236
  );
851
- return b.length > 0 ? [b[0]] : [];
852
- }, []), P = ue((p) => p.some((w) => w.children && w.children.length > 0), []), H = ue((p, w) => {
853
- const y = (b, m, j = 0, R = null) => {
854
- for (const M of b) {
855
- if (M.key === m)
856
- return { column: M, parent: R, level: j };
857
- if (M.children && M.children.length > 0) {
858
- const G = y(M.children, m, j + 1, M);
859
- if (G) return G;
237
+ return g.length > 0 ? [g[0]] : [];
238
+ }, []), Q = Y((o) => o.some((a) => a.children && a.children.length > 0), []), R = Y((o, a) => {
239
+ const s = (g, l, d = 0, S = null) => {
240
+ for (const J of g) {
241
+ if (J.key === l)
242
+ return { column: J, parent: S, level: d };
243
+ if (J.children && J.children.length > 0) {
244
+ const H = s(J.children, l, d + 1, J);
245
+ if (H) return H;
860
246
  }
861
247
  }
862
248
  return null;
863
249
  };
864
- return y(p, w);
865
- }, []), re = ue((p, w) => {
866
- var b;
867
- const y = H(w, p);
868
- return y && (y.column.fixed || ((b = y.parent) == null ? void 0 : b.fixed)) || !1;
869
- }, [H]), J = ue((p, w) => {
870
- if (p.columnKey === w.columnKey)
250
+ return s(o, a);
251
+ }, []), re = Y((o, a) => {
252
+ var g;
253
+ const s = R(a, o);
254
+ return s && (s.column.fixed || ((g = s.parent) == null ? void 0 : g.fixed)) || !1;
255
+ }, [R]), ee = Y((o, a) => {
256
+ if (o.columnKey === a.columnKey)
871
257
  return !1;
872
- const y = re(p.columnKey, i), b = re(w.columnKey, i);
873
- if (y !== b)
258
+ const s = re(o.columnKey, t), g = re(a.columnKey, t);
259
+ if (s !== g)
874
260
  return !1;
875
- if (P(i)) {
876
- const m = H(i, p.columnKey), j = H(i, w.columnKey);
877
- if (!m || !j)
261
+ if (Q(t)) {
262
+ const l = R(t, o.columnKey), d = R(t, a.columnKey);
263
+ if (!l || !d)
878
264
  return !1;
879
- const R = p.isLeaf, M = w.isLeaf;
880
- if (!R && !M) {
881
- const G = m.level === j.level, F = m.parent === null && j.parent === null || m.parent !== null && j.parent !== null && m.parent.key === j.parent.key;
882
- return G && F;
265
+ const S = o.isLeaf, J = a.isLeaf;
266
+ if (!S && !J) {
267
+ const H = l.level === d.level, P = l.parent === null && d.parent === null || l.parent !== null && d.parent !== null && l.parent.key === d.parent.key;
268
+ return H && P;
883
269
  }
884
- if (R && M) {
885
- const G = m.level === j.level, F = m.parent === null && j.parent === null || m.parent !== null && j.parent !== null && m.parent.key === j.parent.key;
886
- return G && F;
270
+ if (S && J) {
271
+ const H = l.level === d.level, P = l.parent === null && d.parent === null || l.parent !== null && d.parent !== null && l.parent.key === d.parent.key;
272
+ return H && P;
887
273
  }
888
274
  return !1;
889
275
  }
890
276
  return !0;
891
- }, [i, P, H, re]), g = ue((p, w, y) => {
892
- var $, le;
893
- if (!P(i)) {
894
- const A = y.findIndex((D) => D.key === p), O = y.findIndex((D) => D.key === w);
895
- if (A === -1 || O === -1)
896
- return y;
897
- const S = [...y], C = S[A];
898
- S.splice(A, 1);
899
- const X = (A < O, O);
900
- return S.splice(X, 0, C), S;
277
+ }, [t, Q, R, re]), y = Y((o, a, s) => {
278
+ var p, I;
279
+ if (!Q(t)) {
280
+ const C = s.findIndex(($) => $.key === o), k = s.findIndex(($) => $.key === a);
281
+ if (C === -1 || k === -1)
282
+ return s;
283
+ const w = [...s], b = w[C];
284
+ w.splice(C, 1);
285
+ const x = (C < k, k);
286
+ return w.splice(x, 0, b), w;
901
287
  }
902
- const b = H(i, p), m = H(i, w);
903
- if (!b || !m)
904
- return y;
905
- const j = JSON.parse(JSON.stringify(i)), R = (A, O) => {
906
- if (O === null)
907
- return { container: A, parentObj: null };
908
- const S = (X) => {
909
- for (const D of X) {
910
- if (D.key === O)
911
- return D;
912
- if (D.children) {
913
- const ee = S(D.children);
914
- if (ee) return ee;
288
+ const g = R(t, o), l = R(t, a);
289
+ if (!g || !l)
290
+ return s;
291
+ const d = JSON.parse(JSON.stringify(t)), S = (C, k) => {
292
+ if (k === null)
293
+ return { container: C, parentObj: null };
294
+ const w = (x) => {
295
+ for (const $ of x) {
296
+ if ($.key === k)
297
+ return $;
298
+ if ($.children) {
299
+ const Z = w($.children);
300
+ if (Z) return Z;
915
301
  }
916
302
  }
917
303
  return null;
918
- }, C = S(A);
304
+ }, b = w(C);
919
305
  return {
920
- container: (C == null ? void 0 : C.children) || A,
921
- parentObj: C
306
+ container: (b == null ? void 0 : b.children) || C,
307
+ parentObj: b
922
308
  };
923
- }, M = (($ = b.parent) == null ? void 0 : $.key) || null, G = ((le = m.parent) == null ? void 0 : le.key) || null, { container: F } = R(j, M), { container: U } = R(j, G);
924
- if (F !== U)
925
- return y;
926
- const te = F.findIndex((A) => A.key === p), I = F.findIndex((A) => A.key === w);
927
- if (te === -1 || I === -1)
928
- return y;
929
- const [z] = F.splice(te, 1), K = (te < I, I);
930
- return F.splice(K, 0, z), j;
931
- }, [i, P, H]), Q = ue((p) => {
932
- const w = p.active.data.current;
933
- o(w);
934
- const y = document.querySelector(`[data-column-key="${w.columnKey}"]`);
935
- if (y) {
936
- const b = y.getBoundingClientRect();
937
- _(b.width);
938
- const m = y.closest("table");
939
- y.closest('[style*="overflow"]');
940
- const j = m;
941
- if (j) {
942
- const R = j.getBoundingClientRect();
943
- c(R.height);
309
+ }, J = ((p = g.parent) == null ? void 0 : p.key) || null, H = ((I = l.parent) == null ? void 0 : I.key) || null, { container: P } = S(d, J), { container: W } = S(d, H);
310
+ if (P !== W)
311
+ return s;
312
+ const E = P.findIndex((C) => C.key === o), U = P.findIndex((C) => C.key === a);
313
+ if (E === -1 || U === -1)
314
+ return s;
315
+ const [m] = P.splice(E, 1), V = (E < U, U);
316
+ return P.splice(V, 0, m), d;
317
+ }, [t, Q, R]), K = Y((o) => {
318
+ const a = o.active.data.current;
319
+ _(a);
320
+ const s = document.querySelector(`[data-column-key="${a.columnKey}"]`);
321
+ if (s) {
322
+ const g = s.getBoundingClientRect();
323
+ z(g.width);
324
+ const l = s.closest("table");
325
+ s.closest('[style*="overflow"]');
326
+ const d = l;
327
+ if (d) {
328
+ const S = d.getBoundingClientRect();
329
+ q(S.height);
944
330
  } else
945
- c(400);
331
+ q(400);
946
332
  } else
947
- c(400), _(200);
333
+ q(400), z(200);
948
334
  document.body.style.cursor = "grabbing";
949
- }, []), E = ue((p) => {
950
- const { active: w, over: y } = p;
951
- if (!y || !w.data.current) {
952
- document.body.style.cursor = "grabbing", k(null);
335
+ }, []), L = Y((o) => {
336
+ const { active: a, over: s } = o;
337
+ if (!s || !a.data.current) {
338
+ document.body.style.cursor = "grabbing", M(null);
953
339
  return;
954
340
  }
955
- const b = w.data.current, m = y.data.current;
956
- if (!m) {
957
- document.body.style.cursor = "grabbing", k(null);
341
+ const g = a.data.current, l = s.data.current;
342
+ if (!l) {
343
+ document.body.style.cursor = "grabbing", M(null);
958
344
  return;
959
345
  }
960
- const j = J(b, m);
961
- document.body.style.cursor = j ? "copy" : "not-allowed";
962
- const R = document.querySelectorAll(`th[data-column-key="${m.columnKey}"]`), M = P(i), G = R.length > 0 ? M && m.isLeaf ? R[R.length - 1] : R[0] : null;
963
- if (G) {
964
- const F = G.getBoundingClientRect(), U = G.closest("table");
965
- let te = F.left;
966
- const I = n == null ? void 0 : n.current;
967
- let z, K;
968
- if (I) {
969
- const $ = I.getBoundingClientRect();
970
- z = $.top, K = $.height;
971
- } else if (U) {
972
- const $ = U.getBoundingClientRect();
973
- z = $.top, K = $.height;
346
+ const d = ee(g, l);
347
+ document.body.style.cursor = d ? "copy" : "not-allowed";
348
+ const S = document.querySelectorAll(`th[data-column-key="${l.columnKey}"]`), J = Q(t), H = S.length > 0 ? J && l.isLeaf ? S[S.length - 1] : S[0] : null;
349
+ if (H) {
350
+ const P = H.getBoundingClientRect(), W = H.closest("table");
351
+ let E = P.left;
352
+ const U = h == null ? void 0 : h.current;
353
+ let m, V;
354
+ if (U) {
355
+ const p = U.getBoundingClientRect();
356
+ m = p.top, V = p.height;
357
+ } else if (W) {
358
+ const p = W.getBoundingClientRect();
359
+ m = p.top, V = p.height;
974
360
  } else
975
- z = F.top, K = F.height * 10;
976
- k({
977
- left: te,
978
- top: z,
979
- height: K,
980
- color: j ? "#5329FF" : "#ff3b3b"
361
+ m = P.top, V = P.height * 10;
362
+ M({
363
+ left: E,
364
+ top: m,
365
+ height: V,
366
+ color: d ? "#5329FF" : "#ff3b3b"
981
367
  });
982
368
  } else
983
- k(null);
984
- }, [J]), N = ue((p) => {
985
- const { active: w, over: y } = p;
986
- if (document.body.style.cursor = "", o(null), c(40), _(200), k(null), !y || !w.data.current || !y.data.current)
369
+ M(null);
370
+ }, [ee]), c = Y((o) => {
371
+ const { active: a, over: s } = o;
372
+ if (document.body.style.cursor = "", _(null), q(40), z(200), M(null), !s || !a.data.current || !s.data.current)
987
373
  return;
988
- const b = w.data.current, m = y.data.current;
989
- if (J(b, m) && r) {
990
- const j = g(
991
- b.columnKey,
992
- m.columnKey,
993
- i
374
+ const g = a.data.current, l = s.data.current;
375
+ if (ee(g, l) && i) {
376
+ const d = y(
377
+ g.columnKey,
378
+ l.columnKey,
379
+ t
994
380
  );
995
- j._dragInfo = {
996
- draggedKey: b.columnKey,
997
- targetKey: m.columnKey,
998
- draggedIndex: b.index,
381
+ d._dragInfo = {
382
+ draggedKey: g.columnKey,
383
+ targetKey: l.columnKey,
384
+ draggedIndex: g.index,
999
385
  targetIndex: -1
1000
386
  // будет вычислен в TableHeader если нужно
1001
- }, r(j);
387
+ }, i(d);
1002
388
  }
1003
- }, [J, r, g, i]), ae = {
1004
- activeColumn: s,
1005
- isValidDropZone: J
389
+ }, [ee, i, y, t]), G = {
390
+ activeColumn: F,
391
+ isValidDropZone: ee
1006
392
  };
1007
- return /* @__PURE__ */ l.jsx(bt.Provider, { value: ae, children: /* @__PURE__ */ l.jsxs(
1008
- Nt,
393
+ return /* @__PURE__ */ n(Oe.Provider, { value: G, children: /* @__PURE__ */ ge(
394
+ Ge,
1009
395
  {
1010
- sensors: V,
1011
- collisionDetection: W,
1012
- onDragStart: Q,
1013
- onDragOver: E,
1014
- onDragEnd: N,
396
+ sensors: ie,
397
+ collisionDetection: X,
398
+ onDragStart: K,
399
+ onDragOver: L,
400
+ onDragEnd: c,
1015
401
  children: [
1016
- t,
1017
- /* @__PURE__ */ l.jsx(At, { dropAnimation: null, children: s ? /* @__PURE__ */ l.jsx(
402
+ e,
403
+ /* @__PURE__ */ n(je, { dropAnimation: null, children: F ? /* @__PURE__ */ n(
1018
404
  "div",
1019
405
  {
1020
406
  style: {
1021
- width: `${f}px`,
1022
- height: `${a}px`,
407
+ width: `${B}px`,
408
+ height: `${v}px`,
1023
409
  backgroundColor: "#5329FF",
1024
410
  opacity: 0.5,
1025
411
  borderRadius: "4px",
@@ -1028,16 +414,16 @@ function Zt({
1028
414
  }
1029
415
  }
1030
416
  ) : null }),
1031
- h && /* @__PURE__ */ l.jsx(
417
+ j && /* @__PURE__ */ n(
1032
418
  "div",
1033
419
  {
1034
420
  style: {
1035
421
  position: "fixed",
1036
- left: `${h.left}px`,
1037
- top: `${h.top}px`,
422
+ left: `${j.left}px`,
423
+ top: `${j.top}px`,
1038
424
  width: "2px",
1039
- height: `${h.height}px`,
1040
- backgroundColor: h.color,
425
+ height: `${j.height}px`,
426
+ backgroundColor: j.color,
1041
427
  zIndex: 1e4,
1042
428
  pointerEvents: "none",
1043
429
  opacity: 0.2
@@ -1048,266 +434,268 @@ function Zt({
1048
434
  }
1049
435
  ) });
1050
436
  }
1051
- const Gt = (t) => {
1052
- var i;
1053
- return typeof window < "u" && ((i = window.CSS) != null && i.escape) ? window.CSS.escape(t) : t.replace(/([#.;?\[\]\s])/g, "\\$1");
1054
- }, Xt = (t) => {
437
+ const it = (e) => {
438
+ var t;
439
+ return typeof window < "u" && ((t = window.CSS) != null && t.escape) ? window.CSS.escape(e) : e.replace(/([#.;?\[\]\s])/g, "\\$1");
440
+ }, at = (e) => {
1055
441
  if (typeof document > "u") return null;
1056
- const i = `th[data-column-key="${Gt(t)}"]`, r = document.querySelector(i);
1057
- return r ? r.getBoundingClientRect().width : null;
442
+ const t = `th[data-column-key="${it(e)}"]`, i = document.querySelector(t);
443
+ return i ? i.getBoundingClientRect().width : null;
1058
444
  };
1059
- function Qt({
1060
- column: t,
1061
- index: i,
1062
- config: r,
1063
- fullConfig: n,
1064
- sorting: s,
1065
- onSort: o,
1066
- onResize: a,
1067
- onResizeStart: c,
1068
- onResizeFrame: f,
1069
- onResizeEnd: _,
1070
- sortIcon: h,
1071
- resizeable: k,
1072
- draggableColumns: V,
1073
- preset: W,
1074
- headerCellClassName: P,
1075
- headerCellStyle: H,
445
+ function ot({
446
+ column: e,
447
+ index: t,
448
+ config: i,
449
+ fullConfig: h,
450
+ sorting: F,
451
+ onSort: _,
452
+ onResize: v,
453
+ onResizeStart: q,
454
+ onResizeFrame: B,
455
+ onResizeEnd: z,
456
+ sortIcon: j,
457
+ resizeable: M,
458
+ draggableColumns: ie,
459
+ preset: X,
460
+ headerCellClassName: Q,
461
+ headerCellStyle: R,
1076
462
  headerCellWrapperClassName: re,
1077
- headerCellWrapperStyle: J,
1078
- stickyHeader: g,
1079
- scrollContainerRef: Q,
1080
- resizeThrottle: E
463
+ headerCellWrapperStyle: ee,
464
+ stickyHeader: y,
465
+ scrollContainerRef: K,
466
+ resizeThrottle: L,
467
+ resizeMode: c
1081
468
  }) {
1082
- var ie;
1083
- if (t.hidden)
469
+ var ne;
470
+ if (e.hidden)
1084
471
  return null;
1085
- const { activeColumn: N, isValidDropZone: ae } = Jt(), p = !t.children || t.children.length === 0;
1086
- Ye(() => (n == null ? void 0 : n.some((q) => q.children && q.children.length > 0)) || !1, [n]);
1087
- const w = V, b = ue((q) => {
1088
- if (!n) return null;
1089
- const ne = (L, ce, ye = null) => {
1090
- for (const pe of L) {
1091
- if (pe.key === ce)
1092
- return ye;
1093
- if (pe.children && pe.children.length > 0) {
1094
- const ve = ne(pe.children, ce, pe);
1095
- if (ve !== null) return ve;
472
+ const { activeColumn: G, isValidDropZone: o } = nt(), a = !e.children || e.children.length === 0;
473
+ ke(() => (h == null ? void 0 : h.some((N) => N.children && N.children.length > 0)) || !1, [h]);
474
+ const s = ie, l = Y((N) => {
475
+ if (!h) return null;
476
+ const O = (D, ce, de = null) => {
477
+ for (const le of D) {
478
+ if (le.key === ce)
479
+ return de;
480
+ if (le.children && le.children.length > 0) {
481
+ const fe = O(le.children, ce, le);
482
+ if (fe !== null) return fe;
1096
483
  }
1097
484
  }
1098
485
  return null;
1099
486
  };
1100
- return ne(n, q);
1101
- }, [n])(t.key), m = t.fixed || (b == null ? void 0 : b.fixed) || !1, R = ue((q) => {
1102
- if (!n) return 0;
1103
- const ne = (L, ce, ye = 0) => {
1104
- for (const pe of L) {
1105
- if (pe.key === ce)
1106
- return ye;
1107
- if (pe.children && pe.children.length > 0) {
1108
- const ve = ne(pe.children, ce, ye + 1);
1109
- if (ve !== -1) return ve;
487
+ return O(h, N);
488
+ }, [h])(e.key), d = e.fixed || (l == null ? void 0 : l.fixed) || !1, J = Y((N) => {
489
+ if (!h) return 0;
490
+ const O = (D, ce, de = 0) => {
491
+ for (const le of D) {
492
+ if (le.key === ce)
493
+ return de;
494
+ if (le.children && le.children.length > 0) {
495
+ const fe = O(le.children, ce, de + 1);
496
+ if (fe !== -1) return fe;
1110
497
  }
1111
498
  }
1112
499
  return -1;
1113
500
  };
1114
- return ne(n, q);
1115
- }, [n])(t.key), {
1116
- attributes: M,
1117
- listeners: G,
1118
- setNodeRef: F,
1119
- isDragging: U
1120
- } = zt({
1121
- id: `column-${t.key}`,
501
+ return O(h, N);
502
+ }, [h])(e.key), {
503
+ attributes: H,
504
+ listeners: P,
505
+ setNodeRef: W,
506
+ isDragging: E
507
+ } = Ue({
508
+ id: `column-${e.key}`,
1122
509
  data: {
1123
510
  type: "table-column",
1124
- columnKey: t.key,
1125
- isFixed: m,
1126
- parentKey: b == null ? void 0 : b.key,
1127
- level: R,
1128
- index: i,
1129
- isLeaf: p
511
+ columnKey: e.key,
512
+ isFixed: d,
513
+ parentKey: l == null ? void 0 : l.key,
514
+ level: J,
515
+ index: t,
516
+ isLeaf: a
1130
517
  // ✅ Добавляем информацию о типе колонки
1131
518
  },
1132
- disabled: !w
519
+ disabled: !s
1133
520
  }), {
1134
- setNodeRef: te,
1135
- isOver: I
1136
- } = Bt({
1137
- id: `drop-zone-${t.key}`,
521
+ setNodeRef: U,
522
+ isOver: m
523
+ } = Qe({
524
+ id: `drop-zone-${e.key}`,
1138
525
  data: {
1139
526
  type: "column-drop-zone",
1140
- columnKey: t.key,
1141
- isFixed: m,
1142
- accepts: [m ? "fixed" : "non-fixed"],
1143
- isLeaf: p
527
+ columnKey: e.key,
528
+ isFixed: d,
529
+ accepts: [d ? "fixed" : "non-fixed"],
530
+ isLeaf: a
1144
531
  // ✅ Добавляем информацию о типе колонки
1145
532
  },
1146
533
  disabled: !1
1147
- }), z = ue((q) => {
1148
- F(q), te(q);
1149
- }, [F, te]), K = Ye(() => {
1150
- if (!N || !I) return !1;
1151
- const q = {
534
+ }), V = Y((N) => {
535
+ W(N), U(N);
536
+ }, [W, U]), p = ke(() => {
537
+ if (!G || !m) return !1;
538
+ const N = {
1152
539
  type: "column-drop-zone",
1153
- columnKey: t.key,
1154
- isFixed: m,
1155
- accepts: [m ? "fixed" : "non-fixed"],
1156
- isLeaf: p
540
+ columnKey: e.key,
541
+ isFixed: d,
542
+ accepts: [d ? "fixed" : "non-fixed"],
543
+ isLeaf: a
1157
544
  };
1158
- return ae(N, q);
1159
- }, [N, I, t.key, m, ae, p]), $ = Ye(() => U ? "grabbing" : I && N ? K ? "copy" : "not-allowed" : "default", [U, I, N, K]), le = t.fixed && !t.width ? 200 : t.width, A = t.fixed && !t.minWidth ? 200 : t.minWidth, O = ue(() => {
1160
- let q = t.fixedLeft || 0;
1161
- if (!m)
1162
- return q;
1163
- for (let ne = 0; ne < i; ne++) {
1164
- const L = r[ne];
1165
- L.fixed && !L.hidden && (q += (L.width || L.minWidth || 200) + (L.fixedLeft || 0));
1166
- }
1167
- return q;
1168
- }, [t.fixedLeft, r, i, m]), [S, C] = we(() => O());
1169
- Xe(() => {
1170
- if (!m) {
1171
- C(O());
545
+ return o(G, N);
546
+ }, [G, m, e.key, d, o, a]), I = ke(() => E ? "grabbing" : m && G ? p ? "copy" : "not-allowed" : "default", [E, m, G, p]), C = e.fixed && !e.width ? 200 : e.width, k = e.fixed && !e.minWidth ? 200 : e.minWidth, w = Y(() => {
547
+ let N = e.fixedLeft || 0;
548
+ if (!d)
549
+ return N;
550
+ for (let O = 0; O < t; O++) {
551
+ const D = i[O];
552
+ D.fixed && !D.hidden && (N += (D.width || D.minWidth || 200) + (D.fixedLeft || 0));
553
+ }
554
+ return N;
555
+ }, [e.fixedLeft, i, t, d]), [b, x] = ue(() => w());
556
+ Fe(() => {
557
+ if (!d) {
558
+ x(w());
1172
559
  return;
1173
560
  }
1174
- let q = t.fixedLeft || 0;
1175
- for (let ne = 0; ne < i; ne++) {
1176
- const L = r[ne];
1177
- if (L.fixed && !L.hidden) {
1178
- const ce = L.width || L.minWidth || 200, ye = Xt(L.key);
1179
- q += Math.floor(ye ?? ce) + (L.fixedLeft || 0) - 0.05;
1180
- }
1181
- }
1182
- C(q);
1183
- }, [t.fixedLeft, t.width, t.minWidth, r, i, m, O]);
1184
- const D = ((q) => {
1185
- if (q.groupColor)
1186
- return q.groupColor;
1187
- if (n) {
1188
- const ne = (ce, ye) => {
1189
- for (const pe of ce)
1190
- if (pe.children) {
1191
- if (pe.children.some((Re) => Re.key === ye))
1192
- return pe;
1193
- const ve = ne(pe.children, ye);
1194
- if (ve) return ve;
561
+ let N = e.fixedLeft || 0;
562
+ for (let O = 0; O < t; O++) {
563
+ const D = i[O];
564
+ if (D.fixed && !D.hidden) {
565
+ const ce = D.width || D.minWidth || 200, de = at(D.key);
566
+ N += Math.floor(de ?? ce) + (D.fixedLeft || 0) - 0.05;
567
+ }
568
+ }
569
+ x(N);
570
+ }, [e.fixedLeft, e.width, e.minWidth, i, t, d, w]);
571
+ const Z = ((N) => {
572
+ if (N.groupColor)
573
+ return N.groupColor;
574
+ if (h) {
575
+ const O = (ce, de) => {
576
+ for (const le of ce)
577
+ if (le.children) {
578
+ if (le.children.some((r) => r.key === de))
579
+ return le;
580
+ const fe = O(le.children, de);
581
+ if (fe) return fe;
1195
582
  }
1196
583
  return null;
1197
- }, L = ne(n, q.key);
1198
- return L == null ? void 0 : L.groupColor;
584
+ }, D = O(h, N.key);
585
+ return D == null ? void 0 : D.groupColor;
1199
586
  }
1200
- })(t);
1201
- let ee = "currentColor", fe = "currentColor";
1202
- return s.sort_field === t.key && (s.sort_order === "ASC" && (ee = "#5329FF"), s.sort_order === "DESC" && (fe = "#5329FF")), /* @__PURE__ */ l.jsx(
587
+ })(e);
588
+ let te = "currentColor", ae = "currentColor";
589
+ return F.sort_field === e.key && (F.sort_order === "ASC" && (te = "#5329FF"), F.sort_order === "DESC" && (ae = "#5329FF")), /* @__PURE__ */ n(
1203
590
  "th",
1204
591
  {
1205
- ref: z,
1206
- "data-column-key": t.key,
592
+ ref: V,
593
+ "data-column-key": e.key,
1207
594
  className: `
1208
595
  radar-table__header-cell
1209
- ${W ? W + "__header-cell" : ""}
1210
- ${P || ""}
1211
- ${U ? "dragging" : ""}
1212
- ${I ? "drag-over" : ""}
1213
- ${K && I ? "valid-drop-zone" : ""}
1214
- ${I && !K ? "invalid-drop-zone" : ""}
1215
- ${p ? "leaf-header" : "group-header"}
1216
- ${t.className || ""}`,
1217
- colSpan: t.colSpan || 1,
1218
- rowSpan: t.rowSpan || 1,
596
+ ${X ? X + "__header-cell" : ""}
597
+ ${Q || ""}
598
+ ${E ? "dragging" : ""}
599
+ ${m ? "drag-over" : ""}
600
+ ${p && m ? "valid-drop-zone" : ""}
601
+ ${m && !p ? "invalid-drop-zone" : ""}
602
+ ${a ? "leaf-header" : "group-header"}
603
+ ${e.className || ""}`,
604
+ colSpan: e.colSpan || 1,
605
+ rowSpan: e.rowSpan || 1,
1219
606
  style: {
1220
- width: le,
607
+ width: C,
1221
608
  //minWidth: currWidth,
1222
- position: t.fixed ? "sticky" : "static",
1223
- top: g && typeof g == "number" ? g : 0,
1224
- left: S,
1225
- borderRight: t.fixed && !((ie = r[i + 1]) != null && ie.fixed) ? "1px solid #E8E8E8" : "none",
1226
- zIndex: t.fixed ? 2 : "auto",
1227
- backgroundColor: D,
1228
- cursor: $,
1229
- ...H,
1230
- ...t.style
609
+ position: e.fixed ? "sticky" : "static",
610
+ top: y && typeof y == "number" ? y : 0,
611
+ left: b,
612
+ borderRight: e.fixed && !((ne = i[t + 1]) != null && ne.fixed) ? "1px solid #E8E8E8" : "none",
613
+ zIndex: e.fixed ? 2 : "auto",
614
+ backgroundColor: Z,
615
+ cursor: I,
616
+ ...R,
617
+ ...e.style
1231
618
  },
1232
- children: /* @__PURE__ */ l.jsxs(
619
+ children: /* @__PURE__ */ ge(
1233
620
  "div",
1234
621
  {
1235
622
  className: `
1236
623
  radar-table__header-cell-wrapper
1237
- ${W ? W + "__header-cell-wrapper" : ""}
624
+ ${X ? X + "__header-cell-wrapper" : ""}
1238
625
  ${re || ""}
1239
626
  `,
1240
- style: J,
627
+ style: ee,
1241
628
  children: [
1242
- w && /* @__PURE__ */ l.jsx(
629
+ s && /* @__PURE__ */ n(
1243
630
  "div",
1244
631
  {
1245
- className: `radar-table__drag-handle ${U ? "dragging" : ""} ${p ? "" : "group-drag-handle"}`,
1246
- ...M,
1247
- ...G,
1248
- style: { cursor: U ? "grabbing" : "grab" },
1249
- children: /* @__PURE__ */ l.jsxs("svg", { width: "8", height: "10", viewBox: "0 0 16 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1250
- /* @__PURE__ */ l.jsx("path", { d: "M2 2.62268e-07C3.10457 4.07115e-07 4 0.89543 4 2C4 3.10457 3.10457 4 2 4C0.895433 4 2.21557e-06 3.10457 2.36042e-06 2C2.50526e-06 0.89543 0.895433 1.17422e-07 2 2.62268e-07Z", fill: "#999999" }),
1251
- /* @__PURE__ */ l.jsx("path", { d: "M14 16C15.1046 16 16 16.8954 16 18C16 19.1046 15.1046 20 14 20C12.8954 20 12 19.1046 12 18C12 16.8954 12.8954 16 14 16Z", fill: "#999999" }),
1252
- /* @__PURE__ */ l.jsx("path", { d: "M2 16C3.10457 16 4 16.8954 4 18C4 19.1046 3.10457 20 2 20C0.895432 20 2.21557e-06 19.1046 2.36042e-06 18C2.50526e-06 16.8954 0.895433 16 2 16Z", fill: "#999999" }),
1253
- /* @__PURE__ */ l.jsx("path", { d: "M14 8C15.1046 8 16 8.89543 16 10C16 11.1046 15.1046 12 14 12C12.8954 12 12 11.1046 12 10C12 8.89543 12.8954 8 14 8Z", fill: "#999999" }),
1254
- /* @__PURE__ */ l.jsx("path", { d: "M2 8C3.10457 8 4 8.89543 4 10C4 11.1046 3.10457 12 2 12C0.895433 12 2.21557e-06 11.1046 2.36042e-06 10C2.50526e-06 8.89543 0.895433 8 2 8Z", fill: "#999999" }),
1255
- /* @__PURE__ */ l.jsx("path", { d: "M14 -7.14702e-08C15.1046 7.33766e-08 16 0.89543 16 2C16 3.10457 15.1046 4 14 4C12.8954 4 12 3.10457 12 2C12 0.895429 12.8954 -2.16317e-07 14 -7.14702e-08Z", fill: "#999999" })
632
+ className: `radar-table__drag-handle ${E ? "dragging" : ""} ${a ? "" : "group-drag-handle"}`,
633
+ ...H,
634
+ ...P,
635
+ style: { cursor: E ? "grabbing" : "grab" },
636
+ children: /* @__PURE__ */ ge("svg", { width: "8", height: "10", viewBox: "0 0 16 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
637
+ /* @__PURE__ */ n("path", { d: "M2 2.62268e-07C3.10457 4.07115e-07 4 0.89543 4 2C4 3.10457 3.10457 4 2 4C0.895433 4 2.21557e-06 3.10457 2.36042e-06 2C2.50526e-06 0.89543 0.895433 1.17422e-07 2 2.62268e-07Z", fill: "#999999" }),
638
+ /* @__PURE__ */ n("path", { d: "M14 16C15.1046 16 16 16.8954 16 18C16 19.1046 15.1046 20 14 20C12.8954 20 12 19.1046 12 18C12 16.8954 12.8954 16 14 16Z", fill: "#999999" }),
639
+ /* @__PURE__ */ n("path", { d: "M2 16C3.10457 16 4 16.8954 4 18C4 19.1046 3.10457 20 2 20C0.895432 20 2.21557e-06 19.1046 2.36042e-06 18C2.50526e-06 16.8954 0.895433 16 2 16Z", fill: "#999999" }),
640
+ /* @__PURE__ */ n("path", { d: "M14 8C15.1046 8 16 8.89543 16 10C16 11.1046 15.1046 12 14 12C12.8954 12 12 11.1046 12 10C12 8.89543 12.8954 8 14 8Z", fill: "#999999" }),
641
+ /* @__PURE__ */ n("path", { d: "M2 8C3.10457 8 4 8.89543 4 10C4 11.1046 3.10457 12 2 12C0.895433 12 2.21557e-06 11.1046 2.36042e-06 10C2.50526e-06 8.89543 0.895433 8 2 8Z", fill: "#999999" }),
642
+ /* @__PURE__ */ n("path", { d: "M14 -7.14702e-08C15.1046 7.33766e-08 16 0.89543 16 2C16 3.10457 15.1046 4 14 4C12.8954 4 12 3.10457 12 2C12 0.895429 12.8954 -2.16317e-07 14 -7.14702e-08Z", fill: "#999999" })
1256
643
  ] })
1257
644
  }
1258
645
  ),
1259
- /* @__PURE__ */ l.jsx("div", { className: "radar-table__header-cell-text-wrapper", children: /* @__PURE__ */ l.jsx(
646
+ /* @__PURE__ */ n("div", { className: "radar-table__header-cell-text-wrapper", children: /* @__PURE__ */ n(
1260
647
  "span",
1261
648
  {
1262
- title: t.title,
649
+ title: e.title,
1263
650
  onClick: () => {
1264
- const { sort_field: q, sort_order: ne } = s;
1265
- let L = {
1266
- columnKey: t.key,
651
+ const { sort_field: N, sort_order: O } = F;
652
+ let D = {
653
+ columnKey: e.key,
1267
654
  direction: "ASC"
1268
655
  };
1269
- q === t.key ? ne === "ASC" ? L.direction = "DESC" : ne === "DESC" && (L.columnKey = void 0, L.direction = void 0) : (L.columnKey = t.key, L.direction = "ASC"), o(L.columnKey, L.direction);
656
+ N === e.key ? O === "ASC" ? D.direction = "DESC" : O === "DESC" && (D.columnKey = void 0, D.direction = void 0) : (D.columnKey = e.key, D.direction = "ASC"), _(D.columnKey, D.direction);
1270
657
  },
1271
658
  style: {
1272
- cursor: t.sortable ? "pointer" : "default",
659
+ cursor: e.sortable ? "pointer" : "default",
1273
660
  userSelect: "none"
1274
661
  },
1275
- children: t.title
662
+ children: e.title
1276
663
  }
1277
664
  ) }),
1278
- t.sortable && !h && p && /* @__PURE__ */ l.jsxs("div", { className: "radar-table__sort-button-wrapper", children: [
1279
- /* @__PURE__ */ l.jsx(
665
+ e.sortable && !j && a && /* @__PURE__ */ ge("div", { className: "radar-table__sort-button-wrapper", children: [
666
+ /* @__PURE__ */ n(
1280
667
  "button",
1281
668
  {
1282
669
  className: "radar-table__sort-button",
1283
- onClick: (q) => o(t.key, "ASC"),
1284
- title: `Сортировать по ${t.title}`,
1285
- children: /* @__PURE__ */ l.jsx("svg", { width: "12", height: "7", viewBox: "0 0 12 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: 12, height: 7 }, children: /* @__PURE__ */ l.jsx("path", { fill: ee, d: "M4.99264 0.21967C5.28553 -0.0732233 5.76041 -0.0732233 6.0533 0.21967L10.8263 4.99264C11.1192 5.28553 11.1192 5.76041 10.8263 6.0533C10.5334 6.34619 10.0585 6.34619 9.76561 6.0533L6.27297 2.56066L5.5 1.78769L4.77297 2.56066L1.28033 6.0533C0.987437 6.34619 0.512563 6.34619 0.21967 6.0533C-0.0732234 5.76041 -0.0732234 5.28553 0.21967 4.99264L4.99264 0.21967Z" }) })
670
+ onClick: (N) => _(e.key, "ASC"),
671
+ title: `Сортировать по ${e.title}`,
672
+ children: /* @__PURE__ */ n("svg", { width: "12", height: "7", viewBox: "0 0 12 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: 12, height: 7 }, children: /* @__PURE__ */ n("path", { fill: te, d: "M4.99264 0.21967C5.28553 -0.0732233 5.76041 -0.0732233 6.0533 0.21967L10.8263 4.99264C11.1192 5.28553 11.1192 5.76041 10.8263 6.0533C10.5334 6.34619 10.0585 6.34619 9.76561 6.0533L6.27297 2.56066L5.5 1.78769L4.77297 2.56066L1.28033 6.0533C0.987437 6.34619 0.512563 6.34619 0.21967 6.0533C-0.0732234 5.76041 -0.0732234 5.28553 0.21967 4.99264L4.99264 0.21967Z" }) })
1286
673
  }
1287
674
  ),
1288
- /* @__PURE__ */ l.jsx(
675
+ /* @__PURE__ */ n(
1289
676
  "button",
1290
677
  {
1291
678
  className: "radar-table__sort-button",
1292
- onClick: (q) => o(t.key, "DESC"),
1293
- title: `Сортировать по ${t.title}`,
1294
- children: /* @__PURE__ */ l.jsx("svg", { width: "12", height: "7", viewBox: "0 0 12 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: 12, height: 7 }, children: /* @__PURE__ */ l.jsx("path", { fill: fe, d: "M4.99264 6.78033C5.28553 7.07322 5.76041 7.07322 6.0533 6.78033L10.8263 2.00736C11.1192 1.71447 11.1192 1.23959 10.8263 0.946699C10.5334 0.653806 10.0585 0.653806 9.76561 0.946699L6.27297 4.43934L5.5 5.21231L4.77297 4.43934L1.28033 0.946699C0.987437 0.653806 0.512563 0.653806 0.21967 0.946699C-0.0732234 1.23959 -0.0732234 1.71447 0.21967 2.00736L4.99264 6.78033Z" }) })
679
+ onClick: (N) => _(e.key, "DESC"),
680
+ title: `Сортировать по ${e.title}`,
681
+ children: /* @__PURE__ */ n("svg", { width: "12", height: "7", viewBox: "0 0 12 7", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: { width: 12, height: 7 }, children: /* @__PURE__ */ n("path", { fill: ae, d: "M4.99264 6.78033C5.28553 7.07322 5.76041 7.07322 6.0533 6.78033L10.8263 2.00736C11.1192 1.71447 11.1192 1.23959 10.8263 0.946699C10.5334 0.653806 10.0585 0.653806 9.76561 0.946699L6.27297 4.43934L5.5 5.21231L4.77297 4.43934L1.28033 0.946699C0.987437 0.653806 0.512563 0.653806 0.21967 0.946699C-0.0732234 1.23959 -0.0732234 1.71447 0.21967 2.00736L4.99264 6.78033Z" }) })
1295
682
  }
1296
683
  )
1297
684
  ] }),
1298
- t.sortable && h && p && h(s.sort_field, s.sort_order),
1299
- t.tooltipText && /* @__PURE__ */ l.jsx(Yt, { text: t.tooltipText, containerRef: Q, children: t.tooltipIcon }),
1300
- k && p && /* @__PURE__ */ l.jsx(
1301
- Ut,
685
+ e.sortable && j && a && j(F.sort_field, F.sort_order),
686
+ e.tooltipText && /* @__PURE__ */ n(rt, { text: e.tooltipText, containerRef: K, children: e.tooltipIcon }),
687
+ M && a && /* @__PURE__ */ n(
688
+ tt,
1302
689
  {
1303
- column: t,
1304
- currWidth: le,
1305
- currMinWidth: A,
1306
- onResize: a,
1307
- scrollContainerRef: Q,
1308
- onResizeStart: c,
1309
- onResizeFrame: f,
1310
- onResizeEnd: _
690
+ column: e,
691
+ currWidth: C,
692
+ currMinWidth: k,
693
+ onResize: v,
694
+ scrollContainerRef: K,
695
+ onResizeStart: q,
696
+ onResizeFrame: B,
697
+ onResizeEnd: z,
698
+ resizeMode: c
1311
699
  }
1312
700
  )
1313
701
  ]
@@ -1316,990 +704,443 @@ function Qt({
1316
704
  }
1317
705
  );
1318
706
  }
1319
- function ct({
1320
- config: t,
1321
- fullConfig: i,
1322
- onSort: r,
1323
- onResize: n,
1324
- onResizeStart: s,
1325
- onResizeFrame: o,
1326
- onResizeEnd: a,
1327
- onColumnReorder: c,
1328
- sortIcon: f,
1329
- resizeable: _,
1330
- draggableColumns: h,
1331
- preset: k,
1332
- headerClassName: V,
1333
- headerStyle: W,
1334
- headerRowClassName: P,
1335
- headerRowStyle: H,
707
+ function Te({
708
+ config: e,
709
+ fullConfig: t,
710
+ onSort: i,
711
+ onResize: h,
712
+ onResizeStart: F,
713
+ onResizeFrame: _,
714
+ onResizeEnd: v,
715
+ onColumnReorder: q,
716
+ sortIcon: B,
717
+ resizeable: z,
718
+ draggableColumns: j,
719
+ preset: M,
720
+ headerClassName: ie,
721
+ headerStyle: X,
722
+ headerRowClassName: Q,
723
+ headerRowStyle: R,
1336
724
  headerCellClassName: re,
1337
- headerCellStyle: J,
1338
- headerCellWrapperClassName: g,
1339
- headerCellWrapperStyle: Q,
1340
- stickyHeader: E,
1341
- scrollContainerRef: N,
1342
- sorting: ae,
1343
- defaultSorting: p,
1344
- resizeThrottle: w
725
+ headerCellStyle: ee,
726
+ headerCellWrapperClassName: y,
727
+ headerCellWrapperStyle: K,
728
+ stickyHeader: L,
729
+ scrollContainerRef: c,
730
+ sorting: G,
731
+ defaultSorting: o,
732
+ resizeThrottle: a,
733
+ resizeMode: s
1345
734
  }) {
1346
- const [y, b] = we(() => p || { sort_field: void 0, sort_order: void 0 }), [m, j] = we(t), R = ae !== void 0, M = R ? ae : y;
1347
- Ie(() => {
1348
- !R && p && b(p);
1349
- }, [p, R]);
1350
- const G = ue((F, U) => {
1351
- const { sort_field: te, sort_order: I } = M;
1352
- let z = {
1353
- sort_field: F,
1354
- sort_order: U
735
+ const [g, l] = ue(() => o || { sort_field: void 0, sort_order: void 0 }), [d, S] = ue(e), J = G !== void 0, H = J ? G : g;
736
+ _e(() => {
737
+ !J && o && l(o);
738
+ }, [o, J]);
739
+ const P = Y((W, E) => {
740
+ const { sort_field: U, sort_order: m } = H;
741
+ let V = {
742
+ sort_field: W,
743
+ sort_order: E
1355
744
  };
1356
- te === F && I === U && (z = {
745
+ U === W && m === E && (V = {
1357
746
  sort_field: void 0,
1358
747
  sort_order: void 0
1359
- }), R || b(z), r == null || r(z.sort_field, z.sort_order);
1360
- }, [M, r, R]);
1361
- return Ie(() => {
1362
- if (t.some((F) => F.children || !_)) {
1363
- j(t);
748
+ }), J || l(V), i == null || i(V.sort_field, V.sort_order);
749
+ }, [H, i, J]);
750
+ return _e(() => {
751
+ if (e.some((W) => W.children || !z)) {
752
+ S(e);
1364
753
  return;
1365
754
  } else {
1366
- const F = () => {
1367
- const U = N == null ? void 0 : N.current;
1368
- if (!U) return;
1369
- const te = U.clientWidth, I = t.reduce((K, $) => K + (($ == null ? void 0 : $.width) ?? 0), 0);
1370
- if (I > te) {
1371
- j(t);
755
+ const W = () => {
756
+ const E = c == null ? void 0 : c.current;
757
+ if (!E) return;
758
+ const U = E.clientWidth, m = e.reduce((p, I) => p + ((I == null ? void 0 : I.width) ?? 0), 0);
759
+ if (m > U) {
760
+ S(e);
1372
761
  return;
1373
762
  }
1374
- const z = t.map((K) => {
1375
- const $ = ((K == null ? void 0 : K.width) ?? 0) / I, le = Math.floor(te * $);
1376
- return K.width = Math.round(le), K.maxWidth = le * 2, K;
763
+ const V = e.map((p) => {
764
+ const I = ((p == null ? void 0 : p.width) ?? 0) / m, C = Math.floor(U * I);
765
+ return p.width = Math.round(C), p.maxWidth = C * 2, p;
1377
766
  });
1378
- j([...z]), requestAnimationFrame(() => {
1379
- const K = (S) => {
1380
- var C;
1381
- return typeof window < "u" && ((C = window.CSS) != null && C.escape) ? window.CSS.escape(S) : S.replace(/([#.;?\[\]\s])/g, "\\$1");
1382
- }, $ = U.querySelector("table");
1383
- if (!$) return;
1384
- z.forEach((S) => {
1385
- if (S.hidden) return;
1386
- const C = K(S.key), X = S.width || S.minWidth || 200, D = $.querySelector(`th[data-column-key="${C}"]`);
1387
- D && (D.style.width = `${X}px`, D.style.minWidth = `${X}px`), $.querySelectorAll(`td[data-column-key="${C}"]`).forEach((fe) => {
1388
- const ie = fe;
1389
- ie.style.width = `${X}px`, ie.style.minWidth = `${X}px`;
767
+ S([...V]), requestAnimationFrame(() => {
768
+ const p = (b) => {
769
+ var x;
770
+ return typeof window < "u" && ((x = window.CSS) != null && x.escape) ? window.CSS.escape(b) : b.replace(/([#.;?\[\]\s])/g, "\\$1");
771
+ }, I = E.querySelector("table");
772
+ if (!I) return;
773
+ V.forEach((b) => {
774
+ if (b.hidden) return;
775
+ const x = p(b.key), $ = b.width || b.minWidth || 200, Z = I.querySelector(`th[data-column-key="${x}"]`);
776
+ Z && (Z.style.width = `${$}px`, Z.style.minWidth = `${$}px`), I.querySelectorAll(`td[data-column-key="${x}"]`).forEach((ae) => {
777
+ const ne = ae;
778
+ ne.style.width = `${$}px`, ne.style.minWidth = `${$}px`;
1390
779
  });
1391
780
  });
1392
- const le = (S) => window.getComputedStyle(S).position === "sticky", O = Array.from(
1393
- $.querySelectorAll("th.radar-table__header-cell.leaf-header")
1394
- ).filter((S) => le(S));
1395
- if (O.length > 0) {
1396
- let S = 0;
1397
- O.forEach((C, X) => {
1398
- if (X === 0) {
1399
- const ee = C.getAttribute("data-column-key"), fe = z.find((ie) => ie.key === ee);
1400
- S = (fe == null ? void 0 : fe.fixedLeft) || 0, C.style.left = `${S}px`;
781
+ const C = (b) => window.getComputedStyle(b).position === "sticky", w = Array.from(
782
+ I.querySelectorAll("th.radar-table__header-cell.leaf-header")
783
+ ).filter((b) => C(b));
784
+ if (w.length > 0) {
785
+ let b = 0;
786
+ w.forEach((x, $) => {
787
+ if ($ === 0) {
788
+ const te = x.getAttribute("data-column-key"), ae = V.find((ne) => ne.key === te);
789
+ b = (ae == null ? void 0 : ae.fixedLeft) || 0, x.style.left = `${b}px`;
1401
790
  } else {
1402
- const ee = O[X - 1].getBoundingClientRect().width;
1403
- S += Math.floor(ee), C.style.left = `${S}px`;
791
+ const te = w[$ - 1].getBoundingClientRect().width;
792
+ b += Math.floor(te), x.style.left = `${b}px`;
1404
793
  }
1405
- const D = C.getAttribute("data-column-key");
1406
- if (D) {
1407
- const ee = K(D);
1408
- $.querySelectorAll(`td[data-column-key="${ee}"]`).forEach((ie) => {
1409
- const q = ie;
1410
- window.getComputedStyle(q).position === "sticky" && (q.style.left = `${C.style.left}`);
794
+ const Z = x.getAttribute("data-column-key");
795
+ if (Z) {
796
+ const te = p(Z);
797
+ I.querySelectorAll(`td[data-column-key="${te}"]`).forEach((ne) => {
798
+ const N = ne;
799
+ window.getComputedStyle(N).position === "sticky" && (N.style.left = `${x.style.left}`);
1411
800
  });
1412
801
  }
1413
802
  });
1414
803
  }
1415
804
  });
1416
805
  };
1417
- return F(), window.addEventListener("resize", F), () => window.removeEventListener("resize", F);
806
+ return W(), window.addEventListener("resize", W), () => window.removeEventListener("resize", W);
1418
807
  }
1419
- }, [t, N, _]), /* @__PURE__ */ l.jsx(
808
+ }, [e, c, z]), /* @__PURE__ */ n(
1420
809
  "tr",
1421
810
  {
1422
- className: `radar-table__header-row ${k ? k + "__header-row" : ""} ${P || ""}`,
1423
- style: H,
1424
- children: m == null ? void 0 : m.map((F, U) => /* @__PURE__ */ l.jsx(
1425
- Qt,
811
+ className: `radar-table__header-row ${M ? M + "__header-row" : ""} ${Q || ""}`,
812
+ style: R,
813
+ children: d == null ? void 0 : d.map((W, E) => /* @__PURE__ */ n(
814
+ ot,
1426
815
  {
1427
- column: F,
1428
- index: U,
1429
- config: t,
1430
- fullConfig: i,
1431
- sorting: M,
1432
- onSort: G,
1433
- onResize: n,
1434
- onResizeStart: s,
1435
- onResizeFrame: o,
1436
- onResizeEnd: a,
1437
- sortIcon: f,
1438
- resizeable: _,
1439
- draggableColumns: h,
1440
- preset: k,
816
+ column: W,
817
+ index: E,
818
+ config: e,
819
+ fullConfig: t,
820
+ sorting: H,
821
+ onSort: P,
822
+ onResize: h,
823
+ onResizeStart: F,
824
+ onResizeFrame: _,
825
+ onResizeEnd: v,
826
+ sortIcon: B,
827
+ resizeable: z,
828
+ draggableColumns: j,
829
+ preset: M,
1441
830
  headerCellClassName: re,
1442
- headerCellStyle: J,
1443
- headerCellWrapperClassName: g,
1444
- headerCellWrapperStyle: Q,
1445
- stickyHeader: E,
1446
- scrollContainerRef: N,
1447
- resizeThrottle: w
831
+ headerCellStyle: ee,
832
+ headerCellWrapperClassName: y,
833
+ headerCellWrapperStyle: K,
834
+ stickyHeader: L,
835
+ scrollContainerRef: c,
836
+ resizeThrottle: a,
837
+ resizeMode: s
1448
838
  },
1449
- F.key
839
+ W.key
1450
840
  ))
1451
841
  }
1452
842
  );
1453
843
  }
1454
- function er(t) {
844
+ function lt(e) {
1455
845
  const {
1456
- config: i,
1457
- preset: r,
1458
- headerClassName: n,
1459
- headerStyle: s,
1460
- stickyHeader: o,
1461
- headerRowClassName: a,
1462
- headerRowStyle: c,
1463
- headerCellClassName: f,
1464
- headerCellStyle: _,
1465
- headerCellWrapperClassName: h,
1466
- headerCellWrapperStyle: k,
1467
- onResize: V,
1468
- onColumnReorder: W,
1469
- sorting: P,
1470
- defaultSorting: H
1471
- } = t, re = i.some((E) => E.children && E.children.length > 0), J = Ye(() => {
846
+ config: t,
847
+ preset: i,
848
+ headerClassName: h,
849
+ headerStyle: F,
850
+ stickyHeader: _,
851
+ headerRowClassName: v,
852
+ headerRowStyle: q,
853
+ headerCellClassName: B,
854
+ headerCellStyle: z,
855
+ headerCellWrapperClassName: j,
856
+ headerCellWrapperStyle: M,
857
+ onResize: ie,
858
+ onColumnReorder: X,
859
+ sorting: Q,
860
+ defaultSorting: R
861
+ } = e, re = t.some((L) => L.children && L.children.length > 0), ee = ke(() => {
1472
862
  if (!re)
1473
863
  return null;
1474
- const E = {}, N = (ae, p = 0) => {
1475
- E[p] || (E[p] = []), ae.forEach((w) => {
1476
- w.hidden || (E[p].push(w), w.children && w.children.length > 0 && N(w.children, p + 1));
864
+ const L = {}, c = (G, o = 0) => {
865
+ L[o] || (L[o] = []), G.forEach((a) => {
866
+ a.hidden || (L[o].push(a), a.children && a.children.length > 0 && c(a.children, o + 1));
1477
867
  });
1478
868
  };
1479
- return N(i), E;
1480
- }, [i, re]), g = ue((E, N) => {
1481
- if (!V) return;
1482
- const ae = (y, b) => {
1483
- for (const m of y) {
1484
- if (m.key === b) return m;
1485
- if (m.children) {
1486
- const j = ae(m.children, b);
1487
- if (j) return j;
869
+ return c(t), L;
870
+ }, [t, re]), y = Y((L, c) => {
871
+ if (!ie) return;
872
+ const G = (s, g) => {
873
+ for (const l of s) {
874
+ if (l.key === g) return l;
875
+ if (l.children) {
876
+ const d = G(l.children, g);
877
+ if (d) return d;
1488
878
  }
1489
879
  }
1490
880
  return null;
1491
- }, p = (y) => {
1492
- if (!y.children || y.children.length === 0)
1493
- return [y];
1494
- const b = [];
1495
- return y.children.forEach((m) => {
1496
- m.hidden || b.push(...p(m));
1497
- }), b;
1498
- }, w = ae(i, E);
1499
- if (w)
1500
- if (w.children && w.children.length > 0) {
1501
- const y = p(w);
1502
- if (y.length > 0) {
1503
- const b = y.reduce((j, R) => j + (R.width || R.minWidth || 200), 0), m = N / b;
1504
- y.forEach((j) => {
1505
- const R = Math.max(50, Math.round((j.width || j.minWidth || 200) * m));
1506
- V(j.key, R);
881
+ }, o = (s) => {
882
+ if (!s.children || s.children.length === 0)
883
+ return [s];
884
+ const g = [];
885
+ return s.children.forEach((l) => {
886
+ l.hidden || g.push(...o(l));
887
+ }), g;
888
+ }, a = G(t, L);
889
+ if (a)
890
+ if (a.children && a.children.length > 0) {
891
+ const s = o(a);
892
+ if (s.length > 0) {
893
+ const g = s.reduce((d, S) => d + (S.width || S.minWidth || 200), 0), l = c / g;
894
+ s.forEach((d) => {
895
+ const S = Math.max(50, Math.round((d.width || d.minWidth || 200) * l));
896
+ ie(d.key, S);
1507
897
  });
1508
898
  }
1509
899
  } else
1510
- V(E, N);
1511
- }, [i, V]), Q = ue((E) => {
1512
- if (!W) return;
900
+ ie(L, c);
901
+ }, [t, ie]), K = Y((L) => {
902
+ if (!X) return;
1513
903
  if (!re) {
1514
- W(E);
904
+ X(L);
1515
905
  return;
1516
906
  }
1517
- const N = (A, O, S = [], C = null) => {
1518
- for (let X = 0; X < A.length; X++) {
1519
- const D = A[X], ee = [...S, X];
1520
- if (D.key === O)
907
+ const c = (C, k, w = [], b = null) => {
908
+ for (let x = 0; x < C.length; x++) {
909
+ const $ = C[x], Z = [...w, x];
910
+ if ($.key === k)
1521
911
  return {
1522
- column: D,
1523
- parent: C,
1524
- path: ee,
1525
- level: S.length
912
+ column: $,
913
+ parent: b,
914
+ path: Z,
915
+ level: w.length
1526
916
  };
1527
- if (D.children && D.children.length > 0) {
1528
- const fe = N(D.children, O, ee, D);
1529
- if (fe)
1530
- return fe;
917
+ if ($.children && $.children.length > 0) {
918
+ const te = c($.children, k, Z, $);
919
+ if (te)
920
+ return te;
1531
921
  }
1532
922
  }
1533
923
  return null;
1534
924
  };
1535
- if (!Object.values(J).find((A) => {
1536
- if (A.length !== E.length) return !1;
1537
- const O = A.map((C) => C.key).sort(), S = E.map((C) => C.key).sort();
1538
- return JSON.stringify(O) === JSON.stringify(S);
925
+ if (!Object.values(ee).find((C) => {
926
+ if (C.length !== L.length) return !1;
927
+ const k = C.map((b) => b.key).sort(), w = L.map((b) => b.key).sort();
928
+ return JSON.stringify(k) === JSON.stringify(w);
1539
929
  }))
1540
930
  return;
1541
- const p = E._dragInfo;
1542
- if (!(p != null && p.draggedKey) || !(p != null && p.targetKey))
931
+ const o = L._dragInfo;
932
+ if (!(o != null && o.draggedKey) || !(o != null && o.targetKey))
1543
933
  return;
1544
- const { draggedKey: w, targetKey: y } = p, b = N(i, w), m = N(i, y);
1545
- if (!b || !m) return;
1546
- const { column: j, parent: R, path: M, level: G } = b, { column: F, parent: U, path: te, level: I } = m, z = (A, O) => A.fixed || (O == null ? void 0 : O.fixed) || !1, K = z(j, R), $ = z(F, U);
1547
- if (G !== I || R !== U || R && U && R.key !== U.key || K !== $)
934
+ const { draggedKey: a, targetKey: s } = o, g = c(t, a), l = c(t, s);
935
+ if (!g || !l) return;
936
+ const { column: d, parent: S, path: J, level: H } = g, { column: P, parent: W, path: E, level: U } = l, m = (C, k) => C.fixed || (k == null ? void 0 : k.fixed) || !1, V = m(d, S), p = m(P, W);
937
+ if (H !== U || S !== W || S && W && S.key !== W.key || V !== p)
1548
938
  return;
1549
- const le = JSON.parse(JSON.stringify(i));
1550
- if (G === 0) {
1551
- const A = M[0], O = te[0], [S] = le.splice(A, 1);
1552
- le.splice(O, 0, S);
939
+ const I = JSON.parse(JSON.stringify(t));
940
+ if (H === 0) {
941
+ const C = J[0], k = E[0], [w] = I.splice(C, 1);
942
+ I.splice(k, 0, w);
1553
943
  } else {
1554
- const A = M.slice(0, -1);
1555
- let O = le;
1556
- for (let D = 0; D < A.length; D++)
1557
- D === 0 ? O = O[A[D]] : O = O.children[A[D]];
1558
- if (!O || !O.children)
944
+ const C = J.slice(0, -1);
945
+ let k = I;
946
+ for (let $ = 0; $ < C.length; $++)
947
+ $ === 0 ? k = k[C[$]] : k = k.children[C[$]];
948
+ if (!k || !k.children)
1559
949
  return;
1560
- const S = M[M.length - 1], C = te[te.length - 1];
1561
- if (S < 0 || S >= O.children.length || C < 0 || C >= O.children.length)
950
+ const w = J[J.length - 1], b = E[E.length - 1];
951
+ if (w < 0 || w >= k.children.length || b < 0 || b >= k.children.length)
1562
952
  return;
1563
- const [X] = O.children.splice(S, 1);
1564
- O.children.splice(C, 0, X);
953
+ const [x] = k.children.splice(w, 1);
954
+ k.children.splice(b, 0, x);
1565
955
  }
1566
- W(le);
1567
- }, [i, W, J]);
1568
- return re ? /* @__PURE__ */ l.jsx(
956
+ X(I);
957
+ }, [t, X, ee]);
958
+ return re ? /* @__PURE__ */ n(
1569
959
  "thead",
1570
960
  {
1571
- className: `radar-table__header ${r ? r + "__header" : ""} ${n}`,
961
+ className: `radar-table__header ${i ? i + "__header" : ""} ${h}`,
1572
962
  style: {
1573
- position: o ? "sticky" : "static",
1574
- top: o && typeof o == "number" ? o : 0,
1575
- ...s
963
+ position: _ ? "sticky" : "static",
964
+ top: _ && typeof _ == "number" ? _ : 0,
965
+ ...F
1576
966
  },
1577
- children: Object.keys(J).map((E) => {
1578
- const N = J[parseInt(E)], ae = parseInt(E);
1579
- return /* @__PURE__ */ l.jsx(
1580
- ct,
967
+ children: Object.keys(ee).map((L) => {
968
+ const c = ee[parseInt(L)], G = parseInt(L);
969
+ return /* @__PURE__ */ n(
970
+ Te,
1581
971
  {
1582
- config: N,
1583
- fullConfig: i,
1584
- onSort: t.onSort,
1585
- onResize: g,
1586
- onResizeStart: t.onResizeStart,
1587
- onResizeFrame: t.onResizeFrame,
1588
- onResizeEnd: t.onResizeEnd,
1589
- onColumnReorder: Q,
1590
- resizeable: t.resizeable,
1591
- draggableColumns: t.draggableColumns,
1592
- preset: r,
1593
- headerClassName: n,
1594
- headerStyle: s,
1595
- headerRowClassName: a,
972
+ config: c,
973
+ fullConfig: t,
974
+ onSort: e.onSort,
975
+ onResize: y,
976
+ onResizeStart: e.onResizeStart,
977
+ onResizeFrame: e.onResizeFrame,
978
+ onResizeEnd: e.onResizeEnd,
979
+ onColumnReorder: K,
980
+ resizeable: e.resizeable,
981
+ draggableColumns: e.draggableColumns,
982
+ preset: i,
983
+ headerClassName: h,
984
+ headerStyle: F,
985
+ headerRowClassName: v,
1596
986
  headerRowStyle: {
1597
- ...c,
1598
- position: o ? "sticky" : "static",
1599
- top: o && typeof o == "number" ? o + (ae - 1) * 50 : 0
987
+ ...q,
988
+ position: _ ? "sticky" : "static",
989
+ top: _ && typeof _ == "number" ? _ + (G - 1) * 50 : 0
1600
990
  },
1601
- headerCellClassName: f,
1602
- headerCellStyle: _,
1603
- headerCellWrapperClassName: h,
1604
- headerCellWrapperStyle: k,
1605
- stickyHeader: o,
1606
- sortIcon: t.sortIcon,
1607
- scrollContainerRef: t.scrollContainerRef,
1608
- sorting: P,
1609
- defaultSorting: H,
1610
- resizeThrottle: t.resizeThrottle
991
+ headerCellClassName: B,
992
+ headerCellStyle: z,
993
+ headerCellWrapperClassName: j,
994
+ headerCellWrapperStyle: M,
995
+ stickyHeader: _,
996
+ sortIcon: e.sortIcon,
997
+ scrollContainerRef: e.scrollContainerRef,
998
+ sorting: Q,
999
+ defaultSorting: R,
1000
+ resizeThrottle: e.resizeThrottle,
1001
+ resizeMode: e.resizeMode
1611
1002
  },
1612
- E
1003
+ L
1613
1004
  );
1614
1005
  })
1615
1006
  }
1616
- ) : /* @__PURE__ */ l.jsx(
1007
+ ) : /* @__PURE__ */ n(
1617
1008
  "thead",
1618
1009
  {
1619
- className: `radar-table__header ${r ? r + "__header" : ""} ${n}`,
1010
+ className: `radar-table__header ${i ? i + "__header" : ""} ${h}`,
1620
1011
  style: {
1621
- position: o ? "sticky" : "static",
1622
- top: o && typeof o == "number" ? o : 0,
1623
- ...s
1012
+ position: _ ? "sticky" : "static",
1013
+ top: _ && typeof _ == "number" ? _ : 0,
1014
+ ...F
1624
1015
  },
1625
- children: /* @__PURE__ */ l.jsx(ct, { ...t, fullConfig: i, onResize: g, onResizeStart: t.onResizeStart, onResizeFrame: t.onResizeFrame, onResizeEnd: t.onResizeEnd, onColumnReorder: Q, scrollContainerRef: t.scrollContainerRef, sorting: P, defaultSorting: H, resizeThrottle: t.resizeThrottle })
1016
+ children: /* @__PURE__ */ n(Te, { ...e, fullConfig: t, onResize: y, onResizeStart: e.onResizeStart, onResizeFrame: e.onResizeFrame, onResizeEnd: e.onResizeEnd, onColumnReorder: K, scrollContainerRef: e.scrollContainerRef, sorting: Q, defaultSorting: R, resizeThrottle: e.resizeThrottle, resizeMode: e.resizeMode })
1626
1017
  }
1627
1018
  );
1628
1019
  }
1629
- const tr = (t, i) => {
1630
- let r = "0";
1631
- if (t != null) {
1632
- const n = parseFloat(t);
1633
- if (Number.isNaN(n))
1634
- return i && (r += ` ${i}`), r;
1635
- r = n.toLocaleString("ru-RU", {
1020
+ const dt = (e, t) => {
1021
+ let i = "0";
1022
+ if (e != null) {
1023
+ const h = parseFloat(e);
1024
+ if (Number.isNaN(h))
1025
+ return t && (i += ` ${t}`), i;
1026
+ i = h.toLocaleString("ru-RU", {
1636
1027
  maximumFractionDigits: 2
1637
- }), i && (r += ` ${i}`);
1638
- }
1639
- return r;
1640
- };
1641
- function Ae(t, i, r) {
1642
- let n = r.initialDeps ?? [], s;
1643
- function o() {
1644
- var a, c, f, _;
1645
- let h;
1646
- r.key && ((a = r.debug) != null && a.call(r)) && (h = Date.now());
1647
- const k = t();
1648
- if (!(k.length !== n.length || k.some((P, H) => n[H] !== P)))
1649
- return s;
1650
- n = k;
1651
- let W;
1652
- if (r.key && ((c = r.debug) != null && c.call(r)) && (W = Date.now()), s = i(...k), r.key && ((f = r.debug) != null && f.call(r))) {
1653
- const P = Math.round((Date.now() - h) * 100) / 100, H = Math.round((Date.now() - W) * 100) / 100, re = H / 16, J = (g, Q) => {
1654
- for (g = String(g); g.length < Q; )
1655
- g = " " + g;
1656
- return g;
1657
- };
1658
- console.info(
1659
- `%c⏱ ${J(H, 5)} /${J(P, 5)} ms`,
1660
- `
1661
- font-size: .6rem;
1662
- font-weight: bold;
1663
- color: hsl(${Math.max(
1664
- 0,
1665
- Math.min(120 - 120 * re, 120)
1666
- )}deg 100% 31%);`,
1667
- r == null ? void 0 : r.key
1668
- );
1669
- }
1670
- return (_ = r == null ? void 0 : r.onChange) == null || _.call(r, s), s;
1671
- }
1672
- return o.updateDeps = (a) => {
1673
- n = a;
1674
- }, o;
1675
- }
1676
- function dt(t, i) {
1677
- if (t === void 0)
1678
- throw new Error("Unexpected undefined");
1679
- return t;
1680
- }
1681
- const rr = (t, i) => Math.abs(t - i) < 1.01, nr = (t, i, r) => {
1682
- let n;
1683
- return function(...s) {
1684
- t.clearTimeout(n), n = t.setTimeout(() => i.apply(this, s), r);
1685
- };
1686
- }, ut = (t) => {
1687
- const { offsetWidth: i, offsetHeight: r } = t;
1688
- return { width: i, height: r };
1689
- }, sr = (t) => t, ir = (t) => {
1690
- const i = Math.max(t.startIndex - t.overscan, 0), r = Math.min(t.endIndex + t.overscan, t.count - 1), n = [];
1691
- for (let s = i; s <= r; s++)
1692
- n.push(s);
1693
- return n;
1694
- }, or = (t, i) => {
1695
- const r = t.scrollElement;
1696
- if (!r)
1697
- return;
1698
- const n = t.targetWindow;
1699
- if (!n)
1700
- return;
1701
- const s = (a) => {
1702
- const { width: c, height: f } = a;
1703
- i({ width: Math.round(c), height: Math.round(f) });
1704
- };
1705
- if (s(ut(r)), !n.ResizeObserver)
1706
- return () => {
1707
- };
1708
- const o = new n.ResizeObserver((a) => {
1709
- const c = () => {
1710
- const f = a[0];
1711
- if (f != null && f.borderBoxSize) {
1712
- const _ = f.borderBoxSize[0];
1713
- if (_) {
1714
- s({ width: _.inlineSize, height: _.blockSize });
1715
- return;
1716
- }
1717
- }
1718
- s(ut(r));
1719
- };
1720
- t.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(c) : c();
1721
- });
1722
- return o.observe(r, { box: "border-box" }), () => {
1723
- o.unobserve(r);
1724
- };
1725
- }, ft = {
1726
- passive: !0
1727
- }, ht = typeof window > "u" ? !0 : "onscrollend" in window, ar = (t, i) => {
1728
- const r = t.scrollElement;
1729
- if (!r)
1730
- return;
1731
- const n = t.targetWindow;
1732
- if (!n)
1733
- return;
1734
- let s = 0;
1735
- const o = t.options.useScrollendEvent && ht ? () => {
1736
- } : nr(
1737
- n,
1738
- () => {
1739
- i(s, !1);
1740
- },
1741
- t.options.isScrollingResetDelay
1742
- ), a = (h) => () => {
1743
- const { horizontal: k, isRtl: V } = t.options;
1744
- s = k ? r.scrollLeft * (V && -1 || 1) : r.scrollTop, o(), i(s, h);
1745
- }, c = a(!0), f = a(!1);
1746
- f(), r.addEventListener("scroll", c, ft);
1747
- const _ = t.options.useScrollendEvent && ht;
1748
- return _ && r.addEventListener("scrollend", f, ft), () => {
1749
- r.removeEventListener("scroll", c), _ && r.removeEventListener("scrollend", f);
1750
- };
1751
- }, lr = (t, i, r) => {
1752
- if (i != null && i.borderBoxSize) {
1753
- const n = i.borderBoxSize[0];
1754
- if (n)
1755
- return Math.round(
1756
- n[r.options.horizontal ? "inlineSize" : "blockSize"]
1757
- );
1758
- }
1759
- return t[r.options.horizontal ? "offsetWidth" : "offsetHeight"];
1760
- }, cr = (t, {
1761
- adjustments: i = 0,
1762
- behavior: r
1763
- }, n) => {
1764
- var s, o;
1765
- const a = t + i;
1766
- (o = (s = n.scrollElement) == null ? void 0 : s.scrollTo) == null || o.call(s, {
1767
- [n.options.horizontal ? "left" : "top"]: a,
1768
- behavior: r
1769
- });
1770
- };
1771
- class dr {
1772
- constructor(i) {
1773
- this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.observer = /* @__PURE__ */ (() => {
1774
- let r = null;
1775
- const n = () => r || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : r = new this.targetWindow.ResizeObserver((s) => {
1776
- s.forEach((o) => {
1777
- const a = () => {
1778
- this._measureElement(o.target, o);
1779
- };
1780
- this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(a) : a();
1781
- });
1782
- }));
1783
- return {
1784
- disconnect: () => {
1785
- var s;
1786
- (s = n()) == null || s.disconnect(), r = null;
1787
- },
1788
- observe: (s) => {
1789
- var o;
1790
- return (o = n()) == null ? void 0 : o.observe(s, { box: "border-box" });
1791
- },
1792
- unobserve: (s) => {
1793
- var o;
1794
- return (o = n()) == null ? void 0 : o.unobserve(s);
1795
- }
1796
- };
1797
- })(), this.range = null, this.setOptions = (r) => {
1798
- Object.entries(r).forEach(([n, s]) => {
1799
- typeof s > "u" && delete r[n];
1800
- }), this.options = {
1801
- debug: !1,
1802
- initialOffset: 0,
1803
- overscan: 1,
1804
- paddingStart: 0,
1805
- paddingEnd: 0,
1806
- scrollPaddingStart: 0,
1807
- scrollPaddingEnd: 0,
1808
- horizontal: !1,
1809
- getItemKey: sr,
1810
- rangeExtractor: ir,
1811
- onChange: () => {
1812
- },
1813
- measureElement: lr,
1814
- initialRect: { width: 0, height: 0 },
1815
- scrollMargin: 0,
1816
- gap: 0,
1817
- indexAttribute: "data-index",
1818
- initialMeasurementsCache: [],
1819
- lanes: 1,
1820
- isScrollingResetDelay: 150,
1821
- enabled: !0,
1822
- isRtl: !1,
1823
- useScrollendEvent: !1,
1824
- useAnimationFrameWithResizeObserver: !1,
1825
- ...r
1826
- };
1827
- }, this.notify = (r) => {
1828
- var n, s;
1829
- (s = (n = this.options).onChange) == null || s.call(n, this, r);
1830
- }, this.maybeNotify = Ae(
1831
- () => (this.calculateRange(), [
1832
- this.isScrolling,
1833
- this.range ? this.range.startIndex : null,
1834
- this.range ? this.range.endIndex : null
1835
- ]),
1836
- (r) => {
1837
- this.notify(r);
1838
- },
1839
- {
1840
- key: process.env.NODE_ENV !== "production" && "maybeNotify",
1841
- debug: () => this.options.debug,
1842
- initialDeps: [
1843
- this.isScrolling,
1844
- this.range ? this.range.startIndex : null,
1845
- this.range ? this.range.endIndex : null
1846
- ]
1847
- }
1848
- ), this.cleanup = () => {
1849
- this.unsubs.filter(Boolean).forEach((r) => r()), this.unsubs = [], this.observer.disconnect(), this.scrollElement = null, this.targetWindow = null;
1850
- }, this._didMount = () => () => {
1851
- this.cleanup();
1852
- }, this._willUpdate = () => {
1853
- var r;
1854
- const n = this.options.enabled ? this.options.getScrollElement() : null;
1855
- if (this.scrollElement !== n) {
1856
- if (this.cleanup(), !n) {
1857
- this.maybeNotify();
1858
- return;
1859
- }
1860
- this.scrollElement = n, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((r = this.scrollElement) == null ? void 0 : r.window) ?? null, this.elementsCache.forEach((s) => {
1861
- this.observer.observe(s);
1862
- }), this._scrollToOffset(this.getScrollOffset(), {
1863
- adjustments: void 0,
1864
- behavior: void 0
1865
- }), this.unsubs.push(
1866
- this.options.observeElementRect(this, (s) => {
1867
- this.scrollRect = s, this.maybeNotify();
1868
- })
1869
- ), this.unsubs.push(
1870
- this.options.observeElementOffset(this, (s, o) => {
1871
- this.scrollAdjustments = 0, this.scrollDirection = o ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s, this.isScrolling = o, this.maybeNotify();
1872
- })
1873
- );
1874
- }
1875
- }, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (r, n) => {
1876
- const s = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
1877
- for (let a = n - 1; a >= 0; a--) {
1878
- const c = r[a];
1879
- if (s.has(c.lane))
1880
- continue;
1881
- const f = o.get(
1882
- c.lane
1883
- );
1884
- if (f == null || c.end > f.end ? o.set(c.lane, c) : c.end < f.end && s.set(c.lane, !0), s.size === this.options.lanes)
1885
- break;
1886
- }
1887
- return o.size === this.options.lanes ? Array.from(o.values()).sort((a, c) => a.end === c.end ? a.index - c.index : a.end - c.end)[0] : void 0;
1888
- }, this.getMeasurementOptions = Ae(
1889
- () => [
1890
- this.options.count,
1891
- this.options.paddingStart,
1892
- this.options.scrollMargin,
1893
- this.options.getItemKey,
1894
- this.options.enabled
1895
- ],
1896
- (r, n, s, o, a) => (this.pendingMeasuredCacheIndexes = [], {
1897
- count: r,
1898
- paddingStart: n,
1899
- scrollMargin: s,
1900
- getItemKey: o,
1901
- enabled: a
1902
- }),
1903
- {
1904
- key: !1
1905
- }
1906
- ), this.getMeasurements = Ae(
1907
- () => [this.getMeasurementOptions(), this.itemSizeCache],
1908
- ({ count: r, paddingStart: n, scrollMargin: s, getItemKey: o, enabled: a }, c) => {
1909
- if (!a)
1910
- return this.measurementsCache = [], this.itemSizeCache.clear(), [];
1911
- this.measurementsCache.length === 0 && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((h) => {
1912
- this.itemSizeCache.set(h.key, h.size);
1913
- }));
1914
- const f = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
1915
- this.pendingMeasuredCacheIndexes = [];
1916
- const _ = this.measurementsCache.slice(0, f);
1917
- for (let h = f; h < r; h++) {
1918
- const k = o(h), V = this.options.lanes === 1 ? _[h - 1] : this.getFurthestMeasurement(_, h), W = V ? V.end + this.options.gap : n + s, P = c.get(k), H = typeof P == "number" ? P : this.options.estimateSize(h), re = W + H, J = V ? V.lane : h % this.options.lanes;
1919
- _[h] = {
1920
- index: h,
1921
- start: W,
1922
- size: H,
1923
- end: re,
1924
- key: k,
1925
- lane: J
1926
- };
1927
- }
1928
- return this.measurementsCache = _, _;
1929
- },
1930
- {
1931
- key: process.env.NODE_ENV !== "production" && "getMeasurements",
1932
- debug: () => this.options.debug
1933
- }
1934
- ), this.calculateRange = Ae(
1935
- () => [
1936
- this.getMeasurements(),
1937
- this.getSize(),
1938
- this.getScrollOffset(),
1939
- this.options.lanes
1940
- ],
1941
- (r, n, s, o) => this.range = r.length > 0 && n > 0 ? ur({
1942
- measurements: r,
1943
- outerSize: n,
1944
- scrollOffset: s,
1945
- lanes: o
1946
- }) : null,
1947
- {
1948
- key: process.env.NODE_ENV !== "production" && "calculateRange",
1949
- debug: () => this.options.debug
1950
- }
1951
- ), this.getVirtualIndexes = Ae(
1952
- () => {
1953
- let r = null, n = null;
1954
- const s = this.calculateRange();
1955
- return s && (r = s.startIndex, n = s.endIndex), this.maybeNotify.updateDeps([this.isScrolling, r, n]), [
1956
- this.options.rangeExtractor,
1957
- this.options.overscan,
1958
- this.options.count,
1959
- r,
1960
- n
1961
- ];
1962
- },
1963
- (r, n, s, o, a) => o === null || a === null ? [] : r({
1964
- startIndex: o,
1965
- endIndex: a,
1966
- overscan: n,
1967
- count: s
1968
- }),
1969
- {
1970
- key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
1971
- debug: () => this.options.debug
1972
- }
1973
- ), this.indexFromElement = (r) => {
1974
- const n = this.options.indexAttribute, s = r.getAttribute(n);
1975
- return s ? parseInt(s, 10) : (console.warn(
1976
- `Missing attribute name '${n}={index}' on measured element.`
1977
- ), -1);
1978
- }, this._measureElement = (r, n) => {
1979
- const s = this.indexFromElement(r), o = this.measurementsCache[s];
1980
- if (!o)
1981
- return;
1982
- const a = o.key, c = this.elementsCache.get(a);
1983
- c !== r && (c && this.observer.unobserve(c), this.observer.observe(r), this.elementsCache.set(a, r)), r.isConnected && this.resizeItem(s, this.options.measureElement(r, n, this));
1984
- }, this.resizeItem = (r, n) => {
1985
- const s = this.measurementsCache[r];
1986
- if (!s)
1987
- return;
1988
- const o = this.itemSizeCache.get(s.key) ?? s.size, a = n - o;
1989
- a !== 0 && ((this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(s, a, this) : s.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", a), this._scrollToOffset(this.getScrollOffset(), {
1990
- adjustments: this.scrollAdjustments += a,
1991
- behavior: void 0
1992
- })), this.pendingMeasuredCacheIndexes.push(s.index), this.itemSizeCache = new Map(this.itemSizeCache.set(s.key, n)), this.notify(!1));
1993
- }, this.measureElement = (r) => {
1994
- if (!r) {
1995
- this.elementsCache.forEach((n, s) => {
1996
- n.isConnected || (this.observer.unobserve(n), this.elementsCache.delete(s));
1997
- });
1998
- return;
1999
- }
2000
- this._measureElement(r, void 0);
2001
- }, this.getVirtualItems = Ae(
2002
- () => [this.getVirtualIndexes(), this.getMeasurements()],
2003
- (r, n) => {
2004
- const s = [];
2005
- for (let o = 0, a = r.length; o < a; o++) {
2006
- const c = r[o], f = n[c];
2007
- s.push(f);
2008
- }
2009
- return s;
2010
- },
2011
- {
2012
- key: process.env.NODE_ENV !== "production" && "getVirtualItems",
2013
- debug: () => this.options.debug
2014
- }
2015
- ), this.getVirtualItemForOffset = (r) => {
2016
- const n = this.getMeasurements();
2017
- if (n.length !== 0)
2018
- return dt(
2019
- n[xt(
2020
- 0,
2021
- n.length - 1,
2022
- (s) => dt(n[s]).start,
2023
- r
2024
- )]
2025
- );
2026
- }, this.getOffsetForAlignment = (r, n, s = 0) => {
2027
- const o = this.getSize(), a = this.getScrollOffset();
2028
- n === "auto" && (n = r >= a + o ? "end" : "start"), n === "center" ? r += (s - o) / 2 : n === "end" && (r -= o);
2029
- const c = this.getTotalSize() + this.options.scrollMargin - o;
2030
- return Math.max(Math.min(c, r), 0);
2031
- }, this.getOffsetForIndex = (r, n = "auto") => {
2032
- r = Math.max(0, Math.min(r, this.options.count - 1));
2033
- const s = this.measurementsCache[r];
2034
- if (!s)
2035
- return;
2036
- const o = this.getSize(), a = this.getScrollOffset();
2037
- if (n === "auto")
2038
- if (s.end >= a + o - this.options.scrollPaddingEnd)
2039
- n = "end";
2040
- else if (s.start <= a + this.options.scrollPaddingStart)
2041
- n = "start";
2042
- else
2043
- return [a, n];
2044
- const c = n === "end" ? s.end + this.options.scrollPaddingEnd : s.start - this.options.scrollPaddingStart;
2045
- return [
2046
- this.getOffsetForAlignment(c, n, s.size),
2047
- n
2048
- ];
2049
- }, this.isDynamicMode = () => this.elementsCache.size > 0, this.scrollToOffset = (r, { align: n = "start", behavior: s } = {}) => {
2050
- s === "smooth" && this.isDynamicMode() && console.warn(
2051
- "The `smooth` scroll behavior is not fully supported with dynamic size."
2052
- ), this._scrollToOffset(this.getOffsetForAlignment(r, n), {
2053
- adjustments: void 0,
2054
- behavior: s
2055
- });
2056
- }, this.scrollToIndex = (r, { align: n = "auto", behavior: s } = {}) => {
2057
- s === "smooth" && this.isDynamicMode() && console.warn(
2058
- "The `smooth` scroll behavior is not fully supported with dynamic size."
2059
- ), r = Math.max(0, Math.min(r, this.options.count - 1));
2060
- let o = 0;
2061
- const a = 10, c = (_) => {
2062
- if (!this.targetWindow) return;
2063
- const h = this.getOffsetForIndex(r, _);
2064
- if (!h) {
2065
- console.warn("Failed to get offset for index:", r);
2066
- return;
2067
- }
2068
- const [k, V] = h;
2069
- this._scrollToOffset(k, { adjustments: void 0, behavior: s }), this.targetWindow.requestAnimationFrame(() => {
2070
- const W = this.getScrollOffset(), P = this.getOffsetForIndex(r, V);
2071
- if (!P) {
2072
- console.warn("Failed to get offset for index:", r);
2073
- return;
2074
- }
2075
- rr(P[0], W) || f(V);
2076
- });
2077
- }, f = (_) => {
2078
- this.targetWindow && (o++, o < a ? (process.env.NODE_ENV !== "production" && this.options.debug && console.info("Schedule retry", o, a), this.targetWindow.requestAnimationFrame(() => c(_))) : console.warn(
2079
- `Failed to scroll to index ${r} after ${a} attempts.`
2080
- ));
2081
- };
2082
- c(n);
2083
- }, this.scrollBy = (r, { behavior: n } = {}) => {
2084
- n === "smooth" && this.isDynamicMode() && console.warn(
2085
- "The `smooth` scroll behavior is not fully supported with dynamic size."
2086
- ), this._scrollToOffset(this.getScrollOffset() + r, {
2087
- adjustments: void 0,
2088
- behavior: n
2089
- });
2090
- }, this.getTotalSize = () => {
2091
- var r;
2092
- const n = this.getMeasurements();
2093
- let s;
2094
- if (n.length === 0)
2095
- s = this.options.paddingStart;
2096
- else if (this.options.lanes === 1)
2097
- s = ((r = n[n.length - 1]) == null ? void 0 : r.end) ?? 0;
2098
- else {
2099
- const o = Array(this.options.lanes).fill(null);
2100
- let a = n.length - 1;
2101
- for (; a >= 0 && o.some((c) => c === null); ) {
2102
- const c = n[a];
2103
- o[c.lane] === null && (o[c.lane] = c.end), a--;
2104
- }
2105
- s = Math.max(...o.filter((c) => c !== null));
2106
- }
2107
- return Math.max(
2108
- s - this.options.scrollMargin + this.options.paddingEnd,
2109
- 0
2110
- );
2111
- }, this._scrollToOffset = (r, {
2112
- adjustments: n,
2113
- behavior: s
2114
- }) => {
2115
- this.options.scrollToFn(r, { behavior: s, adjustments: n }, this);
2116
- }, this.measure = () => {
2117
- this.itemSizeCache = /* @__PURE__ */ new Map(), this.notify(!1);
2118
- }, this.setOptions(i);
2119
- }
2120
- }
2121
- const xt = (t, i, r, n) => {
2122
- for (; t <= i; ) {
2123
- const s = (t + i) / 2 | 0, o = r(s);
2124
- if (o < n)
2125
- t = s + 1;
2126
- else if (o > n)
2127
- i = s - 1;
2128
- else
2129
- return s;
1028
+ }), t && (i += ` ${t}`);
2130
1029
  }
2131
- return t > 0 ? t - 1 : 0;
2132
- };
2133
- function ur({
2134
- measurements: t,
2135
- outerSize: i,
2136
- scrollOffset: r,
2137
- lanes: n
2138
- }) {
2139
- const s = t.length - 1, o = (f) => t[f].start;
2140
- if (t.length <= n)
2141
- return {
2142
- startIndex: 0,
2143
- endIndex: s
2144
- };
2145
- let a = xt(
2146
- 0,
2147
- s,
2148
- o,
2149
- r
2150
- ), c = a;
2151
- if (n === 1)
2152
- for (; c < s && t[c].end < r + i; )
2153
- c++;
2154
- else if (n > 1) {
2155
- const f = Array(n).fill(0);
2156
- for (; c < s && f.some((h) => h < r + i); ) {
2157
- const h = t[c];
2158
- f[h.lane] = h.end, c++;
2159
- }
2160
- const _ = Array(n).fill(r + i);
2161
- for (; a >= 0 && _.some((h) => h >= r); ) {
2162
- const h = t[a];
2163
- _[h.lane] = h.start, a--;
2164
- }
2165
- a = Math.max(0, a - a % n), c = Math.min(s, c + (n - 1 - c % n));
2166
- }
2167
- return { startIndex: a, endIndex: c };
2168
- }
2169
- const gt = typeof document < "u" ? Je.useLayoutEffect : Je.useEffect;
2170
- function fr(t) {
2171
- const i = Je.useReducer(() => ({}), {})[1], r = {
2172
- ...t,
2173
- onChange: (s, o) => {
2174
- var a;
2175
- o ? Kt(i) : i(), (a = t.onChange) == null || a.call(t, s, o);
2176
- }
2177
- }, [n] = Je.useState(
2178
- () => new dr(r)
2179
- );
2180
- return n.setOptions(r), gt(() => n._didMount(), []), gt(() => n._willUpdate()), n;
2181
- }
2182
- function hr(t) {
2183
- return fr({
2184
- observeElementRect: or,
2185
- observeElementOffset: ar,
2186
- scrollToFn: cr,
2187
- ...t
2188
- });
2189
- }
2190
- const gr = (t) => {
2191
- var i;
2192
- return typeof window < "u" && ((i = window.CSS) != null && i.escape) ? window.CSS.escape(t) : t.replace(/([#.;?\[\]\s])/g, "\\$1");
2193
- }, pr = (t) => {
1030
+ return i;
1031
+ }, ct = (e) => {
1032
+ var t;
1033
+ return typeof window < "u" && ((t = window.CSS) != null && t.escape) ? window.CSS.escape(e) : e.replace(/([#.;?\[\]\s])/g, "\\$1");
1034
+ }, ut = (e) => {
2194
1035
  if (typeof document > "u") return null;
2195
- const i = `th[data-column-key="${gr(t)}"]`, r = document.querySelector(i);
2196
- return r ? r.getBoundingClientRect().width : null;
2197
- }, mr = typeof navigator < "u" && navigator.userAgent.toLowerCase().includes("firefox");
2198
- function yr({
2199
- draggableRows: t = !1,
2200
- dataSource: i,
2201
- config: r,
2202
- rowKey: n,
2203
- loading: s = !1,
2204
- onRowReorder: o,
2205
- preset: a,
2206
- customCellRender: c,
2207
- treeMode: f,
2208
- expandedRowKeys: _,
2209
- defaultExpandedRowKeys: h,
2210
- onExpandedRowsChange: k,
2211
- indentSize: V,
2212
- expandIcon: W,
2213
- bodyClassName: P,
2214
- bodyStyle: H,
1036
+ const t = `th[data-column-key="${ct(e)}"]`, i = document.querySelector(t);
1037
+ return i ? i.getBoundingClientRect().width : null;
1038
+ }, ht = typeof navigator < "u" && navigator.userAgent.toLowerCase().includes("firefox");
1039
+ function ft({
1040
+ draggableRows: e = !1,
1041
+ dataSource: t,
1042
+ config: i,
1043
+ rowKey: h,
1044
+ loading: F = !1,
1045
+ onRowReorder: _,
1046
+ preset: v,
1047
+ customCellRender: q,
1048
+ treeMode: B,
1049
+ expandedRowKeys: z,
1050
+ defaultExpandedRowKeys: j,
1051
+ onExpandedRowsChange: M,
1052
+ indentSize: ie,
1053
+ expandIcon: X,
1054
+ bodyClassName: Q,
1055
+ bodyStyle: R,
2215
1056
  bodyRowClassName: re,
2216
- bodyRowStyle: J,
2217
- bodyCellClassName: g,
2218
- bodyCellStyle: Q,
2219
- bodyCellWrapperClassName: E,
2220
- bodyCellWrapperStyle: N,
2221
- noDataRender: ae,
2222
- scrollContainerRef: p,
2223
- recalculateRowHeight: w,
2224
- virtualization: y
1057
+ bodyRowStyle: ee,
1058
+ bodyCellClassName: y,
1059
+ bodyCellStyle: K,
1060
+ bodyCellWrapperClassName: L,
1061
+ bodyCellWrapperStyle: c,
1062
+ noDataRender: G,
1063
+ scrollContainerRef: o,
1064
+ recalculateRowHeight: a,
1065
+ virtualization: s
2225
1066
  }) {
2226
- var Re;
2227
- const [b, m] = we(null), [j, R] = we(null), [M, G] = we(() => h && h.length > 0 ? new Set(h) : /* @__PURE__ */ new Set()), F = qe.useMemo(() => _ ? new Set(_) : M, [_, M]), U = ue((d) => {
2228
- _ || G(new Set(d)), k == null || k(d);
2229
- }, [_, k]), te = ue((d) => n ? n(d) : JSON.stringify(d), [n]), I = qe.useMemo(() => {
2230
- if (!f) return [];
2231
- const d = [], T = (Y, x, Z) => {
2232
- Y.forEach((ge, de) => {
2233
- const ke = te(ge), be = ge == null ? void 0 : ge.children, Ce = be && be.length > 0;
2234
- d.push({
2235
- record: ge,
2236
- key: ke,
2237
- type: x === 0 ? "parent" : "child",
2238
- parentKey: Z,
2239
- depth: x,
2240
- indexWithinGroup: de,
2241
- groupSize: Y.length
2242
- }), Ce && F.has(ke) && T(be, x + 1, ke);
1067
+ var fe;
1068
+ const [g, l] = ue(null), [d, S] = ue(null), [J, H] = ue(() => j && j.length > 0 ? new Set(j) : /* @__PURE__ */ new Set()), P = Le.useMemo(() => z ? new Set(z) : J, [z, J]), W = Y((r) => {
1069
+ z || H(new Set(r)), M == null || M(r);
1070
+ }, [z, M]), E = Y((r) => h ? h(r) : JSON.stringify(r), [h]), U = Le.useMemo(() => {
1071
+ if (!B) return [];
1072
+ const r = [], f = (A, u, T) => {
1073
+ A.forEach((oe, se) => {
1074
+ const me = E(oe), he = oe == null ? void 0 : oe.children, pe = he && he.length > 0;
1075
+ r.push({
1076
+ record: oe,
1077
+ key: me,
1078
+ type: u === 0 ? "parent" : "child",
1079
+ parentKey: T,
1080
+ depth: u,
1081
+ indexWithinGroup: se,
1082
+ groupSize: A.length
1083
+ }), pe && P.has(me) && f(he, u + 1, me);
2243
1084
  });
2244
1085
  };
2245
- return T(i, 0), d;
2246
- }, [f, i, te, F]), z = qe.useMemo(() => {
2247
- const d = /* @__PURE__ */ new Map();
2248
- return I.forEach((T) => d.set(T.key, T)), d;
2249
- }, [I]);
2250
- Ie(() => {
2251
- mr && w && (() => {
2252
- const T = document.querySelectorAll(".radar-table__body-row");
2253
- document.querySelectorAll(".radar-table__header-row").forEach((x) => {
2254
- const Z = x.querySelectorAll(".radar-table__header-cell-wrapper");
2255
- let ge = 0;
2256
- Z.forEach((de) => {
2257
- de.style.height = "auto", ge = Math.max(ge, de.offsetHeight);
2258
- }), Z.forEach((de) => {
2259
- de.style.height = ge + "px";
1086
+ return f(t, 0), r;
1087
+ }, [B, t, E, P]), m = Le.useMemo(() => {
1088
+ const r = /* @__PURE__ */ new Map();
1089
+ return U.forEach((f) => r.set(f.key, f)), r;
1090
+ }, [U]);
1091
+ _e(() => {
1092
+ ht && a && (() => {
1093
+ const f = document.querySelectorAll(".radar-table__body-row");
1094
+ document.querySelectorAll(".radar-table__header-row").forEach((u) => {
1095
+ const T = u.querySelectorAll(".radar-table__header-cell-wrapper");
1096
+ let oe = 0;
1097
+ T.forEach((se) => {
1098
+ se.style.height = "auto", oe = Math.max(oe, se.offsetHeight);
1099
+ }), T.forEach((se) => {
1100
+ se.style.height = oe + "px";
2260
1101
  });
2261
- }), T.forEach((x) => {
2262
- const Z = x.querySelectorAll(".radar-table__body-cell-wrapper");
2263
- let ge = 0;
2264
- Z.forEach((de) => {
2265
- de.style.height = "auto", ge = Math.max(ge, de.offsetHeight);
2266
- }), Z.forEach((de) => {
2267
- de.style.height = ge + "px";
1102
+ }), f.forEach((u) => {
1103
+ const T = u.querySelectorAll(".radar-table__body-cell-wrapper");
1104
+ let oe = 0;
1105
+ T.forEach((se) => {
1106
+ se.style.height = "auto", oe = Math.max(oe, se.offsetHeight);
1107
+ }), T.forEach((se) => {
1108
+ se.style.height = oe + "px";
2268
1109
  });
2269
1110
  });
2270
1111
  })();
2271
- }, [i, r]);
2272
- const $ = ((d) => {
2273
- const T = [], Y = (x) => {
2274
- x.forEach((Z) => {
2275
- Z.children && Z.children.length > 0 ? Y(Z.children) : T.push(Z);
1112
+ }, [t, i]);
1113
+ const p = ((r) => {
1114
+ const f = [], A = (u) => {
1115
+ u.forEach((T) => {
1116
+ T.children && T.children.length > 0 ? A(T.children) : f.push(T);
2276
1117
  });
2277
1118
  };
2278
- return Y(d), T;
2279
- })(r), le = (d) => {
2280
- if (d.groupColor)
2281
- return d.groupColor;
2282
- const T = (x, Z) => {
2283
- for (const ge of x)
2284
- if (ge.children) {
2285
- if (ge.children.some((ke) => ke.key === Z))
2286
- return ge;
2287
- const de = T(ge.children, Z);
2288
- if (de) return de;
1119
+ return A(r), f;
1120
+ })(i), I = (r) => {
1121
+ if (r.groupColor)
1122
+ return r.groupColor;
1123
+ const f = (u, T) => {
1124
+ for (const oe of u)
1125
+ if (oe.children) {
1126
+ if (oe.children.some((me) => me.key === T))
1127
+ return oe;
1128
+ const se = f(oe.children, T);
1129
+ if (se) return se;
2289
1130
  }
2290
1131
  return null;
2291
- }, Y = T(r, d.key);
2292
- return Y == null ? void 0 : Y.groupColor;
2293
- }, A = ue((d, T) => {
2294
- if (!T) {
2295
- d.preventDefault();
1132
+ }, A = f(i, r.key);
1133
+ return A == null ? void 0 : A.groupColor;
1134
+ }, C = Y((r, f) => {
1135
+ if (!f) {
1136
+ r.preventDefault();
2296
1137
  return;
2297
1138
  }
2298
- m(T), d.dataTransfer.effectAllowed = "move", d.dataTransfer.setData("text/plain", T), document.body.style.cursor = "grabbing";
2299
- const Y = i.find((x) => (n ? n(x) : JSON.stringify(x)) === T);
2300
- if (Y) {
2301
- const x = document.createElement("div");
2302
- x.style.cssText = `
1139
+ l(f), r.dataTransfer.effectAllowed = "move", r.dataTransfer.setData("text/plain", f), document.body.style.cursor = "grabbing";
1140
+ const A = t.find((u) => (h ? h(u) : JSON.stringify(u)) === f);
1141
+ if (A) {
1142
+ const u = document.createElement("div");
1143
+ u.style.cssText = `
2303
1144
  background: white;
2304
1145
  border-radius: 6px;
2305
1146
  padding: 8px 12px;
@@ -2313,311 +1154,311 @@ function yr({
2313
1154
  overflow: hidden;
2314
1155
  text-overflow: ellipsis;
2315
1156
  `;
2316
- const Z = $[0];
2317
- if (Z) {
2318
- const de = Y[Z.key];
2319
- x.textContent = (de == null ? void 0 : de.toString()) || "Строка";
1157
+ const T = p[0];
1158
+ if (T) {
1159
+ const se = A[T.key];
1160
+ u.textContent = (se == null ? void 0 : se.toString()) || "Строка";
2320
1161
  } else
2321
- x.textContent = "Строка";
2322
- document.body.appendChild(x), x.style.position = "absolute", x.style.top = "-1000px", x.style.left = "-1000px", d.dataTransfer.setDragImage(x, 10, 10);
2323
- const ge = setTimeout(() => {
2324
- document.body.contains(x) && document.body.removeChild(x);
1162
+ u.textContent = "Строка";
1163
+ document.body.appendChild(u), u.style.position = "absolute", u.style.top = "-1000px", u.style.left = "-1000px", r.dataTransfer.setDragImage(u, 10, 10);
1164
+ const oe = setTimeout(() => {
1165
+ document.body.contains(u) && document.body.removeChild(u);
2325
1166
  }, 0);
2326
- return () => clearTimeout(ge);
2327
- }
2328
- }, []), O = ue((d) => {
2329
- d.preventDefault(), d.dataTransfer.dropEffect = "move";
2330
- }, []), S = ue((d, T) => {
2331
- if (d.preventDefault(), !b) return;
2332
- if (!f) {
2333
- b !== T && R(T);
1167
+ return () => clearTimeout(oe);
1168
+ }
1169
+ }, []), k = Y((r) => {
1170
+ r.preventDefault(), r.dataTransfer.dropEffect = "move";
1171
+ }, []), w = Y((r, f) => {
1172
+ if (r.preventDefault(), !g) return;
1173
+ if (!B) {
1174
+ g !== f && S(f);
2334
1175
  return;
2335
1176
  }
2336
- const Y = z.get(b), x = z.get(T);
2337
- if (!Y || !x) return;
2338
- const Z = Y.depth === x.depth && Y.parentKey === x.parentKey;
2339
- R(Z && b !== T ? T : null);
2340
- }, [b, f, z]), C = ue((d) => {
2341
- d.preventDefault(), R(null);
2342
- }, []), X = ue(() => {
2343
- m(null), R(null), document.body.style.cursor = "";
2344
- }, []), D = ue((d, T) => {
2345
- if (d.preventDefault(), !b || b === T)
1177
+ const A = m.get(g), u = m.get(f);
1178
+ if (!A || !u) return;
1179
+ const T = A.depth === u.depth && A.parentKey === u.parentKey;
1180
+ S(T && g !== f ? f : null);
1181
+ }, [g, B, m]), b = Y((r) => {
1182
+ r.preventDefault(), S(null);
1183
+ }, []), x = Y(() => {
1184
+ l(null), S(null), document.body.style.cursor = "";
1185
+ }, []), $ = Y((r, f) => {
1186
+ if (r.preventDefault(), !g || g === f)
2346
1187
  return;
2347
- if (!f) {
2348
- const de = i.findIndex((Oe) => (n ? n(Oe) : JSON.stringify(Oe)) === b), ke = i.findIndex((Oe) => (n ? n(Oe) : JSON.stringify(Oe)) === T);
2349
- if (de === -1 || ke === -1)
1188
+ if (!B) {
1189
+ const se = t.findIndex((be) => (h ? h(be) : JSON.stringify(be)) === g), me = t.findIndex((be) => (h ? h(be) : JSON.stringify(be)) === f);
1190
+ if (se === -1 || me === -1)
2350
1191
  return;
2351
- const be = [...i], [Ce] = be.splice(de, 1);
2352
- be.splice(ke, 0, Ce), o == null || o(be), m(null), R(null), document.body.style.cursor = "";
1192
+ const he = [...t], [pe] = he.splice(se, 1);
1193
+ he.splice(me, 0, pe), _ == null || _(he), l(null), S(null), document.body.style.cursor = "";
2353
1194
  return;
2354
1195
  }
2355
- const Y = z.get(b), x = z.get(T);
2356
- if (!Y || !x || Y.depth !== x.depth || Y.parentKey !== x.parentKey)
1196
+ const A = m.get(g), u = m.get(f);
1197
+ if (!A || !u || A.depth !== u.depth || A.parentKey !== u.parentKey)
2357
1198
  return;
2358
- const Z = (de, ke) => {
2359
- if (ke === Y.parentKey) {
2360
- const be = de.findIndex(
2361
- (Le) => te(Le) === Y.key
2362
- ), Ce = de.findIndex(
2363
- (Le) => te(Le) === x.key
1199
+ const T = (se, me) => {
1200
+ if (me === A.parentKey) {
1201
+ const he = se.findIndex(
1202
+ (ve) => E(ve) === A.key
1203
+ ), pe = se.findIndex(
1204
+ (ve) => E(ve) === u.key
2364
1205
  );
2365
- if (be === -1 || Ce === -1) return de;
2366
- const Oe = [...de], [Fe] = Oe.splice(be, 1);
2367
- return Oe.splice(Ce, 0, Fe), Oe;
2368
- }
2369
- return de.map((be) => {
2370
- const Ce = be == null ? void 0 : be.children;
2371
- return Ce && Ce.length > 0 ? {
2372
- ...be,
2373
- children: Z(Ce, te(be))
2374
- } : be;
1206
+ if (he === -1 || pe === -1) return se;
1207
+ const be = [...se], [xe] = be.splice(he, 1);
1208
+ return be.splice(pe, 0, xe), be;
1209
+ }
1210
+ return se.map((he) => {
1211
+ const pe = he == null ? void 0 : he.children;
1212
+ return pe && pe.length > 0 ? {
1213
+ ...he,
1214
+ children: T(pe, E(he))
1215
+ } : he;
2375
1216
  });
2376
- }, ge = Z(i);
2377
- o == null || o(ge), m(null), R(null), document.body.style.cursor = "";
2378
- }, [b, i, te, o, f, z]);
2379
- if (i.length === 0) {
2380
- let d;
2381
- return p && (d = ((Re = p.current) == null ? void 0 : Re.clientWidth) + "px"), /* @__PURE__ */ l.jsx("tbody", { className: `radar-table__body ${a ? a + "__body" : ""} ${P}`, style: H, children: /* @__PURE__ */ l.jsx(
1217
+ }, oe = T(t);
1218
+ _ == null || _(oe), l(null), S(null), document.body.style.cursor = "";
1219
+ }, [g, t, E, _, B, m]);
1220
+ if (t.length === 0) {
1221
+ let r;
1222
+ return o && (r = ((fe = o.current) == null ? void 0 : fe.clientWidth) + "px"), /* @__PURE__ */ n("tbody", { className: `radar-table__body ${v ? v + "__body" : ""} ${Q}`, style: R, children: /* @__PURE__ */ n(
2382
1223
  "tr",
2383
1224
  {
2384
- className: `radar-table__body-row ${a ? a + "__body-row" : ""} ${re}`,
2385
- style: J,
2386
- children: /* @__PURE__ */ l.jsxs(
1225
+ className: `radar-table__body-row ${v ? v + "__body-row" : ""} ${re}`,
1226
+ style: ee,
1227
+ children: /* @__PURE__ */ ge(
2387
1228
  "td",
2388
1229
  {
2389
- className: `radar-table__body-cell ${a ? a + "__body-cell" : ""} ${g}`,
2390
- colSpan: $.length,
1230
+ className: `radar-table__body-cell ${v ? v + "__body-cell" : ""} ${y}`,
1231
+ colSpan: p.length,
2391
1232
  style: {
2392
- ...Q
1233
+ ...K
2393
1234
  },
2394
1235
  children: [
2395
- ae && ae(),
2396
- !ae && /* @__PURE__ */ l.jsx("div", { className: `${d ? "radar-table__body-noData_width" : "radar-table__body-noData"}`, style: { width: d || "" }, children: "Нет данных" })
1236
+ G && G(),
1237
+ !G && /* @__PURE__ */ n("div", { className: `${r ? "radar-table__body-noData_width" : "radar-table__body-noData"}`, style: { width: r || "" }, children: "Нет данных" })
2397
1238
  ]
2398
1239
  }
2399
1240
  )
2400
1241
  }
2401
1242
  ) });
2402
1243
  }
2403
- const ee = f ? I : i.map((d) => ({
2404
- record: d,
2405
- key: n ? n(d) : JSON.stringify(d),
1244
+ const Z = B ? U : t.map((r) => ({
1245
+ record: r,
1246
+ key: h ? h(r) : JSON.stringify(r),
2406
1247
  type: "parent",
2407
1248
  depth: 0,
2408
1249
  indexWithinGroup: 0,
2409
- groupSize: i.length
2410
- })), fe = ue((d) => {
2411
- const T = new Set(F);
2412
- T.has(d) ? T.delete(d) : T.add(d), U(Array.from(T));
2413
- }, [F, U]);
2414
- function ie({ column: d, index: T, row: Y, item: x }) {
2415
- var He, Ue;
2416
- const Z = Ee(null), [ge, de] = we(0), ke = d.fixed && !d.width ? 200 : d.width, be = d.fixed && !d.minWidth ? 200 : d.minWidth;
2417
- let Ce = !1;
2418
- c && c.idx.includes(d.dataIndex) && (Ce = !0), c && c.idx.length === 0 && (Ce = !0), Xe(() => {
2419
- if (!d.fixed) {
2420
- de(0);
1250
+ groupSize: t.length
1251
+ })), te = Y((r) => {
1252
+ const f = new Set(P);
1253
+ f.has(r) ? f.delete(r) : f.add(r), W(Array.from(f));
1254
+ }, [P, W]);
1255
+ function ae({ column: r, index: f, row: A, item: u }) {
1256
+ var De, Ee;
1257
+ const T = ye(null), [oe, se] = ue(0), me = r.fixed && !r.width ? 200 : r.width, he = r.fixed && !r.minWidth ? 200 : r.minWidth;
1258
+ let pe = !1;
1259
+ q && q.idx.includes(r.dataIndex) && (pe = !0), q && q.idx.length === 0 && (pe = !0), Fe(() => {
1260
+ if (!r.fixed) {
1261
+ se(0);
2421
1262
  return;
2422
1263
  }
2423
- let Pe = d.fixedLeft || 0;
2424
- if (T !== 0) {
2425
- for (let $e = 0; $e < T; $e++)
2426
- if ($[$e].fixed && !$[$e].hidden) {
2427
- const De = $[$e].width || $[$e].minWidth || 200, Be = pr($[$e].key);
2428
- Pe += Math.floor(Be ?? De) - 0.05;
1264
+ let We = r.fixedLeft || 0;
1265
+ if (f !== 0) {
1266
+ for (let we = 0; we < f; we++)
1267
+ if (p[we].fixed && !p[we].hidden) {
1268
+ const Pe = p[we].width || p[we].minWidth || 200, ze = ut(p[we].key);
1269
+ We += Math.floor(ze ?? Pe) - 0.05;
2429
1270
  }
2430
1271
  }
2431
- de(Pe);
2432
- }, [d.fixed, d.fixedLeft, d.width, T]);
2433
- const Oe = le(d), Fe = T === 0, Le = f && Fe && Y.depth > 0 ? Y.depth * (V || 16) : void 0, ze = !!(f && (x != null && x.children) && x.children.length > 0), Me = !!(f && F.has(Y.key));
2434
- return d.hidden ? null : /* @__PURE__ */ l.jsx(
1272
+ se(We);
1273
+ }, [r.fixed, r.fixedLeft, r.width, f]);
1274
+ const be = I(r), xe = f === 0, ve = B && xe && A.depth > 0 ? A.depth * (ie || 16) : void 0, $e = !!(B && (u != null && u.children) && u.children.length > 0), Ce = !!(B && P.has(A.key));
1275
+ return r.hidden ? null : /* @__PURE__ */ n(
2435
1276
  "td",
2436
1277
  {
2437
- ref: Z,
2438
- "data-column-key": d.key,
2439
- className: `radar-table__body-cell ${a ? a + "__body-cell" : ""} ${g}`,
1278
+ ref: T,
1279
+ "data-column-key": r.key,
1280
+ className: `radar-table__body-cell ${v ? v + "__body-cell" : ""} ${y}`,
2440
1281
  style: {
2441
- width: ke,
2442
- minWidth: be,
2443
- position: d.fixed ? "sticky" : "static",
2444
- left: ge,
2445
- borderRight: d.fixed && !((He = $[T + 1]) != null && He.fixed) ? "1px solid #E8E8E8" : "none",
2446
- cursor: Fe && ze ? "pointer" : "default",
2447
- ...Q
1282
+ width: me,
1283
+ minWidth: he,
1284
+ position: r.fixed ? "sticky" : "static",
1285
+ left: oe,
1286
+ borderRight: r.fixed && !((De = p[f + 1]) != null && De.fixed) ? "1px solid #E8E8E8" : "none",
1287
+ cursor: xe && $e ? "pointer" : "default",
1288
+ ...K
2448
1289
  },
2449
- onClick: Fe && ze ? () => fe(Y.key) : void 0,
2450
- children: /* @__PURE__ */ l.jsxs(
1290
+ onClick: xe && $e ? () => te(A.key) : void 0,
1291
+ children: /* @__PURE__ */ ge(
2451
1292
  "div",
2452
1293
  {
2453
- className: `radar-table__body-cell-wrapper ${a ? a + "__body-cell-wrapper" : ""} ${E}`,
1294
+ className: `radar-table__body-cell-wrapper ${v ? v + "__body-cell-wrapper" : ""} ${L}`,
2454
1295
  style: {
2455
- backgroundColor: Oe || "white",
2456
- paddingLeft: Le,
2457
- ...N
1296
+ backgroundColor: be || "white",
1297
+ paddingLeft: ve,
1298
+ ...c
2458
1299
  },
2459
1300
  children: [
2460
- Fe && ze && f && /* @__PURE__ */ l.jsx(
1301
+ xe && $e && B && /* @__PURE__ */ n(
2461
1302
  "button",
2462
1303
  {
2463
1304
  type: "button",
2464
- className: `radar-table__expander-btn ${Me ? "expanded" : ""}`,
2465
- "aria-expanded": Me,
2466
- onClick: () => fe(Y.key),
2467
- style: { marginRight: 8, background: "transparent", border: "none", transform: Me ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 150ms ease" },
2468
- title: Me ? "Свернуть" : "Развернуть",
2469
- children: W ? W(Me, x, Y.depth) : /* @__PURE__ */ l.jsx("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l.jsx("path", { d: "M4.99264 6.91705C5.28553 7.20994 5.76041 7.20994 6.0533 6.91705L10.8263 2.14408C11.1192 1.85118 11.1192 1.37631 10.8263 1.08342C10.5334 0.790524 10.0585 0.790524 9.76561 1.08342L6.27297 4.57606L5.5 5.34903L4.77297 4.57606L1.28033 1.08342C0.987437 0.790524 0.512563 0.790524 0.21967 1.08342C-0.0732234 1.37631 -0.0732234 1.85118 0.21967 2.14408L4.99264 6.91705Z", fill: "#8C8C8C" }) })
1305
+ className: `radar-table__expander-btn ${Ce ? "expanded" : ""}`,
1306
+ "aria-expanded": Ce,
1307
+ onClick: () => te(A.key),
1308
+ style: { marginRight: 8, background: "transparent", border: "none", transform: Ce ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 150ms ease" },
1309
+ title: Ce ? "Свернуть" : "Развернуть",
1310
+ children: X ? X(Ce, u, A.depth) : /* @__PURE__ */ n("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n("path", { d: "M4.99264 6.91705C5.28553 7.20994 5.76041 7.20994 6.0533 6.91705L10.8263 2.14408C11.1192 1.85118 11.1192 1.37631 10.8263 1.08342C10.5334 0.790524 10.0585 0.790524 9.76561 1.08342L6.27297 4.57606L5.5 5.34903L4.77297 4.57606L1.28033 1.08342C0.987437 0.790524 0.512563 0.790524 0.21967 1.08342C-0.0732234 1.37631 -0.0732234 1.85118 0.21967 2.14408L4.99264 6.91705Z", fill: "#8C8C8C" }) })
2470
1311
  }
2471
1312
  ),
2472
- Ce ? c == null ? void 0 : c.renderer(x[d.dataIndex], x, T, d.dataIndex) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2473
- d.units && tr(((Ue = x[d.key]) == null ? void 0 : Ue.toString()) || "", d.units),
2474
- !d.units && x[d.key]
1313
+ pe ? q == null ? void 0 : q.renderer(u[r.dataIndex], u, f, r.dataIndex) : /* @__PURE__ */ ge(Se, { children: [
1314
+ r.units && dt(((Ee = u[r.key]) == null ? void 0 : Ee.toString()) || "", r.units),
1315
+ !r.units && u[r.key]
2475
1316
  ] })
2476
1317
  ]
2477
1318
  }
2478
1319
  )
2479
1320
  },
2480
- d.key
1321
+ r.key
2481
1322
  );
2482
1323
  }
2483
- if (!(y != null && y.enabled))
2484
- return /* @__PURE__ */ l.jsx("tbody", { className: `radar-table__body ${a ? a + "__body" : ""} ${P}`, style: H, children: ee.map((d) => {
2485
- const T = d.record, Y = d.key;
2486
- return /* @__PURE__ */ l.jsx(
1324
+ if (!(s != null && s.enabled))
1325
+ return /* @__PURE__ */ n("tbody", { className: `radar-table__body ${v ? v + "__body" : ""} ${Q}`, style: R, children: Z.map((r) => {
1326
+ const f = r.record, A = r.key;
1327
+ return /* @__PURE__ */ n(
2487
1328
  "tr",
2488
1329
  {
2489
- className: `radar-table__body-row ${a ? a + "__body-row" : ""} ${re} ${b === Y ? "dragging" : ""} ${j === Y ? "drag-over" : ""} ${f ? d.type === "parent" ? "radar-table__body-row--parent" : "radar-table__body-row--child" : ""}`,
2490
- style: J,
2491
- draggable: t,
2492
- onDragStart: (x) => A(x, Y),
2493
- onDragOver: O,
2494
- onDragEnter: (x) => S(x, Y),
2495
- onDragLeave: C,
2496
- onDrop: (x) => D(x, Y),
2497
- onDragEnd: X,
2498
- children: $.map((x, Z) => /* @__PURE__ */ l.jsx(ie, { column: x, index: Z, row: d, item: T }, x.key))
1330
+ className: `radar-table__body-row ${v ? v + "__body-row" : ""} ${re} ${g === A ? "dragging" : ""} ${d === A ? "drag-over" : ""} ${B ? r.type === "parent" ? "radar-table__body-row--parent" : "radar-table__body-row--child" : ""}`,
1331
+ style: ee,
1332
+ draggable: e,
1333
+ onDragStart: (u) => C(u, A),
1334
+ onDragOver: k,
1335
+ onDragEnter: (u) => w(u, A),
1336
+ onDragLeave: b,
1337
+ onDrop: (u) => $(u, A),
1338
+ onDragEnd: x,
1339
+ children: p.map((u, T) => /* @__PURE__ */ n(ae, { column: u, index: T, row: r, item: f }, u.key))
2499
1340
  },
2500
- Y
1341
+ A
2501
1342
  );
2502
1343
  }) });
2503
- const q = y.estimateSize ?? 48, ne = y.overscan ?? 12, L = hr({
2504
- count: ee.length,
2505
- getScrollElement: () => p == null ? void 0 : p.current,
2506
- estimateSize: () => q,
2507
- overscan: ne,
2508
- measureElement: (d) => d.getBoundingClientRect().height
1344
+ const ne = s.estimateSize ?? 48, N = s.overscan ?? 12, O = et({
1345
+ count: Z.length,
1346
+ getScrollElement: () => o == null ? void 0 : o.current,
1347
+ estimateSize: () => ne,
1348
+ overscan: N,
1349
+ measureElement: (r) => r.getBoundingClientRect().height
2509
1350
  });
2510
- Xe(() => {
2511
- if (!(y != null && y.enabled) || !(p != null && p.current)) return;
2512
- L.measure();
2513
- const d = new ResizeObserver(() => {
2514
- L.measure();
2515
- }), T = p.current;
2516
- return d.observe(T), () => {
2517
- d.disconnect();
1351
+ Fe(() => {
1352
+ if (!(s != null && s.enabled) || !(o != null && o.current)) return;
1353
+ O.measure();
1354
+ const r = new ResizeObserver(() => {
1355
+ O.measure();
1356
+ }), f = o.current;
1357
+ return r.observe(f), () => {
1358
+ r.disconnect();
2518
1359
  };
2519
- }, [y == null ? void 0 : y.enabled, p]), Ie(() => {
2520
- if (!(y != null && y.enabled)) return;
2521
- const d = setTimeout(() => {
2522
- L.measure();
1360
+ }, [s == null ? void 0 : s.enabled, o]), _e(() => {
1361
+ if (!(s != null && s.enabled)) return;
1362
+ const r = setTimeout(() => {
1363
+ O.measure();
2523
1364
  }, 0);
2524
- return () => clearTimeout(d);
2525
- }, [ee.length, y == null ? void 0 : y.enabled]);
2526
- const ce = L.getVirtualItems(), ye = L.getTotalSize(), pe = ce.length ? ce[0].start : 0, ve = ce.length ? ye - ce[ce.length - 1].end : 0;
2527
- return /* @__PURE__ */ l.jsxs("tbody", { className: `radar-table__body ${a ? a + "__body" : ""} ${P}`, style: H, children: [
2528
- pe > 0 && /* @__PURE__ */ l.jsx("tr", { style: { height: pe }, children: /* @__PURE__ */ l.jsx("td", { colSpan: $.length }) }),
2529
- ce.map((d) => {
2530
- const T = ee[d.index];
2531
- if (!T) return null;
2532
- const Y = T.record, x = T.key;
2533
- return /* @__PURE__ */ l.jsx(
1365
+ return () => clearTimeout(r);
1366
+ }, [Z.length, s == null ? void 0 : s.enabled]);
1367
+ const D = O.getVirtualItems(), ce = O.getTotalSize(), de = D.length ? D[0].start : 0, le = D.length ? ce - D[D.length - 1].end : 0;
1368
+ return /* @__PURE__ */ ge("tbody", { className: `radar-table__body ${v ? v + "__body" : ""} ${Q}`, style: R, children: [
1369
+ de > 0 && /* @__PURE__ */ n("tr", { style: { height: de }, children: /* @__PURE__ */ n("td", { colSpan: p.length }) }),
1370
+ D.map((r) => {
1371
+ const f = Z[r.index];
1372
+ if (!f) return null;
1373
+ const A = f.record, u = f.key;
1374
+ return /* @__PURE__ */ n(
2534
1375
  "tr",
2535
1376
  {
2536
- "data-index": d.index,
2537
- ref: (Z) => {
2538
- Z && L.measureElement(Z);
1377
+ "data-index": r.index,
1378
+ ref: (T) => {
1379
+ T && O.measureElement(T);
2539
1380
  },
2540
- className: `radar-table__body-row ${a ? a + "__body-row" : ""} ${re} ${b === x ? "dragging" : ""} ${j === x ? "drag-over" : ""} ${f ? T.type === "parent" ? "radar-table__body-row--parent" : "radar-table__body-row--child" : ""}`,
2541
- style: J,
2542
- draggable: t,
2543
- onDragStart: (Z) => A(Z, x),
2544
- onDragOver: O,
2545
- onDragEnter: (Z) => S(Z, x),
2546
- onDragLeave: C,
2547
- onDrop: (Z) => D(Z, x),
2548
- onDragEnd: X,
2549
- children: $.map((Z, ge) => /* @__PURE__ */ l.jsx(ie, { column: Z, index: ge, row: T, item: Y }, Z.key))
1381
+ className: `radar-table__body-row ${v ? v + "__body-row" : ""} ${re} ${g === u ? "dragging" : ""} ${d === u ? "drag-over" : ""} ${B ? f.type === "parent" ? "radar-table__body-row--parent" : "radar-table__body-row--child" : ""}`,
1382
+ style: ee,
1383
+ draggable: e,
1384
+ onDragStart: (T) => C(T, u),
1385
+ onDragOver: k,
1386
+ onDragEnter: (T) => w(T, u),
1387
+ onDragLeave: b,
1388
+ onDrop: (T) => $(T, u),
1389
+ onDragEnd: x,
1390
+ children: p.map((T, oe) => /* @__PURE__ */ n(ae, { column: T, index: oe, row: f, item: A }, T.key))
2550
1391
  },
2551
- x
1392
+ u
2552
1393
  );
2553
1394
  }),
2554
- ve > 0 && /* @__PURE__ */ l.jsx("tr", { style: { height: ve }, children: /* @__PURE__ */ l.jsx("td", { colSpan: $.length }) })
1395
+ le > 0 && /* @__PURE__ */ n("tr", { style: { height: le }, children: /* @__PURE__ */ n("td", { colSpan: p.length }) })
2555
1396
  ] });
2556
1397
  }
2557
- const pt = ({ config: t }) => {
2558
- const [{ current: i, pageSize: r, total: n, onChange: s, showQuickJumper: o, buttonsCount: a = 4, hideOnSinglePage: c = !1 }, f] = we(t);
2559
- Ie(() => {
2560
- f(t);
2561
- }, [t]);
2562
- const _ = Math.ceil(i / a), h = (_ - 1) * a + 1, k = _ * a, V = (g) => {
2563
- const Q = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "Tab", "Enter"];
2564
- !/^[0-9]$/.test(g.key) && !Q.includes(g.key) && g.preventDefault();
2565
- }, W = (g) => {
2566
- if (g.key === "Enter") {
2567
- const Q = parseInt(g.currentTarget.value);
2568
- Q > 0 && Q <= n && (f({ ...t, current: Q }), s == null || s(Q, r), g.currentTarget.value = "");
2569
- }
2570
- }, P = (g) => {
2571
- const E = g.target.value.replace(/[^0-9]/g, "");
2572
- g.target.value = E;
2573
- }, H = (g) => {
2574
- g.preventDefault();
2575
- const E = g.clipboardData.getData("text").replace(/[^0-9]/g, ""), N = g.target, ae = N.selectionStart || 0, p = N.selectionEnd || 0, w = N.value.substring(0, ae) + E + N.value.substring(p);
2576
- N.value = w, N.setSelectionRange(ae + E.length, ae + E.length);
2577
- }, re = (g) => {
2578
- const Q = g.currentTarget.id;
2579
- Q === "pagination_left_button" && i > 1 && (f({ ...t, current: i - 1 }), s == null || s(i - 1, r)), Q === "pagination_right_button" && i < n && (f({ ...t, current: i + 1 }), s == null || s(i + 1, r));
2580
- }, J = (g) => {
2581
- f({ ...t, current: g }), s == null || s(g, r);
1398
+ const Ie = ({ config: e }) => {
1399
+ const [{ current: t, pageSize: i, total: h, onChange: F, showQuickJumper: _, buttonsCount: v = 4, hideOnSinglePage: q = !1 }, B] = ue(e);
1400
+ _e(() => {
1401
+ B(e);
1402
+ }, [e]);
1403
+ const z = Math.ceil(t / v), j = (z - 1) * v + 1, M = z * v, ie = (y) => {
1404
+ const K = ["Backspace", "Delete", "ArrowLeft", "ArrowRight", "Tab", "Enter"];
1405
+ !/^[0-9]$/.test(y.key) && !K.includes(y.key) && y.preventDefault();
1406
+ }, X = (y) => {
1407
+ if (y.key === "Enter") {
1408
+ const K = parseInt(y.currentTarget.value);
1409
+ K > 0 && K <= h && (B({ ...e, current: K }), F == null || F(K, i), y.currentTarget.value = "");
1410
+ }
1411
+ }, Q = (y) => {
1412
+ const L = y.target.value.replace(/[^0-9]/g, "");
1413
+ y.target.value = L;
1414
+ }, R = (y) => {
1415
+ y.preventDefault();
1416
+ const L = y.clipboardData.getData("text").replace(/[^0-9]/g, ""), c = y.target, G = c.selectionStart || 0, o = c.selectionEnd || 0, a = c.value.substring(0, G) + L + c.value.substring(o);
1417
+ c.value = a, c.setSelectionRange(G + L.length, G + L.length);
1418
+ }, re = (y) => {
1419
+ const K = y.currentTarget.id;
1420
+ K === "pagination_left_button" && t > 1 && (B({ ...e, current: t - 1 }), F == null || F(t - 1, i)), K === "pagination_right_button" && t < h && (B({ ...e, current: t + 1 }), F == null || F(t + 1, i));
1421
+ }, ee = (y) => {
1422
+ B({ ...e, current: y }), F == null || F(y, i);
2582
1423
  };
2583
- return c && n <= 1 ? null : /* @__PURE__ */ l.jsxs("div", { className: "radar-table__pagination", children: [
2584
- /* @__PURE__ */ l.jsxs(
1424
+ return q && h <= 1 ? null : /* @__PURE__ */ ge("div", { className: "radar-table__pagination", children: [
1425
+ /* @__PURE__ */ ge(
2585
1426
  "div",
2586
1427
  {
2587
1428
  className: "radar-table__pagination-main",
2588
1429
  style: {
2589
- gridTemplateColumns: `repeat(${a + 2}, 32px)`
1430
+ gridTemplateColumns: `repeat(${v + 2}, 32px)`
2590
1431
  },
2591
1432
  children: [
2592
- /* @__PURE__ */ l.jsx("button", { className: "radar-table__pagination-button radar-table__pagination-button_control", id: "pagination_left_button", onClick: re, title: "Назад", children: /* @__PURE__ */ l.jsx("svg", { width: "6", height: "10", viewBox: "0 0 6 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l.jsx("path", { d: "M5 0.544067L1 4.54407L5 8.54407", stroke: "#8C8C8C", strokeLinecap: "round" }) }) }),
2593
- Array.from({ length: n }, (g, Q) => Q + 1).map((g) => {
2594
- const Q = i === g;
2595
- if (g >= h && g <= k)
2596
- return Q ? /* @__PURE__ */ l.jsx("button", { className: "radar-table__pagination-button radar-table__pagination-button_active", children: g }, g) : /* @__PURE__ */ l.jsx("button", { className: "radar-table__pagination-button", onClick: () => J(g), children: g }, g);
1433
+ /* @__PURE__ */ n("button", { className: "radar-table__pagination-button radar-table__pagination-button_control", id: "pagination_left_button", onClick: re, title: "Назад", children: /* @__PURE__ */ n("svg", { width: "6", height: "10", viewBox: "0 0 6 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n("path", { d: "M5 0.544067L1 4.54407L5 8.54407", stroke: "#8C8C8C", strokeLinecap: "round" }) }) }),
1434
+ Array.from({ length: h }, (y, K) => K + 1).map((y) => {
1435
+ const K = t === y;
1436
+ if (y >= j && y <= M)
1437
+ return K ? /* @__PURE__ */ n("button", { className: "radar-table__pagination-button radar-table__pagination-button_active", children: y }, y) : /* @__PURE__ */ n("button", { className: "radar-table__pagination-button", onClick: () => ee(y), children: y }, y);
2597
1438
  }),
2598
- /* @__PURE__ */ l.jsx("button", { className: "radar-table__pagination-button radar-table__pagination-button_control", id: "pagination_right_button", onClick: re, title: "Вперёд", children: /* @__PURE__ */ l.jsx("svg", { width: "6", height: "10", viewBox: "0 0 6 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ l.jsx("path", { d: "M1 8.54407L5 4.54407L1 0.544067", stroke: "#8C8C8C", strokeLinecap: "round" }) }) })
1439
+ /* @__PURE__ */ n("button", { className: "radar-table__pagination-button radar-table__pagination-button_control", id: "pagination_right_button", onClick: re, title: "Вперёд", children: /* @__PURE__ */ n("svg", { width: "6", height: "10", viewBox: "0 0 6 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ n("path", { d: "M1 8.54407L5 4.54407L1 0.544067", stroke: "#8C8C8C", strokeLinecap: "round" }) }) })
2599
1440
  ]
2600
1441
  }
2601
1442
  ),
2602
- o && /* @__PURE__ */ l.jsxs("div", { className: "radar-table__pagination-quick-jumper", children: [
1443
+ _ && /* @__PURE__ */ ge("div", { className: "radar-table__pagination-quick-jumper", children: [
2603
1444
  "Перейти на ",
2604
- /* @__PURE__ */ l.jsx(
1445
+ /* @__PURE__ */ n(
2605
1446
  "input",
2606
1447
  {
2607
1448
  className: "radar-table__pagination-input",
2608
- onKeyDown: V,
2609
- onChange: P,
2610
- onPaste: H,
2611
- onKeyUp: (g) => W(g)
1449
+ onKeyDown: ie,
1450
+ onChange: Q,
1451
+ onPaste: R,
1452
+ onKeyUp: (y) => X(y)
2612
1453
  }
2613
1454
  ),
2614
1455
  " стр. из ",
2615
- n
1456
+ h
2616
1457
  ] })
2617
1458
  ] });
2618
1459
  };
2619
- function vr(t = !1) {
2620
- const [i, r] = we({
1460
+ function gt(e = !1) {
1461
+ const [t, i] = ue({
2621
1462
  totalFrames: 0,
2622
1463
  avgFrameTime: 0,
2623
1464
  minFrameTime: 1 / 0,
@@ -2626,35 +1467,35 @@ function vr(t = !1) {
2626
1467
  lastFrameTime: 0,
2627
1468
  lastFps: 0,
2628
1469
  totalDuration: 0
2629
- }), n = Ee([]), s = Ee([]), o = Ee(0), a = Ee(!1), c = ue(() => {
2630
- t && (o.current = performance.now(), n.current = [], s.current = [], a.current = !0);
2631
- }, [t]), f = ue((k) => {
2632
- !t || !a.current || n.current.push(k);
2633
- }, [t]), _ = ue(() => {
2634
- if (!t || !a.current) return;
2635
- a.current = !1;
2636
- const k = n.current, V = performance.now() - o.current, W = [];
2637
- let P = 0, H = 0;
2638
- if (k.length > 1) {
2639
- for (let E = 1; E < k.length; E++) {
2640
- const N = k[E] - k[E - 1];
2641
- W.push(N);
2642
- }
2643
- P = W[W.length - 1], H = 1e3 / P;
2644
- const re = W.reduce((E, N) => E + N, 0) / W.length, J = 1e3 / re, g = Math.min(...W), Q = Math.max(...W);
2645
- r({
2646
- totalFrames: k.length,
1470
+ }), h = ye([]), F = ye([]), _ = ye(0), v = ye(!1), q = Y(() => {
1471
+ e && (_.current = performance.now(), h.current = [], F.current = [], v.current = !0);
1472
+ }, [e]), B = Y((M) => {
1473
+ !e || !v.current || h.current.push(M);
1474
+ }, [e]), z = Y(() => {
1475
+ if (!e || !v.current) return;
1476
+ v.current = !1;
1477
+ const M = h.current, ie = performance.now() - _.current, X = [];
1478
+ let Q = 0, R = 0;
1479
+ if (M.length > 1) {
1480
+ for (let L = 1; L < M.length; L++) {
1481
+ const c = M[L] - M[L - 1];
1482
+ X.push(c);
1483
+ }
1484
+ Q = X[X.length - 1], R = 1e3 / Q;
1485
+ const re = X.reduce((L, c) => L + c, 0) / X.length, ee = 1e3 / re, y = Math.min(...X), K = Math.max(...X);
1486
+ i({
1487
+ totalFrames: M.length,
2647
1488
  avgFrameTime: re,
2648
- minFrameTime: g,
2649
- maxFrameTime: Q,
2650
- avgFps: J,
2651
- lastFrameTime: P,
2652
- lastFps: H,
2653
- totalDuration: V
1489
+ minFrameTime: y,
1490
+ maxFrameTime: K,
1491
+ avgFps: ee,
1492
+ lastFrameTime: Q,
1493
+ lastFps: R,
1494
+ totalDuration: ie
2654
1495
  });
2655
1496
  }
2656
- }, [t]), h = ue(() => {
2657
- n.current = [], s.current = [], r({
1497
+ }, [e]), j = Y(() => {
1498
+ h.current = [], F.current = [], i({
2658
1499
  totalFrames: 0,
2659
1500
  avgFrameTime: 0,
2660
1501
  minFrameTime: 1 / 0,
@@ -2666,469 +1507,474 @@ function vr(t = !1) {
2666
1507
  });
2667
1508
  }, []);
2668
1509
  return {
2669
- metrics: i,
2670
- startResize: c,
2671
- trackFrame: f,
2672
- endResize: _,
2673
- reset: h
1510
+ metrics: t,
1511
+ startResize: q,
1512
+ trackFrame: B,
1513
+ endResize: z,
1514
+ reset: j
2674
1515
  };
2675
1516
  }
2676
- function Sr({
2677
- dataSource: t,
2678
- preset: i,
2679
- config: r,
2680
- rowKey: n,
2681
- loading: s = !1,
2682
- pagination: o,
2683
- stickyHeader: a = !1,
2684
- resizeable: c = !1,
2685
- draggableRows: f = !1,
2686
- draggableColumns: _ = !1,
2687
- scrollContainerRef: h,
2688
- onResize: k,
2689
- onSort: V,
2690
- onRowReorder: W,
2691
- onColumnReorder: P,
2692
- customCellRender: H,
1517
+ function vt({
1518
+ dataSource: e,
1519
+ preset: t,
1520
+ config: i,
1521
+ rowKey: h,
1522
+ loading: F = !1,
1523
+ pagination: _,
1524
+ stickyHeader: v = !1,
1525
+ resizeable: q = !1,
1526
+ draggableRows: B = !1,
1527
+ draggableColumns: z = !1,
1528
+ scrollContainerRef: j,
1529
+ onResize: M,
1530
+ onSort: ie,
1531
+ onRowReorder: X,
1532
+ onColumnReorder: Q,
1533
+ customCellRender: R,
2693
1534
  noDataRender: re,
2694
- sortIcon: J,
2695
- expandIcon: g,
2696
- recalculateRowHeight: Q = !1,
1535
+ sortIcon: ee,
1536
+ expandIcon: y,
1537
+ recalculateRowHeight: K = !1,
2697
1538
  // sorting props
2698
- sorting: E,
2699
- defaultSorting: N,
1539
+ sorting: L,
1540
+ defaultSorting: c,
2700
1541
  // tree props
2701
- treeMode: ae,
2702
- expandedRowKeys: p,
2703
- defaultExpandedRowKeys: w,
2704
- onExpandedRowsChange: y,
2705
- indentSize: b,
2706
- className: m = "",
2707
- style: j,
2708
- headerClassName: R = "",
2709
- headerStyle: M,
2710
- headerCellClassName: G = "",
2711
- headerCellStyle: F,
2712
- headerRowClassName: U = "",
2713
- headerRowStyle: te,
2714
- headerCellWrapperClassName: I = "",
2715
- headerCellWrapperStyle: z,
2716
- bodyClassName: K = "",
2717
- bodyStyle: $,
2718
- bodyRowClassName: le = "",
2719
- bodyRowStyle: A,
2720
- bodyCellClassName: O = "",
2721
- bodyCellStyle: S,
2722
- bodyCellWrapperClassName: C = "",
2723
- bodyCellWrapperStyle: X,
2724
- headerGroupRowClassName: D,
2725
- headerGroupRowStyle: ee,
2726
- headerGroupCellClassName: fe,
2727
- headerGroupCellStyle: ie,
2728
- headerGroupCellWrapperClassName: q,
2729
- headerGroupCellWrapperStyle: ne,
2730
- paginationContainerClassName: L = "",
2731
- paginationContainerStyle: ce,
2732
- resizeThrottle: ye = 0,
2733
- virtualization: pe,
2734
- benchmark: ve
1542
+ treeMode: G,
1543
+ expandedRowKeys: o,
1544
+ defaultExpandedRowKeys: a,
1545
+ onExpandedRowsChange: s,
1546
+ indentSize: g,
1547
+ className: l = "",
1548
+ style: d,
1549
+ headerClassName: S = "",
1550
+ headerStyle: J,
1551
+ headerCellClassName: H = "",
1552
+ headerCellStyle: P,
1553
+ headerRowClassName: W = "",
1554
+ headerRowStyle: E,
1555
+ headerCellWrapperClassName: U = "",
1556
+ headerCellWrapperStyle: m,
1557
+ bodyClassName: V = "",
1558
+ bodyStyle: p,
1559
+ bodyRowClassName: I = "",
1560
+ bodyRowStyle: C,
1561
+ bodyCellClassName: k = "",
1562
+ bodyCellStyle: w,
1563
+ bodyCellWrapperClassName: b = "",
1564
+ bodyCellWrapperStyle: x,
1565
+ headerGroupRowClassName: $,
1566
+ headerGroupRowStyle: Z,
1567
+ headerGroupCellClassName: te,
1568
+ headerGroupCellStyle: ae,
1569
+ headerGroupCellWrapperClassName: ne,
1570
+ headerGroupCellWrapperStyle: N,
1571
+ paginationContainerClassName: O = "",
1572
+ paginationContainerStyle: D,
1573
+ resizeThrottle: ce = 0,
1574
+ virtualization: de,
1575
+ benchmark: le,
1576
+ resizeMode: fe = "instant"
2735
1577
  }) {
2736
- const Re = typeof ve == "boolean" ? ve : !1, { metrics: d, startResize: T, trackFrame: Y, endResize: x } = vr(Re);
2737
- return Ie(() => {
2738
- Re && d.totalFrames > 0 && (console.group("📊 Resize Benchmark (Mouse Move)"), console.log("Total Frames:", d.totalFrames), console.log("Last Frame Time:", `${d.lastFrameTime.toFixed(2)}ms`), console.log("Last FPS:", d.lastFps.toFixed(1)), console.log("Avg Frame Time:", `${d.avgFrameTime.toFixed(2)}ms`), console.log("Avg FPS:", d.avgFps.toFixed(1)), console.log("Min Frame Time:", `${d.minFrameTime.toFixed(2)}ms`), console.log("Max Frame Time:", `${d.maxFrameTime.toFixed(2)}ms`), console.log("Total Duration:", `${d.totalDuration.toFixed(2)}ms`), console.groupEnd());
2739
- }, [d, Re]), _ ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2740
- /* @__PURE__ */ l.jsx(
2741
- Zt,
1578
+ const r = typeof le == "boolean" ? le : !1, { metrics: f, startResize: A, trackFrame: u, endResize: T } = gt(r);
1579
+ return _e(() => {
1580
+ r && f.totalFrames > 0 && (console.group("📊 Resize Benchmark (Mouse Move)"), console.log("Total Frames:", f.totalFrames), console.log("Last Frame Time:", `${f.lastFrameTime.toFixed(2)}ms`), console.log("Last FPS:", f.lastFps.toFixed(1)), console.log("Avg Frame Time:", `${f.avgFrameTime.toFixed(2)}ms`), console.log("Avg FPS:", f.avgFps.toFixed(1)), console.log("Min Frame Time:", `${f.minFrameTime.toFixed(2)}ms`), console.log("Max Frame Time:", `${f.maxFrameTime.toFixed(2)}ms`), console.log("Total Duration:", `${f.totalDuration.toFixed(2)}ms`), console.groupEnd());
1581
+ }, [f, r]), z ? /* @__PURE__ */ ge(Se, { children: [
1582
+ /* @__PURE__ */ n(
1583
+ st,
2742
1584
  {
2743
- fullConfig: r,
2744
- onColumnReorder: P,
2745
- scrollContainerRef: h,
2746
- children: /* @__PURE__ */ l.jsx(
2747
- mt,
1585
+ fullConfig: i,
1586
+ onColumnReorder: Q,
1587
+ scrollContainerRef: j,
1588
+ children: /* @__PURE__ */ n(
1589
+ Ae,
2748
1590
  {
2749
- dataSource: t,
2750
- preset: i,
2751
- config: r,
2752
- rowKey: n,
2753
- loading: s,
2754
- pagination: o,
2755
- stickyHeader: a,
2756
- resizeable: c,
2757
- draggableRows: f,
2758
- draggableColumns: _,
2759
- scrollContainerRef: h,
2760
- onResize: k,
2761
- onSort: V,
2762
- onRowReorder: W,
2763
- onColumnReorder: P,
2764
- customCellRender: H,
2765
- sortIcon: J,
2766
- expandIcon: g,
2767
- treeMode: ae,
2768
- expandedRowKeys: p,
2769
- defaultExpandedRowKeys: w,
2770
- onExpandedRowsChange: y,
2771
- indentSize: b,
2772
- className: m,
2773
- style: j,
2774
- headerClassName: R,
2775
- headerStyle: M,
2776
- headerCellClassName: G,
2777
- headerCellStyle: F,
2778
- headerRowClassName: U,
2779
- headerRowStyle: te,
2780
- headerCellWrapperClassName: I,
2781
- headerCellWrapperStyle: z,
2782
- bodyClassName: K,
2783
- bodyStyle: $,
2784
- bodyRowClassName: le,
2785
- bodyRowStyle: A,
2786
- bodyCellClassName: O,
2787
- bodyCellStyle: S,
2788
- bodyCellWrapperClassName: C,
2789
- bodyCellWrapperStyle: X,
2790
- headerGroupRowClassName: D,
2791
- headerGroupRowStyle: ee,
2792
- headerGroupCellClassName: fe,
2793
- headerGroupCellStyle: ie,
2794
- headerGroupCellWrapperClassName: q,
2795
- headerGroupCellWrapperStyle: ne,
2796
- paginationContainerClassName: L,
2797
- paginationContainerStyle: ce,
1591
+ dataSource: e,
1592
+ preset: t,
1593
+ config: i,
1594
+ rowKey: h,
1595
+ loading: F,
1596
+ pagination: _,
1597
+ stickyHeader: v,
1598
+ resizeable: q,
1599
+ draggableRows: B,
1600
+ draggableColumns: z,
1601
+ scrollContainerRef: j,
1602
+ onResize: M,
1603
+ onSort: ie,
1604
+ onRowReorder: X,
1605
+ onColumnReorder: Q,
1606
+ customCellRender: R,
1607
+ sortIcon: ee,
1608
+ expandIcon: y,
1609
+ treeMode: G,
1610
+ expandedRowKeys: o,
1611
+ defaultExpandedRowKeys: a,
1612
+ onExpandedRowsChange: s,
1613
+ indentSize: g,
1614
+ className: l,
1615
+ style: d,
1616
+ headerClassName: S,
1617
+ headerStyle: J,
1618
+ headerCellClassName: H,
1619
+ headerCellStyle: P,
1620
+ headerRowClassName: W,
1621
+ headerRowStyle: E,
1622
+ headerCellWrapperClassName: U,
1623
+ headerCellWrapperStyle: m,
1624
+ bodyClassName: V,
1625
+ bodyStyle: p,
1626
+ bodyRowClassName: I,
1627
+ bodyRowStyle: C,
1628
+ bodyCellClassName: k,
1629
+ bodyCellStyle: w,
1630
+ bodyCellWrapperClassName: b,
1631
+ bodyCellWrapperStyle: x,
1632
+ headerGroupRowClassName: $,
1633
+ headerGroupRowStyle: Z,
1634
+ headerGroupCellClassName: te,
1635
+ headerGroupCellStyle: ae,
1636
+ headerGroupCellWrapperClassName: ne,
1637
+ headerGroupCellWrapperStyle: N,
1638
+ paginationContainerClassName: O,
1639
+ paginationContainerStyle: D,
2798
1640
  noDataRender: re,
2799
- recalculateRowHeight: Q,
2800
- sorting: E,
2801
- defaultSorting: N,
2802
- resizeThrottle: ye,
2803
- virtualization: pe,
2804
- onResizeStart: T,
2805
- onResizeFrame: Y,
2806
- onResizeEnd: x
1641
+ recalculateRowHeight: K,
1642
+ sorting: L,
1643
+ defaultSorting: c,
1644
+ resizeThrottle: ce,
1645
+ virtualization: de,
1646
+ onResizeStart: A,
1647
+ onResizeFrame: u,
1648
+ onResizeEnd: T,
1649
+ resizeMode: fe
2807
1650
  }
2808
1651
  )
2809
1652
  }
2810
1653
  ),
2811
- /* @__PURE__ */ l.jsx("div", { className: `radar-table-pagination-container ${L}`, style: ce, children: o && /* @__PURE__ */ l.jsx(pt, { config: o }) })
2812
- ] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2813
- /* @__PURE__ */ l.jsx(
2814
- mt,
1654
+ /* @__PURE__ */ n("div", { className: `radar-table-pagination-container ${O}`, style: D, children: _ && /* @__PURE__ */ n(Ie, { config: _ }) })
1655
+ ] }) : /* @__PURE__ */ ge(Se, { children: [
1656
+ /* @__PURE__ */ n(
1657
+ Ae,
2815
1658
  {
2816
- dataSource: t,
2817
- preset: i,
2818
- config: r,
2819
- rowKey: n,
2820
- loading: s,
2821
- pagination: o,
2822
- stickyHeader: a,
2823
- resizeable: c,
2824
- draggableRows: f,
2825
- draggableColumns: _,
2826
- scrollContainerRef: h,
2827
- onResize: k,
2828
- onSort: V,
2829
- onRowReorder: W,
2830
- onColumnReorder: P,
2831
- customCellRender: H,
2832
- sortIcon: J,
2833
- expandIcon: g,
2834
- treeMode: ae,
2835
- expandedRowKeys: p,
2836
- defaultExpandedRowKeys: w,
2837
- onExpandedRowsChange: y,
2838
- indentSize: b,
2839
- className: m,
2840
- style: j,
2841
- headerClassName: R,
2842
- headerStyle: M,
2843
- headerCellClassName: G,
2844
- headerCellStyle: F,
2845
- headerRowClassName: U,
2846
- headerRowStyle: te,
2847
- headerCellWrapperClassName: I,
2848
- headerCellWrapperStyle: z,
2849
- bodyClassName: K,
2850
- bodyStyle: $,
2851
- bodyRowClassName: le,
2852
- bodyRowStyle: A,
2853
- bodyCellClassName: O,
2854
- bodyCellStyle: S,
2855
- bodyCellWrapperClassName: C,
2856
- bodyCellWrapperStyle: X,
2857
- headerGroupRowClassName: D,
2858
- headerGroupRowStyle: ee,
2859
- headerGroupCellClassName: fe,
2860
- headerGroupCellStyle: ie,
2861
- headerGroupCellWrapperClassName: q,
2862
- headerGroupCellWrapperStyle: ne,
2863
- paginationContainerClassName: L,
2864
- paginationContainerStyle: ce,
1659
+ dataSource: e,
1660
+ preset: t,
1661
+ config: i,
1662
+ rowKey: h,
1663
+ loading: F,
1664
+ pagination: _,
1665
+ stickyHeader: v,
1666
+ resizeable: q,
1667
+ draggableRows: B,
1668
+ draggableColumns: z,
1669
+ scrollContainerRef: j,
1670
+ onResize: M,
1671
+ onSort: ie,
1672
+ onRowReorder: X,
1673
+ onColumnReorder: Q,
1674
+ customCellRender: R,
1675
+ sortIcon: ee,
1676
+ expandIcon: y,
1677
+ treeMode: G,
1678
+ expandedRowKeys: o,
1679
+ defaultExpandedRowKeys: a,
1680
+ onExpandedRowsChange: s,
1681
+ indentSize: g,
1682
+ className: l,
1683
+ style: d,
1684
+ headerClassName: S,
1685
+ headerStyle: J,
1686
+ headerCellClassName: H,
1687
+ headerCellStyle: P,
1688
+ headerRowClassName: W,
1689
+ headerRowStyle: E,
1690
+ headerCellWrapperClassName: U,
1691
+ headerCellWrapperStyle: m,
1692
+ bodyClassName: V,
1693
+ bodyStyle: p,
1694
+ bodyRowClassName: I,
1695
+ bodyRowStyle: C,
1696
+ bodyCellClassName: k,
1697
+ bodyCellStyle: w,
1698
+ bodyCellWrapperClassName: b,
1699
+ bodyCellWrapperStyle: x,
1700
+ headerGroupRowClassName: $,
1701
+ headerGroupRowStyle: Z,
1702
+ headerGroupCellClassName: te,
1703
+ headerGroupCellStyle: ae,
1704
+ headerGroupCellWrapperClassName: ne,
1705
+ headerGroupCellWrapperStyle: N,
1706
+ paginationContainerClassName: O,
1707
+ paginationContainerStyle: D,
2865
1708
  noDataRender: re,
2866
- recalculateRowHeight: Q,
2867
- sorting: E,
2868
- defaultSorting: N,
2869
- resizeThrottle: ye,
2870
- virtualization: pe,
2871
- onResizeStart: T,
2872
- onResizeFrame: Y,
2873
- onResizeEnd: x
1709
+ recalculateRowHeight: K,
1710
+ sorting: L,
1711
+ defaultSorting: c,
1712
+ resizeThrottle: ce,
1713
+ virtualization: de,
1714
+ onResizeStart: A,
1715
+ onResizeFrame: u,
1716
+ onResizeEnd: T,
1717
+ resizeMode: fe
2874
1718
  }
2875
1719
  ),
2876
- /* @__PURE__ */ l.jsx("div", { className: `radar-table-pagination-container ${L}`, style: ce, children: o && /* @__PURE__ */ l.jsx(pt, { config: o }) })
1720
+ /* @__PURE__ */ n("div", { className: `radar-table-pagination-container ${O}`, style: D, children: _ && /* @__PURE__ */ n(Ie, { config: _ }) })
2877
1721
  ] });
2878
1722
  }
2879
- function mt(t) {
1723
+ function Ae(e) {
2880
1724
  const {
2881
- dataSource: i,
2882
- preset: r,
2883
- config: n,
2884
- rowKey: s,
2885
- loading: o,
2886
- stickyHeader: a,
2887
- resizeable: c,
2888
- draggableRows: f,
2889
- draggableColumns: _,
2890
- scrollContainerRef: h,
2891
- onResize: k,
2892
- onResizeStart: V,
2893
- onResizeFrame: W,
2894
- onResizeEnd: P,
2895
- onSort: H,
1725
+ dataSource: t,
1726
+ preset: i,
1727
+ config: h,
1728
+ rowKey: F,
1729
+ loading: _,
1730
+ stickyHeader: v,
1731
+ resizeable: q,
1732
+ draggableRows: B,
1733
+ draggableColumns: z,
1734
+ scrollContainerRef: j,
1735
+ onResize: M,
1736
+ onResizeStart: ie,
1737
+ onResizeFrame: X,
1738
+ onResizeEnd: Q,
1739
+ onSort: R,
2896
1740
  onRowReorder: re,
2897
- onColumnReorder: J,
2898
- customCellRender: g,
2899
- sortIcon: Q,
2900
- expandIcon: E,
2901
- treeMode: N,
2902
- expandedRowKeys: ae,
2903
- defaultExpandedRowKeys: p,
2904
- onExpandedRowsChange: w,
2905
- indentSize: y,
2906
- className: b,
2907
- style: m,
2908
- headerClassName: j,
2909
- headerStyle: R,
2910
- headerCellClassName: M,
2911
- headerCellStyle: G,
2912
- headerRowClassName: F,
2913
- headerRowStyle: U,
2914
- headerCellWrapperClassName: te,
2915
- headerCellWrapperStyle: I,
2916
- bodyClassName: z,
2917
- bodyStyle: K,
2918
- bodyRowClassName: $,
2919
- bodyRowStyle: le,
2920
- bodyCellClassName: A,
2921
- bodyCellStyle: O,
2922
- bodyCellWrapperClassName: S,
2923
- bodyCellWrapperStyle: C,
2924
- headerGroupRowClassName: X,
2925
- headerGroupRowStyle: D,
2926
- headerGroupCellClassName: ee,
2927
- headerGroupCellStyle: fe,
2928
- headerGroupCellWrapperClassName: ie,
2929
- headerGroupCellWrapperStyle: q,
2930
- noDataRender: ne,
2931
- recalculateRowHeight: L,
2932
- sorting: ce,
2933
- defaultSorting: ye,
2934
- resizeThrottle: pe
2935
- } = t;
2936
- return /* @__PURE__ */ l.jsxs(
1741
+ onColumnReorder: ee,
1742
+ customCellRender: y,
1743
+ sortIcon: K,
1744
+ expandIcon: L,
1745
+ treeMode: c,
1746
+ expandedRowKeys: G,
1747
+ defaultExpandedRowKeys: o,
1748
+ onExpandedRowsChange: a,
1749
+ indentSize: s,
1750
+ className: g,
1751
+ style: l,
1752
+ headerClassName: d,
1753
+ headerStyle: S,
1754
+ headerCellClassName: J,
1755
+ headerCellStyle: H,
1756
+ headerRowClassName: P,
1757
+ headerRowStyle: W,
1758
+ headerCellWrapperClassName: E,
1759
+ headerCellWrapperStyle: U,
1760
+ bodyClassName: m,
1761
+ bodyStyle: V,
1762
+ bodyRowClassName: p,
1763
+ bodyRowStyle: I,
1764
+ bodyCellClassName: C,
1765
+ bodyCellStyle: k,
1766
+ bodyCellWrapperClassName: w,
1767
+ bodyCellWrapperStyle: b,
1768
+ headerGroupRowClassName: x,
1769
+ headerGroupRowStyle: $,
1770
+ headerGroupCellClassName: Z,
1771
+ headerGroupCellStyle: te,
1772
+ headerGroupCellWrapperClassName: ae,
1773
+ headerGroupCellWrapperStyle: ne,
1774
+ noDataRender: N,
1775
+ recalculateRowHeight: O,
1776
+ sorting: D,
1777
+ defaultSorting: ce,
1778
+ resizeThrottle: de,
1779
+ resizeMode: le
1780
+ } = e;
1781
+ return /* @__PURE__ */ ge(
2937
1782
  "table",
2938
1783
  {
2939
- className: `radar-table ${r || ""} ${b}`,
1784
+ className: `radar-table ${i || ""} ${g}`,
2940
1785
  style: {
2941
- tableLayout: c ? "fixed" : "auto",
2942
- width: c ? "max-content" : "auto",
2943
- ...m
1786
+ tableLayout: q ? "fixed" : "auto",
1787
+ width: q ? "max-content" : "auto",
1788
+ ...l
2944
1789
  },
2945
1790
  children: [
2946
- /* @__PURE__ */ l.jsx(
2947
- er,
1791
+ /* @__PURE__ */ n(
1792
+ lt,
2948
1793
  {
2949
- draggableColumns: _,
2950
- config: n,
2951
- onSort: H,
2952
- resizeable: c,
2953
- onResize: k,
2954
- onResizeStart: V,
2955
- onResizeFrame: W,
2956
- onResizeEnd: P,
2957
- sortIcon: Q,
2958
- preset: r,
2959
- headerClassName: j,
2960
- headerStyle: R,
2961
- headerRowClassName: F,
2962
- headerRowStyle: U,
2963
- headerCellClassName: M,
2964
- headerCellStyle: G,
2965
- headerCellWrapperClassName: te,
2966
- headerCellWrapperStyle: I,
2967
- headerGroupRowClassName: X,
2968
- headerGroupRowStyle: D,
2969
- headerGroupCellClassName: ee,
2970
- headerGroupCellStyle: fe,
2971
- headerGroupCellWrapperClassName: ie,
2972
- headerGroupCellWrapperStyle: q,
2973
- stickyHeader: a,
2974
- scrollContainerRef: h,
2975
- onColumnReorder: J,
2976
- sorting: ce,
2977
- defaultSorting: ye,
2978
- resizeThrottle: pe
1794
+ draggableColumns: z,
1795
+ config: h,
1796
+ onSort: R,
1797
+ resizeable: q,
1798
+ onResize: M,
1799
+ onResizeStart: ie,
1800
+ onResizeFrame: X,
1801
+ onResizeEnd: Q,
1802
+ sortIcon: K,
1803
+ preset: i,
1804
+ headerClassName: d,
1805
+ headerStyle: S,
1806
+ headerRowClassName: P,
1807
+ headerRowStyle: W,
1808
+ headerCellClassName: J,
1809
+ headerCellStyle: H,
1810
+ headerCellWrapperClassName: E,
1811
+ headerCellWrapperStyle: U,
1812
+ headerGroupRowClassName: x,
1813
+ headerGroupRowStyle: $,
1814
+ headerGroupCellClassName: Z,
1815
+ headerGroupCellStyle: te,
1816
+ headerGroupCellWrapperClassName: ae,
1817
+ headerGroupCellWrapperStyle: ne,
1818
+ stickyHeader: v,
1819
+ scrollContainerRef: j,
1820
+ onColumnReorder: ee,
1821
+ sorting: D,
1822
+ defaultSorting: ce,
1823
+ resizeThrottle: de,
1824
+ resizeMode: le
2979
1825
  }
2980
1826
  ),
2981
- /* @__PURE__ */ l.jsx(
2982
- yr,
1827
+ /* @__PURE__ */ n(
1828
+ ft,
2983
1829
  {
2984
- draggableRows: f,
1830
+ draggableRows: B,
2985
1831
  onRowReorder: re,
2986
- dataSource: i,
2987
- config: n,
2988
- rowKey: s,
2989
- loading: o,
2990
- preset: r,
2991
- customCellRender: g,
2992
- expandIcon: E,
2993
- treeMode: N,
2994
- expandedRowKeys: ae,
2995
- defaultExpandedRowKeys: p,
2996
- onExpandedRowsChange: w,
2997
- indentSize: y,
2998
- bodyClassName: z,
2999
- bodyStyle: K,
3000
- bodyRowClassName: $,
3001
- bodyRowStyle: le,
3002
- bodyCellClassName: A,
3003
- bodyCellStyle: O,
3004
- bodyCellWrapperClassName: S,
3005
- bodyCellWrapperStyle: C,
3006
- noDataRender: ne,
3007
- scrollContainerRef: h,
3008
- recalculateRowHeight: L,
3009
- virtualization: t.virtualization
1832
+ dataSource: t,
1833
+ config: h,
1834
+ rowKey: F,
1835
+ loading: _,
1836
+ preset: i,
1837
+ customCellRender: y,
1838
+ expandIcon: L,
1839
+ treeMode: c,
1840
+ expandedRowKeys: G,
1841
+ defaultExpandedRowKeys: o,
1842
+ onExpandedRowsChange: a,
1843
+ indentSize: s,
1844
+ bodyClassName: m,
1845
+ bodyStyle: V,
1846
+ bodyRowClassName: p,
1847
+ bodyRowStyle: I,
1848
+ bodyCellClassName: C,
1849
+ bodyCellStyle: k,
1850
+ bodyCellWrapperClassName: w,
1851
+ bodyCellWrapperStyle: b,
1852
+ noDataRender: N,
1853
+ scrollContainerRef: j,
1854
+ recalculateRowHeight: O,
1855
+ virtualization: e.virtualization
3010
1856
  }
3011
1857
  )
3012
1858
  ]
3013
1859
  }
3014
1860
  );
3015
1861
  }
3016
- const yt = ({ children: t, tagType: i = "h1", ...r }) => {
3017
- if (i === "h1")
3018
- return /* @__PURE__ */ l.jsx(
1862
+ const Be = ({ children: e, tagType: t = "h1", ...i }) => {
1863
+ if (t === "h1")
1864
+ return /* @__PURE__ */ n(
3019
1865
  "h1",
3020
1866
  {
3021
1867
  className: "radar-title radar-title_h1",
3022
- ...r,
3023
- children: t
1868
+ ...i,
1869
+ children: e
3024
1870
  }
3025
1871
  );
3026
- if (i === "h2")
3027
- return /* @__PURE__ */ l.jsx(
1872
+ if (t === "h2")
1873
+ return /* @__PURE__ */ n(
3028
1874
  "h2",
3029
1875
  {
3030
1876
  className: "radar-title radar-title_h1",
3031
- ...r,
3032
- children: t
1877
+ ...i,
1878
+ children: e
3033
1879
  }
3034
1880
  );
3035
- if (i === "h3")
3036
- return /* @__PURE__ */ l.jsx(
1881
+ if (t === "h3")
1882
+ return /* @__PURE__ */ n(
3037
1883
  "h3",
3038
1884
  {
3039
1885
  className: "radar-title radar-title_h1",
3040
- ...r,
3041
- children: t
1886
+ ...i,
1887
+ children: e
3042
1888
  }
3043
1889
  );
3044
- if (i === "h4")
3045
- return /* @__PURE__ */ l.jsx(
1890
+ if (t === "h4")
1891
+ return /* @__PURE__ */ n(
3046
1892
  "h4",
3047
1893
  {
3048
1894
  className: "radar-title radar-title_h1",
3049
- ...r,
3050
- children: t
1895
+ ...i,
1896
+ children: e
3051
1897
  }
3052
1898
  );
3053
- if (i === "h5")
3054
- return /* @__PURE__ */ l.jsx(
1899
+ if (t === "h5")
1900
+ return /* @__PURE__ */ n(
3055
1901
  "h5",
3056
1902
  {
3057
1903
  className: "radar-title radar-title_h1",
3058
- ...r,
3059
- children: t
1904
+ ...i,
1905
+ children: e
3060
1906
  }
3061
1907
  );
3062
- if (i === "h6")
3063
- return /* @__PURE__ */ l.jsx(
1908
+ if (t === "h6")
1909
+ return /* @__PURE__ */ n(
3064
1910
  "h6",
3065
1911
  {
3066
1912
  className: "radar-title radar-title_h1",
3067
- ...r,
3068
- children: t
1913
+ ...i,
1914
+ children: e
3069
1915
  }
3070
1916
  );
3071
- }, br = ({ children: t, tagType: i = "h2", ...r }) => {
3072
- if (i === "h1")
3073
- return /* @__PURE__ */ l.jsx(
1917
+ }, yt = ({ children: e, tagType: t = "h2", ...i }) => {
1918
+ if (t === "h1")
1919
+ return /* @__PURE__ */ n(
3074
1920
  "h1",
3075
1921
  {
3076
1922
  className: "radar-title radar-title_h2",
3077
- ...r,
3078
- children: t
1923
+ ...i,
1924
+ children: e
3079
1925
  }
3080
1926
  );
3081
- if (i === "h2")
3082
- return /* @__PURE__ */ l.jsx(
1927
+ if (t === "h2")
1928
+ return /* @__PURE__ */ n(
3083
1929
  "h2",
3084
1930
  {
3085
1931
  className: "radar-title radar-title_h2",
3086
- ...r,
3087
- children: t
1932
+ ...i,
1933
+ children: e
3088
1934
  }
3089
1935
  );
3090
- if (i === "h3")
3091
- return /* @__PURE__ */ l.jsx(
1936
+ if (t === "h3")
1937
+ return /* @__PURE__ */ n(
3092
1938
  "h3",
3093
1939
  {
3094
1940
  className: "radar-title radar-title_h2",
3095
- ...r,
3096
- children: t
1941
+ ...i,
1942
+ children: e
3097
1943
  }
3098
1944
  );
3099
- if (i === "h4")
3100
- return /* @__PURE__ */ l.jsx(
1945
+ if (t === "h4")
1946
+ return /* @__PURE__ */ n(
3101
1947
  "h4",
3102
1948
  {
3103
1949
  className: "radar-title radar-title_h2",
3104
- ...r,
3105
- children: t
1950
+ ...i,
1951
+ children: e
3106
1952
  }
3107
1953
  );
3108
- if (i === "h5")
3109
- return /* @__PURE__ */ l.jsx(
1954
+ if (t === "h5")
1955
+ return /* @__PURE__ */ n(
3110
1956
  "h5",
3111
1957
  {
3112
1958
  className: "radar-title radar-title_h2",
3113
- ...r,
3114
- children: t
1959
+ ...i,
1960
+ children: e
3115
1961
  }
3116
1962
  );
3117
- if (i === "h6")
3118
- return /* @__PURE__ */ l.jsx(
1963
+ if (t === "h6")
1964
+ return /* @__PURE__ */ n(
3119
1965
  "h6",
3120
1966
  {
3121
1967
  className: "radar-title radar-title_h2",
3122
- ...r,
3123
- children: t
1968
+ ...i,
1969
+ children: e
3124
1970
  }
3125
1971
  );
3126
- }, kr = Object.assign(yt, { H1: yt, H2: br }), vt = ({ children: t, fontStyle: i = "medium", ...r }) => /* @__PURE__ */ l.jsx("p", { className: `radar-text radar-text_m radar-text_${i}`, ...r, children: t }), xr = ({ children: t, fontStyle: i = "medium", ...r }) => /* @__PURE__ */ l.jsx("p", { className: `radar-text radar-text_s radar-text_${i}`, ...r, children: t }), jr = Object.assign(vt, { M: vt, S: xr });
1972
+ }, Ct = Object.assign(Be, { H1: Be, H2: yt }), Me = ({ children: e, fontStyle: t = "medium", ...i }) => /* @__PURE__ */ n("p", { className: `radar-text radar-text_m radar-text_${t}`, ...i, children: e }), pt = ({ children: e, fontStyle: t = "medium", ...i }) => /* @__PURE__ */ n("p", { className: `radar-text radar-text_s radar-text_${t}`, ...i, children: e }), kt = Object.assign(Me, { M: Me, S: pt });
3127
1973
  export {
3128
- Qt as HeaderCell,
3129
- pt as Pagination,
3130
- jr as RadarText,
3131
- kr as RadarTitle,
3132
- Sr as Table,
3133
- Yt as Tooltip
1974
+ ot as HeaderCell,
1975
+ Ie as Pagination,
1976
+ kt as RadarText,
1977
+ Ct as RadarTitle,
1978
+ vt as Table,
1979
+ rt as Tooltip
3134
1980
  };