@stakekit/widget 0.0.271 → 0.0.272
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle/index.bundle.js +14 -14
- package/dist/package/index.package.js +542 -555
- package/dist/types/providers/api/api-client-provider.d.ts +0 -1
- package/dist/types/providers/api/api-client.d.ts +0 -1
- package/dist/website/assets/{basic-BjB9J4Ev.js → basic-BIaTxSk7.js} +1 -1
- package/dist/website/assets/{basic-C-GRivf3.js → basic-Ck0ZK6iG.js} +1 -1
- package/dist/website/assets/{browser-BFTg1n22.js → browser-ngXJk5z1.js} +1 -1
- package/dist/website/assets/{build-B_rzNutM.js → build-BwfAbrKK.js} +1 -1
- package/dist/website/assets/{build-BfoC__Fp.js → build-hYxdhyci.js} +1 -1
- package/dist/website/assets/{cardano-connector-hdlPMkLQ.js → cardano-connector-3df98C4_.js} +1 -1
- package/dist/website/assets/{core-B5hMmslC.js → core-Blew_EQm.js} +2 -2
- package/dist/website/assets/{dist-BJIDJvZV.js → dist-D7itg6da.js} +1 -1
- package/dist/website/assets/{dist-BL7xgNcF.js → dist-J99KS5pH.js} +1 -1
- package/dist/website/assets/en_US-IFPOGBSL-CC47aQXq.js +1 -0
- package/dist/website/assets/{esm-DPAaaxhg.js → esm-Cw64vveB.js} +1 -1
- package/dist/website/assets/{exports-B-uusPAA.js → exports-D1wiQ69D.js} +1 -1
- package/dist/website/assets/{index-D0RALg7p.js → index-BC7lQLef.js} +27 -27
- package/dist/website/assets/{index.es-Dwu1Qq2_.js → index.es-CSt_fgIn.js} +2 -2
- package/dist/website/assets/{ledger-connector-Di7r5-l6.js → ledger-connector-DZnRdvPG.js} +1 -1
- package/dist/website/assets/{receive-UIwn0Mju.js → receive-Cg1hmlQG.js} +1 -1
- package/dist/website/assets/{registry-C8e_Jcgr.js → registry-CYud4jvV.js} +1 -1
- package/dist/website/assets/{safe-connector-BiJ9oRHM.js → safe-connector-BSU9rfP-.js} +1 -1
- package/dist/website/assets/{socials-BHIfD421.js → socials-BhJvlI19.js} +1 -1
- package/dist/website/assets/{solana-connector-C2tkOI_-.js → solana-connector-SDzpS7Ab.js} +1 -1
- package/dist/website/assets/{substrate-connector-Dwhpejkc.js → substrate-connector-CZu924NR.js} +1 -1
- package/dist/website/assets/{ton-connector-CxbpsH2e.js → ton-connector-DWAKLJrT.js} +1 -1
- package/dist/website/assets/{tron-connector-B-lhK5S8.js → tron-connector-CvT65fXz.js} +3 -3
- package/dist/website/assets/tx-C4aWCGix.js +1 -0
- package/dist/website/assets/{wallet-manager-CVSrqWWq.js → wallet-manager-BiMjI3Bm.js} +3 -3
- package/dist/website/assets/{wui-qr-code-CQu7aHsi.js → wui-qr-code-BSUf7WKi.js} +1 -1
- package/dist/website/index.html +1 -1
- package/package.json +1 -1
- package/dist/website/assets/en_US-IFPOGBSL-C10NtOAZ.js +0 -1
- package/dist/website/assets/tx-vBSqFPtq.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { n as __esmMin, o as __toCommonJS, r as __exportAll, s as __toESM, t as __commonJSMin } from "./chunk-DwwZaK3i.js";
|
|
3
3
|
import { n as process$1, t as init_dist } from "./dist-BeCWYci1.js";
|
|
4
4
|
import { A as BigNumber, B as __spreadArray, C as groupDateStrings, D as typeSafeObjectEntries, E as isMobile$2, F as __awaiter$1, G as Either, H as init_tslib_es6, I as __extends, J as Maybe, K as left, L as __generator, M as __asyncGenerator, N as __asyncValues, O as typeSafeObjectFromEntries, P as __await, R as __read, S as getTokenLogo, T as isLedgerDappBrowserProvider, U as MaybeWindow, V as __values, W as config, X as nothing$2, Y as just, _ as formatAddress$1, a as observable, b as getBackgroundColor, c as reportUnhandledError$1, d as createErrorClass, f as isFunction$2, g as defaultFormattedNumber, h as bpsToPercentage, i as identity$2, j as __assign, k as waitForMs, l as Subscription, m as bpsToAmount, n as BehaviorSubject, o as SafeSubscriber, p as APToPercentage, q as right, r as Observable, t as createConnector, u as arrRemove, v as formatNumber, x as getNetworkLogo, y as fromWei, z as __rest } from "./createConnector-CyqDXfmv.js";
|
|
5
5
|
import { c as string$2, t as Codec, u as compare } from "./Codec-BMpmmW5K.js";
|
|
@@ -29,7 +29,7 @@ import { n as isTronConnector } from "./tron-connector-meta-HiR0Jy7z.js";
|
|
|
29
29
|
import { n as isSubstrateConnector } from "./substrate-connector-meta-BvYQjHSs.js";
|
|
30
30
|
import { t as en_US_default } from "./chunk-ONEAIJQL-CjMZXLOt.js";
|
|
31
31
|
import { c } from "react/compiler-runtime";
|
|
32
|
-
import * as React
|
|
32
|
+
import * as React from "react";
|
|
33
33
|
import React3, { Children, Component, Fragment, StrictMode, cloneElement, createContext, createElement, forwardRef, isValidElement, memo, useCallback, useContext, useDeferredValue, useEffect, useId, useInsertionEffect, useLayoutEffect, useMemo, useReducer, useRef, useState, useSyncExternalStore } from "react";
|
|
34
34
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
35
35
|
import "react-dom/client";
|
|
@@ -2246,15 +2246,15 @@ var QueryClient = class {
|
|
|
2246
2246
|
};
|
|
2247
2247
|
//#endregion
|
|
2248
2248
|
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.100.10_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
2249
|
-
var QueryClientContext = React
|
|
2249
|
+
var QueryClientContext = React.createContext(void 0);
|
|
2250
2250
|
var useQueryClient = (queryClient) => {
|
|
2251
|
-
const client = React
|
|
2251
|
+
const client = React.useContext(QueryClientContext);
|
|
2252
2252
|
if (queryClient) return queryClient;
|
|
2253
2253
|
if (!client) throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
2254
2254
|
return client;
|
|
2255
2255
|
};
|
|
2256
2256
|
var QueryClientProvider = ({ client, children }) => {
|
|
2257
|
-
React
|
|
2257
|
+
React.useEffect(() => {
|
|
2258
2258
|
client.mount();
|
|
2259
2259
|
return () => {
|
|
2260
2260
|
client.unmount();
|
|
@@ -2267,8 +2267,8 @@ var QueryClientProvider = ({ client, children }) => {
|
|
|
2267
2267
|
};
|
|
2268
2268
|
//#endregion
|
|
2269
2269
|
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.100.10_react@19.2.6/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
2270
|
-
var IsRestoringContext = React
|
|
2271
|
-
var useIsRestoring = () => React
|
|
2270
|
+
var IsRestoringContext = React.createContext(false);
|
|
2271
|
+
var useIsRestoring = () => React.useContext(IsRestoringContext);
|
|
2272
2272
|
IsRestoringContext.Provider;
|
|
2273
2273
|
//#endregion
|
|
2274
2274
|
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.100.10_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
@@ -2286,8 +2286,8 @@ function createValue() {
|
|
|
2286
2286
|
}
|
|
2287
2287
|
};
|
|
2288
2288
|
}
|
|
2289
|
-
var QueryErrorResetBoundaryContext = React
|
|
2290
|
-
var useQueryErrorResetBoundary = () => React
|
|
2289
|
+
var QueryErrorResetBoundaryContext = React.createContext(createValue());
|
|
2290
|
+
var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
|
|
2291
2291
|
//#endregion
|
|
2292
2292
|
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.100.10_react@19.2.6/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
2293
2293
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
@@ -2297,7 +2297,7 @@ var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
|
2297
2297
|
}
|
|
2298
2298
|
};
|
|
2299
2299
|
var useClearResetErrorBoundary = (errorResetBoundary) => {
|
|
2300
|
-
React
|
|
2300
|
+
React.useEffect(() => {
|
|
2301
2301
|
errorResetBoundary.clearReset();
|
|
2302
2302
|
}, [errorResetBoundary]);
|
|
2303
2303
|
};
|
|
@@ -2341,15 +2341,15 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
2341
2341
|
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);
|
|
2342
2342
|
useClearResetErrorBoundary(errorResetBoundary);
|
|
2343
2343
|
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
|
|
2344
|
-
const [observer] = React
|
|
2344
|
+
const [observer] = React.useState(() => new Observer(client, defaultedOptions));
|
|
2345
2345
|
const result = observer.getOptimisticResult(defaultedOptions);
|
|
2346
2346
|
const shouldSubscribe = !isRestoring && options.subscribed !== false;
|
|
2347
|
-
React
|
|
2347
|
+
React.useSyncExternalStore(React.useCallback((onStoreChange) => {
|
|
2348
2348
|
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop$3;
|
|
2349
2349
|
observer.updateResult();
|
|
2350
2350
|
return unsubscribe;
|
|
2351
2351
|
}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
2352
|
-
React
|
|
2352
|
+
React.useEffect(() => {
|
|
2353
2353
|
observer.setOptions(defaultedOptions);
|
|
2354
2354
|
}, [defaultedOptions, observer]);
|
|
2355
2355
|
if (shouldSuspend(defaultedOptions, result)) throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
|
|
@@ -2375,12 +2375,12 @@ function useQuery$1(options, queryClient) {
|
|
|
2375
2375
|
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.100.10_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
2376
2376
|
function useMutation(options, queryClient) {
|
|
2377
2377
|
const client = useQueryClient(queryClient);
|
|
2378
|
-
const [observer] = React
|
|
2379
|
-
React
|
|
2378
|
+
const [observer] = React.useState(() => new MutationObserver$1(client, options));
|
|
2379
|
+
React.useEffect(() => {
|
|
2380
2380
|
observer.setOptions(options);
|
|
2381
2381
|
}, [observer, options]);
|
|
2382
|
-
const result = React
|
|
2383
|
-
const mutate = React
|
|
2382
|
+
const result = React.useSyncExternalStore(React.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
2383
|
+
const mutate = React.useCallback((variables, mutateOptions) => {
|
|
2384
2384
|
observer.mutate(variables, mutateOptions).catch(noop$3);
|
|
2385
2385
|
}, [observer]);
|
|
2386
2386
|
if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;
|
|
@@ -7378,6 +7378,11 @@ function Trans({ children, count, parent, i18nKey, context, tOptions = {}, value
|
|
|
7378
7378
|
});
|
|
7379
7379
|
}
|
|
7380
7380
|
//#endregion
|
|
7381
|
+
//#region builtin:esm-external-require-react
|
|
7382
|
+
var require_builtin_esm_external_require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7383
|
+
module.exports = { ...React };
|
|
7384
|
+
}));
|
|
7385
|
+
//#endregion
|
|
7381
7386
|
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
7382
7387
|
/**
|
|
7383
7388
|
* @license React
|
|
@@ -7389,11 +7394,11 @@ function Trans({ children, count, parent, i18nKey, context, tOptions = {}, value
|
|
|
7389
7394
|
* LICENSE file in the root directory of this source tree.
|
|
7390
7395
|
*/
|
|
7391
7396
|
var require_use_sync_external_store_shim_production$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7392
|
-
var React
|
|
7397
|
+
var React = require_builtin_esm_external_require_react();
|
|
7393
7398
|
function is(x, y) {
|
|
7394
7399
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
7395
7400
|
}
|
|
7396
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React
|
|
7401
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
|
|
7397
7402
|
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
7398
7403
|
var value = getSnapshot(), _useState = useState({ inst: {
|
|
7399
7404
|
value,
|
|
@@ -7431,7 +7436,7 @@ var require_use_sync_external_store_shim_production$1 = /* @__PURE__ */ __common
|
|
|
7431
7436
|
return getSnapshot();
|
|
7432
7437
|
}
|
|
7433
7438
|
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
7434
|
-
exports.useSyncExternalStore = void 0 !== React
|
|
7439
|
+
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
7435
7440
|
}));
|
|
7436
7441
|
//#endregion
|
|
7437
7442
|
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
@@ -7494,7 +7499,7 @@ var require_use_sync_external_store_shim_development$1 = /* @__PURE__ */ __commo
|
|
|
7494
7499
|
return getSnapshot();
|
|
7495
7500
|
}
|
|
7496
7501
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
7497
|
-
var React =
|
|
7502
|
+
var React = require_builtin_esm_external_require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
7498
7503
|
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
7499
7504
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
7500
7505
|
})();
|
|
@@ -12130,31 +12135,31 @@ function createDeferred() {
|
|
|
12130
12135
|
reject
|
|
12131
12136
|
};
|
|
12132
12137
|
}
|
|
12133
|
-
var DataRouterContext = React
|
|
12138
|
+
var DataRouterContext = React.createContext(null);
|
|
12134
12139
|
DataRouterContext.displayName = "DataRouter";
|
|
12135
|
-
var DataRouterStateContext = React
|
|
12140
|
+
var DataRouterStateContext = React.createContext(null);
|
|
12136
12141
|
DataRouterStateContext.displayName = "DataRouterState";
|
|
12137
|
-
var RSCRouterContext = React
|
|
12142
|
+
var RSCRouterContext = React.createContext(false);
|
|
12138
12143
|
function useIsRSCRouterContext() {
|
|
12139
|
-
return React
|
|
12144
|
+
return React.useContext(RSCRouterContext);
|
|
12140
12145
|
}
|
|
12141
|
-
var ViewTransitionContext = React
|
|
12146
|
+
var ViewTransitionContext = React.createContext({ isTransitioning: false });
|
|
12142
12147
|
ViewTransitionContext.displayName = "ViewTransition";
|
|
12143
|
-
var FetchersContext = React
|
|
12148
|
+
var FetchersContext = React.createContext(/* @__PURE__ */ new Map());
|
|
12144
12149
|
FetchersContext.displayName = "Fetchers";
|
|
12145
|
-
var AwaitContext = React
|
|
12150
|
+
var AwaitContext = React.createContext(null);
|
|
12146
12151
|
AwaitContext.displayName = "Await";
|
|
12147
|
-
var NavigationContext = React
|
|
12152
|
+
var NavigationContext = React.createContext(null);
|
|
12148
12153
|
NavigationContext.displayName = "Navigation";
|
|
12149
|
-
var LocationContext = React
|
|
12154
|
+
var LocationContext = React.createContext(null);
|
|
12150
12155
|
LocationContext.displayName = "Location";
|
|
12151
|
-
var RouteContext = React
|
|
12156
|
+
var RouteContext = React.createContext({
|
|
12152
12157
|
outlet: null,
|
|
12153
12158
|
matches: [],
|
|
12154
12159
|
isDataRoute: false
|
|
12155
12160
|
});
|
|
12156
12161
|
RouteContext.displayName = "Route";
|
|
12157
|
-
var RouteErrorContext = React
|
|
12162
|
+
var RouteErrorContext = React.createContext(null);
|
|
12158
12163
|
RouteErrorContext.displayName = "RouteError";
|
|
12159
12164
|
var ERROR_DIGEST_BASE = "REACT_ROUTER_ERROR";
|
|
12160
12165
|
var ERROR_DIGEST_REDIRECT = "REDIRECT";
|
|
@@ -12173,7 +12178,7 @@ function decodeRouteErrorResponseDigest(digest) {
|
|
|
12173
12178
|
}
|
|
12174
12179
|
function useHref(to, { relative } = {}) {
|
|
12175
12180
|
invariant$1(useInRouterContext(), `useHref() may be used only in the context of a <Router> component.`);
|
|
12176
|
-
let { basename, navigator } = React
|
|
12181
|
+
let { basename, navigator } = React.useContext(NavigationContext);
|
|
12177
12182
|
let { hash, pathname, search } = useResolvedPath(to, { relative });
|
|
12178
12183
|
let joinedPathname = pathname;
|
|
12179
12184
|
if (basename !== "/") joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
@@ -12184,37 +12189,37 @@ function useHref(to, { relative } = {}) {
|
|
|
12184
12189
|
});
|
|
12185
12190
|
}
|
|
12186
12191
|
function useInRouterContext() {
|
|
12187
|
-
return React
|
|
12192
|
+
return React.useContext(LocationContext) != null;
|
|
12188
12193
|
}
|
|
12189
12194
|
function useLocation() {
|
|
12190
12195
|
invariant$1(useInRouterContext(), `useLocation() may be used only in the context of a <Router> component.`);
|
|
12191
|
-
return React
|
|
12196
|
+
return React.useContext(LocationContext).location;
|
|
12192
12197
|
}
|
|
12193
12198
|
function useMatch(pattern) {
|
|
12194
12199
|
invariant$1(useInRouterContext(), `useMatch() may be used only in the context of a <Router> component.`);
|
|
12195
12200
|
let { pathname } = useLocation();
|
|
12196
|
-
return React
|
|
12201
|
+
return React.useMemo(() => matchPath(pattern, decodePath(pathname)), [pathname, pattern]);
|
|
12197
12202
|
}
|
|
12198
12203
|
var navigateEffectWarning = `You should call navigate() in a React.useEffect(), not when your component is first rendered.`;
|
|
12199
12204
|
function useIsomorphicLayoutEffect$3(cb) {
|
|
12200
|
-
if (!React
|
|
12205
|
+
if (!React.useContext(NavigationContext).static) React.useLayoutEffect(cb);
|
|
12201
12206
|
}
|
|
12202
12207
|
function useNavigate() {
|
|
12203
|
-
let { isDataRoute } = React
|
|
12208
|
+
let { isDataRoute } = React.useContext(RouteContext);
|
|
12204
12209
|
return isDataRoute ? useNavigateStable() : useNavigateUnstable();
|
|
12205
12210
|
}
|
|
12206
12211
|
function useNavigateUnstable() {
|
|
12207
12212
|
invariant$1(useInRouterContext(), `useNavigate() may be used only in the context of a <Router> component.`);
|
|
12208
|
-
let dataRouterContext = React
|
|
12209
|
-
let { basename, navigator } = React
|
|
12210
|
-
let { matches } = React
|
|
12213
|
+
let dataRouterContext = React.useContext(DataRouterContext);
|
|
12214
|
+
let { basename, navigator } = React.useContext(NavigationContext);
|
|
12215
|
+
let { matches } = React.useContext(RouteContext);
|
|
12211
12216
|
let { pathname: locationPathname } = useLocation();
|
|
12212
12217
|
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
|
|
12213
|
-
let activeRef = React
|
|
12218
|
+
let activeRef = React.useRef(false);
|
|
12214
12219
|
useIsomorphicLayoutEffect$3(() => {
|
|
12215
12220
|
activeRef.current = true;
|
|
12216
12221
|
});
|
|
12217
|
-
return React
|
|
12222
|
+
return React.useCallback((to, options = {}) => {
|
|
12218
12223
|
warning$1(activeRef.current, navigateEffectWarning);
|
|
12219
12224
|
if (!activeRef.current) return;
|
|
12220
12225
|
if (typeof to === "number") {
|
|
@@ -12232,16 +12237,16 @@ function useNavigateUnstable() {
|
|
|
12232
12237
|
dataRouterContext
|
|
12233
12238
|
]);
|
|
12234
12239
|
}
|
|
12235
|
-
var OutletContext = React
|
|
12240
|
+
var OutletContext = React.createContext(null);
|
|
12236
12241
|
function useOutlet(context) {
|
|
12237
|
-
let outlet = React
|
|
12238
|
-
return React
|
|
12242
|
+
let outlet = React.useContext(RouteContext).outlet;
|
|
12243
|
+
return React.useMemo(() => outlet && /* @__PURE__ */ React.createElement(OutletContext.Provider, { value: context }, outlet), [outlet, context]);
|
|
12239
12244
|
}
|
|
12240
12245
|
function useResolvedPath(to, { relative } = {}) {
|
|
12241
|
-
let { matches } = React
|
|
12246
|
+
let { matches } = React.useContext(RouteContext);
|
|
12242
12247
|
let { pathname: locationPathname } = useLocation();
|
|
12243
12248
|
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
|
|
12244
|
-
return React
|
|
12249
|
+
return React.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [
|
|
12245
12250
|
to,
|
|
12246
12251
|
routePathnamesJson,
|
|
12247
12252
|
locationPathname,
|
|
@@ -12253,8 +12258,8 @@ function useRoutes(routes, locationArg) {
|
|
|
12253
12258
|
}
|
|
12254
12259
|
function useRoutesImpl(routes, locationArg, dataRouterOpts) {
|
|
12255
12260
|
invariant$1(useInRouterContext(), `useRoutes() may be used only in the context of a <Router> component.`);
|
|
12256
|
-
let { navigator } = React
|
|
12257
|
-
let { matches: parentMatches } = React
|
|
12261
|
+
let { navigator } = React.useContext(NavigationContext);
|
|
12262
|
+
let { matches: parentMatches } = React.useContext(RouteContext);
|
|
12258
12263
|
let routeMatch = parentMatches[parentMatches.length - 1];
|
|
12259
12264
|
let parentParams = routeMatch ? routeMatch.params : {};
|
|
12260
12265
|
let parentPathname = routeMatch ? routeMatch.pathname : "/";
|
|
@@ -12287,7 +12292,7 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
12287
12292
|
pathname: joinPaths([parentPathnameBase, navigator.encodeLocation ? navigator.encodeLocation(match.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathname]),
|
|
12288
12293
|
pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([parentPathnameBase, navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathnameBase])
|
|
12289
12294
|
})), parentMatches, dataRouterOpts);
|
|
12290
|
-
if (locationArg && renderedMatches) return /* @__PURE__ */ React
|
|
12295
|
+
if (locationArg && renderedMatches) return /* @__PURE__ */ React.createElement(LocationContext.Provider, { value: {
|
|
12291
12296
|
location: {
|
|
12292
12297
|
pathname: "/",
|
|
12293
12298
|
search: "",
|
|
@@ -12316,11 +12321,11 @@ function DefaultErrorComponent() {
|
|
|
12316
12321
|
};
|
|
12317
12322
|
let devInfo = null;
|
|
12318
12323
|
console.error("Error handled by React Router default ErrorBoundary:", error);
|
|
12319
|
-
devInfo = /* @__PURE__ */ React
|
|
12320
|
-
return /* @__PURE__ */ React
|
|
12324
|
+
devInfo = /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ React.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ React.createElement("code", { style: codeStyles }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ React.createElement("code", { style: codeStyles }, "errorElement"), " prop on your route."));
|
|
12325
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ React.createElement("h3", { style: { fontStyle: "italic" } }, message), stack ? /* @__PURE__ */ React.createElement("pre", { style: preStyles }, stack) : null, devInfo);
|
|
12321
12326
|
}
|
|
12322
|
-
var defaultErrorElement = /* @__PURE__ */ React
|
|
12323
|
-
var RenderErrorBoundary = class extends React
|
|
12327
|
+
var defaultErrorElement = /* @__PURE__ */ React.createElement(DefaultErrorComponent, null);
|
|
12328
|
+
var RenderErrorBoundary = class extends React.Component {
|
|
12324
12329
|
constructor(props) {
|
|
12325
12330
|
super(props);
|
|
12326
12331
|
this.state = {
|
|
@@ -12354,18 +12359,18 @@ var RenderErrorBoundary = class extends React$4.Component {
|
|
|
12354
12359
|
const decoded = decodeRouteErrorResponseDigest(error.digest);
|
|
12355
12360
|
if (decoded) error = decoded;
|
|
12356
12361
|
}
|
|
12357
|
-
let result = error !== void 0 ? /* @__PURE__ */ React
|
|
12362
|
+
let result = error !== void 0 ? /* @__PURE__ */ React.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React.createElement(RouteErrorContext.Provider, {
|
|
12358
12363
|
value: error,
|
|
12359
12364
|
children: this.props.component
|
|
12360
12365
|
})) : this.props.children;
|
|
12361
|
-
if (this.context) return /* @__PURE__ */ React
|
|
12366
|
+
if (this.context) return /* @__PURE__ */ React.createElement(RSCErrorHandler, { error }, result);
|
|
12362
12367
|
return result;
|
|
12363
12368
|
}
|
|
12364
12369
|
};
|
|
12365
12370
|
RenderErrorBoundary.contextType = RSCRouterContext;
|
|
12366
12371
|
var errorRedirectHandledMap = /* @__PURE__ */ new WeakMap();
|
|
12367
12372
|
function RSCErrorHandler({ children, error }) {
|
|
12368
|
-
let { basename } = React
|
|
12373
|
+
let { basename } = React.useContext(NavigationContext);
|
|
12369
12374
|
if (typeof error === "object" && error && "digest" in error && typeof error.digest === "string") {
|
|
12370
12375
|
let redirect2 = decodeRedirectErrorDigest(error.digest);
|
|
12371
12376
|
if (redirect2) {
|
|
@@ -12378,7 +12383,7 @@ function RSCErrorHandler({ children, error }) {
|
|
|
12378
12383
|
errorRedirectHandledMap.set(error, redirectPromise);
|
|
12379
12384
|
throw redirectPromise;
|
|
12380
12385
|
}
|
|
12381
|
-
return /* @__PURE__ */ React
|
|
12386
|
+
return /* @__PURE__ */ React.createElement("meta", {
|
|
12382
12387
|
httpEquiv: "refresh",
|
|
12383
12388
|
content: `0;url=${parsed.absoluteURL || parsed.to}`
|
|
12384
12389
|
});
|
|
@@ -12387,9 +12392,9 @@ function RSCErrorHandler({ children, error }) {
|
|
|
12387
12392
|
return children;
|
|
12388
12393
|
}
|
|
12389
12394
|
function RenderedRoute({ routeContext, match, children }) {
|
|
12390
|
-
let dataRouterContext = React
|
|
12395
|
+
let dataRouterContext = React.useContext(DataRouterContext);
|
|
12391
12396
|
if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;
|
|
12392
|
-
return /* @__PURE__ */ React
|
|
12397
|
+
return /* @__PURE__ */ React.createElement(RouteContext.Provider, { value: routeContext }, children);
|
|
12393
12398
|
}
|
|
12394
12399
|
function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
|
|
12395
12400
|
let dataRouterState = dataRouterOpts?.state;
|
|
@@ -12458,10 +12463,10 @@ function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
|
|
|
12458
12463
|
let children;
|
|
12459
12464
|
if (error) children = errorElement;
|
|
12460
12465
|
else if (shouldRenderHydrateFallback) children = hydrateFallbackElement;
|
|
12461
|
-
else if (match.route.Component) children = /* @__PURE__ */ React
|
|
12466
|
+
else if (match.route.Component) children = /* @__PURE__ */ React.createElement(match.route.Component, null);
|
|
12462
12467
|
else if (match.route.element) children = match.route.element;
|
|
12463
12468
|
else children = outlet;
|
|
12464
|
-
return /* @__PURE__ */ React
|
|
12469
|
+
return /* @__PURE__ */ React.createElement(RenderedRoute, {
|
|
12465
12470
|
match,
|
|
12466
12471
|
routeContext: {
|
|
12467
12472
|
outlet,
|
|
@@ -12471,7 +12476,7 @@ function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
|
|
|
12471
12476
|
children
|
|
12472
12477
|
});
|
|
12473
12478
|
};
|
|
12474
|
-
return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React
|
|
12479
|
+
return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React.createElement(RenderErrorBoundary, {
|
|
12475
12480
|
location: dataRouterState.location,
|
|
12476
12481
|
revalidation: dataRouterState.revalidation,
|
|
12477
12482
|
component: errorElement,
|
|
@@ -12490,17 +12495,17 @@ function getDataRouterConsoleError(hookName) {
|
|
|
12490
12495
|
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
12491
12496
|
}
|
|
12492
12497
|
function useDataRouterContext(hookName) {
|
|
12493
|
-
let ctx = React
|
|
12498
|
+
let ctx = React.useContext(DataRouterContext);
|
|
12494
12499
|
invariant$1(ctx, getDataRouterConsoleError(hookName));
|
|
12495
12500
|
return ctx;
|
|
12496
12501
|
}
|
|
12497
12502
|
function useDataRouterState(hookName) {
|
|
12498
|
-
let state = React
|
|
12503
|
+
let state = React.useContext(DataRouterStateContext);
|
|
12499
12504
|
invariant$1(state, getDataRouterConsoleError(hookName));
|
|
12500
12505
|
return state;
|
|
12501
12506
|
}
|
|
12502
12507
|
function useRouteContext(hookName) {
|
|
12503
|
-
let route = React
|
|
12508
|
+
let route = React.useContext(RouteContext);
|
|
12504
12509
|
invariant$1(route, getDataRouterConsoleError(hookName));
|
|
12505
12510
|
return route;
|
|
12506
12511
|
}
|
|
@@ -12518,10 +12523,10 @@ function useNavigation() {
|
|
|
12518
12523
|
}
|
|
12519
12524
|
function useMatches() {
|
|
12520
12525
|
let { matches, loaderData } = useDataRouterState("useMatches");
|
|
12521
|
-
return React
|
|
12526
|
+
return React.useMemo(() => matches.map((m) => convertRouteMatchToUiMatch(m, loaderData)), [matches, loaderData]);
|
|
12522
12527
|
}
|
|
12523
12528
|
function useRouteError() {
|
|
12524
|
-
let error = React
|
|
12529
|
+
let error = React.useContext(RouteErrorContext);
|
|
12525
12530
|
let state = useDataRouterState("useRouteError");
|
|
12526
12531
|
let routeId = useCurrentRouteId("useRouteError");
|
|
12527
12532
|
if (error !== void 0) return error;
|
|
@@ -12530,11 +12535,11 @@ function useRouteError() {
|
|
|
12530
12535
|
function useNavigateStable() {
|
|
12531
12536
|
let { router } = useDataRouterContext("useNavigate");
|
|
12532
12537
|
let id = useCurrentRouteId("useNavigate");
|
|
12533
|
-
let activeRef = React
|
|
12538
|
+
let activeRef = React.useRef(false);
|
|
12534
12539
|
useIsomorphicLayoutEffect$3(() => {
|
|
12535
12540
|
activeRef.current = true;
|
|
12536
12541
|
});
|
|
12537
|
-
return React
|
|
12542
|
+
return React.useCallback(async (to, options = {}) => {
|
|
12538
12543
|
warning$1(activeRef.current, navigateEffectWarning);
|
|
12539
12544
|
if (!activeRef.current) return;
|
|
12540
12545
|
if (typeof to === "number") await router.navigate(to);
|
|
@@ -12558,7 +12563,7 @@ function warnOnce$1(condition, message) {
|
|
|
12558
12563
|
console.warn(message);
|
|
12559
12564
|
}
|
|
12560
12565
|
}
|
|
12561
|
-
var useOptimisticImpl = React
|
|
12566
|
+
var useOptimisticImpl = React["useOptimistic"];
|
|
12562
12567
|
var stableUseOptimisticSetter = () => void 0;
|
|
12563
12568
|
function useOptimisticSafe(val) {
|
|
12564
12569
|
if (useOptimisticImpl) return useOptimisticImpl(val);
|
|
@@ -12569,21 +12574,21 @@ function mapRouteProperties(route) {
|
|
|
12569
12574
|
if (route.Component) {
|
|
12570
12575
|
if (route.element) warning$1(false, "You should not include both `Component` and `element` on your route - `Component` will be used.");
|
|
12571
12576
|
Object.assign(updates, {
|
|
12572
|
-
element: React
|
|
12577
|
+
element: React.createElement(route.Component),
|
|
12573
12578
|
Component: void 0
|
|
12574
12579
|
});
|
|
12575
12580
|
}
|
|
12576
12581
|
if (route.HydrateFallback) {
|
|
12577
12582
|
if (route.hydrateFallbackElement) warning$1(false, "You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used.");
|
|
12578
12583
|
Object.assign(updates, {
|
|
12579
|
-
hydrateFallbackElement: React
|
|
12584
|
+
hydrateFallbackElement: React.createElement(route.HydrateFallback),
|
|
12580
12585
|
HydrateFallback: void 0
|
|
12581
12586
|
});
|
|
12582
12587
|
}
|
|
12583
12588
|
if (route.ErrorBoundary) {
|
|
12584
12589
|
if (route.errorElement) warning$1(false, "You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used.");
|
|
12585
12590
|
Object.assign(updates, {
|
|
12586
|
-
errorElement: React
|
|
12591
|
+
errorElement: React.createElement(route.ErrorBoundary),
|
|
12587
12592
|
ErrorBoundary: void 0
|
|
12588
12593
|
});
|
|
12589
12594
|
}
|
|
@@ -12629,15 +12634,15 @@ var Deferred = class {
|
|
|
12629
12634
|
};
|
|
12630
12635
|
function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, useTransitions }) {
|
|
12631
12636
|
useTransitions = useIsRSCRouterContext() || useTransitions;
|
|
12632
|
-
let [_state, setStateImpl] = React
|
|
12637
|
+
let [_state, setStateImpl] = React.useState(router.state);
|
|
12633
12638
|
let [state, setOptimisticState] = useOptimisticSafe(_state);
|
|
12634
|
-
let [pendingState, setPendingState] = React
|
|
12635
|
-
let [vtContext, setVtContext] = React
|
|
12636
|
-
let [renderDfd, setRenderDfd] = React
|
|
12637
|
-
let [transition, setTransition] = React
|
|
12638
|
-
let [interruption, setInterruption] = React
|
|
12639
|
-
let fetcherData = React
|
|
12640
|
-
let setState = React
|
|
12639
|
+
let [pendingState, setPendingState] = React.useState();
|
|
12640
|
+
let [vtContext, setVtContext] = React.useState({ isTransitioning: false });
|
|
12641
|
+
let [renderDfd, setRenderDfd] = React.useState();
|
|
12642
|
+
let [transition, setTransition] = React.useState();
|
|
12643
|
+
let [interruption, setInterruption] = React.useState();
|
|
12644
|
+
let fetcherData = React.useRef(/* @__PURE__ */ new Map());
|
|
12645
|
+
let setState = React.useCallback((newState, { deletedFetchers, newErrors, flushSync, viewTransitionOpts }) => {
|
|
12641
12646
|
if (newErrors && onError) Object.values(newErrors).forEach((error) => onError(error, {
|
|
12642
12647
|
location: newState.location,
|
|
12643
12648
|
params: newState.matches[0]?.params ?? {},
|
|
@@ -12653,7 +12658,7 @@ function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, use
|
|
|
12653
12658
|
if (!viewTransitionOpts || !isViewTransitionAvailable) {
|
|
12654
12659
|
if (reactDomFlushSyncImpl && flushSync) reactDomFlushSyncImpl(() => setStateImpl(newState));
|
|
12655
12660
|
else if (useTransitions === false) setStateImpl(newState);
|
|
12656
|
-
else React
|
|
12661
|
+
else React.startTransition(() => {
|
|
12657
12662
|
if (useTransitions === true) setOptimisticState((s) => getOptimisticRouterState(s, newState));
|
|
12658
12663
|
setStateImpl(newState);
|
|
12659
12664
|
});
|
|
@@ -12712,9 +12717,9 @@ function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, use
|
|
|
12712
12717
|
setOptimisticState,
|
|
12713
12718
|
onError
|
|
12714
12719
|
]);
|
|
12715
|
-
React
|
|
12720
|
+
React.useLayoutEffect(() => router.subscribe(setState), [router, setState]);
|
|
12716
12721
|
let initialized = state.initialized;
|
|
12717
|
-
React
|
|
12722
|
+
React.useLayoutEffect(() => {
|
|
12718
12723
|
if (!initialized && router.state.initialized) setState(router.state, {
|
|
12719
12724
|
deletedFetchers: [],
|
|
12720
12725
|
flushSync: false,
|
|
@@ -12725,16 +12730,16 @@ function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, use
|
|
|
12725
12730
|
setState,
|
|
12726
12731
|
router.state
|
|
12727
12732
|
]);
|
|
12728
|
-
React
|
|
12733
|
+
React.useEffect(() => {
|
|
12729
12734
|
if (vtContext.isTransitioning && !vtContext.flushSync) setRenderDfd(new Deferred());
|
|
12730
12735
|
}, [vtContext]);
|
|
12731
|
-
React
|
|
12736
|
+
React.useEffect(() => {
|
|
12732
12737
|
if (renderDfd && pendingState && router.window) {
|
|
12733
12738
|
let newState = pendingState;
|
|
12734
12739
|
let renderPromise = renderDfd.promise;
|
|
12735
12740
|
let transition2 = router.window.document.startViewTransition(async () => {
|
|
12736
12741
|
if (useTransitions === false) setStateImpl(newState);
|
|
12737
|
-
else React
|
|
12742
|
+
else React.startTransition(() => {
|
|
12738
12743
|
if (useTransitions === true) setOptimisticState((s) => getOptimisticRouterState(s, newState));
|
|
12739
12744
|
setStateImpl(newState);
|
|
12740
12745
|
});
|
|
@@ -12755,7 +12760,7 @@ function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, use
|
|
|
12755
12760
|
useTransitions,
|
|
12756
12761
|
setOptimisticState
|
|
12757
12762
|
]);
|
|
12758
|
-
React
|
|
12763
|
+
React.useEffect(() => {
|
|
12759
12764
|
if (renderDfd && pendingState && state.location.key === pendingState.location.key) renderDfd.resolve();
|
|
12760
12765
|
}, [
|
|
12761
12766
|
renderDfd,
|
|
@@ -12763,7 +12768,7 @@ function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, use
|
|
|
12763
12768
|
state.location,
|
|
12764
12769
|
pendingState
|
|
12765
12770
|
]);
|
|
12766
|
-
React
|
|
12771
|
+
React.useEffect(() => {
|
|
12767
12772
|
if (!vtContext.isTransitioning && interruption) {
|
|
12768
12773
|
setPendingState(interruption.state);
|
|
12769
12774
|
setVtContext({
|
|
@@ -12775,7 +12780,7 @@ function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, use
|
|
|
12775
12780
|
setInterruption(void 0);
|
|
12776
12781
|
}
|
|
12777
12782
|
}, [vtContext.isTransitioning, interruption]);
|
|
12778
|
-
let navigator = React
|
|
12783
|
+
let navigator = React.useMemo(() => {
|
|
12779
12784
|
return {
|
|
12780
12785
|
createHref: router.createHref,
|
|
12781
12786
|
encodeLocation: router.encodeLocation,
|
|
@@ -12792,7 +12797,7 @@ function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, use
|
|
|
12792
12797
|
};
|
|
12793
12798
|
}, [router]);
|
|
12794
12799
|
let basename = router.basename || "/";
|
|
12795
|
-
let dataRouterContext = React
|
|
12800
|
+
let dataRouterContext = React.useMemo(() => ({
|
|
12796
12801
|
router,
|
|
12797
12802
|
navigator,
|
|
12798
12803
|
static: false,
|
|
@@ -12804,13 +12809,13 @@ function RouterProvider({ router, flushSync: reactDomFlushSyncImpl, onError, use
|
|
|
12804
12809
|
basename,
|
|
12805
12810
|
onError
|
|
12806
12811
|
]);
|
|
12807
|
-
return /* @__PURE__ */ React
|
|
12812
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React.createElement(DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React.createElement(FetchersContext.Provider, { value: fetcherData.current }, /* @__PURE__ */ React.createElement(ViewTransitionContext.Provider, { value: vtContext }, /* @__PURE__ */ React.createElement(Router, {
|
|
12808
12813
|
basename,
|
|
12809
12814
|
location: state.location,
|
|
12810
12815
|
navigationType: state.historyAction,
|
|
12811
12816
|
navigator,
|
|
12812
12817
|
useTransitions
|
|
12813
|
-
}, /* @__PURE__ */ React
|
|
12818
|
+
}, /* @__PURE__ */ React.createElement(MemoizedDataRoutes, {
|
|
12814
12819
|
routes: router.routes,
|
|
12815
12820
|
manifest: router.manifest,
|
|
12816
12821
|
future: router.future,
|
|
@@ -12828,7 +12833,7 @@ function getOptimisticRouterState(currentState, newState) {
|
|
|
12828
12833
|
fetchers: newState.fetchers
|
|
12829
12834
|
};
|
|
12830
12835
|
}
|
|
12831
|
-
var MemoizedDataRoutes = React
|
|
12836
|
+
var MemoizedDataRoutes = React.memo(DataRoutes2);
|
|
12832
12837
|
function DataRoutes2({ routes, manifest, future, state, isStatic, onError }) {
|
|
12833
12838
|
return useRoutesImpl(routes, void 0, {
|
|
12834
12839
|
manifest,
|
|
@@ -12840,14 +12845,14 @@ function DataRoutes2({ routes, manifest, future, state, isStatic, onError }) {
|
|
|
12840
12845
|
}
|
|
12841
12846
|
function Navigate({ to, replace: replace2, state, relative }) {
|
|
12842
12847
|
invariant$1(useInRouterContext(), `<Navigate> may be used only in the context of a <Router> component.`);
|
|
12843
|
-
let { static: isStatic } = React
|
|
12848
|
+
let { static: isStatic } = React.useContext(NavigationContext);
|
|
12844
12849
|
warning$1(!isStatic, `<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);
|
|
12845
|
-
let { matches } = React
|
|
12850
|
+
let { matches } = React.useContext(RouteContext);
|
|
12846
12851
|
let { pathname: locationPathname } = useLocation();
|
|
12847
12852
|
let navigate = useNavigate();
|
|
12848
12853
|
let path = resolveTo(to, getResolveToMatches(matches), locationPathname, relative === "path");
|
|
12849
12854
|
let jsonPath = JSON.stringify(path);
|
|
12850
|
-
React
|
|
12855
|
+
React.useEffect(() => {
|
|
12851
12856
|
navigate(JSON.parse(jsonPath), {
|
|
12852
12857
|
replace: replace2,
|
|
12853
12858
|
state,
|
|
@@ -12871,7 +12876,7 @@ function Route(props) {
|
|
|
12871
12876
|
function Router({ basename: basenameProp = "/", children = null, location: locationProp, navigationType = "POP", navigator, static: staticProp = false, useTransitions }) {
|
|
12872
12877
|
invariant$1(!useInRouterContext(), `You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);
|
|
12873
12878
|
let basename = basenameProp.replace(/^\/*/, "/");
|
|
12874
|
-
let navigationContext = React
|
|
12879
|
+
let navigationContext = React.useMemo(() => ({
|
|
12875
12880
|
basename,
|
|
12876
12881
|
navigator,
|
|
12877
12882
|
static: staticProp,
|
|
@@ -12885,7 +12890,7 @@ function Router({ basename: basenameProp = "/", children = null, location: locat
|
|
|
12885
12890
|
]);
|
|
12886
12891
|
if (typeof locationProp === "string") locationProp = parsePath(locationProp);
|
|
12887
12892
|
let { pathname = "/", search = "", hash = "", state = null, key = "default", mask } = locationProp;
|
|
12888
|
-
let locationContext = React
|
|
12893
|
+
let locationContext = React.useMemo(() => {
|
|
12889
12894
|
let trailingPathname = stripBasename(pathname, basename);
|
|
12890
12895
|
if (trailingPathname == null) return null;
|
|
12891
12896
|
return {
|
|
@@ -12911,7 +12916,7 @@ function Router({ basename: basenameProp = "/", children = null, location: locat
|
|
|
12911
12916
|
]);
|
|
12912
12917
|
warning$1(locationContext != null, `<Router basename="${basename}"> is not able to match the URL "${pathname}${search}${hash}" because it does not start with the basename, so the <Router> won't render anything.`);
|
|
12913
12918
|
if (locationContext == null) return null;
|
|
12914
|
-
return /* @__PURE__ */ React
|
|
12919
|
+
return /* @__PURE__ */ React.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React.createElement(LocationContext.Provider, {
|
|
12915
12920
|
children,
|
|
12916
12921
|
value: locationContext
|
|
12917
12922
|
}));
|
|
@@ -12919,13 +12924,13 @@ function Router({ basename: basenameProp = "/", children = null, location: locat
|
|
|
12919
12924
|
function Routes({ children, location }) {
|
|
12920
12925
|
return useRoutes(createRoutesFromChildren(children), location);
|
|
12921
12926
|
}
|
|
12922
|
-
React
|
|
12927
|
+
React.Component;
|
|
12923
12928
|
function createRoutesFromChildren(children, parentPath = []) {
|
|
12924
12929
|
let routes = [];
|
|
12925
|
-
React
|
|
12926
|
-
if (!React
|
|
12930
|
+
React.Children.forEach(children, (element, index) => {
|
|
12931
|
+
if (!React.isValidElement(element)) return;
|
|
12927
12932
|
let treePath = [...parentPath, index];
|
|
12928
|
-
if (element.type === React
|
|
12933
|
+
if (element.type === React.Fragment) {
|
|
12929
12934
|
routes.push.apply(routes, createRoutesFromChildren(element.props.children, treePath));
|
|
12930
12935
|
return;
|
|
12931
12936
|
}
|
|
@@ -13176,29 +13181,29 @@ function dedupeLinkDescriptors(descriptors, preloads) {
|
|
|
13176
13181
|
}, []);
|
|
13177
13182
|
}
|
|
13178
13183
|
function useDataRouterContext2() {
|
|
13179
|
-
let context = React
|
|
13184
|
+
let context = React.useContext(DataRouterContext);
|
|
13180
13185
|
invariant2(context, "You must render this element inside a <DataRouterContext.Provider> element");
|
|
13181
13186
|
return context;
|
|
13182
13187
|
}
|
|
13183
13188
|
function useDataRouterStateContext() {
|
|
13184
|
-
let context = React
|
|
13189
|
+
let context = React.useContext(DataRouterStateContext);
|
|
13185
13190
|
invariant2(context, "You must render this element inside a <DataRouterStateContext.Provider> element");
|
|
13186
13191
|
return context;
|
|
13187
13192
|
}
|
|
13188
|
-
var FrameworkContext = React
|
|
13193
|
+
var FrameworkContext = React.createContext(void 0);
|
|
13189
13194
|
FrameworkContext.displayName = "FrameworkContext";
|
|
13190
13195
|
function useFrameworkContext() {
|
|
13191
|
-
let context = React
|
|
13196
|
+
let context = React.useContext(FrameworkContext);
|
|
13192
13197
|
invariant2(context, "You must render this element inside a <HydratedRouter> element");
|
|
13193
13198
|
return context;
|
|
13194
13199
|
}
|
|
13195
13200
|
function usePrefetchBehavior(prefetch, theirElementProps) {
|
|
13196
|
-
let frameworkContext = React
|
|
13197
|
-
let [maybePrefetch, setMaybePrefetch] = React
|
|
13198
|
-
let [shouldPrefetch, setShouldPrefetch] = React
|
|
13201
|
+
let frameworkContext = React.useContext(FrameworkContext);
|
|
13202
|
+
let [maybePrefetch, setMaybePrefetch] = React.useState(false);
|
|
13203
|
+
let [shouldPrefetch, setShouldPrefetch] = React.useState(false);
|
|
13199
13204
|
let { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;
|
|
13200
|
-
let ref = React
|
|
13201
|
-
React
|
|
13205
|
+
let ref = React.useRef(null);
|
|
13206
|
+
React.useEffect(() => {
|
|
13202
13207
|
if (prefetch === "render") setShouldPrefetch(true);
|
|
13203
13208
|
if (prefetch === "viewport") {
|
|
13204
13209
|
let callback = (entries) => {
|
|
@@ -13213,7 +13218,7 @@ function usePrefetchBehavior(prefetch, theirElementProps) {
|
|
|
13213
13218
|
};
|
|
13214
13219
|
}
|
|
13215
13220
|
}, [prefetch]);
|
|
13216
|
-
React
|
|
13221
|
+
React.useEffect(() => {
|
|
13217
13222
|
if (maybePrefetch) {
|
|
13218
13223
|
let id = setTimeout(() => {
|
|
13219
13224
|
setShouldPrefetch(true);
|
|
@@ -13261,18 +13266,18 @@ function composeEventHandlers$1(theirHandler, ourHandler) {
|
|
|
13261
13266
|
function PrefetchPageLinks({ page, ...linkProps }) {
|
|
13262
13267
|
let rsc = useIsRSCRouterContext();
|
|
13263
13268
|
let { router } = useDataRouterContext2();
|
|
13264
|
-
let matches = React
|
|
13269
|
+
let matches = React.useMemo(() => matchRoutes(router.routes, page, router.basename), [
|
|
13265
13270
|
router.routes,
|
|
13266
13271
|
page,
|
|
13267
13272
|
router.basename
|
|
13268
13273
|
]);
|
|
13269
13274
|
if (!matches) return null;
|
|
13270
|
-
if (rsc) return /* @__PURE__ */ React
|
|
13275
|
+
if (rsc) return /* @__PURE__ */ React.createElement(RSCPrefetchPageLinksImpl, {
|
|
13271
13276
|
page,
|
|
13272
13277
|
matches,
|
|
13273
13278
|
...linkProps
|
|
13274
13279
|
});
|
|
13275
|
-
return /* @__PURE__ */ React
|
|
13280
|
+
return /* @__PURE__ */ React.createElement(PrefetchPageLinksImpl, {
|
|
13276
13281
|
page,
|
|
13277
13282
|
matches,
|
|
13278
13283
|
...linkProps
|
|
@@ -13280,8 +13285,8 @@ function PrefetchPageLinks({ page, ...linkProps }) {
|
|
|
13280
13285
|
}
|
|
13281
13286
|
function useKeyedPrefetchLinks(matches) {
|
|
13282
13287
|
let { manifest, routeModules } = useFrameworkContext();
|
|
13283
|
-
let [keyedPrefetchLinks, setKeyedPrefetchLinks] = React
|
|
13284
|
-
React
|
|
13288
|
+
let [keyedPrefetchLinks, setKeyedPrefetchLinks] = React.useState([]);
|
|
13289
|
+
React.useEffect(() => {
|
|
13285
13290
|
let interrupted = false;
|
|
13286
13291
|
getKeyedPrefetchLinks(matches, manifest, routeModules).then((links) => {
|
|
13287
13292
|
if (!interrupted) setKeyedPrefetchLinks(links);
|
|
@@ -13300,7 +13305,7 @@ function RSCPrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps })
|
|
|
13300
13305
|
let location = useLocation();
|
|
13301
13306
|
let { future } = useFrameworkContext();
|
|
13302
13307
|
let { basename } = useDataRouterContext2();
|
|
13303
|
-
let dataHrefs = React
|
|
13308
|
+
let dataHrefs = React.useMemo(() => {
|
|
13304
13309
|
if (page === location.pathname + location.search + location.hash) return [];
|
|
13305
13310
|
let url = singleFetchUrl(page, basename, future.unstable_trailingSlashAwareDataRequests, "rsc");
|
|
13306
13311
|
let hasSomeRoutesWithShouldRevalidate = false;
|
|
@@ -13316,7 +13321,7 @@ function RSCPrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps })
|
|
|
13316
13321
|
location,
|
|
13317
13322
|
nextMatches
|
|
13318
13323
|
]);
|
|
13319
|
-
return /* @__PURE__ */ React
|
|
13324
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React.createElement("link", {
|
|
13320
13325
|
key: href,
|
|
13321
13326
|
rel: "prefetch",
|
|
13322
13327
|
as: "fetch",
|
|
@@ -13329,21 +13334,21 @@ function PrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
|
|
|
13329
13334
|
let { future, manifest, routeModules } = useFrameworkContext();
|
|
13330
13335
|
let { basename } = useDataRouterContext2();
|
|
13331
13336
|
let { loaderData, matches } = useDataRouterStateContext();
|
|
13332
|
-
let newMatchesForData = React
|
|
13337
|
+
let newMatchesForData = React.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, "data"), [
|
|
13333
13338
|
page,
|
|
13334
13339
|
nextMatches,
|
|
13335
13340
|
matches,
|
|
13336
13341
|
manifest,
|
|
13337
13342
|
location
|
|
13338
13343
|
]);
|
|
13339
|
-
let newMatchesForAssets = React
|
|
13344
|
+
let newMatchesForAssets = React.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, "assets"), [
|
|
13340
13345
|
page,
|
|
13341
13346
|
nextMatches,
|
|
13342
13347
|
matches,
|
|
13343
13348
|
manifest,
|
|
13344
13349
|
location
|
|
13345
13350
|
]);
|
|
13346
|
-
let dataHrefs = React
|
|
13351
|
+
let dataHrefs = React.useMemo(() => {
|
|
13347
13352
|
if (page === location.pathname + location.search + location.hash) return [];
|
|
13348
13353
|
let routesParams = /* @__PURE__ */ new Set();
|
|
13349
13354
|
let foundOptOutRoute = false;
|
|
@@ -13369,20 +13374,20 @@ function PrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
|
|
|
13369
13374
|
page,
|
|
13370
13375
|
routeModules
|
|
13371
13376
|
]);
|
|
13372
|
-
let moduleHrefs = React
|
|
13377
|
+
let moduleHrefs = React.useMemo(() => getModuleLinkHrefs(newMatchesForAssets, manifest), [newMatchesForAssets, manifest]);
|
|
13373
13378
|
let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
|
|
13374
|
-
return /* @__PURE__ */ React
|
|
13379
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React.createElement("link", {
|
|
13375
13380
|
key: href,
|
|
13376
13381
|
rel: "prefetch",
|
|
13377
13382
|
as: "fetch",
|
|
13378
13383
|
href,
|
|
13379
13384
|
...linkProps
|
|
13380
|
-
})), moduleHrefs.map((href) => /* @__PURE__ */ React
|
|
13385
|
+
})), moduleHrefs.map((href) => /* @__PURE__ */ React.createElement("link", {
|
|
13381
13386
|
key: href,
|
|
13382
13387
|
rel: "modulepreload",
|
|
13383
13388
|
href,
|
|
13384
13389
|
...linkProps
|
|
13385
|
-
})), keyedPrefetchLinks.map(({ key, link }) => /* @__PURE__ */ React
|
|
13390
|
+
})), keyedPrefetchLinks.map(({ key, link }) => /* @__PURE__ */ React.createElement("link", {
|
|
13386
13391
|
key,
|
|
13387
13392
|
nonce: linkProps.nonce,
|
|
13388
13393
|
...link,
|
|
@@ -13397,22 +13402,22 @@ function mergeRefs(...refs) {
|
|
|
13397
13402
|
});
|
|
13398
13403
|
};
|
|
13399
13404
|
}
|
|
13400
|
-
React
|
|
13405
|
+
React.Component;
|
|
13401
13406
|
var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
13402
13407
|
try {
|
|
13403
13408
|
if (isBrowser2) window.__reactRouterVersion = "7.15.0";
|
|
13404
13409
|
} catch (e) {}
|
|
13405
13410
|
function HistoryRouter({ basename, children, history, useTransitions }) {
|
|
13406
|
-
let [state, setStateImpl] = React
|
|
13411
|
+
let [state, setStateImpl] = React.useState({
|
|
13407
13412
|
action: history.action,
|
|
13408
13413
|
location: history.location
|
|
13409
13414
|
});
|
|
13410
|
-
let setState = React
|
|
13415
|
+
let setState = React.useCallback((newState) => {
|
|
13411
13416
|
if (useTransitions === false) setStateImpl(newState);
|
|
13412
|
-
else React
|
|
13417
|
+
else React.startTransition(() => setStateImpl(newState));
|
|
13413
13418
|
}, [useTransitions]);
|
|
13414
|
-
React
|
|
13415
|
-
return /* @__PURE__ */ React
|
|
13419
|
+
React.useLayoutEffect(() => history.listen(setState), [history, setState]);
|
|
13420
|
+
return /* @__PURE__ */ React.createElement(Router, {
|
|
13416
13421
|
basename,
|
|
13417
13422
|
children,
|
|
13418
13423
|
location: state.location,
|
|
@@ -13423,8 +13428,8 @@ function HistoryRouter({ basename, children, history, useTransitions }) {
|
|
|
13423
13428
|
}
|
|
13424
13429
|
HistoryRouter.displayName = "unstable_HistoryRouter";
|
|
13425
13430
|
var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
13426
|
-
var Link$1 = React
|
|
13427
|
-
let { basename, navigator, useTransitions } = React
|
|
13431
|
+
var Link$1 = React.forwardRef(function LinkWithRef({ onClick, discover = "render", prefetch = "none", relative, reloadDocument, replace: replace2, mask, state, target, to, preventScrollReset, viewTransition, defaultShouldRevalidate, ...rest }, forwardedRef) {
|
|
13432
|
+
let { basename, navigator, useTransitions } = React.useContext(NavigationContext);
|
|
13428
13433
|
let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX2.test(to);
|
|
13429
13434
|
let parsed = parseToInfo(to, basename);
|
|
13430
13435
|
to = parsed.to;
|
|
@@ -13453,7 +13458,7 @@ var Link$1 = React$4.forwardRef(function LinkWithRef({ onClick, discover = "rend
|
|
|
13453
13458
|
if (!event.defaultPrevented) internalOnClick(event);
|
|
13454
13459
|
}
|
|
13455
13460
|
let isSpaLink = !(parsed.isExternal || reloadDocument);
|
|
13456
|
-
let link = /* @__PURE__ */ React
|
|
13461
|
+
let link = /* @__PURE__ */ React.createElement("a", {
|
|
13457
13462
|
...rest,
|
|
13458
13463
|
...prefetchHandlers,
|
|
13459
13464
|
href: (isSpaLink ? maskedHref : void 0) || parsed.absoluteURL || href,
|
|
@@ -13462,14 +13467,14 @@ var Link$1 = React$4.forwardRef(function LinkWithRef({ onClick, discover = "rend
|
|
|
13462
13467
|
target,
|
|
13463
13468
|
"data-discover": !isAbsolute && discover === "render" ? "true" : void 0
|
|
13464
13469
|
});
|
|
13465
|
-
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React
|
|
13470
|
+
return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(PrefetchPageLinks, { page: href })) : link;
|
|
13466
13471
|
});
|
|
13467
13472
|
Link$1.displayName = "Link";
|
|
13468
|
-
var NavLink = React
|
|
13473
|
+
var NavLink = React.forwardRef(function NavLinkWithRef({ "aria-current": ariaCurrentProp = "page", caseSensitive = false, className: classNameProp = "", end = false, style: styleProp, to, viewTransition, children, ...rest }, ref) {
|
|
13469
13474
|
let path = useResolvedPath(to, { relative: rest.relative });
|
|
13470
13475
|
let location = useLocation();
|
|
13471
|
-
let routerState = React
|
|
13472
|
-
let { navigator, basename } = React
|
|
13476
|
+
let routerState = React.useContext(DataRouterStateContext);
|
|
13477
|
+
let { navigator, basename } = React.useContext(NavigationContext);
|
|
13473
13478
|
let isTransitioning = routerState != null && useViewTransitionState(path) && viewTransition === true;
|
|
13474
13479
|
let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
|
|
13475
13480
|
let locationPathname = location.pathname;
|
|
@@ -13498,7 +13503,7 @@ var NavLink = React$4.forwardRef(function NavLinkWithRef({ "aria-current": ariaC
|
|
|
13498
13503
|
isTransitioning ? "transitioning" : null
|
|
13499
13504
|
].filter(Boolean).join(" ");
|
|
13500
13505
|
let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
|
|
13501
|
-
return /* @__PURE__ */ React
|
|
13506
|
+
return /* @__PURE__ */ React.createElement(Link$1, {
|
|
13502
13507
|
...rest,
|
|
13503
13508
|
"aria-current": ariaCurrent,
|
|
13504
13509
|
className,
|
|
@@ -13509,8 +13514,8 @@ var NavLink = React$4.forwardRef(function NavLinkWithRef({ "aria-current": ariaC
|
|
|
13509
13514
|
}, typeof children === "function" ? children(renderProps) : children);
|
|
13510
13515
|
});
|
|
13511
13516
|
NavLink.displayName = "NavLink";
|
|
13512
|
-
var Form = React
|
|
13513
|
-
let { useTransitions } = React
|
|
13517
|
+
var Form = React.forwardRef(({ discover = "render", fetcherKey, navigate, reloadDocument, replace: replace2, state, method = defaultMethod, action, onSubmit, relative, preventScrollReset, viewTransition, defaultShouldRevalidate, ...props }, forwardedRef) => {
|
|
13518
|
+
let { useTransitions } = React.useContext(NavigationContext);
|
|
13514
13519
|
let submit = useSubmit();
|
|
13515
13520
|
let formAction = useFormAction(action, { relative });
|
|
13516
13521
|
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
@@ -13532,10 +13537,10 @@ var Form = React$4.forwardRef(({ discover = "render", fetcherKey, navigate, relo
|
|
|
13532
13537
|
viewTransition,
|
|
13533
13538
|
defaultShouldRevalidate
|
|
13534
13539
|
});
|
|
13535
|
-
if (useTransitions && navigate !== false) React
|
|
13540
|
+
if (useTransitions && navigate !== false) React.startTransition(() => doSubmit());
|
|
13536
13541
|
else doSubmit();
|
|
13537
13542
|
};
|
|
13538
|
-
return /* @__PURE__ */ React
|
|
13543
|
+
return /* @__PURE__ */ React.createElement("form", {
|
|
13539
13544
|
ref: forwardedRef,
|
|
13540
13545
|
method: formMethod,
|
|
13541
13546
|
action: formAction,
|
|
@@ -13546,15 +13551,15 @@ var Form = React$4.forwardRef(({ discover = "render", fetcherKey, navigate, relo
|
|
|
13546
13551
|
});
|
|
13547
13552
|
Form.displayName = "Form";
|
|
13548
13553
|
function ScrollRestoration({ getKey, storageKey, ...props }) {
|
|
13549
|
-
let remixContext = React
|
|
13550
|
-
let { basename } = React
|
|
13554
|
+
let remixContext = React.useContext(FrameworkContext);
|
|
13555
|
+
let { basename } = React.useContext(NavigationContext);
|
|
13551
13556
|
let location = useLocation();
|
|
13552
13557
|
let matches = useMatches();
|
|
13553
13558
|
useScrollRestoration({
|
|
13554
13559
|
getKey,
|
|
13555
13560
|
storageKey
|
|
13556
13561
|
});
|
|
13557
|
-
let ssrKey = React
|
|
13562
|
+
let ssrKey = React.useMemo(() => {
|
|
13558
13563
|
if (!remixContext || !getKey) return null;
|
|
13559
13564
|
let userKey = getScrollRestorationKey(location, matches, basename, getKey);
|
|
13560
13565
|
return userKey !== location.key ? userKey : null;
|
|
@@ -13573,7 +13578,7 @@ function ScrollRestoration({ getKey, storageKey, ...props }) {
|
|
|
13573
13578
|
sessionStorage.removeItem(storageKey2);
|
|
13574
13579
|
}
|
|
13575
13580
|
}).toString();
|
|
13576
|
-
return /* @__PURE__ */ React
|
|
13581
|
+
return /* @__PURE__ */ React.createElement("script", {
|
|
13577
13582
|
...props,
|
|
13578
13583
|
suppressHydrationWarning: true,
|
|
13579
13584
|
dangerouslySetInnerHTML: { __html: `(${restoreScroll})(${escapeHtml(JSON.stringify(storageKey || SCROLL_RESTORATION_STORAGE_KEY))}, ${escapeHtml(JSON.stringify(ssrKey))})` }
|
|
@@ -13584,12 +13589,12 @@ function getDataRouterConsoleError2(hookName) {
|
|
|
13584
13589
|
return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
|
|
13585
13590
|
}
|
|
13586
13591
|
function useDataRouterContext3(hookName) {
|
|
13587
|
-
let ctx = React
|
|
13592
|
+
let ctx = React.useContext(DataRouterContext);
|
|
13588
13593
|
invariant$1(ctx, getDataRouterConsoleError2(hookName));
|
|
13589
13594
|
return ctx;
|
|
13590
13595
|
}
|
|
13591
13596
|
function useDataRouterState2(hookName) {
|
|
13592
|
-
let state = React
|
|
13597
|
+
let state = React.useContext(DataRouterStateContext);
|
|
13593
13598
|
invariant$1(state, getDataRouterConsoleError2(hookName));
|
|
13594
13599
|
return state;
|
|
13595
13600
|
}
|
|
@@ -13597,7 +13602,7 @@ function useLinkClickHandler(to, { target, replace: replaceProp, mask, state, pr
|
|
|
13597
13602
|
let navigate = useNavigate();
|
|
13598
13603
|
let location = useLocation();
|
|
13599
13604
|
let path = useResolvedPath(to, { relative });
|
|
13600
|
-
return React
|
|
13605
|
+
return React.useCallback((event) => {
|
|
13601
13606
|
if (shouldProcessLinkClick(event, target)) {
|
|
13602
13607
|
event.preventDefault();
|
|
13603
13608
|
let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location) === createPath(path);
|
|
@@ -13610,7 +13615,7 @@ function useLinkClickHandler(to, { target, replace: replaceProp, mask, state, pr
|
|
|
13610
13615
|
viewTransition,
|
|
13611
13616
|
defaultShouldRevalidate
|
|
13612
13617
|
});
|
|
13613
|
-
if (useTransitions) React
|
|
13618
|
+
if (useTransitions) React.startTransition(() => doNavigate());
|
|
13614
13619
|
else doNavigate();
|
|
13615
13620
|
}
|
|
13616
13621
|
}, [
|
|
@@ -13633,11 +13638,11 @@ var fetcherId = 0;
|
|
|
13633
13638
|
var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
|
|
13634
13639
|
function useSubmit() {
|
|
13635
13640
|
let { router } = useDataRouterContext3("useSubmit");
|
|
13636
|
-
let { basename } = React
|
|
13641
|
+
let { basename } = React.useContext(NavigationContext);
|
|
13637
13642
|
let currentRouteId = useRouteId();
|
|
13638
13643
|
let routerFetch = router.fetch;
|
|
13639
13644
|
let routerNavigate = router.navigate;
|
|
13640
|
-
return React
|
|
13645
|
+
return React.useCallback(async (target, options = {}) => {
|
|
13641
13646
|
let { action, method, encType, formData, body } = getFormSubmissionInfo(target, basename);
|
|
13642
13647
|
if (options.navigate === false) await routerFetch(options.fetcherKey || getUniqueFetcherId(), currentRouteId, options.action || action, {
|
|
13643
13648
|
defaultShouldRevalidate: options.defaultShouldRevalidate,
|
|
@@ -13669,8 +13674,8 @@ function useSubmit() {
|
|
|
13669
13674
|
]);
|
|
13670
13675
|
}
|
|
13671
13676
|
function useFormAction(action, { relative } = {}) {
|
|
13672
|
-
let { basename } = React
|
|
13673
|
-
let routeContext = React
|
|
13677
|
+
let { basename } = React.useContext(NavigationContext);
|
|
13678
|
+
let routeContext = React.useContext(RouteContext);
|
|
13674
13679
|
invariant$1(routeContext, "useFormAction must be used inside a RouteContext");
|
|
13675
13680
|
let [match] = routeContext.matches.slice(-1);
|
|
13676
13681
|
let path = { ...useResolvedPath(action ? action : ".", { relative }) };
|
|
@@ -13705,17 +13710,17 @@ function getScrollRestorationKey(location, matches, basename, getKey) {
|
|
|
13705
13710
|
function useScrollRestoration({ getKey, storageKey } = {}) {
|
|
13706
13711
|
let { router } = useDataRouterContext3("useScrollRestoration");
|
|
13707
13712
|
let { restoreScrollPosition, preventScrollReset } = useDataRouterState2("useScrollRestoration");
|
|
13708
|
-
let { basename } = React
|
|
13713
|
+
let { basename } = React.useContext(NavigationContext);
|
|
13709
13714
|
let location = useLocation();
|
|
13710
13715
|
let matches = useMatches();
|
|
13711
13716
|
let navigation = useNavigation();
|
|
13712
|
-
React
|
|
13717
|
+
React.useEffect(() => {
|
|
13713
13718
|
window.history.scrollRestoration = "manual";
|
|
13714
13719
|
return () => {
|
|
13715
13720
|
window.history.scrollRestoration = "auto";
|
|
13716
13721
|
};
|
|
13717
13722
|
}, []);
|
|
13718
|
-
usePageHide(React
|
|
13723
|
+
usePageHide(React.useCallback(() => {
|
|
13719
13724
|
if (navigation.state === "idle") {
|
|
13720
13725
|
let key = getScrollRestorationKey(location, matches, basename, getKey);
|
|
13721
13726
|
savedScrollPositions[key] = window.scrollY;
|
|
@@ -13735,13 +13740,13 @@ function useScrollRestoration({ getKey, storageKey } = {}) {
|
|
|
13735
13740
|
storageKey
|
|
13736
13741
|
]));
|
|
13737
13742
|
if (typeof document !== "undefined") {
|
|
13738
|
-
React
|
|
13743
|
+
React.useLayoutEffect(() => {
|
|
13739
13744
|
try {
|
|
13740
13745
|
let sessionPositions = sessionStorage.getItem(storageKey || SCROLL_RESTORATION_STORAGE_KEY);
|
|
13741
13746
|
if (sessionPositions) savedScrollPositions = JSON.parse(sessionPositions);
|
|
13742
13747
|
} catch (e) {}
|
|
13743
13748
|
}, [storageKey]);
|
|
13744
|
-
React
|
|
13749
|
+
React.useLayoutEffect(() => {
|
|
13745
13750
|
let disableScrollRestoration = router?.enableScrollRestoration(savedScrollPositions, () => window.scrollY, getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0);
|
|
13746
13751
|
return () => disableScrollRestoration && disableScrollRestoration();
|
|
13747
13752
|
}, [
|
|
@@ -13749,7 +13754,7 @@ function useScrollRestoration({ getKey, storageKey } = {}) {
|
|
|
13749
13754
|
basename,
|
|
13750
13755
|
getKey
|
|
13751
13756
|
]);
|
|
13752
|
-
React
|
|
13757
|
+
React.useLayoutEffect(() => {
|
|
13753
13758
|
if (restoreScrollPosition === false) return;
|
|
13754
13759
|
if (typeof restoreScrollPosition === "number") {
|
|
13755
13760
|
window.scrollTo(0, restoreScrollPosition);
|
|
@@ -13777,7 +13782,7 @@ function useScrollRestoration({ getKey, storageKey } = {}) {
|
|
|
13777
13782
|
}
|
|
13778
13783
|
function usePageHide(callback, options) {
|
|
13779
13784
|
let { capture } = options || {};
|
|
13780
|
-
React
|
|
13785
|
+
React.useEffect(() => {
|
|
13781
13786
|
let opts = capture != null ? { capture } : void 0;
|
|
13782
13787
|
window.addEventListener("pagehide", callback, opts);
|
|
13783
13788
|
return () => {
|
|
@@ -13786,7 +13791,7 @@ function usePageHide(callback, options) {
|
|
|
13786
13791
|
}, [callback, capture]);
|
|
13787
13792
|
}
|
|
13788
13793
|
function useViewTransitionState(to, { relative } = {}) {
|
|
13789
|
-
let vtContext = React
|
|
13794
|
+
let vtContext = React.useContext(ViewTransitionContext);
|
|
13790
13795
|
invariant$1(vtContext != null, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");
|
|
13791
13796
|
let { basename } = useDataRouterContext3("useViewTransitionState");
|
|
13792
13797
|
let path = useResolvedPath(to, { relative });
|
|
@@ -20107,15 +20112,15 @@ function composeRefs$1(...refs) {
|
|
|
20107
20112
|
};
|
|
20108
20113
|
}
|
|
20109
20114
|
function useComposedRefs$1(...refs) {
|
|
20110
|
-
return React
|
|
20115
|
+
return React.useCallback(composeRefs$1(...refs), refs);
|
|
20111
20116
|
}
|
|
20112
20117
|
//#endregion
|
|
20113
20118
|
//#region ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
20114
20119
|
function createContext2(rootComponentName, defaultContext) {
|
|
20115
|
-
const Context = React
|
|
20120
|
+
const Context = React.createContext(defaultContext);
|
|
20116
20121
|
const Provider = (props) => {
|
|
20117
20122
|
const { children, ...context } = props;
|
|
20118
|
-
const value = React
|
|
20123
|
+
const value = React.useMemo(() => context, Object.values(context));
|
|
20119
20124
|
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
20120
20125
|
value,
|
|
20121
20126
|
children
|
|
@@ -20123,7 +20128,7 @@ function createContext2(rootComponentName, defaultContext) {
|
|
|
20123
20128
|
};
|
|
20124
20129
|
Provider.displayName = rootComponentName + "Provider";
|
|
20125
20130
|
function useContext2(consumerName) {
|
|
20126
|
-
const context = React
|
|
20131
|
+
const context = React.useContext(Context);
|
|
20127
20132
|
if (context) return context;
|
|
20128
20133
|
if (defaultContext !== void 0) return defaultContext;
|
|
20129
20134
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -20133,13 +20138,13 @@ function createContext2(rootComponentName, defaultContext) {
|
|
|
20133
20138
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
20134
20139
|
let defaultContexts = [];
|
|
20135
20140
|
function createContext3(rootComponentName, defaultContext) {
|
|
20136
|
-
const BaseContext = React
|
|
20141
|
+
const BaseContext = React.createContext(defaultContext);
|
|
20137
20142
|
const index = defaultContexts.length;
|
|
20138
20143
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
20139
20144
|
const Provider = (props) => {
|
|
20140
20145
|
const { scope, children, ...context } = props;
|
|
20141
20146
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
20142
|
-
const value = React
|
|
20147
|
+
const value = React.useMemo(() => context, Object.values(context));
|
|
20143
20148
|
return /* @__PURE__ */ jsx(Context.Provider, {
|
|
20144
20149
|
value,
|
|
20145
20150
|
children
|
|
@@ -20148,7 +20153,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
20148
20153
|
Provider.displayName = rootComponentName + "Provider";
|
|
20149
20154
|
function useContext2(consumerName, scope) {
|
|
20150
20155
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
20151
|
-
const context = React
|
|
20156
|
+
const context = React.useContext(Context);
|
|
20152
20157
|
if (context) return context;
|
|
20153
20158
|
if (defaultContext !== void 0) return defaultContext;
|
|
20154
20159
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -20157,11 +20162,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
20157
20162
|
}
|
|
20158
20163
|
const createScope = () => {
|
|
20159
20164
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
20160
|
-
return React
|
|
20165
|
+
return React.createContext(defaultContext);
|
|
20161
20166
|
});
|
|
20162
20167
|
return function useScope(scope) {
|
|
20163
20168
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
20164
|
-
return React
|
|
20169
|
+
return React.useMemo(() => ({ [`__scope${scopeName}`]: {
|
|
20165
20170
|
...scope,
|
|
20166
20171
|
[scopeName]: contexts
|
|
20167
20172
|
} }), [scope, contexts]);
|
|
@@ -20186,7 +20191,7 @@ function composeContextScopes(...scopes) {
|
|
|
20186
20191
|
...currentScope
|
|
20187
20192
|
};
|
|
20188
20193
|
}, {});
|
|
20189
|
-
return React
|
|
20194
|
+
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
20190
20195
|
};
|
|
20191
20196
|
};
|
|
20192
20197
|
createScope.scopeName = baseScope.scopeName;
|
|
@@ -20194,13 +20199,13 @@ function composeContextScopes(...scopes) {
|
|
|
20194
20199
|
}
|
|
20195
20200
|
//#endregion
|
|
20196
20201
|
//#region ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
20197
|
-
var useLayoutEffect2 = globalThis?.document ? React
|
|
20202
|
+
var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {};
|
|
20198
20203
|
//#endregion
|
|
20199
20204
|
//#region ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
20200
|
-
var useReactId = React
|
|
20205
|
+
var useReactId = React[" useId ".trim().toString()] || (() => void 0);
|
|
20201
20206
|
var count$1 = 0;
|
|
20202
20207
|
function useId$1(deterministicId) {
|
|
20203
|
-
const [id, setId] = React
|
|
20208
|
+
const [id, setId] = React.useState(useReactId());
|
|
20204
20209
|
useLayoutEffect2(() => {
|
|
20205
20210
|
if (!deterministicId) setId((reactId) => reactId ?? String(count$1++));
|
|
20206
20211
|
}, [deterministicId]);
|
|
@@ -20208,7 +20213,7 @@ function useId$1(deterministicId) {
|
|
|
20208
20213
|
}
|
|
20209
20214
|
//#endregion
|
|
20210
20215
|
//#region ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
20211
|
-
var useInsertionEffect$1 = React
|
|
20216
|
+
var useInsertionEffect$1 = React[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
20212
20217
|
function useControllableState({ prop, defaultProp, onChange = () => {}, caller }) {
|
|
20213
20218
|
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
20214
20219
|
defaultProp,
|
|
@@ -20217,14 +20222,14 @@ function useControllableState({ prop, defaultProp, onChange = () => {}, caller }
|
|
|
20217
20222
|
const isControlled = prop !== void 0;
|
|
20218
20223
|
const value = isControlled ? prop : uncontrolledProp;
|
|
20219
20224
|
{
|
|
20220
|
-
const isControlledRef = React
|
|
20221
|
-
React
|
|
20225
|
+
const isControlledRef = React.useRef(prop !== void 0);
|
|
20226
|
+
React.useEffect(() => {
|
|
20222
20227
|
const wasControlled = isControlledRef.current;
|
|
20223
20228
|
if (wasControlled !== isControlled) console.warn(`${caller} is changing from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}. 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.`);
|
|
20224
20229
|
isControlledRef.current = isControlled;
|
|
20225
20230
|
}, [isControlled, caller]);
|
|
20226
20231
|
}
|
|
20227
|
-
return [value, React
|
|
20232
|
+
return [value, React.useCallback((nextValue) => {
|
|
20228
20233
|
if (isControlled) {
|
|
20229
20234
|
const value2 = isFunction$1(nextValue) ? nextValue(prop) : nextValue;
|
|
20230
20235
|
if (value2 !== prop) onChangeRef.current?.(value2);
|
|
@@ -20237,13 +20242,13 @@ function useControllableState({ prop, defaultProp, onChange = () => {}, caller }
|
|
|
20237
20242
|
])];
|
|
20238
20243
|
}
|
|
20239
20244
|
function useUncontrolledState({ defaultProp, onChange }) {
|
|
20240
|
-
const [value, setValue] = React
|
|
20241
|
-
const prevValueRef = React
|
|
20242
|
-
const onChangeRef = React
|
|
20245
|
+
const [value, setValue] = React.useState(defaultProp);
|
|
20246
|
+
const prevValueRef = React.useRef(value);
|
|
20247
|
+
const onChangeRef = React.useRef(onChange);
|
|
20243
20248
|
useInsertionEffect$1(() => {
|
|
20244
20249
|
onChangeRef.current = onChange;
|
|
20245
20250
|
}, [onChange]);
|
|
20246
|
-
React
|
|
20251
|
+
React.useEffect(() => {
|
|
20247
20252
|
if (prevValueRef.current !== value) {
|
|
20248
20253
|
onChangeRef.current?.(value);
|
|
20249
20254
|
prevValueRef.current = value;
|
|
@@ -20263,22 +20268,22 @@ function isFunction$1(value) {
|
|
|
20263
20268
|
/* @__NO_SIDE_EFFECTS__ */
|
|
20264
20269
|
function createSlot$1(ownerName) {
|
|
20265
20270
|
const SlotClone = /* @__PURE__ */ createSlotClone$1(ownerName);
|
|
20266
|
-
const Slot2 = React
|
|
20271
|
+
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
|
20267
20272
|
const { children, ...slotProps } = props;
|
|
20268
|
-
const childrenArray = React
|
|
20273
|
+
const childrenArray = React.Children.toArray(children);
|
|
20269
20274
|
const slottable = childrenArray.find(isSlottable$1);
|
|
20270
20275
|
if (slottable) {
|
|
20271
20276
|
const newElement = slottable.props.children;
|
|
20272
20277
|
const newChildren = childrenArray.map((child) => {
|
|
20273
20278
|
if (child === slottable) {
|
|
20274
|
-
if (React
|
|
20275
|
-
return React
|
|
20279
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
20280
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
20276
20281
|
} else return child;
|
|
20277
20282
|
});
|
|
20278
20283
|
return /* @__PURE__ */ jsx(SlotClone, {
|
|
20279
20284
|
...slotProps,
|
|
20280
20285
|
ref: forwardedRef,
|
|
20281
|
-
children: React
|
|
20286
|
+
children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null
|
|
20282
20287
|
});
|
|
20283
20288
|
}
|
|
20284
20289
|
return /* @__PURE__ */ jsx(SlotClone, {
|
|
@@ -20292,15 +20297,15 @@ function createSlot$1(ownerName) {
|
|
|
20292
20297
|
}
|
|
20293
20298
|
/* @__NO_SIDE_EFFECTS__ */
|
|
20294
20299
|
function createSlotClone$1(ownerName) {
|
|
20295
|
-
const SlotClone = React
|
|
20300
|
+
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
20296
20301
|
const { children, ...slotProps } = props;
|
|
20297
|
-
if (React
|
|
20302
|
+
if (React.isValidElement(children)) {
|
|
20298
20303
|
const childrenRef = getElementRef$2(children);
|
|
20299
20304
|
const props2 = mergeProps$1(slotProps, children.props);
|
|
20300
|
-
if (children.type !== React
|
|
20301
|
-
return React
|
|
20305
|
+
if (children.type !== React.Fragment) props2.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
20306
|
+
return React.cloneElement(children, props2);
|
|
20302
20307
|
}
|
|
20303
|
-
return React
|
|
20308
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
20304
20309
|
});
|
|
20305
20310
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
20306
20311
|
return SlotClone;
|
|
@@ -20316,7 +20321,7 @@ function createSlottable(ownerName) {
|
|
|
20316
20321
|
return Slottable2;
|
|
20317
20322
|
}
|
|
20318
20323
|
function isSlottable$1(child) {
|
|
20319
|
-
return React
|
|
20324
|
+
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER$1;
|
|
20320
20325
|
}
|
|
20321
20326
|
function mergeProps$1(slotProps, childProps) {
|
|
20322
20327
|
const overrideProps = { ...childProps };
|
|
@@ -20372,7 +20377,7 @@ var Primitive$1 = [
|
|
|
20372
20377
|
"ul"
|
|
20373
20378
|
].reduce((primitive, node) => {
|
|
20374
20379
|
const Slot = /* @__PURE__ */ createSlot$1(`Primitive.${node}`);
|
|
20375
|
-
const Node = React
|
|
20380
|
+
const Node = React.forwardRef((props, forwardedRef) => {
|
|
20376
20381
|
const { asChild, ...primitiveProps } = props;
|
|
20377
20382
|
const Comp = asChild ? Slot : node;
|
|
20378
20383
|
if (typeof window !== "undefined") window[Symbol.for("radix-ui")] = true;
|
|
@@ -20393,17 +20398,17 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
20393
20398
|
//#endregion
|
|
20394
20399
|
//#region ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
20395
20400
|
function useCallbackRef$1(callback) {
|
|
20396
|
-
const callbackRef = React
|
|
20397
|
-
React
|
|
20401
|
+
const callbackRef = React.useRef(callback);
|
|
20402
|
+
React.useEffect(() => {
|
|
20398
20403
|
callbackRef.current = callback;
|
|
20399
20404
|
});
|
|
20400
|
-
return React
|
|
20405
|
+
return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
20401
20406
|
}
|
|
20402
20407
|
//#endregion
|
|
20403
20408
|
//#region ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
20404
20409
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
20405
20410
|
const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
|
|
20406
|
-
React
|
|
20411
|
+
React.useEffect(() => {
|
|
20407
20412
|
const handleKeyDown = (event) => {
|
|
20408
20413
|
if (event.key === "Escape") onEscapeKeyDown(event);
|
|
20409
20414
|
};
|
|
@@ -20418,17 +20423,17 @@ var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
|
20418
20423
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
20419
20424
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
20420
20425
|
var originalBodyPointerEvents;
|
|
20421
|
-
var DismissableLayerContext = React
|
|
20426
|
+
var DismissableLayerContext = React.createContext({
|
|
20422
20427
|
layers: /* @__PURE__ */ new Set(),
|
|
20423
20428
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
20424
20429
|
branches: /* @__PURE__ */ new Set()
|
|
20425
20430
|
});
|
|
20426
|
-
var DismissableLayer = React
|
|
20431
|
+
var DismissableLayer = React.forwardRef((props, forwardedRef) => {
|
|
20427
20432
|
const { disableOutsidePointerEvents = false, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, ...layerProps } = props;
|
|
20428
|
-
const context = React
|
|
20429
|
-
const [node, setNode] = React
|
|
20433
|
+
const context = React.useContext(DismissableLayerContext);
|
|
20434
|
+
const [node, setNode] = React.useState(null);
|
|
20430
20435
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
20431
|
-
const [, force] = React
|
|
20436
|
+
const [, force] = React.useState({});
|
|
20432
20437
|
const composedRefs = useComposedRefs$1(forwardedRef, (node2) => setNode(node2));
|
|
20433
20438
|
const layers = Array.from(context.layers);
|
|
20434
20439
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -20459,7 +20464,7 @@ var DismissableLayer = React$4.forwardRef((props, forwardedRef) => {
|
|
|
20459
20464
|
onDismiss();
|
|
20460
20465
|
}
|
|
20461
20466
|
}, ownerDocument);
|
|
20462
|
-
React
|
|
20467
|
+
React.useEffect(() => {
|
|
20463
20468
|
if (!node) return;
|
|
20464
20469
|
if (disableOutsidePointerEvents) {
|
|
20465
20470
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -20479,7 +20484,7 @@ var DismissableLayer = React$4.forwardRef((props, forwardedRef) => {
|
|
|
20479
20484
|
disableOutsidePointerEvents,
|
|
20480
20485
|
context
|
|
20481
20486
|
]);
|
|
20482
|
-
React
|
|
20487
|
+
React.useEffect(() => {
|
|
20483
20488
|
return () => {
|
|
20484
20489
|
if (!node) return;
|
|
20485
20490
|
context.layers.delete(node);
|
|
@@ -20487,7 +20492,7 @@ var DismissableLayer = React$4.forwardRef((props, forwardedRef) => {
|
|
|
20487
20492
|
dispatchUpdate();
|
|
20488
20493
|
};
|
|
20489
20494
|
}, [node, context]);
|
|
20490
|
-
React
|
|
20495
|
+
React.useEffect(() => {
|
|
20491
20496
|
const handleUpdate = () => force({});
|
|
20492
20497
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
20493
20498
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
@@ -20506,11 +20511,11 @@ var DismissableLayer = React$4.forwardRef((props, forwardedRef) => {
|
|
|
20506
20511
|
});
|
|
20507
20512
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
20508
20513
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
20509
|
-
var DismissableLayerBranch = React
|
|
20510
|
-
const context = React
|
|
20511
|
-
const ref = React
|
|
20514
|
+
var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
|
20515
|
+
const context = React.useContext(DismissableLayerContext);
|
|
20516
|
+
const ref = React.useRef(null);
|
|
20512
20517
|
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
20513
|
-
React
|
|
20518
|
+
React.useEffect(() => {
|
|
20514
20519
|
const node = ref.current;
|
|
20515
20520
|
if (node) {
|
|
20516
20521
|
context.branches.add(node);
|
|
@@ -20527,9 +20532,9 @@ var DismissableLayerBranch = React$4.forwardRef((props, forwardedRef) => {
|
|
|
20527
20532
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
20528
20533
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
20529
20534
|
const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
|
|
20530
|
-
const isPointerInsideReactTreeRef = React
|
|
20531
|
-
const handleClickRef = React
|
|
20532
|
-
React
|
|
20535
|
+
const isPointerInsideReactTreeRef = React.useRef(false);
|
|
20536
|
+
const handleClickRef = React.useRef(() => {});
|
|
20537
|
+
React.useEffect(() => {
|
|
20533
20538
|
const handlePointerDown = (event) => {
|
|
20534
20539
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
20535
20540
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -20557,8 +20562,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
20557
20562
|
}
|
|
20558
20563
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
20559
20564
|
const handleFocusOutside = useCallbackRef$1(onFocusOutside);
|
|
20560
|
-
const isFocusInsideReactTreeRef = React
|
|
20561
|
-
React
|
|
20565
|
+
const isFocusInsideReactTreeRef = React.useRef(false);
|
|
20566
|
+
React.useEffect(() => {
|
|
20562
20567
|
const handleFocus = (event) => {
|
|
20563
20568
|
if (event.target && !isFocusInsideReactTreeRef.current) handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, { originalEvent: event }, { discrete: false });
|
|
20564
20569
|
};
|
|
@@ -20594,14 +20599,14 @@ var EVENT_OPTIONS$1 = {
|
|
|
20594
20599
|
cancelable: true
|
|
20595
20600
|
};
|
|
20596
20601
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
20597
|
-
var FocusScope = React
|
|
20602
|
+
var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
20598
20603
|
const { loop = false, trapped = false, onMountAutoFocus: onMountAutoFocusProp, onUnmountAutoFocus: onUnmountAutoFocusProp, ...scopeProps } = props;
|
|
20599
|
-
const [container, setContainer] = React
|
|
20604
|
+
const [container, setContainer] = React.useState(null);
|
|
20600
20605
|
const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
|
|
20601
20606
|
const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
|
|
20602
|
-
const lastFocusedElementRef = React
|
|
20607
|
+
const lastFocusedElementRef = React.useRef(null);
|
|
20603
20608
|
const composedRefs = useComposedRefs$1(forwardedRef, (node) => setContainer(node));
|
|
20604
|
-
const focusScope = React
|
|
20609
|
+
const focusScope = React.useRef({
|
|
20605
20610
|
paused: false,
|
|
20606
20611
|
pause() {
|
|
20607
20612
|
this.paused = true;
|
|
@@ -20610,7 +20615,7 @@ var FocusScope = React$4.forwardRef((props, forwardedRef) => {
|
|
|
20610
20615
|
this.paused = false;
|
|
20611
20616
|
}
|
|
20612
20617
|
}).current;
|
|
20613
|
-
React
|
|
20618
|
+
React.useEffect(() => {
|
|
20614
20619
|
if (trapped) {
|
|
20615
20620
|
let handleFocusIn2 = function(event) {
|
|
20616
20621
|
if (focusScope.paused || !container) return;
|
|
@@ -20644,7 +20649,7 @@ var FocusScope = React$4.forwardRef((props, forwardedRef) => {
|
|
|
20644
20649
|
container,
|
|
20645
20650
|
focusScope.paused
|
|
20646
20651
|
]);
|
|
20647
|
-
React
|
|
20652
|
+
React.useEffect(() => {
|
|
20648
20653
|
if (container) {
|
|
20649
20654
|
focusScopesStack.add(focusScope);
|
|
20650
20655
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -20675,7 +20680,7 @@ var FocusScope = React$4.forwardRef((props, forwardedRef) => {
|
|
|
20675
20680
|
onUnmountAutoFocus,
|
|
20676
20681
|
focusScope
|
|
20677
20682
|
]);
|
|
20678
|
-
const handleKeyDown = React
|
|
20683
|
+
const handleKeyDown = React.useCallback((event) => {
|
|
20679
20684
|
if (!loop && !trapped) return;
|
|
20680
20685
|
if (focusScope.paused) return;
|
|
20681
20686
|
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
@@ -20777,9 +20782,9 @@ function removeLinks(items) {
|
|
|
20777
20782
|
//#endregion
|
|
20778
20783
|
//#region ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react_266ca67294f168fbf2e025541d323e69/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
20779
20784
|
var PORTAL_NAME$4 = "Portal";
|
|
20780
|
-
var Portal$3 = React
|
|
20785
|
+
var Portal$3 = React.forwardRef((props, forwardedRef) => {
|
|
20781
20786
|
const { container: containerProp, ...portalProps } = props;
|
|
20782
|
-
const [mounted, setMounted] = React
|
|
20787
|
+
const [mounted, setMounted] = React.useState(false);
|
|
20783
20788
|
useLayoutEffect2(() => setMounted(true), []);
|
|
20784
20789
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
20785
20790
|
return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive$1.div, {
|
|
@@ -20791,23 +20796,23 @@ Portal$3.displayName = PORTAL_NAME$4;
|
|
|
20791
20796
|
//#endregion
|
|
20792
20797
|
//#region ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.14__@types+rea_abbc8bcf75333b39bfe32b13ef7abc0e/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
20793
20798
|
function useStateMachine(initialState, machine) {
|
|
20794
|
-
return React
|
|
20799
|
+
return React.useReducer((state, event) => {
|
|
20795
20800
|
return machine[state][event] ?? state;
|
|
20796
20801
|
}, initialState);
|
|
20797
20802
|
}
|
|
20798
20803
|
var Presence = (props) => {
|
|
20799
20804
|
const { present, children } = props;
|
|
20800
20805
|
const presence = usePresence$1(present);
|
|
20801
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React
|
|
20806
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React.Children.only(children);
|
|
20802
20807
|
const ref = useComposedRefs$1(presence.ref, getElementRef$1(child));
|
|
20803
|
-
return typeof children === "function" || presence.isPresent ? React
|
|
20808
|
+
return typeof children === "function" || presence.isPresent ? React.cloneElement(child, { ref }) : null;
|
|
20804
20809
|
};
|
|
20805
20810
|
Presence.displayName = "Presence";
|
|
20806
20811
|
function usePresence$1(present) {
|
|
20807
|
-
const [node, setNode] = React
|
|
20808
|
-
const stylesRef = React
|
|
20809
|
-
const prevPresentRef = React
|
|
20810
|
-
const prevAnimationNameRef = React
|
|
20812
|
+
const [node, setNode] = React.useState();
|
|
20813
|
+
const stylesRef = React.useRef(null);
|
|
20814
|
+
const prevPresentRef = React.useRef(present);
|
|
20815
|
+
const prevAnimationNameRef = React.useRef("none");
|
|
20811
20816
|
const [state, send] = useStateMachine(present ? "mounted" : "unmounted", {
|
|
20812
20817
|
mounted: {
|
|
20813
20818
|
UNMOUNT: "unmounted",
|
|
@@ -20819,7 +20824,7 @@ function usePresence$1(present) {
|
|
|
20819
20824
|
},
|
|
20820
20825
|
unmounted: { MOUNT: "mounted" }
|
|
20821
20826
|
});
|
|
20822
|
-
React
|
|
20827
|
+
React.useEffect(() => {
|
|
20823
20828
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
20824
20829
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
20825
20830
|
}, [state]);
|
|
@@ -20869,7 +20874,7 @@ function usePresence$1(present) {
|
|
|
20869
20874
|
}, [node, send]);
|
|
20870
20875
|
return {
|
|
20871
20876
|
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
20872
|
-
ref: React
|
|
20877
|
+
ref: React.useCallback((node2) => {
|
|
20873
20878
|
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
20874
20879
|
setNode(node2);
|
|
20875
20880
|
}, [])
|
|
@@ -20891,7 +20896,7 @@ function getElementRef$1(element) {
|
|
|
20891
20896
|
//#region ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
20892
20897
|
var count = 0;
|
|
20893
20898
|
function useFocusGuards() {
|
|
20894
|
-
React
|
|
20899
|
+
React.useEffect(() => {
|
|
20895
20900
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
20896
20901
|
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
20897
20902
|
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
@@ -20982,7 +20987,7 @@ function useCallbackRef(initialValue, callback) {
|
|
|
20982
20987
|
}
|
|
20983
20988
|
//#endregion
|
|
20984
20989
|
//#region ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
20985
|
-
var useIsomorphicLayoutEffect$2 = typeof window !== "undefined" ? React
|
|
20990
|
+
var useIsomorphicLayoutEffect$2 = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
20986
20991
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
20987
20992
|
/**
|
|
20988
20993
|
* Merges two or more refs together providing a single interface to set their value
|
|
@@ -21110,7 +21115,7 @@ var SideCar = function(_a) {
|
|
|
21110
21115
|
if (!sideCar) throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
21111
21116
|
var Target = sideCar.read();
|
|
21112
21117
|
if (!Target) throw new Error("Sidecar medium not found");
|
|
21113
|
-
return React
|
|
21118
|
+
return React.createElement(Target, __assign({}, rest));
|
|
21114
21119
|
};
|
|
21115
21120
|
SideCar.isSideCarExport = true;
|
|
21116
21121
|
function exportSidecar(medium, exported) {
|
|
@@ -21127,9 +21132,9 @@ var nothing$1 = function() {};
|
|
|
21127
21132
|
/**
|
|
21128
21133
|
* Removes scrollbar from the page and contain the scroll within the Lock
|
|
21129
21134
|
*/
|
|
21130
|
-
var RemoveScroll$1 = React
|
|
21131
|
-
var ref = React
|
|
21132
|
-
var _a = React
|
|
21135
|
+
var RemoveScroll$1 = React.forwardRef(function(props, parentRef) {
|
|
21136
|
+
var ref = React.useRef(null);
|
|
21137
|
+
var _a = React.useState({
|
|
21133
21138
|
onScrollCapture: nothing$1,
|
|
21134
21139
|
onWheelCapture: nothing$1,
|
|
21135
21140
|
onTouchMoveCapture: nothing$1
|
|
@@ -21152,7 +21157,7 @@ var RemoveScroll$1 = React$4.forwardRef(function(props, parentRef) {
|
|
|
21152
21157
|
var SideCar = sideCar;
|
|
21153
21158
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
21154
21159
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
21155
|
-
return React
|
|
21160
|
+
return React.createElement(React.Fragment, null, enabled && React.createElement(SideCar, {
|
|
21156
21161
|
sideCar: effectCar$1,
|
|
21157
21162
|
removeScrollBar,
|
|
21158
21163
|
shards,
|
|
@@ -21163,7 +21168,7 @@ var RemoveScroll$1 = React$4.forwardRef(function(props, parentRef) {
|
|
|
21163
21168
|
allowPinchZoom: !!allowPinchZoom,
|
|
21164
21169
|
lockRef: ref,
|
|
21165
21170
|
gapMode
|
|
21166
|
-
}), forwardProps ? React
|
|
21171
|
+
}), forwardProps ? React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React.createElement(Container, __assign({}, containerProps, {
|
|
21167
21172
|
className,
|
|
21168
21173
|
ref: containerRef
|
|
21169
21174
|
}), children));
|
|
@@ -21237,7 +21242,7 @@ var stylesheetSingleton = function() {
|
|
|
21237
21242
|
var styleHookSingleton = function() {
|
|
21238
21243
|
var sheet = stylesheetSingleton();
|
|
21239
21244
|
return function(styles, isDynamic) {
|
|
21240
|
-
React
|
|
21245
|
+
React.useEffect(function() {
|
|
21241
21246
|
sheet.add(styles);
|
|
21242
21247
|
return function() {
|
|
21243
21248
|
sheet.remove();
|
|
@@ -21315,7 +21320,7 @@ var getCurrentUseCounter = function() {
|
|
|
21315
21320
|
return isFinite(counter) ? counter : 0;
|
|
21316
21321
|
};
|
|
21317
21322
|
var useLockAttribute = function() {
|
|
21318
|
-
React
|
|
21323
|
+
React.useEffect(function() {
|
|
21319
21324
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
21320
21325
|
return function() {
|
|
21321
21326
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -21330,10 +21335,10 @@ var useLockAttribute = function() {
|
|
|
21330
21335
|
var RemoveScrollBar = function(_a) {
|
|
21331
21336
|
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
21332
21337
|
useLockAttribute();
|
|
21333
|
-
var gap = React
|
|
21338
|
+
var gap = React.useMemo(function() {
|
|
21334
21339
|
return getGapWidth(gapMode);
|
|
21335
21340
|
}, [gapMode]);
|
|
21336
|
-
return React
|
|
21341
|
+
return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
21337
21342
|
};
|
|
21338
21343
|
//#endregion
|
|
21339
21344
|
//#region ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -21453,16 +21458,16 @@ var generateStyle$1 = function(id) {
|
|
|
21453
21458
|
var idCounter$2 = 0;
|
|
21454
21459
|
var lockStack$1 = [];
|
|
21455
21460
|
function RemoveScrollSideCar$1(props) {
|
|
21456
|
-
var shouldPreventQueue = React
|
|
21457
|
-
var touchStartRef = React
|
|
21458
|
-
var activeAxis = React
|
|
21459
|
-
var id = React
|
|
21460
|
-
var Style = React
|
|
21461
|
-
var lastProps = React
|
|
21462
|
-
React
|
|
21461
|
+
var shouldPreventQueue = React.useRef([]);
|
|
21462
|
+
var touchStartRef = React.useRef([0, 0]);
|
|
21463
|
+
var activeAxis = React.useRef();
|
|
21464
|
+
var id = React.useState(idCounter$2++)[0];
|
|
21465
|
+
var Style = React.useState(styleSingleton)[0];
|
|
21466
|
+
var lastProps = React.useRef(props);
|
|
21467
|
+
React.useEffect(function() {
|
|
21463
21468
|
lastProps.current = props;
|
|
21464
21469
|
}, [props]);
|
|
21465
|
-
React
|
|
21470
|
+
React.useEffect(function() {
|
|
21466
21471
|
if (props.inert) {
|
|
21467
21472
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
21468
21473
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef$1), true).filter(Boolean);
|
|
@@ -21481,7 +21486,7 @@ function RemoveScrollSideCar$1(props) {
|
|
|
21481
21486
|
props.lockRef.current,
|
|
21482
21487
|
props.shards
|
|
21483
21488
|
]);
|
|
21484
|
-
var shouldCancelEvent = React
|
|
21489
|
+
var shouldCancelEvent = React.useCallback(function(event, parent) {
|
|
21485
21490
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) return !lastProps.current.allowPinchZoom;
|
|
21486
21491
|
var touch = getTouchXY$1(event);
|
|
21487
21492
|
var touchStart = touchStartRef.current;
|
|
@@ -21504,7 +21509,7 @@ function RemoveScrollSideCar$1(props) {
|
|
|
21504
21509
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
21505
21510
|
return handleScroll$1(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
21506
21511
|
}, []);
|
|
21507
|
-
var shouldPrevent = React
|
|
21512
|
+
var shouldPrevent = React.useCallback(function(_event) {
|
|
21508
21513
|
var event = _event;
|
|
21509
21514
|
if (!lockStack$1.length || lockStack$1[lockStack$1.length - 1] !== Style) return;
|
|
21510
21515
|
var delta = "deltaY" in event ? getDeltaXY$1(event) : getTouchXY$1(event);
|
|
@@ -21524,7 +21529,7 @@ function RemoveScrollSideCar$1(props) {
|
|
|
21524
21529
|
}
|
|
21525
21530
|
}
|
|
21526
21531
|
}, []);
|
|
21527
|
-
var shouldCancel = React
|
|
21532
|
+
var shouldCancel = React.useCallback(function(name, delta, target, should) {
|
|
21528
21533
|
var event = {
|
|
21529
21534
|
name,
|
|
21530
21535
|
delta,
|
|
@@ -21539,17 +21544,17 @@ function RemoveScrollSideCar$1(props) {
|
|
|
21539
21544
|
});
|
|
21540
21545
|
}, 1);
|
|
21541
21546
|
}, []);
|
|
21542
|
-
var scrollTouchStart = React
|
|
21547
|
+
var scrollTouchStart = React.useCallback(function(event) {
|
|
21543
21548
|
touchStartRef.current = getTouchXY$1(event);
|
|
21544
21549
|
activeAxis.current = void 0;
|
|
21545
21550
|
}, []);
|
|
21546
|
-
var scrollWheel = React
|
|
21551
|
+
var scrollWheel = React.useCallback(function(event) {
|
|
21547
21552
|
shouldCancel(event.type, getDeltaXY$1(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
21548
21553
|
}, []);
|
|
21549
|
-
var scrollTouchMove = React
|
|
21554
|
+
var scrollTouchMove = React.useCallback(function(event) {
|
|
21550
21555
|
shouldCancel(event.type, getTouchXY$1(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
21551
21556
|
}, []);
|
|
21552
|
-
React
|
|
21557
|
+
React.useEffect(function() {
|
|
21553
21558
|
lockStack$1.push(Style);
|
|
21554
21559
|
props.setCallbacks({
|
|
21555
21560
|
onScrollCapture: scrollWheel,
|
|
@@ -21569,7 +21574,7 @@ function RemoveScrollSideCar$1(props) {
|
|
|
21569
21574
|
};
|
|
21570
21575
|
}, []);
|
|
21571
21576
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
21572
|
-
return React
|
|
21577
|
+
return React.createElement(React.Fragment, null, inert ? React.createElement(Style, { styles: generateStyle$1(id) }) : null, removeScrollBar ? React.createElement(RemoveScrollBar, {
|
|
21573
21578
|
noRelative: props.noRelative,
|
|
21574
21579
|
gapMode: props.gapMode
|
|
21575
21580
|
}) : null);
|
|
@@ -21591,8 +21596,8 @@ var sidecar_default$1 = exportSidecar(effectCar$1, RemoveScrollSideCar$1);
|
|
|
21591
21596
|
//#endregion
|
|
21592
21597
|
//#region ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
21593
21598
|
init_tslib_es6();
|
|
21594
|
-
var ReactRemoveScroll$1 = React
|
|
21595
|
-
return React
|
|
21599
|
+
var ReactRemoveScroll$1 = React.forwardRef(function(props, ref) {
|
|
21600
|
+
return React.createElement(RemoveScroll$1, __assign({}, props, {
|
|
21596
21601
|
ref,
|
|
21597
21602
|
sideCar: sidecar_default$1
|
|
21598
21603
|
}));
|
|
@@ -21711,8 +21716,8 @@ var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
|
21711
21716
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
21712
21717
|
var Dialog$1 = (props) => {
|
|
21713
21718
|
const { __scopeDialog, children, open: openProp, defaultOpen, onOpenChange, modal = true } = props;
|
|
21714
|
-
const triggerRef = React
|
|
21715
|
-
const contentRef = React
|
|
21719
|
+
const triggerRef = React.useRef(null);
|
|
21720
|
+
const contentRef = React.useRef(null);
|
|
21716
21721
|
const [open, setOpen] = useControllableState({
|
|
21717
21722
|
prop: openProp,
|
|
21718
21723
|
defaultProp: defaultOpen ?? false,
|
|
@@ -21728,14 +21733,14 @@ var Dialog$1 = (props) => {
|
|
|
21728
21733
|
descriptionId: useId$1(),
|
|
21729
21734
|
open,
|
|
21730
21735
|
onOpenChange: setOpen,
|
|
21731
|
-
onOpenToggle: React
|
|
21736
|
+
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
21732
21737
|
modal,
|
|
21733
21738
|
children
|
|
21734
21739
|
});
|
|
21735
21740
|
};
|
|
21736
21741
|
Dialog$1.displayName = DIALOG_NAME;
|
|
21737
21742
|
var TRIGGER_NAME$2 = "DialogTrigger";
|
|
21738
|
-
var DialogTrigger = React
|
|
21743
|
+
var DialogTrigger = React.forwardRef((props, forwardedRef) => {
|
|
21739
21744
|
const { __scopeDialog, ...triggerProps } = props;
|
|
21740
21745
|
const context = useDialogContext(TRIGGER_NAME$2, __scopeDialog);
|
|
21741
21746
|
const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
|
|
@@ -21759,7 +21764,7 @@ var DialogPortal = (props) => {
|
|
|
21759
21764
|
return /* @__PURE__ */ jsx(PortalProvider$2, {
|
|
21760
21765
|
scope: __scopeDialog,
|
|
21761
21766
|
forceMount,
|
|
21762
|
-
children: React
|
|
21767
|
+
children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, {
|
|
21763
21768
|
present: forceMount || context.open,
|
|
21764
21769
|
children: /* @__PURE__ */ jsx(Portal$3, {
|
|
21765
21770
|
asChild: true,
|
|
@@ -21771,7 +21776,7 @@ var DialogPortal = (props) => {
|
|
|
21771
21776
|
};
|
|
21772
21777
|
DialogPortal.displayName = PORTAL_NAME$3;
|
|
21773
21778
|
var OVERLAY_NAME = "DialogOverlay";
|
|
21774
|
-
var DialogOverlay = React
|
|
21779
|
+
var DialogOverlay = React.forwardRef((props, forwardedRef) => {
|
|
21775
21780
|
const portalContext = usePortalContext$2(OVERLAY_NAME, props.__scopeDialog);
|
|
21776
21781
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
21777
21782
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
@@ -21785,7 +21790,7 @@ var DialogOverlay = React$4.forwardRef((props, forwardedRef) => {
|
|
|
21785
21790
|
});
|
|
21786
21791
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
21787
21792
|
var Slot$1 = /* @__PURE__ */ createSlot$1("DialogOverlay.RemoveScroll");
|
|
21788
|
-
var DialogOverlayImpl = React
|
|
21793
|
+
var DialogOverlayImpl = React.forwardRef((props, forwardedRef) => {
|
|
21789
21794
|
const { __scopeDialog, ...overlayProps } = props;
|
|
21790
21795
|
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
21791
21796
|
return /* @__PURE__ */ jsx(ReactRemoveScroll$1, {
|
|
@@ -21804,7 +21809,7 @@ var DialogOverlayImpl = React$4.forwardRef((props, forwardedRef) => {
|
|
|
21804
21809
|
});
|
|
21805
21810
|
});
|
|
21806
21811
|
var CONTENT_NAME$4 = "DialogContent";
|
|
21807
|
-
var DialogContent$1 = React
|
|
21812
|
+
var DialogContent$1 = React.forwardRef((props, forwardedRef) => {
|
|
21808
21813
|
const portalContext = usePortalContext$2(CONTENT_NAME$4, props.__scopeDialog);
|
|
21809
21814
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
21810
21815
|
const context = useDialogContext(CONTENT_NAME$4, props.__scopeDialog);
|
|
@@ -21820,11 +21825,11 @@ var DialogContent$1 = React$4.forwardRef((props, forwardedRef) => {
|
|
|
21820
21825
|
});
|
|
21821
21826
|
});
|
|
21822
21827
|
DialogContent$1.displayName = CONTENT_NAME$4;
|
|
21823
|
-
var DialogContentModal = React
|
|
21828
|
+
var DialogContentModal = React.forwardRef((props, forwardedRef) => {
|
|
21824
21829
|
const context = useDialogContext(CONTENT_NAME$4, props.__scopeDialog);
|
|
21825
|
-
const contentRef = React
|
|
21830
|
+
const contentRef = React.useRef(null);
|
|
21826
21831
|
const composedRefs = useComposedRefs$1(forwardedRef, context.contentRef, contentRef);
|
|
21827
|
-
React
|
|
21832
|
+
React.useEffect(() => {
|
|
21828
21833
|
const content = contentRef.current;
|
|
21829
21834
|
if (content) return hideOthers(content);
|
|
21830
21835
|
}, []);
|
|
@@ -21845,10 +21850,10 @@ var DialogContentModal = React$4.forwardRef((props, forwardedRef) => {
|
|
|
21845
21850
|
onFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => event.preventDefault())
|
|
21846
21851
|
});
|
|
21847
21852
|
});
|
|
21848
|
-
var DialogContentNonModal = React
|
|
21853
|
+
var DialogContentNonModal = React.forwardRef((props, forwardedRef) => {
|
|
21849
21854
|
const context = useDialogContext(CONTENT_NAME$4, props.__scopeDialog);
|
|
21850
|
-
const hasInteractedOutsideRef = React
|
|
21851
|
-
const hasPointerDownOutsideRef = React
|
|
21855
|
+
const hasInteractedOutsideRef = React.useRef(false);
|
|
21856
|
+
const hasPointerDownOutsideRef = React.useRef(false);
|
|
21852
21857
|
return /* @__PURE__ */ jsx(DialogContentImpl, {
|
|
21853
21858
|
...props,
|
|
21854
21859
|
ref: forwardedRef,
|
|
@@ -21875,10 +21880,10 @@ var DialogContentNonModal = React$4.forwardRef((props, forwardedRef) => {
|
|
|
21875
21880
|
}
|
|
21876
21881
|
});
|
|
21877
21882
|
});
|
|
21878
|
-
var DialogContentImpl = React
|
|
21883
|
+
var DialogContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
21879
21884
|
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
|
21880
21885
|
const context = useDialogContext(CONTENT_NAME$4, __scopeDialog);
|
|
21881
|
-
const contentRef = React
|
|
21886
|
+
const contentRef = React.useRef(null);
|
|
21882
21887
|
const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
|
|
21883
21888
|
useFocusGuards();
|
|
21884
21889
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FocusScope, {
|
|
@@ -21903,7 +21908,7 @@ var DialogContentImpl = React$4.forwardRef((props, forwardedRef) => {
|
|
|
21903
21908
|
})] })] });
|
|
21904
21909
|
});
|
|
21905
21910
|
var TITLE_NAME = "DialogTitle";
|
|
21906
|
-
var DialogTitle = React
|
|
21911
|
+
var DialogTitle = React.forwardRef((props, forwardedRef) => {
|
|
21907
21912
|
const { __scopeDialog, ...titleProps } = props;
|
|
21908
21913
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
21909
21914
|
return /* @__PURE__ */ jsx(Primitive$1.h2, {
|
|
@@ -21914,7 +21919,7 @@ var DialogTitle = React$4.forwardRef((props, forwardedRef) => {
|
|
|
21914
21919
|
});
|
|
21915
21920
|
DialogTitle.displayName = TITLE_NAME;
|
|
21916
21921
|
var DESCRIPTION_NAME = "DialogDescription";
|
|
21917
|
-
var DialogDescription = React
|
|
21922
|
+
var DialogDescription = React.forwardRef((props, forwardedRef) => {
|
|
21918
21923
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
21919
21924
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
21920
21925
|
return /* @__PURE__ */ jsx(Primitive$1.p, {
|
|
@@ -21925,7 +21930,7 @@ var DialogDescription = React$4.forwardRef((props, forwardedRef) => {
|
|
|
21925
21930
|
});
|
|
21926
21931
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
21927
21932
|
var CLOSE_NAME = "DialogClose";
|
|
21928
|
-
var DialogClose = React
|
|
21933
|
+
var DialogClose = React.forwardRef((props, forwardedRef) => {
|
|
21929
21934
|
const { __scopeDialog, ...closeProps } = props;
|
|
21930
21935
|
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
21931
21936
|
return /* @__PURE__ */ jsx(Primitive$1.button, {
|
|
@@ -21952,7 +21957,7 @@ var TitleWarning = ({ titleId }) => {
|
|
|
21952
21957
|
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
21953
21958
|
|
|
21954
21959
|
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
21955
|
-
React
|
|
21960
|
+
React.useEffect(() => {
|
|
21956
21961
|
if (titleId) {
|
|
21957
21962
|
if (!document.getElementById(titleId)) console.error(MESSAGE);
|
|
21958
21963
|
}
|
|
@@ -21962,7 +21967,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${titl
|
|
|
21962
21967
|
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
21963
21968
|
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
21964
21969
|
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;
|
|
21965
|
-
React
|
|
21970
|
+
React.useEffect(() => {
|
|
21966
21971
|
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
|
21967
21972
|
if (descriptionId && describedById) {
|
|
21968
21973
|
if (!document.getElementById(descriptionId)) console.warn(MESSAGE);
|
|
@@ -22457,7 +22462,7 @@ var HelpIcon = () => {
|
|
|
22457
22462
|
//#endregion
|
|
22458
22463
|
//#region ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
22459
22464
|
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
22460
|
-
var use = React
|
|
22465
|
+
var use = React[" use ".trim().toString()];
|
|
22461
22466
|
function isPromiseLike(value) {
|
|
22462
22467
|
return typeof value === "object" && value !== null && "then" in value;
|
|
22463
22468
|
}
|
|
@@ -22467,23 +22472,23 @@ function isLazyComponent(element) {
|
|
|
22467
22472
|
/* @__NO_SIDE_EFFECTS__ */
|
|
22468
22473
|
function createSlot(ownerName) {
|
|
22469
22474
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
22470
|
-
const Slot2 = React
|
|
22475
|
+
const Slot2 = React.forwardRef((props, forwardedRef) => {
|
|
22471
22476
|
let { children, ...slotProps } = props;
|
|
22472
22477
|
if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
|
|
22473
|
-
const childrenArray = React
|
|
22478
|
+
const childrenArray = React.Children.toArray(children);
|
|
22474
22479
|
const slottable = childrenArray.find(isSlottable);
|
|
22475
22480
|
if (slottable) {
|
|
22476
22481
|
const newElement = slottable.props.children;
|
|
22477
22482
|
const newChildren = childrenArray.map((child) => {
|
|
22478
22483
|
if (child === slottable) {
|
|
22479
|
-
if (React
|
|
22480
|
-
return React
|
|
22484
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
22485
|
+
return React.isValidElement(newElement) ? newElement.props.children : null;
|
|
22481
22486
|
} else return child;
|
|
22482
22487
|
});
|
|
22483
22488
|
return /* @__PURE__ */ jsx(SlotClone, {
|
|
22484
22489
|
...slotProps,
|
|
22485
22490
|
ref: forwardedRef,
|
|
22486
|
-
children: React
|
|
22491
|
+
children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null
|
|
22487
22492
|
});
|
|
22488
22493
|
}
|
|
22489
22494
|
return /* @__PURE__ */ jsx(SlotClone, {
|
|
@@ -22497,23 +22502,23 @@ function createSlot(ownerName) {
|
|
|
22497
22502
|
}
|
|
22498
22503
|
/* @__NO_SIDE_EFFECTS__ */
|
|
22499
22504
|
function createSlotClone(ownerName) {
|
|
22500
|
-
const SlotClone = React
|
|
22505
|
+
const SlotClone = React.forwardRef((props, forwardedRef) => {
|
|
22501
22506
|
let { children, ...slotProps } = props;
|
|
22502
22507
|
if (isLazyComponent(children) && typeof use === "function") children = use(children._payload);
|
|
22503
|
-
if (React
|
|
22508
|
+
if (React.isValidElement(children)) {
|
|
22504
22509
|
const childrenRef = getElementRef(children);
|
|
22505
22510
|
const props2 = mergeProps(slotProps, children.props);
|
|
22506
|
-
if (children.type !== React
|
|
22507
|
-
return React
|
|
22511
|
+
if (children.type !== React.Fragment) props2.ref = forwardedRef ? composeRefs$1(forwardedRef, childrenRef) : childrenRef;
|
|
22512
|
+
return React.cloneElement(children, props2);
|
|
22508
22513
|
}
|
|
22509
|
-
return React
|
|
22514
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
22510
22515
|
});
|
|
22511
22516
|
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
22512
22517
|
return SlotClone;
|
|
22513
22518
|
}
|
|
22514
22519
|
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
22515
22520
|
function isSlottable(child) {
|
|
22516
|
-
return React
|
|
22521
|
+
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
22517
22522
|
}
|
|
22518
22523
|
function mergeProps(slotProps, childProps) {
|
|
22519
22524
|
const overrideProps = { ...childProps };
|
|
@@ -22569,7 +22574,7 @@ var Primitive = [
|
|
|
22569
22574
|
"ul"
|
|
22570
22575
|
].reduce((primitive, node) => {
|
|
22571
22576
|
const Slot = /* @__PURE__ */ createSlot(`Primitive.${node}`);
|
|
22572
|
-
const Node = React
|
|
22577
|
+
const Node = React.forwardRef((props, forwardedRef) => {
|
|
22573
22578
|
const { asChild, ...primitiveProps } = props;
|
|
22574
22579
|
const Comp = asChild ? Slot : node;
|
|
22575
22580
|
if (typeof window !== "undefined") window[Symbol.for("radix-ui")] = true;
|
|
@@ -22599,7 +22604,7 @@ var VISUALLY_HIDDEN_STYLES$1 = Object.freeze({
|
|
|
22599
22604
|
wordWrap: "normal"
|
|
22600
22605
|
});
|
|
22601
22606
|
var NAME$2 = "VisuallyHidden";
|
|
22602
|
-
var VisuallyHidden$1 = React
|
|
22607
|
+
var VisuallyHidden$1 = React.forwardRef((props, forwardedRef) => {
|
|
22603
22608
|
return /* @__PURE__ */ jsx(Primitive.span, {
|
|
22604
22609
|
...props,
|
|
22605
22610
|
ref: forwardedRef,
|
|
@@ -43283,11 +43288,11 @@ function watchChains(config, parameters) {
|
|
|
43283
43288
|
* LICENSE file in the root directory of this source tree.
|
|
43284
43289
|
*/
|
|
43285
43290
|
var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
43286
|
-
var React
|
|
43291
|
+
var React = require_builtin_esm_external_require_react();
|
|
43287
43292
|
function is(x, y) {
|
|
43288
43293
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
43289
43294
|
}
|
|
43290
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React
|
|
43295
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
|
|
43291
43296
|
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
43292
43297
|
var value = getSnapshot(), _useState = useState({ inst: {
|
|
43293
43298
|
value,
|
|
@@ -43325,7 +43330,7 @@ var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJS
|
|
|
43325
43330
|
return getSnapshot();
|
|
43326
43331
|
}
|
|
43327
43332
|
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
43328
|
-
exports.useSyncExternalStore = void 0 !== React
|
|
43333
|
+
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
43329
43334
|
}));
|
|
43330
43335
|
//#endregion
|
|
43331
43336
|
//#region ../../node_modules/.pnpm/use-sync-external-store@1.4.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
|
|
@@ -43388,7 +43393,7 @@ var require_use_sync_external_store_shim_development = /* @__PURE__ */ __commonJ
|
|
|
43388
43393
|
return getSnapshot();
|
|
43389
43394
|
}
|
|
43390
43395
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
43391
|
-
var React =
|
|
43396
|
+
var React = require_builtin_esm_external_require_react(), objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
43392
43397
|
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
43393
43398
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
43394
43399
|
})();
|
|
@@ -43412,11 +43417,11 @@ var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
43412
43417
|
* LICENSE file in the root directory of this source tree.
|
|
43413
43418
|
*/
|
|
43414
43419
|
var require_with_selector_production$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
43415
|
-
var React
|
|
43420
|
+
var React = require_builtin_esm_external_require_react(), shim = require_shim();
|
|
43416
43421
|
function is(x, y) {
|
|
43417
43422
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
43418
43423
|
}
|
|
43419
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim
|
|
43424
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue;
|
|
43420
43425
|
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
43421
43426
|
var instRef = useRef(null);
|
|
43422
43427
|
if (null === instRef.current) {
|
|
@@ -43484,7 +43489,7 @@ var require_with_selector_development$1 = /* @__PURE__ */ __commonJSMin(((export
|
|
|
43484
43489
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
43485
43490
|
}
|
|
43486
43491
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
43487
|
-
var React =
|
|
43492
|
+
var React = require_builtin_esm_external_require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue;
|
|
43488
43493
|
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
43489
43494
|
var instRef = useRef(null);
|
|
43490
43495
|
if (null === instRef.current) {
|
|
@@ -51893,9 +51898,9 @@ var nothing = function() {};
|
|
|
51893
51898
|
/**
|
|
51894
51899
|
* Removes scrollbar from the page and contain the scroll within the Lock
|
|
51895
51900
|
*/
|
|
51896
|
-
var RemoveScroll = React
|
|
51897
|
-
var ref = React
|
|
51898
|
-
var _a = React
|
|
51901
|
+
var RemoveScroll = React.forwardRef(function(props, parentRef) {
|
|
51902
|
+
var ref = React.useRef(null);
|
|
51903
|
+
var _a = React.useState({
|
|
51899
51904
|
onScrollCapture: nothing,
|
|
51900
51905
|
onWheelCapture: nothing,
|
|
51901
51906
|
onTouchMoveCapture: nothing
|
|
@@ -51917,7 +51922,7 @@ var RemoveScroll = React$4.forwardRef(function(props, parentRef) {
|
|
|
51917
51922
|
var SideCar = sideCar;
|
|
51918
51923
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
51919
51924
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
51920
|
-
return React
|
|
51925
|
+
return React.createElement(React.Fragment, null, enabled && React.createElement(SideCar, {
|
|
51921
51926
|
sideCar: effectCar,
|
|
51922
51927
|
removeScrollBar,
|
|
51923
51928
|
shards,
|
|
@@ -51927,7 +51932,7 @@ var RemoveScroll = React$4.forwardRef(function(props, parentRef) {
|
|
|
51927
51932
|
allowPinchZoom: !!allowPinchZoom,
|
|
51928
51933
|
lockRef: ref,
|
|
51929
51934
|
gapMode
|
|
51930
|
-
}), forwardProps ? React
|
|
51935
|
+
}), forwardProps ? React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React.createElement(Container, __assign({}, containerProps, {
|
|
51931
51936
|
className,
|
|
51932
51937
|
ref: containerRef
|
|
51933
51938
|
}), children));
|
|
@@ -52058,16 +52063,16 @@ var generateStyle = function(id) {
|
|
|
52058
52063
|
var idCounter$1 = 0;
|
|
52059
52064
|
var lockStack = [];
|
|
52060
52065
|
function RemoveScrollSideCar(props) {
|
|
52061
|
-
var shouldPreventQueue = React
|
|
52062
|
-
var touchStartRef = React
|
|
52063
|
-
var activeAxis = React
|
|
52064
|
-
var id = React
|
|
52065
|
-
var Style = React
|
|
52066
|
-
var lastProps = React
|
|
52067
|
-
React
|
|
52066
|
+
var shouldPreventQueue = React.useRef([]);
|
|
52067
|
+
var touchStartRef = React.useRef([0, 0]);
|
|
52068
|
+
var activeAxis = React.useRef();
|
|
52069
|
+
var id = React.useState(idCounter$1++)[0];
|
|
52070
|
+
var Style = React.useState(styleSingleton)[0];
|
|
52071
|
+
var lastProps = React.useRef(props);
|
|
52072
|
+
React.useEffect(function() {
|
|
52068
52073
|
lastProps.current = props;
|
|
52069
52074
|
}, [props]);
|
|
52070
|
-
React
|
|
52075
|
+
React.useEffect(function() {
|
|
52071
52076
|
if (props.inert) {
|
|
52072
52077
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
52073
52078
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -52086,7 +52091,7 @@ function RemoveScrollSideCar(props) {
|
|
|
52086
52091
|
props.lockRef.current,
|
|
52087
52092
|
props.shards
|
|
52088
52093
|
]);
|
|
52089
|
-
var shouldCancelEvent = React
|
|
52094
|
+
var shouldCancelEvent = React.useCallback(function(event, parent) {
|
|
52090
52095
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) return !lastProps.current.allowPinchZoom;
|
|
52091
52096
|
var touch = getTouchXY(event);
|
|
52092
52097
|
var touchStart = touchStartRef.current;
|
|
@@ -52109,7 +52114,7 @@ function RemoveScrollSideCar(props) {
|
|
|
52109
52114
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
52110
52115
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
52111
52116
|
}, []);
|
|
52112
|
-
var shouldPrevent = React
|
|
52117
|
+
var shouldPrevent = React.useCallback(function(_event) {
|
|
52113
52118
|
var event = _event;
|
|
52114
52119
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) return;
|
|
52115
52120
|
var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
|
|
@@ -52129,7 +52134,7 @@ function RemoveScrollSideCar(props) {
|
|
|
52129
52134
|
}
|
|
52130
52135
|
}
|
|
52131
52136
|
}, []);
|
|
52132
|
-
var shouldCancel = React
|
|
52137
|
+
var shouldCancel = React.useCallback(function(name, delta, target, should) {
|
|
52133
52138
|
var event = {
|
|
52134
52139
|
name,
|
|
52135
52140
|
delta,
|
|
@@ -52144,17 +52149,17 @@ function RemoveScrollSideCar(props) {
|
|
|
52144
52149
|
});
|
|
52145
52150
|
}, 1);
|
|
52146
52151
|
}, []);
|
|
52147
|
-
var scrollTouchStart = React
|
|
52152
|
+
var scrollTouchStart = React.useCallback(function(event) {
|
|
52148
52153
|
touchStartRef.current = getTouchXY(event);
|
|
52149
52154
|
activeAxis.current = void 0;
|
|
52150
52155
|
}, []);
|
|
52151
|
-
var scrollWheel = React
|
|
52156
|
+
var scrollWheel = React.useCallback(function(event) {
|
|
52152
52157
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
52153
52158
|
}, []);
|
|
52154
|
-
var scrollTouchMove = React
|
|
52159
|
+
var scrollTouchMove = React.useCallback(function(event) {
|
|
52155
52160
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
52156
52161
|
}, []);
|
|
52157
|
-
React
|
|
52162
|
+
React.useEffect(function() {
|
|
52158
52163
|
lockStack.push(Style);
|
|
52159
52164
|
props.setCallbacks({
|
|
52160
52165
|
onScrollCapture: scrollWheel,
|
|
@@ -52174,7 +52179,7 @@ function RemoveScrollSideCar(props) {
|
|
|
52174
52179
|
};
|
|
52175
52180
|
}, []);
|
|
52176
52181
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
52177
|
-
return React
|
|
52182
|
+
return React.createElement(React.Fragment, null, inert ? React.createElement(Style, { styles: generateStyle(id) }) : null, removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode: props.gapMode }) : null);
|
|
52178
52183
|
}
|
|
52179
52184
|
function getOutermostShadowParent(node) {
|
|
52180
52185
|
var shadowParent = null;
|
|
@@ -52193,8 +52198,8 @@ var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
|
52193
52198
|
//#endregion
|
|
52194
52199
|
//#region ../../node_modules/.pnpm/react-remove-scroll@2.6.2_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
52195
52200
|
init_tslib_es6();
|
|
52196
|
-
var ReactRemoveScroll = React
|
|
52197
|
-
return React
|
|
52201
|
+
var ReactRemoveScroll = React.forwardRef(function(props, ref) {
|
|
52202
|
+
return React.createElement(RemoveScroll, __assign({}, props, {
|
|
52198
52203
|
ref,
|
|
52199
52204
|
sideCar: sidecar_default
|
|
52200
52205
|
}));
|
|
@@ -53638,7 +53643,7 @@ function Cuer(props) {
|
|
|
53638
53643
|
});
|
|
53639
53644
|
}
|
|
53640
53645
|
(function(Cuer) {
|
|
53641
|
-
Cuer.Context = React
|
|
53646
|
+
Cuer.Context = React.createContext(null);
|
|
53642
53647
|
/**
|
|
53643
53648
|
* Root component for the QR code.
|
|
53644
53649
|
*
|
|
@@ -53647,13 +53652,13 @@ function Cuer(props) {
|
|
|
53647
53652
|
*/
|
|
53648
53653
|
function Root(props) {
|
|
53649
53654
|
const { children, size = "100%", value, version, errorCorrection, ...rest } = props;
|
|
53650
|
-
const hasArena = React
|
|
53651
|
-
if (!React
|
|
53655
|
+
const hasArena = React.useMemo(() => (React.Children.map(children, (child) => {
|
|
53656
|
+
if (!React.isValidElement(child)) return null;
|
|
53652
53657
|
if (typeof child.type === "string") return null;
|
|
53653
53658
|
if ("displayName" in child.type && child.type.displayName === "Arena") return true;
|
|
53654
53659
|
return null;
|
|
53655
53660
|
}) ?? []).some(Boolean), [children]);
|
|
53656
|
-
const qrcode = React
|
|
53661
|
+
const qrcode = React.useMemo(() => {
|
|
53657
53662
|
let ecl = errorCorrection;
|
|
53658
53663
|
if (hasArena && errorCorrection === "low") ecl = "medium";
|
|
53659
53664
|
return create(value, {
|
|
@@ -53670,7 +53675,7 @@ function Cuer(props) {
|
|
|
53670
53675
|
const edgeSize = qrcode.edgeLength * cellSize;
|
|
53671
53676
|
const finderSize = qrcode.finderLength * cellSize / 2;
|
|
53672
53677
|
const arenaSize = hasArena ? Math.floor(edgeSize / 4) : 0;
|
|
53673
|
-
const context = React
|
|
53678
|
+
const context = React.useMemo(() => ({
|
|
53674
53679
|
arenaSize,
|
|
53675
53680
|
cellSize,
|
|
53676
53681
|
edgeSize,
|
|
@@ -53707,7 +53712,7 @@ function Cuer(props) {
|
|
|
53707
53712
|
*/
|
|
53708
53713
|
function Finder(props) {
|
|
53709
53714
|
const { className, fill, innerClassName, radius = .25 } = props;
|
|
53710
|
-
const { cellSize, edgeSize, finderSize } = React
|
|
53715
|
+
const { cellSize, edgeSize, finderSize } = React.useContext(Cuer.Context);
|
|
53711
53716
|
function Inner({ position }) {
|
|
53712
53717
|
let outerX = finderSize - (finderSize - cellSize) - cellSize / 2;
|
|
53713
53718
|
if (position === "top-right") outerX = edgeSize - finderSize - (finderSize - cellSize) - cellSize / 2;
|
|
@@ -53757,11 +53762,11 @@ function Cuer(props) {
|
|
|
53757
53762
|
*/
|
|
53758
53763
|
function Cells(props) {
|
|
53759
53764
|
const { className, fill = "currentColor", inset: inset_ = true, radius = 1 } = props;
|
|
53760
|
-
const { arenaSize, cellSize, qrcode } = React
|
|
53765
|
+
const { arenaSize, cellSize, qrcode } = React.useContext(Cuer.Context);
|
|
53761
53766
|
const { edgeLength, finderLength } = qrcode;
|
|
53762
53767
|
return jsx("path", {
|
|
53763
53768
|
className,
|
|
53764
|
-
d: React
|
|
53769
|
+
d: React.useMemo(() => {
|
|
53765
53770
|
let path = "";
|
|
53766
53771
|
for (let i = 0; i < qrcode.grid.length; i++) {
|
|
53767
53772
|
const row = qrcode.grid[i];
|
|
@@ -53823,7 +53828,7 @@ function Cuer(props) {
|
|
|
53823
53828
|
*/
|
|
53824
53829
|
function Arena(props) {
|
|
53825
53830
|
const { children } = props;
|
|
53826
|
-
const { arenaSize, cellSize, edgeSize } = React
|
|
53831
|
+
const { arenaSize, cellSize, edgeSize } = React.useContext(Cuer.Context);
|
|
53827
53832
|
const start = Math.ceil(edgeSize / 2 - arenaSize / 2);
|
|
53828
53833
|
const size = arenaSize + arenaSize % 2;
|
|
53829
53834
|
return jsx("foreignObject", {
|
|
@@ -65397,6 +65402,7 @@ var YieldApiError = (tag, cause, response) => new YieldApiErrorImpl({
|
|
|
65397
65402
|
});
|
|
65398
65403
|
//#endregion
|
|
65399
65404
|
//#region src/providers/api/api-client.ts
|
|
65405
|
+
var runtime = make$6(layer);
|
|
65400
65406
|
var inspectResponse = ({ response }) => gen(function* () {
|
|
65401
65407
|
yield* promise(waitForDelayedApiRequests);
|
|
65402
65408
|
if (response.status < 400) return;
|
|
@@ -65411,45 +65417,42 @@ var inspectResponse = ({ response }) => gen(function* () {
|
|
|
65411
65417
|
});
|
|
65412
65418
|
});
|
|
65413
65419
|
var configureClient = ({ apiKey, baseUrl, client }) => client.pipe(mapRequest(flow(prependUrl(baseUrl), setHeader("X-API-KEY", apiKey), acceptJson)), retryTransient({ times: 3 }), tap((response) => inspectResponse({ response })));
|
|
65414
|
-
var bindOperation = (
|
|
65415
|
-
var bindLegacyApi = ({ api, runOptions
|
|
65416
|
-
TokenControllerGetTokenBalances: bindOperation(
|
|
65417
|
-
TokenControllerGetTokenPrices: bindOperation(
|
|
65418
|
-
TokenControllerGetTokens: bindOperation(
|
|
65419
|
-
TokenControllerTokenBalancesScan: bindOperation(
|
|
65420
|
-
TransactionControllerGetTransactionVerificationMessageForNetwork: bindOperation(
|
|
65421
|
-
YieldControllerGetSingleYieldRewardsSummary: bindOperation(
|
|
65422
|
-
YieldControllerYieldOpportunity: bindOperation(
|
|
65420
|
+
var bindOperation = (operation, runOptions) => ((...args) => runtime.runPromise(operation(...args), runOptions));
|
|
65421
|
+
var bindLegacyApi = ({ api, runOptions }) => ({
|
|
65422
|
+
TokenControllerGetTokenBalances: bindOperation(api.TokenControllerGetTokenBalances, runOptions),
|
|
65423
|
+
TokenControllerGetTokenPrices: bindOperation(api.TokenControllerGetTokenPrices, runOptions),
|
|
65424
|
+
TokenControllerGetTokens: bindOperation(api.TokenControllerGetTokens, runOptions),
|
|
65425
|
+
TokenControllerTokenBalancesScan: bindOperation(api.TokenControllerTokenBalancesScan, runOptions),
|
|
65426
|
+
TransactionControllerGetTransactionVerificationMessageForNetwork: bindOperation(api.TransactionControllerGetTransactionVerificationMessageForNetwork, runOptions),
|
|
65427
|
+
YieldControllerGetSingleYieldRewardsSummary: bindOperation(api.YieldControllerGetSingleYieldRewardsSummary, runOptions),
|
|
65428
|
+
YieldControllerYieldOpportunity: bindOperation(api.YieldControllerYieldOpportunity, runOptions)
|
|
65423
65429
|
});
|
|
65424
|
-
var bindYieldApi = ({ api, runOptions
|
|
65425
|
-
ActionsControllerEnterYield: bindOperation(
|
|
65426
|
-
ActionsControllerExitYield: bindOperation(
|
|
65427
|
-
ActionsControllerGetActions: bindOperation(
|
|
65428
|
-
ActionsControllerManageYield: bindOperation(
|
|
65429
|
-
HealthControllerHealth: bindOperation(
|
|
65430
|
-
NetworksControllerGetNetworks: bindOperation(
|
|
65431
|
-
TransactionsControllerGetTransaction: bindOperation(
|
|
65432
|
-
TransactionsControllerSubmitTransaction: bindOperation(
|
|
65433
|
-
TransactionsControllerSubmitTransactionHash: bindOperation(
|
|
65434
|
-
YieldsControllerGetAggregateBalances: bindOperation(
|
|
65435
|
-
YieldsControllerGetYield: bindOperation(
|
|
65436
|
-
YieldsControllerGetYieldBalances: bindOperation(
|
|
65437
|
-
YieldsControllerGetYieldValidators: bindOperation(
|
|
65430
|
+
var bindYieldApi = ({ api, runOptions }) => ({
|
|
65431
|
+
ActionsControllerEnterYield: bindOperation(api.ActionsControllerEnterYield, runOptions),
|
|
65432
|
+
ActionsControllerExitYield: bindOperation(api.ActionsControllerExitYield, runOptions),
|
|
65433
|
+
ActionsControllerGetActions: bindOperation(api.ActionsControllerGetActions, runOptions),
|
|
65434
|
+
ActionsControllerManageYield: bindOperation(api.ActionsControllerManageYield, runOptions),
|
|
65435
|
+
HealthControllerHealth: bindOperation(api.HealthControllerHealth, runOptions),
|
|
65436
|
+
NetworksControllerGetNetworks: bindOperation(api.NetworksControllerGetNetworks, runOptions),
|
|
65437
|
+
TransactionsControllerGetTransaction: bindOperation(api.TransactionsControllerGetTransaction, runOptions),
|
|
65438
|
+
TransactionsControllerSubmitTransaction: bindOperation(api.TransactionsControllerSubmitTransaction, runOptions),
|
|
65439
|
+
TransactionsControllerSubmitTransactionHash: bindOperation(api.TransactionsControllerSubmitTransactionHash, runOptions),
|
|
65440
|
+
YieldsControllerGetAggregateBalances: bindOperation(api.YieldsControllerGetAggregateBalances, runOptions),
|
|
65441
|
+
YieldsControllerGetYield: bindOperation(api.YieldsControllerGetYield, runOptions),
|
|
65442
|
+
YieldsControllerGetYieldBalances: bindOperation(api.YieldsControllerGetYieldBalances, runOptions),
|
|
65443
|
+
YieldsControllerGetYieldValidators: bindOperation(api.YieldsControllerGetYieldValidators, runOptions)
|
|
65438
65444
|
});
|
|
65439
|
-
var bindApiClients = ({ legacyApi, runOptions,
|
|
65445
|
+
var bindApiClients = ({ legacyApi, runOptions, yieldApi }) => ({
|
|
65440
65446
|
legacy: bindLegacyApi({
|
|
65441
65447
|
api: legacyApi,
|
|
65442
|
-
runOptions
|
|
65443
|
-
runtime
|
|
65448
|
+
runOptions
|
|
65444
65449
|
}),
|
|
65445
65450
|
yield: bindYieldApi({
|
|
65446
65451
|
api: yieldApi,
|
|
65447
|
-
runOptions
|
|
65448
|
-
runtime
|
|
65452
|
+
runOptions
|
|
65449
65453
|
})
|
|
65450
65454
|
});
|
|
65451
65455
|
var createApiClient = ({ apiKey, baseUrl, yieldsApiUrl }) => {
|
|
65452
|
-
const runtime = make$6(layer);
|
|
65453
65456
|
const baseClient = runtime.runSync(HttpClient);
|
|
65454
65457
|
const legacyHttpClient = configureClient({
|
|
65455
65458
|
apiKey,
|
|
@@ -65466,23 +65469,20 @@ var createApiClient = ({ apiKey, baseUrl, yieldsApiUrl }) => {
|
|
|
65466
65469
|
return {
|
|
65467
65470
|
...bindApiClients({
|
|
65468
65471
|
legacyApi,
|
|
65469
|
-
runtime,
|
|
65470
65472
|
yieldApi
|
|
65471
65473
|
}),
|
|
65472
65474
|
withRunOptions: (runOptions) => bindApiClients({
|
|
65473
65475
|
legacyApi,
|
|
65474
65476
|
runOptions,
|
|
65475
|
-
runtime,
|
|
65476
65477
|
yieldApi
|
|
65477
|
-
})
|
|
65478
|
-
dispose: () => runtime.dispose()
|
|
65478
|
+
})
|
|
65479
65479
|
};
|
|
65480
65480
|
};
|
|
65481
65481
|
//#endregion
|
|
65482
65482
|
//#region src/providers/api/api-client-provider.tsx
|
|
65483
65483
|
var Context$2 = createContext(void 0);
|
|
65484
65484
|
var SKApiClientProvider = (t0) => {
|
|
65485
|
-
const $ = c(
|
|
65485
|
+
const $ = c(7);
|
|
65486
65486
|
const { children } = t0;
|
|
65487
65487
|
const { apiKey, baseUrl, yieldsApiUrl } = useSettings();
|
|
65488
65488
|
const t1 = baseUrl ?? config.env.apiUrl;
|
|
@@ -65501,29 +65501,16 @@ var SKApiClientProvider = (t0) => {
|
|
|
65501
65501
|
} else t3 = $[3];
|
|
65502
65502
|
const apiClient = t3;
|
|
65503
65503
|
let t4;
|
|
65504
|
-
|
|
65505
|
-
|
|
65506
|
-
t4 = () => () => void apiClient.dispose();
|
|
65507
|
-
t5 = [apiClient];
|
|
65508
|
-
$[4] = apiClient;
|
|
65509
|
-
$[5] = t4;
|
|
65510
|
-
$[6] = t5;
|
|
65511
|
-
} else {
|
|
65512
|
-
t4 = $[5];
|
|
65513
|
-
t5 = $[6];
|
|
65514
|
-
}
|
|
65515
|
-
useEffect(t4, t5);
|
|
65516
|
-
let t6;
|
|
65517
|
-
if ($[7] !== apiClient || $[8] !== children) {
|
|
65518
|
-
t6 = /* @__PURE__ */ jsx(Context$2.Provider, {
|
|
65504
|
+
if ($[4] !== apiClient || $[5] !== children) {
|
|
65505
|
+
t4 = /* @__PURE__ */ jsx(Context$2.Provider, {
|
|
65519
65506
|
value: apiClient,
|
|
65520
65507
|
children
|
|
65521
65508
|
});
|
|
65522
|
-
$[
|
|
65523
|
-
$[
|
|
65524
|
-
$[
|
|
65525
|
-
} else
|
|
65526
|
-
return
|
|
65509
|
+
$[4] = apiClient;
|
|
65510
|
+
$[5] = children;
|
|
65511
|
+
$[6] = t4;
|
|
65512
|
+
} else t4 = $[6];
|
|
65513
|
+
return t4;
|
|
65527
65514
|
};
|
|
65528
65515
|
var useApiClient = () => {
|
|
65529
65516
|
const value = useContext(Context$2);
|
|
@@ -71885,7 +71872,7 @@ function setup({ schemas, actors, actions, guards, delays }) {
|
|
|
71885
71872
|
* LICENSE file in the root directory of this source tree.
|
|
71886
71873
|
*/
|
|
71887
71874
|
var require_with_selector_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
71888
|
-
var React =
|
|
71875
|
+
var React = require_builtin_esm_external_require_react(), shim = require_shim$1();
|
|
71889
71876
|
function is(x, y) {
|
|
71890
71877
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
71891
71878
|
}
|
|
@@ -71957,7 +71944,7 @@ var require_with_selector_development = /* @__PURE__ */ __commonJSMin(((exports)
|
|
|
71957
71944
|
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
71958
71945
|
}
|
|
71959
71946
|
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
71960
|
-
var React =
|
|
71947
|
+
var React = require_builtin_esm_external_require_react(), shim = require_shim$1(), objectIs = "function" === typeof Object.is ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue;
|
|
71961
71948
|
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
71962
71949
|
var instRef = useRef(null);
|
|
71963
71950
|
if (null === instRef.current) {
|
|
@@ -79950,7 +79937,7 @@ function composeRefs(...refs) {
|
|
|
79950
79937
|
* Accepts callback refs and RefObject(s)
|
|
79951
79938
|
*/
|
|
79952
79939
|
function useComposedRefs(...refs) {
|
|
79953
|
-
return React
|
|
79940
|
+
return React.useCallback(composeRefs(...refs), refs);
|
|
79954
79941
|
}
|
|
79955
79942
|
//#endregion
|
|
79956
79943
|
//#region ../../node_modules/.pnpm/framer-motion@12.38.0_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.mjs
|
|
@@ -79958,7 +79945,7 @@ function useComposedRefs(...refs) {
|
|
|
79958
79945
|
* Measurement functionality has to be within a separate component
|
|
79959
79946
|
* to leverage snapshot lifecycle.
|
|
79960
79947
|
*/
|
|
79961
|
-
var PopChildMeasure = class extends React
|
|
79948
|
+
var PopChildMeasure = class extends React.Component {
|
|
79962
79949
|
getSnapshotBeforeUpdate(prevProps) {
|
|
79963
79950
|
const element = this.props.childRef.current;
|
|
79964
79951
|
if (isHTMLElement$1(element) && prevProps.isPresent && !this.props.isPresent && this.props.pop !== false) {
|
|
@@ -80035,7 +80022,7 @@ function PopChild({ children, isPresent, anchorX, anchorY, root, pop }) {
|
|
|
80035
80022
|
childRef: ref,
|
|
80036
80023
|
sizeRef: size,
|
|
80037
80024
|
pop,
|
|
80038
|
-
children: pop === false ? children : React
|
|
80025
|
+
children: pop === false ? children : React.cloneElement(children, { ref: composedRef })
|
|
80039
80026
|
});
|
|
80040
80027
|
}
|
|
80041
80028
|
//#endregion
|
|
@@ -80079,7 +80066,7 @@ var PresenceChild = ({ children, initial, isPresent, onExitComplete, custom, pre
|
|
|
80079
80066
|
* If there's no `motion` components to fire exit animations, we want to remove this
|
|
80080
80067
|
* component immediately.
|
|
80081
80068
|
*/
|
|
80082
|
-
React
|
|
80069
|
+
React.useEffect(() => {
|
|
80083
80070
|
!isPresent && !presenceChildren.size && onExitComplete && onExitComplete();
|
|
80084
80071
|
}, [isPresent]);
|
|
80085
80072
|
children = jsx(PopChild, {
|
|
@@ -87372,7 +87359,7 @@ function roundByDPR(element, value) {
|
|
|
87372
87359
|
return Math.round(value * dpr) / dpr;
|
|
87373
87360
|
}
|
|
87374
87361
|
function useLatestRef(value) {
|
|
87375
|
-
const ref = React
|
|
87362
|
+
const ref = React.useRef(value);
|
|
87376
87363
|
index(() => {
|
|
87377
87364
|
ref.current = value;
|
|
87378
87365
|
});
|
|
@@ -87385,7 +87372,7 @@ function useLatestRef(value) {
|
|
|
87385
87372
|
function useFloating(options) {
|
|
87386
87373
|
if (options === void 0) options = {};
|
|
87387
87374
|
const { placement = "bottom", strategy = "absolute", middleware = [], platform, elements: { reference: externalReference, floating: externalFloating } = {}, transform = true, whileElementsMounted, open } = options;
|
|
87388
|
-
const [data, setData] = React
|
|
87375
|
+
const [data, setData] = React.useState({
|
|
87389
87376
|
x: 0,
|
|
87390
87377
|
y: 0,
|
|
87391
87378
|
strategy,
|
|
@@ -87393,17 +87380,17 @@ function useFloating(options) {
|
|
|
87393
87380
|
middlewareData: {},
|
|
87394
87381
|
isPositioned: false
|
|
87395
87382
|
});
|
|
87396
|
-
const [latestMiddleware, setLatestMiddleware] = React
|
|
87383
|
+
const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
|
|
87397
87384
|
if (!deepEqual(latestMiddleware, middleware)) setLatestMiddleware(middleware);
|
|
87398
|
-
const [_reference, _setReference] = React
|
|
87399
|
-
const [_floating, _setFloating] = React
|
|
87400
|
-
const setReference = React
|
|
87385
|
+
const [_reference, _setReference] = React.useState(null);
|
|
87386
|
+
const [_floating, _setFloating] = React.useState(null);
|
|
87387
|
+
const setReference = React.useCallback((node) => {
|
|
87401
87388
|
if (node !== referenceRef.current) {
|
|
87402
87389
|
referenceRef.current = node;
|
|
87403
87390
|
_setReference(node);
|
|
87404
87391
|
}
|
|
87405
87392
|
}, []);
|
|
87406
|
-
const setFloating = React
|
|
87393
|
+
const setFloating = React.useCallback((node) => {
|
|
87407
87394
|
if (node !== floatingRef.current) {
|
|
87408
87395
|
floatingRef.current = node;
|
|
87409
87396
|
_setFloating(node);
|
|
@@ -87411,14 +87398,14 @@ function useFloating(options) {
|
|
|
87411
87398
|
}, []);
|
|
87412
87399
|
const referenceEl = externalReference || _reference;
|
|
87413
87400
|
const floatingEl = externalFloating || _floating;
|
|
87414
|
-
const referenceRef = React
|
|
87415
|
-
const floatingRef = React
|
|
87416
|
-
const dataRef = React
|
|
87401
|
+
const referenceRef = React.useRef(null);
|
|
87402
|
+
const floatingRef = React.useRef(null);
|
|
87403
|
+
const dataRef = React.useRef(data);
|
|
87417
87404
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
87418
87405
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
87419
87406
|
const platformRef = useLatestRef(platform);
|
|
87420
87407
|
const openRef = useLatestRef(open);
|
|
87421
|
-
const update = React
|
|
87408
|
+
const update = React.useCallback(() => {
|
|
87422
87409
|
if (!referenceRef.current || !floatingRef.current) return;
|
|
87423
87410
|
const config = {
|
|
87424
87411
|
placement,
|
|
@@ -87454,7 +87441,7 @@ function useFloating(options) {
|
|
|
87454
87441
|
}));
|
|
87455
87442
|
}
|
|
87456
87443
|
}, [open]);
|
|
87457
|
-
const isMountedRef = React
|
|
87444
|
+
const isMountedRef = React.useRef(false);
|
|
87458
87445
|
index(() => {
|
|
87459
87446
|
isMountedRef.current = true;
|
|
87460
87447
|
return () => {
|
|
@@ -87475,17 +87462,17 @@ function useFloating(options) {
|
|
|
87475
87462
|
whileElementsMountedRef,
|
|
87476
87463
|
hasWhileElementsMounted
|
|
87477
87464
|
]);
|
|
87478
|
-
const refs = React
|
|
87465
|
+
const refs = React.useMemo(() => ({
|
|
87479
87466
|
reference: referenceRef,
|
|
87480
87467
|
floating: floatingRef,
|
|
87481
87468
|
setReference,
|
|
87482
87469
|
setFloating
|
|
87483
87470
|
}), [setReference, setFloating]);
|
|
87484
|
-
const elements = React
|
|
87471
|
+
const elements = React.useMemo(() => ({
|
|
87485
87472
|
reference: referenceEl,
|
|
87486
87473
|
floating: floatingEl
|
|
87487
87474
|
}), [referenceEl, floatingEl]);
|
|
87488
|
-
const floatingStyles = React
|
|
87475
|
+
const floatingStyles = React.useMemo(() => {
|
|
87489
87476
|
const initialStyles = {
|
|
87490
87477
|
position: strategy,
|
|
87491
87478
|
left: 0,
|
|
@@ -87511,7 +87498,7 @@ function useFloating(options) {
|
|
|
87511
87498
|
data.x,
|
|
87512
87499
|
data.y
|
|
87513
87500
|
]);
|
|
87514
|
-
return React
|
|
87501
|
+
return React.useMemo(() => ({
|
|
87515
87502
|
...data,
|
|
87516
87503
|
update,
|
|
87517
87504
|
refs,
|
|
@@ -87624,7 +87611,7 @@ var arrow = (options, deps) => ({
|
|
|
87624
87611
|
//#endregion
|
|
87625
87612
|
//#region ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@_07ab85c571739f89808dad9390df6d71/node_modules/@radix-ui/react-arrow/dist/index.mjs
|
|
87626
87613
|
var NAME$1 = "Arrow";
|
|
87627
|
-
var Arrow$1 = React
|
|
87614
|
+
var Arrow$1 = React.forwardRef((props, forwardedRef) => {
|
|
87628
87615
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
87629
87616
|
return /* @__PURE__ */ jsx(Primitive$1.svg, {
|
|
87630
87617
|
...arrowProps,
|
|
@@ -87641,7 +87628,7 @@ var Root$5 = Arrow$1;
|
|
|
87641
87628
|
//#endregion
|
|
87642
87629
|
//#region ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
87643
87630
|
function useSize(element) {
|
|
87644
|
-
const [size, setSize] = React
|
|
87631
|
+
const [size, setSize] = React.useState(void 0);
|
|
87645
87632
|
useLayoutEffect2(() => {
|
|
87646
87633
|
if (element) {
|
|
87647
87634
|
setSize({
|
|
@@ -87681,7 +87668,7 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
|
87681
87668
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
87682
87669
|
var Popper = (props) => {
|
|
87683
87670
|
const { __scopePopper, children } = props;
|
|
87684
|
-
const [anchor, setAnchor] = React
|
|
87671
|
+
const [anchor, setAnchor] = React.useState(null);
|
|
87685
87672
|
return /* @__PURE__ */ jsx(PopperProvider, {
|
|
87686
87673
|
scope: __scopePopper,
|
|
87687
87674
|
anchor,
|
|
@@ -87691,13 +87678,13 @@ var Popper = (props) => {
|
|
|
87691
87678
|
};
|
|
87692
87679
|
Popper.displayName = POPPER_NAME;
|
|
87693
87680
|
var ANCHOR_NAME$1 = "PopperAnchor";
|
|
87694
|
-
var PopperAnchor = React
|
|
87681
|
+
var PopperAnchor = React.forwardRef((props, forwardedRef) => {
|
|
87695
87682
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
87696
87683
|
const context = usePopperContext(ANCHOR_NAME$1, __scopePopper);
|
|
87697
|
-
const ref = React
|
|
87684
|
+
const ref = React.useRef(null);
|
|
87698
87685
|
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
87699
|
-
const anchorRef = React
|
|
87700
|
-
React
|
|
87686
|
+
const anchorRef = React.useRef(null);
|
|
87687
|
+
React.useEffect(() => {
|
|
87701
87688
|
const previousAnchor = anchorRef.current;
|
|
87702
87689
|
anchorRef.current = virtualRef?.current || ref.current;
|
|
87703
87690
|
if (previousAnchor !== anchorRef.current) context.onAnchorChange(anchorRef.current);
|
|
@@ -87710,12 +87697,12 @@ var PopperAnchor = React$4.forwardRef((props, forwardedRef) => {
|
|
|
87710
87697
|
PopperAnchor.displayName = ANCHOR_NAME$1;
|
|
87711
87698
|
var CONTENT_NAME$3 = "PopperContent";
|
|
87712
87699
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME$3);
|
|
87713
|
-
var PopperContent = React
|
|
87700
|
+
var PopperContent = React.forwardRef((props, forwardedRef) => {
|
|
87714
87701
|
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;
|
|
87715
87702
|
const context = usePopperContext(CONTENT_NAME$3, __scopePopper);
|
|
87716
|
-
const [content, setContent] = React
|
|
87703
|
+
const [content, setContent] = React.useState(null);
|
|
87717
87704
|
const composedRefs = useComposedRefs$1(forwardedRef, (node) => setContent(node));
|
|
87718
|
-
const [arrow$4, setArrow] = React
|
|
87705
|
+
const [arrow$4, setArrow] = React.useState(null);
|
|
87719
87706
|
const arrowSize = useSize(arrow$4);
|
|
87720
87707
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
87721
87708
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -87786,7 +87773,7 @@ var PopperContent = React$4.forwardRef((props, forwardedRef) => {
|
|
|
87786
87773
|
const arrowX = middlewareData.arrow?.x;
|
|
87787
87774
|
const arrowY = middlewareData.arrow?.y;
|
|
87788
87775
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
87789
|
-
const [contentZIndex, setContentZIndex] = React
|
|
87776
|
+
const [contentZIndex, setContentZIndex] = React.useState();
|
|
87790
87777
|
useLayoutEffect2(() => {
|
|
87791
87778
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
87792
87779
|
}, [content]);
|
|
@@ -87833,7 +87820,7 @@ var OPPOSITE_SIDE = {
|
|
|
87833
87820
|
bottom: "top",
|
|
87834
87821
|
left: "right"
|
|
87835
87822
|
};
|
|
87836
|
-
var PopperArrow = React
|
|
87823
|
+
var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
87837
87824
|
const { __scopePopper, ...arrowProps } = props;
|
|
87838
87825
|
const contentContext = useContentContext(ARROW_NAME$3, __scopePopper);
|
|
87839
87826
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -87932,7 +87919,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
87932
87919
|
wordWrap: "normal"
|
|
87933
87920
|
});
|
|
87934
87921
|
var NAME = "VisuallyHidden";
|
|
87935
|
-
var VisuallyHidden = React
|
|
87922
|
+
var VisuallyHidden = React.forwardRef((props, forwardedRef) => {
|
|
87936
87923
|
return /* @__PURE__ */ jsx(Primitive$1.span, {
|
|
87937
87924
|
...props,
|
|
87938
87925
|
ref: forwardedRef,
|
|
@@ -87954,10 +87941,10 @@ var TOOLTIP_OPEN = "tooltip.open";
|
|
|
87954
87941
|
var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME);
|
|
87955
87942
|
var TooltipProvider = (props) => {
|
|
87956
87943
|
const { __scopeTooltip, delayDuration = DEFAULT_DELAY_DURATION, skipDelayDuration = 300, disableHoverableContent = false, children } = props;
|
|
87957
|
-
const isOpenDelayedRef = React
|
|
87958
|
-
const isPointerInTransitRef = React
|
|
87959
|
-
const skipDelayTimerRef = React
|
|
87960
|
-
React
|
|
87944
|
+
const isOpenDelayedRef = React.useRef(true);
|
|
87945
|
+
const isPointerInTransitRef = React.useRef(false);
|
|
87946
|
+
const skipDelayTimerRef = React.useRef(0);
|
|
87947
|
+
React.useEffect(() => {
|
|
87961
87948
|
const skipDelayTimer = skipDelayTimerRef.current;
|
|
87962
87949
|
return () => window.clearTimeout(skipDelayTimer);
|
|
87963
87950
|
}, []);
|
|
@@ -87965,16 +87952,16 @@ var TooltipProvider = (props) => {
|
|
|
87965
87952
|
scope: __scopeTooltip,
|
|
87966
87953
|
isOpenDelayedRef,
|
|
87967
87954
|
delayDuration,
|
|
87968
|
-
onOpen: React
|
|
87955
|
+
onOpen: React.useCallback(() => {
|
|
87969
87956
|
window.clearTimeout(skipDelayTimerRef.current);
|
|
87970
87957
|
isOpenDelayedRef.current = false;
|
|
87971
87958
|
}, []),
|
|
87972
|
-
onClose: React
|
|
87959
|
+
onClose: React.useCallback(() => {
|
|
87973
87960
|
window.clearTimeout(skipDelayTimerRef.current);
|
|
87974
87961
|
skipDelayTimerRef.current = window.setTimeout(() => isOpenDelayedRef.current = true, skipDelayDuration);
|
|
87975
87962
|
}, [skipDelayDuration]),
|
|
87976
87963
|
isPointerInTransitRef,
|
|
87977
|
-
onPointerInTransitChange: React
|
|
87964
|
+
onPointerInTransitChange: React.useCallback((inTransit) => {
|
|
87978
87965
|
isPointerInTransitRef.current = inTransit;
|
|
87979
87966
|
}, []),
|
|
87980
87967
|
disableHoverableContent,
|
|
@@ -87988,12 +87975,12 @@ var Tooltip = (props) => {
|
|
|
87988
87975
|
const { __scopeTooltip, children, open: openProp, defaultOpen, onOpenChange, disableHoverableContent: disableHoverableContentProp, delayDuration: delayDurationProp } = props;
|
|
87989
87976
|
const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props.__scopeTooltip);
|
|
87990
87977
|
const popperScope = usePopperScope$1(__scopeTooltip);
|
|
87991
|
-
const [trigger, setTrigger] = React
|
|
87978
|
+
const [trigger, setTrigger] = React.useState(null);
|
|
87992
87979
|
const contentId = useId$1();
|
|
87993
|
-
const openTimerRef = React
|
|
87980
|
+
const openTimerRef = React.useRef(0);
|
|
87994
87981
|
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
|
87995
87982
|
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
|
87996
|
-
const wasOpenDelayedRef = React
|
|
87983
|
+
const wasOpenDelayedRef = React.useRef(false);
|
|
87997
87984
|
const [open, setOpen] = useControllableState({
|
|
87998
87985
|
prop: openProp,
|
|
87999
87986
|
defaultProp: defaultOpen ?? false,
|
|
@@ -88006,21 +87993,21 @@ var Tooltip = (props) => {
|
|
|
88006
87993
|
},
|
|
88007
87994
|
caller: TOOLTIP_NAME
|
|
88008
87995
|
});
|
|
88009
|
-
const stateAttribute = React
|
|
87996
|
+
const stateAttribute = React.useMemo(() => {
|
|
88010
87997
|
return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed";
|
|
88011
87998
|
}, [open]);
|
|
88012
|
-
const handleOpen = React
|
|
87999
|
+
const handleOpen = React.useCallback(() => {
|
|
88013
88000
|
window.clearTimeout(openTimerRef.current);
|
|
88014
88001
|
openTimerRef.current = 0;
|
|
88015
88002
|
wasOpenDelayedRef.current = false;
|
|
88016
88003
|
setOpen(true);
|
|
88017
88004
|
}, [setOpen]);
|
|
88018
|
-
const handleClose = React
|
|
88005
|
+
const handleClose = React.useCallback(() => {
|
|
88019
88006
|
window.clearTimeout(openTimerRef.current);
|
|
88020
88007
|
openTimerRef.current = 0;
|
|
88021
88008
|
setOpen(false);
|
|
88022
88009
|
}, [setOpen]);
|
|
88023
|
-
const handleDelayedOpen = React
|
|
88010
|
+
const handleDelayedOpen = React.useCallback(() => {
|
|
88024
88011
|
window.clearTimeout(openTimerRef.current);
|
|
88025
88012
|
openTimerRef.current = window.setTimeout(() => {
|
|
88026
88013
|
wasOpenDelayedRef.current = true;
|
|
@@ -88028,7 +88015,7 @@ var Tooltip = (props) => {
|
|
|
88028
88015
|
openTimerRef.current = 0;
|
|
88029
88016
|
}, delayDuration);
|
|
88030
88017
|
}, [delayDuration, setOpen]);
|
|
88031
|
-
React
|
|
88018
|
+
React.useEffect(() => {
|
|
88032
88019
|
return () => {
|
|
88033
88020
|
if (openTimerRef.current) {
|
|
88034
88021
|
window.clearTimeout(openTimerRef.current);
|
|
@@ -88045,7 +88032,7 @@ var Tooltip = (props) => {
|
|
|
88045
88032
|
stateAttribute,
|
|
88046
88033
|
trigger,
|
|
88047
88034
|
onTriggerChange: setTrigger,
|
|
88048
|
-
onTriggerEnter: React
|
|
88035
|
+
onTriggerEnter: React.useCallback(() => {
|
|
88049
88036
|
if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();
|
|
88050
88037
|
else handleOpen();
|
|
88051
88038
|
}, [
|
|
@@ -88053,7 +88040,7 @@ var Tooltip = (props) => {
|
|
|
88053
88040
|
handleDelayedOpen,
|
|
88054
88041
|
handleOpen
|
|
88055
88042
|
]),
|
|
88056
|
-
onTriggerLeave: React
|
|
88043
|
+
onTriggerLeave: React.useCallback(() => {
|
|
88057
88044
|
if (disableHoverableContent) handleClose();
|
|
88058
88045
|
else {
|
|
88059
88046
|
window.clearTimeout(openTimerRef.current);
|
|
@@ -88069,16 +88056,16 @@ var Tooltip = (props) => {
|
|
|
88069
88056
|
};
|
|
88070
88057
|
Tooltip.displayName = TOOLTIP_NAME;
|
|
88071
88058
|
var TRIGGER_NAME$1 = "TooltipTrigger";
|
|
88072
|
-
var TooltipTrigger = React
|
|
88059
|
+
var TooltipTrigger = React.forwardRef((props, forwardedRef) => {
|
|
88073
88060
|
const { __scopeTooltip, ...triggerProps } = props;
|
|
88074
88061
|
const context = useTooltipContext(TRIGGER_NAME$1, __scopeTooltip);
|
|
88075
88062
|
const providerContext = useTooltipProviderContext(TRIGGER_NAME$1, __scopeTooltip);
|
|
88076
88063
|
const popperScope = usePopperScope$1(__scopeTooltip);
|
|
88077
|
-
const composedRefs = useComposedRefs$1(forwardedRef, React
|
|
88078
|
-
const isPointerDownRef = React
|
|
88079
|
-
const hasPointerMoveOpenedRef = React
|
|
88080
|
-
const handlePointerUp = React
|
|
88081
|
-
React
|
|
88064
|
+
const composedRefs = useComposedRefs$1(forwardedRef, React.useRef(null), context.onTriggerChange);
|
|
88065
|
+
const isPointerDownRef = React.useRef(false);
|
|
88066
|
+
const hasPointerMoveOpenedRef = React.useRef(false);
|
|
88067
|
+
const handlePointerUp = React.useCallback(() => isPointerDownRef.current = false, []);
|
|
88068
|
+
React.useEffect(() => {
|
|
88082
88069
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
88083
88070
|
}, [handlePointerUp]);
|
|
88084
88071
|
return /* @__PURE__ */ jsx(Anchor, {
|
|
@@ -88134,7 +88121,7 @@ var TooltipPortal = (props) => {
|
|
|
88134
88121
|
};
|
|
88135
88122
|
TooltipPortal.displayName = PORTAL_NAME$2;
|
|
88136
88123
|
var CONTENT_NAME$2 = "TooltipContent";
|
|
88137
|
-
var TooltipContent = React
|
|
88124
|
+
var TooltipContent = React.forwardRef((props, forwardedRef) => {
|
|
88138
88125
|
const portalContext = usePortalContext$1(CONTENT_NAME$2, props.__scopeTooltip);
|
|
88139
88126
|
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
|
88140
88127
|
const context = useTooltipContext(CONTENT_NAME$2, props.__scopeTooltip);
|
|
@@ -88151,20 +88138,20 @@ var TooltipContent = React$4.forwardRef((props, forwardedRef) => {
|
|
|
88151
88138
|
})
|
|
88152
88139
|
});
|
|
88153
88140
|
});
|
|
88154
|
-
var TooltipContentHoverable = React
|
|
88141
|
+
var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
88155
88142
|
const context = useTooltipContext(CONTENT_NAME$2, props.__scopeTooltip);
|
|
88156
88143
|
const providerContext = useTooltipProviderContext(CONTENT_NAME$2, props.__scopeTooltip);
|
|
88157
|
-
const ref = React
|
|
88144
|
+
const ref = React.useRef(null);
|
|
88158
88145
|
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
88159
|
-
const [pointerGraceArea, setPointerGraceArea] = React
|
|
88146
|
+
const [pointerGraceArea, setPointerGraceArea] = React.useState(null);
|
|
88160
88147
|
const { trigger, onClose } = context;
|
|
88161
88148
|
const content = ref.current;
|
|
88162
88149
|
const { onPointerInTransitChange } = providerContext;
|
|
88163
|
-
const handleRemoveGraceArea = React
|
|
88150
|
+
const handleRemoveGraceArea = React.useCallback(() => {
|
|
88164
88151
|
setPointerGraceArea(null);
|
|
88165
88152
|
onPointerInTransitChange(false);
|
|
88166
88153
|
}, [onPointerInTransitChange]);
|
|
88167
|
-
const handleCreateGraceArea = React
|
|
88154
|
+
const handleCreateGraceArea = React.useCallback((event, hoverTarget) => {
|
|
88168
88155
|
const currentTarget = event.currentTarget;
|
|
88169
88156
|
const exitPoint = {
|
|
88170
88157
|
x: event.clientX,
|
|
@@ -88175,10 +88162,10 @@ var TooltipContentHoverable = React$4.forwardRef((props, forwardedRef) => {
|
|
|
88175
88162
|
setPointerGraceArea(getHull([...paddedExitPoints, ...hoverTargetPoints]));
|
|
88176
88163
|
onPointerInTransitChange(true);
|
|
88177
88164
|
}, [onPointerInTransitChange]);
|
|
88178
|
-
React
|
|
88165
|
+
React.useEffect(() => {
|
|
88179
88166
|
return () => handleRemoveGraceArea();
|
|
88180
88167
|
}, [handleRemoveGraceArea]);
|
|
88181
|
-
React
|
|
88168
|
+
React.useEffect(() => {
|
|
88182
88169
|
if (trigger && content) {
|
|
88183
88170
|
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
|
|
88184
88171
|
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
@@ -88195,7 +88182,7 @@ var TooltipContentHoverable = React$4.forwardRef((props, forwardedRef) => {
|
|
|
88195
88182
|
handleCreateGraceArea,
|
|
88196
88183
|
handleRemoveGraceArea
|
|
88197
88184
|
]);
|
|
88198
|
-
React
|
|
88185
|
+
React.useEffect(() => {
|
|
88199
88186
|
if (pointerGraceArea) {
|
|
88200
88187
|
const handleTrackPointerGrace = (event) => {
|
|
88201
88188
|
const target = event.target;
|
|
@@ -88228,16 +88215,16 @@ var TooltipContentHoverable = React$4.forwardRef((props, forwardedRef) => {
|
|
|
88228
88215
|
});
|
|
88229
88216
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
88230
88217
|
var Slottable = /* @__PURE__ */ createSlottable("TooltipContent");
|
|
88231
|
-
var TooltipContentImpl = React
|
|
88218
|
+
var TooltipContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
88232
88219
|
const { __scopeTooltip, children, "aria-label": ariaLabel, onEscapeKeyDown, onPointerDownOutside, ...contentProps } = props;
|
|
88233
88220
|
const context = useTooltipContext(CONTENT_NAME$2, __scopeTooltip);
|
|
88234
88221
|
const popperScope = usePopperScope$1(__scopeTooltip);
|
|
88235
88222
|
const { onClose } = context;
|
|
88236
|
-
React
|
|
88223
|
+
React.useEffect(() => {
|
|
88237
88224
|
document.addEventListener(TOOLTIP_OPEN, onClose);
|
|
88238
88225
|
return () => document.removeEventListener(TOOLTIP_OPEN, onClose);
|
|
88239
88226
|
}, [onClose]);
|
|
88240
|
-
React
|
|
88227
|
+
React.useEffect(() => {
|
|
88241
88228
|
if (context.trigger) {
|
|
88242
88229
|
const handleScroll = (event) => {
|
|
88243
88230
|
if (event.target?.contains(context.trigger)) onClose();
|
|
@@ -88280,7 +88267,7 @@ var TooltipContentImpl = React$4.forwardRef((props, forwardedRef) => {
|
|
|
88280
88267
|
});
|
|
88281
88268
|
TooltipContent.displayName = CONTENT_NAME$2;
|
|
88282
88269
|
var ARROW_NAME$2 = "TooltipArrow";
|
|
88283
|
-
var TooltipArrow = React
|
|
88270
|
+
var TooltipArrow = React.forwardRef((props, forwardedRef) => {
|
|
88284
88271
|
const { __scopeTooltip, ...arrowProps } = props;
|
|
88285
88272
|
const popperScope = usePopperScope$1(__scopeTooltip);
|
|
88286
88273
|
return useVisuallyHiddenContentContext(ARROW_NAME$2, __scopeTooltip).isInside ? null : /* @__PURE__ */ jsx(Arrow, {
|
|
@@ -94841,9 +94828,9 @@ function calculateRange({ measurements, outerSize, scrollOffset, lanes }) {
|
|
|
94841
94828
|
}
|
|
94842
94829
|
//#endregion
|
|
94843
94830
|
//#region ../../node_modules/.pnpm/@tanstack+react-virtual@3.13.24_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/@tanstack/react-virtual/dist/esm/index.js
|
|
94844
|
-
var useIsomorphicLayoutEffect = typeof document !== "undefined" ? React
|
|
94831
|
+
var useIsomorphicLayoutEffect = typeof document !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
94845
94832
|
function useVirtualizerBase({ useFlushSync = true, ...options }) {
|
|
94846
|
-
const rerender = React
|
|
94833
|
+
const rerender = React.useReducer(() => ({}), {})[1];
|
|
94847
94834
|
const resolvedOptions = {
|
|
94848
94835
|
...options,
|
|
94849
94836
|
onChange: (instance2, sync) => {
|
|
@@ -94853,7 +94840,7 @@ function useVirtualizerBase({ useFlushSync = true, ...options }) {
|
|
|
94853
94840
|
(_a = options.onChange) == null || _a.call(options, instance2, sync);
|
|
94854
94841
|
}
|
|
94855
94842
|
};
|
|
94856
|
-
const [instance] = React
|
|
94843
|
+
const [instance] = React.useState(() => new Virtualizer(resolvedOptions));
|
|
94857
94844
|
instance.setOptions(resolvedOptions);
|
|
94858
94845
|
useIsomorphicLayoutEffect(() => {
|
|
94859
94846
|
return instance._didMount();
|
|
@@ -99625,9 +99612,9 @@ function createCollection(name) {
|
|
|
99625
99612
|
}
|
|
99626
99613
|
//#endregion
|
|
99627
99614
|
//#region ../../node_modules/.pnpm/@radix-ui+react-direction@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-direction/dist/index.mjs
|
|
99628
|
-
var DirectionContext = React
|
|
99615
|
+
var DirectionContext = React.createContext(void 0);
|
|
99629
99616
|
function useDirection(localDir) {
|
|
99630
|
-
const globalDir = React
|
|
99617
|
+
const globalDir = React.useContext(DirectionContext);
|
|
99631
99618
|
return localDir || globalDir || "ltr";
|
|
99632
99619
|
}
|
|
99633
99620
|
//#endregion
|
|
@@ -99641,7 +99628,7 @@ var GROUP_NAME$2 = "RovingFocusGroup";
|
|
|
99641
99628
|
var [Collection$1, useCollection$1, createCollectionScope$1] = createCollection(GROUP_NAME$2);
|
|
99642
99629
|
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(GROUP_NAME$2, [createCollectionScope$1]);
|
|
99643
99630
|
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME$2);
|
|
99644
|
-
var RovingFocusGroup = React
|
|
99631
|
+
var RovingFocusGroup = React.forwardRef((props, forwardedRef) => {
|
|
99645
99632
|
return /* @__PURE__ */ jsx(Collection$1.Provider, {
|
|
99646
99633
|
scope: props.__scopeRovingFocusGroup,
|
|
99647
99634
|
children: /* @__PURE__ */ jsx(Collection$1.Slot, {
|
|
@@ -99654,9 +99641,9 @@ var RovingFocusGroup = React$4.forwardRef((props, forwardedRef) => {
|
|
|
99654
99641
|
});
|
|
99655
99642
|
});
|
|
99656
99643
|
RovingFocusGroup.displayName = GROUP_NAME$2;
|
|
99657
|
-
var RovingFocusGroupImpl = React
|
|
99644
|
+
var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
99658
99645
|
const { __scopeRovingFocusGroup, orientation, loop = false, dir, currentTabStopId: currentTabStopIdProp, defaultCurrentTabStopId, onCurrentTabStopIdChange, onEntryFocus, preventScrollOnEntryFocus = false, ...groupProps } = props;
|
|
99659
|
-
const ref = React
|
|
99646
|
+
const ref = React.useRef(null);
|
|
99660
99647
|
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
99661
99648
|
const direction = useDirection(dir);
|
|
99662
99649
|
const [currentTabStopId, setCurrentTabStopId] = useControllableState({
|
|
@@ -99665,12 +99652,12 @@ var RovingFocusGroupImpl = React$4.forwardRef((props, forwardedRef) => {
|
|
|
99665
99652
|
onChange: onCurrentTabStopIdChange,
|
|
99666
99653
|
caller: GROUP_NAME$2
|
|
99667
99654
|
});
|
|
99668
|
-
const [isTabbingBackOut, setIsTabbingBackOut] = React
|
|
99655
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
|
|
99669
99656
|
const handleEntryFocus = useCallbackRef$1(onEntryFocus);
|
|
99670
99657
|
const getItems = useCollection$1(__scopeRovingFocusGroup);
|
|
99671
|
-
const isClickFocusRef = React
|
|
99672
|
-
const [focusableItemsCount, setFocusableItemsCount] = React
|
|
99673
|
-
React
|
|
99658
|
+
const isClickFocusRef = React.useRef(false);
|
|
99659
|
+
const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);
|
|
99660
|
+
React.useEffect(() => {
|
|
99674
99661
|
const node = ref.current;
|
|
99675
99662
|
if (node) {
|
|
99676
99663
|
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
@@ -99683,10 +99670,10 @@ var RovingFocusGroupImpl = React$4.forwardRef((props, forwardedRef) => {
|
|
|
99683
99670
|
dir: direction,
|
|
99684
99671
|
loop,
|
|
99685
99672
|
currentTabStopId,
|
|
99686
|
-
onItemFocus: React
|
|
99687
|
-
onItemShiftTab: React
|
|
99688
|
-
onFocusableItemAdd: React
|
|
99689
|
-
onFocusableItemRemove: React
|
|
99673
|
+
onItemFocus: React.useCallback((tabStopId) => setCurrentTabStopId(tabStopId), [setCurrentTabStopId]),
|
|
99674
|
+
onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),
|
|
99675
|
+
onFocusableItemAdd: React.useCallback(() => setFocusableItemsCount((prevCount) => prevCount + 1), []),
|
|
99676
|
+
onFocusableItemRemove: React.useCallback(() => setFocusableItemsCount((prevCount) => prevCount - 1), []),
|
|
99690
99677
|
children: /* @__PURE__ */ jsx(Primitive$1.div, {
|
|
99691
99678
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
99692
99679
|
"data-orientation": orientation,
|
|
@@ -99720,7 +99707,7 @@ var RovingFocusGroupImpl = React$4.forwardRef((props, forwardedRef) => {
|
|
|
99720
99707
|
});
|
|
99721
99708
|
});
|
|
99722
99709
|
var ITEM_NAME$2 = "RovingFocusGroupItem";
|
|
99723
|
-
var RovingFocusGroupItem = React
|
|
99710
|
+
var RovingFocusGroupItem = React.forwardRef((props, forwardedRef) => {
|
|
99724
99711
|
const { __scopeRovingFocusGroup, focusable = true, active = false, tabStopId, children, ...itemProps } = props;
|
|
99725
99712
|
const autoId = useId$1();
|
|
99726
99713
|
const id = tabStopId || autoId;
|
|
@@ -99728,7 +99715,7 @@ var RovingFocusGroupItem = React$4.forwardRef((props, forwardedRef) => {
|
|
|
99728
99715
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
99729
99716
|
const getItems = useCollection$1(__scopeRovingFocusGroup);
|
|
99730
99717
|
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
|
|
99731
|
-
React
|
|
99718
|
+
React.useEffect(() => {
|
|
99732
99719
|
if (focusable) {
|
|
99733
99720
|
onFocusableItemAdd();
|
|
99734
99721
|
return () => onFocusableItemRemove();
|
|
@@ -99850,11 +99837,11 @@ var [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);
|
|
|
99850
99837
|
var Menu = (props) => {
|
|
99851
99838
|
const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;
|
|
99852
99839
|
const popperScope = usePopperScope(__scopeMenu);
|
|
99853
|
-
const [content, setContent] = React
|
|
99854
|
-
const isUsingKeyboardRef = React
|
|
99840
|
+
const [content, setContent] = React.useState(null);
|
|
99841
|
+
const isUsingKeyboardRef = React.useRef(false);
|
|
99855
99842
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
99856
99843
|
const direction = useDirection(dir);
|
|
99857
|
-
React
|
|
99844
|
+
React.useEffect(() => {
|
|
99858
99845
|
const handleKeyDown = () => {
|
|
99859
99846
|
isUsingKeyboardRef.current = true;
|
|
99860
99847
|
document.addEventListener("pointerdown", handlePointer, {
|
|
@@ -99884,7 +99871,7 @@ var Menu = (props) => {
|
|
|
99884
99871
|
onContentChange: setContent,
|
|
99885
99872
|
children: /* @__PURE__ */ jsx(MenuRootProvider, {
|
|
99886
99873
|
scope: __scopeMenu,
|
|
99887
|
-
onClose: React
|
|
99874
|
+
onClose: React.useCallback(() => handleOpenChange(false), [handleOpenChange]),
|
|
99888
99875
|
isUsingKeyboardRef,
|
|
99889
99876
|
dir: direction,
|
|
99890
99877
|
modal,
|
|
@@ -99895,7 +99882,7 @@ var Menu = (props) => {
|
|
|
99895
99882
|
};
|
|
99896
99883
|
Menu.displayName = MENU_NAME;
|
|
99897
99884
|
var ANCHOR_NAME = "MenuAnchor";
|
|
99898
|
-
var MenuAnchor = React
|
|
99885
|
+
var MenuAnchor = React.forwardRef((props, forwardedRef) => {
|
|
99899
99886
|
const { __scopeMenu, ...anchorProps } = props;
|
|
99900
99887
|
return /* @__PURE__ */ jsx(Anchor, {
|
|
99901
99888
|
...usePopperScope(__scopeMenu),
|
|
@@ -99925,7 +99912,7 @@ var MenuPortal = (props) => {
|
|
|
99925
99912
|
MenuPortal.displayName = PORTAL_NAME$1;
|
|
99926
99913
|
var CONTENT_NAME$1 = "MenuContent";
|
|
99927
99914
|
var [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME$1);
|
|
99928
|
-
var MenuContent = React
|
|
99915
|
+
var MenuContent = React.forwardRef((props, forwardedRef) => {
|
|
99929
99916
|
const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
99930
99917
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
99931
99918
|
const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
@@ -99947,11 +99934,11 @@ var MenuContent = React$4.forwardRef((props, forwardedRef) => {
|
|
|
99947
99934
|
})
|
|
99948
99935
|
});
|
|
99949
99936
|
});
|
|
99950
|
-
var MenuRootContentModal = React
|
|
99937
|
+
var MenuRootContentModal = React.forwardRef((props, forwardedRef) => {
|
|
99951
99938
|
const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
99952
|
-
const ref = React
|
|
99939
|
+
const ref = React.useRef(null);
|
|
99953
99940
|
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
99954
|
-
React
|
|
99941
|
+
React.useEffect(() => {
|
|
99955
99942
|
const content = ref.current;
|
|
99956
99943
|
if (content) return hideOthers(content);
|
|
99957
99944
|
}, []);
|
|
@@ -99965,7 +99952,7 @@ var MenuRootContentModal = React$4.forwardRef((props, forwardedRef) => {
|
|
|
99965
99952
|
onDismiss: () => context.onOpenChange(false)
|
|
99966
99953
|
});
|
|
99967
99954
|
});
|
|
99968
|
-
var MenuRootContentNonModal = React
|
|
99955
|
+
var MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {
|
|
99969
99956
|
const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
99970
99957
|
return /* @__PURE__ */ jsx(MenuContentImpl, {
|
|
99971
99958
|
...props,
|
|
@@ -99977,23 +99964,23 @@ var MenuRootContentNonModal = React$4.forwardRef((props, forwardedRef) => {
|
|
|
99977
99964
|
});
|
|
99978
99965
|
});
|
|
99979
99966
|
var Slot = /* @__PURE__ */ createSlot$1("MenuContent.ScrollLock");
|
|
99980
|
-
var MenuContentImpl = React
|
|
99967
|
+
var MenuContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
99981
99968
|
const { __scopeMenu, loop = false, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEntryFocus, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, onDismiss, disableOutsideScroll, ...contentProps } = props;
|
|
99982
99969
|
const context = useMenuContext(CONTENT_NAME$1, __scopeMenu);
|
|
99983
99970
|
const rootContext = useMenuRootContext(CONTENT_NAME$1, __scopeMenu);
|
|
99984
99971
|
const popperScope = usePopperScope(__scopeMenu);
|
|
99985
99972
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
99986
99973
|
const getItems = useCollection(__scopeMenu);
|
|
99987
|
-
const [currentItemId, setCurrentItemId] = React
|
|
99988
|
-
const contentRef = React
|
|
99974
|
+
const [currentItemId, setCurrentItemId] = React.useState(null);
|
|
99975
|
+
const contentRef = React.useRef(null);
|
|
99989
99976
|
const composedRefs = useComposedRefs$1(forwardedRef, contentRef, context.onContentChange);
|
|
99990
|
-
const timerRef = React
|
|
99991
|
-
const searchRef = React
|
|
99992
|
-
const pointerGraceTimerRef = React
|
|
99993
|
-
const pointerGraceIntentRef = React
|
|
99994
|
-
const pointerDirRef = React
|
|
99995
|
-
const lastPointerXRef = React
|
|
99996
|
-
const ScrollLockWrapper = disableOutsideScroll ? ReactRemoveScroll$1 : React
|
|
99977
|
+
const timerRef = React.useRef(0);
|
|
99978
|
+
const searchRef = React.useRef("");
|
|
99979
|
+
const pointerGraceTimerRef = React.useRef(0);
|
|
99980
|
+
const pointerGraceIntentRef = React.useRef(null);
|
|
99981
|
+
const pointerDirRef = React.useRef("right");
|
|
99982
|
+
const lastPointerXRef = React.useRef(0);
|
|
99983
|
+
const ScrollLockWrapper = disableOutsideScroll ? ReactRemoveScroll$1 : React.Fragment;
|
|
99997
99984
|
const scrollLockWrapperProps = disableOutsideScroll ? {
|
|
99998
99985
|
as: Slot,
|
|
99999
99986
|
allowPinchZoom: true
|
|
@@ -100012,29 +99999,29 @@ var MenuContentImpl = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100012
99999
|
})(search);
|
|
100013
100000
|
if (newItem) setTimeout(() => newItem.focus());
|
|
100014
100001
|
};
|
|
100015
|
-
React
|
|
100002
|
+
React.useEffect(() => {
|
|
100016
100003
|
return () => window.clearTimeout(timerRef.current);
|
|
100017
100004
|
}, []);
|
|
100018
100005
|
useFocusGuards();
|
|
100019
|
-
const isPointerMovingToSubmenu = React
|
|
100006
|
+
const isPointerMovingToSubmenu = React.useCallback((event) => {
|
|
100020
100007
|
return pointerDirRef.current === pointerGraceIntentRef.current?.side && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);
|
|
100021
100008
|
}, []);
|
|
100022
100009
|
return /* @__PURE__ */ jsx(MenuContentProvider, {
|
|
100023
100010
|
scope: __scopeMenu,
|
|
100024
100011
|
searchRef,
|
|
100025
|
-
onItemEnter: React
|
|
100012
|
+
onItemEnter: React.useCallback((event) => {
|
|
100026
100013
|
if (isPointerMovingToSubmenu(event)) event.preventDefault();
|
|
100027
100014
|
}, [isPointerMovingToSubmenu]),
|
|
100028
|
-
onItemLeave: React
|
|
100015
|
+
onItemLeave: React.useCallback((event) => {
|
|
100029
100016
|
if (isPointerMovingToSubmenu(event)) return;
|
|
100030
100017
|
contentRef.current?.focus();
|
|
100031
100018
|
setCurrentItemId(null);
|
|
100032
100019
|
}, [isPointerMovingToSubmenu]),
|
|
100033
|
-
onTriggerLeave: React
|
|
100020
|
+
onTriggerLeave: React.useCallback((event) => {
|
|
100034
100021
|
if (isPointerMovingToSubmenu(event)) event.preventDefault();
|
|
100035
100022
|
}, [isPointerMovingToSubmenu]),
|
|
100036
100023
|
pointerGraceTimerRef,
|
|
100037
|
-
onPointerGraceIntentChange: React
|
|
100024
|
+
onPointerGraceIntentChange: React.useCallback((intent) => {
|
|
100038
100025
|
pointerGraceIntentRef.current = intent;
|
|
100039
100026
|
}, []),
|
|
100040
100027
|
children: /* @__PURE__ */ jsx(ScrollLockWrapper, {
|
|
@@ -100119,7 +100106,7 @@ var MenuContentImpl = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100119
100106
|
});
|
|
100120
100107
|
MenuContent.displayName = CONTENT_NAME$1;
|
|
100121
100108
|
var GROUP_NAME$1 = "MenuGroup";
|
|
100122
|
-
var MenuGroup = React
|
|
100109
|
+
var MenuGroup = React.forwardRef((props, forwardedRef) => {
|
|
100123
100110
|
const { __scopeMenu, ...groupProps } = props;
|
|
100124
100111
|
return /* @__PURE__ */ jsx(Primitive$1.div, {
|
|
100125
100112
|
role: "group",
|
|
@@ -100129,7 +100116,7 @@ var MenuGroup = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100129
100116
|
});
|
|
100130
100117
|
MenuGroup.displayName = GROUP_NAME$1;
|
|
100131
100118
|
var LABEL_NAME$1 = "MenuLabel";
|
|
100132
|
-
var MenuLabel = React
|
|
100119
|
+
var MenuLabel = React.forwardRef((props, forwardedRef) => {
|
|
100133
100120
|
const { __scopeMenu, ...labelProps } = props;
|
|
100134
100121
|
return /* @__PURE__ */ jsx(Primitive$1.div, {
|
|
100135
100122
|
...labelProps,
|
|
@@ -100139,13 +100126,13 @@ var MenuLabel = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100139
100126
|
MenuLabel.displayName = LABEL_NAME$1;
|
|
100140
100127
|
var ITEM_NAME$1 = "MenuItem";
|
|
100141
100128
|
var ITEM_SELECT = "menu.itemSelect";
|
|
100142
|
-
var MenuItem = React
|
|
100129
|
+
var MenuItem = React.forwardRef((props, forwardedRef) => {
|
|
100143
100130
|
const { disabled = false, onSelect, ...itemProps } = props;
|
|
100144
|
-
const ref = React
|
|
100131
|
+
const ref = React.useRef(null);
|
|
100145
100132
|
const rootContext = useMenuRootContext(ITEM_NAME$1, props.__scopeMenu);
|
|
100146
100133
|
const contentContext = useMenuContentContext(ITEM_NAME$1, props.__scopeMenu);
|
|
100147
100134
|
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
100148
|
-
const isPointerDownRef = React
|
|
100135
|
+
const isPointerDownRef = React.useRef(false);
|
|
100149
100136
|
const handleSelect = () => {
|
|
100150
100137
|
const menuItem = ref.current;
|
|
100151
100138
|
if (!disabled && menuItem) {
|
|
@@ -100182,15 +100169,15 @@ var MenuItem = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100182
100169
|
});
|
|
100183
100170
|
});
|
|
100184
100171
|
MenuItem.displayName = ITEM_NAME$1;
|
|
100185
|
-
var MenuItemImpl = React
|
|
100172
|
+
var MenuItemImpl = React.forwardRef((props, forwardedRef) => {
|
|
100186
100173
|
const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;
|
|
100187
100174
|
const contentContext = useMenuContentContext(ITEM_NAME$1, __scopeMenu);
|
|
100188
100175
|
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);
|
|
100189
|
-
const ref = React
|
|
100176
|
+
const ref = React.useRef(null);
|
|
100190
100177
|
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
100191
|
-
const [isFocused, setIsFocused] = React
|
|
100192
|
-
const [textContent, setTextContent] = React
|
|
100193
|
-
React
|
|
100178
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
100179
|
+
const [textContent, setTextContent] = React.useState("");
|
|
100180
|
+
React.useEffect(() => {
|
|
100194
100181
|
const menuItem = ref.current;
|
|
100195
100182
|
if (menuItem) setTextContent((menuItem.textContent ?? "").trim());
|
|
100196
100183
|
}, [itemProps.children]);
|
|
@@ -100224,7 +100211,7 @@ var MenuItemImpl = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100224
100211
|
});
|
|
100225
100212
|
});
|
|
100226
100213
|
var CHECKBOX_ITEM_NAME$1 = "MenuCheckboxItem";
|
|
100227
|
-
var MenuCheckboxItem = React
|
|
100214
|
+
var MenuCheckboxItem = React.forwardRef((props, forwardedRef) => {
|
|
100228
100215
|
const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
|
|
100229
100216
|
return /* @__PURE__ */ jsx(ItemIndicatorProvider, {
|
|
100230
100217
|
scope: props.__scopeMenu,
|
|
@@ -100245,7 +100232,7 @@ var [RadioGroupProvider, useRadioGroupContext] = createMenuContext(RADIO_GROUP_N
|
|
|
100245
100232
|
value: void 0,
|
|
100246
100233
|
onValueChange: () => {}
|
|
100247
100234
|
});
|
|
100248
|
-
var MenuRadioGroup = React
|
|
100235
|
+
var MenuRadioGroup = React.forwardRef((props, forwardedRef) => {
|
|
100249
100236
|
const { value, onValueChange, ...groupProps } = props;
|
|
100250
100237
|
const handleValueChange = useCallbackRef$1(onValueChange);
|
|
100251
100238
|
return /* @__PURE__ */ jsx(RadioGroupProvider, {
|
|
@@ -100260,7 +100247,7 @@ var MenuRadioGroup = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100260
100247
|
});
|
|
100261
100248
|
MenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
|
|
100262
100249
|
var RADIO_ITEM_NAME$1 = "MenuRadioItem";
|
|
100263
|
-
var MenuRadioItem = React
|
|
100250
|
+
var MenuRadioItem = React.forwardRef((props, forwardedRef) => {
|
|
100264
100251
|
const { value, ...radioItemProps } = props;
|
|
100265
100252
|
const context = useRadioGroupContext(RADIO_ITEM_NAME$1, props.__scopeMenu);
|
|
100266
100253
|
const checked = value === context.value;
|
|
@@ -100280,7 +100267,7 @@ var MenuRadioItem = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100280
100267
|
MenuRadioItem.displayName = RADIO_ITEM_NAME$1;
|
|
100281
100268
|
var ITEM_INDICATOR_NAME = "MenuItemIndicator";
|
|
100282
100269
|
var [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(ITEM_INDICATOR_NAME, { checked: false });
|
|
100283
|
-
var MenuItemIndicator = React
|
|
100270
|
+
var MenuItemIndicator = React.forwardRef((props, forwardedRef) => {
|
|
100284
100271
|
const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
|
|
100285
100272
|
const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);
|
|
100286
100273
|
return /* @__PURE__ */ jsx(Presence, {
|
|
@@ -100294,7 +100281,7 @@ var MenuItemIndicator = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100294
100281
|
});
|
|
100295
100282
|
MenuItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
100296
100283
|
var SEPARATOR_NAME$1 = "MenuSeparator";
|
|
100297
|
-
var MenuSeparator = React
|
|
100284
|
+
var MenuSeparator = React.forwardRef((props, forwardedRef) => {
|
|
100298
100285
|
const { __scopeMenu, ...separatorProps } = props;
|
|
100299
100286
|
return /* @__PURE__ */ jsx(Primitive$1.div, {
|
|
100300
100287
|
role: "separator",
|
|
@@ -100305,7 +100292,7 @@ var MenuSeparator = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100305
100292
|
});
|
|
100306
100293
|
MenuSeparator.displayName = SEPARATOR_NAME$1;
|
|
100307
100294
|
var ARROW_NAME$1 = "MenuArrow";
|
|
100308
|
-
var MenuArrow = React
|
|
100295
|
+
var MenuArrow = React.forwardRef((props, forwardedRef) => {
|
|
100309
100296
|
const { __scopeMenu, ...arrowProps } = props;
|
|
100310
100297
|
return /* @__PURE__ */ jsx(Arrow, {
|
|
100311
100298
|
...usePopperScope(__scopeMenu),
|
|
@@ -100320,10 +100307,10 @@ var MenuSub = (props) => {
|
|
|
100320
100307
|
const { __scopeMenu, children, open = false, onOpenChange } = props;
|
|
100321
100308
|
const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);
|
|
100322
100309
|
const popperScope = usePopperScope(__scopeMenu);
|
|
100323
|
-
const [trigger, setTrigger] = React
|
|
100324
|
-
const [content, setContent] = React
|
|
100310
|
+
const [trigger, setTrigger] = React.useState(null);
|
|
100311
|
+
const [content, setContent] = React.useState(null);
|
|
100325
100312
|
const handleOpenChange = useCallbackRef$1(onOpenChange);
|
|
100326
|
-
React
|
|
100313
|
+
React.useEffect(() => {
|
|
100327
100314
|
if (parentMenuContext.open === false) handleOpenChange(false);
|
|
100328
100315
|
return () => handleOpenChange(false);
|
|
100329
100316
|
}, [parentMenuContext.open, handleOpenChange]);
|
|
@@ -100348,20 +100335,20 @@ var MenuSub = (props) => {
|
|
|
100348
100335
|
};
|
|
100349
100336
|
MenuSub.displayName = SUB_NAME;
|
|
100350
100337
|
var SUB_TRIGGER_NAME$1 = "MenuSubTrigger";
|
|
100351
|
-
var MenuSubTrigger = React
|
|
100338
|
+
var MenuSubTrigger = React.forwardRef((props, forwardedRef) => {
|
|
100352
100339
|
const context = useMenuContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
100353
100340
|
const rootContext = useMenuRootContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
100354
100341
|
const subContext = useMenuSubContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
100355
100342
|
const contentContext = useMenuContentContext(SUB_TRIGGER_NAME$1, props.__scopeMenu);
|
|
100356
|
-
const openTimerRef = React
|
|
100343
|
+
const openTimerRef = React.useRef(null);
|
|
100357
100344
|
const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;
|
|
100358
100345
|
const scope = { __scopeMenu: props.__scopeMenu };
|
|
100359
|
-
const clearOpenTimer = React
|
|
100346
|
+
const clearOpenTimer = React.useCallback(() => {
|
|
100360
100347
|
if (openTimerRef.current) window.clearTimeout(openTimerRef.current);
|
|
100361
100348
|
openTimerRef.current = null;
|
|
100362
100349
|
}, []);
|
|
100363
|
-
React
|
|
100364
|
-
React
|
|
100350
|
+
React.useEffect(() => clearOpenTimer, [clearOpenTimer]);
|
|
100351
|
+
React.useEffect(() => {
|
|
100365
100352
|
const pointerGraceTimer = pointerGraceTimerRef.current;
|
|
100366
100353
|
return () => {
|
|
100367
100354
|
window.clearTimeout(pointerGraceTimer);
|
|
@@ -100452,13 +100439,13 @@ var MenuSubTrigger = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100452
100439
|
});
|
|
100453
100440
|
MenuSubTrigger.displayName = SUB_TRIGGER_NAME$1;
|
|
100454
100441
|
var SUB_CONTENT_NAME$1 = "MenuSubContent";
|
|
100455
|
-
var MenuSubContent = React
|
|
100442
|
+
var MenuSubContent = React.forwardRef((props, forwardedRef) => {
|
|
100456
100443
|
const portalContext = usePortalContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
100457
100444
|
const { forceMount = portalContext.forceMount, ...subContentProps } = props;
|
|
100458
100445
|
const context = useMenuContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
100459
100446
|
const rootContext = useMenuRootContext(CONTENT_NAME$1, props.__scopeMenu);
|
|
100460
100447
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME$1, props.__scopeMenu);
|
|
100461
|
-
const ref = React
|
|
100448
|
+
const ref = React.useRef(null);
|
|
100462
100449
|
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
100463
100450
|
return /* @__PURE__ */ jsx(Collection.Provider, {
|
|
100464
100451
|
scope: props.__scopeMenu,
|
|
@@ -100579,7 +100566,7 @@ var [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(D
|
|
|
100579
100566
|
var DropdownMenu = (props) => {
|
|
100580
100567
|
const { __scopeDropdownMenu, children, dir, open: openProp, defaultOpen, onOpenChange, modal = true } = props;
|
|
100581
100568
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
100582
|
-
const triggerRef = React
|
|
100569
|
+
const triggerRef = React.useRef(null);
|
|
100583
100570
|
const [open, setOpen] = useControllableState({
|
|
100584
100571
|
prop: openProp,
|
|
100585
100572
|
defaultProp: defaultOpen ?? false,
|
|
@@ -100593,7 +100580,7 @@ var DropdownMenu = (props) => {
|
|
|
100593
100580
|
contentId: useId$1(),
|
|
100594
100581
|
open,
|
|
100595
100582
|
onOpenChange: setOpen,
|
|
100596
|
-
onOpenToggle: React
|
|
100583
|
+
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
100597
100584
|
modal,
|
|
100598
100585
|
children: /* @__PURE__ */ jsx(Root3, {
|
|
100599
100586
|
...menuScope,
|
|
@@ -100607,7 +100594,7 @@ var DropdownMenu = (props) => {
|
|
|
100607
100594
|
};
|
|
100608
100595
|
DropdownMenu.displayName = DROPDOWN_MENU_NAME;
|
|
100609
100596
|
var TRIGGER_NAME = "DropdownMenuTrigger";
|
|
100610
|
-
var DropdownMenuTrigger = React
|
|
100597
|
+
var DropdownMenuTrigger = React.forwardRef((props, forwardedRef) => {
|
|
100611
100598
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
100612
100599
|
const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);
|
|
100613
100600
|
return /* @__PURE__ */ jsx(Anchor2, {
|
|
@@ -100654,11 +100641,11 @@ var DropdownMenuPortal = (props) => {
|
|
|
100654
100641
|
};
|
|
100655
100642
|
DropdownMenuPortal.displayName = PORTAL_NAME;
|
|
100656
100643
|
var CONTENT_NAME = "DropdownMenuContent";
|
|
100657
|
-
var DropdownMenuContent = React
|
|
100644
|
+
var DropdownMenuContent = React.forwardRef((props, forwardedRef) => {
|
|
100658
100645
|
const { __scopeDropdownMenu, ...contentProps } = props;
|
|
100659
100646
|
const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);
|
|
100660
100647
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
100661
|
-
const hasInteractedOutsideRef = React
|
|
100648
|
+
const hasInteractedOutsideRef = React.useRef(false);
|
|
100662
100649
|
return /* @__PURE__ */ jsx(Content2$1, {
|
|
100663
100650
|
id: context.contentId,
|
|
100664
100651
|
"aria-labelledby": context.triggerId,
|
|
@@ -100688,7 +100675,7 @@ var DropdownMenuContent = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100688
100675
|
});
|
|
100689
100676
|
DropdownMenuContent.displayName = CONTENT_NAME;
|
|
100690
100677
|
var GROUP_NAME = "DropdownMenuGroup";
|
|
100691
|
-
var DropdownMenuGroup = React
|
|
100678
|
+
var DropdownMenuGroup = React.forwardRef((props, forwardedRef) => {
|
|
100692
100679
|
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
100693
100680
|
return /* @__PURE__ */ jsx(Group, {
|
|
100694
100681
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100698,7 +100685,7 @@ var DropdownMenuGroup = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100698
100685
|
});
|
|
100699
100686
|
DropdownMenuGroup.displayName = GROUP_NAME;
|
|
100700
100687
|
var LABEL_NAME = "DropdownMenuLabel";
|
|
100701
|
-
var DropdownMenuLabel = React
|
|
100688
|
+
var DropdownMenuLabel = React.forwardRef((props, forwardedRef) => {
|
|
100702
100689
|
const { __scopeDropdownMenu, ...labelProps } = props;
|
|
100703
100690
|
return /* @__PURE__ */ jsx(Label, {
|
|
100704
100691
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100708,7 +100695,7 @@ var DropdownMenuLabel = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100708
100695
|
});
|
|
100709
100696
|
DropdownMenuLabel.displayName = LABEL_NAME;
|
|
100710
100697
|
var ITEM_NAME = "DropdownMenuItem";
|
|
100711
|
-
var DropdownMenuItem = React
|
|
100698
|
+
var DropdownMenuItem = React.forwardRef((props, forwardedRef) => {
|
|
100712
100699
|
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
100713
100700
|
return /* @__PURE__ */ jsx(Item2, {
|
|
100714
100701
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100718,7 +100705,7 @@ var DropdownMenuItem = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100718
100705
|
});
|
|
100719
100706
|
DropdownMenuItem.displayName = ITEM_NAME;
|
|
100720
100707
|
var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
100721
|
-
var DropdownMenuCheckboxItem = React
|
|
100708
|
+
var DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {
|
|
100722
100709
|
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
100723
100710
|
return /* @__PURE__ */ jsx(CheckboxItem, {
|
|
100724
100711
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100728,7 +100715,7 @@ var DropdownMenuCheckboxItem = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100728
100715
|
});
|
|
100729
100716
|
DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
|
|
100730
100717
|
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
100731
|
-
var DropdownMenuRadioGroup = React
|
|
100718
|
+
var DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {
|
|
100732
100719
|
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
100733
100720
|
return /* @__PURE__ */ jsx(RadioGroup, {
|
|
100734
100721
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100738,7 +100725,7 @@ var DropdownMenuRadioGroup = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100738
100725
|
});
|
|
100739
100726
|
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
|
|
100740
100727
|
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
100741
|
-
var DropdownMenuRadioItem = React
|
|
100728
|
+
var DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {
|
|
100742
100729
|
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
100743
100730
|
return /* @__PURE__ */ jsx(RadioItem, {
|
|
100744
100731
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100748,7 +100735,7 @@ var DropdownMenuRadioItem = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100748
100735
|
});
|
|
100749
100736
|
DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
|
|
100750
100737
|
var INDICATOR_NAME = "DropdownMenuItemIndicator";
|
|
100751
|
-
var DropdownMenuItemIndicator = React
|
|
100738
|
+
var DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {
|
|
100752
100739
|
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
100753
100740
|
return /* @__PURE__ */ jsx(ItemIndicator, {
|
|
100754
100741
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100758,7 +100745,7 @@ var DropdownMenuItemIndicator = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100758
100745
|
});
|
|
100759
100746
|
DropdownMenuItemIndicator.displayName = INDICATOR_NAME;
|
|
100760
100747
|
var SEPARATOR_NAME = "DropdownMenuSeparator";
|
|
100761
|
-
var DropdownMenuSeparator = React
|
|
100748
|
+
var DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {
|
|
100762
100749
|
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
100763
100750
|
return /* @__PURE__ */ jsx(Separator, {
|
|
100764
100751
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100768,7 +100755,7 @@ var DropdownMenuSeparator = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100768
100755
|
});
|
|
100769
100756
|
DropdownMenuSeparator.displayName = SEPARATOR_NAME;
|
|
100770
100757
|
var ARROW_NAME = "DropdownMenuArrow";
|
|
100771
|
-
var DropdownMenuArrow = React
|
|
100758
|
+
var DropdownMenuArrow = React.forwardRef((props, forwardedRef) => {
|
|
100772
100759
|
const { __scopeDropdownMenu, ...arrowProps } = props;
|
|
100773
100760
|
return /* @__PURE__ */ jsx(Arrow2, {
|
|
100774
100761
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100778,7 +100765,7 @@ var DropdownMenuArrow = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100778
100765
|
});
|
|
100779
100766
|
DropdownMenuArrow.displayName = ARROW_NAME;
|
|
100780
100767
|
var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
100781
|
-
var DropdownMenuSubTrigger = React
|
|
100768
|
+
var DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {
|
|
100782
100769
|
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
100783
100770
|
return /* @__PURE__ */ jsx(SubTrigger, {
|
|
100784
100771
|
...useMenuScope(__scopeDropdownMenu),
|
|
@@ -100788,7 +100775,7 @@ var DropdownMenuSubTrigger = React$4.forwardRef((props, forwardedRef) => {
|
|
|
100788
100775
|
});
|
|
100789
100776
|
DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;
|
|
100790
100777
|
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
100791
|
-
var DropdownMenuSubContent = React
|
|
100778
|
+
var DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {
|
|
100792
100779
|
const { __scopeDropdownMenu, ...subContentProps } = props;
|
|
100793
100780
|
return /* @__PURE__ */ jsx(SubContent, {
|
|
100794
100781
|
...useMenuScope(__scopeDropdownMenu),
|