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