@rfkit/charts 1.10.0 → 1.10.1
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/index.js +1354 -1000
- package/package.json +1 -1
- package/store/runtimeCleanup.d.ts +1 -0
package/index.js
CHANGED
|
@@ -1167,7 +1167,7 @@ var __webpack_modules__ = {
|
|
|
1167
1167
|
}
|
|
1168
1168
|
|
|
1169
1169
|
[data-rfkit-charts-root] .translate-x-0 {
|
|
1170
|
-
--tw-translate-x:
|
|
1170
|
+
--tw-translate-x: 0px;
|
|
1171
1171
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1172
1172
|
}
|
|
1173
1173
|
|
|
@@ -1182,7 +1182,7 @@ var __webpack_modules__ = {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
|
|
1184
1184
|
[data-rfkit-charts-root] .translate-y-0 {
|
|
1185
|
-
--tw-translate-y:
|
|
1185
|
+
--tw-translate-y: 0px;
|
|
1186
1186
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1187
1187
|
}
|
|
1188
1188
|
|
|
@@ -3001,7 +3001,7 @@ var __webpack_modules__ = {
|
|
|
3001
3001
|
}
|
|
3002
3002
|
|
|
3003
3003
|
[data-rfkit-charts-root] .data-\\[state\\=unchecked\\]\\:translate-x-0[data-state="unchecked"] {
|
|
3004
|
-
--tw-translate-x:
|
|
3004
|
+
--tw-translate-x: 0px;
|
|
3005
3005
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
3006
3006
|
}
|
|
3007
3007
|
|
|
@@ -6560,6 +6560,15 @@ function createChartRuntime(initialState) {
|
|
|
6560
6560
|
if (currentGlobalID) runtimeRegistry.set(currentGlobalID, runtime);
|
|
6561
6561
|
return runtime;
|
|
6562
6562
|
}
|
|
6563
|
+
const scheduleRuntimeCleanup = (cleanup)=>{
|
|
6564
|
+
let cancelled = false;
|
|
6565
|
+
queueMicrotask(()=>{
|
|
6566
|
+
if (!cancelled) cleanup();
|
|
6567
|
+
});
|
|
6568
|
+
return ()=>{
|
|
6569
|
+
cancelled = true;
|
|
6570
|
+
};
|
|
6571
|
+
};
|
|
6563
6572
|
function useAppContext() {
|
|
6564
6573
|
const context = (0, __WEBPACK_EXTERNAL_MODULE_react__.useContext)(store_context);
|
|
6565
6574
|
if (!context) throw new Error('useStore must be used within a StoreProvider');
|
|
@@ -6604,6 +6613,7 @@ const Store = (props)=>{
|
|
|
6604
6613
|
const { dispatch, store } = runtime;
|
|
6605
6614
|
const globalID = (0, __WEBPACK_EXTERNAL_MODULE_react__.useSyncExternalStore)(store.subscribe, ()=>store.getState().globalID, ()=>store.getState().globalID);
|
|
6606
6615
|
const globalIDRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(globalID);
|
|
6616
|
+
const cancelRuntimeCleanupRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
6607
6617
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
6608
6618
|
globalIDRef.current = globalID;
|
|
6609
6619
|
runtime.setGlobalID(globalID);
|
|
@@ -6611,12 +6621,19 @@ const Store = (props)=>{
|
|
|
6611
6621
|
globalID,
|
|
6612
6622
|
runtime
|
|
6613
6623
|
]);
|
|
6614
|
-
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6624
|
+
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
6625
|
+
cancelRuntimeCleanupRef.current?.();
|
|
6626
|
+
cancelRuntimeCleanupRef.current = null;
|
|
6627
|
+
return ()=>{
|
|
6628
|
+
cancelRuntimeCleanupRef.current = scheduleRuntimeCleanup(()=>{
|
|
6629
|
+
runtime.destroy();
|
|
6630
|
+
releaseChartsRuntimeOwners([
|
|
6631
|
+
globalIDRef.current
|
|
6632
|
+
]);
|
|
6633
|
+
cancelRuntimeCleanupRef.current = null;
|
|
6634
|
+
});
|
|
6635
|
+
};
|
|
6636
|
+
}, [
|
|
6620
6637
|
runtime
|
|
6621
6638
|
]);
|
|
6622
6639
|
const value1 = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
@@ -11059,17 +11076,57 @@ const TOOLBAR_CONTENT_GRADIENT_CLASS_NAME = 'w-[60px] justify-stretch';
|
|
|
11059
11076
|
const TOOLBAR_TRIGGER_ICON_CLASS_NAME = 'inline-flex h-full min-w-4 shrink-0 items-center justify-center text-primary';
|
|
11060
11077
|
const TOOLBAR_GLYPH_CLASS_NAME = 'inline-flex size-4 shrink-0 items-center justify-center [&_svg]:size-full [&_svg]:shrink-0';
|
|
11061
11078
|
const TOOLBAR_DROPDOWN_CONTENT_CLASS_NAME = 'border-border/80 bg-secondary/92 text-foreground shadow-[0_10px_28px_color-mix(in_srgb,var(--background)_60%,transparent)] backdrop-blur-xl';
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11079
|
+
var __defProp = Object.defineProperty;
|
|
11080
|
+
var __name = (target, value1)=>__defProp(target, "name", {
|
|
11081
|
+
value: value1,
|
|
11082
|
+
configurable: true
|
|
11083
|
+
});
|
|
11084
|
+
var dist_canUseDOM = !!("undefined" != typeof window && window.document && window.document.createElement);
|
|
11085
|
+
function dist_composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
11086
|
+
return /* @__PURE__ */ __name(function(event) {
|
|
11065
11087
|
originalEventHandler?.(event);
|
|
11066
11088
|
if (false === checkForDefaultPrevented || !event || !event.defaultPrevented) return ourEventHandler?.(event);
|
|
11067
|
-
};
|
|
11089
|
+
}, "handleEvent");
|
|
11090
|
+
}
|
|
11091
|
+
__name(dist_composeEventHandlers, "composeEventHandlers");
|
|
11092
|
+
function getOwnerWindow(element) {
|
|
11093
|
+
if (!dist_canUseDOM) throw new Error("Cannot access window outside of the DOM");
|
|
11094
|
+
return element?.ownerDocument?.defaultView ?? window;
|
|
11095
|
+
}
|
|
11096
|
+
__name(getOwnerWindow, "getOwnerWindow");
|
|
11097
|
+
function getOwnerDocument(element) {
|
|
11098
|
+
if (!dist_canUseDOM) throw new Error("Cannot access document outside of the DOM");
|
|
11099
|
+
return element?.ownerDocument ?? document;
|
|
11100
|
+
}
|
|
11101
|
+
__name(getOwnerDocument, "getOwnerDocument");
|
|
11102
|
+
function getActiveElement(node, activeDescendant = false) {
|
|
11103
|
+
const { activeElement } = getOwnerDocument(node);
|
|
11104
|
+
if (!activeElement?.nodeName) return null;
|
|
11105
|
+
if (isFrame(activeElement) && activeElement.contentDocument) return getActiveElement(activeElement.contentDocument.body, activeDescendant);
|
|
11106
|
+
if (activeDescendant) {
|
|
11107
|
+
const id = activeElement.getAttribute("aria-activedescendant");
|
|
11108
|
+
if (id) {
|
|
11109
|
+
const element = getOwnerDocument(activeElement).getElementById(id);
|
|
11110
|
+
if (element) return element;
|
|
11111
|
+
}
|
|
11112
|
+
}
|
|
11113
|
+
return activeElement;
|
|
11114
|
+
}
|
|
11115
|
+
__name(getActiveElement, "getActiveElement");
|
|
11116
|
+
function isFrame(element) {
|
|
11117
|
+
return "IFRAME" === element.tagName;
|
|
11068
11118
|
}
|
|
11119
|
+
__name(isFrame, "isFrame");
|
|
11120
|
+
var dist_defProp = Object.defineProperty;
|
|
11121
|
+
var dist_name = (target, value1)=>dist_defProp(target, "name", {
|
|
11122
|
+
value: value1,
|
|
11123
|
+
configurable: true
|
|
11124
|
+
});
|
|
11069
11125
|
function setRef(ref, value1) {
|
|
11070
11126
|
if ("function" == typeof ref) return ref(value1);
|
|
11071
11127
|
if (null != ref) ref.current = value1;
|
|
11072
11128
|
}
|
|
11129
|
+
dist_name(setRef, "setRef");
|
|
11073
11130
|
function dist_composeRefs(...refs) {
|
|
11074
11131
|
return (node)=>{
|
|
11075
11132
|
let hasCleanup = false;
|
|
@@ -11087,9 +11144,43 @@ function dist_composeRefs(...refs) {
|
|
|
11087
11144
|
};
|
|
11088
11145
|
};
|
|
11089
11146
|
}
|
|
11090
|
-
|
|
11147
|
+
dist_name(dist_composeRefs, "composeRefs");
|
|
11148
|
+
function dist_useComposedRefs(...refs) {
|
|
11091
11149
|
return __WEBPACK_EXTERNAL_MODULE_react__.useCallback(dist_composeRefs(...refs), refs);
|
|
11092
11150
|
}
|
|
11151
|
+
dist_name(dist_useComposedRefs, "useComposedRefs");
|
|
11152
|
+
var react_context_dist_defProp = Object.defineProperty;
|
|
11153
|
+
var react_context_dist_name = (target, value1)=>react_context_dist_defProp(target, "name", {
|
|
11154
|
+
value: value1,
|
|
11155
|
+
configurable: true
|
|
11156
|
+
});
|
|
11157
|
+
function createContext2(rootComponentName, defaultContext) {
|
|
11158
|
+
const Context = __WEBPACK_EXTERNAL_MODULE_react__.createContext(defaultContext);
|
|
11159
|
+
Context.displayName = rootComponentName + "Context";
|
|
11160
|
+
const Provider = /* @__PURE__ */ react_context_dist_name((props)=>{
|
|
11161
|
+
const { children, ...context } = props;
|
|
11162
|
+
const value1 = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>context, Object.values(context));
|
|
11163
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Context.Provider, {
|
|
11164
|
+
value: value1,
|
|
11165
|
+
children
|
|
11166
|
+
});
|
|
11167
|
+
}, "Provider");
|
|
11168
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
11169
|
+
function useContext2(consumerName, options = {}) {
|
|
11170
|
+
const { optional = false } = options;
|
|
11171
|
+
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(Context);
|
|
11172
|
+
if (context) return context;
|
|
11173
|
+
if (void 0 !== defaultContext) return defaultContext;
|
|
11174
|
+
if (optional) return;
|
|
11175
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
11176
|
+
}
|
|
11177
|
+
react_context_dist_name(useContext2, "useContext");
|
|
11178
|
+
return [
|
|
11179
|
+
Provider,
|
|
11180
|
+
useContext2
|
|
11181
|
+
];
|
|
11182
|
+
}
|
|
11183
|
+
react_context_dist_name(createContext2, "createContext");
|
|
11093
11184
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
11094
11185
|
let defaultContexts = [];
|
|
11095
11186
|
function createContext3(rootComponentName, defaultContext) {
|
|
@@ -11100,7 +11191,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
11100
11191
|
...defaultContexts,
|
|
11101
11192
|
defaultContext
|
|
11102
11193
|
];
|
|
11103
|
-
const Provider = (props)=>{
|
|
11194
|
+
const Provider = /* @__PURE__ */ react_context_dist_name((props)=>{
|
|
11104
11195
|
const { scope, children, ...context } = props;
|
|
11105
11196
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
11106
11197
|
const value1 = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>context, Object.values(context));
|
|
@@ -11108,7 +11199,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
11108
11199
|
value: value1,
|
|
11109
11200
|
children
|
|
11110
11201
|
});
|
|
11111
|
-
};
|
|
11202
|
+
}, "Provider");
|
|
11112
11203
|
Provider.displayName = rootComponentName + "Provider";
|
|
11113
11204
|
function useContext2(consumerName, scope, options = {}) {
|
|
11114
11205
|
const { optional = false } = options;
|
|
@@ -11119,14 +11210,16 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
11119
11210
|
if (optional) return;
|
|
11120
11211
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
11121
11212
|
}
|
|
11213
|
+
react_context_dist_name(useContext2, "useContext");
|
|
11122
11214
|
return [
|
|
11123
11215
|
Provider,
|
|
11124
11216
|
useContext2
|
|
11125
11217
|
];
|
|
11126
11218
|
}
|
|
11127
|
-
|
|
11219
|
+
react_context_dist_name(createContext3, "createContext");
|
|
11220
|
+
const createScope = /* @__PURE__ */ react_context_dist_name(()=>{
|
|
11128
11221
|
const scopeContexts = defaultContexts.map((defaultContext)=>__WEBPACK_EXTERNAL_MODULE_react__.createContext(defaultContext));
|
|
11129
|
-
return function(scope) {
|
|
11222
|
+
return /* @__PURE__ */ react_context_dist_name(function(scope) {
|
|
11130
11223
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
11131
11224
|
return __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>({
|
|
11132
11225
|
[`__scope${scopeName}`]: {
|
|
@@ -11137,23 +11230,24 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
11137
11230
|
scope,
|
|
11138
11231
|
contexts
|
|
11139
11232
|
]);
|
|
11140
|
-
};
|
|
11141
|
-
};
|
|
11233
|
+
}, "useScope");
|
|
11234
|
+
}, "createScope");
|
|
11142
11235
|
createScope.scopeName = scopeName;
|
|
11143
11236
|
return [
|
|
11144
11237
|
createContext3,
|
|
11145
11238
|
composeContextScopes(createScope, ...createContextScopeDeps)
|
|
11146
11239
|
];
|
|
11147
11240
|
}
|
|
11241
|
+
react_context_dist_name(createContextScope, "createContextScope");
|
|
11148
11242
|
function composeContextScopes(...scopes) {
|
|
11149
11243
|
const baseScope = scopes[0];
|
|
11150
11244
|
if (1 === scopes.length) return baseScope;
|
|
11151
|
-
const createScope = ()=>{
|
|
11245
|
+
const createScope = /* @__PURE__ */ react_context_dist_name(()=>{
|
|
11152
11246
|
const scopeHooks = scopes.map((createScope2)=>({
|
|
11153
11247
|
useScope: createScope2(),
|
|
11154
11248
|
scopeName: createScope2.scopeName
|
|
11155
11249
|
}));
|
|
11156
|
-
return function(overrideScopes) {
|
|
11250
|
+
return /* @__PURE__ */ react_context_dist_name(function(overrideScopes) {
|
|
11157
11251
|
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName })=>{
|
|
11158
11252
|
const scopeProps = useScope(overrideScopes);
|
|
11159
11253
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
@@ -11167,21 +11261,49 @@ function composeContextScopes(...scopes) {
|
|
|
11167
11261
|
}), [
|
|
11168
11262
|
nextScopes
|
|
11169
11263
|
]);
|
|
11170
|
-
};
|
|
11171
|
-
};
|
|
11264
|
+
}, "useComposedScopes");
|
|
11265
|
+
}, "createScope");
|
|
11172
11266
|
createScope.scopeName = baseScope.scopeName;
|
|
11173
11267
|
return createScope;
|
|
11174
11268
|
}
|
|
11269
|
+
react_context_dist_name(composeContextScopes, "composeContextScopes");
|
|
11270
|
+
var IS_DEVELOPMENT = false;
|
|
11175
11271
|
var useLayoutEffect2 = globalThis?.document ? __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect : ()=>{};
|
|
11272
|
+
var react_use_effect_event_dist_defProp = Object.defineProperty;
|
|
11273
|
+
var react_use_effect_event_dist_name = (target, value1)=>react_use_effect_event_dist_defProp(target, "name", {
|
|
11274
|
+
value: value1,
|
|
11275
|
+
configurable: true
|
|
11276
|
+
});
|
|
11277
|
+
var useReactEffectEvent = __WEBPACK_EXTERNAL_MODULE_react__[" useEffectEvent ".trim().toString()];
|
|
11278
|
+
var useReactInsertionEffect = __WEBPACK_EXTERNAL_MODULE_react__[" useInsertionEffect ".trim().toString()];
|
|
11279
|
+
function useEffectEvent(callback) {
|
|
11280
|
+
if ("function" == typeof useReactEffectEvent) return useReactEffectEvent(callback);
|
|
11281
|
+
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(()=>{
|
|
11282
|
+
throw new Error("Cannot call an event handler while rendering.");
|
|
11283
|
+
});
|
|
11284
|
+
if ("function" == typeof useReactInsertionEffect) useReactInsertionEffect(()=>{
|
|
11285
|
+
ref.current = callback;
|
|
11286
|
+
});
|
|
11287
|
+
else useLayoutEffect2(()=>{
|
|
11288
|
+
ref.current = callback;
|
|
11289
|
+
});
|
|
11290
|
+
return __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>(...args)=>ref.current?.(...args), []);
|
|
11291
|
+
}
|
|
11292
|
+
react_use_effect_event_dist_name(useEffectEvent, "useEffectEvent");
|
|
11293
|
+
var react_use_controllable_state_dist_defProp = Object.defineProperty;
|
|
11294
|
+
var react_use_controllable_state_dist_name = (target, value1)=>react_use_controllable_state_dist_defProp(target, "name", {
|
|
11295
|
+
value: value1,
|
|
11296
|
+
configurable: true
|
|
11297
|
+
});
|
|
11176
11298
|
var useInsertionEffect = __WEBPACK_EXTERNAL_MODULE_react__[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
11177
|
-
function dist_useControllableState({ prop, defaultProp, onChange = ()=>{}, caller }) {
|
|
11299
|
+
function dist_useControllableState({ prop, defaultProp, onChange = /* @__PURE__ */ react_use_controllable_state_dist_name(()=>{}, "onChange"), caller }) {
|
|
11178
11300
|
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
11179
11301
|
defaultProp,
|
|
11180
11302
|
onChange
|
|
11181
11303
|
});
|
|
11182
11304
|
const isControlled = void 0 !== prop;
|
|
11183
11305
|
const value1 = isControlled ? prop : uncontrolledProp;
|
|
11184
|
-
{
|
|
11306
|
+
if (IS_DEVELOPMENT) {
|
|
11185
11307
|
const isControlledRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(void 0 !== prop);
|
|
11186
11308
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11187
11309
|
const wasControlled = isControlledRef.current;
|
|
@@ -11212,6 +11334,7 @@ function dist_useControllableState({ prop, defaultProp, onChange = ()=>{}, calle
|
|
|
11212
11334
|
setValue
|
|
11213
11335
|
];
|
|
11214
11336
|
}
|
|
11337
|
+
react_use_controllable_state_dist_name(dist_useControllableState, "useControllableState");
|
|
11215
11338
|
function useUncontrolledState({ defaultProp, onChange }) {
|
|
11216
11339
|
const [value1, setValue] = __WEBPACK_EXTERNAL_MODULE_react__.useState(defaultProp);
|
|
11217
11340
|
const prevValueRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(value1);
|
|
@@ -11236,10 +11359,91 @@ function useUncontrolledState({ defaultProp, onChange }) {
|
|
|
11236
11359
|
onChangeRef
|
|
11237
11360
|
];
|
|
11238
11361
|
}
|
|
11362
|
+
react_use_controllable_state_dist_name(useUncontrolledState, "useUncontrolledState");
|
|
11239
11363
|
function isFunction(value1) {
|
|
11240
11364
|
return "function" == typeof value1;
|
|
11241
11365
|
}
|
|
11242
|
-
|
|
11366
|
+
react_use_controllable_state_dist_name(isFunction, "isFunction");
|
|
11367
|
+
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
11368
|
+
function useControllableStateReducer(reducer, userArgs, initialArg, init) {
|
|
11369
|
+
const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;
|
|
11370
|
+
const isControlled = void 0 !== controlledState;
|
|
11371
|
+
const onChange = useEffectEvent(onChangeProp);
|
|
11372
|
+
if (IS_DEVELOPMENT) {
|
|
11373
|
+
const isControlledRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(void 0 !== controlledState);
|
|
11374
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11375
|
+
const wasControlled = isControlledRef.current;
|
|
11376
|
+
if (wasControlled !== isControlled) {
|
|
11377
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
11378
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
11379
|
+
console.warn(`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);
|
|
11380
|
+
}
|
|
11381
|
+
isControlledRef.current = isControlled;
|
|
11382
|
+
}, [
|
|
11383
|
+
isControlled,
|
|
11384
|
+
caller
|
|
11385
|
+
]);
|
|
11386
|
+
}
|
|
11387
|
+
const args = [
|
|
11388
|
+
{
|
|
11389
|
+
...initialArg,
|
|
11390
|
+
state: defaultProp
|
|
11391
|
+
}
|
|
11392
|
+
];
|
|
11393
|
+
if (init) args.push(init);
|
|
11394
|
+
const [internalState, dispatch] = __WEBPACK_EXTERNAL_MODULE_react__.useReducer((state2, action)=>{
|
|
11395
|
+
if (action.type === SYNC_STATE) return {
|
|
11396
|
+
...state2,
|
|
11397
|
+
state: action.state
|
|
11398
|
+
};
|
|
11399
|
+
const next = reducer(state2, action);
|
|
11400
|
+
if (isControlled && !Object.is(next.state, state2.state)) onChange(next.state);
|
|
11401
|
+
return next;
|
|
11402
|
+
}, ...args);
|
|
11403
|
+
const uncontrolledState = internalState.state;
|
|
11404
|
+
const prevValueRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(uncontrolledState);
|
|
11405
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11406
|
+
if (prevValueRef.current !== uncontrolledState) {
|
|
11407
|
+
prevValueRef.current = uncontrolledState;
|
|
11408
|
+
if (!isControlled) onChange(uncontrolledState);
|
|
11409
|
+
}
|
|
11410
|
+
}, [
|
|
11411
|
+
uncontrolledState,
|
|
11412
|
+
prevValueRef,
|
|
11413
|
+
isControlled
|
|
11414
|
+
]);
|
|
11415
|
+
const state = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>{
|
|
11416
|
+
const isControlled2 = void 0 !== controlledState;
|
|
11417
|
+
if (isControlled2) return {
|
|
11418
|
+
...internalState,
|
|
11419
|
+
state: controlledState
|
|
11420
|
+
};
|
|
11421
|
+
return internalState;
|
|
11422
|
+
}, [
|
|
11423
|
+
internalState,
|
|
11424
|
+
controlledState
|
|
11425
|
+
]);
|
|
11426
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11427
|
+
if (isControlled && !Object.is(controlledState, internalState.state)) dispatch({
|
|
11428
|
+
type: SYNC_STATE,
|
|
11429
|
+
state: controlledState
|
|
11430
|
+
});
|
|
11431
|
+
}, [
|
|
11432
|
+
controlledState,
|
|
11433
|
+
internalState.state,
|
|
11434
|
+
isControlled
|
|
11435
|
+
]);
|
|
11436
|
+
return [
|
|
11437
|
+
state,
|
|
11438
|
+
dispatch
|
|
11439
|
+
];
|
|
11440
|
+
}
|
|
11441
|
+
react_use_controllable_state_dist_name(useControllableStateReducer, "useControllableStateReducer");
|
|
11442
|
+
var react_slot_dist_defProp = Object.defineProperty;
|
|
11443
|
+
var react_slot_dist_name = (target, value1)=>react_slot_dist_defProp(target, "name", {
|
|
11444
|
+
value: value1,
|
|
11445
|
+
configurable: true
|
|
11446
|
+
});
|
|
11243
11447
|
function createSlot(ownerName) {
|
|
11244
11448
|
const Slot2 = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
11245
11449
|
let { children, ...slotProps } = props;
|
|
@@ -11260,7 +11464,7 @@ function createSlot(ownerName) {
|
|
|
11260
11464
|
if (slottableElement) slottableElement = __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(slottableElement, void 0, newChildren);
|
|
11261
11465
|
else if (!hasSlottable && 1 === __WEBPACK_EXTERNAL_MODULE_react__.Children.count(children) && __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(children)) slottableElement = children;
|
|
11262
11466
|
const slottableElementRef = slottableElement ? getElementRef(slottableElement) : void 0;
|
|
11263
|
-
const composedRef =
|
|
11467
|
+
const composedRef = dist_useComposedRefs(forwardedRef, slottableElementRef);
|
|
11264
11468
|
if (!slottableElement) {
|
|
11265
11469
|
if (children || 0 === children) throw new Error(hasSlottable ? createSlottableError(ownerName) : createSlotError(ownerName));
|
|
11266
11470
|
return children;
|
|
@@ -11272,21 +11476,23 @@ function createSlot(ownerName) {
|
|
|
11272
11476
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
11273
11477
|
return Slot2;
|
|
11274
11478
|
}
|
|
11479
|
+
react_slot_dist_name(createSlot, "createSlot");
|
|
11275
11480
|
var SLOTTABLE_IDENTIFIER = Symbol.for("radix.slottable");
|
|
11276
11481
|
function createSlottable(ownerName) {
|
|
11277
|
-
const Slottable2 = (props)=>"child" in props ? props.children(props.child) : props.children;
|
|
11482
|
+
const Slottable2 = /* @__PURE__ */ react_slot_dist_name((props)=>"child" in props ? props.children(props.child) : props.children, "Slottable");
|
|
11278
11483
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
11279
11484
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
11280
11485
|
return Slottable2;
|
|
11281
11486
|
}
|
|
11282
|
-
|
|
11487
|
+
react_slot_dist_name(createSlottable, "createSlottable");
|
|
11488
|
+
var getSlottableElementFromSlottable = /* @__PURE__ */ react_slot_dist_name((slottable, child)=>{
|
|
11283
11489
|
if ("child" in slottable.props) {
|
|
11284
11490
|
const child2 = slottable.props.child;
|
|
11285
11491
|
if (!__WEBPACK_EXTERNAL_MODULE_react__.isValidElement(child2)) return null;
|
|
11286
11492
|
return __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(child2, void 0, slottable.props.children(child2.props.children));
|
|
11287
11493
|
}
|
|
11288
11494
|
return __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(child) ? child : null;
|
|
11289
|
-
};
|
|
11495
|
+
}, "getSlottableElementFromSlottable");
|
|
11290
11496
|
function mergeProps(slotProps, childProps) {
|
|
11291
11497
|
const overrideProps = {
|
|
11292
11498
|
...childProps
|
|
@@ -11316,6 +11522,7 @@ function mergeProps(slotProps, childProps) {
|
|
|
11316
11522
|
...overrideProps
|
|
11317
11523
|
};
|
|
11318
11524
|
}
|
|
11525
|
+
react_slot_dist_name(mergeProps, "mergeProps");
|
|
11319
11526
|
function getElementRef(element) {
|
|
11320
11527
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
11321
11528
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
@@ -11325,19 +11532,28 @@ function getElementRef(element) {
|
|
|
11325
11532
|
if (mayWarn) return element.props.ref;
|
|
11326
11533
|
return element.props.ref || element.ref;
|
|
11327
11534
|
}
|
|
11535
|
+
react_slot_dist_name(getElementRef, "getElementRef");
|
|
11328
11536
|
function isSlottable(child) {
|
|
11329
11537
|
return __WEBPACK_EXTERNAL_MODULE_react__.isValidElement(child) && "function" == typeof child.type && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
11330
11538
|
}
|
|
11539
|
+
react_slot_dist_name(isSlottable, "isSlottable");
|
|
11331
11540
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
11332
11541
|
function isLazyComponent(element) {
|
|
11333
11542
|
return null != element && "object" == typeof element && "$$typeof" in element && element.$$typeof === REACT_LAZY_TYPE && "_payload" in element && isPromiseLike(element._payload);
|
|
11334
11543
|
}
|
|
11544
|
+
react_slot_dist_name(isLazyComponent, "isLazyComponent");
|
|
11335
11545
|
function isPromiseLike(value1) {
|
|
11336
11546
|
return "object" == typeof value1 && null !== value1 && "then" in value1;
|
|
11337
11547
|
}
|
|
11338
|
-
|
|
11339
|
-
var
|
|
11548
|
+
react_slot_dist_name(isPromiseLike, "isPromiseLike");
|
|
11549
|
+
var createSlotError = /* @__PURE__ */ react_slot_dist_name((ownerName)=>`${ownerName} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`, "createSlotError");
|
|
11550
|
+
var createSlottableError = /* @__PURE__ */ react_slot_dist_name((ownerName)=>`${ownerName} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`, "createSlottableError");
|
|
11340
11551
|
var use = __WEBPACK_EXTERNAL_MODULE_react__[" use ".trim().toString()];
|
|
11552
|
+
var react_primitive_dist_defProp = Object.defineProperty;
|
|
11553
|
+
var react_primitive_dist_name = (target, value1)=>react_primitive_dist_defProp(target, "name", {
|
|
11554
|
+
value: value1,
|
|
11555
|
+
configurable: true
|
|
11556
|
+
});
|
|
11341
11557
|
var NODES = [
|
|
11342
11558
|
"a",
|
|
11343
11559
|
"button",
|
|
@@ -11357,7 +11573,7 @@ var NODES = [
|
|
|
11357
11573
|
"svg",
|
|
11358
11574
|
"ul"
|
|
11359
11575
|
];
|
|
11360
|
-
var
|
|
11576
|
+
var dist_Primitive = NODES.reduce((primitive, node)=>{
|
|
11361
11577
|
const Slot = createSlot(`Primitive.${node}`);
|
|
11362
11578
|
const Node1 = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
11363
11579
|
const { asChild, ...primitiveProps } = props;
|
|
@@ -11377,7 +11593,13 @@ var Primitive = NODES.reduce((primitive, node)=>{
|
|
|
11377
11593
|
function dispatchDiscreteCustomEvent(target, event) {
|
|
11378
11594
|
if (target) __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__.flushSync(()=>target.dispatchEvent(event));
|
|
11379
11595
|
}
|
|
11596
|
+
react_primitive_dist_name(dispatchDiscreteCustomEvent, "dispatchDiscreteCustomEvent");
|
|
11380
11597
|
"use client";
|
|
11598
|
+
var react_collection_dist_defProp = Object.defineProperty;
|
|
11599
|
+
var react_collection_dist_name = (target, value1)=>react_collection_dist_defProp(target, "name", {
|
|
11600
|
+
value: value1,
|
|
11601
|
+
configurable: true
|
|
11602
|
+
});
|
|
11381
11603
|
function createCollection(name) {
|
|
11382
11604
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
11383
11605
|
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
|
|
@@ -11387,7 +11609,7 @@ function createCollection(name) {
|
|
|
11387
11609
|
},
|
|
11388
11610
|
itemMap: /* @__PURE__ */ new Map()
|
|
11389
11611
|
});
|
|
11390
|
-
const CollectionProvider = (props)=>{
|
|
11612
|
+
const CollectionProvider = /* @__PURE__ */ react_collection_dist_name((props)=>{
|
|
11391
11613
|
const { scope, children } = props;
|
|
11392
11614
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
11393
11615
|
const itemMap = __WEBPACK_EXTERNAL_MODULE_react__.useRef(/* @__PURE__ */ new Map()).current;
|
|
@@ -11397,14 +11619,14 @@ function createCollection(name) {
|
|
|
11397
11619
|
collectionRef: ref,
|
|
11398
11620
|
children
|
|
11399
11621
|
});
|
|
11400
|
-
};
|
|
11622
|
+
}, "CollectionProvider");
|
|
11401
11623
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
11402
11624
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
11403
11625
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
11404
11626
|
const CollectionSlot = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
11405
11627
|
const { scope, children } = props;
|
|
11406
11628
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
11407
|
-
const composedRefs =
|
|
11629
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, context.collectionRef);
|
|
11408
11630
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CollectionSlotImpl, {
|
|
11409
11631
|
ref: composedRefs,
|
|
11410
11632
|
children
|
|
@@ -11417,7 +11639,7 @@ function createCollection(name) {
|
|
|
11417
11639
|
const CollectionItemSlot = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
11418
11640
|
const { scope, children, ...itemData } = props;
|
|
11419
11641
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
11420
|
-
const composedRefs =
|
|
11642
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, ref);
|
|
11421
11643
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
11422
11644
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11423
11645
|
context.itemMap.set(ref, {
|
|
@@ -11450,6 +11672,7 @@ function createCollection(name) {
|
|
|
11450
11672
|
]);
|
|
11451
11673
|
return getItems;
|
|
11452
11674
|
}
|
|
11675
|
+
react_collection_dist_name(useCollection, "useCollection");
|
|
11453
11676
|
return [
|
|
11454
11677
|
{
|
|
11455
11678
|
Provider: CollectionProvider,
|
|
@@ -11460,21 +11683,501 @@ function createCollection(name) {
|
|
|
11460
11683
|
createCollectionScope
|
|
11461
11684
|
];
|
|
11462
11685
|
}
|
|
11686
|
+
react_collection_dist_name(createCollection, "createCollection");
|
|
11687
|
+
var __instanciated = /* @__PURE__ */ new WeakMap();
|
|
11688
|
+
var OrderedDict = class _OrderedDict extends Map {
|
|
11689
|
+
static{
|
|
11690
|
+
react_collection_dist_name(this, "OrderedDict");
|
|
11691
|
+
}
|
|
11692
|
+
#keys;
|
|
11693
|
+
constructor(entries){
|
|
11694
|
+
super(entries);
|
|
11695
|
+
this.#keys = [
|
|
11696
|
+
...super.keys()
|
|
11697
|
+
];
|
|
11698
|
+
__instanciated.set(this, true);
|
|
11699
|
+
}
|
|
11700
|
+
set(key, value1) {
|
|
11701
|
+
if (__instanciated.get(this)) if (this.has(key)) this.#keys[this.#keys.indexOf(key)] = key;
|
|
11702
|
+
else this.#keys.push(key);
|
|
11703
|
+
super.set(key, value1);
|
|
11704
|
+
return this;
|
|
11705
|
+
}
|
|
11706
|
+
insert(index, key, value1) {
|
|
11707
|
+
const has = this.has(key);
|
|
11708
|
+
const length = this.#keys.length;
|
|
11709
|
+
const relativeIndex = toSafeInteger(index);
|
|
11710
|
+
let actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;
|
|
11711
|
+
const safeIndex = actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;
|
|
11712
|
+
if (safeIndex === this.size || has && safeIndex === this.size - 1 || -1 === safeIndex) {
|
|
11713
|
+
this.set(key, value1);
|
|
11714
|
+
return this;
|
|
11715
|
+
}
|
|
11716
|
+
const size = this.size + (has ? 0 : 1);
|
|
11717
|
+
if (relativeIndex < 0) actualIndex++;
|
|
11718
|
+
const keys = [
|
|
11719
|
+
...this.#keys
|
|
11720
|
+
];
|
|
11721
|
+
let nextValue;
|
|
11722
|
+
let shouldSkip = false;
|
|
11723
|
+
for(let i = actualIndex; i < size; i++)if (actualIndex === i) {
|
|
11724
|
+
let nextKey = keys[i];
|
|
11725
|
+
if (keys[i] === key) nextKey = keys[i + 1];
|
|
11726
|
+
if (has) this.delete(key);
|
|
11727
|
+
nextValue = this.get(nextKey);
|
|
11728
|
+
this.set(key, value1);
|
|
11729
|
+
} else {
|
|
11730
|
+
if (!shouldSkip && keys[i - 1] === key) shouldSkip = true;
|
|
11731
|
+
const currentKey = keys[shouldSkip ? i : i - 1];
|
|
11732
|
+
const currentValue = nextValue;
|
|
11733
|
+
nextValue = this.get(currentKey);
|
|
11734
|
+
this.delete(currentKey);
|
|
11735
|
+
this.set(currentKey, currentValue);
|
|
11736
|
+
}
|
|
11737
|
+
return this;
|
|
11738
|
+
}
|
|
11739
|
+
with(index, key, value1) {
|
|
11740
|
+
const copy = new _OrderedDict(this);
|
|
11741
|
+
copy.insert(index, key, value1);
|
|
11742
|
+
return copy;
|
|
11743
|
+
}
|
|
11744
|
+
before(key) {
|
|
11745
|
+
const index = this.#keys.indexOf(key) - 1;
|
|
11746
|
+
if (index < 0) return;
|
|
11747
|
+
return this.entryAt(index);
|
|
11748
|
+
}
|
|
11749
|
+
setBefore(key, newKey, value1) {
|
|
11750
|
+
const index = this.#keys.indexOf(key);
|
|
11751
|
+
if (-1 === index) return this;
|
|
11752
|
+
return this.insert(index, newKey, value1);
|
|
11753
|
+
}
|
|
11754
|
+
after(key) {
|
|
11755
|
+
let index = this.#keys.indexOf(key);
|
|
11756
|
+
index = -1 === index || index === this.size - 1 ? -1 : index + 1;
|
|
11757
|
+
if (-1 === index) return;
|
|
11758
|
+
return this.entryAt(index);
|
|
11759
|
+
}
|
|
11760
|
+
setAfter(key, newKey, value1) {
|
|
11761
|
+
const index = this.#keys.indexOf(key);
|
|
11762
|
+
if (-1 === index) return this;
|
|
11763
|
+
return this.insert(index + 1, newKey, value1);
|
|
11764
|
+
}
|
|
11765
|
+
first() {
|
|
11766
|
+
return this.entryAt(0);
|
|
11767
|
+
}
|
|
11768
|
+
last() {
|
|
11769
|
+
return this.entryAt(-1);
|
|
11770
|
+
}
|
|
11771
|
+
clear() {
|
|
11772
|
+
this.#keys = [];
|
|
11773
|
+
return super.clear();
|
|
11774
|
+
}
|
|
11775
|
+
delete(key) {
|
|
11776
|
+
const deleted = super.delete(key);
|
|
11777
|
+
if (deleted) this.#keys.splice(this.#keys.indexOf(key), 1);
|
|
11778
|
+
return deleted;
|
|
11779
|
+
}
|
|
11780
|
+
deleteAt(index) {
|
|
11781
|
+
const key = this.keyAt(index);
|
|
11782
|
+
if (void 0 !== key) return this.delete(key);
|
|
11783
|
+
return false;
|
|
11784
|
+
}
|
|
11785
|
+
at(index) {
|
|
11786
|
+
const key = at(this.#keys, index);
|
|
11787
|
+
if (void 0 !== key) return this.get(key);
|
|
11788
|
+
}
|
|
11789
|
+
entryAt(index) {
|
|
11790
|
+
const key = at(this.#keys, index);
|
|
11791
|
+
if (void 0 !== key) return [
|
|
11792
|
+
key,
|
|
11793
|
+
this.get(key)
|
|
11794
|
+
];
|
|
11795
|
+
}
|
|
11796
|
+
indexOf(key) {
|
|
11797
|
+
return this.#keys.indexOf(key);
|
|
11798
|
+
}
|
|
11799
|
+
keyAt(index) {
|
|
11800
|
+
return at(this.#keys, index);
|
|
11801
|
+
}
|
|
11802
|
+
from(key, offset) {
|
|
11803
|
+
const index = this.indexOf(key);
|
|
11804
|
+
if (-1 === index) return;
|
|
11805
|
+
let dest = index + offset;
|
|
11806
|
+
if (dest < 0) dest = 0;
|
|
11807
|
+
if (dest >= this.size) dest = this.size - 1;
|
|
11808
|
+
return this.at(dest);
|
|
11809
|
+
}
|
|
11810
|
+
keyFrom(key, offset) {
|
|
11811
|
+
const index = this.indexOf(key);
|
|
11812
|
+
if (-1 === index) return;
|
|
11813
|
+
let dest = index + offset;
|
|
11814
|
+
if (dest < 0) dest = 0;
|
|
11815
|
+
if (dest >= this.size) dest = this.size - 1;
|
|
11816
|
+
return this.keyAt(dest);
|
|
11817
|
+
}
|
|
11818
|
+
find(predicate, thisArg) {
|
|
11819
|
+
let index = 0;
|
|
11820
|
+
for (const entry of this){
|
|
11821
|
+
if (Reflect.apply(predicate, thisArg, [
|
|
11822
|
+
entry,
|
|
11823
|
+
index,
|
|
11824
|
+
this
|
|
11825
|
+
])) return entry;
|
|
11826
|
+
index++;
|
|
11827
|
+
}
|
|
11828
|
+
}
|
|
11829
|
+
findIndex(predicate, thisArg) {
|
|
11830
|
+
let index = 0;
|
|
11831
|
+
for (const entry of this){
|
|
11832
|
+
if (Reflect.apply(predicate, thisArg, [
|
|
11833
|
+
entry,
|
|
11834
|
+
index,
|
|
11835
|
+
this
|
|
11836
|
+
])) return index;
|
|
11837
|
+
index++;
|
|
11838
|
+
}
|
|
11839
|
+
return -1;
|
|
11840
|
+
}
|
|
11841
|
+
filter(predicate, thisArg) {
|
|
11842
|
+
const entries = [];
|
|
11843
|
+
let index = 0;
|
|
11844
|
+
for (const entry of this){
|
|
11845
|
+
if (Reflect.apply(predicate, thisArg, [
|
|
11846
|
+
entry,
|
|
11847
|
+
index,
|
|
11848
|
+
this
|
|
11849
|
+
])) entries.push(entry);
|
|
11850
|
+
index++;
|
|
11851
|
+
}
|
|
11852
|
+
return new _OrderedDict(entries);
|
|
11853
|
+
}
|
|
11854
|
+
map(callbackfn, thisArg) {
|
|
11855
|
+
const entries = [];
|
|
11856
|
+
let index = 0;
|
|
11857
|
+
for (const entry of this){
|
|
11858
|
+
entries.push([
|
|
11859
|
+
entry[0],
|
|
11860
|
+
Reflect.apply(callbackfn, thisArg, [
|
|
11861
|
+
entry,
|
|
11862
|
+
index,
|
|
11863
|
+
this
|
|
11864
|
+
])
|
|
11865
|
+
]);
|
|
11866
|
+
index++;
|
|
11867
|
+
}
|
|
11868
|
+
return new _OrderedDict(entries);
|
|
11869
|
+
}
|
|
11870
|
+
reduce(...args) {
|
|
11871
|
+
const [callbackfn, initialValue] = args;
|
|
11872
|
+
let index = 0;
|
|
11873
|
+
let accumulator = initialValue ?? this.at(0);
|
|
11874
|
+
for (const entry of this){
|
|
11875
|
+
accumulator = 0 === index && 1 === args.length ? entry : Reflect.apply(callbackfn, this, [
|
|
11876
|
+
accumulator,
|
|
11877
|
+
entry,
|
|
11878
|
+
index,
|
|
11879
|
+
this
|
|
11880
|
+
]);
|
|
11881
|
+
index++;
|
|
11882
|
+
}
|
|
11883
|
+
return accumulator;
|
|
11884
|
+
}
|
|
11885
|
+
reduceRight(...args) {
|
|
11886
|
+
const [callbackfn, initialValue] = args;
|
|
11887
|
+
let accumulator = initialValue ?? this.at(-1);
|
|
11888
|
+
for(let index = this.size - 1; index >= 0; index--){
|
|
11889
|
+
const entry = this.at(index);
|
|
11890
|
+
accumulator = index === this.size - 1 && 1 === args.length ? entry : Reflect.apply(callbackfn, this, [
|
|
11891
|
+
accumulator,
|
|
11892
|
+
entry,
|
|
11893
|
+
index,
|
|
11894
|
+
this
|
|
11895
|
+
]);
|
|
11896
|
+
}
|
|
11897
|
+
return accumulator;
|
|
11898
|
+
}
|
|
11899
|
+
toSorted(compareFn) {
|
|
11900
|
+
const entries = [
|
|
11901
|
+
...this.entries()
|
|
11902
|
+
].sort(compareFn);
|
|
11903
|
+
return new _OrderedDict(entries);
|
|
11904
|
+
}
|
|
11905
|
+
toReversed() {
|
|
11906
|
+
const reversed = new _OrderedDict();
|
|
11907
|
+
for(let index = this.size - 1; index >= 0; index--){
|
|
11908
|
+
const key = this.keyAt(index);
|
|
11909
|
+
const element = this.get(key);
|
|
11910
|
+
reversed.set(key, element);
|
|
11911
|
+
}
|
|
11912
|
+
return reversed;
|
|
11913
|
+
}
|
|
11914
|
+
toSpliced(...args) {
|
|
11915
|
+
const entries = [
|
|
11916
|
+
...this.entries()
|
|
11917
|
+
];
|
|
11918
|
+
entries.splice(...args);
|
|
11919
|
+
return new _OrderedDict(entries);
|
|
11920
|
+
}
|
|
11921
|
+
slice(start, end) {
|
|
11922
|
+
const result = new _OrderedDict();
|
|
11923
|
+
let stop = this.size - 1;
|
|
11924
|
+
if (void 0 === start) return result;
|
|
11925
|
+
if (start < 0) start += this.size;
|
|
11926
|
+
if (void 0 !== end && end > 0) stop = end - 1;
|
|
11927
|
+
for(let index = start; index <= stop; index++){
|
|
11928
|
+
const key = this.keyAt(index);
|
|
11929
|
+
const element = this.get(key);
|
|
11930
|
+
result.set(key, element);
|
|
11931
|
+
}
|
|
11932
|
+
return result;
|
|
11933
|
+
}
|
|
11934
|
+
every(predicate, thisArg) {
|
|
11935
|
+
let index = 0;
|
|
11936
|
+
for (const entry of this){
|
|
11937
|
+
if (!Reflect.apply(predicate, thisArg, [
|
|
11938
|
+
entry,
|
|
11939
|
+
index,
|
|
11940
|
+
this
|
|
11941
|
+
])) return false;
|
|
11942
|
+
index++;
|
|
11943
|
+
}
|
|
11944
|
+
return true;
|
|
11945
|
+
}
|
|
11946
|
+
some(predicate, thisArg) {
|
|
11947
|
+
let index = 0;
|
|
11948
|
+
for (const entry of this){
|
|
11949
|
+
if (Reflect.apply(predicate, thisArg, [
|
|
11950
|
+
entry,
|
|
11951
|
+
index,
|
|
11952
|
+
this
|
|
11953
|
+
])) return true;
|
|
11954
|
+
index++;
|
|
11955
|
+
}
|
|
11956
|
+
return false;
|
|
11957
|
+
}
|
|
11958
|
+
};
|
|
11959
|
+
function at(array, index) {
|
|
11960
|
+
if ("at" in Array.prototype) return Array.prototype.at.call(array, index);
|
|
11961
|
+
const actualIndex = toSafeIndex(array, index);
|
|
11962
|
+
return -1 === actualIndex ? void 0 : array[actualIndex];
|
|
11963
|
+
}
|
|
11964
|
+
react_collection_dist_name(at, "at");
|
|
11965
|
+
function toSafeIndex(array, index) {
|
|
11966
|
+
const length = array.length;
|
|
11967
|
+
const relativeIndex = toSafeInteger(index);
|
|
11968
|
+
const actualIndex = relativeIndex >= 0 ? relativeIndex : length + relativeIndex;
|
|
11969
|
+
return actualIndex < 0 || actualIndex >= length ? -1 : actualIndex;
|
|
11970
|
+
}
|
|
11971
|
+
react_collection_dist_name(toSafeIndex, "toSafeIndex");
|
|
11972
|
+
function toSafeInteger(number) {
|
|
11973
|
+
return number !== number || 0 === number ? 0 : Math.trunc(number);
|
|
11974
|
+
}
|
|
11975
|
+
react_collection_dist_name(toSafeInteger, "toSafeInteger");
|
|
11976
|
+
function createCollection2(name) {
|
|
11977
|
+
const PROVIDER_NAME = name + "CollectionProvider";
|
|
11978
|
+
const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);
|
|
11979
|
+
const [CollectionContextProvider, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
11980
|
+
collectionElement: null,
|
|
11981
|
+
collectionRef: {
|
|
11982
|
+
current: null
|
|
11983
|
+
},
|
|
11984
|
+
collectionRefObject: {
|
|
11985
|
+
current: null
|
|
11986
|
+
},
|
|
11987
|
+
itemMap: new OrderedDict(),
|
|
11988
|
+
setItemMap: /* @__PURE__ */ react_collection_dist_name(()=>void 0, "setItemMap")
|
|
11989
|
+
});
|
|
11990
|
+
const CollectionProvider = /* @__PURE__ */ react_collection_dist_name(({ state, ...props })=>state ? /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CollectionProviderImpl, {
|
|
11991
|
+
...props,
|
|
11992
|
+
state
|
|
11993
|
+
}) : /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CollectionInit, {
|
|
11994
|
+
...props
|
|
11995
|
+
}), "CollectionProvider");
|
|
11996
|
+
CollectionProvider.displayName = PROVIDER_NAME;
|
|
11997
|
+
const CollectionInit = /* @__PURE__ */ react_collection_dist_name((props)=>{
|
|
11998
|
+
const state = useInitCollection();
|
|
11999
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CollectionProviderImpl, {
|
|
12000
|
+
...props,
|
|
12001
|
+
state
|
|
12002
|
+
});
|
|
12003
|
+
}, "CollectionInit");
|
|
12004
|
+
CollectionInit.displayName = PROVIDER_NAME + "Init";
|
|
12005
|
+
const CollectionProviderImpl = /* @__PURE__ */ react_collection_dist_name((props)=>{
|
|
12006
|
+
const { scope, children, state } = props;
|
|
12007
|
+
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
12008
|
+
const [collectionElement, setCollectionElement] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
12009
|
+
const composeRefs = dist_useComposedRefs(ref, setCollectionElement);
|
|
12010
|
+
const [itemMap, setItemMap] = state;
|
|
12011
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
12012
|
+
if (!collectionElement) return;
|
|
12013
|
+
const observer = getChildListObserver(()=>{});
|
|
12014
|
+
observer.observe(collectionElement, {
|
|
12015
|
+
childList: true,
|
|
12016
|
+
subtree: true
|
|
12017
|
+
});
|
|
12018
|
+
return ()=>{
|
|
12019
|
+
observer.disconnect();
|
|
12020
|
+
};
|
|
12021
|
+
}, [
|
|
12022
|
+
collectionElement
|
|
12023
|
+
]);
|
|
12024
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CollectionContextProvider, {
|
|
12025
|
+
scope,
|
|
12026
|
+
itemMap,
|
|
12027
|
+
setItemMap,
|
|
12028
|
+
collectionRef: composeRefs,
|
|
12029
|
+
collectionRefObject: ref,
|
|
12030
|
+
collectionElement,
|
|
12031
|
+
children
|
|
12032
|
+
});
|
|
12033
|
+
}, "CollectionProviderImpl");
|
|
12034
|
+
CollectionProviderImpl.displayName = PROVIDER_NAME + "Impl";
|
|
12035
|
+
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
12036
|
+
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
12037
|
+
const CollectionSlot = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
12038
|
+
const { scope, children } = props;
|
|
12039
|
+
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
12040
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, context.collectionRef);
|
|
12041
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CollectionSlotImpl, {
|
|
12042
|
+
ref: composedRefs,
|
|
12043
|
+
children
|
|
12044
|
+
});
|
|
12045
|
+
});
|
|
12046
|
+
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
12047
|
+
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
12048
|
+
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
12049
|
+
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
12050
|
+
const CollectionItemSlot = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
12051
|
+
const { scope, children, ...itemData } = props;
|
|
12052
|
+
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
12053
|
+
const [element, setElement] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
12054
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, ref, setElement);
|
|
12055
|
+
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
12056
|
+
const { setItemMap } = context;
|
|
12057
|
+
const itemDataRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(itemData);
|
|
12058
|
+
if (!shallowEqual(itemDataRef.current, itemData)) itemDataRef.current = itemData;
|
|
12059
|
+
const memoizedItemData = itemDataRef.current;
|
|
12060
|
+
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
12061
|
+
const itemData2 = memoizedItemData;
|
|
12062
|
+
setItemMap((map)=>{
|
|
12063
|
+
if (!element) return map;
|
|
12064
|
+
if (!map.has(element)) {
|
|
12065
|
+
map.set(element, {
|
|
12066
|
+
...itemData2,
|
|
12067
|
+
element
|
|
12068
|
+
});
|
|
12069
|
+
return map.toSorted(sortByDocumentPosition);
|
|
12070
|
+
}
|
|
12071
|
+
return map.set(element, {
|
|
12072
|
+
...itemData2,
|
|
12073
|
+
element
|
|
12074
|
+
}).toSorted(sortByDocumentPosition);
|
|
12075
|
+
});
|
|
12076
|
+
return ()=>{
|
|
12077
|
+
setItemMap((map)=>{
|
|
12078
|
+
if (!element || !map.has(element)) return map;
|
|
12079
|
+
map.delete(element);
|
|
12080
|
+
return new OrderedDict(map);
|
|
12081
|
+
});
|
|
12082
|
+
};
|
|
12083
|
+
}, [
|
|
12084
|
+
element,
|
|
12085
|
+
memoizedItemData,
|
|
12086
|
+
setItemMap
|
|
12087
|
+
]);
|
|
12088
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CollectionItemSlotImpl, {
|
|
12089
|
+
...{
|
|
12090
|
+
[ITEM_DATA_ATTR]: ""
|
|
12091
|
+
},
|
|
12092
|
+
ref: composedRefs,
|
|
12093
|
+
children
|
|
12094
|
+
});
|
|
12095
|
+
});
|
|
12096
|
+
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
12097
|
+
function useInitCollection() {
|
|
12098
|
+
return __WEBPACK_EXTERNAL_MODULE_react__.useState(new OrderedDict());
|
|
12099
|
+
}
|
|
12100
|
+
react_collection_dist_name(useInitCollection, "useInitCollection");
|
|
12101
|
+
function useCollection(scope) {
|
|
12102
|
+
const { itemMap } = useCollectionContext(name + "CollectionConsumer", scope);
|
|
12103
|
+
return itemMap;
|
|
12104
|
+
}
|
|
12105
|
+
react_collection_dist_name(useCollection, "useCollection");
|
|
12106
|
+
const functions = {
|
|
12107
|
+
createCollectionScope,
|
|
12108
|
+
useCollection,
|
|
12109
|
+
useInitCollection
|
|
12110
|
+
};
|
|
12111
|
+
return [
|
|
12112
|
+
{
|
|
12113
|
+
Provider: CollectionProvider,
|
|
12114
|
+
Slot: CollectionSlot,
|
|
12115
|
+
ItemSlot: CollectionItemSlot
|
|
12116
|
+
},
|
|
12117
|
+
functions
|
|
12118
|
+
];
|
|
12119
|
+
}
|
|
12120
|
+
react_collection_dist_name(createCollection2, "createCollection");
|
|
12121
|
+
function shallowEqual(a, b) {
|
|
12122
|
+
if (a === b) return true;
|
|
12123
|
+
if ("object" != typeof a || "object" != typeof b) return false;
|
|
12124
|
+
if (null == a || null == b) return false;
|
|
12125
|
+
const keysA = Object.keys(a);
|
|
12126
|
+
const keysB = Object.keys(b);
|
|
12127
|
+
if (keysA.length !== keysB.length) return false;
|
|
12128
|
+
for (const key of keysA){
|
|
12129
|
+
if (!Object.prototype.hasOwnProperty.call(b, key)) return false;
|
|
12130
|
+
if (a[key] !== b[key]) return false;
|
|
12131
|
+
}
|
|
12132
|
+
return true;
|
|
12133
|
+
}
|
|
12134
|
+
react_collection_dist_name(shallowEqual, "shallowEqual");
|
|
12135
|
+
function isElementPreceding(a, b) {
|
|
12136
|
+
return !!(b.compareDocumentPosition(a) & Node.DOCUMENT_POSITION_PRECEDING);
|
|
12137
|
+
}
|
|
12138
|
+
react_collection_dist_name(isElementPreceding, "isElementPreceding");
|
|
12139
|
+
function sortByDocumentPosition(a, b) {
|
|
12140
|
+
return a[1].element && b[1].element ? isElementPreceding(a[1].element, b[1].element) ? -1 : 1 : 0;
|
|
12141
|
+
}
|
|
12142
|
+
react_collection_dist_name(sortByDocumentPosition, "sortByDocumentPosition");
|
|
12143
|
+
function getChildListObserver(callback) {
|
|
12144
|
+
const observer = new MutationObserver((mutationsList)=>{
|
|
12145
|
+
for (const mutation of mutationsList)if ("childList" === mutation.type) return void callback();
|
|
12146
|
+
});
|
|
12147
|
+
return observer;
|
|
12148
|
+
}
|
|
12149
|
+
react_collection_dist_name(getChildListObserver, "getChildListObserver");
|
|
11463
12150
|
"use client";
|
|
12151
|
+
var react_direction_dist_defProp = Object.defineProperty;
|
|
12152
|
+
var react_direction_dist_name = (target, value1)=>react_direction_dist_defProp(target, "name", {
|
|
12153
|
+
value: value1,
|
|
12154
|
+
configurable: true
|
|
12155
|
+
});
|
|
11464
12156
|
var DirectionContext = __WEBPACK_EXTERNAL_MODULE_react__.createContext(void 0);
|
|
11465
12157
|
function useDirection(localDir) {
|
|
11466
12158
|
const globalDir = __WEBPACK_EXTERNAL_MODULE_react__.useContext(DirectionContext);
|
|
11467
12159
|
return localDir || globalDir || "ltr";
|
|
11468
12160
|
}
|
|
11469
|
-
|
|
12161
|
+
react_direction_dist_name(useDirection, "useDirection");
|
|
12162
|
+
var react_use_callback_ref_dist_defProp = Object.defineProperty;
|
|
12163
|
+
var react_use_callback_ref_dist_name = (target, value1)=>react_use_callback_ref_dist_defProp(target, "name", {
|
|
12164
|
+
value: value1,
|
|
12165
|
+
configurable: true
|
|
12166
|
+
});
|
|
12167
|
+
function dist_useCallbackRef(callback) {
|
|
11470
12168
|
const callbackRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(callback);
|
|
11471
12169
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11472
12170
|
callbackRef.current = callback;
|
|
11473
12171
|
});
|
|
11474
12172
|
return __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>(...args)=>callbackRef.current?.(...args), []);
|
|
11475
12173
|
}
|
|
12174
|
+
react_use_callback_ref_dist_name(dist_useCallbackRef, "useCallbackRef");
|
|
11476
12175
|
"use client";
|
|
11477
|
-
var
|
|
12176
|
+
var react_dismissable_layer_dist_defProp = Object.defineProperty;
|
|
12177
|
+
var react_dismissable_layer_dist_name = (target, value1)=>react_dismissable_layer_dist_defProp(target, "name", {
|
|
12178
|
+
value: value1,
|
|
12179
|
+
configurable: true
|
|
12180
|
+
});
|
|
11478
12181
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
11479
12182
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
11480
12183
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
@@ -11485,13 +12188,13 @@ var DismissableLayerContext = __WEBPACK_EXTERNAL_MODULE_react__.createContext({
|
|
|
11485
12188
|
branches: /* @__PURE__ */ new Set(),
|
|
11486
12189
|
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
11487
12190
|
});
|
|
11488
|
-
var DismissableLayer = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
12191
|
+
var DismissableLayer = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_dismissable_layer_dist_name(function(props, forwardedRef) {
|
|
11489
12192
|
const { disableOutsidePointerEvents = false, deferPointerDownOutside = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
|
|
11490
12193
|
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(DismissableLayerContext);
|
|
11491
12194
|
const [node, setNode] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
11492
12195
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
11493
12196
|
const [, force] = __WEBPACK_EXTERNAL_MODULE_react__.useState({});
|
|
11494
|
-
const composedRefs =
|
|
12197
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, setNode);
|
|
11495
12198
|
const layers = Array.from(context.layers);
|
|
11496
12199
|
const [highestLayerWithOutsidePointerEventsDisabled] = [
|
|
11497
12200
|
...context.layersWithOutsidePointerEventsDisabled
|
|
@@ -11533,7 +12236,7 @@ var DismissableLayer = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forw
|
|
|
11533
12236
|
if (!event.defaultPrevented) onDismiss?.();
|
|
11534
12237
|
}, ownerDocument);
|
|
11535
12238
|
const isHighestLayer = node ? index === layers.length - 1 : false;
|
|
11536
|
-
const handleKeyDown =
|
|
12239
|
+
const handleKeyDown = dist_useCallbackRef((event)=>{
|
|
11537
12240
|
if ("Escape" !== event.key) return;
|
|
11538
12241
|
onEscapeKeyDown?.(event);
|
|
11539
12242
|
if (!event.defaultPrevented && onDismiss) {
|
|
@@ -11587,49 +12290,42 @@ var DismissableLayer = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forw
|
|
|
11587
12290
|
context
|
|
11588
12291
|
]);
|
|
11589
12292
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11590
|
-
const handleUpdate = ()=>force({});
|
|
12293
|
+
const handleUpdate = /* @__PURE__ */ react_dismissable_layer_dist_name(()=>force({}), "handleUpdate");
|
|
11591
12294
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
11592
12295
|
return ()=>document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
11593
12296
|
}, []);
|
|
11594
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
12297
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
11595
12298
|
...layerProps,
|
|
11596
12299
|
ref: composedRefs,
|
|
11597
12300
|
style: {
|
|
11598
12301
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
11599
12302
|
...props.style
|
|
11600
12303
|
},
|
|
11601
|
-
onFocusCapture:
|
|
11602
|
-
onBlurCapture:
|
|
11603
|
-
onPointerDownCapture:
|
|
12304
|
+
onFocusCapture: dist_composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
12305
|
+
onBlurCapture: dist_composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
12306
|
+
onPointerDownCapture: dist_composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)
|
|
11604
12307
|
});
|
|
11605
|
-
});
|
|
11606
|
-
|
|
11607
|
-
var BRANCH_NAME = "DismissableLayerBranch";
|
|
11608
|
-
var DismissableLayerBranch = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
12308
|
+
}, "DismissableLayer"));
|
|
12309
|
+
function useDismissableLayerSurface() {
|
|
11609
12310
|
const context = __WEBPACK_EXTERNAL_MODULE_react__.useContext(DismissableLayerContext);
|
|
11610
|
-
const
|
|
11611
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
12311
|
+
const [node, setNode] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
11612
12312
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11613
|
-
|
|
11614
|
-
|
|
11615
|
-
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
};
|
|
11619
|
-
}
|
|
12313
|
+
if (!node) return;
|
|
12314
|
+
context.dismissableSurfaces.add(node);
|
|
12315
|
+
return ()=>{
|
|
12316
|
+
context.dismissableSurfaces.delete(node);
|
|
12317
|
+
};
|
|
11620
12318
|
}, [
|
|
11621
|
-
|
|
12319
|
+
node,
|
|
12320
|
+
context.dismissableSurfaces
|
|
11622
12321
|
]);
|
|
11623
|
-
return
|
|
11624
|
-
|
|
11625
|
-
|
|
11626
|
-
|
|
11627
|
-
});
|
|
11628
|
-
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
11629
|
-
var IS_TRUE = ()=>true;
|
|
12322
|
+
return setNode;
|
|
12323
|
+
}
|
|
12324
|
+
react_dismissable_layer_dist_name(useDismissableLayerSurface, "useDismissableLayerSurface");
|
|
12325
|
+
var IS_TRUE = /* @__PURE__ */ react_dismissable_layer_dist_name(()=>true, "IS_TRUE");
|
|
11630
12326
|
function usePointerDownOutside(onPointerDownOutside, args) {
|
|
11631
12327
|
const { ownerDocument = globalThis?.document, deferPointerDownOutside = false, isDeferredPointerDownOutsideRef, dismissableSurfaces, shouldHandlePointerDownOutside = IS_TRUE } = args;
|
|
11632
|
-
const handlePointerDownOutside =
|
|
12328
|
+
const handlePointerDownOutside = dist_useCallbackRef(onPointerDownOutside);
|
|
11633
12329
|
const isPointerInsideReactTreeRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
11634
12330
|
const isPointerDownOutsideRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
11635
12331
|
const interceptedOutsideInteractionEventsRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(/* @__PURE__ */ new Map());
|
|
@@ -11640,9 +12336,11 @@ function usePointerDownOutside(onPointerDownOutside, args) {
|
|
|
11640
12336
|
isDeferredPointerDownOutsideRef.current = false;
|
|
11641
12337
|
interceptedOutsideInteractionEventsRef.current.clear();
|
|
11642
12338
|
}
|
|
12339
|
+
react_dismissable_layer_dist_name(resetOutsideInteraction, "resetOutsideInteraction");
|
|
11643
12340
|
function isOutsideInteractionIntercepted() {
|
|
11644
12341
|
return Array.from(interceptedOutsideInteractionEventsRef.current.values()).some(Boolean);
|
|
11645
12342
|
}
|
|
12343
|
+
react_dismissable_layer_dist_name(isOutsideInteractionIntercepted, "isOutsideInteractionIntercepted");
|
|
11646
12344
|
function handleInteractionCapture(event) {
|
|
11647
12345
|
if (!isPointerDownOutsideRef.current) return;
|
|
11648
12346
|
const target = event.target;
|
|
@@ -11654,10 +12352,12 @@ function usePointerDownOutside(onPointerDownOutside, args) {
|
|
|
11654
12352
|
if (isPointerDownOutsideRef.current) handleClickRef.current();
|
|
11655
12353
|
}, 0);
|
|
11656
12354
|
}
|
|
12355
|
+
react_dismissable_layer_dist_name(handleInteractionCapture, "handleInteractionCapture");
|
|
11657
12356
|
function handleInteractionBubble(event) {
|
|
11658
12357
|
if (isPointerDownOutsideRef.current) interceptedOutsideInteractionEventsRef.current.set(event.type, false);
|
|
11659
12358
|
}
|
|
11660
|
-
|
|
12359
|
+
react_dismissable_layer_dist_name(handleInteractionBubble, "handleInteractionBubble");
|
|
12360
|
+
const handlePointerDown = /* @__PURE__ */ react_dismissable_layer_dist_name((event)=>{
|
|
11661
12361
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
11662
12362
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
11663
12363
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
@@ -11667,6 +12367,7 @@ function usePointerDownOutside(onPointerDownOutside, args) {
|
|
|
11667
12367
|
discrete: true
|
|
11668
12368
|
});
|
|
11669
12369
|
};
|
|
12370
|
+
react_dismissable_layer_dist_name(handleAndDispatchPointerDownOutsideEvent2, "handleAndDispatchPointerDownOutsideEvent");
|
|
11670
12371
|
if (!shouldHandlePointerDownOutside(event.target)) {
|
|
11671
12372
|
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
11672
12373
|
resetOutsideInteraction();
|
|
@@ -11691,7 +12392,7 @@ function usePointerDownOutside(onPointerDownOutside, args) {
|
|
|
11691
12392
|
resetOutsideInteraction();
|
|
11692
12393
|
}
|
|
11693
12394
|
isPointerInsideReactTreeRef.current = false;
|
|
11694
|
-
};
|
|
12395
|
+
}, "handlePointerDown");
|
|
11695
12396
|
const outsideInteractionEvents = [
|
|
11696
12397
|
"pointerup",
|
|
11697
12398
|
"mousedown",
|
|
@@ -11725,14 +12426,15 @@ function usePointerDownOutside(onPointerDownOutside, args) {
|
|
|
11725
12426
|
shouldHandlePointerDownOutside
|
|
11726
12427
|
]);
|
|
11727
12428
|
return {
|
|
11728
|
-
onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true
|
|
12429
|
+
onPointerDownCapture: /* @__PURE__ */ react_dismissable_layer_dist_name(()=>isPointerInsideReactTreeRef.current = true, "onPointerDownCapture")
|
|
11729
12430
|
};
|
|
11730
12431
|
}
|
|
12432
|
+
react_dismissable_layer_dist_name(usePointerDownOutside, "usePointerDownOutside");
|
|
11731
12433
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
11732
|
-
const handleFocusOutside =
|
|
12434
|
+
const handleFocusOutside = dist_useCallbackRef(onFocusOutside);
|
|
11733
12435
|
const isFocusInsideReactTreeRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
11734
12436
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11735
|
-
const handleFocus = (event)=>{
|
|
12437
|
+
const handleFocus = /* @__PURE__ */ react_dismissable_layer_dist_name((event)=>{
|
|
11736
12438
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
11737
12439
|
const eventDetail = {
|
|
11738
12440
|
originalEvent: event
|
|
@@ -11741,7 +12443,7 @@ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
|
11741
12443
|
discrete: false
|
|
11742
12444
|
});
|
|
11743
12445
|
}
|
|
11744
|
-
};
|
|
12446
|
+
}, "handleFocus");
|
|
11745
12447
|
ownerDocument.addEventListener("focusin", handleFocus);
|
|
11746
12448
|
return ()=>ownerDocument.removeEventListener("focusin", handleFocus);
|
|
11747
12449
|
}, [
|
|
@@ -11749,14 +12451,16 @@ function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
|
11749
12451
|
handleFocusOutside
|
|
11750
12452
|
]);
|
|
11751
12453
|
return {
|
|
11752
|
-
onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true,
|
|
11753
|
-
onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false
|
|
12454
|
+
onFocusCapture: /* @__PURE__ */ react_dismissable_layer_dist_name(()=>isFocusInsideReactTreeRef.current = true, "onFocusCapture"),
|
|
12455
|
+
onBlurCapture: /* @__PURE__ */ react_dismissable_layer_dist_name(()=>isFocusInsideReactTreeRef.current = false, "onBlurCapture")
|
|
11754
12456
|
};
|
|
11755
12457
|
}
|
|
12458
|
+
react_dismissable_layer_dist_name(useFocusOutside, "useFocusOutside");
|
|
11756
12459
|
function dispatchUpdate() {
|
|
11757
12460
|
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
11758
12461
|
document.dispatchEvent(event);
|
|
11759
12462
|
}
|
|
12463
|
+
react_dismissable_layer_dist_name(dispatchUpdate, "dispatchUpdate");
|
|
11760
12464
|
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
11761
12465
|
const target = detail.originalEvent.target;
|
|
11762
12466
|
const event = new CustomEvent(name, {
|
|
@@ -11770,9 +12474,20 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
11770
12474
|
if (discrete) dispatchDiscreteCustomEvent(target, event);
|
|
11771
12475
|
else target.dispatchEvent(event);
|
|
11772
12476
|
}
|
|
12477
|
+
react_dismissable_layer_dist_name(handleAndDispatchCustomEvent, "handleAndDispatchCustomEvent");
|
|
11773
12478
|
"use client";
|
|
12479
|
+
var react_focus_guards_dist_defProp = Object.defineProperty;
|
|
12480
|
+
var react_focus_guards_dist_name = (target, value1)=>react_focus_guards_dist_defProp(target, "name", {
|
|
12481
|
+
value: value1,
|
|
12482
|
+
configurable: true
|
|
12483
|
+
});
|
|
11774
12484
|
var dist_count = 0;
|
|
11775
12485
|
var guards = null;
|
|
12486
|
+
function FocusGuards(props) {
|
|
12487
|
+
useFocusGuards();
|
|
12488
|
+
return props.children;
|
|
12489
|
+
}
|
|
12490
|
+
react_focus_guards_dist_name(FocusGuards, "FocusGuards");
|
|
11776
12491
|
function useFocusGuards() {
|
|
11777
12492
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
11778
12493
|
if (!guards) guards = {
|
|
@@ -11793,6 +12508,7 @@ function useFocusGuards() {
|
|
|
11793
12508
|
};
|
|
11794
12509
|
}, []);
|
|
11795
12510
|
}
|
|
12511
|
+
react_focus_guards_dist_name(useFocusGuards, "useFocusGuards");
|
|
11796
12512
|
function createFocusGuard() {
|
|
11797
12513
|
const element = document.createElement("span");
|
|
11798
12514
|
element.setAttribute("data-radix-focus-guard", "");
|
|
@@ -11803,21 +12519,26 @@ function createFocusGuard() {
|
|
|
11803
12519
|
element.style.pointerEvents = "none";
|
|
11804
12520
|
return element;
|
|
11805
12521
|
}
|
|
12522
|
+
react_focus_guards_dist_name(createFocusGuard, "createFocusGuard");
|
|
11806
12523
|
"use client";
|
|
12524
|
+
var react_focus_scope_dist_defProp = Object.defineProperty;
|
|
12525
|
+
var react_focus_scope_dist_name = (target, value1)=>react_focus_scope_dist_defProp(target, "name", {
|
|
12526
|
+
value: value1,
|
|
12527
|
+
configurable: true
|
|
12528
|
+
});
|
|
11807
12529
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
11808
12530
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
11809
12531
|
var EVENT_OPTIONS = {
|
|
11810
12532
|
bubbles: false,
|
|
11811
12533
|
cancelable: true
|
|
11812
12534
|
};
|
|
11813
|
-
var
|
|
11814
|
-
var FocusScope = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
12535
|
+
var FocusScope = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_focus_scope_dist_name(function(props, forwardedRef) {
|
|
11815
12536
|
const { loop = false, trapped = false, onMountAutoFocus: onMountAutoFocusProp, onUnmountAutoFocus: onUnmountAutoFocusProp, ...scopeProps } = props;
|
|
11816
12537
|
const [container, setContainer] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
11817
|
-
const onMountAutoFocus =
|
|
11818
|
-
const onUnmountAutoFocus =
|
|
12538
|
+
const onMountAutoFocus = dist_useCallbackRef(onMountAutoFocusProp);
|
|
12539
|
+
const onUnmountAutoFocus = dist_useCallbackRef(onUnmountAutoFocusProp);
|
|
11819
12540
|
const lastFocusedElementRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
11820
|
-
const composedRefs =
|
|
12541
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, setContainer);
|
|
11821
12542
|
const focusScope = __WEBPACK_EXTERNAL_MODULE_react__.useRef({
|
|
11822
12543
|
paused: false,
|
|
11823
12544
|
pause () {
|
|
@@ -11848,6 +12569,9 @@ var FocusScope = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
11848
12569
|
if (focusedElement !== document.body) return;
|
|
11849
12570
|
for (const mutation of mutations)if (mutation.removedNodes.length > 0) dist_focus(container);
|
|
11850
12571
|
};
|
|
12572
|
+
react_focus_scope_dist_name(handleFocusIn2, "handleFocusIn");
|
|
12573
|
+
react_focus_scope_dist_name(handleFocusOut2, "handleFocusOut");
|
|
12574
|
+
react_focus_scope_dist_name(handleMutations2, "handleMutations");
|
|
11851
12575
|
document.addEventListener("focusin", handleFocusIn2);
|
|
11852
12576
|
document.addEventListener("focusout", handleFocusOut2);
|
|
11853
12577
|
const mutationObserver = new MutationObserver(handleMutations2);
|
|
@@ -11931,14 +12655,13 @@ var FocusScope = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
11931
12655
|
trapped,
|
|
11932
12656
|
focusScope.paused
|
|
11933
12657
|
]);
|
|
11934
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
12658
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
11935
12659
|
tabIndex: -1,
|
|
11936
12660
|
...scopeProps,
|
|
11937
12661
|
ref: composedRefs,
|
|
11938
12662
|
onKeyDown: handleKeyDown
|
|
11939
12663
|
});
|
|
11940
|
-
});
|
|
11941
|
-
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
12664
|
+
}, "FocusScope"));
|
|
11942
12665
|
function focusFirst(candidates, { select = false } = {}) {
|
|
11943
12666
|
const previouslyFocusedElement = document.activeElement;
|
|
11944
12667
|
for (const candidate of candidates){
|
|
@@ -11948,6 +12671,7 @@ function focusFirst(candidates, { select = false } = {}) {
|
|
|
11948
12671
|
if (document.activeElement !== previouslyFocusedElement) return;
|
|
11949
12672
|
}
|
|
11950
12673
|
}
|
|
12674
|
+
react_focus_scope_dist_name(focusFirst, "focusFirst");
|
|
11951
12675
|
function getTabbableEdges(container) {
|
|
11952
12676
|
const candidates = getTabbableCandidates(container);
|
|
11953
12677
|
const first = findVisible(candidates, container);
|
|
@@ -11957,18 +12681,20 @@ function getTabbableEdges(container) {
|
|
|
11957
12681
|
last
|
|
11958
12682
|
];
|
|
11959
12683
|
}
|
|
12684
|
+
react_focus_scope_dist_name(getTabbableEdges, "getTabbableEdges");
|
|
11960
12685
|
function getTabbableCandidates(container) {
|
|
11961
12686
|
const nodes = [];
|
|
11962
12687
|
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
11963
|
-
acceptNode: (node)=>{
|
|
12688
|
+
acceptNode: /* @__PURE__ */ react_focus_scope_dist_name((node)=>{
|
|
11964
12689
|
const isHiddenInput = "INPUT" === node.tagName && "hidden" === node.type;
|
|
11965
12690
|
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
11966
12691
|
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
11967
|
-
}
|
|
12692
|
+
}, "acceptNode")
|
|
11968
12693
|
});
|
|
11969
12694
|
while(walker.nextNode())nodes.push(walker.currentNode);
|
|
11970
12695
|
return nodes;
|
|
11971
12696
|
}
|
|
12697
|
+
react_focus_scope_dist_name(getTabbableCandidates, "getTabbableCandidates");
|
|
11972
12698
|
function findVisible(elements, container) {
|
|
11973
12699
|
const canUseCheckVisibility = "function" == typeof container.checkVisibility && container.checkVisibility({
|
|
11974
12700
|
checkVisibilityCSS: true
|
|
@@ -11982,6 +12708,7 @@ function findVisible(elements, container) {
|
|
|
11982
12708
|
if (!hidden) return element;
|
|
11983
12709
|
}
|
|
11984
12710
|
}
|
|
12711
|
+
react_focus_scope_dist_name(findVisible, "findVisible");
|
|
11985
12712
|
function isHidden(node, { upTo }) {
|
|
11986
12713
|
if ("hidden" === getComputedStyle(node).visibility) return true;
|
|
11987
12714
|
while(node){
|
|
@@ -11991,9 +12718,11 @@ function isHidden(node, { upTo }) {
|
|
|
11991
12718
|
}
|
|
11992
12719
|
return false;
|
|
11993
12720
|
}
|
|
12721
|
+
react_focus_scope_dist_name(isHidden, "isHidden");
|
|
11994
12722
|
function isSelectableInput(element) {
|
|
11995
12723
|
return element instanceof HTMLInputElement && "select" in element;
|
|
11996
12724
|
}
|
|
12725
|
+
react_focus_scope_dist_name(isSelectableInput, "isSelectableInput");
|
|
11997
12726
|
function dist_focus(element, { select = false } = {}) {
|
|
11998
12727
|
if (element && element.focus) {
|
|
11999
12728
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -12003,6 +12732,7 @@ function dist_focus(element, { select = false } = {}) {
|
|
|
12003
12732
|
if (element !== previouslyFocusedElement && isSelectableInput(element) && select) element.select();
|
|
12004
12733
|
}
|
|
12005
12734
|
}
|
|
12735
|
+
react_focus_scope_dist_name(dist_focus, "focus");
|
|
12006
12736
|
var focusScopesStack = createFocusScopesStack();
|
|
12007
12737
|
function createFocusScopesStack() {
|
|
12008
12738
|
let stack = [];
|
|
@@ -12019,6 +12749,7 @@ function createFocusScopesStack() {
|
|
|
12019
12749
|
}
|
|
12020
12750
|
};
|
|
12021
12751
|
}
|
|
12752
|
+
react_focus_scope_dist_name(createFocusScopesStack, "createFocusScopesStack");
|
|
12022
12753
|
function arrayRemove(array, item) {
|
|
12023
12754
|
const updatedArray = [
|
|
12024
12755
|
...array
|
|
@@ -12027,20 +12758,11 @@ function arrayRemove(array, item) {
|
|
|
12027
12758
|
if (-1 !== index) updatedArray.splice(index, 1);
|
|
12028
12759
|
return updatedArray;
|
|
12029
12760
|
}
|
|
12761
|
+
react_focus_scope_dist_name(arrayRemove, "arrayRemove");
|
|
12030
12762
|
function removeLinks(items) {
|
|
12031
12763
|
return items.filter((item)=>"A" !== item.tagName);
|
|
12032
12764
|
}
|
|
12033
|
-
|
|
12034
|
-
var react_id_dist_count = 0;
|
|
12035
|
-
function useId(deterministicId) {
|
|
12036
|
-
const [id, setId] = __WEBPACK_EXTERNAL_MODULE_react__.useState(useReactId());
|
|
12037
|
-
useLayoutEffect2(()=>{
|
|
12038
|
-
if (!deterministicId) setId((reactId)=>reactId ?? String(react_id_dist_count++));
|
|
12039
|
-
}, [
|
|
12040
|
-
deterministicId
|
|
12041
|
-
]);
|
|
12042
|
-
return deterministicId || (id ? `radix-${id}` : "");
|
|
12043
|
-
}
|
|
12765
|
+
react_focus_scope_dist_name(removeLinks, "removeLinks");
|
|
12044
12766
|
const floating_ui_utils_sides = [
|
|
12045
12767
|
'top',
|
|
12046
12768
|
'right',
|
|
@@ -12152,12 +12874,12 @@ function getOppositePlacement(placement) {
|
|
|
12152
12874
|
return oppositeSideMap[side] + placement.slice(side.length);
|
|
12153
12875
|
}
|
|
12154
12876
|
function expandPaddingObject(padding) {
|
|
12877
|
+
var _padding$top, _padding$right, _padding$bottom, _padding$left;
|
|
12155
12878
|
return {
|
|
12156
|
-
top: 0,
|
|
12157
|
-
right: 0,
|
|
12158
|
-
bottom: 0,
|
|
12159
|
-
left: 0
|
|
12160
|
-
...padding
|
|
12879
|
+
top: null != (_padding$top = padding.top) ? _padding$top : 0,
|
|
12880
|
+
right: null != (_padding$right = padding.right) ? _padding$right : 0,
|
|
12881
|
+
bottom: null != (_padding$bottom = padding.bottom) ? _padding$bottom : 0,
|
|
12882
|
+
left: null != (_padding$left = padding.left) ? _padding$left : 0
|
|
12161
12883
|
};
|
|
12162
12884
|
}
|
|
12163
12885
|
function floating_ui_utils_getPaddingObject(padding) {
|
|
@@ -12223,14 +12945,8 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
12223
12945
|
y: reference.y
|
|
12224
12946
|
};
|
|
12225
12947
|
}
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
12229
|
-
break;
|
|
12230
|
-
case 'end':
|
|
12231
|
-
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
12232
|
-
break;
|
|
12233
|
-
}
|
|
12948
|
+
const alignment = floating_ui_utils_getAlignment(placement);
|
|
12949
|
+
if (alignment) coords[alignmentAxis] += commonAlign * ('end' === alignment ? 1 : -1) * (rtl && isVertical ? -1 : 1);
|
|
12234
12950
|
return coords;
|
|
12235
12951
|
}
|
|
12236
12952
|
async function detectOverflow(state, options) {
|
|
@@ -12254,10 +12970,7 @@ async function detectOverflow(state, options) {
|
|
|
12254
12970
|
height: rects.floating.height
|
|
12255
12971
|
} : rects.reference;
|
|
12256
12972
|
const offsetParent = await (null == platform.getOffsetParent ? void 0 : platform.getOffsetParent(elements.floating));
|
|
12257
|
-
const offsetScale = await (null == platform.isElement ? void 0 : platform.isElement(offsetParent))
|
|
12258
|
-
x: 1,
|
|
12259
|
-
y: 1
|
|
12260
|
-
} : {
|
|
12973
|
+
const offsetScale = await (null == platform.isElement ? void 0 : platform.isElement(offsetParent)) && await (null == platform.getScale ? void 0 : platform.getScale(offsetParent)) || {
|
|
12261
12974
|
x: 1,
|
|
12262
12975
|
y: 1
|
|
12263
12976
|
};
|
|
@@ -12365,12 +13078,11 @@ const floating_ui_core_arrow = (options)=>({
|
|
|
12365
13078
|
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
12366
13079
|
const minPadding = floating_ui_utils_min(paddingObject[minProp], largestPossiblePadding);
|
|
12367
13080
|
const maxPadding = floating_ui_utils_min(paddingObject[maxProp], largestPossiblePadding);
|
|
12368
|
-
const min$1 = minPadding;
|
|
12369
13081
|
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
12370
13082
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
12371
|
-
const offset = clamp(
|
|
12372
|
-
const shouldAddOffset = !middlewareData.arrow && null != floating_ui_utils_getAlignment(placement) && center !== offset && rects.reference[length] / 2 - (center <
|
|
12373
|
-
const alignmentOffset = shouldAddOffset ? center <
|
|
13083
|
+
const offset = clamp(minPadding, center, max);
|
|
13084
|
+
const shouldAddOffset = !middlewareData.arrow && null != floating_ui_utils_getAlignment(placement) && center !== offset && rects.reference[length] / 2 - (center < minPadding ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
13085
|
+
const alignmentOffset = shouldAddOffset ? center < minPadding ? center - minPadding : center - max : 0;
|
|
12374
13086
|
return {
|
|
12375
13087
|
[axis]: coords[axis] + alignmentOffset,
|
|
12376
13088
|
data: {
|
|
@@ -12597,24 +13309,13 @@ const shift = function(options) {
|
|
|
12597
13309
|
y
|
|
12598
13310
|
};
|
|
12599
13311
|
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
12600
|
-
const crossAxis = floating_ui_utils_getSideAxis(
|
|
13312
|
+
const crossAxis = floating_ui_utils_getSideAxis(placement);
|
|
12601
13313
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
12602
13314
|
let mainAxisCoord = coords[mainAxis];
|
|
12603
13315
|
let crossAxisCoord = coords[crossAxis];
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
const min = mainAxisCoord + overflow[minSide];
|
|
12608
|
-
const max = mainAxisCoord - overflow[maxSide];
|
|
12609
|
-
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
12610
|
-
}
|
|
12611
|
-
if (checkCrossAxis) {
|
|
12612
|
-
const minSide = 'y' === crossAxis ? 'top' : 'left';
|
|
12613
|
-
const maxSide = 'y' === crossAxis ? 'bottom' : 'right';
|
|
12614
|
-
const min = crossAxisCoord + overflow[minSide];
|
|
12615
|
-
const max = crossAxisCoord - overflow[maxSide];
|
|
12616
|
-
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
12617
|
-
}
|
|
13316
|
+
const clampCoord = (axis, coord)=>clamp(coord + overflow['y' === axis ? 'top' : 'left'], coord, coord - overflow['y' === axis ? 'bottom' : 'right']);
|
|
13317
|
+
if (checkMainAxis) mainAxisCoord = clampCoord(mainAxis, mainAxisCoord);
|
|
13318
|
+
if (checkCrossAxis) crossAxisCoord = clampCoord(crossAxis, crossAxisCoord);
|
|
12618
13319
|
const limitedCoords = limiter.fn({
|
|
12619
13320
|
...state,
|
|
12620
13321
|
[mainAxis]: mainAxisCoord,
|
|
@@ -12639,6 +13340,7 @@ const limitShift = function(options) {
|
|
|
12639
13340
|
return {
|
|
12640
13341
|
options,
|
|
12641
13342
|
fn (state) {
|
|
13343
|
+
var _rawOffset$mainAxis, _rawOffset$crossAxis;
|
|
12642
13344
|
const { x, y, placement, rects, middlewareData } = state;
|
|
12643
13345
|
const { offset = 0, mainAxis: checkMainAxis = true, crossAxis: checkCrossAxis = true } = floating_ui_utils_evaluate(options, state);
|
|
12644
13346
|
const coords = {
|
|
@@ -12654,9 +13356,8 @@ const limitShift = function(options) {
|
|
|
12654
13356
|
mainAxis: rawOffset,
|
|
12655
13357
|
crossAxis: 0
|
|
12656
13358
|
} : {
|
|
12657
|
-
mainAxis: 0,
|
|
12658
|
-
crossAxis: 0
|
|
12659
|
-
...rawOffset
|
|
13359
|
+
mainAxis: null != (_rawOffset$mainAxis = rawOffset.mainAxis) ? _rawOffset$mainAxis : 0,
|
|
13360
|
+
crossAxis: null != (_rawOffset$crossAxis = rawOffset.crossAxis) ? _rawOffset$crossAxis : 0
|
|
12660
13361
|
};
|
|
12661
13362
|
if (checkMainAxis) {
|
|
12662
13363
|
const len = 'y' === mainAxis ? 'height' : 'width';
|
|
@@ -12687,7 +13388,6 @@ const floating_ui_core_size = function(options) {
|
|
|
12687
13388
|
name: 'size',
|
|
12688
13389
|
options,
|
|
12689
13390
|
async fn (state) {
|
|
12690
|
-
var _state$middlewareData, _state$middlewareData2;
|
|
12691
13391
|
const { placement, rects, platform, elements } = state;
|
|
12692
13392
|
const { apply = ()=>{}, ...detectOverflowOptions } = floating_ui_utils_evaluate(options, state);
|
|
12693
13393
|
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
@@ -12708,19 +13408,14 @@ const floating_ui_core_size = function(options) {
|
|
|
12708
13408
|
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
12709
13409
|
const overflowAvailableHeight = floating_ui_utils_min(height - overflow[heightSide], maximumClippingHeight);
|
|
12710
13410
|
const overflowAvailableWidth = floating_ui_utils_min(width - overflow[widthSide], maximumClippingWidth);
|
|
12711
|
-
const
|
|
13411
|
+
const shiftData = state.middlewareData.shift;
|
|
13412
|
+
const noShift = !shiftData;
|
|
12712
13413
|
let availableHeight = overflowAvailableHeight;
|
|
12713
13414
|
let availableWidth = overflowAvailableWidth;
|
|
12714
|
-
if (null !=
|
|
12715
|
-
if (null !=
|
|
12716
|
-
if (noShift && !alignment)
|
|
12717
|
-
|
|
12718
|
-
const xMax = floating_ui_utils_max(overflow.right, 0);
|
|
12719
|
-
const yMin = floating_ui_utils_max(overflow.top, 0);
|
|
12720
|
-
const yMax = floating_ui_utils_max(overflow.bottom, 0);
|
|
12721
|
-
if (isYAxis) availableWidth = width - 2 * (0 !== xMin || 0 !== xMax ? xMin + xMax : floating_ui_utils_max(overflow.left, overflow.right));
|
|
12722
|
-
else availableHeight = height - 2 * (0 !== yMin || 0 !== yMax ? yMin + yMax : floating_ui_utils_max(overflow.top, overflow.bottom));
|
|
12723
|
-
}
|
|
13415
|
+
if (null != shiftData && shiftData.enabled.x) availableWidth = maximumClippingWidth;
|
|
13416
|
+
if (null != shiftData && shiftData.enabled.y) availableHeight = maximumClippingHeight;
|
|
13417
|
+
if (noShift && !alignment) if (isYAxis) availableWidth = width - 2 * floating_ui_utils_max(overflow.left, overflow.right);
|
|
13418
|
+
else availableHeight = height - 2 * floating_ui_utils_max(overflow.top, overflow.bottom);
|
|
12724
13419
|
await apply({
|
|
12725
13420
|
...state,
|
|
12726
13421
|
availableWidth,
|
|
@@ -12828,7 +13523,7 @@ function getParentNode(node) {
|
|
|
12828
13523
|
}
|
|
12829
13524
|
function getNearestOverflowAncestor(node) {
|
|
12830
13525
|
const parentNode = getParentNode(node);
|
|
12831
|
-
if (isLastTraversableNode(parentNode)) return node.ownerDocument
|
|
13526
|
+
if (isLastTraversableNode(parentNode)) return (node.ownerDocument || node).body;
|
|
12832
13527
|
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) return parentNode;
|
|
12833
13528
|
return getNearestOverflowAncestor(parentNode);
|
|
12834
13529
|
}
|
|
@@ -12894,8 +13589,7 @@ function getVisualOffsets(element) {
|
|
|
12894
13589
|
}
|
|
12895
13590
|
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
12896
13591
|
if (void 0 === isFixed) isFixed = false;
|
|
12897
|
-
|
|
12898
|
-
return isFixed;
|
|
13592
|
+
return !!floatingOffsetParent && isFixed && floatingOffsetParent === getWindow(element);
|
|
12899
13593
|
}
|
|
12900
13594
|
function floating_ui_dom_getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
12901
13595
|
if (void 0 === includeScale) includeScale = false;
|
|
@@ -12911,12 +13605,12 @@ function floating_ui_dom_getBoundingClientRect(element, includeScale, isFixedStr
|
|
|
12911
13605
|
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
12912
13606
|
let width = clientRect.width / scale.x;
|
|
12913
13607
|
let height = clientRect.height / scale.y;
|
|
12914
|
-
if (domElement) {
|
|
13608
|
+
if (domElement && offsetParent) {
|
|
12915
13609
|
const win = getWindow(domElement);
|
|
12916
|
-
const offsetWin =
|
|
13610
|
+
const offsetWin = isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
12917
13611
|
let currentWin = win;
|
|
12918
13612
|
let currentIFrame = getFrameElement(currentWin);
|
|
12919
|
-
while(currentIFrame &&
|
|
13613
|
+
while(currentIFrame && offsetWin !== currentWin){
|
|
12920
13614
|
const iframeScale = getScale(currentIFrame);
|
|
12921
13615
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
12922
13616
|
const css = floating_ui_utils_dom_getComputedStyle(currentIFrame);
|
|
@@ -12966,7 +13660,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
12966
13660
|
let scale = createCoords(1);
|
|
12967
13661
|
const offsets = createCoords(0);
|
|
12968
13662
|
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
12969
|
-
if (isOffsetParentAnElement || !
|
|
13663
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
12970
13664
|
if ('body' !== getNodeName(offsetParent) || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
|
|
12971
13665
|
if (isOffsetParentAnElement) {
|
|
12972
13666
|
const offsetRect = floating_ui_dom_getBoundingClientRect(offsetParent);
|
|
@@ -12984,15 +13678,14 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
12984
13678
|
};
|
|
12985
13679
|
}
|
|
12986
13680
|
function getClientRects(element) {
|
|
12987
|
-
return Array.from(element.getClientRects());
|
|
13681
|
+
return element.getClientRects ? Array.from(element.getClientRects()) : [];
|
|
12988
13682
|
}
|
|
12989
|
-
function getDocumentRect(
|
|
12990
|
-
const
|
|
12991
|
-
const
|
|
12992
|
-
const body = element.ownerDocument.body;
|
|
13683
|
+
function getDocumentRect(html) {
|
|
13684
|
+
const scroll = getNodeScroll(html);
|
|
13685
|
+
const body = html.ownerDocument.body;
|
|
12993
13686
|
const width = floating_ui_utils_max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
12994
13687
|
const height = floating_ui_utils_max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
12995
|
-
let x = -scroll.scrollLeft + getWindowScrollBarX(
|
|
13688
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(html);
|
|
12996
13689
|
const y = -scroll.scrollTop;
|
|
12997
13690
|
if ('rtl' === floating_ui_utils_dom_getComputedStyle(body).direction) x += floating_ui_utils_max(html.clientWidth, body.clientWidth) - width;
|
|
12998
13691
|
return {
|
|
@@ -13003,7 +13696,9 @@ function getDocumentRect(element) {
|
|
|
13003
13696
|
};
|
|
13004
13697
|
}
|
|
13005
13698
|
const SCROLLBAR_MAX = 25;
|
|
13006
|
-
function getViewportRect(element, strategy) {
|
|
13699
|
+
function getViewportRect(element, strategy, rootBoundary) {
|
|
13700
|
+
if (void 0 === rootBoundary) rootBoundary = 'viewport';
|
|
13701
|
+
const isLayoutViewport = 'layoutViewport' === rootBoundary;
|
|
13007
13702
|
const win = getWindow(element);
|
|
13008
13703
|
const html = getDocumentElement(element);
|
|
13009
13704
|
const visualViewport = win.visualViewport;
|
|
@@ -13012,12 +13707,19 @@ function getViewportRect(element, strategy) {
|
|
|
13012
13707
|
let x = 0;
|
|
13013
13708
|
let y = 0;
|
|
13014
13709
|
if (visualViewport) {
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
|
|
13019
|
-
|
|
13020
|
-
|
|
13710
|
+
const layoutRelativeClientCoords = !isWebKit() || 'fixed' === strategy;
|
|
13711
|
+
if (isLayoutViewport) {
|
|
13712
|
+
if (!layoutRelativeClientCoords) {
|
|
13713
|
+
x = -visualViewport.offsetLeft;
|
|
13714
|
+
y = -visualViewport.offsetTop;
|
|
13715
|
+
}
|
|
13716
|
+
} else {
|
|
13717
|
+
width = visualViewport.width;
|
|
13718
|
+
height = visualViewport.height;
|
|
13719
|
+
if (layoutRelativeClientCoords) {
|
|
13720
|
+
x = visualViewport.offsetLeft;
|
|
13721
|
+
y = visualViewport.offsetTop;
|
|
13722
|
+
}
|
|
13021
13723
|
}
|
|
13022
13724
|
}
|
|
13023
13725
|
const windowScrollbarX = getWindowScrollBarX(html);
|
|
@@ -13026,9 +13728,10 @@ function getViewportRect(element, strategy) {
|
|
|
13026
13728
|
const body = doc.body;
|
|
13027
13729
|
const bodyStyles = getComputedStyle(body);
|
|
13028
13730
|
const bodyMarginInline = 'CSS1Compat' === doc.compatMode ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
13029
|
-
const
|
|
13030
|
-
|
|
13031
|
-
|
|
13731
|
+
const reservedWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
13732
|
+
const gutter = 'stable both-edges' === getComputedStyle(html).scrollbarGutter ? reservedWidth / 2 : reservedWidth;
|
|
13733
|
+
if (gutter <= SCROLLBAR_MAX) width -= gutter;
|
|
13734
|
+
}
|
|
13032
13735
|
return {
|
|
13033
13736
|
width,
|
|
13034
13737
|
height,
|
|
@@ -13040,7 +13743,7 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
13040
13743
|
const clientRect = floating_ui_dom_getBoundingClientRect(element, true, 'fixed' === strategy);
|
|
13041
13744
|
const top = clientRect.top + element.clientTop;
|
|
13042
13745
|
const left = clientRect.left + element.clientLeft;
|
|
13043
|
-
const scale =
|
|
13746
|
+
const scale = getScale(element);
|
|
13044
13747
|
const width = element.clientWidth * scale.x;
|
|
13045
13748
|
const height = element.clientHeight * scale.y;
|
|
13046
13749
|
const x = left * scale.x;
|
|
@@ -13054,7 +13757,7 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
13054
13757
|
}
|
|
13055
13758
|
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
13056
13759
|
let rect;
|
|
13057
|
-
if ('viewport' === clippingAncestor) rect = getViewportRect(element, strategy);
|
|
13760
|
+
if ('viewport' === clippingAncestor || 'layoutViewport' === clippingAncestor) rect = getViewportRect(element, strategy, clippingAncestor);
|
|
13058
13761
|
else if ('document' === clippingAncestor) rect = getDocumentRect(getDocumentElement(element));
|
|
13059
13762
|
else if (isElement(clippingAncestor)) rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
13060
13763
|
else {
|
|
@@ -13068,25 +13771,20 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
13068
13771
|
}
|
|
13069
13772
|
return floating_ui_utils_rectToClientRect(rect);
|
|
13070
13773
|
}
|
|
13071
|
-
function hasFixedPositionAncestor(element, stopNode) {
|
|
13072
|
-
const parentNode = getParentNode(element);
|
|
13073
|
-
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) return false;
|
|
13074
|
-
return 'fixed' === floating_ui_utils_dom_getComputedStyle(parentNode).position || hasFixedPositionAncestor(parentNode, stopNode);
|
|
13075
|
-
}
|
|
13076
13774
|
function getClippingElementAncestors(element, cache) {
|
|
13077
13775
|
const cachedResult = cache.get(element);
|
|
13078
13776
|
if (cachedResult) return cachedResult;
|
|
13079
13777
|
let result = getOverflowAncestors(element, [], false).filter((el)=>isElement(el) && 'body' !== getNodeName(el));
|
|
13080
|
-
let
|
|
13778
|
+
let lastKeptComputedStyle = null;
|
|
13081
13779
|
const elementIsFixed = 'fixed' === floating_ui_utils_dom_getComputedStyle(element).position;
|
|
13082
13780
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
13083
13781
|
while(isElement(currentNode) && !isLastTraversableNode(currentNode)){
|
|
13084
13782
|
const computedStyle = floating_ui_utils_dom_getComputedStyle(currentNode);
|
|
13085
13783
|
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
13086
|
-
|
|
13087
|
-
const shouldDropCurrentNode =
|
|
13784
|
+
const lastPosition = lastKeptComputedStyle ? lastKeptComputedStyle.position : elementIsFixed ? 'fixed' : '';
|
|
13785
|
+
const shouldDropCurrentNode = !currentNodeIsContaining && ('fixed' === lastPosition || 'absolute' === lastPosition && 'static' === computedStyle.position);
|
|
13088
13786
|
if (shouldDropCurrentNode) result = result.filter((ancestor)=>ancestor !== currentNode);
|
|
13089
|
-
else
|
|
13787
|
+
else lastKeptComputedStyle = computedStyle;
|
|
13090
13788
|
currentNode = getParentNode(currentNode);
|
|
13091
13789
|
}
|
|
13092
13790
|
cache.set(element, result);
|
|
@@ -13135,18 +13833,15 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
13135
13833
|
scrollTop: 0
|
|
13136
13834
|
};
|
|
13137
13835
|
const offsets = createCoords(0);
|
|
13138
|
-
|
|
13139
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
13140
|
-
}
|
|
13141
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
13836
|
+
if (isOffsetParentAnElement || !isFixed) {
|
|
13142
13837
|
if ('body' !== getNodeName(offsetParent) || isOverflowElement(documentElement)) scroll = getNodeScroll(offsetParent);
|
|
13143
13838
|
if (isOffsetParentAnElement) {
|
|
13144
13839
|
const offsetRect = floating_ui_dom_getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
13145
13840
|
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
13146
13841
|
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
13147
|
-
}
|
|
13842
|
+
}
|
|
13148
13843
|
}
|
|
13149
|
-
if (
|
|
13844
|
+
if (!isOffsetParentAnElement && documentElement) offsets.x = getWindowScrollBarX(documentElement);
|
|
13150
13845
|
const htmlOffset = !documentElement || isOffsetParentAnElement || isFixed ? createCoords(0) : getHTMLOffset(documentElement, scroll);
|
|
13151
13846
|
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
13152
13847
|
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
@@ -13215,7 +13910,7 @@ const floating_ui_dom_platform = {
|
|
|
13215
13910
|
function rectsAreEqual(a, b) {
|
|
13216
13911
|
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
13217
13912
|
}
|
|
13218
|
-
function observeMove(element, onMove) {
|
|
13913
|
+
function observeMove(element, onMove, ancestorResize) {
|
|
13219
13914
|
let io = null;
|
|
13220
13915
|
let timeoutId;
|
|
13221
13916
|
const root = getDocumentElement(element);
|
|
@@ -13245,6 +13940,7 @@ function observeMove(element, onMove) {
|
|
|
13245
13940
|
let isFirstUpdate = true;
|
|
13246
13941
|
function handleObserve(entries) {
|
|
13247
13942
|
const ratio = entries[0].intersectionRatio;
|
|
13943
|
+
if (!rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) return refresh();
|
|
13248
13944
|
if (ratio !== threshold) {
|
|
13249
13945
|
if (!isFirstUpdate) return refresh();
|
|
13250
13946
|
if (ratio) refresh(false, ratio);
|
|
@@ -13252,7 +13948,6 @@ function observeMove(element, onMove) {
|
|
|
13252
13948
|
refresh(false, 1e-7);
|
|
13253
13949
|
}, 1000);
|
|
13254
13950
|
}
|
|
13255
|
-
if (1 === ratio && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) refresh();
|
|
13256
13951
|
isFirstUpdate = false;
|
|
13257
13952
|
}
|
|
13258
13953
|
try {
|
|
@@ -13265,8 +13960,14 @@ function observeMove(element, onMove) {
|
|
|
13265
13960
|
}
|
|
13266
13961
|
io.observe(element);
|
|
13267
13962
|
}
|
|
13963
|
+
const win = getWindow(element);
|
|
13964
|
+
const handleResize = ()=>refresh(ancestorResize);
|
|
13965
|
+
win.addEventListener('resize', handleResize);
|
|
13268
13966
|
refresh(true);
|
|
13269
|
-
return
|
|
13967
|
+
return ()=>{
|
|
13968
|
+
win.removeEventListener('resize', handleResize);
|
|
13969
|
+
cleanup();
|
|
13970
|
+
};
|
|
13270
13971
|
}
|
|
13271
13972
|
function autoUpdate(reference, floating, update, options) {
|
|
13272
13973
|
if (void 0 === options) options = {};
|
|
@@ -13277,12 +13978,10 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
13277
13978
|
...floating ? getOverflowAncestors(floating) : []
|
|
13278
13979
|
] : [];
|
|
13279
13980
|
ancestors.forEach((ancestor)=>{
|
|
13280
|
-
ancestorScroll && ancestor.addEventListener('scroll', update
|
|
13281
|
-
passive: true
|
|
13282
|
-
});
|
|
13981
|
+
ancestorScroll && ancestor.addEventListener('scroll', update);
|
|
13283
13982
|
ancestorResize && ancestor.addEventListener('resize', update);
|
|
13284
13983
|
});
|
|
13285
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
13984
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update, ancestorResize) : null;
|
|
13286
13985
|
let reobserveFrame = -1;
|
|
13287
13986
|
let resizeObserver = null;
|
|
13288
13987
|
if (elementResize) {
|
|
@@ -13332,11 +14031,9 @@ const floating_ui_dom_arrow = floating_ui_core_arrow;
|
|
|
13332
14031
|
const floating_ui_dom_limitShift = limitShift;
|
|
13333
14032
|
const floating_ui_dom_computePosition = (reference, floating, options)=>{
|
|
13334
14033
|
const cache = new Map();
|
|
13335
|
-
const mergedOptions = {
|
|
13336
|
-
platform: floating_ui_dom_platform,
|
|
13337
|
-
...options
|
|
13338
|
-
};
|
|
14034
|
+
const mergedOptions = null != options ? options : {};
|
|
13339
14035
|
const platformWithCache = {
|
|
14036
|
+
...floating_ui_dom_platform,
|
|
13340
14037
|
...mergedOptions.platform,
|
|
13341
14038
|
_c: cache
|
|
13342
14039
|
};
|
|
@@ -13645,10 +14342,14 @@ const floating_ui_react_dom_arrow = (options, deps)=>{
|
|
|
13645
14342
|
]
|
|
13646
14343
|
};
|
|
13647
14344
|
};
|
|
13648
|
-
var
|
|
13649
|
-
var
|
|
14345
|
+
var react_arrow_dist_defProp = Object.defineProperty;
|
|
14346
|
+
var react_arrow_dist_name = (target, value1)=>react_arrow_dist_defProp(target, "name", {
|
|
14347
|
+
value: value1,
|
|
14348
|
+
configurable: true
|
|
14349
|
+
});
|
|
14350
|
+
var Arrow = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_arrow_dist_name(function(props, forwardedRef) {
|
|
13650
14351
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
13651
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
14352
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.svg, {
|
|
13652
14353
|
...arrowProps,
|
|
13653
14354
|
ref: forwardedRef,
|
|
13654
14355
|
width,
|
|
@@ -13659,9 +14360,13 @@ var Arrow = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>
|
|
|
13659
14360
|
points: "0,0 30,0 15,10"
|
|
13660
14361
|
})
|
|
13661
14362
|
});
|
|
13662
|
-
});
|
|
13663
|
-
Arrow.displayName = NAME;
|
|
14363
|
+
}, "Arrow"));
|
|
13664
14364
|
var react_arrow_dist_Root = Arrow;
|
|
14365
|
+
var react_use_size_dist_defProp = Object.defineProperty;
|
|
14366
|
+
var react_use_size_dist_name = (target, value1)=>react_use_size_dist_defProp(target, "name", {
|
|
14367
|
+
value: value1,
|
|
14368
|
+
configurable: true
|
|
14369
|
+
});
|
|
13665
14370
|
function useSize(element) {
|
|
13666
14371
|
const [size, setSize] = __WEBPACK_EXTERNAL_MODULE_react__.useState(void 0);
|
|
13667
14372
|
useLayoutEffect2(()=>{
|
|
@@ -13701,11 +14406,17 @@ function useSize(element) {
|
|
|
13701
14406
|
]);
|
|
13702
14407
|
return size;
|
|
13703
14408
|
}
|
|
14409
|
+
react_use_size_dist_name(useSize, "useSize");
|
|
13704
14410
|
"use client";
|
|
14411
|
+
var react_popper_dist_defProp = Object.defineProperty;
|
|
14412
|
+
var react_popper_dist_name = (target, value1)=>react_popper_dist_defProp(target, "name", {
|
|
14413
|
+
value: value1,
|
|
14414
|
+
configurable: true
|
|
14415
|
+
});
|
|
13705
14416
|
var POPPER_NAME = "Popper";
|
|
13706
14417
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
13707
14418
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
13708
|
-
var Popper = (props)=>{
|
|
14419
|
+
var Popper = /* @__PURE__ */ react_popper_dist_name((props)=>{
|
|
13709
14420
|
const { __scopePopper, children } = props;
|
|
13710
14421
|
const [anchor, setAnchor] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
13711
14422
|
const [placementState, setPlacementState] = __WEBPACK_EXTERNAL_MODULE_react__.useState(void 0);
|
|
@@ -13717,10 +14428,9 @@ var Popper = (props)=>{
|
|
|
13717
14428
|
setPlacementState,
|
|
13718
14429
|
children
|
|
13719
14430
|
});
|
|
13720
|
-
};
|
|
13721
|
-
Popper.displayName = POPPER_NAME;
|
|
14431
|
+
}, "Popper");
|
|
13722
14432
|
var ANCHOR_NAME = "PopperAnchor";
|
|
13723
|
-
var PopperAnchor = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
14433
|
+
var PopperAnchor = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_popper_dist_name(function(props, forwardedRef) {
|
|
13724
14434
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
13725
14435
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
13726
14436
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
@@ -13731,7 +14441,7 @@ var PopperAnchor = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwarde
|
|
|
13731
14441
|
}, [
|
|
13732
14442
|
onAnchorChange
|
|
13733
14443
|
]);
|
|
13734
|
-
const composedRefs =
|
|
14444
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, callbackRef);
|
|
13735
14445
|
const anchorRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
13736
14446
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
13737
14447
|
if (!virtualRef) return;
|
|
@@ -13742,21 +14452,20 @@ var PopperAnchor = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwarde
|
|
|
13742
14452
|
const sideAndAlign = context.placementState && getSideAndAlignFromPlacement(context.placementState);
|
|
13743
14453
|
const placedSide = sideAndAlign?.[0];
|
|
13744
14454
|
const placedAlign = sideAndAlign?.[1];
|
|
13745
|
-
return virtualRef ? null : /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
14455
|
+
return virtualRef ? null : /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
13746
14456
|
"data-radix-popper-side": placedSide,
|
|
13747
14457
|
"data-radix-popper-align": placedAlign,
|
|
13748
14458
|
...anchorProps,
|
|
13749
14459
|
ref: composedRefs
|
|
13750
14460
|
});
|
|
13751
|
-
});
|
|
13752
|
-
PopperAnchor.displayName = ANCHOR_NAME;
|
|
14461
|
+
}, "PopperAnchor"));
|
|
13753
14462
|
var CONTENT_NAME = "PopperContent";
|
|
13754
14463
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
|
|
13755
|
-
var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
14464
|
+
var PopperContent = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_popper_dist_name(function(props, forwardedRef) {
|
|
13756
14465
|
const { __scopePopper, side = "bottom", sideOffset = 0, align = "center", alignOffset = 0, arrowPadding = 0, avoidCollisions = true, collisionBoundary = [], collisionPadding: collisionPaddingProp = 0, sticky = "partial", hideWhenDetached = false, updatePositionStrategy = "optimized", onPlaced, ...contentProps } = props;
|
|
13757
14466
|
const context = usePopperContext(CONTENT_NAME, __scopePopper);
|
|
13758
14467
|
const [content, setContent] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
13759
|
-
const composedRefs =
|
|
14468
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, setContent);
|
|
13760
14469
|
const [arrow, setArrow] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
13761
14470
|
const arrowSize = useSize(arrow);
|
|
13762
14471
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
@@ -13781,12 +14490,12 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13781
14490
|
const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({
|
|
13782
14491
|
strategy: "fixed",
|
|
13783
14492
|
placement: desiredPlacement,
|
|
13784
|
-
whileElementsMounted: (...args)=>{
|
|
14493
|
+
whileElementsMounted: /* @__PURE__ */ react_popper_dist_name((...args)=>{
|
|
13785
14494
|
const cleanup = autoUpdate(...args, {
|
|
13786
14495
|
animationFrame: "always" === updatePositionStrategy
|
|
13787
14496
|
});
|
|
13788
14497
|
return cleanup;
|
|
13789
|
-
},
|
|
14498
|
+
}, "whileElementsMounted"),
|
|
13790
14499
|
elements: {
|
|
13791
14500
|
reference: context.anchor
|
|
13792
14501
|
},
|
|
@@ -13806,14 +14515,14 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13806
14515
|
}),
|
|
13807
14516
|
floating_ui_react_dom_size({
|
|
13808
14517
|
...detectOverflowOptions,
|
|
13809
|
-
apply: ({ elements, rects, availableWidth, availableHeight })=>{
|
|
14518
|
+
apply: /* @__PURE__ */ react_popper_dist_name(({ elements, rects, availableWidth, availableHeight })=>{
|
|
13810
14519
|
const { width: anchorWidth, height: anchorHeight } = rects.reference;
|
|
13811
14520
|
const contentStyle = elements.floating.style;
|
|
13812
14521
|
contentStyle.setProperty("--radix-popper-available-width", `${availableWidth}px`);
|
|
13813
14522
|
contentStyle.setProperty("--radix-popper-available-height", `${availableHeight}px`);
|
|
13814
14523
|
contentStyle.setProperty("--radix-popper-anchor-width", `${anchorWidth}px`);
|
|
13815
14524
|
contentStyle.setProperty("--radix-popper-anchor-height", `${anchorHeight}px`);
|
|
13816
|
-
}
|
|
14525
|
+
}, "apply")
|
|
13817
14526
|
}),
|
|
13818
14527
|
arrow && floating_ui_react_dom_arrow({
|
|
13819
14528
|
element: arrow,
|
|
@@ -13841,7 +14550,7 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13841
14550
|
setPlacementState
|
|
13842
14551
|
]);
|
|
13843
14552
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
13844
|
-
const handlePlaced =
|
|
14553
|
+
const handlePlaced = dist_useCallbackRef(onPlaced);
|
|
13845
14554
|
useLayoutEffect2(()=>{
|
|
13846
14555
|
if (isPositioned) handlePlaced?.();
|
|
13847
14556
|
}, [
|
|
@@ -13883,20 +14592,19 @@ var PopperContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forward
|
|
|
13883
14592
|
arrowX,
|
|
13884
14593
|
arrowY,
|
|
13885
14594
|
shouldHideArrow: cannotCenterArrow,
|
|
13886
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
14595
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
13887
14596
|
"data-side": placedSide,
|
|
13888
14597
|
"data-align": placedAlign,
|
|
13889
14598
|
...contentProps,
|
|
13890
14599
|
ref: composedRefs,
|
|
13891
14600
|
style: {
|
|
13892
14601
|
...contentProps.style,
|
|
13893
|
-
animation: isPositioned ?
|
|
14602
|
+
animation: isPositioned ? contentProps.style?.animation : "none"
|
|
13894
14603
|
}
|
|
13895
14604
|
})
|
|
13896
14605
|
})
|
|
13897
14606
|
});
|
|
13898
|
-
});
|
|
13899
|
-
PopperContent.displayName = CONTENT_NAME;
|
|
14607
|
+
}, "PopperContent"));
|
|
13900
14608
|
var ARROW_NAME = "PopperArrow";
|
|
13901
14609
|
var OPPOSITE_SIDE = {
|
|
13902
14610
|
top: "bottom",
|
|
@@ -13904,7 +14612,7 @@ var OPPOSITE_SIDE = {
|
|
|
13904
14612
|
bottom: "top",
|
|
13905
14613
|
left: "right"
|
|
13906
14614
|
};
|
|
13907
|
-
var PopperArrow = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(function(props, forwardedRef) {
|
|
14615
|
+
var PopperArrow = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_popper_dist_name(function(props, forwardedRef) {
|
|
13908
14616
|
const { __scopePopper, ...arrowProps } = props;
|
|
13909
14617
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
13910
14618
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -13938,12 +14646,12 @@ var PopperArrow = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(function(props, f
|
|
|
13938
14646
|
}
|
|
13939
14647
|
})
|
|
13940
14648
|
});
|
|
13941
|
-
});
|
|
13942
|
-
PopperArrow.displayName = ARROW_NAME;
|
|
14649
|
+
}, "PopperArrow"));
|
|
13943
14650
|
function isNotNull(value1) {
|
|
13944
14651
|
return null !== value1;
|
|
13945
14652
|
}
|
|
13946
|
-
|
|
14653
|
+
react_popper_dist_name(isNotNull, "isNotNull");
|
|
14654
|
+
var transformOrigin = /* @__PURE__ */ react_popper_dist_name((options)=>({
|
|
13947
14655
|
name: "transformOrigin",
|
|
13948
14656
|
options,
|
|
13949
14657
|
fn (data) {
|
|
@@ -13982,7 +14690,7 @@ var transformOrigin = (options)=>({
|
|
|
13982
14690
|
}
|
|
13983
14691
|
};
|
|
13984
14692
|
}
|
|
13985
|
-
});
|
|
14693
|
+
}), "transformOrigin");
|
|
13986
14694
|
function getSideAndAlignFromPlacement(placement) {
|
|
13987
14695
|
const [side, align = "center"] = placement.split("-");
|
|
13988
14696
|
return [
|
|
@@ -13990,31 +14698,41 @@ function getSideAndAlignFromPlacement(placement) {
|
|
|
13990
14698
|
align
|
|
13991
14699
|
];
|
|
13992
14700
|
}
|
|
14701
|
+
react_popper_dist_name(getSideAndAlignFromPlacement, "getSideAndAlignFromPlacement");
|
|
13993
14702
|
var Root2 = Popper;
|
|
13994
14703
|
var Anchor = PopperAnchor;
|
|
13995
14704
|
var Content = PopperContent;
|
|
13996
14705
|
var dist_Arrow = PopperArrow;
|
|
13997
14706
|
"use client";
|
|
13998
|
-
var
|
|
13999
|
-
var
|
|
14707
|
+
var react_portal_dist_defProp = Object.defineProperty;
|
|
14708
|
+
var react_portal_dist_name = (target, value1)=>react_portal_dist_defProp(target, "name", {
|
|
14709
|
+
value: value1,
|
|
14710
|
+
configurable: true
|
|
14711
|
+
});
|
|
14712
|
+
var Portal = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_portal_dist_name(function(props, forwardedRef) {
|
|
14000
14713
|
const { container: containerProp, ...portalProps } = props;
|
|
14001
14714
|
const [mounted, setMounted] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
14002
14715
|
useLayoutEffect2(()=>setMounted(true), []);
|
|
14003
14716
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
14004
|
-
return container ? __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__.createPortal(/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
14717
|
+
return container ? __WEBPACK_EXTERNAL_MODULE_react_dom_7136dc57__.createPortal(/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
14005
14718
|
...portalProps,
|
|
14006
14719
|
ref: forwardedRef
|
|
14007
14720
|
}), container) : null;
|
|
14008
|
-
});
|
|
14009
|
-
Portal.displayName = PORTAL_NAME;
|
|
14721
|
+
}, "Portal"));
|
|
14010
14722
|
"use client";
|
|
14723
|
+
var react_presence_dist_defProp = Object.defineProperty;
|
|
14724
|
+
var react_presence_dist_name = (target, value1)=>react_presence_dist_defProp(target, "name", {
|
|
14725
|
+
value: value1,
|
|
14726
|
+
configurable: true
|
|
14727
|
+
});
|
|
14011
14728
|
function useStateMachine(initialState, machine) {
|
|
14012
14729
|
return __WEBPACK_EXTERNAL_MODULE_react__.useReducer((state, event)=>{
|
|
14013
14730
|
const nextState = machine[state][event];
|
|
14014
14731
|
return nextState ?? state;
|
|
14015
14732
|
}, initialState);
|
|
14016
14733
|
}
|
|
14017
|
-
|
|
14734
|
+
react_presence_dist_name(useStateMachine, "useStateMachine");
|
|
14735
|
+
var dist_Presence = /* @__PURE__ */ react_presence_dist_name((props)=>{
|
|
14018
14736
|
const { present, children } = props;
|
|
14019
14737
|
const presence = usePresence(present);
|
|
14020
14738
|
const child = "function" == typeof children ? children({
|
|
@@ -14025,8 +14743,7 @@ var Presence = (props)=>{
|
|
|
14025
14743
|
return forceMount || presence.isPresent ? __WEBPACK_EXTERNAL_MODULE_react__.cloneElement(child, {
|
|
14026
14744
|
ref
|
|
14027
14745
|
}) : null;
|
|
14028
|
-
};
|
|
14029
|
-
Presence.displayName = "Presence";
|
|
14746
|
+
}, "Presence");
|
|
14030
14747
|
function usePresence(present) {
|
|
14031
14748
|
const [node, setNode] = __WEBPACK_EXTERNAL_MODULE_react__.useState();
|
|
14032
14749
|
const stylesRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
@@ -14080,7 +14797,7 @@ function usePresence(present) {
|
|
|
14080
14797
|
if (node) {
|
|
14081
14798
|
let timeoutId;
|
|
14082
14799
|
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
14083
|
-
const handleAnimationEnd = (event)=>{
|
|
14800
|
+
const handleAnimationEnd = /* @__PURE__ */ react_presence_dist_name((event)=>{
|
|
14084
14801
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
14085
14802
|
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
|
|
14086
14803
|
if (event.target === node && isCurrentAnimation) {
|
|
@@ -14093,10 +14810,10 @@ function usePresence(present) {
|
|
|
14093
14810
|
});
|
|
14094
14811
|
}
|
|
14095
14812
|
}
|
|
14096
|
-
};
|
|
14097
|
-
const handleAnimationStart = (event)=>{
|
|
14813
|
+
}, "handleAnimationEnd");
|
|
14814
|
+
const handleAnimationStart = /* @__PURE__ */ react_presence_dist_name((event)=>{
|
|
14098
14815
|
if (event.target === node) prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
14099
|
-
};
|
|
14816
|
+
}, "handleAnimationStart");
|
|
14100
14817
|
node.addEventListener("animationstart", handleAnimationStart);
|
|
14101
14818
|
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
14102
14819
|
node.addEventListener("animationend", handleAnimationEnd);
|
|
@@ -14127,10 +14844,12 @@ function usePresence(present) {
|
|
|
14127
14844
|
}, [])
|
|
14128
14845
|
};
|
|
14129
14846
|
}
|
|
14847
|
+
react_presence_dist_name(usePresence, "usePresence");
|
|
14130
14848
|
function dist_setRef(ref, value1) {
|
|
14131
14849
|
if ("function" == typeof ref) return ref(value1);
|
|
14132
14850
|
if (null != ref) ref.current = value1;
|
|
14133
14851
|
}
|
|
14852
|
+
react_presence_dist_name(dist_setRef, "setRef");
|
|
14134
14853
|
function useStableComposedRefs(...refs) {
|
|
14135
14854
|
const refsRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(refs);
|
|
14136
14855
|
refsRef.current = refs;
|
|
@@ -14151,9 +14870,11 @@ function useStableComposedRefs(...refs) {
|
|
|
14151
14870
|
};
|
|
14152
14871
|
}, []);
|
|
14153
14872
|
}
|
|
14873
|
+
react_presence_dist_name(useStableComposedRefs, "useStableComposedRefs");
|
|
14154
14874
|
function getAnimationName(styles) {
|
|
14155
14875
|
return styles?.animationName || "none";
|
|
14156
14876
|
}
|
|
14877
|
+
react_presence_dist_name(getAnimationName, "getAnimationName");
|
|
14157
14878
|
function dist_getElementRef(element) {
|
|
14158
14879
|
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
14159
14880
|
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
@@ -14163,6 +14884,29 @@ function dist_getElementRef(element) {
|
|
|
14163
14884
|
if (mayWarn) return element.props.ref;
|
|
14164
14885
|
return element.props.ref || element.ref;
|
|
14165
14886
|
}
|
|
14887
|
+
react_presence_dist_name(dist_getElementRef, "getElementRef");
|
|
14888
|
+
var react_id_dist_defProp = Object.defineProperty;
|
|
14889
|
+
var react_id_dist_name = (target, value1)=>react_id_dist_defProp(target, "name", {
|
|
14890
|
+
value: value1,
|
|
14891
|
+
configurable: true
|
|
14892
|
+
});
|
|
14893
|
+
var useReactId = __WEBPACK_EXTERNAL_MODULE_react__[" useId ".trim().toString()] || (()=>void 0);
|
|
14894
|
+
var react_id_dist_count = 0;
|
|
14895
|
+
function dist_useId(deterministicId) {
|
|
14896
|
+
const [id, setId] = __WEBPACK_EXTERNAL_MODULE_react__.useState(useReactId());
|
|
14897
|
+
useLayoutEffect2(()=>{
|
|
14898
|
+
if (!deterministicId) setId((reactId)=>reactId ?? String(react_id_dist_count++));
|
|
14899
|
+
}, [
|
|
14900
|
+
deterministicId
|
|
14901
|
+
]);
|
|
14902
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
14903
|
+
}
|
|
14904
|
+
react_id_dist_name(dist_useId, "useId");
|
|
14905
|
+
var react_use_is_hydrated_dist_defProp = Object.defineProperty;
|
|
14906
|
+
var react_use_is_hydrated_dist_name = (target, value1)=>react_use_is_hydrated_dist_defProp(target, "name", {
|
|
14907
|
+
value: value1,
|
|
14908
|
+
configurable: true
|
|
14909
|
+
});
|
|
14166
14910
|
var _isHydrated = false;
|
|
14167
14911
|
function useIsHydrated() {
|
|
14168
14912
|
const [isHydrated, setIsHydrated] = __WEBPACK_EXTERNAL_MODULE_react__.useState(_isHydrated);
|
|
@@ -14174,15 +14918,23 @@ function useIsHydrated() {
|
|
|
14174
14918
|
}, []);
|
|
14175
14919
|
return isHydrated;
|
|
14176
14920
|
}
|
|
14921
|
+
react_use_is_hydrated_dist_name(useIsHydrated, "useIsHydrated");
|
|
14177
14922
|
var useReactSyncExternalStore = __WEBPACK_EXTERNAL_MODULE_react__[" useSyncExternalStore ".trim().toString()];
|
|
14178
14923
|
function dist_subscribe() {
|
|
14179
14924
|
return ()=>{};
|
|
14180
14925
|
}
|
|
14926
|
+
react_use_is_hydrated_dist_name(dist_subscribe, "subscribe");
|
|
14181
14927
|
function useIsHydratedModern() {
|
|
14182
14928
|
return useReactSyncExternalStore(dist_subscribe, ()=>true, ()=>false);
|
|
14183
14929
|
}
|
|
14930
|
+
react_use_is_hydrated_dist_name(useIsHydratedModern, "useIsHydratedModern");
|
|
14184
14931
|
var useIsHydrated2 = "function" == typeof useReactSyncExternalStore ? useIsHydratedModern : useIsHydrated;
|
|
14185
14932
|
"use client";
|
|
14933
|
+
var react_roving_focus_dist_defProp = Object.defineProperty;
|
|
14934
|
+
var react_roving_focus_dist_name = (target, value1)=>react_roving_focus_dist_defProp(target, "name", {
|
|
14935
|
+
value: value1,
|
|
14936
|
+
configurable: true
|
|
14937
|
+
});
|
|
14186
14938
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
|
|
14187
14939
|
var dist_EVENT_OPTIONS = {
|
|
14188
14940
|
bubbles: false,
|
|
@@ -14194,7 +14946,8 @@ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContext
|
|
|
14194
14946
|
dist_createCollectionScope
|
|
14195
14947
|
]);
|
|
14196
14948
|
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
|
14197
|
-
var RovingFocusGroup = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(
|
|
14949
|
+
var RovingFocusGroup = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_roving_focus_dist_name(function(props, forwardedRef) {
|
|
14950
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Collection.Provider, {
|
|
14198
14951
|
scope: props.__scopeRovingFocusGroup,
|
|
14199
14952
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Collection.Slot, {
|
|
14200
14953
|
scope: props.__scopeRovingFocusGroup,
|
|
@@ -14203,12 +14956,12 @@ var RovingFocusGroup = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forw
|
|
|
14203
14956
|
ref: forwardedRef
|
|
14204
14957
|
})
|
|
14205
14958
|
})
|
|
14206
|
-
})
|
|
14207
|
-
RovingFocusGroup
|
|
14208
|
-
var RovingFocusGroupImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
14959
|
+
});
|
|
14960
|
+
}, "RovingFocusGroup"));
|
|
14961
|
+
var RovingFocusGroupImpl = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_roving_focus_dist_name(function(props, forwardedRef) {
|
|
14209
14962
|
const { __scopeRovingFocusGroup, orientation, loop = false, dir, currentTabStopId: currentTabStopIdProp, defaultCurrentTabStopId, onCurrentTabStopIdChange, onEntryFocus, preventScrollOnEntryFocus = false, ...groupProps } = props;
|
|
14210
14963
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
14211
|
-
const composedRefs =
|
|
14964
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, ref);
|
|
14212
14965
|
const direction = useDirection(dir);
|
|
14213
14966
|
const [currentTabStopId, setCurrentTabStopId] = dist_useControllableState({
|
|
14214
14967
|
prop: currentTabStopIdProp,
|
|
@@ -14217,7 +14970,7 @@ var RovingFocusGroupImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
14217
14970
|
caller: GROUP_NAME
|
|
14218
14971
|
});
|
|
14219
14972
|
const [isTabbingBackOut, setIsTabbingBackOut] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
14220
|
-
const handleEntryFocus =
|
|
14973
|
+
const handleEntryFocus = dist_useCallbackRef(onEntryFocus);
|
|
14221
14974
|
const getItems = dist_useCollection(__scopeRovingFocusGroup);
|
|
14222
14975
|
const isClickFocusRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
14223
14976
|
const [focusableItemsCount, setFocusableItemsCount] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
|
|
@@ -14242,7 +14995,7 @@ var RovingFocusGroupImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
14242
14995
|
onItemShiftTab: __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>setIsTabbingBackOut(true), []),
|
|
14243
14996
|
onFocusableItemAdd: __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>setFocusableItemsCount((prevCount)=>prevCount + 1), []),
|
|
14244
14997
|
onFocusableItemRemove: __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>setFocusableItemsCount((prevCount)=>prevCount - 1), []),
|
|
14245
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
14998
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
14246
14999
|
tabIndex: isTabbingBackOut || 0 === focusableItemsCount ? -1 : 0,
|
|
14247
15000
|
"data-orientation": orientation,
|
|
14248
15001
|
...groupProps,
|
|
@@ -14251,10 +15004,10 @@ var RovingFocusGroupImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
14251
15004
|
outline: "none",
|
|
14252
15005
|
...props.style
|
|
14253
15006
|
},
|
|
14254
|
-
onMouseDown:
|
|
15007
|
+
onMouseDown: dist_composeEventHandlers(props.onMouseDown, ()=>{
|
|
14255
15008
|
isClickFocusRef.current = true;
|
|
14256
15009
|
}),
|
|
14257
|
-
onFocus:
|
|
15010
|
+
onFocus: dist_composeEventHandlers(props.onFocus, (event)=>{
|
|
14258
15011
|
const isKeyboardFocus = !isClickFocusRef.current;
|
|
14259
15012
|
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
14260
15013
|
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, dist_EVENT_OPTIONS);
|
|
@@ -14274,14 +15027,14 @@ var RovingFocusGroupImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
14274
15027
|
}
|
|
14275
15028
|
isClickFocusRef.current = false;
|
|
14276
15029
|
}),
|
|
14277
|
-
onBlur:
|
|
15030
|
+
onBlur: dist_composeEventHandlers(props.onBlur, ()=>setIsTabbingBackOut(false))
|
|
14278
15031
|
})
|
|
14279
15032
|
});
|
|
14280
|
-
});
|
|
15033
|
+
}, "RovingFocusGroupImpl"));
|
|
14281
15034
|
var ITEM_NAME = "RovingFocusGroupItem";
|
|
14282
|
-
var RovingFocusGroupItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
15035
|
+
var RovingFocusGroupItem = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_roving_focus_dist_name(function(props, forwardedRef) {
|
|
14283
15036
|
const { __scopeRovingFocusGroup, focusable = true, active = false, tabStopId, children, ...itemProps } = props;
|
|
14284
|
-
const autoId =
|
|
15037
|
+
const autoId = dist_useId();
|
|
14285
15038
|
const id = tabStopId || autoId;
|
|
14286
15039
|
const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);
|
|
14287
15040
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
@@ -14313,17 +15066,17 @@ var RovingFocusGroupItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
14313
15066
|
id,
|
|
14314
15067
|
focusable,
|
|
14315
15068
|
active,
|
|
14316
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
15069
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.span, {
|
|
14317
15070
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
14318
15071
|
"data-orientation": context.orientation,
|
|
14319
15072
|
...itemProps,
|
|
14320
15073
|
ref: forwardedRef,
|
|
14321
|
-
onMouseDown:
|
|
15074
|
+
onMouseDown: dist_composeEventHandlers(props.onMouseDown, (event)=>{
|
|
14322
15075
|
if (focusable) context.onItemFocus(id);
|
|
14323
15076
|
else event.preventDefault();
|
|
14324
15077
|
}),
|
|
14325
|
-
onFocus:
|
|
14326
|
-
onKeyDown:
|
|
15078
|
+
onFocus: dist_composeEventHandlers(props.onFocus, ()=>context.onItemFocus(id)),
|
|
15079
|
+
onKeyDown: dist_composeEventHandlers(props.onKeyDown, (event)=>{
|
|
14327
15080
|
if ("Tab" === event.key && event.shiftKey) return void context.onItemShiftTab();
|
|
14328
15081
|
if (event.target !== event.currentTarget) return;
|
|
14329
15082
|
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
|
|
@@ -14347,8 +15100,7 @@ var RovingFocusGroupItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
14347
15100
|
}) : children
|
|
14348
15101
|
})
|
|
14349
15102
|
});
|
|
14350
|
-
});
|
|
14351
|
-
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
15103
|
+
}, "RovingFocusGroupItem"));
|
|
14352
15104
|
var MAP_KEY_TO_FOCUS_INTENT = {
|
|
14353
15105
|
ArrowLeft: "prev",
|
|
14354
15106
|
ArrowUp: "prev",
|
|
@@ -14363,6 +15115,7 @@ function getDirectionAwareKey(key, dir) {
|
|
|
14363
15115
|
if ("rtl" !== dir) return key;
|
|
14364
15116
|
return "ArrowLeft" === key ? "ArrowRight" : "ArrowRight" === key ? "ArrowLeft" : key;
|
|
14365
15117
|
}
|
|
15118
|
+
react_roving_focus_dist_name(getDirectionAwareKey, "getDirectionAwareKey");
|
|
14366
15119
|
function getFocusIntent(event, orientation, dir) {
|
|
14367
15120
|
const key = getDirectionAwareKey(event.key, dir);
|
|
14368
15121
|
if ("vertical" === orientation && [
|
|
@@ -14375,6 +15128,7 @@ function getFocusIntent(event, orientation, dir) {
|
|
|
14375
15128
|
].includes(key)) return;
|
|
14376
15129
|
return MAP_KEY_TO_FOCUS_INTENT[key];
|
|
14377
15130
|
}
|
|
15131
|
+
react_roving_focus_dist_name(getFocusIntent, "getFocusIntent");
|
|
14378
15132
|
function dist_focusFirst(candidates, preventScroll = false) {
|
|
14379
15133
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
14380
15134
|
for (const candidate of candidates){
|
|
@@ -14385,9 +15139,11 @@ function dist_focusFirst(candidates, preventScroll = false) {
|
|
|
14385
15139
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
14386
15140
|
}
|
|
14387
15141
|
}
|
|
15142
|
+
react_roving_focus_dist_name(dist_focusFirst, "focusFirst");
|
|
14388
15143
|
function wrapArray(array, startIndex) {
|
|
14389
15144
|
return array.map((_, index)=>array[(startIndex + index) % array.length]);
|
|
14390
15145
|
}
|
|
15146
|
+
react_roving_focus_dist_name(wrapArray, "wrapArray");
|
|
14391
15147
|
var react_roving_focus_dist_Root = RovingFocusGroup;
|
|
14392
15148
|
var Item = RovingFocusGroupItem;
|
|
14393
15149
|
var getDefaultParent = function(originalTarget) {
|
|
@@ -15150,6 +15906,11 @@ var ReactRemoveScroll = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(function(pr
|
|
|
15150
15906
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
15151
15907
|
const Combination = ReactRemoveScroll;
|
|
15152
15908
|
"use client";
|
|
15909
|
+
var react_menu_dist_defProp = Object.defineProperty;
|
|
15910
|
+
var react_menu_dist_name = (target, value1)=>react_menu_dist_defProp(target, "name", {
|
|
15911
|
+
value: value1,
|
|
15912
|
+
configurable: true
|
|
15913
|
+
});
|
|
15153
15914
|
var SELECTION_KEYS = [
|
|
15154
15915
|
"Enter",
|
|
15155
15916
|
" "
|
|
@@ -15168,24 +15929,11 @@ var FIRST_LAST_KEYS = [
|
|
|
15168
15929
|
...FIRST_KEYS,
|
|
15169
15930
|
...LAST_KEYS
|
|
15170
15931
|
];
|
|
15171
|
-
|
|
15172
|
-
|
|
15173
|
-
|
|
15174
|
-
|
|
15175
|
-
|
|
15176
|
-
rtl: [
|
|
15177
|
-
...SELECTION_KEYS,
|
|
15178
|
-
"ArrowLeft"
|
|
15179
|
-
]
|
|
15180
|
-
};
|
|
15181
|
-
var SUB_CLOSE_KEYS = {
|
|
15182
|
-
ltr: [
|
|
15183
|
-
"ArrowLeft"
|
|
15184
|
-
],
|
|
15185
|
-
rtl: [
|
|
15186
|
-
"ArrowRight"
|
|
15187
|
-
]
|
|
15188
|
-
};
|
|
15932
|
+
[
|
|
15933
|
+
...SELECTION_KEYS
|
|
15934
|
+
], [
|
|
15935
|
+
...SELECTION_KEYS
|
|
15936
|
+
];
|
|
15189
15937
|
var MENU_NAME = "Menu";
|
|
15190
15938
|
var [dist_Collection, react_menu_dist_useCollection, react_menu_dist_createCollectionScope] = createCollection(MENU_NAME);
|
|
15191
15939
|
var [createMenuContext, createMenuScope] = createContextScope(MENU_NAME, [
|
|
@@ -15197,15 +15945,15 @@ var usePopperScope = createPopperScope();
|
|
|
15197
15945
|
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
15198
15946
|
var [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);
|
|
15199
15947
|
var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
15200
|
-
var Menu = (props)=>{
|
|
15948
|
+
var Menu = /* @__PURE__ */ react_menu_dist_name((props)=>{
|
|
15201
15949
|
const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;
|
|
15202
15950
|
const popperScope = usePopperScope(__scopeMenu);
|
|
15203
15951
|
const [content, setContent] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
15204
15952
|
const isUsingKeyboardRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
15205
|
-
const handleOpenChange =
|
|
15953
|
+
const handleOpenChange = dist_useCallbackRef(onOpenChange);
|
|
15206
15954
|
const direction = useDirection(dir);
|
|
15207
15955
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
15208
|
-
const handleKeyDown = ()=>{
|
|
15956
|
+
const handleKeyDown = /* @__PURE__ */ react_menu_dist_name(()=>{
|
|
15209
15957
|
isUsingKeyboardRef.current = true;
|
|
15210
15958
|
document.addEventListener("pointerdown", handlePointer, {
|
|
15211
15959
|
capture: true,
|
|
@@ -15215,8 +15963,8 @@ var Menu = (props)=>{
|
|
|
15215
15963
|
capture: true,
|
|
15216
15964
|
once: true
|
|
15217
15965
|
});
|
|
15218
|
-
};
|
|
15219
|
-
const handlePointer = ()=>isUsingKeyboardRef.current = false;
|
|
15966
|
+
}, "handleKeyDown");
|
|
15967
|
+
const handlePointer = /* @__PURE__ */ react_menu_dist_name(()=>isUsingKeyboardRef.current = false, "handlePointer");
|
|
15220
15968
|
document.addEventListener("keydown", handleKeyDown, {
|
|
15221
15969
|
capture: true
|
|
15222
15970
|
});
|
|
@@ -15234,7 +15982,7 @@ var Menu = (props)=>{
|
|
|
15234
15982
|
}, []);
|
|
15235
15983
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
15236
15984
|
if (!open) return;
|
|
15237
|
-
const handleBlur = ()=>handleOpenChange(false);
|
|
15985
|
+
const handleBlur = /* @__PURE__ */ react_menu_dist_name(()=>handleOpenChange(false), "handleBlur");
|
|
15238
15986
|
window.addEventListener("blur", handleBlur);
|
|
15239
15987
|
return ()=>window.removeEventListener("blur", handleBlur);
|
|
15240
15988
|
}, [
|
|
@@ -15261,10 +16009,8 @@ var Menu = (props)=>{
|
|
|
15261
16009
|
})
|
|
15262
16010
|
})
|
|
15263
16011
|
});
|
|
15264
|
-
};
|
|
15265
|
-
|
|
15266
|
-
var dist_ANCHOR_NAME = "MenuAnchor";
|
|
15267
|
-
var MenuAnchor = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16012
|
+
}, "Menu");
|
|
16013
|
+
var MenuAnchor = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_menu_dist_name(function(props, forwardedRef) {
|
|
15268
16014
|
const { __scopeMenu, ...anchorProps } = props;
|
|
15269
16015
|
const popperScope = usePopperScope(__scopeMenu);
|
|
15270
16016
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Anchor, {
|
|
@@ -15272,19 +16018,18 @@ var MenuAnchor = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
15272
16018
|
...anchorProps,
|
|
15273
16019
|
ref: forwardedRef
|
|
15274
16020
|
});
|
|
15275
|
-
});
|
|
15276
|
-
|
|
15277
|
-
var
|
|
15278
|
-
var [PortalProvider, usePortalContext] = createMenuContext(dist_PORTAL_NAME, {
|
|
16021
|
+
}, "MenuAnchor"));
|
|
16022
|
+
var PORTAL_NAME = "MenuPortal";
|
|
16023
|
+
var [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {
|
|
15279
16024
|
forceMount: void 0
|
|
15280
16025
|
});
|
|
15281
|
-
var MenuPortal = (props)=>{
|
|
16026
|
+
var MenuPortal = /* @__PURE__ */ react_menu_dist_name((props)=>{
|
|
15282
16027
|
const { __scopeMenu, forceMount, children, container } = props;
|
|
15283
|
-
const context = useMenuContext(
|
|
16028
|
+
const context = useMenuContext(PORTAL_NAME, __scopeMenu);
|
|
15284
16029
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(PortalProvider, {
|
|
15285
16030
|
scope: __scopeMenu,
|
|
15286
16031
|
forceMount,
|
|
15287
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16032
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Presence, {
|
|
15288
16033
|
present: forceMount || context.open,
|
|
15289
16034
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Portal, {
|
|
15290
16035
|
asChild: true,
|
|
@@ -15293,18 +16038,17 @@ var MenuPortal = (props)=>{
|
|
|
15293
16038
|
})
|
|
15294
16039
|
})
|
|
15295
16040
|
});
|
|
15296
|
-
};
|
|
15297
|
-
MenuPortal.displayName = dist_PORTAL_NAME;
|
|
16041
|
+
}, "MenuPortal");
|
|
15298
16042
|
var dist_CONTENT_NAME = "MenuContent";
|
|
15299
16043
|
var [MenuContentProvider, useMenuContentContext] = createMenuContext(dist_CONTENT_NAME);
|
|
15300
|
-
var MenuContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16044
|
+
var MenuContent = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_menu_dist_name(function(props, forwardedRef) {
|
|
15301
16045
|
const portalContext = usePortalContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15302
16046
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
15303
16047
|
const context = useMenuContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15304
16048
|
const rootContext = useMenuRootContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15305
16049
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Collection.Provider, {
|
|
15306
16050
|
scope: props.__scopeMenu,
|
|
15307
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16051
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Presence, {
|
|
15308
16052
|
present: forceMount || context.open,
|
|
15309
16053
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Collection.Slot, {
|
|
15310
16054
|
scope: props.__scopeMenu,
|
|
@@ -15318,11 +16062,11 @@ var MenuContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwarded
|
|
|
15318
16062
|
})
|
|
15319
16063
|
})
|
|
15320
16064
|
});
|
|
15321
|
-
});
|
|
15322
|
-
var MenuRootContentModal = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16065
|
+
}, "MenuContent"));
|
|
16066
|
+
var MenuRootContentModal = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_menu_dist_name(function(props, forwardedRef) {
|
|
15323
16067
|
const context = useMenuContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15324
16068
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
15325
|
-
const composedRefs =
|
|
16069
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, ref);
|
|
15326
16070
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
15327
16071
|
const content = ref.current;
|
|
15328
16072
|
if (content) return hideOthers(content);
|
|
@@ -15333,13 +16077,13 @@ var MenuRootContentModal = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
15333
16077
|
trapFocus: context.open,
|
|
15334
16078
|
disableOutsidePointerEvents: context.open,
|
|
15335
16079
|
disableOutsideScroll: true,
|
|
15336
|
-
onFocusOutside:
|
|
16080
|
+
onFocusOutside: dist_composeEventHandlers(props.onFocusOutside, (event)=>event.preventDefault(), {
|
|
15337
16081
|
checkForDefaultPrevented: false
|
|
15338
16082
|
}),
|
|
15339
16083
|
onDismiss: ()=>context.onOpenChange(false)
|
|
15340
16084
|
});
|
|
15341
|
-
});
|
|
15342
|
-
var MenuRootContentNonModal = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16085
|
+
}, "MenuRootContentModal"));
|
|
16086
|
+
var MenuRootContentNonModal = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_menu_dist_name(function(props, forwardedRef) {
|
|
15343
16087
|
const context = useMenuContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15344
16088
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuContentImpl, {
|
|
15345
16089
|
...props,
|
|
@@ -15349,9 +16093,9 @@ var MenuRootContentNonModal = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
15349
16093
|
disableOutsideScroll: false,
|
|
15350
16094
|
onDismiss: ()=>context.onOpenChange(false)
|
|
15351
16095
|
});
|
|
15352
|
-
});
|
|
16096
|
+
}, "MenuRootContentNonModal"));
|
|
15353
16097
|
var react_menu_dist_Slot = createSlot("MenuContent.ScrollLock");
|
|
15354
|
-
var MenuContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16098
|
+
var MenuContentImpl = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_menu_dist_name(function(props, forwardedRef) {
|
|
15355
16099
|
const { __scopeMenu, loop = false, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEntryFocus, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, disableOutsideScroll, ...contentProps } = props;
|
|
15356
16100
|
const context = useMenuContext(dist_CONTENT_NAME, __scopeMenu);
|
|
15357
16101
|
const rootContext = useMenuRootContext(dist_CONTENT_NAME, __scopeMenu);
|
|
@@ -15360,7 +16104,7 @@ var MenuContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwa
|
|
|
15360
16104
|
const getItems = react_menu_dist_useCollection(__scopeMenu);
|
|
15361
16105
|
const [currentItemId, setCurrentItemId] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
15362
16106
|
const contentRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
15363
|
-
const composedRefs =
|
|
16107
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, contentRef, context.onContentChange);
|
|
15364
16108
|
const timerRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(0);
|
|
15365
16109
|
const searchRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef("");
|
|
15366
16110
|
const pointerGraceTimerRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(0);
|
|
@@ -15372,7 +16116,7 @@ var MenuContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwa
|
|
|
15372
16116
|
as: react_menu_dist_Slot,
|
|
15373
16117
|
allowPinchZoom: true
|
|
15374
16118
|
} : void 0;
|
|
15375
|
-
const handleTypeaheadSearch = (key)=>{
|
|
16119
|
+
const handleTypeaheadSearch = /* @__PURE__ */ react_menu_dist_name((key)=>{
|
|
15376
16120
|
const search = searchRef.current + key;
|
|
15377
16121
|
const items = getItems().filter((item)=>!item.disabled);
|
|
15378
16122
|
const currentItem = document.activeElement;
|
|
@@ -15380,13 +16124,8 @@ var MenuContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwa
|
|
|
15380
16124
|
const values = items.map((item)=>item.textValue);
|
|
15381
16125
|
const nextMatch = getNextMatch(values, search, currentMatch);
|
|
15382
16126
|
const newItem = items.find((item)=>item.textValue === nextMatch)?.ref.current;
|
|
15383
|
-
(function updateSearch(value1) {
|
|
15384
|
-
searchRef.current = value1;
|
|
15385
|
-
window.clearTimeout(timerRef.current);
|
|
15386
|
-
if ("" !== value1) timerRef.current = window.setTimeout(()=>updateSearch(""), 1e3);
|
|
15387
|
-
})(search);
|
|
15388
16127
|
if (newItem) setTimeout(()=>newItem.focus());
|
|
15389
|
-
};
|
|
16128
|
+
}, "handleTypeaheadSearch");
|
|
15390
16129
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>()=>window.clearTimeout(timerRef.current), []);
|
|
15391
16130
|
useFocusGuards();
|
|
15392
16131
|
const isPointerMovingToSubmenu = __WEBPACK_EXTERNAL_MODULE_react__.useCallback((event)=>{
|
|
@@ -15422,7 +16161,7 @@ var MenuContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwa
|
|
|
15422
16161
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(FocusScope, {
|
|
15423
16162
|
asChild: true,
|
|
15424
16163
|
trapped: trapFocus,
|
|
15425
|
-
onMountAutoFocus:
|
|
16164
|
+
onMountAutoFocus: dist_composeEventHandlers(onOpenAutoFocus, (event)=>{
|
|
15426
16165
|
event.preventDefault();
|
|
15427
16166
|
contentRef.current?.focus({
|
|
15428
16167
|
preventScroll: true
|
|
@@ -15445,7 +16184,7 @@ var MenuContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwa
|
|
|
15445
16184
|
loop,
|
|
15446
16185
|
currentTabStopId: currentItemId,
|
|
15447
16186
|
onCurrentTabStopIdChange: setCurrentItemId,
|
|
15448
|
-
onEntryFocus:
|
|
16187
|
+
onEntryFocus: dist_composeEventHandlers(onEntryFocus, (event)=>{
|
|
15449
16188
|
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
|
|
15450
16189
|
}),
|
|
15451
16190
|
preventScrollOnEntryFocus: true,
|
|
@@ -15462,7 +16201,7 @@ var MenuContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwa
|
|
|
15462
16201
|
outline: "none",
|
|
15463
16202
|
...contentProps.style
|
|
15464
16203
|
},
|
|
15465
|
-
onKeyDown:
|
|
16204
|
+
onKeyDown: dist_composeEventHandlers(contentProps.onKeyDown, (event)=>{
|
|
15466
16205
|
const target = event.target;
|
|
15467
16206
|
const isKeyDownInside = target.closest("[data-radix-menu-content]") === event.currentTarget;
|
|
15468
16207
|
const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;
|
|
@@ -15480,13 +16219,13 @@ var MenuContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwa
|
|
|
15480
16219
|
if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();
|
|
15481
16220
|
react_menu_dist_focusFirst(candidateNodes);
|
|
15482
16221
|
}),
|
|
15483
|
-
onBlur:
|
|
16222
|
+
onBlur: dist_composeEventHandlers(props.onBlur, (event)=>{
|
|
15484
16223
|
if (!event.currentTarget.contains(event.target)) {
|
|
15485
16224
|
window.clearTimeout(timerRef.current);
|
|
15486
16225
|
searchRef.current = "";
|
|
15487
16226
|
}
|
|
15488
16227
|
}),
|
|
15489
|
-
onPointerMove:
|
|
16228
|
+
onPointerMove: dist_composeEventHandlers(props.onPointerMove, whenMouse((event)=>{
|
|
15490
16229
|
const target = event.target;
|
|
15491
16230
|
const pointerXHasChanged = lastPointerXRef.current !== event.clientX;
|
|
15492
16231
|
if (event.currentTarget.contains(target) && pointerXHasChanged) {
|
|
@@ -15501,37 +16240,17 @@ var MenuContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwa
|
|
|
15501
16240
|
})
|
|
15502
16241
|
})
|
|
15503
16242
|
});
|
|
15504
|
-
});
|
|
15505
|
-
MenuContent.displayName = dist_CONTENT_NAME;
|
|
15506
|
-
var dist_GROUP_NAME = "MenuGroup";
|
|
15507
|
-
var MenuGroup = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15508
|
-
const { __scopeMenu, ...groupProps } = props;
|
|
15509
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.div, {
|
|
15510
|
-
role: "group",
|
|
15511
|
-
...groupProps,
|
|
15512
|
-
ref: forwardedRef
|
|
15513
|
-
});
|
|
15514
|
-
});
|
|
15515
|
-
MenuGroup.displayName = dist_GROUP_NAME;
|
|
15516
|
-
var LABEL_NAME = "MenuLabel";
|
|
15517
|
-
var MenuLabel = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15518
|
-
const { __scopeMenu, ...labelProps } = props;
|
|
15519
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.div, {
|
|
15520
|
-
...labelProps,
|
|
15521
|
-
ref: forwardedRef
|
|
15522
|
-
});
|
|
15523
|
-
});
|
|
15524
|
-
MenuLabel.displayName = LABEL_NAME;
|
|
16243
|
+
}, "MenuContentImpl"));
|
|
15525
16244
|
var dist_ITEM_NAME = "MenuItem";
|
|
15526
16245
|
var ITEM_SELECT = "menu.itemSelect";
|
|
15527
|
-
var MenuItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16246
|
+
var MenuItem = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_menu_dist_name(function(props, forwardedRef) {
|
|
15528
16247
|
const { disabled = false, onSelect, ...itemProps } = props;
|
|
15529
16248
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
15530
16249
|
const rootContext = useMenuRootContext(dist_ITEM_NAME, props.__scopeMenu);
|
|
15531
16250
|
const contentContext = useMenuContentContext(dist_ITEM_NAME, props.__scopeMenu);
|
|
15532
|
-
const composedRefs =
|
|
16251
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, ref);
|
|
15533
16252
|
const isPointerDownRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
15534
|
-
const handleSelect = ()=>{
|
|
16253
|
+
const handleSelect = /* @__PURE__ */ react_menu_dist_name(()=>{
|
|
15535
16254
|
const menuItem = ref.current;
|
|
15536
16255
|
if (!disabled && menuItem) {
|
|
15537
16256
|
const itemSelectEvent = new CustomEvent(ITEM_SELECT, {
|
|
@@ -15545,20 +16264,20 @@ var MenuItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef
|
|
|
15545
16264
|
if (itemSelectEvent.defaultPrevented) isPointerDownRef.current = false;
|
|
15546
16265
|
else rootContext.onClose();
|
|
15547
16266
|
}
|
|
15548
|
-
};
|
|
16267
|
+
}, "handleSelect");
|
|
15549
16268
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuItemImpl, {
|
|
15550
16269
|
...itemProps,
|
|
15551
16270
|
ref: composedRefs,
|
|
15552
16271
|
disabled,
|
|
15553
|
-
onClick:
|
|
16272
|
+
onClick: dist_composeEventHandlers(props.onClick, handleSelect),
|
|
15554
16273
|
onPointerDown: (event)=>{
|
|
15555
16274
|
props.onPointerDown?.(event);
|
|
15556
16275
|
isPointerDownRef.current = true;
|
|
15557
16276
|
},
|
|
15558
|
-
onPointerUp:
|
|
16277
|
+
onPointerUp: dist_composeEventHandlers(props.onPointerUp, (event)=>{
|
|
15559
16278
|
if (!isPointerDownRef.current) event.currentTarget?.click();
|
|
15560
16279
|
}),
|
|
15561
|
-
onKeyDown:
|
|
16280
|
+
onKeyDown: dist_composeEventHandlers(props.onKeyDown, (event)=>{
|
|
15562
16281
|
if (disabled || event.target !== event.currentTarget) return;
|
|
15563
16282
|
const isTypingAhead = "" !== contentContext.searchRef.current;
|
|
15564
16283
|
if (isTypingAhead && " " === event.key) return;
|
|
@@ -15568,14 +16287,13 @@ var MenuItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef
|
|
|
15568
16287
|
}
|
|
15569
16288
|
})
|
|
15570
16289
|
});
|
|
15571
|
-
});
|
|
15572
|
-
|
|
15573
|
-
var MenuItemImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16290
|
+
}, "MenuItem"));
|
|
16291
|
+
var MenuItemImpl = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_menu_dist_name(function(props, forwardedRef) {
|
|
15574
16292
|
const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
|
|
15575
16293
|
const contentContext = useMenuContentContext(dist_ITEM_NAME, __scopeMenu);
|
|
15576
16294
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
15577
16295
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
15578
|
-
const composedRefs =
|
|
16296
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, ref);
|
|
15579
16297
|
const [isFocused, setIsFocused] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
15580
16298
|
const [textContent, setTextContent] = __WEBPACK_EXTERNAL_MODULE_react__.useState("");
|
|
15581
16299
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
@@ -15592,14 +16310,14 @@ var MenuItemImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwarde
|
|
|
15592
16310
|
asChild: true,
|
|
15593
16311
|
...rovingFocusGroupScope,
|
|
15594
16312
|
focusable: !disabled,
|
|
15595
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16313
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
15596
16314
|
role: "menuitem",
|
|
15597
16315
|
"data-highlighted": isFocused ? "" : void 0,
|
|
15598
16316
|
"aria-disabled": disabled || void 0,
|
|
15599
16317
|
"data-disabled": disabled ? "" : void 0,
|
|
15600
16318
|
...itemProps,
|
|
15601
16319
|
ref: composedRefs,
|
|
15602
|
-
onPointerMove:
|
|
16320
|
+
onPointerMove: dist_composeEventHandlers(props.onPointerMove, whenMouse((event)=>{
|
|
15603
16321
|
if (disabled) contentContext.onItemLeave(event);
|
|
15604
16322
|
else {
|
|
15605
16323
|
contentContext.onItemEnter(event);
|
|
@@ -15611,321 +16329,45 @@ var MenuItemImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwarde
|
|
|
15611
16329
|
}
|
|
15612
16330
|
}
|
|
15613
16331
|
})),
|
|
15614
|
-
onPointerLeave:
|
|
15615
|
-
onFocus:
|
|
15616
|
-
onBlur:
|
|
15617
|
-
})
|
|
15618
|
-
})
|
|
15619
|
-
});
|
|
15620
|
-
});
|
|
15621
|
-
var CHECKBOX_ITEM_NAME = "MenuCheckboxItem";
|
|
15622
|
-
var MenuCheckboxItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15623
|
-
const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
|
|
15624
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ItemIndicatorProvider, {
|
|
15625
|
-
scope: props.__scopeMenu,
|
|
15626
|
-
checked,
|
|
15627
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuItem, {
|
|
15628
|
-
role: "menuitemcheckbox",
|
|
15629
|
-
"aria-checked": isIndeterminate(checked) ? "mixed" : checked,
|
|
15630
|
-
...checkboxItemProps,
|
|
15631
|
-
ref: forwardedRef,
|
|
15632
|
-
"data-state": getCheckedState(checked),
|
|
15633
|
-
onSelect: composeEventHandlers(checkboxItemProps.onSelect, ()=>onCheckedChange?.(isIndeterminate(checked) ? true : !checked), {
|
|
15634
|
-
checkForDefaultPrevented: false
|
|
16332
|
+
onPointerLeave: dist_composeEventHandlers(props.onPointerLeave, whenMouse((event)=>contentContext.onItemLeave(event))),
|
|
16333
|
+
onFocus: dist_composeEventHandlers(props.onFocus, ()=>setIsFocused(true)),
|
|
16334
|
+
onBlur: dist_composeEventHandlers(props.onBlur, ()=>setIsFocused(false))
|
|
15635
16335
|
})
|
|
15636
16336
|
})
|
|
15637
16337
|
});
|
|
15638
|
-
});
|
|
15639
|
-
MenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
|
|
16338
|
+
}, "MenuItemImpl"));
|
|
15640
16339
|
var RADIO_GROUP_NAME = "MenuRadioGroup";
|
|
15641
16340
|
var [RadioGroupProvider, useRadioGroupContext] = createMenuContext(RADIO_GROUP_NAME, {
|
|
15642
16341
|
value: void 0,
|
|
15643
|
-
onValueChange: ()=>{}
|
|
15644
|
-
});
|
|
15645
|
-
var MenuRadioGroup = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15646
|
-
const { value: value1, onValueChange, ...groupProps } = props;
|
|
15647
|
-
const handleValueChange = useCallbackRef(onValueChange);
|
|
15648
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(RadioGroupProvider, {
|
|
15649
|
-
scope: props.__scopeMenu,
|
|
15650
|
-
value: value1,
|
|
15651
|
-
onValueChange: handleValueChange,
|
|
15652
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuGroup, {
|
|
15653
|
-
...groupProps,
|
|
15654
|
-
ref: forwardedRef
|
|
15655
|
-
})
|
|
15656
|
-
});
|
|
16342
|
+
onValueChange: /* @__PURE__ */ react_menu_dist_name(()=>{}, "onValueChange")
|
|
15657
16343
|
});
|
|
15658
|
-
MenuRadioGroup.displayName = RADIO_GROUP_NAME;
|
|
15659
|
-
var RADIO_ITEM_NAME = "MenuRadioItem";
|
|
15660
|
-
var MenuRadioItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15661
|
-
const { value: value1, ...radioItemProps } = props;
|
|
15662
|
-
const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);
|
|
15663
|
-
const checked = value1 === context.value;
|
|
15664
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ItemIndicatorProvider, {
|
|
15665
|
-
scope: props.__scopeMenu,
|
|
15666
|
-
checked,
|
|
15667
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuItem, {
|
|
15668
|
-
role: "menuitemradio",
|
|
15669
|
-
"aria-checked": checked,
|
|
15670
|
-
...radioItemProps,
|
|
15671
|
-
ref: forwardedRef,
|
|
15672
|
-
"data-state": getCheckedState(checked),
|
|
15673
|
-
onSelect: composeEventHandlers(radioItemProps.onSelect, ()=>context.onValueChange?.(value1), {
|
|
15674
|
-
checkForDefaultPrevented: false
|
|
15675
|
-
})
|
|
15676
|
-
})
|
|
15677
|
-
});
|
|
15678
|
-
});
|
|
15679
|
-
MenuRadioItem.displayName = RADIO_ITEM_NAME;
|
|
15680
16344
|
var ITEM_INDICATOR_NAME = "MenuItemIndicator";
|
|
15681
16345
|
var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(ITEM_INDICATOR_NAME, {
|
|
15682
16346
|
checked: false
|
|
15683
16347
|
});
|
|
15684
|
-
var
|
|
15685
|
-
const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
|
|
15686
|
-
const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);
|
|
15687
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Presence, {
|
|
15688
|
-
present: forceMount || isIndeterminate(indicatorContext.checked) || true === indicatorContext.checked,
|
|
15689
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Primitive.span, {
|
|
15690
|
-
...itemIndicatorProps,
|
|
15691
|
-
ref: forwardedRef,
|
|
15692
|
-
"data-state": getCheckedState(indicatorContext.checked)
|
|
15693
|
-
})
|
|
15694
|
-
});
|
|
15695
|
-
});
|
|
15696
|
-
MenuItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
15697
|
-
var SEPARATOR_NAME = "MenuSeparator";
|
|
15698
|
-
var MenuSeparator = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16348
|
+
var MenuSeparator = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_menu_dist_name(function(props, forwardedRef) {
|
|
15699
16349
|
const { __scopeMenu, ...separatorProps } = props;
|
|
15700
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16350
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
15701
16351
|
role: "separator",
|
|
15702
16352
|
"aria-orientation": "horizontal",
|
|
15703
16353
|
...separatorProps,
|
|
15704
16354
|
ref: forwardedRef
|
|
15705
16355
|
});
|
|
15706
|
-
});
|
|
15707
|
-
MenuSeparator.displayName = SEPARATOR_NAME;
|
|
15708
|
-
var dist_ARROW_NAME = "MenuArrow";
|
|
15709
|
-
var MenuArrow = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15710
|
-
const { __scopeMenu, ...arrowProps } = props;
|
|
15711
|
-
const popperScope = usePopperScope(__scopeMenu);
|
|
15712
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Arrow, {
|
|
15713
|
-
...popperScope,
|
|
15714
|
-
...arrowProps,
|
|
15715
|
-
ref: forwardedRef
|
|
15716
|
-
});
|
|
15717
|
-
});
|
|
15718
|
-
MenuArrow.displayName = dist_ARROW_NAME;
|
|
16356
|
+
}, "MenuSeparator"));
|
|
15719
16357
|
var SUB_NAME = "MenuSub";
|
|
15720
16358
|
var [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);
|
|
15721
|
-
var MenuSub = (props)=>{
|
|
15722
|
-
const { __scopeMenu, children, open = false, onOpenChange } = props;
|
|
15723
|
-
const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);
|
|
15724
|
-
const popperScope = usePopperScope(__scopeMenu);
|
|
15725
|
-
const [trigger, setTrigger] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
15726
|
-
const [content, setContent] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
15727
|
-
const handleOpenChange = useCallbackRef(onOpenChange);
|
|
15728
|
-
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
15729
|
-
if (false === parentMenuContext.open) handleOpenChange(false);
|
|
15730
|
-
return ()=>handleOpenChange(false);
|
|
15731
|
-
}, [
|
|
15732
|
-
parentMenuContext.open,
|
|
15733
|
-
handleOpenChange
|
|
15734
|
-
]);
|
|
15735
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Root2, {
|
|
15736
|
-
...popperScope,
|
|
15737
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuProvider, {
|
|
15738
|
-
scope: __scopeMenu,
|
|
15739
|
-
open,
|
|
15740
|
-
onOpenChange: handleOpenChange,
|
|
15741
|
-
content,
|
|
15742
|
-
onContentChange: setContent,
|
|
15743
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuSubProvider, {
|
|
15744
|
-
scope: __scopeMenu,
|
|
15745
|
-
contentId: useId(),
|
|
15746
|
-
triggerId: useId(),
|
|
15747
|
-
trigger,
|
|
15748
|
-
onTriggerChange: setTrigger,
|
|
15749
|
-
children
|
|
15750
|
-
})
|
|
15751
|
-
})
|
|
15752
|
-
});
|
|
15753
|
-
};
|
|
15754
|
-
MenuSub.displayName = SUB_NAME;
|
|
15755
|
-
var SUB_TRIGGER_NAME = "MenuSubTrigger";
|
|
15756
|
-
var MenuSubTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15757
|
-
const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
15758
|
-
const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
15759
|
-
const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
15760
|
-
const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);
|
|
15761
|
-
const openTimerRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
15762
|
-
const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;
|
|
15763
|
-
const scope = {
|
|
15764
|
-
__scopeMenu: props.__scopeMenu
|
|
15765
|
-
};
|
|
15766
|
-
const clearOpenTimer = __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
15767
|
-
if (openTimerRef.current) window.clearTimeout(openTimerRef.current);
|
|
15768
|
-
openTimerRef.current = null;
|
|
15769
|
-
}, []);
|
|
15770
|
-
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>clearOpenTimer, [
|
|
15771
|
-
clearOpenTimer
|
|
15772
|
-
]);
|
|
15773
|
-
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
15774
|
-
const pointerGraceTimer = pointerGraceTimerRef.current;
|
|
15775
|
-
return ()=>{
|
|
15776
|
-
window.clearTimeout(pointerGraceTimer);
|
|
15777
|
-
onPointerGraceIntentChange(null);
|
|
15778
|
-
};
|
|
15779
|
-
}, [
|
|
15780
|
-
pointerGraceTimerRef,
|
|
15781
|
-
onPointerGraceIntentChange
|
|
15782
|
-
]);
|
|
15783
|
-
const composedRefs = useComposedRefs(forwardedRef, subContext.onTriggerChange);
|
|
15784
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuAnchor, {
|
|
15785
|
-
asChild: true,
|
|
15786
|
-
...scope,
|
|
15787
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuItemImpl, {
|
|
15788
|
-
id: subContext.triggerId,
|
|
15789
|
-
"aria-haspopup": "menu",
|
|
15790
|
-
"aria-expanded": context.open,
|
|
15791
|
-
"aria-controls": context.open ? subContext.contentId : void 0,
|
|
15792
|
-
"data-state": getOpenState(context.open),
|
|
15793
|
-
...props,
|
|
15794
|
-
ref: composedRefs,
|
|
15795
|
-
onClick: (event)=>{
|
|
15796
|
-
props.onClick?.(event);
|
|
15797
|
-
if (props.disabled || event.defaultPrevented) return;
|
|
15798
|
-
event.currentTarget.focus();
|
|
15799
|
-
if (!context.open) context.onOpenChange(true);
|
|
15800
|
-
},
|
|
15801
|
-
onPointerMove: composeEventHandlers(props.onPointerMove, whenMouse((event)=>{
|
|
15802
|
-
contentContext.onItemEnter(event);
|
|
15803
|
-
if (event.defaultPrevented) return;
|
|
15804
|
-
if (!props.disabled && !context.open && !openTimerRef.current) {
|
|
15805
|
-
contentContext.onPointerGraceIntentChange(null);
|
|
15806
|
-
openTimerRef.current = window.setTimeout(()=>{
|
|
15807
|
-
context.onOpenChange(true);
|
|
15808
|
-
clearOpenTimer();
|
|
15809
|
-
}, 100);
|
|
15810
|
-
}
|
|
15811
|
-
})),
|
|
15812
|
-
onPointerLeave: composeEventHandlers(props.onPointerLeave, whenMouse((event)=>{
|
|
15813
|
-
clearOpenTimer();
|
|
15814
|
-
const contentRect = context.content?.getBoundingClientRect();
|
|
15815
|
-
if (contentRect) {
|
|
15816
|
-
const side = context.content?.dataset.side;
|
|
15817
|
-
const rightSide = "right" === side;
|
|
15818
|
-
const bleed = rightSide ? -5 : 5;
|
|
15819
|
-
const contentNearEdge = contentRect[rightSide ? "left" : "right"];
|
|
15820
|
-
const contentFarEdge = contentRect[rightSide ? "right" : "left"];
|
|
15821
|
-
contentContext.onPointerGraceIntentChange({
|
|
15822
|
-
area: [
|
|
15823
|
-
{
|
|
15824
|
-
x: event.clientX + bleed,
|
|
15825
|
-
y: event.clientY
|
|
15826
|
-
},
|
|
15827
|
-
{
|
|
15828
|
-
x: contentNearEdge,
|
|
15829
|
-
y: contentRect.top
|
|
15830
|
-
},
|
|
15831
|
-
{
|
|
15832
|
-
x: contentFarEdge,
|
|
15833
|
-
y: contentRect.top
|
|
15834
|
-
},
|
|
15835
|
-
{
|
|
15836
|
-
x: contentFarEdge,
|
|
15837
|
-
y: contentRect.bottom
|
|
15838
|
-
},
|
|
15839
|
-
{
|
|
15840
|
-
x: contentNearEdge,
|
|
15841
|
-
y: contentRect.bottom
|
|
15842
|
-
}
|
|
15843
|
-
],
|
|
15844
|
-
side
|
|
15845
|
-
});
|
|
15846
|
-
window.clearTimeout(pointerGraceTimerRef.current);
|
|
15847
|
-
pointerGraceTimerRef.current = window.setTimeout(()=>contentContext.onPointerGraceIntentChange(null), 300);
|
|
15848
|
-
} else {
|
|
15849
|
-
contentContext.onTriggerLeave(event);
|
|
15850
|
-
if (event.defaultPrevented) return;
|
|
15851
|
-
contentContext.onPointerGraceIntentChange(null);
|
|
15852
|
-
}
|
|
15853
|
-
})),
|
|
15854
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
|
|
15855
|
-
if (props.disabled || event.target !== event.currentTarget) return;
|
|
15856
|
-
const isTypingAhead = "" !== contentContext.searchRef.current;
|
|
15857
|
-
if (isTypingAhead && " " === event.key) return;
|
|
15858
|
-
if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {
|
|
15859
|
-
context.onOpenChange(true);
|
|
15860
|
-
context.content?.focus();
|
|
15861
|
-
event.preventDefault();
|
|
15862
|
-
}
|
|
15863
|
-
})
|
|
15864
|
-
})
|
|
15865
|
-
});
|
|
15866
|
-
});
|
|
15867
|
-
MenuSubTrigger.displayName = SUB_TRIGGER_NAME;
|
|
15868
|
-
var SUB_CONTENT_NAME = "MenuSubContent";
|
|
15869
|
-
var MenuSubContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
15870
|
-
const portalContext = usePortalContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15871
|
-
const { forceMount = portalContext.forceMount, align = "start", ...subContentProps } = props;
|
|
15872
|
-
const context = useMenuContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15873
|
-
const rootContext = useMenuRootContext(dist_CONTENT_NAME, props.__scopeMenu);
|
|
15874
|
-
const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);
|
|
15875
|
-
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
15876
|
-
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
15877
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Collection.Provider, {
|
|
15878
|
-
scope: props.__scopeMenu,
|
|
15879
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Presence, {
|
|
15880
|
-
present: forceMount || context.open,
|
|
15881
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Collection.Slot, {
|
|
15882
|
-
scope: props.__scopeMenu,
|
|
15883
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MenuContentImpl, {
|
|
15884
|
-
id: subContext.contentId,
|
|
15885
|
-
"aria-labelledby": subContext.triggerId,
|
|
15886
|
-
...subContentProps,
|
|
15887
|
-
ref: composedRefs,
|
|
15888
|
-
align,
|
|
15889
|
-
side: "rtl" === rootContext.dir ? "left" : "right",
|
|
15890
|
-
disableOutsidePointerEvents: false,
|
|
15891
|
-
disableOutsideScroll: false,
|
|
15892
|
-
trapFocus: false,
|
|
15893
|
-
onOpenAutoFocus: (event)=>{
|
|
15894
|
-
if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();
|
|
15895
|
-
event.preventDefault();
|
|
15896
|
-
},
|
|
15897
|
-
onCloseAutoFocus: (event)=>event.preventDefault(),
|
|
15898
|
-
onFocusOutside: composeEventHandlers(props.onFocusOutside, (event)=>{
|
|
15899
|
-
if (event.target !== subContext.trigger) context.onOpenChange(false);
|
|
15900
|
-
}),
|
|
15901
|
-
onEscapeKeyDown: composeEventHandlers(props.onEscapeKeyDown, (event)=>{
|
|
15902
|
-
rootContext.onClose();
|
|
15903
|
-
event.preventDefault();
|
|
15904
|
-
}),
|
|
15905
|
-
onKeyDown: composeEventHandlers(props.onKeyDown, (event)=>{
|
|
15906
|
-
const isKeyDownInside = event.currentTarget.contains(event.target);
|
|
15907
|
-
const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);
|
|
15908
|
-
if (isKeyDownInside && isCloseKey) {
|
|
15909
|
-
context.onOpenChange(false);
|
|
15910
|
-
subContext.trigger?.focus();
|
|
15911
|
-
event.preventDefault();
|
|
15912
|
-
}
|
|
15913
|
-
})
|
|
15914
|
-
})
|
|
15915
|
-
})
|
|
15916
|
-
})
|
|
15917
|
-
});
|
|
15918
|
-
});
|
|
15919
|
-
MenuSubContent.displayName = SUB_CONTENT_NAME;
|
|
15920
16359
|
function getOpenState(open) {
|
|
15921
16360
|
return open ? "open" : "closed";
|
|
15922
16361
|
}
|
|
16362
|
+
react_menu_dist_name(getOpenState, "getOpenState");
|
|
15923
16363
|
function isIndeterminate(checked) {
|
|
15924
16364
|
return "indeterminate" === checked;
|
|
15925
16365
|
}
|
|
16366
|
+
react_menu_dist_name(isIndeterminate, "isIndeterminate");
|
|
15926
16367
|
function getCheckedState(checked) {
|
|
15927
16368
|
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
15928
16369
|
}
|
|
16370
|
+
react_menu_dist_name(getCheckedState, "getCheckedState");
|
|
15929
16371
|
function react_menu_dist_focusFirst(candidates) {
|
|
15930
16372
|
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
15931
16373
|
for (const candidate of candidates){
|
|
@@ -15934,9 +16376,11 @@ function react_menu_dist_focusFirst(candidates) {
|
|
|
15934
16376
|
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
15935
16377
|
}
|
|
15936
16378
|
}
|
|
16379
|
+
react_menu_dist_name(react_menu_dist_focusFirst, "focusFirst");
|
|
15937
16380
|
function dist_wrapArray(array, startIndex) {
|
|
15938
16381
|
return array.map((_, index)=>array[(startIndex + index) % array.length]);
|
|
15939
16382
|
}
|
|
16383
|
+
react_menu_dist_name(dist_wrapArray, "wrapArray");
|
|
15940
16384
|
function getNextMatch(values, search, currentMatch) {
|
|
15941
16385
|
const isRepeated = search.length > 1 && Array.from(search).every((char)=>char === search[0]);
|
|
15942
16386
|
const normalizedSearch = isRepeated ? search[0] : search;
|
|
@@ -15947,6 +16391,7 @@ function getNextMatch(values, search, currentMatch) {
|
|
|
15947
16391
|
const nextMatch = wrappedValues.find((value1)=>value1.toLowerCase().startsWith(normalizedSearch.toLowerCase()));
|
|
15948
16392
|
return nextMatch !== currentMatch ? nextMatch : void 0;
|
|
15949
16393
|
}
|
|
16394
|
+
react_menu_dist_name(getNextMatch, "getNextMatch");
|
|
15950
16395
|
function isPointInPolygon(point, polygon) {
|
|
15951
16396
|
const { x, y } = point;
|
|
15952
16397
|
let inside = false;
|
|
@@ -15962,6 +16407,7 @@ function isPointInPolygon(point, polygon) {
|
|
|
15962
16407
|
}
|
|
15963
16408
|
return inside;
|
|
15964
16409
|
}
|
|
16410
|
+
react_menu_dist_name(isPointInPolygon, "isPointInPolygon");
|
|
15965
16411
|
function isPointerInGraceArea(event, area) {
|
|
15966
16412
|
if (!area) return false;
|
|
15967
16413
|
const cursorPos = {
|
|
@@ -15970,32 +16416,30 @@ function isPointerInGraceArea(event, area) {
|
|
|
15970
16416
|
};
|
|
15971
16417
|
return isPointInPolygon(cursorPos, area);
|
|
15972
16418
|
}
|
|
16419
|
+
react_menu_dist_name(isPointerInGraceArea, "isPointerInGraceArea");
|
|
15973
16420
|
function whenMouse(handler) {
|
|
15974
16421
|
return (event)=>"mouse" === event.pointerType ? handler(event) : void 0;
|
|
15975
16422
|
}
|
|
16423
|
+
react_menu_dist_name(whenMouse, "whenMouse");
|
|
15976
16424
|
var Root3 = Menu;
|
|
15977
16425
|
var Anchor2 = MenuAnchor;
|
|
15978
16426
|
var dist_Portal = MenuPortal;
|
|
15979
16427
|
var Content2 = MenuContent;
|
|
15980
|
-
var Group = MenuGroup;
|
|
15981
|
-
var Label = MenuLabel;
|
|
15982
16428
|
var Item2 = MenuItem;
|
|
15983
|
-
var CheckboxItem = MenuCheckboxItem;
|
|
15984
|
-
var RadioGroup = MenuRadioGroup;
|
|
15985
|
-
var RadioItem = MenuRadioItem;
|
|
15986
|
-
var ItemIndicator = MenuItemIndicator;
|
|
15987
16429
|
var Separator = MenuSeparator;
|
|
15988
|
-
var Arrow2 = MenuArrow;
|
|
15989
|
-
var SubTrigger = MenuSubTrigger;
|
|
15990
|
-
var SubContent = MenuSubContent;
|
|
15991
16430
|
"use client";
|
|
16431
|
+
var react_dropdown_menu_dist_defProp = Object.defineProperty;
|
|
16432
|
+
var react_dropdown_menu_dist_name = (target, value1)=>react_dropdown_menu_dist_defProp(target, "name", {
|
|
16433
|
+
value: value1,
|
|
16434
|
+
configurable: true
|
|
16435
|
+
});
|
|
15992
16436
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
15993
16437
|
var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope(DROPDOWN_MENU_NAME, [
|
|
15994
16438
|
createMenuScope
|
|
15995
16439
|
]);
|
|
15996
16440
|
var useMenuScope = createMenuScope();
|
|
15997
16441
|
var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);
|
|
15998
|
-
var DropdownMenu = (props)=>{
|
|
16442
|
+
var DropdownMenu = /* @__PURE__ */ react_dropdown_menu_dist_name((props)=>{
|
|
15999
16443
|
const { __scopeDropdownMenu, children, dir, open: openProp, defaultOpen, onOpenChange, modal = true } = props;
|
|
16000
16444
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16001
16445
|
const triggerRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
@@ -16007,9 +16451,9 @@ var DropdownMenu = (props)=>{
|
|
|
16007
16451
|
});
|
|
16008
16452
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DropdownMenuProvider, {
|
|
16009
16453
|
scope: __scopeDropdownMenu,
|
|
16010
|
-
triggerId:
|
|
16454
|
+
triggerId: dist_useId(),
|
|
16011
16455
|
triggerRef,
|
|
16012
|
-
contentId:
|
|
16456
|
+
contentId: dist_useId(),
|
|
16013
16457
|
open,
|
|
16014
16458
|
onOpenChange: setOpen,
|
|
16015
16459
|
onOpenToggle: __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>setOpen((prevOpen)=>!prevOpen), [
|
|
@@ -16025,18 +16469,17 @@ var DropdownMenu = (props)=>{
|
|
|
16025
16469
|
children
|
|
16026
16470
|
})
|
|
16027
16471
|
});
|
|
16028
|
-
};
|
|
16029
|
-
DropdownMenu.displayName = DROPDOWN_MENU_NAME;
|
|
16472
|
+
}, "DropdownMenu");
|
|
16030
16473
|
var TRIGGER_NAME = "DropdownMenuTrigger";
|
|
16031
|
-
var DropdownMenuTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16474
|
+
var DropdownMenuTrigger = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_dropdown_menu_dist_name(function(props, forwardedRef) {
|
|
16032
16475
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
16033
16476
|
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
|
|
16034
16477
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16035
|
-
const composedRefs =
|
|
16478
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, context.triggerRef);
|
|
16036
16479
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Anchor2, {
|
|
16037
16480
|
asChild: true,
|
|
16038
16481
|
...menuScope,
|
|
16039
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16482
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.button, {
|
|
16040
16483
|
type: "button",
|
|
16041
16484
|
id: context.triggerId,
|
|
16042
16485
|
"aria-haspopup": "menu",
|
|
@@ -16047,13 +16490,13 @@ var DropdownMenuTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16047
16490
|
disabled,
|
|
16048
16491
|
...triggerProps,
|
|
16049
16492
|
ref: composedRefs,
|
|
16050
|
-
onPointerDown:
|
|
16493
|
+
onPointerDown: dist_composeEventHandlers(props.onPointerDown, (event)=>{
|
|
16051
16494
|
if (!disabled && 0 === event.button && false === event.ctrlKey) {
|
|
16052
16495
|
context.onOpenToggle();
|
|
16053
16496
|
if (!context.open) event.preventDefault();
|
|
16054
16497
|
}
|
|
16055
16498
|
}),
|
|
16056
|
-
onKeyDown:
|
|
16499
|
+
onKeyDown: dist_composeEventHandlers(props.onKeyDown, (event)=>{
|
|
16057
16500
|
if (disabled) return;
|
|
16058
16501
|
if ([
|
|
16059
16502
|
"Enter",
|
|
@@ -16068,20 +16511,17 @@ var DropdownMenuTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16068
16511
|
})
|
|
16069
16512
|
})
|
|
16070
16513
|
});
|
|
16071
|
-
});
|
|
16072
|
-
|
|
16073
|
-
var react_dropdown_menu_dist_PORTAL_NAME = "DropdownMenuPortal";
|
|
16074
|
-
var DropdownMenuPortal = (props)=>{
|
|
16514
|
+
}, "DropdownMenuTrigger"));
|
|
16515
|
+
var DropdownMenuPortal = /* @__PURE__ */ react_dropdown_menu_dist_name((props)=>{
|
|
16075
16516
|
const { __scopeDropdownMenu, ...portalProps } = props;
|
|
16076
16517
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16077
16518
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Portal, {
|
|
16078
16519
|
...menuScope,
|
|
16079
16520
|
...portalProps
|
|
16080
16521
|
});
|
|
16081
|
-
};
|
|
16082
|
-
DropdownMenuPortal.displayName = react_dropdown_menu_dist_PORTAL_NAME;
|
|
16522
|
+
}, "DropdownMenuPortal");
|
|
16083
16523
|
var react_dropdown_menu_dist_CONTENT_NAME = "DropdownMenuContent";
|
|
16084
|
-
var DropdownMenuContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16524
|
+
var DropdownMenuContent = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_dropdown_menu_dist_name(function(props, forwardedRef) {
|
|
16085
16525
|
const { __scopeDropdownMenu, ...contentProps } = props;
|
|
16086
16526
|
const context = useDropdownMenuContext(react_dropdown_menu_dist_CONTENT_NAME, __scopeDropdownMenu);
|
|
16087
16527
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
@@ -16092,12 +16532,12 @@ var DropdownMenuContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16092
16532
|
...menuScope,
|
|
16093
16533
|
...contentProps,
|
|
16094
16534
|
ref: forwardedRef,
|
|
16095
|
-
onCloseAutoFocus:
|
|
16535
|
+
onCloseAutoFocus: dist_composeEventHandlers(props.onCloseAutoFocus, (event)=>{
|
|
16096
16536
|
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
16097
16537
|
hasInteractedOutsideRef.current = false;
|
|
16098
16538
|
event.preventDefault();
|
|
16099
16539
|
}),
|
|
16100
|
-
onInteractOutside:
|
|
16540
|
+
onInteractOutside: dist_composeEventHandlers(props.onInteractOutside, (event)=>{
|
|
16101
16541
|
const originalEvent = event.detail.originalEvent;
|
|
16102
16542
|
const ctrlLeftClick = 0 === originalEvent.button && true === originalEvent.ctrlKey;
|
|
16103
16543
|
const isRightClick = 2 === originalEvent.button || ctrlLeftClick;
|
|
@@ -16112,32 +16552,8 @@ var DropdownMenuContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16112
16552
|
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
16113
16553
|
}
|
|
16114
16554
|
});
|
|
16115
|
-
});
|
|
16116
|
-
|
|
16117
|
-
var react_dropdown_menu_dist_GROUP_NAME = "DropdownMenuGroup";
|
|
16118
|
-
var DropdownMenuGroup = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16119
|
-
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
16120
|
-
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16121
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Group, {
|
|
16122
|
-
...menuScope,
|
|
16123
|
-
...groupProps,
|
|
16124
|
-
ref: forwardedRef
|
|
16125
|
-
});
|
|
16126
|
-
});
|
|
16127
|
-
DropdownMenuGroup.displayName = react_dropdown_menu_dist_GROUP_NAME;
|
|
16128
|
-
var dist_LABEL_NAME = "DropdownMenuLabel";
|
|
16129
|
-
var DropdownMenuLabel = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16130
|
-
const { __scopeDropdownMenu, ...labelProps } = props;
|
|
16131
|
-
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16132
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Label, {
|
|
16133
|
-
...menuScope,
|
|
16134
|
-
...labelProps,
|
|
16135
|
-
ref: forwardedRef
|
|
16136
|
-
});
|
|
16137
|
-
});
|
|
16138
|
-
DropdownMenuLabel.displayName = dist_LABEL_NAME;
|
|
16139
|
-
var react_dropdown_menu_dist_ITEM_NAME = "DropdownMenuItem";
|
|
16140
|
-
var DropdownMenuItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16555
|
+
}, "DropdownMenuContent"));
|
|
16556
|
+
var DropdownMenuItem = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_dropdown_menu_dist_name(function(props, forwardedRef) {
|
|
16141
16557
|
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
16142
16558
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16143
16559
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Item2, {
|
|
@@ -16145,54 +16561,8 @@ var DropdownMenuItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forw
|
|
|
16145
16561
|
...itemProps,
|
|
16146
16562
|
ref: forwardedRef
|
|
16147
16563
|
});
|
|
16148
|
-
});
|
|
16149
|
-
|
|
16150
|
-
var dist_CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
16151
|
-
var DropdownMenuCheckboxItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16152
|
-
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
16153
|
-
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16154
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(CheckboxItem, {
|
|
16155
|
-
...menuScope,
|
|
16156
|
-
...checkboxItemProps,
|
|
16157
|
-
ref: forwardedRef
|
|
16158
|
-
});
|
|
16159
|
-
});
|
|
16160
|
-
DropdownMenuCheckboxItem.displayName = dist_CHECKBOX_ITEM_NAME;
|
|
16161
|
-
var dist_RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
16162
|
-
var DropdownMenuRadioGroup = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16163
|
-
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
16164
|
-
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16165
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(RadioGroup, {
|
|
16166
|
-
...menuScope,
|
|
16167
|
-
...radioGroupProps,
|
|
16168
|
-
ref: forwardedRef
|
|
16169
|
-
});
|
|
16170
|
-
});
|
|
16171
|
-
DropdownMenuRadioGroup.displayName = dist_RADIO_GROUP_NAME;
|
|
16172
|
-
var dist_RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
16173
|
-
var DropdownMenuRadioItem = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16174
|
-
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
16175
|
-
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16176
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(RadioItem, {
|
|
16177
|
-
...menuScope,
|
|
16178
|
-
...radioItemProps,
|
|
16179
|
-
ref: forwardedRef
|
|
16180
|
-
});
|
|
16181
|
-
});
|
|
16182
|
-
DropdownMenuRadioItem.displayName = dist_RADIO_ITEM_NAME;
|
|
16183
|
-
var INDICATOR_NAME = "DropdownMenuItemIndicator";
|
|
16184
|
-
var DropdownMenuItemIndicator = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16185
|
-
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
16186
|
-
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16187
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ItemIndicator, {
|
|
16188
|
-
...menuScope,
|
|
16189
|
-
...itemIndicatorProps,
|
|
16190
|
-
ref: forwardedRef
|
|
16191
|
-
});
|
|
16192
|
-
});
|
|
16193
|
-
DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
|
|
16194
|
-
var dist_SEPARATOR_NAME = "DropdownMenuSeparator";
|
|
16195
|
-
var DropdownMenuSeparator = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16564
|
+
}, "DropdownMenuItem"));
|
|
16565
|
+
var DropdownMenuSeparator = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_dropdown_menu_dist_name(function(props, forwardedRef) {
|
|
16196
16566
|
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
16197
16567
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16198
16568
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Separator, {
|
|
@@ -16200,55 +16570,13 @@ var DropdownMenuSeparator = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
16200
16570
|
...separatorProps,
|
|
16201
16571
|
ref: forwardedRef
|
|
16202
16572
|
});
|
|
16203
|
-
});
|
|
16204
|
-
DropdownMenuSeparator.displayName = dist_SEPARATOR_NAME;
|
|
16205
|
-
var react_dropdown_menu_dist_ARROW_NAME = "DropdownMenuArrow";
|
|
16206
|
-
var DropdownMenuArrow = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16207
|
-
const { __scopeDropdownMenu, ...arrowProps } = props;
|
|
16208
|
-
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16209
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Arrow2, {
|
|
16210
|
-
...menuScope,
|
|
16211
|
-
...arrowProps,
|
|
16212
|
-
ref: forwardedRef
|
|
16213
|
-
});
|
|
16214
|
-
});
|
|
16215
|
-
DropdownMenuArrow.displayName = react_dropdown_menu_dist_ARROW_NAME;
|
|
16216
|
-
var dist_SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
16217
|
-
var DropdownMenuSubTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16218
|
-
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
16219
|
-
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16220
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(SubTrigger, {
|
|
16221
|
-
...menuScope,
|
|
16222
|
-
...subTriggerProps,
|
|
16223
|
-
ref: forwardedRef
|
|
16224
|
-
});
|
|
16225
|
-
});
|
|
16226
|
-
DropdownMenuSubTrigger.displayName = dist_SUB_TRIGGER_NAME;
|
|
16227
|
-
var dist_SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
16228
|
-
var DropdownMenuSubContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16229
|
-
const { __scopeDropdownMenu, ...subContentProps } = props;
|
|
16230
|
-
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
16231
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(SubContent, {
|
|
16232
|
-
...menuScope,
|
|
16233
|
-
...subContentProps,
|
|
16234
|
-
ref: forwardedRef,
|
|
16235
|
-
style: {
|
|
16236
|
-
...props.style,
|
|
16237
|
-
"--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
16238
|
-
"--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
|
|
16239
|
-
"--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
|
|
16240
|
-
"--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
|
|
16241
|
-
"--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
|
|
16242
|
-
}
|
|
16243
|
-
});
|
|
16244
|
-
});
|
|
16245
|
-
DropdownMenuSubContent.displayName = dist_SUB_CONTENT_NAME;
|
|
16573
|
+
}, "DropdownMenuSeparator"));
|
|
16246
16574
|
var dist_Root2 = DropdownMenu;
|
|
16247
16575
|
var Trigger = DropdownMenuTrigger;
|
|
16248
|
-
var
|
|
16576
|
+
var dist_Portal2 = DropdownMenuPortal;
|
|
16249
16577
|
var dist_Content2 = DropdownMenuContent;
|
|
16250
16578
|
var dist_Item2 = DropdownMenuItem;
|
|
16251
|
-
var
|
|
16579
|
+
var dist_Separator2 = DropdownMenuSeparator;
|
|
16252
16580
|
const useSafeLayoutEffect = 'undefined' == typeof window ? __WEBPACK_EXTERNAL_MODULE_react__.useEffect : __WEBPACK_EXTERNAL_MODULE_react__.useLayoutEffect;
|
|
16253
16581
|
const incrementPortalUsers = (container)=>{
|
|
16254
16582
|
const current = Number.parseInt(container.getAttribute('data-rfkit-charts-portal-users') ?? '0', 10);
|
|
@@ -16290,7 +16618,7 @@ dropdown_menu_DropdownMenuTrigger.displayName = Trigger.displayName;
|
|
|
16290
16618
|
function dropdown_menu_DropdownMenuPortal({ ...props }) {
|
|
16291
16619
|
const container = useChartsPortalContainer('dropdown-menu');
|
|
16292
16620
|
if (!container) return null;
|
|
16293
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16621
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Portal2, {
|
|
16294
16622
|
"data-slot": "dropdown-menu-portal",
|
|
16295
16623
|
container: container,
|
|
16296
16624
|
...props
|
|
@@ -16313,27 +16641,39 @@ const dropdown_menu_DropdownMenuItem = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_r
|
|
|
16313
16641
|
...props
|
|
16314
16642
|
}));
|
|
16315
16643
|
dropdown_menu_DropdownMenuItem.displayName = dist_Item2.displayName;
|
|
16316
|
-
const dropdown_menu_DropdownMenuSeparator = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16644
|
+
const dropdown_menu_DropdownMenuSeparator = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Separator2, {
|
|
16317
16645
|
ref: ref,
|
|
16318
16646
|
"data-slot": "dropdown-menu-separator",
|
|
16319
16647
|
className: cn_cn('my-[calc(var(--size-gap-base)/2)] h-px bg-border/60', className),
|
|
16320
16648
|
...props
|
|
16321
16649
|
}));
|
|
16322
|
-
dropdown_menu_DropdownMenuSeparator.displayName =
|
|
16650
|
+
dropdown_menu_DropdownMenuSeparator.displayName = dist_Separator2.displayName;
|
|
16651
|
+
var number_dist_defProp = Object.defineProperty;
|
|
16652
|
+
var number_dist_name = (target, value1)=>number_dist_defProp(target, "name", {
|
|
16653
|
+
value: value1,
|
|
16654
|
+
configurable: true
|
|
16655
|
+
});
|
|
16323
16656
|
function dist_clamp(value1, [min, max]) {
|
|
16324
16657
|
return Math.min(max, Math.max(min, value1));
|
|
16325
16658
|
}
|
|
16659
|
+
number_dist_name(dist_clamp, "clamp");
|
|
16326
16660
|
"use client";
|
|
16661
|
+
var react_scroll_area_dist_defProp = Object.defineProperty;
|
|
16662
|
+
var react_scroll_area_dist_name = (target, value1)=>react_scroll_area_dist_defProp(target, "name", {
|
|
16663
|
+
value: value1,
|
|
16664
|
+
configurable: true
|
|
16665
|
+
});
|
|
16327
16666
|
function dist_useStateMachine(initialState, machine) {
|
|
16328
16667
|
return __WEBPACK_EXTERNAL_MODULE_react__.useReducer((state, event)=>{
|
|
16329
16668
|
const nextState = machine[state][event];
|
|
16330
16669
|
return nextState ?? state;
|
|
16331
16670
|
}, initialState);
|
|
16332
16671
|
}
|
|
16672
|
+
react_scroll_area_dist_name(dist_useStateMachine, "useStateMachine");
|
|
16333
16673
|
var SCROLL_AREA_NAME = "ScrollArea";
|
|
16334
16674
|
var [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);
|
|
16335
16675
|
var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
16336
|
-
var ScrollArea = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16676
|
+
var ScrollArea = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16337
16677
|
const { __scopeScrollArea, type = "hover", dir, scrollHideDelay = 600, ...scrollAreaProps } = props;
|
|
16338
16678
|
const [scrollArea, setScrollArea] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
16339
16679
|
const [viewport, setViewport] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
@@ -16344,7 +16684,7 @@ var ScrollArea = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
16344
16684
|
const [cornerHeight, setCornerHeight] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
|
|
16345
16685
|
const [scrollbarXEnabled, setScrollbarXEnabled] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
16346
16686
|
const [scrollbarYEnabled, setScrollbarYEnabled] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
16347
|
-
const composedRefs =
|
|
16687
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, setScrollArea);
|
|
16348
16688
|
const direction = useDirection(dir);
|
|
16349
16689
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaProvider, {
|
|
16350
16690
|
scope: __scopeScrollArea,
|
|
@@ -16366,7 +16706,7 @@ var ScrollArea = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
16366
16706
|
onScrollbarYEnabledChange: setScrollbarYEnabled,
|
|
16367
16707
|
onCornerWidthChange: setCornerWidth,
|
|
16368
16708
|
onCornerHeightChange: setCornerHeight,
|
|
16369
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16709
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
16370
16710
|
dir: direction,
|
|
16371
16711
|
...scrollAreaProps,
|
|
16372
16712
|
ref: composedRefs,
|
|
@@ -16378,20 +16718,19 @@ var ScrollArea = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedR
|
|
|
16378
16718
|
}
|
|
16379
16719
|
})
|
|
16380
16720
|
});
|
|
16381
|
-
});
|
|
16382
|
-
ScrollArea.displayName = SCROLL_AREA_NAME;
|
|
16721
|
+
}, "ScrollArea"));
|
|
16383
16722
|
var VIEWPORT_NAME = "ScrollAreaViewport";
|
|
16384
|
-
var ScrollAreaViewport = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16723
|
+
var ScrollAreaViewport = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16385
16724
|
const { __scopeScrollArea, children, nonce, ...viewportProps } = props;
|
|
16386
16725
|
const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
|
|
16387
16726
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
16388
|
-
const composedRefs =
|
|
16727
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
|
16389
16728
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
16390
16729
|
children: [
|
|
16391
16730
|
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaViewportStyle, {
|
|
16392
16731
|
nonce
|
|
16393
16732
|
}),
|
|
16394
|
-
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16733
|
+
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
16395
16734
|
"data-radix-scroll-area-viewport": "",
|
|
16396
16735
|
...viewportProps,
|
|
16397
16736
|
ref: composedRefs,
|
|
@@ -16411,16 +16750,17 @@ var ScrollAreaViewport = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
16411
16750
|
})
|
|
16412
16751
|
]
|
|
16413
16752
|
});
|
|
16414
|
-
});
|
|
16415
|
-
|
|
16416
|
-
|
|
16753
|
+
}, "ScrollAreaViewport"));
|
|
16754
|
+
var ScrollAreaViewportStyle = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.memo(/* @__PURE__ */ react_scroll_area_dist_name(function({ nonce }) {
|
|
16755
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("style", {
|
|
16417
16756
|
dangerouslySetInnerHTML: {
|
|
16418
16757
|
__html: "[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"
|
|
16419
16758
|
},
|
|
16420
16759
|
nonce
|
|
16421
|
-
})
|
|
16760
|
+
});
|
|
16761
|
+
}, "ScrollAreaViewportStyle"), (prevProps, nextProps)=>prevProps.nonce === nextProps.nonce);
|
|
16422
16762
|
var SCROLLBAR_NAME = "ScrollAreaScrollbar";
|
|
16423
|
-
var ScrollAreaScrollbar = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16763
|
+
var ScrollAreaScrollbar = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16424
16764
|
const { forceMount, ...scrollbarProps } = props;
|
|
16425
16765
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
16426
16766
|
const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;
|
|
@@ -16452,9 +16792,8 @@ var ScrollAreaScrollbar = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16452
16792
|
ref: forwardedRef,
|
|
16453
16793
|
"data-state": "visible"
|
|
16454
16794
|
}) : null;
|
|
16455
|
-
});
|
|
16456
|
-
|
|
16457
|
-
var ScrollAreaScrollbarHover = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
16795
|
+
}, "ScrollAreaScrollbar"));
|
|
16796
|
+
var ScrollAreaScrollbarHover = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16458
16797
|
const { forceMount, ...scrollbarProps } = props;
|
|
16459
16798
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
16460
16799
|
const [visible, setVisible] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
@@ -16462,13 +16801,13 @@ var ScrollAreaScrollbarHover = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((pro
|
|
|
16462
16801
|
const scrollArea = context.scrollArea;
|
|
16463
16802
|
let hideTimer = 0;
|
|
16464
16803
|
if (scrollArea) {
|
|
16465
|
-
const handlePointerEnter = ()=>{
|
|
16804
|
+
const handlePointerEnter = /* @__PURE__ */ react_scroll_area_dist_name(()=>{
|
|
16466
16805
|
window.clearTimeout(hideTimer);
|
|
16467
16806
|
setVisible(true);
|
|
16468
|
-
};
|
|
16469
|
-
const handlePointerLeave = ()=>{
|
|
16807
|
+
}, "handlePointerEnter");
|
|
16808
|
+
const handlePointerLeave = /* @__PURE__ */ react_scroll_area_dist_name(()=>{
|
|
16470
16809
|
hideTimer = window.setTimeout(()=>setVisible(false), context.scrollHideDelay);
|
|
16471
|
-
};
|
|
16810
|
+
}, "handlePointerLeave");
|
|
16472
16811
|
scrollArea.addEventListener("pointerenter", handlePointerEnter);
|
|
16473
16812
|
scrollArea.addEventListener("pointerleave", handlePointerLeave);
|
|
16474
16813
|
return ()=>{
|
|
@@ -16481,7 +16820,7 @@ var ScrollAreaScrollbarHover = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((pro
|
|
|
16481
16820
|
context.scrollArea,
|
|
16482
16821
|
context.scrollHideDelay
|
|
16483
16822
|
]);
|
|
16484
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16823
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Presence, {
|
|
16485
16824
|
present: forceMount || visible,
|
|
16486
16825
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaScrollbarAuto, {
|
|
16487
16826
|
"data-state": visible ? "visible" : "hidden",
|
|
@@ -16489,8 +16828,8 @@ var ScrollAreaScrollbarHover = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((pro
|
|
|
16489
16828
|
ref: forwardedRef
|
|
16490
16829
|
})
|
|
16491
16830
|
});
|
|
16492
|
-
});
|
|
16493
|
-
var ScrollAreaScrollbarScroll = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16831
|
+
}, "ScrollAreaScrollbarHover"));
|
|
16832
|
+
var ScrollAreaScrollbarScroll = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16494
16833
|
const { forceMount, ...scrollbarProps } = props;
|
|
16495
16834
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
16496
16835
|
const isHorizontal = "horizontal" === props.orientation;
|
|
@@ -16528,7 +16867,7 @@ var ScrollAreaScrollbarScroll = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((pr
|
|
|
16528
16867
|
const scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop";
|
|
16529
16868
|
if (viewport) {
|
|
16530
16869
|
let prevScrollPos = viewport[scrollDirection];
|
|
16531
|
-
const handleScroll = ()=>{
|
|
16870
|
+
const handleScroll = /* @__PURE__ */ react_scroll_area_dist_name(()=>{
|
|
16532
16871
|
const scrollPos = viewport[scrollDirection];
|
|
16533
16872
|
const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;
|
|
16534
16873
|
if (hasScrollInDirectionChanged) {
|
|
@@ -16536,7 +16875,7 @@ var ScrollAreaScrollbarScroll = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((pr
|
|
|
16536
16875
|
debounceScrollEnd();
|
|
16537
16876
|
}
|
|
16538
16877
|
prevScrollPos = scrollPos;
|
|
16539
|
-
};
|
|
16878
|
+
}, "handleScroll");
|
|
16540
16879
|
viewport.addEventListener("scroll", handleScroll);
|
|
16541
16880
|
return ()=>viewport.removeEventListener("scroll", handleScroll);
|
|
16542
16881
|
}
|
|
@@ -16546,18 +16885,18 @@ var ScrollAreaScrollbarScroll = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((pr
|
|
|
16546
16885
|
send,
|
|
16547
16886
|
debounceScrollEnd
|
|
16548
16887
|
]);
|
|
16549
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16888
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Presence, {
|
|
16550
16889
|
present: forceMount || "hidden" !== state,
|
|
16551
16890
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaScrollbarVisible, {
|
|
16552
16891
|
"data-state": "hidden" === state ? "hidden" : "visible",
|
|
16553
16892
|
...scrollbarProps,
|
|
16554
16893
|
ref: forwardedRef,
|
|
16555
|
-
onPointerEnter:
|
|
16556
|
-
onPointerLeave:
|
|
16894
|
+
onPointerEnter: dist_composeEventHandlers(props.onPointerEnter, ()=>send("POINTER_ENTER")),
|
|
16895
|
+
onPointerLeave: dist_composeEventHandlers(props.onPointerLeave, ()=>send("POINTER_LEAVE"))
|
|
16557
16896
|
})
|
|
16558
16897
|
});
|
|
16559
|
-
});
|
|
16560
|
-
var ScrollAreaScrollbarAuto = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16898
|
+
}, "ScrollAreaScrollbarScroll"));
|
|
16899
|
+
var ScrollAreaScrollbarAuto = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16561
16900
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
16562
16901
|
const { forceMount, ...scrollbarProps } = props;
|
|
16563
16902
|
const [visible, setVisible] = __WEBPACK_EXTERNAL_MODULE_react__.useState(false);
|
|
@@ -16571,7 +16910,7 @@ var ScrollAreaScrollbarAuto = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
16571
16910
|
}, 10);
|
|
16572
16911
|
useResizeObserver(context.viewport, handleResize);
|
|
16573
16912
|
useResizeObserver(context.content, handleResize);
|
|
16574
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
16913
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Presence, {
|
|
16575
16914
|
present: forceMount || visible,
|
|
16576
16915
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaScrollbarVisible, {
|
|
16577
16916
|
"data-state": visible ? "visible" : "hidden",
|
|
@@ -16579,8 +16918,8 @@ var ScrollAreaScrollbarAuto = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
16579
16918
|
ref: forwardedRef
|
|
16580
16919
|
})
|
|
16581
16920
|
});
|
|
16582
|
-
});
|
|
16583
|
-
var ScrollAreaScrollbarVisible = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16921
|
+
}, "ScrollAreaScrollbarAuto"));
|
|
16922
|
+
var ScrollAreaScrollbarVisible = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16584
16923
|
const { orientation = "vertical", ...scrollbarProps } = props;
|
|
16585
16924
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
16586
16925
|
const thumbRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
@@ -16600,13 +16939,14 @@ var ScrollAreaScrollbarVisible = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((p
|
|
|
16600
16939
|
sizes,
|
|
16601
16940
|
onSizesChange: setSizes,
|
|
16602
16941
|
hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),
|
|
16603
|
-
onThumbChange: (thumb)=>thumbRef.current = thumb,
|
|
16604
|
-
onThumbPointerUp: ()=>pointerOffsetRef.current = 0,
|
|
16605
|
-
onThumbPointerDown: (pointerPos)=>pointerOffsetRef.current = pointerPos
|
|
16942
|
+
onThumbChange: /* @__PURE__ */ react_scroll_area_dist_name((thumb)=>thumbRef.current = thumb, "onThumbChange"),
|
|
16943
|
+
onThumbPointerUp: /* @__PURE__ */ react_scroll_area_dist_name(()=>pointerOffsetRef.current = 0, "onThumbPointerUp"),
|
|
16944
|
+
onThumbPointerDown: /* @__PURE__ */ react_scroll_area_dist_name((pointerPos)=>pointerOffsetRef.current = pointerPos, "onThumbPointerDown")
|
|
16606
16945
|
};
|
|
16607
16946
|
function getScrollPosition(pointerPos, dir) {
|
|
16608
16947
|
return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);
|
|
16609
16948
|
}
|
|
16949
|
+
react_scroll_area_dist_name(getScrollPosition, "getScrollPosition");
|
|
16610
16950
|
if ("horizontal" === orientation) return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaScrollbarX, {
|
|
16611
16951
|
...commonProps,
|
|
16612
16952
|
ref: forwardedRef,
|
|
@@ -16642,13 +16982,13 @@ var ScrollAreaScrollbarVisible = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((p
|
|
|
16642
16982
|
}
|
|
16643
16983
|
});
|
|
16644
16984
|
return null;
|
|
16645
|
-
});
|
|
16646
|
-
var ScrollAreaScrollbarX = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
16985
|
+
}, "ScrollAreaScrollbarVisible"));
|
|
16986
|
+
var ScrollAreaScrollbarX = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16647
16987
|
const { sizes, onSizesChange, ...scrollbarProps } = props;
|
|
16648
16988
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
16649
16989
|
const [computedStyle, setComputedStyle] = __WEBPACK_EXTERNAL_MODULE_react__.useState();
|
|
16650
16990
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
16651
|
-
const composeRefs =
|
|
16991
|
+
const composeRefs = dist_useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);
|
|
16652
16992
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
16653
16993
|
if (ref.current) setComputedStyle(getComputedStyle(ref.current));
|
|
16654
16994
|
}, [
|
|
@@ -16687,13 +17027,13 @@ var ScrollAreaScrollbarX = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
16687
17027
|
});
|
|
16688
17028
|
}
|
|
16689
17029
|
});
|
|
16690
|
-
});
|
|
16691
|
-
var ScrollAreaScrollbarY = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
17030
|
+
}, "ScrollAreaScrollbarX"));
|
|
17031
|
+
var ScrollAreaScrollbarY = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16692
17032
|
const { sizes, onSizesChange, ...scrollbarProps } = props;
|
|
16693
17033
|
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
16694
17034
|
const [computedStyle, setComputedStyle] = __WEBPACK_EXTERNAL_MODULE_react__.useState();
|
|
16695
17035
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
16696
|
-
const composeRefs =
|
|
17036
|
+
const composeRefs = dist_useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);
|
|
16697
17037
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
16698
17038
|
if (ref.current) setComputedStyle(getComputedStyle(ref.current));
|
|
16699
17039
|
}, [
|
|
@@ -16733,19 +17073,19 @@ var ScrollAreaScrollbarY = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
16733
17073
|
});
|
|
16734
17074
|
}
|
|
16735
17075
|
});
|
|
16736
|
-
});
|
|
17076
|
+
}, "ScrollAreaScrollbarY"));
|
|
16737
17077
|
var [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);
|
|
16738
|
-
var ScrollAreaScrollbarImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
17078
|
+
var ScrollAreaScrollbarImpl = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16739
17079
|
const { __scopeScrollArea, sizes, hasThumb, onThumbChange, onThumbPointerUp, onThumbPointerDown, onThumbPositionChange, onDragScroll, onWheelScroll, onResize, ...scrollbarProps } = props;
|
|
16740
17080
|
const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
|
|
16741
17081
|
const [scrollbar, setScrollbar] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
16742
|
-
const composeRefs =
|
|
17082
|
+
const composeRefs = dist_useComposedRefs(forwardedRef, setScrollbar);
|
|
16743
17083
|
const rectRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
16744
17084
|
const prevWebkitUserSelectRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef("");
|
|
16745
17085
|
const viewport = context.viewport;
|
|
16746
17086
|
const maxScrollPos = sizes.content - sizes.viewport;
|
|
16747
|
-
const handleWheelScroll =
|
|
16748
|
-
const handleThumbPositionChange =
|
|
17087
|
+
const handleWheelScroll = dist_useCallbackRef(onWheelScroll);
|
|
17088
|
+
const handleThumbPositionChange = dist_useCallbackRef(onThumbPositionChange);
|
|
16749
17089
|
const handleResize = useDebounceCallback(onResize, 10);
|
|
16750
17090
|
function handleDragScroll(event) {
|
|
16751
17091
|
if (rectRef.current) {
|
|
@@ -16757,12 +17097,13 @@ var ScrollAreaScrollbarImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
16757
17097
|
});
|
|
16758
17098
|
}
|
|
16759
17099
|
}
|
|
17100
|
+
react_scroll_area_dist_name(handleDragScroll, "handleDragScroll");
|
|
16760
17101
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
16761
|
-
const handleWheel = (event)=>{
|
|
17102
|
+
const handleWheel = /* @__PURE__ */ react_scroll_area_dist_name((event)=>{
|
|
16762
17103
|
const element = event.target;
|
|
16763
17104
|
const isScrollbarWheel = scrollbar?.contains(element);
|
|
16764
17105
|
if (isScrollbarWheel) handleWheelScroll(event, maxScrollPos);
|
|
16765
|
-
};
|
|
17106
|
+
}, "handleWheel");
|
|
16766
17107
|
document.addEventListener("wheel", handleWheel, {
|
|
16767
17108
|
passive: false
|
|
16768
17109
|
});
|
|
@@ -16785,18 +17126,18 @@ var ScrollAreaScrollbarImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
16785
17126
|
scope: __scopeScrollArea,
|
|
16786
17127
|
scrollbar,
|
|
16787
17128
|
hasThumb,
|
|
16788
|
-
onThumbChange:
|
|
16789
|
-
onThumbPointerUp:
|
|
17129
|
+
onThumbChange: dist_useCallbackRef(onThumbChange),
|
|
17130
|
+
onThumbPointerUp: dist_useCallbackRef(onThumbPointerUp),
|
|
16790
17131
|
onThumbPositionChange: handleThumbPositionChange,
|
|
16791
|
-
onThumbPointerDown:
|
|
16792
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
17132
|
+
onThumbPointerDown: dist_useCallbackRef(onThumbPointerDown),
|
|
17133
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
16793
17134
|
...scrollbarProps,
|
|
16794
17135
|
ref: composeRefs,
|
|
16795
17136
|
style: {
|
|
16796
17137
|
position: "absolute",
|
|
16797
17138
|
...scrollbarProps.style
|
|
16798
17139
|
},
|
|
16799
|
-
onPointerDown:
|
|
17140
|
+
onPointerDown: dist_composeEventHandlers(props.onPointerDown, (event)=>{
|
|
16800
17141
|
const mainPointer = 0;
|
|
16801
17142
|
if (event.button === mainPointer) {
|
|
16802
17143
|
const element = event.target;
|
|
@@ -16808,8 +17149,8 @@ var ScrollAreaScrollbarImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
16808
17149
|
handleDragScroll(event);
|
|
16809
17150
|
}
|
|
16810
17151
|
}),
|
|
16811
|
-
onPointerMove:
|
|
16812
|
-
onPointerUp:
|
|
17152
|
+
onPointerMove: dist_composeEventHandlers(props.onPointerMove, handleDragScroll),
|
|
17153
|
+
onPointerUp: dist_composeEventHandlers(props.onPointerUp, (event)=>{
|
|
16813
17154
|
const element = event.target;
|
|
16814
17155
|
if (element.hasPointerCapture(event.pointerId)) element.releasePointerCapture(event.pointerId);
|
|
16815
17156
|
document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;
|
|
@@ -16818,25 +17159,25 @@ var ScrollAreaScrollbarImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
16818
17159
|
})
|
|
16819
17160
|
})
|
|
16820
17161
|
});
|
|
16821
|
-
});
|
|
17162
|
+
}, "ScrollAreaScrollbarImpl"));
|
|
16822
17163
|
var THUMB_NAME = "ScrollAreaThumb";
|
|
16823
|
-
var ScrollAreaThumb = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
17164
|
+
var ScrollAreaThumb = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16824
17165
|
const { forceMount, ...thumbProps } = props;
|
|
16825
17166
|
const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);
|
|
16826
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
17167
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Presence, {
|
|
16827
17168
|
present: forceMount || scrollbarContext.hasThumb,
|
|
16828
17169
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ScrollAreaThumbImpl, {
|
|
16829
17170
|
ref: forwardedRef,
|
|
16830
17171
|
...thumbProps
|
|
16831
17172
|
})
|
|
16832
17173
|
});
|
|
16833
|
-
});
|
|
16834
|
-
var ScrollAreaThumbImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
17174
|
+
}, "ScrollAreaThumb"));
|
|
17175
|
+
var ScrollAreaThumbImpl = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16835
17176
|
const { __scopeScrollArea, style, ...thumbProps } = props;
|
|
16836
17177
|
const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
|
|
16837
17178
|
const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
|
|
16838
17179
|
const { onThumbPositionChange } = scrollbarContext;
|
|
16839
|
-
const composedRef =
|
|
17180
|
+
const composedRef = dist_useComposedRefs(forwardedRef, scrollbarContext.onThumbChange);
|
|
16840
17181
|
const removeUnlinkedScrollListenerRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(void 0);
|
|
16841
17182
|
const debounceScrollEnd = useDebounceCallback(()=>{
|
|
16842
17183
|
if (removeUnlinkedScrollListenerRef.current) {
|
|
@@ -16847,14 +17188,14 @@ var ScrollAreaThumbImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16847
17188
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
16848
17189
|
const viewport = scrollAreaContext.viewport;
|
|
16849
17190
|
if (viewport) {
|
|
16850
|
-
const handleScroll = ()=>{
|
|
17191
|
+
const handleScroll = /* @__PURE__ */ react_scroll_area_dist_name(()=>{
|
|
16851
17192
|
debounceScrollEnd();
|
|
16852
17193
|
if (!removeUnlinkedScrollListenerRef.current) {
|
|
16853
17194
|
const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);
|
|
16854
17195
|
removeUnlinkedScrollListenerRef.current = listener;
|
|
16855
17196
|
onThumbPositionChange();
|
|
16856
17197
|
}
|
|
16857
|
-
};
|
|
17198
|
+
}, "handleScroll");
|
|
16858
17199
|
onThumbPositionChange();
|
|
16859
17200
|
viewport.addEventListener("scroll", handleScroll);
|
|
16860
17201
|
return ()=>viewport.removeEventListener("scroll", handleScroll);
|
|
@@ -16864,7 +17205,7 @@ var ScrollAreaThumbImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16864
17205
|
debounceScrollEnd,
|
|
16865
17206
|
onThumbPositionChange
|
|
16866
17207
|
]);
|
|
16867
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
17208
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
16868
17209
|
"data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
|
|
16869
17210
|
...thumbProps,
|
|
16870
17211
|
ref: composedRef,
|
|
@@ -16873,7 +17214,7 @@ var ScrollAreaThumbImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16873
17214
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
16874
17215
|
...style
|
|
16875
17216
|
},
|
|
16876
|
-
onPointerDownCapture:
|
|
17217
|
+
onPointerDownCapture: dist_composeEventHandlers(props.onPointerDownCapture, (event)=>{
|
|
16877
17218
|
const thumb = event.target;
|
|
16878
17219
|
const thumbRect = thumb.getBoundingClientRect();
|
|
16879
17220
|
const x = event.clientX - thumbRect.left;
|
|
@@ -16883,12 +17224,11 @@ var ScrollAreaThumbImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, f
|
|
|
16883
17224
|
y
|
|
16884
17225
|
});
|
|
16885
17226
|
}),
|
|
16886
|
-
onPointerUp:
|
|
17227
|
+
onPointerUp: dist_composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)
|
|
16887
17228
|
});
|
|
16888
|
-
});
|
|
16889
|
-
ScrollAreaThumb.displayName = THUMB_NAME;
|
|
17229
|
+
}, "ScrollAreaThumbImpl"));
|
|
16890
17230
|
var CORNER_NAME = "ScrollAreaCorner";
|
|
16891
|
-
var ScrollAreaCorner = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
17231
|
+
var ScrollAreaCorner = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16892
17232
|
const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);
|
|
16893
17233
|
const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);
|
|
16894
17234
|
const hasCorner = "scroll" !== context.type && hasBothScrollbarsVisible;
|
|
@@ -16896,9 +17236,8 @@ var ScrollAreaCorner = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forw
|
|
|
16896
17236
|
...props,
|
|
16897
17237
|
ref: forwardedRef
|
|
16898
17238
|
}) : null;
|
|
16899
|
-
});
|
|
16900
|
-
|
|
16901
|
-
var ScrollAreaCornerImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
17239
|
+
}, "ScrollAreaCorner"));
|
|
17240
|
+
var ScrollAreaCornerImpl = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_scroll_area_dist_name(function(props, forwardedRef) {
|
|
16902
17241
|
const { __scopeScrollArea, ...cornerProps } = props;
|
|
16903
17242
|
const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);
|
|
16904
17243
|
const [width, setWidth] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
|
|
@@ -16922,7 +17261,7 @@ var ScrollAreaCornerImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
16922
17261
|
onCornerWidthChange,
|
|
16923
17262
|
onCornerHeightChange
|
|
16924
17263
|
]);
|
|
16925
|
-
return hasSize ? /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
17264
|
+
return hasSize ? /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
16926
17265
|
...cornerProps,
|
|
16927
17266
|
ref: forwardedRef,
|
|
16928
17267
|
style: {
|
|
@@ -16935,20 +17274,23 @@ var ScrollAreaCornerImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props,
|
|
|
16935
17274
|
...props.style
|
|
16936
17275
|
}
|
|
16937
17276
|
}) : null;
|
|
16938
|
-
});
|
|
17277
|
+
}, "ScrollAreaCornerImpl"));
|
|
16939
17278
|
function toInt(value1) {
|
|
16940
17279
|
return value1 ? parseInt(value1, 10) : 0;
|
|
16941
17280
|
}
|
|
17281
|
+
react_scroll_area_dist_name(toInt, "toInt");
|
|
16942
17282
|
function getThumbRatio(viewportSize, contentSize) {
|
|
16943
17283
|
const ratio = viewportSize / contentSize;
|
|
16944
17284
|
return isNaN(ratio) ? 0 : ratio;
|
|
16945
17285
|
}
|
|
17286
|
+
react_scroll_area_dist_name(getThumbRatio, "getThumbRatio");
|
|
16946
17287
|
function getThumbSize(sizes) {
|
|
16947
17288
|
const ratio = getThumbRatio(sizes.viewport, sizes.content);
|
|
16948
17289
|
const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
|
|
16949
17290
|
const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;
|
|
16950
17291
|
return Math.max(thumbSize, 18);
|
|
16951
17292
|
}
|
|
17293
|
+
react_scroll_area_dist_name(getThumbSize, "getThumbSize");
|
|
16952
17294
|
function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "ltr") {
|
|
16953
17295
|
const thumbSizePx = getThumbSize(sizes);
|
|
16954
17296
|
const thumbCenter = thumbSizePx / 2;
|
|
@@ -16970,6 +17312,7 @@ function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "l
|
|
|
16970
17312
|
], scrollRange);
|
|
16971
17313
|
return interpolate(pointerPos);
|
|
16972
17314
|
}
|
|
17315
|
+
react_scroll_area_dist_name(getScrollPositionFromPointer, "getScrollPositionFromPointer");
|
|
16973
17316
|
function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") {
|
|
16974
17317
|
const thumbSizePx = getThumbSize(sizes);
|
|
16975
17318
|
const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
|
|
@@ -16993,6 +17336,7 @@ function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") {
|
|
|
16993
17336
|
]);
|
|
16994
17337
|
return interpolate(scrollWithoutMomentum);
|
|
16995
17338
|
}
|
|
17339
|
+
react_scroll_area_dist_name(getThumbOffsetFromScroll, "getThumbOffsetFromScroll");
|
|
16996
17340
|
function linearScale(input, output) {
|
|
16997
17341
|
return (value1)=>{
|
|
16998
17342
|
if (input[0] === input[1] || output[0] === output[1]) return output[0];
|
|
@@ -17000,30 +17344,18 @@ function linearScale(input, output) {
|
|
|
17000
17344
|
return output[0] + ratio * (value1 - input[0]);
|
|
17001
17345
|
};
|
|
17002
17346
|
}
|
|
17347
|
+
react_scroll_area_dist_name(linearScale, "linearScale");
|
|
17003
17348
|
function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {
|
|
17004
17349
|
return scrollPos > 0 && scrollPos < maxScrollPos;
|
|
17005
17350
|
}
|
|
17006
|
-
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
top: node.scrollTop
|
|
17010
|
-
};
|
|
17351
|
+
react_scroll_area_dist_name(isScrollingWithinScrollbarBounds, "isScrollingWithinScrollbarBounds");
|
|
17352
|
+
var addUnlinkedScrollListener = /* @__PURE__ */ react_scroll_area_dist_name((node, handler = ()=>{})=>{
|
|
17353
|
+
node.scrollLeft, node.scrollTop;
|
|
17011
17354
|
let rAF = 0;
|
|
17012
|
-
(function loop() {
|
|
17013
|
-
const position = {
|
|
17014
|
-
left: node.scrollLeft,
|
|
17015
|
-
top: node.scrollTop
|
|
17016
|
-
};
|
|
17017
|
-
const isHorizontalScroll = prevPosition.left !== position.left;
|
|
17018
|
-
const isVerticalScroll = prevPosition.top !== position.top;
|
|
17019
|
-
if (isHorizontalScroll || isVerticalScroll) handler();
|
|
17020
|
-
prevPosition = position;
|
|
17021
|
-
rAF = window.requestAnimationFrame(loop);
|
|
17022
|
-
})();
|
|
17023
17355
|
return ()=>window.cancelAnimationFrame(rAF);
|
|
17024
|
-
};
|
|
17356
|
+
}, "addUnlinkedScrollListener");
|
|
17025
17357
|
function useDebounceCallback(callback, delay) {
|
|
17026
|
-
const handleCallback =
|
|
17358
|
+
const handleCallback = dist_useCallbackRef(callback);
|
|
17027
17359
|
const debounceTimerRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(0);
|
|
17028
17360
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>()=>window.clearTimeout(debounceTimerRef.current), []);
|
|
17029
17361
|
return __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>{
|
|
@@ -17034,8 +17366,9 @@ function useDebounceCallback(callback, delay) {
|
|
|
17034
17366
|
delay
|
|
17035
17367
|
]);
|
|
17036
17368
|
}
|
|
17369
|
+
react_scroll_area_dist_name(useDebounceCallback, "useDebounceCallback");
|
|
17037
17370
|
function useResizeObserver(element, onResize) {
|
|
17038
|
-
const handleResize =
|
|
17371
|
+
const handleResize = dist_useCallbackRef(onResize);
|
|
17039
17372
|
useLayoutEffect2(()=>{
|
|
17040
17373
|
let rAF = 0;
|
|
17041
17374
|
if (element) {
|
|
@@ -17054,6 +17387,7 @@ function useResizeObserver(element, onResize) {
|
|
|
17054
17387
|
handleResize
|
|
17055
17388
|
]);
|
|
17056
17389
|
}
|
|
17390
|
+
react_scroll_area_dist_name(useResizeObserver, "useResizeObserver");
|
|
17057
17391
|
var react_scroll_area_dist_Root = ScrollArea;
|
|
17058
17392
|
var Viewport = ScrollAreaViewport;
|
|
17059
17393
|
var Corner = ScrollAreaCorner;
|
|
@@ -17098,6 +17432,11 @@ const Mask = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({
|
|
|
17098
17432
|
]
|
|
17099
17433
|
}));
|
|
17100
17434
|
const components_Mask = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(Mask);
|
|
17435
|
+
var react_visually_hidden_dist_defProp = Object.defineProperty;
|
|
17436
|
+
var react_visually_hidden_dist_name = (target, value1)=>react_visually_hidden_dist_defProp(target, "name", {
|
|
17437
|
+
value: value1,
|
|
17438
|
+
configurable: true
|
|
17439
|
+
});
|
|
17101
17440
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
17102
17441
|
position: "absolute",
|
|
17103
17442
|
border: 0,
|
|
@@ -17110,18 +17449,23 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
17110
17449
|
whiteSpace: "nowrap",
|
|
17111
17450
|
wordWrap: "normal"
|
|
17112
17451
|
});
|
|
17113
|
-
var
|
|
17114
|
-
|
|
17452
|
+
var VisuallyHidden = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_visually_hidden_dist_name(function(props, forwardedRef) {
|
|
17453
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.span, {
|
|
17115
17454
|
...props,
|
|
17116
17455
|
ref: forwardedRef,
|
|
17117
17456
|
style: {
|
|
17118
17457
|
...VISUALLY_HIDDEN_STYLES,
|
|
17119
17458
|
...props.style
|
|
17120
17459
|
}
|
|
17121
|
-
})
|
|
17122
|
-
VisuallyHidden
|
|
17460
|
+
});
|
|
17461
|
+
}, "VisuallyHidden"));
|
|
17123
17462
|
var react_visually_hidden_dist_Root = VisuallyHidden;
|
|
17124
17463
|
"use client";
|
|
17464
|
+
var react_tooltip_dist_defProp = Object.defineProperty;
|
|
17465
|
+
var react_tooltip_dist_name = (target, value1)=>react_tooltip_dist_defProp(target, "name", {
|
|
17466
|
+
value: value1,
|
|
17467
|
+
configurable: true
|
|
17468
|
+
});
|
|
17125
17469
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
17126
17470
|
createPopperScope
|
|
17127
17471
|
]);
|
|
@@ -17130,7 +17474,7 @@ var dist_PROVIDER_NAME = "TooltipProvider";
|
|
|
17130
17474
|
var DEFAULT_DELAY_DURATION = 700;
|
|
17131
17475
|
var TOOLTIP_OPEN = "tooltip.open";
|
|
17132
17476
|
var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(dist_PROVIDER_NAME);
|
|
17133
|
-
var TooltipProvider = (props)=>{
|
|
17477
|
+
var TooltipProvider = /* @__PURE__ */ react_tooltip_dist_name((props)=>{
|
|
17134
17478
|
const { __scopeTooltip, delayDuration = DEFAULT_DELAY_DURATION, skipDelayDuration = 300, disableHoverableContent = false, children } = props;
|
|
17135
17479
|
const isOpenDelayedRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(true);
|
|
17136
17480
|
const isPointerInTransitRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
@@ -17164,16 +17508,16 @@ var TooltipProvider = (props)=>{
|
|
|
17164
17508
|
disableHoverableContent,
|
|
17165
17509
|
children
|
|
17166
17510
|
});
|
|
17167
|
-
};
|
|
17168
|
-
TooltipProvider.displayName = dist_PROVIDER_NAME;
|
|
17511
|
+
}, "TooltipProvider");
|
|
17169
17512
|
var TOOLTIP_NAME = "Tooltip";
|
|
17170
17513
|
var [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME);
|
|
17171
|
-
var dist_Tooltip = (props)=>{
|
|
17514
|
+
var dist_Tooltip = /* @__PURE__ */ react_tooltip_dist_name((props)=>{
|
|
17172
17515
|
const { __scopeTooltip, children, open: openProp, defaultOpen, onOpenChange, disableHoverableContent: disableHoverableContentProp, delayDuration: delayDurationProp } = props;
|
|
17173
17516
|
const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);
|
|
17174
17517
|
const popperScope = dist_usePopperScope(__scopeTooltip);
|
|
17175
17518
|
const [trigger, setTrigger] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
17176
|
-
const
|
|
17519
|
+
const [contentIdState, setContentId] = __WEBPACK_EXTERNAL_MODULE_react__.useState(void 0);
|
|
17520
|
+
const generatedContentId = dist_useId();
|
|
17177
17521
|
const openTimerRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(0);
|
|
17178
17522
|
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
|
17179
17523
|
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
|
@@ -17181,13 +17525,13 @@ var dist_Tooltip = (props)=>{
|
|
|
17181
17525
|
const [open, setOpen] = dist_useControllableState({
|
|
17182
17526
|
prop: openProp,
|
|
17183
17527
|
defaultProp: defaultOpen ?? false,
|
|
17184
|
-
onChange: (open2)=>{
|
|
17528
|
+
onChange: /* @__PURE__ */ react_tooltip_dist_name((open2)=>{
|
|
17185
17529
|
if (open2) {
|
|
17186
17530
|
providerContext.onOpen();
|
|
17187
17531
|
document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));
|
|
17188
17532
|
} else providerContext.onClose();
|
|
17189
17533
|
onOpenChange?.(open2);
|
|
17190
|
-
},
|
|
17534
|
+
}, "onChange"),
|
|
17191
17535
|
caller: TOOLTIP_NAME
|
|
17192
17536
|
});
|
|
17193
17537
|
const stateAttribute = __WEBPACK_EXTERNAL_MODULE_react__.useMemo(()=>open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed", [
|
|
@@ -17225,11 +17569,13 @@ var dist_Tooltip = (props)=>{
|
|
|
17225
17569
|
openTimerRef.current = 0;
|
|
17226
17570
|
}
|
|
17227
17571
|
}, []);
|
|
17572
|
+
const contentId = contentIdState ?? generatedContentId;
|
|
17228
17573
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Root2, {
|
|
17229
17574
|
...popperScope,
|
|
17230
17575
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(TooltipContextProvider, {
|
|
17231
17576
|
scope: __scopeTooltip,
|
|
17232
17577
|
contentId,
|
|
17578
|
+
setContentId,
|
|
17233
17579
|
open,
|
|
17234
17580
|
stateAttribute,
|
|
17235
17581
|
trigger,
|
|
@@ -17258,16 +17604,15 @@ var dist_Tooltip = (props)=>{
|
|
|
17258
17604
|
children
|
|
17259
17605
|
})
|
|
17260
17606
|
});
|
|
17261
|
-
};
|
|
17262
|
-
dist_Tooltip.displayName = TOOLTIP_NAME;
|
|
17607
|
+
}, "Tooltip");
|
|
17263
17608
|
var dist_TRIGGER_NAME = "TooltipTrigger";
|
|
17264
|
-
var TooltipTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
17609
|
+
var TooltipTrigger = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_tooltip_dist_name(function(props, forwardedRef) {
|
|
17265
17610
|
const { __scopeTooltip, ...triggerProps } = props;
|
|
17266
17611
|
const context = useTooltipContext(dist_TRIGGER_NAME, __scopeTooltip);
|
|
17267
17612
|
const providerContext = useTooltipProviderContext(dist_TRIGGER_NAME, __scopeTooltip);
|
|
17268
17613
|
const popperScope = dist_usePopperScope(__scopeTooltip);
|
|
17269
17614
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
17270
|
-
const composedRefs =
|
|
17615
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, ref, context.onTriggerChange);
|
|
17271
17616
|
const isPointerDownRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
17272
17617
|
const hasPointerMoveOpenedRef = __WEBPACK_EXTERNAL_MODULE_react__.useRef(false);
|
|
17273
17618
|
const handlePointerUp = __WEBPACK_EXTERNAL_MODULE_react__.useCallback(()=>isPointerDownRef.current = false, []);
|
|
@@ -17277,49 +17622,48 @@ var TooltipTrigger = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
17277
17622
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Anchor, {
|
|
17278
17623
|
asChild: true,
|
|
17279
17624
|
...popperScope,
|
|
17280
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
17625
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.button, {
|
|
17281
17626
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
17282
17627
|
"data-state": context.stateAttribute,
|
|
17283
17628
|
...triggerProps,
|
|
17284
17629
|
ref: composedRefs,
|
|
17285
|
-
onPointerMove:
|
|
17630
|
+
onPointerMove: dist_composeEventHandlers(props.onPointerMove, (event)=>{
|
|
17286
17631
|
if ("touch" === event.pointerType) return;
|
|
17287
17632
|
if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
|
|
17288
17633
|
context.onTriggerEnter();
|
|
17289
17634
|
hasPointerMoveOpenedRef.current = true;
|
|
17290
17635
|
}
|
|
17291
17636
|
}),
|
|
17292
|
-
onPointerLeave:
|
|
17637
|
+
onPointerLeave: dist_composeEventHandlers(props.onPointerLeave, ()=>{
|
|
17293
17638
|
context.onTriggerLeave();
|
|
17294
17639
|
hasPointerMoveOpenedRef.current = false;
|
|
17295
17640
|
}),
|
|
17296
|
-
onPointerDown:
|
|
17641
|
+
onPointerDown: dist_composeEventHandlers(props.onPointerDown, ()=>{
|
|
17297
17642
|
if (context.open) context.onClose();
|
|
17298
17643
|
isPointerDownRef.current = true;
|
|
17299
17644
|
document.addEventListener("pointerup", handlePointerUp, {
|
|
17300
17645
|
once: true
|
|
17301
17646
|
});
|
|
17302
17647
|
}),
|
|
17303
|
-
onFocus:
|
|
17648
|
+
onFocus: dist_composeEventHandlers(props.onFocus, ()=>{
|
|
17304
17649
|
if (!isPointerDownRef.current) context.onOpen();
|
|
17305
17650
|
}),
|
|
17306
|
-
onBlur:
|
|
17307
|
-
onClick:
|
|
17651
|
+
onBlur: dist_composeEventHandlers(props.onBlur, context.onClose),
|
|
17652
|
+
onClick: dist_composeEventHandlers(props.onClick, context.onClose)
|
|
17308
17653
|
})
|
|
17309
17654
|
});
|
|
17310
|
-
});
|
|
17311
|
-
|
|
17312
|
-
var
|
|
17313
|
-
var [dist_PortalProvider, dist_usePortalContext] = createTooltipContext(react_tooltip_dist_PORTAL_NAME, {
|
|
17655
|
+
}, "TooltipTrigger"));
|
|
17656
|
+
var dist_PORTAL_NAME = "TooltipPortal";
|
|
17657
|
+
var [dist_PortalProvider, dist_usePortalContext] = createTooltipContext(dist_PORTAL_NAME, {
|
|
17314
17658
|
forceMount: void 0
|
|
17315
17659
|
});
|
|
17316
|
-
var TooltipPortal = (props)=>{
|
|
17660
|
+
var TooltipPortal = /* @__PURE__ */ react_tooltip_dist_name((props)=>{
|
|
17317
17661
|
const { __scopeTooltip, forceMount, children, container } = props;
|
|
17318
|
-
const context = useTooltipContext(
|
|
17662
|
+
const context = useTooltipContext(dist_PORTAL_NAME, __scopeTooltip);
|
|
17319
17663
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_PortalProvider, {
|
|
17320
17664
|
scope: __scopeTooltip,
|
|
17321
17665
|
forceMount,
|
|
17322
|
-
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
17666
|
+
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Presence, {
|
|
17323
17667
|
present: forceMount || context.open,
|
|
17324
17668
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Portal, {
|
|
17325
17669
|
asChild: true,
|
|
@@ -17328,14 +17672,13 @@ var TooltipPortal = (props)=>{
|
|
|
17328
17672
|
})
|
|
17329
17673
|
})
|
|
17330
17674
|
});
|
|
17331
|
-
};
|
|
17332
|
-
TooltipPortal.displayName = react_tooltip_dist_PORTAL_NAME;
|
|
17675
|
+
}, "TooltipPortal");
|
|
17333
17676
|
var react_tooltip_dist_CONTENT_NAME = "TooltipContent";
|
|
17334
|
-
var TooltipContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
17677
|
+
var TooltipContent = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_tooltip_dist_name(function(props, forwardedRef) {
|
|
17335
17678
|
const portalContext = dist_usePortalContext(react_tooltip_dist_CONTENT_NAME, props.__scopeTooltip);
|
|
17336
17679
|
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
|
17337
17680
|
const context = useTooltipContext(react_tooltip_dist_CONTENT_NAME, props.__scopeTooltip);
|
|
17338
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
17681
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Presence, {
|
|
17339
17682
|
present: forceMount || context.open,
|
|
17340
17683
|
children: context.disableHoverableContent ? /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(TooltipContentImpl, {
|
|
17341
17684
|
side,
|
|
@@ -17347,12 +17690,12 @@ var TooltipContent = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
17347
17690
|
ref: forwardedRef
|
|
17348
17691
|
})
|
|
17349
17692
|
});
|
|
17350
|
-
});
|
|
17351
|
-
var TooltipContentHoverable = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
17693
|
+
}, "TooltipContent"));
|
|
17694
|
+
var TooltipContentHoverable = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_tooltip_dist_name(function(props, forwardedRef) {
|
|
17352
17695
|
const context = useTooltipContext(react_tooltip_dist_CONTENT_NAME, props.__scopeTooltip);
|
|
17353
17696
|
const providerContext = useTooltipProviderContext(react_tooltip_dist_CONTENT_NAME, props.__scopeTooltip);
|
|
17354
17697
|
const ref = __WEBPACK_EXTERNAL_MODULE_react__.useRef(null);
|
|
17355
|
-
const composedRefs =
|
|
17698
|
+
const composedRefs = dist_useComposedRefs(forwardedRef, ref);
|
|
17356
17699
|
const [pointerGraceArea, setPointerGraceArea] = __WEBPACK_EXTERNAL_MODULE_react__.useState(null);
|
|
17357
17700
|
const { trigger, onClose } = context;
|
|
17358
17701
|
const content = ref.current;
|
|
@@ -17386,8 +17729,8 @@ var TooltipContentHoverable = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
17386
17729
|
]);
|
|
17387
17730
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
17388
17731
|
if (trigger && content) {
|
|
17389
|
-
const handleTriggerLeave = (event)=>handleCreateGraceArea(event, content);
|
|
17390
|
-
const handleContentLeave = (event)=>handleCreateGraceArea(event, trigger);
|
|
17732
|
+
const handleTriggerLeave = /* @__PURE__ */ react_tooltip_dist_name((event)=>handleCreateGraceArea(event, content), "handleTriggerLeave");
|
|
17733
|
+
const handleContentLeave = /* @__PURE__ */ react_tooltip_dist_name((event)=>handleCreateGraceArea(event, trigger), "handleContentLeave");
|
|
17391
17734
|
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
17392
17735
|
content.addEventListener("pointerleave", handleContentLeave);
|
|
17393
17736
|
return ()=>{
|
|
@@ -17403,7 +17746,7 @@ var TooltipContentHoverable = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
17403
17746
|
]);
|
|
17404
17747
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
17405
17748
|
if (pointerGraceArea) {
|
|
17406
|
-
const handleTrackPointerGrace = (event)=>{
|
|
17749
|
+
const handleTrackPointerGrace = /* @__PURE__ */ react_tooltip_dist_name((event)=>{
|
|
17407
17750
|
const target = event.target;
|
|
17408
17751
|
const pointerPosition = {
|
|
17409
17752
|
x: event.clientX,
|
|
@@ -17416,7 +17759,7 @@ var TooltipContentHoverable = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
17416
17759
|
handleRemoveGraceArea();
|
|
17417
17760
|
onClose();
|
|
17418
17761
|
}
|
|
17419
|
-
};
|
|
17762
|
+
}, "handleTrackPointerGrace");
|
|
17420
17763
|
document.addEventListener("pointermove", handleTrackPointerGrace);
|
|
17421
17764
|
return ()=>document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
17422
17765
|
}
|
|
@@ -17431,13 +17774,10 @@ var TooltipContentHoverable = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((prop
|
|
|
17431
17774
|
...props,
|
|
17432
17775
|
ref: composedRefs
|
|
17433
17776
|
});
|
|
17434
|
-
});
|
|
17435
|
-
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, {
|
|
17436
|
-
isInside: false
|
|
17437
|
-
});
|
|
17777
|
+
}, "TooltipContentHoverable"));
|
|
17438
17778
|
var dist_Slottable = createSlottable("TooltipContent");
|
|
17439
|
-
var TooltipContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
17440
|
-
const { __scopeTooltip, children, "aria-label": ariaLabel, onEscapeKeyDown, onPointerDownOutside, ...contentProps } = props;
|
|
17779
|
+
var TooltipContentImpl = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_tooltip_dist_name(function(props, forwardedRef) {
|
|
17780
|
+
const { __scopeTooltip, children, "aria-label": ariaLabel, id: idProp, onEscapeKeyDown, onPointerDownOutside, ...contentProps } = props;
|
|
17441
17781
|
const context = useTooltipContext(react_tooltip_dist_CONTENT_NAME, __scopeTooltip);
|
|
17442
17782
|
const popperScope = dist_usePopperScope(__scopeTooltip);
|
|
17443
17783
|
const { onClose } = context;
|
|
@@ -17449,9 +17789,9 @@ var TooltipContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
17449
17789
|
]);
|
|
17450
17790
|
__WEBPACK_EXTERNAL_MODULE_react__.useEffect(()=>{
|
|
17451
17791
|
if (context.trigger) {
|
|
17452
|
-
const handleScroll = (event)=>{
|
|
17792
|
+
const handleScroll = /* @__PURE__ */ react_tooltip_dist_name((event)=>{
|
|
17453
17793
|
if (event.target instanceof Node && event.target.contains(context.trigger)) onClose();
|
|
17454
|
-
};
|
|
17794
|
+
}, "handleScroll");
|
|
17455
17795
|
window.addEventListener("scroll", handleScroll, {
|
|
17456
17796
|
capture: true
|
|
17457
17797
|
});
|
|
@@ -17463,6 +17803,16 @@ var TooltipContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
17463
17803
|
context.trigger,
|
|
17464
17804
|
onClose
|
|
17465
17805
|
]);
|
|
17806
|
+
const { setContentId } = context;
|
|
17807
|
+
useLayoutEffect2(()=>{
|
|
17808
|
+
setContentId(idProp);
|
|
17809
|
+
return ()=>{
|
|
17810
|
+
setContentId(void 0);
|
|
17811
|
+
};
|
|
17812
|
+
}, [
|
|
17813
|
+
idProp,
|
|
17814
|
+
setContentId
|
|
17815
|
+
]);
|
|
17466
17816
|
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DismissableLayer, {
|
|
17467
17817
|
asChild: true,
|
|
17468
17818
|
disableOutsidePointerEvents: false,
|
|
@@ -17472,6 +17822,8 @@ var TooltipContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
17472
17822
|
onDismiss: onClose,
|
|
17473
17823
|
children: /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Content, {
|
|
17474
17824
|
"data-state": context.stateAttribute,
|
|
17825
|
+
role: ariaLabel ? void 0 : "tooltip",
|
|
17826
|
+
id: ariaLabel ? void 0 : context.contentId,
|
|
17475
17827
|
...popperScope,
|
|
17476
17828
|
...contentProps,
|
|
17477
17829
|
ref: forwardedRef,
|
|
@@ -17487,32 +17839,24 @@ var TooltipContentImpl = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, fo
|
|
|
17487
17839
|
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Slottable, {
|
|
17488
17840
|
children
|
|
17489
17841
|
}),
|
|
17490
|
-
/* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
17491
|
-
|
|
17492
|
-
|
|
17493
|
-
children:
|
|
17494
|
-
|
|
17495
|
-
role: "tooltip",
|
|
17496
|
-
children: ariaLabel || children
|
|
17497
|
-
})
|
|
17498
|
-
})
|
|
17842
|
+
ariaLabel ? /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(react_visually_hidden_dist_Root, {
|
|
17843
|
+
id: context.contentId,
|
|
17844
|
+
role: "tooltip",
|
|
17845
|
+
children: ariaLabel
|
|
17846
|
+
}) : null
|
|
17499
17847
|
]
|
|
17500
17848
|
})
|
|
17501
17849
|
});
|
|
17502
|
-
});
|
|
17503
|
-
|
|
17504
|
-
var react_tooltip_dist_ARROW_NAME = "TooltipArrow";
|
|
17505
|
-
var TooltipArrow = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)=>{
|
|
17850
|
+
}, "TooltipContentImpl"));
|
|
17851
|
+
var TooltipArrow = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_tooltip_dist_name(function(props, forwardedRef) {
|
|
17506
17852
|
const { __scopeTooltip, ...arrowProps } = props;
|
|
17507
17853
|
const popperScope = dist_usePopperScope(__scopeTooltip);
|
|
17508
|
-
|
|
17509
|
-
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Arrow, {
|
|
17854
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Arrow, {
|
|
17510
17855
|
...popperScope,
|
|
17511
17856
|
...arrowProps,
|
|
17512
17857
|
ref: forwardedRef
|
|
17513
17858
|
});
|
|
17514
|
-
});
|
|
17515
|
-
TooltipArrow.displayName = react_tooltip_dist_ARROW_NAME;
|
|
17859
|
+
}, "TooltipArrow"));
|
|
17516
17860
|
function getExitSideFromRect(point, rect) {
|
|
17517
17861
|
const top = Math.abs(rect.top - point.y);
|
|
17518
17862
|
const bottom = Math.abs(rect.bottom - point.y);
|
|
@@ -17531,6 +17875,7 @@ function getExitSideFromRect(point, rect) {
|
|
|
17531
17875
|
throw new Error("unreachable");
|
|
17532
17876
|
}
|
|
17533
17877
|
}
|
|
17878
|
+
react_tooltip_dist_name(getExitSideFromRect, "getExitSideFromRect");
|
|
17534
17879
|
function getPaddedExitPoints(exitPoint, exitSide, padding = 5) {
|
|
17535
17880
|
const paddedExitPoints = [];
|
|
17536
17881
|
switch(exitSide){
|
|
@@ -17573,6 +17918,7 @@ function getPaddedExitPoints(exitPoint, exitSide, padding = 5) {
|
|
|
17573
17918
|
}
|
|
17574
17919
|
return paddedExitPoints;
|
|
17575
17920
|
}
|
|
17921
|
+
react_tooltip_dist_name(getPaddedExitPoints, "getPaddedExitPoints");
|
|
17576
17922
|
function getPointsFromRect(rect) {
|
|
17577
17923
|
const { top, right, bottom, left } = rect;
|
|
17578
17924
|
return [
|
|
@@ -17594,6 +17940,7 @@ function getPointsFromRect(rect) {
|
|
|
17594
17940
|
}
|
|
17595
17941
|
];
|
|
17596
17942
|
}
|
|
17943
|
+
react_tooltip_dist_name(getPointsFromRect, "getPointsFromRect");
|
|
17597
17944
|
function dist_isPointInPolygon(point, polygon) {
|
|
17598
17945
|
const { x, y } = point;
|
|
17599
17946
|
let inside = false;
|
|
@@ -17609,6 +17956,7 @@ function dist_isPointInPolygon(point, polygon) {
|
|
|
17609
17956
|
}
|
|
17610
17957
|
return inside;
|
|
17611
17958
|
}
|
|
17959
|
+
react_tooltip_dist_name(dist_isPointInPolygon, "isPointInPolygon");
|
|
17612
17960
|
function getHull(points) {
|
|
17613
17961
|
const newPoints = points.slice();
|
|
17614
17962
|
newPoints.sort((a, b)=>{
|
|
@@ -17620,6 +17968,7 @@ function getHull(points) {
|
|
|
17620
17968
|
});
|
|
17621
17969
|
return getHullPresorted(newPoints);
|
|
17622
17970
|
}
|
|
17971
|
+
react_tooltip_dist_name(getHull, "getHull");
|
|
17623
17972
|
function getHullPresorted(points) {
|
|
17624
17973
|
if (points.length <= 1) return points.slice();
|
|
17625
17974
|
const upperHull = [];
|
|
@@ -17649,6 +17998,7 @@ function getHullPresorted(points) {
|
|
|
17649
17998
|
if (1 === upperHull.length && 1 === lowerHull.length && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) return upperHull;
|
|
17650
17999
|
return upperHull.concat(lowerHull);
|
|
17651
18000
|
}
|
|
18001
|
+
react_tooltip_dist_name(getHullPresorted, "getHullPresorted");
|
|
17652
18002
|
var react_tooltip_dist_Provider = TooltipProvider;
|
|
17653
18003
|
var dist_Root3 = dist_Tooltip;
|
|
17654
18004
|
var dist_Trigger = TooltipTrigger;
|
|
@@ -17764,7 +18114,7 @@ const Tooltip_Tooltip = ({ children, content, delay = 200, duration = 3000, offs
|
|
|
17764
18114
|
});
|
|
17765
18115
|
};
|
|
17766
18116
|
const Overlay_Tooltip = Tooltip_Tooltip;
|
|
17767
|
-
const
|
|
18117
|
+
const Dropdown_Dropdown = ({ value: value1, options, onChange, placeholder = "\u8BF7\u9009\u62E9", triggerContent, triggerTitle, closeOnSelect = true, triggerVariant = 'default', showChevron = true, triggerClassName, contentClassName })=>{
|
|
17768
18118
|
const [open, setOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
17769
18119
|
const handleSelect = (0, __WEBPACK_EXTERNAL_MODULE_react__.useCallback)((option)=>{
|
|
17770
18120
|
const nextValue = option.value ?? null;
|
|
@@ -17839,7 +18189,7 @@ const Dropdown = ({ value: value1, options, onChange, placeholder = "\u8BF7\u900
|
|
|
17839
18189
|
]
|
|
17840
18190
|
});
|
|
17841
18191
|
};
|
|
17842
|
-
const
|
|
18192
|
+
const Dropdown = Dropdown_Dropdown;
|
|
17843
18193
|
const DEFAULT_SAMPLE_INTERVAL_MS = 80;
|
|
17844
18194
|
const DEFAULT_SAMPLE_IDLE_DELAY_MS = 80;
|
|
17845
18195
|
const toCursorEventSnapshot = (snapshot)=>({
|
|
@@ -18297,13 +18647,17 @@ const ToolbarGlyph_ToolbarGlyph = ({ children, className, opticalOffsetX = 0, op
|
|
|
18297
18647
|
});
|
|
18298
18648
|
};
|
|
18299
18649
|
const ToolbarGlyph = ToolbarGlyph_ToolbarGlyph;
|
|
18300
|
-
var
|
|
18650
|
+
var react_separator_dist_defProp = Object.defineProperty;
|
|
18651
|
+
var react_separator_dist_name = (target, value1)=>react_separator_dist_defProp(target, "name", {
|
|
18652
|
+
value: value1,
|
|
18653
|
+
configurable: true
|
|
18654
|
+
});
|
|
18301
18655
|
var DEFAULT_ORIENTATION = "horizontal";
|
|
18302
18656
|
var ORIENTATIONS = [
|
|
18303
18657
|
"horizontal",
|
|
18304
18658
|
"vertical"
|
|
18305
18659
|
];
|
|
18306
|
-
var dist_Separator = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwardedRef)
|
|
18660
|
+
var dist_Separator = /* @__PURE__ */ __WEBPACK_EXTERNAL_MODULE_react__.forwardRef(/* @__PURE__ */ react_separator_dist_name(function(props, forwardedRef) {
|
|
18307
18661
|
const { decorative, orientation: orientationProp = DEFAULT_ORIENTATION, ...domProps } = props;
|
|
18308
18662
|
const orientation = isValidOrientation(orientationProp) ? orientationProp : DEFAULT_ORIENTATION;
|
|
18309
18663
|
const ariaOrientation = "vertical" === orientation ? orientation : void 0;
|
|
@@ -18313,17 +18667,17 @@ var dist_Separator = __WEBPACK_EXTERNAL_MODULE_react__.forwardRef((props, forwar
|
|
|
18313
18667
|
"aria-orientation": ariaOrientation,
|
|
18314
18668
|
role: "separator"
|
|
18315
18669
|
};
|
|
18316
|
-
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
18670
|
+
return /* @__PURE__ */ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(dist_Primitive.div, {
|
|
18317
18671
|
"data-orientation": orientation,
|
|
18318
18672
|
...semanticProps,
|
|
18319
18673
|
...domProps,
|
|
18320
18674
|
ref: forwardedRef
|
|
18321
18675
|
});
|
|
18322
|
-
});
|
|
18323
|
-
dist_Separator.displayName = react_separator_dist_NAME;
|
|
18676
|
+
}, "Separator"));
|
|
18324
18677
|
function isValidOrientation(orientation) {
|
|
18325
18678
|
return ORIENTATIONS.includes(orientation);
|
|
18326
18679
|
}
|
|
18680
|
+
react_separator_dist_name(isValidOrientation, "isValidOrientation");
|
|
18327
18681
|
var react_separator_dist_Root = dist_Separator;
|
|
18328
18682
|
function separator_Separator({ className, orientation = 'horizontal', decorative = true, ...props }) {
|
|
18329
18683
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(react_separator_dist_Root, {
|
|
@@ -18343,7 +18697,7 @@ const ToolbarGroupSeparator = ({ className })=>/*#__PURE__*/ (0, __WEBPACK_EXTER
|
|
|
18343
18697
|
className: cn_cn(TOOLBAR_GROUP_SEPARATOR_CLASS_NAME, className),
|
|
18344
18698
|
orientation: "vertical"
|
|
18345
18699
|
});
|
|
18346
|
-
const ToolbarDropdown = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
18700
|
+
const ToolbarDropdown = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Dropdown, {
|
|
18347
18701
|
...props,
|
|
18348
18702
|
triggerVariant: "default",
|
|
18349
18703
|
contentClassName: cn_cn(TOOLBAR_DROPDOWN_CONTENT_CLASS_NAME, props.contentClassName)
|
|
@@ -18355,7 +18709,7 @@ const ToolbarIconDropdown = ({ icon, title, triggerClassName, ...props })=>{
|
|
|
18355
18709
|
children: icon
|
|
18356
18710
|
})
|
|
18357
18711
|
});
|
|
18358
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
18712
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Dropdown, {
|
|
18359
18713
|
...props,
|
|
18360
18714
|
triggerVariant: "default",
|
|
18361
18715
|
triggerTitle: title,
|
|
@@ -18367,7 +18721,7 @@ const ToolbarIconDropdown = ({ icon, title, triggerClassName, ...props })=>{
|
|
|
18367
18721
|
const ToolbarDropdownGroup = ({ leading, triggerClassName, ...props })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(ToolbarGroup, {
|
|
18368
18722
|
children: [
|
|
18369
18723
|
leading,
|
|
18370
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
18724
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Dropdown, {
|
|
18371
18725
|
...props,
|
|
18372
18726
|
triggerVariant: "plain",
|
|
18373
18727
|
contentClassName: cn_cn(TOOLBAR_DROPDOWN_CONTENT_CLASS_NAME, props.contentClassName),
|
|
@@ -20555,7 +20909,7 @@ const RulerTicks_RulerTicks = ({ length = 10, tickColor = 'var(--chart-grid-stro
|
|
|
20555
20909
|
});
|
|
20556
20910
|
};
|
|
20557
20911
|
const components_RulerTicks = RulerTicks_RulerTicks;
|
|
20558
|
-
const
|
|
20912
|
+
const ZoomViewportLayer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ children, className, style: customStyle }, ref)=>{
|
|
20559
20913
|
const { state: { zoom: { style: zoomStyle } } } = useStore_useStore();
|
|
20560
20914
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
20561
20915
|
ref: ref,
|
|
@@ -20568,7 +20922,7 @@ const ZoomViewportLayer_ZoomViewportLayer = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL
|
|
|
20568
20922
|
})
|
|
20569
20923
|
});
|
|
20570
20924
|
});
|
|
20571
|
-
const
|
|
20925
|
+
const Zoom_ZoomViewportLayer = ZoomViewportLayer;
|
|
20572
20926
|
const AXIS_X_TICKS_LAYER_CLASS_NAME = 'absolute right-0 top-0 flex h-full w-full items-center justify-between text-xs opacity-50';
|
|
20573
20927
|
const AXIS_X_TICKS_SHELL_CLASS_NAME = 'relative h-6 w-full select-none overflow-hidden text-xs leading-6';
|
|
20574
20928
|
const MSCAN_SEGMENT_CLASS_NAME = 'flex flex-1 items-center justify-center';
|
|
@@ -20715,13 +21069,13 @@ const AxisXTicks = ({ type })=>{
|
|
|
20715
21069
|
className: AXIS_X_TICKS_SHELL_CLASS_NAME,
|
|
20716
21070
|
children: type === constants_ChartType.Scan || type === constants_ChartType.ScanDF360 || type === constants_ChartType.Heatmap ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(DataNFixedTicks, {
|
|
20717
21071
|
type: type
|
|
20718
|
-
}) : type === constants_ChartType.MScan ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
21072
|
+
}) : type === constants_ChartType.MScan ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
20719
21073
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(MScanTicks, {})
|
|
20720
21074
|
}) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(ThreeFixedTicks, {})
|
|
20721
21075
|
});
|
|
20722
21076
|
};
|
|
20723
21077
|
const Ticks = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisXTicks);
|
|
20724
|
-
const
|
|
21078
|
+
const AxisX_AxisX = ({ type })=>{
|
|
20725
21079
|
const { state: { axisX } } = useStore_useStore();
|
|
20726
21080
|
const { children, unit, ticks } = axisX;
|
|
20727
21081
|
const { width, pluginBoxWidth } = useAxisYWidth_useAxisYWidth();
|
|
@@ -20759,7 +21113,7 @@ const AxisX = ({ type })=>{
|
|
|
20759
21113
|
})
|
|
20760
21114
|
});
|
|
20761
21115
|
};
|
|
20762
|
-
const
|
|
21116
|
+
const AxisX = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.memo)(AxisX_AxisX);
|
|
20763
21117
|
const FlexBox = (props)=>{
|
|
20764
21118
|
const { children, className, style } = props;
|
|
20765
21119
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
@@ -23276,7 +23630,7 @@ const Cursor = ({ id, type })=>{
|
|
|
23276
23630
|
type
|
|
23277
23631
|
]);
|
|
23278
23632
|
if (!show || !isEnabled || !active) return null;
|
|
23279
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
23633
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Zoom_ZoomViewportLayer, {
|
|
23280
23634
|
className: "z-[6]",
|
|
23281
23635
|
children: [
|
|
23282
23636
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
@@ -23502,7 +23856,7 @@ const EventBus_EventBus = ({ id })=>{
|
|
|
23502
23856
|
}, [
|
|
23503
23857
|
handleMouseLeave
|
|
23504
23858
|
]);
|
|
23505
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
23859
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
23506
23860
|
className: "z-[5] pointer-events-auto",
|
|
23507
23861
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
|
|
23508
23862
|
ref: containerRef,
|
|
@@ -23526,14 +23880,14 @@ const EventBus_EventBus = ({ id })=>{
|
|
|
23526
23880
|
});
|
|
23527
23881
|
};
|
|
23528
23882
|
const EventBus = EventBus_EventBus;
|
|
23529
|
-
const
|
|
23883
|
+
const Boundary = ()=>{
|
|
23530
23884
|
const { state: { gridLines } } = useStore_useStore();
|
|
23531
23885
|
return gridLines && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
23532
23886
|
className: "pointer-events-none absolute right-0 top-0 z-[1] flex h-full w-full select-none flex-col border [border-color:var(--chart-grid)] bg-transparent"
|
|
23533
23887
|
});
|
|
23534
23888
|
};
|
|
23535
|
-
const
|
|
23536
|
-
const
|
|
23889
|
+
const GridLines_Boundary = Boundary;
|
|
23890
|
+
const PluginBox = (props)=>{
|
|
23537
23891
|
const { children, onWheelCapture } = props;
|
|
23538
23892
|
const { pluginBoxWidth } = useAxisYWidth_useAxisYWidth();
|
|
23539
23893
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
@@ -23545,7 +23899,7 @@ const PluginBox_PluginBox = (props)=>{
|
|
|
23545
23899
|
children: children
|
|
23546
23900
|
});
|
|
23547
23901
|
};
|
|
23548
|
-
const
|
|
23902
|
+
const components_PluginBox = /*#__PURE__*/ __WEBPACK_EXTERNAL_MODULE_react__["default"].memo(PluginBox);
|
|
23549
23903
|
const PRECISION = 1e4;
|
|
23550
23904
|
const defaultAreaInfoResult = {
|
|
23551
23905
|
startIndex: 0,
|
|
@@ -23743,7 +24097,7 @@ const Area_Area = (props)=>{
|
|
|
23743
24097
|
})
|
|
23744
24098
|
})
|
|
23745
24099
|
}),
|
|
23746
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
24100
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
23747
24101
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
23748
24102
|
style: {
|
|
23749
24103
|
left: `${areaStyle?.left}%`,
|
|
@@ -24724,7 +25078,7 @@ const DragSelectBox = ({ enabled, defaultRect, minSize = 0, minWidth, minHeight,
|
|
|
24724
25078
|
handleMouseDown(event, type, startRect);
|
|
24725
25079
|
};
|
|
24726
25080
|
if (!enabled) return null;
|
|
24727
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
25081
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Zoom_ZoomViewportLayer, {
|
|
24728
25082
|
className: cn_cn('left-0 top-0 h-full w-full overflow-hidden', className),
|
|
24729
25083
|
ref: containerRef,
|
|
24730
25084
|
style: {
|
|
@@ -25486,10 +25840,10 @@ const Heatmap_Heatmap = (props)=>{
|
|
|
25486
25840
|
id: id,
|
|
25487
25841
|
chart: chart
|
|
25488
25842
|
}),
|
|
25489
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
25843
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_PluginBox, {
|
|
25490
25844
|
onWheelCapture: xyZoom ? handleXYWheelCapture : void 0,
|
|
25491
25845
|
children: [
|
|
25492
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
25846
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(GridLines_Boundary, {}),
|
|
25493
25847
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Chart, {}),
|
|
25494
25848
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(EventBus, {
|
|
25495
25849
|
id: id
|
|
@@ -26174,7 +26528,7 @@ const Heatmap_Chart_Chart = ({ publish, heatmapDefaultData })=>{
|
|
|
26174
26528
|
xyZoom: xyZoomEnabled
|
|
26175
26529
|
})
|
|
26176
26530
|
}),
|
|
26177
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
26531
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
|
|
26178
26532
|
type: constants_ChartType.Heatmap
|
|
26179
26533
|
})
|
|
26180
26534
|
]
|
|
@@ -26673,7 +27027,7 @@ const IQChart = (props)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_r
|
|
|
26673
27027
|
const IQ_IQ = withChartPublisher(IQChart, 'IQ');
|
|
26674
27028
|
const IQ = IQ_IQ;
|
|
26675
27029
|
const Reset_modes = Object.values(constants_ModuleType);
|
|
26676
|
-
const
|
|
27030
|
+
const Reset = ()=>{
|
|
26677
27031
|
const { state: { globalID, publish } } = useStore_useStore();
|
|
26678
27032
|
const handleReset = ()=>{
|
|
26679
27033
|
publish?.({
|
|
@@ -26700,7 +27054,7 @@ const Reset_Reset = ()=>{
|
|
|
26700
27054
|
})
|
|
26701
27055
|
});
|
|
26702
27056
|
};
|
|
26703
|
-
const
|
|
27057
|
+
const controls_Reset = Reset;
|
|
26704
27058
|
const SegmentsDisplayControl_SegmentsDisplayControl = ()=>{
|
|
26705
27059
|
const { state: { segments, globalID } } = useStore_useStore();
|
|
26706
27060
|
const [display, setDisplay] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)([]);
|
|
@@ -27928,7 +28282,7 @@ const TOOLBAR_ITEM_CONFIGS = [
|
|
|
27928
28282
|
]
|
|
27929
28283
|
},
|
|
27930
28284
|
{
|
|
27931
|
-
component:
|
|
28285
|
+
component: controls_Reset,
|
|
27932
28286
|
toolType: constants_ToolbarItemType.Reset,
|
|
27933
28287
|
supportedCharts: [],
|
|
27934
28288
|
excludedCharts: [
|
|
@@ -28988,7 +29342,7 @@ const DragFrame = ({ id })=>{
|
|
|
28988
29342
|
id
|
|
28989
29343
|
]);
|
|
28990
29344
|
if (!zoom.show) return null;
|
|
28991
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
29345
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
28992
29346
|
className: "z-[3]",
|
|
28993
29347
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
28994
29348
|
className: "absolute left-[-100%] top-0 h-full w-0 box-border border-2 border-dashed border-chart-grid-strong bg-chart-surface opacity-40",
|
|
@@ -30138,7 +30492,7 @@ const FrequencyTagLine_FrequencyTagLine = (props)=>{
|
|
|
30138
30492
|
show
|
|
30139
30493
|
]);
|
|
30140
30494
|
if (!show || !display) return null;
|
|
30141
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30495
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
30142
30496
|
className: "z-[3]",
|
|
30143
30497
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
30144
30498
|
className: "relative flex h-full w-px border-l border-dashed border-chart-highlight/80 opacity-80",
|
|
@@ -30369,7 +30723,7 @@ const Limit_Limit = ({ id })=>{
|
|
|
30369
30723
|
system.height
|
|
30370
30724
|
]);
|
|
30371
30725
|
if (!show) return null;
|
|
30372
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
30726
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
30373
30727
|
className: "z-[2]",
|
|
30374
30728
|
children: segments?.map((i, index)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
30375
30729
|
style: {
|
|
@@ -31755,7 +32109,7 @@ const Markers = ({ id })=>{
|
|
|
31755
32109
|
resetMarkers
|
|
31756
32110
|
]);
|
|
31757
32111
|
if (!show) return null;
|
|
31758
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
32112
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
31759
32113
|
className: "z-[5]",
|
|
31760
32114
|
children: markers.map((marker)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Markers_MarkerItem, {
|
|
31761
32115
|
marker: marker
|
|
@@ -31811,7 +32165,7 @@ function useScope_useScope() {
|
|
|
31811
32165
|
const Scope = ()=>{
|
|
31812
32166
|
const { state: { scope: { show, left, width } } } = useStore_useStore();
|
|
31813
32167
|
if (!show) return null;
|
|
31814
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
32168
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
31815
32169
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
31816
32170
|
className: "relative flex h-full w-0 box-border border-y border-dashed border-chart-grid bg-chart-surface opacity-50",
|
|
31817
32171
|
style: {
|
|
@@ -32104,7 +32458,7 @@ const Stripe_Stripe = ({ id })=>{
|
|
|
32104
32458
|
change
|
|
32105
32459
|
]);
|
|
32106
32460
|
if (!show || left - right === 0 || !display) return null;
|
|
32107
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
32461
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
32108
32462
|
className: "z-[3]",
|
|
32109
32463
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
32110
32464
|
className: "relative flex h-full w-px box-border border-x-2 border-dashed border-y-0 border-chart-grid-strong bg-chart-surface opacity-40",
|
|
@@ -32170,7 +32524,7 @@ const BandLayer_BandLayer = ()=>{
|
|
|
32170
32524
|
segments
|
|
32171
32525
|
]);
|
|
32172
32526
|
if (!positions.length) return null;
|
|
32173
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
32527
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
32174
32528
|
children: positions.map((position)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
32175
32529
|
"data-testid": "spectrum-band",
|
|
32176
32530
|
"data-band-kind": band.kind,
|
|
@@ -32242,7 +32596,7 @@ const Spectrum_Spectrum = (props)=>{
|
|
|
32242
32596
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisYCanvas, {
|
|
32243
32597
|
chart: chart
|
|
32244
32598
|
}),
|
|
32245
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
32599
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_PluginBox, {
|
|
32246
32600
|
children: [
|
|
32247
32601
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_GridLines, {}),
|
|
32248
32602
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Chart, {}),
|
|
@@ -32318,7 +32672,7 @@ const LevelStream_Chart_Chart = (props)=>{
|
|
|
32318
32672
|
}),
|
|
32319
32673
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FlexBox, {
|
|
32320
32674
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Spectrum, {
|
|
32321
|
-
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
32675
|
+
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_PluginBox, {
|
|
32322
32676
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Level, {
|
|
32323
32677
|
opacity: 0.5
|
|
32324
32678
|
})
|
|
@@ -32396,7 +32750,7 @@ const occupancy = AxisYOccupancy;
|
|
|
32396
32750
|
const OccupancyDashed_Dashed = ()=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
32397
32751
|
className: "h-0 w-full flex-1 border-t [border-color:var(--chart-grid)] first:border-t-0"
|
|
32398
32752
|
});
|
|
32399
|
-
const
|
|
32753
|
+
const OccupancyDashed_OccupancyDashed = ()=>{
|
|
32400
32754
|
const { state: { gridLines } } = useStore_useStore();
|
|
32401
32755
|
return gridLines && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
32402
32756
|
className: "pointer-events-none absolute right-0 top-0 z-[1] flex h-full w-full select-none flex-col border [border-color:var(--chart-grid)] bg-transparent",
|
|
@@ -32408,7 +32762,7 @@ const OccupancyDashed = ()=>{
|
|
|
32408
32762
|
]
|
|
32409
32763
|
});
|
|
32410
32764
|
};
|
|
32411
|
-
const
|
|
32765
|
+
const OccupancyDashed = OccupancyDashed_OccupancyDashed;
|
|
32412
32766
|
const TOTAL_LINE_HIDDEN_OFFSET = -200;
|
|
32413
32767
|
const getOccupancyTotalLineRuntimeId = (id)=>`occupancy-total-line-${id}`;
|
|
32414
32768
|
const applyOccupancyTotalLineValue = (lineElement, valueElement, value1 = 0)=>{
|
|
@@ -32502,9 +32856,9 @@ const Occupancy_Occupancy = (props)=>{
|
|
|
32502
32856
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(occupancy, {
|
|
32503
32857
|
disabled: occupancyAxisYDisabled
|
|
32504
32858
|
}),
|
|
32505
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
32859
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_PluginBox, {
|
|
32506
32860
|
children: [
|
|
32507
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
32861
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(OccupancyDashed, {}),
|
|
32508
32862
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Chart, {}),
|
|
32509
32863
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(EventBus, {
|
|
32510
32864
|
id: id
|
|
@@ -32550,7 +32904,7 @@ const Occupancy_Chart_Chart = (props)=>{
|
|
|
32550
32904
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(components_FlexBox, {
|
|
32551
32905
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {})
|
|
32552
32906
|
}),
|
|
32553
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
32907
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
|
|
32554
32908
|
type: constants_ChartType.Scan
|
|
32555
32909
|
})
|
|
32556
32910
|
]
|
|
@@ -32722,7 +33076,7 @@ const HeatmapPortal_Chart = (props)=>{
|
|
|
32722
33076
|
type: constants_ChartType.Heatmap
|
|
32723
33077
|
}),
|
|
32724
33078
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Heatmap, {}),
|
|
32725
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
33079
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
|
|
32726
33080
|
type: type
|
|
32727
33081
|
})
|
|
32728
33082
|
]
|
|
@@ -32745,7 +33099,7 @@ const OccupancyPortal_Chart = (props)=>{
|
|
|
32745
33099
|
type: constants_ChartType.Occupancy
|
|
32746
33100
|
}),
|
|
32747
33101
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(modules_Occupancy, {}),
|
|
32748
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
33102
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
|
|
32749
33103
|
type: type
|
|
32750
33104
|
})
|
|
32751
33105
|
]
|
|
@@ -32784,7 +33138,7 @@ const Blaze = ()=>{
|
|
|
32784
33138
|
globalID
|
|
32785
33139
|
]);
|
|
32786
33140
|
if (!show) return null;
|
|
32787
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
33141
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
32788
33142
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
32789
33143
|
className: "absolute left-[-100%] top-0 flex h-full w-0 opacity-50",
|
|
32790
33144
|
style: {
|
|
@@ -32819,7 +33173,7 @@ const Spectrum_Legend = Legend;
|
|
|
32819
33173
|
const SegmentsZebra = ()=>{
|
|
32820
33174
|
const { state: { segments } } = useStore_useStore();
|
|
32821
33175
|
const totalPoints = segments.totalPoints ?? 0;
|
|
32822
|
-
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
33176
|
+
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom_ZoomViewportLayer, {
|
|
32823
33177
|
className: "z-[0]",
|
|
32824
33178
|
children: segments.map((i, key)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
32825
33179
|
className: "h-full border-x",
|
|
@@ -33181,7 +33535,7 @@ const Spectrum_Chart_Chart = (props)=>{
|
|
|
33181
33535
|
occupancyElementID: occupancyElementID,
|
|
33182
33536
|
occupancyAxisYElementID: occupancyAxisYElementID
|
|
33183
33537
|
}),
|
|
33184
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(
|
|
33538
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(components_PluginBox, {
|
|
33185
33539
|
children: [
|
|
33186
33540
|
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Zoom, {}),
|
|
33187
33541
|
type === constants_ChartType.Scan && /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.Fragment, {
|
|
@@ -33195,7 +33549,7 @@ const Spectrum_Chart_Chart = (props)=>{
|
|
|
33195
33549
|
})
|
|
33196
33550
|
]
|
|
33197
33551
|
}),
|
|
33198
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
33552
|
+
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(AxisX, {
|
|
33199
33553
|
type: type
|
|
33200
33554
|
})
|
|
33201
33555
|
]
|