@mdxui/cockpit 2.1.1 → 7.0.5

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/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/developer/index.ts
2
- import { useAuth as useAuth10 } from "@workos-inc/authkit-react";
2
+ import { useAuth as useAuth9 } from "@mdxui/auth";
3
3
  import {
4
4
  themePresets,
5
5
  themeNames,
@@ -132,7 +132,7 @@ function AreaChart({
132
132
  }
133
133
  ),
134
134
  /* @__PURE__ */ jsx2(ChartTooltip, { content: /* @__PURE__ */ jsx2(ChartTooltipContent, {}) }),
135
- yAxisKeys.map((key, index) => /* @__PURE__ */ jsx2(
135
+ yAxisKeys.map((key) => /* @__PURE__ */ jsx2(
136
136
  Area,
137
137
  {
138
138
  type: "monotone",
@@ -669,8 +669,8 @@ function LineChart({
669
669
  }
670
670
 
671
671
  // src/developer/components/layout/dashboard-layout.tsx
672
+ import { useAuth as useAuth2 } from "@mdxui/auth";
672
673
  import { DashboardShell } from "@mdxui/primitives/dashboard-shell";
673
- import { useAuth as useAuth2 } from "@workos-inc/authkit-react";
674
674
  import {
675
675
  Activity,
676
676
  BarChart3,
@@ -855,9 +855,8 @@ function SidebarAd({ headline, description, ctaText, ctaHref, onCtaClick, dismis
855
855
  }
856
856
 
857
857
  // src/developer/components/widgets/team-switcher.tsx
858
+ import { OrganizationSwitcher, useAuth } from "@mdxui/auth";
858
859
  import { SidebarMenu, SidebarMenuButton, SidebarMenuItem } from "@mdxui/primitives/sidebar";
859
- import { useAuth } from "@workos-inc/authkit-react";
860
- import { OrganizationSwitcher } from "@workos-inc/widgets";
861
860
  import { Building2 } from "lucide-react";
862
861
  import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
863
862
  function TeamSwitcher() {
@@ -865,7 +864,16 @@ function TeamSwitcher() {
865
864
  if (!organizationId) {
866
865
  return /* @__PURE__ */ jsx11(TeamSwitcherNone, {});
867
866
  }
868
- return /* @__PURE__ */ jsx11(SidebarMenu, { children: /* @__PURE__ */ jsx11(SidebarMenuItem, { children: /* @__PURE__ */ jsx11("div", { className: "organization-switcher-wrapper", children: /* @__PURE__ */ jsx11(OrganizationSwitcher, { authToken: getAccessToken, switchToOrganization }) }) }) });
867
+ const handleSwitchOrganization = ({ organizationId: organizationId2 }) => {
868
+ return switchToOrganization({ organizationId: organizationId2 });
869
+ };
870
+ return /* @__PURE__ */ jsx11(SidebarMenu, { children: /* @__PURE__ */ jsx11(SidebarMenuItem, { children: /* @__PURE__ */ jsx11("div", { className: "organization-switcher-wrapper", children: /* @__PURE__ */ jsx11(
871
+ OrganizationSwitcher,
872
+ {
873
+ authToken: getAccessToken,
874
+ switchToOrganization: handleSwitchOrganization
875
+ }
876
+ ) }) }) });
869
877
  }
870
878
  function TeamSwitcherNone() {
871
879
  return /* @__PURE__ */ jsx11(SidebarMenu, { children: /* @__PURE__ */ jsx11(SidebarMenuItem, { children: /* @__PURE__ */ jsxs9(SidebarMenuButton, { size: "lg", className: "pointer-events-none", children: [
@@ -1059,8 +1067,8 @@ function DashboardLayout() {
1059
1067
  }
1060
1068
 
1061
1069
  // src/developer/components/layout/landing-page.tsx
1070
+ import { useAuth as useAuth3 } from "@mdxui/auth";
1062
1071
  import { Button as Button2 } from "@mdxui/primitives/button";
1063
- import { useAuth as useAuth3 } from "@workos-inc/authkit-react";
1064
1072
  import { ArrowRight, BarChart3 as BarChart32, Key as Key2, Shield, Users as Users2 } from "lucide-react";
1065
1073
  import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
1066
1074
  function FeatureCard({ icon, title, description }) {
@@ -2037,7 +2045,7 @@ function APIKeyManager({
2037
2045
  year: "numeric"
2038
2046
  }).format(date);
2039
2047
  };
2040
- const maskKey2 = (key, prefix) => {
2048
+ const maskKey2 = (_key, prefix) => {
2041
2049
  return `${prefix}${"\u2022".repeat(20)}`;
2042
2050
  };
2043
2051
  return /* @__PURE__ */ jsx26("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs22(Card10, { children: [
@@ -2818,7 +2826,7 @@ var dashboardIcons = {
2818
2826
 
2819
2827
  // src/developer/providers/app-providers.tsx
2820
2828
  import { ThemeProvider } from "next-themes";
2821
- import { useEffect as useEffect6 } from "react";
2829
+ import { useEffect as useEffect5 } from "react";
2822
2830
 
2823
2831
  // src/developer/lib/platform.ts
2824
2832
  import { createSDK } from "platform.do";
@@ -2930,51 +2938,8 @@ if (typeof window !== "undefined") {
2930
2938
  }
2931
2939
 
2932
2940
  // src/developer/providers/identity-provider.tsx
2933
- import { AuthKitProvider } from "@workos-inc/authkit-react";
2934
- import { WorkOsWidgets } from "@workos-inc/widgets";
2935
- import { useEffect as useEffect4, useState as useState12 } from "react";
2941
+ import { IdentityProvider as AuthIdentityProvider, WidgetsProvider } from "@mdxui/auth";
2936
2942
  import { jsx as jsx29 } from "react/jsx-runtime";
2937
- function IdentityWidgetsWrapper({ children }) {
2938
- const [mounted, setMounted] = useState12(false);
2939
- const [isDark, setIsDark] = useState12(false);
2940
- useEffect4(() => {
2941
- setMounted(true);
2942
- const checkDarkMode = () => {
2943
- const isDarkClass = document.documentElement.classList.contains("dark");
2944
- const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
2945
- setIsDark(isDarkClass || !document.documentElement.classList.contains("light") && prefersDark);
2946
- };
2947
- checkDarkMode();
2948
- const observer = new MutationObserver(checkDarkMode);
2949
- observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class"] });
2950
- const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
2951
- mediaQuery.addEventListener("change", checkDarkMode);
2952
- return () => {
2953
- observer.disconnect();
2954
- mediaQuery.removeEventListener("change", checkDarkMode);
2955
- };
2956
- }, []);
2957
- const appearance = mounted ? isDark ? "dark" : "light" : "inherit";
2958
- return /* @__PURE__ */ jsx29(
2959
- WorkOsWidgets,
2960
- {
2961
- theme: {
2962
- appearance,
2963
- radius: "medium",
2964
- scaling: "100%"
2965
- },
2966
- elements: {
2967
- primaryButton: {
2968
- variant: "solid"
2969
- },
2970
- secondaryButton: {
2971
- variant: "outline"
2972
- }
2973
- },
2974
- children
2975
- }
2976
- );
2977
- }
2978
2943
  function IdentityProvider({ children }) {
2979
2944
  const { config } = useDashboard();
2980
2945
  const { identity } = config;
@@ -2988,23 +2953,23 @@ function IdentityProvider({ children }) {
2988
2953
  }
2989
2954
  };
2990
2955
  return /* @__PURE__ */ jsx29(
2991
- AuthKitProvider,
2956
+ AuthIdentityProvider,
2992
2957
  {
2993
2958
  clientId: identity.clientId,
2994
2959
  apiHostname: identity.apiHostname,
2995
2960
  devMode: identity.devMode,
2996
2961
  redirectUri,
2997
2962
  onRedirectCallback,
2998
- children: /* @__PURE__ */ jsx29(IdentityWidgetsWrapper, { children })
2963
+ children
2999
2964
  }
3000
2965
  );
3001
2966
  }
3002
2967
 
3003
2968
  // src/developer/providers/query-provider.tsx
2969
+ import { useAuth as useAuth4 } from "@mdxui/auth";
3004
2970
  import { QueryClientProvider } from "@tanstack/react-query";
3005
2971
  import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
3006
- import { useAuth as useAuth4 } from "@workos-inc/authkit-react";
3007
- import { useEffect as useEffect5 } from "react";
2972
+ import { useEffect as useEffect4 } from "react";
3008
2973
 
3009
2974
  // src/developer/lib/query-client.ts
3010
2975
  import { QueryClient } from "@tanstack/react-query";
@@ -3025,7 +2990,7 @@ var queryClient = new QueryClient({
3025
2990
  import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
3026
2991
  function AuthSync({ children }) {
3027
2992
  const { user, getAccessToken } = useAuth4();
3028
- useEffect5(() => {
2993
+ useEffect4(() => {
3029
2994
  async function syncToken() {
3030
2995
  if (user) {
3031
2996
  try {
@@ -3053,7 +3018,7 @@ function QueryProvider({ children }) {
3053
3018
  // src/developer/providers/app-providers.tsx
3054
3019
  import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
3055
3020
  function SDKInitializer({ config }) {
3056
- useEffect6(() => {
3021
+ useEffect5(() => {
3057
3022
  if (config.debug) {
3058
3023
  setDebugMode(true);
3059
3024
  }
@@ -3081,42 +3046,25 @@ function AppProviders({ config, children }) {
3081
3046
  }
3082
3047
 
3083
3048
  // src/developer/providers/auth-gate.tsx
3084
- import { useAuth as useAuth5 } from "@workos-inc/authkit-react";
3085
- import { Fragment as Fragment6, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
3049
+ import { AuthGate as AuthAuthGate } from "@mdxui/auth";
3050
+ import { jsx as jsx32 } from "react/jsx-runtime";
3086
3051
  function AuthGate({ children }) {
3087
3052
  const { config } = useDashboard();
3088
- const { user, isLoading } = useAuth5();
3089
3053
  const { identity } = config;
3090
- const required = identity.required ?? true;
3091
- const onUnauthenticated = identity.onUnauthenticated ?? "landing";
3092
- if (!required) {
3093
- return /* @__PURE__ */ jsx32(Fragment6, { children });
3094
- }
3095
- if (isLoading) {
3096
- return /* @__PURE__ */ jsx32("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center gap-4", children: [
3097
- /* @__PURE__ */ jsx32("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }),
3098
- /* @__PURE__ */ jsx32("p", { className: "text-sm text-muted-foreground", children: "Loading..." })
3099
- ] }) });
3100
- }
3101
- if (user) {
3102
- return /* @__PURE__ */ jsx32(Fragment6, { children });
3103
- }
3104
- switch (onUnauthenticated) {
3105
- case "redirect":
3106
- if (identity.unauthenticatedRedirectUrl && typeof window !== "undefined") {
3107
- window.location.href = identity.unauthenticatedRedirectUrl;
3108
- return /* @__PURE__ */ jsx32("div", { className: "min-h-screen bg-background flex items-center justify-center", children: /* @__PURE__ */ jsx32("p", { className: "text-sm text-muted-foreground", children: "Redirecting..." }) });
3109
- }
3110
- return identity.landingComponent ? identity.landingComponent : /* @__PURE__ */ jsx32(LandingPage, {});
3111
- case "allow":
3112
- return /* @__PURE__ */ jsx32(Fragment6, { children });
3113
- case "landing":
3114
- return identity.landingComponent ? identity.landingComponent : /* @__PURE__ */ jsx32(LandingPage, {});
3115
- }
3054
+ return /* @__PURE__ */ jsx32(
3055
+ AuthAuthGate,
3056
+ {
3057
+ required: identity.required ?? true,
3058
+ onUnauthenticated: identity.onUnauthenticated ?? "landing",
3059
+ redirectUrl: identity.unauthenticatedRedirectUrl,
3060
+ landingComponent: identity.landingComponent ?? /* @__PURE__ */ jsx32(LandingPage, {}),
3061
+ children
3062
+ }
3063
+ );
3116
3064
  }
3117
3065
 
3118
3066
  // src/developer/router.tsx
3119
- import { useEffect as useEffect9 } from "react";
3067
+ import { useEffect as useEffect8 } from "react";
3120
3068
  import { BrowserRouter, MemoryRouter, Navigate, Route, Routes, useLocation as useLocation2 } from "react-router-dom";
3121
3069
 
3122
3070
  // src/developer/pages/billing.tsx
@@ -3131,7 +3079,7 @@ import { SidebarTrigger } from "@mdxui/primitives/sidebar";
3131
3079
  import { Switch } from "@mdxui/primitives/switch";
3132
3080
  import { Table as Table6, TableBody as TableBody6, TableCell as TableCell6, TableHead as TableHead6, TableHeader as TableHeader6, TableRow as TableRow6 } from "@mdxui/primitives/table";
3133
3081
  import { Bell, Check as Check2, CreditCard as CreditCard3, Download as Download2, FileText as FileText2, Receipt } from "lucide-react";
3134
- import { useState as useState13 } from "react";
3082
+ import { useState as useState12 } from "react";
3135
3083
  import { toast as toast4 } from "sonner";
3136
3084
 
3137
3085
  // src/developer/lib/mock-data.ts
@@ -3701,7 +3649,7 @@ var mockWebhookActivity = {
3701
3649
  };
3702
3650
 
3703
3651
  // src/developer/pages/billing.tsx
3704
- import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
3652
+ import { Fragment as Fragment6, jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
3705
3653
  function formatRelativeDate(dateString) {
3706
3654
  const date = new Date(dateString);
3707
3655
  return date.toLocaleDateString("en-US", {
@@ -3734,7 +3682,7 @@ function BillingPage({
3734
3682
  className
3735
3683
  } = {}) {
3736
3684
  const billingData = initialBillingData ?? mockBillingData;
3737
- const [alertsEnabled, setAlertsEnabled] = useState13(billingData.billingAlerts.enabled);
3685
+ const [alertsEnabled, setAlertsEnabled] = useState12(billingData.billingAlerts.enabled);
3738
3686
  const handleManagePlan = async () => {
3739
3687
  if (onManagePlan) {
3740
3688
  try {
@@ -3787,50 +3735,50 @@ function BillingPage({
3787
3735
  description: enabled ? `You'll be notified when usage reaches ${billingData.billingAlerts.threshold}%.` : "You won't receive usage alerts."
3788
3736
  });
3789
3737
  };
3790
- return /* @__PURE__ */ jsxs28(Fragment7, { children: [
3791
- !hideHeader && /* @__PURE__ */ jsx33("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2 px-4", children: [
3738
+ return /* @__PURE__ */ jsxs27(Fragment6, { children: [
3739
+ !hideHeader && /* @__PURE__ */ jsx33("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2 px-4", children: [
3792
3740
  /* @__PURE__ */ jsx33(SidebarTrigger, { className: "-ml-1" }),
3793
3741
  /* @__PURE__ */ jsx33(Separator3, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
3794
3742
  /* @__PURE__ */ jsx33(Breadcrumb, { children: /* @__PURE__ */ jsx33(BreadcrumbList, { children: /* @__PURE__ */ jsx33(BreadcrumbItem, { children: /* @__PURE__ */ jsx33(BreadcrumbPage, { children: "Billing" }) }) }) })
3795
3743
  ] }) }),
3796
- /* @__PURE__ */ jsxs28("div", { className: `flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 ${hideHeader ? "" : "pt-0"} ${className ?? ""}`, children: [
3797
- /* @__PURE__ */ jsx33("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxs28("div", { children: [
3744
+ /* @__PURE__ */ jsxs27("div", { className: `flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 ${hideHeader ? "" : "pt-0"} ${className ?? ""}`, children: [
3745
+ /* @__PURE__ */ jsx33("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxs27("div", { children: [
3798
3746
  /* @__PURE__ */ jsx33("h1", { className: "text-2xl font-bold", children: "Billing" }),
3799
3747
  /* @__PURE__ */ jsx33("p", { className: "text-muted-foreground", children: "Manage your subscription and billing information." })
3800
3748
  ] }) }),
3801
- /* @__PURE__ */ jsxs28("div", { className: "grid gap-4 md:grid-cols-2", children: [
3802
- /* @__PURE__ */ jsxs28(Card13, { children: [
3803
- /* @__PURE__ */ jsxs28(CardHeader12, { children: [
3804
- /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
3749
+ /* @__PURE__ */ jsxs27("div", { className: "grid gap-4 md:grid-cols-2", children: [
3750
+ /* @__PURE__ */ jsxs27(Card13, { children: [
3751
+ /* @__PURE__ */ jsxs27(CardHeader12, { children: [
3752
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between", children: [
3805
3753
  /* @__PURE__ */ jsx33(CardTitle12, { children: "Current Plan" }),
3806
3754
  /* @__PURE__ */ jsx33(Badge6, { variant: billingData.status === "active" ? "default" : "secondary", children: billingData.status })
3807
3755
  ] }),
3808
- /* @__PURE__ */ jsxs28(CardDescription11, { children: [
3756
+ /* @__PURE__ */ jsxs27(CardDescription11, { children: [
3809
3757
  "Renews",
3810
3758
  " ",
3811
3759
  new Date(billingData.renewalDate).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric" })
3812
3760
  ] })
3813
3761
  ] }),
3814
- /* @__PURE__ */ jsxs28(CardContent12, { className: "space-y-4", children: [
3815
- /* @__PURE__ */ jsxs28("div", { className: "flex items-baseline gap-2", children: [
3762
+ /* @__PURE__ */ jsxs27(CardContent12, { className: "space-y-4", children: [
3763
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-baseline gap-2", children: [
3816
3764
  /* @__PURE__ */ jsx33("p", { className: "text-3xl font-bold", children: billingData.plan }),
3817
- /* @__PURE__ */ jsxs28("p", { className: "text-lg text-muted-foreground", children: [
3765
+ /* @__PURE__ */ jsxs27("p", { className: "text-lg text-muted-foreground", children: [
3818
3766
  "$",
3819
3767
  billingData.planPrice.toFixed(0),
3820
3768
  "/mo"
3821
3769
  ] })
3822
3770
  ] }),
3823
- /* @__PURE__ */ jsx33("div", { className: "space-y-2", children: billingData.planFeatures.map((feature) => /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
3771
+ /* @__PURE__ */ jsx33("div", { className: "space-y-2", children: billingData.planFeatures.map((feature) => /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
3824
3772
  /* @__PURE__ */ jsx33(Check2, { className: "h-4 w-4 text-primary" }),
3825
3773
  feature
3826
3774
  ] }, feature)) }),
3827
3775
  /* @__PURE__ */ jsx33(Button12, { variant: "outline", size: "sm", className: "w-full", onClick: handleManagePlan, children: "Manage Plan" })
3828
3776
  ] })
3829
3777
  ] }),
3830
- /* @__PURE__ */ jsxs28(Card13, { children: [
3778
+ /* @__PURE__ */ jsxs27(Card13, { children: [
3831
3779
  /* @__PURE__ */ jsx33(CardHeader12, { children: /* @__PURE__ */ jsx33(CardTitle12, { children: "Total Spend" }) }),
3832
- /* @__PURE__ */ jsxs28(CardContent12, { className: "space-y-1", children: [
3833
- /* @__PURE__ */ jsxs28("p", { className: "text-3xl font-bold", children: [
3780
+ /* @__PURE__ */ jsxs27(CardContent12, { className: "space-y-1", children: [
3781
+ /* @__PURE__ */ jsxs27("p", { className: "text-3xl font-bold", children: [
3834
3782
  "$",
3835
3783
  billingData.totalSpend.toFixed(2)
3836
3784
  ] }),
@@ -3838,31 +3786,31 @@ function BillingPage({
3838
3786
  ] })
3839
3787
  ] })
3840
3788
  ] }),
3841
- /* @__PURE__ */ jsxs28("div", { className: "grid gap-4 md:grid-cols-2", children: [
3842
- /* @__PURE__ */ jsxs28(Card13, { className: "md:row-span-2", children: [
3843
- /* @__PURE__ */ jsxs28(CardHeader12, { children: [
3789
+ /* @__PURE__ */ jsxs27("div", { className: "grid gap-4 md:grid-cols-2", children: [
3790
+ /* @__PURE__ */ jsxs27(Card13, { className: "md:row-span-2", children: [
3791
+ /* @__PURE__ */ jsxs27(CardHeader12, { children: [
3844
3792
  /* @__PURE__ */ jsx33(CardTitle12, { children: "Usage Breakdown" }),
3845
3793
  /* @__PURE__ */ jsx33(CardDescription11, { children: "Resource usage for the current billing period" })
3846
3794
  ] }),
3847
3795
  /* @__PURE__ */ jsx33(CardContent12, { className: "space-y-6", children: billingData.usageBreakdown.map((item) => {
3848
3796
  const percentage = getUsagePercentage(item.usage, item.limit);
3849
3797
  const colorClass = getUsageColor(percentage);
3850
- return /* @__PURE__ */ jsxs28("div", { className: "space-y-2", children: [
3851
- /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
3852
- /* @__PURE__ */ jsxs28("div", { children: [
3798
+ return /* @__PURE__ */ jsxs27("div", { className: "space-y-2", children: [
3799
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between", children: [
3800
+ /* @__PURE__ */ jsxs27("div", { children: [
3853
3801
  /* @__PURE__ */ jsx33("p", { className: "font-medium", children: item.resource }),
3854
- /* @__PURE__ */ jsxs28("p", { className: "text-sm text-muted-foreground", children: [
3802
+ /* @__PURE__ */ jsxs27("p", { className: "text-sm text-muted-foreground", children: [
3855
3803
  formatUsage(item.usage, item.unit),
3856
3804
  " of ",
3857
3805
  formatUsage(item.limit, item.unit)
3858
3806
  ] })
3859
3807
  ] }),
3860
- /* @__PURE__ */ jsxs28("div", { className: "text-right", children: [
3861
- /* @__PURE__ */ jsxs28("p", { className: "font-medium", children: [
3808
+ /* @__PURE__ */ jsxs27("div", { className: "text-right", children: [
3809
+ /* @__PURE__ */ jsxs27("p", { className: "font-medium", children: [
3862
3810
  "$",
3863
3811
  item.cost.toFixed(2)
3864
3812
  ] }),
3865
- /* @__PURE__ */ jsxs28("p", { className: "text-sm text-muted-foreground", children: [
3813
+ /* @__PURE__ */ jsxs27("p", { className: "text-sm text-muted-foreground", children: [
3866
3814
  percentage.toFixed(0),
3867
3815
  "% used"
3868
3816
  ] })
@@ -3872,21 +3820,21 @@ function BillingPage({
3872
3820
  ] }, item.resource);
3873
3821
  }) })
3874
3822
  ] }),
3875
- /* @__PURE__ */ jsxs28(Card13, { children: [
3876
- /* @__PURE__ */ jsx33(CardHeader12, { className: "pb-3", children: /* @__PURE__ */ jsxs28(CardTitle12, { className: "flex items-center gap-2 text-base", children: [
3823
+ /* @__PURE__ */ jsxs27(Card13, { children: [
3824
+ /* @__PURE__ */ jsx33(CardHeader12, { className: "pb-3", children: /* @__PURE__ */ jsxs27(CardTitle12, { className: "flex items-center gap-2 text-base", children: [
3877
3825
  /* @__PURE__ */ jsx33(CreditCard3, { className: "h-4 w-4" }),
3878
3826
  "Payment Method"
3879
3827
  ] }) }),
3880
- /* @__PURE__ */ jsxs28(CardContent12, { className: "space-y-3", children: [
3881
- /* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between p-3 border rounded-md", children: [
3882
- /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-3", children: [
3828
+ /* @__PURE__ */ jsxs27(CardContent12, { className: "space-y-3", children: [
3829
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between p-3 border rounded-md", children: [
3830
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-3", children: [
3883
3831
  /* @__PURE__ */ jsx33("div", { className: "h-8 w-12 bg-muted rounded flex items-center justify-center text-xs font-medium", children: billingData.paymentMethod.brand }),
3884
- /* @__PURE__ */ jsxs28("div", { children: [
3885
- /* @__PURE__ */ jsxs28("p", { className: "font-medium text-sm", children: [
3832
+ /* @__PURE__ */ jsxs27("div", { children: [
3833
+ /* @__PURE__ */ jsxs27("p", { className: "font-medium text-sm", children: [
3886
3834
  "\u2022\u2022\u2022\u2022 ",
3887
3835
  billingData.paymentMethod.last4
3888
3836
  ] }),
3889
- /* @__PURE__ */ jsxs28("p", { className: "text-xs text-muted-foreground", children: [
3837
+ /* @__PURE__ */ jsxs27("p", { className: "text-xs text-muted-foreground", children: [
3890
3838
  "Expires ",
3891
3839
  billingData.paymentMethod.expiryMonth,
3892
3840
  "/",
@@ -3899,15 +3847,15 @@ function BillingPage({
3899
3847
  /* @__PURE__ */ jsx33(Button12, { variant: "outline", size: "sm", className: "w-full", onClick: handleUpdatePaymentMethod, children: "Update" })
3900
3848
  ] })
3901
3849
  ] }),
3902
- /* @__PURE__ */ jsxs28(Card13, { children: [
3903
- /* @__PURE__ */ jsx33(CardHeader12, { className: "pb-3", children: /* @__PURE__ */ jsxs28(CardTitle12, { className: "flex items-center gap-2 text-base", children: [
3850
+ /* @__PURE__ */ jsxs27(Card13, { children: [
3851
+ /* @__PURE__ */ jsx33(CardHeader12, { className: "pb-3", children: /* @__PURE__ */ jsxs27(CardTitle12, { className: "flex items-center gap-2 text-base", children: [
3904
3852
  /* @__PURE__ */ jsx33(Bell, { className: "h-4 w-4" }),
3905
3853
  "Billing Alerts"
3906
3854
  ] }) }),
3907
- /* @__PURE__ */ jsx33(CardContent12, { children: /* @__PURE__ */ jsxs28("div", { className: "flex items-start justify-between gap-4", children: [
3908
- /* @__PURE__ */ jsxs28("div", { className: "space-y-1", children: [
3855
+ /* @__PURE__ */ jsx33(CardContent12, { children: /* @__PURE__ */ jsxs27("div", { className: "flex items-start justify-between gap-4", children: [
3856
+ /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
3909
3857
  /* @__PURE__ */ jsx33(Label7, { htmlFor: "alerts", className: "text-sm", children: "Usage alerts" }),
3910
- /* @__PURE__ */ jsxs28("p", { className: "text-xs text-muted-foreground", children: [
3858
+ /* @__PURE__ */ jsxs27("p", { className: "text-xs text-muted-foreground", children: [
3911
3859
  "Notify at ",
3912
3860
  billingData.billingAlerts.threshold,
3913
3861
  "% usage"
@@ -3917,32 +3865,32 @@ function BillingPage({
3917
3865
  ] }) })
3918
3866
  ] })
3919
3867
  ] }),
3920
- /* @__PURE__ */ jsxs28(Card13, { children: [
3921
- /* @__PURE__ */ jsx33(CardHeader12, { children: /* @__PURE__ */ jsxs28(CardTitle12, { className: "flex items-center gap-2", children: [
3868
+ /* @__PURE__ */ jsxs27(Card13, { children: [
3869
+ /* @__PURE__ */ jsx33(CardHeader12, { children: /* @__PURE__ */ jsxs27(CardTitle12, { className: "flex items-center gap-2", children: [
3922
3870
  /* @__PURE__ */ jsx33(Receipt, { className: "h-5 w-5" }),
3923
3871
  "Invoice History"
3924
3872
  ] }) }),
3925
- /* @__PURE__ */ jsx33(CardContent12, { children: billingData.invoices.length > 0 ? /* @__PURE__ */ jsxs28(Table6, { children: [
3926
- /* @__PURE__ */ jsx33(TableHeader6, { children: /* @__PURE__ */ jsxs28(TableRow6, { children: [
3873
+ /* @__PURE__ */ jsx33(CardContent12, { children: billingData.invoices.length > 0 ? /* @__PURE__ */ jsxs27(Table6, { children: [
3874
+ /* @__PURE__ */ jsx33(TableHeader6, { children: /* @__PURE__ */ jsxs27(TableRow6, { children: [
3927
3875
  /* @__PURE__ */ jsx33(TableHead6, { className: "pl-4", children: "Invoice" }),
3928
3876
  /* @__PURE__ */ jsx33(TableHead6, { children: "Date" }),
3929
3877
  /* @__PURE__ */ jsx33(TableHead6, { children: "Amount" }),
3930
3878
  /* @__PURE__ */ jsx33(TableHead6, { children: "Status" }),
3931
3879
  /* @__PURE__ */ jsx33(TableHead6, { className: "w-[80px]" })
3932
3880
  ] }) }),
3933
- /* @__PURE__ */ jsx33(TableBody6, { children: billingData.invoices.map((invoice) => /* @__PURE__ */ jsxs28(TableRow6, { children: [
3881
+ /* @__PURE__ */ jsx33(TableBody6, { children: billingData.invoices.map((invoice) => /* @__PURE__ */ jsxs27(TableRow6, { children: [
3934
3882
  /* @__PURE__ */ jsx33(TableCell6, { className: "py-4 pl-4 font-mono text-sm", children: invoice.invoiceNumber }),
3935
3883
  /* @__PURE__ */ jsx33(TableCell6, { className: "py-4", children: formatRelativeDate(invoice.date) }),
3936
- /* @__PURE__ */ jsxs28(TableCell6, { className: "py-4 font-medium", children: [
3884
+ /* @__PURE__ */ jsxs27(TableCell6, { className: "py-4 font-medium", children: [
3937
3885
  "$",
3938
3886
  invoice.amount.toFixed(2)
3939
3887
  ] }),
3940
3888
  /* @__PURE__ */ jsx33(TableCell6, { className: "py-4", children: /* @__PURE__ */ jsx33(Badge6, { variant: invoice.status === "paid" ? "default" : "secondary", children: invoice.status }) }),
3941
3889
  /* @__PURE__ */ jsx33(TableCell6, { className: "py-4 pr-4", children: /* @__PURE__ */ jsx33(Button12, { variant: "ghost", size: "icon", onClick: () => handleDownloadInvoice(invoice.id, invoice.invoiceNumber), children: /* @__PURE__ */ jsx33(Download2, { className: "h-4 w-4" }) }) })
3942
3890
  ] }, invoice.id)) })
3943
- ] }) : /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-center justify-center gap-4 py-16 text-center", children: [
3891
+ ] }) : /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center justify-center gap-4 py-16 text-center", children: [
3944
3892
  /* @__PURE__ */ jsx33("div", { className: "rounded-full bg-muted p-4", children: /* @__PURE__ */ jsx33(FileText2, { className: "h-8 w-8 text-muted-foreground" }) }),
3945
- /* @__PURE__ */ jsxs28("div", { children: [
3893
+ /* @__PURE__ */ jsxs27("div", { children: [
3946
3894
  /* @__PURE__ */ jsx33("p", { className: "font-medium", children: "No invoices yet" }),
3947
3895
  /* @__PURE__ */ jsx33("p", { className: "text-sm text-muted-foreground mt-1", children: "Your invoices will appear here after your first billing cycle." })
3948
3896
  ] })
@@ -3958,22 +3906,22 @@ import { Card as Card14, CardContent as CardContent13 } from "@mdxui/primitives/
3958
3906
  import { Separator as Separator4 } from "@mdxui/primitives/separator";
3959
3907
  import { SidebarTrigger as SidebarTrigger2 } from "@mdxui/primitives/sidebar";
3960
3908
  import { Database as Database2 } from "lucide-react";
3961
- import { Fragment as Fragment8, jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
3909
+ import { Fragment as Fragment7, jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
3962
3910
  function DatabasePage() {
3963
- return /* @__PURE__ */ jsxs29(Fragment8, { children: [
3964
- /* @__PURE__ */ jsx34("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 px-4", children: [
3911
+ return /* @__PURE__ */ jsxs28(Fragment7, { children: [
3912
+ /* @__PURE__ */ jsx34("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2 px-4", children: [
3965
3913
  /* @__PURE__ */ jsx34(SidebarTrigger2, { className: "-ml-1" }),
3966
3914
  /* @__PURE__ */ jsx34(Separator4, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
3967
3915
  /* @__PURE__ */ jsx34(Breadcrumb2, { children: /* @__PURE__ */ jsx34(BreadcrumbList2, { children: /* @__PURE__ */ jsx34(BreadcrumbItem2, { children: /* @__PURE__ */ jsx34(BreadcrumbPage2, { children: "Database" }) }) }) })
3968
3916
  ] }) }),
3969
- /* @__PURE__ */ jsxs29("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
3970
- /* @__PURE__ */ jsxs29("div", { children: [
3917
+ /* @__PURE__ */ jsxs28("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
3918
+ /* @__PURE__ */ jsxs28("div", { children: [
3971
3919
  /* @__PURE__ */ jsx34("h1", { className: "text-2xl font-bold", children: "Database" }),
3972
3920
  /* @__PURE__ */ jsx34("p", { className: "text-muted-foreground", children: "Browse and manage your database." })
3973
3921
  ] }),
3974
- /* @__PURE__ */ jsx34(Card14, { children: /* @__PURE__ */ jsx34(CardContent13, { className: "py-16", children: /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
3922
+ /* @__PURE__ */ jsx34(Card14, { children: /* @__PURE__ */ jsx34(CardContent13, { className: "py-16", children: /* @__PURE__ */ jsxs28("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
3975
3923
  /* @__PURE__ */ jsx34("div", { className: "rounded-full bg-muted p-4", children: /* @__PURE__ */ jsx34(Database2, { className: "h-8 w-8 text-muted-foreground" }) }),
3976
- /* @__PURE__ */ jsxs29("div", { children: [
3924
+ /* @__PURE__ */ jsxs28("div", { children: [
3977
3925
  /* @__PURE__ */ jsx34("p", { className: "font-medium", children: "Coming soon" }),
3978
3926
  /* @__PURE__ */ jsx34("p", { className: "text-sm text-muted-foreground mt-1", children: "Database management tools will be available here." })
3979
3927
  ] })
@@ -3987,22 +3935,28 @@ import { Breadcrumb as Breadcrumb3, BreadcrumbItem as BreadcrumbItem3, Breadcrum
3987
3935
  import { Separator as Separator5 } from "@mdxui/primitives/separator";
3988
3936
  import { SidebarTrigger as SidebarTrigger3 } from "@mdxui/primitives/sidebar";
3989
3937
  import { Plug as Plug2 } from "lucide-react";
3990
- import { Fragment as Fragment9, jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
3938
+ import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
3991
3939
  function IntegrationsPage() {
3992
- return /* @__PURE__ */ jsxs30(Fragment9, { children: [
3993
- /* @__PURE__ */ jsx35("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 px-4", children: [
3940
+ return /* @__PURE__ */ jsxs29(Fragment8, { children: [
3941
+ /* @__PURE__ */ jsx35("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-2 px-4", children: [
3994
3942
  /* @__PURE__ */ jsx35(SidebarTrigger3, { className: "-ml-1" }),
3995
- /* @__PURE__ */ jsx35(Separator5, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
3943
+ /* @__PURE__ */ jsx35(
3944
+ Separator5,
3945
+ {
3946
+ orientation: "vertical",
3947
+ className: "mr-2 data-[orientation=vertical]:h-4"
3948
+ }
3949
+ ),
3996
3950
  /* @__PURE__ */ jsx35(Breadcrumb3, { children: /* @__PURE__ */ jsx35(BreadcrumbList3, { children: /* @__PURE__ */ jsx35(BreadcrumbItem3, { children: /* @__PURE__ */ jsx35(BreadcrumbPage3, { children: "Integrations" }) }) }) })
3997
3951
  ] }) }),
3998
- /* @__PURE__ */ jsxs30("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
3999
- /* @__PURE__ */ jsxs30("div", { children: [
3952
+ /* @__PURE__ */ jsxs29("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
3953
+ /* @__PURE__ */ jsxs29("div", { children: [
4000
3954
  /* @__PURE__ */ jsx35("h1", { className: "text-2xl font-bold", children: "Integrations" }),
4001
3955
  /* @__PURE__ */ jsx35("p", { className: "text-muted-foreground", children: "Connect third-party services." })
4002
3956
  ] }),
4003
- /* @__PURE__ */ jsxs30("div", { className: "flex flex-col items-center justify-center rounded-md border border-dashed py-24 gap-4", children: [
3957
+ /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center justify-center rounded-md border border-dashed py-24 gap-4", children: [
4004
3958
  /* @__PURE__ */ jsx35("div", { className: "rounded-full bg-muted p-4", children: /* @__PURE__ */ jsx35(Plug2, { className: "h-8 w-8 text-muted-foreground" }) }),
4005
- /* @__PURE__ */ jsxs30("div", { className: "text-center", children: [
3959
+ /* @__PURE__ */ jsxs29("div", { className: "text-center", children: [
4006
3960
  /* @__PURE__ */ jsx35("p", { className: "font-medium", children: "Coming Soon" }),
4007
3961
  /* @__PURE__ */ jsx35("p", { className: "text-muted-foreground text-sm max-w-md mt-1", children: "Connect services like GitHub, Slack, Google, Salesforce, and more." })
4008
3962
  ] })
@@ -4022,9 +3976,9 @@ import { Separator as Separator6 } from "@mdxui/primitives/separator";
4022
3976
  import { SidebarTrigger as SidebarTrigger4 } from "@mdxui/primitives/sidebar";
4023
3977
  import { Table as Table7, TableBody as TableBody7, TableCell as TableCell7, TableHead as TableHead7, TableHeader as TableHeader7, TableRow as TableRow7 } from "@mdxui/primitives/table";
4024
3978
  import { AlertTriangle, BarChart3 as BarChart33, Check as Check3, Copy as Copy3, Key as Key6, MoreHorizontal as MoreHorizontal4, Pencil, Plus as Plus5, Trash2 as Trash24 } from "lucide-react";
4025
- import { useState as useState14 } from "react";
3979
+ import { useState as useState13 } from "react";
4026
3980
  import { toast as toast5 } from "sonner";
4027
- import { Fragment as Fragment10, jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
3981
+ import { Fragment as Fragment9, jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
4028
3982
  function maskKey(key) {
4029
3983
  const prefix = key.substring(0, 8);
4030
3984
  return `${prefix}${"\u2022".repeat(16)}`;
@@ -4058,7 +4012,7 @@ function StatusIndicator({ status }) {
4058
4012
  }
4059
4013
  };
4060
4014
  const { color, label } = config[status];
4061
- return /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
4015
+ return /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
4062
4016
  /* @__PURE__ */ jsx36("span", { className: `h-2 w-2 rounded-full ${color}` }),
4063
4017
  /* @__PURE__ */ jsx36("span", { className: "text-sm", children: label })
4064
4018
  ] });
@@ -4071,17 +4025,17 @@ function KeysPage({
4071
4025
  hideHeader = false,
4072
4026
  className
4073
4027
  } = {}) {
4074
- const [keys, setKeys] = useState14(initialKeys ?? mockApiKeys);
4075
- const [newKeyName, setNewKeyName] = useState14("");
4076
- const [newlyCreatedKey, setNewlyCreatedKey] = useState14(null);
4077
- const [createDialogOpen, setCreateDialogOpen] = useState14(false);
4078
- const [revokeDialogOpen, setRevokeDialogOpen] = useState14(false);
4079
- const [renameDialogOpen, setRenameDialogOpen] = useState14(false);
4080
- const [keyToRevoke, setKeyToRevoke] = useState14(null);
4081
- const [keyToRename, setKeyToRename] = useState14(null);
4082
- const [renameValue, setRenameValue] = useState14("");
4083
- const [copiedKeyId, setCopiedKeyId] = useState14(null);
4084
- const [newKeyCopied, setNewKeyCopied] = useState14(false);
4028
+ const [keys, setKeys] = useState13(initialKeys ?? mockApiKeys);
4029
+ const [newKeyName, setNewKeyName] = useState13("");
4030
+ const [newlyCreatedKey, setNewlyCreatedKey] = useState13(null);
4031
+ const [createDialogOpen, setCreateDialogOpen] = useState13(false);
4032
+ const [revokeDialogOpen, setRevokeDialogOpen] = useState13(false);
4033
+ const [renameDialogOpen, setRenameDialogOpen] = useState13(false);
4034
+ const [keyToRevoke, setKeyToRevoke] = useState13(null);
4035
+ const [keyToRename, setKeyToRename] = useState13(null);
4036
+ const [renameValue, setRenameValue] = useState13("");
4037
+ const [copiedKeyId, setCopiedKeyId] = useState13(null);
4038
+ const [newKeyCopied, setNewKeyCopied] = useState13(false);
4085
4039
  const handleCreateKey = async () => {
4086
4040
  const name = newKeyName || "Untitled Key";
4087
4041
  if (onCreateKey) {
@@ -4180,52 +4134,52 @@ function KeysPage({
4180
4134
  setKeyToRevoke(apiKey);
4181
4135
  setRevokeDialogOpen(true);
4182
4136
  };
4183
- return /* @__PURE__ */ jsxs31(Fragment10, { children: [
4184
- !hideHeader && /* @__PURE__ */ jsx36("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2 px-4", children: [
4137
+ return /* @__PURE__ */ jsxs30(Fragment9, { children: [
4138
+ !hideHeader && /* @__PURE__ */ jsx36("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2 px-4", children: [
4185
4139
  /* @__PURE__ */ jsx36(SidebarTrigger4, { className: "-ml-1" }),
4186
4140
  /* @__PURE__ */ jsx36(Separator6, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
4187
4141
  /* @__PURE__ */ jsx36(Breadcrumb4, { children: /* @__PURE__ */ jsx36(BreadcrumbList4, { children: /* @__PURE__ */ jsx36(BreadcrumbItem4, { children: /* @__PURE__ */ jsx36(BreadcrumbPage4, { children: "API Keys" }) }) }) })
4188
4142
  ] }) }),
4189
- /* @__PURE__ */ jsxs31("div", { className: `flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 ${hideHeader ? "" : "pt-0"} ${className ?? ""}`, children: [
4190
- /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between", children: [
4191
- /* @__PURE__ */ jsxs31("div", { children: [
4143
+ /* @__PURE__ */ jsxs30("div", { className: `flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 ${hideHeader ? "" : "pt-0"} ${className ?? ""}`, children: [
4144
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between", children: [
4145
+ /* @__PURE__ */ jsxs30("div", { children: [
4192
4146
  /* @__PURE__ */ jsx36("h1", { className: "text-2xl font-bold", children: "API Keys" }),
4193
4147
  /* @__PURE__ */ jsx36("p", { className: "text-muted-foreground", children: "Manage your API keys for accessing the API." })
4194
4148
  ] }),
4195
- /* @__PURE__ */ jsxs31(Dialog7, { open: createDialogOpen, onOpenChange: setCreateDialogOpen, children: [
4196
- /* @__PURE__ */ jsx36(DialogTrigger4, { asChild: true, children: /* @__PURE__ */ jsxs31(Button13, { children: [
4149
+ /* @__PURE__ */ jsxs30(Dialog7, { open: createDialogOpen, onOpenChange: setCreateDialogOpen, children: [
4150
+ /* @__PURE__ */ jsx36(DialogTrigger4, { asChild: true, children: /* @__PURE__ */ jsxs30(Button13, { children: [
4197
4151
  /* @__PURE__ */ jsx36(Plus5, { className: "h-4 w-4" }),
4198
4152
  "Create Key"
4199
4153
  ] }) }),
4200
- /* @__PURE__ */ jsx36(DialogContent7, { children: newlyCreatedKey ? /* @__PURE__ */ jsxs31(Fragment10, { children: [
4201
- /* @__PURE__ */ jsxs31(DialogHeader6, { children: [
4154
+ /* @__PURE__ */ jsx36(DialogContent7, { children: newlyCreatedKey ? /* @__PURE__ */ jsxs30(Fragment9, { children: [
4155
+ /* @__PURE__ */ jsxs30(DialogHeader6, { children: [
4202
4156
  /* @__PURE__ */ jsx36(DialogTitle6, { children: "API Key Created" }),
4203
4157
  /* @__PURE__ */ jsx36(DialogDescription5, { children: "Your new API key has been created successfully." })
4204
4158
  ] }),
4205
- /* @__PURE__ */ jsxs31(Alert, { variant: "warning", children: [
4159
+ /* @__PURE__ */ jsxs30(Alert, { variant: "warning", children: [
4206
4160
  /* @__PURE__ */ jsx36(AlertTriangle, { className: "h-4 w-4" }),
4207
4161
  /* @__PURE__ */ jsx36(AlertDescription, { children: "Copy your API key now. You won't be able to see it again." })
4208
4162
  ] }),
4209
- /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
4163
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-2", children: [
4210
4164
  /* @__PURE__ */ jsx36(Input8, { value: newlyCreatedKey, readOnly: true, className: "font-mono text-sm" }),
4211
4165
  /* @__PURE__ */ jsx36(Button13, { variant: "outline", size: "icon", onClick: handleCopyNewKey, children: copiedKeyId === "new" ? /* @__PURE__ */ jsx36(Check3, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx36(Copy3, { className: "h-4 w-4" }) })
4212
4166
  ] }),
4213
4167
  /* @__PURE__ */ jsx36(DialogFooter6, { children: /* @__PURE__ */ jsx36(Button13, { onClick: closeCreateDialog, disabled: !newKeyCopied, children: "Done" }) })
4214
- ] }) : /* @__PURE__ */ jsxs31(Fragment10, { children: [
4215
- /* @__PURE__ */ jsxs31(DialogHeader6, { children: [
4168
+ ] }) : /* @__PURE__ */ jsxs30(Fragment9, { children: [
4169
+ /* @__PURE__ */ jsxs30(DialogHeader6, { children: [
4216
4170
  /* @__PURE__ */ jsx36(DialogTitle6, { children: "Create API Key" }),
4217
4171
  /* @__PURE__ */ jsx36(DialogDescription5, { children: "Give your API key a name to help you identify it later." })
4218
4172
  ] }),
4219
4173
  /* @__PURE__ */ jsx36(Input8, { placeholder: "Key name (optional)", value: newKeyName, onChange: (e) => setNewKeyName(e.target.value) }),
4220
- /* @__PURE__ */ jsxs31(DialogFooter6, { children: [
4174
+ /* @__PURE__ */ jsxs30(DialogFooter6, { children: [
4221
4175
  /* @__PURE__ */ jsx36(Button13, { variant: "outline", onClick: closeCreateDialog, children: "Cancel" }),
4222
4176
  /* @__PURE__ */ jsx36(Button13, { onClick: handleCreateKey, children: "Create" })
4223
4177
  ] })
4224
4178
  ] }) })
4225
4179
  ] })
4226
4180
  ] }),
4227
- /* @__PURE__ */ jsx36("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs31(Table7, { children: [
4228
- /* @__PURE__ */ jsx36(TableHeader7, { children: /* @__PURE__ */ jsxs31(TableRow7, { children: [
4181
+ /* @__PURE__ */ jsx36("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs30(Table7, { children: [
4182
+ /* @__PURE__ */ jsx36(TableHeader7, { children: /* @__PURE__ */ jsxs30(TableRow7, { children: [
4229
4183
  /* @__PURE__ */ jsx36(TableHead7, { className: "pl-4", children: "Name" }),
4230
4184
  /* @__PURE__ */ jsx36(TableHead7, { children: "Key" }),
4231
4185
  /* @__PURE__ */ jsx36(TableHead7, { children: "Status" }),
@@ -4233,39 +4187,39 @@ function KeysPage({
4233
4187
  /* @__PURE__ */ jsx36(TableHead7, { children: "Last Used" }),
4234
4188
  /* @__PURE__ */ jsx36(TableHead7, { className: "w-[60px]" })
4235
4189
  ] }) }),
4236
- /* @__PURE__ */ jsxs31(TableBody7, { children: [
4237
- keys.map((apiKey) => /* @__PURE__ */ jsxs31(TableRow7, { children: [
4190
+ /* @__PURE__ */ jsxs30(TableBody7, { children: [
4191
+ keys.map((apiKey) => /* @__PURE__ */ jsxs30(TableRow7, { children: [
4238
4192
  /* @__PURE__ */ jsx36(TableCell7, { className: "py-4 pl-4 font-medium", children: apiKey.name }),
4239
4193
  /* @__PURE__ */ jsx36(TableCell7, { className: "py-4 font-mono text-sm text-muted-foreground", children: maskKey(apiKey.key) }),
4240
4194
  /* @__PURE__ */ jsx36(TableCell7, { className: "py-4", children: /* @__PURE__ */ jsx36(StatusIndicator, { status: apiKey.status }) }),
4241
4195
  /* @__PURE__ */ jsx36(TableCell7, { className: "py-4", children: apiKey.created }),
4242
4196
  /* @__PURE__ */ jsx36(TableCell7, { className: "py-4 text-muted-foreground", children: getRelativeTime(apiKey.lastUsed) }),
4243
- /* @__PURE__ */ jsx36(TableCell7, { className: "py-4 pr-4", children: /* @__PURE__ */ jsxs31(DropdownMenu4, { children: [
4197
+ /* @__PURE__ */ jsx36(TableCell7, { className: "py-4 pr-4", children: /* @__PURE__ */ jsxs30(DropdownMenu4, { children: [
4244
4198
  /* @__PURE__ */ jsx36(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsx36(Button13, { variant: "ghost", size: "icon", className: "h-8 w-8", children: /* @__PURE__ */ jsx36(MoreHorizontal4, { className: "h-4 w-4" }) }) }),
4245
- /* @__PURE__ */ jsxs31(DropdownMenuContent4, { align: "end", children: [
4246
- /* @__PURE__ */ jsxs31(DropdownMenuItem4, { onClick: () => openRenameDialog(apiKey), children: [
4199
+ /* @__PURE__ */ jsxs30(DropdownMenuContent4, { align: "end", children: [
4200
+ /* @__PURE__ */ jsxs30(DropdownMenuItem4, { onClick: () => openRenameDialog(apiKey), children: [
4247
4201
  /* @__PURE__ */ jsx36(Pencil, { className: "h-4 w-4" }),
4248
4202
  "Rename"
4249
4203
  ] }),
4250
- /* @__PURE__ */ jsxs31(DropdownMenuItem4, { children: [
4204
+ /* @__PURE__ */ jsxs30(DropdownMenuItem4, { children: [
4251
4205
  /* @__PURE__ */ jsx36(BarChart33, { className: "h-4 w-4" }),
4252
4206
  "View Usage"
4253
4207
  ] }),
4254
4208
  /* @__PURE__ */ jsx36(DropdownMenuSeparator2, {}),
4255
- /* @__PURE__ */ jsxs31(DropdownMenuItem4, { className: "text-destructive focus:text-destructive", onClick: () => openRevokeDialog(apiKey), children: [
4209
+ /* @__PURE__ */ jsxs30(DropdownMenuItem4, { className: "text-destructive focus:text-destructive", onClick: () => openRevokeDialog(apiKey), children: [
4256
4210
  /* @__PURE__ */ jsx36(Trash24, { className: "h-4 w-4" }),
4257
4211
  "Revoke"
4258
4212
  ] })
4259
4213
  ] })
4260
4214
  ] }) })
4261
4215
  ] }, apiKey.id)),
4262
- keys.length === 0 && /* @__PURE__ */ jsx36(TableRow7, { children: /* @__PURE__ */ jsx36(TableCell7, { colSpan: 6, className: "py-16", children: /* @__PURE__ */ jsxs31("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
4216
+ keys.length === 0 && /* @__PURE__ */ jsx36(TableRow7, { children: /* @__PURE__ */ jsx36(TableCell7, { colSpan: 6, className: "py-16", children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
4263
4217
  /* @__PURE__ */ jsx36("div", { className: "rounded-full bg-muted p-4", children: /* @__PURE__ */ jsx36(Key6, { className: "h-8 w-8 text-muted-foreground" }) }),
4264
- /* @__PURE__ */ jsxs31("div", { children: [
4218
+ /* @__PURE__ */ jsxs30("div", { children: [
4265
4219
  /* @__PURE__ */ jsx36("p", { className: "font-medium", children: "No API keys yet" }),
4266
4220
  /* @__PURE__ */ jsx36("p", { className: "text-sm text-muted-foreground mt-1", children: "Create your first API key to start making requests." })
4267
4221
  ] }),
4268
- /* @__PURE__ */ jsxs31(Button13, { onClick: () => setCreateDialogOpen(true), className: "mt-2", children: [
4222
+ /* @__PURE__ */ jsxs30(Button13, { onClick: () => setCreateDialogOpen(true), className: "mt-2", children: [
4269
4223
  /* @__PURE__ */ jsx36(Plus5, { className: "h-4 w-4" }),
4270
4224
  "Create Your First Key"
4271
4225
  ] })
@@ -4273,13 +4227,13 @@ function KeysPage({
4273
4227
  ] })
4274
4228
  ] }) })
4275
4229
  ] }),
4276
- /* @__PURE__ */ jsx36(Dialog7, { open: renameDialogOpen, onOpenChange: setRenameDialogOpen, children: /* @__PURE__ */ jsxs31(DialogContent7, { children: [
4277
- /* @__PURE__ */ jsxs31(DialogHeader6, { children: [
4230
+ /* @__PURE__ */ jsx36(Dialog7, { open: renameDialogOpen, onOpenChange: setRenameDialogOpen, children: /* @__PURE__ */ jsxs30(DialogContent7, { children: [
4231
+ /* @__PURE__ */ jsxs30(DialogHeader6, { children: [
4278
4232
  /* @__PURE__ */ jsx36(DialogTitle6, { children: "Rename API Key" }),
4279
4233
  /* @__PURE__ */ jsx36(DialogDescription5, { children: "Enter a new name for this API key." })
4280
4234
  ] }),
4281
4235
  /* @__PURE__ */ jsx36(Input8, { placeholder: "Key name", value: renameValue, onChange: (e) => setRenameValue(e.target.value) }),
4282
- /* @__PURE__ */ jsxs31(DialogFooter6, { children: [
4236
+ /* @__PURE__ */ jsxs30(DialogFooter6, { children: [
4283
4237
  /* @__PURE__ */ jsx36(
4284
4238
  Button13,
4285
4239
  {
@@ -4295,16 +4249,16 @@ function KeysPage({
4295
4249
  /* @__PURE__ */ jsx36(Button13, { onClick: handleRenameKey, disabled: !renameValue.trim(), children: "Rename" })
4296
4250
  ] })
4297
4251
  ] }) }),
4298
- /* @__PURE__ */ jsx36(Dialog7, { open: revokeDialogOpen, onOpenChange: setRevokeDialogOpen, children: /* @__PURE__ */ jsxs31(DialogContent7, { children: [
4299
- /* @__PURE__ */ jsxs31(DialogHeader6, { children: [
4252
+ /* @__PURE__ */ jsx36(Dialog7, { open: revokeDialogOpen, onOpenChange: setRevokeDialogOpen, children: /* @__PURE__ */ jsxs30(DialogContent7, { children: [
4253
+ /* @__PURE__ */ jsxs30(DialogHeader6, { children: [
4300
4254
  /* @__PURE__ */ jsx36(DialogTitle6, { children: "Revoke API Key" }),
4301
- /* @__PURE__ */ jsxs31(DialogDescription5, { children: [
4255
+ /* @__PURE__ */ jsxs30(DialogDescription5, { children: [
4302
4256
  'Are you sure you want to revoke "',
4303
4257
  keyToRevoke?.name,
4304
4258
  '"? This action cannot be undone.'
4305
4259
  ] })
4306
4260
  ] }),
4307
- /* @__PURE__ */ jsxs31(DialogFooter6, { children: [
4261
+ /* @__PURE__ */ jsxs30(DialogFooter6, { children: [
4308
4262
  /* @__PURE__ */ jsx36(
4309
4263
  Button13,
4310
4264
  {
@@ -4332,10 +4286,10 @@ import { Separator as Separator7 } from "@mdxui/primitives/separator";
4332
4286
  import { SidebarTrigger as SidebarTrigger5 } from "@mdxui/primitives/sidebar";
4333
4287
  import { Skeleton } from "@mdxui/primitives/skeleton";
4334
4288
  import { Activity as Activity2, AlertTriangle as AlertTriangle2, BarChart3 as BarChart34, ChevronDown, DollarSign as DollarSign2 } from "lucide-react";
4335
- import { useEffect as useEffect7, useState as useState15 } from "react";
4289
+ import { useEffect as useEffect6, useState as useState14 } from "react";
4336
4290
  import { Link as Link3 } from "react-router-dom";
4337
4291
  import { Area as Area3, AreaChart as AreaChart3, Bar as Bar2, BarChart as BarChart2, ReferenceLine as ReferenceLine2, XAxis as XAxis4, YAxis as YAxis4 } from "recharts";
4338
- import { Fragment as Fragment11, jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
4292
+ import { Fragment as Fragment10, jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
4339
4293
  var chartConfig = {
4340
4294
  requests: {
4341
4295
  label: "Requests",
@@ -4346,12 +4300,12 @@ function Sparkline({ data, color }) {
4346
4300
  return /* @__PURE__ */ jsx37("div", { className: "h-8 w-20", children: /* @__PURE__ */ jsx37(AreaChart3, { data, width: 80, height: 32, margin: { top: 2, right: 0, bottom: 0, left: 0 }, children: /* @__PURE__ */ jsx37(Area3, { type: "monotone", dataKey: "value", stroke: color, fill: color, fillOpacity: 0.2, strokeWidth: 1.5 }) }) });
4347
4301
  }
4348
4302
  function StatCardSkeleton() {
4349
- return /* @__PURE__ */ jsxs32(Card15, { children: [
4350
- /* @__PURE__ */ jsxs32(CardHeader13, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4303
+ return /* @__PURE__ */ jsxs31(Card15, { children: [
4304
+ /* @__PURE__ */ jsxs31(CardHeader13, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4351
4305
  /* @__PURE__ */ jsx37(Skeleton, { className: "h-4 w-24" }),
4352
4306
  /* @__PURE__ */ jsx37(Skeleton, { className: "h-4 w-4" })
4353
4307
  ] }),
4354
- /* @__PURE__ */ jsxs32(CardContent14, { children: [
4308
+ /* @__PURE__ */ jsxs31(CardContent14, { children: [
4355
4309
  /* @__PURE__ */ jsx37(Skeleton, { className: "h-8 w-20 mb-1" }),
4356
4310
  /* @__PURE__ */ jsx37(Skeleton, { className: "h-3 w-32" })
4357
4311
  ] })
@@ -4362,18 +4316,18 @@ function ChartSkeleton() {
4362
4316
  return /* @__PURE__ */ jsx37("div", { className: "h-[500px] w-full flex items-end justify-around gap-2 px-8", children: SKELETON_HEIGHTS.map((height, i) => /* @__PURE__ */ jsx37(Skeleton, { className: "w-full", style: { height: `${height}%` } }, i.toString())) });
4363
4317
  }
4364
4318
  function EmptyState() {
4365
- return /* @__PURE__ */ jsxs32("div", { className: "h-[500px] w-full flex flex-col items-center justify-center text-muted-foreground", children: [
4319
+ return /* @__PURE__ */ jsxs31("div", { className: "h-[500px] w-full flex flex-col items-center justify-center text-muted-foreground", children: [
4366
4320
  /* @__PURE__ */ jsx37(BarChart34, { className: "h-12 w-12 mb-4 opacity-50" }),
4367
4321
  /* @__PURE__ */ jsx37("p", { className: "text-lg font-medium", children: "No data available" }),
4368
4322
  /* @__PURE__ */ jsx37("p", { className: "text-sm", children: "There's no usage data for this time period." })
4369
4323
  ] });
4370
4324
  }
4371
4325
  function OverviewPage() {
4372
- const [selectedPeriod, setSelectedPeriod] = useState15("30d");
4373
- const [isLoading, setIsLoading] = useState15(true);
4374
- const [stats, setStats] = useState15(null);
4375
- const [usageData, setUsageData] = useState15([]);
4376
- useEffect7(() => {
4326
+ const [selectedPeriod, setSelectedPeriod] = useState14("30d");
4327
+ const [isLoading, setIsLoading] = useState14(true);
4328
+ const [stats, setStats] = useState14(null);
4329
+ const [usageData, setUsageData] = useState14([]);
4330
+ useEffect6(() => {
4377
4331
  let cancelled = false;
4378
4332
  const timer = setTimeout(() => {
4379
4333
  if (!cancelled) {
@@ -4392,49 +4346,49 @@ function OverviewPage() {
4392
4346
  setSelectedPeriod(period);
4393
4347
  };
4394
4348
  const selectedLabel = timePeriodOptions.find((opt) => opt.value === selectedPeriod)?.label;
4395
- return /* @__PURE__ */ jsxs32(Fragment11, { children: [
4396
- /* @__PURE__ */ jsx37("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 px-4", children: [
4349
+ return /* @__PURE__ */ jsxs31(Fragment10, { children: [
4350
+ /* @__PURE__ */ jsx37("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2 px-4", children: [
4397
4351
  /* @__PURE__ */ jsx37(SidebarTrigger5, { className: "-ml-1" }),
4398
4352
  /* @__PURE__ */ jsx37(Separator7, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
4399
4353
  /* @__PURE__ */ jsx37(Breadcrumb5, { children: /* @__PURE__ */ jsx37(BreadcrumbList5, { children: /* @__PURE__ */ jsx37(BreadcrumbItem5, { children: /* @__PURE__ */ jsx37(BreadcrumbPage5, { children: "Overview" }) }) }) })
4400
4354
  ] }) }),
4401
- /* @__PURE__ */ jsxs32("div", { className: "flex flex-1 flex-col gap-4 px-16 py-4 pt-0", children: [
4402
- /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-between", children: [
4355
+ /* @__PURE__ */ jsxs31("div", { className: "flex flex-1 flex-col gap-4 px-16 py-4 pt-0", children: [
4356
+ /* @__PURE__ */ jsxs31("div", { className: "flex items-center justify-between", children: [
4403
4357
  /* @__PURE__ */ jsx37("h1", { className: "text-2xl font-semibold", children: "Usage" }),
4404
- /* @__PURE__ */ jsxs32(DropdownMenu5, { children: [
4405
- /* @__PURE__ */ jsx37(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs32(Button14, { variant: "outline", className: "w-[140px] justify-between", children: [
4358
+ /* @__PURE__ */ jsxs31(DropdownMenu5, { children: [
4359
+ /* @__PURE__ */ jsx37(DropdownMenuTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs31(Button14, { variant: "outline", className: "w-[140px] justify-between", children: [
4406
4360
  selectedLabel,
4407
4361
  /* @__PURE__ */ jsx37(ChevronDown, { className: "h-4 w-4 opacity-50" })
4408
4362
  ] }) }),
4409
4363
  /* @__PURE__ */ jsx37(DropdownMenuContent5, { align: "end", className: "w-[140px]", children: timePeriodOptions.map((option) => /* @__PURE__ */ jsx37(DropdownMenuItem5, { onClick: () => handlePeriodChange(option.value), children: option.label }, option.value)) })
4410
4364
  ] })
4411
4365
  ] }),
4412
- /* @__PURE__ */ jsx37("div", { className: "grid auto-rows-min gap-4 md:grid-cols-3", children: isLoading ? /* @__PURE__ */ jsxs32(Fragment11, { children: [
4366
+ /* @__PURE__ */ jsx37("div", { className: "grid auto-rows-min gap-4 md:grid-cols-3", children: isLoading ? /* @__PURE__ */ jsxs31(Fragment10, { children: [
4413
4367
  /* @__PURE__ */ jsx37(StatCardSkeleton, {}),
4414
4368
  /* @__PURE__ */ jsx37(StatCardSkeleton, {}),
4415
4369
  /* @__PURE__ */ jsx37(StatCardSkeleton, {})
4416
- ] }) : /* @__PURE__ */ jsxs32(Fragment11, { children: [
4417
- /* @__PURE__ */ jsx37(Link3, { to: "/requests", className: "block", children: /* @__PURE__ */ jsxs32(Card15, { className: "transition-colors hover:bg-muted/50 cursor-pointer", children: [
4418
- /* @__PURE__ */ jsxs32(CardHeader13, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4370
+ ] }) : /* @__PURE__ */ jsxs31(Fragment10, { children: [
4371
+ /* @__PURE__ */ jsx37(Link3, { to: "/requests", className: "block", children: /* @__PURE__ */ jsxs31(Card15, { className: "transition-colors hover:bg-muted/50 cursor-pointer", children: [
4372
+ /* @__PURE__ */ jsxs31(CardHeader13, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4419
4373
  /* @__PURE__ */ jsx37(CardTitle13, { className: "text-sm font-medium", children: "Total Requests" }),
4420
4374
  /* @__PURE__ */ jsx37(Activity2, { className: "h-4 w-4 text-muted-foreground" })
4421
4375
  ] }),
4422
- /* @__PURE__ */ jsx37(CardContent14, { children: /* @__PURE__ */ jsxs32("div", { className: "flex items-end justify-between", children: [
4423
- /* @__PURE__ */ jsxs32("div", { children: [
4376
+ /* @__PURE__ */ jsx37(CardContent14, { children: /* @__PURE__ */ jsxs31("div", { className: "flex items-end justify-between", children: [
4377
+ /* @__PURE__ */ jsxs31("div", { children: [
4424
4378
  /* @__PURE__ */ jsx37("div", { className: "text-2xl font-bold", children: stats?.totalRequests.toLocaleString() ?? "\u2014" }),
4425
4379
  /* @__PURE__ */ jsx37("p", { className: "text-xs text-muted-foreground", children: selectedLabel })
4426
4380
  ] }),
4427
4381
  /* @__PURE__ */ jsx37(Sparkline, { data: usageData.slice(-7).map((d) => ({ value: d.requests })), color: "var(--chart-1)" })
4428
4382
  ] }) })
4429
4383
  ] }) }),
4430
- /* @__PURE__ */ jsx37(Link3, { to: "/requests", className: "block", children: /* @__PURE__ */ jsxs32(Card15, { className: "transition-colors hover:bg-muted/50 cursor-pointer", children: [
4431
- /* @__PURE__ */ jsxs32(CardHeader13, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4384
+ /* @__PURE__ */ jsx37(Link3, { to: "/requests", className: "block", children: /* @__PURE__ */ jsxs31(Card15, { className: "transition-colors hover:bg-muted/50 cursor-pointer", children: [
4385
+ /* @__PURE__ */ jsxs31(CardHeader13, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4432
4386
  /* @__PURE__ */ jsx37(CardTitle13, { className: "text-sm font-medium", children: "Total Cost" }),
4433
4387
  /* @__PURE__ */ jsx37(DollarSign2, { className: "h-4 w-4 text-muted-foreground" })
4434
4388
  ] }),
4435
- /* @__PURE__ */ jsx37(CardContent14, { children: /* @__PURE__ */ jsxs32("div", { className: "flex items-end justify-between", children: [
4436
- /* @__PURE__ */ jsxs32("div", { children: [
4437
- /* @__PURE__ */ jsxs32("div", { className: "text-2xl font-bold", children: [
4389
+ /* @__PURE__ */ jsx37(CardContent14, { children: /* @__PURE__ */ jsxs31("div", { className: "flex items-end justify-between", children: [
4390
+ /* @__PURE__ */ jsxs31("div", { children: [
4391
+ /* @__PURE__ */ jsxs31("div", { className: "text-2xl font-bold", children: [
4438
4392
  "$",
4439
4393
  stats?.totalCost.toFixed(2) ?? "\u2014"
4440
4394
  ] }),
@@ -4443,13 +4397,13 @@ function OverviewPage() {
4443
4397
  /* @__PURE__ */ jsx37(Sparkline, { data: usageData.slice(-7).map((d) => ({ value: d.requests * 0.02 })), color: "var(--chart-2)" })
4444
4398
  ] }) })
4445
4399
  ] }) }),
4446
- /* @__PURE__ */ jsx37(Link3, { to: "/requests?status=error", className: "block", children: /* @__PURE__ */ jsxs32(Card15, { className: "transition-colors hover:bg-muted/50 cursor-pointer", children: [
4447
- /* @__PURE__ */ jsxs32(CardHeader13, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4400
+ /* @__PURE__ */ jsx37(Link3, { to: "/requests?status=error", className: "block", children: /* @__PURE__ */ jsxs31(Card15, { className: "transition-colors hover:bg-muted/50 cursor-pointer", children: [
4401
+ /* @__PURE__ */ jsxs31(CardHeader13, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4448
4402
  /* @__PURE__ */ jsx37(CardTitle13, { className: "text-sm font-medium", children: "Error Count" }),
4449
4403
  /* @__PURE__ */ jsx37(AlertTriangle2, { className: "h-4 w-4 text-muted-foreground" })
4450
4404
  ] }),
4451
- /* @__PURE__ */ jsx37(CardContent14, { children: /* @__PURE__ */ jsxs32("div", { className: "flex items-end justify-between", children: [
4452
- /* @__PURE__ */ jsxs32("div", { children: [
4405
+ /* @__PURE__ */ jsx37(CardContent14, { children: /* @__PURE__ */ jsxs31("div", { className: "flex items-end justify-between", children: [
4406
+ /* @__PURE__ */ jsxs31("div", { children: [
4453
4407
  /* @__PURE__ */ jsx37("div", { className: "text-2xl font-bold", children: stats?.errorCount ?? "\u2014" }),
4454
4408
  /* @__PURE__ */ jsx37("p", { className: "text-xs text-muted-foreground", children: "Failed requests" })
4455
4409
  ] }),
@@ -4465,13 +4419,13 @@ function OverviewPage() {
4465
4419
  ] }) })
4466
4420
  ] }) })
4467
4421
  ] }) }),
4468
- /* @__PURE__ */ jsxs32(Card15, { className: "flex-1", children: [
4469
- /* @__PURE__ */ jsx37(CardHeader13, { children: /* @__PURE__ */ jsxs32(CardTitle13, { children: [
4422
+ /* @__PURE__ */ jsxs31(Card15, { className: "flex-1", children: [
4423
+ /* @__PURE__ */ jsx37(CardHeader13, { children: /* @__PURE__ */ jsxs31(CardTitle13, { children: [
4470
4424
  "API Usage (",
4471
4425
  selectedLabel,
4472
4426
  ")"
4473
4427
  ] }) }),
4474
- /* @__PURE__ */ jsx37(CardContent14, { children: isLoading ? /* @__PURE__ */ jsx37(ChartSkeleton, {}) : usageData.length === 0 ? /* @__PURE__ */ jsx37(EmptyState, {}) : /* @__PURE__ */ jsx37(ChartContainer4, { config: chartConfig, className: "h-[500px] w-full", children: /* @__PURE__ */ jsxs32(BarChart2, { data: usageData, children: [
4428
+ /* @__PURE__ */ jsx37(CardContent14, { children: isLoading ? /* @__PURE__ */ jsx37(ChartSkeleton, {}) : usageData.length === 0 ? /* @__PURE__ */ jsx37(EmptyState, {}) : /* @__PURE__ */ jsx37(ChartContainer4, { config: chartConfig, className: "h-[500px] w-full", children: /* @__PURE__ */ jsxs31(BarChart2, { data: usageData, children: [
4475
4429
  /* @__PURE__ */ jsx37(
4476
4430
  XAxis4,
4477
4431
  {
@@ -4521,8 +4475,8 @@ import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "
4521
4475
  import { SidebarTrigger as SidebarTrigger6 } from "@mdxui/primitives/sidebar";
4522
4476
  import { Table as Table8, TableBody as TableBody8, TableCell as TableCell8, TableHead as TableHead8, TableHeader as TableHeader8, TableRow as TableRow8 } from "@mdxui/primitives/table";
4523
4477
  import { Activity as Activity3, ChevronDown as ChevronDown2 } from "lucide-react";
4524
- import { useState as useState16 } from "react";
4525
- import { Fragment as Fragment12, jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
4478
+ import { useState as useState15 } from "react";
4479
+ import { Fragment as Fragment11, jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
4526
4480
  var statusFilterOptions = [
4527
4481
  { value: "all", label: "All Status" },
4528
4482
  { value: "success", label: "Success (2xx)" },
@@ -4556,9 +4510,9 @@ function formatCost(cost) {
4556
4510
  return `$${cost.toFixed(3)}`;
4557
4511
  }
4558
4512
  function RequestsPage() {
4559
- const [statusFilter, setStatusFilter] = useState16("all");
4560
- const [selectedRequest, setSelectedRequest] = useState16(null);
4561
- const [sheetOpen, setSheetOpen] = useState16(false);
4513
+ const [statusFilter, setStatusFilter] = useState15("all");
4514
+ const [selectedRequest, setSelectedRequest] = useState15(null);
4515
+ const [sheetOpen, setSheetOpen] = useState15(false);
4562
4516
  const filteredRequests = mockRequests.filter((request) => {
4563
4517
  if (statusFilter === "all") return true;
4564
4518
  if (statusFilter === "success") return request.statusCode >= 200 && request.statusCode < 300;
@@ -4570,28 +4524,28 @@ function RequestsPage() {
4570
4524
  setSelectedRequest(request);
4571
4525
  setSheetOpen(true);
4572
4526
  };
4573
- return /* @__PURE__ */ jsxs33(Fragment12, { children: [
4574
- /* @__PURE__ */ jsx38("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2 px-4", children: [
4527
+ return /* @__PURE__ */ jsxs32(Fragment11, { children: [
4528
+ /* @__PURE__ */ jsx38("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2 px-4", children: [
4575
4529
  /* @__PURE__ */ jsx38(SidebarTrigger6, { className: "-ml-1" }),
4576
4530
  /* @__PURE__ */ jsx38(Separator8, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
4577
4531
  /* @__PURE__ */ jsx38(Breadcrumb6, { children: /* @__PURE__ */ jsx38(BreadcrumbList6, { children: /* @__PURE__ */ jsx38(BreadcrumbItem6, { children: /* @__PURE__ */ jsx38(BreadcrumbPage6, { children: "Requests" }) }) }) })
4578
4532
  ] }) }),
4579
- /* @__PURE__ */ jsxs33("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4580
- /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between", children: [
4581
- /* @__PURE__ */ jsxs33("div", { children: [
4533
+ /* @__PURE__ */ jsxs32("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4534
+ /* @__PURE__ */ jsxs32("div", { className: "flex items-center justify-between", children: [
4535
+ /* @__PURE__ */ jsxs32("div", { children: [
4582
4536
  /* @__PURE__ */ jsx38("h1", { className: "text-2xl font-bold", children: "Requests" }),
4583
4537
  /* @__PURE__ */ jsx38("p", { className: "text-muted-foreground", children: "Monitor and debug your API request logs." })
4584
4538
  ] }),
4585
- /* @__PURE__ */ jsxs33(DropdownMenu6, { children: [
4586
- /* @__PURE__ */ jsx38(DropdownMenuTrigger6, { asChild: true, children: /* @__PURE__ */ jsxs33(Button15, { variant: "outline", className: "w-[160px] justify-between", children: [
4539
+ /* @__PURE__ */ jsxs32(DropdownMenu6, { children: [
4540
+ /* @__PURE__ */ jsx38(DropdownMenuTrigger6, { asChild: true, children: /* @__PURE__ */ jsxs32(Button15, { variant: "outline", className: "w-[160px] justify-between", children: [
4587
4541
  statusFilterOptions.find((o) => o.value === statusFilter)?.label,
4588
4542
  /* @__PURE__ */ jsx38(ChevronDown2, { className: "h-4 w-4 opacity-50" })
4589
4543
  ] }) }),
4590
4544
  /* @__PURE__ */ jsx38(DropdownMenuContent6, { align: "end", className: "w-[160px]", children: statusFilterOptions.map((option) => /* @__PURE__ */ jsx38(DropdownMenuItem6, { onClick: () => setStatusFilter(option.value), children: option.label }, option.value)) })
4591
4545
  ] })
4592
4546
  ] }),
4593
- /* @__PURE__ */ jsx38("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs33(Table8, { children: [
4594
- /* @__PURE__ */ jsx38(TableHeader8, { children: /* @__PURE__ */ jsxs33(TableRow8, { children: [
4547
+ /* @__PURE__ */ jsx38("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs32(Table8, { children: [
4548
+ /* @__PURE__ */ jsx38(TableHeader8, { children: /* @__PURE__ */ jsxs32(TableRow8, { children: [
4595
4549
  /* @__PURE__ */ jsx38(TableHead8, { className: "pl-4", children: "Timestamp" }),
4596
4550
  /* @__PURE__ */ jsx38(TableHead8, { children: "Method" }),
4597
4551
  /* @__PURE__ */ jsx38(TableHead8, { children: "Endpoint" }),
@@ -4599,8 +4553,8 @@ function RequestsPage() {
4599
4553
  /* @__PURE__ */ jsx38(TableHead8, { children: "Latency" }),
4600
4554
  /* @__PURE__ */ jsx38(TableHead8, { children: "Cost" })
4601
4555
  ] }) }),
4602
- /* @__PURE__ */ jsxs33(TableBody8, { children: [
4603
- filteredRequests.map((request) => /* @__PURE__ */ jsxs33(TableRow8, { className: "cursor-pointer hover:bg-muted/50", onClick: () => handleRowClick(request), children: [
4556
+ /* @__PURE__ */ jsxs32(TableBody8, { children: [
4557
+ filteredRequests.map((request) => /* @__PURE__ */ jsxs32(TableRow8, { className: "cursor-pointer hover:bg-muted/50", onClick: () => handleRowClick(request), children: [
4604
4558
  /* @__PURE__ */ jsx38(TableCell8, { className: "py-3 pl-4 text-muted-foreground", children: formatTimestamp(request.timestamp) }),
4605
4559
  /* @__PURE__ */ jsx38(TableCell8, { className: "py-3", children: /* @__PURE__ */ jsx38("span", { className: `font-mono text-sm font-medium ${methodColors[request.method] || ""}`, children: request.method }) }),
4606
4560
  /* @__PURE__ */ jsx38(TableCell8, { className: "py-3 font-mono text-sm", children: request.endpoint }),
@@ -4608,9 +4562,9 @@ function RequestsPage() {
4608
4562
  /* @__PURE__ */ jsx38(TableCell8, { className: "py-3 text-muted-foreground", children: formatLatency(request.latency) }),
4609
4563
  /* @__PURE__ */ jsx38(TableCell8, { className: "py-3 text-muted-foreground", children: formatCost(request.cost) })
4610
4564
  ] }, request.id)),
4611
- filteredRequests.length === 0 && /* @__PURE__ */ jsx38(TableRow8, { children: /* @__PURE__ */ jsx38(TableCell8, { colSpan: 6, className: "py-16", children: /* @__PURE__ */ jsxs33("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
4565
+ filteredRequests.length === 0 && /* @__PURE__ */ jsx38(TableRow8, { children: /* @__PURE__ */ jsx38(TableCell8, { colSpan: 6, className: "py-16", children: /* @__PURE__ */ jsxs32("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
4612
4566
  /* @__PURE__ */ jsx38("div", { className: "rounded-full bg-muted p-4", children: /* @__PURE__ */ jsx38(Activity3, { className: "h-8 w-8 text-muted-foreground" }) }),
4613
- /* @__PURE__ */ jsxs33("div", { children: [
4567
+ /* @__PURE__ */ jsxs32("div", { children: [
4614
4568
  /* @__PURE__ */ jsx38("p", { className: "font-medium", children: "No requests found" }),
4615
4569
  /* @__PURE__ */ jsx38("p", { className: "text-sm text-muted-foreground mt-1", children: "No requests match the current filter." })
4616
4570
  ] })
@@ -4618,17 +4572,17 @@ function RequestsPage() {
4618
4572
  ] })
4619
4573
  ] }) })
4620
4574
  ] }),
4621
- /* @__PURE__ */ jsx38(Sheet, { open: sheetOpen, onOpenChange: setSheetOpen, children: /* @__PURE__ */ jsx38(SheetContent, { className: "w-full sm:max-w-lg overflow-y-auto", children: selectedRequest && /* @__PURE__ */ jsxs33(Fragment12, { children: [
4622
- /* @__PURE__ */ jsxs33(SheetHeader, { children: [
4623
- /* @__PURE__ */ jsxs33(SheetTitle, { className: "flex items-center gap-2", children: [
4575
+ /* @__PURE__ */ jsx38(Sheet, { open: sheetOpen, onOpenChange: setSheetOpen, children: /* @__PURE__ */ jsx38(SheetContent, { className: "w-full sm:max-w-lg overflow-y-auto", children: selectedRequest && /* @__PURE__ */ jsxs32(Fragment11, { children: [
4576
+ /* @__PURE__ */ jsxs32(SheetHeader, { children: [
4577
+ /* @__PURE__ */ jsxs32(SheetTitle, { className: "flex items-center gap-2", children: [
4624
4578
  /* @__PURE__ */ jsx38("span", { className: `font-mono ${methodColors[selectedRequest.method] || ""}`, children: selectedRequest.method }),
4625
4579
  /* @__PURE__ */ jsx38("span", { className: "font-mono text-muted-foreground font-normal", children: selectedRequest.endpoint })
4626
4580
  ] }),
4627
- /* @__PURE__ */ jsxs33(SheetDescription, { className: "flex items-center gap-2 text-sm", children: [
4581
+ /* @__PURE__ */ jsxs32(SheetDescription, { className: "flex items-center gap-2 text-sm", children: [
4628
4582
  /* @__PURE__ */ jsx38(StatusBadge, { status: selectedRequest.statusCode }),
4629
4583
  /* @__PURE__ */ jsx38("span", { className: "text-muted-foreground", children: "\u2022" }),
4630
4584
  /* @__PURE__ */ jsx38("span", { children: formatLatency(selectedRequest.latency) }),
4631
- selectedRequest.cost > 0 && /* @__PURE__ */ jsxs33(Fragment12, { children: [
4585
+ selectedRequest.cost > 0 && /* @__PURE__ */ jsxs32(Fragment11, { children: [
4632
4586
  /* @__PURE__ */ jsx38("span", { className: "text-muted-foreground", children: "\u2022" }),
4633
4587
  /* @__PURE__ */ jsx38("span", { children: formatCost(selectedRequest.cost) })
4634
4588
  ] }),
@@ -4636,12 +4590,12 @@ function RequestsPage() {
4636
4590
  /* @__PURE__ */ jsx38("span", { children: formatTimestamp(selectedRequest.timestamp) })
4637
4591
  ] })
4638
4592
  ] }),
4639
- /* @__PURE__ */ jsxs33("div", { className: "mt-6 space-y-6 px-4", children: [
4640
- /* @__PURE__ */ jsxs33("div", { children: [
4593
+ /* @__PURE__ */ jsxs32("div", { className: "mt-6 space-y-6 px-4", children: [
4594
+ /* @__PURE__ */ jsxs32("div", { children: [
4641
4595
  /* @__PURE__ */ jsx38("h4", { className: "text-sm font-semibold mb-2", children: "Request" }),
4642
4596
  /* @__PURE__ */ jsx38(JsonViewer, { data: selectedRequest.requestPayload })
4643
4597
  ] }),
4644
- /* @__PURE__ */ jsxs33("div", { children: [
4598
+ /* @__PURE__ */ jsxs32("div", { children: [
4645
4599
  /* @__PURE__ */ jsx38("h4", { className: "text-sm font-semibold mb-2", children: "Response" }),
4646
4600
  /* @__PURE__ */ jsx38(JsonViewer, { data: selectedRequest.responsePayload })
4647
4601
  ] })
@@ -4651,29 +4605,28 @@ function RequestsPage() {
4651
4605
  }
4652
4606
 
4653
4607
  // src/developer/pages/settings/profile.tsx
4608
+ import { useAuth as useAuth5, UserProfile as UserProfile2 } from "@mdxui/auth";
4654
4609
  import { Breadcrumb as Breadcrumb7, BreadcrumbItem as BreadcrumbItem7, BreadcrumbLink, BreadcrumbList as BreadcrumbList7, BreadcrumbPage as BreadcrumbPage7, BreadcrumbSeparator } from "@mdxui/primitives/breadcrumb";
4655
4610
  import { Separator as Separator9 } from "@mdxui/primitives/separator";
4656
4611
  import { SidebarTrigger as SidebarTrigger7 } from "@mdxui/primitives/sidebar";
4657
- import { useAuth as useAuth6 } from "@workos-inc/authkit-react";
4658
- import { UserProfile as UserProfile2 } from "@workos-inc/widgets";
4659
4612
  import { Link as Link4 } from "react-router-dom";
4660
- import { Fragment as Fragment13, jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
4613
+ import { Fragment as Fragment12, jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
4661
4614
  function SettingsProfilePage() {
4662
4615
  const { config } = useDashboard();
4663
4616
  const useMockWidgets = config.identity?.useMockWidgets ?? false;
4664
- const { user, getAccessToken, isLoading } = useAuth6();
4665
- return /* @__PURE__ */ jsxs34(Fragment13, { children: [
4666
- /* @__PURE__ */ jsx39("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2 px-4", children: [
4617
+ const { user, getAccessToken, isLoading } = useAuth5();
4618
+ return /* @__PURE__ */ jsxs33(Fragment12, { children: [
4619
+ /* @__PURE__ */ jsx39("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2 px-4", children: [
4667
4620
  /* @__PURE__ */ jsx39(SidebarTrigger7, { className: "-ml-1" }),
4668
4621
  /* @__PURE__ */ jsx39(Separator9, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
4669
- /* @__PURE__ */ jsx39(Breadcrumb7, { children: /* @__PURE__ */ jsxs34(BreadcrumbList7, { children: [
4622
+ /* @__PURE__ */ jsx39(Breadcrumb7, { children: /* @__PURE__ */ jsxs33(BreadcrumbList7, { children: [
4670
4623
  /* @__PURE__ */ jsx39(BreadcrumbItem7, { className: "hidden md:block", children: /* @__PURE__ */ jsx39(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx39(Link4, { to: "/settings/profile", children: "Settings" }) }) }),
4671
4624
  /* @__PURE__ */ jsx39(BreadcrumbSeparator, { className: "hidden md:block" }),
4672
4625
  /* @__PURE__ */ jsx39(BreadcrumbItem7, { children: /* @__PURE__ */ jsx39(BreadcrumbPage7, { children: "Profile" }) })
4673
4626
  ] }) })
4674
4627
  ] }) }),
4675
- /* @__PURE__ */ jsxs34("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4676
- /* @__PURE__ */ jsxs34("div", { children: [
4628
+ /* @__PURE__ */ jsxs33("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4629
+ /* @__PURE__ */ jsxs33("div", { children: [
4677
4630
  /* @__PURE__ */ jsx39("h1", { className: "text-2xl font-bold", children: "Profile" }),
4678
4631
  /* @__PURE__ */ jsx39("p", { className: "text-muted-foreground", children: "Manage your personal information and preferences." })
4679
4632
  ] }),
@@ -4683,21 +4636,20 @@ function SettingsProfilePage() {
4683
4636
  }
4684
4637
 
4685
4638
  // src/developer/pages/settings/security.tsx
4639
+ import { useAuth as useAuth6, UserSecurity } from "@mdxui/auth";
4686
4640
  import { Breadcrumb as Breadcrumb8, BreadcrumbItem as BreadcrumbItem8, BreadcrumbLink as BreadcrumbLink2, BreadcrumbList as BreadcrumbList8, BreadcrumbPage as BreadcrumbPage8, BreadcrumbSeparator as BreadcrumbSeparator2 } from "@mdxui/primitives/breadcrumb";
4687
4641
  import { Separator as Separator10 } from "@mdxui/primitives/separator";
4688
4642
  import { SidebarTrigger as SidebarTrigger8 } from "@mdxui/primitives/sidebar";
4689
- import { useAuth as useAuth7 } from "@workos-inc/authkit-react";
4690
- import { UserSecurity } from "@workos-inc/widgets";
4691
- import { useEffect as useEffect8, useRef as useRef2, useState as useState17 } from "react";
4643
+ import { useEffect as useEffect7, useRef as useRef2, useState as useState16 } from "react";
4692
4644
  import { Link as Link5 } from "react-router-dom";
4693
- import { Fragment as Fragment14, jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
4645
+ import { Fragment as Fragment13, jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
4694
4646
  function SettingsSecurityPage() {
4695
4647
  const { config } = useDashboard();
4696
4648
  const useMockWidgets = config.identity?.useMockWidgets ?? false;
4697
- const { user, getAccessToken, isLoading } = useAuth7();
4698
- const [isEmpty, setIsEmpty] = useState17(false);
4649
+ const { user, getAccessToken, isLoading } = useAuth6();
4650
+ const [isEmpty, setIsEmpty] = useState16(false);
4699
4651
  const containerRef = useRef2(null);
4700
- useEffect8(() => {
4652
+ useEffect7(() => {
4701
4653
  if (useMockWidgets || isLoading || !user) return;
4702
4654
  const timer = setTimeout(() => {
4703
4655
  if (containerRef.current) {
@@ -4710,18 +4662,18 @@ function SettingsSecurityPage() {
4710
4662
  }, 1e3);
4711
4663
  return () => clearTimeout(timer);
4712
4664
  }, [isLoading, user, useMockWidgets]);
4713
- return /* @__PURE__ */ jsxs35(Fragment14, { children: [
4714
- /* @__PURE__ */ jsx40("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2 px-4", children: [
4665
+ return /* @__PURE__ */ jsxs34(Fragment13, { children: [
4666
+ /* @__PURE__ */ jsx40("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2 px-4", children: [
4715
4667
  /* @__PURE__ */ jsx40(SidebarTrigger8, { className: "-ml-1" }),
4716
4668
  /* @__PURE__ */ jsx40(Separator10, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
4717
- /* @__PURE__ */ jsx40(Breadcrumb8, { children: /* @__PURE__ */ jsxs35(BreadcrumbList8, { children: [
4669
+ /* @__PURE__ */ jsx40(Breadcrumb8, { children: /* @__PURE__ */ jsxs34(BreadcrumbList8, { children: [
4718
4670
  /* @__PURE__ */ jsx40(BreadcrumbItem8, { className: "hidden md:block", children: /* @__PURE__ */ jsx40(BreadcrumbLink2, { asChild: true, children: /* @__PURE__ */ jsx40(Link5, { to: "/settings/profile", children: "Settings" }) }) }),
4719
4671
  /* @__PURE__ */ jsx40(BreadcrumbSeparator2, { className: "hidden md:block" }),
4720
4672
  /* @__PURE__ */ jsx40(BreadcrumbItem8, { children: /* @__PURE__ */ jsx40(BreadcrumbPage8, { children: "Security" }) })
4721
4673
  ] }) })
4722
4674
  ] }) }),
4723
- /* @__PURE__ */ jsxs35("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4724
- /* @__PURE__ */ jsxs35("div", { children: [
4675
+ /* @__PURE__ */ jsxs34("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4676
+ /* @__PURE__ */ jsxs34("div", { children: [
4725
4677
  /* @__PURE__ */ jsx40("h1", { className: "text-2xl font-bold", children: "Security" }),
4726
4678
  /* @__PURE__ */ jsx40("p", { className: "text-muted-foreground", children: "Manage your password, two-factor authentication, and recovery codes." })
4727
4679
  ] }),
@@ -4731,29 +4683,28 @@ function SettingsSecurityPage() {
4731
4683
  }
4732
4684
 
4733
4685
  // src/developer/pages/settings/sessions.tsx
4686
+ import { useAuth as useAuth7, UserSessions } from "@mdxui/auth";
4734
4687
  import { Breadcrumb as Breadcrumb9, BreadcrumbItem as BreadcrumbItem9, BreadcrumbLink as BreadcrumbLink3, BreadcrumbList as BreadcrumbList9, BreadcrumbPage as BreadcrumbPage9, BreadcrumbSeparator as BreadcrumbSeparator3 } from "@mdxui/primitives/breadcrumb";
4735
4688
  import { Separator as Separator11 } from "@mdxui/primitives/separator";
4736
4689
  import { SidebarTrigger as SidebarTrigger9 } from "@mdxui/primitives/sidebar";
4737
- import { useAuth as useAuth8 } from "@workos-inc/authkit-react";
4738
- import { UserSessions } from "@workos-inc/widgets";
4739
4690
  import { Link as Link6 } from "react-router-dom";
4740
- import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
4691
+ import { Fragment as Fragment14, jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
4741
4692
  function SettingsSessionsPage() {
4742
4693
  const { config } = useDashboard();
4743
4694
  const useMockWidgets = config.identity?.useMockWidgets ?? false;
4744
- const { user, getAccessToken, isLoading } = useAuth8();
4745
- return /* @__PURE__ */ jsxs36(Fragment15, { children: [
4746
- /* @__PURE__ */ jsx41("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2 px-4", children: [
4695
+ const { user, getAccessToken, isLoading } = useAuth7();
4696
+ return /* @__PURE__ */ jsxs35(Fragment14, { children: [
4697
+ /* @__PURE__ */ jsx41("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2 px-4", children: [
4747
4698
  /* @__PURE__ */ jsx41(SidebarTrigger9, { className: "-ml-1" }),
4748
4699
  /* @__PURE__ */ jsx41(Separator11, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
4749
- /* @__PURE__ */ jsx41(Breadcrumb9, { children: /* @__PURE__ */ jsxs36(BreadcrumbList9, { children: [
4700
+ /* @__PURE__ */ jsx41(Breadcrumb9, { children: /* @__PURE__ */ jsxs35(BreadcrumbList9, { children: [
4750
4701
  /* @__PURE__ */ jsx41(BreadcrumbItem9, { className: "hidden md:block", children: /* @__PURE__ */ jsx41(BreadcrumbLink3, { asChild: true, children: /* @__PURE__ */ jsx41(Link6, { to: "/settings/profile", children: "Settings" }) }) }),
4751
4702
  /* @__PURE__ */ jsx41(BreadcrumbSeparator3, { className: "hidden md:block" }),
4752
4703
  /* @__PURE__ */ jsx41(BreadcrumbItem9, { children: /* @__PURE__ */ jsx41(BreadcrumbPage9, { children: "Sessions" }) })
4753
4704
  ] }) })
4754
4705
  ] }) }),
4755
- /* @__PURE__ */ jsxs36("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4756
- /* @__PURE__ */ jsxs36("div", { children: [
4706
+ /* @__PURE__ */ jsxs35("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4707
+ /* @__PURE__ */ jsxs35("div", { children: [
4757
4708
  /* @__PURE__ */ jsx41("h1", { className: "text-2xl font-bold", children: "Sessions" }),
4758
4709
  /* @__PURE__ */ jsx41("p", { className: "text-muted-foreground", children: "View and manage your active sessions across devices." })
4759
4710
  ] }),
@@ -4763,45 +4714,72 @@ function SettingsSessionsPage() {
4763
4714
  }
4764
4715
 
4765
4716
  // src/developer/pages/team.tsx
4766
- import { Breadcrumb as Breadcrumb10, BreadcrumbItem as BreadcrumbItem10, BreadcrumbList as BreadcrumbList10, BreadcrumbPage as BreadcrumbPage10 } from "@mdxui/primitives/breadcrumb";
4717
+ import { UsersManagement, useAuth as useAuth8 } from "@mdxui/auth";
4718
+ import {
4719
+ Breadcrumb as Breadcrumb10,
4720
+ BreadcrumbItem as BreadcrumbItem10,
4721
+ BreadcrumbList as BreadcrumbList10,
4722
+ BreadcrumbPage as BreadcrumbPage10
4723
+ } from "@mdxui/primitives/breadcrumb";
4767
4724
  import { Separator as Separator12 } from "@mdxui/primitives/separator";
4768
4725
  import { SidebarTrigger as SidebarTrigger10 } from "@mdxui/primitives/sidebar";
4769
- import { useAuth as useAuth9 } from "@workos-inc/authkit-react";
4770
- import { UsersManagement } from "@workos-inc/widgets";
4771
- import { Fragment as Fragment16, jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
4726
+ import { Fragment as Fragment15, jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
4772
4727
  function TeamPage({
4773
4728
  useMockWidgets: useMockWidgetsProp,
4774
4729
  hideHeader = false,
4775
4730
  className
4776
4731
  } = {}) {
4777
- let useMockWidgets = useMockWidgetsProp;
4778
- try {
4779
- const { config } = useDashboard();
4780
- if (useMockWidgets === void 0) {
4781
- useMockWidgets = config.identity?.useMockWidgets ?? false;
4782
- }
4783
- } catch {
4784
- useMockWidgets = useMockWidgetsProp ?? false;
4785
- }
4786
- const { user, getAccessToken, isLoading, organizationId, permissions } = useAuth9();
4787
- const hasOrganization = !!organizationId;
4788
- const canManageTeam = hasOrganization && permissions?.includes("widgets:users-table:manage");
4789
- const loading = !useMockWidgets && isLoading;
4790
- return /* @__PURE__ */ jsxs37(Fragment16, { children: [
4791
- !hideHeader && /* @__PURE__ */ jsx42("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2 px-4", children: [
4732
+ const { config } = useDashboard();
4733
+ const useMockWidgets = config.identity?.useMockWidgets ?? useMockWidgetsProp ?? false;
4734
+ return /* @__PURE__ */ jsxs36(Fragment15, { children: [
4735
+ !hideHeader && /* @__PURE__ */ jsx42("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2 px-4", children: [
4792
4736
  /* @__PURE__ */ jsx42(SidebarTrigger10, { className: "-ml-1" }),
4793
- /* @__PURE__ */ jsx42(Separator12, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
4737
+ /* @__PURE__ */ jsx42(
4738
+ Separator12,
4739
+ {
4740
+ orientation: "vertical",
4741
+ className: "mr-2 data-[orientation=vertical]:h-4"
4742
+ }
4743
+ ),
4794
4744
  /* @__PURE__ */ jsx42(Breadcrumb10, { children: /* @__PURE__ */ jsx42(BreadcrumbList10, { children: /* @__PURE__ */ jsx42(BreadcrumbItem10, { children: /* @__PURE__ */ jsx42(BreadcrumbPage10, { children: "Team" }) }) }) })
4795
4745
  ] }) }),
4796
- /* @__PURE__ */ jsxs37("div", { className: `flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 ${hideHeader ? "" : "pt-0"} ${className ?? ""}`, children: [
4797
- /* @__PURE__ */ jsxs37("div", { children: [
4798
- /* @__PURE__ */ jsx42("h1", { className: "text-2xl font-bold", children: "Team" }),
4799
- /* @__PURE__ */ jsx42("p", { className: "text-muted-foreground", children: "Manage your team members and their permissions." })
4800
- ] }),
4801
- useMockWidgets ? /* @__PURE__ */ jsx42(MockUsersManagement, {}) : loading ? /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center py-12 text-muted-foreground", children: "Loading..." }) : !user ? /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center rounded-md border border-dashed py-24", children: /* @__PURE__ */ jsx42("p", { className: "text-muted-foreground text-sm", children: "Please sign in to manage your team." }) }) : !hasOrganization ? /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center rounded-md border border-dashed py-24", children: /* @__PURE__ */ jsx42("p", { className: "text-muted-foreground text-sm", children: "You need to be part of an organization to manage team members." }) }) : !canManageTeam ? /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center rounded-md border border-dashed py-24", children: /* @__PURE__ */ jsx42("p", { className: "text-muted-foreground text-sm", children: "You need admin permissions to manage team members." }) }) : /* @__PURE__ */ jsx42(UsersManagement, { authToken: getAccessToken })
4802
- ] })
4746
+ /* @__PURE__ */ jsxs36(
4747
+ "div",
4748
+ {
4749
+ className: `flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 ${hideHeader ? "" : "pt-0"} ${className ?? ""}`,
4750
+ children: [
4751
+ /* @__PURE__ */ jsxs36("div", { children: [
4752
+ /* @__PURE__ */ jsx42("h1", { className: "text-2xl font-bold", children: "Team" }),
4753
+ /* @__PURE__ */ jsx42("p", { className: "text-muted-foreground", children: "Manage your team members and their permissions." })
4754
+ ] }),
4755
+ /* @__PURE__ */ jsx42(TeamPageContent, { useMockWidgets })
4756
+ ]
4757
+ }
4758
+ )
4803
4759
  ] });
4804
4760
  }
4761
+ function TeamPageContent({ useMockWidgets }) {
4762
+ const { user, getAccessToken, isLoading, organizationId, permissions } = useAuth8();
4763
+ const hasOrganization = !!organizationId;
4764
+ const canManageTeam = hasOrganization && permissions?.includes("widgets:users-table:manage");
4765
+ const loading = !useMockWidgets && isLoading;
4766
+ if (loading) {
4767
+ return /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center py-12 text-muted-foreground", children: "Loading..." });
4768
+ }
4769
+ if (!user) {
4770
+ return /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center rounded-md border border-dashed py-24", children: /* @__PURE__ */ jsx42("p", { className: "text-muted-foreground text-sm", children: "Please sign in to manage your team." }) });
4771
+ }
4772
+ if (!hasOrganization) {
4773
+ return /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center rounded-md border border-dashed py-24", children: /* @__PURE__ */ jsx42("p", { className: "text-muted-foreground text-sm", children: "You need to be part of an organization to manage team members." }) });
4774
+ }
4775
+ if (!canManageTeam) {
4776
+ return /* @__PURE__ */ jsx42("div", { className: "flex items-center justify-center rounded-md border border-dashed py-24", children: /* @__PURE__ */ jsx42("p", { className: "text-muted-foreground text-sm", children: "You need admin permissions to manage team members." }) });
4777
+ }
4778
+ if (useMockWidgets) {
4779
+ return /* @__PURE__ */ jsx42(MockUsersManagement, {});
4780
+ }
4781
+ return /* @__PURE__ */ jsx42(UsersManagement, { authToken: getAccessToken });
4782
+ }
4805
4783
 
4806
4784
  // src/developer/pages/vault.tsx
4807
4785
  import { Breadcrumb as Breadcrumb11, BreadcrumbItem as BreadcrumbItem11, BreadcrumbList as BreadcrumbList11, BreadcrumbPage as BreadcrumbPage11 } from "@mdxui/primitives/breadcrumb";
@@ -4809,9 +4787,9 @@ import { Button as Button16 } from "@mdxui/primitives/button";
4809
4787
  import { Separator as Separator13 } from "@mdxui/primitives/separator";
4810
4788
  import { SidebarTrigger as SidebarTrigger11 } from "@mdxui/primitives/sidebar";
4811
4789
  import { Plus as Plus6 } from "lucide-react";
4812
- import { useState as useState18 } from "react";
4790
+ import { useState as useState17 } from "react";
4813
4791
  import { toast as toast6 } from "sonner";
4814
- import { Fragment as Fragment17, jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
4792
+ import { Fragment as Fragment16, jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
4815
4793
  var pendingCredentialRequest = {
4816
4794
  id: "stripe",
4817
4795
  name: "Stripe",
@@ -4822,14 +4800,14 @@ var pendingCredentialRequest = {
4822
4800
  ]
4823
4801
  };
4824
4802
  function VaultPage() {
4825
- const [items, setItems] = useState18(mockVaultItems);
4826
- const [addModalOpen, setAddModalOpen] = useState18(false);
4827
- const [pendingIntegration, setPendingIntegration] = useState18(null);
4803
+ const [items, setItems] = useState17(mockVaultItems);
4804
+ const [addModalOpen, setAddModalOpen] = useState17(false);
4805
+ const [pendingIntegration, setPendingIntegration] = useState17(null);
4828
4806
  const handleOpenAddModal = () => {
4829
4807
  setPendingIntegration(pendingCredentialRequest);
4830
4808
  setAddModalOpen(true);
4831
4809
  };
4832
- const handleAdd = async (credentials) => {
4810
+ const handleAdd = async (_credentials) => {
4833
4811
  if (!pendingIntegration) return;
4834
4812
  const newItem = {
4835
4813
  id: Date.now().toString(),
@@ -4846,7 +4824,7 @@ function VaultPage() {
4846
4824
  setAddModalOpen(false);
4847
4825
  setPendingIntegration(null);
4848
4826
  };
4849
- const handleRotate = async (id, credentials) => {
4827
+ const handleRotate = async (id, _credentials) => {
4850
4828
  const item = items.find((i) => i.id === id);
4851
4829
  setItems((prev) => prev.map((i) => i.id === id ? { ...i, updatedAt: /* @__PURE__ */ new Date() } : i));
4852
4830
  toast6.success(`${item?.name || "Credentials"} rotated successfully`);
@@ -4856,19 +4834,19 @@ function VaultPage() {
4856
4834
  setItems((prev) => prev.filter((i) => i.id !== id));
4857
4835
  toast6.success(`${item?.name || "Credentials"} deleted successfully`);
4858
4836
  };
4859
- return /* @__PURE__ */ jsxs38(Fragment17, { children: [
4860
- /* @__PURE__ */ jsx43("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2 px-4", children: [
4837
+ return /* @__PURE__ */ jsxs37(Fragment16, { children: [
4838
+ /* @__PURE__ */ jsx43("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2 px-4", children: [
4861
4839
  /* @__PURE__ */ jsx43(SidebarTrigger11, { className: "-ml-1" }),
4862
4840
  /* @__PURE__ */ jsx43(Separator13, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
4863
4841
  /* @__PURE__ */ jsx43(Breadcrumb11, { children: /* @__PURE__ */ jsx43(BreadcrumbList11, { children: /* @__PURE__ */ jsx43(BreadcrumbItem11, { children: /* @__PURE__ */ jsx43(BreadcrumbPage11, { children: "Vault" }) }) }) })
4864
4842
  ] }) }),
4865
- /* @__PURE__ */ jsxs38("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4866
- /* @__PURE__ */ jsxs38("div", { className: "flex items-center justify-between", children: [
4867
- /* @__PURE__ */ jsxs38("div", { children: [
4843
+ /* @__PURE__ */ jsxs37("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4844
+ /* @__PURE__ */ jsxs37("div", { className: "flex items-center justify-between", children: [
4845
+ /* @__PURE__ */ jsxs37("div", { children: [
4868
4846
  /* @__PURE__ */ jsx43("h1", { className: "text-2xl font-bold", children: "Vault" }),
4869
4847
  /* @__PURE__ */ jsx43("p", { className: "text-muted-foreground", children: "Securely stored credentials for your agents." })
4870
4848
  ] }),
4871
- items.length > 0 && /* @__PURE__ */ jsxs38(Button16, { onClick: handleOpenAddModal, children: [
4849
+ items.length > 0 && /* @__PURE__ */ jsxs37(Button16, { onClick: handleOpenAddModal, children: [
4872
4850
  /* @__PURE__ */ jsx43(Plus6, { className: "h-4 w-4" }),
4873
4851
  "Add Credential"
4874
4852
  ] })
@@ -4918,9 +4896,9 @@ import { Progress as Progress2 } from "@mdxui/primitives/progress";
4918
4896
  import { Separator as Separator14 } from "@mdxui/primitives/separator";
4919
4897
  import { SidebarTrigger as SidebarTrigger12 } from "@mdxui/primitives/sidebar";
4920
4898
  import { Activity as Activity4, AlertTriangle as AlertTriangle3, CheckCircle2 as CheckCircle22, ChevronDown as ChevronDown3, Clock, XCircle } from "lucide-react";
4921
- import { useState as useState19 } from "react";
4899
+ import { useState as useState18 } from "react";
4922
4900
  import { Link as Link7 } from "react-router-dom";
4923
- import { Fragment as Fragment18, jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
4901
+ import { Fragment as Fragment17, jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
4924
4902
  var periodOptions = [
4925
4903
  { value: "7d", label: "Last 7 days" },
4926
4904
  { value: "24h", label: "Last 24 hours" },
@@ -4932,7 +4910,7 @@ var periodMultipliers = {
4932
4910
  "30d": 30
4933
4911
  };
4934
4912
  function WebhooksActivityPage() {
4935
- const [period, setPeriod] = useState19("7d");
4913
+ const [period, setPeriod] = useState18("7d");
4936
4914
  const multiplier = periodMultipliers[period];
4937
4915
  const activity = {
4938
4916
  delivered: Math.round(mockWebhookActivity.delivered * multiplier),
@@ -4945,80 +4923,80 @@ function WebhooksActivityPage() {
4945
4923
  }))
4946
4924
  };
4947
4925
  const total = activity.delivered + activity.failed + activity.pending;
4948
- return /* @__PURE__ */ jsxs39(Fragment18, { children: [
4949
- /* @__PURE__ */ jsx44("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2 px-4", children: [
4926
+ return /* @__PURE__ */ jsxs38(Fragment17, { children: [
4927
+ /* @__PURE__ */ jsx44("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2 px-4", children: [
4950
4928
  /* @__PURE__ */ jsx44(SidebarTrigger12, { className: "-ml-1" }),
4951
4929
  /* @__PURE__ */ jsx44(Separator14, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
4952
- /* @__PURE__ */ jsx44(Breadcrumb12, { children: /* @__PURE__ */ jsxs39(BreadcrumbList12, { children: [
4930
+ /* @__PURE__ */ jsx44(Breadcrumb12, { children: /* @__PURE__ */ jsxs38(BreadcrumbList12, { children: [
4953
4931
  /* @__PURE__ */ jsx44(BreadcrumbItem12, { children: /* @__PURE__ */ jsx44(BreadcrumbLink4, { asChild: true, children: /* @__PURE__ */ jsx44(Link7, { to: "/webhooks", children: "Webhooks" }) }) }),
4954
4932
  /* @__PURE__ */ jsx44(BreadcrumbSeparator4, {}),
4955
4933
  /* @__PURE__ */ jsx44(BreadcrumbItem12, { children: /* @__PURE__ */ jsx44(BreadcrumbPage12, { children: "Activity" }) })
4956
4934
  ] }) })
4957
4935
  ] }) }),
4958
- /* @__PURE__ */ jsxs39("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4959
- /* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-between", children: [
4960
- /* @__PURE__ */ jsxs39("div", { children: [
4936
+ /* @__PURE__ */ jsxs38("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
4937
+ /* @__PURE__ */ jsxs38("div", { className: "flex items-center justify-between", children: [
4938
+ /* @__PURE__ */ jsxs38("div", { children: [
4961
4939
  /* @__PURE__ */ jsx44("h1", { className: "text-2xl font-bold", children: "Webhook Activity" }),
4962
4940
  /* @__PURE__ */ jsx44("p", { className: "text-muted-foreground", children: "Monitor webhook health and delivery status." })
4963
4941
  ] }),
4964
- /* @__PURE__ */ jsxs39(DropdownMenu7, { children: [
4965
- /* @__PURE__ */ jsx44(DropdownMenuTrigger7, { asChild: true, children: /* @__PURE__ */ jsxs39(Button17, { variant: "outline", className: "w-[160px] justify-between", children: [
4942
+ /* @__PURE__ */ jsxs38(DropdownMenu7, { children: [
4943
+ /* @__PURE__ */ jsx44(DropdownMenuTrigger7, { asChild: true, children: /* @__PURE__ */ jsxs38(Button17, { variant: "outline", className: "w-[160px] justify-between", children: [
4966
4944
  periodOptions.find((o) => o.value === period)?.label,
4967
4945
  /* @__PURE__ */ jsx44(ChevronDown3, { className: "h-4 w-4 opacity-50" })
4968
4946
  ] }) }),
4969
4947
  /* @__PURE__ */ jsx44(DropdownMenuContent7, { align: "end", className: "w-[160px]", children: periodOptions.map((option) => /* @__PURE__ */ jsx44(DropdownMenuItem7, { onClick: () => setPeriod(option.value), children: option.label }, option.value)) })
4970
4948
  ] })
4971
4949
  ] }),
4972
- total === 0 ? /* @__PURE__ */ jsx44(Card16, { children: /* @__PURE__ */ jsx44(CardContent15, { className: "py-16", children: /* @__PURE__ */ jsxs39("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
4950
+ total === 0 ? /* @__PURE__ */ jsx44(Card16, { children: /* @__PURE__ */ jsx44(CardContent15, { className: "py-16", children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
4973
4951
  /* @__PURE__ */ jsx44("div", { className: "rounded-full bg-muted p-4", children: /* @__PURE__ */ jsx44(Activity4, { className: "h-8 w-8 text-muted-foreground" }) }),
4974
- /* @__PURE__ */ jsxs39("div", { children: [
4952
+ /* @__PURE__ */ jsxs38("div", { children: [
4975
4953
  /* @__PURE__ */ jsx44("p", { className: "font-medium", children: "No activity yet" }),
4976
4954
  /* @__PURE__ */ jsx44("p", { className: "text-sm text-muted-foreground mt-1", children: "Webhook activity will appear here once you start receiving events." })
4977
4955
  ] })
4978
- ] }) }) }) : /* @__PURE__ */ jsxs39(Fragment18, { children: [
4979
- /* @__PURE__ */ jsxs39("div", { className: "grid gap-4 md:grid-cols-3", children: [
4980
- /* @__PURE__ */ jsxs39(Card16, { children: [
4981
- /* @__PURE__ */ jsxs39(CardHeader14, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4956
+ ] }) }) }) : /* @__PURE__ */ jsxs38(Fragment17, { children: [
4957
+ /* @__PURE__ */ jsxs38("div", { className: "grid gap-4 md:grid-cols-3", children: [
4958
+ /* @__PURE__ */ jsxs38(Card16, { children: [
4959
+ /* @__PURE__ */ jsxs38(CardHeader14, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4982
4960
  /* @__PURE__ */ jsx44(CardTitle14, { className: "text-sm font-medium", children: "Delivered" }),
4983
4961
  /* @__PURE__ */ jsx44(CheckCircle22, { className: "h-4 w-4 text-success" })
4984
4962
  ] }),
4985
- /* @__PURE__ */ jsxs39(CardContent15, { children: [
4963
+ /* @__PURE__ */ jsxs38(CardContent15, { children: [
4986
4964
  /* @__PURE__ */ jsx44("div", { className: "text-2xl font-bold", children: activity.delivered.toLocaleString() }),
4987
- /* @__PURE__ */ jsxs39("p", { className: "text-xs text-muted-foreground", children: [
4965
+ /* @__PURE__ */ jsxs38("p", { className: "text-xs text-muted-foreground", children: [
4988
4966
  (activity.delivered / total * 100).toFixed(1),
4989
4967
  "% of total"
4990
4968
  ] })
4991
4969
  ] })
4992
4970
  ] }),
4993
- /* @__PURE__ */ jsxs39(Card16, { children: [
4994
- /* @__PURE__ */ jsxs39(CardHeader14, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4971
+ /* @__PURE__ */ jsxs38(Card16, { children: [
4972
+ /* @__PURE__ */ jsxs38(CardHeader14, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4995
4973
  /* @__PURE__ */ jsx44(CardTitle14, { className: "text-sm font-medium", children: "Failed" }),
4996
4974
  /* @__PURE__ */ jsx44(XCircle, { className: "h-4 w-4 text-destructive" })
4997
4975
  ] }),
4998
- /* @__PURE__ */ jsxs39(CardContent15, { children: [
4976
+ /* @__PURE__ */ jsxs38(CardContent15, { children: [
4999
4977
  /* @__PURE__ */ jsx44("div", { className: "text-2xl font-bold", children: activity.failed.toLocaleString() }),
5000
- /* @__PURE__ */ jsxs39("p", { className: "text-xs text-muted-foreground", children: [
4978
+ /* @__PURE__ */ jsxs38("p", { className: "text-xs text-muted-foreground", children: [
5001
4979
  (activity.failed / total * 100).toFixed(1),
5002
4980
  "% of total"
5003
4981
  ] })
5004
4982
  ] })
5005
4983
  ] }),
5006
- /* @__PURE__ */ jsxs39(Card16, { children: [
5007
- /* @__PURE__ */ jsxs39(CardHeader14, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
4984
+ /* @__PURE__ */ jsxs38(Card16, { children: [
4985
+ /* @__PURE__ */ jsxs38(CardHeader14, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
5008
4986
  /* @__PURE__ */ jsx44(CardTitle14, { className: "text-sm font-medium", children: "Pending" }),
5009
4987
  /* @__PURE__ */ jsx44(Clock, { className: "h-4 w-4 text-warning" })
5010
4988
  ] }),
5011
- /* @__PURE__ */ jsxs39(CardContent15, { children: [
4989
+ /* @__PURE__ */ jsxs38(CardContent15, { children: [
5012
4990
  /* @__PURE__ */ jsx44("div", { className: "text-2xl font-bold", children: activity.pending.toLocaleString() }),
5013
4991
  /* @__PURE__ */ jsx44("p", { className: "text-xs text-muted-foreground", children: "Waiting for delivery" })
5014
4992
  ] })
5015
4993
  ] })
5016
4994
  ] }),
5017
- /* @__PURE__ */ jsxs39(Card16, { children: [
4995
+ /* @__PURE__ */ jsxs38(Card16, { children: [
5018
4996
  /* @__PURE__ */ jsx44(CardHeader14, { children: /* @__PURE__ */ jsx44(CardTitle14, { className: "text-sm font-medium", children: "Delivery Success Rate" }) }),
5019
- /* @__PURE__ */ jsxs39(CardContent15, { children: [
5020
- /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-4", children: [
5021
- /* @__PURE__ */ jsxs39(
4997
+ /* @__PURE__ */ jsxs38(CardContent15, { children: [
4998
+ /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-4", children: [
4999
+ /* @__PURE__ */ jsxs38(
5022
5000
  "div",
5023
5001
  {
5024
5002
  className: cn7(
@@ -5042,7 +5020,7 @@ function WebhooksActivityPage() {
5042
5020
  }
5043
5021
  ) })
5044
5022
  ] }),
5045
- /* @__PURE__ */ jsxs39("p", { className: "text-sm text-muted-foreground mt-2", children: [
5023
+ /* @__PURE__ */ jsxs38("p", { className: "text-sm text-muted-foreground mt-2", children: [
5046
5024
  activity.delivered.toLocaleString(),
5047
5025
  " of ",
5048
5026
  total.toLocaleString(),
@@ -5050,19 +5028,19 @@ function WebhooksActivityPage() {
5050
5028
  ] })
5051
5029
  ] })
5052
5030
  ] }),
5053
- activity.endpointsWithIssues.length > 0 && /* @__PURE__ */ jsxs39(Card16, { children: [
5054
- /* @__PURE__ */ jsx44(CardHeader14, { children: /* @__PURE__ */ jsxs39(CardTitle14, { className: "text-sm font-medium flex items-center gap-2", children: [
5031
+ activity.endpointsWithIssues.length > 0 && /* @__PURE__ */ jsxs38(Card16, { children: [
5032
+ /* @__PURE__ */ jsx44(CardHeader14, { children: /* @__PURE__ */ jsxs38(CardTitle14, { className: "text-sm font-medium flex items-center gap-2", children: [
5055
5033
  /* @__PURE__ */ jsx44(AlertTriangle3, { className: "h-4 w-4 text-warning" }),
5056
5034
  "Endpoints with Issues"
5057
5035
  ] }) }),
5058
- /* @__PURE__ */ jsx44(CardContent15, { children: /* @__PURE__ */ jsx44("div", { className: "space-y-3", children: activity.endpointsWithIssues.map((endpoint) => /* @__PURE__ */ jsxs39(
5036
+ /* @__PURE__ */ jsx44(CardContent15, { children: /* @__PURE__ */ jsx44("div", { className: "space-y-3", children: activity.endpointsWithIssues.map((endpoint) => /* @__PURE__ */ jsxs38(
5059
5037
  "div",
5060
5038
  {
5061
5039
  className: "flex items-center justify-between p-3 rounded-md bg-muted/50",
5062
5040
  children: [
5063
5041
  /* @__PURE__ */ jsx44("span", { className: "font-mono text-sm truncate flex-1", children: endpoint.url }),
5064
- /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-4 ml-4", children: [
5065
- /* @__PURE__ */ jsxs39("span", { className: "text-sm text-destructive font-medium", children: [
5042
+ /* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-4 ml-4", children: [
5043
+ /* @__PURE__ */ jsxs38("span", { className: "text-sm text-destructive font-medium", children: [
5066
5044
  endpoint.failures,
5067
5045
  " failures"
5068
5046
  ] }),
@@ -5099,10 +5077,10 @@ import { Separator as Separator15 } from "@mdxui/primitives/separator";
5099
5077
  import { SidebarTrigger as SidebarTrigger13 } from "@mdxui/primitives/sidebar";
5100
5078
  import { Switch as Switch2 } from "@mdxui/primitives/switch";
5101
5079
  import { Check as Check4, Circle, Copy as Copy4, Link2 as Link22, MoreHorizontal as MoreHorizontal5, Pencil as Pencil2, Plus as Plus7, RefreshCw, Trash2 as Trash25 } from "lucide-react";
5102
- import { useState as useState20 } from "react";
5080
+ import { useState as useState19 } from "react";
5103
5081
  import { Link as Link8 } from "react-router-dom";
5104
5082
  import { toast as toast7 } from "sonner";
5105
- import { Fragment as Fragment19, jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
5083
+ import { Fragment as Fragment18, jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
5106
5084
  function formatRelativeTime(timestamp) {
5107
5085
  if (!timestamp) return "Never";
5108
5086
  const date = new Date(timestamp);
@@ -5131,15 +5109,15 @@ function WebhooksEndpointsPage({
5131
5109
  hideHeader = false,
5132
5110
  className
5133
5111
  } = {}) {
5134
- const [endpoints, setEndpoints] = useState20(initialEndpoints ?? mockWebhookEndpoints);
5135
- const [createDialogOpen, setCreateDialogOpen] = useState20(false);
5136
- const [editDialogOpen, setEditDialogOpen] = useState20(false);
5137
- const [deleteDialogOpen, setDeleteDialogOpen] = useState20(false);
5138
- const [selectedEndpoint, setSelectedEndpoint] = useState20(null);
5139
- const [copiedSecret, setCopiedSecret] = useState20(null);
5140
- const [formUrl, setFormUrl] = useState20("");
5141
- const [formEvents, setFormEvents] = useState20([]);
5142
- const [formEnabled, setFormEnabled] = useState20(true);
5112
+ const [endpoints, setEndpoints] = useState19(initialEndpoints ?? mockWebhookEndpoints);
5113
+ const [createDialogOpen, setCreateDialogOpen] = useState19(false);
5114
+ const [editDialogOpen, setEditDialogOpen] = useState19(false);
5115
+ const [deleteDialogOpen, setDeleteDialogOpen] = useState19(false);
5116
+ const [selectedEndpoint, setSelectedEndpoint] = useState19(null);
5117
+ const [copiedSecret, setCopiedSecret] = useState19(null);
5118
+ const [formUrl, setFormUrl] = useState19("");
5119
+ const [formEvents, setFormEvents] = useState19([]);
5120
+ const [formEnabled, setFormEnabled] = useState19(true);
5143
5121
  const resetForm = () => {
5144
5122
  setFormUrl("");
5145
5123
  setFormEvents([]);
@@ -5246,35 +5224,35 @@ function WebhooksEndpointsPage({
5246
5224
  setFormEvents([...formEvents, eventName]);
5247
5225
  }
5248
5226
  };
5249
- return /* @__PURE__ */ jsxs40(Fragment19, { children: [
5250
- !hideHeader && /* @__PURE__ */ jsx45("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2 px-4", children: [
5227
+ return /* @__PURE__ */ jsxs39(Fragment18, { children: [
5228
+ !hideHeader && /* @__PURE__ */ jsx45("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2 px-4", children: [
5251
5229
  /* @__PURE__ */ jsx45(SidebarTrigger13, { className: "-ml-1" }),
5252
5230
  /* @__PURE__ */ jsx45(Separator15, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
5253
- /* @__PURE__ */ jsx45(Breadcrumb13, { children: /* @__PURE__ */ jsxs40(BreadcrumbList13, { children: [
5231
+ /* @__PURE__ */ jsx45(Breadcrumb13, { children: /* @__PURE__ */ jsxs39(BreadcrumbList13, { children: [
5254
5232
  /* @__PURE__ */ jsx45(BreadcrumbItem13, { children: /* @__PURE__ */ jsx45(BreadcrumbLink5, { asChild: true, children: /* @__PURE__ */ jsx45(Link8, { to: "/webhooks", children: "Webhooks" }) }) }),
5255
5233
  /* @__PURE__ */ jsx45(BreadcrumbSeparator5, {}),
5256
5234
  /* @__PURE__ */ jsx45(BreadcrumbItem13, { children: /* @__PURE__ */ jsx45(BreadcrumbPage13, { children: "Endpoints" }) })
5257
5235
  ] }) })
5258
5236
  ] }) }),
5259
- /* @__PURE__ */ jsxs40("div", { className: `flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 ${hideHeader ? "" : "pt-0"} ${className ?? ""}`, children: [
5260
- /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between", children: [
5261
- /* @__PURE__ */ jsxs40("div", { children: [
5237
+ /* @__PURE__ */ jsxs39("div", { className: `flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 ${hideHeader ? "" : "pt-0"} ${className ?? ""}`, children: [
5238
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-between", children: [
5239
+ /* @__PURE__ */ jsxs39("div", { children: [
5262
5240
  /* @__PURE__ */ jsx45("h1", { className: "text-2xl font-bold", children: "Endpoints" }),
5263
5241
  /* @__PURE__ */ jsx45("p", { className: "text-muted-foreground", children: "Manage your webhook subscription endpoints." })
5264
5242
  ] }),
5265
- /* @__PURE__ */ jsxs40(Dialog8, { open: createDialogOpen, onOpenChange: setCreateDialogOpen, children: [
5266
- /* @__PURE__ */ jsx45(DialogTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs40(Button18, { onClick: resetForm, children: [
5243
+ /* @__PURE__ */ jsxs39(Dialog8, { open: createDialogOpen, onOpenChange: setCreateDialogOpen, children: [
5244
+ /* @__PURE__ */ jsx45(DialogTrigger5, { asChild: true, children: /* @__PURE__ */ jsxs39(Button18, { onClick: resetForm, children: [
5267
5245
  /* @__PURE__ */ jsx45(Plus7, { className: "h-4 w-4" }),
5268
5246
  "Add Endpoint"
5269
5247
  ] }) }),
5270
- /* @__PURE__ */ jsxs40(DialogContent8, { className: "sm:max-w-xl", children: [
5271
- /* @__PURE__ */ jsxs40(DialogHeader7, { children: [
5248
+ /* @__PURE__ */ jsxs39(DialogContent8, { className: "sm:max-w-xl", children: [
5249
+ /* @__PURE__ */ jsxs39(DialogHeader7, { children: [
5272
5250
  /* @__PURE__ */ jsx45(DialogTitle7, { children: "Add Webhook Endpoint" }),
5273
5251
  /* @__PURE__ */ jsx45(DialogDescription6, { children: "Configure a new endpoint to receive webhook events." })
5274
5252
  ] }),
5275
- /* @__PURE__ */ jsxs40("div", { className: "space-y-6", children: [
5276
- /* @__PURE__ */ jsxs40("div", { className: "space-y-4", children: [
5277
- /* @__PURE__ */ jsxs40("div", { className: "space-y-2", children: [
5253
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-6", children: [
5254
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-4", children: [
5255
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-2", children: [
5278
5256
  /* @__PURE__ */ jsx45(Label8, { htmlFor: "url", children: "Endpoint URL" }),
5279
5257
  /* @__PURE__ */ jsx45(
5280
5258
  Input9,
@@ -5286,15 +5264,15 @@ function WebhooksEndpointsPage({
5286
5264
  }
5287
5265
  )
5288
5266
  ] }),
5289
- /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between rounded-lg border p-3", children: [
5290
- /* @__PURE__ */ jsxs40("div", { className: "space-y-0.5", children: [
5267
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-between rounded-lg border p-3", children: [
5268
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-0.5", children: [
5291
5269
  /* @__PURE__ */ jsx45(Label8, { htmlFor: "enabled", className: "text-sm font-medium", children: "Active" }),
5292
5270
  /* @__PURE__ */ jsx45("p", { className: "text-xs text-muted-foreground", children: "Enable this endpoint to receive events" })
5293
5271
  ] }),
5294
5272
  /* @__PURE__ */ jsx45(Switch2, { id: "enabled", checked: formEnabled, onCheckedChange: setFormEnabled })
5295
5273
  ] })
5296
5274
  ] }),
5297
- /* @__PURE__ */ jsxs40("div", { className: "space-y-3", children: [
5275
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-3", children: [
5298
5276
  /* @__PURE__ */ jsx45(Label8, { children: "Events to subscribe" }),
5299
5277
  /* @__PURE__ */ jsx45("div", { className: "rounded-lg border divide-y", children: Object.entries(eventsByCategory).map(([category, events]) => {
5300
5278
  const categoryEvents = events.map((e) => e.name);
@@ -5307,8 +5285,8 @@ function WebhooksEndpointsPage({
5307
5285
  setFormEvents([.../* @__PURE__ */ new Set([...formEvents, ...categoryEvents])]);
5308
5286
  }
5309
5287
  };
5310
- return /* @__PURE__ */ jsxs40("div", { className: "p-3 space-y-2", children: [
5311
- /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2", children: [
5288
+ return /* @__PURE__ */ jsxs39("div", { className: "p-3 space-y-2", children: [
5289
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
5312
5290
  /* @__PURE__ */ jsx45(
5313
5291
  Checkbox,
5314
5292
  {
@@ -5320,7 +5298,7 @@ function WebhooksEndpointsPage({
5320
5298
  ),
5321
5299
  /* @__PURE__ */ jsx45(Label8, { htmlFor: `category-${category}`, className: "text-sm font-medium cursor-pointer", children: category })
5322
5300
  ] }),
5323
- /* @__PURE__ */ jsx45("div", { className: "ml-6 space-y-1.5", children: events.map((event) => /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2", children: [
5301
+ /* @__PURE__ */ jsx45("div", { className: "ml-6 space-y-1.5", children: events.map((event) => /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
5324
5302
  /* @__PURE__ */ jsx45(
5325
5303
  Checkbox,
5326
5304
  {
@@ -5333,7 +5311,7 @@ function WebhooksEndpointsPage({
5333
5311
  ] }, event.name)) })
5334
5312
  ] }, category);
5335
5313
  }) }),
5336
- /* @__PURE__ */ jsxs40("p", { className: "text-xs text-muted-foreground", children: [
5314
+ /* @__PURE__ */ jsxs39("p", { className: "text-xs text-muted-foreground", children: [
5337
5315
  formEvents.length,
5338
5316
  " event",
5339
5317
  formEvents.length !== 1 ? "s" : "",
@@ -5341,19 +5319,19 @@ function WebhooksEndpointsPage({
5341
5319
  ] })
5342
5320
  ] })
5343
5321
  ] }),
5344
- /* @__PURE__ */ jsxs40(DialogFooter7, { children: [
5322
+ /* @__PURE__ */ jsxs39(DialogFooter7, { children: [
5345
5323
  /* @__PURE__ */ jsx45(Button18, { variant: "outline", onClick: () => setCreateDialogOpen(false), children: "Cancel" }),
5346
5324
  /* @__PURE__ */ jsx45(Button18, { onClick: handleCreate, disabled: !formUrl || formEvents.length === 0, children: "Create Endpoint" })
5347
5325
  ] })
5348
5326
  ] })
5349
5327
  ] })
5350
5328
  ] }),
5351
- /* @__PURE__ */ jsxs40("div", { className: "space-y-3", children: [
5329
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-3", children: [
5352
5330
  endpoints.map((endpoint) => {
5353
5331
  const hasIssues = endpoint.failureCount > 0;
5354
- return /* @__PURE__ */ jsx45(Card17, { children: /* @__PURE__ */ jsx45(CardContent16, { className: "p-4 py-0", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-start justify-between gap-4", children: [
5355
- /* @__PURE__ */ jsxs40("div", { className: "min-w-0 flex-1 space-y-1", children: [
5356
- /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2", children: [
5332
+ return /* @__PURE__ */ jsx45(Card17, { children: /* @__PURE__ */ jsx45(CardContent16, { className: "p-4 py-0", children: /* @__PURE__ */ jsxs39("div", { className: "flex items-start justify-between gap-4", children: [
5333
+ /* @__PURE__ */ jsxs39("div", { className: "min-w-0 flex-1 space-y-1", children: [
5334
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
5357
5335
  /* @__PURE__ */ jsx45(
5358
5336
  Circle,
5359
5337
  {
@@ -5363,20 +5341,20 @@ function WebhooksEndpointsPage({
5363
5341
  /* @__PURE__ */ jsx45("span", { className: "font-mono text-sm truncate", children: endpoint.url }),
5364
5342
  endpoint.status === "disabled" && /* @__PURE__ */ jsx45(Badge7, { variant: "secondary", className: "shrink-0", children: "Disabled" })
5365
5343
  ] }),
5366
- /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-1 text-sm text-muted-foreground ml-4", children: [
5367
- /* @__PURE__ */ jsxs40("span", { children: [
5344
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-1 text-sm text-muted-foreground ml-4", children: [
5345
+ /* @__PURE__ */ jsxs39("span", { children: [
5368
5346
  endpoint.events.length,
5369
5347
  " event",
5370
5348
  endpoint.events.length !== 1 ? "s" : ""
5371
5349
  ] }),
5372
5350
  /* @__PURE__ */ jsx45("span", { children: "\xB7" }),
5373
- /* @__PURE__ */ jsxs40("span", { children: [
5351
+ /* @__PURE__ */ jsxs39("span", { children: [
5374
5352
  "Last delivery ",
5375
5353
  formatRelativeTime(endpoint.lastDelivery).toLowerCase()
5376
5354
  ] }),
5377
- endpoint.failureCount > 0 && /* @__PURE__ */ jsxs40(Fragment19, { children: [
5355
+ endpoint.failureCount > 0 && /* @__PURE__ */ jsxs39(Fragment18, { children: [
5378
5356
  /* @__PURE__ */ jsx45("span", { children: "\xB7" }),
5379
- /* @__PURE__ */ jsxs40("span", { className: "text-destructive", children: [
5357
+ /* @__PURE__ */ jsxs39("span", { className: "text-destructive", children: [
5380
5358
  endpoint.failureCount,
5381
5359
  " failure",
5382
5360
  endpoint.failureCount !== 1 ? "s" : ""
@@ -5384,23 +5362,23 @@ function WebhooksEndpointsPage({
5384
5362
  ] })
5385
5363
  ] })
5386
5364
  ] }),
5387
- /* @__PURE__ */ jsxs40(DropdownMenu8, { children: [
5365
+ /* @__PURE__ */ jsxs39(DropdownMenu8, { children: [
5388
5366
  /* @__PURE__ */ jsx45(DropdownMenuTrigger8, { asChild: true, children: /* @__PURE__ */ jsx45(Button18, { variant: "ghost", size: "icon", className: "h-8 w-8 shrink-0", children: /* @__PURE__ */ jsx45(MoreHorizontal5, { className: "h-4 w-4" }) }) }),
5389
- /* @__PURE__ */ jsxs40(DropdownMenuContent8, { align: "end", children: [
5390
- /* @__PURE__ */ jsxs40(DropdownMenuItem8, { onClick: () => openEditDialog(endpoint), children: [
5367
+ /* @__PURE__ */ jsxs39(DropdownMenuContent8, { align: "end", children: [
5368
+ /* @__PURE__ */ jsxs39(DropdownMenuItem8, { onClick: () => openEditDialog(endpoint), children: [
5391
5369
  /* @__PURE__ */ jsx45(Pencil2, { className: "h-4 w-4" }),
5392
5370
  "Edit"
5393
5371
  ] }),
5394
- /* @__PURE__ */ jsxs40(DropdownMenuItem8, { onClick: () => handleCopySecret(endpoint), children: [
5372
+ /* @__PURE__ */ jsxs39(DropdownMenuItem8, { onClick: () => handleCopySecret(endpoint), children: [
5395
5373
  copiedSecret === endpoint.id ? /* @__PURE__ */ jsx45(Check4, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx45(Copy4, { className: "h-4 w-4" }),
5396
5374
  "Copy Secret"
5397
5375
  ] }),
5398
- /* @__PURE__ */ jsxs40(DropdownMenuItem8, { children: [
5376
+ /* @__PURE__ */ jsxs39(DropdownMenuItem8, { children: [
5399
5377
  /* @__PURE__ */ jsx45(RefreshCw, { className: "h-4 w-4" }),
5400
5378
  "Regenerate Secret"
5401
5379
  ] }),
5402
5380
  /* @__PURE__ */ jsx45(DropdownMenuSeparator3, {}),
5403
- /* @__PURE__ */ jsxs40(DropdownMenuItem8, { className: "text-destructive focus:text-destructive", onClick: () => openDeleteDialog(endpoint), children: [
5381
+ /* @__PURE__ */ jsxs39(DropdownMenuItem8, { className: "text-destructive focus:text-destructive", onClick: () => openDeleteDialog(endpoint), children: [
5404
5382
  /* @__PURE__ */ jsx45(Trash25, { className: "h-4 w-4" }),
5405
5383
  "Delete"
5406
5384
  ] })
@@ -5408,27 +5386,27 @@ function WebhooksEndpointsPage({
5408
5386
  ] })
5409
5387
  ] }) }) }, endpoint.id);
5410
5388
  }),
5411
- endpoints.length === 0 && /* @__PURE__ */ jsx45(Card17, { children: /* @__PURE__ */ jsx45(CardContent16, { className: "py-16", children: /* @__PURE__ */ jsxs40("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
5389
+ endpoints.length === 0 && /* @__PURE__ */ jsx45(Card17, { children: /* @__PURE__ */ jsx45(CardContent16, { className: "py-16", children: /* @__PURE__ */ jsxs39("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
5412
5390
  /* @__PURE__ */ jsx45("div", { className: "rounded-full bg-muted p-4", children: /* @__PURE__ */ jsx45(Link22, { className: "h-8 w-8 text-muted-foreground" }) }),
5413
- /* @__PURE__ */ jsxs40("div", { children: [
5391
+ /* @__PURE__ */ jsxs39("div", { children: [
5414
5392
  /* @__PURE__ */ jsx45("p", { className: "font-medium", children: "No endpoints configured" }),
5415
5393
  /* @__PURE__ */ jsx45("p", { className: "text-sm text-muted-foreground mt-1", children: "Add your first endpoint to start receiving webhook events." })
5416
5394
  ] }),
5417
- /* @__PURE__ */ jsxs40(Button18, { onClick: () => setCreateDialogOpen(true), className: "mt-2", children: [
5395
+ /* @__PURE__ */ jsxs39(Button18, { onClick: () => setCreateDialogOpen(true), className: "mt-2", children: [
5418
5396
  /* @__PURE__ */ jsx45(Plus7, { className: "h-4 w-4" }),
5419
5397
  "Add Your First Endpoint"
5420
5398
  ] })
5421
5399
  ] }) }) })
5422
5400
  ] })
5423
5401
  ] }),
5424
- /* @__PURE__ */ jsx45(Dialog8, { open: editDialogOpen, onOpenChange: setEditDialogOpen, children: /* @__PURE__ */ jsxs40(DialogContent8, { className: "sm:max-w-xl", children: [
5425
- /* @__PURE__ */ jsxs40(DialogHeader7, { children: [
5402
+ /* @__PURE__ */ jsx45(Dialog8, { open: editDialogOpen, onOpenChange: setEditDialogOpen, children: /* @__PURE__ */ jsxs39(DialogContent8, { className: "sm:max-w-xl", children: [
5403
+ /* @__PURE__ */ jsxs39(DialogHeader7, { children: [
5426
5404
  /* @__PURE__ */ jsx45(DialogTitle7, { children: "Edit Endpoint" }),
5427
5405
  /* @__PURE__ */ jsx45(DialogDescription6, { children: "Update your webhook endpoint configuration." })
5428
5406
  ] }),
5429
- /* @__PURE__ */ jsxs40("div", { className: "space-y-6", children: [
5430
- /* @__PURE__ */ jsxs40("div", { className: "space-y-4", children: [
5431
- /* @__PURE__ */ jsxs40("div", { className: "space-y-2", children: [
5407
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-6", children: [
5408
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-4", children: [
5409
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-2", children: [
5432
5410
  /* @__PURE__ */ jsx45(Label8, { htmlFor: "edit-url", children: "Endpoint URL" }),
5433
5411
  /* @__PURE__ */ jsx45(
5434
5412
  Input9,
@@ -5440,15 +5418,15 @@ function WebhooksEndpointsPage({
5440
5418
  }
5441
5419
  )
5442
5420
  ] }),
5443
- /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between rounded-lg border p-3", children: [
5444
- /* @__PURE__ */ jsxs40("div", { className: "space-y-0.5", children: [
5421
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center justify-between rounded-lg border p-3", children: [
5422
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-0.5", children: [
5445
5423
  /* @__PURE__ */ jsx45(Label8, { htmlFor: "edit-enabled", className: "text-sm font-medium", children: "Active" }),
5446
5424
  /* @__PURE__ */ jsx45("p", { className: "text-xs text-muted-foreground", children: "Enable this endpoint to receive events" })
5447
5425
  ] }),
5448
5426
  /* @__PURE__ */ jsx45(Switch2, { id: "edit-enabled", checked: formEnabled, onCheckedChange: setFormEnabled })
5449
5427
  ] })
5450
5428
  ] }),
5451
- /* @__PURE__ */ jsxs40("div", { className: "space-y-3", children: [
5429
+ /* @__PURE__ */ jsxs39("div", { className: "space-y-3", children: [
5452
5430
  /* @__PURE__ */ jsx45(Label8, { children: "Events to subscribe" }),
5453
5431
  /* @__PURE__ */ jsx45("div", { className: "rounded-lg border divide-y", children: Object.entries(eventsByCategory).map(([category, events]) => {
5454
5432
  const categoryEvents = events.map((e) => e.name);
@@ -5461,8 +5439,8 @@ function WebhooksEndpointsPage({
5461
5439
  setFormEvents([.../* @__PURE__ */ new Set([...formEvents, ...categoryEvents])]);
5462
5440
  }
5463
5441
  };
5464
- return /* @__PURE__ */ jsxs40("div", { className: "p-3 space-y-2", children: [
5465
- /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2", children: [
5442
+ return /* @__PURE__ */ jsxs39("div", { className: "p-3 space-y-2", children: [
5443
+ /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
5466
5444
  /* @__PURE__ */ jsx45(
5467
5445
  Checkbox,
5468
5446
  {
@@ -5474,7 +5452,7 @@ function WebhooksEndpointsPage({
5474
5452
  ),
5475
5453
  /* @__PURE__ */ jsx45(Label8, { htmlFor: `edit-category-${category}`, className: "text-sm font-medium cursor-pointer", children: category })
5476
5454
  ] }),
5477
- /* @__PURE__ */ jsx45("div", { className: "ml-6 space-y-1.5", children: events.map((event) => /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2", children: [
5455
+ /* @__PURE__ */ jsx45("div", { className: "ml-6 space-y-1.5", children: events.map((event) => /* @__PURE__ */ jsxs39("div", { className: "flex items-center gap-2", children: [
5478
5456
  /* @__PURE__ */ jsx45(
5479
5457
  Checkbox,
5480
5458
  {
@@ -5487,7 +5465,7 @@ function WebhooksEndpointsPage({
5487
5465
  ] }, event.name)) })
5488
5466
  ] }, category);
5489
5467
  }) }),
5490
- /* @__PURE__ */ jsxs40("p", { className: "text-xs text-muted-foreground", children: [
5468
+ /* @__PURE__ */ jsxs39("p", { className: "text-xs text-muted-foreground", children: [
5491
5469
  formEvents.length,
5492
5470
  " event",
5493
5471
  formEvents.length !== 1 ? "s" : "",
@@ -5495,18 +5473,18 @@ function WebhooksEndpointsPage({
5495
5473
  ] })
5496
5474
  ] })
5497
5475
  ] }),
5498
- /* @__PURE__ */ jsxs40(DialogFooter7, { children: [
5476
+ /* @__PURE__ */ jsxs39(DialogFooter7, { children: [
5499
5477
  /* @__PURE__ */ jsx45(Button18, { variant: "outline", onClick: () => setEditDialogOpen(false), children: "Cancel" }),
5500
5478
  /* @__PURE__ */ jsx45(Button18, { onClick: handleEdit, disabled: !formUrl || formEvents.length === 0, children: "Save Changes" })
5501
5479
  ] })
5502
5480
  ] }) }),
5503
- /* @__PURE__ */ jsx45(Dialog8, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, children: /* @__PURE__ */ jsxs40(DialogContent8, { children: [
5504
- /* @__PURE__ */ jsxs40(DialogHeader7, { children: [
5481
+ /* @__PURE__ */ jsx45(Dialog8, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, children: /* @__PURE__ */ jsxs39(DialogContent8, { children: [
5482
+ /* @__PURE__ */ jsxs39(DialogHeader7, { children: [
5505
5483
  /* @__PURE__ */ jsx45(DialogTitle7, { children: "Delete Endpoint" }),
5506
5484
  /* @__PURE__ */ jsx45(DialogDescription6, { children: "Are you sure you want to delete this endpoint? This action cannot be undone." })
5507
5485
  ] }),
5508
5486
  selectedEndpoint && /* @__PURE__ */ jsx45("div", { className: "rounded-md bg-muted p-3", children: /* @__PURE__ */ jsx45("p", { className: "font-mono text-sm truncate", children: selectedEndpoint.url }) }),
5509
- /* @__PURE__ */ jsxs40(DialogFooter7, { children: [
5487
+ /* @__PURE__ */ jsxs39(DialogFooter7, { children: [
5510
5488
  /* @__PURE__ */ jsx45(Button18, { variant: "outline", onClick: () => setDeleteDialogOpen(false), children: "Cancel" }),
5511
5489
  /* @__PURE__ */ jsx45(Button18, { variant: "destructive", onClick: handleDelete, children: "Delete" })
5512
5490
  ] })
@@ -5522,12 +5500,12 @@ import { Input as Input10 } from "@mdxui/primitives/input";
5522
5500
  import { Separator as Separator16 } from "@mdxui/primitives/separator";
5523
5501
  import { SidebarTrigger as SidebarTrigger14 } from "@mdxui/primitives/sidebar";
5524
5502
  import { BookOpen, ChevronRight as ChevronRight2, Search as Search2 } from "lucide-react";
5525
- import { useState as useState21 } from "react";
5503
+ import { useState as useState20 } from "react";
5526
5504
  import { Link as Link9 } from "react-router-dom";
5527
- import { Fragment as Fragment20, jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
5505
+ import { Fragment as Fragment19, jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
5528
5506
  function WebhooksEventCatalogPage() {
5529
- const [searchQuery, setSearchQuery] = useState21("");
5530
- const [expandedEvents, setExpandedEvents] = useState21(/* @__PURE__ */ new Set());
5507
+ const [searchQuery, setSearchQuery] = useState20("");
5508
+ const [expandedEvents, setExpandedEvents] = useState20(/* @__PURE__ */ new Set());
5531
5509
  const filteredEvents = mockWebhookEvents.filter(
5532
5510
  (event) => event.name.toLowerCase().includes(searchQuery.toLowerCase()) || event.description.toLowerCase().includes(searchQuery.toLowerCase()) || event.category.toLowerCase().includes(searchQuery.toLowerCase())
5533
5511
  );
@@ -5547,23 +5525,23 @@ function WebhooksEventCatalogPage() {
5547
5525
  }
5548
5526
  setExpandedEvents(newExpanded);
5549
5527
  };
5550
- return /* @__PURE__ */ jsxs41(Fragment20, { children: [
5551
- /* @__PURE__ */ jsx46("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2 px-4", children: [
5528
+ return /* @__PURE__ */ jsxs40(Fragment19, { children: [
5529
+ /* @__PURE__ */ jsx46("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-2 px-4", children: [
5552
5530
  /* @__PURE__ */ jsx46(SidebarTrigger14, { className: "-ml-1" }),
5553
5531
  /* @__PURE__ */ jsx46(Separator16, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
5554
- /* @__PURE__ */ jsx46(Breadcrumb14, { children: /* @__PURE__ */ jsxs41(BreadcrumbList14, { children: [
5532
+ /* @__PURE__ */ jsx46(Breadcrumb14, { children: /* @__PURE__ */ jsxs40(BreadcrumbList14, { children: [
5555
5533
  /* @__PURE__ */ jsx46(BreadcrumbItem14, { children: /* @__PURE__ */ jsx46(BreadcrumbLink6, { asChild: true, children: /* @__PURE__ */ jsx46(Link9, { to: "/webhooks", children: "Webhooks" }) }) }),
5556
5534
  /* @__PURE__ */ jsx46(BreadcrumbSeparator6, {}),
5557
5535
  /* @__PURE__ */ jsx46(BreadcrumbItem14, { children: /* @__PURE__ */ jsx46(BreadcrumbPage14, { children: "Event Catalog" }) })
5558
5536
  ] }) })
5559
5537
  ] }) }),
5560
- /* @__PURE__ */ jsxs41("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
5561
- /* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between", children: [
5562
- /* @__PURE__ */ jsxs41("div", { children: [
5538
+ /* @__PURE__ */ jsxs40("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
5539
+ /* @__PURE__ */ jsxs40("div", { className: "flex items-center justify-between", children: [
5540
+ /* @__PURE__ */ jsxs40("div", { children: [
5563
5541
  /* @__PURE__ */ jsx46("h1", { className: "text-2xl font-bold", children: "Event Catalog" }),
5564
5542
  /* @__PURE__ */ jsx46("p", { className: "text-muted-foreground", children: "Browse and search available webhook events." })
5565
5543
  ] }),
5566
- /* @__PURE__ */ jsxs41("div", { className: "relative", children: [
5544
+ /* @__PURE__ */ jsxs40("div", { className: "relative", children: [
5567
5545
  /* @__PURE__ */ jsx46(Search2, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
5568
5546
  /* @__PURE__ */ jsx46(
5569
5547
  Input10,
@@ -5576,18 +5554,18 @@ function WebhooksEventCatalogPage() {
5576
5554
  )
5577
5555
  ] })
5578
5556
  ] }),
5579
- /* @__PURE__ */ jsxs41("div", { className: "space-y-6", children: [
5580
- Object.entries(groupedEvents).map(([category, events]) => /* @__PURE__ */ jsxs41("div", { children: [
5557
+ /* @__PURE__ */ jsxs40("div", { className: "space-y-6", children: [
5558
+ Object.entries(groupedEvents).map(([category, events]) => /* @__PURE__ */ jsxs40("div", { children: [
5581
5559
  /* @__PURE__ */ jsx46("h2", { className: "text-sm font-semibold text-muted-foreground mb-3 pt-2", children: category }),
5582
- /* @__PURE__ */ jsx46("div", { className: "space-y-2", children: events.map((event) => /* @__PURE__ */ jsx46(Card18, { noPadding: true, children: /* @__PURE__ */ jsxs41(Collapsible, { open: expandedEvents.has(event.id), onOpenChange: () => toggleEvent(event.id), children: [
5583
- /* @__PURE__ */ jsx46(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(CardContent17, { className: "p-4 cursor-pointer hover:bg-muted/50 transition-colors", children: /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-3", children: [
5560
+ /* @__PURE__ */ jsx46("div", { className: "space-y-2", children: events.map((event) => /* @__PURE__ */ jsx46(Card18, { noPadding: true, children: /* @__PURE__ */ jsxs40(Collapsible, { open: expandedEvents.has(event.id), onOpenChange: () => toggleEvent(event.id), children: [
5561
+ /* @__PURE__ */ jsx46(CollapsibleTrigger, { asChild: true, children: /* @__PURE__ */ jsx46(CardContent17, { className: "p-4 cursor-pointer hover:bg-muted/50 transition-colors", children: /* @__PURE__ */ jsxs40("div", { className: "flex items-center gap-3", children: [
5584
5562
  /* @__PURE__ */ jsx46(
5585
5563
  ChevronRight2,
5586
5564
  {
5587
5565
  className: `h-4 w-4 text-muted-foreground transition-transform ${expandedEvents.has(event.id) ? "rotate-90" : ""}`
5588
5566
  }
5589
5567
  ),
5590
- /* @__PURE__ */ jsxs41("div", { className: "flex-1 min-w-0", children: [
5568
+ /* @__PURE__ */ jsxs40("div", { className: "flex-1 min-w-0", children: [
5591
5569
  /* @__PURE__ */ jsx46("p", { className: "font-mono text-sm font-medium", children: event.name }),
5592
5570
  /* @__PURE__ */ jsx46("p", { className: "text-sm text-muted-foreground truncate", children: event.description })
5593
5571
  ] })
@@ -5595,9 +5573,9 @@ function WebhooksEventCatalogPage() {
5595
5573
  /* @__PURE__ */ jsx46(CollapsibleContent, { children: /* @__PURE__ */ jsx46("div", { className: "px-4 pb-4 ml-7 mr-7", children: /* @__PURE__ */ jsx46(JsonViewer, { data: event.payloadSchema }) }) })
5596
5574
  ] }) }, event.id)) })
5597
5575
  ] }, category)),
5598
- Object.keys(groupedEvents).length === 0 && /* @__PURE__ */ jsx46(Card18, { children: /* @__PURE__ */ jsx46(CardContent17, { className: "py-16", children: /* @__PURE__ */ jsxs41("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
5576
+ Object.keys(groupedEvents).length === 0 && /* @__PURE__ */ jsx46(Card18, { children: /* @__PURE__ */ jsx46(CardContent17, { className: "py-16", children: /* @__PURE__ */ jsxs40("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
5599
5577
  /* @__PURE__ */ jsx46("div", { className: "rounded-full bg-muted p-4", children: /* @__PURE__ */ jsx46(BookOpen, { className: "h-8 w-8 text-muted-foreground" }) }),
5600
- /* @__PURE__ */ jsxs41("div", { children: [
5578
+ /* @__PURE__ */ jsxs40("div", { children: [
5601
5579
  /* @__PURE__ */ jsx46("p", { className: "font-medium", children: "No events found" }),
5602
5580
  /* @__PURE__ */ jsx46("p", { className: "text-sm text-muted-foreground mt-1", children: "Try adjusting your search query." })
5603
5581
  ] })
@@ -5616,10 +5594,10 @@ import { Sheet as Sheet2, SheetContent as SheetContent2, SheetDescription as She
5616
5594
  import { SidebarTrigger as SidebarTrigger15 } from "@mdxui/primitives/sidebar";
5617
5595
  import { Table as Table9, TableBody as TableBody9, TableCell as TableCell9, TableHead as TableHead9, TableHeader as TableHeader9, TableRow as TableRow9 } from "@mdxui/primitives/table";
5618
5596
  import { Check as Check5, ChevronDown as ChevronDown4, Copy as Copy5, RefreshCw as RefreshCw2, ScrollText } from "lucide-react";
5619
- import { useState as useState22 } from "react";
5597
+ import { useState as useState21 } from "react";
5620
5598
  import { Link as Link10 } from "react-router-dom";
5621
5599
  import { toast as toast8 } from "sonner";
5622
- import { Fragment as Fragment21, jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
5600
+ import { Fragment as Fragment20, jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
5623
5601
  var statusFilterOptions2 = [
5624
5602
  { value: "all", label: "All Status" },
5625
5603
  { value: "success", label: "Success" },
@@ -5652,10 +5630,10 @@ function formatLatency2(ms) {
5652
5630
  return `${ms}ms`;
5653
5631
  }
5654
5632
  function WebhooksLogsPage() {
5655
- const [statusFilter, setStatusFilter] = useState22("all");
5656
- const [selectedLog, setSelectedLog] = useState22(null);
5657
- const [sheetOpen, setSheetOpen] = useState22(false);
5658
- const [copiedUrl, setCopiedUrl] = useState22(false);
5633
+ const [statusFilter, setStatusFilter] = useState21("all");
5634
+ const [selectedLog, setSelectedLog] = useState21(null);
5635
+ const [sheetOpen, setSheetOpen] = useState21(false);
5636
+ const [copiedUrl, setCopiedUrl] = useState21(false);
5659
5637
  const filteredLogs = mockWebhookLogs.filter((log) => {
5660
5638
  if (statusFilter === "all") return true;
5661
5639
  if (statusFilter === "success") return log.statusCode >= 200 && log.statusCode < 300;
@@ -5677,32 +5655,32 @@ function WebhooksLogsPage() {
5677
5655
  });
5678
5656
  setSheetOpen(false);
5679
5657
  };
5680
- return /* @__PURE__ */ jsxs42(Fragment21, { children: [
5681
- /* @__PURE__ */ jsx47("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2 px-4", children: [
5658
+ return /* @__PURE__ */ jsxs41(Fragment20, { children: [
5659
+ /* @__PURE__ */ jsx47("header", { className: "flex h-16 shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2 px-4", children: [
5682
5660
  /* @__PURE__ */ jsx47(SidebarTrigger15, { className: "-ml-1" }),
5683
5661
  /* @__PURE__ */ jsx47(Separator17, { orientation: "vertical", className: "mr-2 data-[orientation=vertical]:h-4" }),
5684
- /* @__PURE__ */ jsx47(Breadcrumb15, { children: /* @__PURE__ */ jsxs42(BreadcrumbList15, { children: [
5662
+ /* @__PURE__ */ jsx47(Breadcrumb15, { children: /* @__PURE__ */ jsxs41(BreadcrumbList15, { children: [
5685
5663
  /* @__PURE__ */ jsx47(BreadcrumbItem15, { children: /* @__PURE__ */ jsx47(BreadcrumbLink7, { asChild: true, children: /* @__PURE__ */ jsx47(Link10, { to: "/webhooks", children: "Webhooks" }) }) }),
5686
5664
  /* @__PURE__ */ jsx47(BreadcrumbSeparator7, {}),
5687
5665
  /* @__PURE__ */ jsx47(BreadcrumbItem15, { children: /* @__PURE__ */ jsx47(BreadcrumbPage15, { children: "Logs" }) })
5688
5666
  ] }) })
5689
5667
  ] }) }),
5690
- /* @__PURE__ */ jsxs42("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
5691
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-between", children: [
5692
- /* @__PURE__ */ jsxs42("div", { children: [
5668
+ /* @__PURE__ */ jsxs41("div", { className: "flex flex-1 flex-col gap-4 px-4 sm:px-16 py-4 pt-0", children: [
5669
+ /* @__PURE__ */ jsxs41("div", { className: "flex items-center justify-between", children: [
5670
+ /* @__PURE__ */ jsxs41("div", { children: [
5693
5671
  /* @__PURE__ */ jsx47("h1", { className: "text-2xl font-bold", children: "Webhook Logs" }),
5694
5672
  /* @__PURE__ */ jsx47("p", { className: "text-muted-foreground", children: "View webhook delivery history and debug issues." })
5695
5673
  ] }),
5696
- /* @__PURE__ */ jsxs42(DropdownMenu9, { children: [
5697
- /* @__PURE__ */ jsx47(DropdownMenuTrigger9, { asChild: true, children: /* @__PURE__ */ jsxs42(Button19, { variant: "outline", className: "w-[140px] justify-between", children: [
5674
+ /* @__PURE__ */ jsxs41(DropdownMenu9, { children: [
5675
+ /* @__PURE__ */ jsx47(DropdownMenuTrigger9, { asChild: true, children: /* @__PURE__ */ jsxs41(Button19, { variant: "outline", className: "w-[140px] justify-between", children: [
5698
5676
  statusFilterOptions2.find((o) => o.value === statusFilter)?.label,
5699
5677
  /* @__PURE__ */ jsx47(ChevronDown4, { className: "h-4 w-4 opacity-50" })
5700
5678
  ] }) }),
5701
5679
  /* @__PURE__ */ jsx47(DropdownMenuContent9, { align: "end", className: "w-[140px]", children: statusFilterOptions2.map((option) => /* @__PURE__ */ jsx47(DropdownMenuItem9, { onClick: () => setStatusFilter(option.value), children: option.label }, option.value)) })
5702
5680
  ] })
5703
5681
  ] }),
5704
- /* @__PURE__ */ jsx47("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs42(Table9, { children: [
5705
- /* @__PURE__ */ jsx47(TableHeader9, { children: /* @__PURE__ */ jsxs42(TableRow9, { children: [
5682
+ /* @__PURE__ */ jsx47("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs41(Table9, { children: [
5683
+ /* @__PURE__ */ jsx47(TableHeader9, { children: /* @__PURE__ */ jsxs41(TableRow9, { children: [
5706
5684
  /* @__PURE__ */ jsx47(TableHead9, { className: "w-[40px] pl-4" }),
5707
5685
  /* @__PURE__ */ jsx47(TableHead9, { children: "Timestamp" }),
5708
5686
  /* @__PURE__ */ jsx47(TableHead9, { children: "Event" }),
@@ -5710,8 +5688,8 @@ function WebhooksLogsPage() {
5710
5688
  /* @__PURE__ */ jsx47(TableHead9, { children: "Status" }),
5711
5689
  /* @__PURE__ */ jsx47(TableHead9, { children: "Latency" })
5712
5690
  ] }) }),
5713
- /* @__PURE__ */ jsxs42(TableBody9, { children: [
5714
- filteredLogs.map((log) => /* @__PURE__ */ jsxs42(TableRow9, { className: "cursor-pointer hover:bg-muted/50", onClick: () => handleRowClick(log), children: [
5691
+ /* @__PURE__ */ jsxs41(TableBody9, { children: [
5692
+ filteredLogs.map((log) => /* @__PURE__ */ jsxs41(TableRow9, { className: "cursor-pointer hover:bg-muted/50", onClick: () => handleRowClick(log), children: [
5715
5693
  /* @__PURE__ */ jsx47(TableCell9, { className: "py-3 pl-4", children: /* @__PURE__ */ jsx47(StatusDot, { status: log.statusCode }) }),
5716
5694
  /* @__PURE__ */ jsx47(TableCell9, { className: "py-3 text-muted-foreground", children: formatTimestamp2(log.timestamp) }),
5717
5695
  /* @__PURE__ */ jsx47(TableCell9, { className: "py-3 font-mono text-sm", children: log.eventName }),
@@ -5719,9 +5697,9 @@ function WebhooksLogsPage() {
5719
5697
  /* @__PURE__ */ jsx47(TableCell9, { className: "py-3", children: /* @__PURE__ */ jsx47(StatusBadge, { status: log.statusCode }) }),
5720
5698
  /* @__PURE__ */ jsx47(TableCell9, { className: "py-3 text-muted-foreground", children: formatLatency2(log.latency) })
5721
5699
  ] }, log.id)),
5722
- filteredLogs.length === 0 && /* @__PURE__ */ jsx47(TableRow9, { children: /* @__PURE__ */ jsx47(TableCell9, { colSpan: 6, className: "py-16", children: /* @__PURE__ */ jsxs42("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
5700
+ filteredLogs.length === 0 && /* @__PURE__ */ jsx47(TableRow9, { children: /* @__PURE__ */ jsx47(TableCell9, { colSpan: 6, className: "py-16", children: /* @__PURE__ */ jsxs41("div", { className: "flex flex-col items-center justify-center gap-4 text-center", children: [
5723
5701
  /* @__PURE__ */ jsx47("div", { className: "rounded-full bg-muted p-4", children: /* @__PURE__ */ jsx47(ScrollText, { className: "h-8 w-8 text-muted-foreground" }) }),
5724
- /* @__PURE__ */ jsxs42("div", { children: [
5702
+ /* @__PURE__ */ jsxs41("div", { children: [
5725
5703
  /* @__PURE__ */ jsx47("p", { className: "font-medium", children: "No logs found" }),
5726
5704
  /* @__PURE__ */ jsx47("p", { className: "text-sm text-muted-foreground mt-1", children: "No webhook deliveries match the current filter." })
5727
5705
  ] })
@@ -5729,19 +5707,19 @@ function WebhooksLogsPage() {
5729
5707
  ] })
5730
5708
  ] }) })
5731
5709
  ] }),
5732
- /* @__PURE__ */ jsx47(Sheet2, { open: sheetOpen, onOpenChange: setSheetOpen, children: /* @__PURE__ */ jsx47(SheetContent2, { className: "w-full sm:max-w-lg overflow-y-auto", children: selectedLog && /* @__PURE__ */ jsxs42(Fragment21, { children: [
5733
- /* @__PURE__ */ jsxs42(SheetHeader2, { children: [
5710
+ /* @__PURE__ */ jsx47(Sheet2, { open: sheetOpen, onOpenChange: setSheetOpen, children: /* @__PURE__ */ jsx47(SheetContent2, { className: "w-full sm:max-w-lg overflow-y-auto", children: selectedLog && /* @__PURE__ */ jsxs41(Fragment20, { children: [
5711
+ /* @__PURE__ */ jsxs41(SheetHeader2, { children: [
5734
5712
  /* @__PURE__ */ jsx47(SheetTitle2, { className: "font-mono text-sm", children: selectedLog.eventName }),
5735
- /* @__PURE__ */ jsxs42(SheetDescription2, { className: "flex items-center gap-2 text-sm", children: [
5713
+ /* @__PURE__ */ jsxs41(SheetDescription2, { className: "flex items-center gap-2 text-sm", children: [
5736
5714
  /* @__PURE__ */ jsx47(StatusBadge, { status: selectedLog.statusCode }),
5737
5715
  /* @__PURE__ */ jsx47("span", { children: "\u2022" }),
5738
5716
  /* @__PURE__ */ jsx47("span", { children: formatLatency2(selectedLog.latency) })
5739
5717
  ] })
5740
5718
  ] }),
5741
- /* @__PURE__ */ jsxs42("div", { className: "mt-6 space-y-6 px-4", children: [
5742
- /* @__PURE__ */ jsxs42("div", { className: "space-y-1 text-sm text-muted-foreground", children: [
5719
+ /* @__PURE__ */ jsxs41("div", { className: "mt-6 space-y-6 px-4", children: [
5720
+ /* @__PURE__ */ jsxs41("div", { className: "space-y-1 text-sm text-muted-foreground", children: [
5743
5721
  /* @__PURE__ */ jsx47("p", { children: formatFullTimestamp(selectedLog.timestamp) }),
5744
- /* @__PURE__ */ jsxs42(
5722
+ /* @__PURE__ */ jsxs41(
5745
5723
  "button",
5746
5724
  {
5747
5725
  type: "button",
@@ -5754,15 +5732,15 @@ function WebhooksLogsPage() {
5754
5732
  }
5755
5733
  )
5756
5734
  ] }),
5757
- /* @__PURE__ */ jsxs42("div", { children: [
5735
+ /* @__PURE__ */ jsxs41("div", { children: [
5758
5736
  /* @__PURE__ */ jsx47("h4", { className: "text-sm font-semibold mb-2", children: "Request Payload" }),
5759
5737
  /* @__PURE__ */ jsx47(JsonViewer, { data: selectedLog.requestPayload })
5760
5738
  ] }),
5761
- /* @__PURE__ */ jsxs42("div", { children: [
5739
+ /* @__PURE__ */ jsxs41("div", { children: [
5762
5740
  /* @__PURE__ */ jsx47("h4", { className: "text-sm font-semibold mb-2", children: "Response" }),
5763
5741
  selectedLog.responseBody ? /* @__PURE__ */ jsx47("div", { className: "rounded-md border bg-muted p-4 text-sm font-mono", children: selectedLog.responseBody }) : /* @__PURE__ */ jsx47("p", { className: "text-sm text-muted-foreground", children: "No response received" })
5764
5742
  ] }),
5765
- selectedLog.statusCode >= 400 && /* @__PURE__ */ jsxs42(Button19, { onClick: handleRetry, children: [
5743
+ selectedLog.statusCode >= 400 && /* @__PURE__ */ jsxs41(Button19, { onClick: handleRetry, children: [
5766
5744
  /* @__PURE__ */ jsx47(RefreshCw2, { className: "h-4 w-4" }),
5767
5745
  "Retry Delivery"
5768
5746
  ] })
@@ -5772,14 +5750,14 @@ function WebhooksLogsPage() {
5772
5750
  }
5773
5751
 
5774
5752
  // src/developer/router.tsx
5775
- import { Fragment as Fragment22, jsx as jsx48, jsxs as jsxs43 } from "react/jsx-runtime";
5753
+ import { Fragment as Fragment21, jsx as jsx48, jsxs as jsxs42 } from "react/jsx-runtime";
5776
5754
  function isNextJs() {
5777
5755
  if (typeof window === "undefined") return false;
5778
5756
  return "__NEXT_DATA__" in window;
5779
5757
  }
5780
5758
  function UrlSync({ basePath }) {
5781
5759
  const location = useLocation2();
5782
- useEffect9(() => {
5760
+ useEffect8(() => {
5783
5761
  const normalizedBase = basePath.endsWith("/") ? basePath.slice(0, -1) : basePath;
5784
5762
  const path = location.pathname === "/" ? "" : location.pathname;
5785
5763
  const fullPath = `${normalizedBase}${path}${location.search}${location.hash}`;
@@ -5803,7 +5781,7 @@ function DashboardRouter({ basePath = "/", children }) {
5803
5781
  const useMemoryRouter = isNextJs();
5804
5782
  const initialPath = getInitialPathFromUrl(basePath);
5805
5783
  if (useMemoryRouter) {
5806
- return /* @__PURE__ */ jsxs43(MemoryRouter, { initialEntries: [initialPath], children: [
5784
+ return /* @__PURE__ */ jsxs42(MemoryRouter, { initialEntries: [initialPath], children: [
5807
5785
  /* @__PURE__ */ jsx48(UrlSync, { basePath }),
5808
5786
  children
5809
5787
  ] });
@@ -5813,19 +5791,19 @@ function DashboardRouter({ basePath = "/", children }) {
5813
5791
  function DashboardRoutes() {
5814
5792
  const routes = useRoutes();
5815
5793
  const customRoutes = useCustomRoutes();
5816
- return /* @__PURE__ */ jsx48(Routes, { children: /* @__PURE__ */ jsxs43(Route, { element: /* @__PURE__ */ jsx48(DashboardLayout, {}), children: [
5794
+ return /* @__PURE__ */ jsx48(Routes, { children: /* @__PURE__ */ jsxs42(Route, { element: /* @__PURE__ */ jsx48(DashboardLayout, {}), children: [
5817
5795
  routes.overview && /* @__PURE__ */ jsx48(Route, { index: true, element: /* @__PURE__ */ jsx48(OverviewPage, {}) }),
5818
5796
  routes.requests && /* @__PURE__ */ jsx48(Route, { path: "requests", element: /* @__PURE__ */ jsx48(RequestsPage, {}) }),
5819
5797
  routes.keys && /* @__PURE__ */ jsx48(Route, { path: "keys", element: /* @__PURE__ */ jsx48(KeysPage, {}) }),
5820
5798
  routes.team && /* @__PURE__ */ jsx48(Route, { path: "team", element: /* @__PURE__ */ jsx48(TeamPage, {}) }),
5821
5799
  routes.billing && /* @__PURE__ */ jsx48(Route, { path: "billing", element: /* @__PURE__ */ jsx48(BillingPage, {}) }),
5822
- routes.settings && /* @__PURE__ */ jsxs43(Fragment22, { children: [
5800
+ routes.settings && /* @__PURE__ */ jsxs42(Fragment21, { children: [
5823
5801
  /* @__PURE__ */ jsx48(Route, { path: "settings", element: /* @__PURE__ */ jsx48(Navigate, { to: "settings/profile", replace: true }) }),
5824
5802
  /* @__PURE__ */ jsx48(Route, { path: "settings/profile", element: /* @__PURE__ */ jsx48(SettingsProfilePage, {}) }),
5825
5803
  /* @__PURE__ */ jsx48(Route, { path: "settings/security", element: /* @__PURE__ */ jsx48(SettingsSecurityPage, {}) }),
5826
5804
  /* @__PURE__ */ jsx48(Route, { path: "settings/sessions", element: /* @__PURE__ */ jsx48(SettingsSessionsPage, {}) })
5827
5805
  ] }),
5828
- routes.webhooks && /* @__PURE__ */ jsxs43(Fragment22, { children: [
5806
+ routes.webhooks && /* @__PURE__ */ jsxs42(Fragment21, { children: [
5829
5807
  /* @__PURE__ */ jsx48(Route, { path: "webhooks", element: /* @__PURE__ */ jsx48(Navigate, { to: "webhooks/endpoints", replace: true }) }),
5830
5808
  /* @__PURE__ */ jsx48(Route, { path: "webhooks/endpoints", element: /* @__PURE__ */ jsx48(WebhooksEndpointsPage, {}) }),
5831
5809
  /* @__PURE__ */ jsx48(Route, { path: "webhooks/activity", element: /* @__PURE__ */ jsx48(WebhooksActivityPage, {}) }),
@@ -5904,12 +5882,12 @@ function DeveloperDashboard(props) {
5904
5882
  // src/developer/standalone/provider.tsx
5905
5883
  import { ThemeProvider as ThemeProvider2 } from "next-themes";
5906
5884
  import { applyThemeToElement as applyThemeToElement2 } from "@mdxui/themes";
5907
- import { useEffect as useEffect10, useRef as useRef3 } from "react";
5885
+ import { useEffect as useEffect9, useRef as useRef3 } from "react";
5908
5886
  import { jsx as jsx50 } from "react/jsx-runtime";
5909
5887
  function StandaloneProvider({ config, children }) {
5910
5888
  const themeMode = config?.theme?.mode ?? "system";
5911
5889
  const containerRef = useRef3(null);
5912
- useEffect10(() => {
5890
+ useEffect9(() => {
5913
5891
  if (containerRef.current && config?.theme?.preset) {
5914
5892
  const resolvedMode = config.theme.mode === "system" ? "light" : config.theme.mode ?? "light";
5915
5893
  applyThemeToElement2(containerRef.current, config.theme.preset, resolvedMode);
@@ -6017,7 +5995,7 @@ function StandaloneTeam({
6017
5995
 
6018
5996
  // src/auth/auth-layout.tsx
6019
5997
  import { cn as cn8 } from "@mdxui/primitives/lib/utils";
6020
- import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
5998
+ import { jsx as jsx55, jsxs as jsxs43 } from "react/jsx-runtime";
6021
5999
  function AuthLayout({
6022
6000
  className,
6023
6001
  children,
@@ -6029,10 +6007,10 @@ function AuthLayout({
6029
6007
  testimonial,
6030
6008
  ...props
6031
6009
  }) {
6032
- return /* @__PURE__ */ jsxs44("div", { className: cn8("min-h-screen w-full lg:grid lg:grid-cols-2", className), ...props, children: [
6033
- /* @__PURE__ */ jsx55("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxs44("div", { className: "mx-auto w-full max-w-[400px] space-y-8 px-4", children: [
6010
+ return /* @__PURE__ */ jsxs43("div", { className: cn8("min-h-screen w-full lg:grid lg:grid-cols-2", className), ...props, children: [
6011
+ /* @__PURE__ */ jsx55("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ jsxs43("div", { className: "mx-auto w-full max-w-[400px] space-y-8 px-4", children: [
6034
6012
  logo && /* @__PURE__ */ jsx55("div", { className: "flex justify-center", children: logo }),
6035
- (title || subtitle) && /* @__PURE__ */ jsxs44("div", { className: "space-y-2 text-center", children: [
6013
+ (title || subtitle) && /* @__PURE__ */ jsxs43("div", { className: "space-y-2 text-center", children: [
6036
6014
  title && /* @__PURE__ */ jsx55("h1", { className: "text-3xl font-bold tracking-tight", children: title }),
6037
6015
  subtitle && /* @__PURE__ */ jsx55("p", { className: "text-muted-foreground text-sm", children: subtitle })
6038
6016
  ] }),
@@ -6047,13 +6025,13 @@ function AuthLayout({
6047
6025
  backgroundSize: "cover",
6048
6026
  backgroundPosition: "center"
6049
6027
  } : void 0,
6050
- children: showTestimonial && testimonial && !backgroundImage && /* @__PURE__ */ jsx55("div", { className: "flex h-full items-center justify-center p-12", children: /* @__PURE__ */ jsx55("div", { className: "max-w-md space-y-6", children: /* @__PURE__ */ jsxs44("blockquote", { className: "space-y-4", children: [
6051
- /* @__PURE__ */ jsxs44("p", { className: "text-lg font-medium leading-relaxed", children: [
6028
+ children: showTestimonial && testimonial && !backgroundImage && /* @__PURE__ */ jsx55("div", { className: "flex h-full items-center justify-center p-12", children: /* @__PURE__ */ jsx55("div", { className: "max-w-md space-y-6", children: /* @__PURE__ */ jsxs43("blockquote", { className: "space-y-4", children: [
6029
+ /* @__PURE__ */ jsxs43("p", { className: "text-lg font-medium leading-relaxed", children: [
6052
6030
  '"',
6053
6031
  testimonial.quote,
6054
6032
  '"'
6055
6033
  ] }),
6056
- /* @__PURE__ */ jsxs44("footer", { className: "flex items-center gap-3", children: [
6034
+ /* @__PURE__ */ jsxs43("footer", { className: "flex items-center gap-3", children: [
6057
6035
  testimonial.avatar && /* @__PURE__ */ jsx55(
6058
6036
  "img",
6059
6037
  {
@@ -6062,7 +6040,7 @@ function AuthLayout({
6062
6040
  className: "size-10 rounded-full"
6063
6041
  }
6064
6042
  ),
6065
- /* @__PURE__ */ jsxs44("div", { children: [
6043
+ /* @__PURE__ */ jsxs43("div", { children: [
6066
6044
  /* @__PURE__ */ jsx55("div", { className: "font-semibold", children: testimonial.author }),
6067
6045
  /* @__PURE__ */ jsx55("div", { className: "text-muted-foreground text-sm", children: testimonial.role })
6068
6046
  ] })
@@ -6242,7 +6220,7 @@ function OTPPage({
6242
6220
  // src/auth/onboarding-page.tsx
6243
6221
  import { OnboardingWizard } from "@mdxui/primitives/auth/onboarding-wizard";
6244
6222
  import { cn as cn9 } from "@mdxui/primitives/lib/utils";
6245
- import { jsx as jsx60, jsxs as jsxs45 } from "react/jsx-runtime";
6223
+ import { jsx as jsx60, jsxs as jsxs44 } from "react/jsx-runtime";
6246
6224
  function OnboardingPage({
6247
6225
  steps,
6248
6226
  onComplete,
@@ -6255,7 +6233,7 @@ function OnboardingPage({
6255
6233
  showProgress = true,
6256
6234
  className
6257
6235
  }) {
6258
- return /* @__PURE__ */ jsx60("div", { className: cn9("flex min-h-screen items-center justify-center p-4", className), children: /* @__PURE__ */ jsxs45("div", { className: "w-full space-y-8", children: [
6236
+ return /* @__PURE__ */ jsx60("div", { className: cn9("flex min-h-screen items-center justify-center p-4", className), children: /* @__PURE__ */ jsxs44("div", { className: "w-full space-y-8", children: [
6259
6237
  logo && /* @__PURE__ */ jsx60("div", { className: "flex justify-center", children: logo }),
6260
6238
  /* @__PURE__ */ jsx60(
6261
6239
  OnboardingWizard,
@@ -6369,7 +6347,7 @@ export {
6369
6347
  themeCSS,
6370
6348
  themeNames,
6371
6349
  themePresets,
6372
- useAuth10 as useAuth,
6350
+ useAuth9 as useAuth,
6373
6351
  useCommandPalette,
6374
6352
  useCustomRoutes,
6375
6353
  useDashboard,