@windrun-huaiin/third-ui 5.14.1 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clerk/index.d.mts +2 -21
- package/dist/clerk/index.d.ts +2 -21
- package/dist/clerk/index.js +5 -2884
- package/dist/clerk/index.js.map +1 -1
- package/dist/clerk/index.mjs +3 -2872
- package/dist/clerk/index.mjs.map +1 -1
- package/dist/clerk/server.d.mts +28 -0
- package/dist/clerk/server.d.ts +28 -0
- package/dist/clerk/server.js +3025 -0
- package/dist/clerk/server.js.map +1 -0
- package/dist/clerk/server.mjs +2991 -0
- package/dist/clerk/server.mjs.map +1 -0
- package/dist/fuma/mdx/index.d.mts +1 -12
- package/dist/fuma/mdx/index.d.ts +1 -12
- package/dist/fuma/mdx/index.js +49 -263
- package/dist/fuma/mdx/index.js.map +1 -1
- package/dist/fuma/mdx/index.mjs +50 -262
- package/dist/fuma/mdx/index.mjs.map +1 -1
- package/dist/fuma/server.d.mts +15 -2
- package/dist/fuma/server.d.ts +15 -2
- package/dist/fuma/server.js +234 -49
- package/dist/fuma/server.js.map +1 -1
- package/dist/fuma/server.mjs +231 -48
- package/dist/fuma/server.mjs.map +1 -1
- package/dist/lib/server.d.mts +509 -465
- package/dist/lib/server.d.ts +509 -465
- package/dist/main/index.d.mts +5 -56
- package/dist/main/index.d.ts +5 -56
- package/dist/main/index.js +646 -1322
- package/dist/main/index.js.map +1 -1
- package/dist/main/index.mjs +675 -1342
- package/dist/main/index.mjs.map +1 -1
- package/dist/main/server.d.mts +64 -0
- package/dist/main/server.d.ts +64 -0
- package/dist/main/server.js +4166 -0
- package/dist/main/server.js.map +1 -0
- package/dist/main/server.mjs +4128 -0
- package/dist/main/server.mjs.map +1 -0
- package/package.json +12 -2
- package/src/clerk/clerk-organization-client.tsx +50 -0
- package/src/clerk/clerk-organization.tsx +21 -38
- package/src/clerk/clerk-page-generator.tsx +0 -2
- package/src/clerk/clerk-provider-client.tsx +1 -1
- package/src/clerk/clerk-user-client.tsx +64 -0
- package/src/clerk/clerk-user.tsx +29 -58
- package/src/clerk/index.ts +1 -4
- package/src/clerk/server.ts +3 -0
- package/src/fuma/{mdx/fuma-banner-suit.tsx → fuma-banner-suit.tsx} +3 -6
- package/src/fuma/mdx/banner.tsx +0 -1
- package/src/fuma/mdx/index.ts +0 -2
- package/src/fuma/mdx/mermaid.tsx +3 -1
- package/src/fuma/mdx/toc-footer-wrapper.tsx +1 -0
- package/src/fuma/mdx/zia-file.tsx +0 -1
- package/src/fuma/server.ts +3 -1
- package/src/fuma/{mdx/site-x.tsx → site-x.tsx} +4 -5
- package/src/main/cta.tsx +33 -10
- package/src/main/faq-interactive.tsx +68 -0
- package/src/main/faq.tsx +62 -38
- package/src/main/features.tsx +40 -11
- package/src/main/footer.tsx +27 -16
- package/src/main/gallery-interactive.tsx +171 -0
- package/src/main/gallery.tsx +54 -101
- package/src/main/index.ts +1 -10
- package/src/main/language-detector.tsx +175 -0
- package/src/main/price-plan-interactive.tsx +273 -0
- package/src/main/price-plan.tsx +112 -129
- package/src/main/seo-content.tsx +46 -13
- package/src/main/server.ts +10 -0
- package/src/main/tips.tsx +48 -22
- package/src/main/usage.tsx +43 -11
package/dist/main/index.js
CHANGED
|
@@ -82,24 +82,18 @@ var main_exports = {};
|
|
|
82
82
|
__export(main_exports, {
|
|
83
83
|
AIPromptTextarea: () => AIPromptTextarea,
|
|
84
84
|
AdsAlertDialog: () => AdsAlertDialog,
|
|
85
|
-
CTA: () => CTA,
|
|
86
|
-
FAQ: () => FAQ,
|
|
87
|
-
Features: () => Features,
|
|
88
|
-
Footer: () => Footer,
|
|
89
|
-
Gallery: () => Gallery,
|
|
90
85
|
GoToTop: () => GoToTop,
|
|
91
86
|
Loading: () => Loading,
|
|
92
87
|
NProgressBar: () => NProgressBar,
|
|
93
|
-
PricePlan: () => PricePlan,
|
|
94
|
-
SeoContent: () => SeoContent,
|
|
95
|
-
Tips: () => Tips,
|
|
96
|
-
Usage: () => Usage,
|
|
97
88
|
XButton: () => XButton,
|
|
98
89
|
createRichTextRenderer: () => createRichTextRenderer,
|
|
99
90
|
richText: () => richText
|
|
100
91
|
});
|
|
101
92
|
module.exports = __toCommonJS(main_exports);
|
|
102
93
|
|
|
94
|
+
// src/main/go-to-top.tsx
|
|
95
|
+
var import_react35 = require("react");
|
|
96
|
+
|
|
103
97
|
// ../base-ui/src/assets/github.tsx
|
|
104
98
|
var import_react = __toESM(require("react"), 1);
|
|
105
99
|
|
|
@@ -2738,1092 +2732,200 @@ for (const [iconName, IconComponent] of Object.entries(BUILTIN_ICON_COMPONENTS))
|
|
|
2738
2732
|
}
|
|
2739
2733
|
var wrappedBuiltinIconsPart = tempWrappedBuiltinIcons;
|
|
2740
2734
|
var globalLucideIcons = __spreadValues(__spreadValues({}, styledLimitedIconsPart), wrappedBuiltinIconsPart);
|
|
2741
|
-
var DEFAULT_FALLBACK_ICON = "Sparkles";
|
|
2742
|
-
function getGlobalIcon(iconKey, createElement8) {
|
|
2743
|
-
var _a;
|
|
2744
|
-
if (!iconKey) {
|
|
2745
|
-
if (createElement8) {
|
|
2746
|
-
return void 0;
|
|
2747
|
-
}
|
|
2748
|
-
return globalLucideIcons[DEFAULT_FALLBACK_ICON];
|
|
2749
|
-
}
|
|
2750
|
-
const Icon2 = globalLucideIcons[iconKey];
|
|
2751
|
-
if (!Icon2) {
|
|
2752
|
-
if (typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.NODE_ENV) !== "production") {
|
|
2753
|
-
console.warn(
|
|
2754
|
-
`[global-icon] iconKey "${iconKey}" is not defined in globalIcons, will use default "${String(DEFAULT_FALLBACK_ICON)}" icon, please check!`
|
|
2755
|
-
);
|
|
2756
|
-
}
|
|
2757
|
-
const FallbackIcon = globalLucideIcons[DEFAULT_FALLBACK_ICON];
|
|
2758
|
-
if (createElement8) {
|
|
2759
|
-
return import_react34.default.createElement(FallbackIcon);
|
|
2760
|
-
}
|
|
2761
|
-
return FallbackIcon;
|
|
2762
|
-
}
|
|
2763
|
-
if (createElement8) {
|
|
2764
|
-
return import_react34.default.createElement(Icon2);
|
|
2765
|
-
}
|
|
2766
|
-
return Icon2;
|
|
2767
|
-
}
|
|
2768
|
-
|
|
2769
|
-
// ../lib/src/utils.ts
|
|
2770
|
-
var import_clsx = require("clsx");
|
|
2771
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
2772
|
-
function cn(...inputs) {
|
|
2773
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
2774
|
-
}
|
|
2775
2735
|
|
|
2776
|
-
// src/main/
|
|
2777
|
-
var import_next_intl = require("next-intl");
|
|
2778
|
-
var import_image = __toESM(require("next/image"));
|
|
2779
|
-
var import_react35 = require("react");
|
|
2736
|
+
// src/main/go-to-top.tsx
|
|
2780
2737
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2781
|
-
function
|
|
2782
|
-
const
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
var _a;
|
|
2790
|
-
if (downloadingItems.has(index)) {
|
|
2791
|
-
return;
|
|
2792
|
-
}
|
|
2793
|
-
setDownloadingItems((prev) => new Set(prev).add(index));
|
|
2794
|
-
try {
|
|
2795
|
-
const originalUrl = new URL(item.url);
|
|
2796
|
-
const filename = originalUrl.pathname.substring(1);
|
|
2797
|
-
const proxyUrl = `${cdnProxyUrl}/${encodeURIComponent(filename)}`;
|
|
2798
|
-
const urlExtension = (_a = item.url.split(".").pop()) == null ? void 0 : _a.toLowerCase();
|
|
2799
|
-
let extension = ".webp";
|
|
2800
|
-
if (urlExtension && ["jpg", "jpeg", "png", "gif", "webp", "svg"].includes(urlExtension)) {
|
|
2801
|
-
extension = `.${urlExtension}`;
|
|
2802
|
-
}
|
|
2803
|
-
const downloadPrefix = t("downloadPrefix");
|
|
2804
|
-
const response = yield fetch(proxyUrl);
|
|
2805
|
-
if (!response.ok) {
|
|
2806
|
-
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
|
|
2738
|
+
function GoToTop() {
|
|
2739
|
+
const [isVisible, setIsVisible] = (0, import_react35.useState)(false);
|
|
2740
|
+
(0, import_react35.useEffect)(() => {
|
|
2741
|
+
const toggleVisibility = () => {
|
|
2742
|
+
if (window.scrollY > 300) {
|
|
2743
|
+
setIsVisible(true);
|
|
2744
|
+
} else {
|
|
2745
|
+
setIsVisible(false);
|
|
2807
2746
|
}
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
document.body.removeChild(a);
|
|
2818
|
-
URL.revokeObjectURL(blobUrl);
|
|
2819
|
-
}, 100);
|
|
2820
|
-
} catch (error) {
|
|
2821
|
-
console.error("Download failed:", error);
|
|
2822
|
-
} finally {
|
|
2823
|
-
setDownloadingItems((prev) => {
|
|
2824
|
-
const newSet = new Set(prev);
|
|
2825
|
-
newSet.delete(index);
|
|
2826
|
-
return newSet;
|
|
2827
|
-
});
|
|
2828
|
-
}
|
|
2829
|
-
});
|
|
2830
|
-
const handleImageError = (index) => {
|
|
2831
|
-
setImageErrors((prev) => new Set(prev).add(index));
|
|
2832
|
-
};
|
|
2833
|
-
const getImageSrc = (item, index) => {
|
|
2834
|
-
return imageErrors.has(index) ? defaultImgUrl : item.url;
|
|
2747
|
+
};
|
|
2748
|
+
window.addEventListener("scroll", toggleVisibility);
|
|
2749
|
+
return () => window.removeEventListener("scroll", toggleVisibility);
|
|
2750
|
+
}, []);
|
|
2751
|
+
const scrollToTop = () => {
|
|
2752
|
+
window.scrollTo({
|
|
2753
|
+
top: 0,
|
|
2754
|
+
behavior: "smooth"
|
|
2755
|
+
});
|
|
2835
2756
|
};
|
|
2836
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
" ",
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6", children: galleryItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "group relative overflow-hidden rounded-xl", children: [
|
|
2846
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2847
|
-
import_image.default,
|
|
2848
|
-
{
|
|
2849
|
-
src: getImageSrc(item, index),
|
|
2850
|
-
alt: item.altMsg,
|
|
2851
|
-
width: 600,
|
|
2852
|
-
height: 600,
|
|
2853
|
-
className: "w-full h-80 object-cover transition duration-300 group-hover:scale-105",
|
|
2854
|
-
onError: () => handleImageError(index)
|
|
2855
|
-
}
|
|
2856
|
-
),
|
|
2857
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute inset-0 flex items-end justify-end p-4 opacity-0 group-hover:opacity-100 transition duration-300", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2858
|
-
"button",
|
|
2859
|
-
{
|
|
2860
|
-
onClick: () => handleDownload(item, index),
|
|
2861
|
-
disabled: downloadingItems.has(index),
|
|
2862
|
-
className: cn(
|
|
2863
|
-
"p-2 rounded-full transition-all duration-300",
|
|
2864
|
-
downloadingItems.has(index) ? "bg-black/30 text-white/50" : "bg-black/50 hover:bg-black/70 text-white/80 hover:text-white"
|
|
2865
|
-
),
|
|
2866
|
-
children: downloadingItems.has(index) ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.Loader2, { className: "h-5 w-5 text-white animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.Download, { className: "h-5 w-5 text-white" })
|
|
2867
|
-
}
|
|
2868
|
-
) })
|
|
2869
|
-
] }, index)) }),
|
|
2870
|
-
button && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "text-center mt-12", children: button })
|
|
2871
|
-
] });
|
|
2757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_jsx_runtime33.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2758
|
+
"button",
|
|
2759
|
+
{
|
|
2760
|
+
onClick: scrollToTop,
|
|
2761
|
+
className: "fixed bottom-6 right-6 p-3 bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-300 z-50",
|
|
2762
|
+
"aria-label": "Go to top",
|
|
2763
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(globalLucideIcons.ArrowUp, { size: 20, className: "text-white" })
|
|
2764
|
+
}
|
|
2765
|
+
) });
|
|
2872
2766
|
}
|
|
2873
2767
|
|
|
2874
|
-
// src/main/
|
|
2875
|
-
var import_next_intl2 = require("next-intl");
|
|
2876
|
-
|
|
2877
|
-
// src/main/rich-text-expert.tsx
|
|
2768
|
+
// src/main/loading.tsx
|
|
2878
2769
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2879
|
-
var
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
const
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-16", children: [
|
|
2970
|
-
t("title"),
|
|
2971
|
-
" ",
|
|
2972
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
2973
|
-
] }),
|
|
2974
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-12 bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [leftColumn, rightColumn].map((column, colIndex) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "space-y-8", children: column.map((tip, tipIndex) => {
|
|
2975
|
-
const actualIndex = colIndex === 0 ? tipIndex : tipIndex + midPoint;
|
|
2976
|
-
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "space-y-4", children: [
|
|
2977
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", { className: "text-2xl font-semibold", children: tip.title }),
|
|
2978
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", { className: "", children: richText(t, `sections.${actualIndex}.description`) })
|
|
2979
|
-
] }, tipIndex);
|
|
2980
|
-
}) }, colIndex)) })
|
|
2981
|
-
] });
|
|
2770
|
+
var NUM_ROWS = 15;
|
|
2771
|
+
var NUM_COLS = 15;
|
|
2772
|
+
var DOT_SIZE = 6;
|
|
2773
|
+
var SPACING = 12;
|
|
2774
|
+
var ANIMATION_DURATION = 1.8;
|
|
2775
|
+
var STAGGER_DELAY_FACTOR = 0.08;
|
|
2776
|
+
var COLORS = [
|
|
2777
|
+
"#AC62FD",
|
|
2778
|
+
// Base Purple
|
|
2779
|
+
"#C364FA",
|
|
2780
|
+
"#DD59F7",
|
|
2781
|
+
"#FF4FF2",
|
|
2782
|
+
// Bright Pink/Magenta
|
|
2783
|
+
"#F067DD",
|
|
2784
|
+
"#E26AF8",
|
|
2785
|
+
"#DA70D6",
|
|
2786
|
+
// Orchid
|
|
2787
|
+
"#BA55D3",
|
|
2788
|
+
// Medium Orchid
|
|
2789
|
+
"#9370DB",
|
|
2790
|
+
// Medium Purple
|
|
2791
|
+
"#8A2BE2"
|
|
2792
|
+
// Blue Violet
|
|
2793
|
+
];
|
|
2794
|
+
function Loading() {
|
|
2795
|
+
const dots = [];
|
|
2796
|
+
const centerX = (NUM_COLS - 1) / 2;
|
|
2797
|
+
const centerY = (NUM_ROWS - 1) / 2;
|
|
2798
|
+
for (let i = 0; i < NUM_ROWS; i++) {
|
|
2799
|
+
for (let j = 0; j < NUM_COLS; j++) {
|
|
2800
|
+
const distance = Math.sqrt(Math.pow(i - centerY, 2) + Math.pow(j - centerX, 2));
|
|
2801
|
+
dots.push({
|
|
2802
|
+
id: `${i}-${j}`,
|
|
2803
|
+
row: i,
|
|
2804
|
+
col: j,
|
|
2805
|
+
// Animation delay based on distance, creating a ripple effect
|
|
2806
|
+
delay: distance * STAGGER_DELAY_FACTOR,
|
|
2807
|
+
// Color selection based on distance rings
|
|
2808
|
+
color: COLORS[Math.floor(distance) % COLORS.length]
|
|
2809
|
+
});
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
const containerWidth = (NUM_COLS - 1) * SPACING + DOT_SIZE;
|
|
2813
|
+
const containerHeight = (NUM_ROWS - 1) * SPACING + DOT_SIZE;
|
|
2814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex flex-col items-center justify-center min-h-screen bg-neutral-900", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2815
|
+
"div",
|
|
2816
|
+
{
|
|
2817
|
+
style: {
|
|
2818
|
+
width: containerWidth,
|
|
2819
|
+
height: containerHeight,
|
|
2820
|
+
position: "relative",
|
|
2821
|
+
borderRadius: "50%",
|
|
2822
|
+
// Make the container circular
|
|
2823
|
+
overflow: "hidden"
|
|
2824
|
+
// Clip dots outside the circle
|
|
2825
|
+
},
|
|
2826
|
+
children: [
|
|
2827
|
+
dots.map((dot) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2828
|
+
"div",
|
|
2829
|
+
{
|
|
2830
|
+
style: {
|
|
2831
|
+
position: "absolute",
|
|
2832
|
+
left: dot.col * SPACING,
|
|
2833
|
+
top: dot.row * SPACING,
|
|
2834
|
+
width: DOT_SIZE,
|
|
2835
|
+
height: DOT_SIZE,
|
|
2836
|
+
backgroundColor: dot.color,
|
|
2837
|
+
borderRadius: "50%",
|
|
2838
|
+
animationName: "loading-dot-pulse",
|
|
2839
|
+
animationDuration: `${ANIMATION_DURATION}s`,
|
|
2840
|
+
animationTimingFunction: "cubic-bezier(0.45, 0, 0.55, 1)",
|
|
2841
|
+
animationIterationCount: "infinite",
|
|
2842
|
+
animationDelay: `${dot.delay}s`,
|
|
2843
|
+
opacity: 0,
|
|
2844
|
+
transform: "scale(0)"
|
|
2845
|
+
}
|
|
2846
|
+
},
|
|
2847
|
+
dot.id
|
|
2848
|
+
)),
|
|
2849
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2850
|
+
"div",
|
|
2851
|
+
{
|
|
2852
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
2853
|
+
style: { pointerEvents: "none" },
|
|
2854
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "text-xl font-semibold text-white", children: "Loading..." })
|
|
2855
|
+
}
|
|
2856
|
+
)
|
|
2857
|
+
]
|
|
2858
|
+
}
|
|
2859
|
+
) });
|
|
2982
2860
|
}
|
|
2983
2861
|
|
|
2984
|
-
// src/main/
|
|
2862
|
+
// src/main/nprogress-bar.tsx
|
|
2863
|
+
var import_nprogress = __toESM(require("nprogress"));
|
|
2864
|
+
var import_navigation = require("next/navigation");
|
|
2985
2865
|
var import_react36 = require("react");
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
const
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
}
|
|
2998
|
-
};
|
|
2999
|
-
return
|
|
3000
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-4", children: t("title") }),
|
|
3001
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-base md:text-lg mx-auto", children: richText(t, "description") }),
|
|
3002
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "space-y-6", children: items.map((item, idx) => {
|
|
3003
|
-
const isOpen = openArr[idx];
|
|
3004
|
-
const Icon2 = isOpen ? globalLucideIcons.ChevronDown : globalLucideIcons.ChevronRight;
|
|
3005
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3006
|
-
"div",
|
|
3007
|
-
{
|
|
3008
|
-
className: "bg-white dark:bg-gray-800/60 p-6 rounded-xl border border-gray-200 dark:border-gray-700 hover:border-purple-300 dark:hover:border-purple-500/50 transition shadow-sm dark:shadow-none",
|
|
3009
|
-
children: [
|
|
3010
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3011
|
-
"button",
|
|
3012
|
-
{
|
|
3013
|
-
className: "w-full flex items-center justify-between text-left focus:outline-none",
|
|
3014
|
-
onClick: () => handleToggle(idx),
|
|
3015
|
-
"aria-expanded": isOpen,
|
|
3016
|
-
children: [
|
|
3017
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-lg font-semibold text-gray-900 dark:text-gray-100", children: item.question }),
|
|
3018
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon2, { className: "w-6 h-6 text-gray-400 ml-2 transition-transform duration-200" })
|
|
3019
|
-
]
|
|
3020
|
-
}
|
|
3021
|
-
),
|
|
3022
|
-
isOpen && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "mt-4 text-gray-700 dark:text-gray-300 text-base", children: richText(t, `items.${idx}.answer`) })
|
|
3023
|
-
]
|
|
3024
|
-
},
|
|
3025
|
-
idx
|
|
3026
|
-
);
|
|
3027
|
-
}) })
|
|
3028
|
-
] });
|
|
2866
|
+
import_nprogress.default.configure({ showSpinner: false });
|
|
2867
|
+
function NProgressBar() {
|
|
2868
|
+
const pathname = (0, import_navigation.usePathname)();
|
|
2869
|
+
const previousPath = (0, import_react36.useRef)(pathname);
|
|
2870
|
+
(0, import_react36.useEffect)(() => {
|
|
2871
|
+
if (previousPath.current !== pathname) {
|
|
2872
|
+
import_nprogress.default.start();
|
|
2873
|
+
setTimeout(() => {
|
|
2874
|
+
import_nprogress.default.done();
|
|
2875
|
+
}, 100);
|
|
2876
|
+
previousPath.current = pathname;
|
|
2877
|
+
}
|
|
2878
|
+
}, [pathname]);
|
|
2879
|
+
return null;
|
|
3029
2880
|
}
|
|
3030
2881
|
|
|
3031
|
-
// src/main/
|
|
3032
|
-
var
|
|
3033
|
-
var
|
|
3034
|
-
function SeoContent({ sectionClassName }) {
|
|
3035
|
-
const t = (0, import_next_intl6.useTranslations)("seoContent");
|
|
3036
|
-
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("section", { id: "seo", className: cn("px-16 py-10 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: [
|
|
3037
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-8", children: [
|
|
3038
|
-
t("title"),
|
|
3039
|
-
" ",
|
|
3040
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-purple-500", children: t("eyesOn") })
|
|
3041
|
-
] }),
|
|
3042
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "text-center text-gray-600 dark:text-gray-400 mb-12 text-lg", children: t("description") }),
|
|
3043
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "bg-gray-50 dark:bg-gray-800/60 border border-gray-200 dark:border-gray-700 rounded-2xl p-8 md:p-12 shadow-sm dark:shadow-none", children: [
|
|
3044
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "space-y-10", children: [
|
|
3045
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-gray-600 dark:text-gray-400 text-lg", children: richText(t, "intro") }),
|
|
3046
|
-
t.raw("sections").map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { children: [
|
|
3047
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h2", { className: "text-xl font-semibold mb-3 text-gray-900 dark:text-gray-100 flex items-center", children: section.title }),
|
|
3048
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-gray-700 dark:text-gray-300", children: richText(t, `sections.${index}.content`) })
|
|
3049
|
-
] }, index))
|
|
3050
|
-
] }),
|
|
3051
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "mt-10 text-gray-600 dark:text-gray-400 text-lg", children: richText(t, "conclusion") })
|
|
3052
|
-
] })
|
|
3053
|
-
] });
|
|
3054
|
-
}
|
|
2882
|
+
// src/main/ads-alert-dialog.tsx
|
|
2883
|
+
var import_react38 = require("react");
|
|
2884
|
+
var import_image = __toESM(require("next/image"));
|
|
3055
2885
|
|
|
3056
|
-
// ../base-ui/src/ui/
|
|
3057
|
-
var
|
|
2886
|
+
// ../base-ui/src/ui/alert-dialog.tsx
|
|
2887
|
+
var React57 = __toESM(require("react"), 1);
|
|
3058
2888
|
|
|
3059
|
-
// ../../node_modules/.pnpm/@radix-ui+react-
|
|
3060
|
-
var
|
|
2889
|
+
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
2890
|
+
var React55 = __toESM(require("react"), 1);
|
|
3061
2891
|
|
|
3062
|
-
// ../../node_modules/.pnpm/@radix-ui+react-
|
|
2892
|
+
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
3063
2893
|
var React33 = __toESM(require("react"), 1);
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
2894
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2895
|
+
function createContext2(rootComponentName, defaultContext) {
|
|
2896
|
+
const Context = React33.createContext(defaultContext);
|
|
2897
|
+
const Provider = (props) => {
|
|
2898
|
+
const _a = props, { children } = _a, context = __objRest(_a, ["children"]);
|
|
2899
|
+
const value = React33.useMemo(() => context, Object.values(context));
|
|
2900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Context.Provider, { value, children });
|
|
2901
|
+
};
|
|
2902
|
+
Provider.displayName = rootComponentName + "Provider";
|
|
2903
|
+
function useContext22(consumerName) {
|
|
2904
|
+
const context = React33.useContext(Context);
|
|
2905
|
+
if (context) return context;
|
|
2906
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
2907
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
3069
2908
|
}
|
|
3070
|
-
|
|
3071
|
-
function composeRefs(...refs) {
|
|
3072
|
-
return (node) => {
|
|
3073
|
-
let hasCleanup = false;
|
|
3074
|
-
const cleanups = refs.map((ref) => {
|
|
3075
|
-
const cleanup = setRef(ref, node);
|
|
3076
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
3077
|
-
hasCleanup = true;
|
|
3078
|
-
}
|
|
3079
|
-
return cleanup;
|
|
3080
|
-
});
|
|
3081
|
-
if (hasCleanup) {
|
|
3082
|
-
return () => {
|
|
3083
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
3084
|
-
const cleanup = cleanups[i];
|
|
3085
|
-
if (typeof cleanup == "function") {
|
|
3086
|
-
cleanup();
|
|
3087
|
-
} else {
|
|
3088
|
-
setRef(refs[i], null);
|
|
3089
|
-
}
|
|
3090
|
-
}
|
|
3091
|
-
};
|
|
3092
|
-
}
|
|
3093
|
-
};
|
|
3094
|
-
}
|
|
3095
|
-
function useComposedRefs(...refs) {
|
|
3096
|
-
return React33.useCallback(composeRefs(...refs), refs);
|
|
3097
|
-
}
|
|
3098
|
-
|
|
3099
|
-
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
3100
|
-
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3101
|
-
// @__NO_SIDE_EFFECTS__
|
|
3102
|
-
function createSlot(ownerName) {
|
|
3103
|
-
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
3104
|
-
const Slot22 = React34.forwardRef((props, forwardedRef) => {
|
|
3105
|
-
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3106
|
-
const childrenArray = React34.Children.toArray(children);
|
|
3107
|
-
const slottable = childrenArray.find(isSlottable);
|
|
3108
|
-
if (slottable) {
|
|
3109
|
-
const newElement = slottable.props.children;
|
|
3110
|
-
const newChildren = childrenArray.map((child) => {
|
|
3111
|
-
if (child === slottable) {
|
|
3112
|
-
if (React34.Children.count(newElement) > 1) return React34.Children.only(null);
|
|
3113
|
-
return React34.isValidElement(newElement) ? newElement.props.children : null;
|
|
3114
|
-
} else {
|
|
3115
|
-
return child;
|
|
3116
|
-
}
|
|
3117
|
-
});
|
|
3118
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React34.isValidElement(newElement) ? React34.cloneElement(newElement, void 0, newChildren) : null }));
|
|
3119
|
-
}
|
|
3120
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
3121
|
-
});
|
|
3122
|
-
Slot22.displayName = `${ownerName}.Slot`;
|
|
3123
|
-
return Slot22;
|
|
3124
|
-
}
|
|
3125
|
-
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
3126
|
-
// @__NO_SIDE_EFFECTS__
|
|
3127
|
-
function createSlotClone(ownerName) {
|
|
3128
|
-
const SlotClone = React34.forwardRef((props, forwardedRef) => {
|
|
3129
|
-
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3130
|
-
if (React34.isValidElement(children)) {
|
|
3131
|
-
const childrenRef = getElementRef(children);
|
|
3132
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
3133
|
-
if (children.type !== React34.Fragment) {
|
|
3134
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3135
|
-
}
|
|
3136
|
-
return React34.cloneElement(children, props2);
|
|
3137
|
-
}
|
|
3138
|
-
return React34.Children.count(children) > 1 ? React34.Children.only(null) : null;
|
|
3139
|
-
});
|
|
3140
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3141
|
-
return SlotClone;
|
|
3142
|
-
}
|
|
3143
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
3144
|
-
// @__NO_SIDE_EFFECTS__
|
|
3145
|
-
function createSlottable(ownerName) {
|
|
3146
|
-
const Slottable2 = ({ children }) => {
|
|
3147
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_jsx_runtime40.Fragment, { children });
|
|
3148
|
-
};
|
|
3149
|
-
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
3150
|
-
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
3151
|
-
return Slottable2;
|
|
3152
|
-
}
|
|
3153
|
-
function isSlottable(child) {
|
|
3154
|
-
return React34.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
3155
|
-
}
|
|
3156
|
-
function mergeProps(slotProps, childProps) {
|
|
3157
|
-
const overrideProps = __spreadValues({}, childProps);
|
|
3158
|
-
for (const propName in childProps) {
|
|
3159
|
-
const slotPropValue = slotProps[propName];
|
|
3160
|
-
const childPropValue = childProps[propName];
|
|
3161
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
3162
|
-
if (isHandler) {
|
|
3163
|
-
if (slotPropValue && childPropValue) {
|
|
3164
|
-
overrideProps[propName] = (...args) => {
|
|
3165
|
-
const result = childPropValue(...args);
|
|
3166
|
-
slotPropValue(...args);
|
|
3167
|
-
return result;
|
|
3168
|
-
};
|
|
3169
|
-
} else if (slotPropValue) {
|
|
3170
|
-
overrideProps[propName] = slotPropValue;
|
|
3171
|
-
}
|
|
3172
|
-
} else if (propName === "style") {
|
|
3173
|
-
overrideProps[propName] = __spreadValues(__spreadValues({}, slotPropValue), childPropValue);
|
|
3174
|
-
} else if (propName === "className") {
|
|
3175
|
-
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
3176
|
-
}
|
|
3177
|
-
}
|
|
3178
|
-
return __spreadValues(__spreadValues({}, slotProps), overrideProps);
|
|
3179
|
-
}
|
|
3180
|
-
function getElementRef(element) {
|
|
3181
|
-
var _a, _b;
|
|
3182
|
-
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
3183
|
-
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3184
|
-
if (mayWarn) {
|
|
3185
|
-
return element.ref;
|
|
3186
|
-
}
|
|
3187
|
-
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
3188
|
-
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3189
|
-
if (mayWarn) {
|
|
3190
|
-
return element.props.ref;
|
|
3191
|
-
}
|
|
3192
|
-
return element.props.ref || element.ref;
|
|
3193
|
-
}
|
|
3194
|
-
|
|
3195
|
-
// ../base-ui/src/ui/button.tsx
|
|
3196
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
3197
|
-
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3198
|
-
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
3199
|
-
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
3200
|
-
{
|
|
3201
|
-
variants: {
|
|
3202
|
-
variant: {
|
|
3203
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
3204
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
3205
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
3206
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
3207
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
3208
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
3209
|
-
},
|
|
3210
|
-
size: {
|
|
3211
|
-
default: "h-10 px-4 py-2",
|
|
3212
|
-
sm: "h-9 rounded-md px-3",
|
|
3213
|
-
lg: "h-11 rounded-md px-8",
|
|
3214
|
-
icon: "h-10 w-10"
|
|
3215
|
-
}
|
|
3216
|
-
},
|
|
3217
|
-
defaultVariants: {
|
|
3218
|
-
variant: "default",
|
|
3219
|
-
size: "default"
|
|
3220
|
-
}
|
|
3221
|
-
}
|
|
3222
|
-
);
|
|
3223
|
-
var Button = React35.forwardRef(
|
|
3224
|
-
(_a, ref) => {
|
|
3225
|
-
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
3226
|
-
const Comp = asChild ? Slot : "button";
|
|
3227
|
-
if (asChild) {
|
|
3228
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3229
|
-
Comp,
|
|
3230
|
-
__spreadProps(__spreadValues({
|
|
3231
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
3232
|
-
ref,
|
|
3233
|
-
disabled: loading || props.disabled
|
|
3234
|
-
}, props), {
|
|
3235
|
-
children
|
|
3236
|
-
})
|
|
3237
|
-
);
|
|
3238
|
-
}
|
|
3239
|
-
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3240
|
-
Comp,
|
|
3241
|
-
__spreadProps(__spreadValues({
|
|
3242
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
3243
|
-
ref,
|
|
3244
|
-
disabled: loading || props.disabled
|
|
3245
|
-
}, props), {
|
|
3246
|
-
children: [
|
|
3247
|
-
children,
|
|
3248
|
-
loading && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
3249
|
-
]
|
|
3250
|
-
})
|
|
3251
|
-
);
|
|
3252
|
-
}
|
|
3253
|
-
);
|
|
3254
|
-
Button.displayName = "Button";
|
|
3255
|
-
|
|
3256
|
-
// src/fuma/mdx/gradient-button.tsx
|
|
3257
|
-
var import_link2 = __toESM(require("next/link"));
|
|
3258
|
-
var import_react37 = __toESM(require("react"));
|
|
3259
|
-
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3260
|
-
function GradientButton({
|
|
3261
|
-
title,
|
|
3262
|
-
icon,
|
|
3263
|
-
align = "left",
|
|
3264
|
-
disabled = false,
|
|
3265
|
-
className = "",
|
|
3266
|
-
href,
|
|
3267
|
-
openInNewTab = true,
|
|
3268
|
-
onClick,
|
|
3269
|
-
loadingText,
|
|
3270
|
-
preventDoubleClick = true
|
|
3271
|
-
}) {
|
|
3272
|
-
const [isLoading, setIsLoading] = (0, import_react37.useState)(false);
|
|
3273
|
-
const actualLoadingText = loadingText || (title == null ? void 0 : title.toString().trim()) || "Loading...";
|
|
3274
|
-
const getAlignmentClass = () => {
|
|
3275
|
-
switch (align) {
|
|
3276
|
-
case "center":
|
|
3277
|
-
return "justify-center";
|
|
3278
|
-
case "right":
|
|
3279
|
-
return "justify-end";
|
|
3280
|
-
default:
|
|
3281
|
-
return "justify-start";
|
|
3282
|
-
}
|
|
3283
|
-
};
|
|
3284
|
-
const handleClick = (e) => __async(null, null, function* () {
|
|
3285
|
-
if (disabled || isLoading) {
|
|
3286
|
-
e.preventDefault();
|
|
3287
|
-
return;
|
|
3288
|
-
}
|
|
3289
|
-
if (onClick) {
|
|
3290
|
-
e.preventDefault();
|
|
3291
|
-
if (preventDoubleClick) {
|
|
3292
|
-
setIsLoading(true);
|
|
3293
|
-
}
|
|
3294
|
-
try {
|
|
3295
|
-
yield onClick();
|
|
3296
|
-
} catch (error) {
|
|
3297
|
-
console.error("GradientButton onClick error:", error);
|
|
3298
|
-
} finally {
|
|
3299
|
-
if (preventDoubleClick) {
|
|
3300
|
-
setIsLoading(false);
|
|
3301
|
-
}
|
|
3302
|
-
}
|
|
3303
|
-
}
|
|
3304
|
-
});
|
|
3305
|
-
const isDisabled = disabled || isLoading;
|
|
3306
|
-
const displayTitle = isLoading ? actualLoadingText : title;
|
|
3307
|
-
const displayIcon = isLoading ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(globalLucideIcons.Loader2, { className: "h-4 w-4 text-white animate-spin" }) : icon ? import_react37.default.cloneElement(icon, {
|
|
3308
|
-
className: "h-4 w-4 text-white"
|
|
3309
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(globalLucideIcons.ArrowRight, { className: "h-4 w-4 text-white" });
|
|
3310
|
-
const buttonContent = onClick ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3311
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: displayIcon }),
|
|
3312
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "ml-1", children: displayTitle })
|
|
3313
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
|
|
3314
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { children: displayTitle }),
|
|
3315
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "ml-1", children: displayIcon })
|
|
3316
|
-
] });
|
|
3317
|
-
const buttonClassName = `
|
|
3318
|
-
bg-gradient-to-r
|
|
3319
|
-
from-purple-400 to-pink-500
|
|
3320
|
-
hover:from-purple-500 hover:to-pink-600
|
|
3321
|
-
dark:from-purple-500 dark:to-pink-600
|
|
3322
|
-
dark:hover:from-purple-600 dark:hover:to-pink-700
|
|
3323
|
-
text-white text-base font-bold shadow-lg hover:shadow-xl
|
|
3324
|
-
transition-all duration-300
|
|
3325
|
-
rounded-full
|
|
3326
|
-
${isDisabled ? "opacity-50 cursor-not-allowed" : ""}
|
|
3327
|
-
${className}
|
|
3328
|
-
`;
|
|
3329
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: `flex flex-col sm:flex-row gap-3 ${getAlignmentClass()}`, children: onClick ? (
|
|
3330
|
-
// for click
|
|
3331
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3332
|
-
Button,
|
|
3333
|
-
{
|
|
3334
|
-
size: "lg",
|
|
3335
|
-
className: buttonClassName,
|
|
3336
|
-
onClick: handleClick,
|
|
3337
|
-
disabled: isDisabled,
|
|
3338
|
-
children: buttonContent
|
|
3339
|
-
}
|
|
3340
|
-
)
|
|
3341
|
-
) : (
|
|
3342
|
-
// for Link
|
|
3343
|
-
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3344
|
-
Button,
|
|
3345
|
-
{
|
|
3346
|
-
asChild: true,
|
|
3347
|
-
size: "lg",
|
|
3348
|
-
className: buttonClassName,
|
|
3349
|
-
disabled: isDisabled,
|
|
3350
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3351
|
-
import_link2.default,
|
|
3352
|
-
__spreadProps(__spreadValues({
|
|
3353
|
-
href: href || "#",
|
|
3354
|
-
className: "no-underline hover:no-underline"
|
|
3355
|
-
}, openInNewTab ? { target: "_blank", rel: "noopener noreferrer" } : {}), {
|
|
3356
|
-
onClick: isDisabled ? (e) => e.preventDefault() : void 0,
|
|
3357
|
-
children: buttonContent
|
|
3358
|
-
})
|
|
3359
|
-
)
|
|
3360
|
-
}
|
|
3361
|
-
)
|
|
3362
|
-
) });
|
|
3363
|
-
}
|
|
3364
|
-
|
|
3365
|
-
// src/main/cta.tsx
|
|
3366
|
-
var import_next_intl7 = require("next-intl");
|
|
3367
|
-
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3368
|
-
function CTA({ sectionClassName }) {
|
|
3369
|
-
const t = (0, import_next_intl7.useTranslations)("cta");
|
|
3370
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("section", { id: "cta", className: cn("px-16 py-20 mx-16 md:mx-32 scroll-mt-20", sectionClassName), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "\n bg-gradient-to-r from-[#f7f8fa] via-[#e0c3fc] to-[#b2fefa]\n dark:bg-gradient-to-r dark:from-[#2d0b4e] dark:via-[#6a3fa0] dark:to-[#3a185a]\n rounded-2xl p-12 text-center\n bg-[length:200%_auto] animate-cta-gradient-wave\n ", children: [
|
|
3371
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("h2", { className: "text-3xl md:text-4xl font-bold mb-6", children: [
|
|
3372
|
-
t("title"),
|
|
3373
|
-
" ",
|
|
3374
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-purple-400", children: t("eyesOn") }),
|
|
3375
|
-
"?"
|
|
3376
|
-
] }),
|
|
3377
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("p", { className: "text-2xl mx-auto mb-8", children: [
|
|
3378
|
-
richText(t, "description1"),
|
|
3379
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("br", {}),
|
|
3380
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "text-purple-400", children: t("description2") })
|
|
3381
|
-
] }),
|
|
3382
|
-
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3383
|
-
GradientButton,
|
|
3384
|
-
{
|
|
3385
|
-
title: t("button"),
|
|
3386
|
-
href: t("url"),
|
|
3387
|
-
align: "center"
|
|
3388
|
-
}
|
|
3389
|
-
)
|
|
3390
|
-
] }) });
|
|
3391
|
-
}
|
|
3392
|
-
|
|
3393
|
-
// src/main/footer.tsx
|
|
3394
|
-
var import_next_intl8 = require("next-intl");
|
|
3395
|
-
var import_link3 = __toESM(require("next/link"));
|
|
3396
|
-
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3397
|
-
function Footer() {
|
|
3398
|
-
const tFooter = (0, import_next_intl8.useTranslations)("footer");
|
|
3399
|
-
const locale = (0, import_next_intl8.useLocale)();
|
|
3400
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "mb-10 w-full mx-auto border-t-purple-700/80 border-t-1", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("footer", { children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "w-full flex flex-col items-center justify-center px-4 py-8 space-y-3", children: [
|
|
3401
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "flex items-center justify-center space-x-6 text-xs", children: [
|
|
3402
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_link3.default, { href: `/${locale}/legal/terms`, className: "flex items-center space-x-1 hover:underline", children: [
|
|
3403
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(globalLucideIcons.ReceiptText, { className: "h-3.5 w-3.5" }),
|
|
3404
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: tFooter("terms", { defaultValue: "Terms of Service" }) })
|
|
3405
|
-
] }),
|
|
3406
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_link3.default, { href: `/${locale}/legal/privacy`, className: "flex items-center space-x-1 hover:underline", children: [
|
|
3407
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(globalLucideIcons.ShieldUser, { className: "h-3.5 w-3.5" }),
|
|
3408
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: tFooter("privacy", { defaultValue: "Privacy Policy" }) })
|
|
3409
|
-
] }),
|
|
3410
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "relative group", children: [
|
|
3411
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "absolute left-2/3 -translate-x-1/4 bottom-full mb-1 hidden group-hover:block bg-zinc-600 text-white text-xs rounded px-3 py-1 whitespace-nowrap z-10 shadow-lg", children: tFooter("email") }),
|
|
3412
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
3413
|
-
"a",
|
|
3414
|
-
{
|
|
3415
|
-
href: `mailto:${tFooter("email")}`,
|
|
3416
|
-
className: "flex items-center space-x-1 underline cursor-pointer px-2",
|
|
3417
|
-
children: [
|
|
3418
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(globalLucideIcons.Mail, { className: "h-3.5 w-3.5" }),
|
|
3419
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: tFooter("contactUs", { defaultValue: "Contact Us" }) })
|
|
3420
|
-
]
|
|
3421
|
-
}
|
|
3422
|
-
)
|
|
3423
|
-
] })
|
|
3424
|
-
] }),
|
|
3425
|
-
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "text-xs text-center", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: tFooter("copyright", { year: (/* @__PURE__ */ new Date()).getFullYear(), name: tFooter("company") }) }) })
|
|
3426
|
-
] }) }) });
|
|
3427
|
-
}
|
|
3428
|
-
|
|
3429
|
-
// src/main/go-to-top.tsx
|
|
3430
|
-
var import_react38 = require("react");
|
|
3431
|
-
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3432
|
-
function GoToTop() {
|
|
3433
|
-
const [isVisible, setIsVisible] = (0, import_react38.useState)(false);
|
|
3434
|
-
(0, import_react38.useEffect)(() => {
|
|
3435
|
-
const toggleVisibility = () => {
|
|
3436
|
-
if (window.scrollY > 300) {
|
|
3437
|
-
setIsVisible(true);
|
|
3438
|
-
} else {
|
|
3439
|
-
setIsVisible(false);
|
|
3440
|
-
}
|
|
3441
|
-
};
|
|
3442
|
-
window.addEventListener("scroll", toggleVisibility);
|
|
3443
|
-
return () => window.removeEventListener("scroll", toggleVisibility);
|
|
3444
|
-
}, []);
|
|
3445
|
-
const scrollToTop = () => {
|
|
3446
|
-
window.scrollTo({
|
|
3447
|
-
top: 0,
|
|
3448
|
-
behavior: "smooth"
|
|
3449
|
-
});
|
|
3450
|
-
};
|
|
3451
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: isVisible && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3452
|
-
"button",
|
|
3453
|
-
{
|
|
3454
|
-
onClick: scrollToTop,
|
|
3455
|
-
className: "fixed bottom-6 right-6 p-3 bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700 text-white rounded-full shadow-lg hover:shadow-xl transition-all duration-300 z-50",
|
|
3456
|
-
"aria-label": "Go to top",
|
|
3457
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.ArrowUp, { size: 20, className: "text-white" })
|
|
3458
|
-
}
|
|
3459
|
-
) });
|
|
3460
|
-
}
|
|
3461
|
-
|
|
3462
|
-
// src/main/loading.tsx
|
|
3463
|
-
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3464
|
-
var NUM_ROWS = 15;
|
|
3465
|
-
var NUM_COLS = 15;
|
|
3466
|
-
var DOT_SIZE = 6;
|
|
3467
|
-
var SPACING = 12;
|
|
3468
|
-
var ANIMATION_DURATION = 1.8;
|
|
3469
|
-
var STAGGER_DELAY_FACTOR = 0.08;
|
|
3470
|
-
var COLORS = [
|
|
3471
|
-
"#AC62FD",
|
|
3472
|
-
// Base Purple
|
|
3473
|
-
"#C364FA",
|
|
3474
|
-
"#DD59F7",
|
|
3475
|
-
"#FF4FF2",
|
|
3476
|
-
// Bright Pink/Magenta
|
|
3477
|
-
"#F067DD",
|
|
3478
|
-
"#E26AF8",
|
|
3479
|
-
"#DA70D6",
|
|
3480
|
-
// Orchid
|
|
3481
|
-
"#BA55D3",
|
|
3482
|
-
// Medium Orchid
|
|
3483
|
-
"#9370DB",
|
|
3484
|
-
// Medium Purple
|
|
3485
|
-
"#8A2BE2"
|
|
3486
|
-
// Blue Violet
|
|
3487
|
-
];
|
|
3488
|
-
function Loading() {
|
|
3489
|
-
const dots = [];
|
|
3490
|
-
const centerX = (NUM_COLS - 1) / 2;
|
|
3491
|
-
const centerY = (NUM_ROWS - 1) / 2;
|
|
3492
|
-
for (let i = 0; i < NUM_ROWS; i++) {
|
|
3493
|
-
for (let j = 0; j < NUM_COLS; j++) {
|
|
3494
|
-
const distance = Math.sqrt(Math.pow(i - centerY, 2) + Math.pow(j - centerX, 2));
|
|
3495
|
-
dots.push({
|
|
3496
|
-
id: `${i}-${j}`,
|
|
3497
|
-
row: i,
|
|
3498
|
-
col: j,
|
|
3499
|
-
// Animation delay based on distance, creating a ripple effect
|
|
3500
|
-
delay: distance * STAGGER_DELAY_FACTOR,
|
|
3501
|
-
// Color selection based on distance rings
|
|
3502
|
-
color: COLORS[Math.floor(distance) % COLORS.length]
|
|
3503
|
-
});
|
|
3504
|
-
}
|
|
3505
|
-
}
|
|
3506
|
-
const containerWidth = (NUM_COLS - 1) * SPACING + DOT_SIZE;
|
|
3507
|
-
const containerHeight = (NUM_ROWS - 1) * SPACING + DOT_SIZE;
|
|
3508
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "flex flex-col items-center justify-center min-h-screen bg-neutral-900", children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3509
|
-
"div",
|
|
3510
|
-
{
|
|
3511
|
-
style: {
|
|
3512
|
-
width: containerWidth,
|
|
3513
|
-
height: containerHeight,
|
|
3514
|
-
position: "relative",
|
|
3515
|
-
borderRadius: "50%",
|
|
3516
|
-
// Make the container circular
|
|
3517
|
-
overflow: "hidden"
|
|
3518
|
-
// Clip dots outside the circle
|
|
3519
|
-
},
|
|
3520
|
-
children: [
|
|
3521
|
-
dots.map((dot) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3522
|
-
"div",
|
|
3523
|
-
{
|
|
3524
|
-
style: {
|
|
3525
|
-
position: "absolute",
|
|
3526
|
-
left: dot.col * SPACING,
|
|
3527
|
-
top: dot.row * SPACING,
|
|
3528
|
-
width: DOT_SIZE,
|
|
3529
|
-
height: DOT_SIZE,
|
|
3530
|
-
backgroundColor: dot.color,
|
|
3531
|
-
borderRadius: "50%",
|
|
3532
|
-
animationName: "loading-dot-pulse",
|
|
3533
|
-
animationDuration: `${ANIMATION_DURATION}s`,
|
|
3534
|
-
animationTimingFunction: "cubic-bezier(0.45, 0, 0.55, 1)",
|
|
3535
|
-
animationIterationCount: "infinite",
|
|
3536
|
-
animationDelay: `${dot.delay}s`,
|
|
3537
|
-
opacity: 0,
|
|
3538
|
-
transform: "scale(0)"
|
|
3539
|
-
}
|
|
3540
|
-
},
|
|
3541
|
-
dot.id
|
|
3542
|
-
)),
|
|
3543
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
3544
|
-
"div",
|
|
3545
|
-
{
|
|
3546
|
-
className: "absolute inset-0 flex items-center justify-center",
|
|
3547
|
-
style: { pointerEvents: "none" },
|
|
3548
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("p", { className: "text-xl font-semibold text-white", children: "Loading..." })
|
|
3549
|
-
}
|
|
3550
|
-
)
|
|
3551
|
-
]
|
|
3552
|
-
}
|
|
3553
|
-
) });
|
|
3554
|
-
}
|
|
3555
|
-
|
|
3556
|
-
// src/main/nprogress-bar.tsx
|
|
3557
|
-
var import_nprogress = __toESM(require("nprogress"));
|
|
3558
|
-
var import_navigation = require("next/navigation");
|
|
3559
|
-
var import_react39 = require("react");
|
|
3560
|
-
import_nprogress.default.configure({ showSpinner: false });
|
|
3561
|
-
function NProgressBar() {
|
|
3562
|
-
const pathname = (0, import_navigation.usePathname)();
|
|
3563
|
-
const previousPath = (0, import_react39.useRef)(pathname);
|
|
3564
|
-
(0, import_react39.useEffect)(() => {
|
|
3565
|
-
if (previousPath.current !== pathname) {
|
|
3566
|
-
import_nprogress.default.start();
|
|
3567
|
-
setTimeout(() => {
|
|
3568
|
-
import_nprogress.default.done();
|
|
3569
|
-
}, 100);
|
|
3570
|
-
previousPath.current = pathname;
|
|
3571
|
-
}
|
|
3572
|
-
}, [pathname]);
|
|
3573
|
-
return null;
|
|
3574
|
-
}
|
|
3575
|
-
|
|
3576
|
-
// src/main/price-plan.tsx
|
|
3577
|
-
var import_react40 = require("react");
|
|
3578
|
-
var import_next_intl9 = require("next-intl");
|
|
3579
|
-
var import_navigation2 = require("next/navigation");
|
|
3580
|
-
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3581
|
-
function PricePlan({ currency = "$", pricePlanConfig, sectionClassName }) {
|
|
3582
|
-
var _a, _b;
|
|
3583
|
-
const t = (0, import_next_intl9.useTranslations)("pricePlan");
|
|
3584
|
-
const billingSwitch = t.raw("billingSwitch");
|
|
3585
|
-
const plans = t.raw("plans");
|
|
3586
|
-
const router = (0, import_navigation2.useRouter)();
|
|
3587
|
-
const billingOptions = pricePlanConfig.billingOptions;
|
|
3588
|
-
const prices = pricePlanConfig.prices;
|
|
3589
|
-
const minPlanFeaturesCount = pricePlanConfig.minPlanFeaturesCount;
|
|
3590
|
-
const [billingKey, setBillingKey] = (0, import_react40.useState)(billingSwitch.defaultKey);
|
|
3591
|
-
const [tooltip, setTooltip] = (0, import_react40.useState)({ show: false, content: "", x: 0, y: 0 });
|
|
3592
|
-
const currentBilling = billingOptions.find((opt) => opt.key === billingKey) || billingOptions[0];
|
|
3593
|
-
const currentBillingDisplay = billingSwitch.options.find((opt) => opt.key === billingKey) || billingSwitch.options[0];
|
|
3594
|
-
const maxFeaturesCount = Math.max(
|
|
3595
|
-
...plans.map((plan) => {
|
|
3596
|
-
var _a2;
|
|
3597
|
-
return ((_a2 = plan.features) == null ? void 0 : _a2.length) || 0;
|
|
3598
|
-
}),
|
|
3599
|
-
minPlanFeaturesCount || 0
|
|
3600
|
-
);
|
|
3601
|
-
const getFeatureRows = (plan) => {
|
|
3602
|
-
const features = plan.features || [];
|
|
3603
|
-
const filled = [...features];
|
|
3604
|
-
while (filled.length < maxFeaturesCount) filled.push(null);
|
|
3605
|
-
return filled;
|
|
3606
|
-
};
|
|
3607
|
-
function renderPrice(plan) {
|
|
3608
|
-
var _a2;
|
|
3609
|
-
const priceValue = prices[plan.key];
|
|
3610
|
-
const billingSubTitle = ((_a2 = billingSwitch.options.find((opt) => opt.key === billingKey)) == null ? void 0 : _a2.subTitle) || "";
|
|
3611
|
-
if (typeof priceValue !== "number" || isNaN(priceValue)) {
|
|
3612
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col items-start w-full", children: [
|
|
3613
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-end gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-4xl font-extrabold text-gray-900 dark:text-gray-100", children: priceValue }) }),
|
|
3614
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center gap-2 min-h-[24px] mt-1", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: cn("text-xs text-gray-700 dark:text-gray-300 font-medium", plan.showBillingSubTitle === false && "opacity-0 select-none"), children: plan.showBillingSubTitle === false ? "" : billingSubTitle }) })
|
|
3615
|
-
] });
|
|
3616
|
-
}
|
|
3617
|
-
const originValue = Number(priceValue);
|
|
3618
|
-
const discount = currentBilling.discount;
|
|
3619
|
-
const hasDiscount = discount !== 0;
|
|
3620
|
-
const saleValue = originValue * (1 - discount);
|
|
3621
|
-
const formatPrice = (v) => Number(v.toFixed(2)).toString();
|
|
3622
|
-
const unit = currentBillingDisplay.unit || "";
|
|
3623
|
-
let discountText = "";
|
|
3624
|
-
if (hasDiscount && currentBillingDisplay.discountText) {
|
|
3625
|
-
discountText = currentBillingDisplay.discountText.replace("{percent}", String(Math.round(Math.abs(discount) * 100)));
|
|
3626
|
-
}
|
|
3627
|
-
const showNaN = saleValue < 0;
|
|
3628
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col items-start w-full", children: [
|
|
3629
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-end gap-2", children: [
|
|
3630
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "text-4xl font-extrabold text-gray-900 dark:text-gray-100", children: [
|
|
3631
|
-
currency,
|
|
3632
|
-
showNaN ? "NaN" : hasDiscount ? formatPrice(saleValue) : formatPrice(originValue)
|
|
3633
|
-
] }),
|
|
3634
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-lg text-gray-700 dark:text-gray-300 font-medium mb-1", children: unit })
|
|
3635
|
-
] }),
|
|
3636
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2 min-h-[24px] mt-1", children: [
|
|
3637
|
-
hasDiscount && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_jsx_runtime47.Fragment, { children: [
|
|
3638
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "text-base text-gray-400 line-through", children: [
|
|
3639
|
-
currency,
|
|
3640
|
-
showNaN ? "NaN" : formatPrice(originValue)
|
|
3641
|
-
] }),
|
|
3642
|
-
discountText && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "px-2 py-0.5 text-xs rounded bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-200 font-semibold align-middle", children: discountText })
|
|
3643
|
-
] }),
|
|
3644
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: cn("text-xs text-gray-700 dark:text-gray-300 font-medium", plan.showBillingSubTitle === false && "opacity-0 select-none"), children: plan.showBillingSubTitle === false ? "" : billingSubTitle })
|
|
3645
|
-
] })
|
|
3646
|
-
] });
|
|
3647
|
-
}
|
|
3648
|
-
const Tooltip = ({ show, content, x, y }) => {
|
|
3649
|
-
if (!show) return null;
|
|
3650
|
-
const style = {
|
|
3651
|
-
position: "fixed",
|
|
3652
|
-
left: Math.max(8, x),
|
|
3653
|
-
top: Math.max(8, y),
|
|
3654
|
-
zIndex: 9999,
|
|
3655
|
-
maxWidth: 200,
|
|
3656
|
-
transform: "translateY(-50%)",
|
|
3657
|
-
pointerEvents: "none",
|
|
3658
|
-
whiteSpace: "pre-line"
|
|
3659
|
-
};
|
|
3660
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3661
|
-
"div",
|
|
3662
|
-
{
|
|
3663
|
-
style,
|
|
3664
|
-
className: "bg-gray-700 dark:bg-gray-200 text-gray-100 dark:text-gray-800 text-xs leading-relaxed px-3 py-2 rounded-lg shadow-lg border border-gray-300 dark:border-gray-600 backdrop-blur-sm",
|
|
3665
|
-
children: content
|
|
3666
|
-
}
|
|
3667
|
-
);
|
|
3668
|
-
};
|
|
3669
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("section", { id: "pricing", className: cn("px-4 py-10 md:px-16 md:py-16 mx-auto max-w-7xl scroll-mt-10", sectionClassName), children: [
|
|
3670
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("h2", { className: "text-3xl md:text-4xl font-bold text-center mb-3", children: t("title") }),
|
|
3671
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "text-center text-gray-600 dark:text-gray-400 mb-8 text-base md:text-lg mx-auto", children: t("subtitle") }),
|
|
3672
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
3673
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex items-center relative mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex bg-white dark:bg-gray-900 border border-gray-300 dark:border-gray-700 rounded-full p-1", children: [
|
|
3674
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3675
|
-
"button",
|
|
3676
|
-
{
|
|
3677
|
-
className: cn(
|
|
3678
|
-
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3679
|
-
billingKey === "monthly" ? "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm" : "text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
|
|
3680
|
-
),
|
|
3681
|
-
onClick: () => setBillingKey("monthly"),
|
|
3682
|
-
type: "button",
|
|
3683
|
-
children: ((_a = billingSwitch.options.find((opt) => opt.key === "monthly")) == null ? void 0 : _a.name) || "Monthly"
|
|
3684
|
-
}
|
|
3685
|
-
),
|
|
3686
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3687
|
-
"button",
|
|
3688
|
-
{
|
|
3689
|
-
className: cn(
|
|
3690
|
-
"min-w-[120px] px-6 py-2 font-medium transition text-lg relative",
|
|
3691
|
-
billingKey === "yearly" ? "text-white bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 rounded-full shadow-sm" : "text-gray-800 dark:text-gray-200 hover:text-gray-900 dark:hover:text-gray-100 rounded-full"
|
|
3692
|
-
),
|
|
3693
|
-
onClick: () => setBillingKey("yearly"),
|
|
3694
|
-
type: "button",
|
|
3695
|
-
children: ((_b = billingSwitch.options.find((opt) => opt.key === "yearly")) == null ? void 0 : _b.name) || "Yearly"
|
|
3696
|
-
}
|
|
3697
|
-
)
|
|
3698
|
-
] }) }),
|
|
3699
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-8 flex items-center justify-center mb-3", children: (() => {
|
|
3700
|
-
const opt = billingSwitch.options.find((opt2) => opt2.key === billingKey);
|
|
3701
|
-
const bOpt = billingOptions.find((opt2) => opt2.key === billingKey);
|
|
3702
|
-
if (!(opt && bOpt && opt.discountText && bOpt.discount !== 0)) return null;
|
|
3703
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "px-2 py-1 text-xs rounded bg-yellow-100 text-yellow-800 font-semibold align-middle text-center inline-flex items-center justify-center whitespace-nowrap", children: opt.discountText.replace(
|
|
3704
|
-
"{percent}",
|
|
3705
|
-
String(Math.round(Math.abs(bOpt.discount) * 100))
|
|
3706
|
-
) });
|
|
3707
|
-
})() })
|
|
3708
|
-
] }),
|
|
3709
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-8", children: plans.map((plan, _idx) => {
|
|
3710
|
-
var _a2, _b2, _c;
|
|
3711
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
3712
|
-
"div",
|
|
3713
|
-
{
|
|
3714
|
-
className: cn(
|
|
3715
|
-
"flex flex-col bg-white dark:bg-gray-800/60 rounded-2xl border border-gray-300 dark:border-[#7c3aed40] transition p-8 h-full shadow-sm dark:shadow-none",
|
|
3716
|
-
"hover:border-2 hover:border-purple-500",
|
|
3717
|
-
"focus-within:border-2 focus-within:border-purple-500"
|
|
3718
|
-
),
|
|
3719
|
-
style: { minHeight: maxFeaturesCount * 100 },
|
|
3720
|
-
children: [
|
|
3721
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
3722
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xl font-bold text-gray-900 dark:text-gray-100", children: plan.title }),
|
|
3723
|
-
plan.titleTags && plan.titleTags.map((tag, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "px-2 py-0.5 text-xs rounded bg-orange-100 text-orange-800 dark:bg-orange-900 dark:text-orange-200 font-semibold align-middle", children: tag }, i))
|
|
3724
|
-
] }),
|
|
3725
|
-
renderPrice(plan),
|
|
3726
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("ul", { className: "flex-1 mb-6 mt-4", children: getFeatureRows(plan).map((feature, i) => /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("li", { className: "flex items-center gap-2 mb-2 min-h-[28px]", children: [
|
|
3727
|
-
feature ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "inline-flex items-center justify-center w-5 h-5 rounded-full bg-green-100 text-green-700 dark:bg-green-900 dark:text-green-200 mr-1", children: feature.icon ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: feature.icon }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "font-bold", children: "\u2713" }) }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "inline-flex items-center justify-center w-5 h-5 rounded-full mr-1", children: "\xA0" }),
|
|
3728
|
-
feature && feature.tag && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "px-1 py-0.5 text-[6px] rounded bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 font-semibold align-middle", children: feature.tag }),
|
|
3729
|
-
feature ? /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { className: "relative group cursor-pointer text-sm text-gray-800 dark:text-gray-200", children: [
|
|
3730
|
-
feature.description,
|
|
3731
|
-
feature.tooltip && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3732
|
-
"span",
|
|
3733
|
-
{
|
|
3734
|
-
className: "ml-1 align-middle inline-flex",
|
|
3735
|
-
onMouseEnter: (e) => {
|
|
3736
|
-
setTooltip({
|
|
3737
|
-
show: true,
|
|
3738
|
-
content: feature.tooltip,
|
|
3739
|
-
x: e.clientX,
|
|
3740
|
-
y: e.clientY
|
|
3741
|
-
});
|
|
3742
|
-
},
|
|
3743
|
-
onMouseMove: (e) => {
|
|
3744
|
-
setTooltip((t2) => __spreadProps(__spreadValues({}, t2), { x: e.clientX, y: e.clientY }));
|
|
3745
|
-
},
|
|
3746
|
-
onMouseLeave: () => setTooltip((t2) => __spreadProps(__spreadValues({}, t2), { show: false })),
|
|
3747
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(globalLucideIcons.FAQ, { className: "w-4 h-4" })
|
|
3748
|
-
}
|
|
3749
|
-
)
|
|
3750
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: "\xA0" })
|
|
3751
|
-
] }, i)) }),
|
|
3752
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex-1" }),
|
|
3753
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3754
|
-
"button",
|
|
3755
|
-
{
|
|
3756
|
-
className: cn(
|
|
3757
|
-
"w-full py-2 mt-auto text-white text-base font-bold shadow-lg hover:shadow-xl transition-all duration-300 rounded-full",
|
|
3758
|
-
((_a2 = plan.button) == null ? void 0 : _a2.disabled) ? "bg-gray-400 cursor-not-allowed" : "bg-gradient-to-r from-purple-400 to-pink-500 hover:from-purple-500 hover:to-pink-600 dark:from-purple-500 dark:to-pink-600 dark:hover:from-purple-600 dark:hover:to-pink-700"
|
|
3759
|
-
),
|
|
3760
|
-
disabled: (_b2 = plan.button) == null ? void 0 : _b2.disabled,
|
|
3761
|
-
type: "button",
|
|
3762
|
-
onClick: () => {
|
|
3763
|
-
var _a3;
|
|
3764
|
-
if (!((_a3 = plan.button) == null ? void 0 : _a3.disabled)) {
|
|
3765
|
-
router.push("/");
|
|
3766
|
-
}
|
|
3767
|
-
},
|
|
3768
|
-
children: ((_c = plan.button) == null ? void 0 : _c.text) || "--"
|
|
3769
|
-
}
|
|
3770
|
-
)
|
|
3771
|
-
]
|
|
3772
|
-
},
|
|
3773
|
-
plan.key
|
|
3774
|
-
);
|
|
3775
|
-
}) }),
|
|
3776
|
-
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Tooltip, __spreadValues({}, tooltip))
|
|
3777
|
-
] });
|
|
3778
|
-
}
|
|
3779
|
-
|
|
3780
|
-
// src/main/ads-alert-dialog.tsx
|
|
3781
|
-
var import_react42 = require("react");
|
|
3782
|
-
var import_image2 = __toESM(require("next/image"));
|
|
3783
|
-
|
|
3784
|
-
// ../base-ui/src/ui/alert-dialog.tsx
|
|
3785
|
-
var React59 = __toESM(require("react"), 1);
|
|
3786
|
-
|
|
3787
|
-
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
3788
|
-
var React58 = __toESM(require("react"), 1);
|
|
3789
|
-
|
|
3790
|
-
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
3791
|
-
var React38 = __toESM(require("react"), 1);
|
|
3792
|
-
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3793
|
-
function createContext2(rootComponentName, defaultContext) {
|
|
3794
|
-
const Context = React38.createContext(defaultContext);
|
|
3795
|
-
const Provider = (props) => {
|
|
3796
|
-
const _a = props, { children } = _a, context = __objRest(_a, ["children"]);
|
|
3797
|
-
const value = React38.useMemo(() => context, Object.values(context));
|
|
3798
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(Context.Provider, { value, children });
|
|
3799
|
-
};
|
|
3800
|
-
Provider.displayName = rootComponentName + "Provider";
|
|
3801
|
-
function useContext22(consumerName) {
|
|
3802
|
-
const context = React38.useContext(Context);
|
|
3803
|
-
if (context) return context;
|
|
3804
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
3805
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
3806
|
-
}
|
|
3807
|
-
return [Provider, useContext22];
|
|
2909
|
+
return [Provider, useContext22];
|
|
3808
2910
|
}
|
|
3809
2911
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
3810
2912
|
let defaultContexts = [];
|
|
3811
2913
|
function createContext32(rootComponentName, defaultContext) {
|
|
3812
|
-
const BaseContext =
|
|
2914
|
+
const BaseContext = React33.createContext(defaultContext);
|
|
3813
2915
|
const index = defaultContexts.length;
|
|
3814
2916
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
3815
2917
|
const Provider = (props) => {
|
|
3816
2918
|
var _b;
|
|
3817
2919
|
const _a = props, { scope, children } = _a, context = __objRest(_a, ["scope", "children"]);
|
|
3818
2920
|
const Context = ((_b = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _b[index]) || BaseContext;
|
|
3819
|
-
const value =
|
|
3820
|
-
return /* @__PURE__ */ (0,
|
|
2921
|
+
const value = React33.useMemo(() => context, Object.values(context));
|
|
2922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Context.Provider, { value, children });
|
|
3821
2923
|
};
|
|
3822
2924
|
Provider.displayName = rootComponentName + "Provider";
|
|
3823
2925
|
function useContext22(consumerName, scope) {
|
|
3824
2926
|
var _a;
|
|
3825
2927
|
const Context = ((_a = scope == null ? void 0 : scope[scopeName]) == null ? void 0 : _a[index]) || BaseContext;
|
|
3826
|
-
const context =
|
|
2928
|
+
const context = React33.useContext(Context);
|
|
3827
2929
|
if (context) return context;
|
|
3828
2930
|
if (defaultContext !== void 0) return defaultContext;
|
|
3829
2931
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -3832,11 +2934,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
3832
2934
|
}
|
|
3833
2935
|
const createScope = () => {
|
|
3834
2936
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
3835
|
-
return
|
|
2937
|
+
return React33.createContext(defaultContext);
|
|
3836
2938
|
});
|
|
3837
2939
|
return function useScope(scope) {
|
|
3838
2940
|
const contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
3839
|
-
return
|
|
2941
|
+
return React33.useMemo(
|
|
3840
2942
|
() => ({ [`__scope${scopeName}`]: __spreadProps(__spreadValues({}, scope), { [scopeName]: contexts }) }),
|
|
3841
2943
|
[scope, contexts]
|
|
3842
2944
|
);
|
|
@@ -3859,15 +2961,52 @@ function composeContextScopes(...scopes) {
|
|
|
3859
2961
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
3860
2962
|
return __spreadValues(__spreadValues({}, nextScopes2), currentScope);
|
|
3861
2963
|
}, {});
|
|
3862
|
-
return
|
|
2964
|
+
return React33.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
3863
2965
|
};
|
|
3864
2966
|
};
|
|
3865
2967
|
createScope.scopeName = baseScope.scopeName;
|
|
3866
2968
|
return createScope;
|
|
3867
2969
|
}
|
|
3868
2970
|
|
|
2971
|
+
// ../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
|
2972
|
+
var React34 = __toESM(require("react"), 1);
|
|
2973
|
+
function setRef(ref, value) {
|
|
2974
|
+
if (typeof ref === "function") {
|
|
2975
|
+
return ref(value);
|
|
2976
|
+
} else if (ref !== null && ref !== void 0) {
|
|
2977
|
+
ref.current = value;
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
function composeRefs(...refs) {
|
|
2981
|
+
return (node) => {
|
|
2982
|
+
let hasCleanup = false;
|
|
2983
|
+
const cleanups = refs.map((ref) => {
|
|
2984
|
+
const cleanup = setRef(ref, node);
|
|
2985
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
2986
|
+
hasCleanup = true;
|
|
2987
|
+
}
|
|
2988
|
+
return cleanup;
|
|
2989
|
+
});
|
|
2990
|
+
if (hasCleanup) {
|
|
2991
|
+
return () => {
|
|
2992
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
2993
|
+
const cleanup = cleanups[i];
|
|
2994
|
+
if (typeof cleanup == "function") {
|
|
2995
|
+
cleanup();
|
|
2996
|
+
} else {
|
|
2997
|
+
setRef(refs[i], null);
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
};
|
|
3001
|
+
}
|
|
3002
|
+
};
|
|
3003
|
+
}
|
|
3004
|
+
function useComposedRefs(...refs) {
|
|
3005
|
+
return React34.useCallback(composeRefs(...refs), refs);
|
|
3006
|
+
}
|
|
3007
|
+
|
|
3869
3008
|
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
3870
|
-
var
|
|
3009
|
+
var React54 = __toESM(require("react"), 1);
|
|
3871
3010
|
|
|
3872
3011
|
// ../../node_modules/.pnpm/@radix-ui+primitive@1.1.2/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
3873
3012
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
@@ -3880,18 +3019,18 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
3880
3019
|
}
|
|
3881
3020
|
|
|
3882
3021
|
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
3883
|
-
var
|
|
3022
|
+
var React36 = __toESM(require("react"), 1);
|
|
3884
3023
|
|
|
3885
3024
|
// ../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
|
3886
|
-
var
|
|
3887
|
-
var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ?
|
|
3025
|
+
var React35 = __toESM(require("react"), 1);
|
|
3026
|
+
var useLayoutEffect2 = (globalThis == null ? void 0 : globalThis.document) ? React35.useLayoutEffect : () => {
|
|
3888
3027
|
};
|
|
3889
3028
|
|
|
3890
3029
|
// ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-id/dist/index.mjs
|
|
3891
|
-
var useReactId =
|
|
3030
|
+
var useReactId = React36[" useId ".trim().toString()] || (() => void 0);
|
|
3892
3031
|
var count = 0;
|
|
3893
3032
|
function useId(deterministicId) {
|
|
3894
|
-
const [id, setId] =
|
|
3033
|
+
const [id, setId] = React36.useState(useReactId());
|
|
3895
3034
|
useLayoutEffect2(() => {
|
|
3896
3035
|
if (!deterministicId) setId((reactId) => reactId != null ? reactId : String(count++));
|
|
3897
3036
|
}, [deterministicId]);
|
|
@@ -3899,9 +3038,9 @@ function useId(deterministicId) {
|
|
|
3899
3038
|
}
|
|
3900
3039
|
|
|
3901
3040
|
// ../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
|
3902
|
-
var
|
|
3041
|
+
var React37 = __toESM(require("react"), 1);
|
|
3903
3042
|
var React210 = __toESM(require("react"), 1);
|
|
3904
|
-
var useInsertionEffect =
|
|
3043
|
+
var useInsertionEffect = React37[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
3905
3044
|
function useControllableState({
|
|
3906
3045
|
prop,
|
|
3907
3046
|
defaultProp,
|
|
@@ -3916,8 +3055,8 @@ function useControllableState({
|
|
|
3916
3055
|
const isControlled = prop !== void 0;
|
|
3917
3056
|
const value = isControlled ? prop : uncontrolledProp;
|
|
3918
3057
|
if (true) {
|
|
3919
|
-
const isControlledRef =
|
|
3920
|
-
|
|
3058
|
+
const isControlledRef = React37.useRef(prop !== void 0);
|
|
3059
|
+
React37.useEffect(() => {
|
|
3921
3060
|
const wasControlled = isControlledRef.current;
|
|
3922
3061
|
if (wasControlled !== isControlled) {
|
|
3923
3062
|
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -3929,7 +3068,7 @@ function useControllableState({
|
|
|
3929
3068
|
isControlledRef.current = isControlled;
|
|
3930
3069
|
}, [isControlled, caller]);
|
|
3931
3070
|
}
|
|
3932
|
-
const setValue =
|
|
3071
|
+
const setValue = React37.useCallback(
|
|
3933
3072
|
(nextValue) => {
|
|
3934
3073
|
var _a;
|
|
3935
3074
|
if (isControlled) {
|
|
@@ -3949,13 +3088,13 @@ function useUncontrolledState({
|
|
|
3949
3088
|
defaultProp,
|
|
3950
3089
|
onChange
|
|
3951
3090
|
}) {
|
|
3952
|
-
const [value, setValue] =
|
|
3953
|
-
const prevValueRef =
|
|
3954
|
-
const onChangeRef =
|
|
3091
|
+
const [value, setValue] = React37.useState(defaultProp);
|
|
3092
|
+
const prevValueRef = React37.useRef(value);
|
|
3093
|
+
const onChangeRef = React37.useRef(onChange);
|
|
3955
3094
|
useInsertionEffect(() => {
|
|
3956
3095
|
onChangeRef.current = onChange;
|
|
3957
3096
|
}, [onChange]);
|
|
3958
|
-
|
|
3097
|
+
React37.useEffect(() => {
|
|
3959
3098
|
var _a;
|
|
3960
3099
|
if (prevValueRef.current !== value) {
|
|
3961
3100
|
(_a = onChangeRef.current) == null ? void 0 : _a.call(onChangeRef, value);
|
|
@@ -3970,12 +3109,111 @@ function isFunction(value) {
|
|
|
3970
3109
|
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
|
3971
3110
|
|
|
3972
3111
|
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
3973
|
-
var
|
|
3112
|
+
var React42 = __toESM(require("react"), 1);
|
|
3974
3113
|
|
|
3975
3114
|
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.3_@types+react@19.1.2__@types+rea_43250ccbc78c27b15284efcf829a65d5/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
3976
|
-
var
|
|
3115
|
+
var React39 = __toESM(require("react"), 1);
|
|
3977
3116
|
var ReactDOM = __toESM(require("react-dom"), 1);
|
|
3978
|
-
|
|
3117
|
+
|
|
3118
|
+
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
3119
|
+
var React38 = __toESM(require("react"), 1);
|
|
3120
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3121
|
+
// @__NO_SIDE_EFFECTS__
|
|
3122
|
+
function createSlot(ownerName) {
|
|
3123
|
+
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
3124
|
+
const Slot22 = React38.forwardRef((props, forwardedRef) => {
|
|
3125
|
+
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3126
|
+
const childrenArray = React38.Children.toArray(children);
|
|
3127
|
+
const slottable = childrenArray.find(isSlottable);
|
|
3128
|
+
if (slottable) {
|
|
3129
|
+
const newElement = slottable.props.children;
|
|
3130
|
+
const newChildren = childrenArray.map((child) => {
|
|
3131
|
+
if (child === slottable) {
|
|
3132
|
+
if (React38.Children.count(newElement) > 1) return React38.Children.only(null);
|
|
3133
|
+
return React38.isValidElement(newElement) ? newElement.props.children : null;
|
|
3134
|
+
} else {
|
|
3135
|
+
return child;
|
|
3136
|
+
}
|
|
3137
|
+
});
|
|
3138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children: React38.isValidElement(newElement) ? React38.cloneElement(newElement, void 0, newChildren) : null }));
|
|
3139
|
+
}
|
|
3140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SlotClone, __spreadProps(__spreadValues({}, slotProps), { ref: forwardedRef, children }));
|
|
3141
|
+
});
|
|
3142
|
+
Slot22.displayName = `${ownerName}.Slot`;
|
|
3143
|
+
return Slot22;
|
|
3144
|
+
}
|
|
3145
|
+
var Slot = /* @__PURE__ */ createSlot("Slot");
|
|
3146
|
+
// @__NO_SIDE_EFFECTS__
|
|
3147
|
+
function createSlotClone(ownerName) {
|
|
3148
|
+
const SlotClone = React38.forwardRef((props, forwardedRef) => {
|
|
3149
|
+
const _a = props, { children } = _a, slotProps = __objRest(_a, ["children"]);
|
|
3150
|
+
if (React38.isValidElement(children)) {
|
|
3151
|
+
const childrenRef = getElementRef(children);
|
|
3152
|
+
const props2 = mergeProps(slotProps, children.props);
|
|
3153
|
+
if (children.type !== React38.Fragment) {
|
|
3154
|
+
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
3155
|
+
}
|
|
3156
|
+
return React38.cloneElement(children, props2);
|
|
3157
|
+
}
|
|
3158
|
+
return React38.Children.count(children) > 1 ? React38.Children.only(null) : null;
|
|
3159
|
+
});
|
|
3160
|
+
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
3161
|
+
return SlotClone;
|
|
3162
|
+
}
|
|
3163
|
+
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
3164
|
+
// @__NO_SIDE_EFFECTS__
|
|
3165
|
+
function createSlottable(ownerName) {
|
|
3166
|
+
const Slottable2 = ({ children }) => {
|
|
3167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_jsx_runtime36.Fragment, { children });
|
|
3168
|
+
};
|
|
3169
|
+
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
3170
|
+
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
3171
|
+
return Slottable2;
|
|
3172
|
+
}
|
|
3173
|
+
function isSlottable(child) {
|
|
3174
|
+
return React38.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
3175
|
+
}
|
|
3176
|
+
function mergeProps(slotProps, childProps) {
|
|
3177
|
+
const overrideProps = __spreadValues({}, childProps);
|
|
3178
|
+
for (const propName in childProps) {
|
|
3179
|
+
const slotPropValue = slotProps[propName];
|
|
3180
|
+
const childPropValue = childProps[propName];
|
|
3181
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
3182
|
+
if (isHandler) {
|
|
3183
|
+
if (slotPropValue && childPropValue) {
|
|
3184
|
+
overrideProps[propName] = (...args) => {
|
|
3185
|
+
const result = childPropValue(...args);
|
|
3186
|
+
slotPropValue(...args);
|
|
3187
|
+
return result;
|
|
3188
|
+
};
|
|
3189
|
+
} else if (slotPropValue) {
|
|
3190
|
+
overrideProps[propName] = slotPropValue;
|
|
3191
|
+
}
|
|
3192
|
+
} else if (propName === "style") {
|
|
3193
|
+
overrideProps[propName] = __spreadValues(__spreadValues({}, slotPropValue), childPropValue);
|
|
3194
|
+
} else if (propName === "className") {
|
|
3195
|
+
overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" ");
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
return __spreadValues(__spreadValues({}, slotProps), overrideProps);
|
|
3199
|
+
}
|
|
3200
|
+
function getElementRef(element) {
|
|
3201
|
+
var _a, _b;
|
|
3202
|
+
let getter = (_a = Object.getOwnPropertyDescriptor(element.props, "ref")) == null ? void 0 : _a.get;
|
|
3203
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3204
|
+
if (mayWarn) {
|
|
3205
|
+
return element.ref;
|
|
3206
|
+
}
|
|
3207
|
+
getter = (_b = Object.getOwnPropertyDescriptor(element, "ref")) == null ? void 0 : _b.get;
|
|
3208
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
3209
|
+
if (mayWarn) {
|
|
3210
|
+
return element.props.ref;
|
|
3211
|
+
}
|
|
3212
|
+
return element.props.ref || element.ref;
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.1.3_@types+react@19.1.2__@types+rea_43250ccbc78c27b15284efcf829a65d5/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
3216
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3979
3217
|
var NODES = [
|
|
3980
3218
|
"a",
|
|
3981
3219
|
"button",
|
|
@@ -3997,13 +3235,13 @@ var NODES = [
|
|
|
3997
3235
|
];
|
|
3998
3236
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
3999
3237
|
const Slot3 = createSlot(`Primitive.${node}`);
|
|
4000
|
-
const Node2 =
|
|
3238
|
+
const Node2 = React39.forwardRef((props, forwardedRef) => {
|
|
4001
3239
|
const _a = props, { asChild } = _a, primitiveProps = __objRest(_a, ["asChild"]);
|
|
4002
3240
|
const Comp = asChild ? Slot3 : node;
|
|
4003
3241
|
if (typeof window !== "undefined") {
|
|
4004
3242
|
window[Symbol.for("radix-ui")] = true;
|
|
4005
3243
|
}
|
|
4006
|
-
return /* @__PURE__ */ (0,
|
|
3244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Comp, __spreadProps(__spreadValues({}, primitiveProps), { ref: forwardedRef }));
|
|
4007
3245
|
});
|
|
4008
3246
|
Node2.displayName = `Primitive.${node}`;
|
|
4009
3247
|
return __spreadProps(__spreadValues({}, primitive), { [node]: Node2 });
|
|
@@ -4013,23 +3251,23 @@ function dispatchDiscreteCustomEvent(target, event) {
|
|
|
4013
3251
|
}
|
|
4014
3252
|
|
|
4015
3253
|
// ../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs
|
|
4016
|
-
var
|
|
3254
|
+
var React40 = __toESM(require("react"), 1);
|
|
4017
3255
|
function useCallbackRef(callback) {
|
|
4018
|
-
const callbackRef =
|
|
4019
|
-
|
|
3256
|
+
const callbackRef = React40.useRef(callback);
|
|
3257
|
+
React40.useEffect(() => {
|
|
4020
3258
|
callbackRef.current = callback;
|
|
4021
3259
|
});
|
|
4022
|
-
return
|
|
3260
|
+
return React40.useMemo(() => (...args) => {
|
|
4023
3261
|
var _a;
|
|
4024
3262
|
return (_a = callbackRef.current) == null ? void 0 : _a.call(callbackRef, ...args);
|
|
4025
3263
|
}, []);
|
|
4026
3264
|
}
|
|
4027
3265
|
|
|
4028
3266
|
// ../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs
|
|
4029
|
-
var
|
|
3267
|
+
var React41 = __toESM(require("react"), 1);
|
|
4030
3268
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
4031
3269
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
4032
|
-
|
|
3270
|
+
React41.useEffect(() => {
|
|
4033
3271
|
const handleKeyDown = (event) => {
|
|
4034
3272
|
if (event.key === "Escape") {
|
|
4035
3273
|
onEscapeKeyDown(event);
|
|
@@ -4041,18 +3279,18 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis == nul
|
|
|
4041
3279
|
}
|
|
4042
3280
|
|
|
4043
3281
|
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.10_@types+react-dom@19.1.3_@types+react@19.1.2__@_048ea5800fbfacb7489e4b7d728b493c/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
4044
|
-
var
|
|
3282
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4045
3283
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
4046
3284
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
4047
3285
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
4048
3286
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
4049
3287
|
var originalBodyPointerEvents;
|
|
4050
|
-
var DismissableLayerContext =
|
|
3288
|
+
var DismissableLayerContext = React42.createContext({
|
|
4051
3289
|
layers: /* @__PURE__ */ new Set(),
|
|
4052
3290
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
4053
3291
|
branches: /* @__PURE__ */ new Set()
|
|
4054
3292
|
});
|
|
4055
|
-
var DismissableLayer =
|
|
3293
|
+
var DismissableLayer = React42.forwardRef(
|
|
4056
3294
|
(props, forwardedRef) => {
|
|
4057
3295
|
var _b;
|
|
4058
3296
|
const _a = props, {
|
|
@@ -4070,10 +3308,10 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4070
3308
|
"onInteractOutside",
|
|
4071
3309
|
"onDismiss"
|
|
4072
3310
|
]);
|
|
4073
|
-
const context =
|
|
4074
|
-
const [node, setNode] =
|
|
3311
|
+
const context = React42.useContext(DismissableLayerContext);
|
|
3312
|
+
const [node, setNode] = React42.useState(null);
|
|
4075
3313
|
const ownerDocument = (_b = node == null ? void 0 : node.ownerDocument) != null ? _b : globalThis == null ? void 0 : globalThis.document;
|
|
4076
|
-
const [, force] =
|
|
3314
|
+
const [, force] = React42.useState({});
|
|
4077
3315
|
const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));
|
|
4078
3316
|
const layers = Array.from(context.layers);
|
|
4079
3317
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
@@ -4106,7 +3344,7 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4106
3344
|
onDismiss();
|
|
4107
3345
|
}
|
|
4108
3346
|
}, ownerDocument);
|
|
4109
|
-
|
|
3347
|
+
React42.useEffect(() => {
|
|
4110
3348
|
if (!node) return;
|
|
4111
3349
|
if (disableOutsidePointerEvents) {
|
|
4112
3350
|
if (context.layersWithOutsidePointerEventsDisabled.size === 0) {
|
|
@@ -4123,7 +3361,7 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4123
3361
|
}
|
|
4124
3362
|
};
|
|
4125
3363
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
4126
|
-
|
|
3364
|
+
React42.useEffect(() => {
|
|
4127
3365
|
return () => {
|
|
4128
3366
|
if (!node) return;
|
|
4129
3367
|
context.layers.delete(node);
|
|
@@ -4131,12 +3369,12 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4131
3369
|
dispatchUpdate();
|
|
4132
3370
|
};
|
|
4133
3371
|
}, [node, context]);
|
|
4134
|
-
|
|
3372
|
+
React42.useEffect(() => {
|
|
4135
3373
|
const handleUpdate = () => force({});
|
|
4136
3374
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
4137
3375
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
4138
3376
|
}, []);
|
|
4139
|
-
return /* @__PURE__ */ (0,
|
|
3377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4140
3378
|
Primitive.div,
|
|
4141
3379
|
__spreadProps(__spreadValues({}, layerProps), {
|
|
4142
3380
|
ref: composedRefs,
|
|
@@ -4155,11 +3393,11 @@ var DismissableLayer = React45.forwardRef(
|
|
|
4155
3393
|
);
|
|
4156
3394
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
4157
3395
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
4158
|
-
var DismissableLayerBranch =
|
|
4159
|
-
const context =
|
|
4160
|
-
const ref =
|
|
3396
|
+
var DismissableLayerBranch = React42.forwardRef((props, forwardedRef) => {
|
|
3397
|
+
const context = React42.useContext(DismissableLayerContext);
|
|
3398
|
+
const ref = React42.useRef(null);
|
|
4161
3399
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
4162
|
-
|
|
3400
|
+
React42.useEffect(() => {
|
|
4163
3401
|
const node = ref.current;
|
|
4164
3402
|
if (node) {
|
|
4165
3403
|
context.branches.add(node);
|
|
@@ -4168,15 +3406,15 @@ var DismissableLayerBranch = React45.forwardRef((props, forwardedRef) => {
|
|
|
4168
3406
|
};
|
|
4169
3407
|
}
|
|
4170
3408
|
}, [context.branches]);
|
|
4171
|
-
return /* @__PURE__ */ (0,
|
|
3409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Primitive.div, __spreadProps(__spreadValues({}, props), { ref: composedRefs }));
|
|
4172
3410
|
});
|
|
4173
3411
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
4174
3412
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
4175
3413
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
4176
|
-
const isPointerInsideReactTreeRef =
|
|
4177
|
-
const handleClickRef =
|
|
3414
|
+
const isPointerInsideReactTreeRef = React42.useRef(false);
|
|
3415
|
+
const handleClickRef = React42.useRef(() => {
|
|
4178
3416
|
});
|
|
4179
|
-
|
|
3417
|
+
React42.useEffect(() => {
|
|
4180
3418
|
const handlePointerDown = (event) => {
|
|
4181
3419
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
4182
3420
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -4217,8 +3455,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis
|
|
|
4217
3455
|
}
|
|
4218
3456
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis == null ? void 0 : globalThis.document) {
|
|
4219
3457
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
4220
|
-
const isFocusInsideReactTreeRef =
|
|
4221
|
-
|
|
3458
|
+
const isFocusInsideReactTreeRef = React42.useRef(false);
|
|
3459
|
+
React42.useEffect(() => {
|
|
4222
3460
|
const handleFocus = (event) => {
|
|
4223
3461
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
4224
3462
|
const eventDetail = { originalEvent: event };
|
|
@@ -4251,13 +3489,13 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
4251
3489
|
}
|
|
4252
3490
|
|
|
4253
3491
|
// ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.1.3_@types+react@19.1.2__@types+r_1ff7b04b7c975087a2da2b1568ac976e/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
4254
|
-
var
|
|
4255
|
-
var
|
|
3492
|
+
var React43 = __toESM(require("react"), 1);
|
|
3493
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
4256
3494
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
4257
3495
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
4258
3496
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
4259
3497
|
var FOCUS_SCOPE_NAME = "FocusScope";
|
|
4260
|
-
var FocusScope =
|
|
3498
|
+
var FocusScope = React43.forwardRef((props, forwardedRef) => {
|
|
4261
3499
|
const _a = props, {
|
|
4262
3500
|
loop = false,
|
|
4263
3501
|
trapped = false,
|
|
@@ -4269,12 +3507,12 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4269
3507
|
"onMountAutoFocus",
|
|
4270
3508
|
"onUnmountAutoFocus"
|
|
4271
3509
|
]);
|
|
4272
|
-
const [container, setContainer] =
|
|
3510
|
+
const [container, setContainer] = React43.useState(null);
|
|
4273
3511
|
const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);
|
|
4274
3512
|
const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);
|
|
4275
|
-
const lastFocusedElementRef =
|
|
3513
|
+
const lastFocusedElementRef = React43.useRef(null);
|
|
4276
3514
|
const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));
|
|
4277
|
-
const focusScope =
|
|
3515
|
+
const focusScope = React43.useRef({
|
|
4278
3516
|
paused: false,
|
|
4279
3517
|
pause() {
|
|
4280
3518
|
this.paused = true;
|
|
@@ -4283,7 +3521,7 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4283
3521
|
this.paused = false;
|
|
4284
3522
|
}
|
|
4285
3523
|
}).current;
|
|
4286
|
-
|
|
3524
|
+
React43.useEffect(() => {
|
|
4287
3525
|
if (trapped) {
|
|
4288
3526
|
let handleFocusIn2 = function(event) {
|
|
4289
3527
|
if (focusScope.paused || !container) return;
|
|
@@ -4319,7 +3557,7 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4319
3557
|
};
|
|
4320
3558
|
}
|
|
4321
3559
|
}, [trapped, container, focusScope.paused]);
|
|
4322
|
-
|
|
3560
|
+
React43.useEffect(() => {
|
|
4323
3561
|
if (container) {
|
|
4324
3562
|
focusScopesStack.add(focusScope);
|
|
4325
3563
|
const previouslyFocusedElement = document.activeElement;
|
|
@@ -4350,7 +3588,7 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4350
3588
|
};
|
|
4351
3589
|
}
|
|
4352
3590
|
}, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);
|
|
4353
|
-
const handleKeyDown =
|
|
3591
|
+
const handleKeyDown = React43.useCallback(
|
|
4354
3592
|
(event) => {
|
|
4355
3593
|
if (!loop && !trapped) return;
|
|
4356
3594
|
if (focusScope.paused) return;
|
|
@@ -4375,7 +3613,7 @@ var FocusScope = React46.forwardRef((props, forwardedRef) => {
|
|
|
4375
3613
|
},
|
|
4376
3614
|
[loop, trapped, focusScope.paused]
|
|
4377
3615
|
);
|
|
4378
|
-
return /* @__PURE__ */ (0,
|
|
3616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Primitive.div, __spreadProps(__spreadValues({ tabIndex: -1 }, scopeProps), { ref: composedRefs, onKeyDown: handleKeyDown }));
|
|
4379
3617
|
});
|
|
4380
3618
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
4381
3619
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -4460,25 +3698,25 @@ function removeLinks(items) {
|
|
|
4460
3698
|
}
|
|
4461
3699
|
|
|
4462
3700
|
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react@_a0745de0839b0b019298ec068509a840/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
4463
|
-
var
|
|
3701
|
+
var React44 = __toESM(require("react"), 1);
|
|
4464
3702
|
var import_react_dom = __toESM(require("react-dom"), 1);
|
|
4465
|
-
var
|
|
3703
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4466
3704
|
var PORTAL_NAME = "Portal";
|
|
4467
|
-
var Portal =
|
|
3705
|
+
var Portal = React44.forwardRef((props, forwardedRef) => {
|
|
4468
3706
|
var _b;
|
|
4469
3707
|
const _a = props, { container: containerProp } = _a, portalProps = __objRest(_a, ["container"]);
|
|
4470
|
-
const [mounted, setMounted] =
|
|
3708
|
+
const [mounted, setMounted] = React44.useState(false);
|
|
4471
3709
|
useLayoutEffect2(() => setMounted(true), []);
|
|
4472
3710
|
const container = containerProp || mounted && ((_b = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : _b.body);
|
|
4473
|
-
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0,
|
|
3711
|
+
return container ? import_react_dom.default.createPortal(/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Primitive.div, __spreadProps(__spreadValues({}, portalProps), { ref: forwardedRef })), container) : null;
|
|
4474
3712
|
});
|
|
4475
3713
|
Portal.displayName = PORTAL_NAME;
|
|
4476
3714
|
|
|
4477
3715
|
// ../../node_modules/.pnpm/@radix-ui+react-presence@1.1.4_@types+react-dom@19.1.3_@types+react@19.1.2__@types+reac_dbbe976722e7c3e02883ea31c3bbbf14/node_modules/@radix-ui/react-presence/dist/index.mjs
|
|
4478
3716
|
var React211 = __toESM(require("react"), 1);
|
|
4479
|
-
var
|
|
3717
|
+
var React45 = __toESM(require("react"), 1);
|
|
4480
3718
|
function useStateMachine(initialState, machine) {
|
|
4481
|
-
return
|
|
3719
|
+
return React45.useReducer((state, event) => {
|
|
4482
3720
|
const nextState = machine[state][event];
|
|
4483
3721
|
return nextState != null ? nextState : state;
|
|
4484
3722
|
}, initialState);
|
|
@@ -4603,10 +3841,10 @@ function getElementRef2(element) {
|
|
|
4603
3841
|
}
|
|
4604
3842
|
|
|
4605
3843
|
// ../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.2_@types+react@19.1.2_react@19.1.0/node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
4606
|
-
var
|
|
3844
|
+
var React46 = __toESM(require("react"), 1);
|
|
4607
3845
|
var count2 = 0;
|
|
4608
3846
|
function useFocusGuards() {
|
|
4609
|
-
|
|
3847
|
+
React46.useEffect(() => {
|
|
4610
3848
|
var _a, _b;
|
|
4611
3849
|
const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
|
|
4612
3850
|
document.body.insertAdjacentElement("afterbegin", (_a = edgeGuards[0]) != null ? _a : createFocusGuard());
|
|
@@ -4664,10 +3902,10 @@ function __spreadArray(to, from, pack) {
|
|
|
4664
3902
|
}
|
|
4665
3903
|
|
|
4666
3904
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
4667
|
-
var
|
|
3905
|
+
var React53 = __toESM(require("react"));
|
|
4668
3906
|
|
|
4669
3907
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/UI.js
|
|
4670
|
-
var
|
|
3908
|
+
var React49 = __toESM(require("react"));
|
|
4671
3909
|
|
|
4672
3910
|
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/constants.js
|
|
4673
3911
|
var zeroRightClassName = "right-scroll-bar-position";
|
|
@@ -4686,9 +3924,9 @@ function assignRef(ref, value) {
|
|
|
4686
3924
|
}
|
|
4687
3925
|
|
|
4688
3926
|
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useRef.js
|
|
4689
|
-
var
|
|
3927
|
+
var import_react37 = require("react");
|
|
4690
3928
|
function useCallbackRef2(initialValue, callback) {
|
|
4691
|
-
var ref = (0,
|
|
3929
|
+
var ref = (0, import_react37.useState)(function() {
|
|
4692
3930
|
return {
|
|
4693
3931
|
// value
|
|
4694
3932
|
value: initialValue,
|
|
@@ -4714,8 +3952,8 @@ function useCallbackRef2(initialValue, callback) {
|
|
|
4714
3952
|
}
|
|
4715
3953
|
|
|
4716
3954
|
// ../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.1.2_react@19.1.0/node_modules/use-callback-ref/dist/es2015/useMergeRef.js
|
|
4717
|
-
var
|
|
4718
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
3955
|
+
var React47 = __toESM(require("react"));
|
|
3956
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React47.useLayoutEffect : React47.useEffect;
|
|
4719
3957
|
var currentValues = /* @__PURE__ */ new WeakMap();
|
|
4720
3958
|
function useMergeRefs(refs, defaultValue) {
|
|
4721
3959
|
var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
|
|
@@ -4832,7 +4070,7 @@ function createSidecarMedium(options) {
|
|
|
4832
4070
|
}
|
|
4833
4071
|
|
|
4834
4072
|
// ../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.1.2_react@19.1.0/node_modules/use-sidecar/dist/es2015/exports.js
|
|
4835
|
-
var
|
|
4073
|
+
var React48 = __toESM(require("react"));
|
|
4836
4074
|
var SideCar = function(_a) {
|
|
4837
4075
|
var sideCar = _a.sideCar, rest = __rest(_a, ["sideCar"]);
|
|
4838
4076
|
if (!sideCar) {
|
|
@@ -4842,7 +4080,7 @@ var SideCar = function(_a) {
|
|
|
4842
4080
|
if (!Target) {
|
|
4843
4081
|
throw new Error("Sidecar medium not found");
|
|
4844
4082
|
}
|
|
4845
|
-
return
|
|
4083
|
+
return React48.createElement(Target, __assign({}, rest));
|
|
4846
4084
|
};
|
|
4847
4085
|
SideCar.isSideCarExport = true;
|
|
4848
4086
|
function exportSidecar(medium, exported) {
|
|
@@ -4857,9 +4095,9 @@ var effectCar = createSidecarMedium();
|
|
|
4857
4095
|
var nothing = function() {
|
|
4858
4096
|
return;
|
|
4859
4097
|
};
|
|
4860
|
-
var RemoveScroll =
|
|
4861
|
-
var ref =
|
|
4862
|
-
var _a =
|
|
4098
|
+
var RemoveScroll = React49.forwardRef(function(props, parentRef) {
|
|
4099
|
+
var ref = React49.useRef(null);
|
|
4100
|
+
var _a = React49.useState({
|
|
4863
4101
|
onScrollCapture: nothing,
|
|
4864
4102
|
onWheelCapture: nothing,
|
|
4865
4103
|
onTouchMoveCapture: nothing
|
|
@@ -4868,11 +4106,11 @@ var RemoveScroll = React52.forwardRef(function(props, parentRef) {
|
|
|
4868
4106
|
var SideCar2 = sideCar;
|
|
4869
4107
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
4870
4108
|
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
4871
|
-
return
|
|
4872
|
-
|
|
4109
|
+
return React49.createElement(
|
|
4110
|
+
React49.Fragment,
|
|
4873
4111
|
null,
|
|
4874
|
-
enabled &&
|
|
4875
|
-
forwardProps ?
|
|
4112
|
+
enabled && React49.createElement(SideCar2, { sideCar: effectCar, removeScrollBar, shards, noRelative, noIsolation, inert, setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode }),
|
|
4113
|
+
forwardProps ? React49.cloneElement(React49.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef })) : React49.createElement(Container, __assign({}, containerProps, { className, ref: containerRef }), children)
|
|
4876
4114
|
);
|
|
4877
4115
|
});
|
|
4878
4116
|
RemoveScroll.defaultProps = {
|
|
@@ -4886,13 +4124,13 @@ RemoveScroll.classNames = {
|
|
|
4886
4124
|
};
|
|
4887
4125
|
|
|
4888
4126
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js
|
|
4889
|
-
var
|
|
4127
|
+
var React52 = __toESM(require("react"));
|
|
4890
4128
|
|
|
4891
4129
|
// ../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll-bar/dist/es2015/component.js
|
|
4892
|
-
var
|
|
4130
|
+
var React51 = __toESM(require("react"));
|
|
4893
4131
|
|
|
4894
4132
|
// ../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.1.2_react@19.1.0/node_modules/react-style-singleton/dist/es2015/hook.js
|
|
4895
|
-
var
|
|
4133
|
+
var React50 = __toESM(require("react"));
|
|
4896
4134
|
|
|
4897
4135
|
// ../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es2015/index.js
|
|
4898
4136
|
var currentNonce;
|
|
@@ -4956,7 +4194,7 @@ var stylesheetSingleton = function() {
|
|
|
4956
4194
|
var styleHookSingleton = function() {
|
|
4957
4195
|
var sheet = stylesheetSingleton();
|
|
4958
4196
|
return function(styles, isDynamic) {
|
|
4959
|
-
|
|
4197
|
+
React50.useEffect(function() {
|
|
4960
4198
|
sheet.add(styles);
|
|
4961
4199
|
return function() {
|
|
4962
4200
|
sheet.remove();
|
|
@@ -5030,7 +4268,7 @@ var getCurrentUseCounter = function() {
|
|
|
5030
4268
|
return isFinite(counter) ? counter : 0;
|
|
5031
4269
|
};
|
|
5032
4270
|
var useLockAttribute = function() {
|
|
5033
|
-
|
|
4271
|
+
React51.useEffect(function() {
|
|
5034
4272
|
document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
|
|
5035
4273
|
return function() {
|
|
5036
4274
|
var newCounter = getCurrentUseCounter() - 1;
|
|
@@ -5045,10 +4283,10 @@ var useLockAttribute = function() {
|
|
|
5045
4283
|
var RemoveScrollBar = function(_a) {
|
|
5046
4284
|
var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? "margin" : _b;
|
|
5047
4285
|
useLockAttribute();
|
|
5048
|
-
var gap =
|
|
4286
|
+
var gap = React51.useMemo(function() {
|
|
5049
4287
|
return getGapWidth(gapMode);
|
|
5050
4288
|
}, [gapMode]);
|
|
5051
|
-
return
|
|
4289
|
+
return React51.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? "!important" : "") });
|
|
5052
4290
|
};
|
|
5053
4291
|
|
|
5054
4292
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js
|
|
@@ -5189,16 +4427,16 @@ var generateStyle = function(id) {
|
|
|
5189
4427
|
var idCounter = 0;
|
|
5190
4428
|
var lockStack = [];
|
|
5191
4429
|
function RemoveScrollSideCar(props) {
|
|
5192
|
-
var shouldPreventQueue =
|
|
5193
|
-
var touchStartRef =
|
|
5194
|
-
var activeAxis =
|
|
5195
|
-
var id =
|
|
5196
|
-
var Style2 =
|
|
5197
|
-
var lastProps =
|
|
5198
|
-
|
|
4430
|
+
var shouldPreventQueue = React52.useRef([]);
|
|
4431
|
+
var touchStartRef = React52.useRef([0, 0]);
|
|
4432
|
+
var activeAxis = React52.useRef();
|
|
4433
|
+
var id = React52.useState(idCounter++)[0];
|
|
4434
|
+
var Style2 = React52.useState(styleSingleton)[0];
|
|
4435
|
+
var lastProps = React52.useRef(props);
|
|
4436
|
+
React52.useEffect(function() {
|
|
5199
4437
|
lastProps.current = props;
|
|
5200
4438
|
}, [props]);
|
|
5201
|
-
|
|
4439
|
+
React52.useEffect(function() {
|
|
5202
4440
|
if (props.inert) {
|
|
5203
4441
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
5204
4442
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -5214,7 +4452,7 @@ function RemoveScrollSideCar(props) {
|
|
|
5214
4452
|
}
|
|
5215
4453
|
return;
|
|
5216
4454
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
5217
|
-
var shouldCancelEvent =
|
|
4455
|
+
var shouldCancelEvent = React52.useCallback(function(event, parent) {
|
|
5218
4456
|
if ("touches" in event && event.touches.length === 2 || event.type === "wheel" && event.ctrlKey) {
|
|
5219
4457
|
return !lastProps.current.allowPinchZoom;
|
|
5220
4458
|
}
|
|
@@ -5250,7 +4488,7 @@ function RemoveScrollSideCar(props) {
|
|
|
5250
4488
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
5251
4489
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === "h" ? deltaX : deltaY, true);
|
|
5252
4490
|
}, []);
|
|
5253
|
-
var shouldPrevent =
|
|
4491
|
+
var shouldPrevent = React52.useCallback(function(_event) {
|
|
5254
4492
|
var event = _event;
|
|
5255
4493
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style2) {
|
|
5256
4494
|
return;
|
|
@@ -5277,7 +4515,7 @@ function RemoveScrollSideCar(props) {
|
|
|
5277
4515
|
}
|
|
5278
4516
|
}
|
|
5279
4517
|
}, []);
|
|
5280
|
-
var shouldCancel =
|
|
4518
|
+
var shouldCancel = React52.useCallback(function(name, delta, target, should) {
|
|
5281
4519
|
var event = { name, delta, target, should, shadowParent: getOutermostShadowParent(target) };
|
|
5282
4520
|
shouldPreventQueue.current.push(event);
|
|
5283
4521
|
setTimeout(function() {
|
|
@@ -5286,17 +4524,17 @@ function RemoveScrollSideCar(props) {
|
|
|
5286
4524
|
});
|
|
5287
4525
|
}, 1);
|
|
5288
4526
|
}, []);
|
|
5289
|
-
var scrollTouchStart =
|
|
4527
|
+
var scrollTouchStart = React52.useCallback(function(event) {
|
|
5290
4528
|
touchStartRef.current = getTouchXY(event);
|
|
5291
4529
|
activeAxis.current = void 0;
|
|
5292
4530
|
}, []);
|
|
5293
|
-
var scrollWheel =
|
|
4531
|
+
var scrollWheel = React52.useCallback(function(event) {
|
|
5294
4532
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
5295
4533
|
}, []);
|
|
5296
|
-
var scrollTouchMove =
|
|
4534
|
+
var scrollTouchMove = React52.useCallback(function(event) {
|
|
5297
4535
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
5298
4536
|
}, []);
|
|
5299
|
-
|
|
4537
|
+
React52.useEffect(function() {
|
|
5300
4538
|
lockStack.push(Style2);
|
|
5301
4539
|
props.setCallbacks({
|
|
5302
4540
|
onScrollCapture: scrollWheel,
|
|
@@ -5316,11 +4554,11 @@ function RemoveScrollSideCar(props) {
|
|
|
5316
4554
|
};
|
|
5317
4555
|
}, []);
|
|
5318
4556
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
5319
|
-
return
|
|
5320
|
-
|
|
4557
|
+
return React52.createElement(
|
|
4558
|
+
React52.Fragment,
|
|
5321
4559
|
null,
|
|
5322
|
-
inert ?
|
|
5323
|
-
removeScrollBar ?
|
|
4560
|
+
inert ? React52.createElement(Style2, { styles: generateStyle(id) }) : null,
|
|
4561
|
+
removeScrollBar ? React52.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null
|
|
5324
4562
|
);
|
|
5325
4563
|
}
|
|
5326
4564
|
function getOutermostShadowParent(node) {
|
|
@@ -5339,8 +4577,8 @@ function getOutermostShadowParent(node) {
|
|
|
5339
4577
|
var sidecar_default = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
5340
4578
|
|
|
5341
4579
|
// ../../node_modules/.pnpm/react-remove-scroll@2.7.1_@types+react@19.1.2_react@19.1.0/node_modules/react-remove-scroll/dist/es2015/Combination.js
|
|
5342
|
-
var ReactRemoveScroll =
|
|
5343
|
-
return
|
|
4580
|
+
var ReactRemoveScroll = React53.forwardRef(function(props, ref) {
|
|
4581
|
+
return React53.createElement(RemoveScroll, __assign({}, props, { ref, sideCar: sidecar_default }));
|
|
5344
4582
|
});
|
|
5345
4583
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
5346
4584
|
var Combination_default = ReactRemoveScroll;
|
|
@@ -5467,7 +4705,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
5467
4705
|
};
|
|
5468
4706
|
|
|
5469
4707
|
// ../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types+react_848f83211ce5e4d8275fe0d3e11a9387/node_modules/@radix-ui/react-dialog/dist/index.mjs
|
|
5470
|
-
var
|
|
4708
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5471
4709
|
var DIALOG_NAME = "Dialog";
|
|
5472
4710
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
5473
4711
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -5480,15 +4718,15 @@ var Dialog = (props) => {
|
|
|
5480
4718
|
onOpenChange,
|
|
5481
4719
|
modal = true
|
|
5482
4720
|
} = props;
|
|
5483
|
-
const triggerRef =
|
|
5484
|
-
const contentRef =
|
|
4721
|
+
const triggerRef = React54.useRef(null);
|
|
4722
|
+
const contentRef = React54.useRef(null);
|
|
5485
4723
|
const [open, setOpen] = useControllableState({
|
|
5486
4724
|
prop: openProp,
|
|
5487
4725
|
defaultProp: defaultOpen != null ? defaultOpen : false,
|
|
5488
4726
|
onChange: onOpenChange,
|
|
5489
4727
|
caller: DIALOG_NAME
|
|
5490
4728
|
});
|
|
5491
|
-
return /* @__PURE__ */ (0,
|
|
4729
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5492
4730
|
DialogProvider,
|
|
5493
4731
|
{
|
|
5494
4732
|
scope: __scopeDialog,
|
|
@@ -5499,7 +4737,7 @@ var Dialog = (props) => {
|
|
|
5499
4737
|
descriptionId: useId(),
|
|
5500
4738
|
open,
|
|
5501
4739
|
onOpenChange: setOpen,
|
|
5502
|
-
onOpenToggle:
|
|
4740
|
+
onOpenToggle: React54.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
5503
4741
|
modal,
|
|
5504
4742
|
children
|
|
5505
4743
|
}
|
|
@@ -5507,12 +4745,12 @@ var Dialog = (props) => {
|
|
|
5507
4745
|
};
|
|
5508
4746
|
Dialog.displayName = DIALOG_NAME;
|
|
5509
4747
|
var TRIGGER_NAME = "DialogTrigger";
|
|
5510
|
-
var DialogTrigger =
|
|
4748
|
+
var DialogTrigger = React54.forwardRef(
|
|
5511
4749
|
(props, forwardedRef) => {
|
|
5512
4750
|
const _a = props, { __scopeDialog } = _a, triggerProps = __objRest(_a, ["__scopeDialog"]);
|
|
5513
4751
|
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
5514
4752
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
5515
|
-
return /* @__PURE__ */ (0,
|
|
4753
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5516
4754
|
Primitive.button,
|
|
5517
4755
|
__spreadProps(__spreadValues({
|
|
5518
4756
|
type: "button",
|
|
@@ -5535,28 +4773,28 @@ var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME2, {
|
|
|
5535
4773
|
var DialogPortal = (props) => {
|
|
5536
4774
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
5537
4775
|
const context = useDialogContext(PORTAL_NAME2, __scopeDialog);
|
|
5538
|
-
return /* @__PURE__ */ (0,
|
|
4776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: React54.Children.map(children, (child) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Portal, { asChild: true, container, children: child }) })) });
|
|
5539
4777
|
};
|
|
5540
4778
|
DialogPortal.displayName = PORTAL_NAME2;
|
|
5541
4779
|
var OVERLAY_NAME = "DialogOverlay";
|
|
5542
|
-
var DialogOverlay =
|
|
4780
|
+
var DialogOverlay = React54.forwardRef(
|
|
5543
4781
|
(props, forwardedRef) => {
|
|
5544
4782
|
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
5545
4783
|
const _a = props, { forceMount = portalContext.forceMount } = _a, overlayProps = __objRest(_a, ["forceMount"]);
|
|
5546
4784
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
5547
|
-
return context.modal ? /* @__PURE__ */ (0,
|
|
4785
|
+
return context.modal ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogOverlayImpl, __spreadProps(__spreadValues({}, overlayProps), { ref: forwardedRef })) }) : null;
|
|
5548
4786
|
}
|
|
5549
4787
|
);
|
|
5550
4788
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
5551
4789
|
var Slot2 = createSlot("DialogOverlay.RemoveScroll");
|
|
5552
|
-
var DialogOverlayImpl =
|
|
4790
|
+
var DialogOverlayImpl = React54.forwardRef(
|
|
5553
4791
|
(props, forwardedRef) => {
|
|
5554
4792
|
const _a = props, { __scopeDialog } = _a, overlayProps = __objRest(_a, ["__scopeDialog"]);
|
|
5555
4793
|
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
5556
4794
|
return (
|
|
5557
4795
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
5558
4796
|
// ie. when `Overlay` and `Content` are siblings
|
|
5559
|
-
/* @__PURE__ */ (0,
|
|
4797
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5560
4798
|
Primitive.div,
|
|
5561
4799
|
__spreadProps(__spreadValues({
|
|
5562
4800
|
"data-state": getState(context.open)
|
|
@@ -5569,25 +4807,25 @@ var DialogOverlayImpl = React57.forwardRef(
|
|
|
5569
4807
|
}
|
|
5570
4808
|
);
|
|
5571
4809
|
var CONTENT_NAME = "DialogContent";
|
|
5572
|
-
var DialogContent =
|
|
4810
|
+
var DialogContent = React54.forwardRef(
|
|
5573
4811
|
(props, forwardedRef) => {
|
|
5574
4812
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);
|
|
5575
4813
|
const _a = props, { forceMount = portalContext.forceMount } = _a, contentProps = __objRest(_a, ["forceMount"]);
|
|
5576
4814
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
5577
|
-
return /* @__PURE__ */ (0,
|
|
4815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogContentModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DialogContentNonModal, __spreadProps(__spreadValues({}, contentProps), { ref: forwardedRef })) });
|
|
5578
4816
|
}
|
|
5579
4817
|
);
|
|
5580
4818
|
DialogContent.displayName = CONTENT_NAME;
|
|
5581
|
-
var DialogContentModal =
|
|
4819
|
+
var DialogContentModal = React54.forwardRef(
|
|
5582
4820
|
(props, forwardedRef) => {
|
|
5583
4821
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
5584
|
-
const contentRef =
|
|
4822
|
+
const contentRef = React54.useRef(null);
|
|
5585
4823
|
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
5586
|
-
|
|
4824
|
+
React54.useEffect(() => {
|
|
5587
4825
|
const content = contentRef.current;
|
|
5588
4826
|
if (content) return hideOthers(content);
|
|
5589
4827
|
}, []);
|
|
5590
|
-
return /* @__PURE__ */ (0,
|
|
4828
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5591
4829
|
DialogContentImpl,
|
|
5592
4830
|
__spreadProps(__spreadValues({}, props), {
|
|
5593
4831
|
ref: composedRefs,
|
|
@@ -5612,12 +4850,12 @@ var DialogContentModal = React57.forwardRef(
|
|
|
5612
4850
|
);
|
|
5613
4851
|
}
|
|
5614
4852
|
);
|
|
5615
|
-
var DialogContentNonModal =
|
|
4853
|
+
var DialogContentNonModal = React54.forwardRef(
|
|
5616
4854
|
(props, forwardedRef) => {
|
|
5617
4855
|
const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);
|
|
5618
|
-
const hasInteractedOutsideRef =
|
|
5619
|
-
const hasPointerDownOutsideRef =
|
|
5620
|
-
return /* @__PURE__ */ (0,
|
|
4856
|
+
const hasInteractedOutsideRef = React54.useRef(false);
|
|
4857
|
+
const hasPointerDownOutsideRef = React54.useRef(false);
|
|
4858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5621
4859
|
DialogContentImpl,
|
|
5622
4860
|
__spreadProps(__spreadValues({}, props), {
|
|
5623
4861
|
ref: forwardedRef,
|
|
@@ -5653,15 +4891,15 @@ var DialogContentNonModal = React57.forwardRef(
|
|
|
5653
4891
|
);
|
|
5654
4892
|
}
|
|
5655
4893
|
);
|
|
5656
|
-
var DialogContentImpl =
|
|
4894
|
+
var DialogContentImpl = React54.forwardRef(
|
|
5657
4895
|
(props, forwardedRef) => {
|
|
5658
4896
|
const _a = props, { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus } = _a, contentProps = __objRest(_a, ["__scopeDialog", "trapFocus", "onOpenAutoFocus", "onCloseAutoFocus"]);
|
|
5659
4897
|
const context = useDialogContext(CONTENT_NAME, __scopeDialog);
|
|
5660
|
-
const contentRef =
|
|
4898
|
+
const contentRef = React54.useRef(null);
|
|
5661
4899
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
5662
4900
|
useFocusGuards();
|
|
5663
|
-
return /* @__PURE__ */ (0,
|
|
5664
|
-
/* @__PURE__ */ (0,
|
|
4901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
4902
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5665
4903
|
FocusScope,
|
|
5666
4904
|
{
|
|
5667
4905
|
asChild: true,
|
|
@@ -5669,7 +4907,7 @@ var DialogContentImpl = React57.forwardRef(
|
|
|
5669
4907
|
trapped: trapFocus,
|
|
5670
4908
|
onMountAutoFocus: onOpenAutoFocus,
|
|
5671
4909
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
5672
|
-
children: /* @__PURE__ */ (0,
|
|
4910
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5673
4911
|
DismissableLayer,
|
|
5674
4912
|
__spreadProps(__spreadValues({
|
|
5675
4913
|
role: "dialog",
|
|
@@ -5684,37 +4922,37 @@ var DialogContentImpl = React57.forwardRef(
|
|
|
5684
4922
|
)
|
|
5685
4923
|
}
|
|
5686
4924
|
),
|
|
5687
|
-
/* @__PURE__ */ (0,
|
|
5688
|
-
/* @__PURE__ */ (0,
|
|
5689
|
-
/* @__PURE__ */ (0,
|
|
4925
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_jsx_runtime41.Fragment, { children: [
|
|
4926
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(TitleWarning, { titleId: context.titleId }),
|
|
4927
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
5690
4928
|
] })
|
|
5691
4929
|
] });
|
|
5692
4930
|
}
|
|
5693
4931
|
);
|
|
5694
4932
|
var TITLE_NAME = "DialogTitle";
|
|
5695
|
-
var DialogTitle =
|
|
4933
|
+
var DialogTitle = React54.forwardRef(
|
|
5696
4934
|
(props, forwardedRef) => {
|
|
5697
4935
|
const _a = props, { __scopeDialog } = _a, titleProps = __objRest(_a, ["__scopeDialog"]);
|
|
5698
4936
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
5699
|
-
return /* @__PURE__ */ (0,
|
|
4937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Primitive.h2, __spreadProps(__spreadValues({ id: context.titleId }, titleProps), { ref: forwardedRef }));
|
|
5700
4938
|
}
|
|
5701
4939
|
);
|
|
5702
4940
|
DialogTitle.displayName = TITLE_NAME;
|
|
5703
4941
|
var DESCRIPTION_NAME = "DialogDescription";
|
|
5704
|
-
var DialogDescription =
|
|
4942
|
+
var DialogDescription = React54.forwardRef(
|
|
5705
4943
|
(props, forwardedRef) => {
|
|
5706
4944
|
const _a = props, { __scopeDialog } = _a, descriptionProps = __objRest(_a, ["__scopeDialog"]);
|
|
5707
4945
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
5708
|
-
return /* @__PURE__ */ (0,
|
|
4946
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Primitive.p, __spreadProps(__spreadValues({ id: context.descriptionId }, descriptionProps), { ref: forwardedRef }));
|
|
5709
4947
|
}
|
|
5710
4948
|
);
|
|
5711
4949
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
5712
4950
|
var CLOSE_NAME = "DialogClose";
|
|
5713
|
-
var DialogClose =
|
|
4951
|
+
var DialogClose = React54.forwardRef(
|
|
5714
4952
|
(props, forwardedRef) => {
|
|
5715
4953
|
const _a = props, { __scopeDialog } = _a, closeProps = __objRest(_a, ["__scopeDialog"]);
|
|
5716
4954
|
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
5717
|
-
return /* @__PURE__ */ (0,
|
|
4955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5718
4956
|
Primitive.button,
|
|
5719
4957
|
__spreadProps(__spreadValues({
|
|
5720
4958
|
type: "button"
|
|
@@ -5742,7 +4980,7 @@ var TitleWarning = ({ titleId }) => {
|
|
|
5742
4980
|
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5743
4981
|
|
|
5744
4982
|
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
5745
|
-
|
|
4983
|
+
React54.useEffect(() => {
|
|
5746
4984
|
if (titleId) {
|
|
5747
4985
|
const hasTitle = document.getElementById(titleId);
|
|
5748
4986
|
if (!hasTitle) console.error(MESSAGE);
|
|
@@ -5754,7 +4992,7 @@ var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
|
5754
4992
|
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
5755
4993
|
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
5756
4994
|
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
5757
|
-
|
|
4995
|
+
React54.useEffect(() => {
|
|
5758
4996
|
var _a;
|
|
5759
4997
|
const describedById = (_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby");
|
|
5760
4998
|
if (descriptionId && describedById) {
|
|
@@ -5774,7 +5012,7 @@ var Description = DialogDescription;
|
|
|
5774
5012
|
var Close = DialogClose;
|
|
5775
5013
|
|
|
5776
5014
|
// ../../node_modules/.pnpm/@radix-ui+react-alert-dialog@1.1.14_@types+react-dom@19.1.3_@types+react@19.1.2__@types_c6ff7006a888f63e36d2502e019661c3/node_modules/@radix-ui/react-alert-dialog/dist/index.mjs
|
|
5777
|
-
var
|
|
5015
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5778
5016
|
var ROOT_NAME = "AlertDialog";
|
|
5779
5017
|
var [createAlertDialogContext, createAlertDialogScope] = createContextScope(ROOT_NAME, [
|
|
5780
5018
|
createDialogScope
|
|
@@ -5783,15 +5021,15 @@ var useDialogScope = createDialogScope();
|
|
|
5783
5021
|
var AlertDialog = (props) => {
|
|
5784
5022
|
const _a = props, { __scopeAlertDialog } = _a, alertDialogProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5785
5023
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5786
|
-
return /* @__PURE__ */ (0,
|
|
5024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Root, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), alertDialogProps), { modal: true }));
|
|
5787
5025
|
};
|
|
5788
5026
|
AlertDialog.displayName = ROOT_NAME;
|
|
5789
5027
|
var TRIGGER_NAME2 = "AlertDialogTrigger";
|
|
5790
|
-
var AlertDialogTrigger =
|
|
5028
|
+
var AlertDialogTrigger = React55.forwardRef(
|
|
5791
5029
|
(props, forwardedRef) => {
|
|
5792
5030
|
const _a = props, { __scopeAlertDialog } = _a, triggerProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5793
5031
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5794
|
-
return /* @__PURE__ */ (0,
|
|
5032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Trigger, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), triggerProps), { ref: forwardedRef }));
|
|
5795
5033
|
}
|
|
5796
5034
|
);
|
|
5797
5035
|
AlertDialogTrigger.displayName = TRIGGER_NAME2;
|
|
@@ -5799,35 +5037,35 @@ var PORTAL_NAME3 = "AlertDialogPortal";
|
|
|
5799
5037
|
var AlertDialogPortal = (props) => {
|
|
5800
5038
|
const _a = props, { __scopeAlertDialog } = _a, portalProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5801
5039
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5802
|
-
return /* @__PURE__ */ (0,
|
|
5040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Portal2, __spreadValues(__spreadValues({}, dialogScope), portalProps));
|
|
5803
5041
|
};
|
|
5804
5042
|
AlertDialogPortal.displayName = PORTAL_NAME3;
|
|
5805
5043
|
var OVERLAY_NAME2 = "AlertDialogOverlay";
|
|
5806
|
-
var AlertDialogOverlay =
|
|
5044
|
+
var AlertDialogOverlay = React55.forwardRef(
|
|
5807
5045
|
(props, forwardedRef) => {
|
|
5808
5046
|
const _a = props, { __scopeAlertDialog } = _a, overlayProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5809
5047
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5810
|
-
return /* @__PURE__ */ (0,
|
|
5048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Overlay, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), overlayProps), { ref: forwardedRef }));
|
|
5811
5049
|
}
|
|
5812
5050
|
);
|
|
5813
5051
|
AlertDialogOverlay.displayName = OVERLAY_NAME2;
|
|
5814
5052
|
var CONTENT_NAME2 = "AlertDialogContent";
|
|
5815
5053
|
var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME2);
|
|
5816
5054
|
var Slottable = createSlottable("AlertDialogContent");
|
|
5817
|
-
var AlertDialogContent =
|
|
5055
|
+
var AlertDialogContent = React55.forwardRef(
|
|
5818
5056
|
(props, forwardedRef) => {
|
|
5819
5057
|
const _a = props, { __scopeAlertDialog, children } = _a, contentProps = __objRest(_a, ["__scopeAlertDialog", "children"]);
|
|
5820
5058
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5821
|
-
const contentRef =
|
|
5059
|
+
const contentRef = React55.useRef(null);
|
|
5822
5060
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
5823
|
-
const cancelRef =
|
|
5824
|
-
return /* @__PURE__ */ (0,
|
|
5061
|
+
const cancelRef = React55.useRef(null);
|
|
5062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5825
5063
|
WarningProvider,
|
|
5826
5064
|
{
|
|
5827
5065
|
contentName: CONTENT_NAME2,
|
|
5828
5066
|
titleName: TITLE_NAME2,
|
|
5829
5067
|
docsSlug: "alert-dialog",
|
|
5830
|
-
children: /* @__PURE__ */ (0,
|
|
5068
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(AlertDialogContentProvider, { scope: __scopeAlertDialog, cancelRef, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
5831
5069
|
Content,
|
|
5832
5070
|
__spreadProps(__spreadValues(__spreadValues({
|
|
5833
5071
|
role: "alertdialog"
|
|
@@ -5841,8 +5079,8 @@ var AlertDialogContent = React58.forwardRef(
|
|
|
5841
5079
|
onPointerDownOutside: (event) => event.preventDefault(),
|
|
5842
5080
|
onInteractOutside: (event) => event.preventDefault(),
|
|
5843
5081
|
children: [
|
|
5844
|
-
/* @__PURE__ */ (0,
|
|
5845
|
-
/* @__PURE__ */ (0,
|
|
5082
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Slottable, { children }),
|
|
5083
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(DescriptionWarning2, { contentRef })
|
|
5846
5084
|
]
|
|
5847
5085
|
})
|
|
5848
5086
|
) })
|
|
@@ -5852,38 +5090,38 @@ var AlertDialogContent = React58.forwardRef(
|
|
|
5852
5090
|
);
|
|
5853
5091
|
AlertDialogContent.displayName = CONTENT_NAME2;
|
|
5854
5092
|
var TITLE_NAME2 = "AlertDialogTitle";
|
|
5855
|
-
var AlertDialogTitle =
|
|
5093
|
+
var AlertDialogTitle = React55.forwardRef(
|
|
5856
5094
|
(props, forwardedRef) => {
|
|
5857
5095
|
const _a = props, { __scopeAlertDialog } = _a, titleProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5858
5096
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5859
|
-
return /* @__PURE__ */ (0,
|
|
5097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Title, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), titleProps), { ref: forwardedRef }));
|
|
5860
5098
|
}
|
|
5861
5099
|
);
|
|
5862
5100
|
AlertDialogTitle.displayName = TITLE_NAME2;
|
|
5863
5101
|
var DESCRIPTION_NAME2 = "AlertDialogDescription";
|
|
5864
|
-
var AlertDialogDescription =
|
|
5102
|
+
var AlertDialogDescription = React55.forwardRef((props, forwardedRef) => {
|
|
5865
5103
|
const _a = props, { __scopeAlertDialog } = _a, descriptionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5866
5104
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5867
|
-
return /* @__PURE__ */ (0,
|
|
5105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Description, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), descriptionProps), { ref: forwardedRef }));
|
|
5868
5106
|
});
|
|
5869
5107
|
AlertDialogDescription.displayName = DESCRIPTION_NAME2;
|
|
5870
5108
|
var ACTION_NAME = "AlertDialogAction";
|
|
5871
|
-
var AlertDialogAction =
|
|
5109
|
+
var AlertDialogAction = React55.forwardRef(
|
|
5872
5110
|
(props, forwardedRef) => {
|
|
5873
5111
|
const _a = props, { __scopeAlertDialog } = _a, actionProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5874
5112
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5875
|
-
return /* @__PURE__ */ (0,
|
|
5113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), actionProps), { ref: forwardedRef }));
|
|
5876
5114
|
}
|
|
5877
5115
|
);
|
|
5878
5116
|
AlertDialogAction.displayName = ACTION_NAME;
|
|
5879
5117
|
var CANCEL_NAME = "AlertDialogCancel";
|
|
5880
|
-
var AlertDialogCancel =
|
|
5118
|
+
var AlertDialogCancel = React55.forwardRef(
|
|
5881
5119
|
(props, forwardedRef) => {
|
|
5882
5120
|
const _a = props, { __scopeAlertDialog } = _a, cancelProps = __objRest(_a, ["__scopeAlertDialog"]);
|
|
5883
5121
|
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
|
5884
5122
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
5885
5123
|
const ref = useComposedRefs(forwardedRef, cancelRef);
|
|
5886
|
-
return /* @__PURE__ */ (0,
|
|
5124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Close, __spreadProps(__spreadValues(__spreadValues({}, dialogScope), cancelProps), { ref }));
|
|
5887
5125
|
}
|
|
5888
5126
|
);
|
|
5889
5127
|
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
@@ -5895,7 +5133,7 @@ You can add a description to the \`${CONTENT_NAME2}\` by passing a \`${DESCRIPTI
|
|
|
5895
5133
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME2}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
5896
5134
|
|
|
5897
5135
|
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
5898
|
-
|
|
5136
|
+
React55.useEffect(() => {
|
|
5899
5137
|
var _a;
|
|
5900
5138
|
const hasDescription = document.getElementById(
|
|
5901
5139
|
(_a = contentRef.current) == null ? void 0 : _a.getAttribute("aria-describedby")
|
|
@@ -5913,13 +5151,82 @@ var Cancel = AlertDialogCancel;
|
|
|
5913
5151
|
var Title2 = AlertDialogTitle;
|
|
5914
5152
|
var Description2 = AlertDialogDescription;
|
|
5915
5153
|
|
|
5154
|
+
// ../lib/src/utils.ts
|
|
5155
|
+
var import_clsx = require("clsx");
|
|
5156
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
5157
|
+
function cn(...inputs) {
|
|
5158
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
5159
|
+
}
|
|
5160
|
+
|
|
5161
|
+
// ../base-ui/src/ui/button.tsx
|
|
5162
|
+
var React56 = __toESM(require("react"), 1);
|
|
5163
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
5164
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
5165
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
5166
|
+
"inline-flex items-center gap-2 whitespace-nowrap rounded-md text-sm ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
5167
|
+
{
|
|
5168
|
+
variants: {
|
|
5169
|
+
variant: {
|
|
5170
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
5171
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
5172
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
5173
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
5174
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
5175
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
5176
|
+
},
|
|
5177
|
+
size: {
|
|
5178
|
+
default: "h-10 px-4 py-2",
|
|
5179
|
+
sm: "h-9 rounded-md px-3",
|
|
5180
|
+
lg: "h-11 rounded-md px-8",
|
|
5181
|
+
icon: "h-10 w-10"
|
|
5182
|
+
}
|
|
5183
|
+
},
|
|
5184
|
+
defaultVariants: {
|
|
5185
|
+
variant: "default",
|
|
5186
|
+
size: "default"
|
|
5187
|
+
}
|
|
5188
|
+
}
|
|
5189
|
+
);
|
|
5190
|
+
var Button = React56.forwardRef(
|
|
5191
|
+
(_a, ref) => {
|
|
5192
|
+
var _b = _a, { className, variant, size, asChild = false, loading = false, children } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild", "loading", "children"]);
|
|
5193
|
+
const Comp = asChild ? Slot : "button";
|
|
5194
|
+
if (asChild) {
|
|
5195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
5196
|
+
Comp,
|
|
5197
|
+
__spreadProps(__spreadValues({
|
|
5198
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
5199
|
+
ref,
|
|
5200
|
+
disabled: loading || props.disabled
|
|
5201
|
+
}, props), {
|
|
5202
|
+
children
|
|
5203
|
+
})
|
|
5204
|
+
);
|
|
5205
|
+
}
|
|
5206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
5207
|
+
Comp,
|
|
5208
|
+
__spreadProps(__spreadValues({
|
|
5209
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
5210
|
+
ref,
|
|
5211
|
+
disabled: loading || props.disabled
|
|
5212
|
+
}, props), {
|
|
5213
|
+
children: [
|
|
5214
|
+
children,
|
|
5215
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(globalLucideIcons.Loader2, { className: "ml-2 h-4 w-4 animate-spin" })
|
|
5216
|
+
]
|
|
5217
|
+
})
|
|
5218
|
+
);
|
|
5219
|
+
}
|
|
5220
|
+
);
|
|
5221
|
+
Button.displayName = "Button";
|
|
5222
|
+
|
|
5916
5223
|
// ../base-ui/src/ui/alert-dialog.tsx
|
|
5917
|
-
var
|
|
5224
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
5918
5225
|
var AlertDialog2 = Root2;
|
|
5919
5226
|
var AlertDialogPortal2 = Portal22;
|
|
5920
|
-
var AlertDialogOverlay2 =
|
|
5227
|
+
var AlertDialogOverlay2 = React57.forwardRef((_a, ref) => {
|
|
5921
5228
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5922
|
-
return /* @__PURE__ */ (0,
|
|
5229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5923
5230
|
Overlay2,
|
|
5924
5231
|
__spreadProps(__spreadValues({
|
|
5925
5232
|
className: cn(
|
|
@@ -5932,11 +5239,11 @@ var AlertDialogOverlay2 = React59.forwardRef((_a, ref) => {
|
|
|
5932
5239
|
);
|
|
5933
5240
|
});
|
|
5934
5241
|
AlertDialogOverlay2.displayName = Overlay2.displayName;
|
|
5935
|
-
var AlertDialogContent2 =
|
|
5242
|
+
var AlertDialogContent2 = React57.forwardRef((_a, ref) => {
|
|
5936
5243
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5937
|
-
return /* @__PURE__ */ (0,
|
|
5938
|
-
/* @__PURE__ */ (0,
|
|
5939
|
-
/* @__PURE__ */ (0,
|
|
5244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(AlertDialogPortal2, { children: [
|
|
5245
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(AlertDialogOverlay2, {}),
|
|
5246
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5940
5247
|
Content2,
|
|
5941
5248
|
__spreadValues({
|
|
5942
5249
|
ref,
|
|
@@ -5955,7 +5262,7 @@ var AlertDialogHeader = (_a) => {
|
|
|
5955
5262
|
} = _b, props = __objRest(_b, [
|
|
5956
5263
|
"className"
|
|
5957
5264
|
]);
|
|
5958
|
-
return /* @__PURE__ */ (0,
|
|
5265
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5959
5266
|
"div",
|
|
5960
5267
|
__spreadValues({
|
|
5961
5268
|
className: cn(
|
|
@@ -5972,7 +5279,7 @@ var AlertDialogFooter = (_a) => {
|
|
|
5972
5279
|
} = _b, props = __objRest(_b, [
|
|
5973
5280
|
"className"
|
|
5974
5281
|
]);
|
|
5975
|
-
return /* @__PURE__ */ (0,
|
|
5282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5976
5283
|
"div",
|
|
5977
5284
|
__spreadValues({
|
|
5978
5285
|
className: cn(
|
|
@@ -5983,9 +5290,9 @@ var AlertDialogFooter = (_a) => {
|
|
|
5983
5290
|
);
|
|
5984
5291
|
};
|
|
5985
5292
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
5986
|
-
var AlertDialogTitle2 =
|
|
5293
|
+
var AlertDialogTitle2 = React57.forwardRef((_a, ref) => {
|
|
5987
5294
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5988
|
-
return /* @__PURE__ */ (0,
|
|
5295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
5989
5296
|
Title2,
|
|
5990
5297
|
__spreadValues({
|
|
5991
5298
|
ref,
|
|
@@ -5994,9 +5301,9 @@ var AlertDialogTitle2 = React59.forwardRef((_a, ref) => {
|
|
|
5994
5301
|
);
|
|
5995
5302
|
});
|
|
5996
5303
|
AlertDialogTitle2.displayName = Title2.displayName;
|
|
5997
|
-
var AlertDialogDescription2 =
|
|
5304
|
+
var AlertDialogDescription2 = React57.forwardRef((_a, ref) => {
|
|
5998
5305
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5999
|
-
return /* @__PURE__ */ (0,
|
|
5306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6000
5307
|
Description2,
|
|
6001
5308
|
__spreadValues({
|
|
6002
5309
|
ref,
|
|
@@ -6005,9 +5312,9 @@ var AlertDialogDescription2 = React59.forwardRef((_a, ref) => {
|
|
|
6005
5312
|
);
|
|
6006
5313
|
});
|
|
6007
5314
|
AlertDialogDescription2.displayName = Description2.displayName;
|
|
6008
|
-
var AlertDialogAction2 =
|
|
5315
|
+
var AlertDialogAction2 = React57.forwardRef((_a, ref) => {
|
|
6009
5316
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6010
|
-
return /* @__PURE__ */ (0,
|
|
5317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6011
5318
|
Action,
|
|
6012
5319
|
__spreadValues({
|
|
6013
5320
|
ref,
|
|
@@ -6016,9 +5323,9 @@ var AlertDialogAction2 = React59.forwardRef((_a, ref) => {
|
|
|
6016
5323
|
);
|
|
6017
5324
|
});
|
|
6018
5325
|
AlertDialogAction2.displayName = Action.displayName;
|
|
6019
|
-
var AlertDialogCancel2 =
|
|
5326
|
+
var AlertDialogCancel2 = React57.forwardRef((_a, ref) => {
|
|
6020
5327
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6021
|
-
return /* @__PURE__ */ (0,
|
|
5328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6022
5329
|
Cancel,
|
|
6023
5330
|
__spreadValues({
|
|
6024
5331
|
ref,
|
|
@@ -6033,7 +5340,7 @@ var AlertDialogCancel2 = React59.forwardRef((_a, ref) => {
|
|
|
6033
5340
|
AlertDialogCancel2.displayName = Cancel.displayName;
|
|
6034
5341
|
|
|
6035
5342
|
// src/main/ads-alert-dialog.tsx
|
|
6036
|
-
var
|
|
5343
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6037
5344
|
function AdsAlertDialog({
|
|
6038
5345
|
open,
|
|
6039
5346
|
onOpenChange,
|
|
@@ -6046,34 +5353,34 @@ function AdsAlertDialog({
|
|
|
6046
5353
|
confirmText,
|
|
6047
5354
|
onConfirm
|
|
6048
5355
|
}) {
|
|
6049
|
-
const [imgError, setImgError] = (0,
|
|
6050
|
-
return /* @__PURE__ */ (0,
|
|
5356
|
+
const [imgError, setImgError] = (0, import_react38.useState)(false);
|
|
5357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AlertDialog2, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
6051
5358
|
AlertDialogContent2,
|
|
6052
5359
|
{
|
|
6053
5360
|
className: "fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 bg-white dark:bg-neutral-900 rounded-2xl shadow-2xl border border-neutral-200 dark:border-neutral-700 max-w-md w-full min-w-[320px] p-4 flex flex-col items-stretch",
|
|
6054
5361
|
children: [
|
|
6055
|
-
/* @__PURE__ */ (0,
|
|
6056
|
-
/* @__PURE__ */ (0,
|
|
6057
|
-
/* @__PURE__ */ (0,
|
|
6058
|
-
/* @__PURE__ */ (0,
|
|
5362
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-row items-center justify-between mb-2", children: [
|
|
5363
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AlertDialogTitle2, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex flex-row items-center gap-1 min-w-0 text-xl font-semibold", children: [
|
|
5364
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.Info, { className: "w-5 h-5" }),
|
|
5365
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "truncate", children: title })
|
|
6059
5366
|
] }) }),
|
|
6060
|
-
/* @__PURE__ */ (0,
|
|
5367
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6061
5368
|
"button",
|
|
6062
5369
|
{
|
|
6063
5370
|
className: "text-neutral-400 hover:text-neutral-700 dark:hover:text-neutral-200 text-xl ml-4",
|
|
6064
5371
|
onClick: () => onOpenChange(false),
|
|
6065
5372
|
"aria-label": "Close",
|
|
6066
5373
|
tabIndex: 0,
|
|
6067
|
-
children: /* @__PURE__ */ (0,
|
|
5374
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.X, { className: "w-5 h-5" })
|
|
6068
5375
|
}
|
|
6069
5376
|
)
|
|
6070
5377
|
] }),
|
|
6071
|
-
/* @__PURE__ */ (0,
|
|
6072
|
-
imgSrc && /* @__PURE__ */ (0,
|
|
6073
|
-
/* @__PURE__ */ (0,
|
|
6074
|
-
/* @__PURE__ */ (0,
|
|
6075
|
-
] }) : imgHref ? /* @__PURE__ */ (0,
|
|
6076
|
-
|
|
5378
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AlertDialogDescription2, { className: "text-base font-medium text-neutral-800 dark:text-neutral-100 mb-2", children: description }),
|
|
5379
|
+
imgSrc && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "w-full max-w-[400px] h-[220px] relative flex items-center justify-center mb-2", children: imgError ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "absolute inset-0 flex flex-col items-center justify-center bg-gray-100 dark:bg-neutral-800 border border-dashed border-neutral-300 dark:border-neutral-700 rounded-lg text-neutral-400 text-sm", children: [
|
|
5380
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(globalLucideIcons.ImageOff, { className: "w-12 h-12 mb-2" }),
|
|
5381
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: "Image loading failed" })
|
|
5382
|
+
] }) : imgHref ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("a", { href: imgHref, target: "_blank", rel: "noopener noreferrer", className: "block w-full h-full", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5383
|
+
import_image.default,
|
|
6077
5384
|
{
|
|
6078
5385
|
src: imgSrc,
|
|
6079
5386
|
alt: "image",
|
|
@@ -6085,8 +5392,8 @@ function AdsAlertDialog({
|
|
|
6085
5392
|
onError: () => setImgError(true),
|
|
6086
5393
|
sizes: "(max-width: 400px) 100vw, 400px"
|
|
6087
5394
|
}
|
|
6088
|
-
) }) : /* @__PURE__ */ (0,
|
|
6089
|
-
|
|
5395
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
5396
|
+
import_image.default,
|
|
6090
5397
|
{
|
|
6091
5398
|
src: imgSrc,
|
|
6092
5399
|
alt: "image",
|
|
@@ -6099,8 +5406,8 @@ function AdsAlertDialog({
|
|
|
6099
5406
|
sizes: "(max-width: 400px) 100vw, 400px"
|
|
6100
5407
|
}
|
|
6101
5408
|
) }),
|
|
6102
|
-
(cancelText || confirmText) && /* @__PURE__ */ (0,
|
|
6103
|
-
cancelText && /* @__PURE__ */ (0,
|
|
5409
|
+
(cancelText || confirmText) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex justify-end gap-2 mt-2", children: [
|
|
5410
|
+
cancelText && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6104
5411
|
"button",
|
|
6105
5412
|
{
|
|
6106
5413
|
onClick: () => {
|
|
@@ -6111,7 +5418,7 @@ function AdsAlertDialog({
|
|
|
6111
5418
|
children: cancelText
|
|
6112
5419
|
}
|
|
6113
5420
|
),
|
|
6114
|
-
confirmText && /* @__PURE__ */ (0,
|
|
5421
|
+
confirmText && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6115
5422
|
AlertDialogAction2,
|
|
6116
5423
|
{
|
|
6117
5424
|
onClick: () => {
|
|
@@ -6129,14 +5436,14 @@ function AdsAlertDialog({
|
|
|
6129
5436
|
}
|
|
6130
5437
|
|
|
6131
5438
|
// src/main/x-button.tsx
|
|
6132
|
-
var
|
|
6133
|
-
var
|
|
5439
|
+
var import_react39 = require("react");
|
|
5440
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6134
5441
|
function XButton(props) {
|
|
6135
5442
|
var _a, _b;
|
|
6136
|
-
const [isLoading, setIsLoading] = (0,
|
|
6137
|
-
const [menuOpen, setMenuOpen] = (0,
|
|
6138
|
-
const menuRef = (0,
|
|
6139
|
-
(0,
|
|
5443
|
+
const [isLoading, setIsLoading] = (0, import_react39.useState)(false);
|
|
5444
|
+
const [menuOpen, setMenuOpen] = (0, import_react39.useState)(false);
|
|
5445
|
+
const menuRef = (0, import_react39.useRef)(null);
|
|
5446
|
+
(0, import_react39.useEffect)(() => {
|
|
6140
5447
|
if (props.type === "split") {
|
|
6141
5448
|
const handleClickOutside = (event) => {
|
|
6142
5449
|
if (menuRef.current && !menuRef.current.contains(event.target)) {
|
|
@@ -6168,19 +5475,19 @@ function XButton(props) {
|
|
|
6168
5475
|
const { button, loadingText: loadingText2, minWidth = "min-w-[110px]", className: className2 = "" } = props;
|
|
6169
5476
|
const isDisabled = button.disabled || isLoading;
|
|
6170
5477
|
const actualLoadingText2 = loadingText2 || ((_a = button.text) == null ? void 0 : _a.trim()) || "Loading...";
|
|
6171
|
-
return /* @__PURE__ */ (0,
|
|
5478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6172
5479
|
"button",
|
|
6173
5480
|
{
|
|
6174
5481
|
onClick: () => handleButtonClick(button.onClick),
|
|
6175
5482
|
disabled: isDisabled,
|
|
6176
5483
|
className: `${minWidth} ${baseButtonClass} rounded-full ${isDisabled ? disabledClass : ""} ${className2}`,
|
|
6177
5484
|
title: button.text,
|
|
6178
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
6179
|
-
/* @__PURE__ */ (0,
|
|
6180
|
-
/* @__PURE__ */ (0,
|
|
6181
|
-
] }) : /* @__PURE__ */ (0,
|
|
5485
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
5486
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.Loader2, { className: "w-5 h-5 mr-1 animate-spin" }),
|
|
5487
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: actualLoadingText2 })
|
|
5488
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
6182
5489
|
button.icon,
|
|
6183
|
-
/* @__PURE__ */ (0,
|
|
5490
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: button.text })
|
|
6184
5491
|
] })
|
|
6185
5492
|
}
|
|
6186
5493
|
);
|
|
@@ -6188,8 +5495,8 @@ function XButton(props) {
|
|
|
6188
5495
|
const { mainButton, menuItems, loadingText, menuWidth = "w-40", className = "", mainButtonClassName = "", dropdownButtonClassName = "" } = props;
|
|
6189
5496
|
const isMainDisabled = mainButton.disabled || isLoading;
|
|
6190
5497
|
const actualLoadingText = loadingText || ((_b = mainButton.text) == null ? void 0 : _b.trim()) || "Loading...";
|
|
6191
|
-
return /* @__PURE__ */ (0,
|
|
6192
|
-
/* @__PURE__ */ (0,
|
|
5498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: `relative flex bg-neutral-200 dark:bg-neutral-800 rounded-full ${className}`, children: [
|
|
5499
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6193
5500
|
"button",
|
|
6194
5501
|
{
|
|
6195
5502
|
onClick: () => handleButtonClick(mainButton.onClick),
|
|
@@ -6199,16 +5506,16 @@ function XButton(props) {
|
|
|
6199
5506
|
if (e.button === 2) e.preventDefault();
|
|
6200
5507
|
},
|
|
6201
5508
|
style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
|
|
6202
|
-
children: isLoading ? /* @__PURE__ */ (0,
|
|
6203
|
-
/* @__PURE__ */ (0,
|
|
6204
|
-
/* @__PURE__ */ (0,
|
|
6205
|
-
] }) : /* @__PURE__ */ (0,
|
|
5509
|
+
children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
5510
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.Loader2, { className: "w-5 h-5 mr-1 animate-spin" }),
|
|
5511
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: actualLoadingText })
|
|
5512
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
6206
5513
|
mainButton.icon,
|
|
6207
|
-
/* @__PURE__ */ (0,
|
|
5514
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: mainButton.text })
|
|
6208
5515
|
] })
|
|
6209
5516
|
}
|
|
6210
5517
|
),
|
|
6211
|
-
/* @__PURE__ */ (0,
|
|
5518
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6212
5519
|
"span",
|
|
6213
5520
|
{
|
|
6214
5521
|
className: `flex items-center justify-center w-10 py-2 cursor-pointer transition hover:bg-neutral-300 dark:hover:bg-neutral-700 rounded-r-full ${dropdownButtonClassName}`,
|
|
@@ -6218,15 +5525,15 @@ function XButton(props) {
|
|
|
6218
5525
|
},
|
|
6219
5526
|
tabIndex: 0,
|
|
6220
5527
|
style: { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 },
|
|
6221
|
-
children: /* @__PURE__ */ (0,
|
|
5528
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(globalLucideIcons.ChevronDown, { className: "w-6 h-6" })
|
|
6222
5529
|
}
|
|
6223
5530
|
),
|
|
6224
|
-
menuOpen && /* @__PURE__ */ (0,
|
|
5531
|
+
menuOpen && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6225
5532
|
"div",
|
|
6226
5533
|
{
|
|
6227
5534
|
ref: menuRef,
|
|
6228
5535
|
className: `absolute right-0 top-full ${menuWidth} bg-white dark:bg-neutral-800 text-neutral-800 dark:text-white text-sm rounded-xl shadow-lg z-50 border border-neutral-200 dark:border-neutral-700 overflow-hidden animate-fade-in`,
|
|
6229
|
-
children: menuItems.map((item, index) => /* @__PURE__ */ (0,
|
|
5536
|
+
children: menuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
6230
5537
|
"button",
|
|
6231
5538
|
{
|
|
6232
5539
|
onClick: () => {
|
|
@@ -6237,11 +5544,11 @@ function XButton(props) {
|
|
|
6237
5544
|
className: `flex items-center w-full px-4 py-3 transition hover:bg-neutral-300 dark:hover:bg-neutral-600 text-left relative ${item.disabled ? disabledClass : ""}`,
|
|
6238
5545
|
style: item.splitTopBorder ? { borderTop: "1px solid #AC62FD" } : void 0,
|
|
6239
5546
|
children: [
|
|
6240
|
-
/* @__PURE__ */ (0,
|
|
5547
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { className: "flex items-center", children: [
|
|
6241
5548
|
item.icon,
|
|
6242
|
-
/* @__PURE__ */ (0,
|
|
5549
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: item.text })
|
|
6243
5550
|
] }),
|
|
6244
|
-
item.tag && /* @__PURE__ */ (0,
|
|
5551
|
+
item.tag && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6245
5552
|
"span",
|
|
6246
5553
|
{
|
|
6247
5554
|
className: "absolute right-3 top-1 text-[10px] font-semibold",
|
|
@@ -6259,8 +5566,8 @@ function XButton(props) {
|
|
|
6259
5566
|
}
|
|
6260
5567
|
|
|
6261
5568
|
// src/main/ai-prompt-textarea.tsx
|
|
6262
|
-
var
|
|
6263
|
-
var
|
|
5569
|
+
var import_react40 = require("react");
|
|
5570
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6264
5571
|
function AIPromptTextarea({
|
|
6265
5572
|
value,
|
|
6266
5573
|
onChange,
|
|
@@ -6280,7 +5587,7 @@ function AIPromptTextarea({
|
|
|
6280
5587
|
description,
|
|
6281
5588
|
embed = false
|
|
6282
5589
|
}) {
|
|
6283
|
-
const textareaRef = (0,
|
|
5590
|
+
const textareaRef = (0, import_react40.useRef)(null);
|
|
6284
5591
|
const wordArray = value.trim().split(/\s+/).filter(Boolean);
|
|
6285
5592
|
const wordCount = wordArray.length;
|
|
6286
5593
|
const adjustTextareaHeight = () => {
|
|
@@ -6308,7 +5615,7 @@ function AIPromptTextarea({
|
|
|
6308
5615
|
}
|
|
6309
5616
|
}
|
|
6310
5617
|
};
|
|
6311
|
-
(0,
|
|
5618
|
+
(0, import_react40.useEffect)(() => {
|
|
6312
5619
|
const timer = setTimeout(() => {
|
|
6313
5620
|
adjustTextareaHeight();
|
|
6314
5621
|
}, 0);
|
|
@@ -6348,12 +5655,12 @@ function AIPromptTextarea({
|
|
|
6348
5655
|
};
|
|
6349
5656
|
const renderTitle = () => {
|
|
6350
5657
|
if (!(title == null ? void 0 : title.trim())) return null;
|
|
6351
|
-
return /* @__PURE__ */ (0,
|
|
6352
|
-
title && /* @__PURE__ */ (0,
|
|
6353
|
-
(description == null ? void 0 : description.trim()) && /* @__PURE__ */ (0,
|
|
5658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "space-y-1", children: [
|
|
5659
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xl font-semibold text-foreground", children: title }),
|
|
5660
|
+
(description == null ? void 0 : description.trim()) && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-sm text-gray-400 ml-2", children: description })
|
|
6354
5661
|
] });
|
|
6355
5662
|
};
|
|
6356
|
-
const renderTextarea = (isEmbedded = false) => /* @__PURE__ */ (0,
|
|
5663
|
+
const renderTextarea = (isEmbedded = false) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6357
5664
|
"textarea",
|
|
6358
5665
|
{
|
|
6359
5666
|
ref: textareaRef,
|
|
@@ -6372,7 +5679,7 @@ function AIPromptTextarea({
|
|
|
6372
5679
|
);
|
|
6373
5680
|
const renderWordCount = () => {
|
|
6374
5681
|
if (!showWordCount) return null;
|
|
6375
|
-
return /* @__PURE__ */ (0,
|
|
5682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "flex justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
6376
5683
|
"span",
|
|
6377
5684
|
{
|
|
6378
5685
|
className: `text-sm ${wordCount >= maxWords ? "text-red-500" : wordCount > maxWords * 0.75 ? "text-orange-500" : "text-muted-foreground"} ${isWordLimit ? "animate-bounce" : ""}`,
|
|
@@ -6388,37 +5695,54 @@ function AIPromptTextarea({
|
|
|
6388
5695
|
) });
|
|
6389
5696
|
};
|
|
6390
5697
|
if (embed && title) {
|
|
6391
|
-
return /* @__PURE__ */ (0,
|
|
6392
|
-
/* @__PURE__ */ (0,
|
|
6393
|
-
/* @__PURE__ */ (0,
|
|
6394
|
-
/* @__PURE__ */ (0,
|
|
6395
|
-
/* @__PURE__ */ (0,
|
|
5698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "space-y-2", children: [
|
|
5699
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "border-2 border-border rounded-lg bg-transparent", children: [
|
|
5700
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "p-4 pb-2", children: renderTitle() }),
|
|
5701
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("hr", { className: "border-t-1 border-border" }),
|
|
5702
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "p-1", children: renderTextarea(true) })
|
|
6396
5703
|
] }),
|
|
6397
5704
|
renderWordCount()
|
|
6398
5705
|
] });
|
|
6399
5706
|
}
|
|
6400
|
-
return /* @__PURE__ */ (0,
|
|
5707
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "space-y-2", children: [
|
|
6401
5708
|
renderTitle(),
|
|
6402
5709
|
renderTextarea(),
|
|
6403
5710
|
renderWordCount()
|
|
6404
5711
|
] });
|
|
6405
5712
|
}
|
|
5713
|
+
|
|
5714
|
+
// src/main/rich-text-expert.tsx
|
|
5715
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5716
|
+
var defaultTagRenderers = {
|
|
5717
|
+
// text Stong
|
|
5718
|
+
strong: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("strong", { children: chunks }),
|
|
5719
|
+
// text Emphasis
|
|
5720
|
+
em: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("em", { children: chunks }),
|
|
5721
|
+
// text Underline
|
|
5722
|
+
u: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("u", { children: chunks }),
|
|
5723
|
+
// text Mark
|
|
5724
|
+
mark: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("mark", { className: "bg-purple-300 dark:bg-purple-500 text-neutral-800 dark:text-neutral-300 px-1 rounded", children: chunks }),
|
|
5725
|
+
// text Delete
|
|
5726
|
+
del: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("del", { children: chunks }),
|
|
5727
|
+
// text Subscript
|
|
5728
|
+
sub: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("sub", { children: chunks }),
|
|
5729
|
+
// text Superscript
|
|
5730
|
+
sup: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("sup", { children: chunks })
|
|
5731
|
+
};
|
|
5732
|
+
function createRichTextRenderer(customRenderers) {
|
|
5733
|
+
const renderers = __spreadValues(__spreadValues({}, defaultTagRenderers), customRenderers);
|
|
5734
|
+
return function richText2(t, key) {
|
|
5735
|
+
return t.rich(key, renderers);
|
|
5736
|
+
};
|
|
5737
|
+
}
|
|
5738
|
+
var richText = createRichTextRenderer();
|
|
6406
5739
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6407
5740
|
0 && (module.exports = {
|
|
6408
5741
|
AIPromptTextarea,
|
|
6409
5742
|
AdsAlertDialog,
|
|
6410
|
-
CTA,
|
|
6411
|
-
FAQ,
|
|
6412
|
-
Features,
|
|
6413
|
-
Footer,
|
|
6414
|
-
Gallery,
|
|
6415
5743
|
GoToTop,
|
|
6416
5744
|
Loading,
|
|
6417
5745
|
NProgressBar,
|
|
6418
|
-
PricePlan,
|
|
6419
|
-
SeoContent,
|
|
6420
|
-
Tips,
|
|
6421
|
-
Usage,
|
|
6422
5746
|
XButton,
|
|
6423
5747
|
createRichTextRenderer,
|
|
6424
5748
|
richText
|