autumn-js 0.0.72 → 0.0.74
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/components.json +2 -2
- package/dist/libraries/backend/better-auth.d.mts +8 -0
- package/dist/libraries/backend/better-auth.d.ts +8 -0
- package/dist/libraries/backend/better-auth.js +20061 -0
- package/dist/libraries/backend/better-auth.mjs +19201 -0
- package/dist/libraries/backend/{chunk-6DZX6EAA.mjs → chunk-XGB3TDIC.mjs} +5 -0
- package/dist/libraries/backend/constants.mjs +1 -1
- package/dist/libraries/backend/express.d.mts +1 -1
- package/dist/libraries/backend/express.d.ts +1 -1
- package/dist/libraries/backend/express.mjs +1 -1
- package/dist/libraries/backend/fastify.mjs +1 -1
- package/dist/libraries/backend/hono.mjs +1 -1
- package/dist/libraries/backend/next.mjs +1 -1
- package/dist/libraries/backend/react-router.mjs +1 -1
- package/dist/libraries/backend/{referralTypes-qdpA4XBw.d.ts → referralTypes-CSbCGBim.d.ts} +2 -0
- package/dist/libraries/backend/{referralTypes-C-jpvu6u.d.mts → referralTypes-DiYwS4QY.d.mts} +2 -0
- package/dist/libraries/backend/remix_dep.mjs +1 -1
- package/dist/libraries/backend/routes/backendRouter.mjs +1 -1
- package/dist/libraries/backend/routes/entityRoutes.mjs +1 -1
- package/dist/libraries/backend/routes/genRoutes.mjs +1 -1
- package/dist/libraries/backend/routes/productRoutes.mjs +1 -1
- package/dist/libraries/backend/routes/referralRoutes.mjs +1 -1
- package/dist/libraries/backend/supabase.mjs +1 -1
- package/dist/libraries/backend/tanstack.mjs +1 -1
- package/dist/libraries/backend/utils/backendRes.mjs +1 -1
- package/dist/libraries/backend/utils/logBackendErrors.mjs +1 -1
- package/dist/libraries/backend/utils/secretKeyCheck.mjs +1 -1
- package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
- package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
- package/dist/libraries/backend/utils/withAuth.mjs +1 -1
- package/dist/libraries/react/AutumnContext.d.mts +3 -3
- package/dist/libraries/react/AutumnContext.d.ts +3 -3
- package/dist/libraries/react/AutumnContext.js +11 -7
- package/dist/libraries/react/AutumnContext.mjs +7 -7
- package/dist/libraries/react/BaseAutumnProvider.d.mts +3 -3
- package/dist/libraries/react/BaseAutumnProvider.d.ts +3 -3
- package/dist/libraries/react/BaseAutumnProvider.js +5722 -179
- package/dist/libraries/react/BaseAutumnProvider.mjs +21 -12
- package/dist/libraries/react/{ReactAutumnClient-4e3t4WTF.d.mts → ReactAutumnClient-BT7tsOG0.d.mts} +2 -2
- package/dist/libraries/react/{ReactAutumnClient-B-lWmwRW.d.ts → ReactAutumnClient-DfDXFLBI.d.ts} +2 -2
- package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -1
- package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -1
- package/dist/libraries/react/ReactAutumnProvider.js +5729 -182
- package/dist/libraries/react/ReactAutumnProvider.mjs +21 -13
- package/dist/libraries/react/{checkTypes-BDNI_s2B.d.ts → checkTypes-ByzZ-KO2.d.ts} +2 -0
- package/dist/libraries/react/{checkTypes-CyKIOmeF.d.mts → checkTypes-h2Fyyuh0.d.mts} +2 -0
- package/dist/libraries/react/{chunk-4PX3AQKX.mjs → chunk-27OTS3Q5.mjs} +9 -9
- package/dist/libraries/react/{chunk-TBCLSIC2.mjs → chunk-3EYF7OI5.mjs} +1 -1
- package/dist/libraries/react/{chunk-4CGZZYLG.mjs → chunk-4J6OC4ZQ.mjs} +46 -1
- package/dist/libraries/react/chunk-5FZ7IV6P.mjs +2021 -0
- package/dist/libraries/react/{chunk-B7HGBQCO.mjs → chunk-6N2SUOJ6.mjs} +1 -1
- package/dist/libraries/react/{chunk-LS3NB4DU.mjs → chunk-77N4ARHR.mjs} +2 -2
- package/dist/libraries/react/chunk-CMO5LYYU.mjs +241 -0
- package/dist/libraries/react/{chunk-7PRD7RPD.mjs → chunk-D3H6GCJ4.mjs} +2 -2
- package/dist/libraries/react/chunk-FEFGYFXQ.mjs +134 -0
- package/dist/libraries/react/chunk-FPI3PLEL.mjs +218 -0
- package/dist/libraries/react/chunk-KQT5G3HT.mjs +27 -0
- package/dist/libraries/react/chunk-MF3MHICX.mjs +983 -0
- package/dist/libraries/react/{chunk-O4HHXBGR.mjs → chunk-P2O4LZFD.mjs} +30 -30
- package/dist/libraries/react/{chunk-Q7CK32YT.mjs → chunk-PFTFPWFN.mjs} +26 -8
- package/dist/libraries/react/{chunk-CE5BBB5H.mjs → chunk-TLRISML2.mjs} +10 -9
- package/dist/libraries/react/{chunk-4KKWHG2V.mjs → chunk-V5PKOA5A.mjs} +1 -1
- package/dist/libraries/react/client/ReactAutumnClient.d.mts +3 -3
- package/dist/libraries/react/client/ReactAutumnClient.d.ts +3 -3
- package/dist/libraries/react/client/ReactAutumnClient.js +11 -7
- package/dist/libraries/react/client/ReactAutumnClient.mjs +6 -6
- package/dist/libraries/react/client/clientCompMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientCompMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientCusMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientCusMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientEntityMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientEntityMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientEntityMethods.js +9 -6
- package/dist/libraries/react/client/clientEntityMethods.mjs +2 -2
- package/dist/libraries/react/client/clientGenMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientGenMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientGenMethods.js +10 -7
- package/dist/libraries/react/client/clientGenMethods.mjs +2 -2
- package/dist/libraries/react/client/clientProdMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientProdMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientReferralMethods.d.mts +3 -3
- package/dist/libraries/react/client/clientReferralMethods.d.ts +3 -3
- package/dist/libraries/react/client/clientReferralMethods.js +9 -6
- package/dist/libraries/react/client/clientReferralMethods.mjs +2 -2
- package/dist/libraries/react/client/types/clientGenTypes.d.mts +1 -0
- package/dist/libraries/react/client/types/clientGenTypes.d.ts +1 -0
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +2594 -222
- package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +18 -24
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +1 -1
- package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +1 -1
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +2260 -127
- package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +6 -4
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
- package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +2 -2
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +2 -2
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +3023 -664
- package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +18 -24
- package/dist/libraries/react/components/ui/button.d.mts +6 -6
- package/dist/libraries/react/components/ui/button.d.ts +6 -6
- package/dist/libraries/react/components/ui/button.js +206 -31
- package/dist/libraries/react/components/ui/button.mjs +3 -2
- package/dist/libraries/react/components/ui/dialog.d.mts +16 -12
- package/dist/libraries/react/components/ui/dialog.d.ts +16 -12
- package/dist/libraries/react/components/ui/dialog.js +2254 -148
- package/dist/libraries/react/components/ui/dialog.mjs +5 -2
- package/dist/libraries/react/components/ui/switch.d.mts +2 -3
- package/dist/libraries/react/components/ui/switch.d.ts +2 -3
- package/dist/libraries/react/components/ui/switch.js +575 -29
- package/dist/libraries/react/components/ui/switch.mjs +5 -2
- package/dist/libraries/react/hooks/useAutumn.d.mts +3 -3
- package/dist/libraries/react/hooks/useAutumn.d.ts +3 -3
- package/dist/libraries/react/hooks/useAutumn.js +5793 -134
- package/dist/libraries/react/hooks/useAutumn.mjs +22 -10
- package/dist/libraries/react/hooks/useAutumnBase.d.mts +3 -3
- package/dist/libraries/react/hooks/useAutumnBase.d.ts +3 -3
- package/dist/libraries/react/hooks/useAutumnBase.js +5789 -130
- package/dist/libraries/react/hooks/useAutumnBase.mjs +22 -9
- package/dist/libraries/react/hooks/useCustomer.d.mts +3 -3
- package/dist/libraries/react/hooks/useCustomer.d.ts +3 -3
- package/dist/libraries/react/hooks/useCustomer.js +5718 -174
- package/dist/libraries/react/hooks/useCustomer.mjs +21 -11
- package/dist/libraries/react/hooks/useCustomerBase.d.mts +3 -3
- package/dist/libraries/react/hooks/useCustomerBase.d.ts +3 -3
- package/dist/libraries/react/hooks/useCustomerBase.js +5726 -174
- package/dist/libraries/react/hooks/useCustomerBase.mjs +21 -10
- package/dist/libraries/react/hooks/useEntity.d.mts +8 -6
- package/dist/libraries/react/hooks/useEntity.d.ts +8 -6
- package/dist/libraries/react/hooks/useEntity.js +5986 -48
- package/dist/libraries/react/hooks/useEntity.mjs +21 -9
- package/dist/libraries/react/hooks/useEntityBase.d.mts +9 -11
- package/dist/libraries/react/hooks/useEntityBase.d.ts +9 -11
- package/dist/libraries/react/hooks/useEntityBase.js +6690 -37
- package/dist/libraries/react/hooks/useEntityBase.mjs +25 -1
- package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
- package/dist/libraries/react/hooks/usePricingTable.js +36 -14
- package/dist/libraries/react/hooks/usePricingTable.mjs +9 -9
- package/dist/libraries/react/hooks/usePricingTableBase.d.mts +3 -3
- package/dist/libraries/react/hooks/usePricingTableBase.d.ts +3 -3
- package/dist/libraries/react/hooks/usePricingTableBase.js +36 -14
- package/dist/libraries/react/hooks/usePricingTableBase.mjs +8 -8
- package/dist/libraries/react/hooks/useProductsBase.js +11 -7
- package/dist/libraries/react/hooks/useProductsBase.mjs +7 -7
- package/dist/libraries/react/index.d.ts +9 -7
- package/dist/libraries/react/index.js +3478 -1089
- package/dist/libraries/react/index.mjs +3476 -1087
- package/dist/libraries/react/lib/utils.js +46 -1
- package/dist/libraries/react/lib/utils.mjs +1 -1
- package/dist/libraries/react/{response-ChCmaLBk.d.mts → response-B37tbVeT.d.mts} +1 -1
- package/dist/libraries/react/{response-9K8DyGXf.d.ts → response-CREh0tw3.d.ts} +1 -1
- package/dist/libraries/react/utils/toSnakeCase.d.mts +1 -1
- package/dist/libraries/react/utils/toSnakeCase.d.ts +1 -1
- package/dist/libraries/react/utils/toSnakeCase.js +9 -6
- package/dist/libraries/react/utils/toSnakeCase.mjs +1 -1
- package/dist/next/client/NextAutumnClient.d.mts +2 -2
- package/dist/next/client/NextAutumnClient.d.ts +2 -2
- package/dist/next/client/{checkTypes-BHxu_xEV.d.ts → checkTypes-BVlLFoUT.d.ts} +2 -0
- package/dist/next/client/{checkTypes-CEaWu4S3.d.mts → checkTypes-CGZpuidI.d.mts} +2 -0
- package/dist/next/client/{clientGenTypes-i3cKamAv.d.ts → clientGenTypes-CXkGuJ6W.d.ts} +2 -1
- package/dist/next/client/{clientGenTypes-BRfigzSY.d.mts → clientGenTypes-Dh9BiE0s.d.mts} +2 -1
- package/dist/next/client/hooks/useAutumn.d.mts +3 -3
- package/dist/next/client/hooks/useAutumn.d.ts +3 -3
- package/dist/next/client/hooks/useCustomer.d.mts +2 -2
- package/dist/next/client/hooks/useCustomer.d.ts +2 -2
- package/dist/next/client/hooks/useEntity.d.mts +7 -7
- package/dist/next/client/hooks/useEntity.d.ts +7 -7
- package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
- package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
- package/dist/next/index.d.mts +7 -6
- package/dist/next/index.d.ts +7 -6
- package/dist/next/server/cusActions.d.mts +2 -0
- package/dist/next/server/cusActions.d.ts +2 -0
- package/dist/next/server/genActions.d.mts +1 -0
- package/dist/next/server/genActions.d.ts +1 -0
- package/dist/sdk/index.d.mts +2 -0
- package/dist/sdk/index.d.ts +2 -0
- package/dist/styles/global.css +1118 -1024
- package/package.json +11 -12
- package/scripts/sync-registry.ts +79 -191
- package/tailwind.config.ts +96 -0
- package/tsup.config.ts +3 -4
- package/tsup.dev.config.ts +2 -4
- package/dist/libraries/react/chunk-2XYYCR4J.mjs +0 -276
- package/dist/libraries/react/chunk-FHANCAHB.mjs +0 -17
- package/dist/libraries/react/chunk-GTF7A5TG.mjs +0 -76
- package/dist/libraries/react/chunk-NEV76K4V.mjs +0 -552
- package/dist/libraries/react/chunk-QMIIDFRP.mjs +0 -85
- package/dist/libraries/react/chunk-TFGQQAVB.mjs +0 -38
- package/dist/libraries/react/chunk-X3HJKZGO.mjs +0 -58
- package/dist/libraries/react/chunk-ZKHBOCMO.mjs +0 -17
- package/dist/libraries/react/chunk-ZNPQQ2WK.mjs +0 -24
- package/dist/libraries/react/chunk-ZQ6LDLK5.mjs +0 -149
- package/dist/libraries/react/chunk-ZWO4QYXI.mjs +0 -20
- package/dist/libraries/react/chunk-ZXE5MFKL.mjs +0 -45
- package/tailwind.config.js +0 -57
|
@@ -41,7 +41,7 @@ __export(attach_dialog_synced_exports, {
|
|
|
41
41
|
default: () => AttachDialog
|
|
42
42
|
});
|
|
43
43
|
module.exports = __toCommonJS(attach_dialog_synced_exports);
|
|
44
|
-
var
|
|
44
|
+
var import_react12 = require("react");
|
|
45
45
|
|
|
46
46
|
// ../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
47
47
|
function r(e) {
|
|
@@ -2516,15 +2516,186 @@ var getDefaultConfig = () => {
|
|
|
2516
2516
|
}
|
|
2517
2517
|
};
|
|
2518
2518
|
};
|
|
2519
|
-
var
|
|
2519
|
+
var mergeConfigs = (baseConfig, {
|
|
2520
|
+
cacheSize,
|
|
2521
|
+
prefix,
|
|
2522
|
+
separator,
|
|
2523
|
+
experimentalParseClassName,
|
|
2524
|
+
extend = {},
|
|
2525
|
+
override = {}
|
|
2526
|
+
}) => {
|
|
2527
|
+
overrideProperty(baseConfig, "cacheSize", cacheSize);
|
|
2528
|
+
overrideProperty(baseConfig, "prefix", prefix);
|
|
2529
|
+
overrideProperty(baseConfig, "separator", separator);
|
|
2530
|
+
overrideProperty(baseConfig, "experimentalParseClassName", experimentalParseClassName);
|
|
2531
|
+
for (const configKey in override) {
|
|
2532
|
+
overrideConfigProperties(baseConfig[configKey], override[configKey]);
|
|
2533
|
+
}
|
|
2534
|
+
for (const key in extend) {
|
|
2535
|
+
mergeConfigProperties(baseConfig[key], extend[key]);
|
|
2536
|
+
}
|
|
2537
|
+
return baseConfig;
|
|
2538
|
+
};
|
|
2539
|
+
var overrideProperty = (baseObject, overrideKey, overrideValue) => {
|
|
2540
|
+
if (overrideValue !== void 0) {
|
|
2541
|
+
baseObject[overrideKey] = overrideValue;
|
|
2542
|
+
}
|
|
2543
|
+
};
|
|
2544
|
+
var overrideConfigProperties = (baseObject, overrideObject) => {
|
|
2545
|
+
if (overrideObject) {
|
|
2546
|
+
for (const key in overrideObject) {
|
|
2547
|
+
overrideProperty(baseObject, key, overrideObject[key]);
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
};
|
|
2551
|
+
var mergeConfigProperties = (baseObject, mergeObject) => {
|
|
2552
|
+
if (mergeObject) {
|
|
2553
|
+
for (const key in mergeObject) {
|
|
2554
|
+
const mergeValue = mergeObject[key];
|
|
2555
|
+
if (mergeValue !== void 0) {
|
|
2556
|
+
baseObject[key] = (baseObject[key] || []).concat(mergeValue);
|
|
2557
|
+
}
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
};
|
|
2561
|
+
var extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === "function" ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);
|
|
2520
2562
|
|
|
2521
2563
|
// src/libraries/react/lib/utils.ts
|
|
2564
|
+
var twMerge = extendTailwindMerge({
|
|
2565
|
+
prefix: "au-"
|
|
2566
|
+
});
|
|
2522
2567
|
function cn(...inputs) {
|
|
2523
2568
|
return twMerge(clsx(inputs));
|
|
2524
2569
|
}
|
|
2525
2570
|
|
|
2526
2571
|
// src/libraries/react/components/ui/button.tsx
|
|
2527
|
-
var
|
|
2572
|
+
var React3 = __toESM(require("react"));
|
|
2573
|
+
|
|
2574
|
+
// ../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
2575
|
+
var React2 = __toESM(require("react"), 1);
|
|
2576
|
+
|
|
2577
|
+
// ../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
2578
|
+
var React = __toESM(require("react"), 1);
|
|
2579
|
+
function setRef(ref, value) {
|
|
2580
|
+
if (typeof ref === "function") {
|
|
2581
|
+
return ref(value);
|
|
2582
|
+
} else if (ref !== null && ref !== void 0) {
|
|
2583
|
+
ref.current = value;
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
function composeRefs(...refs) {
|
|
2587
|
+
return (node) => {
|
|
2588
|
+
let hasCleanup = false;
|
|
2589
|
+
const cleanups = refs.map((ref) => {
|
|
2590
|
+
const cleanup = setRef(ref, node);
|
|
2591
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
2592
|
+
hasCleanup = true;
|
|
2593
|
+
}
|
|
2594
|
+
return cleanup;
|
|
2595
|
+
});
|
|
2596
|
+
if (hasCleanup) {
|
|
2597
|
+
return () => {
|
|
2598
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
2599
|
+
const cleanup = cleanups[i];
|
|
2600
|
+
if (typeof cleanup == "function") {
|
|
2601
|
+
cleanup();
|
|
2602
|
+
} else {
|
|
2603
|
+
setRef(refs[i], null);
|
|
2604
|
+
}
|
|
2605
|
+
}
|
|
2606
|
+
};
|
|
2607
|
+
}
|
|
2608
|
+
};
|
|
2609
|
+
}
|
|
2610
|
+
function useComposedRefs(...refs) {
|
|
2611
|
+
return React.useCallback(composeRefs(...refs), refs);
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
// ../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
2615
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
2616
|
+
// @__NO_SIDE_EFFECTS__
|
|
2617
|
+
function createSlot(ownerName) {
|
|
2618
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
2619
|
+
const Slot22 = React2.forwardRef((props, forwardedRef) => {
|
|
2620
|
+
const { children, ...slotProps } = props;
|
|
2621
|
+
const childrenArray = React2.Children.toArray(children);
|
|
2622
|
+
const slottable = childrenArray.find(isSlottable);
|
|
2623
|
+
if (slottable) {
|
|
2624
|
+
const newElement = slottable.props.children;
|
|
2625
|
+
const newChildren = childrenArray.map((child) => {
|
|
2626
|
+
if (child === slottable) {
|
|
2627
|
+
if (React2.Children.count(newElement) > 1) return React2.Children.only(null);
|
|
2628
|
+
return React2.isValidElement(newElement) ? newElement.props.children : null;
|
|
2629
|
+
} else {
|
|
2630
|
+
return child;
|
|
2631
|
+
}
|
|
2632
|
+
});
|
|
2633
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React2.isValidElement(newElement) ? React2.cloneElement(newElement, void 0, newChildren) : null });
|
|
2634
|
+
}
|
|
2635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
2636
|
+
});
|
|
2637
|
+
Slot22.displayName = `${ownerName}.Slot`;
|
|
2638
|
+
return Slot22;
|
|
2639
|
+
}
|
|
2640
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
2641
|
+
// @__NO_SIDE_EFFECTS__
|
|
2642
|
+
function createSlotClone(ownerName) {
|
|
2643
|
+
const SlotClone = React2.forwardRef((props, forwardedRef) => {
|
|
2644
|
+
const { children, ...slotProps } = props;
|
|
2645
|
+
if (React2.isValidElement(children)) {
|
|
2646
|
+
const childrenRef = getElementRef(children);
|
|
2647
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
2648
|
+
if (children.type !== React2.Fragment) {
|
|
2649
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
2650
|
+
}
|
|
2651
|
+
return React2.cloneElement(children, props2);
|
|
2652
|
+
}
|
|
2653
|
+
return React2.Children.count(children) > 1 ? React2.Children.only(null) : null;
|
|
2654
|
+
});
|
|
2655
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
2656
|
+
return SlotClone;
|
|
2657
|
+
}
|
|
2658
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
2659
|
+
function isSlottable(child) {
|
|
2660
|
+
return React2.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
2661
|
+
}
|
|
2662
|
+
function mergeProps(slotProps, childProps) {
|
|
2663
|
+
const overrideProps = { ...childProps };
|
|
2664
|
+
for (const propName in childProps) {
|
|
2665
|
+
const slotPropValue = slotProps[propName];
|
|
2666
|
+
const childPropValue = childProps[propName];
|
|
2667
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
2668
|
+
if (isHandler) {
|
|
2669
|
+
if (slotPropValue && childPropValue) {
|
|
2670
|
+
overrideProps[propName] = (...args) => {
|
|
2671
|
+
const result = childPropValue(...args);
|
|
2672
|
+
slotPropValue(...args);
|
|
2673
|
+
return result;
|
|
2674
|
+
};
|
|
2675
|
+
} else if (slotPropValue) {
|
|
2676
|
+
overrideProps[propName] = slotPropValue;
|
|
2677
|
+
}
|
|
2678
|
+
} else if (propName === "style") {
|
|
2679
|
+
overrideProps[propName] = { ...slotPropValue, ...childPropValue };
|
|
2680
|
+
} else if (propName === "className") {
|
|
2681
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
2682
|
+
}
|
|
2683
|
+
}
|
|
2684
|
+
return { ...slotProps, ...overrideProps };
|
|
2685
|
+
}
|
|
2686
|
+
function getElementRef(element) {
|
|
2687
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
2688
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
2689
|
+
if (mayWarn) {
|
|
2690
|
+
return element.ref;
|
|
2691
|
+
}
|
|
2692
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
2693
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
2694
|
+
if (mayWarn) {
|
|
2695
|
+
return element.props.ref;
|
|
2696
|
+
}
|
|
2697
|
+
return element.props.ref || element.ref;
|
|
2698
|
+
}
|
|
2528
2699
|
|
|
2529
2700
|
// ../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.mjs
|
|
2530
2701
|
var falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
@@ -2569,24 +2740,24 @@ var cva = (base, config) => (props) => {
|
|
|
2569
2740
|
};
|
|
2570
2741
|
|
|
2571
2742
|
// src/libraries/react/components/ui/button.tsx
|
|
2572
|
-
var
|
|
2743
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
2573
2744
|
var buttonVariants = cva(
|
|
2574
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-
|
|
2745
|
+
"au-inline-flex au-items-center au-justify-center au-gap-2 au-whitespace-nowrap au-rounded-md au-text-sm au-font-medium au-transition-colors focus-visible:au-outline-none focus-visible:au-ring-1 focus-visible:au-ring-ring disabled:au-pointer-events-none disabled:au-opacity-50 [&_svg]:au-pointer-events-none [&_svg]:au-size-4 [&_svg]:au-shrink-0",
|
|
2575
2746
|
{
|
|
2576
2747
|
variants: {
|
|
2577
2748
|
variant: {
|
|
2578
|
-
default: "bg-primary text-primary-foreground shadow
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
ghost: "hover:bg-accent hover:text-accent-foreground
|
|
2583
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
2749
|
+
default: "au-bg-primary au-text-primary-foreground au-shadow hover:au-bg-primary/90",
|
|
2750
|
+
destructive: "au-bg-destructive au-text-destructive-foreground au-shadow-sm hover:au-bg-destructive/90",
|
|
2751
|
+
outline: "au-border au-border-input au-bg-background au-shadow-sm hover:au-bg-accent hover:au-text-accent-foreground",
|
|
2752
|
+
secondary: "au-bg-secondary au-text-secondary-foreground au-shadow-sm hover:au-bg-secondary/80",
|
|
2753
|
+
ghost: "hover:au-bg-accent hover:au-text-accent-foreground",
|
|
2754
|
+
link: "au-text-primary au-underline-offset-4 hover:au-underline"
|
|
2584
2755
|
},
|
|
2585
2756
|
size: {
|
|
2586
|
-
default: "h-9 px-4 py-2
|
|
2587
|
-
sm: "h-8 rounded-md
|
|
2588
|
-
lg: "h-10 rounded-md
|
|
2589
|
-
icon: "
|
|
2757
|
+
default: "au-h-9 au-px-4 au-py-2",
|
|
2758
|
+
sm: "au-h-8 au-rounded-md au-px-3 au-text-xs",
|
|
2759
|
+
lg: "au-h-10 au-rounded-md au-px-8",
|
|
2760
|
+
icon: "au-h-9 au-w-9"
|
|
2590
2761
|
}
|
|
2591
2762
|
},
|
|
2592
2763
|
defaultVariants: {
|
|
@@ -2595,23 +2766,20 @@ var buttonVariants = cva(
|
|
|
2595
2766
|
}
|
|
2596
2767
|
}
|
|
2597
2768
|
);
|
|
2598
|
-
|
|
2599
|
-
className,
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
})
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
}
|
|
2613
|
-
);
|
|
2614
|
-
}
|
|
2769
|
+
var Button = React3.forwardRef(
|
|
2770
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
2771
|
+
const Comp = asChild ? Slot : "button";
|
|
2772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
2773
|
+
Comp,
|
|
2774
|
+
{
|
|
2775
|
+
className: cn(buttonVariants({ variant, size }), className),
|
|
2776
|
+
ref,
|
|
2777
|
+
...props
|
|
2778
|
+
}
|
|
2779
|
+
);
|
|
2780
|
+
}
|
|
2781
|
+
);
|
|
2782
|
+
Button.displayName = "Button";
|
|
2615
2783
|
|
|
2616
2784
|
// ../node_modules/.pnpm/lucide-react@0.523.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
|
2617
2785
|
var import_react2 = require("react");
|
|
@@ -2721,98 +2889,2065 @@ var __iconNode3 = [
|
|
|
2721
2889
|
var X = createLucideIcon("x", __iconNode3);
|
|
2722
2890
|
|
|
2723
2891
|
// src/libraries/react/components/ui/dialog.tsx
|
|
2724
|
-
var
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2892
|
+
var React26 = __toESM(require("react"));
|
|
2893
|
+
|
|
2894
|
+
// ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3_osy3texbcyy7oe3sqigksqvg74/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
2895
|
+
var React25 = __toESM(require("react"), 1);
|
|
2896
|
+
|
|
2897
|
+
// ../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
2898
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
2899
|
+
return function handleEvent2(event) {
|
|
2900
|
+
originalEventHandler?.(event);
|
|
2901
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
2902
|
+
return ourEventHandler?.(event);
|
|
2903
|
+
}
|
|
2904
|
+
};
|
|
2905
|
+
}
|
|
2906
|
+
|
|
2907
|
+
// ../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
2908
|
+
var React4 = __toESM(require("react"), 1);
|
|
2909
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
2910
|
+
function createContext2(rootComponentName, defaultContext) {
|
|
2911
|
+
const Context = React4.createContext(defaultContext);
|
|
2912
|
+
const Provider = (props) => {
|
|
2913
|
+
const { children, ...context } = props;
|
|
2914
|
+
const value = React4.useMemo(() => context, Object.values(context));
|
|
2915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Context.Provider, { value, children });
|
|
2916
|
+
};
|
|
2917
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
2918
|
+
function useContext22(consumerName) {
|
|
2919
|
+
const context = React4.useContext(Context);
|
|
2920
|
+
if (context) return context;
|
|
2921
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
2922
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
2923
|
+
}
|
|
2924
|
+
return [Provider, useContext22];
|
|
2925
|
+
}
|
|
2926
|
+
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
2927
|
+
let defaultContexts = [];
|
|
2928
|
+
function createContext32(rootComponentName, defaultContext) {
|
|
2929
|
+
const BaseContext = React4.createContext(defaultContext);
|
|
2930
|
+
const index = defaultContexts.length;
|
|
2931
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
2932
|
+
const Provider = (props) => {
|
|
2933
|
+
const { scope, children, ...context } = props;
|
|
2934
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
2935
|
+
const value = React4.useMemo(() => context, Object.values(context));
|
|
2936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Context.Provider, { value, children });
|
|
2937
|
+
};
|
|
2938
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
2939
|
+
function useContext22(consumerName, scope) {
|
|
2940
|
+
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
2941
|
+
const context = React4.useContext(Context);
|
|
2942
|
+
if (context) return context;
|
|
2943
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
2944
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
2945
|
+
}
|
|
2946
|
+
return [Provider, useContext22];
|
|
2947
|
+
}
|
|
2948
|
+
const createScope = () => {
|
|
2949
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
2950
|
+
return React4.createContext(defaultContext);
|
|
2951
|
+
});
|
|
2952
|
+
return function useScope(scope) {
|
|
2953
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
2954
|
+
return React4.useMemo(
|
|
2955
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
2956
|
+
[scope, contexts]
|
|
2957
|
+
);
|
|
2958
|
+
};
|
|
2959
|
+
};
|
|
2960
|
+
createScope.scopeName = scopeName;
|
|
2961
|
+
return [createContext32, composeContextScopes(createScope, ...createContextScopeDeps)];
|
|
2962
|
+
}
|
|
2963
|
+
function composeContextScopes(...scopes) {
|
|
2964
|
+
const baseScope = scopes[0];
|
|
2965
|
+
if (scopes.length === 1) return baseScope;
|
|
2966
|
+
const createScope = () => {
|
|
2967
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
2968
|
+
useScope: createScope2(),
|
|
2969
|
+
scopeName: createScope2.scopeName
|
|
2970
|
+
}));
|
|
2971
|
+
return function useComposedScopes(overrideScopes) {
|
|
2972
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
2973
|
+
const scopeProps = useScope(overrideScopes);
|
|
2974
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
2975
|
+
return { ...nextScopes2, ...currentScope };
|
|
2976
|
+
}, {});
|
|
2977
|
+
return React4.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
2978
|
+
};
|
|
2979
|
+
};
|
|
2980
|
+
createScope.scopeName = baseScope.scopeName;
|
|
2981
|
+
return createScope;
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
// ../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
2985
|
+
var React6 = __toESM(require("react"), 1);
|
|
2986
|
+
|
|
2987
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
2988
|
+
var React5 = __toESM(require("react"), 1);
|
|
2989
|
+
var useLayoutEffect2 = globalThis?.document ? React5.useLayoutEffect : () => {
|
|
2990
|
+
};
|
|
2991
|
+
|
|
2992
|
+
// ../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
2993
|
+
var useReactId = React6[" useId ".trim().toString()] || (() => void 0);
|
|
2994
|
+
var count = 0;
|
|
2995
|
+
function useId(deterministicId) {
|
|
2996
|
+
const [id, setId] = React6.useState(useReactId());
|
|
2997
|
+
useLayoutEffect2(() => {
|
|
2998
|
+
if (!deterministicId) setId((reactId) => reactId ?? String(count++));
|
|
2999
|
+
}, [deterministicId]);
|
|
3000
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
3001
|
+
}
|
|
3002
|
+
|
|
3003
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
3004
|
+
var React7 = __toESM(require("react"), 1);
|
|
3005
|
+
var React22 = __toESM(require("react"), 1);
|
|
3006
|
+
var useInsertionEffect = React7[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
3007
|
+
function useControllableState({
|
|
3008
|
+
prop,
|
|
3009
|
+
defaultProp,
|
|
3010
|
+
onChange = () => {
|
|
3011
|
+
},
|
|
3012
|
+
caller
|
|
3013
|
+
}) {
|
|
3014
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
|
|
3015
|
+
defaultProp,
|
|
3016
|
+
onChange
|
|
3017
|
+
});
|
|
3018
|
+
const isControlled = prop !== void 0;
|
|
3019
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
3020
|
+
if (true) {
|
|
3021
|
+
const isControlledRef = React7.useRef(prop !== void 0);
|
|
3022
|
+
React7.useEffect(() => {
|
|
3023
|
+
const wasControlled = isControlledRef.current;
|
|
3024
|
+
if (wasControlled !== isControlled) {
|
|
3025
|
+
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
3026
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
3027
|
+
console.warn(
|
|
3028
|
+
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
3029
|
+
);
|
|
3030
|
+
}
|
|
3031
|
+
isControlledRef.current = isControlled;
|
|
3032
|
+
}, [isControlled, caller]);
|
|
3033
|
+
}
|
|
3034
|
+
const setValue = React7.useCallback(
|
|
3035
|
+
(nextValue) => {
|
|
3036
|
+
if (isControlled) {
|
|
3037
|
+
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
3038
|
+
if (value2 !== prop) {
|
|
3039
|
+
onChangeRef.current?.(value2);
|
|
3040
|
+
}
|
|
3041
|
+
} else {
|
|
3042
|
+
setUncontrolledProp(nextValue);
|
|
3043
|
+
}
|
|
3044
|
+
},
|
|
3045
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
3046
|
+
);
|
|
3047
|
+
return [value, setValue];
|
|
3048
|
+
}
|
|
3049
|
+
function useUncontrolledState({
|
|
3050
|
+
defaultProp,
|
|
3051
|
+
onChange
|
|
2728
3052
|
}) {
|
|
2729
|
-
|
|
3053
|
+
const [value, setValue] = React7.useState(defaultProp);
|
|
3054
|
+
const prevValueRef = React7.useRef(value);
|
|
3055
|
+
const onChangeRef = React7.useRef(onChange);
|
|
3056
|
+
useInsertionEffect(() => {
|
|
3057
|
+
onChangeRef.current = onChange;
|
|
3058
|
+
}, [onChange]);
|
|
3059
|
+
React7.useEffect(() => {
|
|
3060
|
+
if (prevValueRef.current !== value) {
|
|
3061
|
+
onChangeRef.current?.(value);
|
|
3062
|
+
prevValueRef.current = value;
|
|
3063
|
+
}
|
|
3064
|
+
}, [value, prevValueRef]);
|
|
3065
|
+
return [value, setValue, onChangeRef];
|
|
3066
|
+
}
|
|
3067
|
+
function isFunction(value) {
|
|
3068
|
+
return typeof value === "function";
|
|
3069
|
+
}
|
|
3070
|
+
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
3071
|
+
|
|
3072
|
+
// ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@18.3.5_@types+react@18.3.14__@types_dcs2l2jzs5flmzhfcv6rimpkfe/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
3073
|
+
var React11 = __toESM(require("react"), 1);
|
|
3074
|
+
|
|
3075
|
+
// ../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18_t6r7cxmbmoheujv3t43yqlikou/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
3076
|
+
var React8 = __toESM(require("react"), 1);
|
|
3077
|
+
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
3078
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
3079
|
+
var NODES = [
|
|
3080
|
+
"a",
|
|
3081
|
+
"button",
|
|
3082
|
+
"div",
|
|
3083
|
+
"form",
|
|
3084
|
+
"h2",
|
|
3085
|
+
"h3",
|
|
3086
|
+
"img",
|
|
3087
|
+
"input",
|
|
3088
|
+
"label",
|
|
3089
|
+
"li",
|
|
3090
|
+
"nav",
|
|
3091
|
+
"ol",
|
|
3092
|
+
"p",
|
|
3093
|
+
"select",
|
|
3094
|
+
"span",
|
|
3095
|
+
"svg",
|
|
3096
|
+
"ul"
|
|
3097
|
+
];
|
|
3098
|
+
var Primitive = NODES.reduce((primitive, node) => {
|
|
3099
|
+
const Slot3 = createSlot(`Primitive.${node}`);
|
|
3100
|
+
const Node2 = React8.forwardRef((props, forwardedRef) => {
|
|
3101
|
+
const { asChild, ...primitiveProps } = props;
|
|
3102
|
+
const Comp = asChild ? Slot3 : node;
|
|
3103
|
+
if (typeof window !== "undefined") {
|
|
3104
|
+
window[Symbol.for("radix-ui")] = true;
|
|
3105
|
+
}
|
|
3106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
3107
|
+
});
|
|
3108
|
+
Node2.displayName = `Primitive.${node}`;
|
|
3109
|
+
return { ...primitive, [node]: Node2 };
|
|
3110
|
+
}, {});
|
|
3111
|
+
function dispatchDiscreteCustomEvent(target, event) {
|
|
3112
|
+
if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
3116
|
+
var React9 = __toESM(require("react"), 1);
|
|
3117
|
+
function useCallbackRef(callback) {
|
|
3118
|
+
const callbackRef = React9.useRef(callback);
|
|
3119
|
+
React9.useEffect(() => {
|
|
3120
|
+
callbackRef.current = callback;
|
|
3121
|
+
});
|
|
3122
|
+
return React9.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
3126
|
+
var React10 = __toESM(require("react"), 1);
|
|
3127
|
+
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
3128
|
+
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
3129
|
+
React10.useEffect(() => {
|
|
3130
|
+
const handleKeyDown = (event) => {
|
|
3131
|
+
if (event.key === "Escape") {
|
|
3132
|
+
onEscapeKeyDown(event);
|
|
3133
|
+
}
|
|
3134
|
+
};
|
|
3135
|
+
ownerDocument.addEventListener("keydown", handleKeyDown, { capture: true });
|
|
3136
|
+
return () => ownerDocument.removeEventListener("keydown", handleKeyDown, { capture: true });
|
|
3137
|
+
}, [onEscapeKeyDown, ownerDocument]);
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3140
|
+
// ../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@18.3.5_@types+react@18.3.14__@types_dcs2l2jzs5flmzhfcv6rimpkfe/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
3141
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
3142
|
+
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
3143
|
+
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
3144
|
+
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
3145
|
+
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
3146
|
+
var originalBodyPointerEvents;
|
|
3147
|
+
var DismissableLayerContext = React11.createContext({
|
|
3148
|
+
layers: /* @__PURE__ */ new Set(),
|
|
3149
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
3150
|
+
branches: /* @__PURE__ */ new Set()
|
|
3151
|
+
});
|
|
3152
|
+
var DismissableLayer = React11.forwardRef(
|
|
3153
|
+
(props, forwardedRef) => {
|
|
3154
|
+
const {
|
|
3155
|
+
disableOutsidePointerEvents = false,
|
|
3156
|
+
onEscapeKeyDown,
|
|
3157
|
+
onPointerDownOutside,
|
|
3158
|
+
onFocusOutside,
|
|
3159
|
+
onInteractOutside,
|
|
3160
|
+
onDismiss,
|
|
3161
|
+
...layerProps
|
|
3162
|
+
} = props;
|
|
3163
|
+
const context = React11.useContext(DismissableLayerContext);
|
|
3164
|
+
const [node, setNode] = React11.useState(null);
|
|
3165
|
+
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
3166
|
+
const [, force] = React11.useState({});
|
|
3167
|
+
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
3168
|
+
const layers = Array.from(context.layers);
|
|
3169
|
+
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
3170
|
+
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
3171
|
+
const index = node ? layers.indexOf(node) : -1;
|
|
3172
|
+
const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;
|
|
3173
|
+
const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;
|
|
3174
|
+
const pointerDownOutside = usePointerDownOutside((event) => {
|
|
3175
|
+
const target = event.target;
|
|
3176
|
+
const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
3177
|
+
if (!isPointerEventsEnabled || isPointerDownOnBranch) return;
|
|
3178
|
+
onPointerDownOutside?.(event);
|
|
3179
|
+
onInteractOutside?.(event);
|
|
3180
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
3181
|
+
}, ownerDocument);
|
|
3182
|
+
const focusOutside = useFocusOutside((event) => {
|
|
3183
|
+
const target = event.target;
|
|
3184
|
+
const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));
|
|
3185
|
+
if (isFocusInBranch) return;
|
|
3186
|
+
onFocusOutside?.(event);
|
|
3187
|
+
onInteractOutside?.(event);
|
|
3188
|
+
if (!event.defaultPrevented) onDismiss?.();
|
|
3189
|
+
}, ownerDocument);
|
|
3190
|
+
useEscapeKeydown((event) => {
|
|
3191
|
+
const isHighestLayer = index === context.layers.size - 1;
|
|
3192
|
+
if (!isHighestLayer) return;
|
|
3193
|
+
onEscapeKeyDown?.(event);
|
|
3194
|
+
if (!event.defaultPrevented && onDismiss) {
|
|
3195
|
+
event.preventDefault();
|
|
3196
|
+
onDismiss();
|
|
3197
|
+
}
|
|
3198
|
+
}, ownerDocument);
|
|
3199
|
+
React11.useEffect(() => {
|
|
3200
|
+
if (!node) return;
|
|
3201
|
+
if (disableOutsidePointerEvents) {
|
|
3202
|
+
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
3203
|
+
originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;
|
|
3204
|
+
ownerDocument.body.style.pointerEvents = "none";
|
|
3205
|
+
}
|
|
3206
|
+
context.layersWithOutsidePointerEventsDisabled.add(node);
|
|
3207
|
+
}
|
|
3208
|
+
context.layers.add(node);
|
|
3209
|
+
dispatchUpdate();
|
|
3210
|
+
return () => {
|
|
3211
|
+
if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {
|
|
3212
|
+
ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;
|
|
3213
|
+
}
|
|
3214
|
+
};
|
|
3215
|
+
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
3216
|
+
React11.useEffect(() => {
|
|
3217
|
+
return () => {
|
|
3218
|
+
if (!node) return;
|
|
3219
|
+
context.layers.delete(node);
|
|
3220
|
+
context.layersWithOutsidePointerEventsDisabled.delete(node);
|
|
3221
|
+
dispatchUpdate();
|
|
3222
|
+
};
|
|
3223
|
+
}, [node, context]);
|
|
3224
|
+
React11.useEffect(() => {
|
|
3225
|
+
const handleUpdate = () => force({});
|
|
3226
|
+
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
3227
|
+
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
3228
|
+
}, []);
|
|
3229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
3230
|
+
Primitive.div,
|
|
3231
|
+
{
|
|
3232
|
+
...layerProps,
|
|
3233
|
+
ref: composedRefs,
|
|
3234
|
+
style: {
|
|
3235
|
+
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
3236
|
+
...props.style
|
|
3237
|
+
},
|
|
3238
|
+
onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
3239
|
+
onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
3240
|
+
onPointerDownCapture: composeEventHandlers(
|
|
3241
|
+
props.onPointerDownCapture,
|
|
3242
|
+
pointerDownOutside.onPointerDownCapture
|
|
3243
|
+
)
|
|
3244
|
+
}
|
|
3245
|
+
);
|
|
3246
|
+
}
|
|
3247
|
+
);
|
|
3248
|
+
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
3249
|
+
var BRANCH_NAME = "DismissableLayerBranch";
|
|
3250
|
+
var DismissableLayerBranch = React11.forwardRef((props, forwardedRef) => {
|
|
3251
|
+
const context = React11.useContext(DismissableLayerContext);
|
|
3252
|
+
const ref = React11.useRef(null);
|
|
3253
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
3254
|
+
React11.useEffect(() => {
|
|
3255
|
+
const node = ref.current;
|
|
3256
|
+
if (node) {
|
|
3257
|
+
context.branches.add(node);
|
|
3258
|
+
return () => {
|
|
3259
|
+
context.branches.delete(node);
|
|
3260
|
+
};
|
|
3261
|
+
}
|
|
3262
|
+
}, [context.branches]);
|
|
3263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Primitive.div, { ...props, ref: composedRefs });
|
|
3264
|
+
});
|
|
3265
|
+
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
3266
|
+
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
3267
|
+
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
3268
|
+
const isPointerInsideReactTreeRef = React11.useRef(false);
|
|
3269
|
+
const handleClickRef = React11.useRef(() => {
|
|
3270
|
+
});
|
|
3271
|
+
React11.useEffect(() => {
|
|
3272
|
+
const handlePointerDown = (event) => {
|
|
3273
|
+
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
3274
|
+
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
3275
|
+
handleAndDispatchCustomEvent(
|
|
3276
|
+
POINTER_DOWN_OUTSIDE,
|
|
3277
|
+
handlePointerDownOutside,
|
|
3278
|
+
eventDetail,
|
|
3279
|
+
{ discrete: true }
|
|
3280
|
+
);
|
|
3281
|
+
};
|
|
3282
|
+
var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;
|
|
3283
|
+
const eventDetail = { originalEvent: event };
|
|
3284
|
+
if (event.pointerType === "touch") {
|
|
3285
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
3286
|
+
handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;
|
|
3287
|
+
ownerDocument.addEventListener("click", handleClickRef.current, { once: true });
|
|
3288
|
+
} else {
|
|
3289
|
+
handleAndDispatchPointerDownOutsideEvent2();
|
|
3290
|
+
}
|
|
3291
|
+
} else {
|
|
3292
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
3293
|
+
}
|
|
3294
|
+
isPointerInsideReactTreeRef.current = false;
|
|
3295
|
+
};
|
|
3296
|
+
const timerId = window.setTimeout(() => {
|
|
3297
|
+
ownerDocument.addEventListener("pointerdown", handlePointerDown);
|
|
3298
|
+
}, 0);
|
|
3299
|
+
return () => {
|
|
3300
|
+
window.clearTimeout(timerId);
|
|
3301
|
+
ownerDocument.removeEventListener("pointerdown", handlePointerDown);
|
|
3302
|
+
ownerDocument.removeEventListener("click", handleClickRef.current);
|
|
3303
|
+
};
|
|
3304
|
+
}, [ownerDocument, handlePointerDownOutside]);
|
|
3305
|
+
return {
|
|
3306
|
+
// ensures we check React component tree (not just DOM tree)
|
|
3307
|
+
onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true
|
|
3308
|
+
};
|
|
3309
|
+
}
|
|
3310
|
+
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
3311
|
+
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
3312
|
+
const isFocusInsideReactTreeRef = React11.useRef(false);
|
|
3313
|
+
React11.useEffect(() => {
|
|
3314
|
+
const handleFocus = (event) => {
|
|
3315
|
+
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
3316
|
+
const eventDetail = { originalEvent: event };
|
|
3317
|
+
handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {
|
|
3318
|
+
discrete: false
|
|
3319
|
+
});
|
|
3320
|
+
}
|
|
3321
|
+
};
|
|
3322
|
+
ownerDocument.addEventListener("focusin", handleFocus);
|
|
3323
|
+
return () => ownerDocument.removeEventListener("focusin", handleFocus);
|
|
3324
|
+
}, [ownerDocument, handleFocusOutside]);
|
|
3325
|
+
return {
|
|
3326
|
+
onFocusCapture: () => isFocusInsideReactTreeRef.current = true,
|
|
3327
|
+
onBlurCapture: () => isFocusInsideReactTreeRef.current = false
|
|
3328
|
+
};
|
|
3329
|
+
}
|
|
3330
|
+
function dispatchUpdate() {
|
|
3331
|
+
const event = new CustomEvent(CONTEXT_UPDATE);
|
|
3332
|
+
document.dispatchEvent(event);
|
|
3333
|
+
}
|
|
3334
|
+
function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
3335
|
+
const target = detail.originalEvent.target;
|
|
3336
|
+
const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });
|
|
3337
|
+
if (handler) target.addEventListener(name, handler, { once: true });
|
|
3338
|
+
if (discrete) {
|
|
3339
|
+
dispatchDiscreteCustomEvent(target, event);
|
|
3340
|
+
} else {
|
|
3341
|
+
target.dispatchEvent(event);
|
|
3342
|
+
}
|
|
3343
|
+
}
|
|
3344
|
+
|
|
3345
|
+
// ../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@_r3i6zfw7jzc6qbfsmvmyzd6wgu/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
3346
|
+
var React12 = __toESM(require("react"), 1);
|
|
3347
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3348
|
+
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
3349
|
+
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
3350
|
+
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
3351
|
+
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
3352
|
+
var FocusScope = React12.forwardRef((props, forwardedRef) => {
|
|
3353
|
+
const {
|
|
3354
|
+
loop = false,
|
|
3355
|
+
trapped = false,
|
|
3356
|
+
onMountAutoFocus: onMountAutoFocusProp,
|
|
3357
|
+
onUnmountAutoFocus: onUnmountAutoFocusProp,
|
|
3358
|
+
...scopeProps
|
|
3359
|
+
} = props;
|
|
3360
|
+
const [container, setContainer] = React12.useState(null);
|
|
3361
|
+
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
3362
|
+
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
3363
|
+
const lastFocusedElementRef = React12.useRef(null);
|
|
3364
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
3365
|
+
const focusScope = React12.useRef({
|
|
3366
|
+
paused: false,
|
|
3367
|
+
pause() {
|
|
3368
|
+
this.paused = true;
|
|
3369
|
+
},
|
|
3370
|
+
resume() {
|
|
3371
|
+
this.paused = false;
|
|
3372
|
+
}
|
|
3373
|
+
}).current;
|
|
3374
|
+
React12.useEffect(() => {
|
|
3375
|
+
if (trapped) {
|
|
3376
|
+
let handleFocusIn2 = function(event) {
|
|
3377
|
+
if (focusScope.paused || !container) return;
|
|
3378
|
+
const target = event.target;
|
|
3379
|
+
if (container.contains(target)) {
|
|
3380
|
+
lastFocusedElementRef.current = target;
|
|
3381
|
+
} else {
|
|
3382
|
+
focus(lastFocusedElementRef.current, { select: true });
|
|
3383
|
+
}
|
|
3384
|
+
}, handleFocusOut2 = function(event) {
|
|
3385
|
+
if (focusScope.paused || !container) return;
|
|
3386
|
+
const relatedTarget = event.relatedTarget;
|
|
3387
|
+
if (relatedTarget === null) return;
|
|
3388
|
+
if (!container.contains(relatedTarget)) {
|
|
3389
|
+
focus(lastFocusedElementRef.current, { select: true });
|
|
3390
|
+
}
|
|
3391
|
+
}, handleMutations2 = function(mutations) {
|
|
3392
|
+
const focusedElement = document.activeElement;
|
|
3393
|
+
if (focusedElement !== document.body) return;
|
|
3394
|
+
for (const mutation of mutations) {
|
|
3395
|
+
if (mutation.removedNodes.length > 0) focus(container);
|
|
3396
|
+
}
|
|
3397
|
+
};
|
|
3398
|
+
var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;
|
|
3399
|
+
document.addEventListener("focusin", handleFocusIn2);
|
|
3400
|
+
document.addEventListener("focusout", handleFocusOut2);
|
|
3401
|
+
const mutationObserver = new MutationObserver(handleMutations2);
|
|
3402
|
+
if (container) mutationObserver.observe(container, { childList: true, subtree: true });
|
|
3403
|
+
return () => {
|
|
3404
|
+
document.removeEventListener("focusin", handleFocusIn2);
|
|
3405
|
+
document.removeEventListener("focusout", handleFocusOut2);
|
|
3406
|
+
mutationObserver.disconnect();
|
|
3407
|
+
};
|
|
3408
|
+
}
|
|
3409
|
+
}, [trapped, container, focusScope.paused]);
|
|
3410
|
+
React12.useEffect(() => {
|
|
3411
|
+
if (container) {
|
|
3412
|
+
focusScopesStack.add(focusScope);
|
|
3413
|
+
const previouslyFocusedElement = document.activeElement;
|
|
3414
|
+
const hasFocusedCandidate = container.contains(previouslyFocusedElement);
|
|
3415
|
+
if (!hasFocusedCandidate) {
|
|
3416
|
+
const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);
|
|
3417
|
+
container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
3418
|
+
container.dispatchEvent(mountEvent);
|
|
3419
|
+
if (!mountEvent.defaultPrevented) {
|
|
3420
|
+
focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });
|
|
3421
|
+
if (document.activeElement === previouslyFocusedElement) {
|
|
3422
|
+
focus(container);
|
|
3423
|
+
}
|
|
3424
|
+
}
|
|
3425
|
+
}
|
|
3426
|
+
return () => {
|
|
3427
|
+
container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);
|
|
3428
|
+
setTimeout(() => {
|
|
3429
|
+
const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);
|
|
3430
|
+
container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
3431
|
+
container.dispatchEvent(unmountEvent);
|
|
3432
|
+
if (!unmountEvent.defaultPrevented) {
|
|
3433
|
+
focus(previouslyFocusedElement ?? document.body, { select: true });
|
|
3434
|
+
}
|
|
3435
|
+
container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);
|
|
3436
|
+
focusScopesStack.remove(focusScope);
|
|
3437
|
+
}, 0);
|
|
3438
|
+
};
|
|
3439
|
+
}
|
|
3440
|
+
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
3441
|
+
const handleKeyDown = React12.useCallback(
|
|
3442
|
+
(event) => {
|
|
3443
|
+
if (!loop && !trapped) return;
|
|
3444
|
+
if (focusScope.paused) return;
|
|
3445
|
+
const isTabKey = event.key === "Tab" && !event.altKey && !event.ctrlKey && !event.metaKey;
|
|
3446
|
+
const focusedElement = document.activeElement;
|
|
3447
|
+
if (isTabKey && focusedElement) {
|
|
3448
|
+
const container2 = event.currentTarget;
|
|
3449
|
+
const [first, last] = getTabbableEdges(container2);
|
|
3450
|
+
const hasTabbableElementsInside = first && last;
|
|
3451
|
+
if (!hasTabbableElementsInside) {
|
|
3452
|
+
if (focusedElement === container2) event.preventDefault();
|
|
3453
|
+
} else {
|
|
3454
|
+
if (!event.shiftKey && focusedElement === last) {
|
|
3455
|
+
event.preventDefault();
|
|
3456
|
+
if (loop) focus(first, { select: true });
|
|
3457
|
+
} else if (event.shiftKey && focusedElement === first) {
|
|
3458
|
+
event.preventDefault();
|
|
3459
|
+
if (loop) focus(last, { select: true });
|
|
3460
|
+
}
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3463
|
+
},
|
|
3464
|
+
[loop, trapped, focusScope.paused]
|
|
3465
|
+
);
|
|
3466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
3467
|
+
});
|
|
3468
|
+
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
3469
|
+
function focusFirst(candidates, { select = false } = {}) {
|
|
3470
|
+
const previouslyFocusedElement = document.activeElement;
|
|
3471
|
+
for (const candidate of candidates) {
|
|
3472
|
+
focus(candidate, { select });
|
|
3473
|
+
if (document.activeElement !== previouslyFocusedElement) return;
|
|
3474
|
+
}
|
|
3475
|
+
}
|
|
3476
|
+
function getTabbableEdges(container) {
|
|
3477
|
+
const candidates = getTabbableCandidates(container);
|
|
3478
|
+
const first = findVisible(candidates, container);
|
|
3479
|
+
const last = findVisible(candidates.reverse(), container);
|
|
3480
|
+
return [first, last];
|
|
3481
|
+
}
|
|
3482
|
+
function getTabbableCandidates(container) {
|
|
3483
|
+
const nodes = [];
|
|
3484
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
3485
|
+
acceptNode: (node) => {
|
|
3486
|
+
const isHiddenInput = node.tagName === "INPUT" && node.type === "hidden";
|
|
3487
|
+
if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;
|
|
3488
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
3489
|
+
}
|
|
3490
|
+
});
|
|
3491
|
+
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
3492
|
+
return nodes;
|
|
3493
|
+
}
|
|
3494
|
+
function findVisible(elements, container) {
|
|
3495
|
+
for (const element of elements) {
|
|
3496
|
+
if (!isHidden(element, { upTo: container })) return element;
|
|
3497
|
+
}
|
|
3498
|
+
}
|
|
3499
|
+
function isHidden(node, { upTo }) {
|
|
3500
|
+
if (getComputedStyle(node).visibility === "hidden") return true;
|
|
3501
|
+
while (node) {
|
|
3502
|
+
if (upTo !== void 0 && node === upTo) return false;
|
|
3503
|
+
if (getComputedStyle(node).display === "none") return true;
|
|
3504
|
+
node = node.parentElement;
|
|
3505
|
+
}
|
|
3506
|
+
return false;
|
|
3507
|
+
}
|
|
3508
|
+
function isSelectableInput(element) {
|
|
3509
|
+
return element instanceof HTMLInputElement && "select" in element;
|
|
3510
|
+
}
|
|
3511
|
+
function focus(element, { select = false } = {}) {
|
|
3512
|
+
if (element && element.focus) {
|
|
3513
|
+
const previouslyFocusedElement = document.activeElement;
|
|
3514
|
+
element.focus({ preventScroll: true });
|
|
3515
|
+
if (element !== previouslyFocusedElement && isSelectableInput(element) && select)
|
|
3516
|
+
element.select();
|
|
3517
|
+
}
|
|
3518
|
+
}
|
|
3519
|
+
var focusScopesStack = createFocusScopesStack();
|
|
3520
|
+
function createFocusScopesStack() {
|
|
3521
|
+
let stack = [];
|
|
3522
|
+
return {
|
|
3523
|
+
add(focusScope) {
|
|
3524
|
+
const activeFocusScope = stack[0];
|
|
3525
|
+
if (focusScope !== activeFocusScope) {
|
|
3526
|
+
activeFocusScope?.pause();
|
|
3527
|
+
}
|
|
3528
|
+
stack = arrayRemove(stack, focusScope);
|
|
3529
|
+
stack.unshift(focusScope);
|
|
3530
|
+
},
|
|
3531
|
+
remove(focusScope) {
|
|
3532
|
+
stack = arrayRemove(stack, focusScope);
|
|
3533
|
+
stack[0]?.resume();
|
|
3534
|
+
}
|
|
3535
|
+
};
|
|
3536
|
+
}
|
|
3537
|
+
function arrayRemove(array, item) {
|
|
3538
|
+
const updatedArray = [...array];
|
|
3539
|
+
const index = updatedArray.indexOf(item);
|
|
3540
|
+
if (index !== -1) {
|
|
3541
|
+
updatedArray.splice(index, 1);
|
|
3542
|
+
}
|
|
3543
|
+
return updatedArray;
|
|
3544
|
+
}
|
|
3545
|
+
function removeLinks(items) {
|
|
3546
|
+
return items.filter((item) => item.tagName !== "A");
|
|
3547
|
+
}
|
|
3548
|
+
|
|
3549
|
+
// ../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3._nlwlfidmfjbhuhdac2s4gonhum/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
3550
|
+
var React13 = __toESM(require("react"), 1);
|
|
3551
|
+
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
3552
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
3553
|
+
var PORTAL_NAME = "Portal";
|
|
3554
|
+
var Portal = React13.forwardRef((props, forwardedRef) => {
|
|
3555
|
+
const { container: containerProp, ...portalProps } = props;
|
|
3556
|
+
const [mounted, setMounted] = React13.useState(false);
|
|
3557
|
+
useLayoutEffect2(() => setMounted(true), []);
|
|
3558
|
+
const container = containerProp || mounted && globalThis?.document?.body;
|
|
3559
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
3560
|
+
});
|
|
3561
|
+
Portal.displayName = PORTAL_NAME;
|
|
3562
|
+
|
|
3563
|
+
// ../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18._rdubggcljnkcjot4tnwunht5nu/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
3564
|
+
var React23 = __toESM(require("react"), 1);
|
|
3565
|
+
var React14 = __toESM(require("react"), 1);
|
|
3566
|
+
function useStateMachine(initialState, machine) {
|
|
3567
|
+
return React14.useReducer((state, event) => {
|
|
3568
|
+
const nextState = machine[state][event];
|
|
3569
|
+
return nextState ?? state;
|
|
3570
|
+
}, initialState);
|
|
3571
|
+
}
|
|
3572
|
+
var Presence = (props) => {
|
|
3573
|
+
const { present, children } = props;
|
|
3574
|
+
const presence = usePresence(present);
|
|
3575
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React23.Children.only(children);
|
|
3576
|
+
const ref = useComposedRefs(presence.ref, getElementRef2(child));
|
|
3577
|
+
const forceMount = typeof children === "function";
|
|
3578
|
+
return forceMount || presence.isPresent ? React23.cloneElement(child, { ref }) : null;
|
|
3579
|
+
};
|
|
3580
|
+
Presence.displayName = "Presence";
|
|
3581
|
+
function usePresence(present) {
|
|
3582
|
+
const [node, setNode] = React23.useState();
|
|
3583
|
+
const stylesRef = React23.useRef(null);
|
|
3584
|
+
const prevPresentRef = React23.useRef(present);
|
|
3585
|
+
const prevAnimationNameRef = React23.useRef("none");
|
|
3586
|
+
const initialState = present ? "mounted" : "unmounted";
|
|
3587
|
+
const [state, send] = useStateMachine(initialState, {
|
|
3588
|
+
mounted: {
|
|
3589
|
+
UNMOUNT: "unmounted",
|
|
3590
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
3591
|
+
},
|
|
3592
|
+
unmountSuspended: {
|
|
3593
|
+
MOUNT: "mounted",
|
|
3594
|
+
ANIMATION_END: "unmounted"
|
|
3595
|
+
},
|
|
3596
|
+
unmounted: {
|
|
3597
|
+
MOUNT: "mounted"
|
|
3598
|
+
}
|
|
3599
|
+
});
|
|
3600
|
+
React23.useEffect(() => {
|
|
3601
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
3602
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
3603
|
+
}, [state]);
|
|
3604
|
+
useLayoutEffect2(() => {
|
|
3605
|
+
const styles = stylesRef.current;
|
|
3606
|
+
const wasPresent = prevPresentRef.current;
|
|
3607
|
+
const hasPresentChanged = wasPresent !== present;
|
|
3608
|
+
if (hasPresentChanged) {
|
|
3609
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
3610
|
+
const currentAnimationName = getAnimationName(styles);
|
|
3611
|
+
if (present) {
|
|
3612
|
+
send("MOUNT");
|
|
3613
|
+
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
3614
|
+
send("UNMOUNT");
|
|
3615
|
+
} else {
|
|
3616
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
3617
|
+
if (wasPresent && isAnimating) {
|
|
3618
|
+
send("ANIMATION_OUT");
|
|
3619
|
+
} else {
|
|
3620
|
+
send("UNMOUNT");
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
prevPresentRef.current = present;
|
|
3624
|
+
}
|
|
3625
|
+
}, [present, send]);
|
|
3626
|
+
useLayoutEffect2(() => {
|
|
3627
|
+
if (node) {
|
|
3628
|
+
let timeoutId;
|
|
3629
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
3630
|
+
const handleAnimationEnd = (event) => {
|
|
3631
|
+
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
3632
|
+
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
3633
|
+
if (event.target === node && isCurrentAnimation) {
|
|
3634
|
+
send("ANIMATION_END");
|
|
3635
|
+
if (!prevPresentRef.current) {
|
|
3636
|
+
const currentFillMode = node.style.animationFillMode;
|
|
3637
|
+
node.style.animationFillMode = "forwards";
|
|
3638
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
3639
|
+
if (node.style.animationFillMode === "forwards") {
|
|
3640
|
+
node.style.animationFillMode = currentFillMode;
|
|
3641
|
+
}
|
|
3642
|
+
});
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3645
|
+
};
|
|
3646
|
+
const handleAnimationStart = (event) => {
|
|
3647
|
+
if (event.target === node) {
|
|
3648
|
+
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
|
|
3649
|
+
}
|
|
3650
|
+
};
|
|
3651
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
|
3652
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
3653
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
|
3654
|
+
return () => {
|
|
3655
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
3656
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
|
3657
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
3658
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
|
3659
|
+
};
|
|
3660
|
+
} else {
|
|
3661
|
+
send("ANIMATION_END");
|
|
3662
|
+
}
|
|
3663
|
+
}, [node, send]);
|
|
3664
|
+
return {
|
|
3665
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
3666
|
+
ref: React23.useCallback((node2) => {
|
|
3667
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
3668
|
+
setNode(node2);
|
|
3669
|
+
}, [])
|
|
3670
|
+
};
|
|
3671
|
+
}
|
|
3672
|
+
function getAnimationName(styles) {
|
|
3673
|
+
return styles?.animationName || "none";
|
|
3674
|
+
}
|
|
3675
|
+
function getElementRef2(element) {
|
|
3676
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
3677
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3678
|
+
if (mayWarn) {
|
|
3679
|
+
return element.ref;
|
|
3680
|
+
}
|
|
3681
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
3682
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3683
|
+
if (mayWarn) {
|
|
3684
|
+
return element.props.ref;
|
|
3685
|
+
}
|
|
3686
|
+
return element.props.ref || element.ref;
|
|
3687
|
+
}
|
|
3688
|
+
|
|
3689
|
+
// ../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
3690
|
+
var React15 = __toESM(require("react"), 1);
|
|
3691
|
+
var count2 = 0;
|
|
3692
|
+
function useFocusGuards() {
|
|
3693
|
+
React15.useEffect(() => {
|
|
3694
|
+
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
3695
|
+
document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
|
|
3696
|
+
document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
|
|
3697
|
+
count2++;
|
|
3698
|
+
return () => {
|
|
3699
|
+
if (count2 === 1) {
|
|
3700
|
+
document.querySelectorAll("[data-radix-focus-guard]").forEach((node) => node.remove());
|
|
3701
|
+
}
|
|
3702
|
+
count2--;
|
|
3703
|
+
};
|
|
3704
|
+
}, []);
|
|
3705
|
+
}
|
|
3706
|
+
function createFocusGuard() {
|
|
3707
|
+
const element = document.createElement("span");
|
|
3708
|
+
element.setAttribute("data-radix-focus-guard", "");
|
|
3709
|
+
element.tabIndex = 0;
|
|
3710
|
+
element.style.outline = "none";
|
|
3711
|
+
element.style.opacity = "0";
|
|
3712
|
+
element.style.position = "fixed";
|
|
3713
|
+
element.style.pointerEvents = "none";
|
|
3714
|
+
return element;
|
|
3715
|
+
}
|
|
3716
|
+
|
|
3717
|
+
// ../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
|
|
3718
|
+
var __assign = function() {
|
|
3719
|
+
__assign = Object.assign || function __assign2(t) {
|
|
3720
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3721
|
+
s = arguments[i];
|
|
3722
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3723
|
+
}
|
|
3724
|
+
return t;
|
|
3725
|
+
};
|
|
3726
|
+
return __assign.apply(this, arguments);
|
|
3727
|
+
};
|
|
3728
|
+
function __rest(s, e) {
|
|
3729
|
+
var t = {};
|
|
3730
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3731
|
+
t[p] = s[p];
|
|
3732
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3733
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3734
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3735
|
+
t[p[i]] = s[p[i]];
|
|
3736
|
+
}
|
|
3737
|
+
return t;
|
|
3738
|
+
}
|
|
3739
|
+
function __spreadArray(to, from, pack) {
|
|
3740
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3741
|
+
if (ar || !(i in from)) {
|
|
3742
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
3743
|
+
ar[i] = from[i];
|
|
3744
|
+
}
|
|
3745
|
+
}
|
|
3746
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
3747
|
+
}
|
|
3748
|
+
|
|
3749
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
3750
|
+
var React24 = __toESM(require("react"));
|
|
3751
|
+
|
|
3752
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
3753
|
+
var React18 = __toESM(require("react"));
|
|
3754
|
+
|
|
3755
|
+
// ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
3756
|
+
var zeroRightClassName = "right-scroll-bar-position";
|
|
3757
|
+
var fullWidthClassName = "width-before-scroll-bar";
|
|
3758
|
+
var noScrollbarsClassName = "with-scroll-bars-hidden";
|
|
3759
|
+
var removedBarSizeVariable = "--removed-body-scroll-bar-size";
|
|
3760
|
+
|
|
3761
|
+
// ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.14_react@18.3.1/node_modules/use-callback-ref/dist/es2015/assignRef.js
|
|
3762
|
+
function assignRef(ref, value) {
|
|
3763
|
+
if (typeof ref === "function") {
|
|
3764
|
+
ref(value);
|
|
3765
|
+
} else if (ref) {
|
|
3766
|
+
ref.current = value;
|
|
3767
|
+
}
|
|
3768
|
+
return ref;
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
// ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.14_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
3772
|
+
var import_react3 = require("react");
|
|
3773
|
+
function useCallbackRef2(initialValue, callback) {
|
|
3774
|
+
var ref = (0, import_react3.useState)(function() {
|
|
3775
|
+
return {
|
|
3776
|
+
// value
|
|
3777
|
+
value: initialValue,
|
|
3778
|
+
// last callback
|
|
3779
|
+
callback,
|
|
3780
|
+
// "memoized" public interface
|
|
3781
|
+
facade: {
|
|
3782
|
+
get current() {
|
|
3783
|
+
return ref.value;
|
|
3784
|
+
},
|
|
3785
|
+
set current(value) {
|
|
3786
|
+
var last = ref.value;
|
|
3787
|
+
if (last !== value) {
|
|
3788
|
+
ref.value = value;
|
|
3789
|
+
ref.callback(value, last);
|
|
3790
|
+
}
|
|
3791
|
+
}
|
|
3792
|
+
}
|
|
3793
|
+
};
|
|
3794
|
+
})[0];
|
|
3795
|
+
ref.callback = callback;
|
|
3796
|
+
return ref.facade;
|
|
3797
|
+
}
|
|
3798
|
+
|
|
3799
|
+
// ../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@18.3.14_react@18.3.1/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
3800
|
+
var React16 = __toESM(require("react"));
|
|
3801
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React16.useLayoutEffect : React16.useEffect;
|
|
3802
|
+
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
3803
|
+
function useMergeRefs(refs, defaultValue) {
|
|
3804
|
+
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
3805
|
+
return refs.forEach(function(ref) {
|
|
3806
|
+
return assignRef(ref, newValue);
|
|
3807
|
+
});
|
|
3808
|
+
});
|
|
3809
|
+
useIsomorphicLayoutEffect(function() {
|
|
3810
|
+
var oldValue = currentValues.get(callbackRef);
|
|
3811
|
+
if (oldValue) {
|
|
3812
|
+
var prevRefs_1 = new Set(oldValue);
|
|
3813
|
+
var nextRefs_1 = new Set(refs);
|
|
3814
|
+
var current_1 = callbackRef.current;
|
|
3815
|
+
prevRefs_1.forEach(function(ref) {
|
|
3816
|
+
if (!nextRefs_1.has(ref)) {
|
|
3817
|
+
assignRef(ref, null);
|
|
3818
|
+
}
|
|
3819
|
+
});
|
|
3820
|
+
nextRefs_1.forEach(function(ref) {
|
|
3821
|
+
if (!prevRefs_1.has(ref)) {
|
|
3822
|
+
assignRef(ref, current_1);
|
|
3823
|
+
}
|
|
3824
|
+
});
|
|
3825
|
+
}
|
|
3826
|
+
currentValues.set(callbackRef, refs);
|
|
3827
|
+
}, [refs]);
|
|
3828
|
+
return callbackRef;
|
|
3829
|
+
}
|
|
3830
|
+
|
|
3831
|
+
// ../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@18.3.14_react@18.3.1/node_modules/use-sidecar/dist/es2015/medium.js
|
|
3832
|
+
function ItoI(a) {
|
|
3833
|
+
return a;
|
|
3834
|
+
}
|
|
3835
|
+
function innerCreateMedium(defaults, middleware) {
|
|
3836
|
+
if (middleware === void 0) {
|
|
3837
|
+
middleware = ItoI;
|
|
3838
|
+
}
|
|
3839
|
+
var buffer = [];
|
|
3840
|
+
var assigned = false;
|
|
3841
|
+
var medium = {
|
|
3842
|
+
read: function() {
|
|
3843
|
+
if (assigned) {
|
|
3844
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
3845
|
+
}
|
|
3846
|
+
if (buffer.length) {
|
|
3847
|
+
return buffer[buffer.length - 1];
|
|
3848
|
+
}
|
|
3849
|
+
return defaults;
|
|
3850
|
+
},
|
|
3851
|
+
useMedium: function(data) {
|
|
3852
|
+
var item = middleware(data, assigned);
|
|
3853
|
+
buffer.push(item);
|
|
3854
|
+
return function() {
|
|
3855
|
+
buffer = buffer.filter(function(x) {
|
|
3856
|
+
return x !== item;
|
|
3857
|
+
});
|
|
3858
|
+
};
|
|
3859
|
+
},
|
|
3860
|
+
assignSyncMedium: function(cb) {
|
|
3861
|
+
assigned = true;
|
|
3862
|
+
while (buffer.length) {
|
|
3863
|
+
var cbs = buffer;
|
|
3864
|
+
buffer = [];
|
|
3865
|
+
cbs.forEach(cb);
|
|
3866
|
+
}
|
|
3867
|
+
buffer = {
|
|
3868
|
+
push: function(x) {
|
|
3869
|
+
return cb(x);
|
|
3870
|
+
},
|
|
3871
|
+
filter: function() {
|
|
3872
|
+
return buffer;
|
|
3873
|
+
}
|
|
3874
|
+
};
|
|
3875
|
+
},
|
|
3876
|
+
assignMedium: function(cb) {
|
|
3877
|
+
assigned = true;
|
|
3878
|
+
var pendingQueue = [];
|
|
3879
|
+
if (buffer.length) {
|
|
3880
|
+
var cbs = buffer;
|
|
3881
|
+
buffer = [];
|
|
3882
|
+
cbs.forEach(cb);
|
|
3883
|
+
pendingQueue = buffer;
|
|
3884
|
+
}
|
|
3885
|
+
var executeQueue = function() {
|
|
3886
|
+
var cbs2 = pendingQueue;
|
|
3887
|
+
pendingQueue = [];
|
|
3888
|
+
cbs2.forEach(cb);
|
|
3889
|
+
};
|
|
3890
|
+
var cycle = function() {
|
|
3891
|
+
return Promise.resolve().then(executeQueue);
|
|
3892
|
+
};
|
|
3893
|
+
cycle();
|
|
3894
|
+
buffer = {
|
|
3895
|
+
push: function(x) {
|
|
3896
|
+
pendingQueue.push(x);
|
|
3897
|
+
cycle();
|
|
3898
|
+
},
|
|
3899
|
+
filter: function(filter) {
|
|
3900
|
+
pendingQueue = pendingQueue.filter(filter);
|
|
3901
|
+
return buffer;
|
|
3902
|
+
}
|
|
3903
|
+
};
|
|
3904
|
+
}
|
|
3905
|
+
};
|
|
3906
|
+
return medium;
|
|
3907
|
+
}
|
|
3908
|
+
function createSidecarMedium(options) {
|
|
3909
|
+
if (options === void 0) {
|
|
3910
|
+
options = {};
|
|
3911
|
+
}
|
|
3912
|
+
var medium = innerCreateMedium(null);
|
|
3913
|
+
medium.options = __assign({ async: true, ssr: false }, options);
|
|
3914
|
+
return medium;
|
|
3915
|
+
}
|
|
3916
|
+
|
|
3917
|
+
// ../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@18.3.14_react@18.3.1/node_modules/use-sidecar/dist/es2015/exports.js
|
|
3918
|
+
var React17 = __toESM(require("react"));
|
|
3919
|
+
var SideCar = function(_a) {
|
|
3920
|
+
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
3921
|
+
if (!sideCar) {
|
|
3922
|
+
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
3923
|
+
}
|
|
3924
|
+
var Target = sideCar.read();
|
|
3925
|
+
if (!Target) {
|
|
3926
|
+
throw new Error("Sidecar medium not found");
|
|
3927
|
+
}
|
|
3928
|
+
return React17.createElement(Target, __assign({}, rest));
|
|
3929
|
+
};
|
|
3930
|
+
SideCar.isSideCarExport = true;
|
|
3931
|
+
function exportSidecar(medium, exported) {
|
|
3932
|
+
medium.useMedium(exported);
|
|
3933
|
+
return SideCar;
|
|
3934
|
+
}
|
|
3935
|
+
|
|
3936
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/medium.js
|
|
3937
|
+
var effectCar = createSidecarMedium();
|
|
3938
|
+
|
|
3939
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
3940
|
+
var nothing = function() {
|
|
3941
|
+
return;
|
|
3942
|
+
};
|
|
3943
|
+
var RemoveScroll = React18.forwardRef(function(props, parentRef) {
|
|
3944
|
+
var ref = React18.useRef(null);
|
|
3945
|
+
var _a = React18.useState({
|
|
3946
|
+
onScrollCapture: nothing,
|
|
3947
|
+
onWheelCapture: nothing,
|
|
3948
|
+
onTouchMoveCapture: nothing
|
|
3949
|
+
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
3950
|
+
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? "div" : _b, gapMode = props.gapMode, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
|
|
3951
|
+
var SideCar2 = sideCar;
|
|
3952
|
+
var containerRef = useMergeRefs([ref, parentRef]);
|
|
3953
|
+
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
3954
|
+
return React18.createElement(
|
|
3955
|
+
React18.Fragment,
|
|
3956
|
+
null,
|
|
3957
|
+
enabled && React18.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
3958
|
+
forwardProps ? React18.cloneElement(React18.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React18.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
3959
|
+
);
|
|
3960
|
+
});
|
|
3961
|
+
RemoveScroll.defaultProps = {
|
|
3962
|
+
enabled: true,
|
|
3963
|
+
removeScrollBar: true,
|
|
3964
|
+
inert: false
|
|
3965
|
+
};
|
|
3966
|
+
RemoveScroll.classNames = {
|
|
3967
|
+
fullWidth: fullWidthClassName,
|
|
3968
|
+
zeroRight: zeroRightClassName
|
|
3969
|
+
};
|
|
3970
|
+
|
|
3971
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
3972
|
+
var React21 = __toESM(require("react"));
|
|
3973
|
+
|
|
3974
|
+
// ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
3975
|
+
var React20 = __toESM(require("react"));
|
|
3976
|
+
|
|
3977
|
+
// ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.14_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
3978
|
+
var React19 = __toESM(require("react"));
|
|
3979
|
+
|
|
3980
|
+
// ../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
3981
|
+
var currentNonce;
|
|
3982
|
+
var getNonce = function() {
|
|
3983
|
+
if (currentNonce) {
|
|
3984
|
+
return currentNonce;
|
|
3985
|
+
}
|
|
3986
|
+
if (typeof __webpack_nonce__ !== "undefined") {
|
|
3987
|
+
return __webpack_nonce__;
|
|
3988
|
+
}
|
|
3989
|
+
return void 0;
|
|
3990
|
+
};
|
|
3991
|
+
|
|
3992
|
+
// ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.14_react@18.3.1/node_modules/react-style-singleton/dist/es2015/singleton.js
|
|
3993
|
+
function makeStyleTag() {
|
|
3994
|
+
if (!document)
|
|
3995
|
+
return null;
|
|
3996
|
+
var tag = document.createElement("style");
|
|
3997
|
+
tag.type = "text/css";
|
|
3998
|
+
var nonce = getNonce();
|
|
3999
|
+
if (nonce) {
|
|
4000
|
+
tag.setAttribute("nonce", nonce);
|
|
4001
|
+
}
|
|
4002
|
+
return tag;
|
|
4003
|
+
}
|
|
4004
|
+
function injectStyles(tag, css) {
|
|
4005
|
+
if (tag.styleSheet) {
|
|
4006
|
+
tag.styleSheet.cssText = css;
|
|
4007
|
+
} else {
|
|
4008
|
+
tag.appendChild(document.createTextNode(css));
|
|
4009
|
+
}
|
|
4010
|
+
}
|
|
4011
|
+
function insertStyleTag(tag) {
|
|
4012
|
+
var head = document.head || document.getElementsByTagName("head")[0];
|
|
4013
|
+
head.appendChild(tag);
|
|
4014
|
+
}
|
|
4015
|
+
var stylesheetSingleton = function() {
|
|
4016
|
+
var counter = 0;
|
|
4017
|
+
var stylesheet = null;
|
|
4018
|
+
return {
|
|
4019
|
+
add: function(style) {
|
|
4020
|
+
if (counter == 0) {
|
|
4021
|
+
if (stylesheet = makeStyleTag()) {
|
|
4022
|
+
injectStyles(stylesheet, style);
|
|
4023
|
+
insertStyleTag(stylesheet);
|
|
4024
|
+
}
|
|
4025
|
+
}
|
|
4026
|
+
counter++;
|
|
4027
|
+
},
|
|
4028
|
+
remove: function() {
|
|
4029
|
+
counter--;
|
|
4030
|
+
if (!counter && stylesheet) {
|
|
4031
|
+
stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
|
|
4032
|
+
stylesheet = null;
|
|
4033
|
+
}
|
|
4034
|
+
}
|
|
4035
|
+
};
|
|
4036
|
+
};
|
|
4037
|
+
|
|
4038
|
+
// ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.14_react@18.3.1/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
4039
|
+
var styleHookSingleton = function() {
|
|
4040
|
+
var sheet = stylesheetSingleton();
|
|
4041
|
+
return function(styles, isDynamic) {
|
|
4042
|
+
React19.useEffect(function() {
|
|
4043
|
+
sheet.add(styles);
|
|
4044
|
+
return function() {
|
|
4045
|
+
sheet.remove();
|
|
4046
|
+
};
|
|
4047
|
+
}, [styles && isDynamic]);
|
|
4048
|
+
};
|
|
4049
|
+
};
|
|
4050
|
+
|
|
4051
|
+
// ../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@18.3.14_react@18.3.1/node_modules/react-style-singleton/dist/es2015/component.js
|
|
4052
|
+
var styleSingleton = function() {
|
|
4053
|
+
var useStyle = styleHookSingleton();
|
|
4054
|
+
var Sheet = function(_a) {
|
|
4055
|
+
var styles = _a.styles, dynamic = _a.dynamic;
|
|
4056
|
+
useStyle(styles, dynamic);
|
|
4057
|
+
return null;
|
|
4058
|
+
};
|
|
4059
|
+
return Sheet;
|
|
4060
|
+
};
|
|
4061
|
+
|
|
4062
|
+
// ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/utils.js
|
|
4063
|
+
var zeroGap = {
|
|
4064
|
+
left: 0,
|
|
4065
|
+
top: 0,
|
|
4066
|
+
right: 0,
|
|
4067
|
+
gap: 0
|
|
4068
|
+
};
|
|
4069
|
+
var parse = function(x) {
|
|
4070
|
+
return parseInt(x || "", 10) || 0;
|
|
4071
|
+
};
|
|
4072
|
+
var getOffset = function(gapMode) {
|
|
4073
|
+
var cs = window.getComputedStyle(document.body);
|
|
4074
|
+
var left = cs[gapMode === "padding" ? "paddingLeft" : "marginLeft"];
|
|
4075
|
+
var top = cs[gapMode === "padding" ? "paddingTop" : "marginTop"];
|
|
4076
|
+
var right = cs[gapMode === "padding" ? "paddingRight" : "marginRight"];
|
|
4077
|
+
return [parse(left), parse(top), parse(right)];
|
|
4078
|
+
};
|
|
4079
|
+
var getGapWidth = function(gapMode) {
|
|
4080
|
+
if (gapMode === void 0) {
|
|
4081
|
+
gapMode = "margin";
|
|
4082
|
+
}
|
|
4083
|
+
if (typeof window === "undefined") {
|
|
4084
|
+
return zeroGap;
|
|
4085
|
+
}
|
|
4086
|
+
var offsets = getOffset(gapMode);
|
|
4087
|
+
var documentWidth = document.documentElement.clientWidth;
|
|
4088
|
+
var windowWidth = window.innerWidth;
|
|
4089
|
+
return {
|
|
4090
|
+
left: offsets[0],
|
|
4091
|
+
top: offsets[1],
|
|
4092
|
+
right: offsets[2],
|
|
4093
|
+
gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0])
|
|
4094
|
+
};
|
|
4095
|
+
};
|
|
4096
|
+
|
|
4097
|
+
// ../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
4098
|
+
var Style = styleSingleton();
|
|
4099
|
+
var lockAttribute = "data-scroll-locked";
|
|
4100
|
+
var getStyles = function(_a, allowRelative, gapMode, important) {
|
|
4101
|
+
var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
|
|
4102
|
+
if (gapMode === void 0) {
|
|
4103
|
+
gapMode = "margin";
|
|
4104
|
+
}
|
|
4105
|
+
return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
|
|
4106
|
+
allowRelative && "position: relative ".concat(important, ";"),
|
|
4107
|
+
gapMode === "margin" && "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
|
|
4108
|
+
gapMode === "padding" && "padding-right: ".concat(gap, "px ").concat(important, ";")
|
|
4109
|
+
].filter(Boolean).join(""), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
|
|
4110
|
+
};
|
|
4111
|
+
var getCurrentUseCounter = function() {
|
|
4112
|
+
var counter = parseInt(document.body.getAttribute(lockAttribute) || "0", 10);
|
|
4113
|
+
return isFinite(counter) ? counter : 0;
|
|
4114
|
+
};
|
|
4115
|
+
var useLockAttribute = function() {
|
|
4116
|
+
React20.useEffect(function() {
|
|
4117
|
+
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
4118
|
+
return function() {
|
|
4119
|
+
var newCounter = getCurrentUseCounter() - 1;
|
|
4120
|
+
if (newCounter <= 0) {
|
|
4121
|
+
document.body.removeAttribute(lockAttribute);
|
|
4122
|
+
} else {
|
|
4123
|
+
document.body.setAttribute(lockAttribute, newCounter.toString());
|
|
4124
|
+
}
|
|
4125
|
+
};
|
|
4126
|
+
}, []);
|
|
4127
|
+
};
|
|
4128
|
+
var RemoveScrollBar = function(_a) {
|
|
4129
|
+
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
4130
|
+
useLockAttribute();
|
|
4131
|
+
var gap = React20.useMemo(function() {
|
|
4132
|
+
return getGapWidth(gapMode);
|
|
4133
|
+
}, [gapMode]);
|
|
4134
|
+
return React20.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
4135
|
+
};
|
|
4136
|
+
|
|
4137
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
4138
|
+
var passiveSupported = false;
|
|
4139
|
+
if (typeof window !== "undefined") {
|
|
4140
|
+
try {
|
|
4141
|
+
options = Object.defineProperty({}, "passive", {
|
|
4142
|
+
get: function() {
|
|
4143
|
+
passiveSupported = true;
|
|
4144
|
+
return true;
|
|
4145
|
+
}
|
|
4146
|
+
});
|
|
4147
|
+
window.addEventListener("test", options, options);
|
|
4148
|
+
window.removeEventListener("test", options, options);
|
|
4149
|
+
} catch (err) {
|
|
4150
|
+
passiveSupported = false;
|
|
4151
|
+
}
|
|
4152
|
+
}
|
|
4153
|
+
var options;
|
|
4154
|
+
var nonPassive = passiveSupported ? { passive: false } : false;
|
|
4155
|
+
|
|
4156
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/handleScroll.js
|
|
4157
|
+
var alwaysContainsScroll = function(node) {
|
|
4158
|
+
return node.tagName === "TEXTAREA";
|
|
4159
|
+
};
|
|
4160
|
+
var elementCanBeScrolled = function(node, overflow) {
|
|
4161
|
+
if (!(node instanceof Element)) {
|
|
4162
|
+
return false;
|
|
4163
|
+
}
|
|
4164
|
+
var styles = window.getComputedStyle(node);
|
|
4165
|
+
return (
|
|
4166
|
+
// not-not-scrollable
|
|
4167
|
+
styles[overflow] !== "hidden" && // contains scroll inside self
|
|
4168
|
+
!(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === "visible")
|
|
4169
|
+
);
|
|
4170
|
+
};
|
|
4171
|
+
var elementCouldBeVScrolled = function(node) {
|
|
4172
|
+
return elementCanBeScrolled(node, "overflowY");
|
|
4173
|
+
};
|
|
4174
|
+
var elementCouldBeHScrolled = function(node) {
|
|
4175
|
+
return elementCanBeScrolled(node, "overflowX");
|
|
4176
|
+
};
|
|
4177
|
+
var locationCouldBeScrolled = function(axis, node) {
|
|
4178
|
+
var ownerDocument = node.ownerDocument;
|
|
4179
|
+
var current = node;
|
|
4180
|
+
do {
|
|
4181
|
+
if (typeof ShadowRoot !== "undefined" && current instanceof ShadowRoot) {
|
|
4182
|
+
current = current.host;
|
|
4183
|
+
}
|
|
4184
|
+
var isScrollable = elementCouldBeScrolled(axis, current);
|
|
4185
|
+
if (isScrollable) {
|
|
4186
|
+
var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
|
|
4187
|
+
if (scrollHeight > clientHeight) {
|
|
4188
|
+
return true;
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
current = current.parentNode;
|
|
4192
|
+
} while (current && current !== ownerDocument.body);
|
|
4193
|
+
return false;
|
|
4194
|
+
};
|
|
4195
|
+
var getVScrollVariables = function(_a) {
|
|
4196
|
+
var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
4197
|
+
return [
|
|
4198
|
+
scrollTop,
|
|
4199
|
+
scrollHeight,
|
|
4200
|
+
clientHeight
|
|
4201
|
+
];
|
|
4202
|
+
};
|
|
4203
|
+
var getHScrollVariables = function(_a) {
|
|
4204
|
+
var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
|
|
4205
|
+
return [
|
|
4206
|
+
scrollLeft,
|
|
4207
|
+
scrollWidth,
|
|
4208
|
+
clientWidth
|
|
4209
|
+
];
|
|
4210
|
+
};
|
|
4211
|
+
var elementCouldBeScrolled = function(axis, node) {
|
|
4212
|
+
return axis === "v" ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
|
|
4213
|
+
};
|
|
4214
|
+
var getScrollVariables = function(axis, node) {
|
|
4215
|
+
return axis === "v" ? getVScrollVariables(node) : getHScrollVariables(node);
|
|
4216
|
+
};
|
|
4217
|
+
var getDirectionFactor = function(axis, direction) {
|
|
4218
|
+
return axis === "h" && direction === "rtl" ? -1 : 1;
|
|
4219
|
+
};
|
|
4220
|
+
var handleScroll = function(axis, endTarget, event, sourceDelta, noOverscroll) {
|
|
4221
|
+
var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
|
|
4222
|
+
var delta = directionFactor * sourceDelta;
|
|
4223
|
+
var target = event.target;
|
|
4224
|
+
var targetInLock = endTarget.contains(target);
|
|
4225
|
+
var shouldCancelScroll = false;
|
|
4226
|
+
var isDeltaPositive = delta > 0;
|
|
4227
|
+
var availableScroll = 0;
|
|
4228
|
+
var availableScrollTop = 0;
|
|
4229
|
+
do {
|
|
4230
|
+
if (!target) {
|
|
4231
|
+
break;
|
|
4232
|
+
}
|
|
4233
|
+
var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
|
|
4234
|
+
var elementScroll = scroll_1 - capacity - directionFactor * position;
|
|
4235
|
+
if (position || elementScroll) {
|
|
4236
|
+
if (elementCouldBeScrolled(axis, target)) {
|
|
4237
|
+
availableScroll += elementScroll;
|
|
4238
|
+
availableScrollTop += position;
|
|
4239
|
+
}
|
|
4240
|
+
}
|
|
4241
|
+
var parent_1 = target.parentNode;
|
|
4242
|
+
target = parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1;
|
|
4243
|
+
} while (
|
|
4244
|
+
// portaled content
|
|
4245
|
+
!targetInLock && target !== document.body || // self content
|
|
4246
|
+
targetInLock && (endTarget.contains(target) || endTarget === target)
|
|
4247
|
+
);
|
|
4248
|
+
if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {
|
|
4249
|
+
shouldCancelScroll = true;
|
|
4250
|
+
} else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {
|
|
4251
|
+
shouldCancelScroll = true;
|
|
4252
|
+
}
|
|
4253
|
+
return shouldCancelScroll;
|
|
4254
|
+
};
|
|
4255
|
+
|
|
4256
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
4257
|
+
var getTouchXY = function(event) {
|
|
4258
|
+
return "changedTouches" in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
|
|
4259
|
+
};
|
|
4260
|
+
var getDeltaXY = function(event) {
|
|
4261
|
+
return [event.deltaX, event.deltaY];
|
|
4262
|
+
};
|
|
4263
|
+
var extractRef = function(ref) {
|
|
4264
|
+
return ref && "current" in ref ? ref.current : ref;
|
|
4265
|
+
};
|
|
4266
|
+
var deltaCompare = function(x, y) {
|
|
4267
|
+
return x[0] === y[0] && x[1] === y[1];
|
|
4268
|
+
};
|
|
4269
|
+
var generateStyle = function(id) {
|
|
4270
|
+
return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n");
|
|
4271
|
+
};
|
|
4272
|
+
var idCounter = 0;
|
|
4273
|
+
var lockStack = [];
|
|
4274
|
+
function RemoveScrollSideCar(props) {
|
|
4275
|
+
var shouldPreventQueue = React21.useRef([]);
|
|
4276
|
+
var touchStartRef = React21.useRef([0, 0]);
|
|
4277
|
+
var activeAxis = React21.useRef();
|
|
4278
|
+
var id = React21.useState(idCounter++)[0];
|
|
4279
|
+
var Style2 = React21.useState(styleSingleton)[0];
|
|
4280
|
+
var lastProps = React21.useRef(props);
|
|
4281
|
+
React21.useEffect(function() {
|
|
4282
|
+
lastProps.current = props;
|
|
4283
|
+
}, [props]);
|
|
4284
|
+
React21.useEffect(function() {
|
|
4285
|
+
if (props.inert) {
|
|
4286
|
+
document.body.classList.add("block-interactivity-".concat(id));
|
|
4287
|
+
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
4288
|
+
allow_1.forEach(function(el) {
|
|
4289
|
+
return el.classList.add("allow-interactivity-".concat(id));
|
|
4290
|
+
});
|
|
4291
|
+
return function() {
|
|
4292
|
+
document.body.classList.remove("block-interactivity-".concat(id));
|
|
4293
|
+
allow_1.forEach(function(el) {
|
|
4294
|
+
return el.classList.remove("allow-interactivity-".concat(id));
|
|
4295
|
+
});
|
|
4296
|
+
};
|
|
4297
|
+
}
|
|
4298
|
+
return;
|
|
4299
|
+
}, [props.inert, props.lockRef.current, props.shards]);
|
|
4300
|
+
var shouldCancelEvent = React21.useCallback(function(event, parent) {
|
|
4301
|
+
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
4302
|
+
return !lastProps.current.allowPinchZoom;
|
|
4303
|
+
}
|
|
4304
|
+
var touch = getTouchXY(event);
|
|
4305
|
+
var touchStart = touchStartRef.current;
|
|
4306
|
+
var deltaX = "deltaX" in event ? event.deltaX : touchStart[0] - touch[0];
|
|
4307
|
+
var deltaY = "deltaY" in event ? event.deltaY : touchStart[1] - touch[1];
|
|
4308
|
+
var currentAxis;
|
|
4309
|
+
var target = event.target;
|
|
4310
|
+
var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? "h" : "v";
|
|
4311
|
+
if ("touches" in event && moveDirection === "h" && target.type === "range") {
|
|
4312
|
+
return false;
|
|
4313
|
+
}
|
|
4314
|
+
var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
4315
|
+
if (!canBeScrolledInMainDirection) {
|
|
4316
|
+
return true;
|
|
4317
|
+
}
|
|
4318
|
+
if (canBeScrolledInMainDirection) {
|
|
4319
|
+
currentAxis = moveDirection;
|
|
4320
|
+
} else {
|
|
4321
|
+
currentAxis = moveDirection === "v" ? "h" : "v";
|
|
4322
|
+
canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
|
|
4323
|
+
}
|
|
4324
|
+
if (!canBeScrolledInMainDirection) {
|
|
4325
|
+
return false;
|
|
4326
|
+
}
|
|
4327
|
+
if (!activeAxis.current && "changedTouches" in event && (deltaX || deltaY)) {
|
|
4328
|
+
activeAxis.current = currentAxis;
|
|
4329
|
+
}
|
|
4330
|
+
if (!currentAxis) {
|
|
4331
|
+
return true;
|
|
4332
|
+
}
|
|
4333
|
+
var cancelingAxis = activeAxis.current || currentAxis;
|
|
4334
|
+
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
4335
|
+
}, []);
|
|
4336
|
+
var shouldPrevent = React21.useCallback(function(_event) {
|
|
4337
|
+
var event = _event;
|
|
4338
|
+
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
4339
|
+
return;
|
|
4340
|
+
}
|
|
4341
|
+
var delta = "deltaY" in event ? getDeltaXY(event) : getTouchXY(event);
|
|
4342
|
+
var sourceEvent = shouldPreventQueue.current.filter(function(e) {
|
|
4343
|
+
return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);
|
|
4344
|
+
})[0];
|
|
4345
|
+
if (sourceEvent && sourceEvent.should) {
|
|
4346
|
+
if (event.cancelable) {
|
|
4347
|
+
event.preventDefault();
|
|
4348
|
+
}
|
|
4349
|
+
return;
|
|
4350
|
+
}
|
|
4351
|
+
if (!sourceEvent) {
|
|
4352
|
+
var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function(node) {
|
|
4353
|
+
return node.contains(event.target);
|
|
4354
|
+
});
|
|
4355
|
+
var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
|
|
4356
|
+
if (shouldStop) {
|
|
4357
|
+
if (event.cancelable) {
|
|
4358
|
+
event.preventDefault();
|
|
4359
|
+
}
|
|
4360
|
+
}
|
|
4361
|
+
}
|
|
4362
|
+
}, []);
|
|
4363
|
+
var shouldCancel = React21.useCallback(function(name, delta, target, should) {
|
|
4364
|
+
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
4365
|
+
shouldPreventQueue.current.push(event);
|
|
4366
|
+
setTimeout(function() {
|
|
4367
|
+
shouldPreventQueue.current = shouldPreventQueue.current.filter(function(e) {
|
|
4368
|
+
return e !== event;
|
|
4369
|
+
});
|
|
4370
|
+
}, 1);
|
|
4371
|
+
}, []);
|
|
4372
|
+
var scrollTouchStart = React21.useCallback(function(event) {
|
|
4373
|
+
touchStartRef.current = getTouchXY(event);
|
|
4374
|
+
activeAxis.current = void 0;
|
|
4375
|
+
}, []);
|
|
4376
|
+
var scrollWheel = React21.useCallback(function(event) {
|
|
4377
|
+
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4378
|
+
}, []);
|
|
4379
|
+
var scrollTouchMove = React21.useCallback(function(event) {
|
|
4380
|
+
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
4381
|
+
}, []);
|
|
4382
|
+
React21.useEffect(function() {
|
|
4383
|
+
lockStack.push(Style2);
|
|
4384
|
+
props.setCallbacks({
|
|
4385
|
+
onScrollCapture: scrollWheel,
|
|
4386
|
+
onWheelCapture: scrollWheel,
|
|
4387
|
+
onTouchMoveCapture: scrollTouchMove
|
|
4388
|
+
});
|
|
4389
|
+
document.addEventListener("wheel", shouldPrevent, nonPassive);
|
|
4390
|
+
document.addEventListener("touchmove", shouldPrevent, nonPassive);
|
|
4391
|
+
document.addEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
4392
|
+
return function() {
|
|
4393
|
+
lockStack = lockStack.filter(function(inst) {
|
|
4394
|
+
return inst !== Style2;
|
|
4395
|
+
});
|
|
4396
|
+
document.removeEventListener("wheel", shouldPrevent, nonPassive);
|
|
4397
|
+
document.removeEventListener("touchmove", shouldPrevent, nonPassive);
|
|
4398
|
+
document.removeEventListener("touchstart", scrollTouchStart, nonPassive);
|
|
4399
|
+
};
|
|
4400
|
+
}, []);
|
|
4401
|
+
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
4402
|
+
return React21.createElement(
|
|
4403
|
+
React21.Fragment,
|
|
4404
|
+
null,
|
|
4405
|
+
inert ? React21.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
4406
|
+
removeScrollBar ? React21.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
4407
|
+
);
|
|
2730
4408
|
}
|
|
2731
|
-
function
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
4409
|
+
function getOutermostShadowParent(node) {
|
|
4410
|
+
var shadowParent = null;
|
|
4411
|
+
while (node !== null) {
|
|
4412
|
+
if (node instanceof ShadowRoot) {
|
|
4413
|
+
shadowParent = node.host;
|
|
4414
|
+
node = node.host;
|
|
4415
|
+
}
|
|
4416
|
+
node = node.parentNode;
|
|
4417
|
+
}
|
|
4418
|
+
return shadowParent;
|
|
2735
4419
|
}
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
4420
|
+
|
|
4421
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/sidecar.js
|
|
4422
|
+
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
4423
|
+
|
|
4424
|
+
// ../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@18.3.14_react@18.3.1/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
4425
|
+
var ReactRemoveScroll = React24.forwardRef(function(props, ref) {
|
|
4426
|
+
return React24.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
4427
|
+
});
|
|
4428
|
+
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
4429
|
+
var Combination_default = ReactRemoveScroll;
|
|
4430
|
+
|
|
4431
|
+
// ../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es2015/index.js
|
|
4432
|
+
var getDefaultParent = function(originalTarget) {
|
|
4433
|
+
if (typeof document === "undefined") {
|
|
4434
|
+
return null;
|
|
4435
|
+
}
|
|
4436
|
+
var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;
|
|
4437
|
+
return sampleTarget.ownerDocument.body;
|
|
4438
|
+
};
|
|
4439
|
+
var counterMap = /* @__PURE__ */ new WeakMap();
|
|
4440
|
+
var uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
4441
|
+
var markerMap = {};
|
|
4442
|
+
var lockCount = 0;
|
|
4443
|
+
var unwrapHost = function(node) {
|
|
4444
|
+
return node && (node.host || unwrapHost(node.parentNode));
|
|
4445
|
+
};
|
|
4446
|
+
var correctTargets = function(parent, targets) {
|
|
4447
|
+
return targets.map(function(target) {
|
|
4448
|
+
if (parent.contains(target)) {
|
|
4449
|
+
return target;
|
|
4450
|
+
}
|
|
4451
|
+
var correctedTarget = unwrapHost(target);
|
|
4452
|
+
if (correctedTarget && parent.contains(correctedTarget)) {
|
|
4453
|
+
return correctedTarget;
|
|
4454
|
+
}
|
|
4455
|
+
console.error("aria-hidden", target, "in not contained inside", parent, ". Doing nothing");
|
|
4456
|
+
return null;
|
|
4457
|
+
}).filter(function(x) {
|
|
4458
|
+
return Boolean(x);
|
|
4459
|
+
});
|
|
4460
|
+
};
|
|
4461
|
+
var applyAttributeToOthers = function(originalTarget, parentNode, markerName, controlAttribute) {
|
|
4462
|
+
var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
4463
|
+
if (!markerMap[markerName]) {
|
|
4464
|
+
markerMap[markerName] = /* @__PURE__ */ new WeakMap();
|
|
4465
|
+
}
|
|
4466
|
+
var markerCounter = markerMap[markerName];
|
|
4467
|
+
var hiddenNodes = [];
|
|
4468
|
+
var elementsToKeep = /* @__PURE__ */ new Set();
|
|
4469
|
+
var elementsToStop = new Set(targets);
|
|
4470
|
+
var keep = function(el) {
|
|
4471
|
+
if (!el || elementsToKeep.has(el)) {
|
|
4472
|
+
return;
|
|
4473
|
+
}
|
|
4474
|
+
elementsToKeep.add(el);
|
|
4475
|
+
keep(el.parentNode);
|
|
4476
|
+
};
|
|
4477
|
+
targets.forEach(keep);
|
|
4478
|
+
var deep = function(parent) {
|
|
4479
|
+
if (!parent || elementsToStop.has(parent)) {
|
|
4480
|
+
return;
|
|
4481
|
+
}
|
|
4482
|
+
Array.prototype.forEach.call(parent.children, function(node) {
|
|
4483
|
+
if (elementsToKeep.has(node)) {
|
|
4484
|
+
deep(node);
|
|
4485
|
+
} else {
|
|
4486
|
+
try {
|
|
4487
|
+
var attr = node.getAttribute(controlAttribute);
|
|
4488
|
+
var alreadyHidden = attr !== null && attr !== "false";
|
|
4489
|
+
var counterValue = (counterMap.get(node) || 0) + 1;
|
|
4490
|
+
var markerValue = (markerCounter.get(node) || 0) + 1;
|
|
4491
|
+
counterMap.set(node, counterValue);
|
|
4492
|
+
markerCounter.set(node, markerValue);
|
|
4493
|
+
hiddenNodes.push(node);
|
|
4494
|
+
if (counterValue === 1 && alreadyHidden) {
|
|
4495
|
+
uncontrolledNodes.set(node, true);
|
|
4496
|
+
}
|
|
4497
|
+
if (markerValue === 1) {
|
|
4498
|
+
node.setAttribute(markerName, "true");
|
|
4499
|
+
}
|
|
4500
|
+
if (!alreadyHidden) {
|
|
4501
|
+
node.setAttribute(controlAttribute, "true");
|
|
4502
|
+
}
|
|
4503
|
+
} catch (e) {
|
|
4504
|
+
console.error("aria-hidden: cannot operate on ", node, e);
|
|
4505
|
+
}
|
|
4506
|
+
}
|
|
4507
|
+
});
|
|
4508
|
+
};
|
|
4509
|
+
deep(parentNode);
|
|
4510
|
+
elementsToKeep.clear();
|
|
4511
|
+
lockCount++;
|
|
4512
|
+
return function() {
|
|
4513
|
+
hiddenNodes.forEach(function(node) {
|
|
4514
|
+
var counterValue = counterMap.get(node) - 1;
|
|
4515
|
+
var markerValue = markerCounter.get(node) - 1;
|
|
4516
|
+
counterMap.set(node, counterValue);
|
|
4517
|
+
markerCounter.set(node, markerValue);
|
|
4518
|
+
if (!counterValue) {
|
|
4519
|
+
if (!uncontrolledNodes.has(node)) {
|
|
4520
|
+
node.removeAttribute(controlAttribute);
|
|
4521
|
+
}
|
|
4522
|
+
uncontrolledNodes.delete(node);
|
|
4523
|
+
}
|
|
4524
|
+
if (!markerValue) {
|
|
4525
|
+
node.removeAttribute(markerName);
|
|
4526
|
+
}
|
|
4527
|
+
});
|
|
4528
|
+
lockCount--;
|
|
4529
|
+
if (!lockCount) {
|
|
4530
|
+
counterMap = /* @__PURE__ */ new WeakMap();
|
|
4531
|
+
counterMap = /* @__PURE__ */ new WeakMap();
|
|
4532
|
+
uncontrolledNodes = /* @__PURE__ */ new WeakMap();
|
|
4533
|
+
markerMap = {};
|
|
4534
|
+
}
|
|
4535
|
+
};
|
|
4536
|
+
};
|
|
4537
|
+
var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
4538
|
+
if (markerName === void 0) {
|
|
4539
|
+
markerName = "data-aria-hidden";
|
|
4540
|
+
}
|
|
4541
|
+
var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);
|
|
4542
|
+
var activeParentNode = parentNode || getDefaultParent(originalTarget);
|
|
4543
|
+
if (!activeParentNode) {
|
|
4544
|
+
return function() {
|
|
4545
|
+
return null;
|
|
4546
|
+
};
|
|
4547
|
+
}
|
|
4548
|
+
targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll("[aria-live], script")));
|
|
4549
|
+
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
4550
|
+
};
|
|
4551
|
+
|
|
4552
|
+
// ../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3_osy3texbcyy7oe3sqigksqvg74/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
4553
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
4554
|
+
var DIALOG_NAME = "Dialog";
|
|
4555
|
+
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
4556
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
4557
|
+
var Dialog = (props) => {
|
|
4558
|
+
const {
|
|
4559
|
+
__scopeDialog,
|
|
4560
|
+
children,
|
|
4561
|
+
open: openProp,
|
|
4562
|
+
defaultOpen,
|
|
4563
|
+
onOpenChange,
|
|
4564
|
+
modal = true
|
|
4565
|
+
} = props;
|
|
4566
|
+
const triggerRef = React25.useRef(null);
|
|
4567
|
+
const contentRef = React25.useRef(null);
|
|
4568
|
+
const [open, setOpen] = useControllableState({
|
|
4569
|
+
prop: openProp,
|
|
4570
|
+
defaultProp: defaultOpen ?? false,
|
|
4571
|
+
onChange: onOpenChange,
|
|
4572
|
+
caller: DIALOG_NAME
|
|
4573
|
+
});
|
|
4574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4575
|
+
DialogProvider,
|
|
2742
4576
|
{
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
),
|
|
2748
|
-
|
|
4577
|
+
scope: __scopeDialog,
|
|
4578
|
+
triggerRef,
|
|
4579
|
+
contentRef,
|
|
4580
|
+
contentId: useId(),
|
|
4581
|
+
titleId: useId(),
|
|
4582
|
+
descriptionId: useId(),
|
|
4583
|
+
open,
|
|
4584
|
+
onOpenChange: setOpen,
|
|
4585
|
+
onOpenToggle: React25.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
4586
|
+
modal,
|
|
4587
|
+
children
|
|
2749
4588
|
}
|
|
2750
4589
|
);
|
|
2751
|
-
}
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
/* @__PURE__ */ (0,
|
|
2760
|
-
|
|
2761
|
-
|
|
4590
|
+
};
|
|
4591
|
+
Dialog.displayName = DIALOG_NAME;
|
|
4592
|
+
var TRIGGER_NAME = "DialogTrigger";
|
|
4593
|
+
var DialogTrigger = React25.forwardRef(
|
|
4594
|
+
(props, forwardedRef) => {
|
|
4595
|
+
const { __scopeDialog, ...triggerProps } = props;
|
|
4596
|
+
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
4597
|
+
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
4598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4599
|
+
Primitive.button,
|
|
4600
|
+
{
|
|
4601
|
+
type: "button",
|
|
4602
|
+
"aria-haspopup": "dialog",
|
|
4603
|
+
"aria-expanded": context.open,
|
|
4604
|
+
"aria-controls": context.contentId,
|
|
4605
|
+
"data-state": getState(context.open),
|
|
4606
|
+
...triggerProps,
|
|
4607
|
+
ref: composedTriggerRef,
|
|
4608
|
+
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
4609
|
+
}
|
|
4610
|
+
);
|
|
4611
|
+
}
|
|
4612
|
+
);
|
|
4613
|
+
DialogTrigger.displayName = TRIGGER_NAME;
|
|
4614
|
+
var PORTAL_NAME2 = "DialogPortal";
|
|
4615
|
+
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
|
|
4616
|
+
forceMount: void 0
|
|
4617
|
+
});
|
|
4618
|
+
var DialogPortal = (props) => {
|
|
4619
|
+
const { __scopeDialog, forceMount, children, container } = props;
|
|
4620
|
+
const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
|
|
4621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React25.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
|
4622
|
+
};
|
|
4623
|
+
DialogPortal.displayName = PORTAL_NAME2;
|
|
4624
|
+
var OVERLAY_NAME = "DialogOverlay";
|
|
4625
|
+
var DialogOverlay = React25.forwardRef(
|
|
4626
|
+
(props, forwardedRef) => {
|
|
4627
|
+
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
4628
|
+
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
4629
|
+
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
4630
|
+
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
4631
|
+
}
|
|
4632
|
+
);
|
|
4633
|
+
DialogOverlay.displayName = OVERLAY_NAME;
|
|
4634
|
+
var Slot2 = createSlot("DialogOverlay.RemoveScroll");
|
|
4635
|
+
var DialogOverlayImpl = React25.forwardRef(
|
|
4636
|
+
(props, forwardedRef) => {
|
|
4637
|
+
const { __scopeDialog, ...overlayProps } = props;
|
|
4638
|
+
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
4639
|
+
return (
|
|
4640
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
4641
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
4642
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4643
|
+
Primitive.div,
|
|
4644
|
+
{
|
|
4645
|
+
"data-state": getState(context.open),
|
|
4646
|
+
...overlayProps,
|
|
4647
|
+
ref: forwardedRef,
|
|
4648
|
+
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
4649
|
+
}
|
|
4650
|
+
) })
|
|
4651
|
+
);
|
|
4652
|
+
}
|
|
4653
|
+
);
|
|
4654
|
+
var CONTENT_NAME = "DialogContent";
|
|
4655
|
+
var DialogContent = React25.forwardRef(
|
|
4656
|
+
(props, forwardedRef) => {
|
|
4657
|
+
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
4658
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
4659
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
4660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
4661
|
+
}
|
|
4662
|
+
);
|
|
4663
|
+
DialogContent.displayName = CONTENT_NAME;
|
|
4664
|
+
var DialogContentModal = React25.forwardRef(
|
|
4665
|
+
(props, forwardedRef) => {
|
|
4666
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
4667
|
+
const contentRef = React25.useRef(null);
|
|
4668
|
+
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
4669
|
+
React25.useEffect(() => {
|
|
4670
|
+
const content = contentRef.current;
|
|
4671
|
+
if (content) return hideOthers(content);
|
|
4672
|
+
}, []);
|
|
4673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4674
|
+
DialogContentImpl,
|
|
4675
|
+
{
|
|
4676
|
+
...props,
|
|
4677
|
+
ref: composedRefs,
|
|
4678
|
+
trapFocus: context.open,
|
|
4679
|
+
disableOutsidePointerEvents: true,
|
|
4680
|
+
onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {
|
|
4681
|
+
event.preventDefault();
|
|
4682
|
+
context.triggerRef.current?.focus();
|
|
4683
|
+
}),
|
|
4684
|
+
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
4685
|
+
const originalEvent = event.detail.originalEvent;
|
|
4686
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
4687
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
4688
|
+
if (isRightClick) event.preventDefault();
|
|
4689
|
+
}),
|
|
4690
|
+
onFocusOutside: composeEventHandlers(
|
|
4691
|
+
props.onFocusOutside,
|
|
4692
|
+
(event) => event.preventDefault()
|
|
4693
|
+
)
|
|
4694
|
+
}
|
|
4695
|
+
);
|
|
4696
|
+
}
|
|
4697
|
+
);
|
|
4698
|
+
var DialogContentNonModal = React25.forwardRef(
|
|
4699
|
+
(props, forwardedRef) => {
|
|
4700
|
+
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
4701
|
+
const hasInteractedOutsideRef = React25.useRef(false);
|
|
4702
|
+
const hasPointerDownOutsideRef = React25.useRef(false);
|
|
4703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4704
|
+
DialogContentImpl,
|
|
2762
4705
|
{
|
|
2763
|
-
"data-slot": "dialog-content",
|
|
2764
|
-
className: cn(
|
|
2765
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
|
|
2766
|
-
className
|
|
2767
|
-
),
|
|
2768
4706
|
...props,
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
4707
|
+
ref: forwardedRef,
|
|
4708
|
+
trapFocus: false,
|
|
4709
|
+
disableOutsidePointerEvents: false,
|
|
4710
|
+
onCloseAutoFocus: (event) => {
|
|
4711
|
+
props.onCloseAutoFocus?.(event);
|
|
4712
|
+
if (!event.defaultPrevented) {
|
|
4713
|
+
if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();
|
|
4714
|
+
event.preventDefault();
|
|
4715
|
+
}
|
|
4716
|
+
hasInteractedOutsideRef.current = false;
|
|
4717
|
+
hasPointerDownOutsideRef.current = false;
|
|
4718
|
+
},
|
|
4719
|
+
onInteractOutside: (event) => {
|
|
4720
|
+
props.onInteractOutside?.(event);
|
|
4721
|
+
if (!event.defaultPrevented) {
|
|
4722
|
+
hasInteractedOutsideRef.current = true;
|
|
4723
|
+
if (event.detail.originalEvent.type === "pointerdown") {
|
|
4724
|
+
hasPointerDownOutsideRef.current = true;
|
|
4725
|
+
}
|
|
4726
|
+
}
|
|
4727
|
+
const target = event.target;
|
|
4728
|
+
const targetIsTrigger = context.triggerRef.current?.contains(target);
|
|
4729
|
+
if (targetIsTrigger) event.preventDefault();
|
|
4730
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
4731
|
+
event.preventDefault();
|
|
4732
|
+
}
|
|
4733
|
+
}
|
|
4734
|
+
}
|
|
4735
|
+
);
|
|
4736
|
+
}
|
|
4737
|
+
);
|
|
4738
|
+
var DialogContentImpl = React25.forwardRef(
|
|
4739
|
+
(props, forwardedRef) => {
|
|
4740
|
+
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;
|
|
4741
|
+
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
4742
|
+
const contentRef = React25.useRef(null);
|
|
4743
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
4744
|
+
useFocusGuards();
|
|
4745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
4746
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4747
|
+
FocusScope,
|
|
4748
|
+
{
|
|
4749
|
+
asChild: true,
|
|
4750
|
+
loop: true,
|
|
4751
|
+
trapped: trapFocus,
|
|
4752
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
4753
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
4754
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4755
|
+
DismissableLayer,
|
|
2773
4756
|
{
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
4757
|
+
role: "dialog",
|
|
4758
|
+
id: context.contentId,
|
|
4759
|
+
"aria-describedby": context.descriptionId,
|
|
4760
|
+
"aria-labelledby": context.titleId,
|
|
4761
|
+
"data-state": getState(context.open),
|
|
4762
|
+
...contentProps,
|
|
4763
|
+
ref: composedRefs,
|
|
4764
|
+
onDismiss: () => context.onOpenChange(false)
|
|
2780
4765
|
}
|
|
2781
4766
|
)
|
|
2782
|
-
|
|
4767
|
+
}
|
|
4768
|
+
),
|
|
4769
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
|
|
4770
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TitleWarning, { titleId: context.titleId }),
|
|
4771
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
4772
|
+
] })
|
|
4773
|
+
] });
|
|
4774
|
+
}
|
|
4775
|
+
);
|
|
4776
|
+
var TITLE_NAME = "DialogTitle";
|
|
4777
|
+
var DialogTitle = React25.forwardRef(
|
|
4778
|
+
(props, forwardedRef) => {
|
|
4779
|
+
const { __scopeDialog, ...titleProps } = props;
|
|
4780
|
+
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
4781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
4782
|
+
}
|
|
4783
|
+
);
|
|
4784
|
+
DialogTitle.displayName = TITLE_NAME;
|
|
4785
|
+
var DESCRIPTION_NAME = "DialogDescription";
|
|
4786
|
+
var DialogDescription = React25.forwardRef(
|
|
4787
|
+
(props, forwardedRef) => {
|
|
4788
|
+
const { __scopeDialog, ...descriptionProps } = props;
|
|
4789
|
+
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
4790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
4791
|
+
}
|
|
4792
|
+
);
|
|
4793
|
+
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
4794
|
+
var CLOSE_NAME = "DialogClose";
|
|
4795
|
+
var DialogClose = React25.forwardRef(
|
|
4796
|
+
(props, forwardedRef) => {
|
|
4797
|
+
const { __scopeDialog, ...closeProps } = props;
|
|
4798
|
+
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
4799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
4800
|
+
Primitive.button,
|
|
4801
|
+
{
|
|
4802
|
+
type: "button",
|
|
4803
|
+
...closeProps,
|
|
4804
|
+
ref: forwardedRef,
|
|
4805
|
+
onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))
|
|
2783
4806
|
}
|
|
2784
|
-
)
|
|
2785
|
-
|
|
4807
|
+
);
|
|
4808
|
+
}
|
|
4809
|
+
);
|
|
4810
|
+
DialogClose.displayName = CLOSE_NAME;
|
|
4811
|
+
function getState(open) {
|
|
4812
|
+
return open ? "open" : "closed";
|
|
2786
4813
|
}
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
4814
|
+
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
4815
|
+
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
4816
|
+
contentName: CONTENT_NAME,
|
|
4817
|
+
titleName: TITLE_NAME,
|
|
4818
|
+
docsSlug: "dialog"
|
|
4819
|
+
});
|
|
4820
|
+
var TitleWarning = ({ titleId }) => {
|
|
4821
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
4822
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
4823
|
+
|
|
4824
|
+
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
4825
|
+
|
|
4826
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
4827
|
+
React25.useEffect(() => {
|
|
4828
|
+
if (titleId) {
|
|
4829
|
+
const hasTitle = document.getElementById(titleId);
|
|
4830
|
+
if (!hasTitle) console.error(MESSAGE);
|
|
4831
|
+
}
|
|
4832
|
+
}, [MESSAGE, titleId]);
|
|
4833
|
+
return null;
|
|
4834
|
+
};
|
|
4835
|
+
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
4836
|
+
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
4837
|
+
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
4838
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
4839
|
+
React25.useEffect(() => {
|
|
4840
|
+
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
|
4841
|
+
if (descriptionId && describedById) {
|
|
4842
|
+
const hasDescription = document.getElementById(descriptionId);
|
|
4843
|
+
if (!hasDescription) console.warn(MESSAGE);
|
|
4844
|
+
}
|
|
4845
|
+
}, [MESSAGE, contentRef, descriptionId]);
|
|
4846
|
+
return null;
|
|
4847
|
+
};
|
|
4848
|
+
var Root = Dialog;
|
|
4849
|
+
var Portal2 = DialogPortal;
|
|
4850
|
+
var Overlay = DialogOverlay;
|
|
4851
|
+
var Content = DialogContent;
|
|
4852
|
+
var Title = DialogTitle;
|
|
4853
|
+
var Description = DialogDescription;
|
|
4854
|
+
var Close = DialogClose;
|
|
4855
|
+
|
|
4856
|
+
// src/libraries/react/components/ui/dialog.tsx
|
|
4857
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
4858
|
+
var Dialog2 = Root;
|
|
4859
|
+
var DialogPortal2 = ({
|
|
4860
|
+
children,
|
|
4861
|
+
...props
|
|
4862
|
+
}) => {
|
|
4863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Portal2, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "au-root", children }) });
|
|
4864
|
+
};
|
|
4865
|
+
var DialogOverlay2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
4866
|
+
Overlay,
|
|
4867
|
+
{
|
|
4868
|
+
ref,
|
|
4869
|
+
className: cn(
|
|
4870
|
+
"au-fixed au-inset-0 au-z-50 au-bg-black/80 data-[state=open]:au-animate-in data-[state=closed]:au-animate-out data-[state=closed]:au-fade-out-0 data-[state=open]:au-fade-in-0",
|
|
4871
|
+
className
|
|
4872
|
+
),
|
|
4873
|
+
...props
|
|
4874
|
+
}
|
|
4875
|
+
));
|
|
4876
|
+
DialogOverlay2.displayName = Overlay.displayName;
|
|
4877
|
+
var DialogContent2 = React26.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(DialogPortal2, { children: [
|
|
4878
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(DialogOverlay2, {}),
|
|
4879
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
4880
|
+
Content,
|
|
2790
4881
|
{
|
|
2791
|
-
|
|
4882
|
+
ref,
|
|
2792
4883
|
className: cn(
|
|
2793
|
-
|
|
4884
|
+
`au-fixed au-left-[50%] au-top-[50%] au-z-50 au-grid au-w-full au-max-w-lg au-translate-x-[-50%] au-translate-y-[-50%] au-gap-4 au-border au-bg-background au-p-6 au-shadow-lg au-duration-200 data-[state=open]:au-animate-in data-[state=closed]:au-animate-out data-[state=closed]:au-fade-out-0 data-[state=open]:au-fade-in-0 data-[state=closed]:au-zoom-out-95 data-[state=open]:au-zoom-in-95 data-[state=closed]:au-slide-out-to-left-1/2 data-[state=closed]:au-slide-out-to-top-[48%] data-[state=open]:au-slide-in-from-left-1/2 data-[state=open]:au-slide-in-from-top-[48%] sm:au-rounded-lg`,
|
|
2794
4885
|
className
|
|
2795
4886
|
),
|
|
2796
|
-
...props
|
|
4887
|
+
...props,
|
|
4888
|
+
children: [
|
|
4889
|
+
children,
|
|
4890
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Close, { className: "au-absolute au-right-4 au-top-4 au-rounded-sm au-opacity-70 au-ring-offset-background au-transition-opacity hover:au-opacity-100 focus:au-outline-none focus:au-ring-2 focus:au-ring-ring focus:au-ring-offset-2 disabled:au-pointer-events-none data-[state=open]:au-bg-accent data-[state=open]:au-text-muted-foreground", children: [
|
|
4891
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(X, { className: "au-h-4 au-w-4" }),
|
|
4892
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "au-sr-only", children: "Close" })
|
|
4893
|
+
] })
|
|
4894
|
+
]
|
|
2797
4895
|
}
|
|
2798
|
-
)
|
|
2799
|
-
}
|
|
2800
|
-
|
|
4896
|
+
)
|
|
4897
|
+
] }));
|
|
4898
|
+
DialogContent2.displayName = Content.displayName;
|
|
4899
|
+
var DialogHeader = ({
|
|
2801
4900
|
className,
|
|
2802
4901
|
...props
|
|
2803
|
-
})
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
"
|
|
2808
|
-
className
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
4902
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
4903
|
+
"div",
|
|
4904
|
+
{
|
|
4905
|
+
className: cn(
|
|
4906
|
+
"au-flex au-flex-col au-space-y-1.5 au-text-center sm:au-text-left",
|
|
4907
|
+
className
|
|
4908
|
+
),
|
|
4909
|
+
...props
|
|
4910
|
+
}
|
|
4911
|
+
);
|
|
4912
|
+
DialogHeader.displayName = "DialogHeader";
|
|
4913
|
+
var DialogFooter = ({
|
|
4914
|
+
className,
|
|
4915
|
+
...props
|
|
4916
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
4917
|
+
"div",
|
|
4918
|
+
{
|
|
4919
|
+
className: cn(
|
|
4920
|
+
"au-flex au-flex-col-reverse sm:au-flex-row sm:au-justify-end sm:au-space-x-2",
|
|
4921
|
+
className
|
|
4922
|
+
),
|
|
4923
|
+
...props
|
|
4924
|
+
}
|
|
4925
|
+
);
|
|
4926
|
+
DialogFooter.displayName = "DialogFooter";
|
|
4927
|
+
var DialogTitle2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
4928
|
+
Title,
|
|
4929
|
+
{
|
|
4930
|
+
ref,
|
|
4931
|
+
className: cn(
|
|
4932
|
+
"au-text-lg au-font-semibold au-leading-none au-tracking-tight",
|
|
4933
|
+
className
|
|
4934
|
+
),
|
|
4935
|
+
...props
|
|
4936
|
+
}
|
|
4937
|
+
));
|
|
4938
|
+
DialogTitle2.displayName = Title.displayName;
|
|
4939
|
+
var DialogDescription2 = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
4940
|
+
Description,
|
|
4941
|
+
{
|
|
4942
|
+
ref,
|
|
4943
|
+
className: cn("au-text-sm au-text-muted-foreground", className),
|
|
4944
|
+
...props
|
|
4945
|
+
}
|
|
4946
|
+
));
|
|
4947
|
+
DialogDescription2.displayName = Description.displayName;
|
|
2813
4948
|
|
|
2814
4949
|
// src/libraries/react/components/attach-dialog/lib/attach-content.tsx
|
|
2815
|
-
var
|
|
4950
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2816
4951
|
var getAttachContent = (preview) => {
|
|
2817
4952
|
const {
|
|
2818
4953
|
scenario,
|
|
@@ -2825,11 +4960,11 @@ var getAttachContent = (preview) => {
|
|
|
2825
4960
|
switch (scenario) {
|
|
2826
4961
|
case "scheduled":
|
|
2827
4962
|
return {
|
|
2828
|
-
title: /* @__PURE__ */ (0,
|
|
4963
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2829
4964
|
product_name,
|
|
2830
4965
|
" product already scheduled"
|
|
2831
4966
|
] }),
|
|
2832
|
-
message: /* @__PURE__ */ (0,
|
|
4967
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2833
4968
|
"You are currently on product ",
|
|
2834
4969
|
current_product_name,
|
|
2835
4970
|
" and are scheduled to start ",
|
|
@@ -2841,17 +4976,17 @@ var getAttachContent = (preview) => {
|
|
|
2841
4976
|
};
|
|
2842
4977
|
case "active":
|
|
2843
4978
|
return {
|
|
2844
|
-
title: /* @__PURE__ */ (0,
|
|
2845
|
-
message: /* @__PURE__ */ (0,
|
|
4979
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: "Product already active" }),
|
|
4980
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: "You are already subscribed to this product." })
|
|
2846
4981
|
};
|
|
2847
4982
|
case "new":
|
|
2848
4983
|
if (recurring) {
|
|
2849
4984
|
return {
|
|
2850
|
-
title: /* @__PURE__ */ (0,
|
|
4985
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2851
4986
|
"Subscribe to ",
|
|
2852
4987
|
product_name
|
|
2853
4988
|
] }),
|
|
2854
|
-
message: /* @__PURE__ */ (0,
|
|
4989
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2855
4990
|
"By clicking confirm, you will be subscribed to ",
|
|
2856
4991
|
product_name,
|
|
2857
4992
|
" and your card will be charged immediately."
|
|
@@ -2859,11 +4994,11 @@ var getAttachContent = (preview) => {
|
|
|
2859
4994
|
};
|
|
2860
4995
|
} else {
|
|
2861
4996
|
return {
|
|
2862
|
-
title: /* @__PURE__ */ (0,
|
|
4997
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2863
4998
|
"Purchase ",
|
|
2864
4999
|
product_name
|
|
2865
5000
|
] }),
|
|
2866
|
-
message: /* @__PURE__ */ (0,
|
|
5001
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2867
5002
|
"By clicking confirm, you will purchase ",
|
|
2868
5003
|
product_name,
|
|
2869
5004
|
" and your card will be charged immediately."
|
|
@@ -2872,8 +5007,8 @@ var getAttachContent = (preview) => {
|
|
|
2872
5007
|
}
|
|
2873
5008
|
case "renew":
|
|
2874
5009
|
return {
|
|
2875
|
-
title: /* @__PURE__ */ (0,
|
|
2876
|
-
message: /* @__PURE__ */ (0,
|
|
5010
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: "Renew" }),
|
|
5011
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2877
5012
|
"By clicking confirm, you will renew your subscription to",
|
|
2878
5013
|
" ",
|
|
2879
5014
|
product_name,
|
|
@@ -2882,11 +5017,11 @@ var getAttachContent = (preview) => {
|
|
|
2882
5017
|
};
|
|
2883
5018
|
case "upgrade":
|
|
2884
5019
|
return {
|
|
2885
|
-
title: /* @__PURE__ */ (0,
|
|
5020
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2886
5021
|
"Upgrade to ",
|
|
2887
5022
|
product_name
|
|
2888
5023
|
] }),
|
|
2889
|
-
message: /* @__PURE__ */ (0,
|
|
5024
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2890
5025
|
"By clicking confirm, you will upgrade to ",
|
|
2891
5026
|
product_name,
|
|
2892
5027
|
" and your payment method will be charged immediately."
|
|
@@ -2894,11 +5029,11 @@ var getAttachContent = (preview) => {
|
|
|
2894
5029
|
};
|
|
2895
5030
|
case "downgrade":
|
|
2896
5031
|
return {
|
|
2897
|
-
title: /* @__PURE__ */ (0,
|
|
5032
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2898
5033
|
"Downgrade to ",
|
|
2899
5034
|
product_name
|
|
2900
5035
|
] }),
|
|
2901
|
-
message: /* @__PURE__ */ (0,
|
|
5036
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2902
5037
|
"By clicking confirm, your current subscription to",
|
|
2903
5038
|
" ",
|
|
2904
5039
|
current_product_name,
|
|
@@ -2912,8 +5047,8 @@ var getAttachContent = (preview) => {
|
|
|
2912
5047
|
};
|
|
2913
5048
|
case "cancel":
|
|
2914
5049
|
return {
|
|
2915
|
-
title: /* @__PURE__ */ (0,
|
|
2916
|
-
message: /* @__PURE__ */ (0,
|
|
5050
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: "Cancel" }),
|
|
5051
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { children: [
|
|
2917
5052
|
"By clicking confirm, your subscription to ",
|
|
2918
5053
|
current_product_name,
|
|
2919
5054
|
" ",
|
|
@@ -2924,17 +5059,17 @@ var getAttachContent = (preview) => {
|
|
|
2924
5059
|
};
|
|
2925
5060
|
default:
|
|
2926
5061
|
return {
|
|
2927
|
-
title: /* @__PURE__ */ (0,
|
|
2928
|
-
message: /* @__PURE__ */ (0,
|
|
5062
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: "Change Subscription" }),
|
|
5063
|
+
message: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { children: "You are about to change your subscription." })
|
|
2929
5064
|
};
|
|
2930
5065
|
}
|
|
2931
5066
|
};
|
|
2932
5067
|
|
|
2933
5068
|
// src/libraries/react/BaseAutumnProvider.tsx
|
|
2934
|
-
var
|
|
5069
|
+
var import_react6 = require("react");
|
|
2935
5070
|
|
|
2936
5071
|
// src/libraries/react/hooks/useDialog.tsx
|
|
2937
|
-
var
|
|
5072
|
+
var import_react4 = require("react");
|
|
2938
5073
|
|
|
2939
5074
|
// src/libraries/react/hooks/useCustomerBase.tsx
|
|
2940
5075
|
var import_swr2 = __toESM(require("swr"));
|
|
@@ -3429,15 +5564,18 @@ var createCustomerMethod = async ({
|
|
|
3429
5564
|
function stringToSnakeCase(str) {
|
|
3430
5565
|
return str.replace(/([a-z])([A-Z])/g, "$1_$2").replace(/[-\s]+/g, "_").toLowerCase();
|
|
3431
5566
|
}
|
|
3432
|
-
var toSnakeCase = (obj) => {
|
|
5567
|
+
var toSnakeCase = (obj, excludeKeys) => {
|
|
3433
5568
|
if (Array.isArray(obj)) {
|
|
3434
|
-
return obj.map(toSnakeCase);
|
|
5569
|
+
return obj.map((item) => toSnakeCase(item, excludeKeys));
|
|
3435
5570
|
} else if (obj !== null && typeof obj === "object") {
|
|
3436
5571
|
return Object.fromEntries(
|
|
3437
|
-
Object.entries(obj).map(([key, value]) =>
|
|
3438
|
-
stringToSnakeCase(key)
|
|
3439
|
-
|
|
3440
|
-
|
|
5572
|
+
Object.entries(obj).map(([key, value]) => {
|
|
5573
|
+
const snakeKey = stringToSnakeCase(key);
|
|
5574
|
+
if (excludeKeys && excludeKeys.includes(key)) {
|
|
5575
|
+
return [snakeKey, value];
|
|
5576
|
+
}
|
|
5577
|
+
return [snakeKey, toSnakeCase(value, excludeKeys)];
|
|
5578
|
+
})
|
|
3441
5579
|
);
|
|
3442
5580
|
}
|
|
3443
5581
|
return obj;
|
|
@@ -3471,7 +5609,7 @@ async function deleteEntityMethod(entityId) {
|
|
|
3471
5609
|
// src/libraries/react/client/clientGenMethods.ts
|
|
3472
5610
|
async function attachMethod(params) {
|
|
3473
5611
|
let { dialog, ...rest } = params;
|
|
3474
|
-
let snakeParams = toSnakeCase(rest);
|
|
5612
|
+
let snakeParams = toSnakeCase(rest, ["checkoutSessionparams"]);
|
|
3475
5613
|
const res = await this.post("/api/autumn/attach", snakeParams);
|
|
3476
5614
|
return res;
|
|
3477
5615
|
}
|
|
@@ -3521,6 +5659,7 @@ var AutumnClient = class {
|
|
|
3521
5659
|
getBearerToken;
|
|
3522
5660
|
customerData;
|
|
3523
5661
|
includeCredentials;
|
|
5662
|
+
// protected readonly pathPrefix?: string;
|
|
3524
5663
|
constructor({
|
|
3525
5664
|
backendUrl,
|
|
3526
5665
|
getBearerToken,
|
|
@@ -3627,8 +5766,8 @@ var AutumnClient = class {
|
|
|
3627
5766
|
};
|
|
3628
5767
|
|
|
3629
5768
|
// src/libraries/react/AutumnContext.tsx
|
|
3630
|
-
var
|
|
3631
|
-
var AutumnContext = (0,
|
|
5769
|
+
var import_react5 = require("react");
|
|
5770
|
+
var AutumnContext = (0, import_react5.createContext)({
|
|
3632
5771
|
initialized: false,
|
|
3633
5772
|
disableDialogs: false,
|
|
3634
5773
|
client: new AutumnClient({ backendUrl: "" }),
|
|
@@ -3657,7 +5796,7 @@ var useAutumnContext = ({
|
|
|
3657
5796
|
AutumnContext: AutumnContext2,
|
|
3658
5797
|
name
|
|
3659
5798
|
}) => {
|
|
3660
|
-
const context = (0,
|
|
5799
|
+
const context = (0, import_react5.useContext)(AutumnContext2);
|
|
3661
5800
|
if (!context.initialized) {
|
|
3662
5801
|
throw new Error(`${name} must be used within <AutumnProvider />`);
|
|
3663
5802
|
}
|
|
@@ -3671,7 +5810,20 @@ var mergeProductDetails = (products, productDetails) => {
|
|
|
3671
5810
|
return null;
|
|
3672
5811
|
}
|
|
3673
5812
|
if (!productDetails) {
|
|
3674
|
-
return products
|
|
5813
|
+
return products.map((product) => {
|
|
5814
|
+
if (product.base_variant_id) {
|
|
5815
|
+
let baseProduct = products.find(
|
|
5816
|
+
(p) => p.id === product.base_variant_id
|
|
5817
|
+
);
|
|
5818
|
+
if (baseProduct) {
|
|
5819
|
+
return {
|
|
5820
|
+
...product,
|
|
5821
|
+
name: baseProduct.name
|
|
5822
|
+
};
|
|
5823
|
+
}
|
|
5824
|
+
}
|
|
5825
|
+
return product;
|
|
5826
|
+
});
|
|
3675
5827
|
}
|
|
3676
5828
|
let fetchedProducts = structuredClone(products);
|
|
3677
5829
|
let mergedProducts = [];
|
|
@@ -3698,8 +5850,8 @@ var mergeProductDetails = (products, productDetails) => {
|
|
|
3698
5850
|
];
|
|
3699
5851
|
}
|
|
3700
5852
|
mergedProducts.push({
|
|
3701
|
-
name: overrideDetails.name || "",
|
|
3702
5853
|
display: {
|
|
5854
|
+
name: overrideDetails.name,
|
|
3703
5855
|
description: overrideDetails.description,
|
|
3704
5856
|
button_text: overrideDetails.buttonText,
|
|
3705
5857
|
recommend_text: overrideDetails.recommendText,
|
|
@@ -3717,6 +5869,15 @@ var mergeProductDetails = (products, productDetails) => {
|
|
|
3717
5869
|
if (!fetchedProduct) {
|
|
3718
5870
|
continue;
|
|
3719
5871
|
}
|
|
5872
|
+
let displayName = fetchedProduct.name;
|
|
5873
|
+
let baseVariantId = fetchedProduct.base_variant_id;
|
|
5874
|
+
if (baseVariantId) {
|
|
5875
|
+
let baseProduct = fetchedProducts.find((p) => p.id === baseVariantId);
|
|
5876
|
+
if (baseProduct) {
|
|
5877
|
+
displayName = baseProduct.name;
|
|
5878
|
+
}
|
|
5879
|
+
}
|
|
5880
|
+
displayName = overrideDetails.name || displayName;
|
|
3720
5881
|
const originalIsFree = fetchedProduct.properties?.is_free;
|
|
3721
5882
|
let overrideProperties = fetchedProduct.properties || {};
|
|
3722
5883
|
let overrideItems = overrideDetails.items;
|
|
@@ -3775,20 +5936,16 @@ var mergeProductDetails = (products, productDetails) => {
|
|
|
3775
5936
|
}
|
|
3776
5937
|
const mergedProduct = {
|
|
3777
5938
|
...fetchedProduct,
|
|
3778
|
-
name: overrideDetails.name || fetchedProduct.name,
|
|
3779
5939
|
items: mergedItems,
|
|
3780
5940
|
properties: overrideProperties,
|
|
3781
5941
|
display: {
|
|
5942
|
+
name: displayName,
|
|
3782
5943
|
description: overrideDetails.description,
|
|
3783
5944
|
button_text: overrideDetails.buttonText,
|
|
3784
5945
|
recommend_text: overrideDetails.recommendText,
|
|
3785
5946
|
everything_from: overrideDetails.everythingFrom,
|
|
3786
5947
|
button_url: overrideDetails.buttonUrl
|
|
3787
5948
|
}
|
|
3788
|
-
// description: overrideDetails.description,
|
|
3789
|
-
// button_text: overrideDetails.buttonText,
|
|
3790
|
-
// recommend_text: overrideDetails.recommendText,
|
|
3791
|
-
// everything_from: overrideDetails.everythingFrom,
|
|
3792
5949
|
};
|
|
3793
5950
|
mergedProducts.push(mergedProduct);
|
|
3794
5951
|
}
|
|
@@ -3887,7 +6044,7 @@ var useAutumnBase = ({
|
|
|
3887
6044
|
};
|
|
3888
6045
|
const attach = async (params) => {
|
|
3889
6046
|
const { dialog, openInNewTab } = params;
|
|
3890
|
-
let finalDialog = dialog;
|
|
6047
|
+
let finalDialog = dialog ? dialog : context.disableDialogs ? void 0 : AttachDialog;
|
|
3891
6048
|
if (finalDialog && !attachOpen) {
|
|
3892
6049
|
setAttachComponent(finalDialog);
|
|
3893
6050
|
return await attachWithDialog(params);
|
|
@@ -4066,10 +6223,11 @@ var useCustomerBase = ({
|
|
|
4066
6223
|
};
|
|
4067
6224
|
|
|
4068
6225
|
// src/libraries/react/BaseAutumnProvider.tsx
|
|
4069
|
-
var
|
|
6226
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
4070
6227
|
|
|
4071
6228
|
// src/libraries/react/ReactAutumnProvider.tsx
|
|
4072
|
-
var
|
|
6229
|
+
var import_react7 = require("react");
|
|
6230
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
4073
6231
|
|
|
4074
6232
|
// src/libraries/react/hooks/useCustomer.tsx
|
|
4075
6233
|
var useCustomer = (params) => {
|
|
@@ -4081,70 +6239,282 @@ var useCustomer = (params) => {
|
|
|
4081
6239
|
|
|
4082
6240
|
// src/libraries/react/hooks/useEntityBase.tsx
|
|
4083
6241
|
var import_swr3 = __toESM(require("swr"));
|
|
4084
|
-
var
|
|
6242
|
+
var import_react8 = require("react");
|
|
4085
6243
|
|
|
4086
6244
|
// src/libraries/react/components/check-dialog/check-dialog-synced.tsx
|
|
4087
|
-
var
|
|
4088
|
-
var
|
|
6245
|
+
var import_react9 = require("react");
|
|
6246
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
4089
6247
|
|
|
4090
6248
|
// src/libraries/react/components/pricing-table/pricing-table-synced.tsx
|
|
4091
|
-
var
|
|
4092
|
-
var
|
|
6249
|
+
var import_react10 = __toESM(require("react"));
|
|
6250
|
+
var import_react11 = require("react");
|
|
4093
6251
|
|
|
4094
6252
|
// src/libraries/react/components/ui/switch.tsx
|
|
4095
|
-
var
|
|
4096
|
-
|
|
6253
|
+
var React30 = __toESM(require("react"));
|
|
6254
|
+
|
|
6255
|
+
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3._uwbsid7oqv3j27entxmzcweyee/node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
6256
|
+
var React29 = __toESM(require("react"), 1);
|
|
6257
|
+
|
|
6258
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
|
6259
|
+
var React27 = __toESM(require("react"), 1);
|
|
6260
|
+
function usePrevious(value) {
|
|
6261
|
+
const ref = React27.useRef({ value, previous: value });
|
|
6262
|
+
return React27.useMemo(() => {
|
|
6263
|
+
if (ref.current.value !== value) {
|
|
6264
|
+
ref.current.previous = ref.current.value;
|
|
6265
|
+
ref.current.value = value;
|
|
6266
|
+
}
|
|
6267
|
+
return ref.current.previous;
|
|
6268
|
+
}, [value]);
|
|
6269
|
+
}
|
|
6270
|
+
|
|
6271
|
+
// ../node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@18.3.14_react@18.3.1/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
|
6272
|
+
var React28 = __toESM(require("react"), 1);
|
|
6273
|
+
function useSize(element) {
|
|
6274
|
+
const [size, setSize] = React28.useState(void 0);
|
|
6275
|
+
useLayoutEffect2(() => {
|
|
6276
|
+
if (element) {
|
|
6277
|
+
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
6278
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
6279
|
+
if (!Array.isArray(entries)) {
|
|
6280
|
+
return;
|
|
6281
|
+
}
|
|
6282
|
+
if (!entries.length) {
|
|
6283
|
+
return;
|
|
6284
|
+
}
|
|
6285
|
+
const entry = entries[0];
|
|
6286
|
+
let width;
|
|
6287
|
+
let height;
|
|
6288
|
+
if ("borderBoxSize" in entry) {
|
|
6289
|
+
const borderSizeEntry = entry["borderBoxSize"];
|
|
6290
|
+
const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;
|
|
6291
|
+
width = borderSize["inlineSize"];
|
|
6292
|
+
height = borderSize["blockSize"];
|
|
6293
|
+
} else {
|
|
6294
|
+
width = element.offsetWidth;
|
|
6295
|
+
height = element.offsetHeight;
|
|
6296
|
+
}
|
|
6297
|
+
setSize({ width, height });
|
|
6298
|
+
});
|
|
6299
|
+
resizeObserver.observe(element, { box: "border-box" });
|
|
6300
|
+
return () => resizeObserver.unobserve(element);
|
|
6301
|
+
} else {
|
|
6302
|
+
setSize(void 0);
|
|
6303
|
+
}
|
|
6304
|
+
}, [element]);
|
|
6305
|
+
return size;
|
|
6306
|
+
}
|
|
6307
|
+
|
|
6308
|
+
// ../node_modules/.pnpm/@radix-ui+react-switch@1.2.5_@types+react-dom@18.3.5_@types+react@18.3.14__@types+react@18.3._uwbsid7oqv3j27entxmzcweyee/node_modules/@radix-ui/react-switch/dist/index.mjs
|
|
6309
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
6310
|
+
var SWITCH_NAME = "Switch";
|
|
6311
|
+
var [createSwitchContext, createSwitchScope] = createContextScope(SWITCH_NAME);
|
|
6312
|
+
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
|
|
6313
|
+
var Switch = React29.forwardRef(
|
|
6314
|
+
(props, forwardedRef) => {
|
|
6315
|
+
const {
|
|
6316
|
+
__scopeSwitch,
|
|
6317
|
+
name,
|
|
6318
|
+
checked: checkedProp,
|
|
6319
|
+
defaultChecked,
|
|
6320
|
+
required,
|
|
6321
|
+
disabled,
|
|
6322
|
+
value = "on",
|
|
6323
|
+
onCheckedChange,
|
|
6324
|
+
form,
|
|
6325
|
+
...switchProps
|
|
6326
|
+
} = props;
|
|
6327
|
+
const [button, setButton] = React29.useState(null);
|
|
6328
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setButton(node));
|
|
6329
|
+
const hasConsumerStoppedPropagationRef = React29.useRef(false);
|
|
6330
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
6331
|
+
const [checked, setChecked] = useControllableState({
|
|
6332
|
+
prop: checkedProp,
|
|
6333
|
+
defaultProp: defaultChecked ?? false,
|
|
6334
|
+
onChange: onCheckedChange,
|
|
6335
|
+
caller: SWITCH_NAME
|
|
6336
|
+
});
|
|
6337
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
|
|
6338
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6339
|
+
Primitive.button,
|
|
6340
|
+
{
|
|
6341
|
+
type: "button",
|
|
6342
|
+
role: "switch",
|
|
6343
|
+
"aria-checked": checked,
|
|
6344
|
+
"aria-required": required,
|
|
6345
|
+
"data-state": getState2(checked),
|
|
6346
|
+
"data-disabled": disabled ? "" : void 0,
|
|
6347
|
+
disabled,
|
|
6348
|
+
value,
|
|
6349
|
+
...switchProps,
|
|
6350
|
+
ref: composedRefs,
|
|
6351
|
+
onClick: composeEventHandlers(props.onClick, (event) => {
|
|
6352
|
+
setChecked((prevChecked) => !prevChecked);
|
|
6353
|
+
if (isFormControl) {
|
|
6354
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
6355
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
6356
|
+
}
|
|
6357
|
+
})
|
|
6358
|
+
}
|
|
6359
|
+
),
|
|
6360
|
+
isFormControl && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6361
|
+
SwitchBubbleInput,
|
|
6362
|
+
{
|
|
6363
|
+
control: button,
|
|
6364
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
6365
|
+
name,
|
|
6366
|
+
value,
|
|
6367
|
+
checked,
|
|
6368
|
+
required,
|
|
6369
|
+
disabled,
|
|
6370
|
+
form,
|
|
6371
|
+
style: { transform: "translateX(-100%)" }
|
|
6372
|
+
}
|
|
6373
|
+
)
|
|
6374
|
+
] });
|
|
6375
|
+
}
|
|
6376
|
+
);
|
|
6377
|
+
Switch.displayName = SWITCH_NAME;
|
|
6378
|
+
var THUMB_NAME = "SwitchThumb";
|
|
6379
|
+
var SwitchThumb = React29.forwardRef(
|
|
6380
|
+
(props, forwardedRef) => {
|
|
6381
|
+
const { __scopeSwitch, ...thumbProps } = props;
|
|
6382
|
+
const context = useSwitchContext(THUMB_NAME, __scopeSwitch);
|
|
6383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6384
|
+
Primitive.span,
|
|
6385
|
+
{
|
|
6386
|
+
"data-state": getState2(context.checked),
|
|
6387
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
6388
|
+
...thumbProps,
|
|
6389
|
+
ref: forwardedRef
|
|
6390
|
+
}
|
|
6391
|
+
);
|
|
6392
|
+
}
|
|
6393
|
+
);
|
|
6394
|
+
SwitchThumb.displayName = THUMB_NAME;
|
|
6395
|
+
var BUBBLE_INPUT_NAME = "SwitchBubbleInput";
|
|
6396
|
+
var SwitchBubbleInput = React29.forwardRef(
|
|
6397
|
+
({
|
|
6398
|
+
__scopeSwitch,
|
|
6399
|
+
control,
|
|
6400
|
+
checked,
|
|
6401
|
+
bubbles = true,
|
|
6402
|
+
...props
|
|
6403
|
+
}, forwardedRef) => {
|
|
6404
|
+
const ref = React29.useRef(null);
|
|
6405
|
+
const composedRefs = useComposedRefs(ref, forwardedRef);
|
|
6406
|
+
const prevChecked = usePrevious(checked);
|
|
6407
|
+
const controlSize = useSize(control);
|
|
6408
|
+
React29.useEffect(() => {
|
|
6409
|
+
const input = ref.current;
|
|
6410
|
+
if (!input) return;
|
|
6411
|
+
const inputProto = window.HTMLInputElement.prototype;
|
|
6412
|
+
const descriptor = Object.getOwnPropertyDescriptor(
|
|
6413
|
+
inputProto,
|
|
6414
|
+
"checked"
|
|
6415
|
+
);
|
|
6416
|
+
const setChecked = descriptor.set;
|
|
6417
|
+
if (prevChecked !== checked && setChecked) {
|
|
6418
|
+
const event = new Event("click", { bubbles });
|
|
6419
|
+
setChecked.call(input, checked);
|
|
6420
|
+
input.dispatchEvent(event);
|
|
6421
|
+
}
|
|
6422
|
+
}, [prevChecked, checked, bubbles]);
|
|
6423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
6424
|
+
"input",
|
|
6425
|
+
{
|
|
6426
|
+
type: "checkbox",
|
|
6427
|
+
"aria-hidden": true,
|
|
6428
|
+
defaultChecked: checked,
|
|
6429
|
+
...props,
|
|
6430
|
+
tabIndex: -1,
|
|
6431
|
+
ref: composedRefs,
|
|
6432
|
+
style: {
|
|
6433
|
+
...props.style,
|
|
6434
|
+
...controlSize,
|
|
6435
|
+
position: "absolute",
|
|
6436
|
+
pointerEvents: "none",
|
|
6437
|
+
opacity: 0,
|
|
6438
|
+
margin: 0
|
|
6439
|
+
}
|
|
6440
|
+
}
|
|
6441
|
+
);
|
|
6442
|
+
}
|
|
6443
|
+
);
|
|
6444
|
+
SwitchBubbleInput.displayName = BUBBLE_INPUT_NAME;
|
|
6445
|
+
function getState2(checked) {
|
|
6446
|
+
return checked ? "checked" : "unchecked";
|
|
6447
|
+
}
|
|
6448
|
+
var Root2 = Switch;
|
|
6449
|
+
var Thumb = SwitchThumb;
|
|
6450
|
+
|
|
6451
|
+
// src/libraries/react/components/ui/switch.tsx
|
|
6452
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
6453
|
+
var Switch2 = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
6454
|
+
Root2,
|
|
6455
|
+
{
|
|
6456
|
+
className: cn(
|
|
6457
|
+
"au-peer au-inline-flex au-h-5 au-w-9 au-shrink-0 au-cursor-pointer au-items-center au-rounded-full au-border-2 au-border-transparent au-shadow-sm au-transition-colors focus-visible:au-outline-none focus-visible:au-ring-2 focus-visible:au-ring-ring focus-visible:au-ring-offset-2 focus-visible:au-ring-offset-background au-disabled:cursor-not-allowed au-disabled:opacity-50 data-[state=checked]:au-bg-primary data-[state=unchecked]:au-bg-input",
|
|
6458
|
+
className
|
|
6459
|
+
),
|
|
6460
|
+
...props,
|
|
6461
|
+
ref,
|
|
6462
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
6463
|
+
Thumb,
|
|
6464
|
+
{
|
|
6465
|
+
className: cn(
|
|
6466
|
+
"au-pointer-events-none au-block au-h-4 au-w-4 au-rounded-full au-bg-background au-shadow-lg au-ring-0 au-transition-transform data-[state=checked]:au-translate-x-4 data-[state=unchecked]:au-translate-x-0"
|
|
6467
|
+
)
|
|
6468
|
+
}
|
|
6469
|
+
)
|
|
6470
|
+
}
|
|
6471
|
+
));
|
|
6472
|
+
Switch2.displayName = Root2.displayName;
|
|
4097
6473
|
|
|
4098
6474
|
// src/libraries/react/components/pricing-table/lib/pricing-table-content.tsx
|
|
4099
|
-
var
|
|
6475
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
4100
6476
|
|
|
4101
6477
|
// src/libraries/react/components/pricing-table/pricing-table-synced.tsx
|
|
4102
|
-
var
|
|
4103
|
-
var PricingTableContext = (0,
|
|
6478
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
6479
|
+
var PricingTableContext = (0, import_react11.createContext)({
|
|
4104
6480
|
isAnnualToggle: false,
|
|
4105
6481
|
setIsAnnualToggle: () => {
|
|
4106
6482
|
},
|
|
4107
6483
|
products: [],
|
|
4108
6484
|
showFeatures: true
|
|
4109
6485
|
});
|
|
4110
|
-
var PricingCardButton =
|
|
4111
|
-
const [loading, setLoading] = (0,
|
|
4112
|
-
|
|
6486
|
+
var PricingCardButton = import_react10.default.forwardRef(({ recommended, children, className, onClick, ...props }, ref) => {
|
|
6487
|
+
const [loading, setLoading] = (0, import_react11.useState)(false);
|
|
6488
|
+
const handleClick = async (e) => {
|
|
6489
|
+
setLoading(true);
|
|
6490
|
+
try {
|
|
6491
|
+
await onClick?.(e);
|
|
6492
|
+
} catch (error) {
|
|
6493
|
+
console.error(error);
|
|
6494
|
+
} finally {
|
|
6495
|
+
setLoading(false);
|
|
6496
|
+
}
|
|
6497
|
+
};
|
|
6498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
4113
6499
|
Button,
|
|
4114
6500
|
{
|
|
4115
6501
|
className: cn(
|
|
4116
|
-
"w-full py-3 px-4 group overflow-hidden relative transition-all duration-300 hover:brightness-90 border rounded-lg",
|
|
6502
|
+
"au-w-full au-py-3 au-px-4 au-group au-overflow-hidden au-relative au-transition-all au-duration-300 hover:au-brightness-90 au-border au-rounded-lg",
|
|
4117
6503
|
className
|
|
4118
6504
|
),
|
|
6505
|
+
...props,
|
|
4119
6506
|
variant: recommended ? "default" : "secondary",
|
|
4120
6507
|
ref,
|
|
4121
|
-
disabled: loading,
|
|
4122
|
-
onClick:
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
return;
|
|
4128
|
-
}
|
|
4129
|
-
if (buttonUrl) {
|
|
4130
|
-
window.open(buttonUrl, "_blank");
|
|
4131
|
-
return;
|
|
4132
|
-
}
|
|
4133
|
-
} catch (error) {
|
|
4134
|
-
throw error;
|
|
4135
|
-
} finally {
|
|
4136
|
-
setLoading(false);
|
|
4137
|
-
}
|
|
4138
|
-
},
|
|
4139
|
-
...props,
|
|
4140
|
-
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(LoaderCircle, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
4141
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex items-center justify-between w-full transition-transform duration-300 group-hover:translate-y-[-130%]", children: [
|
|
4142
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children }),
|
|
4143
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm", children: "\u2192" })
|
|
6508
|
+
disabled: loading || props.disabled,
|
|
6509
|
+
onClick: handleClick,
|
|
6510
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LoaderCircle, { className: "au-h-4 au-w-4 au-animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
|
|
6511
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "au-flex au-items-center au-justify-between au-w-full au-transition-transform au-duration-300 group-hover:au-translate-y-[-130%]", children: [
|
|
6512
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children }),
|
|
6513
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "au-text-sm", children: "\u2192" })
|
|
4144
6514
|
] }),
|
|
4145
|
-
/* @__PURE__ */ (0,
|
|
4146
|
-
/* @__PURE__ */ (0,
|
|
4147
|
-
/* @__PURE__ */ (0,
|
|
6515
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "au-flex au-items-center au-justify-between au-w-full au-absolute au-px-4 au-translate-y-[130%] au-transition-transform au-duration-300 group-hover:au-translate-y-0 au-mt-2 group-hover:au-mt-0", children: [
|
|
6516
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children }),
|
|
6517
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "au-text-sm", children: "\u2192" })
|
|
4148
6518
|
] })
|
|
4149
6519
|
] })
|
|
4150
6520
|
}
|
|
@@ -4153,11 +6523,11 @@ var PricingCardButton = import_react8.default.forwardRef(({ recommended, childre
|
|
|
4153
6523
|
PricingCardButton.displayName = "PricingCardButton";
|
|
4154
6524
|
|
|
4155
6525
|
// src/libraries/react/components/attach-dialog/attach-dialog-synced.tsx
|
|
4156
|
-
var
|
|
6526
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4157
6527
|
function AttachDialog(params) {
|
|
4158
6528
|
const { attach } = useCustomer();
|
|
4159
|
-
const [loading, setLoading] = (0,
|
|
4160
|
-
const [optionsInput, setOptionsInput] = (0,
|
|
6529
|
+
const [loading, setLoading] = (0, import_react12.useState)(false);
|
|
6530
|
+
const [optionsInput, setOptionsInput] = (0, import_react12.useState)(
|
|
4161
6531
|
params?.preview?.options || []
|
|
4162
6532
|
);
|
|
4163
6533
|
const getTotalPrice = () => {
|
|
@@ -4169,29 +6539,31 @@ function AttachDialog(params) {
|
|
|
4169
6539
|
});
|
|
4170
6540
|
return sum;
|
|
4171
6541
|
};
|
|
4172
|
-
(0,
|
|
6542
|
+
(0, import_react12.useEffect)(() => {
|
|
4173
6543
|
setOptionsInput(params?.preview?.options || []);
|
|
4174
6544
|
}, [params?.preview?.options]);
|
|
4175
6545
|
if (!params || !params.preview) {
|
|
4176
|
-
return /* @__PURE__ */ (0,
|
|
6546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, {});
|
|
4177
6547
|
}
|
|
4178
6548
|
const { open, setOpen, preview } = params;
|
|
4179
6549
|
const { items, due_today } = preview;
|
|
4180
6550
|
const { title, message } = getAttachContent(preview);
|
|
4181
|
-
return /* @__PURE__ */ (0,
|
|
4182
|
-
|
|
6551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog2, { open, onOpenChange: setOpen, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
6552
|
+
DialogContent2,
|
|
4183
6553
|
{
|
|
4184
|
-
className: cn(
|
|
6554
|
+
className: cn(
|
|
6555
|
+
"au-p-0 au-pt-4 au-gap-0 au-text-foreground au-overflow-hidden au-text-sm"
|
|
6556
|
+
),
|
|
4185
6557
|
children: [
|
|
4186
|
-
/* @__PURE__ */ (0,
|
|
4187
|
-
/* @__PURE__ */ (0,
|
|
4188
|
-
(items || optionsInput.length > 0) && /* @__PURE__ */ (0,
|
|
4189
|
-
items?.map((item) => /* @__PURE__ */ (0,
|
|
4190
|
-
/* @__PURE__ */ (0,
|
|
4191
|
-
/* @__PURE__ */ (0,
|
|
6558
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogTitle2, { className: cn("au-px-6 au-mb-1 "), children: title }),
|
|
6559
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cn("au-px-6 au-mt-1 au-mb-4 au-text-muted-foreground"), children: message }),
|
|
6560
|
+
(items || optionsInput.length > 0) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "au-mb-6 au-px-6", children: [
|
|
6561
|
+
items?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(PriceItem, { children: [
|
|
6562
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "au-truncate au-flex-1", children: item.description }),
|
|
6563
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: item.price })
|
|
4192
6564
|
] }, item.description)),
|
|
4193
6565
|
optionsInput?.map((option, index) => {
|
|
4194
|
-
return /* @__PURE__ */ (0,
|
|
6566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4195
6567
|
OptionsInput,
|
|
4196
6568
|
{
|
|
4197
6569
|
option,
|
|
@@ -4203,15 +6575,15 @@ function AttachDialog(params) {
|
|
|
4203
6575
|
);
|
|
4204
6576
|
})
|
|
4205
6577
|
] }),
|
|
4206
|
-
/* @__PURE__ */ (0,
|
|
4207
|
-
due_today && /* @__PURE__ */ (0,
|
|
4208
|
-
/* @__PURE__ */ (0,
|
|
4209
|
-
/* @__PURE__ */ (0,
|
|
6578
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DialogFooter, { className: "au-flex au-flex-col sm:au-flex-row au-justify-between au-gap-x-4 au-py-2 au-pl-6 au-pr-3 au-bg-secondary au-border-t au-shadow-inner", children: [
|
|
6579
|
+
due_today && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(TotalPrice, { children: [
|
|
6580
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: "Due Today" }),
|
|
6581
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: new Intl.NumberFormat("en-US", {
|
|
4210
6582
|
style: "currency",
|
|
4211
6583
|
currency: due_today.currency
|
|
4212
6584
|
}).format(getTotalPrice()) })
|
|
4213
6585
|
] }),
|
|
4214
|
-
/* @__PURE__ */ (0,
|
|
6586
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4215
6587
|
Button,
|
|
4216
6588
|
{
|
|
4217
6589
|
size: "sm",
|
|
@@ -4228,8 +6600,8 @@ function AttachDialog(params) {
|
|
|
4228
6600
|
setLoading(false);
|
|
4229
6601
|
},
|
|
4230
6602
|
disabled: loading,
|
|
4231
|
-
className: "min-w-16 flex items-center gap-2",
|
|
4232
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
6603
|
+
className: "au-min-w-16 au-flex au-items-center au-gap-2",
|
|
6604
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LoaderCircle, { className: "au-w-4 au-h-4 au-animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "au-whitespace-nowrap au-flex au-gap-1", children: "Confirm" }) })
|
|
4233
6605
|
}
|
|
4234
6606
|
)
|
|
4235
6607
|
] })
|
|
@@ -4242,11 +6614,11 @@ var PriceItem = ({
|
|
|
4242
6614
|
className,
|
|
4243
6615
|
...props
|
|
4244
6616
|
}) => {
|
|
4245
|
-
return /* @__PURE__ */ (0,
|
|
6617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4246
6618
|
"div",
|
|
4247
6619
|
{
|
|
4248
6620
|
className: cn(
|
|
4249
|
-
"flex flex-col pb-4 sm:pb-0 gap-1 sm:flex-row justify-between sm:h-7 sm:gap-2 sm:items-center",
|
|
6621
|
+
"au-flex au-flex-col au-pb-4 sm:au-pb-0 au-gap-1 sm:au-flex-row au-justify-between sm:au-h-7 sm:au-gap-2 sm:au-items-center",
|
|
4250
6622
|
className
|
|
4251
6623
|
),
|
|
4252
6624
|
...props,
|
|
@@ -4263,9 +6635,9 @@ var OptionsInput = ({
|
|
|
4263
6635
|
...props
|
|
4264
6636
|
}) => {
|
|
4265
6637
|
const { feature_name, billing_units, quantity, price } = option;
|
|
4266
|
-
return /* @__PURE__ */ (0,
|
|
4267
|
-
/* @__PURE__ */ (0,
|
|
4268
|
-
/* @__PURE__ */ (0,
|
|
6638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(PriceItem, { children: [
|
|
6639
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { children: feature_name }),
|
|
6640
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4269
6641
|
QuantityInput,
|
|
4270
6642
|
{
|
|
4271
6643
|
value: quantity ? quantity / billing_units : "",
|
|
@@ -4274,7 +6646,7 @@ var OptionsInput = ({
|
|
|
4274
6646
|
newOptions[index].quantity = parseInt(e.target.value) * billing_units;
|
|
4275
6647
|
setOptionsInput(newOptions);
|
|
4276
6648
|
},
|
|
4277
|
-
children: /* @__PURE__ */ (0,
|
|
6649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "", children: [
|
|
4278
6650
|
"\xD7 $",
|
|
4279
6651
|
price,
|
|
4280
6652
|
" per ",
|
|
@@ -4301,32 +6673,32 @@ var QuantityInput = ({
|
|
|
4301
6673
|
};
|
|
4302
6674
|
onChange(syntheticEvent);
|
|
4303
6675
|
};
|
|
4304
|
-
return /* @__PURE__ */ (0,
|
|
6676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
4305
6677
|
"div",
|
|
4306
6678
|
{
|
|
4307
|
-
className: cn(className, "flex flex-row items-center gap-4"),
|
|
6679
|
+
className: cn(className, "au-flex au-flex-row au-items-center au-gap-4"),
|
|
4308
6680
|
...props,
|
|
4309
6681
|
children: [
|
|
4310
|
-
/* @__PURE__ */ (0,
|
|
4311
|
-
/* @__PURE__ */ (0,
|
|
6682
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "au-flex au-items-center au-gap-1", children: [
|
|
6683
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4312
6684
|
Button,
|
|
4313
6685
|
{
|
|
4314
6686
|
variant: "outline",
|
|
4315
6687
|
size: "icon",
|
|
4316
6688
|
onClick: () => currentValue > 0 && handleValueChange(currentValue - 1),
|
|
4317
6689
|
disabled: currentValue <= 0,
|
|
4318
|
-
className: "h-6 w-6 pb-0.5",
|
|
6690
|
+
className: "au-h-6 au-w-6 au-pb-0.5",
|
|
4319
6691
|
children: "-"
|
|
4320
6692
|
}
|
|
4321
6693
|
),
|
|
4322
|
-
/* @__PURE__ */ (0,
|
|
4323
|
-
/* @__PURE__ */ (0,
|
|
6694
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "au-w-8 au-text-center au-text-foreground", children: currentValue }),
|
|
6695
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4324
6696
|
Button,
|
|
4325
6697
|
{
|
|
4326
6698
|
variant: "outline",
|
|
4327
6699
|
size: "icon",
|
|
4328
6700
|
onClick: () => handleValueChange(currentValue + 1),
|
|
4329
|
-
className: "h-6 w-6 pb-0.5",
|
|
6701
|
+
className: "au-h-6 au-w-6 au-pb-0.5",
|
|
4330
6702
|
children: "+"
|
|
4331
6703
|
}
|
|
4332
6704
|
)
|
|
@@ -4337,7 +6709,7 @@ var QuantityInput = ({
|
|
|
4337
6709
|
);
|
|
4338
6710
|
};
|
|
4339
6711
|
var TotalPrice = ({ children }) => {
|
|
4340
|
-
return /* @__PURE__ */ (0,
|
|
6712
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "au-w-full au-font-semibold au-flex au-justify-between au-items-center", children });
|
|
4341
6713
|
};
|
|
4342
6714
|
var PricingDialogButton = ({
|
|
4343
6715
|
children,
|
|
@@ -4346,16 +6718,16 @@ var PricingDialogButton = ({
|
|
|
4346
6718
|
disabled,
|
|
4347
6719
|
className
|
|
4348
6720
|
}) => {
|
|
4349
|
-
return /* @__PURE__ */ (0,
|
|
6721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
4350
6722
|
Button,
|
|
4351
6723
|
{
|
|
4352
6724
|
onClick,
|
|
4353
6725
|
disabled,
|
|
4354
6726
|
size,
|
|
4355
|
-
className: cn(className, "shadow-sm shadow-stone-400"),
|
|
6727
|
+
className: cn(className, "au-shadow-sm au-shadow-stone-400"),
|
|
4356
6728
|
children: [
|
|
4357
6729
|
children,
|
|
4358
|
-
/* @__PURE__ */ (0,
|
|
6730
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ArrowRight, { className: "!au-h-3" })
|
|
4359
6731
|
]
|
|
4360
6732
|
}
|
|
4361
6733
|
);
|