@interopio/groups-ui-react 4.5.0-next.0 → 4.5.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/featureDetector.d.ts +6 -0
- package/dist/cjs/index.js +886 -873
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/internal.d.ts +2 -0
- package/dist/esm/featureDetector.d.ts +6 -0
- package/dist/esm/index.js +886 -873
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/internal.d.ts +2 -0
- package/dist/styles/groups.css +4 -0
- package/dist/styles/vars.css +1 -1
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
3
|
import o__default, { useRef, useEffect, useLayoutEffect, useState, useContext, forwardRef, useCallback, createContext, useMemo, useImperativeHandle, Fragment as Fragment$1, memo, Component, useId } from "react";
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
4
|
+
import * as w from "react-dom";
|
|
5
|
+
import w__default from "react-dom";
|
|
6
6
|
import { IOConnectContext } from "@interopio/react-hooks";
|
|
7
7
|
var StandardButtonTarget = /* @__PURE__ */ ((StandardButtonTarget2) => {
|
|
8
8
|
StandardButtonTarget2["Default"] = "default";
|
|
@@ -171,8 +171,8 @@ class WebGroupsManagerDecorator {
|
|
|
171
171
|
removePopupById(elementId) {
|
|
172
172
|
return window.webGroupsManager.removePopupById(elementId);
|
|
173
173
|
}
|
|
174
|
-
subscribeForWindowFocused(
|
|
175
|
-
return window.webGroupsManager.subscribeForWindowFocused(
|
|
174
|
+
subscribeForWindowFocused(cb2) {
|
|
175
|
+
return window.webGroupsManager.subscribeForWindowFocused(cb2);
|
|
176
176
|
}
|
|
177
177
|
unmount() {
|
|
178
178
|
return window.webGroupsManager.unmount();
|
|
@@ -499,8 +499,8 @@ function getLuminance(color) {
|
|
|
499
499
|
const channel = x / 255;
|
|
500
500
|
return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
|
|
501
501
|
}
|
|
502
|
-
const [r2, g,
|
|
503
|
-
return 0.2126 * f(r2) + 0.7152 * f(g) + 0.0722 * f(
|
|
502
|
+
const [r2, g, b] = parseToRgba(color);
|
|
503
|
+
return 0.2126 * f(r2) + 0.7152 * f(g) + 0.0722 * f(b);
|
|
504
504
|
}
|
|
505
505
|
function readableColorIsBlack(color) {
|
|
506
506
|
return getLuminance(color) > 0.179;
|
|
@@ -510,8 +510,8 @@ function IsBlackReadable(color) {
|
|
|
510
510
|
const rgba = parseToRgba(color);
|
|
511
511
|
const r2 = rgba[0];
|
|
512
512
|
const g = rgba[1];
|
|
513
|
-
const
|
|
514
|
-
const backgroundWeight = (0.2126 * r2 + 0.7152 * g + 0.0722 *
|
|
513
|
+
const b = rgba[2];
|
|
514
|
+
const backgroundWeight = (0.2126 * r2 + 0.7152 * g + 0.0722 * b) / 255;
|
|
515
515
|
return backgroundWeight > 0.5;
|
|
516
516
|
} catch {
|
|
517
517
|
}
|
|
@@ -736,13 +736,13 @@ const FlatButtons = ({ extract, downloads, minimize, maximize, restore, close, l
|
|
|
736
736
|
};
|
|
737
737
|
const waitForWindow = (io2, windowId) => {
|
|
738
738
|
return new Promise((res, rej) => {
|
|
739
|
-
const unsub = io2.windows.onWindowAdded((
|
|
740
|
-
if (
|
|
741
|
-
res(
|
|
739
|
+
const unsub = io2.windows.onWindowAdded((w2) => {
|
|
740
|
+
if (w2.id === windowId) {
|
|
741
|
+
res(w2);
|
|
742
742
|
unsub();
|
|
743
743
|
}
|
|
744
744
|
});
|
|
745
|
-
const windowInCollection = io2.windows.list().find((
|
|
745
|
+
const windowInCollection = io2.windows.list().find((w2) => w2.id === windowId);
|
|
746
746
|
if (windowInCollection) {
|
|
747
747
|
res(windowInCollection);
|
|
748
748
|
unsub();
|
|
@@ -966,7 +966,7 @@ var ResizeObserverController = (
|
|
|
966
966
|
this.connected_ = false;
|
|
967
967
|
};
|
|
968
968
|
ResizeObserverController2.prototype.onTransitionEnd_ = function(_a2) {
|
|
969
|
-
var
|
|
969
|
+
var _b2 = _a2.propertyName, propertyName = _b2 === void 0 ? "" : _b2;
|
|
970
970
|
var isReflowProperty = transitionKeys.some(function(key) {
|
|
971
971
|
return !!~propertyName.indexOf(key);
|
|
972
972
|
});
|
|
@@ -1468,7 +1468,7 @@ const FlatMoveArea = ({ children, moveAreaId }) => {
|
|
|
1468
1468
|
return /* @__PURE__ */ jsx("div", { id: moveAreaId, className: "t42-move-area t42-frame-caption-bar-element", children });
|
|
1469
1469
|
};
|
|
1470
1470
|
const BaseMultiChannelSelector = ({ outsideClass, contentClass, showSelector, selectedChannels, channelLabel, channelRestrictions }) => {
|
|
1471
|
-
var _a2,
|
|
1471
|
+
var _a2, _b2;
|
|
1472
1472
|
const ref = useRef(null);
|
|
1473
1473
|
const len = selectedChannels.length;
|
|
1474
1474
|
const showBaseChannelSelector = len < 2;
|
|
@@ -1504,7 +1504,7 @@ const BaseMultiChannelSelector = ({ outsideClass, contentClass, showSelector, se
|
|
|
1504
1504
|
{
|
|
1505
1505
|
showSelector,
|
|
1506
1506
|
selectedChannel: (_a2 = selectedChannels[0]) == null ? void 0 : _a2.name,
|
|
1507
|
-
selectedChannelColor: (
|
|
1507
|
+
selectedChannelColor: (_b2 = selectedChannels[0]) == null ? void 0 : _b2.color,
|
|
1508
1508
|
outsideClass,
|
|
1509
1509
|
contentClass,
|
|
1510
1510
|
channelLabel,
|
|
@@ -1853,9 +1853,20 @@ if (process.env.NODE_ENV === "production") {
|
|
|
1853
1853
|
shim.exports = requireUseSyncExternalStoreShim_development();
|
|
1854
1854
|
}
|
|
1855
1855
|
var shimExports = shim.exports;
|
|
1856
|
+
class WebGroupsFeatureDetector {
|
|
1857
|
+
isFeatureSupported(feature) {
|
|
1858
|
+
switch (feature) {
|
|
1859
|
+
case "internal-universal-popups":
|
|
1860
|
+
return true;
|
|
1861
|
+
default:
|
|
1862
|
+
return false;
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
const featureDetector = new WebGroupsFeatureDetector();
|
|
1856
1867
|
class GroupWrapper extends o__default.Component {
|
|
1857
1868
|
componentDidMount() {
|
|
1858
|
-
var _a2,
|
|
1869
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
1859
1870
|
const componentFactory = {
|
|
1860
1871
|
createGroupCaptionBar: this.props.onCreateGroupCaptionBarRequested,
|
|
1861
1872
|
updateGroupCaptionBar: this.props.onUpdateGroupCaptionBarRequested,
|
|
@@ -1903,16 +1914,17 @@ class GroupWrapper extends o__default.Component {
|
|
|
1903
1914
|
commitCaptionEditing: this.props.onCommitCaptionEditingRequested,
|
|
1904
1915
|
hideCaptionEditor: this.props.onHideCaptionEditorRequested,
|
|
1905
1916
|
showLoadingAnimation: this.props.onShowLoadingAnimationRequested,
|
|
1906
|
-
hideLoadingAnimation: this.props.onHideLoadingAnimationRequested
|
|
1917
|
+
hideLoadingAnimation: this.props.onHideLoadingAnimationRequested,
|
|
1918
|
+
isFeatureSupported: featureDetector.isFeatureSupported.bind(featureDetector)
|
|
1907
1919
|
};
|
|
1908
1920
|
webGroupsManager.init(void 0, componentFactory);
|
|
1909
|
-
webGroupsManager.updateTabHeaderStyles(((
|
|
1921
|
+
webGroupsManager.updateTabHeaderStyles(((_b2 = (_a2 = this.props.styles) == null ? void 0 : _a2.tabs) == null ? void 0 : _b2.header) ?? {});
|
|
1910
1922
|
webGroupsManager.updateTabMoveAreaStyles(((_d2 = (_c2 = this.props.styles) == null ? void 0 : _c2.tabs) == null ? void 0 : _d2.moveArea) ?? {});
|
|
1911
1923
|
webGroupsManager.updateFrameStyles(((_f2 = (_e2 = this.props.styles) == null ? void 0 : _e2.frame) == null ? void 0 : _f2.element) ?? {});
|
|
1912
1924
|
}
|
|
1913
1925
|
componentDidUpdate(prevProps, prevState, snapshot) {
|
|
1914
|
-
var _a2,
|
|
1915
|
-
if (((
|
|
1926
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i2, _j, _k, _l2, _m, _n2, _o2, _p2, _q, _r2;
|
|
1927
|
+
if (((_b2 = (_a2 = this.props.styles) == null ? void 0 : _a2.tabs) == null ? void 0 : _b2.header) !== ((_d2 = (_c2 = prevProps.styles) == null ? void 0 : _c2.tabs) == null ? void 0 : _d2.header)) {
|
|
1916
1928
|
webGroupsManager.updateTabHeaderStyles(((_f2 = (_e2 = this.props.styles) == null ? void 0 : _e2.tabs) == null ? void 0 : _f2.header) ?? {});
|
|
1917
1929
|
}
|
|
1918
1930
|
if (((_h = (_g2 = this.props.styles) == null ? void 0 : _g2.tabs) == null ? void 0 : _h.moveArea) !== ((_j = (_i2 = prevProps.styles) == null ? void 0 : _i2.tabs) == null ? void 0 : _j.moveArea)) {
|
|
@@ -1930,7 +1942,7 @@ class GroupWrapper extends o__default.Component {
|
|
|
1930
1942
|
}
|
|
1931
1943
|
class Portal extends o__default.Component {
|
|
1932
1944
|
render() {
|
|
1933
|
-
return
|
|
1945
|
+
return w__default.createPortal(this.props.children, this.props.parentElement);
|
|
1934
1946
|
}
|
|
1935
1947
|
}
|
|
1936
1948
|
class WebGroupsStore {
|
|
@@ -1968,10 +1980,10 @@ class WebGroupsStore {
|
|
|
1968
1980
|
htmlButtons: {}
|
|
1969
1981
|
// dict frameId to crate html buttons options
|
|
1970
1982
|
};
|
|
1971
|
-
this.subscribe = (
|
|
1972
|
-
this.listeners.add(
|
|
1983
|
+
this.subscribe = (cb2) => {
|
|
1984
|
+
this.listeners.add(cb2);
|
|
1973
1985
|
return () => {
|
|
1974
|
-
this.listeners.delete(
|
|
1986
|
+
this.listeners.delete(cb2);
|
|
1975
1987
|
};
|
|
1976
1988
|
};
|
|
1977
1989
|
this.getSnapshot = () => {
|
|
@@ -2490,8 +2502,8 @@ class WebGroupsStore {
|
|
|
2490
2502
|
};
|
|
2491
2503
|
});
|
|
2492
2504
|
};
|
|
2493
|
-
this.setState = (
|
|
2494
|
-
this.state =
|
|
2505
|
+
this.setState = (cb2) => {
|
|
2506
|
+
this.state = cb2(this.state);
|
|
2495
2507
|
this.listeners.forEach((l) => l());
|
|
2496
2508
|
};
|
|
2497
2509
|
}
|
|
@@ -2504,7 +2516,7 @@ const FrameLoadingAnimation = ({ show }) => {
|
|
|
2504
2516
|
] }) : /* @__PURE__ */ jsx(Fragment, {});
|
|
2505
2517
|
};
|
|
2506
2518
|
const GroupElementCreationWrapper = ({ components, styles }) => {
|
|
2507
|
-
var _a2,
|
|
2519
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i2, _j, _k, _l2, _m, _n2, _o2, _p2, _q, _r2, _s, _t2, _u2, _v, _w, _x;
|
|
2508
2520
|
const state = shimExports.useSyncExternalStore(webGroupsStore.subscribe, webGroupsStore.getSnapshot);
|
|
2509
2521
|
const LoadingAnimation = ((_a2 = components == null ? void 0 : components.frame) == null ? void 0 : _a2.LoadingAnimation) ?? FrameLoadingAnimation;
|
|
2510
2522
|
const renderGroupCaptionBar = () => {
|
|
@@ -3166,7 +3178,7 @@ const GroupElementCreationWrapper = ({ components, styles }) => {
|
|
|
3166
3178
|
/* @__PURE__ */ jsx(
|
|
3167
3179
|
GroupWrapper,
|
|
3168
3180
|
{
|
|
3169
|
-
onCreateGroupCaptionBarRequested: ((
|
|
3181
|
+
onCreateGroupCaptionBarRequested: ((_b2 = components == null ? void 0 : components.group) == null ? void 0 : _b2.CaptionBar) ? webGroupsStore.onCreateGroupCaptionBarRequested : void 0,
|
|
3170
3182
|
onCreateGroupOverlayRequested: ((_c2 = components == null ? void 0 : components.group) == null ? void 0 : _c2.Overlay) ? webGroupsStore.onCreateGroupOverlayRequested : void 0,
|
|
3171
3183
|
onCreateFrameCaptionBarRequested: ((_d2 = components == null ? void 0 : components.flat) == null ? void 0 : _d2.CaptionBar) ? webGroupsStore.onCreateFrameCaptionBarRequested : void 0,
|
|
3172
3184
|
onCreateFrameWindowOverlayRequested: ((_e2 = components == null ? void 0 : components.frame) == null ? void 0 : _e2.Overlay) ? webGroupsStore.onCreateFrameWindowOverlayRequested : void 0,
|
|
@@ -3191,7 +3203,7 @@ const GroupElementCreationWrapper = ({ components, styles }) => {
|
|
|
3191
3203
|
onUpdateAboveTabsRequested: ((_t2 = components == null ? void 0 : components.tabs) == null ? void 0 : _t2.Above) ? webGroupsStore.onUpdateAboveTabsRequested : void 0,
|
|
3192
3204
|
onUpdateBeforeTabsComponentRequested: ((_u2 = components == null ? void 0 : components.tabs) == null ? void 0 : _u2.Before) ? webGroupsStore.onUpdateBeforeTabsRequested : void 0,
|
|
3193
3205
|
onUpdateTabRequested: ((_v = components == null ? void 0 : components.tabs) == null ? void 0 : _v.Element) ? webGroupsStore.onUpdateTabElementRequested : void 0,
|
|
3194
|
-
onUpdateAfterTabsComponentRequested: ((
|
|
3206
|
+
onUpdateAfterTabsComponentRequested: ((_w = components == null ? void 0 : components.tabs) == null ? void 0 : _w.After) ? webGroupsStore.onUpdateAfterTabsRequested : void 0,
|
|
3195
3207
|
onUpdateBelowTabsRequested: ((_x = components == null ? void 0 : components.tabs) == null ? void 0 : _x.Below) ? webGroupsStore.onUpdateBelowTabsRequested : void 0,
|
|
3196
3208
|
onRemoveFrameCaptionBarRequested: webGroupsStore.onRemoveFrameCaptionBarRequested,
|
|
3197
3209
|
onRemoveFrameWindowOverlayRequested: webGroupsStore.onRemoveFrameWindowOverlayRequested,
|
|
@@ -3221,13 +3233,13 @@ function useIOConnectWindow(windowId) {
|
|
|
3221
3233
|
const [IOConnectWindow, setIOConnectWindow] = useState(void 0);
|
|
3222
3234
|
const io2 = window.io || useContext(IOConnectContext);
|
|
3223
3235
|
useEffect(() => {
|
|
3224
|
-
const unsub = io2.windows.onWindowAdded((
|
|
3225
|
-
if (
|
|
3226
|
-
setIOConnectWindow(
|
|
3236
|
+
const unsub = io2.windows.onWindowAdded((w2) => {
|
|
3237
|
+
if (w2.id === windowId) {
|
|
3238
|
+
setIOConnectWindow(w2);
|
|
3227
3239
|
unsub();
|
|
3228
3240
|
}
|
|
3229
3241
|
});
|
|
3230
|
-
const windowInCollection = io2.windows.list().find((
|
|
3242
|
+
const windowInCollection = io2.windows.list().find((w2) => w2.id === windowId);
|
|
3231
3243
|
if (windowInCollection) {
|
|
3232
3244
|
setIOConnectWindow(windowInCollection);
|
|
3233
3245
|
unsub();
|
|
@@ -3331,16 +3343,16 @@ const TabOverflowPopup = ({
|
|
|
3331
3343
|
hiddenTabsToTheRight.length > 0 && createSection(hiddenTabsToTheRight, "Open right")
|
|
3332
3344
|
] });
|
|
3333
3345
|
};
|
|
3334
|
-
function
|
|
3346
|
+
function C(e) {
|
|
3335
3347
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3336
3348
|
}
|
|
3337
|
-
var
|
|
3349
|
+
var S, N = { exports: {} };
|
|
3338
3350
|
/*!
|
|
3339
3351
|
Copyright (c) 2018 Jed Watson.
|
|
3340
3352
|
Licensed under the MIT License (MIT), see
|
|
3341
3353
|
http://jedwatson.github.io/classnames
|
|
3342
3354
|
*/
|
|
3343
|
-
|
|
3355
|
+
S = N, function() {
|
|
3344
3356
|
var e = {}.hasOwnProperty;
|
|
3345
3357
|
function t() {
|
|
3346
3358
|
for (var e2 = "", t2 = 0; t2 < arguments.length; t2++) {
|
|
@@ -3366,22 +3378,22 @@ C = N, function() {
|
|
|
3366
3378
|
function o2(e2, t2) {
|
|
3367
3379
|
return t2 ? e2 ? e2 + " " + t2 : e2 + t2 : e2;
|
|
3368
3380
|
}
|
|
3369
|
-
|
|
3381
|
+
S.exports ? (t.default = t, S.exports = t) : window.classNames = t;
|
|
3370
3382
|
}();
|
|
3371
|
-
var E =
|
|
3372
|
-
function
|
|
3383
|
+
var E = C(N.exports);
|
|
3384
|
+
function P({ className: t, size: n = "16", variant: o2 = "workspace", ...i }) {
|
|
3373
3385
|
const r2 = E("icon", n && [`icon-size-${n}`], t);
|
|
3374
3386
|
return jsx("span", { className: r2, "aria-label": `icon-${o2}`, role: "presentation", ...i, children: jsx("i", { className: `icon-${o2}` }) });
|
|
3375
3387
|
}
|
|
3376
|
-
const
|
|
3388
|
+
const I = forwardRef(({ className: t, variant: n = "default", icon: o2 = "workspace", size: i = "16", tooltip: r2, iconSize: s = "16", onClick: c, disabled: l, children: u, ...d }, f) => {
|
|
3377
3389
|
const p = E("io-btn-icon", "default" !== n && [`io-btn-icon-${n}`], [`io-btn-icon-size-${i}`], t), m = useCallback((e) => {
|
|
3378
3390
|
if (!l)
|
|
3379
3391
|
return c ? c(e) : void 0;
|
|
3380
3392
|
e.preventDefault();
|
|
3381
3393
|
}, [c, l]);
|
|
3382
|
-
return jsx("button", { className: p, type: "button", ref: f, "aria-label": "icon button", "aria-disabled": l, title: r2, onClick: m, disabled: l, ...d, children: u ?? (o2 && jsx(
|
|
3394
|
+
return jsx("button", { className: p, type: "button", ref: f, "aria-label": "icon button", "aria-disabled": l, title: r2, onClick: m, disabled: l, ...d, children: u ?? (o2 && jsx(P, { variant: o2, size: s })) });
|
|
3383
3395
|
});
|
|
3384
|
-
|
|
3396
|
+
I.displayName = "ButtonIcon";
|
|
3385
3397
|
function L({ className: t, variant: n = "default", children: o2, ...i }) {
|
|
3386
3398
|
const r2 = E("io-badge", "default" !== n && [`io-badge-${n}`], t);
|
|
3387
3399
|
return jsx("div", { className: r2, ...i, children: o2 });
|
|
@@ -3429,7 +3441,7 @@ const $ = forwardRef(({ className: n, variant: o2 = "default", size: i = "normal
|
|
|
3429
3441
|
}, [u, d]), y = useCallback((e) => {
|
|
3430
3442
|
d || R(e) && (e.preventDefault(), g(e));
|
|
3431
3443
|
}, [g, d]);
|
|
3432
|
-
return jsxs("button", { className: h, ref: m, type: "button", "aria-disabled": d, onClick: g, onKeyDown: y, disabled: d, tabIndex: 0, ...p, children: [r2 && !c && jsx(
|
|
3444
|
+
return jsxs("button", { className: h, ref: m, type: "button", "aria-disabled": d, onClick: g, onKeyDown: y, disabled: d, tabIndex: 0, ...p, children: [r2 && !c && jsx(P, { variant: r2, size: s }), f ?? l, r2 && c && jsx(P, { variant: r2, size: s })] });
|
|
3433
3445
|
});
|
|
3434
3446
|
$.displayName = "Button";
|
|
3435
3447
|
const _ = createContext({}), j = forwardRef(({ icon: t = "chevron-down", onClick: n, onKeyDown: o2, ...i }, r2) => {
|
|
@@ -3451,7 +3463,7 @@ const z = forwardRef(({ size: t = "32", onClick: n, onKeyDown: o2, ...i }, r2) =
|
|
|
3451
3463
|
}, [n, s]), p = useCallback((e) => {
|
|
3452
3464
|
o2 == null ? void 0 : o2(e), e.defaultPrevented || R(e) && (e.preventDefault(), e.stopPropagation(), s == null ? void 0 : s());
|
|
3453
3465
|
}, [o2, s]);
|
|
3454
|
-
return jsx(
|
|
3466
|
+
return jsx(I, { size: t, onClick: f, onKeyDown: p, disabled: l, ref: d, ...i });
|
|
3455
3467
|
});
|
|
3456
3468
|
function H({ className: t, ...n }) {
|
|
3457
3469
|
const o2 = E("io-dropdown-content", t);
|
|
@@ -3459,10 +3471,10 @@ function H({ className: t, ...n }) {
|
|
|
3459
3471
|
}
|
|
3460
3472
|
z.displayName = "DropdownButtonIcon";
|
|
3461
3473
|
const W = createContext({}), V = forwardRef((n, o2) => {
|
|
3462
|
-
const { className: i, prepend: r2, append: a, isSelected: s, onClick: l, description: u, disabled: d = false, children: f, tooltip: p, ...m } = n, { variant: h = "default", selected: g, checkIcon: y, handleItemClick: v } = useContext(W),
|
|
3474
|
+
const { className: i, prepend: r2, append: a, isSelected: s, onClick: l, description: u, disabled: d = false, children: f, tooltip: p, ...m } = n, { variant: h = "default", selected: g, checkIcon: y, handleItemClick: v } = useContext(W), b = s ?? (g == null ? void 0 : g.some((e) => e.children === f)), w2 = "default" !== h && !!y, k = w2 || r2, x = E("io-list-item", k && "io-list-item-left", a && "io-list-item-right", "default" !== h && b && "selected", u && "io-list-item-description", d && "io-list-item-disabled", i);
|
|
3463
3475
|
return jsxs("li", { className: x, ref: o2, role: "menuitem", "aria-roledescription": "menuitem", tabIndex: 0, onClick: (e) => {
|
|
3464
3476
|
d ? e.preventDefault() : (v == null ? void 0 : v(e, { children: f }), l == null ? void 0 : l(e));
|
|
3465
|
-
}, ...m, children: [k && jsxs("div", { className: "io-list-left-column", children: [
|
|
3477
|
+
}, ...m, children: [k && jsxs("div", { className: "io-list-left-column", children: [w2 && jsx(P, { variant: y.variant, title: b ? y.tooltip : void 0, "data-testid": "list-item-check-icon" }), r2] }), jsx("span", { className: "io-list-text", title: p, "data-testid": "list-item-title", children: f }), a && jsx("div", { className: "io-list-right-column", children: a }), u && jsx("div", { className: "io-list-text-description", children: u })] });
|
|
3466
3478
|
});
|
|
3467
3479
|
V.displayName = "ListItem";
|
|
3468
3480
|
const U = forwardRef(({ className: n, prepend: o2, append: i, children: r2, tooltip: a, ...s }, c) => {
|
|
@@ -3499,8 +3511,8 @@ const X = forwardRef((t, n) => {
|
|
|
3499
3511
|
if ("default" === i)
|
|
3500
3512
|
return;
|
|
3501
3513
|
const n2 = d.some((e2) => {
|
|
3502
|
-
var _a2,
|
|
3503
|
-
return ((_a2 = e2.children) == null ? void 0 : _a2.toString()) === ((
|
|
3514
|
+
var _a2, _b2;
|
|
3515
|
+
return ((_a2 = e2.children) == null ? void 0 : _a2.toString()) === ((_b2 = t2.children) == null ? void 0 : _b2.toString());
|
|
3504
3516
|
});
|
|
3505
3517
|
"single" === i ? f([t2]) : (() => {
|
|
3506
3518
|
const e2 = n2 ? d.filter((e3) => e3.children !== t2.children) : [...d, t2];
|
|
@@ -3550,7 +3562,7 @@ function ie(e, t, n) {
|
|
|
3550
3562
|
const re = forwardRef(({ className: t, variant: n = "outline", align: o2 = "down", disabled: i, isOpen: r2, onOpenChange: s, children: c, ...m }, h) => {
|
|
3551
3563
|
const g = useRef(null), y = useRef(null);
|
|
3552
3564
|
useImperativeHandle(h, () => y.current, []);
|
|
3553
|
-
const { isOpen: v, handleOpen:
|
|
3565
|
+
const { isOpen: v, handleOpen: b, handleClose: w2 } = ((e, t2) => {
|
|
3554
3566
|
const [n2, o3] = useState(false), i2 = void 0 !== e, r3 = i2 ? e : n2, s2 = useCallback((e2) => {
|
|
3555
3567
|
i2 || o3(e2), t2 == null ? void 0 : t2(e2);
|
|
3556
3568
|
}, [i2, t2]), c2 = useCallback(() => s2(true), [s2]), u = useCallback(() => s2(false), [s2]);
|
|
@@ -3570,12 +3582,12 @@ const re = forwardRef(({ className: t, variant: n = "outline", align: o2 = "down
|
|
|
3570
3582
|
cancelAnimationFrame(i2), document.removeEventListener("mousedown", o3, true);
|
|
3571
3583
|
};
|
|
3572
3584
|
}, [e, t2, n2]);
|
|
3573
|
-
})(y,
|
|
3574
|
-
v &&
|
|
3585
|
+
})(y, w2, v), ie(() => {
|
|
3586
|
+
v && w2();
|
|
3575
3587
|
}, ["Escape"], y), ie(() => {
|
|
3576
|
-
v || i || g.current !== document.activeElement ||
|
|
3588
|
+
v || i || g.current !== document.activeElement || b();
|
|
3577
3589
|
}, ["ArrowDown", "ArrowUp"], y);
|
|
3578
|
-
const k = useMemo(() => ({ variant: n, align: o2, disabled: i, isOpen: v, handleOpen:
|
|
3590
|
+
const k = useMemo(() => ({ variant: n, align: o2, disabled: i, isOpen: v, handleOpen: b, handleClose: w2, handleToggle: v ? w2 : b, setTriggerRef: (e) => g.current = e }), [n, o2, i, v, b, w2]), x = E("io-dropdown", v && "io-dropdown-open", "default" !== n && `io-dropdown-${n}`, t);
|
|
3579
3591
|
return jsx(_.Provider, { value: k, children: jsx("div", { className: x, ref: y, ...m, children: c }) });
|
|
3580
3592
|
});
|
|
3581
3593
|
function ae({ className: t, variant: n = "default", align: o2 = "left", children: i, ...r2 }) {
|
|
@@ -3614,7 +3626,7 @@ function fe({ className: n, variant: o2 = "default", title: i = "Dialog Title",
|
|
|
3614
3626
|
}, onKeyDown: (e) => {
|
|
3615
3627
|
const t = e.target instanceof HTMLDialogElement && "DIALOG" === e.target.nodeName;
|
|
3616
3628
|
r2 && s && " " === e.key && t && s();
|
|
3617
|
-
}, ...l, children: [jsxs(ce, { draggable: a, children: [jsx("h3", { "data-testid": "io-dialog-title", children: i }), jsx(ae, { children: jsx(
|
|
3629
|
+
}, ...l, children: [jsxs(ce, { draggable: a, children: [jsx("h3", { "data-testid": "io-dialog-title", children: i }), jsx(ae, { children: jsx(I, { className: "non-draggable", "data-testid": "io-dialog-close-button", size: "24", icon: "close", iconSize: "12", onClick: s, tabIndex: -1 }) })] }), c] });
|
|
3618
3630
|
}
|
|
3619
3631
|
function pe() {
|
|
3620
3632
|
return "undefined" != typeof window;
|
|
@@ -3636,24 +3648,24 @@ function ye(e) {
|
|
|
3636
3648
|
function ve(e) {
|
|
3637
3649
|
return !!pe() && (e instanceof Element || e instanceof he(e).Element);
|
|
3638
3650
|
}
|
|
3639
|
-
function
|
|
3651
|
+
function be(e) {
|
|
3640
3652
|
return !!pe() && (e instanceof HTMLElement || e instanceof he(e).HTMLElement);
|
|
3641
3653
|
}
|
|
3642
|
-
function
|
|
3654
|
+
function we(e) {
|
|
3643
3655
|
return !(!pe() || "undefined" == typeof ShadowRoot) && (e instanceof ShadowRoot || e instanceof he(e).ShadowRoot);
|
|
3644
3656
|
}
|
|
3645
|
-
re.Button = j, re.ButtonIcon = z, re.Content = H, re.List = Z, re.Item = ee, re.ItemTitle = te, re.ItemSection = ne, re.Separator = oe, ae.Button = $, ae.ButtonIcon =
|
|
3657
|
+
re.Button = j, re.ButtonIcon = z, re.Content = H, re.List = Z, re.Item = ee, re.ItemTitle = te, re.ItemSection = ne, re.Separator = oe, ae.Button = $, ae.ButtonIcon = I, ae.Dropdown = re, se.Title = D, se.ButtonGroup = ae, se.Button = $, se.ButtonIcon = I, se.Dropdown = re, ce.Title = D, ce.ButtonGroup = ae, ce.Button = $, ce.ButtonIcon = I, ce.Dropdown = re, le.Content = function({ className: t, children: n, ...o2 }) {
|
|
3646
3658
|
const i = E("io-dialog-content", t);
|
|
3647
3659
|
return jsx("div", { className: i, ...o2, children: n });
|
|
3648
|
-
}, ue.ButtonGroup = ae, ue.Button = $, ue.ButtonIcon =
|
|
3660
|
+
}, ue.ButtonGroup = ae, ue.Button = $, ue.ButtonIcon = I, ue.Dropdown = re, de.ButtonGroup = ae, de.Button = $, de.ButtonIcon = I, de.Dropdown = re, fe.Header = ce, fe.Body = le, fe.Footer = de;
|
|
3649
3661
|
const ke = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
3650
3662
|
function xe(e) {
|
|
3651
3663
|
const { overflow: t, overflowX: n, overflowY: o2, display: i } = Re(e);
|
|
3652
3664
|
return /auto|scroll|overlay|hidden|clip/.test(t + o2 + n) && !ke.has(i);
|
|
3653
3665
|
}
|
|
3654
|
-
const
|
|
3655
|
-
function
|
|
3656
|
-
return
|
|
3666
|
+
const Ce = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
3667
|
+
function Se(e) {
|
|
3668
|
+
return Ce.has(me(e));
|
|
3657
3669
|
}
|
|
3658
3670
|
const Ne = [":popover-open", ":modal"];
|
|
3659
3671
|
function Ee(e) {
|
|
@@ -3665,10 +3677,10 @@ function Ee(e) {
|
|
|
3665
3677
|
}
|
|
3666
3678
|
});
|
|
3667
3679
|
}
|
|
3668
|
-
const
|
|
3680
|
+
const Pe = ["transform", "translate", "scale", "rotate", "perspective"], Ie = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ae = ["paint", "layout", "strict", "content"];
|
|
3669
3681
|
function Oe(e) {
|
|
3670
3682
|
const t = Le(), n = ve(e) ? Re(e) : e;
|
|
3671
|
-
return
|
|
3683
|
+
return Pe.some((e2) => !!n[e2] && "none" !== n[e2]) || !!n.containerType && "normal" !== n.containerType || !t && !!n.backdropFilter && "none" !== n.backdropFilter || !t && !!n.filter && "none" !== n.filter || Ie.some((e2) => (n.willChange || "").includes(e2)) || Ae.some((e2) => (n.contain || "").includes(e2));
|
|
3672
3684
|
}
|
|
3673
3685
|
function Le() {
|
|
3674
3686
|
return !("undefined" == typeof CSS || !CSS.supports) && CSS.supports("-webkit-backdrop-filter", "none");
|
|
@@ -3686,12 +3698,12 @@ function Be(e) {
|
|
|
3686
3698
|
function Me(e) {
|
|
3687
3699
|
if ("html" === me(e))
|
|
3688
3700
|
return e;
|
|
3689
|
-
const t = e.assignedSlot || e.parentNode ||
|
|
3690
|
-
return
|
|
3701
|
+
const t = e.assignedSlot || e.parentNode || we(e) && e.host || ge(e);
|
|
3702
|
+
return we(t) ? t.host : t;
|
|
3691
3703
|
}
|
|
3692
3704
|
function Fe(e) {
|
|
3693
3705
|
const t = Me(e);
|
|
3694
|
-
return Te(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
3706
|
+
return Te(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : be(t) && xe(t) ? t : Fe(t);
|
|
3695
3707
|
}
|
|
3696
3708
|
function $e(e, t, n) {
|
|
3697
3709
|
var o2;
|
|
@@ -3720,7 +3732,7 @@ function ze(e, t) {
|
|
|
3720
3732
|
const n = null == t.getRootNode ? void 0 : t.getRootNode();
|
|
3721
3733
|
if (e.contains(t))
|
|
3722
3734
|
return true;
|
|
3723
|
-
if (n &&
|
|
3735
|
+
if (n && we(n)) {
|
|
3724
3736
|
let n2 = t;
|
|
3725
3737
|
for (; n2; ) {
|
|
3726
3738
|
if (e === n2)
|
|
@@ -3773,7 +3785,7 @@ function Xe(e) {
|
|
|
3773
3785
|
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
3774
3786
|
}
|
|
3775
3787
|
function Qe(e) {
|
|
3776
|
-
return
|
|
3788
|
+
return be(e) && e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])");
|
|
3777
3789
|
}
|
|
3778
3790
|
function Ze(e) {
|
|
3779
3791
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -3810,27 +3822,27 @@ function gt(e) {
|
|
|
3810
3822
|
function yt(e) {
|
|
3811
3823
|
return e.replace(/start|end/g, (e2) => st[e2]);
|
|
3812
3824
|
}
|
|
3813
|
-
const vt = ["left", "right"],
|
|
3825
|
+
const vt = ["left", "right"], bt = ["right", "left"], wt = ["top", "bottom"], kt = ["bottom", "top"];
|
|
3814
3826
|
function xt(e, t, n, o2) {
|
|
3815
3827
|
const i = dt(e);
|
|
3816
3828
|
let r2 = function(e2, t2, n2) {
|
|
3817
3829
|
switch (e2) {
|
|
3818
3830
|
case "top":
|
|
3819
3831
|
case "bottom":
|
|
3820
|
-
return n2 ? t2 ?
|
|
3832
|
+
return n2 ? t2 ? bt : vt : t2 ? vt : bt;
|
|
3821
3833
|
case "left":
|
|
3822
3834
|
case "right":
|
|
3823
|
-
return t2 ?
|
|
3835
|
+
return t2 ? wt : kt;
|
|
3824
3836
|
default:
|
|
3825
3837
|
return [];
|
|
3826
3838
|
}
|
|
3827
3839
|
}(ut(e), "start" === n, o2);
|
|
3828
3840
|
return i && (r2 = r2.map((e2) => e2 + "-" + i), t && (r2 = r2.concat(r2.map(yt)))), r2;
|
|
3829
3841
|
}
|
|
3830
|
-
function
|
|
3842
|
+
function Ct(e) {
|
|
3831
3843
|
return e.replace(/left|right|bottom|top/g, (e2) => at[e2]);
|
|
3832
3844
|
}
|
|
3833
|
-
function
|
|
3845
|
+
function St(e) {
|
|
3834
3846
|
const { x: t, y: n, width: o2, height: i } = e;
|
|
3835
3847
|
return { width: o2, height: i, top: n, left: t, right: t + o2, bottom: n + i, x: t, y: n };
|
|
3836
3848
|
}
|
|
@@ -3838,8 +3850,8 @@ function Ct(e) {
|
|
|
3838
3850
|
* tabbable 6.4.0
|
|
3839
3851
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
3840
3852
|
*/
|
|
3841
|
-
var Nt = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"].join(","), Et = "undefined" == typeof Element,
|
|
3842
|
-
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector,
|
|
3853
|
+
var Nt = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"].join(","), Et = "undefined" == typeof Element, Pt = Et ? function() {
|
|
3854
|
+
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, It = !Et && Element.prototype.getRootNode ? function(e) {
|
|
3843
3855
|
var t;
|
|
3844
3856
|
return null == e || null === (t = e.getRootNode) || void 0 === t ? void 0 : t.call(e);
|
|
3845
3857
|
} : function(e) {
|
|
@@ -3857,7 +3869,7 @@ var Nt = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
3857
3869
|
var a = r2.assignedElements(), s = a.length ? a : r2.children, c = Ot(s, true, n);
|
|
3858
3870
|
n.flatten ? o2.push.apply(o2, c) : o2.push({ scopeParent: r2, candidates: c });
|
|
3859
3871
|
} else {
|
|
3860
|
-
|
|
3872
|
+
Pt.call(r2, Nt) && n.filter(r2) && (t || !e.includes(r2)) && o2.push(r2);
|
|
3861
3873
|
var l = r2.shadowRoot || "function" == typeof n.getShadowRoot && n.getShadowRoot(r2), u = !At(l, false) && (!n.shadowRootFilter || n.shadowRootFilter(r2));
|
|
3862
3874
|
if (l && u) {
|
|
3863
3875
|
var d = Ot(true === l ? r2.children : l.children, true, n);
|
|
@@ -3886,7 +3898,7 @@ var Nt = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
3886
3898
|
}(e) && !function(e2) {
|
|
3887
3899
|
if (!e2.name)
|
|
3888
3900
|
return true;
|
|
3889
|
-
var t, n = e2.form ||
|
|
3901
|
+
var t, n = e2.form || It(e2), o2 = function(e3) {
|
|
3890
3902
|
return n.querySelectorAll('input[type="radio"][name="' + e3 + '"]');
|
|
3891
3903
|
};
|
|
3892
3904
|
if ("undefined" != typeof window && void 0 !== window.CSS && "function" == typeof window.CSS.escape)
|
|
@@ -3913,8 +3925,8 @@ var Nt = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
3913
3925
|
return !e.checkVisibility({ checkOpacity: false, opacityProperty: false, contentVisibilityAuto: true, visibilityProperty: true, checkVisibilityCSS: true });
|
|
3914
3926
|
if ("hidden" === getComputedStyle(e).visibility)
|
|
3915
3927
|
return true;
|
|
3916
|
-
var i =
|
|
3917
|
-
if (
|
|
3928
|
+
var i = Pt.call(e, "details>summary:first-of-type") ? e.parentElement : e;
|
|
3929
|
+
if (Pt.call(i, "details:not([open]) *"))
|
|
3918
3930
|
return true;
|
|
3919
3931
|
if (n && "full" !== n && "full-native" !== n && "legacy-full" !== n) {
|
|
3920
3932
|
if ("non-zero-area" === n)
|
|
@@ -3922,7 +3934,7 @@ var Nt = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
3922
3934
|
} else {
|
|
3923
3935
|
if ("function" == typeof o2) {
|
|
3924
3936
|
for (var r2 = e; e; ) {
|
|
3925
|
-
var a = e.parentElement, s =
|
|
3937
|
+
var a = e.parentElement, s = It(e);
|
|
3926
3938
|
if (a && !a.shadowRoot && true === o2(a))
|
|
3927
3939
|
return Mt(e);
|
|
3928
3940
|
e = e.assignedSlot ? e.assignedSlot : a || s === e.ownerDocument ? a : s.host;
|
|
@@ -3930,11 +3942,11 @@ var Nt = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
3930
3942
|
e = r2;
|
|
3931
3943
|
}
|
|
3932
3944
|
if (function(e2) {
|
|
3933
|
-
var t2, n2, o3, i2, r3 = e2 &&
|
|
3945
|
+
var t2, n2, o3, i2, r3 = e2 && It(e2), a2 = null === (t2 = r3) || void 0 === t2 ? void 0 : t2.host, s2 = false;
|
|
3934
3946
|
if (r3 && r3 !== e2)
|
|
3935
3947
|
for (s2 = !!(null !== (n2 = a2) && void 0 !== n2 && null !== (o3 = n2.ownerDocument) && void 0 !== o3 && o3.contains(a2) || null != e2 && null !== (i2 = e2.ownerDocument) && void 0 !== i2 && i2.contains(e2)); !s2 && a2; ) {
|
|
3936
3948
|
var c, l, u;
|
|
3937
|
-
s2 = !(null === (l = a2 = null === (c = r3 =
|
|
3949
|
+
s2 = !(null === (l = a2 = null === (c = r3 = It(a2)) || void 0 === c ? void 0 : c.host) || void 0 === l || null === (u = l.ownerDocument) || void 0 === u || !u.contains(a2));
|
|
3938
3950
|
}
|
|
3939
3951
|
return s2;
|
|
3940
3952
|
}(e))
|
|
@@ -3957,7 +3969,7 @@ var Nt = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
3957
3969
|
for (var n = 0; n < t2.children.length; n++) {
|
|
3958
3970
|
var o2 = t2.children.item(n);
|
|
3959
3971
|
if ("LEGEND" === o2.tagName)
|
|
3960
|
-
return !!
|
|
3972
|
+
return !!Pt.call(t2, "fieldset[disabled] *") || !o2.contains(e2);
|
|
3961
3973
|
}
|
|
3962
3974
|
return true;
|
|
3963
3975
|
}
|
|
@@ -3987,7 +3999,7 @@ var Nt = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert]
|
|
|
3987
3999
|
if (At(e2))
|
|
3988
4000
|
return [];
|
|
3989
4001
|
var o2 = Array.prototype.slice.apply(e2.querySelectorAll(Nt));
|
|
3990
|
-
return t2 &&
|
|
4002
|
+
return t2 && Pt.call(e2, Nt) && o2.unshift(e2), o2.filter(n2);
|
|
3991
4003
|
}(e, t.includeContainer, _t.bind(null, t)), zt(n);
|
|
3992
4004
|
};
|
|
3993
4005
|
function Wt(e, t, n) {
|
|
@@ -4026,14 +4038,14 @@ async function Vt(e, t) {
|
|
|
4026
4038
|
return "number" != typeof e2 ? function(e3) {
|
|
4027
4039
|
return { top: 0, right: 0, bottom: 0, left: 0, ...e3 };
|
|
4028
4040
|
}(e2) : { top: e2, right: e2, bottom: e2, left: e2 };
|
|
4029
|
-
}(p), h = s[f ? "floating" === d ? "reference" : "floating" : d], g =
|
|
4030
|
-
return { top: (g.top -
|
|
4041
|
+
}(p), h = s[f ? "floating" === d ? "reference" : "floating" : d], g = St(await r2.getClippingRect({ element: null == (n = await (null == r2.isElement ? void 0 : r2.isElement(h))) || n ? h : h.contextElement || await (null == r2.getDocumentElement ? void 0 : r2.getDocumentElement(s.floating)), boundary: l, rootBoundary: u, strategy: c })), y = "floating" === d ? { x: o2, y: i, width: a.floating.width, height: a.floating.height } : a.reference, v = await (null == r2.getOffsetParent ? void 0 : r2.getOffsetParent(s.floating)), b = await (null == r2.isElement ? void 0 : r2.isElement(v)) && await (null == r2.getScale ? void 0 : r2.getScale(v)) || { x: 1, y: 1 }, w2 = St(r2.convertOffsetParentRelativeRectToViewportRelativeRect ? await r2.convertOffsetParentRelativeRectToViewportRelativeRect({ elements: s, rect: y, offsetParent: v, strategy: c }) : y);
|
|
4042
|
+
return { top: (g.top - w2.top + m.top) / b.y, bottom: (w2.bottom - g.bottom + m.bottom) / b.y, left: (g.left - w2.left + m.left) / b.x, right: (w2.right - g.right + m.right) / b.x };
|
|
4031
4043
|
}
|
|
4032
4044
|
const Ut = /* @__PURE__ */ new Set(["left", "top"]);
|
|
4033
4045
|
function Kt(e) {
|
|
4034
4046
|
const t = Re(e);
|
|
4035
4047
|
let n = parseFloat(t.width) || 0, o2 = parseFloat(t.height) || 0;
|
|
4036
|
-
const i =
|
|
4048
|
+
const i = be(e), r2 = i ? e.offsetWidth : n, a = i ? e.offsetHeight : o2, s = ot(n) !== r2 || ot(o2) !== a;
|
|
4037
4049
|
return s && (n = r2, o2 = a), { width: n, height: o2, $: s };
|
|
4038
4050
|
}
|
|
4039
4051
|
function Gt(e) {
|
|
@@ -4041,7 +4053,7 @@ function Gt(e) {
|
|
|
4041
4053
|
}
|
|
4042
4054
|
function qt(e) {
|
|
4043
4055
|
const t = Gt(e);
|
|
4044
|
-
if (!
|
|
4056
|
+
if (!be(t))
|
|
4045
4057
|
return rt(1);
|
|
4046
4058
|
const n = t.getBoundingClientRect(), { width: o2, height: i, $: r2 } = Kt(t);
|
|
4047
4059
|
let a = (r2 ? ot(n.width) : n.width) / o2, s = (r2 ? ot(n.height) : n.height) / i;
|
|
@@ -4069,7 +4081,7 @@ function Xt(e, t, n, o2) {
|
|
|
4069
4081
|
c *= e3.x, l *= e3.y, u *= e3.x, d *= e3.y, c += r3, l += a2, n2 = he(i2), i2 = _e(n2);
|
|
4070
4082
|
}
|
|
4071
4083
|
}
|
|
4072
|
-
return
|
|
4084
|
+
return St({ width: u, height: d, x: c, y: l });
|
|
4073
4085
|
}
|
|
4074
4086
|
function Qt(e, t) {
|
|
4075
4087
|
const n = Be(e).scrollLeft;
|
|
@@ -4108,21 +4120,21 @@ function tn(e, t, n) {
|
|
|
4108
4120
|
}(ge(e));
|
|
4109
4121
|
else if (ve(t))
|
|
4110
4122
|
o2 = function(e2, t2) {
|
|
4111
|
-
const n2 = Xt(e2, true, "fixed" === t2), o3 = n2.top + e2.clientTop, i = n2.left + e2.clientLeft, r2 =
|
|
4123
|
+
const n2 = Xt(e2, true, "fixed" === t2), o3 = n2.top + e2.clientTop, i = n2.left + e2.clientLeft, r2 = be(e2) ? qt(e2) : rt(1);
|
|
4112
4124
|
return { width: e2.clientWidth * r2.x, height: e2.clientHeight * r2.y, x: i * r2.x, y: o3 * r2.y };
|
|
4113
4125
|
}(t, n);
|
|
4114
4126
|
else {
|
|
4115
4127
|
const n2 = Yt(e);
|
|
4116
4128
|
o2 = { x: t.x - n2.x, y: t.y - n2.y, width: t.width, height: t.height };
|
|
4117
4129
|
}
|
|
4118
|
-
return
|
|
4130
|
+
return St(o2);
|
|
4119
4131
|
}
|
|
4120
4132
|
function nn(e, t) {
|
|
4121
4133
|
const n = Me(e);
|
|
4122
4134
|
return !(n === t || !ve(n) || Te(n)) && ("fixed" === Re(n).position || nn(n, t));
|
|
4123
4135
|
}
|
|
4124
4136
|
function on(e, t, n) {
|
|
4125
|
-
const o2 =
|
|
4137
|
+
const o2 = be(t), i = ge(t), r2 = "fixed" === n, a = Xt(e, true, r2, t);
|
|
4126
4138
|
let s = { scrollLeft: 0, scrollTop: 0 };
|
|
4127
4139
|
const c = rt(0);
|
|
4128
4140
|
function l() {
|
|
@@ -4142,7 +4154,7 @@ function rn(e) {
|
|
|
4142
4154
|
return "static" === Re(e).position;
|
|
4143
4155
|
}
|
|
4144
4156
|
function an(e, t) {
|
|
4145
|
-
if (!
|
|
4157
|
+
if (!be(e) || "fixed" === Re(e).position)
|
|
4146
4158
|
return null;
|
|
4147
4159
|
if (t)
|
|
4148
4160
|
return t(e);
|
|
@@ -4153,7 +4165,7 @@ function sn(e, t) {
|
|
|
4153
4165
|
const n = he(e);
|
|
4154
4166
|
if (Ee(e))
|
|
4155
4167
|
return n;
|
|
4156
|
-
if (!
|
|
4168
|
+
if (!be(e)) {
|
|
4157
4169
|
let t2 = Me(e);
|
|
4158
4170
|
for (; t2 && !Te(t2); ) {
|
|
4159
4171
|
if (ve(t2) && !rn(t2))
|
|
@@ -4163,11 +4175,11 @@ function sn(e, t) {
|
|
|
4163
4175
|
return n;
|
|
4164
4176
|
}
|
|
4165
4177
|
let o2 = an(e, t);
|
|
4166
|
-
for (; o2 &&
|
|
4178
|
+
for (; o2 && Se(o2) && rn(o2); )
|
|
4167
4179
|
o2 = an(o2, t);
|
|
4168
4180
|
return o2 && Te(o2) && rn(o2) && !Oe(o2) ? n : o2 || function(e2) {
|
|
4169
4181
|
let t2 = Me(e2);
|
|
4170
|
-
for (;
|
|
4182
|
+
for (; be(t2) && !Te(t2); ) {
|
|
4171
4183
|
if (Oe(t2))
|
|
4172
4184
|
return t2;
|
|
4173
4185
|
if (Ee(t2))
|
|
@@ -4183,8 +4195,8 @@ const cn = { convertOffsetParentRelativeRectToViewportRelativeRect: function(e)
|
|
|
4183
4195
|
if (o2 === a || s && r2)
|
|
4184
4196
|
return n;
|
|
4185
4197
|
let c = { scrollLeft: 0, scrollTop: 0 }, l = rt(1);
|
|
4186
|
-
const u = rt(0), d =
|
|
4187
|
-
if ((d || !d && !r2) && (("body" !== me(o2) || xe(a)) && (c = Be(o2)),
|
|
4198
|
+
const u = rt(0), d = be(o2);
|
|
4199
|
+
if ((d || !d && !r2) && (("body" !== me(o2) || xe(a)) && (c = Be(o2)), be(o2))) {
|
|
4188
4200
|
const e2 = Xt(o2);
|
|
4189
4201
|
l = qt(o2), u.x = e2.x + o2.clientLeft, u.y = e2.y + o2.clientTop;
|
|
4190
4202
|
}
|
|
@@ -4316,30 +4328,30 @@ const dn = function(e) {
|
|
|
4316
4328
|
const { placement: i, middlewareData: r2, rects: a, initialPlacement: s, platform: c, elements: l } = t, { mainAxis: u = true, crossAxis: d = true, fallbackPlacements: f, fallbackStrategy: p = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: h = true, ...g } = lt(e, t);
|
|
4317
4329
|
if (null != (n = r2.arrow) && n.alignmentOffset)
|
|
4318
4330
|
return {};
|
|
4319
|
-
const y = ut(i), v = ht(s),
|
|
4320
|
-
const t2 =
|
|
4331
|
+
const y = ut(i), v = ht(s), b = ut(s) === s, w2 = await (null == c.isRTL ? void 0 : c.isRTL(l.floating)), k = f || (b || !h ? [Ct(s)] : function(e2) {
|
|
4332
|
+
const t2 = Ct(e2);
|
|
4321
4333
|
return [yt(e2), t2, yt(t2)];
|
|
4322
4334
|
}(s)), x = "none" !== m;
|
|
4323
|
-
!f && x && k.push(...xt(s, h, m,
|
|
4324
|
-
const
|
|
4335
|
+
!f && x && k.push(...xt(s, h, m, w2));
|
|
4336
|
+
const C2 = [s, ...k], S2 = await c.detectOverflow(t, g), N2 = [];
|
|
4325
4337
|
let E2 = (null == (o2 = r2.flip) ? void 0 : o2.overflows) || [];
|
|
4326
|
-
if (u && N2.push(
|
|
4338
|
+
if (u && N2.push(S2[y]), d) {
|
|
4327
4339
|
const e2 = function(e3, t2, n2) {
|
|
4328
4340
|
void 0 === n2 && (n2 = false);
|
|
4329
4341
|
const o3 = dt(e3), i2 = gt(e3), r3 = pt(i2);
|
|
4330
4342
|
let a2 = "x" === i2 ? o3 === (n2 ? "end" : "start") ? "right" : "left" : "start" === o3 ? "bottom" : "top";
|
|
4331
|
-
return t2.reference[r3] > t2.floating[r3] && (a2 =
|
|
4332
|
-
}(i, a,
|
|
4333
|
-
N2.push(
|
|
4343
|
+
return t2.reference[r3] > t2.floating[r3] && (a2 = Ct(a2)), [a2, Ct(a2)];
|
|
4344
|
+
}(i, a, w2);
|
|
4345
|
+
N2.push(S2[e2[0]], S2[e2[1]]);
|
|
4334
4346
|
}
|
|
4335
4347
|
if (E2 = [...E2, { placement: i, overflows: N2 }], !N2.every((e2) => e2 <= 0)) {
|
|
4336
|
-
var
|
|
4337
|
-
const e2 = ((null == (
|
|
4348
|
+
var P2, I2;
|
|
4349
|
+
const e2 = ((null == (P2 = r2.flip) ? void 0 : P2.index) || 0) + 1, t2 = C2[e2];
|
|
4338
4350
|
if (t2) {
|
|
4339
4351
|
if (!("alignment" === d && v !== ht(t2)) || E2.every((e3) => ht(e3.placement) !== v || e3.overflows[0] > 0))
|
|
4340
4352
|
return { data: { index: e2, overflows: E2 }, reset: { placement: t2 } };
|
|
4341
4353
|
}
|
|
4342
|
-
let n2 = null == (
|
|
4354
|
+
let n2 = null == (I2 = E2.filter((e3) => e3.overflows[0] <= 0).sort((e3, t3) => e3.overflows[1] - t3.overflows[1])[0]) ? void 0 : I2.placement;
|
|
4343
4355
|
if (!n2)
|
|
4344
4356
|
switch (p) {
|
|
4345
4357
|
case "bestFit": {
|
|
@@ -4369,8 +4381,8 @@ const dn = function(e) {
|
|
|
4369
4381
|
let l = await a.getElementRects({ reference: e2, floating: t2, strategy: i2 }), { x: u, y: d } = Wt(l, o3, c), f = o3, p = {}, m = 0;
|
|
4370
4382
|
for (let n3 = 0; n3 < s.length; n3++) {
|
|
4371
4383
|
var h;
|
|
4372
|
-
const { name: r4, fn: g } = s[n3], { x: y, y: v, data:
|
|
4373
|
-
u = null != y ? y : u, d = null != v ? v : d, p = { ...p, [r4]: { ...p[r4], ...
|
|
4384
|
+
const { name: r4, fn: g } = s[n3], { x: y, y: v, data: b, reset: w2 } = await g({ x: u, y: d, initialPlacement: o3, placement: f, strategy: i2, middlewareData: p, rects: l, platform: { ...a, detectOverflow: null != (h = a.detectOverflow) ? h : Vt }, elements: { reference: e2, floating: t2 } });
|
|
4385
|
+
u = null != y ? y : u, d = null != v ? v : d, p = { ...p, [r4]: { ...p[r4], ...b } }, w2 && m <= 50 && (m++, "object" == typeof w2 && (w2.placement && (f = w2.placement), w2.rects && (l = true === w2.rects ? await a.getElementRects({ reference: e2, floating: t2, strategy: i2 }) : w2.rects), { x: u, y: d } = Wt(l, f, c)), n3 = -1);
|
|
4374
4386
|
}
|
|
4375
4387
|
return { x: u, y: d, placement: f, strategy: i2, middlewareData: p };
|
|
4376
4388
|
})(e, t, { ...i, platform: r2 });
|
|
@@ -4417,13 +4429,13 @@ function vn(e, t) {
|
|
|
4417
4429
|
const n = yn(e);
|
|
4418
4430
|
return Math.round(t * n) / n;
|
|
4419
4431
|
}
|
|
4420
|
-
function
|
|
4432
|
+
function bn(e) {
|
|
4421
4433
|
const t = o.useRef(e);
|
|
4422
4434
|
return hn(() => {
|
|
4423
4435
|
t.current = e;
|
|
4424
4436
|
}), t;
|
|
4425
4437
|
}
|
|
4426
|
-
const
|
|
4438
|
+
const wn = (e, t) => ({ ...fn(e), options: [e, t] }), kn = (e, t) => ({ ...pn(e), options: [e, t] });
|
|
4427
4439
|
function xn(e) {
|
|
4428
4440
|
return o.useMemo(() => e.every((e2) => null == e2) ? null : (t) => {
|
|
4429
4441
|
e.forEach((e2) => {
|
|
@@ -4431,13 +4443,13 @@ function xn(e) {
|
|
|
4431
4443
|
});
|
|
4432
4444
|
}, e);
|
|
4433
4445
|
}
|
|
4434
|
-
const
|
|
4446
|
+
const Cn = { ...o }, Sn = Cn.useInsertionEffect || ((e) => e());
|
|
4435
4447
|
function Nn(e) {
|
|
4436
4448
|
const t = o.useRef(() => {
|
|
4437
4449
|
if ("production" !== process.env.NODE_ENV)
|
|
4438
4450
|
throw new Error("Cannot call an event handler while rendering.");
|
|
4439
4451
|
});
|
|
4440
|
-
return
|
|
4452
|
+
return Sn(() => {
|
|
4441
4453
|
t.current = e;
|
|
4442
4454
|
}), o.useCallback(function() {
|
|
4443
4455
|
for (var e2 = arguments.length, n = new Array(e2), o2 = 0; o2 < e2; o2++)
|
|
@@ -4445,7 +4457,7 @@ function Nn(e) {
|
|
|
4445
4457
|
return null == t.current ? void 0 : t.current(...n);
|
|
4446
4458
|
}, []);
|
|
4447
4459
|
}
|
|
4448
|
-
const En = "ArrowUp",
|
|
4460
|
+
const En = "ArrowUp", Pn = "ArrowDown", In = "ArrowLeft", An = "ArrowRight";
|
|
4449
4461
|
function On(e, t, n) {
|
|
4450
4462
|
return Math.floor(e / t) !== n;
|
|
4451
4463
|
}
|
|
@@ -4554,7 +4566,7 @@ function Wn() {
|
|
|
4554
4566
|
}
|
|
4555
4567
|
let Vn = false, Un = 0;
|
|
4556
4568
|
const Kn = () => "floating-ui-" + Math.random().toString(36).slice(2, 6) + Un++;
|
|
4557
|
-
const Gn =
|
|
4569
|
+
const Gn = Cn.useId || function() {
|
|
4558
4570
|
const [e, t] = o.useState(() => Vn ? Kn() : void 0);
|
|
4559
4571
|
return $n(() => {
|
|
4560
4572
|
null == e && t(Kn());
|
|
@@ -4675,13 +4687,13 @@ function yo(e, t, n) {
|
|
|
4675
4687
|
return go(e.concat(Array.from(o2.querySelectorAll("[aria-live]"))), o2, t, n);
|
|
4676
4688
|
}
|
|
4677
4689
|
const vo = () => ({ getShadowRoot: true, displayCheck: "function" == typeof ResizeObserver && ResizeObserver.toString().includes("[native code]") ? "full" : "none" });
|
|
4678
|
-
function
|
|
4690
|
+
function bo(e, t) {
|
|
4679
4691
|
const n = Ht(e, vo());
|
|
4680
4692
|
"prev" === t && n.reverse();
|
|
4681
4693
|
const o2 = n.indexOf(je(Je(e)));
|
|
4682
4694
|
return n.slice(o2 + 1)[0];
|
|
4683
4695
|
}
|
|
4684
|
-
function
|
|
4696
|
+
function wo(e, t) {
|
|
4685
4697
|
const n = t || e.currentTarget, o2 = e.relatedTarget;
|
|
4686
4698
|
return !o2 || !ze(n, o2);
|
|
4687
4699
|
}
|
|
@@ -4689,45 +4701,45 @@ const ko = { border: 0, clip: "rect(0 0 0 0)", height: "1px", margin: "-1px", ov
|
|
|
4689
4701
|
function xo(e) {
|
|
4690
4702
|
"Tab" === e.key && (e.target, clearTimeout(void 0));
|
|
4691
4703
|
}
|
|
4692
|
-
const
|
|
4704
|
+
const Co = o.forwardRef(function(e, t) {
|
|
4693
4705
|
const [n, i] = o.useState();
|
|
4694
4706
|
$n(() => (Ke() && i("button"), document.addEventListener("keydown", xo), () => {
|
|
4695
4707
|
document.removeEventListener("keydown", xo);
|
|
4696
4708
|
}), []);
|
|
4697
4709
|
const r2 = { ref: t, tabIndex: 0, role: n, "aria-hidden": !n || void 0, [oo("focus-guard")]: "", style: ko };
|
|
4698
4710
|
return o.createElement("span", Wn({}, e, r2));
|
|
4699
|
-
}),
|
|
4711
|
+
}), So = o.createContext(null), No = "data-floating-ui-focusable";
|
|
4700
4712
|
function Eo(e) {
|
|
4701
4713
|
return e ? e.hasAttribute(No) ? e : e.querySelector("[" + No + "]") || e : null;
|
|
4702
4714
|
}
|
|
4703
|
-
let
|
|
4704
|
-
function
|
|
4705
|
-
|
|
4715
|
+
let Po = [];
|
|
4716
|
+
function Io(e) {
|
|
4717
|
+
Po = Po.filter((e2) => e2.isConnected);
|
|
4706
4718
|
let t = e;
|
|
4707
4719
|
if (t && "body" !== me(t)) {
|
|
4708
4720
|
if (!function(e2, t2) {
|
|
4709
4721
|
if (t2 = t2 || {}, !e2)
|
|
4710
4722
|
throw new Error("No node provided");
|
|
4711
|
-
return false !==
|
|
4723
|
+
return false !== Pt.call(e2, Nt) && _t(t2, e2);
|
|
4712
4724
|
}(t, vo())) {
|
|
4713
4725
|
const e2 = Ht(t, vo())[0];
|
|
4714
4726
|
e2 && (t = e2);
|
|
4715
4727
|
}
|
|
4716
|
-
|
|
4728
|
+
Po.push(t), Po.length > 20 && (Po = Po.slice(-20));
|
|
4717
4729
|
}
|
|
4718
4730
|
}
|
|
4719
4731
|
function Ao() {
|
|
4720
|
-
return
|
|
4732
|
+
return Po.slice().reverse().find((e) => e.isConnected);
|
|
4721
4733
|
}
|
|
4722
4734
|
const Oo = o.forwardRef(function(e, t) {
|
|
4723
4735
|
return o.createElement("button", Wn({}, e, { type: "button", ref: t, tabIndex: -1, style: ko }));
|
|
4724
4736
|
});
|
|
4725
4737
|
function Lo(e) {
|
|
4726
|
-
const { context: t, children: n, disabled: i = false, order: r2 = ["content"], guards: a = true, initialFocus: s = 0, returnFocus: c = true, restoreFocus: l = false, modal: u = true, visuallyHiddenDismiss: d = false, closeOnFocusOut: f = true } = e, { open: p, refs: m, nodeId: h, onOpenChange: g, events: y, dataRef: v, floatingId:
|
|
4738
|
+
const { context: t, children: n, disabled: i = false, order: r2 = ["content"], guards: a = true, initialFocus: s = 0, returnFocus: c = true, restoreFocus: l = false, modal: u = true, visuallyHiddenDismiss: d = false, closeOnFocusOut: f = true } = e, { open: p, refs: m, nodeId: h, onOpenChange: g, events: y, dataRef: v, floatingId: b, elements: { domReference: w2, floating: k } } = t, x = "number" == typeof s && s < 0, C2 = et(w2) && x, S2 = "undefined" == typeof HTMLElement || !("inert" in HTMLElement.prototype) || a, N2 = io(r2), E2 = io(s), P2 = io(c), I2 = eo(), A = o.useContext(So), O = o.useRef(null), L2 = o.useRef(null), D2 = o.useRef(false), T2 = o.useRef(false), R2 = o.useRef(-1), B2 = null != A, M2 = Eo(k), F = Nn(function(e2) {
|
|
4727
4739
|
return void 0 === e2 && (e2 = M2), e2 ? Ht(e2, vo()) : [];
|
|
4728
4740
|
}), $2 = Nn((e2) => {
|
|
4729
4741
|
const t2 = F(e2);
|
|
4730
|
-
return N2.current.map((e3) =>
|
|
4742
|
+
return N2.current.map((e3) => w2 && "reference" === e3 ? w2 : M2 && "floating" === e3 ? M2 : t2).filter(Boolean).flat();
|
|
4731
4743
|
});
|
|
4732
4744
|
function _2(e2) {
|
|
4733
4745
|
return !i && d && u ? o.createElement(Oo, { ref: "start" === e2 ? O : L2, onClick: (e3) => g(false, e3.nativeEvent) }, "string" == typeof d ? d : "Dismiss") : null;
|
|
@@ -4739,16 +4751,16 @@ function Lo(e) {
|
|
|
4739
4751
|
return;
|
|
4740
4752
|
function e2(e3) {
|
|
4741
4753
|
if ("Tab" === e3.key) {
|
|
4742
|
-
ze(M2, je(Je(M2))) && 0 === F().length && !
|
|
4754
|
+
ze(M2, je(Je(M2))) && 0 === F().length && !C2 && Ze(e3);
|
|
4743
4755
|
const t3 = $2(), n2 = Xe(e3);
|
|
4744
|
-
"reference" === N2.current[0] && n2 ===
|
|
4756
|
+
"reference" === N2.current[0] && n2 === w2 && (Ze(e3), e3.shiftKey ? co(t3[t3.length - 1]) : co(t3[1])), "floating" === N2.current[1] && n2 === M2 && e3.shiftKey && (Ze(e3), co(t3[0]));
|
|
4745
4757
|
}
|
|
4746
4758
|
}
|
|
4747
4759
|
const t2 = Je(M2);
|
|
4748
4760
|
return t2.addEventListener("keydown", e2), () => {
|
|
4749
4761
|
t2.removeEventListener("keydown", e2);
|
|
4750
4762
|
};
|
|
4751
|
-
}, [i,
|
|
4763
|
+
}, [i, w2, M2, u, N2, C2, F, $2]), o.useEffect(() => {
|
|
4752
4764
|
if (!i && k)
|
|
4753
4765
|
return k.addEventListener("focusin", e2), () => {
|
|
4754
4766
|
k.removeEventListener("focusin", e2);
|
|
@@ -4759,8 +4771,8 @@ function Lo(e) {
|
|
|
4759
4771
|
}
|
|
4760
4772
|
}, [i, k, F]), o.useEffect(() => {
|
|
4761
4773
|
if (!i && f)
|
|
4762
|
-
return k &&
|
|
4763
|
-
|
|
4774
|
+
return k && be(w2) ? (w2.addEventListener("focusout", t2), w2.addEventListener("pointerdown", e2), k.addEventListener("focusout", t2), () => {
|
|
4775
|
+
w2.removeEventListener("focusout", t2), w2.removeEventListener("pointerdown", e2), k.removeEventListener("focusout", t2);
|
|
4764
4776
|
}) : void 0;
|
|
4765
4777
|
function e2() {
|
|
4766
4778
|
T2.current = true, setTimeout(() => {
|
|
@@ -4770,7 +4782,7 @@ function Lo(e) {
|
|
|
4770
4782
|
function t2(e3) {
|
|
4771
4783
|
const t3 = e3.relatedTarget;
|
|
4772
4784
|
queueMicrotask(() => {
|
|
4773
|
-
const n2 = !(ze(
|
|
4785
|
+
const n2 = !(ze(w2, t3) || ze(k, t3) || ze(t3, k) || ze(null == A ? void 0 : A.portalNode, t3) || null != t3 && t3.hasAttribute(oo("focus-guard")) || I2 && (lo(I2.nodesRef.current, h).find((e4) => {
|
|
4774
4786
|
var n3, o2;
|
|
4775
4787
|
return ze(null == (n3 = e4.context) ? void 0 : n3.elements.floating, t3) || ze(null == (o2 = e4.context) ? void 0 : o2.elements.domReference, t3);
|
|
4776
4788
|
}) || function(e4, t4) {
|
|
@@ -4781,31 +4793,31 @@ function Lo(e) {
|
|
|
4781
4793
|
i2 = null == t5 ? void 0 : t5.parentId, t5 && (o2 = o2.concat(t5));
|
|
4782
4794
|
}
|
|
4783
4795
|
return o2;
|
|
4784
|
-
}(
|
|
4796
|
+
}(I2.nodesRef.current, h).find((e4) => {
|
|
4785
4797
|
var n3, o2;
|
|
4786
4798
|
return (null == (n3 = e4.context) ? void 0 : n3.elements.floating) === t3 || (null == (o2 = e4.context) ? void 0 : o2.elements.domReference) === t3;
|
|
4787
4799
|
})));
|
|
4788
4800
|
if (l && n2 && je(Je(M2)) === Je(M2).body) {
|
|
4789
|
-
|
|
4801
|
+
be(M2) && M2.focus();
|
|
4790
4802
|
const e4 = R2.current, t4 = F(), n3 = t4[e4] || t4[t4.length - 1] || M2;
|
|
4791
|
-
|
|
4803
|
+
be(n3) && n3.focus();
|
|
4792
4804
|
}
|
|
4793
|
-
!
|
|
4805
|
+
!C2 && u || !t3 || !n2 || T2.current || t3 === Ao() || (D2.current = true, g(false, e3, "focus-out"));
|
|
4794
4806
|
});
|
|
4795
4807
|
}
|
|
4796
|
-
}, [i,
|
|
4808
|
+
}, [i, w2, k, M2, u, h, I2, A, g, f, l, F, C2]), o.useEffect(() => {
|
|
4797
4809
|
var e2;
|
|
4798
4810
|
if (i)
|
|
4799
4811
|
return;
|
|
4800
4812
|
const t2 = Array.from((null == A || null == (e2 = A.portalNode) ? void 0 : e2.querySelectorAll("[" + oo("portal") + "]")) || []);
|
|
4801
4813
|
if (k) {
|
|
4802
|
-
const e3 = [k, ...t2, O.current, L2.current, N2.current.includes("reference") ||
|
|
4814
|
+
const e3 = [k, ...t2, O.current, L2.current, N2.current.includes("reference") || C2 ? w2 : null].filter((e4) => null != e4), n2 = u || C2 ? yo(e3, S2, !S2) : yo(e3);
|
|
4803
4815
|
return () => {
|
|
4804
4816
|
n2();
|
|
4805
4817
|
};
|
|
4806
4818
|
}
|
|
4807
|
-
}, [i,
|
|
4808
|
-
if (i || !
|
|
4819
|
+
}, [i, w2, k, u, N2, A, C2, S2]), $n(() => {
|
|
4820
|
+
if (i || !be(M2))
|
|
4809
4821
|
return;
|
|
4810
4822
|
const e2 = je(Je(M2));
|
|
4811
4823
|
queueMicrotask(() => {
|
|
@@ -4820,23 +4832,23 @@ function Lo(e) {
|
|
|
4820
4832
|
let o2 = v.current.openEvent;
|
|
4821
4833
|
function r3(t3) {
|
|
4822
4834
|
let { open: n3, reason: i2, event: r4, nested: a3 } = t3;
|
|
4823
|
-
n3 && (o2 = r4), "escape-key" === i2 && m.domReference.current &&
|
|
4835
|
+
n3 && (o2 = r4), "escape-key" === i2 && m.domReference.current && Io(m.domReference.current), "hover" === i2 && "mouseleave" === r4.type && (D2.current = true), "outside-press" === i2 && (a3 ? (D2.current = false, e2 = true) : D2.current = !(Ve(r4) || Ue(r4)));
|
|
4824
4836
|
}
|
|
4825
|
-
|
|
4837
|
+
Io(n2), y.on("openchange", r3);
|
|
4826
4838
|
const a2 = t2.createElement("span");
|
|
4827
|
-
return a2.setAttribute("tabindex", "-1"), a2.setAttribute("aria-hidden", "true"), Object.assign(a2.style, ko), B2 &&
|
|
4839
|
+
return a2.setAttribute("tabindex", "-1"), a2.setAttribute("aria-hidden", "true"), Object.assign(a2.style, ko), B2 && w2 && w2.insertAdjacentElement("afterend", a2), () => {
|
|
4828
4840
|
y.off("openchange", r3);
|
|
4829
|
-
const n3 = je(t2), i2 = ze(k, n3) ||
|
|
4841
|
+
const n3 = je(t2), i2 = ze(k, n3) || I2 && lo(I2.nodesRef.current, h).some((e3) => {
|
|
4830
4842
|
var t3;
|
|
4831
4843
|
return ze(null == (t3 = e3.context) ? void 0 : t3.elements.floating, n3);
|
|
4832
4844
|
});
|
|
4833
|
-
(i2 || o2 && ["click", "mousedown"].includes(o2.type)) && m.domReference.current &&
|
|
4834
|
-
const s2 = "boolean" == typeof
|
|
4845
|
+
(i2 || o2 && ["click", "mousedown"].includes(o2.type)) && m.domReference.current && Io(m.domReference.current);
|
|
4846
|
+
const s2 = "boolean" == typeof P2.current ? Ao() || a2 : P2.current.current || a2;
|
|
4835
4847
|
queueMicrotask(() => {
|
|
4836
|
-
|
|
4848
|
+
P2.current && !D2.current && be(s2) && (s2 === n3 || n3 === t2.body || i2) && s2.focus({ preventScroll: e2 }), a2.remove();
|
|
4837
4849
|
});
|
|
4838
4850
|
};
|
|
4839
|
-
}, [i, k, M2,
|
|
4851
|
+
}, [i, k, M2, P2, v, m, y, I2, h, B2, w2]), o.useEffect(() => {
|
|
4840
4852
|
queueMicrotask(() => {
|
|
4841
4853
|
D2.current = false;
|
|
4842
4854
|
});
|
|
@@ -4864,25 +4876,25 @@ function Lo(e) {
|
|
|
4864
4876
|
t2.disconnect();
|
|
4865
4877
|
};
|
|
4866
4878
|
}, [i, k, M2, m, N2, F, x]);
|
|
4867
|
-
const j2 = !i &&
|
|
4868
|
-
return o.createElement(o.Fragment, null, j2 && o.createElement(
|
|
4879
|
+
const j2 = !i && S2 && (!u || !C2) && (B2 || u);
|
|
4880
|
+
return o.createElement(o.Fragment, null, j2 && o.createElement(Co, { "data-type": "inside", ref: null == A ? void 0 : A.beforeInsideRef, onFocus: (e2) => {
|
|
4869
4881
|
if (u) {
|
|
4870
4882
|
const e3 = $2();
|
|
4871
4883
|
co("reference" === r2[0] ? e3[0] : e3[e3.length - 1]);
|
|
4872
4884
|
} else if (null != A && A.preserveTabOrder && A.portalNode)
|
|
4873
|
-
if (D2.current = false,
|
|
4874
|
-
const e3 =
|
|
4885
|
+
if (D2.current = false, wo(e2, A.portalNode)) {
|
|
4886
|
+
const e3 = bo(document.body, "next") || w2;
|
|
4875
4887
|
null == e3 || e3.focus();
|
|
4876
4888
|
} else {
|
|
4877
4889
|
var t2;
|
|
4878
4890
|
null == (t2 = A.beforeOutsideRef.current) || t2.focus();
|
|
4879
4891
|
}
|
|
4880
|
-
} }), !
|
|
4892
|
+
} }), !C2 && _2("start"), n, _2("end"), j2 && o.createElement(Co, { "data-type": "inside", ref: null == A ? void 0 : A.afterInsideRef, onFocus: (e2) => {
|
|
4881
4893
|
if (u)
|
|
4882
4894
|
co($2()[0]);
|
|
4883
4895
|
else if (null != A && A.preserveTabOrder && A.portalNode)
|
|
4884
|
-
if (f && (D2.current = true),
|
|
4885
|
-
const e3 =
|
|
4896
|
+
if (f && (D2.current = true), wo(e2, A.portalNode)) {
|
|
4897
|
+
const e3 = bo(document.body, "prev") || w2;
|
|
4886
4898
|
null == e3 || e3.focus();
|
|
4887
4899
|
} else {
|
|
4888
4900
|
var t2;
|
|
@@ -4891,7 +4903,7 @@ function Lo(e) {
|
|
|
4891
4903
|
} }));
|
|
4892
4904
|
}
|
|
4893
4905
|
function Do(e) {
|
|
4894
|
-
return
|
|
4906
|
+
return be(e.target) && "BUTTON" === e.target.tagName;
|
|
4895
4907
|
}
|
|
4896
4908
|
function To(e) {
|
|
4897
4909
|
return Qe(e);
|
|
@@ -4927,17 +4939,17 @@ function $o(e) {
|
|
|
4927
4939
|
void 0 === e2 && (e2 = {});
|
|
4928
4940
|
const { placement: t2 = "bottom", strategy: n2 = "absolute", middleware: i2 = [], platform: r3, elements: { reference: a2, floating: s2 } = {}, transform: c2 = true, whileElementsMounted: l2, open: u2 } = e2, [d2, f2] = o.useState({ x: 0, y: 0, strategy: n2, placement: t2, middlewareData: {}, isPositioned: false }), [p2, m2] = o.useState(i2);
|
|
4929
4941
|
gn(p2, i2) || m2(i2);
|
|
4930
|
-
const [h2, g2] = o.useState(null), [y2, v2] = o.useState(null),
|
|
4931
|
-
e3 !==
|
|
4942
|
+
const [h2, g2] = o.useState(null), [y2, v2] = o.useState(null), w$1 = o.useCallback((e3) => {
|
|
4943
|
+
e3 !== S2.current && (S2.current = e3, g2(e3));
|
|
4932
4944
|
}, []), k = o.useCallback((e3) => {
|
|
4933
4945
|
e3 !== N2.current && (N2.current = e3, v2(e3));
|
|
4934
|
-
}, []), x = a2 || h2,
|
|
4935
|
-
if (!
|
|
4946
|
+
}, []), x = a2 || h2, C2 = s2 || y2, S2 = o.useRef(null), N2 = o.useRef(null), E2 = o.useRef(d2), P2 = null != l2, I2 = bn(l2), A = bn(r3), O = bn(u2), L2 = o.useCallback(() => {
|
|
4947
|
+
if (!S2.current || !N2.current)
|
|
4936
4948
|
return;
|
|
4937
4949
|
const e3 = { placement: t2, strategy: n2, middleware: p2 };
|
|
4938
|
-
A.current && (e3.platform = A.current), mn(
|
|
4950
|
+
A.current && (e3.platform = A.current), mn(S2.current, N2.current, e3).then((e4) => {
|
|
4939
4951
|
const t3 = { ...e4, isPositioned: false !== O.current };
|
|
4940
|
-
D2.current && !gn(E2.current, t3) && (E2.current = t3,
|
|
4952
|
+
D2.current && !gn(E2.current, t3) && (E2.current = t3, w.flushSync(() => {
|
|
4941
4953
|
f2(t3);
|
|
4942
4954
|
}));
|
|
4943
4955
|
});
|
|
@@ -4949,13 +4961,13 @@ function $o(e) {
|
|
|
4949
4961
|
hn(() => (D2.current = true, () => {
|
|
4950
4962
|
D2.current = false;
|
|
4951
4963
|
}), []), hn(() => {
|
|
4952
|
-
if (x && (
|
|
4953
|
-
if (
|
|
4954
|
-
return
|
|
4964
|
+
if (x && (S2.current = x), C2 && (N2.current = C2), x && C2) {
|
|
4965
|
+
if (I2.current)
|
|
4966
|
+
return I2.current(x, C2, L2);
|
|
4955
4967
|
L2();
|
|
4956
4968
|
}
|
|
4957
|
-
}, [x,
|
|
4958
|
-
const T2 = o.useMemo(() => ({ reference:
|
|
4969
|
+
}, [x, C2, L2, I2, P2]);
|
|
4970
|
+
const T2 = o.useMemo(() => ({ reference: S2, floating: N2, setReference: w$1, setFloating: k }), [w$1, k]), R2 = o.useMemo(() => ({ reference: x, floating: C2 }), [x, C2]), B2 = o.useMemo(() => {
|
|
4959
4971
|
const e3 = { position: n2, left: 0, top: 0 };
|
|
4960
4972
|
if (!R2.floating)
|
|
4961
4973
|
return e3;
|
|
@@ -5008,21 +5020,21 @@ function Wo(e, t, n) {
|
|
|
5008
5020
|
}
|
|
5009
5021
|
}
|
|
5010
5022
|
function Vo(e, t) {
|
|
5011
|
-
return Wo(t, e === En || e ===
|
|
5023
|
+
return Wo(t, e === En || e === Pn, e === In || e === An);
|
|
5012
5024
|
}
|
|
5013
5025
|
function Uo(e, t, n) {
|
|
5014
|
-
return Wo(t, e ===
|
|
5026
|
+
return Wo(t, e === Pn, n ? e === In : e === An) || "Enter" === e || " " === e || "" === e;
|
|
5015
5027
|
}
|
|
5016
5028
|
function Ko(e, t, n) {
|
|
5017
|
-
return Wo(t, n ? e === An : e ===
|
|
5029
|
+
return Wo(t, n ? e === An : e === In, e === En);
|
|
5018
5030
|
}
|
|
5019
5031
|
function Go(e, t) {
|
|
5020
5032
|
const { open: n, onOpenChange: i, elements: r2 } = e, { listRef: a, activeIndex: s, onNavigate: c = () => {
|
|
5021
|
-
}, enabled: l = true, selectedIndex: u = null, allowEscape: d = false, loop: f = false, nested: p = false, rtl: m = false, virtual: h = false, focusItemOnOpen: g = "auto", focusItemOnHover: y = true, openOnArrowKeyDown: v = true, disabledIndices:
|
|
5022
|
-
"production" !== process.env.NODE_ENV && (d && (f || Jn("`useListNavigation` looping must be enabled to allow escaping."), h || Jn("`useListNavigation` must be virtual to allow escaping.")), "vertical" ===
|
|
5023
|
-
const E2 = io(Eo(r2.floating)),
|
|
5033
|
+
}, enabled: l = true, selectedIndex: u = null, allowEscape: d = false, loop: f = false, nested: p = false, rtl: m = false, virtual: h = false, focusItemOnOpen: g = "auto", focusItemOnHover: y = true, openOnArrowKeyDown: v = true, disabledIndices: b, orientation: w2 = "vertical", cols: k = 1, scrollItemIntoView: x = true, virtualItemRef: C2, itemSizes: S2, dense: N2 = false } = t;
|
|
5034
|
+
"production" !== process.env.NODE_ENV && (d && (f || Jn("`useListNavigation` looping must be enabled to allow escaping."), h || Jn("`useListNavigation` must be virtual to allow escaping.")), "vertical" === w2 && k > 1 && Jn("In grid list navigation mode (`cols` > 1), the `orientation` should", 'be either "horizontal" or "both".'));
|
|
5035
|
+
const E2 = io(Eo(r2.floating)), P2 = Zn(), I2 = eo(), A = Nn(c), O = et(r2.domReference), L2 = o.useRef(g), D2 = o.useRef(null != u ? u : -1), T2 = o.useRef(null), R2 = o.useRef(true), B2 = o.useRef(A), M2 = o.useRef(!!r2.floating), F = o.useRef(n), $2 = o.useRef(false), _2 = o.useRef(false), j2 = io(b), z2 = io(n), H2 = io(x), W2 = io(u), [V2, U2] = o.useState(), [K2, G2] = o.useState(), q2 = Nn(function(e2, t2, n2) {
|
|
5024
5036
|
function o2(e3) {
|
|
5025
|
-
h ? (U2(e3.id), null ==
|
|
5037
|
+
h ? (U2(e3.id), null == I2 || I2.events.emit("virtualfocus", e3), C2 && (C2.current = e3)) : co(e3, { preventScroll: true, sync: !(!He().toLowerCase().startsWith("mac") || navigator.maxTouchPoints || !Ke()) && (Ho || $2.current) });
|
|
5026
5038
|
}
|
|
5027
5039
|
void 0 === n2 && (n2 = false);
|
|
5028
5040
|
const i2 = e2.current[t2.current];
|
|
@@ -5055,27 +5067,27 @@ function Go(e, t) {
|
|
|
5055
5067
|
}
|
|
5056
5068
|
e2++;
|
|
5057
5069
|
} else
|
|
5058
|
-
D2.current = null == T2.current || Uo(T2.current,
|
|
5070
|
+
D2.current = null == T2.current || Uo(T2.current, w2, m) || p ? Dn(a, j2.current) : Tn(a, j2.current), T2.current = null, A(D2.current);
|
|
5059
5071
|
};
|
|
5060
5072
|
t2();
|
|
5061
5073
|
}
|
|
5062
5074
|
} else
|
|
5063
5075
|
Ln(a, s) || (D2.current = s, q2(a, D2, _2.current), _2.current = false);
|
|
5064
|
-
}, [l, n, r2.floating, s, W2, p, a,
|
|
5076
|
+
}, [l, n, r2.floating, s, W2, p, a, w2, m, A, q2, j2]), $n(() => {
|
|
5065
5077
|
var e2;
|
|
5066
|
-
if (!l || r2.floating || !
|
|
5078
|
+
if (!l || r2.floating || !I2 || h || !M2.current)
|
|
5067
5079
|
return;
|
|
5068
|
-
const t2 =
|
|
5080
|
+
const t2 = I2.nodesRef.current, n2 = null == (e2 = t2.find((e3) => e3.id === P2)) || null == (e2 = e2.context) ? void 0 : e2.elements.floating, o2 = je(Je(r2.floating)), i2 = t2.some((e3) => e3.context && ze(e3.context.elements.floating, o2));
|
|
5069
5081
|
n2 && !i2 && R2.current && n2.focus({ preventScroll: true });
|
|
5070
|
-
}, [l, r2.floating,
|
|
5071
|
-
if (l &&
|
|
5072
|
-
return
|
|
5073
|
-
|
|
5082
|
+
}, [l, r2.floating, I2, P2, h]), $n(() => {
|
|
5083
|
+
if (l && I2 && h && !P2)
|
|
5084
|
+
return I2.events.on("virtualfocus", e2), () => {
|
|
5085
|
+
I2.events.off("virtualfocus", e2);
|
|
5074
5086
|
};
|
|
5075
5087
|
function e2(e3) {
|
|
5076
|
-
G2(e3.id),
|
|
5088
|
+
G2(e3.id), C2 && (C2.current = e3);
|
|
5077
5089
|
}
|
|
5078
|
-
}, [l,
|
|
5090
|
+
}, [l, I2, h, P2, C2]), $n(() => {
|
|
5079
5091
|
B2.current = A, M2.current = !!r2.floating;
|
|
5080
5092
|
}), $n(() => {
|
|
5081
5093
|
n || (T2.current = null);
|
|
@@ -5107,11 +5119,11 @@ function Go(e, t) {
|
|
|
5107
5119
|
return;
|
|
5108
5120
|
if (!z2.current && e2.currentTarget === E2.current)
|
|
5109
5121
|
return;
|
|
5110
|
-
if (p && Ko(e2.key,
|
|
5111
|
-
return Ze(e2), i(false, e2.nativeEvent, "list-navigation"), void (
|
|
5112
|
-
const t2 = D2.current, o2 = Dn(a,
|
|
5122
|
+
if (p && Ko(e2.key, w2, m))
|
|
5123
|
+
return Ze(e2), i(false, e2.nativeEvent, "list-navigation"), void (be(r2.domReference) && (h ? null == I2 || I2.events.emit("virtualfocus", r2.domReference) : r2.domReference.focus()));
|
|
5124
|
+
const t2 = D2.current, o2 = Dn(a, b), s2 = Tn(a, b);
|
|
5113
5125
|
if (O || ("Home" === e2.key && (Ze(e2), D2.current = o2, A(D2.current)), "End" === e2.key && (Ze(e2), D2.current = s2, A(D2.current))), k > 1) {
|
|
5114
|
-
const t3 =
|
|
5126
|
+
const t3 = S2 || Array.from({ length: a.current.length }, () => ({ width: 1, height: 1 })), n2 = function(e3, t4, n3) {
|
|
5115
5127
|
const o3 = [];
|
|
5116
5128
|
let i3 = 0;
|
|
5117
5129
|
return e3.forEach((e4, r4) => {
|
|
@@ -5129,7 +5141,7 @@ function Go(e, t) {
|
|
|
5129
5141
|
}), c3 = true) : i3++;
|
|
5130
5142
|
}
|
|
5131
5143
|
}), [...o3];
|
|
5132
|
-
}(t3, k, N2), i2 = n2.findIndex((e3) => null != e3 && !Fn(a.current, e3,
|
|
5144
|
+
}(t3, k, N2), i2 = n2.findIndex((e3) => null != e3 && !Fn(a.current, e3, b)), r3 = n2.reduce((e3, t4, n3) => null == t4 || Fn(a.current, t4, b) ? e3 : n3, -1), c2 = n2[function(e3, t4) {
|
|
5133
5145
|
let { event: n3, orientation: o3, loop: i3, rtl: r4, cols: a2, disabledIndices: s3, minIndex: c3, maxIndex: l2, prevIndex: u2, stopEvent: d2 = false } = t4, f2 = u2;
|
|
5134
5146
|
if (n3.key === En) {
|
|
5135
5147
|
if (d2 && Ze(n3), -1 === u2)
|
|
@@ -5140,43 +5152,43 @@ function Go(e, t) {
|
|
|
5140
5152
|
}
|
|
5141
5153
|
Ln(e3, f2) && (f2 = u2);
|
|
5142
5154
|
}
|
|
5143
|
-
if (n3.key ===
|
|
5155
|
+
if (n3.key === Pn && (d2 && Ze(n3), -1 === u2 ? f2 = c3 : (f2 = Rn(e3, { startingIndex: u2, amount: a2, disabledIndices: s3 }), i3 && u2 + a2 > l2 && (f2 = Rn(e3, { startingIndex: u2 % a2 - a2, amount: a2, disabledIndices: s3 }))), Ln(e3, f2) && (f2 = u2)), "both" === o3) {
|
|
5144
5156
|
const t5 = it(u2 / a2);
|
|
5145
|
-
n3.key === (r4 ?
|
|
5157
|
+
n3.key === (r4 ? In : An) && (d2 && Ze(n3), u2 % a2 !== a2 - 1 ? (f2 = Rn(e3, { startingIndex: u2, disabledIndices: s3 }), i3 && On(f2, a2, t5) && (f2 = Rn(e3, { startingIndex: u2 - u2 % a2 - 1, disabledIndices: s3 }))) : i3 && (f2 = Rn(e3, { startingIndex: u2 - u2 % a2 - 1, disabledIndices: s3 })), On(f2, a2, t5) && (f2 = u2)), n3.key === (r4 ? An : In) && (d2 && Ze(n3), u2 % a2 !== 0 ? (f2 = Rn(e3, { startingIndex: u2, decrement: true, disabledIndices: s3 }), i3 && On(f2, a2, t5) && (f2 = Rn(e3, { startingIndex: u2 + (a2 - u2 % a2), decrement: true, disabledIndices: s3 }))) : i3 && (f2 = Rn(e3, { startingIndex: u2 + (a2 - u2 % a2), decrement: true, disabledIndices: s3 })), On(f2, a2, t5) && (f2 = u2));
|
|
5146
5158
|
const o4 = it(l2 / a2) === t5;
|
|
5147
|
-
Ln(e3, f2) && (f2 = i3 && o4 ? n3.key === (r4 ? An :
|
|
5159
|
+
Ln(e3, f2) && (f2 = i3 && o4 ? n3.key === (r4 ? An : In) ? l2 : Rn(e3, { startingIndex: u2 - u2 % a2 - 1, disabledIndices: s3 }) : u2);
|
|
5148
5160
|
}
|
|
5149
5161
|
return f2;
|
|
5150
|
-
}({ current: n2.map((e3) => null != e3 ? a.current[e3] : null) }, { event: e2, orientation:
|
|
5151
|
-
if (null != c2 && (D2.current = c2, A(D2.current)), "both" ===
|
|
5162
|
+
}({ current: n2.map((e3) => null != e3 ? a.current[e3] : null) }, { event: e2, orientation: w2, loop: f, rtl: m, cols: k, disabledIndices: Mn([...b || a.current.map((e3, t4) => Fn(a.current, t4) ? t4 : void 0), void 0], n2), minIndex: i2, maxIndex: r3, prevIndex: Bn(D2.current > s2 ? o2 : D2.current, t3, n2, k, e2.key === Pn ? "bl" : e2.key === (m ? In : An) ? "tr" : "tl"), stopEvent: true })];
|
|
5163
|
+
if (null != c2 && (D2.current = c2, A(D2.current)), "both" === w2)
|
|
5152
5164
|
return;
|
|
5153
5165
|
}
|
|
5154
|
-
if (Vo(e2.key,
|
|
5166
|
+
if (Vo(e2.key, w2)) {
|
|
5155
5167
|
if (Ze(e2), n && !h && je(e2.currentTarget.ownerDocument) === e2.currentTarget)
|
|
5156
|
-
return D2.current = Uo(e2.key,
|
|
5157
|
-
Uo(e2.key,
|
|
5168
|
+
return D2.current = Uo(e2.key, w2, m) ? o2 : s2, void A(D2.current);
|
|
5169
|
+
Uo(e2.key, w2, m) ? D2.current = f ? t2 >= s2 ? d && t2 !== a.current.length ? -1 : o2 : Rn(a, { startingIndex: t2, disabledIndices: b }) : Math.min(s2, Rn(a, { startingIndex: t2, disabledIndices: b })) : D2.current = f ? t2 <= o2 ? d && -1 !== t2 ? a.current.length : s2 : Rn(a, { startingIndex: t2, decrement: true, disabledIndices: b }) : Math.max(o2, Rn(a, { startingIndex: t2, decrement: true, disabledIndices: b })), Ln(a, D2.current) ? A(null) : A(D2.current);
|
|
5158
5170
|
}
|
|
5159
|
-
}), Q2 = o.useMemo(() => h && n && J2 && { "aria-activedescendant": K2 || V2 }, [h, n, J2, K2, V2]), Z2 = o.useMemo(() => ({ "aria-orientation": "both" ===
|
|
5171
|
+
}), Q2 = o.useMemo(() => h && n && J2 && { "aria-activedescendant": K2 || V2 }, [h, n, J2, K2, V2]), Z2 = o.useMemo(() => ({ "aria-orientation": "both" === w2 ? void 0 : w2, ...!et(r2.domReference) && Q2, onKeyDown: X2, onPointerMove() {
|
|
5160
5172
|
R2.current = true;
|
|
5161
|
-
} }), [Q2, X2, r2.domReference,
|
|
5173
|
+
} }), [Q2, X2, r2.domReference, w2]), ee2 = o.useMemo(() => {
|
|
5162
5174
|
function e2(e3) {
|
|
5163
5175
|
"auto" === g && Ve(e3.nativeEvent) && (L2.current = true);
|
|
5164
5176
|
}
|
|
5165
5177
|
return { ...Q2, onKeyDown(e3) {
|
|
5166
5178
|
R2.current = false;
|
|
5167
5179
|
const t2 = e3.key.startsWith("Arrow"), o2 = ["Home", "End"].includes(e3.key), r3 = t2 || o2, s2 = function(e4, t3, n2) {
|
|
5168
|
-
return Wo(t3, n2 ? e4 ===
|
|
5169
|
-
}(e3.key,
|
|
5180
|
+
return Wo(t3, n2 ? e4 === In : e4 === An, e4 === Pn);
|
|
5181
|
+
}(e3.key, w2, m), c2 = Ko(e3.key, w2, m), l2 = Vo(e3.key, w2), d2 = (p ? s2 : l2) || "Enter" === e3.key || "" === e3.key.trim();
|
|
5170
5182
|
if (h && n) {
|
|
5171
|
-
const t3 = null ==
|
|
5183
|
+
const t3 = null == I2 ? void 0 : I2.nodesRef.current.find((e4) => null == e4.parentId), n2 = I2 && t3 ? function(e4, t4) {
|
|
5172
5184
|
let n3, o3 = -1;
|
|
5173
5185
|
return function t5(i2, r4) {
|
|
5174
5186
|
r4 > o3 && (n3 = i2, o3 = r4), lo(e4, i2).forEach((e5) => {
|
|
5175
5187
|
t5(e5.id, r4 + 1);
|
|
5176
5188
|
});
|
|
5177
5189
|
}(t4, 0), e4.find((e5) => e5.id === n3);
|
|
5178
|
-
}(
|
|
5179
|
-
if (r3 && n2 &&
|
|
5190
|
+
}(I2.nodesRef.current, t3.id) : null;
|
|
5191
|
+
if (r3 && n2 && C2) {
|
|
5180
5192
|
const t4 = new KeyboardEvent("keydown", { key: e3.key, bubbles: true });
|
|
5181
5193
|
if (s2 || c2) {
|
|
5182
5194
|
var f2, g2;
|
|
@@ -5197,7 +5209,7 @@ function Go(e, t) {
|
|
|
5197
5209
|
}, onPointerDown: function(e3) {
|
|
5198
5210
|
L2.current = g, "auto" === g && Ue(e3.nativeEvent) && (L2.current = true);
|
|
5199
5211
|
}, onMouseDown: e2, onClick: e2 };
|
|
5200
|
-
}, [V2, Q2, X2, j2, g, a, p, A, i, n, v,
|
|
5212
|
+
}, [V2, Q2, X2, j2, g, a, p, A, i, n, v, w2, m, u, I2, h, C2]);
|
|
5201
5213
|
return o.useMemo(() => l ? { reference: ee2, floating: Z2, item: Y2 } : {}, [l, ee2, Z2, Y2]);
|
|
5202
5214
|
}
|
|
5203
5215
|
const qo = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", false]]);
|
|
@@ -5223,40 +5235,40 @@ function Yo(e) {
|
|
|
5223
5235
|
}
|
|
5224
5236
|
if (clearTimeout(i), !d.domReference || !d.floating || null == u || null == n2 || null == l2)
|
|
5225
5237
|
return;
|
|
5226
|
-
const { clientX: g, clientY: y } = e3, v = [g, y],
|
|
5238
|
+
const { clientX: g, clientY: y } = e3, v = [g, y], b = Xe(e3), w2 = "mouseleave" === e3.type, k = ze(d.floating, b), x = ze(d.domReference, b), C2 = d.domReference.getBoundingClientRect(), S2 = d.floating.getBoundingClientRect(), N2 = u.split("-")[0], E2 = n2 > S2.right - S2.width / 2, P2 = l2 > S2.bottom - S2.height / 2, I2 = function(e4, t2) {
|
|
5227
5239
|
return e4[0] >= t2.x && e4[0] <= t2.x + t2.width && e4[1] >= t2.y && e4[1] <= t2.y + t2.height;
|
|
5228
|
-
}(v,
|
|
5229
|
-
if (k && (r2 = true, !
|
|
5240
|
+
}(v, C2), A = S2.width > C2.width, O = S2.height > C2.height, L2 = (A ? C2 : S2).left, D2 = (A ? C2 : S2).right, T2 = (O ? C2 : S2).top, R2 = (O ? C2 : S2).bottom;
|
|
5241
|
+
if (k && (r2 = true, !w2))
|
|
5230
5242
|
return;
|
|
5231
|
-
if (x && (r2 = false), x && !
|
|
5243
|
+
if (x && (r2 = false), x && !w2)
|
|
5232
5244
|
return void (r2 = true);
|
|
5233
|
-
if (
|
|
5245
|
+
if (w2 && ve(e3.relatedTarget) && ze(d.floating, e3.relatedTarget))
|
|
5234
5246
|
return;
|
|
5235
5247
|
if (m && lo(m.nodesRef.current, p).some((e4) => {
|
|
5236
5248
|
let { context: t2 } = e4;
|
|
5237
5249
|
return null == t2 ? void 0 : t2.open;
|
|
5238
5250
|
}))
|
|
5239
5251
|
return;
|
|
5240
|
-
if ("top" === N2 && l2 >=
|
|
5252
|
+
if ("top" === N2 && l2 >= C2.bottom - 1 || "bottom" === N2 && l2 <= C2.top + 1 || "left" === N2 && n2 >= C2.right - 1 || "right" === N2 && n2 <= C2.left + 1)
|
|
5241
5253
|
return h();
|
|
5242
5254
|
let B2 = [];
|
|
5243
5255
|
switch (N2) {
|
|
5244
5256
|
case "top":
|
|
5245
|
-
B2 = [[L2,
|
|
5257
|
+
B2 = [[L2, C2.top + 1], [L2, S2.bottom - 1], [D2, S2.bottom - 1], [D2, C2.top + 1]];
|
|
5246
5258
|
break;
|
|
5247
5259
|
case "bottom":
|
|
5248
|
-
B2 = [[L2,
|
|
5260
|
+
B2 = [[L2, S2.top + 1], [L2, C2.bottom - 1], [D2, C2.bottom - 1], [D2, S2.top + 1]];
|
|
5249
5261
|
break;
|
|
5250
5262
|
case "left":
|
|
5251
|
-
B2 = [[
|
|
5263
|
+
B2 = [[S2.right - 1, R2], [S2.right - 1, T2], [C2.left + 1, T2], [C2.left + 1, R2]];
|
|
5252
5264
|
break;
|
|
5253
5265
|
case "right":
|
|
5254
|
-
B2 = [[
|
|
5266
|
+
B2 = [[C2.right - 1, R2], [C2.right - 1, T2], [S2.left + 1, T2], [S2.left + 1, R2]];
|
|
5255
5267
|
}
|
|
5256
5268
|
if (!Jo([g, y], B2)) {
|
|
5257
|
-
if (r2 && !
|
|
5269
|
+
if (r2 && !I2)
|
|
5258
5270
|
return h();
|
|
5259
|
-
if (!
|
|
5271
|
+
if (!w2 && o2) {
|
|
5260
5272
|
const t2 = function(e4, t3) {
|
|
5261
5273
|
const n3 = performance.now(), o3 = n3 - c;
|
|
5262
5274
|
if (null === a || null === s || 0 === o3)
|
|
@@ -5271,15 +5283,15 @@ function Yo(e) {
|
|
|
5271
5283
|
let [n3, o3] = e4;
|
|
5272
5284
|
switch (N2) {
|
|
5273
5285
|
case "top":
|
|
5274
|
-
return [[A ? n3 + t / 2 : E2 ? n3 + 4 * t : n3 - 4 * t, o3 + t + 1], [A ? n3 - t / 2 : E2 ? n3 + 4 * t : n3 - 4 * t, o3 + t + 1], ...[[
|
|
5286
|
+
return [[A ? n3 + t / 2 : E2 ? n3 + 4 * t : n3 - 4 * t, o3 + t + 1], [A ? n3 - t / 2 : E2 ? n3 + 4 * t : n3 - 4 * t, o3 + t + 1], ...[[S2.left, E2 || A ? S2.bottom - t : S2.top], [S2.right, E2 ? A ? S2.bottom - t : S2.top : S2.bottom - t]]];
|
|
5275
5287
|
case "bottom":
|
|
5276
|
-
return [[A ? n3 + t / 2 : E2 ? n3 + 4 * t : n3 - 4 * t, o3 - t], [A ? n3 - t / 2 : E2 ? n3 + 4 * t : n3 - 4 * t, o3 - t], ...[[
|
|
5288
|
+
return [[A ? n3 + t / 2 : E2 ? n3 + 4 * t : n3 - 4 * t, o3 - t], [A ? n3 - t / 2 : E2 ? n3 + 4 * t : n3 - 4 * t, o3 - t], ...[[S2.left, E2 || A ? S2.top + t : S2.bottom], [S2.right, E2 ? A ? S2.top + t : S2.bottom : S2.top + t]]];
|
|
5277
5289
|
case "left": {
|
|
5278
|
-
const e5 = [n3 + t + 1, O ? o3 + t / 2 :
|
|
5279
|
-
return [...[[
|
|
5290
|
+
const e5 = [n3 + t + 1, O ? o3 + t / 2 : P2 ? o3 + 4 * t : o3 - 4 * t], i2 = [n3 + t + 1, O ? o3 - t / 2 : P2 ? o3 + 4 * t : o3 - 4 * t];
|
|
5291
|
+
return [...[[P2 || O ? S2.right - t : S2.left, S2.top], [P2 ? O ? S2.right - t : S2.left : S2.right - t, S2.bottom]], e5, i2];
|
|
5280
5292
|
}
|
|
5281
5293
|
case "right":
|
|
5282
|
-
return [[n3 - t, O ? o3 + t / 2 :
|
|
5294
|
+
return [[n3 - t, O ? o3 + t / 2 : P2 ? o3 + 4 * t : o3 - 4 * t], [n3 - t, O ? o3 - t / 2 : P2 ? o3 + 4 * t : o3 - 4 * t], ...[[P2 || O ? S2.left + t : S2.right, S2.top], [P2 ? O ? S2.left + t : S2.right : S2.left + t, S2.bottom]]];
|
|
5283
5295
|
}
|
|
5284
5296
|
}([n2, l2])) ? !r2 && o2 && (i = window.setTimeout(h, 40)) : h();
|
|
5285
5297
|
}
|
|
@@ -5304,7 +5316,7 @@ const Xo = createContext({ getItemProps: () => ({}), activeIndex: null, setActiv
|
|
|
5304
5316
|
});
|
|
5305
5317
|
Qo.displayName = "DropdownMenuItem";
|
|
5306
5318
|
const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRight: a, text: s = "", disabled: p, children: m, ...h }, g) => {
|
|
5307
|
-
const [y, v] = useState(false), [
|
|
5319
|
+
const [y, v] = useState(false), [b, w2] = useState(false), [k, x] = useState(null), C2 = useRef([]), S2 = useRef([]), N2 = useContext(Xo), P2 = eo(), I2 = function() {
|
|
5308
5320
|
const e = Gn(), t = eo(), n2 = Zn();
|
|
5309
5321
|
return $n(() => {
|
|
5310
5322
|
const o2 = { id: e, parentId: n2 };
|
|
@@ -5312,12 +5324,12 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5312
5324
|
null == t || t.removeNode(o2);
|
|
5313
5325
|
};
|
|
5314
5326
|
}, [t, e, n2]), e;
|
|
5315
|
-
}(), A = Zn(), O = Hn(), L2 = null != A, { floatingStyles: D2, refs: T2, context: R2 } = $o({ nodeId:
|
|
5327
|
+
}(), A = Zn(), O = Hn(), L2 = null != A, { floatingStyles: D2, refs: T2, context: R2 } = $o({ nodeId: I2, open: y, onOpenChange: v, placement: L2 ? "right-start" : "bottom-start", middleware: [(B2 = { mainAxis: L2 ? 0 : 4, alignmentAxis: L2 ? -4 : 0 }, { ...dn(B2), options: [B2, M2] }), kn(), wn()], whileElementsMounted: un });
|
|
5316
5328
|
var B2, M2;
|
|
5317
5329
|
const F = function(e, t) {
|
|
5318
5330
|
void 0 === t && (t = {});
|
|
5319
|
-
const { open: n2, onOpenChange: i2, dataRef: r3, events: a2, elements: s2 } = e, { enabled: c = true, delay: l = 0, handleClose: u = null, mouseOnly: d = false, restMs: f = 0, move: p2 = true } = t, m2 = eo(), h2 = Zn(), g2 = io(u), y2 = io(l), v2 = io(n2),
|
|
5320
|
-
}), E2 = o.useRef(false),
|
|
5331
|
+
const { open: n2, onOpenChange: i2, dataRef: r3, events: a2, elements: s2 } = e, { enabled: c = true, delay: l = 0, handleClose: u = null, mouseOnly: d = false, restMs: f = 0, move: p2 = true } = t, m2 = eo(), h2 = Zn(), g2 = io(u), y2 = io(l), v2 = io(n2), b2 = o.useRef(), w3 = o.useRef(-1), k2 = o.useRef(), x2 = o.useRef(-1), C3 = o.useRef(true), S3 = o.useRef(false), N3 = o.useRef(() => {
|
|
5332
|
+
}), E2 = o.useRef(false), P3 = o.useCallback(() => {
|
|
5321
5333
|
var e2;
|
|
5322
5334
|
const t2 = null == (e2 = r3.current.openEvent) ? void 0 : e2.type;
|
|
5323
5335
|
return (null == t2 ? void 0 : t2.includes("mouse")) && "mousedown" !== t2;
|
|
@@ -5329,7 +5341,7 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5329
5341
|
};
|
|
5330
5342
|
function e2(e3) {
|
|
5331
5343
|
let { open: t2 } = e3;
|
|
5332
|
-
t2 || (clearTimeout(
|
|
5344
|
+
t2 || (clearTimeout(w3.current), clearTimeout(x2.current), C3.current = true, E2.current = false);
|
|
5333
5345
|
}
|
|
5334
5346
|
}, [c, a2]), o.useEffect(() => {
|
|
5335
5347
|
if (!c)
|
|
@@ -5339,23 +5351,23 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5339
5351
|
if (!n2)
|
|
5340
5352
|
return;
|
|
5341
5353
|
function e2(e3) {
|
|
5342
|
-
|
|
5354
|
+
P3() && i2(false, e3, "hover");
|
|
5343
5355
|
}
|
|
5344
5356
|
const t2 = Je(s2.floating).documentElement;
|
|
5345
5357
|
return t2.addEventListener("mouseleave", e2), () => {
|
|
5346
5358
|
t2.removeEventListener("mouseleave", e2);
|
|
5347
5359
|
};
|
|
5348
|
-
}, [s2.floating, n2, i2, c, g2,
|
|
5349
|
-
const
|
|
5360
|
+
}, [s2.floating, n2, i2, c, g2, P3]);
|
|
5361
|
+
const I3 = o.useCallback(function(e2, t2, n3) {
|
|
5350
5362
|
void 0 === t2 && (t2 = true), void 0 === n3 && (n3 = "hover");
|
|
5351
|
-
const o2 = ao(y2.current, "close",
|
|
5352
|
-
o2 && !k2.current ? (clearTimeout(
|
|
5363
|
+
const o2 = ao(y2.current, "close", b2.current);
|
|
5364
|
+
o2 && !k2.current ? (clearTimeout(w3.current), w3.current = window.setTimeout(() => i2(false, e2, n3), o2)) : t2 && (clearTimeout(w3.current), i2(false, e2, n3));
|
|
5353
5365
|
}, [y2, i2]), A2 = Nn(() => {
|
|
5354
5366
|
N3.current(), k2.current = void 0;
|
|
5355
5367
|
}), O2 = Nn(() => {
|
|
5356
|
-
if (
|
|
5368
|
+
if (S3.current) {
|
|
5357
5369
|
const e2 = Je(s2.floating).body;
|
|
5358
|
-
e2.style.pointerEvents = "", e2.removeAttribute(ro),
|
|
5370
|
+
e2.style.pointerEvents = "", e2.removeAttribute(ro), S3.current = false;
|
|
5359
5371
|
}
|
|
5360
5372
|
}), L3 = Nn(() => !!r3.current.openEvent && ["click", "mousedown"].includes(r3.current.openEvent.type));
|
|
5361
5373
|
o.useEffect(() => {
|
|
@@ -5368,10 +5380,10 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5368
5380
|
};
|
|
5369
5381
|
}
|
|
5370
5382
|
function t2(e3) {
|
|
5371
|
-
if (clearTimeout(
|
|
5383
|
+
if (clearTimeout(w3.current), C3.current = false, d && !qe(b2.current) || f > 0 && !ao(y2.current, "open"))
|
|
5372
5384
|
return;
|
|
5373
|
-
const t3 = ao(y2.current, "open",
|
|
5374
|
-
t3 ?
|
|
5385
|
+
const t3 = ao(y2.current, "open", b2.current);
|
|
5386
|
+
t3 ? w3.current = window.setTimeout(() => {
|
|
5375
5387
|
v2.current || i2(true, e3, "hover");
|
|
5376
5388
|
}, t3) : n2 || i2(true, e3, "hover");
|
|
5377
5389
|
}
|
|
@@ -5381,25 +5393,25 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5381
5393
|
N3.current();
|
|
5382
5394
|
const t3 = Je(s2.floating);
|
|
5383
5395
|
if (clearTimeout(x2.current), E2.current = false, g2.current && r3.current.floatingContext) {
|
|
5384
|
-
n2 || clearTimeout(
|
|
5385
|
-
O2(), A2(), L3() ||
|
|
5396
|
+
n2 || clearTimeout(w3.current), k2.current = g2.current({ ...r3.current.floatingContext, tree: m2, x: e3.clientX, y: e3.clientY, onClose() {
|
|
5397
|
+
O2(), A2(), L3() || I3(e3, true, "safe-polygon");
|
|
5386
5398
|
} });
|
|
5387
5399
|
const o3 = k2.current;
|
|
5388
5400
|
return t3.addEventListener("mousemove", o3), void (N3.current = () => {
|
|
5389
5401
|
t3.removeEventListener("mousemove", o3);
|
|
5390
5402
|
});
|
|
5391
5403
|
}
|
|
5392
|
-
("touch" !==
|
|
5404
|
+
("touch" !== b2.current || !ze(s2.floating, e3.relatedTarget)) && I3(e3);
|
|
5393
5405
|
}
|
|
5394
5406
|
function a3(e3) {
|
|
5395
5407
|
L3() || r3.current.floatingContext && (null == g2.current || g2.current({ ...r3.current.floatingContext, tree: m2, x: e3.clientX, y: e3.clientY, onClose() {
|
|
5396
|
-
O2(), A2(), L3() ||
|
|
5408
|
+
O2(), A2(), L3() || I3(e3);
|
|
5397
5409
|
} })(e3));
|
|
5398
5410
|
}
|
|
5399
|
-
}, [s2, c, e, d, f, p2,
|
|
5411
|
+
}, [s2, c, e, d, f, p2, I3, A2, O2, i2, n2, v2, m2, y2, g2, r3, L3]), $n(() => {
|
|
5400
5412
|
var e2;
|
|
5401
|
-
if (c && n2 && null != (e2 = g2.current) && e2.__options.blockPointerEvents &&
|
|
5402
|
-
|
|
5413
|
+
if (c && n2 && null != (e2 = g2.current) && e2.__options.blockPointerEvents && P3()) {
|
|
5414
|
+
S3.current = true;
|
|
5403
5415
|
const e3 = s2.floating;
|
|
5404
5416
|
if (ve(s2.domReference) && e3) {
|
|
5405
5417
|
var t2;
|
|
@@ -5411,27 +5423,27 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5411
5423
|
};
|
|
5412
5424
|
}
|
|
5413
5425
|
}
|
|
5414
|
-
}, [c, n2, h2, s2, m2, g2,
|
|
5415
|
-
n2 || (
|
|
5426
|
+
}, [c, n2, h2, s2, m2, g2, P3]), $n(() => {
|
|
5427
|
+
n2 || (b2.current = void 0, E2.current = false, A2(), O2());
|
|
5416
5428
|
}, [n2, A2, O2]), o.useEffect(() => () => {
|
|
5417
|
-
A2(), clearTimeout(
|
|
5429
|
+
A2(), clearTimeout(w3.current), clearTimeout(x2.current), O2();
|
|
5418
5430
|
}, [c, s2.domReference, A2, O2]);
|
|
5419
5431
|
const D3 = o.useMemo(() => {
|
|
5420
5432
|
function e2(e3) {
|
|
5421
|
-
|
|
5433
|
+
b2.current = e3.pointerType;
|
|
5422
5434
|
}
|
|
5423
5435
|
return { onPointerDown: e2, onPointerEnter: e2, onMouseMove(e3) {
|
|
5424
5436
|
const { nativeEvent: t2 } = e3;
|
|
5425
5437
|
function o2() {
|
|
5426
|
-
|
|
5438
|
+
C3.current || v2.current || i2(true, t2, "hover");
|
|
5427
5439
|
}
|
|
5428
|
-
d && !qe(
|
|
5440
|
+
d && !qe(b2.current) || n2 || 0 === f || E2.current && e3.movementX ** 2 + e3.movementY ** 2 < 2 || (clearTimeout(x2.current), "touch" === b2.current ? o2() : (E2.current = true, x2.current = window.setTimeout(o2, f)));
|
|
5429
5441
|
} };
|
|
5430
5442
|
}, [d, i2, n2, v2, f]), T3 = o.useMemo(() => ({ onMouseEnter() {
|
|
5431
|
-
clearTimeout(
|
|
5443
|
+
clearTimeout(w3.current);
|
|
5432
5444
|
}, onMouseLeave(e2) {
|
|
5433
|
-
L3() ||
|
|
5434
|
-
} }), [
|
|
5445
|
+
L3() || I3(e2.nativeEvent, false);
|
|
5446
|
+
} }), [I3, L3]);
|
|
5435
5447
|
return o.useMemo(() => c ? { reference: D3, floating: T3 } : {}, [c, D3, T3]);
|
|
5436
5448
|
}(R2, { enabled: L2, delay: { open: 75 }, handleClose: Yo({ blockPointerEvents: true }) }), _2 = function(e, t) {
|
|
5437
5449
|
void 0 === t && (t = {});
|
|
@@ -5469,7 +5481,7 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5469
5481
|
return o.useMemo(() => a2 ? { reference: d, floating: f, item: p2 } : {}, [a2, d, f, p2]);
|
|
5470
5482
|
}(R2, { role: "menu" }), z2 = function(e, t) {
|
|
5471
5483
|
void 0 === t && (t = {});
|
|
5472
|
-
const { open: n2, onOpenChange: i2, elements: r3, dataRef: a2 } = e, { enabled: s2 = true, escapeKey: c = true, outsidePress: l = true, outsidePressEvent: u = "pointerdown", referencePress: d = false, referencePressEvent: f = "pointerdown", ancestorScroll: p2 = false, bubbles: m2, capture: h2 } = t, g2 = eo(), y2 = Nn("function" == typeof l ? l : () => false), v2 = "function" == typeof l ? y2 : l,
|
|
5484
|
+
const { open: n2, onOpenChange: i2, elements: r3, dataRef: a2 } = e, { enabled: s2 = true, escapeKey: c = true, outsidePress: l = true, outsidePressEvent: u = "pointerdown", referencePress: d = false, referencePressEvent: f = "pointerdown", ancestorScroll: p2 = false, bubbles: m2, capture: h2 } = t, g2 = eo(), y2 = Nn("function" == typeof l ? l : () => false), v2 = "function" == typeof l ? y2 : l, b2 = o.useRef(false), w3 = o.useRef(false), { escapeKey: k2, outsidePress: x2 } = Mo(m2), { escapeKey: C3, outsidePress: S3 } = Mo(h2), N3 = o.useRef(false), E2 = Nn((e2) => {
|
|
5473
5485
|
var t2;
|
|
5474
5486
|
if (!n2 || !s2 || !c || "Escape" !== e2.key)
|
|
5475
5487
|
return;
|
|
@@ -5487,19 +5499,19 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5487
5499
|
i2(false, function(e3) {
|
|
5488
5500
|
return "nativeEvent" in e3;
|
|
5489
5501
|
}(e2) ? e2.nativeEvent : e2, "escape-key");
|
|
5490
|
-
}),
|
|
5502
|
+
}), P3 = Nn((e2) => {
|
|
5491
5503
|
var t2;
|
|
5492
5504
|
const n3 = () => {
|
|
5493
5505
|
var t3;
|
|
5494
5506
|
E2(e2), null == (t3 = Xe(e2)) || t3.removeEventListener("keydown", n3);
|
|
5495
5507
|
};
|
|
5496
5508
|
null == (t2 = Xe(e2)) || t2.addEventListener("keydown", n3);
|
|
5497
|
-
}),
|
|
5509
|
+
}), I3 = Nn((e2) => {
|
|
5498
5510
|
var t2;
|
|
5499
|
-
const n3 =
|
|
5500
|
-
|
|
5501
|
-
const o2 =
|
|
5502
|
-
if (
|
|
5511
|
+
const n3 = b2.current;
|
|
5512
|
+
b2.current = false;
|
|
5513
|
+
const o2 = w3.current;
|
|
5514
|
+
if (w3.current = false, "click" === u && o2)
|
|
5503
5515
|
return;
|
|
5504
5516
|
if (n3)
|
|
5505
5517
|
return;
|
|
@@ -5515,7 +5527,7 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5515
5527
|
}
|
|
5516
5528
|
if (l2.length && ve(s3) && !s3.matches("html,body") && !ze(s3, r3.floating) && Array.from(l2).every((e3) => !ze(d2, e3)))
|
|
5517
5529
|
return;
|
|
5518
|
-
if (
|
|
5530
|
+
if (be(s3) && L3) {
|
|
5519
5531
|
const t3 = s3.clientWidth > 0 && s3.scrollWidth > s3.clientWidth, n4 = s3.clientHeight > 0 && s3.scrollHeight > s3.clientHeight;
|
|
5520
5532
|
let o3 = n4 && e2.offsetX > s3.clientWidth;
|
|
5521
5533
|
if (n4 && "rtl" === Re(s3).direction && (o3 = e2.offsetX <= s3.offsetWidth - s3.clientWidth), o3 || t3 && e2.offsetY > s3.clientHeight)
|
|
@@ -5541,7 +5553,7 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5541
5553
|
var t2;
|
|
5542
5554
|
const n3 = () => {
|
|
5543
5555
|
var t3;
|
|
5544
|
-
|
|
5556
|
+
I3(e2), null == (t3 = Xe(e2)) || t3.removeEventListener(u, n3);
|
|
5545
5557
|
};
|
|
5546
5558
|
null == (t2 = Xe(e2)) || t2.addEventListener(u, n3);
|
|
5547
5559
|
});
|
|
@@ -5562,7 +5574,7 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5562
5574
|
}, Le() ? 5 : 0);
|
|
5563
5575
|
}
|
|
5564
5576
|
const d2 = Je(r3.floating);
|
|
5565
|
-
c && (d2.addEventListener("keydown",
|
|
5577
|
+
c && (d2.addEventListener("keydown", C3 ? P3 : E2, C3), d2.addEventListener("compositionstart", o2), d2.addEventListener("compositionend", l2)), v2 && d2.addEventListener(u, S3 ? A2 : I3, S3);
|
|
5566
5578
|
let f2 = [];
|
|
5567
5579
|
return p2 && (ve(r3.domReference) && (f2 = $e(r3.domReference)), ve(r3.floating) && (f2 = f2.concat($e(r3.floating))), !ve(r3.reference) && r3.reference && r3.reference.contextElement && (f2 = f2.concat($e(r3.reference.contextElement)))), f2 = f2.filter((e3) => {
|
|
5568
5580
|
var t3;
|
|
@@ -5570,47 +5582,47 @@ const Zo = forwardRef(({ className: n, variant: i = "default", icon: r2, iconRig
|
|
|
5570
5582
|
}), f2.forEach((e3) => {
|
|
5571
5583
|
e3.addEventListener("scroll", t2, { passive: true });
|
|
5572
5584
|
}), () => {
|
|
5573
|
-
c && (d2.removeEventListener("keydown",
|
|
5585
|
+
c && (d2.removeEventListener("keydown", C3 ? P3 : E2, C3), d2.removeEventListener("compositionstart", o2), d2.removeEventListener("compositionend", l2)), v2 && d2.removeEventListener(u, S3 ? A2 : I3, S3), f2.forEach((e3) => {
|
|
5574
5586
|
e3.removeEventListener("scroll", t2);
|
|
5575
5587
|
}), window.clearTimeout(e2);
|
|
5576
5588
|
};
|
|
5577
|
-
}, [a2, r3, c, v2, u, n2, i2, p2, s2, k2, x2, E2,
|
|
5578
|
-
|
|
5589
|
+
}, [a2, r3, c, v2, u, n2, i2, p2, s2, k2, x2, E2, C3, P3, I3, S3, A2]), o.useEffect(() => {
|
|
5590
|
+
b2.current = false;
|
|
5579
5591
|
}, [v2, u]);
|
|
5580
5592
|
const O2 = o.useMemo(() => ({ onKeyDown: E2, [Ro[f]]: (e2) => {
|
|
5581
5593
|
d && i2(false, e2.nativeEvent, "reference-press");
|
|
5582
5594
|
} }), [E2, i2, d, f]), L3 = o.useMemo(() => ({ onKeyDown: E2, onMouseDown() {
|
|
5583
|
-
|
|
5595
|
+
w3.current = true;
|
|
5584
5596
|
}, onMouseUp() {
|
|
5585
|
-
|
|
5597
|
+
w3.current = true;
|
|
5586
5598
|
}, [Bo[u]]: () => {
|
|
5587
|
-
|
|
5599
|
+
b2.current = true;
|
|
5588
5600
|
} }), [E2, u]);
|
|
5589
5601
|
return o.useMemo(() => s2 ? { reference: O2, floating: L3 } : {}, [s2, O2, L3]);
|
|
5590
|
-
}(R2, { bubbles: true }), H2 = Go(R2, { listRef:
|
|
5602
|
+
}(R2, { bubbles: true }), H2 = Go(R2, { listRef: C2, activeIndex: k, nested: L2, onNavigate: x }), { getReferenceProps: W2, getFloatingProps: V2, getItemProps: U2 } = function(e) {
|
|
5591
5603
|
void 0 === e && (e = []);
|
|
5592
5604
|
const t = e.map((e2) => null == e2 ? void 0 : e2.reference), n2 = e.map((e2) => null == e2 ? void 0 : e2.floating), i2 = e.map((e2) => null == e2 ? void 0 : e2.item), r3 = o.useCallback((t2) => zo(t2, e, "reference"), t), a2 = o.useCallback((t2) => zo(t2, e, "floating"), n2), s2 = o.useCallback((t2) => zo(t2, e, "item"), i2);
|
|
5593
5605
|
return o.useMemo(() => ({ getReferenceProps: r3, getFloatingProps: a2, getItemProps: s2 }), [r3, a2, s2]);
|
|
5594
5606
|
}([F, _2, j2, z2, H2]);
|
|
5595
5607
|
useEffect(() => {
|
|
5596
|
-
if (
|
|
5597
|
-
return
|
|
5598
|
-
|
|
5608
|
+
if (P2)
|
|
5609
|
+
return P2.events.on("click", e), P2.events.on("menuopen", t), () => {
|
|
5610
|
+
P2.events.off("click", e), P2.events.off("menuopen", t);
|
|
5599
5611
|
};
|
|
5600
5612
|
function e() {
|
|
5601
5613
|
v(false);
|
|
5602
5614
|
}
|
|
5603
5615
|
function t(e2) {
|
|
5604
|
-
e2.nodeId !==
|
|
5616
|
+
e2.nodeId !== I2 && e2.parentId === A && v(false);
|
|
5605
5617
|
}
|
|
5606
|
-
}, [
|
|
5607
|
-
y &&
|
|
5608
|
-
}, [
|
|
5609
|
-
const K2 = { activeIndex: k, setActiveIndex: x, getItemProps: U2, setHasFocusInside:
|
|
5610
|
-
return jsxs(to, { id:
|
|
5618
|
+
}, [P2, I2, A]), useEffect(() => {
|
|
5619
|
+
y && P2 && P2.events.emit("menuopen", { parentId: A, nodeId: I2 });
|
|
5620
|
+
}, [P2, y, I2, A]);
|
|
5621
|
+
const K2 = { activeIndex: k, setActiveIndex: x, getItemProps: U2, setHasFocusInside: w2, isOpen: y, setIsOpen: v }, G2 = useMemo(() => K2, [k, x, U2, w2, y]), q2 = E("io-dropdown-menu-button", L2 && "io-dropdown-menu-item", y && !L2 && "active", n), J2 = xn([T2.setReference, O.ref, g]), Y2 = N2.activeIndex === O.index ? 0 : -1;
|
|
5622
|
+
return jsxs(to, { id: I2, children: [jsx($, { className: q2, ref: J2, variant: L2 ? "link" : i, tabIndex: L2 ? Y2 : void 0, role: L2 ? "menuitem" : void 0, "data-open": y ? "" : void 0, "data-nested": L2 ? "" : void 0, "data-focus-inside": b ? "" : void 0, text: s, icon: L2 ? "chevron-right" : r2, iconSize: "10", iconRight: !!L2 || a, disabled: p, ...W2(N2.getItemProps({ onFocus(e) {
|
|
5611
5623
|
var _a2;
|
|
5612
|
-
(_a2 = h.onFocus) == null ? void 0 : _a2.call(h, e),
|
|
5613
|
-
}, ...h })) }), jsx(Xo.Provider, { value: G2, children: jsx(zn, { elementsRef:
|
|
5624
|
+
(_a2 = h.onFocus) == null ? void 0 : _a2.call(h, e), w2(false), N2.setHasFocusInside(true);
|
|
5625
|
+
}, ...h })) }), jsx(Xo.Provider, { value: G2, children: jsx(zn, { elementsRef: C2, labelsRef: S2, children: y && jsx(Lo, { context: R2, modal: false, initialFocus: L2 ? -1 : 0, returnFocus: !L2, children: jsx("div", { ref: T2.setFloating, className: "io-dropdown-menu", style: D2, ...V2(), children: m }) }) }) })] });
|
|
5614
5626
|
});
|
|
5615
5627
|
Zo.displayName = "DropdownMenu";
|
|
5616
5628
|
const ei = forwardRef(({ ...t }, n) => null === Zn() ? jsx(no, { children: jsx(Zo, { ref: n, ...t }) }) : jsx(Zo, { ref: n, ...t }));
|
|
@@ -5635,17 +5647,17 @@ function yi(e) {
|
|
|
5635
5647
|
function vi(e) {
|
|
5636
5648
|
return e instanceof yi(e).Element || e instanceof Element;
|
|
5637
5649
|
}
|
|
5638
|
-
function
|
|
5650
|
+
function bi(e) {
|
|
5639
5651
|
return e instanceof yi(e).HTMLElement || e instanceof HTMLElement;
|
|
5640
5652
|
}
|
|
5641
|
-
function
|
|
5653
|
+
function wi(e) {
|
|
5642
5654
|
return "undefined" != typeof ShadowRoot && (e instanceof yi(e).ShadowRoot || e instanceof ShadowRoot);
|
|
5643
5655
|
}
|
|
5644
5656
|
var ki = { name: "applyStyles", enabled: true, phase: "write", fn: function(e) {
|
|
5645
5657
|
var t = e.state;
|
|
5646
5658
|
Object.keys(t.elements).forEach(function(e2) {
|
|
5647
5659
|
var n = t.styles[e2] || {}, o2 = t.attributes[e2] || {}, i = t.elements[e2];
|
|
5648
|
-
|
|
5660
|
+
bi(i) && gi(i) && (Object.assign(i.style, n), Object.keys(o2).forEach(function(e3) {
|
|
5649
5661
|
var t2 = o2[e3];
|
|
5650
5662
|
false === t2 ? i.removeAttribute(e3) : i.setAttribute(e3, true === t2 ? "" : t2);
|
|
5651
5663
|
}));
|
|
@@ -5657,7 +5669,7 @@ var ki = { name: "applyStyles", enabled: true, phase: "write", fn: function(e) {
|
|
|
5657
5669
|
var o2 = t.elements[e2], i = t.attributes[e2] || {}, r2 = Object.keys(t.styles.hasOwnProperty(e2) ? t.styles[e2] : n[e2]).reduce(function(e3, t2) {
|
|
5658
5670
|
return e3[t2] = "", e3;
|
|
5659
5671
|
}, {});
|
|
5660
|
-
|
|
5672
|
+
bi(o2) && gi(o2) && (Object.assign(o2.style, r2), Object.keys(i).forEach(function(e3) {
|
|
5661
5673
|
o2.removeAttribute(e3);
|
|
5662
5674
|
}));
|
|
5663
5675
|
});
|
|
@@ -5666,32 +5678,32 @@ var ki = { name: "applyStyles", enabled: true, phase: "write", fn: function(e) {
|
|
|
5666
5678
|
function xi(e) {
|
|
5667
5679
|
return e.split("-")[0];
|
|
5668
5680
|
}
|
|
5669
|
-
var
|
|
5681
|
+
var Ci = Math.max, Si = Math.min, Ni = Math.round;
|
|
5670
5682
|
function Ei() {
|
|
5671
5683
|
var e = navigator.userAgentData;
|
|
5672
5684
|
return null != e && e.brands && Array.isArray(e.brands) ? e.brands.map(function(e2) {
|
|
5673
5685
|
return e2.brand + "/" + e2.version;
|
|
5674
5686
|
}).join(" ") : navigator.userAgent;
|
|
5675
5687
|
}
|
|
5676
|
-
function
|
|
5688
|
+
function Pi() {
|
|
5677
5689
|
return !/^((?!chrome|android).)*safari/i.test(Ei());
|
|
5678
5690
|
}
|
|
5679
|
-
function
|
|
5691
|
+
function Ii(e, t, n) {
|
|
5680
5692
|
void 0 === t && (t = false), void 0 === n && (n = false);
|
|
5681
5693
|
var o2 = e.getBoundingClientRect(), i = 1, r2 = 1;
|
|
5682
|
-
t &&
|
|
5683
|
-
var a = (vi(e) ? yi(e) : window).visualViewport, s = !
|
|
5694
|
+
t && bi(e) && (i = e.offsetWidth > 0 && Ni(o2.width) / e.offsetWidth || 1, r2 = e.offsetHeight > 0 && Ni(o2.height) / e.offsetHeight || 1);
|
|
5695
|
+
var a = (vi(e) ? yi(e) : window).visualViewport, s = !Pi() && n, c = (o2.left + (s && a ? a.offsetLeft : 0)) / i, l = (o2.top + (s && a ? a.offsetTop : 0)) / r2, u = o2.width / i, d = o2.height / r2;
|
|
5684
5696
|
return { width: u, height: d, top: l, right: c + u, bottom: l + d, left: c, x: c, y: l };
|
|
5685
5697
|
}
|
|
5686
5698
|
function Ai(e) {
|
|
5687
|
-
var t =
|
|
5699
|
+
var t = Ii(e), n = e.offsetWidth, o2 = e.offsetHeight;
|
|
5688
5700
|
return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - o2) <= 1 && (o2 = t.height), { x: e.offsetLeft, y: e.offsetTop, width: n, height: o2 };
|
|
5689
5701
|
}
|
|
5690
5702
|
function Oi(e, t) {
|
|
5691
5703
|
var n = t.getRootNode && t.getRootNode();
|
|
5692
5704
|
if (e.contains(t))
|
|
5693
5705
|
return true;
|
|
5694
|
-
if (n &&
|
|
5706
|
+
if (n && wi(n)) {
|
|
5695
5707
|
var o2 = t;
|
|
5696
5708
|
do {
|
|
5697
5709
|
if (o2 && e.isSameNode(o2))
|
|
@@ -5711,20 +5723,20 @@ function Ti(e) {
|
|
|
5711
5723
|
return ((vi(e) ? e.ownerDocument : e.document) || window.document).documentElement;
|
|
5712
5724
|
}
|
|
5713
5725
|
function Ri(e) {
|
|
5714
|
-
return "html" === gi(e) ? e : e.assignedSlot || e.parentNode || (
|
|
5726
|
+
return "html" === gi(e) ? e : e.assignedSlot || e.parentNode || (wi(e) ? e.host : null) || Ti(e);
|
|
5715
5727
|
}
|
|
5716
5728
|
function Bi(e) {
|
|
5717
|
-
return
|
|
5729
|
+
return bi(e) && "fixed" !== Li(e).position ? e.offsetParent : null;
|
|
5718
5730
|
}
|
|
5719
5731
|
function Mi(e) {
|
|
5720
5732
|
for (var t = yi(e), n = Bi(e); n && Di(n) && "static" === Li(n).position; )
|
|
5721
5733
|
n = Bi(n);
|
|
5722
5734
|
return n && ("html" === gi(n) || "body" === gi(n) && "static" === Li(n).position) ? t : n || function(e2) {
|
|
5723
5735
|
var t2 = /firefox/i.test(Ei());
|
|
5724
|
-
if (/Trident/i.test(Ei()) &&
|
|
5736
|
+
if (/Trident/i.test(Ei()) && bi(e2) && "fixed" === Li(e2).position)
|
|
5725
5737
|
return null;
|
|
5726
5738
|
var n2 = Ri(e2);
|
|
5727
|
-
for (
|
|
5739
|
+
for (wi(n2) && (n2 = n2.host); bi(n2) && ["html", "body"].indexOf(gi(n2)) < 0; ) {
|
|
5728
5740
|
var o2 = Li(n2);
|
|
5729
5741
|
if ("none" !== o2.transform || "none" !== o2.perspective || "paint" === o2.contain || -1 !== ["transform", "perspective"].indexOf(o2.willChange) || t2 && "filter" === o2.willChange || t2 && o2.filter && "none" !== o2.filter)
|
|
5730
5742
|
return n2;
|
|
@@ -5737,7 +5749,7 @@ function Fi(e) {
|
|
|
5737
5749
|
return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
|
|
5738
5750
|
}
|
|
5739
5751
|
function $i(e, t, n) {
|
|
5740
|
-
return
|
|
5752
|
+
return Ci(e, Si(t, n));
|
|
5741
5753
|
}
|
|
5742
5754
|
function _i(e) {
|
|
5743
5755
|
return Object.assign({}, { top: 0, right: 0, bottom: 0, left: 0 }, e);
|
|
@@ -5752,8 +5764,8 @@ var zi = { name: "arrow", enabled: true, phase: "main", fn: function(e) {
|
|
|
5752
5764
|
if (r2 && a) {
|
|
5753
5765
|
var u = function(e2, t2) {
|
|
5754
5766
|
return _i("number" != typeof (e2 = "function" == typeof e2 ? e2(Object.assign({}, t2.rects, { placement: t2.placement })) : e2) ? e2 : ji(e2, ci));
|
|
5755
|
-
}(i.padding, n), d = Ai(r2), f = "y" === c ? oi : ai, p = "y" === c ? ii : ri, m = n.rects.reference[l] + n.rects.reference[c] - a[c] - n.rects.popper[l], h = a[c] - n.rects.reference[c], g = Mi(r2), y = g ? "y" === c ? g.clientHeight || 0 : g.clientWidth || 0 : 0, v = m / 2 - h / 2,
|
|
5756
|
-
n.modifiersData[o2] = ((t = {})[
|
|
5767
|
+
}(i.padding, n), d = Ai(r2), f = "y" === c ? oi : ai, p = "y" === c ? ii : ri, m = n.rects.reference[l] + n.rects.reference[c] - a[c] - n.rects.popper[l], h = a[c] - n.rects.reference[c], g = Mi(r2), y = g ? "y" === c ? g.clientHeight || 0 : g.clientWidth || 0 : 0, v = m / 2 - h / 2, b = u[f], w2 = y - d[l] - u[p], k = y / 2 - d[l] / 2 + v, x = $i(b, k, w2), C2 = c;
|
|
5768
|
+
n.modifiersData[o2] = ((t = {})[C2] = x, t.centerOffset = x - k, t);
|
|
5757
5769
|
}
|
|
5758
5770
|
}, effect: function(e) {
|
|
5759
5771
|
var t = e.state, n = e.options.element, o2 = void 0 === n ? "[data-popper-arrow]" : n;
|
|
@@ -5766,19 +5778,19 @@ var Wi = { top: "auto", right: "auto", bottom: "auto", left: "auto" };
|
|
|
5766
5778
|
function Vi(e) {
|
|
5767
5779
|
var t, n = e.popper, o2 = e.popperRect, i = e.placement, r2 = e.variation, a = e.offsets, s = e.position, c = e.gpuAcceleration, l = e.adaptive, u = e.roundOffsets, d = e.isFixed, f = a.x, p = void 0 === f ? 0 : f, m = a.y, h = void 0 === m ? 0 : m, g = "function" == typeof u ? u({ x: p, y: h }) : { x: p, y: h };
|
|
5768
5780
|
p = g.x, h = g.y;
|
|
5769
|
-
var y = a.hasOwnProperty("x"), v = a.hasOwnProperty("y"),
|
|
5781
|
+
var y = a.hasOwnProperty("x"), v = a.hasOwnProperty("y"), b = ai, w2 = oi, k = window;
|
|
5770
5782
|
if (l) {
|
|
5771
|
-
var x = Mi(n),
|
|
5772
|
-
if (x === yi(n) && "static" !== Li(x = Ti(n)).position && "absolute" === s && (
|
|
5773
|
-
|
|
5783
|
+
var x = Mi(n), C2 = "clientHeight", S2 = "clientWidth";
|
|
5784
|
+
if (x === yi(n) && "static" !== Li(x = Ti(n)).position && "absolute" === s && (C2 = "scrollHeight", S2 = "scrollWidth"), i === oi || (i === ai || i === ri) && r2 === ui)
|
|
5785
|
+
w2 = ii, h -= (d && x === k && k.visualViewport ? k.visualViewport.height : x[C2]) - o2.height, h *= c ? 1 : -1;
|
|
5774
5786
|
if (i === ai || (i === oi || i === ii) && r2 === ui)
|
|
5775
|
-
|
|
5787
|
+
b = ri, p -= (d && x === k && k.visualViewport ? k.visualViewport.width : x[S2]) - o2.width, p *= c ? 1 : -1;
|
|
5776
5788
|
}
|
|
5777
|
-
var N2, E2 = Object.assign({ position: s }, l && Wi),
|
|
5789
|
+
var N2, E2 = Object.assign({ position: s }, l && Wi), P2 = true === u ? function(e2, t2) {
|
|
5778
5790
|
var n2 = e2.x, o3 = e2.y, i2 = t2.devicePixelRatio || 1;
|
|
5779
5791
|
return { x: Ni(n2 * i2) / i2 || 0, y: Ni(o3 * i2) / i2 || 0 };
|
|
5780
5792
|
}({ x: p, y: h }, yi(n)) : { x: p, y: h };
|
|
5781
|
-
return p =
|
|
5793
|
+
return p = P2.x, h = P2.y, c ? Object.assign({}, E2, ((N2 = {})[w2] = v ? "0" : "", N2[b] = y ? "0" : "", N2.transform = (k.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + h + "px)" : "translate3d(" + p + "px, " + h + "px, 0)", N2)) : Object.assign({}, E2, ((t = {})[w2] = v ? h + "px" : "", t[b] = y ? p + "px" : "", t.transform = "", t));
|
|
5782
5794
|
}
|
|
5783
5795
|
var Ui = { passive: true };
|
|
5784
5796
|
var Ki = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
|
@@ -5798,14 +5810,14 @@ function Yi(e) {
|
|
|
5798
5810
|
return { scrollLeft: t.pageXOffset, scrollTop: t.pageYOffset };
|
|
5799
5811
|
}
|
|
5800
5812
|
function Xi(e) {
|
|
5801
|
-
return
|
|
5813
|
+
return Ii(Ti(e)).left + Yi(e).scrollLeft;
|
|
5802
5814
|
}
|
|
5803
5815
|
function Qi(e) {
|
|
5804
5816
|
var t = Li(e), n = t.overflow, o2 = t.overflowX, i = t.overflowY;
|
|
5805
5817
|
return /auto|scroll|overlay|hidden/.test(n + i + o2);
|
|
5806
5818
|
}
|
|
5807
5819
|
function Zi(e) {
|
|
5808
|
-
return ["html", "body", "#document"].indexOf(gi(e)) >= 0 ? e.ownerDocument.body :
|
|
5820
|
+
return ["html", "body", "#document"].indexOf(gi(e)) >= 0 ? e.ownerDocument.body : bi(e) && Qi(e) ? e : Zi(Ri(e));
|
|
5809
5821
|
}
|
|
5810
5822
|
function er(e, t) {
|
|
5811
5823
|
var n;
|
|
@@ -5821,27 +5833,27 @@ function nr(e, t, n) {
|
|
|
5821
5833
|
var n2 = yi(e2), o2 = Ti(e2), i = n2.visualViewport, r2 = o2.clientWidth, a = o2.clientHeight, s = 0, c = 0;
|
|
5822
5834
|
if (i) {
|
|
5823
5835
|
r2 = i.width, a = i.height;
|
|
5824
|
-
var l =
|
|
5836
|
+
var l = Pi();
|
|
5825
5837
|
(l || !l && "fixed" === t2) && (s = i.offsetLeft, c = i.offsetTop);
|
|
5826
5838
|
}
|
|
5827
5839
|
return { width: r2, height: a, x: s + Xi(e2), y: c };
|
|
5828
5840
|
}(e, n)) : vi(t) ? function(e2, t2) {
|
|
5829
|
-
var n2 =
|
|
5841
|
+
var n2 = Ii(e2, false, "fixed" === t2);
|
|
5830
5842
|
return n2.top = n2.top + e2.clientTop, n2.left = n2.left + e2.clientLeft, n2.bottom = n2.top + e2.clientHeight, n2.right = n2.left + e2.clientWidth, n2.width = e2.clientWidth, n2.height = e2.clientHeight, n2.x = n2.left, n2.y = n2.top, n2;
|
|
5831
5843
|
}(t, n) : tr(function(e2) {
|
|
5832
|
-
var t2, n2 = Ti(e2), o2 = Yi(e2), i = null == (t2 = e2.ownerDocument) ? void 0 : t2.body, r2 =
|
|
5833
|
-
return "rtl" === Li(i || n2).direction && (s +=
|
|
5844
|
+
var t2, n2 = Ti(e2), o2 = Yi(e2), i = null == (t2 = e2.ownerDocument) ? void 0 : t2.body, r2 = Ci(n2.scrollWidth, n2.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), a = Ci(n2.scrollHeight, n2.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -o2.scrollLeft + Xi(e2), c = -o2.scrollTop;
|
|
5845
|
+
return "rtl" === Li(i || n2).direction && (s += Ci(n2.clientWidth, i ? i.clientWidth : 0) - r2), { width: r2, height: a, x: s, y: c };
|
|
5834
5846
|
}(Ti(e)));
|
|
5835
5847
|
}
|
|
5836
5848
|
function or(e, t, n, o2) {
|
|
5837
5849
|
var i = "clippingParents" === t ? function(e2) {
|
|
5838
|
-
var t2 = er(Ri(e2)), n2 = ["absolute", "fixed"].indexOf(Li(e2).position) >= 0 &&
|
|
5850
|
+
var t2 = er(Ri(e2)), n2 = ["absolute", "fixed"].indexOf(Li(e2).position) >= 0 && bi(e2) ? Mi(e2) : e2;
|
|
5839
5851
|
return vi(n2) ? t2.filter(function(e3) {
|
|
5840
5852
|
return vi(e3) && Oi(e3, n2) && "body" !== gi(e3);
|
|
5841
5853
|
}) : [];
|
|
5842
5854
|
}(e) : [].concat(t), r2 = [].concat(i, [n]), a = r2[0], s = r2.reduce(function(t2, n2) {
|
|
5843
5855
|
var i2 = nr(e, n2, o2);
|
|
5844
|
-
return t2.top =
|
|
5856
|
+
return t2.top = Ci(i2.top, t2.top), t2.right = Si(i2.right, t2.right), t2.bottom = Si(i2.bottom, t2.bottom), t2.left = Ci(i2.left, t2.left), t2;
|
|
5845
5857
|
}, nr(e, a, o2));
|
|
5846
5858
|
return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
|
|
5847
5859
|
}
|
|
@@ -5878,12 +5890,12 @@ function ir(e) {
|
|
|
5878
5890
|
}
|
|
5879
5891
|
function rr(e, t) {
|
|
5880
5892
|
void 0 === t && (t = {});
|
|
5881
|
-
var n = t, o2 = n.placement, i = void 0 === o2 ? e.placement : o2, r2 = n.strategy, a = void 0 === r2 ? e.strategy : r2, s = n.boundary, c = void 0 === s ? "clippingParents" : s, l = n.rootBoundary, u = void 0 === l ? di : l, d = n.elementContext, f = void 0 === d ? fi : d, p = n.altBoundary, m = void 0 !== p && p, h = n.padding, g = void 0 === h ? 0 : h, y = _i("number" != typeof g ? g : ji(g, ci)), v = f === fi ? "reference" : fi,
|
|
5882
|
-
if (f === fi &&
|
|
5883
|
-
var
|
|
5893
|
+
var n = t, o2 = n.placement, i = void 0 === o2 ? e.placement : o2, r2 = n.strategy, a = void 0 === r2 ? e.strategy : r2, s = n.boundary, c = void 0 === s ? "clippingParents" : s, l = n.rootBoundary, u = void 0 === l ? di : l, d = n.elementContext, f = void 0 === d ? fi : d, p = n.altBoundary, m = void 0 !== p && p, h = n.padding, g = void 0 === h ? 0 : h, y = _i("number" != typeof g ? g : ji(g, ci)), v = f === fi ? "reference" : fi, b = e.rects.popper, w2 = e.elements[m ? v : f], k = or(vi(w2) ? w2 : w2.contextElement || Ti(e.elements.popper), c, u, a), x = Ii(e.elements.reference), C2 = ir({ reference: x, element: b, strategy: "absolute", placement: i }), S2 = tr(Object.assign({}, b, C2)), N2 = f === fi ? S2 : x, E2 = { top: k.top - N2.top + y.top, bottom: N2.bottom - k.bottom + y.bottom, left: k.left - N2.left + y.left, right: N2.right - k.right + y.right }, P2 = e.modifiersData.offset;
|
|
5894
|
+
if (f === fi && P2) {
|
|
5895
|
+
var I2 = P2[i];
|
|
5884
5896
|
Object.keys(E2).forEach(function(e2) {
|
|
5885
5897
|
var t2 = [ri, ii].indexOf(e2) >= 0 ? 1 : -1, n2 = [oi, ii].indexOf(e2) >= 0 ? "y" : "x";
|
|
5886
|
-
E2[e2] +=
|
|
5898
|
+
E2[e2] += I2[n2] * t2;
|
|
5887
5899
|
});
|
|
5888
5900
|
}
|
|
5889
5901
|
return E2;
|
|
@@ -5911,23 +5923,23 @@ var sr = { name: "flip", enabled: true, phase: "main", fn: function(e) {
|
|
|
5911
5923
|
return [];
|
|
5912
5924
|
var t2 = Gi(e2);
|
|
5913
5925
|
return [Ji(e2), t2, Ji(t2)];
|
|
5914
|
-
}(g)),
|
|
5926
|
+
}(g)), b = [g].concat(v).reduce(function(e2, n2) {
|
|
5915
5927
|
return e2.concat(xi(n2) === si ? ar(t, { placement: n2, boundary: u, rootBoundary: d, padding: l, flipVariations: m, allowedAutoPlacements: h }) : n2);
|
|
5916
|
-
}, []),
|
|
5917
|
-
var E2 =
|
|
5918
|
-
|
|
5928
|
+
}, []), w2 = t.rects.reference, k = t.rects.popper, x = /* @__PURE__ */ new Map(), C2 = true, S2 = b[0], N2 = 0; N2 < b.length; N2++) {
|
|
5929
|
+
var E2 = b[N2], P2 = xi(E2), I2 = Hi(E2) === li, A = [oi, ii].indexOf(P2) >= 0, O = A ? "width" : "height", L2 = rr(t, { placement: E2, boundary: u, rootBoundary: d, altBoundary: f, padding: l }), D2 = A ? I2 ? ri : ai : I2 ? ii : oi;
|
|
5930
|
+
w2[O] > k[O] && (D2 = Gi(D2));
|
|
5919
5931
|
var T2 = Gi(D2), R2 = [];
|
|
5920
|
-
if (r2 && R2.push(L2[
|
|
5932
|
+
if (r2 && R2.push(L2[P2] <= 0), s && R2.push(L2[D2] <= 0, L2[T2] <= 0), R2.every(function(e2) {
|
|
5921
5933
|
return e2;
|
|
5922
5934
|
})) {
|
|
5923
|
-
|
|
5935
|
+
S2 = E2, C2 = false;
|
|
5924
5936
|
break;
|
|
5925
5937
|
}
|
|
5926
5938
|
x.set(E2, R2);
|
|
5927
5939
|
}
|
|
5928
|
-
if (
|
|
5940
|
+
if (C2)
|
|
5929
5941
|
for (var B2 = function(e2) {
|
|
5930
|
-
var t2 =
|
|
5942
|
+
var t2 = b.find(function(t3) {
|
|
5931
5943
|
var n2 = x.get(t3);
|
|
5932
5944
|
if (n2)
|
|
5933
5945
|
return n2.slice(0, e2).every(function(e3) {
|
|
@@ -5935,12 +5947,12 @@ var sr = { name: "flip", enabled: true, phase: "main", fn: function(e) {
|
|
|
5935
5947
|
});
|
|
5936
5948
|
});
|
|
5937
5949
|
if (t2)
|
|
5938
|
-
return
|
|
5950
|
+
return S2 = t2, "break";
|
|
5939
5951
|
}, M2 = m ? 3 : 1; M2 > 0; M2--) {
|
|
5940
5952
|
if ("break" === B2(M2))
|
|
5941
5953
|
break;
|
|
5942
5954
|
}
|
|
5943
|
-
t.placement !==
|
|
5955
|
+
t.placement !== S2 && (t.modifiersData[o2]._skip = true, t.placement = S2, t.reset = true);
|
|
5944
5956
|
}
|
|
5945
5957
|
}, requiresIfExists: ["offset"], data: { _skip: false } };
|
|
5946
5958
|
function cr(e, t, n) {
|
|
@@ -5961,29 +5973,29 @@ var ur = { name: "offset", enabled: true, phase: "main", requires: ["popperOffse
|
|
|
5961
5973
|
null != t.modifiersData.popperOffsets && (t.modifiersData.popperOffsets.x += c, t.modifiersData.popperOffsets.y += l), t.modifiersData[o2] = a;
|
|
5962
5974
|
} };
|
|
5963
5975
|
var dr = { name: "preventOverflow", enabled: true, phase: "main", fn: function(e) {
|
|
5964
|
-
var t = e.state, n = e.options, o2 = e.name, i = n.mainAxis, r2 = void 0 === i || i, a = n.altAxis, s = void 0 !== a && a, c = n.boundary, l = n.rootBoundary, u = n.altBoundary, d = n.padding, f = n.tether, p = void 0 === f || f, m = n.tetherOffset, h = void 0 === m ? 0 : m, g = rr(t, { boundary: c, rootBoundary: l, padding: d, altBoundary: u }), y = xi(t.placement), v = Hi(t.placement),
|
|
5976
|
+
var t = e.state, n = e.options, o2 = e.name, i = n.mainAxis, r2 = void 0 === i || i, a = n.altAxis, s = void 0 !== a && a, c = n.boundary, l = n.rootBoundary, u = n.altBoundary, d = n.padding, f = n.tether, p = void 0 === f || f, m = n.tetherOffset, h = void 0 === m ? 0 : m, g = rr(t, { boundary: c, rootBoundary: l, padding: d, altBoundary: u }), y = xi(t.placement), v = Hi(t.placement), b = !v, w2 = Fi(y), k = "x" === w2 ? "y" : "x", x = t.modifiersData.popperOffsets, C2 = t.rects.reference, S2 = t.rects.popper, N2 = "function" == typeof h ? h(Object.assign({}, t.rects, { placement: t.placement })) : h, E2 = "number" == typeof N2 ? { mainAxis: N2, altAxis: N2 } : Object.assign({ mainAxis: 0, altAxis: 0 }, N2), P2 = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, I2 = { x: 0, y: 0 };
|
|
5965
5977
|
if (x) {
|
|
5966
5978
|
if (r2) {
|
|
5967
|
-
var A, O = "y" ===
|
|
5968
|
-
x[
|
|
5979
|
+
var A, O = "y" === w2 ? oi : ai, L2 = "y" === w2 ? ii : ri, D2 = "y" === w2 ? "height" : "width", T2 = x[w2], R2 = T2 + g[O], B2 = T2 - g[L2], M2 = p ? -S2[D2] / 2 : 0, F = v === li ? C2[D2] : S2[D2], $2 = v === li ? -S2[D2] : -C2[D2], _2 = t.elements.arrow, j2 = p && _2 ? Ai(_2) : { width: 0, height: 0 }, z2 = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : { top: 0, right: 0, bottom: 0, left: 0 }, H2 = z2[O], W2 = z2[L2], V2 = $i(0, C2[D2], j2[D2]), U2 = b ? C2[D2] / 2 - M2 - V2 - H2 - E2.mainAxis : F - V2 - H2 - E2.mainAxis, K2 = b ? -C2[D2] / 2 + M2 + V2 + W2 + E2.mainAxis : $2 + V2 + W2 + E2.mainAxis, G2 = t.elements.arrow && Mi(t.elements.arrow), q2 = G2 ? "y" === w2 ? G2.clientTop || 0 : G2.clientLeft || 0 : 0, J2 = null != (A = null == P2 ? void 0 : P2[w2]) ? A : 0, Y2 = T2 + K2 - J2, X2 = $i(p ? Si(R2, T2 + U2 - J2 - q2) : R2, T2, p ? Ci(B2, Y2) : B2);
|
|
5980
|
+
x[w2] = X2, I2[w2] = X2 - T2;
|
|
5969
5981
|
}
|
|
5970
5982
|
if (s) {
|
|
5971
|
-
var Q2, Z2 = "x" ===
|
|
5983
|
+
var Q2, Z2 = "x" === w2 ? oi : ai, ee2 = "x" === w2 ? ii : ri, te2 = x[k], ne2 = "y" === k ? "height" : "width", oe2 = te2 + g[Z2], ie2 = te2 - g[ee2], re2 = -1 !== [oi, ai].indexOf(y), ae2 = null != (Q2 = null == P2 ? void 0 : P2[k]) ? Q2 : 0, se2 = re2 ? oe2 : te2 - C2[ne2] - S2[ne2] - ae2 + E2.altAxis, ce2 = re2 ? te2 + C2[ne2] + S2[ne2] - ae2 - E2.altAxis : ie2, le2 = p && re2 ? function(e2, t2, n2) {
|
|
5972
5984
|
var o3 = $i(e2, t2, n2);
|
|
5973
5985
|
return o3 > n2 ? n2 : o3;
|
|
5974
5986
|
}(se2, te2, ce2) : $i(p ? se2 : oe2, te2, p ? ce2 : ie2);
|
|
5975
|
-
x[k] = le2,
|
|
5987
|
+
x[k] = le2, I2[k] = le2 - te2;
|
|
5976
5988
|
}
|
|
5977
|
-
t.modifiersData[o2] =
|
|
5989
|
+
t.modifiersData[o2] = I2;
|
|
5978
5990
|
}
|
|
5979
5991
|
}, requiresIfExists: ["offset"] };
|
|
5980
5992
|
function fr(e, t, n) {
|
|
5981
5993
|
void 0 === n && (n = false);
|
|
5982
|
-
var o2, i, r2 =
|
|
5994
|
+
var o2, i, r2 = bi(t), a = bi(t) && function(e2) {
|
|
5983
5995
|
var t2 = e2.getBoundingClientRect(), n2 = Ni(t2.width) / e2.offsetWidth || 1, o3 = Ni(t2.height) / e2.offsetHeight || 1;
|
|
5984
5996
|
return 1 !== n2 || 1 !== o3;
|
|
5985
|
-
}(t), s = Ti(t), c =
|
|
5986
|
-
return (r2 || !r2 && !n) && (("body" !== gi(t) || Qi(s)) && (l = (o2 = t) !== yi(o2) &&
|
|
5997
|
+
}(t), s = Ti(t), c = Ii(e, a, n), l = { scrollLeft: 0, scrollTop: 0 }, u = { x: 0, y: 0 };
|
|
5998
|
+
return (r2 || !r2 && !n) && (("body" !== gi(t) || Qi(s)) && (l = (o2 = t) !== yi(o2) && bi(o2) ? { scrollLeft: (i = o2).scrollLeft, scrollTop: i.scrollTop } : Yi(o2)), bi(t) ? ((u = Ii(t, true)).x += t.clientLeft, u.y += t.clientTop) : s && (u.x = Xi(s))), { x: c.left + l.scrollLeft - u.x, y: c.top + l.scrollTop - u.y, width: c.width, height: c.height };
|
|
5987
5999
|
}
|
|
5988
6000
|
function pr(e) {
|
|
5989
6001
|
var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), o2 = [];
|
|
@@ -6100,7 +6112,7 @@ gr({ defaultModifiers: [{ name: "eventListeners", enabled: true, phase: "write",
|
|
|
6100
6112
|
var t = e.state, n = e.name, o2 = t.rects.reference, i = t.rects.popper, r2 = t.modifiersData.preventOverflow, a = rr(t, { elementContext: "reference" }), s = rr(t, { altBoundary: true }), c = cr(a, o2), l = cr(s, i, r2), u = lr(c), d = lr(l);
|
|
6101
6113
|
t.modifiersData[n] = { referenceClippingOffsets: c, popperEscapeOffsets: l, isReferenceHidden: u, hasPopperEscaped: d }, t.attributes.popper = Object.assign({}, t.attributes.popper, { "data-popper-reference-hidden": u, "data-popper-escaped": d });
|
|
6102
6114
|
} }] });
|
|
6103
|
-
var vr = "undefined" != typeof Element,
|
|
6115
|
+
var vr = "undefined" != typeof Element, br = "function" == typeof Map, wr = "function" == typeof Set, kr = "function" == typeof ArrayBuffer && !!ArrayBuffer.isView;
|
|
6104
6116
|
function xr(e, t) {
|
|
6105
6117
|
if (e === t)
|
|
6106
6118
|
return true;
|
|
@@ -6116,7 +6128,7 @@ function xr(e, t) {
|
|
|
6116
6128
|
return false;
|
|
6117
6129
|
return true;
|
|
6118
6130
|
}
|
|
6119
|
-
if (
|
|
6131
|
+
if (br && e instanceof Map && t instanceof Map) {
|
|
6120
6132
|
if (e.size !== t.size)
|
|
6121
6133
|
return false;
|
|
6122
6134
|
for (r2 = e.entries(); !(o2 = r2.next()).done; )
|
|
@@ -6127,7 +6139,7 @@ function xr(e, t) {
|
|
|
6127
6139
|
return false;
|
|
6128
6140
|
return true;
|
|
6129
6141
|
}
|
|
6130
|
-
if (
|
|
6142
|
+
if (wr && e instanceof Set && t instanceof Set) {
|
|
6131
6143
|
if (e.size !== t.size)
|
|
6132
6144
|
return false;
|
|
6133
6145
|
for (r2 = e.entries(); !(o2 = r2.next()).done; )
|
|
@@ -6163,7 +6175,7 @@ function xr(e, t) {
|
|
|
6163
6175
|
}
|
|
6164
6176
|
return e != e && t != t;
|
|
6165
6177
|
}
|
|
6166
|
-
var
|
|
6178
|
+
var Cr = function(e, t) {
|
|
6167
6179
|
try {
|
|
6168
6180
|
return xr(e, t);
|
|
6169
6181
|
} catch (e2) {
|
|
@@ -6172,12 +6184,12 @@ var Sr = function(e, t) {
|
|
|
6172
6184
|
throw e2;
|
|
6173
6185
|
}
|
|
6174
6186
|
};
|
|
6175
|
-
|
|
6187
|
+
C(Cr);
|
|
6176
6188
|
function Er({ className: t, variant: n = "default", size: o2 = "16", src: i, alt: r2, ...a }) {
|
|
6177
6189
|
const s = E("io-image-icon", "grayscale" === n && [`io-image-icon-${n}`], o2 && [`io-image-icon-${o2}`], t);
|
|
6178
6190
|
return jsx("img", { className: s, style: { width: `${o2}px`, filter: "grayscale" === n ? "grayscale(100%)" : "none" }, src: i, alt: r2, ...a });
|
|
6179
6191
|
}
|
|
6180
|
-
const
|
|
6192
|
+
const Pr = forwardRef((n, o2) => {
|
|
6181
6193
|
const { title: i, actions: r2, className: a, onClose: s, onActionItemClick: c, "data-testid": u = "context-menu", ...p } = n, m = useRef({}), [g, y] = useState(0), v = (e) => {
|
|
6182
6194
|
var _a2;
|
|
6183
6195
|
(_a2 = m.current[e]) == null ? void 0 : _a2.focus(), y(e);
|
|
@@ -6186,11 +6198,11 @@ const Ir = forwardRef((n, o2) => {
|
|
|
6186
6198
|
var _a2;
|
|
6187
6199
|
(_a2 = m.current[g]) == null ? void 0 : _a2.focus();
|
|
6188
6200
|
}, []), jsxs(Q, { ref: o2, className: E(a, "context-menu"), onClick: (e) => e.stopPropagation(), onKeyDown: (e) => M({ event: e, currentIndex: g, min: 0, max: r2.length - 1, moveFocus: v, onClose: s }), "data-testid": u, ...p, children: [i && jsx(Q.ItemSection, { children: i }), r2.map((n2, o3) => {
|
|
6189
|
-
const i2 = n2.displayName || n2.name, r3 = n2.iconSrc ? jsx(Er, { size: "16", src: n2.iconSrc, alt: `${i2} icon` }) : n2.icon && jsx(
|
|
6201
|
+
const i2 = n2.displayName || n2.name, r3 = n2.iconSrc ? jsx(Er, { size: "16", src: n2.iconSrc, alt: `${i2} icon` }) : n2.icon && jsx(P, { size: "16", variant: n2.icon });
|
|
6190
6202
|
return jsxs(Fragment$1, { children: [jsx(Q.Item, { ref: (e) => m.current[o3] = e, prepend: r3, disabled: n2.disabled, tabIndex: -1, ...B((e) => c(e, n2)), "data-testid": `${u}-item-${n2.name}`, children: i2 }), n2.separatorAfter && jsx("li", { className: "context-menu-separator", "aria-hidden": true, "data-testid": `${u}-separator` })] }, n2.name);
|
|
6191
6203
|
})] });
|
|
6192
6204
|
});
|
|
6193
|
-
|
|
6205
|
+
Pr.displayName = "ContextMenuActionsList";
|
|
6194
6206
|
const Or = () => void 0 !== window.glue42gd || void 0 !== window.glue42alert || void 0 !== window.glue42dialog || void 0 !== window.iodesktop, $r = "warning", _r = { success: 5e3, warning: 1e4 }, jr = (e) => "string" == typeof e ? e : (e == null ? void 0 : e.message) ? "string" == typeof e.message ? e.message : JSON.stringify(e.message) : JSON.stringify(e), zr = async (e) => {
|
|
6195
6207
|
const { io: t, variant: n, text: o2, error: i } = e, r2 = jr(i);
|
|
6196
6208
|
try {
|
|
@@ -6527,7 +6539,7 @@ function Vs({ className: t, children: n, ...o2 }) {
|
|
|
6527
6539
|
const i = E("io-panel-header", t);
|
|
6528
6540
|
return jsx(se, { className: i, ...o2, children: n });
|
|
6529
6541
|
}
|
|
6530
|
-
Vs.Title = D, Vs.ButtonGroup = ae, Vs.Button = $, Vs.ButtonIcon =
|
|
6542
|
+
Vs.Title = D, Vs.ButtonGroup = ae, Vs.Button = $, Vs.ButtonIcon = I, Vs.Dropdown = re;
|
|
6531
6543
|
const Us = forwardRef(({ className: t, children: n, ...o2 }, i) => {
|
|
6532
6544
|
const r2 = E("io-panel-body", t);
|
|
6533
6545
|
return jsx("div", { className: r2, ref: i, "data-testid": "panel-body", ...o2, children: n });
|
|
@@ -6558,7 +6570,7 @@ function Js({ className: t, variant: n = "active", value: o2 = 0, ...i }) {
|
|
|
6558
6570
|
*
|
|
6559
6571
|
* Released under the MIT license.
|
|
6560
6572
|
*/
|
|
6561
|
-
Us.displayName = "PanelBody", Ks.ButtonGroup = ae, Ks.Button = $, Ks.ButtonIcon =
|
|
6573
|
+
Us.displayName = "PanelBody", Ks.ButtonGroup = ae, Ks.Button = $, Ks.ButtonIcon = I, Ks.Dropdown = re, Gs.Header = Vs, Gs.Body = Us, Gs.Footer = Ks, qs.Icon = P;
|
|
6562
6574
|
const Ys = (e, t) => {
|
|
6563
6575
|
const { o: n, i: o2, u: i } = e;
|
|
6564
6576
|
let r2, a = n;
|
|
@@ -6567,24 +6579,24 @@ const Ys = (e, t) => {
|
|
|
6567
6579
|
return (c || i) && (a = s2, r2 = n2), [a, c, r2];
|
|
6568
6580
|
};
|
|
6569
6581
|
return [t ? (e2) => s(t(a, r2), e2) : s, (e2) => [a, !!e2, r2]];
|
|
6570
|
-
}, Xs = "undefined" != typeof window && "undefined" != typeof HTMLElement && !!window.document ? window : {}, Qs = Math.max, Zs = Math.min, ec = Math.round, tc = Math.abs, nc = Math.sign, oc = Xs.cancelAnimationFrame, ic = Xs.requestAnimationFrame, rc = Xs.setTimeout, ac = Xs.clearTimeout, sc = (e) => void 0 !== Xs[e] ? Xs[e] : void 0, cc = sc("MutationObserver"), lc = sc("IntersectionObserver"), uc = sc("ResizeObserver"), dc = sc("ScrollTimeline"), fc = (e) => void 0 === e, pc = (e) => null === e, mc = (e) => "number" == typeof e, hc = (e) => "string" == typeof e, gc = (e) => "boolean" == typeof e, yc = (e) => "function" == typeof e, vc = (e) => Array.isArray(e),
|
|
6582
|
+
}, Xs = "undefined" != typeof window && "undefined" != typeof HTMLElement && !!window.document ? window : {}, Qs = Math.max, Zs = Math.min, ec = Math.round, tc = Math.abs, nc = Math.sign, oc = Xs.cancelAnimationFrame, ic = Xs.requestAnimationFrame, rc = Xs.setTimeout, ac = Xs.clearTimeout, sc = (e) => void 0 !== Xs[e] ? Xs[e] : void 0, cc = sc("MutationObserver"), lc = sc("IntersectionObserver"), uc = sc("ResizeObserver"), dc = sc("ScrollTimeline"), fc = (e) => void 0 === e, pc = (e) => null === e, mc = (e) => "number" == typeof e, hc = (e) => "string" == typeof e, gc = (e) => "boolean" == typeof e, yc = (e) => "function" == typeof e, vc = (e) => Array.isArray(e), bc = (e) => "object" == typeof e && !vc(e) && !pc(e), wc = (e) => {
|
|
6571
6583
|
const t = !!e && e.length, n = mc(t) && t > -1 && t % 1 == 0;
|
|
6572
|
-
return !!(vc(e) || !yc(e) && n) && (!(t > 0 &&
|
|
6573
|
-
}, kc = (e) => !!e && e.constructor === Object, xc = (e) => e instanceof HTMLElement,
|
|
6574
|
-
function
|
|
6575
|
-
if (
|
|
6584
|
+
return !!(vc(e) || !yc(e) && n) && (!(t > 0 && bc(e)) || t - 1 in e);
|
|
6585
|
+
}, kc = (e) => !!e && e.constructor === Object, xc = (e) => e instanceof HTMLElement, Cc = (e) => e instanceof Element;
|
|
6586
|
+
function Sc(e, t) {
|
|
6587
|
+
if (wc(e))
|
|
6576
6588
|
for (let n = 0; n < e.length && false !== t(e[n], n, e); n++)
|
|
6577
6589
|
;
|
|
6578
6590
|
else
|
|
6579
|
-
e &&
|
|
6591
|
+
e && Sc(Object.keys(e), (n) => t(e[n], n, e));
|
|
6580
6592
|
return e;
|
|
6581
6593
|
}
|
|
6582
|
-
const Nc = (e, t) => e.indexOf(t) >= 0, Ec = (e, t) => e.concat(t),
|
|
6583
|
-
|
|
6594
|
+
const Nc = (e, t) => e.indexOf(t) >= 0, Ec = (e, t) => e.concat(t), Pc = (e, t, n) => (!hc(t) && wc(t) ? Array.prototype.push.apply(e, t) : e.push(t), e), Ic = (e) => Array.from(e || []), Ac = (e) => vc(e) ? e : !hc(e) && wc(e) ? Ic(e) : [e], Oc = (e) => !!e && !e.length, Lc = (e) => Ic(new Set(e)), Dc = (e, t, n) => {
|
|
6595
|
+
Sc(e, (e2) => !e2 || e2.apply(void 0, t || [])), n || (e.length = 0);
|
|
6584
6596
|
}, Tc = "paddingTop", Rc = "paddingRight", Bc = "paddingLeft", Mc = "paddingBottom", Fc = "marginLeft", $c = "marginRight", _c = "marginBottom", jc = "overflowX", zc = "overflowY", Hc = "width", Wc = "height", Vc = "visible", Uc = "hidden", Kc = "scroll", Gc = (e, t, n, o2) => {
|
|
6585
6597
|
if (e && t) {
|
|
6586
6598
|
let o3 = true;
|
|
6587
|
-
return
|
|
6599
|
+
return Sc(n, (n2) => {
|
|
6588
6600
|
e[n2] !== t[n2] && (o3 = false);
|
|
6589
6601
|
}), o3;
|
|
6590
6602
|
}
|
|
@@ -6615,7 +6627,7 @@ const Nc = (e, t) => e.indexOf(t) >= 0, Ec = (e, t) => e.concat(t), Ic = (e, t,
|
|
|
6615
6627
|
}, d = (e2) => r2 && c ? r2(c, e2) : e2, f = () => {
|
|
6616
6628
|
s && c && u(d(c) || c);
|
|
6617
6629
|
}, p = function() {
|
|
6618
|
-
const e2 =
|
|
6630
|
+
const e2 = Ic(arguments), t2 = Zc(n);
|
|
6619
6631
|
if (t2) {
|
|
6620
6632
|
const n2 = "function" == typeof i ? i() : i, r3 = Zc(o2), p2 = d(e2) || e2, m = u.bind(0, p2);
|
|
6621
6633
|
s && s(), n2 && !l ? (m(), l = true, s = t2(() => l = void 0)) : (s = t2(m), r3 && !a && (a = r3(f))), c = p2;
|
|
@@ -6625,8 +6637,8 @@ const Nc = (e, t) => e.indexOf(t) >= 0, Ec = (e, t) => e.concat(t), Ic = (e, t,
|
|
|
6625
6637
|
return p.O = f, p;
|
|
6626
6638
|
}, tl = (e, t) => Object.prototype.hasOwnProperty.call(e, t), nl = (e) => e ? Object.keys(e) : [], ol = (e, t, n, o2, i, r2, a) => {
|
|
6627
6639
|
const s = [t, n, o2, i, r2, a];
|
|
6628
|
-
return "object" == typeof e && !pc(e) || yc(e) || (e = {}),
|
|
6629
|
-
|
|
6640
|
+
return "object" == typeof e && !pc(e) || yc(e) || (e = {}), Sc(s, (t2) => {
|
|
6641
|
+
Sc(t2, (n2, o3) => {
|
|
6630
6642
|
const i2 = t2[o3];
|
|
6631
6643
|
if (e === i2)
|
|
6632
6644
|
return true;
|
|
@@ -6639,43 +6651,43 @@ const Nc = (e, t) => e.indexOf(t) >= 0, Ec = (e, t) => e.concat(t), Ic = (e, t,
|
|
|
6639
6651
|
e[o3] = r3 ? i2.slice() : i2;
|
|
6640
6652
|
});
|
|
6641
6653
|
}), e;
|
|
6642
|
-
}, il = (e, t) =>
|
|
6654
|
+
}, il = (e, t) => Sc(ol({}, e), (e2, t2, n) => {
|
|
6643
6655
|
void 0 === e2 ? delete n[t2] : e2 && kc(e2) && (n[t2] = il(e2));
|
|
6644
6656
|
}), rl = (e) => !nl(e).length, al = () => {
|
|
6645
6657
|
}, sl = (e, t, n) => Qs(e, Zs(t, n)), cl = (e) => Lc((vc(e) ? e : (e || "").split(" ")).filter((e2) => e2)), ll = (e, t) => e && e.getAttribute(t), ul = (e, t) => e && e.hasAttribute(t), dl = (e, t, n) => {
|
|
6646
|
-
|
|
6658
|
+
Sc(cl(t), (t2) => {
|
|
6647
6659
|
e && e.setAttribute(t2, String(n || ""));
|
|
6648
6660
|
});
|
|
6649
6661
|
}, fl = (e, t) => {
|
|
6650
|
-
|
|
6662
|
+
Sc(cl(t), (t2) => e && e.removeAttribute(t2));
|
|
6651
6663
|
}, pl = (e, t) => {
|
|
6652
6664
|
const n = cl(ll(e, t)), o2 = Xc(dl, e, t), i = (e2, t2) => {
|
|
6653
6665
|
const o3 = new Set(n);
|
|
6654
|
-
return
|
|
6666
|
+
return Sc(cl(e2), (e3) => {
|
|
6655
6667
|
o3[t2](e3);
|
|
6656
|
-
}),
|
|
6668
|
+
}), Ic(o3).join(" ");
|
|
6657
6669
|
};
|
|
6658
6670
|
return { C: (e2) => o2(i(e2, "delete")), $: (e2) => o2(i(e2, "add")), H: (e2) => {
|
|
6659
6671
|
const t2 = cl(e2);
|
|
6660
6672
|
return t2.reduce((e3, t3) => e3 && n.includes(t3), t2.length > 0);
|
|
6661
6673
|
} };
|
|
6662
|
-
}, ml = (e, t, n) => (pl(e, t).C(n), Xc(hl, e, t, n)), hl = (e, t, n) => (pl(e, t).$(n), Xc(ml, e, t, n)), gl = (e, t, n, o2) => (o2 ? hl : ml)(e, t, n), yl = (e, t, n) => pl(e, t).H(n), vl = (e) => pl(e, "class"),
|
|
6674
|
+
}, ml = (e, t, n) => (pl(e, t).C(n), Xc(hl, e, t, n)), hl = (e, t, n) => (pl(e, t).$(n), Xc(ml, e, t, n)), gl = (e, t, n, o2) => (o2 ? hl : ml)(e, t, n), yl = (e, t, n) => pl(e, t).H(n), vl = (e) => pl(e, "class"), bl = (e, t) => {
|
|
6663
6675
|
vl(e).C(t);
|
|
6664
|
-
},
|
|
6665
|
-
const n = t ?
|
|
6666
|
-
return n ?
|
|
6667
|
-
}, xl = (e, t) =>
|
|
6676
|
+
}, wl = (e, t) => (vl(e).$(t), Xc(bl, e, t)), kl = (e, t) => {
|
|
6677
|
+
const n = t ? Cc(t) && t : document;
|
|
6678
|
+
return n ? Ic(n.querySelectorAll(e)) : [];
|
|
6679
|
+
}, xl = (e, t) => Cc(e) && e.matches(t), Cl = (e) => xl(e, "body"), Sl = (e) => e ? Ic(e.childNodes) : [], Nl = (e) => e && e.parentElement, El = (e, t) => Cc(e) && e.closest(t), Pl = (e) => document.activeElement, Il = (e, t, n) => {
|
|
6668
6680
|
const o2 = El(e, t), i = e && ((e2, t2) => {
|
|
6669
|
-
const n2 = t2 ?
|
|
6681
|
+
const n2 = t2 ? Cc(t2) && t2 : document;
|
|
6670
6682
|
return n2 && n2.querySelector(e2);
|
|
6671
6683
|
})(n, o2), r2 = El(i, t) === o2;
|
|
6672
6684
|
return !(!o2 || !i) && (o2 === e || i === e || r2 && El(El(e, n), t) !== o2);
|
|
6673
6685
|
}, Al = (e) => {
|
|
6674
|
-
|
|
6686
|
+
Sc(Ac(e), (e2) => {
|
|
6675
6687
|
const t = Nl(e2);
|
|
6676
6688
|
e2 && t && t.removeChild(e2);
|
|
6677
6689
|
});
|
|
6678
|
-
}, Ol = (e, t) => Xc(Al, e && t &&
|
|
6690
|
+
}, Ol = (e, t) => Xc(Al, e && t && Sc(Ac(t), (t2) => {
|
|
6679
6691
|
t2 && e.appendChild(t2);
|
|
6680
6692
|
}));
|
|
6681
6693
|
let Ll;
|
|
@@ -6684,13 +6696,13 @@ const Dl = (e) => {
|
|
|
6684
6696
|
return dl(t, "class", e), t;
|
|
6685
6697
|
}, Tl = (e) => {
|
|
6686
6698
|
const t = Dl(), n = Ll, o2 = e.trim();
|
|
6687
|
-
return t.innerHTML = n ? n.createHTML(o2) : o2,
|
|
6699
|
+
return t.innerHTML = n ? n.createHTML(o2) : o2, Sc(Sl(t), (e2) => Al(e2));
|
|
6688
6700
|
}, Rl = (e, t) => e.getPropertyValue(t) || e[t] || "", Bl = (e) => {
|
|
6689
6701
|
const t = e || 0;
|
|
6690
6702
|
return isFinite(t) ? t : 0;
|
|
6691
6703
|
}, Ml = (e) => Bl(parseFloat(e || "")), Fl = (e) => Math.round(1e4 * e) / 1e4, $l = (e) => `${Fl(Bl(e))}px`;
|
|
6692
6704
|
function _l(e, t) {
|
|
6693
|
-
e && t &&
|
|
6705
|
+
e && t && Sc(t, (t2, n) => {
|
|
6694
6706
|
try {
|
|
6695
6707
|
const o2 = e.style, i = pc(t2) || gc(t2) ? "" : mc(t2) ? $l(t2) : t2;
|
|
6696
6708
|
0 === n.indexOf("--") ? o2.setProperty(n, i) : o2[n] = i;
|
|
@@ -6703,21 +6715,21 @@ function jl(e, t, n) {
|
|
|
6703
6715
|
let i = o2 ? "" : {};
|
|
6704
6716
|
if (e) {
|
|
6705
6717
|
const r2 = Xs.getComputedStyle(e, n) || e.style;
|
|
6706
|
-
i = o2 ? Rl(r2, t) :
|
|
6718
|
+
i = o2 ? Rl(r2, t) : Ic(t).reduce((e2, t2) => (e2[t2] = Rl(r2, t2), e2), i);
|
|
6707
6719
|
}
|
|
6708
6720
|
return i;
|
|
6709
6721
|
}
|
|
6710
6722
|
const zl = (e, t, n) => {
|
|
6711
6723
|
const o2 = t ? `${t}-` : "", i = n ? `-${n}` : "", r2 = `${o2}top${i}`, a = `${o2}right${i}`, s = `${o2}bottom${i}`, c = `${o2}left${i}`, l = jl(e, [r2, a, s, c]);
|
|
6712
6724
|
return { t: Ml(l[r2]), r: Ml(l[a]), b: Ml(l[s]), l: Ml(l[c]) };
|
|
6713
|
-
}, Hl = (e, t) => "translate" + (
|
|
6725
|
+
}, Hl = (e, t) => "translate" + (bc(e) ? `(${e.x},${e.y})` : `${t ? "X" : "Y"}(${e})`), Wl = { w: 0, h: 0 }, Vl = (e, t) => t ? { w: t[`${e}Width`], h: t[`${e}Height`] } : Wl, Ul = (e) => Vl("inner", e || Xs), Kl = Xc(Vl, "offset"), Gl = Xc(Vl, "client"), ql = Xc(Vl, "scroll"), Jl = (e) => {
|
|
6714
6726
|
const t = parseFloat(jl(e, Hc)) || 0, n = parseFloat(jl(e, Wc)) || 0;
|
|
6715
6727
|
return { w: t - ec(t), h: n - ec(n) };
|
|
6716
6728
|
}, Yl = (e) => e.getBoundingClientRect(), Xl = (e) => !(!e || !e[Wc] && !e[Hc]), Ql = (e, t) => {
|
|
6717
6729
|
const n = Xl(e);
|
|
6718
6730
|
return !Xl(t) && n;
|
|
6719
6731
|
}, Zl = (e, t, n, o2) => {
|
|
6720
|
-
|
|
6732
|
+
Sc(cl(t), (t2) => {
|
|
6721
6733
|
e && e.removeEventListener(t2, n, o2);
|
|
6722
6734
|
});
|
|
6723
6735
|
}, eu = (e, t, n, o2) => {
|
|
@@ -6751,7 +6763,7 @@ const zl = (e, t, n) => {
|
|
|
6751
6763
|
}, lu = (e) => {
|
|
6752
6764
|
e && e.focus && e.focus({ preventScroll: true, focusVisible: false });
|
|
6753
6765
|
}, uu = (e, t) => {
|
|
6754
|
-
|
|
6766
|
+
Sc(Ac(t), e);
|
|
6755
6767
|
}, du = (e) => {
|
|
6756
6768
|
const t = /* @__PURE__ */ new Map(), n = (e2, n2) => {
|
|
6757
6769
|
if (e2) {
|
|
@@ -6772,13 +6784,13 @@ const zl = (e, t, n) => {
|
|
|
6772
6784
|
}
|
|
6773
6785
|
gc(i) && i && n();
|
|
6774
6786
|
const r2 = nl(e2), a = [];
|
|
6775
|
-
return
|
|
6787
|
+
return Sc(r2, (t2) => {
|
|
6776
6788
|
const n2 = e2[t2];
|
|
6777
|
-
n2 &&
|
|
6789
|
+
n2 && Pc(a, o2(t2, n2));
|
|
6778
6790
|
}), Xc(Dc, a);
|
|
6779
6791
|
};
|
|
6780
6792
|
return o2(e || {}), [o2, n, (e2, n2) => {
|
|
6781
|
-
|
|
6793
|
+
Sc(Ic(t.get(e2)), (e3) => {
|
|
6782
6794
|
n2 && !Oc(n2) ? e3.apply(0, n2) : e3();
|
|
6783
6795
|
});
|
|
6784
6796
|
}];
|
|
@@ -6788,7 +6800,7 @@ const zl = (e, t, n) => {
|
|
|
6788
6800
|
const e2 = n ? l(a, s, t) : l(t);
|
|
6789
6801
|
return (c || pu)[o2] = e2;
|
|
6790
6802
|
}
|
|
6791
|
-
}), hu = (e) => pu[e], gu = "data-overlayscrollbars", yu = "os-environment", vu = `${yu}-scrollbar-hidden`,
|
|
6803
|
+
}), hu = (e) => pu[e], gu = "data-overlayscrollbars", yu = "os-environment", vu = `${yu}-scrollbar-hidden`, bu = `${gu}-initialize`, wu = "noClipping", ku = `${gu}-body`, xu = gu, Cu = `${gu}-viewport`, Su = jc, Nu = zc, Eu = "measuring", Pu = "scrollbarHidden", Iu = `${gu}-padding`, Au = `${gu}-content`, Ou = "os-size-observer", Lu = `${Ou}-appear`, Du = `${Ou}-listener`, Tu = "os-scrollbar", Ru = `${Tu}-rtl`, Bu = `${Tu}-horizontal`, Mu = `${Tu}-vertical`, Fu = `${Tu}-track`, $u = `${Tu}-handle`, _u = `${Tu}-visible`, ju = `${Tu}-cornerless`, zu = `${Tu}-interaction`, Hu = `${Tu}-unusable`, Wu = `${Tu}-auto-hide`, Vu = `${Wu}-hidden`, Uu = `${Tu}-wheel`, Ku = `${Fu}-interactive`, Gu = `${$u}-interactive`, qu = (e) => 0 === e.indexOf(Vc), Ju = (e, t) => {
|
|
6792
6804
|
if ("auto" === e)
|
|
6793
6805
|
return t ? Kc : Uc;
|
|
6794
6806
|
const n = e || Uc;
|
|
@@ -6802,9 +6814,9 @@ const zl = (e, t, n) => {
|
|
|
6802
6814
|
return t;
|
|
6803
6815
|
}), Zu = (e, t) => e ? `${t}`.split(".").reduce((e2, t2) => e2 && tl(e2, t2) ? e2[t2] : void 0, e) : void 0, ed = [33, 99], td = [222, 666, true], nd = { paddingAbsolute: false, showNativeOverlaidScrollbars: false, update: { elementEvents: [["img", "load"]], debounce: { mutation: [0, 33], resize: null, event: ed, env: td }, attributes: null, ignoreMutation: null, flowDirectionStyles: null }, overflow: { x: "scroll", y: "scroll" }, scrollbars: { theme: "os-theme-dark", visibility: "auto", autoHide: "never", autoHideDelay: 1300, autoHideSuspend: false, dragScroll: true, clickScroll: false, pointers: ["mouse", "touch", "pen"] } }, od = (e, t) => {
|
|
6804
6816
|
const n = {};
|
|
6805
|
-
return
|
|
6817
|
+
return Sc(Ec(nl(t), nl(e)), (o2) => {
|
|
6806
6818
|
const i = e[o2], r2 = t[o2];
|
|
6807
|
-
if (
|
|
6819
|
+
if (bc(i) && bc(r2))
|
|
6808
6820
|
ol(n[o2] = {}, od(i, r2)), rl(n[o2]) && delete n[o2];
|
|
6809
6821
|
else if (tl(t, o2) && r2 !== i) {
|
|
6810
6822
|
let e2 = true;
|
|
@@ -6828,13 +6840,13 @@ const sd = () => {
|
|
|
6828
6840
|
i && (o2.nonce = i);
|
|
6829
6841
|
const [r2, , a] = du(), [s, c] = Ys({ o: e(t, n), i: Jc }, Xc(e, t, n, true)), [l] = c(), u = ((e2) => {
|
|
6830
6842
|
let t2 = false;
|
|
6831
|
-
const n2 =
|
|
6843
|
+
const n2 = wl(e2, vu);
|
|
6832
6844
|
try {
|
|
6833
6845
|
t2 = "none" === jl(e2, "scrollbar-width") || "none" === jl(e2, "display", "::-webkit-scrollbar");
|
|
6834
6846
|
} catch (e3) {
|
|
6835
6847
|
}
|
|
6836
6848
|
return n2(), t2;
|
|
6837
|
-
})(t), d = { x: 0 === l.x, y: 0 === l.y }, f = { elements: { host: null, padding: !u, viewport: (e2) => u &&
|
|
6849
|
+
})(t), d = { x: 0 === l.x, y: 0 === l.y }, f = { elements: { host: null, padding: !u, viewport: (e2) => u && Cl(e2) && e2, content: false }, scrollbars: { slot: true }, cancel: { nativeScrollbarsOverlaid: false, body: null } }, p = ol({}, nd), m = Xc(ol, {}, p), h = Xc(ol, {}, f), g = { P: l, k: d, U: u, J: !!dc, G: Xc(r2, "r"), K: h, Z: (e2) => ol(f, e2) && h(), tt: m, nt: (e2) => ol(p, e2) && m(), ot: ol({}, f), st: ol({}, p) };
|
|
6838
6850
|
if (fl(t, "style"), Al(t), eu(Xs, "resize", () => {
|
|
6839
6851
|
a("r", []);
|
|
6840
6852
|
}), yc(Xs.matchMedia) && !u && (!d.x || !d.y)) {
|
|
@@ -6860,13 +6872,13 @@ const sd = () => {
|
|
|
6860
6872
|
const [n3, o4] = t3 || [];
|
|
6861
6873
|
return [o4 && n3 ? (r4 || kl)(n3, e2) : [], o4];
|
|
6862
6874
|
});
|
|
6863
|
-
|
|
6875
|
+
Sc(a2, (n3) => Sc(n3[0], (r5) => {
|
|
6864
6876
|
const a3 = n3[1], s2 = i2.get(r5) || [];
|
|
6865
6877
|
if (e2.contains(r5) && a3) {
|
|
6866
6878
|
const e3 = eu(r5, a3, (n4) => {
|
|
6867
6879
|
o3 ? (e3(), i2.delete(r5)) : t2(n4);
|
|
6868
6880
|
});
|
|
6869
|
-
i2.set(r5,
|
|
6881
|
+
i2.set(r5, Pc(s2, e3));
|
|
6870
6882
|
} else
|
|
6871
6883
|
Dc(s2), i2.delete(r5);
|
|
6872
6884
|
}));
|
|
@@ -6879,14 +6891,14 @@ const sd = () => {
|
|
|
6879
6891
|
if (!Oc(r3)) {
|
|
6880
6892
|
const a2 = l || al, s2 = u || al, d2 = [], m2 = [];
|
|
6881
6893
|
let h2 = false, g2 = false;
|
|
6882
|
-
if (
|
|
6883
|
-
const { attributeName: i3, target: r4, type: l2, oldValue: u2, addedNodes: f2, removedNodes: y } = n2, v = "attributes" === l2,
|
|
6884
|
-
if (t && (
|
|
6885
|
-
const t2 = v &&
|
|
6886
|
-
|
|
6894
|
+
if (Sc(r3, (n2) => {
|
|
6895
|
+
const { attributeName: i3, target: r4, type: l2, oldValue: u2, addedNodes: f2, removedNodes: y } = n2, v = "attributes" === l2, b = "childList" === l2, w2 = e === r4, k = v && i3, x = k && ll(r4, i3 || ""), C2 = hc(x) ? x : null, S2 = k && u2 !== C2, N2 = Nc(p, i3) && S2;
|
|
6896
|
+
if (t && (b || !w2)) {
|
|
6897
|
+
const t2 = v && S2, l3 = t2 && c && xl(r4, c), p2 = (l3 ? !a2(r4, i3, u2, C2) : !v || t2) && !s2(n2, !!l3, e, o2);
|
|
6898
|
+
Sc(f2, (e2) => Pc(d2, e2)), Sc(y, (e2) => Pc(d2, e2)), g2 = g2 || p2;
|
|
6887
6899
|
}
|
|
6888
|
-
!t &&
|
|
6889
|
-
}), f((e2) => Lc(d2).reduce((t2, n2) => (
|
|
6900
|
+
!t && w2 && S2 && !a2(r4, i3, u2, C2) && (Pc(m2, i3), h2 = h2 || N2);
|
|
6901
|
+
}), f((e2) => Lc(d2).reduce((t2, n2) => (Pc(t2, kl(e2, n2)), xl(n2, e2) ? Pc(t2, n2) : t2), [])), t)
|
|
6890
6902
|
return !i2 && g2 && n(false), [false];
|
|
6891
6903
|
if (!Oc(m2) || h2) {
|
|
6892
6904
|
const e2 = [Lc(m2), h2];
|
|
@@ -6922,18 +6934,18 @@ const dd = (e, t, n) => {
|
|
|
6922
6934
|
} }), ud = ud || false, t3.disconnect();
|
|
6923
6935
|
}
|
|
6924
6936
|
const t2 = el(c, { p: 0, v: 0 }), o3 = (e2) => t2(e2), i2 = new uc(o3);
|
|
6925
|
-
if (i2.observe(ud ? e : s),
|
|
6937
|
+
if (i2.observe(ud ? e : s), Pc(n2, [() => {
|
|
6926
6938
|
i2.disconnect();
|
|
6927
6939
|
}, !ud && Ol(e, a)]), ud) {
|
|
6928
6940
|
const t3 = new uc(o3);
|
|
6929
|
-
t3.observe(e, { box: "border-box" }),
|
|
6941
|
+
t3.observe(e, { box: "border-box" }), Pc(n2, () => t3.disconnect());
|
|
6930
6942
|
}
|
|
6931
6943
|
} else {
|
|
6932
6944
|
if (!i)
|
|
6933
6945
|
return al;
|
|
6934
6946
|
{
|
|
6935
6947
|
const [t2, r3] = i(s, c, o2);
|
|
6936
|
-
|
|
6948
|
+
Pc(n2, Ec([wl(a, Lu), eu(a, "animationstart", t2), Ol(e, a)], r3));
|
|
6937
6949
|
}
|
|
6938
6950
|
}
|
|
6939
6951
|
return Xc(Dc, n2);
|
|
@@ -6949,7 +6961,7 @@ const dd = (e, t, n) => {
|
|
|
6949
6961
|
return [() => {
|
|
6950
6962
|
const t2 = [];
|
|
6951
6963
|
if (lc)
|
|
6952
|
-
n = new lc(Xc(a, false), { root: e }), n.observe(o2),
|
|
6964
|
+
n = new lc(Xc(a, false), { root: e }), n.observe(o2), Pc(t2, () => {
|
|
6953
6965
|
n.disconnect();
|
|
6954
6966
|
});
|
|
6955
6967
|
else {
|
|
@@ -6957,14 +6969,14 @@ const dd = (e, t, n) => {
|
|
|
6957
6969
|
const e3 = Kl(o2);
|
|
6958
6970
|
r2(e3);
|
|
6959
6971
|
};
|
|
6960
|
-
|
|
6972
|
+
Pc(t2, dd(o2, e2)()), e2();
|
|
6961
6973
|
}
|
|
6962
|
-
return Xc(Dc,
|
|
6974
|
+
return Xc(Dc, Pc(t2, Ol(e, o2)));
|
|
6963
6975
|
}, () => n && a(true, n.takeRecords())];
|
|
6964
6976
|
}, pd = (e, t, n, o2) => {
|
|
6965
6977
|
let i, r2, a, s, c, l, u, d;
|
|
6966
|
-
const f = `[${xu}]`, p = `[${
|
|
6967
|
-
const o3 =
|
|
6978
|
+
const f = `[${xu}]`, p = `[${Cu}]`, m = ["id", "class", "style", "open", "wrap", "cols", "rows"], { dt: h, vt: g, L: y, gt: v, ht: b, V: w2, bt: k, wt: x, yt: C2, St: S2 } = e, N2 = (e2) => "rtl" === jl(e2, "direction"), E2 = { Ot: false, B: N2(h) }, P2 = cd(), I2 = hu(Xu), [A] = Ys({ i: qc, o: { w: 0, h: 0 } }, () => {
|
|
6979
|
+
const o3 = I2 && I2.R(e, t, E2, P2, n).Y, i2 = !(k && w2) && yl(g, xu, wu), r3 = !w2 && x("arrange"), a2 = r3 && ru(v), s2 = a2 && S2(), c2 = C2(Eu, i2), l2 = r3 && o3 && o3(), u2 = ql(y), d2 = Jl(y);
|
|
6968
6980
|
return l2 && l2(), iu(v, a2), s2 && s2(), i2 && c2(), { w: u2.w + d2.w, h: u2.h + d2.h };
|
|
6969
6981
|
}), O = (() => {
|
|
6970
6982
|
let e2, t2, n2;
|
|
@@ -6995,13 +7007,13 @@ const dd = (e, t, n) => {
|
|
|
6995
7007
|
}, B2 = (e2, t2, n2) => {
|
|
6996
7008
|
const o3 = { Ht: t2 };
|
|
6997
7009
|
return L2(o3), t2 && !n2 && O(o3, i), o3;
|
|
6998
|
-
}, [M2, F] =
|
|
7010
|
+
}, [M2, F] = b ? fd(g, D2) : [], $2 = !w2 && dd(g, T2, { ft: true }), [_2, j2] = ld(g, false, B2, { ct: m, et: m }), z2 = w2 && uc && new uc((e2) => {
|
|
6999
7011
|
const t2 = e2[e2.length - 1].contentRect;
|
|
7000
7012
|
T2({ _t: true, ft: Ql(t2, u) }), u = t2;
|
|
7001
7013
|
});
|
|
7002
7014
|
return [() => {
|
|
7003
7015
|
z2 && z2.observe(g);
|
|
7004
|
-
const e2 = $2 && $2(), t2 = M2 && M2(), n2 = _2(), o3 =
|
|
7016
|
+
const e2 = $2 && $2(), t2 = M2 && M2(), n2 = _2(), o3 = P2.G((e3) => {
|
|
7005
7017
|
const [, t3] = A();
|
|
7006
7018
|
O({ Et: e3, xt: t3, _t: k }, s);
|
|
7007
7019
|
});
|
|
@@ -7009,18 +7021,18 @@ const dd = (e, t, n) => {
|
|
|
7009
7021
|
z2 && z2.disconnect(), e2 && e2(), t2 && t2(), l && l(), n2(), o3();
|
|
7010
7022
|
};
|
|
7011
7023
|
}, ({ zt: e2, It: t2, At: n2 }) => {
|
|
7012
|
-
const o3 = {}, [u2] = e2("update.ignoreMutation"), [d2, h2] = e2("update.attributes"), [g2, v2] = e2("update.elementEvents"), [k2, x2] = e2("update.debounce"),
|
|
7024
|
+
const o3 = {}, [u2] = e2("update.ignoreMutation"), [d2, h2] = e2("update.attributes"), [g2, v2] = e2("update.elementEvents"), [k2, x2] = e2("update.debounce"), C3 = t2 || n2;
|
|
7013
7025
|
if (v2 || h2) {
|
|
7014
7026
|
c && c(), l && l();
|
|
7015
|
-
const [e3, t3] = ld(
|
|
7027
|
+
const [e3, t3] = ld(b || y, true, R2, { et: Ec(m, d2 || []), rt: g2, it: f, ut: (e4, t4) => {
|
|
7016
7028
|
const { target: n3, attributeName: o4 } = e4;
|
|
7017
|
-
return !(t4 || !o4 ||
|
|
7029
|
+
return !(t4 || !o4 || w2) && Il(n3, f, p) || !!El(n3, `.${Tu}`) || !!((e5) => yc(u2) && u2(e5))(e4);
|
|
7018
7030
|
} });
|
|
7019
7031
|
l = e3(), c = t3;
|
|
7020
7032
|
}
|
|
7021
|
-
if (x2 && (O.O(), vc(k2) || mc(k2) ? (i = k2, r2 = false, a = ed, s = td) : kc(k2) ? (i = k2.mutation, r2 = k2.resize, a = k2.event, s = k2.env) : (i = false, r2 = false, a = false, s = false)),
|
|
7033
|
+
if (x2 && (O.O(), vc(k2) || mc(k2) ? (i = k2, r2 = false, a = ed, s = td) : kc(k2) ? (i = k2.mutation, r2 = k2.resize, a = k2.event, s = k2.env) : (i = false, r2 = false, a = false, s = false)), C3) {
|
|
7022
7034
|
const e3 = j2(), t3 = F && F(), n3 = c && c();
|
|
7023
|
-
e3 && ol(o3, B2(e3[0], e3[1],
|
|
7035
|
+
e3 && ol(o3, B2(e3[0], e3[1], C3)), t3 && ol(o3, D2(t3[0], C3)), n3 && ol(o3, R2(n3[0], C3));
|
|
7024
7036
|
}
|
|
7025
7037
|
return L2(o3), o3;
|
|
7026
7038
|
}, E2];
|
|
@@ -7031,7 +7043,7 @@ const dd = (e, t, n) => {
|
|
|
7031
7043
|
const i = fc(o2) ? n : o2, r2 = md(e, i);
|
|
7032
7044
|
return !!r2 && (xc(r2) ? r2 : t.apply(0, e));
|
|
7033
7045
|
}, yd = (e, t, n, o2) => {
|
|
7034
|
-
const i = "--os-viewport-percent", r2 = "--os-scroll-percent", a = "--os-scroll-direction", { K: s } = cd(), { scrollbars: c } = s(), { slot: l } = c, { dt: u, vt: d, L: f, Tt: p, gt: m, bt: h, V: g } = t, { scrollbars: y } = p ? {} : e, { slot: v } = y || {},
|
|
7046
|
+
const i = "--os-viewport-percent", r2 = "--os-scroll-percent", a = "--os-scroll-direction", { K: s } = cd(), { scrollbars: c } = s(), { slot: l } = c, { dt: u, vt: d, L: f, Tt: p, gt: m, bt: h, V: g } = t, { scrollbars: y } = p ? {} : e, { slot: v } = y || {}, b = [], w2 = [], k = [], x = gd([u, d, f], () => g && h ? u : d, l, v), C2 = (e2) => {
|
|
7035
7047
|
if (dc) {
|
|
7036
7048
|
let t2 = null, o3 = [];
|
|
7037
7049
|
const i2 = new dc({ source: m, axis: e2 }), r3 = () => {
|
|
@@ -7042,37 +7054,37 @@ const dd = (e, t, n) => {
|
|
|
7042
7054
|
};
|
|
7043
7055
|
return { kt: a2 };
|
|
7044
7056
|
}
|
|
7045
|
-
},
|
|
7046
|
-
const o3 = n2 ?
|
|
7047
|
-
|
|
7057
|
+
}, S2 = { x: C2("x"), y: C2("y") }, N2 = (e2, t2, n2) => {
|
|
7058
|
+
const o3 = n2 ? wl : bl;
|
|
7059
|
+
Sc(e2, (e3) => {
|
|
7048
7060
|
o3(e3.Lt, t2);
|
|
7049
7061
|
});
|
|
7050
7062
|
}, E2 = (e2, t2) => {
|
|
7051
|
-
|
|
7063
|
+
Sc(e2, (e3) => {
|
|
7052
7064
|
const [n2, o3] = t2(e3);
|
|
7053
7065
|
_l(n2, o3);
|
|
7054
7066
|
});
|
|
7055
|
-
},
|
|
7067
|
+
}, P2 = (e2, t2, n2) => {
|
|
7056
7068
|
const o3 = gc(n2), i2 = !o3 || !n2;
|
|
7057
|
-
(!o3 || n2) && N2(
|
|
7058
|
-
},
|
|
7059
|
-
const t2 = e2 ? "x" : "y", n2 = Dl(`${Tu} ${e2 ? Bu : Mu}`), i2 = Dl(Fu), r3 = Dl($u), a2 = { Lt: n2, Ut: i2, Mt: r3 }, s2 =
|
|
7060
|
-
return
|
|
7061
|
-
}, A = Xc(
|
|
7069
|
+
(!o3 || n2) && N2(w2, e2, t2), i2 && N2(k, e2, t2);
|
|
7070
|
+
}, I2 = (e2) => {
|
|
7071
|
+
const t2 = e2 ? "x" : "y", n2 = Dl(`${Tu} ${e2 ? Bu : Mu}`), i2 = Dl(Fu), r3 = Dl($u), a2 = { Lt: n2, Ut: i2, Mt: r3 }, s2 = S2[t2];
|
|
7072
|
+
return Pc(e2 ? w2 : k, a2), Pc(b, [Ol(n2, i2), Ol(i2, r3), Xc(Al, n2), s2 && s2.kt(a2), o2(a2, P2, e2)]), a2;
|
|
7073
|
+
}, A = Xc(I2, true), O = Xc(I2, false);
|
|
7062
7074
|
return A(), O(), [{ Pt: () => {
|
|
7063
7075
|
const e2 = (() => {
|
|
7064
7076
|
const { Rt: e3, Vt: t3 } = n, o3 = (e4, t4) => sl(0, 1, e4 / (e4 + t4) || 0);
|
|
7065
7077
|
return { x: o3(t3.x, e3.x), y: o3(t3.y, e3.y) };
|
|
7066
7078
|
})(), t2 = (e3) => (t3) => [t3.Lt, { [i]: Fl(e3) + "" }];
|
|
7067
|
-
E2(
|
|
7079
|
+
E2(w2, t2(e2.x)), E2(k, t2(e2.y));
|
|
7068
7080
|
}, Nt: () => {
|
|
7069
7081
|
if (!dc) {
|
|
7070
7082
|
const { Dt: e2 } = n, t2 = cu(e2, ru(m)), o3 = (e3) => (t3) => [t3.Lt, { [r2]: Fl(e3) + "" }];
|
|
7071
|
-
E2(
|
|
7083
|
+
E2(w2, o3(t2.x)), E2(k, o3(t2.y));
|
|
7072
7084
|
}
|
|
7073
7085
|
}, qt: () => {
|
|
7074
7086
|
const { Dt: e2 } = n, t2 = su(e2), o3 = (e3) => (t3) => [t3.Lt, { [a]: e3 ? "0" : "1" }];
|
|
7075
|
-
E2(
|
|
7087
|
+
E2(w2, o3(t2.x)), E2(k, o3(t2.y)), dc && (w2.forEach(S2.x.kt), k.forEach(S2.y.kt));
|
|
7076
7088
|
}, Bt: () => {
|
|
7077
7089
|
if (g && !h) {
|
|
7078
7090
|
const { Rt: e2, Dt: t2 } = n, o3 = su(t2), i2 = cu(t2, ru(m)), r3 = (t3) => {
|
|
@@ -7082,11 +7094,11 @@ const dd = (e, t, n) => {
|
|
|
7082
7094
|
};
|
|
7083
7095
|
return [r4, r4 && { transform: Hl({ x: a2(i2.x, e2.x, o3.x), y: a2(i2.y, e2.y, o3.y) }) }];
|
|
7084
7096
|
};
|
|
7085
|
-
E2(
|
|
7097
|
+
E2(w2, r3), E2(k, r3);
|
|
7086
7098
|
}
|
|
7087
|
-
}, Ft:
|
|
7099
|
+
}, Ft: P2, jt: { Xt: w2, Yt: A, Wt: Xc(E2, w2) }, Jt: { Xt: k, Yt: O, Wt: Xc(E2, k) } }, () => (Ol(x, w2[0].Lt), Ol(x, k[0].Lt), Xc(Dc, b))];
|
|
7088
7100
|
}, vd = (e, t, n, o2) => (i, r2, a) => {
|
|
7089
|
-
const { vt: s, L: c, V: l, gt: u, Gt: d, St: f } = t, { Lt: p, Ut: m, Mt: h } = i, [g, y] = Qc(333), [v,
|
|
7101
|
+
const { vt: s, L: c, V: l, gt: u, Gt: d, St: f } = t, { Lt: p, Ut: m, Mt: h } = i, [g, y] = Qc(333), [v, b] = Qc(444), w2 = (e2) => {
|
|
7090
7102
|
yc(u.scrollBy) && u.scrollBy({ behavior: "smooth", left: e2.x, top: e2.y });
|
|
7091
7103
|
};
|
|
7092
7104
|
let k = true;
|
|
@@ -7095,11 +7107,11 @@ const dd = (e, t, n) => {
|
|
|
7095
7107
|
}), eu(p, "pointerleave pointercancel", () => {
|
|
7096
7108
|
r2(zu, false);
|
|
7097
7109
|
}), !l && eu(p, "mousedown", () => {
|
|
7098
|
-
const e2 =
|
|
7099
|
-
(ul(e2,
|
|
7110
|
+
const e2 = Pl();
|
|
7111
|
+
(ul(e2, Cu) || ul(e2, xu) || e2 === document.body) && rc(Xc(lu, c), 25);
|
|
7100
7112
|
}), eu(p, "wheel", (e2) => {
|
|
7101
7113
|
const { deltaX: t2, deltaY: n2, deltaMode: o3 } = e2;
|
|
7102
|
-
k && 0 === o3 && Nl(p) === s &&
|
|
7114
|
+
k && 0 === o3 && Nl(p) === s && w2({ x: t2, y: n2 }), k = false, r2(Uu, true), g(() => {
|
|
7103
7115
|
k = true, r2(Uu);
|
|
7104
7116
|
}), nu(e2);
|
|
7105
7117
|
}, { I: false, A: true }), eu(p, "pointerdown", () => {
|
|
@@ -7114,16 +7126,16 @@ const dd = (e, t, n) => {
|
|
|
7114
7126
|
iu(u, { [c2]: e2 + a2 });
|
|
7115
7127
|
}, p2 = [];
|
|
7116
7128
|
return eu(m, "pointerdown", (n2) => {
|
|
7117
|
-
const a2 = El(n2.target, `.${$u}`) === h, g2 = a2 ? h : m, y2 = e.scrollbars, k2 = y2[a2 ? "dragScroll" : "clickScroll"], { button: x, isPrimary:
|
|
7118
|
-
if (0 === x &&
|
|
7119
|
-
Dc(p2),
|
|
7120
|
-
const e2 = !a2 && (n2.shiftKey || "instant" === k2), y3 = Xc(Yl, h), x2 = Xc(Yl, m),
|
|
7129
|
+
const a2 = El(n2.target, `.${$u}`) === h, g2 = a2 ? h : m, y2 = e.scrollbars, k2 = y2[a2 ? "dragScroll" : "clickScroll"], { button: x, isPrimary: C2, pointerType: S2 } = n2, { pointers: N2 } = y2;
|
|
7130
|
+
if (0 === x && C2 && k2 && (N2 || []).includes(S2)) {
|
|
7131
|
+
Dc(p2), b();
|
|
7132
|
+
const e2 = !a2 && (n2.shiftKey || "instant" === k2), y3 = Xc(Yl, h), x2 = Xc(Yl, m), C3 = (e3, t3) => (e3 || y3())[r3] - (t3 || x2())[r3], S3 = ec(Yl(u)[i2]) / Kl(u)[s2] || 1, N3 = l2(ru(u)[c2], 1 / S3), E2 = n2[o3], P2 = y3(), I2 = x2(), A = P2[i2], O = C3(P2, I2) + A / 2, L2 = E2 - I2[r3], D2 = a2 ? 0 : L2 - O, T2 = (e3) => {
|
|
7121
7133
|
Dc(M2), g2.releasePointerCapture(e3.pointerId);
|
|
7122
7134
|
}, R2 = a2 || e2, B2 = f(), M2 = [eu(d, t2, T2), eu(d, "selectstart", (e3) => nu(e3), { I: false }), eu(m, t2, T2), R2 && eu(m, "pointermove", (e3) => N3(D2 + (e3[o3] - E2))), R2 && (() => {
|
|
7123
7135
|
const e3 = ru(u);
|
|
7124
7136
|
B2();
|
|
7125
7137
|
const t3 = ru(u), n3 = { x: t3.x - e3.x, y: t3.y - e3.y };
|
|
7126
|
-
(tc(n3.x) > 3 || tc(n3.y) > 3) && (f(), iu(u, e3),
|
|
7138
|
+
(tc(n3.x) > 3 || tc(n3.y) > 3) && (f(), iu(u, e3), w2(n3), v(B2));
|
|
7127
7139
|
})];
|
|
7128
7140
|
if (g2.setPointerCapture(n2.pointerId), e2)
|
|
7129
7141
|
N3(D2);
|
|
@@ -7131,33 +7143,33 @@ const dd = (e, t, n) => {
|
|
|
7131
7143
|
const e3 = hu("__osClickScrollPlugin");
|
|
7132
7144
|
if (e3) {
|
|
7133
7145
|
const t3 = e3(N3, D2, A, (e4) => {
|
|
7134
|
-
e4 ? B2() :
|
|
7146
|
+
e4 ? B2() : Pc(M2, B2);
|
|
7135
7147
|
});
|
|
7136
|
-
|
|
7148
|
+
Pc(M2, t3), Pc(p2, Xc(t3, true));
|
|
7137
7149
|
}
|
|
7138
7150
|
}
|
|
7139
7151
|
}
|
|
7140
7152
|
});
|
|
7141
|
-
})(), y,
|
|
7142
|
-
},
|
|
7143
|
-
const t = cd(), { K: n, U: o2 } = t, { elements: i } = n(), { padding: r2, viewport: a, content: s } = i, c = xc(e), l = c ? {} : e, { elements: u } = l, { padding: d, viewport: f, content: p } = u || {}, m = c ? e : l.target, h =
|
|
7153
|
+
})(), y, b]);
|
|
7154
|
+
}, bd = (e) => {
|
|
7155
|
+
const t = cd(), { K: n, U: o2 } = t, { elements: i } = n(), { padding: r2, viewport: a, content: s } = i, c = xc(e), l = c ? {} : e, { elements: u } = l, { padding: d, viewport: f, content: p } = u || {}, m = c ? e : l.target, h = Cl(m), g = m.ownerDocument, y = g.documentElement, v = () => g.defaultView || Xs, b = Xc(hd, [m]), w2 = Xc(gd, [m]), k = Xc(Dl, ""), x = Xc(b, k, a), C2 = Xc(w2, k, s), S2 = x(f), N2 = S2 === m, E2 = N2 && h, P2 = !N2 && C2(p), I2 = !N2 && S2 === P2, A = E2 ? y : S2, O = E2 ? A : m, L2 = !N2 && w2(k, r2, d), D2 = !I2 && P2, T2 = [D2, A, L2, O].map((e2) => xc(e2) && !Nl(e2) && e2), R2 = (e2) => e2 && Nc(T2, e2), B2 = !R2(A) && ((e2) => {
|
|
7144
7156
|
const t2 = Kl(e2), n2 = ql(e2), o3 = jl(e2, jc), i2 = jl(e2, zc);
|
|
7145
7157
|
return n2.w - t2.w > 0 && !qu(o3) || n2.h - t2.h > 0 && !qu(i2);
|
|
7146
|
-
})(A) ? A : m, M2 = E2 ? y : A, F = { dt: m, vt: O, L: A, rn: L2, ht: D2, gt: M2, Kt: E2 ? g : A, ln: h ? y : B2, Gt: g, bt: h, Tt: c, V: N2, an: v, wt: (e2) => yl(A,
|
|
7147
|
-
fl(_2, [xu,
|
|
7158
|
+
})(A) ? A : m, M2 = E2 ? y : A, F = { dt: m, vt: O, L: A, rn: L2, ht: D2, gt: M2, Kt: E2 ? g : A, ln: h ? y : B2, Gt: g, bt: h, Tt: c, V: N2, an: v, wt: (e2) => yl(A, Cu, e2), yt: (e2, t2) => gl(A, Cu, e2, t2), St: () => gl(M2, Cu, "scrolling", true) }, { dt: $2, vt: _2, rn: j2, L: z2, ht: H2 } = F, W2 = [() => {
|
|
7159
|
+
fl(_2, [xu, bu]), fl($2, bu), h && fl(y, [bu, xu]);
|
|
7148
7160
|
}];
|
|
7149
|
-
let V2 =
|
|
7161
|
+
let V2 = Sl([H2, z2, j2, _2, $2].find((e2) => e2 && !R2(e2)));
|
|
7150
7162
|
const U2 = E2 ? $2 : H2 || z2, K2 = Xc(Dc, W2);
|
|
7151
7163
|
return [F, () => {
|
|
7152
|
-
const e2 = v(), t2 =
|
|
7153
|
-
Ol(Nl(e3),
|
|
7164
|
+
const e2 = v(), t2 = Pl(), n2 = (e3) => {
|
|
7165
|
+
Ol(Nl(e3), Sl(e3)), Al(e3);
|
|
7154
7166
|
}, i2 = (e3) => eu(e3, "focusin focusout focus blur", ou, { A: true, I: false }), r3 = "tabindex", a2 = ll(z2, r3), s2 = i2(t2);
|
|
7155
|
-
return dl(_2, xu, N2 ? "" : "host"), dl(j2,
|
|
7156
|
-
const e3 =
|
|
7157
|
-
fl(j2,
|
|
7158
|
-
}]), o2 && !N2 && (hl(z2,
|
|
7167
|
+
return dl(_2, xu, N2 ? "" : "host"), dl(j2, Iu, ""), dl(z2, Cu, ""), dl(H2, Au, ""), N2 || (dl(z2, r3, a2 || "-1"), h && dl(y, ku, "")), Ol(U2, V2), Ol(_2, j2), Ol(j2 || _2, !N2 && z2), Ol(z2, H2), Pc(W2, [s2, () => {
|
|
7168
|
+
const e3 = Pl(), t3 = R2(z2), o3 = t3 && e3 === z2 ? $2 : e3, s3 = i2(o3);
|
|
7169
|
+
fl(j2, Iu), fl(H2, Au), fl(z2, Cu), h && fl(y, ku), a2 ? dl(z2, r3, a2) : fl(z2, r3), R2(H2) && n2(H2), t3 && n2(z2), R2(j2) && n2(j2), lu(o3), s3();
|
|
7170
|
+
}]), o2 && !N2 && (hl(z2, Cu, Pu), Pc(W2, Xc(fl, z2, Cu))), lu(!N2 && h && t2 === $2 && e2.top === e2 ? z2 : t2), s2(), V2 = 0, K2;
|
|
7159
7171
|
}, K2];
|
|
7160
|
-
},
|
|
7172
|
+
}, wd = ({ ht: e }) => ({ Qt: t, un: n, At: o2 }) => {
|
|
7161
7173
|
const { $t: i } = t || {}, { Ot: r2 } = n;
|
|
7162
7174
|
e && (i || o2) && _l(e, { [Wc]: r2 && "100%" });
|
|
7163
7175
|
}, kd = ({ vt: e, rn: t, L: n, V: o2 }, i) => {
|
|
@@ -7166,24 +7178,24 @@ const dd = (e, t, n) => {
|
|
|
7166
7178
|
let [u, d] = a(l);
|
|
7167
7179
|
const { U: f } = cd(), { _t: p, xt: m, Ct: h } = s || {}, { B: g } = c, [y, v] = e2("paddingAbsolute");
|
|
7168
7180
|
(p || d || (l || m)) && ([u, d] = r2(l));
|
|
7169
|
-
const
|
|
7170
|
-
if (
|
|
7181
|
+
const b = !o2 && (v || h || d);
|
|
7182
|
+
if (b) {
|
|
7171
7183
|
const e3 = !y || !t && !f, o3 = u.r + u.l, r3 = u.t + u.b, a2 = { [$c]: e3 && !g ? -o3 : 0, [_c]: e3 ? -r3 : 0, [Fc]: e3 && g ? -o3 : 0, top: e3 ? -u.t : 0, right: e3 ? g ? -u.r : "auto" : 0, left: e3 ? g ? "auto" : -u.l : 0, [Hc]: e3 && `calc(100% + ${o3}px)` }, s2 = { [Tc]: e3 ? u.t : 0, [Rc]: e3 ? u.r : 0, [Mc]: e3 ? u.b : 0, [Bc]: e3 ? u.l : 0 };
|
|
7172
7184
|
_l(t || n, a2), _l(n, s2), ol(i, { rn: u, fn: !e3, F: t ? s2 : ol({}, a2, s2) });
|
|
7173
7185
|
}
|
|
7174
|
-
return { _n:
|
|
7186
|
+
return { _n: b };
|
|
7175
7187
|
};
|
|
7176
7188
|
}, xd = (e, t) => {
|
|
7177
|
-
const n = cd(), { vt: o2, rn: i, L: r2, V: a, Kt: s, gt: c, bt: l, yt: u, an: d } = e, { U: f } = n, p = l && a, m = Xc(Qs, 0), h = { display: () => false, direction: (e2) => "ltr" !== e2, flexDirection: (e2) => e2.endsWith("-reverse"), writingMode: (e2) => "horizontal-tb" !== e2 }, g = nl(h), y = { i: qc, o: { w: 0, h: 0 } }, v = { i: Jc, o: {} },
|
|
7189
|
+
const n = cd(), { vt: o2, rn: i, L: r2, V: a, Kt: s, gt: c, bt: l, yt: u, an: d } = e, { U: f } = n, p = l && a, m = Xc(Qs, 0), h = { display: () => false, direction: (e2) => "ltr" !== e2, flexDirection: (e2) => e2.endsWith("-reverse"), writingMode: (e2) => "horizontal-tb" !== e2 }, g = nl(h), y = { i: qc, o: { w: 0, h: 0 } }, v = { i: Jc, o: {} }, b = (e2) => {
|
|
7178
7190
|
u(Eu, !p && e2);
|
|
7179
|
-
},
|
|
7191
|
+
}, w2 = () => jl(r2, g), k = (e2, t2) => {
|
|
7180
7192
|
const n2 = !nl(e2).length, o3 = !t2 && g.some((t3) => {
|
|
7181
7193
|
const n3 = e2[t3];
|
|
7182
7194
|
return hc(n3) && h[t3](n3);
|
|
7183
7195
|
});
|
|
7184
7196
|
if (n2 && !o3 || !((e3) => !!e3 && ((e4) => !!(e4.offsetWidth || e4.offsetHeight || e4.getClientRects().length))(e3))(r2))
|
|
7185
7197
|
return { D: { x: 0, y: 0 }, M: { x: 1, y: 1 } };
|
|
7186
|
-
|
|
7198
|
+
b(true);
|
|
7187
7199
|
const i2 = ru(c), a2 = eu(s, Kc, (e3) => {
|
|
7188
7200
|
const t3 = ru(c);
|
|
7189
7201
|
e3.isTrusted && t3.x === i2.x && t3.y === i2.y && tu(e3);
|
|
@@ -7193,12 +7205,12 @@ const dd = (e, t, n) => {
|
|
|
7193
7205
|
iu(c, { x: f2.w, y: f2.h });
|
|
7194
7206
|
const p2 = ru(c), m2 = { x: p2.x - d2.x, y: p2.y - d2.y };
|
|
7195
7207
|
iu(c, { x: -f2.w, y: -f2.h });
|
|
7196
|
-
const y2 = ru(c), v2 = { x: y2.x - d2.x, y: y2.y - d2.y },
|
|
7197
|
-
return iu(c, i2), ic(() => a2()), { D: d2, M:
|
|
7208
|
+
const y2 = ru(c), v2 = { x: y2.x - d2.x, y: y2.y - d2.y }, w3 = { x: tc(m2.x) >= tc(v2.x) ? p2.x : y2.x, y: tc(m2.y) >= tc(v2.y) ? p2.y : y2.y };
|
|
7209
|
+
return iu(c, i2), ic(() => a2()), { D: d2, M: w3 };
|
|
7198
7210
|
}, x = (e2, t2) => {
|
|
7199
7211
|
const n2 = Xs.devicePixelRatio % 1 != 0 ? 1 : 0, o3 = { w: m(e2.w - t2.w), h: m(e2.h - t2.h) };
|
|
7200
7212
|
return { w: o3.w > n2 ? o3.w : 0, h: o3.h > n2 ? o3.h : 0 };
|
|
7201
|
-
},
|
|
7213
|
+
}, C2 = (e2, t2) => {
|
|
7202
7214
|
const n2 = (e3, t3, n3, o3) => {
|
|
7203
7215
|
const i2 = e3 === Vc ? Uc : ((e4) => e4.replace(`${Vc}-`, ""))(e3), r3 = qu(e3), a2 = qu(n3);
|
|
7204
7216
|
if (!t3 && !o3)
|
|
@@ -7211,10 +7223,10 @@ const dd = (e, t, n) => {
|
|
|
7211
7223
|
return t3 ? i2 : a2 && o3 ? Vc : Uc;
|
|
7212
7224
|
};
|
|
7213
7225
|
return { x: n2(t2.x, e2.x, t2.y, e2.y), y: n2(t2.y, e2.y, t2.x, e2.x) };
|
|
7214
|
-
},
|
|
7226
|
+
}, S2 = (e2) => {
|
|
7215
7227
|
const t2 = (e3) => [Vc, Uc, Kc].map((t3) => _2(Ju(t3), e3)), n2 = t2(true).concat(t2()).join(" ");
|
|
7216
7228
|
u(n2), u(nl(e2).map((t3) => _2(e2[t3], "x" === t3)).join(" "), true);
|
|
7217
|
-
}, [N2, E2] = Ys(y, Xc(Jl, r2)), [
|
|
7229
|
+
}, [N2, E2] = Ys(y, Xc(Jl, r2)), [P2, I2] = Ys(y, Xc(ql, r2)), [A, O] = Ys(y), [L2] = Ys(v), [D2, T2] = Ys(y), [R2] = Ys(v), [B2] = Ys({ i: (e2, t2) => Gc(e2, t2, Lc(Ec(nl(e2), nl(t2)))), o: {} }), [M2, F] = Ys({ i: (e2, t2) => Jc(e2.D, t2.D) && Jc(e2.M, t2.M), o: { D: { x: 0, y: 0 }, M: { x: 0, y: 0 } } }), $2 = hu(Xu), _2 = (e2, t2) => `${t2 ? Su : Nu}${((e3) => {
|
|
7218
7230
|
const t3 = String(e3 || "");
|
|
7219
7231
|
return t3 ? t3[0].toUpperCase() + t3.slice(1) : "";
|
|
7220
7232
|
})(e2)}`;
|
|
@@ -7223,37 +7235,37 @@ const dd = (e, t, n) => {
|
|
|
7223
7235
|
const { k: n2 } = t2, [o3, i2] = e2("showNativeOverlaidScrollbars");
|
|
7224
7236
|
return [o3 && n2.x && n2.y, i2];
|
|
7225
7237
|
})(a2, n), [q2, J2] = a2("overflow"), Y2 = qu(q2.x), X2 = qu(q2.y), Q2 = g2 || h2 || v2 || _3 || z2 || G2;
|
|
7226
|
-
let Z2 = E2(l2), ee2 =
|
|
7227
|
-
if (G2 && f && u(
|
|
7228
|
-
yl(o2, xu,
|
|
7229
|
-
const e2 = V2 && V2(), [t2] = Z2 = N2(l2), [n2] = ee2 =
|
|
7238
|
+
let Z2 = E2(l2), ee2 = I2(l2), te2 = O(l2), ne2 = T2(l2);
|
|
7239
|
+
if (G2 && f && u(Pu, !K2), Q2) {
|
|
7240
|
+
yl(o2, xu, wu) && b(true);
|
|
7241
|
+
const e2 = V2 && V2(), [t2] = Z2 = N2(l2), [n2] = ee2 = P2(l2), i2 = Gl(r2), a3 = p && Ul(d()), s3 = { w: m(n2.w + t2.w), h: m(n2.h + t2.h) }, c3 = { w: m((a3 ? a3.w : i2.w + m(i2.w - n2.w)) + t2.w), h: m((a3 ? a3.h : i2.h + m(i2.h - n2.h)) + t2.h) };
|
|
7230
7242
|
e2 && e2(), ne2 = D2(c3), te2 = A(x(s3, c3), l2);
|
|
7231
7243
|
}
|
|
7232
|
-
const [oe2, ie2] = ne2, [re2, ae2] = te2, [se2, ce2] = ee2, [le2, ue2] = Z2, [de2, fe2] = L2({ x: re2.w > 0, y: re2.h > 0 }), pe2 = Y2 && X2 && (de2.x || de2.y) || Y2 && de2.x && !de2.y || X2 && de2.y && !de2.x, me2 = h2 || _3 || z2 || ue2 || ce2 || ie2 || ae2 || J2 || G2 || Q2 || y2 && p, [he2] = a2("update.flowDirectionStyles"), [ge2, ye2] = B2(he2 ? he2(r2) :
|
|
7233
|
-
let ke2 =
|
|
7234
|
-
|
|
7235
|
-
const [xe2,
|
|
7236
|
-
return gl(o2, xu,
|
|
7244
|
+
const [oe2, ie2] = ne2, [re2, ae2] = te2, [se2, ce2] = ee2, [le2, ue2] = Z2, [de2, fe2] = L2({ x: re2.w > 0, y: re2.h > 0 }), pe2 = Y2 && X2 && (de2.x || de2.y) || Y2 && de2.x && !de2.y || X2 && de2.y && !de2.x, me2 = h2 || _3 || z2 || ue2 || ce2 || ie2 || ae2 || J2 || G2 || Q2 || y2 && p, [he2] = a2("update.flowDirectionStyles"), [ge2, ye2] = B2(he2 ? he2(r2) : w2(), l2), ve2 = _3 || j2 || ye2 || fe2 || l2, [be2, we2] = ve2 ? M2(k(ge2, !!he2), l2) : F();
|
|
7245
|
+
let ke2 = C2(de2, q2);
|
|
7246
|
+
b(false), me2 && (S2(ke2), ke2 = Yu(r2, de2), U2 && W2 && (W2(ke2, se2, le2), _l(r2, U2(ke2))));
|
|
7247
|
+
const [xe2, Ce2] = R2(ke2);
|
|
7248
|
+
return gl(o2, xu, wu, pe2), gl(i, Iu, wu, pe2), ol(t, { cn: xe2, Vt: { x: oe2.w, y: oe2.h }, Rt: { x: re2.w, y: re2.h }, j: de2, Dt: au(be2, re2) }), { sn: Ce2, tn: ie2, nn: ae2, en: we2 || ae2 };
|
|
7237
7249
|
};
|
|
7238
|
-
},
|
|
7239
|
-
const [t, n, o2] =
|
|
7250
|
+
}, Cd = (e) => {
|
|
7251
|
+
const [t, n, o2] = bd(e), i = { rn: { t: 0, r: 0, b: 0, l: 0 }, fn: false, F: { [$c]: 0, [_c]: 0, [Fc]: 0, [Tc]: 0, [Rc]: 0, [Mc]: 0, [Bc]: 0 }, Vt: { x: 0, y: 0 }, Rt: { x: 0, y: 0 }, cn: { x: Uc, y: Uc }, j: { x: false, y: false }, Dt: { D: { x: 0, y: 0 }, M: { x: 0, y: 0 } } }, { dt: r2, gt: a, V: s, St: c } = t, { U: l, k: u } = cd(), d = !l && (u.x || u.y), f = [wd(t), kd(t, i), xd(t, i)];
|
|
7240
7252
|
return [n, (e2) => {
|
|
7241
7253
|
const t2 = {}, n2 = d && ru(a), o3 = n2 && c();
|
|
7242
|
-
return
|
|
7254
|
+
return Sc(f, (n3) => {
|
|
7243
7255
|
ol(t2, n3(e2, t2) || {});
|
|
7244
7256
|
}), iu(a, n2), o3 && o3(), s || iu(r2, 0), t2;
|
|
7245
7257
|
}, i, t, o2];
|
|
7246
|
-
},
|
|
7258
|
+
}, Sd = (e, t, n, o2, i) => {
|
|
7247
7259
|
let r2 = false;
|
|
7248
|
-
const a = id(t, {}), [s, c, l, u, d] =
|
|
7249
|
-
|
|
7260
|
+
const a = id(t, {}), [s, c, l, u, d] = Cd(e), [f, p, m] = pd(u, l, a, (e2) => {
|
|
7261
|
+
b({}, e2);
|
|
7250
7262
|
}), [h, g, , y] = ((e2, t2, n2, o3, i2, r3) => {
|
|
7251
7263
|
let a2, s2, c2, l2, u2, d2 = al, f2 = 0;
|
|
7252
|
-
const p2 = ["mouse", "pen"], m2 = (e3) => p2.includes(e3.pointerType), [h2, g2] = Qc(), [y2, v2] = Qc(100), [
|
|
7264
|
+
const p2 = ["mouse", "pen"], m2 = (e3) => p2.includes(e3.pointerType), [h2, g2] = Qc(), [y2, v2] = Qc(100), [b2, w2] = Qc(100), [k, x] = Qc(() => f2), [C2, S2] = yd(e2, i2, o3, vd(t2, i2, o3, (e3) => m2(e3) && R2())), { vt: N2, Kt: E2, bt: P2 } = i2, { Ft: I2, Pt: A, Nt: O, qt: L2, Bt: D2 } = C2, T2 = (e3, t3) => {
|
|
7253
7265
|
if (x(), e3)
|
|
7254
|
-
|
|
7266
|
+
I2(Vu);
|
|
7255
7267
|
else {
|
|
7256
|
-
const e4 = Xc(
|
|
7268
|
+
const e4 = Xc(I2, Vu, true);
|
|
7257
7269
|
f2 > 0 && !t3 ? k(e4) : e4();
|
|
7258
7270
|
}
|
|
7259
7271
|
}, R2 = () => {
|
|
@@ -7261,10 +7273,10 @@ const dd = (e, t, n) => {
|
|
|
7261
7273
|
T2(false);
|
|
7262
7274
|
}));
|
|
7263
7275
|
}, B2 = (e3) => {
|
|
7264
|
-
|
|
7276
|
+
I2(Wu, e3, true), I2(Wu, e3, false);
|
|
7265
7277
|
}, M2 = (e3) => {
|
|
7266
7278
|
m2(e3) && (a2 = c2, c2 && T2(true));
|
|
7267
|
-
}, F = [x, v2,
|
|
7279
|
+
}, F = [x, v2, w2, g2, () => d2(), eu(N2, "pointerover", M2, { T: true }), eu(N2, "pointerenter", M2), eu(N2, "pointerleave", (e3) => {
|
|
7268
7280
|
m2(e3) && (a2 = false, c2 && T2(false));
|
|
7269
7281
|
}), eu(N2, "pointermove", (e3) => {
|
|
7270
7282
|
m2(e3) && s2 && R2();
|
|
@@ -7273,35 +7285,35 @@ const dd = (e, t, n) => {
|
|
|
7273
7285
|
O(), R2();
|
|
7274
7286
|
}), r3(e3), D2();
|
|
7275
7287
|
})], $2 = hu(Xu);
|
|
7276
|
-
return [() => Xc(Dc,
|
|
7277
|
-
const { tn: a3, nn: p3, sn: m3, en: h3 } = r4 || {}, { Ct: g3, ft: y3 } = i3 || {}, { B: v3 } = n2, { k:
|
|
7288
|
+
return [() => Xc(Dc, Pc(F, S2())), ({ zt: e3, At: t3, Qt: i3, Zt: r4 }) => {
|
|
7289
|
+
const { tn: a3, nn: p3, sn: m3, en: h3 } = r4 || {}, { Ct: g3, ft: y3 } = i3 || {}, { B: v3 } = n2, { k: w3, U: k2 } = cd(), { cn: x2, j: C3 } = o3, [S3, N3] = e3("showNativeOverlaidScrollbars"), [R3, M3] = e3("scrollbars.theme"), [F2, _2] = e3("scrollbars.visibility"), [j2, z2] = e3("scrollbars.autoHide"), [H2, W2] = e3("scrollbars.autoHideSuspend"), [V2] = e3("scrollbars.autoHideDelay"), [U2, K2] = e3("scrollbars.dragScroll"), [G2, q2] = e3("scrollbars.clickScroll"), [J2, Y2] = e3("overflow"), X2 = y3 && !t3, Q2 = C3.x || C3.y, Z2 = a3 || p3 || h3 || g3 || t3, ee2 = m3 || _2 || Y2, te2 = S3 && w3.x && w3.y, ne2 = !k2 && !$2, oe2 = te2 || ne2, ie2 = (e4, t4, n3) => {
|
|
7278
7290
|
const o4 = e4.includes(Kc) && (F2 === Vc || "auto" === F2 && t4 === Kc);
|
|
7279
|
-
return
|
|
7291
|
+
return I2(_u, o4, n3), o4;
|
|
7280
7292
|
};
|
|
7281
|
-
if (f2 = V2, X2 && (H2 && Q2 ? (B2(false), d2(),
|
|
7293
|
+
if (f2 = V2, X2 && (H2 && Q2 ? (B2(false), d2(), b2(() => {
|
|
7282
7294
|
d2 = eu(E2, "scroll", Xc(B2, true), { T: true });
|
|
7283
|
-
})) : B2(true)), (N3 || ne2) &&
|
|
7295
|
+
})) : B2(true)), (N3 || ne2) && I2("os-theme-none", oe2), M3 && (I2(u2), I2(R3, true), u2 = R3), W2 && !H2 && B2(true), z2 && (s2 = "move" === j2, c2 = "leave" === j2, l2 = "never" === j2, T2(l2, true)), K2 && I2(Gu, U2), q2 && I2(Ku, !!G2), ee2) {
|
|
7284
7296
|
const e4 = ie2(J2.x, x2.x, true), t4 = ie2(J2.y, x2.y, false);
|
|
7285
|
-
|
|
7297
|
+
I2(ju, !(e4 && t4));
|
|
7286
7298
|
}
|
|
7287
|
-
Z2 && (O(), A(), D2(), h3 && L2(),
|
|
7288
|
-
}, {},
|
|
7289
|
-
})(e, t, m, l, u, i), v = (e2) => nl(e2).some((t2) => !!e2[t2]),
|
|
7299
|
+
Z2 && (O(), A(), D2(), h3 && L2(), I2(Hu, !C3.x, true), I2(Hu, !C3.y, false), I2(Ru, v3 && !P2));
|
|
7300
|
+
}, {}, C2];
|
|
7301
|
+
})(e, t, m, l, u, i), v = (e2) => nl(e2).some((t2) => !!e2[t2]), b = (e2, i2) => {
|
|
7290
7302
|
if (n())
|
|
7291
7303
|
return false;
|
|
7292
7304
|
const { dn: a2, At: s2, It: l2, pn: u2 } = e2, d2 = a2 || {}, f2 = !!s2 || !r2, h2 = { zt: id(t, d2, f2), dn: d2, At: f2 };
|
|
7293
7305
|
if (u2)
|
|
7294
7306
|
return g(h2), false;
|
|
7295
|
-
const y2 = i2 || p(ol({}, h2, { It: l2 })),
|
|
7296
|
-
g(ol({}, h2, { Qt: y2, Zt:
|
|
7297
|
-
const
|
|
7298
|
-
return r2 = true, x && o2(e2, { Qt: y2, Zt:
|
|
7307
|
+
const y2 = i2 || p(ol({}, h2, { It: l2 })), b2 = c(ol({}, h2, { un: m, Qt: y2 }));
|
|
7308
|
+
g(ol({}, h2, { Qt: y2, Zt: b2 }));
|
|
7309
|
+
const w2 = v(y2), k = v(b2), x = w2 || k || !rl(d2) || f2;
|
|
7310
|
+
return r2 = true, x && o2(e2, { Qt: y2, Zt: b2 }), x;
|
|
7299
7311
|
};
|
|
7300
7312
|
return [() => {
|
|
7301
7313
|
const { ln: e2, gt: t2, St: n2 } = u, o3 = ru(e2), i2 = [f(), s(), h()], r3 = n2();
|
|
7302
7314
|
return iu(t2, o3), r3(), Xc(Dc, i2);
|
|
7303
|
-
},
|
|
7304
|
-
}, Nd = /* @__PURE__ */ new WeakMap(), Ed = (e) => Nd.get(e),
|
|
7315
|
+
}, b, () => ({ vn: m, gn: l }), { hn: u, bn: y }, d];
|
|
7316
|
+
}, Nd = /* @__PURE__ */ new WeakMap(), Ed = (e) => Nd.get(e), Pd = (e, t, n) => {
|
|
7305
7317
|
const { tt: o2 } = cd(), i = xc(e), r2 = i ? e : e.target, a = Ed(r2);
|
|
7306
7318
|
if (t && !a) {
|
|
7307
7319
|
let a2 = false;
|
|
@@ -7310,23 +7322,23 @@ const dd = (e, t, n) => {
|
|
|
7310
7322
|
return n2 ? n2(t2, true) : t2;
|
|
7311
7323
|
}, u = ol({}, o2(), l(t)), [d, f, p] = du(), [m, h, g] = du(n), y = (e2, t2) => {
|
|
7312
7324
|
g(e2, t2), p(e2, t2);
|
|
7313
|
-
}, [v,
|
|
7325
|
+
}, [v, b, w2, k, x] = Sd(e, u, () => a2, ({ dn: e2, At: t2 }, { Qt: n2, Zt: o3 }) => {
|
|
7314
7326
|
const { _t: i2, Ct: r3, $t: a3, xt: s2, Ht: c2, ft: l2 } = n2, { tn: u2, nn: d2, sn: f2, en: p2 } = o3;
|
|
7315
|
-
y("updated", [
|
|
7316
|
-
}, (e2) => y("scroll", [
|
|
7327
|
+
y("updated", [S2, { updateHints: { sizeChanged: !!i2, directionChanged: !!r3, heightIntrinsicChanged: !!a3, overflowEdgeChanged: !!u2, overflowAmountChanged: !!d2, overflowStyleChanged: !!f2, scrollCoordinatesChanged: !!p2, contentMutation: !!s2, hostMutation: !!c2, appear: !!l2 }, changedOptions: e2 || {}, force: !!t2 }]);
|
|
7328
|
+
}, (e2) => y("scroll", [S2, e2])), C2 = (e2) => {
|
|
7317
7329
|
((e3) => {
|
|
7318
7330
|
Nd.delete(e3);
|
|
7319
|
-
})(r2), Dc(s), a2 = true, y("destroyed", [
|
|
7320
|
-
},
|
|
7331
|
+
})(r2), Dc(s), a2 = true, y("destroyed", [S2, e2]), f(), h();
|
|
7332
|
+
}, S2 = { options(e2, t2) {
|
|
7321
7333
|
if (e2) {
|
|
7322
7334
|
const n2 = t2 ? o2() : {}, i2 = od(u, ol(n2, l(e2)));
|
|
7323
|
-
rl(i2) || (ol(u, i2),
|
|
7335
|
+
rl(i2) || (ol(u, i2), b({ dn: i2 }));
|
|
7324
7336
|
}
|
|
7325
7337
|
return ol({}, u);
|
|
7326
7338
|
}, on: m, off: (e2, t2) => {
|
|
7327
7339
|
e2 && t2 && h(e2, t2);
|
|
7328
7340
|
}, state() {
|
|
7329
|
-
const { vn: e2, gn: t2 } =
|
|
7341
|
+
const { vn: e2, gn: t2 } = w2(), { B: n2 } = e2, { Vt: o3, Rt: i2, cn: r3, j: s2, rn: c2, fn: l2, Dt: u2 } = t2;
|
|
7330
7342
|
return ol({}, { overflowEdge: o3, overflowAmount: i2, overflowStyle: r3, hasOverflow: s2, scrollCoordinates: { start: u2.D, end: u2.M }, padding: c2, paddingAbsolute: l2, directionRTL: n2, destroyed: a2 });
|
|
7331
7343
|
}, elements() {
|
|
7332
7344
|
const { dt: e2, vt: t2, rn: n2, L: o3, ht: i2, gt: r3, Kt: a3 } = k.hn, { jt: s2, Jt: c2 } = k.bn, l2 = (e3) => {
|
|
@@ -7336,39 +7348,39 @@ const dd = (e, t, n) => {
|
|
|
7336
7348
|
const { Xt: t3, Yt: n3 } = e3, o4 = l2(t3[0]);
|
|
7337
7349
|
return ol({}, o4, { clone: () => {
|
|
7338
7350
|
const e4 = l2(n3());
|
|
7339
|
-
return
|
|
7351
|
+
return b({ pn: true }), e4;
|
|
7340
7352
|
} });
|
|
7341
7353
|
};
|
|
7342
7354
|
return ol({}, { target: e2, host: t2, padding: n2 || o3, viewport: o3, content: i2 || o3, scrollOffsetElement: r3, scrollEventElement: a3, scrollbarHorizontal: u2(s2), scrollbarVertical: u2(c2) });
|
|
7343
|
-
}, update: (e2) =>
|
|
7344
|
-
return
|
|
7355
|
+
}, update: (e2) => b({ At: e2, It: true }), destroy: Xc(C2, false), plugin: (e2) => c[nl(e2)[0]] };
|
|
7356
|
+
return Pc(s, [x]), ((e2, t2) => {
|
|
7345
7357
|
Nd.set(e2, t2);
|
|
7346
|
-
})(r2,
|
|
7358
|
+
})(r2, S2), mu(fu, Pd, [S2, d, c]), ((e2, t2) => {
|
|
7347
7359
|
const { nativeScrollbarsOverlaid: n2, body: o3 } = t2 || {}, { k: i2, U: r3, K: a3 } = cd(), { nativeScrollbarsOverlaid: s2, body: c2 } = a3().cancel, l2 = null != n2 ? n2 : s2, u2 = fc(o3) ? c2 : o3, d2 = (i2.x || i2.y) && l2, f2 = e2 && (pc(u2) ? !r3 : u2);
|
|
7348
7360
|
return !!d2 || !!f2;
|
|
7349
|
-
})(k.hn.bt, !i && e.cancel) ? (
|
|
7361
|
+
})(k.hn.bt, !i && e.cancel) ? (C2(true), S2) : (Pc(s, v()), y("initialized", [S2]), S2.update(), S2);
|
|
7350
7362
|
}
|
|
7351
7363
|
return a;
|
|
7352
7364
|
};
|
|
7353
|
-
|
|
7354
|
-
const t = vc(e), n = t ? e : [e], o2 = n.map((e2) => mu(e2,
|
|
7365
|
+
Pd.plugin = (e) => {
|
|
7366
|
+
const t = vc(e), n = t ? e : [e], o2 = n.map((e2) => mu(e2, Pd)[0]);
|
|
7355
7367
|
return ((e2) => {
|
|
7356
|
-
|
|
7368
|
+
Sc(e2, (e3) => Sc(e3, (t2, n2) => {
|
|
7357
7369
|
fu[n2] = e3[n2];
|
|
7358
7370
|
}));
|
|
7359
7371
|
})(n), t ? o2 : o2[0];
|
|
7360
|
-
},
|
|
7372
|
+
}, Pd.valid = (e) => {
|
|
7361
7373
|
const t = e && e.elements, n = yc(t) && t();
|
|
7362
7374
|
return kc(n) && !!Ed(n.target);
|
|
7363
|
-
},
|
|
7375
|
+
}, Pd.env = () => {
|
|
7364
7376
|
const { P: e, k: t, U: n, J: o2, ot: i, st: r2, K: a, Z: s, tt: c, nt: l } = cd();
|
|
7365
7377
|
return ol({}, { scrollbarsSize: e, scrollbarsOverlaid: t, scrollbarsHiding: n, scrollTimeline: o2, staticDefaultInitialization: i, staticDefaultOptions: r2, getDefaultInitialization: a, setDefaultInitialization: s, getDefaultOptions: c, setDefaultOptions: l });
|
|
7366
|
-
},
|
|
7378
|
+
}, Pd.nonce = (e) => {
|
|
7367
7379
|
rd = e;
|
|
7368
|
-
},
|
|
7380
|
+
}, Pd.trustedTypePolicy = (e) => {
|
|
7369
7381
|
Ll = e;
|
|
7370
7382
|
};
|
|
7371
|
-
const
|
|
7383
|
+
const Id = () => {
|
|
7372
7384
|
if (typeof window > "u") {
|
|
7373
7385
|
const e2 = () => {
|
|
7374
7386
|
};
|
|
@@ -7384,23 +7396,23 @@ const Pd = () => {
|
|
|
7384
7396
|
} : n2, "object" == typeof r3 ? r3 : { timeout: 2233 });
|
|
7385
7397
|
}, c];
|
|
7386
7398
|
}, Ad = (e) => {
|
|
7387
|
-
const { options: t, events: n, defer: o2 } = e || {}, [i, r2] = useMemo(
|
|
7399
|
+
const { options: t, events: n, defer: o2 } = e || {}, [i, r2] = useMemo(Id, []), a = useRef(null), s = useRef(o2), c = useRef(t), l = useRef(n);
|
|
7388
7400
|
return useEffect(() => {
|
|
7389
7401
|
s.current = o2;
|
|
7390
7402
|
}, [o2]), useEffect(() => {
|
|
7391
7403
|
const { current: e2 } = a;
|
|
7392
|
-
c.current = t,
|
|
7404
|
+
c.current = t, Pd.valid(e2) && e2.options(t || {}, true);
|
|
7393
7405
|
}, [t]), useEffect(() => {
|
|
7394
7406
|
const { current: e2 } = a;
|
|
7395
|
-
l.current = n,
|
|
7407
|
+
l.current = n, Pd.valid(e2) && e2.on(n || {}, true);
|
|
7396
7408
|
}, [n]), useEffect(() => () => {
|
|
7397
7409
|
var e2;
|
|
7398
7410
|
r2(), null == (e2 = a.current) || e2.destroy();
|
|
7399
7411
|
}, []), useMemo(() => [(e2) => {
|
|
7400
7412
|
const t2 = a.current;
|
|
7401
|
-
if (
|
|
7413
|
+
if (Pd.valid(t2))
|
|
7402
7414
|
return;
|
|
7403
|
-
const n2 = s.current, o3 = c.current || {}, r3 = l.current || {}, u = () => a.current =
|
|
7415
|
+
const n2 = s.current, o3 = c.current || {}, r3 = l.current || {}, u = () => a.current = Pd(e2, o3, r3);
|
|
7404
7416
|
n2 ? i(u, n2) : u();
|
|
7405
7417
|
}, () => a.current], []);
|
|
7406
7418
|
};
|
|
@@ -7442,13 +7454,13 @@ function Md(e, t) {
|
|
|
7442
7454
|
function Fd() {
|
|
7443
7455
|
return ("function" == typeof useId ? useId : Md)() ?? "";
|
|
7444
7456
|
}
|
|
7445
|
-
const $d = forwardRef(({ id: n, className: o2, type: i = "text", name: r2 = "input", align: s = "up", label: c, iconPrepend: l, iconPrependOnClick: u, iconAppend: d, iconAppendOnClick: f, placeholder: p, disabled: m, readOnly: h, errorMessage: g, errorDataTestId: y, ...v },
|
|
7446
|
-
const
|
|
7457
|
+
const $d = forwardRef(({ id: n, className: o2, type: i = "text", name: r2 = "input", align: s = "up", label: c, iconPrepend: l, iconPrependOnClick: u, iconAppend: d, iconAppendOnClick: f, placeholder: p, disabled: m, readOnly: h, errorMessage: g, errorDataTestId: y, ...v }, b) => {
|
|
7458
|
+
const w2 = Fd(), k = n || `input-${w2}`, x = E("io-control-input", l && "io-control-leading-icon", d && "io-control-trailing-icon", m && "io-control-disabled", h && "io-control-readonly", g && "io-control-error", s && [`direction-${s}`], o2), C2 = useCallback((e) => {
|
|
7447
7459
|
m ? e.preventDefault() : u && u(e);
|
|
7448
|
-
}, [u, m]),
|
|
7460
|
+
}, [u, m]), S2 = useCallback((e) => {
|
|
7449
7461
|
m ? e.preventDefault() : f && f(e);
|
|
7450
7462
|
}, [f, m]);
|
|
7451
|
-
return jsxs("div", { className: x, children: [c && jsx(Ld, { htmlFor: k, text: c }), l && jsx(
|
|
7463
|
+
return jsxs("div", { className: x, children: [c && jsx(Ld, { htmlFor: k, text: c }), l && jsx(P, { variant: l, onClick: (e) => C2(e) }), jsx("input", { id: k, className: "io-input", ref: b, type: i, name: r2, tabIndex: 0, placeholder: p ?? (() => {
|
|
7452
7464
|
switch (i) {
|
|
7453
7465
|
case "email":
|
|
7454
7466
|
return "Enter your email here...";
|
|
@@ -7463,7 +7475,7 @@ const $d = forwardRef(({ id: n, className: o2, type: i = "text", name: r2 = "inp
|
|
|
7463
7475
|
default:
|
|
7464
7476
|
return "Enter text here...";
|
|
7465
7477
|
}
|
|
7466
|
-
})(), "aria-label": c, disabled: m, readOnly: h, ...g ? { "aria-invalid": true, "aria-describedby": `${k}-error` } : {}, ...v }), d && jsx(
|
|
7478
|
+
})(), "aria-label": c, disabled: m, readOnly: h, ...g ? { "aria-invalid": true, "aria-describedby": `${k}-error` } : {}, ...v }), d && jsx(P, { variant: d, onClick: (e) => S2(e) }), g && jsxs("div", { "data-testid": y, id: `${k}-error`, className: "io-input-error", children: [jsx(P, { variant: "close" }), g] })] });
|
|
7467
7479
|
});
|
|
7468
7480
|
$d.displayName = "Input";
|
|
7469
7481
|
const _d = forwardRef(({ id: n, className: o2, name: i = "textarea", align: r2 = "up", label: a, rows: s = 4, placeholder: c = "Enter text here...", disabled: l, readOnly: u, ...d }, f) => {
|
|
@@ -7487,14 +7499,14 @@ const Hd = () => {
|
|
|
7487
7499
|
return (_a2 = e == null ? void 0 : e.themes) == null ? void 0 : _a2.select(t2);
|
|
7488
7500
|
}, [e]);
|
|
7489
7501
|
return useEffect(() => {
|
|
7490
|
-
var _a2,
|
|
7502
|
+
var _a2, _b2;
|
|
7491
7503
|
if (!e)
|
|
7492
7504
|
return;
|
|
7493
7505
|
let t2 = false;
|
|
7494
7506
|
const o3 = (e2) => {
|
|
7495
7507
|
t2 || n(e2);
|
|
7496
7508
|
};
|
|
7497
|
-
return (_a2 = e.themes) == null ? void 0 : _a2.onChanged(o3), (
|
|
7509
|
+
return (_a2 = e.themes) == null ? void 0 : _a2.onChanged(o3), (_b2 = e.themes) == null ? void 0 : _b2.getCurrent().then(o3).catch(console.warn), () => {
|
|
7498
7510
|
t2 = true;
|
|
7499
7511
|
};
|
|
7500
7512
|
}, [e]), { currentTheme: t, selectTheme: o2 };
|
|
@@ -7518,7 +7530,7 @@ function Kd() {
|
|
|
7518
7530
|
}), []), useCallback(() => e.current, []);
|
|
7519
7531
|
}
|
|
7520
7532
|
const Qd = () => {
|
|
7521
|
-
const e = useContext(IOConnectContext), t = e == null ? void 0 : e.windows, n = e == null ? void 0 : e.workspaces, o2 = useRef(null), [i, r2] = useState(null), [s, u] = useState(null), [p, m] = useState(false), [h, g] = useState(false), [y, v] = useState(null),
|
|
7533
|
+
const e = useContext(IOConnectContext), t = e == null ? void 0 : e.windows, n = e == null ? void 0 : e.workspaces, o2 = useRef(null), [i, r2] = useState(null), [s, u] = useState(null), [p, m] = useState(false), [h, g] = useState(false), [y, v] = useState(null), b = useRef(void 0), w2 = Kd(), { currentTheme: k } = Hd();
|
|
7522
7534
|
useEffect(() => {
|
|
7523
7535
|
o2.current = i;
|
|
7524
7536
|
const e2 = i == null ? void 0 : i.ioConnectWindow.onVisibilityChanged(() => {
|
|
@@ -7528,7 +7540,7 @@ const Qd = () => {
|
|
|
7528
7540
|
e2 == null ? void 0 : e2();
|
|
7529
7541
|
};
|
|
7530
7542
|
}, [i]);
|
|
7531
|
-
const
|
|
7543
|
+
const C2 = useCallback(async (e2, o3) => {
|
|
7532
7544
|
const i2 = { windowId: e2 == null ? void 0 : e2.ioConnectWindow.id, ...o3 }, r3 = window.glue42gd.windowId;
|
|
7533
7545
|
if ((() => {
|
|
7534
7546
|
const e3 = Or() && !!window.workspacesManager, t2 = !Or() && !!window.ioworkspaces;
|
|
@@ -7547,7 +7559,7 @@ const Qd = () => {
|
|
|
7547
7559
|
return void console.warn("Cannot access my window to show popup");
|
|
7548
7560
|
await e3.showPopup({ ...i2 });
|
|
7549
7561
|
}
|
|
7550
|
-
}, [t, n]),
|
|
7562
|
+
}, [t, n]), S2 = useCallback((e2) => {
|
|
7551
7563
|
try {
|
|
7552
7564
|
const t2 = e2.document;
|
|
7553
7565
|
(k == null ? void 0 : k.name) && (t2.documentElement.className = k.name);
|
|
@@ -7555,35 +7567,35 @@ const Qd = () => {
|
|
|
7555
7567
|
return n2.id = "io-popup-window-container", t2.body.innerHTML = "", t2.body.appendChild(n2), t2;
|
|
7556
7568
|
} catch (e3) {
|
|
7557
7569
|
const t2 = `Failed to setup popup document: ${String(e3)}`;
|
|
7558
|
-
return console.error("usePopupWindow:", t2, e3),
|
|
7570
|
+
return console.error("usePopupWindow:", t2, e3), w2() && v(t2), null;
|
|
7559
7571
|
}
|
|
7560
|
-
}, [k,
|
|
7572
|
+
}, [k, w2]), N2 = useCallback(async (e2) => {
|
|
7561
7573
|
if (!t) {
|
|
7562
7574
|
const e3 = "io.Connect API not available";
|
|
7563
|
-
return console.error("usePopupWindow:", e3),
|
|
7575
|
+
return console.error("usePopupWindow:", e3), w2() && v(e3), null;
|
|
7564
7576
|
}
|
|
7565
|
-
|
|
7577
|
+
w2() && (g(true), v(null));
|
|
7566
7578
|
try {
|
|
7567
7579
|
const n2 = new Promise((e3, t2) => {
|
|
7568
7580
|
setTimeout(() => t2(new Error("Popup creation timeout after 5 seconds")), 5e3);
|
|
7569
7581
|
}), o3 = t.createPopup({ ...e2 }), i2 = await Promise.race([o3, n2]);
|
|
7570
|
-
if (!
|
|
7582
|
+
if (!w2())
|
|
7571
7583
|
return await i2.ioConnectWindow.close().catch(() => {
|
|
7572
7584
|
}), console.warn("usePopupWindow: Component unmounted during popup creation, cleaned up popup"), null;
|
|
7573
7585
|
r2(i2);
|
|
7574
7586
|
const a = i2.browserWindow;
|
|
7575
7587
|
if (a == null ? void 0 : a.document) {
|
|
7576
|
-
const e3 =
|
|
7577
|
-
|
|
7588
|
+
const e3 = S2(a);
|
|
7589
|
+
w2() && e3 && u(e3);
|
|
7578
7590
|
}
|
|
7579
7591
|
return i2;
|
|
7580
7592
|
} catch (e3) {
|
|
7581
7593
|
const t2 = `Failed to create popup: ${String(e3)}`;
|
|
7582
|
-
return console.error("usePopupWindow:", t2, e3),
|
|
7594
|
+
return console.error("usePopupWindow:", t2, e3), w2() && (v(t2), r2(null), u(null)), null;
|
|
7583
7595
|
} finally {
|
|
7584
|
-
|
|
7596
|
+
w2() && g(false);
|
|
7585
7597
|
}
|
|
7586
|
-
}, [t,
|
|
7598
|
+
}, [t, S2, w2]), E2 = useCallback(() => {
|
|
7587
7599
|
if (!i || !t)
|
|
7588
7600
|
return false;
|
|
7589
7601
|
try {
|
|
@@ -7591,7 +7603,7 @@ const Qd = () => {
|
|
|
7591
7603
|
} catch (e2) {
|
|
7592
7604
|
return console.warn("usePopupWindow: Failed to verify popup existence", e2), false;
|
|
7593
7605
|
}
|
|
7594
|
-
}, [i, t]),
|
|
7606
|
+
}, [i, t]), P2 = useCallback(async () => {
|
|
7595
7607
|
if (!i)
|
|
7596
7608
|
return null;
|
|
7597
7609
|
if (E2())
|
|
@@ -7600,16 +7612,16 @@ const Qd = () => {
|
|
|
7600
7612
|
const e2 = i.ioConnectWindow.bounds, t2 = await N2({ left: e2.left, top: e2.top, width: e2.width, height: e2.height });
|
|
7601
7613
|
if (!t2) {
|
|
7602
7614
|
const e3 = "Failed to recreate destroyed popup window";
|
|
7603
|
-
console.error("usePopupWindow:", e3),
|
|
7615
|
+
console.error("usePopupWindow:", e3), w2() && v(e3);
|
|
7604
7616
|
}
|
|
7605
7617
|
return t2;
|
|
7606
|
-
}, [i, E2, N2,
|
|
7618
|
+
}, [i, E2, N2, w2]), I2 = useCallback(async (e2) => {
|
|
7607
7619
|
if (i)
|
|
7608
|
-
return await
|
|
7620
|
+
return await P2();
|
|
7609
7621
|
const t2 = await N2(e2);
|
|
7610
|
-
return t2 ?
|
|
7622
|
+
return t2 ? w2() ? t2 : (await t2.ioConnectWindow.close().catch(() => {
|
|
7611
7623
|
}), console.warn("usePopupWindow: Component unmounted during popup creation, cleaned up popup"), null) : (console.warn("usePopupWindow: Failed to create popup, operation aborted"), null);
|
|
7612
|
-
}, [i,
|
|
7624
|
+
}, [i, P2, N2, w2]);
|
|
7613
7625
|
useEffect(() => {
|
|
7614
7626
|
if ((i == null ? void 0 : i.browserWindow) && s)
|
|
7615
7627
|
try {
|
|
@@ -7624,32 +7636,32 @@ const Qd = () => {
|
|
|
7624
7636
|
if (i) {
|
|
7625
7637
|
if (!t) {
|
|
7626
7638
|
const e3 = "io.Connect API not available";
|
|
7627
|
-
return console.error("usePopupWindow:", e3), void (
|
|
7639
|
+
return console.error("usePopupWindow:", e3), void (w2() && v(e3));
|
|
7628
7640
|
}
|
|
7629
7641
|
try {
|
|
7630
|
-
const t2 = e2 ||
|
|
7642
|
+
const t2 = e2 || b.current;
|
|
7631
7643
|
if (!t2)
|
|
7632
7644
|
return void console.warn("usePopupWindow: No show options available");
|
|
7633
|
-
const n2 = await
|
|
7634
|
-
if (!n2 || !
|
|
7645
|
+
const n2 = await P2();
|
|
7646
|
+
if (!n2 || !w2())
|
|
7635
7647
|
return;
|
|
7636
|
-
await
|
|
7648
|
+
await C2(n2, t2), w2() && m(true);
|
|
7637
7649
|
} catch (e3) {
|
|
7638
7650
|
const t2 = `Failed to show popup: ${JSON.stringify(e3)}`;
|
|
7639
|
-
console.error("usePopupWindow:", t2, e3),
|
|
7651
|
+
console.error("usePopupWindow:", t2, e3), w2() && v(t2);
|
|
7640
7652
|
}
|
|
7641
7653
|
} else
|
|
7642
7654
|
console.warn("usePopupWindow: Cannot show popup - popup not created yet");
|
|
7643
|
-
}, [i, t,
|
|
7655
|
+
}, [i, t, C2, w2, P2]), L2 = useCallback(async (e2) => {
|
|
7644
7656
|
await (i == null ? void 0 : i.ioConnectWindow.moveResize({ ...e2 }));
|
|
7645
7657
|
}, [i]), D2 = useCallback(async () => {
|
|
7646
|
-
if (
|
|
7658
|
+
if (w2() && (m(false), o2.current))
|
|
7647
7659
|
try {
|
|
7648
7660
|
await o2.current.ioConnectWindow.hide();
|
|
7649
7661
|
} catch (e2) {
|
|
7650
7662
|
console.error("usePopupWindow: Failed to hide popup", e2);
|
|
7651
7663
|
}
|
|
7652
|
-
}, [o2,
|
|
7664
|
+
}, [o2, w2]);
|
|
7653
7665
|
ie(() => {
|
|
7654
7666
|
p && D2().catch((e2) => {
|
|
7655
7667
|
console.error("Failed to hide popup on Escape key press in parent window", e2);
|
|
@@ -7672,35 +7684,35 @@ const Qd = () => {
|
|
|
7672
7684
|
await o2.current.ioConnectWindow.close(), o2.current = null;
|
|
7673
7685
|
} catch (e2) {
|
|
7674
7686
|
const t2 = `Failed to close popup: ${String(e2)}`;
|
|
7675
|
-
console.error("usePopupWindow:", t2, e2),
|
|
7687
|
+
console.error("usePopupWindow:", t2, e2), w2() && v(t2);
|
|
7676
7688
|
} finally {
|
|
7677
|
-
|
|
7689
|
+
w2() && (r2(null), u(null), m(false), b.current = void 0);
|
|
7678
7690
|
}
|
|
7679
|
-
}, [o2,
|
|
7691
|
+
}, [o2, w2]), R2 = useCallback(async (e2, n2, o3) => {
|
|
7680
7692
|
if (!t) {
|
|
7681
7693
|
const e3 = "io.Connect API not available";
|
|
7682
|
-
return console.error("usePopupWindow:", e3), void (
|
|
7694
|
+
return console.error("usePopupWindow:", e3), void (w2() && v(e3));
|
|
7683
7695
|
}
|
|
7684
|
-
|
|
7696
|
+
w2() && (g(true), v(null));
|
|
7685
7697
|
try {
|
|
7686
|
-
let e3 = await
|
|
7698
|
+
let e3 = await I2(n2);
|
|
7687
7699
|
if (!e3) {
|
|
7688
7700
|
const t2 = await N2(n2);
|
|
7689
7701
|
if (!t2)
|
|
7690
7702
|
return void console.warn("usePopupWindow: Failed to create popup, operation aborted");
|
|
7691
|
-
if (!
|
|
7703
|
+
if (!w2())
|
|
7692
7704
|
return await t2.ioConnectWindow.close().catch(() => {
|
|
7693
7705
|
}), void console.warn("usePopupWindow: Component unmounted during popup creation, cleaned up popup");
|
|
7694
7706
|
e3 = t2;
|
|
7695
7707
|
}
|
|
7696
|
-
o3 && (
|
|
7708
|
+
o3 && (b.current = o3), await C2(e3, o3), w2() && m(true);
|
|
7697
7709
|
} catch (e3) {
|
|
7698
7710
|
const t2 = `Failed to create and show popup: ${String(e3)}`;
|
|
7699
|
-
console.error("usePopupWindow:", t2, e3),
|
|
7711
|
+
console.error("usePopupWindow:", t2, e3), w2() && v(t2);
|
|
7700
7712
|
} finally {
|
|
7701
|
-
|
|
7713
|
+
w2() && g(false);
|
|
7702
7714
|
}
|
|
7703
|
-
}, [N2, t,
|
|
7715
|
+
}, [N2, t, C2, w2, I2]);
|
|
7704
7716
|
return { popup: i, loading: h, error: y, clearError: A, isOpen: !!i, isVisible: p, createPopup: N2, showPopup: O, createAndShowPopup: R2, hidePopup: D2, closePopup: T2, getContainer: () => (s == null ? void 0 : s.getElementById("io-popup-window-container")) || null, resizePopup: L2 };
|
|
7705
7717
|
};
|
|
7706
7718
|
const ef = () => {
|
|
@@ -7722,7 +7734,7 @@ function lf(e) {
|
|
|
7722
7734
|
}
|
|
7723
7735
|
sf.displayName = "Toggle";
|
|
7724
7736
|
const uf = { getMyApplication: async function(e) {
|
|
7725
|
-
var _a2,
|
|
7737
|
+
var _a2, _b2;
|
|
7726
7738
|
if (e)
|
|
7727
7739
|
try {
|
|
7728
7740
|
const t = e.apps;
|
|
@@ -7735,7 +7747,7 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7735
7747
|
return;
|
|
7736
7748
|
return cf(n2);
|
|
7737
7749
|
}
|
|
7738
|
-
const n = (
|
|
7750
|
+
const n = (_b2 = e.appManager) == null ? void 0 : _b2.myApplication;
|
|
7739
7751
|
if (!n)
|
|
7740
7752
|
return;
|
|
7741
7753
|
return lf(n);
|
|
@@ -7743,7 +7755,7 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7743
7755
|
return void console.error("Failed to get my application", e2);
|
|
7744
7756
|
}
|
|
7745
7757
|
}, getApplications: async function(e) {
|
|
7746
|
-
var _a2,
|
|
7758
|
+
var _a2, _b2;
|
|
7747
7759
|
if (!e)
|
|
7748
7760
|
return [];
|
|
7749
7761
|
try {
|
|
@@ -7752,14 +7764,14 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7752
7764
|
const e2 = await t.getMany() ?? [];
|
|
7753
7765
|
return e2.map((e3) => cf(e3));
|
|
7754
7766
|
}
|
|
7755
|
-
const n = ((
|
|
7767
|
+
const n = ((_b2 = e.appManager) == null ? void 0 : _b2.applications()) ?? [];
|
|
7756
7768
|
return n.map((e2) => lf(e2));
|
|
7757
7769
|
} catch (e2) {
|
|
7758
7770
|
console.error("Failed to get applications", e2);
|
|
7759
7771
|
}
|
|
7760
7772
|
return [];
|
|
7761
7773
|
}, startApplication: async function(e, t, n) {
|
|
7762
|
-
var _a2,
|
|
7774
|
+
var _a2, _b2;
|
|
7763
7775
|
if (e)
|
|
7764
7776
|
try {
|
|
7765
7777
|
const o2 = e.apps;
|
|
@@ -7768,7 +7780,7 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7768
7780
|
const e2 = o2.instances;
|
|
7769
7781
|
return e2 ? void await e2.start({ name: t, ...n }) : void console.error("io.apps.instances API is not available");
|
|
7770
7782
|
}
|
|
7771
|
-
const i = (
|
|
7783
|
+
const i = (_b2 = e.appManager) == null ? void 0 : _b2.application(t);
|
|
7772
7784
|
if (!i)
|
|
7773
7785
|
return void console.error(`Application "${t}" not found`);
|
|
7774
7786
|
await i.start(n);
|
|
@@ -7791,7 +7803,7 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7791
7803
|
return void console.error(`Failed to stop application instance "${t.id}"`, e2);
|
|
7792
7804
|
}
|
|
7793
7805
|
}, onAppAdded: async function(e, t) {
|
|
7794
|
-
var _a2,
|
|
7806
|
+
var _a2, _b2;
|
|
7795
7807
|
if (e)
|
|
7796
7808
|
try {
|
|
7797
7809
|
const n = (_a2 = e.apps) == null ? void 0 : _a2.registry;
|
|
@@ -7801,7 +7813,7 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7801
7813
|
t(n2);
|
|
7802
7814
|
});
|
|
7803
7815
|
}
|
|
7804
|
-
const o2 = (
|
|
7816
|
+
const o2 = (_b2 = e.appManager) == null ? void 0 : _b2.onAppAdded((e2) => {
|
|
7805
7817
|
const n2 = lf(e2);
|
|
7806
7818
|
t(n2);
|
|
7807
7819
|
});
|
|
@@ -7810,7 +7822,7 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7810
7822
|
return void console.error("Failed to subscribe to app added events", e2);
|
|
7811
7823
|
}
|
|
7812
7824
|
}, onAppRemoved: async function(e, t) {
|
|
7813
|
-
var _a2,
|
|
7825
|
+
var _a2, _b2;
|
|
7814
7826
|
if (e)
|
|
7815
7827
|
try {
|
|
7816
7828
|
const n = (_a2 = e.apps) == null ? void 0 : _a2.registry;
|
|
@@ -7819,7 +7831,7 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7819
7831
|
t({ name: e2 });
|
|
7820
7832
|
});
|
|
7821
7833
|
}
|
|
7822
|
-
const o2 = (
|
|
7834
|
+
const o2 = (_b2 = e.appManager) == null ? void 0 : _b2.onAppRemoved((e2) => {
|
|
7823
7835
|
t({ name: e2.name });
|
|
7824
7836
|
});
|
|
7825
7837
|
return o2;
|
|
@@ -7827,7 +7839,7 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7827
7839
|
return void console.error("Failed to subscribe to app removed events", e2);
|
|
7828
7840
|
}
|
|
7829
7841
|
}, onAppChanged: async function(e, t) {
|
|
7830
|
-
var _a2,
|
|
7842
|
+
var _a2, _b2;
|
|
7831
7843
|
if (e)
|
|
7832
7844
|
try {
|
|
7833
7845
|
const n = (_a2 = e.apps) == null ? void 0 : _a2.registry;
|
|
@@ -7837,7 +7849,7 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7837
7849
|
t(n2);
|
|
7838
7850
|
});
|
|
7839
7851
|
}
|
|
7840
|
-
const o2 = (
|
|
7852
|
+
const o2 = (_b2 = e.appManager) == null ? void 0 : _b2.onAppChanged((e2) => {
|
|
7841
7853
|
const n2 = lf(e2);
|
|
7842
7854
|
t(n2);
|
|
7843
7855
|
});
|
|
@@ -7846,26 +7858,26 @@ const uf = { getMyApplication: async function(e) {
|
|
|
7846
7858
|
return void console.error("Failed to subscribe to app changed events", e2);
|
|
7847
7859
|
}
|
|
7848
7860
|
}, restartPlatform: async function(e, t = true) {
|
|
7849
|
-
var _a2,
|
|
7861
|
+
var _a2, _b2;
|
|
7850
7862
|
if (!e)
|
|
7851
7863
|
return;
|
|
7852
7864
|
const n = { autoSave: t, showDialog: true };
|
|
7853
7865
|
try {
|
|
7854
7866
|
if ((_a2 = e.platform) == null ? void 0 : _a2.restart)
|
|
7855
7867
|
return void await e.platform.restart(n);
|
|
7856
|
-
await ((
|
|
7868
|
+
await ((_b2 = e.appManager) == null ? void 0 : _b2.restart(n));
|
|
7857
7869
|
} catch (e2) {
|
|
7858
7870
|
console.error("Failed to restart platform", e2);
|
|
7859
7871
|
}
|
|
7860
7872
|
}, shutdownPlatform: async function(e, t = true) {
|
|
7861
|
-
var _a2,
|
|
7873
|
+
var _a2, _b2;
|
|
7862
7874
|
if (!e)
|
|
7863
7875
|
return;
|
|
7864
7876
|
const n = { autoSave: t, showDialog: true };
|
|
7865
7877
|
try {
|
|
7866
7878
|
if ((_a2 = e.platform) == null ? void 0 : _a2.shutdown)
|
|
7867
7879
|
return void await e.platform.shutdown(n);
|
|
7868
|
-
await ((
|
|
7880
|
+
await ((_b2 = e.appManager) == null ? void 0 : _b2.exit(n));
|
|
7869
7881
|
} catch (e2) {
|
|
7870
7882
|
console.error("Failed to shutdown platform", e2);
|
|
7871
7883
|
}
|
|
@@ -7892,18 +7904,18 @@ const df = { minimizeWindow: async function(e) {
|
|
|
7892
7904
|
createContext({ theme: "dark" });
|
|
7893
7905
|
createContext(void 0);
|
|
7894
7906
|
const gf = (n) => {
|
|
7895
|
-
const { General: o2, Launchpad: i, Docking: r2, ExtendedArea: a, Layouts: s, Downloads: c, System: l } = Np();
|
|
7896
|
-
return
|
|
7907
|
+
const { General: o2, Launchpad: i, Docking: r2, ExtendedArea: a, Layouts: s, Downloads: c, System: l } = Np(), u = [[{ key: "general", Component: o2 }], [{ key: "launchpad", Component: i }, { key: "docking", Component: r2 }, { key: "extended-area", Component: a }], [{ key: "layouts", Component: s }], [{ key: "downloads", Component: c }], [{ key: "system", Component: l }]];
|
|
7908
|
+
return jsx(Od, { element: Us, elementProps: n, children: u.map((n2, o3) => jsxs(Fragment$1, { children: [n2.map(({ key: t, Component: n3 }) => jsx(n3, {}, t)), o3 < u.length - 1 && jsx(J, {})] }, n2[0].key)) });
|
|
7897
7909
|
}, yf = ({ title: t = "General", ...n }) => {
|
|
7898
7910
|
const { Theme: o2 } = Np();
|
|
7899
7911
|
return jsx(T, { title: t, ...n, children: jsx(o2, {}) });
|
|
7900
7912
|
}, vf = ({ className: n, title: o2 = "Theme", ...i }) => {
|
|
7901
7913
|
const { currentTheme: r2, selectTheme: a } = Hd(), s = ef();
|
|
7902
7914
|
return jsxs("div", { className: E("flex jc-between ai-center", n), "data-testid": "theme-container", ...i, children: [jsx("label", { className: "io-text-clipper", "data-testid": "theme-label", children: o2 }), jsxs(re, { variant: "light", "data-testid": "theme-dropdown", children: [jsx(re.Button, { text: (r2 == null ? void 0 : r2.displayName) ?? "Dark", "data-testid": "theme-dropdown-button" }), jsx(re.Content, { "data-testid": "theme-dropdown-content", children: jsx(re.List, { children: s.map(({ displayName: t, name: n2 }) => jsx(re.Item, { onClick: () => a(n2), "data-testid": `theme-dropdown-item-${n2}`, children: t }, n2)) }) })] })] });
|
|
7903
|
-
},
|
|
7915
|
+
}, bf = ({ prefKey: t, ...n }) => {
|
|
7904
7916
|
const { isLoading: o2, value: i = false, update: r2 } = ks({ prefKey: t });
|
|
7905
7917
|
return jsx(sf, { checked: i, disabled: o2, onChange: (e) => r2(e.target.checked), ...n });
|
|
7906
|
-
},
|
|
7918
|
+
}, wf = ({ align: t = "right", label: n = "Minimize to tray", ...o2 }) => jsx(bf, { align: t, label: n, prefKey: Fa, ...o2 }), kf = ({ prefKey: n, options: o2, disabled: i, ...r2 }) => {
|
|
7907
7919
|
const { isLoading: a, value: s = "Select option", update: c } = ks({ prefKey: n });
|
|
7908
7920
|
return jsxs(re, { variant: "light", disabled: a || i, ...r2, children: [jsx(re.Button, { children: s }), jsx(re.Content, { children: jsx(re.List, { children: o2.map((t) => jsx(re.Item, { onClick: () => (async (e) => {
|
|
7909
7921
|
if (e !== s)
|
|
@@ -7913,19 +7925,19 @@ const gf = (n) => {
|
|
|
7913
7925
|
console.error("Failed to update platform preference:", e2);
|
|
7914
7926
|
}
|
|
7915
7927
|
})(t), children: t }, t)) }) })] });
|
|
7916
|
-
}, xf = ({ className: n, label: o2 = "Pinned position", ...i }) => jsx(T, { className: E("io-block-list-gap", n), ...i, children: jsxs("div", { className: "flex jc-between ai-center", children: [jsx("label", { className: "io-text-clipper", children: o2 }), jsx(kf, { className: n, prefKey: _a, options: ["Left", "Right"], ...i })] }) }),
|
|
7928
|
+
}, xf = ({ className: n, label: o2 = "Pinned position", ...i }) => jsx(T, { className: E("io-block-list-gap", n), ...i, children: jsxs("div", { className: "flex jc-between ai-center", children: [jsx("label", { className: "io-text-clipper", children: o2 }), jsx(kf, { className: n, prefKey: _a, options: ["Left", "Right"], ...i })] }) }), Cf = ({ align: t = "right", label: n = 'Hide "Favorites"', ...o2 }) => jsx(bf, { align: t, label: n, prefKey: Ka, ...o2 }), Sf = ({ align: t = "right", label: n = "Allow docking to top", ...o2 }) => jsx(bf, { align: t, label: n, prefKey: ja, ...o2 }), Nf = ({ align: t = "right", label: n = "Always on top", ...o2 }) => jsx(bf, { align: t, label: n, prefKey: za, ...o2 }), Ef = ({ align: t = "right", label: n = "Claim occupied space", ...o2 }) => jsx(bf, { align: t, label: n, prefKey: Ha, ...o2 }), Pf = ({ align: t = "right", label: n = "Show the extended Launchpad area", ...o2 }) => jsx(bf, { align: t, label: n, prefKey: Wa, ...o2 }), If = ({ align: t = "right", label: n = "Hide labels", ...o2 }) => {
|
|
7917
7929
|
const { value: i } = ks({ prefKey: Wa });
|
|
7918
|
-
return jsx(
|
|
7930
|
+
return jsx(bf, { align: t, label: n, prefKey: Va, disabled: !i, ...o2 });
|
|
7919
7931
|
}, Af = ({ align: t = "right", label: n = 'Show "Favorites"', ...o2 }) => {
|
|
7920
7932
|
const { value: i } = ks({ prefKey: Wa });
|
|
7921
|
-
return jsx(
|
|
7933
|
+
return jsx(bf, { align: t, label: n, prefKey: Ua, disabled: !i, ...o2 });
|
|
7922
7934
|
}, Of = ({ align: t = "right", label: n = 'Show "Recent"', ...o2 }) => {
|
|
7923
7935
|
const { value: i } = ks({ prefKey: Wa });
|
|
7924
|
-
return jsx(
|
|
7936
|
+
return jsx(bf, { align: t, label: n, prefKey: Ga, disabled: !i, ...o2 });
|
|
7925
7937
|
}, Lf = ({ title: n = "Layouts", ...o2 }) => {
|
|
7926
7938
|
const { LayoutsSaveCurrentOnExit: i, LayoutsShowDeletePrompt: r2, LayoutsShowUnsavedChangesPrompt: a } = Np();
|
|
7927
7939
|
return jsxs(T, { title: n, ...o2, children: [jsx(i, {}), jsx(a, {}), jsx(r2, {})] });
|
|
7928
|
-
}, Df = ({ align: t = "right", label: n = "Save current on exit", ...o2 }) => jsx(
|
|
7940
|
+
}, Df = ({ align: t = "right", label: n = "Save current on exit", ...o2 }) => jsx(bf, { align: t, label: n, prefKey: Ja, ...o2 }), Tf = ({ align: t = "right", label: n = "Show prompt for unsaved changes", ...o2 }) => jsx(bf, { align: t, label: n, prefKey: Ya, "data-testid": "layouts-show-unsaved-changes-prompt-toggle-button", ...o2 }), Rf = ({ align: t = "right", label: n = "Show prompt for deleting", ...o2 }) => jsx(bf, { align: t, label: n, prefKey: Xa, "data-testid": "layouts-show-delete-prompt-toggle", ...o2 }), Bf = ({ title: t = "Downloads", ...n }) => {
|
|
7929
7941
|
const { DownloadsLocation: o2 } = Np();
|
|
7930
7942
|
return jsx(T, { title: t, ...n, children: jsx(o2, {}) });
|
|
7931
7943
|
};
|
|
@@ -7967,11 +7979,11 @@ function Wf({ className: t, icon: n = "pop-out", ...o2 }) {
|
|
|
7967
7979
|
console.error("Failed to open Download Manager", e);
|
|
7968
7980
|
});
|
|
7969
7981
|
}, [i]);
|
|
7970
|
-
return jsx(
|
|
7982
|
+
return jsx(I, { className: E("io-dm-compact-mode-only", t), icon: n, variant: "circle", size: "32", onClick: r2, ...o2 });
|
|
7971
7983
|
}
|
|
7972
7984
|
function Vf({ icon: t = "close", size: n = "32", variant: o2 = "circle", onClick: i, ...r2 }) {
|
|
7973
7985
|
const a = useContext(IOConnectContext);
|
|
7974
|
-
return jsx(
|
|
7986
|
+
return jsx(I, { icon: t, size: n, variant: o2, onClick: (e) => {
|
|
7975
7987
|
i ? i(e) : df.closeWindow(a).catch((e2) => {
|
|
7976
7988
|
console.error("Failed to close window:", e2);
|
|
7977
7989
|
});
|
|
@@ -7997,7 +8009,7 @@ function Gf({ className: t, ...n }) {
|
|
|
7997
8009
|
}
|
|
7998
8010
|
function qf({ className: n, icon: o2 = "download", text: i = "No downloads to display.", ...r2 }) {
|
|
7999
8011
|
const a = E("io-dm-no-items", n);
|
|
8000
|
-
return jsxs("div", { className: a, ...r2, children: [jsx(
|
|
8012
|
+
return jsxs("div", { className: a, ...r2, children: [jsx(P, { variant: o2 }), jsx("p", { children: i })] });
|
|
8001
8013
|
}
|
|
8002
8014
|
function Jf({ className: n, title: o2, children: i, ...r2 }) {
|
|
8003
8015
|
const a = E("io-dm-item-group", n);
|
|
@@ -8015,12 +8027,12 @@ function Xf({ bytesReceived: t = 0, bytesTotal: n = 0, ...o2 }) {
|
|
|
8015
8027
|
return jsx(Js, { value: i(), ...o2 });
|
|
8016
8028
|
}
|
|
8017
8029
|
function Qf({ className: n, itemID: o2, filename: i, state: r2, pauseResume: s, showInFolder: c, cancel: l, remove: u, ...d }) {
|
|
8018
|
-
const f = E("io-dm-item-header", n), { pauseResumeItem: p, showItemInFolder: m, cancelItem: h, removeItem: g } = _f(), y = "progressing" === r2 || "paused" === r2, v = "interrupted" === r2 || "cancelled" === r2,
|
|
8030
|
+
const f = E("io-dm-item-header", n), { pauseResumeItem: p, showItemInFolder: m, cancelItem: h, removeItem: g } = _f(), y = "progressing" === r2 || "paused" === r2, v = "interrupted" === r2 || "cancelled" === r2, b = y ? "Cancel Download" : "Remove Download", w2 = l ?? h, k = u ?? g, x = function(e, t, n2, o3) {
|
|
8019
8031
|
return "paused" === e || "progressing" === e ? { statusIcon: "paused" === e ? "play" : "pause", onStatusActionClick: () => n2(t) } : "completed" === e ? { statusIcon: "folder", onStatusActionClick: () => o3(t) } : null;
|
|
8020
|
-
}(r2, o2, s ?? p, c ?? m),
|
|
8021
|
-
y ?
|
|
8022
|
-
}, [y,
|
|
8023
|
-
return jsxs("div", { className: f, ...d, children: [jsx(D, { text: i, style: { textDecoration: v ? "line-through" : "none" } }), jsxs(ae, { children: [x && jsx(
|
|
8032
|
+
}(r2, o2, s ?? p, c ?? m), C2 = useCallback(() => {
|
|
8033
|
+
y ? w2(o2) : k(o2);
|
|
8034
|
+
}, [y, w2, o2, k]);
|
|
8035
|
+
return jsxs("div", { className: f, ...d, children: [jsx(D, { text: i, style: { textDecoration: v ? "line-through" : "none" } }), jsxs(ae, { children: [x && jsx(I, { icon: x.statusIcon, iconSize: "12", onClick: x.onStatusActionClick, className: "io-dm-compact-mode-only" }), jsx(I, { icon: "close", iconSize: "12", title: b, onClick: C2 })] })] });
|
|
8024
8036
|
}
|
|
8025
8037
|
function Zf({ className: n, state: o2, url: i, bytesReceived: r2 = 0, bytesTotal: a = 0, speed: s = 0, timeRemaining: c = 0, ...l }) {
|
|
8026
8038
|
const u = E("io-dm-item-body", n), d = (e) => {
|
|
@@ -8040,7 +8052,7 @@ function Zf({ className: n, state: o2, url: i, bytesReceived: r2 = 0, bytesTotal
|
|
|
8040
8052
|
const ep = { success: "check-solid", warning: "exclamation-mark", critical: "exclamation-mark" };
|
|
8041
8053
|
function tp({ className: n, variant: o2, text: i }) {
|
|
8042
8054
|
const r2 = E("io-dm-item-status", `io-dm-item-status-${o2}`, n);
|
|
8043
|
-
return jsxs("div", { className: r2, children: [o2 && jsx(
|
|
8055
|
+
return jsxs("div", { className: r2, children: [o2 && jsx(P, { variant: ep[o2], className: "icon-severity", size: "10" }), i && jsx("p", { className: "io-text-smaller", children: i })] });
|
|
8044
8056
|
}
|
|
8045
8057
|
function np({ className: o2, itemID: i, state: r2, pauseResume: s, showInFolder: c, cancel: l, ...u }) {
|
|
8046
8058
|
const d = E("io-dm-item-footer", o2), { pauseResumeItem: f, showItemInFolder: p, cancelItem: m } = _f(), h = useCallback((e) => {
|
|
@@ -8069,7 +8081,7 @@ function np({ className: o2, itemID: i, state: r2, pauseResume: s, showInFolder:
|
|
|
8069
8081
|
}
|
|
8070
8082
|
function op({ className: n, title: o2 = "Download Settings", ...i }) {
|
|
8071
8083
|
const r2 = E("io-dm-settings-panel", n), { configuration: { downloadFolder: a }, hideSettings: s, setDownloadLocation: c, setDownloadLocationWithDialog: l, isDownloadLocationDialogVisible: u, downloadLocationList: d } = _f();
|
|
8072
|
-
return jsxs(Gs, { className: r2, ...i, children: [jsxs(Gs.Header, { children: [jsx(Gs.Header.Title, { size: "large", text: o2, tag: "h1" }), jsx(Gs.Header.ButtonGroup, { children: jsx(
|
|
8084
|
+
return jsxs(Gs, { className: r2, ...i, children: [jsxs(Gs.Header, { children: [jsx(Gs.Header.Title, { size: "large", text: o2, tag: "h1" }), jsx(Gs.Header.ButtonGroup, { children: jsx(I, { className: "non-draggable", variant: "circle", icon: "close", size: "32", onClick: () => {
|
|
8073
8085
|
s();
|
|
8074
8086
|
}, disabled: u }) })] }), jsx(Gs.Body, { children: jsxs(ae, { children: [jsxs(re, { variant: "light", disabled: u, children: [jsx(re.Button, { children: jsx("span", { className: "io-dm-settings-panel-download-location", children: a ?? d[0] }) }), d.length > 1 && jsx(re.Content, { children: jsx(re.List, { children: d.map((t, n2) => !t || 0 === n2 || n2 > 3 ? null : jsx(re.Item, { onClick: () => {
|
|
8075
8087
|
c(t);
|
|
@@ -8086,7 +8098,7 @@ const sp = () => useContext(rp);
|
|
|
8086
8098
|
const up = ({ className: n, label: o2 = "Location", ...i }) => {
|
|
8087
8099
|
const { configuration: { downloadFolder: r2 }, setDownloadLocationWithDialog: a, isDownloadLocationDialogVisible: s, downloadLocationList: c } = _f();
|
|
8088
8100
|
return jsxs(T, { className: E("io-preferences-download-section", n), ...i, children: [jsxs("div", { className: "flex jc-between ai-center", children: [jsx("label", { className: "io-text-clipper", children: o2 }), jsx($, { text: "Change", onClick: a, disabled: s })] }), jsx("p", { children: r2 ?? (c == null ? void 0 : c[0]) ?? "Not set" })] });
|
|
8089
|
-
}, dp = ({ align: t = "right", label: n = "Ask where to save each file before downloading", ...o2 }) => jsx(
|
|
8101
|
+
}, dp = ({ align: t = "right", label: n = "Ask where to save each file before downloading", ...o2 }) => jsx(bf, { align: t, label: n, prefKey: Qa, ...o2 }), fp = ({ title: n = "System", ...o2 }) => {
|
|
8090
8102
|
const { SystemRestartSection: i, SystemShutdownSection: r2 } = Np();
|
|
8091
8103
|
return jsxs(T, { title: n, ...o2, children: [jsx(i, {}), jsx(r2, {})] });
|
|
8092
8104
|
}, pp = "T42.GD.Execute", mp = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], hp = (e, t) => e in t;
|
|
@@ -8153,36 +8165,32 @@ function vp(e, t) {
|
|
|
8153
8165
|
const n = "restart" === e ? "_system_scheduleRestart" : "_system_scheduleShutdown";
|
|
8154
8166
|
return t ? `${n}${t}` : n;
|
|
8155
8167
|
}
|
|
8156
|
-
function
|
|
8168
|
+
function bp({ className: n, variant: o2, ...i }) {
|
|
8157
8169
|
const r2 = E("io-block-list-gap", o2, n), { enabled: a, time: s, frequency: c, day: l, setEnabled: u, setTime: d, setFrequency: f, setDay: p } = yp(o2);
|
|
8158
8170
|
return jsxs(T, { className: r2, ...i, children: [jsx(sf, { label: `Schedule ${o2}`, align: "right", onChange: (e) => u(e.target.checked), checked: a }), jsxs("div", { className: "scheduler-controls", children: [jsx("div", { className: "io-control-input io-control-leading-icon direction-up", children: jsx("input", { type: "time", className: "io-input", value: s, onChange: (e) => d(e.target.value) }) }), jsxs(ei, { text: c.charAt(0).toUpperCase() + c.slice(1), icon: "chevron-down", iconRight: true, children: [jsx(ei.Item, { onClick: () => f("daily"), children: "Daily" }), jsx(ei.Item, { onClick: () => f("weekly"), children: "Weekly" })] }), "weekly" === c && jsx(ei, { text: l, icon: "chevron-down", iconRight: true, children: mp.map((t) => jsx(ei.Item, { onClick: () => p(t), children: t }, t)) })] })] });
|
|
8159
8171
|
}
|
|
8160
|
-
function
|
|
8161
|
-
return jsx(
|
|
8172
|
+
function wp({ className: t, ...n }) {
|
|
8173
|
+
return jsx(bp, { ...n, className: t, variant: "restart" });
|
|
8162
8174
|
}
|
|
8163
8175
|
function kp({ className: t, ...n }) {
|
|
8164
|
-
return jsx(
|
|
8176
|
+
return jsx(bp, { ...n, className: t, variant: "shutdown" });
|
|
8165
8177
|
}
|
|
8166
8178
|
const xp = { Body: gf, General: yf, Theme: vf, Launchpad: ({ title: n = "Launchpad", ...o2 }) => {
|
|
8167
8179
|
const { MinimizeToTray: i, PinnedPosition: r2, HideFavoritesFromLaunchpad: a } = Np();
|
|
8168
8180
|
return jsxs(T, { title: n, ...o2, children: [jsx(i, {}), jsx(r2, {}), jsx(a, {})] });
|
|
8169
|
-
}, MinimizeToTray:
|
|
8170
|
-
const { AllowDocking:
|
|
8171
|
-
return jsxs(T, { title:
|
|
8172
|
-
}, AllowDocking:
|
|
8173
|
-
const { ShowExtendedArea:
|
|
8174
|
-
return jsxs(T, { title:
|
|
8175
|
-
}, ShowExtendedArea:
|
|
8181
|
+
}, MinimizeToTray: wf, PinnedPosition: xf, HideFavoritesFromLaunchpad: Cf, Docking: ({ className: n, title: o2 = "Docking", ...i }) => {
|
|
8182
|
+
const r2 = E("io-preferences-panel-docking", n), { AllowDocking: a, DockedAlwaysOnTop: s, DockedClaimsSpace: c } = Np();
|
|
8183
|
+
return jsxs(T, { className: r2, title: o2, ...i, children: [jsx(a, {}), jsx(s, {}), jsx(c, {})] });
|
|
8184
|
+
}, AllowDocking: Sf, DockedAlwaysOnTop: Nf, DockedClaimsSpace: Ef, ExtendedArea: ({ className: n, title: o2 = "Extended Area", ...i }) => {
|
|
8185
|
+
const r2 = E("io-preferences-panel-extended-area", n), { ShowExtendedArea: a, HideLabelsInExtendedArea: s, ShowFavoritesInExtendedArea: c, ShowRecentAppsInExtendedArea: l } = Np();
|
|
8186
|
+
return jsxs(T, { className: r2, title: o2, ...i, children: [jsx(a, {}), jsx(s, {}), jsx(c, {}), jsx(l, {})] });
|
|
8187
|
+
}, ShowExtendedArea: Pf, HideLabelsInExtendedArea: If, ShowFavoritesInExtendedArea: Af, ShowRecentAppsInExtendedArea: Of, Layouts: Lf, LayoutsSaveCurrentOnExit: Df, LayoutsShowUnsavedChangesPrompt: Tf, LayoutsShowDeletePrompt: Rf, Downloads: Bf, DownloadsLocation: up, DownloadsAskForEachDownload: dp, System: fp, SystemRestartSection: wp, SystemShutdownSection: kp }, Cp = createContext(xp), Sp = memo(({ children: t, components: n }) => {
|
|
8176
8188
|
const o2 = useMemo(() => ({ ...xp, ...n }), [n]);
|
|
8177
|
-
return jsx(
|
|
8189
|
+
return jsx(Cp.Provider, { value: o2, children: t });
|
|
8178
8190
|
});
|
|
8179
|
-
|
|
8180
|
-
const Np = () => useContext(
|
|
8181
|
-
function Ap(
|
|
8182
|
-
const r2 = E("io-notifications-settings-panel-general", n), { AllowNotifications: a, AllowNotificationToasts: s, ShowNotificationBadge: c, CloseNotificationOnClick: l, PanelAutoHide: u, HideToastsAfter: d } = mm(), f = Ud();
|
|
8183
|
-
return jsx("div", { className: r2, ...i, children: jsxs(T, { title: o2, children: [f && jsx(a, {}), f && jsx(s, {}), jsx(c, {}), f && jsx(u, {}), f && jsx(l, {}), f && jsx(d, {})] }) });
|
|
8184
|
-
}
|
|
8185
|
-
function Op(e) {
|
|
8191
|
+
Sp.displayName = "PreferencesPanelComponentsStoreProvider";
|
|
8192
|
+
const Np = () => useContext(Cp);
|
|
8193
|
+
function Ap(e) {
|
|
8186
8194
|
if (e && e.errorHandling && "function" != typeof e.errorHandling && "log" !== e.errorHandling && "silent" !== e.errorHandling && "throw" !== e.errorHandling)
|
|
8187
8195
|
throw new Error('Invalid options passed to createRegistry. Prop errorHandling should be ["log" | "silent" | "throw" | (err) => void], but ' + typeof e.errorHandling + " was passed");
|
|
8188
8196
|
var t = e && "function" == typeof e.errorHandling && e.errorHandling, n = {};
|
|
@@ -8243,9 +8251,9 @@ function Op(e) {
|
|
|
8243
8251
|
n[e2] && delete n[e2];
|
|
8244
8252
|
} };
|
|
8245
8253
|
}
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
function
|
|
8254
|
+
Ap.default = Ap;
|
|
8255
|
+
C(Ap);
|
|
8256
|
+
function Dp(e) {
|
|
8249
8257
|
const t = useContext(IOConnectContext), n = Ud(), [o2, i] = useState([]), [r2, s] = useState(0), d = "Platform", p = useCallback((e2 = "asc") => {
|
|
8250
8258
|
if (null === n)
|
|
8251
8259
|
return [];
|
|
@@ -8310,7 +8318,7 @@ function Tp(e) {
|
|
|
8310
8318
|
return s(a), c;
|
|
8311
8319
|
}, [e, o2]), allowedApps: r2, sortedAppsAsc: m, sortedAppsDesc: h, sortAppsAlphabetically: p };
|
|
8312
8320
|
}
|
|
8313
|
-
const
|
|
8321
|
+
const $p = createContext({ allApps: [], settings: {}, configuration: {}, notifications: [], notificationsCount: 0, onClose: () => {
|
|
8314
8322
|
}, allApplications: 0, clearAll: () => {
|
|
8315
8323
|
}, showPanel: () => {
|
|
8316
8324
|
}, hidePanel: () => {
|
|
@@ -8326,33 +8334,37 @@ const _p = createContext({ allApps: [], settings: {}, configuration: {}, notific
|
|
|
8326
8334
|
}, setState: () => {
|
|
8327
8335
|
}, setStates: () => {
|
|
8328
8336
|
}, setCount: () => {
|
|
8329
|
-
} }),
|
|
8337
|
+
} }), _p = () => useContext($p);
|
|
8338
|
+
function jp({ className: n, title: o2 = "General", ...i }) {
|
|
8339
|
+
const r2 = E("io-notifications-settings-panel-general", n), { AllowNotifications: a, AllowNotificationToasts: s, ShowNotificationBadge: c, CloseNotificationOnClick: l, PanelAutoHide: u, HideToastsAfter: d } = mm(), f = Ud();
|
|
8340
|
+
return jsx("div", { className: r2, ...i, children: jsxs(T, { title: o2, children: [f && jsx(a, {}), f && jsx(s, {}), jsx(c, {}), f && jsx(u, {}), f && jsx(l, {}), f && jsx(d, {})] }) });
|
|
8341
|
+
}
|
|
8330
8342
|
function zp({ label: t = "Allow notifications", align: n = "right", ...o2 }) {
|
|
8331
|
-
const { settings: i, saveSetting: r2 } =
|
|
8343
|
+
const { settings: i, saveSetting: r2 } = _p(), s = Ud(), c = useCallback((e) => {
|
|
8332
8344
|
r2({ enabledNotifications: e.target.checked });
|
|
8333
8345
|
}, [r2]);
|
|
8334
8346
|
return s ? jsx(sf, { label: t, align: n, onChange: c, checked: i.enabledNotifications ?? false, ...o2 }) : null;
|
|
8335
8347
|
}
|
|
8336
8348
|
function Hp({ label: t = "Allow notification toasts", align: n = "right", ...o2 }) {
|
|
8337
|
-
const { settings: i, saveSetting: r2 } =
|
|
8349
|
+
const { settings: i, saveSetting: r2 } = _p(), s = Ud(), c = s && !i.enabledNotifications, l = useCallback((e) => {
|
|
8338
8350
|
r2({ enabledToasts: e.target.checked });
|
|
8339
8351
|
}, [r2]);
|
|
8340
8352
|
return s ? jsx(sf, { label: t, align: n, onChange: l, checked: i.enabledToasts ?? false, disabled: c, ...o2 }) : null;
|
|
8341
8353
|
}
|
|
8342
8354
|
function Wp({ label: t = "Show notification badge", align: n = "right", ...o2 }) {
|
|
8343
|
-
const { settings: i, saveSetting: r2 } =
|
|
8355
|
+
const { settings: i, saveSetting: r2 } = _p(), s = Ud() && !i.enabledNotifications, c = useCallback((e) => {
|
|
8344
8356
|
r2({ showNotificationBadge: e.target.checked });
|
|
8345
8357
|
}, [r2]);
|
|
8346
8358
|
return jsx(sf, { label: t, align: n, onChange: c, checked: i.showNotificationBadge ?? false, disabled: s, ...o2 });
|
|
8347
8359
|
}
|
|
8348
8360
|
function Vp({ label: t = "Close notification on click", align: n = "right", ...o2 }) {
|
|
8349
|
-
const { settings: i, saveSetting: r2 } =
|
|
8361
|
+
const { settings: i, saveSetting: r2 } = _p(), s = Ud(), c = s && !i.enabledNotifications, l = useCallback((e) => {
|
|
8350
8362
|
r2({ closeNotificationOnClick: e.target.checked });
|
|
8351
8363
|
}, [r2]);
|
|
8352
8364
|
return s ? jsx(sf, { label: t, align: n, onChange: l, checked: i.closeNotificationOnClick ?? false, disabled: c, ...o2 }) : null;
|
|
8353
8365
|
}
|
|
8354
8366
|
function Up({ label: t = "Auto hide panel", align: n = "right", ...o2 }) {
|
|
8355
|
-
const { settings: i, saveSetting: r2 } =
|
|
8367
|
+
const { settings: i, saveSetting: r2 } = _p(), s = Ud(), c = useCallback((e) => {
|
|
8356
8368
|
r2({ autoHidePanel: e.target.checked });
|
|
8357
8369
|
}, [r2]);
|
|
8358
8370
|
return s ? jsx(sf, { label: t, align: n, onChange: c, checked: i.autoHidePanel ?? false, ...o2 }) : null;
|
|
@@ -8362,7 +8374,7 @@ const Kp = (e, t) => e ? `${e} ${t}${1 !== e ? "s" : ""}` : "", Gp = (e) => {
|
|
|
8362
8374
|
return o2 + (o2 && i ? " " : "") + i;
|
|
8363
8375
|
};
|
|
8364
8376
|
function qp({ className: n, title: o2 = "Hide toasts after", items: i = [15, 30, 45, 60], ...r2 }) {
|
|
8365
|
-
const s = E("flex", "jc-between", "ai-center", n), { settings: c, saveSetting: l } =
|
|
8377
|
+
const s = E("flex", "jc-between", "ai-center", n), { settings: c, saveSetting: l } = _p(), u = Ud(), d = u && !c.enabledNotifications, f = useCallback((e = 15e3) => {
|
|
8366
8378
|
c.toastExpiry !== e && l({ toastExpiry: 1e3 * e });
|
|
8367
8379
|
}, [c.toastExpiry, l]);
|
|
8368
8380
|
return u ? jsxs("div", { className: s, ...r2, children: [jsx("div", { className: "io-text-clipper " + (d ? "io-text-disabled" : ""), children: jsx("span", { children: o2 }) }), jsxs(re, { variant: "light", disabled: d, children: [jsx(re.Button, { text: Gp((c.toastExpiry ?? 0) / 1e3) }), jsx(re.Content, { children: jsx(re.List, { variant: "single", children: i.map((t) => jsx(re.Item, { onClick: () => {
|
|
@@ -8374,14 +8386,14 @@ function Jp({ className: n, title: o2 = "Stacking", ...i }) {
|
|
|
8374
8386
|
return Ud() ? jsx("div", { className: r2, ...i, children: jsxs(T, { title: o2, children: [jsx(a, {}), jsx(s, {})] }) }) : null;
|
|
8375
8387
|
}
|
|
8376
8388
|
function Yp({ label: t = "Allow toast stacking", align: n = "right", ...o2 }) {
|
|
8377
|
-
const { settings: i, saveSetting: r2 } =
|
|
8389
|
+
const { settings: i, saveSetting: r2 } = _p(), s = Ud(), c = s && !i.enabledNotifications, l = useCallback((e) => {
|
|
8378
8390
|
r2({ toastStacking: e.target.checked });
|
|
8379
8391
|
}, [r2]);
|
|
8380
8392
|
return s ? jsx(sf, { label: t, align: n, onChange: l, checked: i.toastStacking ?? false, disabled: c, ...o2 }) : null;
|
|
8381
8393
|
}
|
|
8382
8394
|
const Xp = { application: "Application", severity: "Priority" }, Qp = Object.fromEntries(Object.entries(Xp).map(([e, t]) => [t, e]));
|
|
8383
8395
|
function Zp({ className: n, title: o2 = "Group by", ...i }) {
|
|
8384
|
-
const r2 = E("flex", "jc-between", "ai-center", n), { settings: s, saveSetting: c } =
|
|
8396
|
+
const r2 = E("flex", "jc-between", "ai-center", n), { settings: s, saveSetting: c } = _p(), l = Ud(), u = l && !s.enabledNotifications, d = useCallback((e = "severity") => {
|
|
8385
8397
|
s.stackBy !== e && c({ stackBy: e.toLowerCase() });
|
|
8386
8398
|
}, [s.stackBy, c]);
|
|
8387
8399
|
if (!l)
|
|
@@ -8398,20 +8410,20 @@ function em({ className: n, title: o2 = "Placement", ...i }) {
|
|
|
8398
8410
|
}
|
|
8399
8411
|
const tm = (e) => e.replace(/(^|-)\w/g, (e2) => e2.toUpperCase().replace("-", " "));
|
|
8400
8412
|
function nm({ className: n, title: o2 = "Panel position", ...i }) {
|
|
8401
|
-
var _a2,
|
|
8402
|
-
const r2 = E("flex", "jc-between", "ai-center", n), { settings: s, saveSetting: c } =
|
|
8413
|
+
var _a2, _b2;
|
|
8414
|
+
const r2 = E("flex", "jc-between", "ai-center", n), { settings: s, saveSetting: c } = _p(), l = Ud(), u = useCallback((e) => {
|
|
8403
8415
|
var _a3;
|
|
8404
8416
|
e || (e = "right"), ((_a3 = s.placement) == null ? void 0 : _a3.panel) !== e && c({ placement: { ...s.placement, panel: e.toLowerCase() } });
|
|
8405
8417
|
}, [s.placement, c]);
|
|
8406
8418
|
if (!l)
|
|
8407
8419
|
return null;
|
|
8408
|
-
return jsxs("div", { className: r2, ...i, children: [jsx("div", { className: "io-text-clipper", children: jsx("span", { children: o2 }) }), jsxs(re, { variant: "light", children: [jsx(re.Button, { text: ((_a2 = s.placement) == null ? void 0 : _a2.panel) ? tm((
|
|
8420
|
+
return jsxs("div", { className: r2, ...i, children: [jsx("div", { className: "io-text-clipper", children: jsx("span", { children: o2 }) }), jsxs(re, { variant: "light", children: [jsx(re.Button, { text: ((_a2 = s.placement) == null ? void 0 : _a2.panel) ? tm((_b2 = s.placement) == null ? void 0 : _b2.panel) : "Right" }), jsx(re.Content, { children: jsx(re.List, { variant: "single", children: ["Right", "Left"].map((t) => jsx(re.Item, { onClick: () => {
|
|
8409
8421
|
u(t);
|
|
8410
8422
|
}, children: t }, t)) }) })] })] });
|
|
8411
8423
|
}
|
|
8412
8424
|
function om({ className: n, title: o2 = "Toasts position", ...i }) {
|
|
8413
|
-
var _a2,
|
|
8414
|
-
const r2 = E("flex", "jc-between", "ai-center", n), { settings: s, saveSetting: c } =
|
|
8425
|
+
var _a2, _b2;
|
|
8426
|
+
const r2 = E("flex", "jc-between", "ai-center", n), { settings: s, saveSetting: c } = _p(), l = Ud(), u = useCallback((e) => {
|
|
8415
8427
|
var _a3;
|
|
8416
8428
|
if (e || (e = "bottom-right"), ((_a3 = s.placement) == null ? void 0 : _a3.toasts) === e)
|
|
8417
8429
|
return;
|
|
@@ -8420,64 +8432,64 @@ function om({ className: n, title: o2 = "Toasts position", ...i }) {
|
|
|
8420
8432
|
}, [s.placement, c]);
|
|
8421
8433
|
if (!l)
|
|
8422
8434
|
return null;
|
|
8423
|
-
return jsxs("div", { className: r2, ...i, children: [jsx("div", { className: "io-text-clipper", children: jsx("span", { children: o2 }) }), jsxs(re, { variant: "light", children: [jsx(re.Button, { text: ((_a2 = s.placement) == null ? void 0 : _a2.toasts) ? tm((
|
|
8435
|
+
return jsxs("div", { className: r2, ...i, children: [jsx("div", { className: "io-text-clipper", children: jsx("span", { children: o2 }) }), jsxs(re, { variant: "light", children: [jsx(re.Button, { text: ((_a2 = s.placement) == null ? void 0 : _a2.toasts) ? tm((_b2 = s.placement) == null ? void 0 : _b2.toasts) : "Bottom Right" }), jsx(re.Content, { children: jsx(re.List, { variant: "single", children: ["Top Right", "Top Left", "Bottom Right", "Bottom Left"].map((t) => jsx(re.Item, { onClick: () => {
|
|
8424
8436
|
u(t);
|
|
8425
8437
|
}, children: t }, t)) }) })] })] });
|
|
8426
8438
|
}
|
|
8427
8439
|
function im({ className: t, title: n = "Snooze", ...o2 }) {
|
|
8428
8440
|
var _a2;
|
|
8429
|
-
const i = E("io-notifications-settings-panel-snooze", t), { SnoozeDuration: r2 } = mm(), { settings: a } =
|
|
8441
|
+
const i = E("io-notifications-settings-panel-snooze", t), { SnoozeDuration: r2 } = mm(), { settings: a } = _p();
|
|
8430
8442
|
return Ud() && ((_a2 = a.snooze) == null ? void 0 : _a2.enabled) ? jsx("div", { className: i, ...o2, children: jsx(T, { title: n, children: jsx(r2, {}) }) }) : null;
|
|
8431
8443
|
}
|
|
8432
8444
|
function rm({ className: n, title: o2 = "Default duration", items: i = [60, 120, 180, 300], ...r2 }) {
|
|
8433
|
-
var _a2,
|
|
8434
|
-
const s = E("flex", "jc-between", "ai-center", n), { settings: c, saveSetting: l } =
|
|
8445
|
+
var _a2, _b2;
|
|
8446
|
+
const s = E("flex", "jc-between", "ai-center", n), { settings: c, saveSetting: l } = _p(), u = Ud(), d = u && !c.enabledNotifications, f = useCallback((e = 6e4) => {
|
|
8435
8447
|
var _a3;
|
|
8436
8448
|
c.snooze && ((_a3 = c.snooze) == null ? void 0 : _a3.duration) !== e && l({ snooze: { ...c.snooze, duration: 1e3 * e } });
|
|
8437
8449
|
}, [c.snooze, l]);
|
|
8438
|
-
return u && ((_a2 = c.snooze) == null ? void 0 : _a2.enabled) ? jsxs("div", { className: s, ...r2, children: [jsx("div", { className: E("io-text-clipper", { "io-text-disabled": d }), children: jsx("span", { children: o2 }) }), jsxs(re, { variant: "light", disabled: d, children: [jsx(re.Button, { text: Gp((((
|
|
8450
|
+
return u && ((_a2 = c.snooze) == null ? void 0 : _a2.enabled) ? jsxs("div", { className: s, ...r2, children: [jsx("div", { className: E("io-text-clipper", { "io-text-disabled": d }), children: jsx("span", { children: o2 }) }), jsxs(re, { variant: "light", disabled: d, children: [jsx(re.Button, { text: Gp((((_b2 = c.snooze) == null ? void 0 : _b2.duration) ?? 0) / 1e3) }), jsx(re.Content, { children: jsx(re.List, { variant: "single", children: i.map((t) => jsx(re.Item, { onClick: () => {
|
|
8439
8451
|
f(t);
|
|
8440
8452
|
}, children: Gp(t) }, t)) }) })] })] }) : null;
|
|
8441
8453
|
}
|
|
8442
8454
|
function am({ className: n, title: o2, ...i }) {
|
|
8443
|
-
const r2 = E("io-notifications-settings-panel-subscriptions", n), { SubscribeAll: a, SubscribeApp: s, SubscribeMuteAll: c, SubscribeMuteApp: l } = mm(), { sortAppsAlphabetically: u } =
|
|
8455
|
+
const r2 = E("io-notifications-settings-panel-subscriptions", n), { SubscribeAll: a, SubscribeApp: s, SubscribeMuteAll: c, SubscribeMuteApp: l } = mm(), { sortAppsAlphabetically: u } = Dp(), d = Ud(), f = u(), p = "io-notifications-subscriptions-grid " + (d ? "with-three-columns" : "with-two-columns");
|
|
8444
8456
|
return jsx("div", { className: r2, ...i, children: jsxs(T, { title: o2 ?? (d ? "Subscribe & Mute" : "Subscribe"), children: [jsxs("div", { className: p, children: [jsx("p", { className: "io-text-section", children: "Sources" }), jsx("p", { className: "io-text-section", children: "Subscribe" }), d && jsx("p", { className: "io-text-section", children: "Mute" })] }), jsxs("div", { className: p, children: [jsx("p", { children: "All Sources" }), jsx(a, { label: "" }), d && jsx(c, { label: "" })] }), f.map((n2) => {
|
|
8445
8457
|
var _a2;
|
|
8446
8458
|
return !n2 || n2.hidden || ((_a2 = n2 == null ? void 0 : n2.userProperties) == null ? void 0 : _a2.hidden) ? null : jsxs("div", { className: p, children: [jsx("p", { children: n2.title ?? n2.name }), jsx(s, { app: n2, label: "" }), d && jsx(l, { app: n2, label: "" })] }, n2.name);
|
|
8447
8459
|
})] }) });
|
|
8448
8460
|
}
|
|
8449
8461
|
function sm({ label: t = "All apps", align: n = "right", ...o2 }) {
|
|
8450
|
-
var _a2,
|
|
8451
|
-
const { settings: i, configuration: r2, saveAllFilter: s } =
|
|
8462
|
+
var _a2, _b2, _c2, _d2;
|
|
8463
|
+
const { settings: i, configuration: r2, saveAllFilter: s } = _p(), c = Ud() && !i.enabledNotifications, l = useCallback((e) => {
|
|
8452
8464
|
s({ subscribe: e.target.checked });
|
|
8453
8465
|
}, [s]);
|
|
8454
|
-
return jsx(sf, { align: n, label: t, onChange: l, checked: (((
|
|
8466
|
+
return jsx(sf, { align: n, label: t, onChange: l, checked: (((_b2 = (_a2 = r2.sourceFilter) == null ? void 0 : _a2.allowed) == null ? void 0 : _b2.includes("*")) && 0 === ((_d2 = (_c2 = r2.sourceFilter) == null ? void 0 : _c2.blocked) == null ? void 0 : _d2.length)) ?? false, disabled: c, ...o2 });
|
|
8455
8467
|
}
|
|
8456
8468
|
function cm({ label: t = "App", align: n = "right", app: o2, ...i }) {
|
|
8457
|
-
var _a2,
|
|
8458
|
-
const { allApps: r2, settings: s, configuration: c, saveFilter: l } =
|
|
8459
|
-
var _a3,
|
|
8469
|
+
var _a2, _b2, _c2, _d2, _e2, _f2;
|
|
8470
|
+
const { allApps: r2, settings: s, configuration: c, saveFilter: l } = _p(), u = Ud() && !s.enabledNotifications, d = useCallback((e, t2) => {
|
|
8471
|
+
var _a3, _b3, _c3, _d3, _e3, _f3;
|
|
8460
8472
|
const n2 = { ...c.sourceFilter }, o3 = (_a3 = n2.allowed) == null ? void 0 : _a3.indexOf("*");
|
|
8461
|
-
"number" == typeof o3 && o3 > -1 && ((
|
|
8473
|
+
"number" == typeof o3 && o3 > -1 && ((_b3 = n2.allowed) == null ? void 0 : _b3.splice(o3, 1), r2.forEach((e2) => {
|
|
8462
8474
|
var _a4;
|
|
8463
8475
|
e2.name !== t2.name && ((_a4 = n2.allowed) == null ? void 0 : _a4.push(e2.name));
|
|
8464
8476
|
})), e ? (n2.allowed = [.../* @__PURE__ */ new Set([...n2.allowed ?? [], t2.name])], n2.blocked = (_c3 = n2.blocked) == null ? void 0 : _c3.filter((e2) => e2 !== t2.name)) : (n2.allowed = (_d3 = n2.allowed) == null ? void 0 : _d3.filter((e2) => e2 !== t2.name), n2.blocked = [.../* @__PURE__ */ new Set([...n2.blocked ?? [], t2.name])]), ((_e3 = n2.allowed) == null ? void 0 : _e3.length) && ((_f3 = n2.blocked) == null ? void 0 : _f3.includes("*")) && n2.blocked.splice(n2.blocked.indexOf("*"), 1), l(n2);
|
|
8465
8477
|
}, [r2, c.sourceFilter, l]);
|
|
8466
|
-
return jsx(sf, { id: `subscribe-${o2.name}`, label: t, align: n, onChange: (e) => d(e.target.checked, o2), checked: (((
|
|
8478
|
+
return jsx(sf, { id: `subscribe-${o2.name}`, label: t, align: n, onChange: (e) => d(e.target.checked, o2), checked: (((_b2 = (_a2 = c.sourceFilter) == null ? void 0 : _a2.allowed) == null ? void 0 : _b2.includes("*")) && !((_d2 = (_c2 = c.sourceFilter) == null ? void 0 : _c2.blocked) == null ? void 0 : _d2.includes(o2.name)) || ((_f2 = (_e2 = c.sourceFilter) == null ? void 0 : _e2.allowed) == null ? void 0 : _f2.includes(o2.name))) ?? false, disabled: u, ...i });
|
|
8467
8479
|
}
|
|
8468
8480
|
function lm({ label: t = "Mute all", align: n = "right", ...o2 }) {
|
|
8469
|
-
var _a2,
|
|
8470
|
-
const { settings: i, configuration: r2, saveAllFilter: s } =
|
|
8481
|
+
var _a2, _b2, _c2, _d2;
|
|
8482
|
+
const { settings: i, configuration: r2, saveAllFilter: s } = _p(), c = Ud(), l = c && (!i.enabledNotifications || -1 === ((_b2 = (_a2 = r2.sourceFilter) == null ? void 0 : _a2.allowed) == null ? void 0 : _b2.indexOf("*"))), u = useCallback((e) => {
|
|
8471
8483
|
s({ mute: e.target.checked });
|
|
8472
8484
|
}, [s]);
|
|
8473
8485
|
return c ? jsx(sf, { align: n, label: t, onChange: u, checked: ((_d2 = (_c2 = r2.sourceFilter) == null ? void 0 : _c2.muted) == null ? void 0 : _d2.includes("*")) ?? false, disabled: l ?? false, ...o2 }) : null;
|
|
8474
8486
|
}
|
|
8475
8487
|
function um({ label: t = "App", align: n = "right", app: o2, ...i }) {
|
|
8476
|
-
var _a2,
|
|
8477
|
-
const { allApps: r2, settings: s, configuration: c, saveFilter: l } =
|
|
8478
|
-
var _a3,
|
|
8488
|
+
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h, _i2, _j, _k, _l2, _m, _n2, _o2, _p2;
|
|
8489
|
+
const { allApps: r2, settings: s, configuration: c, saveFilter: l } = _p(), u = Ud(), d = u && (!s.enabledNotifications || ((_b2 = (_a2 = c.sourceFilter) == null ? void 0 : _a2.blocked) == null ? void 0 : _b2.includes("*")) || ((_d2 = (_c2 = c.sourceFilter) == null ? void 0 : _c2.blocked) == null ? void 0 : _d2.includes(o2.name)) || 0 === ((_f2 = (_e2 = c.sourceFilter) == null ? void 0 : _e2.allowed) == null ? void 0 : _f2.length) || -1 === ((_h = (_g2 = c.sourceFilter) == null ? void 0 : _g2.allowed) == null ? void 0 : _h.indexOf(o2.name)) && -1 === ((_j = (_i2 = c.sourceFilter) == null ? void 0 : _i2.allowed) == null ? void 0 : _j.indexOf("*")) && 0 === ((_l2 = (_k = c.sourceFilter) == null ? void 0 : _k.blocked) == null ? void 0 : _l2.length)), f = useCallback((e, t2) => {
|
|
8490
|
+
var _a3, _b3, _c3, _d3;
|
|
8479
8491
|
const n2 = { ...c.sourceFilter }, o3 = (_a3 = n2 == null ? void 0 : n2.muted) == null ? void 0 : _a3.indexOf("*");
|
|
8480
|
-
"number" == typeof o3 && o3 > -1 && ((
|
|
8492
|
+
"number" == typeof o3 && o3 > -1 && ((_b3 = n2.muted) == null ? void 0 : _b3.splice(o3, 1), r2.forEach((e2) => {
|
|
8481
8493
|
var _a4;
|
|
8482
8494
|
e2.name === t2.name || e2.hidden || ((_a4 = n2.muted) == null ? void 0 : _a4.push(e2.name));
|
|
8483
8495
|
})), e ? (_c3 = n2.muted) == null ? void 0 : _c3.push(t2.name) : n2.muted = (_d3 = n2.muted) == null ? void 0 : _d3.filter((e2) => e2 !== t2.name), l(n2);
|
|
@@ -8485,21 +8497,22 @@ function um({ label: t = "App", align: n = "right", app: o2, ...i }) {
|
|
|
8485
8497
|
return !u || o2.hidden ? null : jsx(sf, { id: `mute-${o2.name}`, label: t, align: n, onChange: (e) => f(e.target.checked, o2), checked: (((_n2 = (_m = c.sourceFilter) == null ? void 0 : _m.muted) == null ? void 0 : _n2.includes("*")) || ((_p2 = (_o2 = c.sourceFilter) == null ? void 0 : _o2.muted) == null ? void 0 : _p2.includes(o2.name))) ?? false, disabled: d ?? false, ...i });
|
|
8486
8498
|
}
|
|
8487
8499
|
const dm = { Body: (n) => {
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8500
|
+
var _a2;
|
|
8501
|
+
const { General: o2, Placement: i, Stacking: r2, Snooze: a, Subscriptions: s } = mm(), { settings: c } = _p(), l = [{ key: "general", Component: o2 }, { key: "stacking", Component: r2 }, { key: "placement", Component: i }, ...Ud() && !!((_a2 = c.snooze) == null ? void 0 : _a2.enabled) ? [{ key: "snooze", Component: a }] : [], { key: "subscriptions", Component: s }];
|
|
8502
|
+
return jsx(Od, { element: Us, elementProps: n, children: l.map(({ key: n2, Component: o3 }, i2) => jsxs(Fragment$1, { children: [jsx(o3, {}), i2 < l.length - 1 && jsx(J, {})] }, n2)) });
|
|
8503
|
+
}, General: jp, AllowNotifications: zp, AllowNotificationToasts: Hp, ShowNotificationBadge: Wp, CloseNotificationOnClick: Vp, PanelAutoHide: Up, HideToastsAfter: qp, Stacking: Jp, ToastStacking: Yp, ToastStackBy: Zp, Placement: em, PlacementPanel: nm, PlacementToasts: om, Snooze: im, SnoozeDuration: rm, Subscriptions: am, SubscribeAll: sm, SubscribeApp: cm, SubscribeMuteAll: lm, SubscribeMuteApp: um }, fm = createContext(dm), pm = memo(({ children: t, components: n }) => {
|
|
8491
8504
|
const o2 = useMemo(() => ({ ...dm, ...n }), [n]);
|
|
8492
8505
|
return jsx(fm.Provider, { value: o2, children: t });
|
|
8493
8506
|
});
|
|
8494
8507
|
pm.displayName = "NotificationsSettingsPanelComponentsStoreProvider";
|
|
8495
|
-
const mm = () => useContext(fm), ym = ({ name: n, value: o2 }) => jsxs("div", { className: "io-profile-section-item", children: [jsx("div", { className: "io-profile-section-item-name", children: n }), jsx("div", { className: "io-profile-section-item-value", children: o2 })] }), vm = ({ className: n, items: o2, title: i }) => jsxs("div", { className: E("io-profile-section-body", n), children: [i && jsx(D, { className: "io-profile-section-title", text: i }), o2.map(({ name: t, value: n2 }) => jsx(ym, { name: t, value: n2 }, t))] }),
|
|
8508
|
+
const mm = () => useContext(fm), ym = ({ name: n, value: o2 }) => jsxs("div", { className: "io-profile-section-item", children: [jsx("div", { className: "io-profile-section-item-name", children: n }), jsx("div", { className: "io-profile-section-item-value", children: o2 })] }), vm = ({ className: n, items: o2, title: i }) => jsxs("div", { className: E("io-profile-section-body", n), children: [i && jsx(D, { className: "io-profile-section-title", text: i }), o2.map(({ name: t, value: n2 }) => jsx(ym, { name: t, value: n2 }, t))] }), bm = ({ className: n, items: o2, title: i }) => jsxs("section", { className: E("io-profile-section", n), children: [jsx(vm, { items: o2, title: i }), jsx(J, { className: "mt-8" })] }), wm = ({ title: t = "License", ...n }) => jsx(bm, { title: t, ...n }), km = ({ title: t = "Version", ...n }) => jsx(bm, { title: t, ...n }), xm = ({ title: t = "Plugins", ...n }) => jsx(bm, { title: t, ...n }), Cm = ({ className: n }) => {
|
|
8496
8509
|
const o2 = Or() ? "io.Connect Desktop" : "io.Connect Browser";
|
|
8497
8510
|
return jsxs("div", { className: E("io-trademark-container", n), children: [jsx("h4", { className: "io-trademark-title", children: o2 }), jsxs("p", { className: "io-trademark-text", children: [o2, "® is a registered trademark of", " ", jsx("a", { href: "https://www.interop.io", rel: "noreferrer", target: "_blank", children: "Interop Inc©" }), " ", (/* @__PURE__ */ new Date()).getFullYear(), ". All rights reserved."] })] });
|
|
8498
|
-
},
|
|
8511
|
+
}, Sm = ({ avatarInitials: n = Or() ? "CD" : "CB", className: o2, items: i, onLogout: r2, title: a }) => jsxs("section", { className: E("io-profile-section", o2), children: [jsxs("div", { className: "io-user-details-container", children: [jsx("div", { className: "io-user-avatar", children: n }), jsx(vm, { className: "mt-12", items: i, title: a })] }), r2 && jsx($, { className: "io-log-out-button", onClick: r2, variant: "primary", icon: "arrow-right-from-bracket", children: "Log out" }), jsx(J, { className: "mt-8" })] }), Nm = { LicenseSection: wm, ProductsInfoSection: km, PluginsSection: xm, Trademark: Cm, UserSection: Sm }, Em = createContext(Nm), Pm = memo(({ children: t, components: n }) => {
|
|
8499
8512
|
const o2 = useMemo(() => ({ ...Nm, ...n }), [n]);
|
|
8500
8513
|
return jsx(Em.Provider, { value: o2, children: t });
|
|
8501
8514
|
});
|
|
8502
|
-
|
|
8515
|
+
Pm.displayName = "ProfilePanelComponentsStoreProvider";
|
|
8503
8516
|
document.querySelector("#root") ?? document.body;
|
|
8504
8517
|
createContext({ theme: "dark" });
|
|
8505
8518
|
const Jm = "var(--io-neutrals-0)", Ym = "var(--io-neutrals-900)";
|
|
@@ -8531,7 +8544,7 @@ function Qm({ className: t, channel: n, ...o2 }) {
|
|
|
8531
8544
|
return jsx("div", { className: i, style: { color: r2, backgroundColor: n.color }, "data-testid": `channel-selector-badge-${n.color}`, ...o2, children: jsx("span", { className: "io-channel-selector-badge-label", "data-testid": "channel-selector-label", children: n.label }) });
|
|
8532
8545
|
}
|
|
8533
8546
|
function Zm() {
|
|
8534
|
-
return jsx(
|
|
8547
|
+
return jsx(P, { variant: "check", "data-testid": "channel-selector-channel-selected" });
|
|
8535
8548
|
}
|
|
8536
8549
|
function eh({ channel: o2, handleChannelRestricted: i, lockedChannelRestriction: r2 }) {
|
|
8537
8550
|
const a = (e, t) => (n) => {
|
|
@@ -8616,15 +8629,15 @@ function dh({ actionButtons: n, children: o2, onCompletion: i, size: r2, title:
|
|
|
8616
8629
|
} }) })] });
|
|
8617
8630
|
}
|
|
8618
8631
|
function fh({ children: t }) {
|
|
8619
|
-
return jsx("
|
|
8632
|
+
return jsx("h1", { "data-testid": "io-dialog-heading", className: "io-dialog-template-heading", children: t });
|
|
8620
8633
|
}
|
|
8621
8634
|
function ph({ onCompletion: n, size: o2, variables: i }) {
|
|
8622
8635
|
const { actionButtons: r2, heading: a, text: s, title: c } = i;
|
|
8623
|
-
return jsx(dh, { actionButtons: r2, onCompletion: n, size: o2, title: c, children: jsxs("div", { children: [jsx(fh, { children: a }), jsx("p", { "data-testid": "io-dialog-text", children: s })] }) });
|
|
8636
|
+
return jsx(dh, { actionButtons: r2, onCompletion: n, size: o2, title: c, children: jsx(fe.Body.Content, { children: jsxs("div", { children: [jsx(fh, { children: a }), jsx("p", { "data-testid": "io-dialog-text", children: s })] }) }) });
|
|
8624
8637
|
}
|
|
8625
8638
|
function mh({ onCompletion: n, size: o2, variables: i }) {
|
|
8626
8639
|
const { actionButtons: r2, checkbox: s, heading: c, text: u, title: d } = i, [f, p] = useState(s.initialValue), m = useCallback(() => p((e) => !e), []), h = [{ id: s.id, type: "checkbox", checked: f }];
|
|
8627
|
-
return jsxs(dh, { actionButtons: r2, onCompletion: (e) => n({ ...e, inputs: h }), size: o2, title: d, children: [jsxs("div", { children: [jsx(fh, { children: c }), jsx("p", { "data-testid": "io-dialog-text", children: u })] }), jsx(jd, { "data-testid": `io-dialog-checkbox-${s.id}`, checked: f, id: s.id, label: s.label, name: s.id, onChange: m })] });
|
|
8640
|
+
return jsxs(dh, { actionButtons: r2, onCompletion: (e) => n({ ...e, inputs: h }), size: o2, title: d, children: [jsx(fe.Body.Content, { children: jsxs("div", { children: [jsx(fh, { children: c }), jsx("p", { "data-testid": "io-dialog-text", children: u })] }) }), jsx(jd, { "data-testid": `io-dialog-checkbox-${s.id}`, checked: f, id: s.id, label: s.label, name: s.id, onChange: m })] });
|
|
8628
8641
|
}
|
|
8629
8642
|
function hh({ onCompletion: n, size: o2, variables: i }) {
|
|
8630
8643
|
const { actionButtons: r2, heading: a, input: s, title: c } = i, [u, f] = useState(s.initialValue ?? ""), p = useRef(null), h = (g = u, !(y = s.validation) || new RegExp(y.regexPattern).test(g) ? null : { disabledButtonIds: y.disabledButtonIds, message: y.errorMessage });
|
|
@@ -8633,13 +8646,13 @@ function hh({ onCompletion: n, size: o2, variables: i }) {
|
|
|
8633
8646
|
return useLayoutEffect(() => {
|
|
8634
8647
|
var _a2;
|
|
8635
8648
|
(_a2 = p.current) == null ? void 0 : _a2.select();
|
|
8636
|
-
}, []), jsxs(dh, { actionButtons: r2, onCompletion: (e) => n({ ...e, inputs: v }), size: o2, title: c, validationErrors: h ? [h] : [], children: [jsx(fh, { children: a }), jsx($d, { "data-testid": `io-dialog-input-${s.id}`, ref: p, errorDataTestId: `io-dialog-input-${s.id}-error-message`, errorMessage: h == null ? void 0 : h.message, id: s.id, label: s.label, name: s.id, onChange: (e) => f(e.target.value), placeholder: s.placeholder, type: "text", value: u })] });
|
|
8649
|
+
}, []), jsxs(dh, { actionButtons: r2, onCompletion: (e) => n({ ...e, inputs: v }), size: o2, title: c, validationErrors: h ? [h] : [], children: [jsx(fe.Body.Content, { children: jsx(fh, { children: a }) }), jsx($d, { "data-testid": `io-dialog-input-${s.id}`, ref: p, errorDataTestId: `io-dialog-input-${s.id}-error-message`, errorMessage: h == null ? void 0 : h.message, id: s.id, label: s.label, name: s.id, onChange: (e) => f(e.target.value), placeholder: s.placeholder, type: "text", value: u })] });
|
|
8637
8650
|
}
|
|
8638
8651
|
const gh = ua({ width: ga, height: ga }), yh = ca().andThen((e) => ((e2, t) => {
|
|
8639
8652
|
const n = typeof e2;
|
|
8640
8653
|
return "function" === n ? ca() : ma(`The argument provided as "${t}" must be a function, received: ${n}`);
|
|
8641
|
-
})(e, "onCompletion")), vh = ua({ autofocus: fa(sa()), id: ha, text: ha, variant: pa(la("default"), la("primary"), la("critical"), la("outline"), la("link")) }),
|
|
8642
|
-
[{ name: "noInputsConfirmationDialog", Dialog: ph, validate: kh.runWithException }, { name: "singleCheckboxDialog", Dialog: mh, validate:
|
|
8654
|
+
})(e, "onCompletion")), vh = ua({ autofocus: fa(sa()), id: ha, text: ha, variant: pa(la("default"), la("primary"), la("critical"), la("outline"), la("link")) }), bh = ua({ disabledButtonIds: da(ha), errorMessage: ha, regexPattern: ha }), wh = ua({ actionButtons: da(vh), heading: ra(), text: ra(), title: fa(ra()) }), kh = ua({ templateName: la("noInputsConfirmationDialog"), onCompletion: yh, size: fa(gh), variables: wh }), xh = ua({ actionButtons: da(vh), checkbox: ua({ id: ha, initialValue: fa(sa()), label: fa(ra()) }), heading: ra(), text: ra(), title: fa(ra()) }), Ch = ua({ templateName: la("singleCheckboxDialog"), onCompletion: yh, size: fa(gh), variables: xh }), Sh = ua({ actionButtons: da(vh), heading: ra(), input: ua({ id: ha, initialValue: fa(ra()), label: fa(ra()), placeholder: fa(ra()), validation: fa(bh) }), title: fa(ra()) }), Nh = ua({ templateName: la("singleTextInputDialog"), onCompletion: yh, size: fa(gh), variables: Sh });
|
|
8655
|
+
[{ name: "noInputsConfirmationDialog", Dialog: ph, validate: kh.runWithException }, { name: "singleCheckboxDialog", Dialog: mh, validate: Ch.runWithException }, { name: "singleTextInputDialog", Dialog: hh, validate: Nh.runWithException }];
|
|
8643
8656
|
createContext({ config: { message: "" }, theme: "dark", setResult: () => {
|
|
8644
8657
|
} });
|
|
8645
8658
|
const jh = { env: "", region: "", version: "", buildVersion: "", theme: "", isError: false, mailingList: "", createJiraTicket: true, sendEmail: false, attachments: [], applicationTitle: "", allowEditRecipients: true, attachmentsViewMode: "category", environmentInfo: "", selectedCategories: [], errorMessage: "", showEnvironmentInfo: false, context: {}, technicalInfo: "", sendEmailClient: "Outlook" };
|
|
@@ -8728,7 +8741,7 @@ function ug(e) {
|
|
|
8728
8741
|
return { ...useContext(cg), ...e };
|
|
8729
8742
|
}
|
|
8730
8743
|
lg.displayName = "ComponentsStore";
|
|
8731
|
-
var Eg,
|
|
8744
|
+
var Eg, Pg = { exports: {} }, Ig = { exports: {} }, Ag = {};
|
|
8732
8745
|
var Og, Lg, Dg, Tg, Rg, Bg, Mg, Fg, $g, _g, jg, zg, Hg, Wg, Vg = {};
|
|
8733
8746
|
/** @license React v16.13.1
|
|
8734
8747
|
* react-is.development.js
|
|
@@ -8739,12 +8752,12 @@ var Og, Lg, Dg, Tg, Rg, Bg, Mg, Fg, $g, _g, jg, zg, Hg, Wg, Vg = {};
|
|
|
8739
8752
|
* LICENSE file in the root directory of this source tree.
|
|
8740
8753
|
*/
|
|
8741
8754
|
function Ug() {
|
|
8742
|
-
return Lg || (Lg = 1, "production" === process.env.NODE_ENV ?
|
|
8755
|
+
return Lg || (Lg = 1, "production" === process.env.NODE_ENV ? Ig.exports = function() {
|
|
8743
8756
|
if (Eg)
|
|
8744
8757
|
return Ag;
|
|
8745
8758
|
Eg = 1;
|
|
8746
8759
|
var e = "function" == typeof Symbol && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o2 = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, r2 = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, d = e ? Symbol.for("react.suspense") : 60113, f = e ? Symbol.for("react.suspense_list") : 60120, p = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, h = e ? Symbol.for("react.block") : 60121, g = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, v = e ? Symbol.for("react.scope") : 60119;
|
|
8747
|
-
function
|
|
8760
|
+
function b(e2) {
|
|
8748
8761
|
if ("object" == typeof e2 && null !== e2) {
|
|
8749
8762
|
var f2 = e2.$$typeof;
|
|
8750
8763
|
switch (f2) {
|
|
@@ -8774,39 +8787,39 @@ function Ug() {
|
|
|
8774
8787
|
}
|
|
8775
8788
|
}
|
|
8776
8789
|
}
|
|
8777
|
-
function
|
|
8778
|
-
return
|
|
8790
|
+
function w2(e2) {
|
|
8791
|
+
return b(e2) === l;
|
|
8779
8792
|
}
|
|
8780
8793
|
return Ag.AsyncMode = c, Ag.ConcurrentMode = l, Ag.ContextConsumer = s, Ag.ContextProvider = a, Ag.Element = t, Ag.ForwardRef = u, Ag.Fragment = o2, Ag.Lazy = m, Ag.Memo = p, Ag.Portal = n, Ag.Profiler = r2, Ag.StrictMode = i, Ag.Suspense = d, Ag.isAsyncMode = function(e2) {
|
|
8781
|
-
return
|
|
8782
|
-
}, Ag.isConcurrentMode =
|
|
8783
|
-
return
|
|
8794
|
+
return w2(e2) || b(e2) === c;
|
|
8795
|
+
}, Ag.isConcurrentMode = w2, Ag.isContextConsumer = function(e2) {
|
|
8796
|
+
return b(e2) === s;
|
|
8784
8797
|
}, Ag.isContextProvider = function(e2) {
|
|
8785
|
-
return
|
|
8798
|
+
return b(e2) === a;
|
|
8786
8799
|
}, Ag.isElement = function(e2) {
|
|
8787
8800
|
return "object" == typeof e2 && null !== e2 && e2.$$typeof === t;
|
|
8788
8801
|
}, Ag.isForwardRef = function(e2) {
|
|
8789
|
-
return
|
|
8802
|
+
return b(e2) === u;
|
|
8790
8803
|
}, Ag.isFragment = function(e2) {
|
|
8791
|
-
return
|
|
8804
|
+
return b(e2) === o2;
|
|
8792
8805
|
}, Ag.isLazy = function(e2) {
|
|
8793
|
-
return
|
|
8806
|
+
return b(e2) === m;
|
|
8794
8807
|
}, Ag.isMemo = function(e2) {
|
|
8795
|
-
return
|
|
8808
|
+
return b(e2) === p;
|
|
8796
8809
|
}, Ag.isPortal = function(e2) {
|
|
8797
|
-
return
|
|
8810
|
+
return b(e2) === n;
|
|
8798
8811
|
}, Ag.isProfiler = function(e2) {
|
|
8799
|
-
return
|
|
8812
|
+
return b(e2) === r2;
|
|
8800
8813
|
}, Ag.isStrictMode = function(e2) {
|
|
8801
|
-
return
|
|
8814
|
+
return b(e2) === i;
|
|
8802
8815
|
}, Ag.isSuspense = function(e2) {
|
|
8803
|
-
return
|
|
8816
|
+
return b(e2) === d;
|
|
8804
8817
|
}, Ag.isValidElementType = function(e2) {
|
|
8805
8818
|
return "string" == typeof e2 || "function" == typeof e2 || e2 === o2 || e2 === l || e2 === r2 || e2 === i || e2 === d || e2 === f || "object" == typeof e2 && null !== e2 && (e2.$$typeof === m || e2.$$typeof === p || e2.$$typeof === a || e2.$$typeof === s || e2.$$typeof === u || e2.$$typeof === g || e2.$$typeof === y || e2.$$typeof === v || e2.$$typeof === h);
|
|
8806
|
-
}, Ag.typeOf =
|
|
8807
|
-
}() :
|
|
8819
|
+
}, Ag.typeOf = b, Ag;
|
|
8820
|
+
}() : Ig.exports = (Og || (Og = 1, "production" !== process.env.NODE_ENV && function() {
|
|
8808
8821
|
var e = "function" == typeof Symbol && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, o2 = e ? Symbol.for("react.fragment") : 60107, i = e ? Symbol.for("react.strict_mode") : 60108, r2 = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, s = e ? Symbol.for("react.context") : 60110, c = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, d = e ? Symbol.for("react.suspense") : 60113, f = e ? Symbol.for("react.suspense_list") : 60120, p = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, h = e ? Symbol.for("react.block") : 60121, g = e ? Symbol.for("react.fundamental") : 60117, y = e ? Symbol.for("react.responder") : 60118, v = e ? Symbol.for("react.scope") : 60119;
|
|
8809
|
-
function
|
|
8822
|
+
function b(e2) {
|
|
8810
8823
|
if ("object" == typeof e2 && null !== e2) {
|
|
8811
8824
|
var f2 = e2.$$typeof;
|
|
8812
8825
|
switch (f2) {
|
|
@@ -8838,38 +8851,38 @@ function Ug() {
|
|
|
8838
8851
|
}
|
|
8839
8852
|
}
|
|
8840
8853
|
}
|
|
8841
|
-
var
|
|
8854
|
+
var w2 = c, k = l, x = s, C2 = a, S2 = t, N2 = u, E2 = o2, P2 = m, I2 = p, A = n, O = r2, L2 = i, D2 = d, T2 = false;
|
|
8842
8855
|
function R2(e2) {
|
|
8843
|
-
return
|
|
8856
|
+
return b(e2) === l;
|
|
8844
8857
|
}
|
|
8845
|
-
Vg.AsyncMode =
|
|
8846
|
-
return T2 || (T2 = true, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), R2(e2) ||
|
|
8858
|
+
Vg.AsyncMode = w2, Vg.ConcurrentMode = k, Vg.ContextConsumer = x, Vg.ContextProvider = C2, Vg.Element = S2, Vg.ForwardRef = N2, Vg.Fragment = E2, Vg.Lazy = P2, Vg.Memo = I2, Vg.Portal = A, Vg.Profiler = O, Vg.StrictMode = L2, Vg.Suspense = D2, Vg.isAsyncMode = function(e2) {
|
|
8859
|
+
return T2 || (T2 = true, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), R2(e2) || b(e2) === c;
|
|
8847
8860
|
}, Vg.isConcurrentMode = R2, Vg.isContextConsumer = function(e2) {
|
|
8848
|
-
return
|
|
8861
|
+
return b(e2) === s;
|
|
8849
8862
|
}, Vg.isContextProvider = function(e2) {
|
|
8850
|
-
return
|
|
8863
|
+
return b(e2) === a;
|
|
8851
8864
|
}, Vg.isElement = function(e2) {
|
|
8852
8865
|
return "object" == typeof e2 && null !== e2 && e2.$$typeof === t;
|
|
8853
8866
|
}, Vg.isForwardRef = function(e2) {
|
|
8854
|
-
return
|
|
8867
|
+
return b(e2) === u;
|
|
8855
8868
|
}, Vg.isFragment = function(e2) {
|
|
8856
|
-
return
|
|
8869
|
+
return b(e2) === o2;
|
|
8857
8870
|
}, Vg.isLazy = function(e2) {
|
|
8858
|
-
return
|
|
8871
|
+
return b(e2) === m;
|
|
8859
8872
|
}, Vg.isMemo = function(e2) {
|
|
8860
|
-
return
|
|
8873
|
+
return b(e2) === p;
|
|
8861
8874
|
}, Vg.isPortal = function(e2) {
|
|
8862
|
-
return
|
|
8875
|
+
return b(e2) === n;
|
|
8863
8876
|
}, Vg.isProfiler = function(e2) {
|
|
8864
|
-
return
|
|
8877
|
+
return b(e2) === r2;
|
|
8865
8878
|
}, Vg.isStrictMode = function(e2) {
|
|
8866
|
-
return
|
|
8879
|
+
return b(e2) === i;
|
|
8867
8880
|
}, Vg.isSuspense = function(e2) {
|
|
8868
|
-
return
|
|
8881
|
+
return b(e2) === d;
|
|
8869
8882
|
}, Vg.isValidElementType = function(e2) {
|
|
8870
8883
|
return "string" == typeof e2 || "function" == typeof e2 || e2 === o2 || e2 === l || e2 === r2 || e2 === i || e2 === d || e2 === f || "object" == typeof e2 && null !== e2 && (e2.$$typeof === m || e2.$$typeof === p || e2.$$typeof === a || e2.$$typeof === s || e2.$$typeof === u || e2.$$typeof === g || e2.$$typeof === y || e2.$$typeof === v || e2.$$typeof === h);
|
|
8871
|
-
}, Vg.typeOf =
|
|
8872
|
-
}()), Vg)),
|
|
8884
|
+
}, Vg.typeOf = b;
|
|
8885
|
+
}()), Vg)), Ig.exports;
|
|
8873
8886
|
}
|
|
8874
8887
|
/*
|
|
8875
8888
|
object-assign
|
|
@@ -8930,7 +8943,7 @@ function qg() {
|
|
|
8930
8943
|
}
|
|
8931
8944
|
if ("production" !== process.env.NODE_ENV) {
|
|
8932
8945
|
var Jg = Ug();
|
|
8933
|
-
|
|
8946
|
+
Pg.exports = function() {
|
|
8934
8947
|
if (zg)
|
|
8935
8948
|
return jg;
|
|
8936
8949
|
zg = 1;
|
|
@@ -9041,7 +9054,7 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
9041
9054
|
if (f(a2, e2[s2]))
|
|
9042
9055
|
return null;
|
|
9043
9056
|
var c2 = JSON.stringify(e2, function(e3, t3) {
|
|
9044
|
-
return "symbol" ===
|
|
9057
|
+
return "symbol" === b(t3) ? String(t3) : t3;
|
|
9045
9058
|
});
|
|
9046
9059
|
return new p("Invalid " + i2 + " `" + r3 + "` of value `" + String(a2) + "` supplied to `" + o3 + "`, expected one of " + c2 + ".");
|
|
9047
9060
|
}) : ("production" !== process.env.NODE_ENV && r2(arguments.length > 1 ? "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])." : "Invalid argument supplied to oneOf, expected an array."), a);
|
|
@@ -9051,7 +9064,7 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
9051
9064
|
for (var t2 = 0; t2 < e2.length; t2++) {
|
|
9052
9065
|
var i2 = e2[t2];
|
|
9053
9066
|
if ("function" != typeof i2)
|
|
9054
|
-
return r2("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
9067
|
+
return r2("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + w2(i2) + " at index " + t2 + "."), a;
|
|
9055
9068
|
}
|
|
9056
9069
|
return m(function(t3, i3, r3, a2, s2) {
|
|
9057
9070
|
for (var c2 = [], l2 = 0; l2 < e2.length; l2++) {
|
|
@@ -9070,7 +9083,7 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
9070
9083
|
for (var l2 in e2) {
|
|
9071
9084
|
var u2 = e2[l2];
|
|
9072
9085
|
if ("function" != typeof u2)
|
|
9073
|
-
return g(i2, r3, a2, l2,
|
|
9086
|
+
return g(i2, r3, a2, l2, b(u2));
|
|
9074
9087
|
var d2 = u2(s2, l2, i2, r3, a2 + "." + l2, n);
|
|
9075
9088
|
if (d2)
|
|
9076
9089
|
return d2;
|
|
@@ -9086,7 +9099,7 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
9086
9099
|
for (var f2 in d2) {
|
|
9087
9100
|
var m2 = e2[f2];
|
|
9088
9101
|
if (o2(e2, f2) && "function" != typeof m2)
|
|
9089
|
-
return g(a2, s2, c2, f2,
|
|
9102
|
+
return g(a2, s2, c2, f2, b(m2));
|
|
9090
9103
|
if (!m2)
|
|
9091
9104
|
return new p("Invalid " + s2 + " `" + c2 + "` key `" + f2 + "` supplied to `" + a2 + "`.\nBad object: " + JSON.stringify(i2[r3], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(e2), null, " "));
|
|
9092
9105
|
var h2 = m2(l2, f2, a2, s2, c2 + "." + f2, n);
|
|
@@ -9124,7 +9137,7 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
9124
9137
|
function h(e2) {
|
|
9125
9138
|
return m(function(t2, n2, o3, i2, r3, a2) {
|
|
9126
9139
|
var s2 = t2[n2];
|
|
9127
|
-
return v(s2) !== e2 ? new p("Invalid " + i2 + " `" + r3 + "` of type `" +
|
|
9140
|
+
return v(s2) !== e2 ? new p("Invalid " + i2 + " `" + r3 + "` of type `" + b(s2) + "` supplied to `" + o3 + "`, expected `" + e2 + "`.", { expectedType: e2 }) : null;
|
|
9128
9141
|
});
|
|
9129
9142
|
}
|
|
9130
9143
|
function g(e2, t2, n2, o3, i2) {
|
|
@@ -9172,7 +9185,7 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
9172
9185
|
return "symbol" === e3 || !!t3 && ("Symbol" === t3["@@toStringTag"] || "function" == typeof Symbol && t3 instanceof Symbol);
|
|
9173
9186
|
}(t2, e2) ? "symbol" : t2;
|
|
9174
9187
|
}
|
|
9175
|
-
function
|
|
9188
|
+
function b(e2) {
|
|
9176
9189
|
if (null == e2)
|
|
9177
9190
|
return "" + e2;
|
|
9178
9191
|
var t2 = v(e2);
|
|
@@ -9184,8 +9197,8 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
9184
9197
|
}
|
|
9185
9198
|
return t2;
|
|
9186
9199
|
}
|
|
9187
|
-
function
|
|
9188
|
-
var t2 =
|
|
9200
|
+
function w2(e2) {
|
|
9201
|
+
var t2 = b(e2);
|
|
9189
9202
|
switch (t2) {
|
|
9190
9203
|
case "array":
|
|
9191
9204
|
case "object":
|
|
@@ -9202,7 +9215,7 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
9202
9215
|
}, jg;
|
|
9203
9216
|
}()(Jg.isElement, true);
|
|
9204
9217
|
} else
|
|
9205
|
-
|
|
9218
|
+
Pg.exports = function() {
|
|
9206
9219
|
if (Wg)
|
|
9207
9220
|
return Hg;
|
|
9208
9221
|
Wg = 1;
|
|
@@ -9226,7 +9239,7 @@ if ("production" !== process.env.NODE_ENV) {
|
|
|
9226
9239
|
return r2.PropTypes = r2, r2;
|
|
9227
9240
|
}, Hg;
|
|
9228
9241
|
}()();
|
|
9229
|
-
var Yg =
|
|
9242
|
+
var Yg = C(Pg.exports);
|
|
9230
9243
|
function Xg(e) {
|
|
9231
9244
|
return Xg = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e2) {
|
|
9232
9245
|
return typeof e2;
|
|
@@ -9255,12 +9268,12 @@ function py(e, t) {
|
|
|
9255
9268
|
}
|
|
9256
9269
|
var my = false, hy = "production" !== process.env.NODE_ENV ? Yg.oneOfType([Yg.number, Yg.shape({ enter: Yg.number, exit: Yg.number, appear: Yg.number }).isRequired]) : null;
|
|
9257
9270
|
"production" !== process.env.NODE_ENV && Yg.oneOfType([Yg.string, Yg.shape({ enter: Yg.string, exit: Yg.string, active: Yg.string }), Yg.shape({ enter: Yg.string, enterDone: Yg.string, enterActive: Yg.string, exit: Yg.string, exitDone: Yg.string, exitActive: Yg.string })]);
|
|
9258
|
-
var gy = o__default.createContext(null), yy = "unmounted", vy = "exited",
|
|
9271
|
+
var gy = o__default.createContext(null), yy = "unmounted", vy = "exited", by = "entering", wy = "entered", ky = "exiting", xy = function(e) {
|
|
9259
9272
|
function t(t2, n2) {
|
|
9260
9273
|
var o2;
|
|
9261
9274
|
o2 = e.call(this, t2, n2) || this;
|
|
9262
9275
|
var i, r2 = n2 && !n2.isMounting ? t2.enter : t2.appear;
|
|
9263
|
-
return o2.appearStatus = null, t2.in ? r2 ? (i = vy, o2.appearStatus =
|
|
9276
|
+
return o2.appearStatus = null, t2.in ? r2 ? (i = vy, o2.appearStatus = by) : i = wy : i = t2.unmountOnExit || t2.mountOnEnter ? yy : vy, o2.state = { status: i }, o2.nextCallback = null, o2;
|
|
9264
9277
|
}
|
|
9265
9278
|
!function(e2, t2) {
|
|
9266
9279
|
e2.prototype = Object.create(t2.prototype), e2.prototype.constructor = e2, py(e2, t2);
|
|
@@ -9274,7 +9287,7 @@ var gy = o__default.createContext(null), yy = "unmounted", vy = "exited", wy = "
|
|
|
9274
9287
|
var t2 = null;
|
|
9275
9288
|
if (e2 !== this.props) {
|
|
9276
9289
|
var n2 = this.state.status;
|
|
9277
|
-
this.props.in ? n2 !==
|
|
9290
|
+
this.props.in ? n2 !== by && n2 !== wy && (t2 = by) : n2 !== by && n2 !== wy || (t2 = ky);
|
|
9278
9291
|
}
|
|
9279
9292
|
this.updateStatus(false, t2);
|
|
9280
9293
|
}, n.componentWillUnmount = function() {
|
|
@@ -9284,9 +9297,9 @@ var gy = o__default.createContext(null), yy = "unmounted", vy = "exited", wy = "
|
|
|
9284
9297
|
return e2 = t2 = n2 = o2, null != o2 && "number" != typeof o2 && (e2 = o2.exit, t2 = o2.enter, n2 = void 0 !== o2.appear ? o2.appear : t2), { exit: e2, enter: t2, appear: n2 };
|
|
9285
9298
|
}, n.updateStatus = function(e2, t2) {
|
|
9286
9299
|
if (void 0 === e2 && (e2 = false), null !== t2)
|
|
9287
|
-
if (this.cancelNextCallback(), t2 ===
|
|
9300
|
+
if (this.cancelNextCallback(), t2 === by) {
|
|
9288
9301
|
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
9289
|
-
var n2 = this.props.nodeRef ? this.props.nodeRef.current :
|
|
9302
|
+
var n2 = this.props.nodeRef ? this.props.nodeRef.current : w__default.findDOMNode(this);
|
|
9290
9303
|
n2 && function(e3) {
|
|
9291
9304
|
e3.scrollTop;
|
|
9292
9305
|
}(n2);
|
|
@@ -9297,18 +9310,18 @@ var gy = o__default.createContext(null), yy = "unmounted", vy = "exited", wy = "
|
|
|
9297
9310
|
else
|
|
9298
9311
|
this.props.unmountOnExit && this.state.status === vy && this.setState({ status: yy });
|
|
9299
9312
|
}, n.performEnter = function(e2) {
|
|
9300
|
-
var t2 = this, n2 = this.props.enter, o2 = this.context ? this.context.isMounting : e2, i = this.props.nodeRef ? [o2] : [
|
|
9301
|
-
!e2 && !n2 || my ? this.safeSetState({ status:
|
|
9313
|
+
var t2 = this, n2 = this.props.enter, o2 = this.context ? this.context.isMounting : e2, i = this.props.nodeRef ? [o2] : [w__default.findDOMNode(this), o2], r2 = i[0], a = i[1], s = this.getTimeouts(), c = o2 ? s.appear : s.enter;
|
|
9314
|
+
!e2 && !n2 || my ? this.safeSetState({ status: wy }, function() {
|
|
9302
9315
|
t2.props.onEntered(r2);
|
|
9303
|
-
}) : (this.props.onEnter(r2, a), this.safeSetState({ status:
|
|
9316
|
+
}) : (this.props.onEnter(r2, a), this.safeSetState({ status: by }, function() {
|
|
9304
9317
|
t2.props.onEntering(r2, a), t2.onTransitionEnd(c, function() {
|
|
9305
|
-
t2.safeSetState({ status:
|
|
9318
|
+
t2.safeSetState({ status: wy }, function() {
|
|
9306
9319
|
t2.props.onEntered(r2, a);
|
|
9307
9320
|
});
|
|
9308
9321
|
});
|
|
9309
9322
|
}));
|
|
9310
9323
|
}, n.performExit = function() {
|
|
9311
|
-
var e2 = this, t2 = this.props.exit, n2 = this.getTimeouts(), o2 = this.props.nodeRef ? void 0 :
|
|
9324
|
+
var e2 = this, t2 = this.props.exit, n2 = this.getTimeouts(), o2 = this.props.nodeRef ? void 0 : w__default.findDOMNode(this);
|
|
9312
9325
|
t2 && !my ? (this.props.onExit(o2), this.safeSetState({ status: ky }, function() {
|
|
9313
9326
|
e2.props.onExiting(o2), e2.onTransitionEnd(n2.exit, function() {
|
|
9314
9327
|
e2.safeSetState({ status: vy }, function() {
|
|
@@ -9331,7 +9344,7 @@ var gy = o__default.createContext(null), yy = "unmounted", vy = "exited", wy = "
|
|
|
9331
9344
|
}, this.nextCallback;
|
|
9332
9345
|
}, n.onTransitionEnd = function(e2, t2) {
|
|
9333
9346
|
this.setNextCallback(t2);
|
|
9334
|
-
var n2 = this.props.nodeRef ? this.props.nodeRef.current :
|
|
9347
|
+
var n2 = this.props.nodeRef ? this.props.nodeRef.current : w__default.findDOMNode(this), o2 = null == e2 && !this.props.addEndListener;
|
|
9335
9348
|
if (n2 && !o2) {
|
|
9336
9349
|
if (this.props.addEndListener) {
|
|
9337
9350
|
var i = this.props.nodeRef ? [this.nextCallback] : [n2, this.nextCallback], r2 = i[0], a = i[1];
|
|
@@ -9361,14 +9374,14 @@ var gy = o__default.createContext(null), yy = "unmounted", vy = "exited", wy = "
|
|
|
9361
9374
|
return o__default.createElement(gy.Provider, { value: null }, "function" == typeof n2 ? n2(e2, o2) : o__default.cloneElement(o__default.Children.only(n2), o2));
|
|
9362
9375
|
}, t;
|
|
9363
9376
|
}(o__default.Component);
|
|
9364
|
-
function
|
|
9377
|
+
function Cy() {
|
|
9365
9378
|
}
|
|
9366
|
-
function
|
|
9367
|
-
return
|
|
9379
|
+
function Sy(e) {
|
|
9380
|
+
return Sy = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e2) {
|
|
9368
9381
|
return typeof e2;
|
|
9369
9382
|
} : function(e2) {
|
|
9370
9383
|
return e2 && "function" == typeof Symbol && e2.constructor === Symbol && e2 !== Symbol.prototype ? "symbol" : typeof e2;
|
|
9371
|
-
},
|
|
9384
|
+
}, Sy(e);
|
|
9372
9385
|
}
|
|
9373
9386
|
xy.contextType = gy, xy.propTypes = "production" !== process.env.NODE_ENV ? { nodeRef: Yg.shape({ current: "undefined" == typeof Element ? Yg.any : function(e, t, n, o2, i, r2) {
|
|
9374
9387
|
var a = e[t];
|
|
@@ -9379,19 +9392,19 @@ xy.contextType = gy, xy.propTypes = "production" !== process.env.NODE_ENV ? { no
|
|
|
9379
9392
|
for (var n = arguments.length, o2 = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++)
|
|
9380
9393
|
o2[i - 1] = arguments[i];
|
|
9381
9394
|
return t.apply(void 0, [e].concat(o2));
|
|
9382
|
-
}, addEndListener: Yg.func, onEnter: Yg.func, onEntering: Yg.func, onEntered: Yg.func, onExit: Yg.func, onExiting: Yg.func, onExited: Yg.func } : {}, xy.defaultProps = { in: false, mountOnEnter: false, unmountOnExit: false, appear: false, enter: true, exit: true, onEnter:
|
|
9395
|
+
}, addEndListener: Yg.func, onEnter: Yg.func, onEntering: Yg.func, onEntered: Yg.func, onExit: Yg.func, onExiting: Yg.func, onExited: Yg.func } : {}, xy.defaultProps = { in: false, mountOnEnter: false, unmountOnExit: false, appear: false, enter: true, exit: true, onEnter: Cy, onEntering: Cy, onEntered: Cy, onExit: Cy, onExiting: Cy, onExited: Cy }, xy.UNMOUNTED = yy, xy.EXITED = vy, xy.ENTERING = by, xy.ENTERED = wy, xy.EXITING = ky;
|
|
9383
9396
|
var Ny, Ey = ["tag", "horizontal", "isOpen", "className", "navbar", "cssModule", "children", "innerRef"];
|
|
9384
|
-
function
|
|
9385
|
-
return
|
|
9397
|
+
function Py() {
|
|
9398
|
+
return Py = Object.assign ? Object.assign.bind() : function(e) {
|
|
9386
9399
|
for (var t = 1; t < arguments.length; t++) {
|
|
9387
9400
|
var n = arguments[t];
|
|
9388
9401
|
for (var o2 in n)
|
|
9389
9402
|
Object.prototype.hasOwnProperty.call(n, o2) && (e[o2] = n[o2]);
|
|
9390
9403
|
}
|
|
9391
9404
|
return e;
|
|
9392
|
-
},
|
|
9405
|
+
}, Py.apply(this, arguments);
|
|
9393
9406
|
}
|
|
9394
|
-
function
|
|
9407
|
+
function Iy(e, t) {
|
|
9395
9408
|
if (null == e)
|
|
9396
9409
|
return {};
|
|
9397
9410
|
var n, o2, i = function(e2, t2) {
|
|
@@ -9445,7 +9458,7 @@ function Ly(e) {
|
|
|
9445
9458
|
} else
|
|
9446
9459
|
n = o2.apply(this, arguments);
|
|
9447
9460
|
return function(e2, t2) {
|
|
9448
|
-
if (t2 && ("object" ===
|
|
9461
|
+
if (t2 && ("object" === Sy(t2) || "function" == typeof t2))
|
|
9449
9462
|
return t2;
|
|
9450
9463
|
if (void 0 !== t2)
|
|
9451
9464
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
@@ -9526,18 +9539,18 @@ var jy = function() {
|
|
|
9526
9539
|
} }, { key: "render", value: function() {
|
|
9527
9540
|
var e2 = this, t2 = this.props, n = t2.tag, o2 = t2.horizontal, r2 = t2.isOpen, a = t2.className, s = t2.navbar, c = t2.cssModule, l = t2.children;
|
|
9528
9541
|
t2.innerRef;
|
|
9529
|
-
var u, d, f, p =
|
|
9542
|
+
var u, d, f, p = Iy(t2, Ey), m = this.state.dimension, h = function(e3, t3) {
|
|
9530
9543
|
for (var n2, o3 = Array.isArray(t3) ? t3 : [t3], i = o3.length, r3 = {}; i > 0; )
|
|
9531
9544
|
r3[n2 = o3[i -= 1]] = e3[n2];
|
|
9532
9545
|
return r3;
|
|
9533
9546
|
}(p, ty), g = (u = p, d = ty, f = {}, Object.keys(u).forEach(function(e3) {
|
|
9534
9547
|
-1 === d.indexOf(e3) && (f[e3] = u[e3]);
|
|
9535
9548
|
}), f);
|
|
9536
|
-
return o__default.createElement(xy,
|
|
9549
|
+
return o__default.createElement(xy, Py({}, h, { in: r2, nodeRef: this.nodeRef, onEntering: this.onEntering, onEntered: this.onEntered, onExit: this.onExit, onExiting: this.onExiting, onExited: this.onExited }), function(t3) {
|
|
9537
9550
|
var r3 = function(e3) {
|
|
9538
9551
|
return _y[e3] || "collapse";
|
|
9539
9552
|
}(t3), u2 = Qg(E(a, o2 && "collapse-horizontal", r3, s && "navbar-collapse"), c), d2 = null === m ? null : My({}, o2 ? "width" : "height", m);
|
|
9540
|
-
return o__default.createElement(n,
|
|
9553
|
+
return o__default.createElement(n, Py({}, g, { style: By(By({}, g.style), d2), className: u2, ref: e2.nodeRef }), l);
|
|
9541
9554
|
});
|
|
9542
9555
|
} }]), t;
|
|
9543
9556
|
}();
|
|
@@ -9551,18 +9564,18 @@ var Ev = function(e) {
|
|
|
9551
9564
|
}(e) && !function(e2) {
|
|
9552
9565
|
var t = Object.prototype.toString.call(e2);
|
|
9553
9566
|
return "[object RegExp]" === t || "[object Date]" === t || function(e3) {
|
|
9554
|
-
return e3.$$typeof ===
|
|
9567
|
+
return e3.$$typeof === Pv;
|
|
9555
9568
|
}(e2);
|
|
9556
9569
|
}(e);
|
|
9557
9570
|
};
|
|
9558
|
-
var
|
|
9559
|
-
function
|
|
9571
|
+
var Pv = "function" == typeof Symbol && Symbol.for ? Symbol.for("react.element") : 60103;
|
|
9572
|
+
function Iv(e, t) {
|
|
9560
9573
|
return false !== t.clone && t.isMergeableObject(e) ? Tv((n = e, Array.isArray(n) ? [] : {}), e, t) : e;
|
|
9561
9574
|
var n;
|
|
9562
9575
|
}
|
|
9563
9576
|
function Av(e, t, n) {
|
|
9564
9577
|
return e.concat(t).map(function(e2) {
|
|
9565
|
-
return
|
|
9578
|
+
return Iv(e2, n);
|
|
9566
9579
|
});
|
|
9567
9580
|
}
|
|
9568
9581
|
function Ov(e) {
|
|
@@ -9582,7 +9595,7 @@ function Lv(e, t) {
|
|
|
9582
9595
|
function Dv(e, t, n) {
|
|
9583
9596
|
var o2 = {};
|
|
9584
9597
|
return n.isMergeableObject(e) && Ov(e).forEach(function(t2) {
|
|
9585
|
-
o2[t2] =
|
|
9598
|
+
o2[t2] = Iv(e[t2], n);
|
|
9586
9599
|
}), Ov(t).forEach(function(i) {
|
|
9587
9600
|
(function(e2, t2) {
|
|
9588
9601
|
return Lv(e2, t2) && !(Object.hasOwnProperty.call(e2, t2) && Object.propertyIsEnumerable.call(e2, t2));
|
|
@@ -9591,13 +9604,13 @@ function Dv(e, t, n) {
|
|
|
9591
9604
|
return Tv;
|
|
9592
9605
|
var n2 = t2.customMerge(e2);
|
|
9593
9606
|
return "function" == typeof n2 ? n2 : Tv;
|
|
9594
|
-
}(i, n)(e[i], t[i], n) : o2[i] =
|
|
9607
|
+
}(i, n)(e[i], t[i], n) : o2[i] = Iv(t[i], n));
|
|
9595
9608
|
}), o2;
|
|
9596
9609
|
}
|
|
9597
9610
|
function Tv(e, t, n) {
|
|
9598
|
-
(n = n || {}).arrayMerge = n.arrayMerge || Av, n.isMergeableObject = n.isMergeableObject || Ev, n.cloneUnlessOtherwiseSpecified =
|
|
9611
|
+
(n = n || {}).arrayMerge = n.arrayMerge || Av, n.isMergeableObject = n.isMergeableObject || Ev, n.cloneUnlessOtherwiseSpecified = Iv;
|
|
9599
9612
|
var o2 = Array.isArray(t);
|
|
9600
|
-
return o2 === Array.isArray(e) ? o2 ? n.arrayMerge(e, t, n) : Dv(e, t, n) :
|
|
9613
|
+
return o2 === Array.isArray(e) ? o2 ? n.arrayMerge(e, t, n) : Dv(e, t, n) : Iv(t, n);
|
|
9601
9614
|
}
|
|
9602
9615
|
Tv.all = function(e, t) {
|
|
9603
9616
|
if (!Array.isArray(e))
|
|
@@ -9606,7 +9619,7 @@ Tv.all = function(e, t) {
|
|
|
9606
9619
|
return Tv(e2, n, t);
|
|
9607
9620
|
}, {});
|
|
9608
9621
|
};
|
|
9609
|
-
|
|
9622
|
+
C(Tv);
|
|
9610
9623
|
const Mv = forwardRef((t, n) => {
|
|
9611
9624
|
const { onSearch: o2, searchTerm: i, onClear: r2, className: a } = t, s = useContext(IOConnectContext);
|
|
9612
9625
|
return useEffect(() => {
|
|
@@ -9622,11 +9635,11 @@ const zv = createContext({ searchQuery: "", setSearch: () => {
|
|
|
9622
9635
|
}, hideBulkActions: () => {
|
|
9623
9636
|
} }), Hv = () => useContext(zv);
|
|
9624
9637
|
function Wv({ title: n, onOpenSettings: o2, onClose: i, ...r2 }) {
|
|
9625
|
-
const { HeaderCaptionTitle: a, HeaderCaptionCount: s, HeaderCaptionButtonSettings: c, HeaderCaptionButtonClose: l, HeaderActions: u, HeaderBulkActions: d, HeaderSearch: f } =
|
|
9638
|
+
const { HeaderCaptionTitle: a, HeaderCaptionCount: s, HeaderCaptionButtonSettings: c, HeaderCaptionButtonClose: l, HeaderActions: u, HeaderBulkActions: d, HeaderSearch: f } = Rb(), { isBulkActionsSupported: p, notificationsCount: m } = _p(), { isBulkActionsVisible: h } = Hv(), g = Ud();
|
|
9626
9639
|
return jsxs(Vs, { ...r2, children: [jsxs("div", { className: "io-panel-header-caption", children: [jsx(a, { title: n }), jsx(s, {}), jsxs(Vs.ButtonGroup, { children: [g && jsx(c, { onClick: o2 }), jsx(l, { onClick: i })] })] }), jsx(f, {}), p ? jsxs("div", { className: `io-panel-header-actions-wrapper ${h && m > 0 ? "io-panel-header-bulk-actions-opened" : ""} `, children: [jsx(u, {}), jsx(d, {})] }) : jsx(u, {})] });
|
|
9627
9640
|
}
|
|
9628
9641
|
function Vv({ text: n = "Notifications", counter: o2, ...i }) {
|
|
9629
|
-
const { notificationsCount: r2 } =
|
|
9642
|
+
const { notificationsCount: r2 } = _p();
|
|
9630
9643
|
return jsx(D, { text: n, size: "large", ...i, children: (o2 ?? true) && jsxs("span", { children: ["(", r2, ")"] }) });
|
|
9631
9644
|
}
|
|
9632
9645
|
const Uv = "newest", Kv = "oldest", Gv = "severity", qv = ["None", "Low", "Medium", "High", "Critical"], Jv = { key: Uv, descending: true }, Yv = (e) => [...e].sort((e2, t) => (t.timestamp || 0) - (e2.timestamp || 0)), Xv = (e) => [...e].sort((e2, t) => (e2.timestamp || 0) - (t.timestamp || 0)), Qv = (e, t) => {
|
|
@@ -9635,9 +9648,9 @@ const Uv = "newest", Kv = "oldest", Gv = "severity", qv = ["None", "Low", "Mediu
|
|
|
9635
9648
|
const i = qv.indexOf(e2.severity || n), r2 = qv.indexOf(o2.severity || n);
|
|
9636
9649
|
return (t ? -1 : 1) * (i - r2);
|
|
9637
9650
|
});
|
|
9638
|
-
}, Zv = { [Uv]: Yv, [Kv]: Xv, [Gv]: Qv },
|
|
9639
|
-
function
|
|
9640
|
-
const [n, o2] = useState([]), { NotificationsList: i, Notification: r2 } =
|
|
9651
|
+
}, Zv = { [Uv]: Yv, [Kv]: Xv, [Gv]: Qv }, eb = { severity: "Priority", newest: "Newest", oldest: "Oldest" };
|
|
9652
|
+
function tb({ ...t }) {
|
|
9653
|
+
const [n, o2] = useState([]), { NotificationsList: i, Notification: r2 } = Rb(), { notifications: a, setCount: s, notificationsCount: c } = _p(), { sortNotificationsBy: p, viewNotificationsBy: m, searchQuery: h } = Hv(), g = useRef(null), y = Wd(h), v = useMemo(() => {
|
|
9641
9654
|
const e = ((e2, t2) => {
|
|
9642
9655
|
if (!e2)
|
|
9643
9656
|
return [];
|
|
@@ -9654,8 +9667,8 @@ function tw({ ...t }) {
|
|
|
9654
9667
|
}
|
|
9655
9668
|
})(a, m);
|
|
9656
9669
|
return e.filter((e2) => {
|
|
9657
|
-
var _a2,
|
|
9658
|
-
return e2.title.toLowerCase().includes(y.toLowerCase()) || ((_a2 = e2.source) == null ? void 0 : _a2.toLowerCase().includes(y.toLowerCase())) || ((
|
|
9670
|
+
var _a2, _b2;
|
|
9671
|
+
return e2.title.toLowerCase().includes(y.toLowerCase()) || ((_a2 = e2.source) == null ? void 0 : _a2.toLowerCase().includes(y.toLowerCase())) || ((_b2 = e2.body) == null ? void 0 : _b2.toLowerCase().includes(y.toLowerCase()));
|
|
9659
9672
|
});
|
|
9660
9673
|
}, [y, a, m]);
|
|
9661
9674
|
return useEffect(() => {
|
|
@@ -9678,30 +9691,30 @@ function tw({ ...t }) {
|
|
|
9678
9691
|
g.current && ((_a2 = g.current) == null ? void 0 : _a2.scrollTo({ top: 0, behavior: "smooth" }));
|
|
9679
9692
|
}, [y, c, p, m]), jsx(Od, { ref: g, element: Us, elementProps: t, children: jsx(i, { notifications: n, Notification: r2 }) });
|
|
9680
9693
|
}
|
|
9681
|
-
function
|
|
9682
|
-
const { FooterButtons: n } =
|
|
9694
|
+
function nb({ ...t }) {
|
|
9695
|
+
const { FooterButtons: n } = Rb();
|
|
9683
9696
|
return jsx(Ks, { ...t, children: jsx(n, {}) });
|
|
9684
9697
|
}
|
|
9685
|
-
function
|
|
9686
|
-
const { FooterButtonClearAll: i, FooterButtonClearAllOld: r2 } =
|
|
9698
|
+
function ob({ className: n, ...o2 }) {
|
|
9699
|
+
const { FooterButtonClearAll: i, FooterButtonClearAllOld: r2 } = Rb(), { notifications: a } = _p(), [s, c] = useState(false);
|
|
9687
9700
|
return useEffect(() => {
|
|
9688
9701
|
a.filter((e) => "Stale" === e.state || "Acknowledged" === e.state).length > 0 ? c(true) : c(false);
|
|
9689
9702
|
}, [a]), jsxs(ae, { className: n, align: "right", ...o2, children: [jsx(r2, { disabled: !s }), jsx(i, { disabled: a.length <= 0 })] });
|
|
9690
9703
|
}
|
|
9691
|
-
function
|
|
9692
|
-
const { clearAll: o2 } =
|
|
9704
|
+
function ib({ text: t = "Clear All", ...n }) {
|
|
9705
|
+
const { clearAll: o2 } = _p();
|
|
9693
9706
|
return jsx($, { text: t, onClick: () => {
|
|
9694
9707
|
o2();
|
|
9695
9708
|
}, ...n });
|
|
9696
9709
|
}
|
|
9697
|
-
function
|
|
9698
|
-
const { clearAllOld: o2 } =
|
|
9710
|
+
function rb({ text: t = "Clear Old", ...n }) {
|
|
9711
|
+
const { clearAllOld: o2 } = _p();
|
|
9699
9712
|
return jsx($, { text: t, onClick: () => {
|
|
9700
9713
|
o2();
|
|
9701
9714
|
}, ...n });
|
|
9702
9715
|
}
|
|
9703
|
-
function
|
|
9704
|
-
const t = Ud(), { onClose: n, settings: o2 } =
|
|
9716
|
+
function ab(e) {
|
|
9717
|
+
const t = Ud(), { onClose: n, settings: o2 } = _p(), { isPanelVisible: i } = Hv(), { id: r2, onClick: s, updateState: c } = e, l = useCallback(async () => {
|
|
9705
9718
|
if (!s)
|
|
9706
9719
|
return;
|
|
9707
9720
|
if (!t) {
|
|
@@ -9726,14 +9739,14 @@ function aw(e) {
|
|
|
9726
9739
|
}, [l]);
|
|
9727
9740
|
return { handleClick: l, handleWrapperClick: u };
|
|
9728
9741
|
}
|
|
9729
|
-
function
|
|
9730
|
-
const a = E("io-notification-header", n), { HeaderCount: s, HeaderBadge: c, HeaderTitle: l, HeaderTimestamp: u, HeaderButtonSnooze: d, HeaderButtonClose: f } =
|
|
9742
|
+
function sb({ className: n, notification: o2, onClick: i, ...r2 }) {
|
|
9743
|
+
const a = E("io-notification-header", n), { HeaderCount: s, HeaderBadge: c, HeaderTitle: l, HeaderTimestamp: u, HeaderButtonSnooze: d, HeaderButtonClose: f } = Sb(), { handleWrapperClick: p } = ab(o2);
|
|
9731
9744
|
return jsxs("div", { className: a, onClick: async (e) => {
|
|
9732
9745
|
await p(e), i == null ? void 0 : i(e);
|
|
9733
9746
|
}, ...r2, children: [jsx(c, { notification: o2 }), jsx(s, { notification: o2 }), jsx(l, { notification: o2 }), jsx(u, { notification: o2 }), jsxs(ae, { children: [jsx(d, { notification: o2 }), jsx(f, { notification: o2 })] })] });
|
|
9734
9747
|
}
|
|
9735
|
-
function
|
|
9736
|
-
const { settings: o2, notificationStacks: i } =
|
|
9748
|
+
function cb({ notification: t, ...n }) {
|
|
9749
|
+
const { settings: o2, notificationStacks: i } = _p(), { isPanelVisible: r2 } = Hv(), { toastStacking: a, stackBy: s } = o2, c = "application" === s ? "source" : s ?? "source";
|
|
9737
9750
|
let l = 0;
|
|
9738
9751
|
if (a) {
|
|
9739
9752
|
const e = i.find((e2) => e2.key === t[c]);
|
|
@@ -9741,59 +9754,59 @@ function cw({ notification: t, ...n }) {
|
|
|
9741
9754
|
}
|
|
9742
9755
|
return r2 || !a || l <= 1 ? null : jsx(qs, { ...n, children: l > 9 ? "9+" : l });
|
|
9743
9756
|
}
|
|
9744
|
-
function
|
|
9757
|
+
function lb({ className: t, notification: n, ...o2 }) {
|
|
9745
9758
|
if (!(n == null ? void 0 : n.severity) || "None" === n.severity)
|
|
9746
9759
|
return null;
|
|
9747
9760
|
const i = E("io-notification-header-badge", t);
|
|
9748
9761
|
return jsx(qs, { className: i, ...o2, children: n.severity });
|
|
9749
9762
|
}
|
|
9750
|
-
function
|
|
9763
|
+
function ub({ className: n, state: o2, severity: i = "None", icon: r2, ...a }) {
|
|
9751
9764
|
const s = E("io-notification-header-icon", n), { isPanelVisible: c } = Hv();
|
|
9752
9765
|
return jsxs("div", { className: s, ...a, children: [r2 && jsx("span", { className: "io-notification-header-icon-image", children: jsx("img", { src: r2, alt: `io-notification-header-icon-${r2}` }) }), jsx("span", { className: `io-notification-header-icon-badge color-${i.toLowerCase()}`, children: c && "Acknowledged" !== o2 && "New" })] });
|
|
9753
9766
|
}
|
|
9754
|
-
function
|
|
9767
|
+
function db({ className: t, notification: { appTitle: n }, ...o2 }) {
|
|
9755
9768
|
const i = E("io-notification-header-title", t);
|
|
9756
9769
|
return jsx("div", { className: i, ...o2, children: n });
|
|
9757
9770
|
}
|
|
9758
|
-
function
|
|
9771
|
+
function fb({ className: t, notification: { timestamp: n, state: o2, snooze: i }, ...r2 }) {
|
|
9759
9772
|
const a = E("io-notification-timestamp", t);
|
|
9760
9773
|
return jsx("small", i && "Snoozed" === o2 ? { className: a, ...r2, children: "Snoozed" } : { className: a, ...r2, children: Kf(n ?? 0) ?? "Just Now" });
|
|
9761
9774
|
}
|
|
9762
|
-
function
|
|
9763
|
-
var _a2,
|
|
9764
|
-
const { settings: i, snooze: r2 } =
|
|
9775
|
+
function pb({ notification: { id: t, state: n }, ...o2 }) {
|
|
9776
|
+
var _a2, _b2;
|
|
9777
|
+
const { settings: i, snooze: r2 } = _p(), s = useCallback((e) => {
|
|
9765
9778
|
var _a3;
|
|
9766
9779
|
e.stopPropagation(), r2 && r2(t, ((_a3 = i.snooze) == null ? void 0 : _a3.duration) ?? 0);
|
|
9767
9780
|
}, [t, r2, (_a2 = i.snooze) == null ? void 0 : _a2.duration]);
|
|
9768
|
-
return r2 && "Snoozed" !== n && ((
|
|
9781
|
+
return r2 && "Snoozed" !== n && ((_b2 = i.snooze) == null ? void 0 : _b2.enabled) ? jsx($, { icon: "snooze", variant: "link", text: "Snooze", tabIndex: -1, onClick: s, ...o2 }) : null;
|
|
9769
9782
|
}
|
|
9770
|
-
function
|
|
9771
|
-
const i = Ud(), { onClose: r2 } =
|
|
9783
|
+
function mb({ notification: { id: t, updateState: n }, ...o2 }) {
|
|
9784
|
+
const i = Ud(), { onClose: r2 } = _p(), { isPanelVisible: s } = Hv(), c = useCallback((e) => {
|
|
9772
9785
|
e.stopPropagation(), !i || s ? r2(t) : n("Acknowledged").catch(console.error);
|
|
9773
9786
|
}, [i, t, r2, s, n]);
|
|
9774
|
-
return jsx(
|
|
9787
|
+
return jsx(I, { icon: "close", iconSize: "10", tabIndex: -1, onClick: c, ...o2 });
|
|
9775
9788
|
}
|
|
9776
|
-
function
|
|
9777
|
-
const r2 = E("io-notification-body", n), { BodyIcon: a, BodyTitle: s, BodyDescription: c } =
|
|
9789
|
+
function hb({ className: n, notification: o2, ...i }) {
|
|
9790
|
+
const r2 = E("io-notification-body", n), { BodyIcon: a, BodyTitle: s, BodyDescription: c } = Sb(), { icon: l, title: u, body: d } = o2, { handleClick: f } = ab(o2);
|
|
9778
9791
|
return jsxs("div", { className: r2, role: "button", tabIndex: 0, onKeyDown: async (e) => {
|
|
9779
9792
|
R(e) && await f();
|
|
9780
9793
|
}, onClick: f, ...i, children: [jsx(a, { icon: l }), jsxs("div", { className: "io-notification-body-content", children: [jsx(s, { text: u }), jsx(c, { text: d })] })] });
|
|
9781
9794
|
}
|
|
9782
|
-
function
|
|
9795
|
+
function gb({ className: t, icon: n, altText: o2 = "notification icon", ...i }) {
|
|
9783
9796
|
if (!n)
|
|
9784
9797
|
return null;
|
|
9785
9798
|
const r2 = E("io-notification-body-icon", t);
|
|
9786
9799
|
return jsx("div", { className: r2, ...i, children: jsx("img", { src: n, alt: o2 }) });
|
|
9787
9800
|
}
|
|
9788
|
-
function
|
|
9801
|
+
function yb({ text: t, ...n }) {
|
|
9789
9802
|
return jsx(D, { text: t, ...n });
|
|
9790
9803
|
}
|
|
9791
|
-
function
|
|
9804
|
+
function vb({ className: t, text: n, ...o2 }) {
|
|
9792
9805
|
const i = E("io-notification-body-description", t);
|
|
9793
9806
|
return jsx("p", { className: i, ...o2, children: n });
|
|
9794
9807
|
}
|
|
9795
|
-
function
|
|
9796
|
-
const i = E("io-notification-footer", n), { FooterButton: r2 } =
|
|
9808
|
+
function bb({ className: n, notification: o2 }) {
|
|
9809
|
+
const i = E("io-notification-footer", n), { FooterButton: r2 } = Sb(), { handleWrapperClick: a } = ab(o2), s = useMemo(() => function(e) {
|
|
9797
9810
|
const t = [], n2 = {};
|
|
9798
9811
|
if (!e)
|
|
9799
9812
|
return;
|
|
@@ -9820,27 +9833,27 @@ function ww({ className: n, notification: o2 }) {
|
|
|
9820
9833
|
}(o2.actions), [o2.actions]), c = (t, n2) => t.children ? jsx(ei, { text: t.title, children: t.children.map(c) }, `${t.title}-${n2}`) : ((t2, n3) => jsx(ei.Item, { children: jsx(r2, { variant: "link", className: "io-dropdown-menu-item io-dropdown-menu-button", notificationAction: t2 }) }, `${t2.title}-${n3}`))(t, n2);
|
|
9821
9834
|
return jsx("div", { className: i, onClick: a, children: jsx(ae, { align: "right", children: s == null ? void 0 : s.map((n2, o3) => n2.children ? jsxs(ae, { variant: "append", children: [jsx(r2, { notificationAction: n2, variant: 0 === o3 ? "primary" : "default" }), jsx(ei, { variant: 0 === o3 ? "primary" : "default", icon: "ellipsis", children: n2.children.map(c) })] }, `${n2.title}-${o3}`) : jsx(r2, { notificationAction: n2, variant: 0 === o3 ? "primary" : "link" }, `${n2.title}-${o3}`)) }) });
|
|
9822
9835
|
}
|
|
9823
|
-
function
|
|
9836
|
+
function wb({ notificationAction: t, ...n }) {
|
|
9824
9837
|
const o2 = useCallback((e) => {
|
|
9825
9838
|
e.stopPropagation(), t.onClick({ close: true });
|
|
9826
9839
|
}, [t]);
|
|
9827
9840
|
return jsx($, { text: t.title, onClick: o2, ...n });
|
|
9828
9841
|
}
|
|
9829
|
-
const
|
|
9830
|
-
const o2 = useMemo(() => ({ ...
|
|
9831
|
-
return jsx(
|
|
9842
|
+
const kb = { Header: sb, HeaderCount: cb, HeaderBadge: lb, HeaderIcon: ub, HeaderTitle: db, HeaderTimestamp: fb, HeaderButtonSnooze: pb, HeaderButtonClose: mb, Body: hb, BodyIcon: gb, BodyTitle: yb, BodyDescription: vb, Footer: bb, FooterButton: wb }, xb = createContext(kb), Cb = memo(({ children: t, components: n }) => {
|
|
9843
|
+
const o2 = useMemo(() => ({ ...kb, ...n }), [n]);
|
|
9844
|
+
return jsx(xb.Provider, { value: o2, children: t });
|
|
9832
9845
|
});
|
|
9833
|
-
function
|
|
9834
|
-
return { ...useContext(
|
|
9846
|
+
function Sb(e) {
|
|
9847
|
+
return { ...useContext(xb), ...e };
|
|
9835
9848
|
}
|
|
9836
|
-
function
|
|
9837
|
-
const { Header: r2, Body: a, Footer: s } =
|
|
9849
|
+
function Nb({ className: n, notification: o2, ...i }) {
|
|
9850
|
+
const { Header: r2, Body: a, Footer: s } = Sb(), { severity: c } = o2, l = E("io-notification", `severity-${(c == null ? void 0 : c.toLowerCase()) ?? "none"}`, "Acknowledged" !== o2.state && "state-new", n);
|
|
9838
9851
|
return jsxs("div", { className: l, ...i, children: [jsx(r2, { notification: o2 }), jsx(a, { notification: o2 }), jsx(s, { notification: o2 })] });
|
|
9839
9852
|
}
|
|
9840
|
-
function
|
|
9841
|
-
return jsx(
|
|
9853
|
+
function Eb({ components: t, notification: n, ...o2 }) {
|
|
9854
|
+
return jsx(Cb, { components: t, children: jsx(Nb, { notification: n, ...o2 }) });
|
|
9842
9855
|
}
|
|
9843
|
-
function
|
|
9856
|
+
function Pb({ className: n, notifications: o2, ...i }) {
|
|
9844
9857
|
const [r2, s] = useState(false), c = o2.length >= 3 ? "large" : "normal", u = 2 === o2.length ? "small" : c, d = o2[0].severity, f = E("io-notification-stack", r2 && "io-notification-stack-open", "normal" !== u && [`io-notification-stack-${u}`], d && "None" !== d && [`io-notification-stack-${d.toLowerCase()}`], n), p = useCallback(() => {
|
|
9845
9858
|
s(true);
|
|
9846
9859
|
}, []), m = useCallback((e) => {
|
|
@@ -9848,46 +9861,46 @@ function Iw({ className: n, notifications: o2, ...i }) {
|
|
|
9848
9861
|
e2.close();
|
|
9849
9862
|
});
|
|
9850
9863
|
}, [o2]);
|
|
9851
|
-
return jsxs("div", { className: f, onClick: p, ...i, children: [r2 && "normal" !== u && jsx("div", { className: "io-notification-stack-btn", children: jsx($, { icon: "close", onClick: (e) => m(e), children: jsx("span", { className: "io-btn-text", children: "Clear Stack" }) }) }), o2.map((t) => jsx(
|
|
9864
|
+
return jsxs("div", { className: f, onClick: p, ...i, children: [r2 && "normal" !== u && jsx("div", { className: "io-notification-stack-btn", children: jsx($, { icon: "close", onClick: (e) => m(e), children: jsx("span", { className: "io-btn-text", children: "Clear Stack" }) }) }), o2.map((t) => jsx(Eb, { notification: t }, t.id))] });
|
|
9852
9865
|
}
|
|
9853
|
-
function
|
|
9854
|
-
const { notificationStacks: o2 } =
|
|
9855
|
-
return jsx(Fragment, { children: o2.map((n) => jsx(
|
|
9866
|
+
function Ib({ ...t }) {
|
|
9867
|
+
const { notificationStacks: o2 } = _p();
|
|
9868
|
+
return jsx(Fragment, { children: o2.map((n) => jsx(Pb, { notifications: n.items, ...t }, n.key)) });
|
|
9856
9869
|
}
|
|
9857
|
-
|
|
9858
|
-
const
|
|
9870
|
+
Cb.displayName = "ComponentsStoreProvider";
|
|
9871
|
+
const Ab = ({ notification: n, Notification: o2, ...i }) => {
|
|
9859
9872
|
var _a2;
|
|
9860
|
-
const { configuration: r2, isBulkActionsSupported: a, selectedNotifications: s, selectNotification: c } =
|
|
9873
|
+
const { configuration: r2, isBulkActionsSupported: a, selectedNotifications: s, selectNotification: c } = _p(), { isPanelVisible: l, isBulkActionsVisible: u } = Hv(), d = ((_a2 = r2.sourceFilter) == null ? void 0 : _a2.muted) ?? [], f = n.source && d.includes(n.source) || d.includes("*");
|
|
9861
9874
|
if (!l && f)
|
|
9862
9875
|
return null;
|
|
9863
9876
|
const p = l && a && u, m = s.includes(n.id);
|
|
9864
9877
|
return p ? jsxs("div", { className: E("io-notification-list-bulk-action-item", { selected: m }), children: [jsx(jd, { checked: m, onChange: (e) => c(n.id, e.target.checked) }), jsx(o2, { notification: n, ...i })] }) : jsx(o2, { notification: n, ...i });
|
|
9865
9878
|
};
|
|
9866
|
-
function
|
|
9867
|
-
const s = E("io-notification-list", n), { settings: c } =
|
|
9868
|
-
return jsxs("div", { className: s, ...a, children: [d && jsx(
|
|
9879
|
+
function Ob({ className: n, Notification: o2, notifications: i = [], noNotificationText: r2 = "No notifications to display", ...a }) {
|
|
9880
|
+
const s = E("io-notification-list", n), { settings: c } = _p(), { isPanelVisible: l } = Hv(), { toastStacking: u } = c, d = u && !l, f = i.length > 0;
|
|
9881
|
+
return jsxs("div", { className: s, ...a, children: [d && jsx(Ib, {}), !d && (f ? i.map((t) => jsx(Ab, { notification: t, Notification: o2, ...a }, t.id)) : jsx("div", { className: "io-notification-list-no-notifications", children: r2 }))] });
|
|
9869
9882
|
}
|
|
9870
|
-
const
|
|
9871
|
-
const { notificationsCount: o2 = 0 } =
|
|
9883
|
+
const Lb = { Header: Wv, HeaderCaptionTitle: Vv, HeaderCaptionCount: function({ variant: t = "primary", ...n }) {
|
|
9884
|
+
const { notificationsCount: o2 = 0 } = _p();
|
|
9872
9885
|
return 0 === o2 ? null : jsx(L, { variant: t, ...n, children: o2 > 99 ? "99+" : o2 });
|
|
9873
9886
|
}, HeaderCaptionButtonSettings: function({ icon: t = "cog", size: n = "32", variant: o2 = "circle", ...i }) {
|
|
9874
|
-
return Ud() ? jsx(
|
|
9887
|
+
return Ud() ? jsx(I, { icon: t, size: n, variant: o2, ...i }) : null;
|
|
9875
9888
|
}, HeaderCaptionButtonClose: function({ icon: t = "close", size: n = "32", variant: o2 = "circle", onClick: i, ...r2 }) {
|
|
9876
|
-
const { hidePanel: a } =
|
|
9877
|
-
return jsx(
|
|
9889
|
+
const { hidePanel: a } = _p(), s = Ud();
|
|
9890
|
+
return jsx(I, { icon: t, size: n, variant: o2, onClick: (e) => {
|
|
9878
9891
|
i ? i(e) : s && a();
|
|
9879
9892
|
}, ...r2 });
|
|
9880
9893
|
}, HeaderActions: function({ className: n, ...o2 }) {
|
|
9881
|
-
const i = E("io-panel-header-actions", n), { HeaderActionSort: r2, HeaderActionView: a, HeaderActionClear: s, HeaderActionEdit: c } =
|
|
9894
|
+
const i = E("io-panel-header-actions", n), { HeaderActionSort: r2, HeaderActionView: a, HeaderActionClear: s, HeaderActionEdit: c } = Rb();
|
|
9882
9895
|
return jsxs("div", { className: i, ...o2, children: [jsxs(ae, { children: [jsx(r2, {}), jsx(a, {})] }), jsxs(ae, { children: [jsx(s, {}), jsx(c, {})] })] });
|
|
9883
9896
|
}, HeaderActionSort: function({ text: n = "Sort by", ...o2 }) {
|
|
9884
9897
|
const { sortNotificationsBy: i, setSortBy: r2 } = Hv(), { onNotificationsSort: s } = (() => {
|
|
9885
|
-
const { notifications: e } =
|
|
9898
|
+
const { notifications: e } = _p(), [t, n2] = useState(Jv), { key: o3, descending: i2 } = t, r3 = useMemo(() => Zv[o3](e, i2), [e, o3, i2]), s2 = useCallback((e2) => {
|
|
9886
9899
|
n2((t2) => ({ key: e2, descending: t2.key !== e2 ? Jv.descending : !t2.descending }));
|
|
9887
9900
|
}, []);
|
|
9888
9901
|
return { onNotificationsSort: s2, sortedNotifications: r3 };
|
|
9889
9902
|
})();
|
|
9890
|
-
return jsxs(re, { variant: "light", ...o2, children: [jsxs(re.Button, { variant: "link", children: [n, " ", jsx("strong", { children:
|
|
9903
|
+
return jsxs(re, { variant: "light", ...o2, children: [jsxs(re.Button, { variant: "link", children: [n, " ", jsx("strong", { children: eb[i].toLowerCase() })] }), jsx(re.Content, { children: jsx(re.List, { variant: "single", checkIcon: "check", children: ["Newest", "Oldest", "Priority"].map((t) => {
|
|
9891
9904
|
const n2 = "Priority" === t ? "severity" : t.toLowerCase();
|
|
9892
9905
|
return jsx(re.Item, { isSelected: i === n2, onClick: () => {
|
|
9893
9906
|
r2(n2), s(n2);
|
|
@@ -9895,63 +9908,63 @@ const Lw = { Header: Wv, HeaderCaptionTitle: Vv, HeaderCaptionCount: function({
|
|
|
9895
9908
|
}) }) })] });
|
|
9896
9909
|
}, HeaderActionView: function({ text: n = "View", ...o2 }) {
|
|
9897
9910
|
var _a2;
|
|
9898
|
-
const { settings: i } =
|
|
9911
|
+
const { settings: i } = _p(), { viewNotificationsBy: r2, setViewBy: a } = Hv(), s = ((_a2 = i.snooze) == null ? void 0 : _a2.enabled) ? ["All", "Read", "Unread", "Snoozed"] : ["All", "Read", "Unread"];
|
|
9899
9912
|
return jsxs(re, { variant: "light", ...o2, children: [jsxs(re.Button, { variant: "link", children: [n, " ", jsx("strong", { children: r2 })] }), jsx(re.Content, { children: jsx(re.List, { variant: "single", checkIcon: "check", children: s.map((t) => jsx(re.Item, { isSelected: r2 === t.toLowerCase(), onClick: () => a(t.toLowerCase()), children: t }, t)) }) })] });
|
|
9900
9913
|
}, HeaderActionClear: function({ text: t = "Clear All", ...n }) {
|
|
9901
|
-
const { clearAll: o2, notificationsCount: i } =
|
|
9914
|
+
const { clearAll: o2, notificationsCount: i } = _p();
|
|
9902
9915
|
return jsx($, { variant: "link", text: t, onClick: o2, disabled: 0 === i, ...n });
|
|
9903
9916
|
}, HeaderActionEdit: function({ tooltip: t = "Bulk Edit", ...n }) {
|
|
9904
|
-
const { isBulkActionsSupported: o2, notificationsCount: i } =
|
|
9905
|
-
return o2 ? jsx(
|
|
9917
|
+
const { isBulkActionsSupported: o2, notificationsCount: i } = _p(), { showBulkActions: r2 } = Hv();
|
|
9918
|
+
return o2 ? jsx(I, { icon: "pen-to-square", title: t, size: "32", onClick: r2, disabled: 0 === i, ...n }) : null;
|
|
9906
9919
|
}, HeaderBulkActions: function({ className: n, ...o2 }) {
|
|
9907
|
-
const i = E("io-panel-header-bulk-actions", n), { HeaderBulkActionSelect: r2, HeaderBulkActionSelectDropdown: a, HeaderBulkActionMarkAsRead: s, HeaderBulkActionMarkAsUnread: c, HeaderBulkActionSnooze: l, HeaderBulkActionClear: u, HeaderBulkActionClose: d } =
|
|
9920
|
+
const i = E("io-panel-header-bulk-actions", n), { HeaderBulkActionSelect: r2, HeaderBulkActionSelectDropdown: a, HeaderBulkActionMarkAsRead: s, HeaderBulkActionMarkAsUnread: c, HeaderBulkActionSnooze: l, HeaderBulkActionClear: u, HeaderBulkActionClose: d } = Rb(), { isBulkActionsSupported: f } = _p();
|
|
9908
9921
|
return f ? jsx("div", { className: i, ...o2, children: jsxs(ae, { children: [jsx(r2, {}), jsx(a, {}), jsx(s, {}), jsx(c, {}), jsx(l, {}), jsx(u, {}), jsx(d, {})] }) }) : null;
|
|
9909
9922
|
}, HeaderBulkActionSelect: function({ ...t }) {
|
|
9910
|
-
const { isBulkActionsSupported: n, selectedNotifications: o2, selectAllNotifications: i, notificationsCount: r2 } =
|
|
9923
|
+
const { isBulkActionsSupported: n, selectedNotifications: o2, selectAllNotifications: i, notificationsCount: r2 } = _p();
|
|
9911
9924
|
return n ? jsx(jd, { checked: r2 === o2.length && r2 > 0, onChange: (e) => i("all", e.target.checked), disabled: 0 === r2, ...t }) : null;
|
|
9912
9925
|
}, HeaderBulkActionSelectDropdown: function({ ...n }) {
|
|
9913
|
-
const { isBulkActionsSupported: o2, selectAllNotifications: i, notificationsCount: r2 } =
|
|
9926
|
+
const { isBulkActionsSupported: o2, selectAllNotifications: i, notificationsCount: r2 } = _p();
|
|
9914
9927
|
return o2 ? jsxs(re, { variant: "light", ...n, children: [jsx(re.ButtonIcon, { variant: "default", icon: "chevron-down", size: "16", iconSize: "10", disabled: 0 === r2 }), jsx(H, { children: jsxs(re.List, { variant: "single", checkIcon: "check", children: [jsx(re.ItemSection, { children: "Select" }), ["All", "Read", "Unread", "Snoozed"].map((t) => jsx(re.Item, { onClick: () => i(t.toLowerCase(), true), children: t }, t))] }) })] }) : null;
|
|
9915
9928
|
}, HeaderBulkActionMarkAsRead: function({ icon: t = "envelope-open", size: n = "32", variant: o2 = "circle", tooltip: i = "Mark as read", ...r2 }) {
|
|
9916
|
-
const { isBulkActionsSupported: s, selectedNotifications: c, setStates: l, notificationsCount: u } =
|
|
9929
|
+
const { isBulkActionsSupported: s, selectedNotifications: c, setStates: l, notificationsCount: u } = _p(), d = useCallback(() => {
|
|
9917
9930
|
l(c, "Seen");
|
|
9918
9931
|
}, [c, l]);
|
|
9919
|
-
return s ? jsx(
|
|
9932
|
+
return s ? jsx(I, { icon: t, size: n, variant: o2, title: i, onClick: d, disabled: 0 === u, ...r2 }) : null;
|
|
9920
9933
|
}, HeaderBulkActionMarkAsUnread: function({ icon: t = "envelope", size: n = "32", variant: o2 = "circle", tooltip: i = "Mark as unread", ...r2 }) {
|
|
9921
|
-
const { isBulkActionsSupported: s, selectedNotifications: c, setStates: l, notificationsCount: u } =
|
|
9934
|
+
const { isBulkActionsSupported: s, selectedNotifications: c, setStates: l, notificationsCount: u } = _p(), d = useCallback(() => {
|
|
9922
9935
|
l(c, "Active");
|
|
9923
9936
|
}, [c, l]);
|
|
9924
|
-
return s ? jsx(
|
|
9937
|
+
return s ? jsx(I, { icon: t, size: n, variant: o2, title: i, onClick: d, disabled: 0 === u, ...r2 }) : null;
|
|
9925
9938
|
}, HeaderBulkActionSnooze: function({ icon: t = "snooze", size: n = "32", variant: o2 = "circle", tooltip: i = "Snooze", ...r2 }) {
|
|
9926
|
-
var _a2,
|
|
9927
|
-
const { isBulkActionsSupported: s, selectedNotifications: c, snoozeMany: l, settings: u, notificationsCount: d } =
|
|
9939
|
+
var _a2, _b2;
|
|
9940
|
+
const { isBulkActionsSupported: s, selectedNotifications: c, snoozeMany: l, settings: u, notificationsCount: d } = _p(), f = useCallback(() => {
|
|
9928
9941
|
var _a3;
|
|
9929
9942
|
l(c, ((_a3 = u.snooze) == null ? void 0 : _a3.duration) ?? 0);
|
|
9930
9943
|
}, [c, l, (_a2 = u.snooze) == null ? void 0 : _a2.duration]);
|
|
9931
|
-
return s && ((
|
|
9944
|
+
return s && ((_b2 = u.snooze) == null ? void 0 : _b2.enabled) ? jsx(I, { icon: t, size: n, variant: o2, title: i, onClick: f, disabled: 0 === d, ...r2 }) : null;
|
|
9932
9945
|
}, HeaderBulkActionClear: function({ icon: t = "trash", size: n = "32", variant: o2 = "circle", tooltip: i = "Clear", ...r2 }) {
|
|
9933
|
-
const { isBulkActionsSupported: s, selectedNotifications: c, clearMany: l, notificationsCount: u } =
|
|
9946
|
+
const { isBulkActionsSupported: s, selectedNotifications: c, clearMany: l, notificationsCount: u } = _p(), d = useCallback(() => {
|
|
9934
9947
|
l(c);
|
|
9935
9948
|
}, [c, l]);
|
|
9936
|
-
return s ? jsx(
|
|
9949
|
+
return s ? jsx(I, { icon: t, size: n, variant: o2, title: i, onClick: d, disabled: 0 === u, ...r2 }) : null;
|
|
9937
9950
|
}, HeaderBulkActionClose: function({ text: t = "Done", variant: n = "primary", ...o2 }) {
|
|
9938
|
-
const { isBulkActionsSupported: i, notificationsCount: r2 } =
|
|
9951
|
+
const { isBulkActionsSupported: i, notificationsCount: r2 } = _p(), { hideBulkActions: a } = Hv();
|
|
9939
9952
|
return i ? jsx($, { variant: n, text: t, onClick: a, disabled: 0 === r2, ...o2 }) : null;
|
|
9940
9953
|
}, HeaderSearch: function({ className: n, placeholder: o2 = "Search", iconPrepend: i = "search", iconAppend: r2 = "close", ...s }) {
|
|
9941
|
-
const c = E("io-panel-header-search", n), l = useRef(null), { notificationsCount: u } =
|
|
9954
|
+
const c = E("io-panel-header-search", n), l = useRef(null), { notificationsCount: u } = _p(), { searchQuery: f, setSearch: p } = Hv(), m = f.length > 0, h = useCallback(() => {
|
|
9942
9955
|
p(""), l.current && l.current.focus();
|
|
9943
9956
|
}, [p]);
|
|
9944
9957
|
return jsxs("div", { className: c, children: [jsx($d, { ref: l, value: f, iconPrepend: i, iconAppend: m ? r2 : void 0, iconAppendOnClick: m ? h : void 0, placeholder: o2, onChange: (e) => p(e.target.value), ...s }), m && jsx("p", { className: "io-panel-header-search-count", children: `${u} results` })] });
|
|
9945
|
-
}, Body:
|
|
9946
|
-
const o2 = useMemo(() => ({ ...
|
|
9947
|
-
return jsx(
|
|
9958
|
+
}, Body: tb, Footer: nb, FooterButtons: ob, FooterButtonClearAll: ib, FooterButtonClearAllOld: rb, Notification: Eb, NotificationsList: Ob }, Db = createContext(Lb), Tb = memo(({ children: t, components: n }) => {
|
|
9959
|
+
const o2 = useMemo(() => ({ ...Lb, ...n }), [n]);
|
|
9960
|
+
return jsx(Db.Provider, { value: o2, children: t });
|
|
9948
9961
|
});
|
|
9949
|
-
function
|
|
9950
|
-
return { ...useContext(
|
|
9962
|
+
function Rb(e) {
|
|
9963
|
+
return { ...useContext(Db), ...e };
|
|
9951
9964
|
}
|
|
9952
|
-
|
|
9953
|
-
const
|
|
9954
|
-
const r2 = E("io-toasts-body", t), { NotificationsList: a, Notification: s } =
|
|
9965
|
+
Tb.displayName = "ComponentsStoreProvider";
|
|
9966
|
+
const Fb = ({ className: t, notifications: n, maxToasts: o2 = 1, ...i }) => {
|
|
9967
|
+
const r2 = E("io-toasts-body", t), { NotificationsList: a, Notification: s } = zb(), [c, u] = useState([]);
|
|
9955
9968
|
return useEffect(() => {
|
|
9956
9969
|
const e = o2 < 0 ? n.length : o2, t2 = n.filter((e2) => "Active" === e2.state).slice(0, e);
|
|
9957
9970
|
for (const e2 of t2)
|
|
@@ -9959,30 +9972,30 @@ const Fw = ({ className: t, notifications: n, maxToasts: o2 = 1, ...i }) => {
|
|
|
9959
9972
|
u(t2);
|
|
9960
9973
|
}, [n, o2]), jsx("div", { className: r2, ...i, children: jsx(a, { Notification: s, notifications: c, noNotificationText: "" }) });
|
|
9961
9974
|
};
|
|
9962
|
-
|
|
9963
|
-
const $
|
|
9964
|
-
const o2 = useMemo(() => ({ ...$
|
|
9965
|
-
return jsx(
|
|
9975
|
+
Fb.displayName = "Body";
|
|
9976
|
+
const $b = { Body: Fb, Notification: Eb, NotificationsList: Ob }, _b = createContext($b), jb = memo(({ children: t, components: n }) => {
|
|
9977
|
+
const o2 = useMemo(() => ({ ...$b, ...n }), [n]);
|
|
9978
|
+
return jsx(_b.Provider, { value: o2, children: t });
|
|
9966
9979
|
});
|
|
9967
|
-
function
|
|
9968
|
-
return { ...useContext(
|
|
9969
|
-
}
|
|
9970
|
-
|
|
9971
|
-
const
|
|
9972
|
-
const { General: o2, Layouts: i } =
|
|
9973
|
-
return
|
|
9974
|
-
},
|
|
9975
|
-
const { Theme: o2 } =
|
|
9980
|
+
function zb(e) {
|
|
9981
|
+
return { ...useContext(_b), ...e };
|
|
9982
|
+
}
|
|
9983
|
+
jb.displayName = "ComponentsStoreProvider";
|
|
9984
|
+
const Kb = (n) => {
|
|
9985
|
+
const { General: o2, Layouts: i } = Qb(), r2 = [{ key: "general", Component: o2 }, { key: "layouts", Component: i }];
|
|
9986
|
+
return jsx(Od, { element: Us, elementProps: n, children: r2.map(({ key: n2, Component: o3 }, i2) => jsxs(Fragment$1, { children: [jsx(o3, {}), i2 < r2.length - 1 && jsx(J, {})] }, n2)) });
|
|
9987
|
+
}, Gb = ({ title: t = "General", ...n }) => {
|
|
9988
|
+
const { Theme: o2 } = Qb();
|
|
9976
9989
|
return jsx(T, { title: t, "data-testid": "preferences-panel-general-block", ...n, children: jsx(o2, {}) });
|
|
9977
|
-
},
|
|
9978
|
-
const { LayoutsShowDeletePrompt: o2 } =
|
|
9990
|
+
}, qb = ({ title: t = "Layouts", ...n }) => {
|
|
9991
|
+
const { LayoutsShowDeletePrompt: o2 } = Qb();
|
|
9979
9992
|
return jsx(T, { title: t, "data-testid": "preferences-panel-layouts-block", ...n, children: jsx(o2, {}) });
|
|
9980
|
-
},
|
|
9981
|
-
const o2 = useMemo(() => ({ ...
|
|
9982
|
-
return jsx(
|
|
9993
|
+
}, Jb = { Body: Kb, General: Gb, Theme: vf, Layouts: qb, LayoutsShowUnsavedChangesPrompt: Tf, LayoutsShowDeletePrompt: Rf }, Yb = createContext(Jb), Xb = memo(({ children: t, components: n }) => {
|
|
9994
|
+
const o2 = useMemo(() => ({ ...Jb, ...n }), [n]);
|
|
9995
|
+
return jsx(Yb.Provider, { value: o2, children: t });
|
|
9983
9996
|
});
|
|
9984
|
-
|
|
9985
|
-
const
|
|
9997
|
+
Xb.displayName = "PreferencesPanelComponentsStoreProvider";
|
|
9998
|
+
const Qb = () => useContext(Yb);
|
|
9986
9999
|
function useExternalWindowPopup() {
|
|
9987
10000
|
const { getContainer, closePopup, createPopup, hidePopup, showPopup, isOpen, isVisible, popup } = Qd();
|
|
9988
10001
|
const resizePopup = useCallback(async (size) => {
|
|
@@ -10005,9 +10018,9 @@ const requestPageFocus = () => webGroupsManager == null ? void 0 : webGroupsMana
|
|
|
10005
10018
|
const requestFrameFocus = (frameId) => webGroupsManager == null ? void 0 : webGroupsManager.requestFrameFocus(frameId);
|
|
10006
10019
|
const requestGroupFocus = () => webGroupsManager == null ? void 0 : webGroupsManager.requestGroupFocus();
|
|
10007
10020
|
const openTabOverflowPopup = ({ frameId, location }) => webGroupsManager.openTabOverflowPopup(frameId, location);
|
|
10008
|
-
const onCommitGroupCaptionEditingRequested = (targetId,
|
|
10009
|
-
const onCommitFlatCaptionEditingRequested = (targetId,
|
|
10010
|
-
const onCommitTabCaptionEditingRequested = (targetId,
|
|
10021
|
+
const onCommitGroupCaptionEditingRequested = (targetId, cb2) => webGroupsManager.onCommitCaptionEditingRequested(TargetType.Group, targetId, cb2);
|
|
10022
|
+
const onCommitFlatCaptionEditingRequested = (targetId, cb2) => webGroupsManager.onCommitCaptionEditingRequested(TargetType.Frame, targetId, cb2);
|
|
10023
|
+
const onCommitTabCaptionEditingRequested = (targetId, cb2) => webGroupsManager.onCommitCaptionEditingRequested(TargetType.Tab, targetId, cb2);
|
|
10011
10024
|
export {
|
|
10012
10025
|
CloneButton,
|
|
10013
10026
|
CloseButton,
|