franchising 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +61 -0
- package/README.md +88 -2
- package/dist/accounts-B4bnTXUd.js +242 -0
- package/dist/accounts-B4bnTXUd.js.map +1 -0
- package/dist/accounts-TyMPSHM0.cjs +313 -0
- package/dist/accounts-TyMPSHM0.cjs.map +1 -0
- package/dist/adapters-DM59AJfR.d.cts +216 -0
- package/dist/adapters-DM59AJfR.d.ts +216 -0
- package/dist/cli/template-assets/api/src/errors/codes.ts +17 -0
- package/dist/cli/template-assets/api/src/errors/index.ts +16 -0
- package/dist/cli/template-assets/api/src/filters/exception.ts +53 -0
- package/dist/cli/template-assets/api/src/main.ts +189 -0
- package/dist/cli/template-assets/api/src/modules/health/controller.ts +23 -0
- package/dist/cli/template-assets/api/src/modules/health/dto/response.dto.ts +23 -0
- package/dist/cli/template-assets/api/src/modules/health/module.ts +12 -0
- package/dist/cli/template-assets/api/src/modules/health/service.ts +54 -0
- package/dist/cli/template-assets/api/src/modules/messaging/module.ts +7 -0
- package/dist/cli/template-assets/api/src/modules/messaging/service.ts +74 -0
- package/dist/cli/template-assets/api/src/shared/exceptions.ts +40 -0
- package/dist/cli/template-assets/api/src/shared/response.ts +31 -0
- package/dist/cli/template-assets/api/src/telemetry.ts +59 -0
- package/dist/cli/template-assets/api/src/types.ts +8 -0
- package/dist/cli/template-assets/cloudflare/cache.service.ts +23 -0
- package/dist/cli/template-assets/cloudflare/queue.service.ts +22 -0
- package/dist/cli/template-assets/cloudflare/worker.ts +33 -0
- package/dist/cli/template-assets/packages/jobs/src/index.ts +49 -0
- package/dist/cli/template-assets/packages/queue-runtime/src/index.ts +54 -0
- package/dist/cli/template-assets/root/dot-dockerignore +11 -0
- package/dist/cli/template-assets/root/dot-editorconfig +13 -0
- package/dist/cli/template-assets/root/dot-oxfmtrc.json +9 -0
- package/dist/cli/template-assets/root/dot-oxlintrc.json +47 -0
- package/dist/cli/template-assets/root/lefthook.yml +18 -0
- package/dist/cli/template-assets/web/postcss.config.mjs +9 -0
- package/dist/cli/template-assets/web/src/app/(app)/dashboard/page.tsx +5 -0
- package/dist/cli/template-assets/web/src/app/(app)/layout.tsx +25 -0
- package/dist/cli/template-assets/web/src/app/(auth)/login/page.tsx +75 -0
- package/dist/cli/template-assets/web/src/app/globals.css +48 -0
- package/dist/cli/template-assets/web/src/app/layout.tsx +30 -0
- package/dist/cli/template-assets/web/src/app/page.tsx +20 -0
- package/dist/cli/template-assets/web/src/components/overview/overview-panel.tsx +27 -0
- package/dist/cli/template-assets/web/src/components/shell/app-shell.tsx +37 -0
- package/dist/cli/template-assets/web/src/components/shell/providers.tsx +22 -0
- package/dist/cli/template-assets/web/src/lib/api-client.ts +57 -0
- package/dist/cli/template-assets/web/src/lib/auth-client.ts +15 -0
- package/dist/cli/template-assets/web/src/lib/server-auth.ts +38 -0
- package/dist/cli/template-assets/web/src/types/api.ts +18 -0
- package/dist/cli/template-assets/worker/src/app.module.ts +5 -0
- package/dist/cli/template-assets/worker/src/env.ts +8 -0
- package/dist/cli/template-assets/worker/src/main.ts +25 -0
- package/dist/cli/template-assets/worker/src/modules/queue/config.ts +16 -0
- package/dist/cli/template-assets/worker/src/modules/queue/module.ts +11 -0
- package/dist/cli/template-assets/worker/src/modules/queue/processor.ts +105 -0
- package/dist/cli/template-assets/worker/src/modules/queue/repository.ts +16 -0
- package/dist/cli/template-assets/worker/src/modules/queue/retry.ts +17 -0
- package/dist/cli/template-assets/worker/test/retry.test.ts.tpl +12 -0
- package/dist/cli/template-assets/worker-messaging/jobs-messaging.ts +12 -0
- package/dist/cli/template-assets/worker-messaging/messaging-api-service.ts +39 -0
- package/dist/cli/template-assets/worker-messaging/src/env.ts +14 -0
- package/dist/cli/template-assets/worker-messaging/src/modules/messaging/service.ts +59 -0
- package/dist/cli/template-assets/worker-messaging/src/modules/queue/module.ts +8 -0
- package/dist/cli/template-assets/worker-messaging/src/modules/queue/processor.ts +113 -0
- package/dist/cli.js +1218 -0
- package/dist/cn-BVOnrSza.js +1 -0
- package/dist/constants-C4iP0--i.js +38 -0
- package/dist/constants-C4iP0--i.js.map +1 -0
- package/dist/constants-rCR-LNSN.cjs +91 -0
- package/dist/constants-rCR-LNSN.cjs.map +1 -0
- package/dist/decorate-BR5FVX5x.js +14 -0
- package/dist/decorate-R-oqksAh.cjs +25 -0
- package/dist/decorateParam-BFJPEGKJ.cjs +13 -0
- package/dist/decorateParam-CKE7_J1s.js +8 -0
- package/dist/define-adapter-Cc0QrfKt.cjs +16 -0
- package/dist/define-adapter-Cc0QrfKt.cjs.map +1 -0
- package/dist/define-adapter-DRcXno3j.js +11 -0
- package/dist/define-adapter-DRcXno3j.js.map +1 -0
- package/dist/dispatcher-BsD7cO2w.cjs +84 -0
- package/dist/dispatcher-BsD7cO2w.cjs.map +1 -0
- package/dist/dispatcher-DA_l1Vkv.js +73 -0
- package/dist/dispatcher-DA_l1Vkv.js.map +1 -0
- package/dist/errors-DxHoXrLd.d.cts +46 -0
- package/dist/errors-DxHoXrLd.d.ts +46 -0
- package/dist/http/index.cjs +440 -0
- package/dist/http/index.cjs.map +1 -0
- package/dist/http/index.d.cts +257 -0
- package/dist/http/index.d.ts +257 -0
- package/dist/http/index.js +400 -0
- package/dist/http/index.js.map +1 -0
- package/dist/http/swagger.cjs +122 -0
- package/dist/http/swagger.cjs.map +1 -0
- package/dist/http/swagger.d.cts +59 -0
- package/dist/http/swagger.d.ts +59 -0
- package/dist/http/swagger.js +117 -0
- package/dist/http/swagger.js.map +1 -0
- package/dist/index-B3UOHsA9.d.ts +679 -0
- package/dist/index-Bdl0AiNM.d.ts +1262 -0
- package/dist/index-By8b4ksT.d.ts +25 -0
- package/dist/index-C1KmT8dQ.d.ts +174 -0
- package/dist/index-CYT1PFzo.d.cts +679 -0
- package/dist/index-Cj-10Q5F.d.cts +174 -0
- package/dist/index-DDSaLjXV.d.cts +25 -0
- package/dist/index-FTrYdHfq.d.cts +1262 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/label-BqmJoVE-.cjs +1 -0
- package/dist/label-XeChe1Bu.js +1 -0
- package/dist/messaging/index.cjs +1 -0
- package/dist/messaging/index.d.cts +1775 -0
- package/dist/messaging/index.d.ts +1775 -0
- package/dist/messaging/index.js +1 -0
- package/dist/misc-BpM_lMTx.js +1 -0
- package/dist/misc-DkqJOm1V.cjs +1 -0
- package/dist/operational-CnxdBwVG.d.cts +13 -0
- package/dist/operational-CnxdBwVG.d.ts +13 -0
- package/dist/redaction-DhuHTlHA.js +124 -0
- package/dist/redaction-DhuHTlHA.js.map +1 -0
- package/dist/redaction-uRIQbTwZ.cjs +171 -0
- package/dist/redaction-uRIQbTwZ.cjs.map +1 -0
- package/dist/rolldown-runtime-auK_WOaK.cjs +1 -0
- package/dist/rolldown-runtime-xuxB8TGW.cjs +32 -0
- package/dist/runtime-C95UYYLb.cjs +111 -0
- package/dist/runtime-C95UYYLb.cjs.map +1 -0
- package/dist/runtime-DG2oBFYw.js +88 -0
- package/dist/runtime-DG2oBFYw.js.map +1 -0
- package/dist/skills-C1uwr9Pp.js +4 -0
- package/dist/skills-DuE-XnBp.js +1 -0
- package/dist/sso/client.cjs +37 -0
- package/dist/sso/client.cjs.map +1 -0
- package/dist/sso/client.d.cts +90 -0
- package/dist/sso/client.d.ts +90 -0
- package/dist/sso/client.js +36 -0
- package/dist/sso/client.js.map +1 -0
- package/dist/sso/index.cjs +833 -0
- package/dist/sso/index.cjs.map +1 -0
- package/dist/sso/index.d.cts +3 -0
- package/dist/sso/index.d.ts +3 -0
- package/dist/sso/index.js +821 -0
- package/dist/sso/index.js.map +1 -0
- package/dist/sso/nestjs.cjs +169 -0
- package/dist/sso/nestjs.cjs.map +1 -0
- package/dist/sso/nestjs.d.cts +92 -0
- package/dist/sso/nestjs.d.ts +92 -0
- package/dist/sso/nestjs.js +151 -0
- package/dist/sso/nestjs.js.map +1 -0
- package/dist/sso/resource.cjs +124 -0
- package/dist/sso/resource.cjs.map +1 -0
- package/dist/sso/resource.d.cts +3 -0
- package/dist/sso/resource.d.ts +3 -0
- package/dist/sso/resource.js +114 -0
- package/dist/sso/resource.js.map +1 -0
- package/dist/status-CRvlFPIs.js +13 -0
- package/dist/status-CRvlFPIs.js.map +1 -0
- package/dist/status-DtK6OHtj.cjs +24 -0
- package/dist/status-DtK6OHtj.cjs.map +1 -0
- package/dist/team-CJVAg4HH.d.cts +157 -0
- package/dist/team-CJVAg4HH.d.ts +157 -0
- package/dist/telemetry/adapters.cjs +6 -0
- package/dist/telemetry/adapters.d.cts +3 -0
- package/dist/telemetry/adapters.d.ts +3 -0
- package/dist/telemetry/adapters.js +4 -0
- package/dist/telemetry/betterstack.cjs +74 -0
- package/dist/telemetry/betterstack.cjs.map +1 -0
- package/dist/telemetry/betterstack.d.cts +12 -0
- package/dist/telemetry/betterstack.d.ts +12 -0
- package/dist/telemetry/betterstack.js +71 -0
- package/dist/telemetry/betterstack.js.map +1 -0
- package/dist/telemetry/index.cjs +1237 -0
- package/dist/telemetry/index.cjs.map +1 -0
- package/dist/telemetry/index.d.cts +114 -0
- package/dist/telemetry/index.d.ts +114 -0
- package/dist/telemetry/index.js +1205 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/telemetry/posthog.cjs +72 -0
- package/dist/telemetry/posthog.cjs.map +1 -0
- package/dist/telemetry/posthog.d.cts +10 -0
- package/dist/telemetry/posthog.d.ts +10 -0
- package/dist/telemetry/posthog.js +71 -0
- package/dist/telemetry/posthog.js.map +1 -0
- package/dist/telemetry/register.cjs +6 -0
- package/dist/telemetry/register.d.cts +14 -0
- package/dist/telemetry/register.d.ts +14 -0
- package/dist/telemetry/register.js +3 -0
- package/dist/telemetry/testing.cjs +54 -0
- package/dist/telemetry/testing.cjs.map +1 -0
- package/dist/telemetry/testing.d.cts +15 -0
- package/dist/telemetry/testing.d.ts +15 -0
- package/dist/telemetry/testing.js +52 -0
- package/dist/telemetry/testing.js.map +1 -0
- package/dist/telemetry.mock-BSsx7L6S.cjs +45 -0
- package/dist/telemetry.mock-BSsx7L6S.cjs.map +1 -0
- package/dist/telemetry.mock-BZRpy63c.js +40 -0
- package/dist/telemetry.mock-BZRpy63c.js.map +1 -0
- package/dist/telemetry.mock-C1wXuf-M.d.cts +4 -0
- package/dist/telemetry.mock-CdaxofJ7.d.ts +4 -0
- package/dist/ui/chart.cjs +6 -0
- package/dist/ui/chart.d.cts +34 -0
- package/dist/ui/chart.d.ts +34 -0
- package/dist/ui/chart.js +6 -0
- package/dist/ui/form.cjs +1 -0
- package/dist/ui/form.d.cts +23 -0
- package/dist/ui/form.d.ts +23 -0
- package/dist/ui/form.js +1 -0
- package/dist/ui/hooks.cjs +1 -0
- package/dist/ui/hooks.d.cts +66 -0
- package/dist/ui/hooks.d.ts +66 -0
- package/dist/ui/hooks.js +1 -0
- package/dist/ui/index.cjs +1 -0
- package/dist/ui/index.d.cts +3 -0
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/styles.css +2 -0
- package/dist/ui/utils.cjs +1 -0
- package/dist/ui/utils.d.cts +199 -0
- package/dist/ui/utils.d.ts +199 -0
- package/dist/ui/utils.js +1 -0
- package/dist/use-mobile-BbeIMRgE.cjs +1 -0
- package/dist/use-mobile-Cdd4Lp7p.js +1 -0
- package/dist/use-mobile-ecpyXWz3.d.cts +10 -0
- package/dist/use-mobile-ecpyXWz3.d.ts +10 -0
- package/dist/verifier-BIBtPCVi.cjs +119 -0
- package/dist/verifier-BIBtPCVi.cjs.map +1 -0
- package/dist/verifier-DNdy5Ynw.js +90 -0
- package/dist/verifier-DNdy5Ynw.js.map +1 -0
- package/dist/version-CPunTYCY.js +1 -0
- package/dist/version-CfUi3iAV.cjs +1 -0
- package/package.json +523 -5
package/dist/ui/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as useCopyToClipboard,i as useDebounce,r as useMediaQuery,t as useIsMobile}from"../use-mobile-Cdd4Lp7p.js";import{t as cn}from"../cn-BVOnrSza.js";import{l as normalizeForSearch,r as generateStrongPassword}from"../misc-BpM_lMTx.js";import{t as Label}from"../label-XeChe1Bu.js";import{Accordion as Accordion$1,AlertDialog as AlertDialog$1,Avatar as Avatar$1,Checkbox as Checkbox$1,Collapsible as Collapsible$1,ContextMenu as ContextMenu$1,Dialog as Dialog$1,DropdownMenu as DropdownMenu$1,Popover as Popover$1,Progress as Progress$1,RadioGroup as RadioGroup$1,ScrollArea as ScrollArea$1,Select as Select$1,Separator as Separator$1,Slider as Slider$1,Slot,Switch as Switch$1,Tabs as Tabs$1,Toggle as Toggle$1,ToggleGroup as ToggleGroup$1,Tooltip as Tooltip$1}from"radix-ui";import{cva}from"class-variance-authority";import*as React from"react";import{useMemo}from"react";import{Fragment,jsx,jsxs}from"react/jsx-runtime";import{ArrowDown,ArrowUp,Check,CheckIcon,ChevronDown,ChevronDownIcon,ChevronLeft,ChevronLeftIcon,ChevronRight,ChevronRightIcon,ChevronUpIcon,ChevronsUpDown,CircleCheckIcon,CircleIcon,Columns3,CopyIcon,Eye,EyeOff,InfoIcon,Loader2Icon,MinusIcon,Monitor,Moon,MoreHorizontal,MoreHorizontalIcon,OctagonXIcon,PanelLeftIcon,Search,SearchIcon,SearchX,Sparkles,Sun,TerminalIcon,TriangleAlertIcon,UserRoundCog,X,XIcon}from"lucide-react";import{highlight}from"sugar-high";import{Command as Command$1}from"cmdk";import{Drawer as Drawer$1}from"vaul";import{Toaster as Toaster$1,toast}from"sonner";import{DayPicker,getDefaultClassNames}from"react-day-picker";import{OTPInput,OTPInputContext}from"input-otp";const buttonVariants=cva(`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,destructive:`bg-destructive hover:bg-destructive/90 focus-visible:ring-destructive/20 text-white`,outline:`bg-background hover:bg-accent hover:text-accent-foreground border shadow-xs`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-brand-blue underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2 has-[>svg]:px-3`,xs:`h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5`,lg:`h-10 rounded-md px-6 has-[>svg]:px-4`,icon:`size-9`,"icon-xs":`size-6 rounded-md [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}}),toggleVariants=cva(`hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-transparent`,outline:`border-input hover:bg-accent hover:text-accent-foreground border bg-transparent shadow-xs`},size:{default:`h-9 min-w-9 px-2`,sm:`h-8 min-w-8 px-1.5`,lg:`h-10 min-w-10 px-2.5`}},defaultVariants:{variant:`default`,size:`default`}}),ToggleGroupContext=React.createContext({size:`default`,variant:`default`,spacing:0});function Button({className,variant=`default`,size=`default`,asChild=!1,...props}){let Comp=asChild?Slot.Root:`button`;return/* @__PURE__ */ jsx(Comp,{"data-slot":`button`,"data-variant":variant,"data-size":size,className:cn(buttonVariants({variant,size,className})),...props})}function Toggle({className,variant,size,...props}){return/* @__PURE__ */ jsx(Toggle$1.Root,{"data-slot":`toggle`,className:cn(toggleVariants({variant,size,className})),...props})}function ToggleGroup({className,variant,size,spacing=0,children,...props}){let contexto=React.useMemo(()=>({variant,size,spacing}),[variant,size,spacing]);return/* @__PURE__ */ jsx(ToggleGroup$1.Root,{"data-slot":`toggle-group`,"data-variant":variant,"data-size":size,"data-spacing":spacing,style:{"--gap":spacing},className:cn(`group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs`,className),...props,children:/* @__PURE__ */ jsx(ToggleGroupContext.Provider,{value:contexto,children})})}function ToggleGroupItem({className,children,variant,size,...props}){let context=React.useContext(ToggleGroupContext);return/* @__PURE__ */ jsx(ToggleGroup$1.Item,{"data-slot":`toggle-group-item`,"data-variant":context.variant||variant,"data-size":context.size||size,"data-spacing":context.spacing,className:cn(toggleVariants({variant:context.variant||variant,size:context.size||size}),`w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10`,`data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l`,className),...props,children})}function ImpersonationBanner({children,onExit,exitLabel=`Encerrar`,exiting,icon=/* @__PURE__ */ jsx(UserRoundCog,{"aria-hidden":!0,className:`size-4`}),color,textColor,className,style,...props}){return/* @__PURE__ */ jsxs(`div`,{"data-slot":`impersonation-banner`,role:`status`,className:cn(`animate-in fade-in-0 slide-in-from-top-1 sticky top-0 z-50 grid w-full grid-cols-[1fr_auto_1fr] items-center gap-3 bg-(color:--impersonation-banner-color,#fbbf24) px-3 py-2 text-sm text-(color:--impersonation-banner-text,var(--foreground)) duration-200 ease-out max-sm:grid-cols-1 sm:px-4`,className),style:{...color&&{"--impersonation-banner-color":color},...textColor&&{"--impersonation-banner-text":textColor},...style},...props,children:[/* @__PURE__ */ jsx(`span`,{"aria-hidden":!0,className:`max-sm:hidden`}),/* @__PURE__ */ jsxs(`p`,{"data-slot":`impersonation-banner-message`,className:`relative min-w-0 text-center font-medium`,children:[icon?/* @__PURE__ */ jsx(`span`,{className:`absolute inset-y-0 right-full mr-2 items-center max-sm:hidden sm:flex`,children:icon}):null,children]}),/* @__PURE__ */ jsx(`span`,{className:`justify-end max-sm:hidden sm:flex`,children:onExit?/* @__PURE__ */ jsx(`button`,{type:`button`,"data-slot":`impersonation-banner-exit`,onClick:onExit,disabled:exiting,"aria-busy":exiting||void 0,className:`shrink-0 rounded-sm bg-current/10 px-2.5 py-0.5 text-xs font-medium whitespace-nowrap transition-[background-color,box-shadow,opacity] duration-150 ease-out outline-none hover:bg-current/20 focus-visible:ring-2 focus-visible:ring-current disabled:pointer-events-none disabled:opacity-60`,children:exitLabel}):null})]})}const LoginMethodsContext=React.createContext(null),EMAIL_PATTERN=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,VOLTA=2.4,MEIOS_MERIDIANOS=[0,60,120,180,240,300],BEZIER_K=.5523;function arco(desvio){let x=valor=>(12+valor).toFixed(2);return`M12 2C${x(desvio*BEZIER_K)} 2 ${x(desvio)} ${(12-10*BEZIER_K).toFixed(2)} ${x(desvio)} 12C${x(desvio)} ${17.523.toFixed(2)} ${x(desvio*BEZIER_K)} 22 12 22`}function quadros(inicio){let caminhos=[],opacidades=[];for(let passo=0;passo<=36;passo+=1){let theta=(inicio+360*passo/36)*Math.PI/180;caminhos.push(arco(10*Math.sin(theta))),opacidades.push(Math.cos(theta)>=0?`1`:`0.3`)}return{inicial:caminhos[0]??``,opacidadeInicial:opacidades[0]??`1`,caminhos:caminhos.join(`;`),opacidades:opacidades.join(`;`)}}const MERIDIANOS=MEIOS_MERIDIANOS.map(inicio=>({inicio,...quadros(inicio)})),EMPTY_SIGN_UP_FIELDS=[];function Accordion({...props}){return/* @__PURE__ */ jsx(Accordion$1.Root,{"data-slot":`accordion`,...props})}function AccordionItem({className,...props}){return/* @__PURE__ */ jsx(Accordion$1.Item,{"data-slot":`accordion-item`,className:cn(`border-b last:border-b-0`,className),...props})}function AccordionTrigger({className,children,...props}){return/* @__PURE__ */ jsx(Accordion$1.Header,{className:`flex`,children:/* @__PURE__ */ jsxs(Accordion$1.Trigger,{"data-slot":`accordion-trigger`,className:cn(`focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180`,className),...props,children:[children,/* @__PURE__ */ jsx(ChevronDownIcon,{className:`text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200`})]})})}function AccordionContent({className,children,...props}){return/* @__PURE__ */ jsx(Accordion$1.Content,{"data-slot":`accordion-content`,className:`data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm`,...props,children:/* @__PURE__ */ jsx(`div`,{className:cn(`pt-0 pb-4`,className),children})})}const alertVariants=cva(`animate-in fade-in-0 slide-in-from-top-1 relative flex w-full flex-col gap-0.5 rounded-lg border px-4 py-3 text-sm duration-150 ease-out has-[>svg]:pl-11 [&>svg]:absolute [&>svg]:top-1/2 [&>svg]:left-4 [&>svg]:size-4 [&>svg]:-translate-y-1/2 [&>svg]:text-current`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current`}},defaultVariants:{variant:`default`}}),badgeVariants=cva(`focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground [a&]:hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90`,destructive:`bg-destructive focus-visible:ring-destructive/20 [a&]:hover:bg-destructive/90 text-white`,outline:`border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,ghost:`[a&]:hover:bg-accent [a&]:hover:text-accent-foreground`,link:`text-brand-blue underline-offset-4 [a&]:hover:underline`,positive:`bg-positive-surface text-positive`,warning:`bg-warning-surface text-warning`,negative:`bg-negative-surface text-negative`,info:`bg-info-surface text-info`,neutral:`bg-neutral-surface text-muted-foreground`,brand:`border-brand-border bg-brand-surface text-brand-ink`},size:{sm:`gap-0.5 px-1.5 py-0 text-[10px] [&>svg]:size-2.5`,default:`px-2 py-0.5 text-xs [&>svg]:size-3`,lg:`gap-1.5 px-2.5 py-1 text-sm [&>svg]:size-3.5`}},defaultVariants:{variant:`default`,size:`default`}}),CODE_BLOCK_LABELS={copy:`Copiar`,copied:`Copiado`,copySelection:`Copiar seleção`,copyLine:`Copiar linha {line}`,copyAll:`Copiar tudo`,selectAll:`Selecionar tudo`,expand:`Ver código`,collapse:`Recolher`},PACKAGE_COMMAND_LABELS={copy:`Copiar`,copied:`Copiado`},PACKAGE_MANAGERS=[`bun`,`pnpm`,`npm`,`yarn`],PACKAGE_PREFIXES={add:{bun:`bun add`,pnpm:`pnpm add`,npm:`npm install`,yarn:`yarn add`},dev:{bun:`bun add -d`,pnpm:`pnpm add -D`,npm:`npm install -D`,yarn:`yarn add -D`},global:{bun:`bun add -g`,pnpm:`pnpm add -g`,npm:`npm install -g`,yarn:`yarn global add`},exec:{bun:`bunx`,pnpm:`pnpm dlx`,npm:`npx`,yarn:`yarn dlx`}};function Alert({className,variant,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`alert`,role:`alert`,className:cn(alertVariants({variant}),className),...props})}function AlertTitle({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`alert-title`,className:cn(`line-clamp-1 min-h-4 font-medium tracking-tight`,className),...props})}function AlertDescription({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`alert-description`,className:cn(`text-muted-foreground grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed`,className),...props})}function Avatar({className,size=`default`,...props}){return/* @__PURE__ */ jsx(Avatar$1.Root,{"data-slot":`avatar`,"data-size":size,className:cn(`group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6`,className),...props})}function AvatarImage({className,...props}){return/* @__PURE__ */ jsx(Avatar$1.Image,{"data-slot":`avatar-image`,className:cn(`aspect-square size-full`,className),...props})}function AvatarFallback({className,...props}){return/* @__PURE__ */ jsx(Avatar$1.Fallback,{"data-slot":`avatar-fallback`,className:cn(`bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs`,className),...props})}function AvatarBadge({className,...props}){return/* @__PURE__ */ jsx(`span`,{"data-slot":`avatar-badge`,className:cn(`bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none`,`group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden`,`group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2`,`group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2`,className),...props})}function AvatarGroup({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`avatar-group`,className:cn(`group/avatar-group *:data-[slot=avatar]:ring-background flex -space-x-2 *:data-[slot=avatar]:ring-2`,className),...props})}function AvatarGroupCount({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`avatar-group-count`,className:cn(`bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3`,className),...props})}function Badge({className,variant=`default`,size=`default`,asChild=!1,dot=!1,onDismiss,dismissLabel=`Remover`,children,...props}){let Comp=asChild?Slot.Root:`span`;return/* @__PURE__ */ jsx(Comp,{"data-slot":`badge`,"data-variant":variant,"data-size":size,className:cn(badgeVariants({variant,size}),className),...props,children:asChild?children:/* @__PURE__ */ jsxs(Fragment,{children:[dot?/* @__PURE__ */ jsx(`span`,{"aria-hidden":`true`,className:`size-1.5 shrink-0 rounded-full bg-current opacity-70`}):null,children,onDismiss?/* @__PURE__ */ jsx(`button`,{type:`button`,"aria-label":dismissLabel,onClick:onDismiss,className:`-mr-0.5 ml-0.5 grid size-3.5 shrink-0 cursor-pointer place-items-center rounded-full opacity-60 transition-[opacity,background-color] duration-150 ease-out hover:bg-current/15 hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-current`,children:/* @__PURE__ */ jsx(X,{className:`size-2.5`})}):null]})})}function Card({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`card`,className:cn(`bg-card text-card-foreground flex flex-col gap-4 rounded-lg border py-4 shadow-sm transition-shadow duration-150 ease-out`,className),...props})}function CardHeader({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`card-header`,className:cn(`@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1 px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-4`,className),...props})}function CardTitle({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`card-title`,className:cn(`leading-none font-semibold`,className),...props})}function CardDescription({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`card-description`,className:cn(`text-muted-foreground text-sm`,className),...props})}function CardAction({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`card-action`,className:cn(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,className),...props})}function CardContent({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`card-content`,className:cn(`px-4`,className),...props})}function CardFooter({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`card-footer`,className:cn(`flex items-center px-4 [.border-t]:pt-4`,className),...props})}function AlertDialog({...props}){return/* @__PURE__ */ jsx(AlertDialog$1.Root,{"data-slot":`alert-dialog`,...props})}function AlertDialogTrigger({...props}){return/* @__PURE__ */ jsx(AlertDialog$1.Trigger,{"data-slot":`alert-dialog-trigger`,...props})}function AlertDialogPortal({...props}){return/* @__PURE__ */ jsx(AlertDialog$1.Portal,{"data-slot":`alert-dialog-portal`,...props})}function AlertDialogOverlay({className,...props}){return/* @__PURE__ */ jsx(AlertDialog$1.Overlay,{"data-slot":`alert-dialog-overlay`,className:cn(`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 ease-out data-[state=closed]:duration-150 data-[state=open]:duration-200`,className),...props})}function AlertDialogContent({className,size=`default`,...props}){return/* @__PURE__ */ jsxs(AlertDialogPortal,{children:[/* @__PURE__ */ jsx(AlertDialogOverlay,{}),/* @__PURE__ */ jsx(AlertDialog$1.Content,{"data-slot":`alert-dialog-content`,"data-size":size,className:cn(`group/alert-dialog-content bg-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 ease-out data-[size=sm]:max-w-xs data-[state=closed]:duration-150 data-[state=open]:duration-200 data-[size=default]:sm:max-w-lg`,className),...props})]})}function AlertDialogHeader({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`alert-dialog-header`,className:cn(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,className),...props})}function AlertDialogFooter({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`alert-dialog-footer`,className:cn(`flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,className),...props})}function AlertDialogTitle({className,...props}){return/* @__PURE__ */ jsx(AlertDialog$1.Title,{"data-slot":`alert-dialog-title`,className:cn(`text-lg font-semibold sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,className),...props})}function AlertDialogDescription({className,...props}){return/* @__PURE__ */ jsx(AlertDialog$1.Description,{"data-slot":`alert-dialog-description`,className:cn(`text-muted-foreground text-sm`,className),...props})}function AlertDialogMedia({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`alert-dialog-media`,className:cn(`bg-muted mb-2 inline-flex size-16 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8`,className),...props})}function AlertDialogAction({className,variant=`default`,size=`default`,...props}){return/* @__PURE__ */ jsx(Button,{variant,size,asChild:!0,children:/* @__PURE__ */ jsx(AlertDialog$1.Action,{"data-slot":`alert-dialog-action`,className:cn(className),...props})})}function AlertDialogCancel({className,variant=`outline`,size=`default`,...props}){return/* @__PURE__ */ jsx(Button,{variant,size,asChild:!0,children:/* @__PURE__ */ jsx(AlertDialog$1.Cancel,{"data-slot":`alert-dialog-cancel`,className:cn(className),...props})})}function filtroSemAcento(value,search,keywords){let termo=normalizeForSearch(search);if(!termo)return 1;let posicao=normalizeForSearch([value,...keywords??[]].join(` `)).indexOf(termo);return posicao<0?0:posicao===0?1:1/(1+posicao)}function Command({className,filter=filtroSemAcento,...props}){return/* @__PURE__ */ jsx(Command$1,{"data-slot":`command`,filter,className:cn(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,className),...props})}function CommandDialog({title=`Command Palette`,description=`Search for a command to run...`,children,className,showCloseButton=!0,...props}){return/* @__PURE__ */ jsxs(Dialog,{...props,children:[/* @__PURE__ */ jsxs(DialogHeader,{className:`sr-only`,children:[/* @__PURE__ */ jsx(DialogTitle,{children:title}),/* @__PURE__ */ jsx(DialogDescription,{children:description})]}),/* @__PURE__ */ jsx(DialogContent,{className:cn(`overflow-hidden p-0`,className),showCloseButton,children:/* @__PURE__ */ jsx(Command,{className:`[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,children})})]})}function CommandInput({className,...props}){return/* @__PURE__ */ jsxs(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[/* @__PURE__ */ jsx(SearchIcon,{className:`size-4 shrink-0 opacity-50`}),/* @__PURE__ */ jsx(Command$1.Input,{"data-slot":`command-input`,className:cn(`placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,className),...props})]})}function CommandList({className,...props}){return/* @__PURE__ */ jsx(Command$1.List,{"data-slot":`command-list`,className:cn(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,className),...props})}function CommandEmpty({...props}){return/* @__PURE__ */ jsx(Command$1.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...props})}function CommandGroup({className,...props}){return/* @__PURE__ */ jsx(Command$1.Group,{"data-slot":`command-group`,className:cn(`text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium`,className),...props})}function CommandSeparator({className,...props}){return/* @__PURE__ */ jsx(Command$1.Separator,{"data-slot":`command-separator`,className:cn(`bg-border -mx-1 h-px`,className),...props})}function CommandItem({className,...props}){return/* @__PURE__ */ jsx(Command$1.Item,{"data-slot":`command-item`,className:cn(`data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground data-[selected=true]:[&_svg:not([class*='text-'])]:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),...props})}function CommandShortcut({className,...props}){return/* @__PURE__ */ jsx(`span`,{"data-slot":`command-shortcut`,className:cn(`text-muted-foreground ml-auto text-xs tracking-widest`,className),...props})}function ContextMenu({...props}){return/* @__PURE__ */ jsx(ContextMenu$1.Root,{"data-slot":`context-menu`,...props})}function ContextMenuPortal({...props}){return/* @__PURE__ */ jsx(ContextMenu$1.Portal,{"data-slot":`context-menu-portal`,...props})}function ContextMenuTrigger({...props}){return/* @__PURE__ */ jsx(ContextMenu$1.Trigger,{"data-slot":`context-menu-trigger`,...props})}function ContextMenuContent({className,...props}){return/* @__PURE__ */ jsx(ContextMenu$1.Portal,{children:/* @__PURE__ */ jsx(ContextMenu$1.Content,{"data-slot":`context-menu-content`,className:cn(`bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 max-h-(--radix-context-menu-content-available-height) max-w-(--radix-context-menu-content-available-width) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md ease-out data-[state=closed]:duration-150 data-[state=open]:duration-200`,className),...props})})}function ContextMenuGroup({...props}){return/* @__PURE__ */ jsx(ContextMenu$1.Group,{"data-slot":`context-menu-group`,...props})}function ContextMenuItem({className,inset,variant=`default`,...props}){return/* @__PURE__ */ jsx(ContextMenu$1.Item,{"data-slot":`context-menu-item`,"data-inset":inset,"data-variant":variant,className:cn(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive! relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),...props})}function ContextMenuCheckboxItem({className,children,checked,...props}){return/* @__PURE__ */ jsxs(ContextMenu$1.CheckboxItem,{"data-slot":`context-menu-checkbox-item`,className:cn(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),checked,...props,children:[/* @__PURE__ */ jsx(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:/* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator,{children:/* @__PURE__ */ jsx(CheckIcon,{className:`size-4`})})}),children]})}function ContextMenuRadioGroup({...props}){return/* @__PURE__ */ jsx(ContextMenu$1.RadioGroup,{"data-slot":`context-menu-radio-group`,...props})}function ContextMenuRadioItem({className,children,...props}){return/* @__PURE__ */ jsxs(ContextMenu$1.RadioItem,{"data-slot":`context-menu-radio-item`,className:cn(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),...props,children:[/* @__PURE__ */ jsx(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:/* @__PURE__ */ jsx(ContextMenu$1.ItemIndicator,{children:/* @__PURE__ */ jsx(CircleIcon,{className:`size-2 fill-current`})})}),children]})}function ContextMenuLabel({className,inset,...props}){return/* @__PURE__ */ jsx(ContextMenu$1.Label,{"data-slot":`context-menu-label`,"data-inset":inset,className:cn(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,className),...props})}function ContextMenuSeparator({className,...props}){return/* @__PURE__ */ jsx(ContextMenu$1.Separator,{"data-slot":`context-menu-separator`,className:cn(`bg-border -mx-1 my-1 h-px`,className),...props})}function ContextMenuShortcut({className,...props}){return/* @__PURE__ */ jsx(`span`,{"data-slot":`context-menu-shortcut`,className:cn(`text-muted-foreground ml-auto text-xs tracking-widest`,className),...props})}function ContextMenuSub({...props}){return/* @__PURE__ */ jsx(ContextMenu$1.Sub,{"data-slot":`context-menu-sub`,...props})}function ContextMenuSubTrigger({className,inset,children,...props}){return/* @__PURE__ */ jsxs(ContextMenu$1.SubTrigger,{"data-slot":`context-menu-sub-trigger`,"data-inset":inset,className:cn(`focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),...props,children:[children,/* @__PURE__ */ jsx(ChevronRightIcon,{className:`ml-auto size-4`})]})}function ContextMenuSubContent({className,...props}){return/* @__PURE__ */ jsx(ContextMenu$1.SubContent,{"data-slot":`context-menu-sub-content`,className:cn(`bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 max-w-(--radix-context-menu-content-available-width) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg ease-out data-[state=closed]:duration-150 data-[state=open]:duration-200`,className),...props})}function Dialog({...props}){return/* @__PURE__ */ jsx(Dialog$1.Root,{"data-slot":`dialog`,...props})}function DialogTrigger({...props}){return/* @__PURE__ */ jsx(Dialog$1.Trigger,{"data-slot":`dialog-trigger`,...props})}function DialogPortal({...props}){return/* @__PURE__ */ jsx(Dialog$1.Portal,{"data-slot":`dialog-portal`,...props})}function DialogClose({...props}){return/* @__PURE__ */ jsx(Dialog$1.Close,{"data-slot":`dialog-close`,...props})}function DialogOverlay({className,...props}){return/* @__PURE__ */ jsx(Dialog$1.Overlay,{"data-slot":`dialog-overlay`,className:cn(`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 ease-out data-[state=closed]:duration-150 data-[state=open]:duration-200`,className),...props})}function DialogContent({className,children,showCloseButton=!0,...props}){return/* @__PURE__ */ jsxs(DialogPortal,{"data-slot":`dialog-portal`,children:[/* @__PURE__ */ jsx(DialogOverlay,{}),/* @__PURE__ */ jsxs(Dialog$1.Content,{"data-slot":`dialog-content`,className:cn(`bg-background data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg ease-out outline-none data-[state=closed]:duration-150 data-[state=open]:duration-200 sm:max-w-lg`,className),...props,children:[children,showCloseButton&&/* @__PURE__ */ jsxs(Dialog$1.Close,{"data-slot":`dialog-close`,className:`ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,children:[/* @__PURE__ */ jsx(XIcon,{}),/* @__PURE__ */ jsx(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function DialogHeader({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`dialog-header`,className:cn(`flex flex-col gap-2 text-center sm:text-left`,className),...props})}function DialogFooter({className,showCloseButton=!1,children,...props}){return/* @__PURE__ */ jsxs(`div`,{"data-slot":`dialog-footer`,className:cn(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,className),...props,children:[children,showCloseButton&&/* @__PURE__ */ jsx(Dialog$1.Close,{asChild:!0,children:/* @__PURE__ */ jsx(Button,{variant:`outline`,children:`Close`})})]})}function DialogTitle({className,...props}){return/* @__PURE__ */ jsx(Dialog$1.Title,{"data-slot":`dialog-title`,className:cn(`text-lg leading-none font-semibold`,className),...props})}function DialogDescription({className,...props}){return/* @__PURE__ */ jsx(Dialog$1.Description,{"data-slot":`dialog-description`,className:cn(`text-muted-foreground text-sm`,className),...props})}function Drawer({...props}){return/* @__PURE__ */ jsx(Drawer$1.Root,{"data-slot":`drawer`,...props})}function DrawerTrigger({...props}){return/* @__PURE__ */ jsx(Drawer$1.Trigger,{"data-slot":`drawer-trigger`,...props})}function DrawerPortal({...props}){return/* @__PURE__ */ jsx(Drawer$1.Portal,{"data-slot":`drawer-portal`,...props})}function DrawerClose({...props}){return/* @__PURE__ */ jsx(Drawer$1.Close,{"data-slot":`drawer-close`,...props})}function DrawerOverlay({className,...props}){return/* @__PURE__ */ jsx(Drawer$1.Overlay,{"data-slot":`drawer-overlay`,className:cn(`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,className),...props})}function DrawerContent({className,children,...props}){return/* @__PURE__ */ jsxs(DrawerPortal,{"data-slot":`drawer-portal`,children:[/* @__PURE__ */ jsx(DrawerOverlay,{}),/* @__PURE__ */ jsxs(Drawer$1.Content,{"data-slot":`drawer-content`,className:cn(`group/drawer-content bg-background fixed z-50 flex h-auto flex-col`,`data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b`,`data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t`,`data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm`,`data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm`,className),...props,children:[/* @__PURE__ */ jsx(`div`,{className:`bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block`}),children]})]})}function DrawerHeader({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`drawer-header`,className:cn(`flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left`,className),...props})}function DrawerFooter({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`drawer-footer`,className:cn(`mt-auto flex flex-col gap-2 p-4`,className),...props})}function DrawerTitle({className,...props}){return/* @__PURE__ */ jsx(Drawer$1.Title,{"data-slot":`drawer-title`,className:cn(`text-foreground font-semibold`,className),...props})}function DrawerDescription({className,...props}){return/* @__PURE__ */ jsx(Drawer$1.Description,{"data-slot":`drawer-description`,className:cn(`text-muted-foreground text-sm`,className),...props})}function DropdownMenu({...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.Root,{"data-slot":`dropdown-menu`,...props})}function DropdownMenuPortal({...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.Portal,{"data-slot":`dropdown-menu-portal`,...props})}function DropdownMenuTrigger({...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.Trigger,{"data-slot":`dropdown-menu-trigger`,...props})}function DropdownMenuContent({className,sideOffset=4,...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.Portal,{children:/* @__PURE__ */ jsx(DropdownMenu$1.Content,{"data-slot":`dropdown-menu-content`,sideOffset,className:cn(`bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 max-h-(--radix-dropdown-menu-content-available-height) max-w-(--radix-dropdown-menu-content-available-width) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md ease-out data-[state=closed]:duration-150 data-[state=open]:duration-200`,className),...props})})}function DropdownMenuGroup({...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.Group,{"data-slot":`dropdown-menu-group`,...props})}function DropdownMenuItem({className,inset,variant=`default`,...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.Item,{"data-slot":`dropdown-menu-item`,"data-inset":inset,"data-variant":variant,className:cn(`focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive! relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),...props})}function DropdownMenuCheckboxItem({className,children,checked,...props}){return/* @__PURE__ */ jsxs(DropdownMenu$1.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:cn(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),checked,...props,children:[/* @__PURE__ */ jsx(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:/* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator,{children:/* @__PURE__ */ jsx(CheckIcon,{className:`size-4`})})}),children]})}function DropdownMenuRadioGroup({...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...props})}function DropdownMenuRadioItem({className,children,...props}){return/* @__PURE__ */ jsxs(DropdownMenu$1.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:cn(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),...props,children:[/* @__PURE__ */ jsx(`span`,{className:`pointer-events-none absolute left-2 flex size-3.5 items-center justify-center`,children:/* @__PURE__ */ jsx(DropdownMenu$1.ItemIndicator,{children:/* @__PURE__ */ jsx(CircleIcon,{className:`size-2 fill-current`})})}),children]})}function DropdownMenuLabel({className,inset,...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.Label,{"data-slot":`dropdown-menu-label`,"data-inset":inset,className:cn(`px-2 py-1.5 text-sm font-medium data-[inset]:pl-8`,className),...props})}function DropdownMenuSeparator({className,...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.Separator,{"data-slot":`dropdown-menu-separator`,className:cn(`bg-border -mx-1 my-1 h-px`,className),...props})}function DropdownMenuShortcut({className,...props}){return/* @__PURE__ */ jsx(`span`,{"data-slot":`dropdown-menu-shortcut`,className:cn(`text-muted-foreground ml-auto text-xs tracking-widest`,className),...props})}function DropdownMenuSub({...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.Sub,{"data-slot":`dropdown-menu-sub`,...props})}function DropdownMenuSubTrigger({className,inset,children,...props}){return/* @__PURE__ */ jsxs(DropdownMenu$1.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":inset,className:cn(`focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),...props,children:[children,/* @__PURE__ */ jsx(ChevronRightIcon,{className:`ml-auto size-4`})]})}function DropdownMenuSubContent({className,...props}){return/* @__PURE__ */ jsx(DropdownMenu$1.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:cn(`bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 max-w-(--radix-dropdown-menu-content-available-width) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg ease-out data-[state=closed]:duration-150 data-[state=open]:duration-200`,className),...props})}function Popover({...props}){return/* @__PURE__ */ jsx(Popover$1.Root,{"data-slot":`popover`,...props})}function PopoverTrigger({...props}){return/* @__PURE__ */ jsx(Popover$1.Trigger,{"data-slot":`popover-trigger`,...props})}function PopoverContent({className,align=`center`,sideOffset=4,...props}){return/* @__PURE__ */ jsx(Popover$1.Portal,{children:/* @__PURE__ */ jsx(Popover$1.Content,{"data-slot":`popover-content`,align,sideOffset,className:cn(`bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 z-50 max-h-(--radix-popover-content-available-height) w-72 max-w-(--radix-popover-content-available-width) origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden ease-out data-[state=closed]:duration-150 data-[state=open]:duration-200`,className),...props})})}function PopoverAnchor({...props}){return/* @__PURE__ */ jsx(Popover$1.Anchor,{"data-slot":`popover-anchor`,...props})}function PopoverHeader({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`popover-header`,className:cn(`flex flex-col gap-1 text-sm`,className),...props})}function PopoverTitle({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`popover-title`,className:cn(`font-medium`,className),...props})}function PopoverDescription({className,...props}){return/* @__PURE__ */ jsx(`p`,{"data-slot":`popover-description`,className:cn(`text-muted-foreground`,className),...props})}function Sheet({...props}){return/* @__PURE__ */ jsx(Dialog$1.Root,{"data-slot":`sheet`,...props})}function SheetTrigger({...props}){return/* @__PURE__ */ jsx(Dialog$1.Trigger,{"data-slot":`sheet-trigger`,...props})}function SheetClose({...props}){return/* @__PURE__ */ jsx(Dialog$1.Close,{"data-slot":`sheet-close`,...props})}function SheetPortal({...props}){return/* @__PURE__ */ jsx(Dialog$1.Portal,{"data-slot":`sheet-portal`,...props})}function SheetOverlay({className,...props}){return/* @__PURE__ */ jsx(Dialog$1.Overlay,{"data-slot":`sheet-overlay`,className:cn(`data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,className),...props})}function SheetContent({className,children,side=`right`,showCloseButton=!0,...props}){return/* @__PURE__ */ jsxs(SheetPortal,{children:[/* @__PURE__ */ jsx(SheetOverlay,{}),/* @__PURE__ */ jsxs(Dialog$1.Content,{"data-slot":`sheet-content`,className:cn(`bg-background data-[state=closed]:animate-out data-[state=open]:animate-in fixed z-50 flex flex-col gap-4 shadow-lg transition ease-out data-[state=closed]:duration-200 data-[state=open]:duration-300`,side===`right`&&`data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,side===`left`&&`data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,side===`top`&&`data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b`,side===`bottom`&&`data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t`,className),...props,children:[children,showCloseButton&&/* @__PURE__ */ jsxs(Dialog$1.Close,{className:`ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none`,children:[/* @__PURE__ */ jsx(XIcon,{className:`size-4`}),/* @__PURE__ */ jsx(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function SheetHeader({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`sheet-header`,className:cn(`flex flex-col gap-1.5 p-4`,className),...props})}function SheetFooter({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`sheet-footer`,className:cn(`mt-auto flex flex-col gap-2 p-4`,className),...props})}function SheetTitle({className,...props}){return/* @__PURE__ */ jsx(Dialog$1.Title,{"data-slot":`sheet-title`,className:cn(`text-foreground font-semibold`,className),...props})}function SheetDescription({className,...props}){return/* @__PURE__ */ jsx(Dialog$1.Description,{"data-slot":`sheet-description`,className:cn(`text-muted-foreground text-sm`,className),...props})}const Toaster=({...props})=>/* @__PURE__ */ jsx(Toaster$1,{theme:`light`,richColors:!0,className:`toaster group`,icons:{success:/* @__PURE__ */ jsx(CircleCheckIcon,{className:`size-4`}),info:/* @__PURE__ */ jsx(InfoIcon,{className:`size-4`}),warning:/* @__PURE__ */ jsx(TriangleAlertIcon,{className:`size-4`}),error:/* @__PURE__ */ jsx(OctagonXIcon,{className:`size-4`}),loading:/* @__PURE__ */ jsx(Loader2Icon,{className:`size-4 animate-spin`})},style:{"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius-md)`,"--success-bg":`var(--positive-surface)`,"--success-text":`var(--positive)`,"--success-border":`var(--positive)`,"--warning-bg":`var(--warning-surface)`,"--warning-text":`var(--warning)`,"--warning-border":`var(--warning)`,"--error-bg":`var(--negative-surface)`,"--error-text":`var(--negative)`,"--error-border":`var(--negative)`},...props});function TooltipProvider({delayDuration=0,...props}){return/* @__PURE__ */ jsx(Tooltip$1.Provider,{"data-slot":`tooltip-provider`,delayDuration,...props})}function Tooltip({...props}){return/* @__PURE__ */ jsx(Tooltip$1.Root,{"data-slot":`tooltip`,...props})}function TooltipTrigger({...props}){return/* @__PURE__ */ jsx(Tooltip$1.Trigger,{"data-slot":`tooltip-trigger`,...props})}function TooltipContent({className,sideOffset=0,children,...props}){return/* @__PURE__ */ jsx(Tooltip$1.Portal,{children:/* @__PURE__ */ jsxs(Tooltip$1.Content,{"data-slot":`tooltip-content`,sideOffset,className:cn(`animate-in bg-foreground text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 z-50 w-fit max-w-(--radix-tooltip-content-available-width) origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance duration-200 ease-out data-[state=closed]:duration-150`,className),...props,children:[children,/* @__PURE__ */ jsx(Tooltip$1.Arrow,{className:`bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}function textoDasLinhas(linhas){return linhas.map(linha=>linha.tokens.map(t=>t.value).join(``))}function CodeBlock({code,filename,language,lineNumbers=!0,collapsible=!1,labels:rotulos,className,...props}){let labels={...CODE_BLOCK_LABELS,...rotulos},{copied,copy}=useCopyToClipboard(),[aberto,setAberto]=React.useState(!1),[contexto,setContexto]=React.useState({selecao:``,linha:null}),codigo=React.useRef(null),linhas=React.useMemo(()=>{let coletadas=[];return highlight(code,{...language===void 0?{}:{lang:language},markLine:linha=>{coletadas.push({...linha})}}),coletadas},[code,language]);function capturarContexto(evento){let selecao=window.getSelection(),dentro=selecao&&!selecao.isCollapsed&&codigo.current?.contains(selecao.anchorNode),linha=evento.target.closest(`[data-line]`)?.getAttribute(`data-line`);setContexto({selecao:dentro?selecao.toString():``,linha:linha?Number(linha):null})}function abrirPelaSelecao(evento){if(evento.button!==0)return;let selecao=window.getSelection();if(!selecao||selecao.isCollapsed||selecao.rangeCount===0||!codigo.current?.contains(selecao.anchorNode)||!codigo.current?.contains(selecao.focusNode))return;let intervalo=selecao.getRangeAt(0),fim=intervalo.endContainer,linha=(fim instanceof Element?fim:fim.parentElement)?.closest(`[data-line]`);if(!linha)return;let retangulos=intervalo.getClientRects?.(),ultimo=retangulos&&retangulos.length>0?retangulos[retangulos.length-1]:linha.getBoundingClientRect();linha.dispatchEvent(new MouseEvent(`contextmenu`,{bubbles:!0,cancelable:!0,button:2,clientX:ultimo?.right??0,clientY:(ultimo?.bottom??0)+4}))}function selecionarTudo(){let alvo=codigo.current,selecao=window.getSelection();if(!alvo||!selecao)return;let intervalo=document.createRange();intervalo.selectNodeContents(alvo),selecao.removeAllRanges(),selecao.addRange(intervalo)}let botaoCopiar=/* @__PURE__ */ jsx(Button,{variant:`ghost`,size:`icon-sm`,onClick:()=>copy(code),"aria-label":copied?labels.copied:labels.copy,children:copied?/* @__PURE__ */ jsx(CheckIcon,{className:`text-positive`}):/* @__PURE__ */ jsx(CopyIcon,{})});return/* @__PURE__ */ jsxs(ContextMenu,{modal:!1,children:[/* @__PURE__ */ jsx(ContextMenuTrigger,{asChild:!0,onContextMenu:capturarContexto,onMouseUp:abrirPelaSelecao,children:/* @__PURE__ */ jsxs(`div`,{"data-slot":`code-block`,className:cn(`bg-card relative flex flex-col overflow-hidden rounded-lg border`,className),...props,children:[filename?/* @__PURE__ */ jsxs(Fragment,{children:[/* @__PURE__ */ jsxs(`div`,{"data-slot":`code-block-header`,className:`flex items-center justify-between gap-2 py-1.5 pr-2 pl-4`,children:[/* @__PURE__ */ jsx(`span`,{className:`text-muted-foreground min-w-0 truncate font-mono text-xs`,children:filename}),botaoCopiar]}),/* @__PURE__ */ jsx(Separator,{fade:!0})]}):/* @__PURE__ */ jsx(`div`,{className:`absolute top-2 right-2 z-10`,children:botaoCopiar}),/* @__PURE__ */ jsx(`pre`,{"data-slot":`code-block-pre`,"data-line-numbers":lineNumbers||void 0,className:cn(`overflow-x-auto p-4 font-mono text-[13px] leading-6 transition-[max-height] duration-200 ease-out`,collapsible&&!aberto&&`max-h-44 overflow-y-hidden`),children:/* @__PURE__ */ jsx(`code`,{ref:codigo,children:linhas.map(linha=>/* @__PURE__ */ jsx(`span`,{"data-line":linha.index+1,children:linha.tokens.map((token,indice)=>/* @__PURE__ */ jsx(`span`,{"data-token":token.type,children:token.value},indice))},linha.index))})}),collapsible?/* @__PURE__ */ jsx(`div`,{className:cn(`flex items-end justify-center`,aberto?`bg-card border-t p-2`:`from-card via-card/85 pointer-events-none absolute inset-x-0 bottom-0 h-24 bg-gradient-to-t to-transparent pb-3`),children:/* @__PURE__ */ jsxs(Button,{variant:`outline`,size:`sm`,onClick:()=>setAberto(valor=>!valor),"aria-expanded":aberto,className:cn(!aberto&&`pointer-events-auto shadow-sm`),children:[jsx(aberto?ChevronUpIcon:ChevronDownIcon,{}),aberto?labels.collapse:labels.expand]})}):null]})}),/* @__PURE__ */ jsxs(ContextMenuContent,{children:[/* @__PURE__ */ jsx(ContextMenuItem,{disabled:!contexto.selecao,onSelect:()=>copy(contexto.selecao),children:labels.copySelection}),contexto.linha?/* @__PURE__ */ jsx(ContextMenuItem,{onSelect:()=>copy(textoDasLinhas(linhas)[(contexto.linha??1)-1]??``),children:labels.copyLine.replace(`{line}`,String(contexto.linha))}):null,/* @__PURE__ */ jsx(ContextMenuItem,{onSelect:()=>copy(code),children:labels.copyAll}),/* @__PURE__ */ jsx(ContextMenuSeparator,{}),/* @__PURE__ */ jsx(ContextMenuItem,{onSelect:selecionarTudo,children:labels.selectAll})]})]})}function Collapsible({...props}){return/* @__PURE__ */ jsx(Collapsible$1.Root,{"data-slot":`collapsible`,...props})}function CollapsibleTrigger({...props}){return/* @__PURE__ */ jsx(Collapsible$1.CollapsibleTrigger,{"data-slot":`collapsible-trigger`,...props})}function CollapsibleContent({...props}){return/* @__PURE__ */ jsx(Collapsible$1.CollapsibleContent,{"data-slot":`collapsible-content`,...props})}function EmptyState({icon:Icon,title,description,action,className}){return/* @__PURE__ */ jsxs(`div`,{"data-slot":`empty-state`,className:cn(`animate-in fade-in-0 flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed px-6 py-12 text-center duration-200 ease-out`,className),children:[/* @__PURE__ */ jsx(`span`,{className:`bg-neutral-surface grid size-10 place-items-center rounded-md`,children:/* @__PURE__ */ jsx(Icon,{className:`text-muted-foreground size-5`})}),/* @__PURE__ */ jsx(`p`,{className:`mt-1 text-sm font-medium`,children:title}),/* @__PURE__ */ jsx(`p`,{className:`text-muted-foreground max-w-sm text-xs`,children:description}),action?/* @__PURE__ */ jsx(`div`,{className:`mt-2`,children:action}):null]})}function Breadcrumb({...props}){return/* @__PURE__ */ jsx(`nav`,{"aria-label":`breadcrumb`,"data-slot":`breadcrumb`,...props})}function BreadcrumbList({className,...props}){return/* @__PURE__ */ jsx(`ol`,{"data-slot":`breadcrumb-list`,className:cn(`text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5`,className),...props})}function BreadcrumbItem({className,...props}){return/* @__PURE__ */ jsx(`li`,{"data-slot":`breadcrumb-item`,className:cn(`inline-flex items-center gap-1.5`,className),...props})}function BreadcrumbLink({asChild,className,...props}){let Comp=asChild?Slot.Root:`a`;return/* @__PURE__ */ jsx(Comp,{"data-slot":`breadcrumb-link`,className:cn(`hover:text-foreground transition-colors duration-150 ease-out`,className),...props})}function BreadcrumbPage({className,...props}){return/* @__PURE__ */ jsx(`span`,{"data-slot":`breadcrumb-page`,"aria-disabled":`true`,"aria-current":`page`,className:cn(`text-foreground font-normal`,className),...props})}function BreadcrumbSeparator({children,className,...props}){return/* @__PURE__ */ jsx(`li`,{"data-slot":`breadcrumb-separator`,role:`presentation`,"aria-hidden":`true`,className:cn(`[&>svg]:size-3.5`,className),...props,children:children??/* @__PURE__ */ jsx(ChevronRight,{})})}function BreadcrumbEllipsis({className,...props}){return/* @__PURE__ */ jsxs(`span`,{"data-slot":`breadcrumb-ellipsis`,role:`presentation`,"aria-hidden":`true`,className:cn(`flex size-9 items-center justify-center`,className),...props,children:[/* @__PURE__ */ jsx(MoreHorizontal,{className:`size-4`}),/* @__PURE__ */ jsx(`span`,{className:`sr-only`,children:`More`})]})}function Pagination({className,...props}){return/* @__PURE__ */ jsx(`nav`,{"aria-label":`pagination`,"data-slot":`pagination`,className:cn(`mx-auto flex w-full justify-center`,className),...props})}function PaginationContent({className,...props}){return/* @__PURE__ */ jsx(`ul`,{"data-slot":`pagination-content`,className:cn(`flex flex-row items-center gap-1`,className),...props})}function PaginationItem({...props}){return/* @__PURE__ */ jsx(`li`,{"data-slot":`pagination-item`,...props})}function PaginationLink({className,isActive,size=`icon`,...props}){return/* @__PURE__ */ jsx(`a`,{"aria-current":isActive?`page`:void 0,"data-slot":`pagination-link`,"data-active":isActive,className:cn(buttonVariants({variant:isActive?`outline`:`ghost`,size}),className),...props})}function PaginationPrevious({className,...props}){return/* @__PURE__ */ jsxs(PaginationLink,{"aria-label":`Go to previous page`,size:`default`,className:cn(`gap-1 px-2.5 sm:pl-2.5`,className),...props,children:[/* @__PURE__ */ jsx(ChevronLeftIcon,{}),/* @__PURE__ */ jsx(`span`,{className:`hidden sm:block`,children:`Previous`})]})}function PaginationNext({className,...props}){return/* @__PURE__ */ jsxs(PaginationLink,{"aria-label":`Go to next page`,size:`default`,className:cn(`gap-1 px-2.5 sm:pr-2.5`,className),...props,children:[/* @__PURE__ */ jsx(`span`,{className:`hidden sm:block`,children:`Next`}),/* @__PURE__ */ jsx(ChevronRightIcon,{})]})}function PaginationEllipsis({className,...props}){return/* @__PURE__ */ jsxs(`span`,{"aria-hidden":!0,"data-slot":`pagination-ellipsis`,className:cn(`flex size-9 items-center justify-center`,className),...props,children:[/* @__PURE__ */ jsx(MoreHorizontalIcon,{className:`size-4`}),/* @__PURE__ */ jsx(`span`,{className:`sr-only`,children:`More pages`})]})}const SidebarContext=React.createContext(null),sidebarMenuButtonVariants=cva(`peer/menu-button ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}}),tabsListVariants=cva(`group/tabs-list text-muted-foreground relative inline-flex w-fit max-w-full items-center justify-center rounded-lg p-[3px] group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=horizontal]/tabs:overflow-x-auto group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Calendar({className,classNames,showOutsideDays=!0,captionLayout=`label`,buttonVariant=`ghost`,formatters,components,...props}){let defaultClassNames=getDefaultClassNames();return/* @__PURE__ */ jsx(DayPicker,{showOutsideDays,className:cn(`group/calendar bg-card p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent`,className),captionLayout,formatters:{formatMonthDropdown:date=>date.toLocaleString(`pt-BR`,{month:`short`}),...formatters},classNames:{root:cn(`w-fit`,defaultClassNames.root),months:cn(`relative flex flex-col gap-4 md:flex-row`,defaultClassNames.months),month:cn(`flex w-full flex-col gap-4`,defaultClassNames.month),nav:cn(`absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1`,defaultClassNames.nav),button_previous:cn(buttonVariants({variant:buttonVariant}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,defaultClassNames.button_previous),button_next:cn(buttonVariants({variant:buttonVariant}),`size-(--cell-size) p-0 select-none aria-disabled:opacity-50`,defaultClassNames.button_next),month_caption:cn(`flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)`,defaultClassNames.month_caption),dropdowns:cn(`flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium`,defaultClassNames.dropdowns),dropdown_root:cn(`hover:bg-accent has-focus:ring-ring/50 relative rounded-md transition-[color,background-color,box-shadow] duration-150 ease-out has-focus:ring-[3px]`,defaultClassNames.dropdown_root),dropdown:cn(`bg-popover absolute inset-0 opacity-0`,defaultClassNames.dropdown),caption_label:cn(`font-medium select-none`,captionLayout===`label`?`text-sm`:`[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5`,defaultClassNames.caption_label),month_grid:cn(`w-full border-collapse`,defaultClassNames.month_grid),weekdays:cn(`flex`,defaultClassNames.weekdays),weekday:cn(`text-muted-foreground flex-1 rounded-md text-[0.8rem] font-normal select-none`,defaultClassNames.weekday),week:cn(`mt-2 flex w-full`,defaultClassNames.week),week_number_header:cn(`w-(--cell-size) select-none`,defaultClassNames.week_number_header),week_number:cn(`text-muted-foreground text-[0.8rem] select-none`,defaultClassNames.week_number),day:cn(`group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md`,props.showWeekNumber?`[&:nth-child(2)[data-selected=true]_button]:rounded-l-md`:`[&:first-child[data-selected=true]_button]:rounded-l-md`,defaultClassNames.day),range_start:cn(`bg-accent rounded-l-md`,defaultClassNames.range_start),range_middle:cn(`rounded-none`,defaultClassNames.range_middle),range_end:cn(`bg-accent rounded-r-md`,defaultClassNames.range_end),today:cn(`bg-brand-surface text-brand-ink rounded-md font-medium data-[selected=true]:rounded-none`,defaultClassNames.today),outside:cn(`text-muted-foreground aria-selected:text-muted-foreground`,defaultClassNames.outside),disabled:cn(`text-muted-foreground opacity-50`,defaultClassNames.disabled),hidden:cn(`invisible`,defaultClassNames.hidden),...classNames},components:{Root:({className:rootClassName,rootRef,...rootProps})=>/* @__PURE__ */ jsx(`div`,{"data-slot":`calendar`,ref:rootRef,className:cn(rootClassName),...rootProps}),Chevron:({className:chevronClassName,orientation,...chevronProps})=>jsx(orientation===`left`?ChevronLeft:orientation===`right`?ChevronRight:ChevronDown,{className:cn(`size-4`,chevronClassName),...chevronProps}),DayButton:CalendarDayButton,WeekNumber:({children,...weekProps})=>/* @__PURE__ */ jsx(`td`,{...weekProps,children:/* @__PURE__ */ jsx(`div`,{className:`flex size-(--cell-size) items-center justify-center text-center`,children})}),...components},...props})}function CalendarDayButton({className,day,modifiers,...props}){let defaultClassNames=getDefaultClassNames(),ref=React.useRef(null);return React.useEffect(()=>{modifiers.focused&&ref.current?.focus()},[modifiers.focused]),/* @__PURE__ */ jsx(Button,{ref,variant:`ghost`,size:`icon`,"data-day":day.date.toLocaleDateString(`pt-BR`),"data-selected-single":modifiers.selected&&!modifiers.range_start&&!modifiers.range_end&&!modifiers.range_middle,"data-range-start":modifiers.range_start,"data-range-end":modifiers.range_end,"data-range-middle":modifiers.range_middle,className:cn(`group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal transition-[color,background-color,border-radius,box-shadow] duration-150 ease-out group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70`,defaultClassNames.day,className),...props})}function Checkbox({className,...props}){return/* @__PURE__ */ jsx(Checkbox$1.Root,{"data-slot":`checkbox`,className:cn(`peer border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground size-4 shrink-0 rounded-[4px] border shadow-xs transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,className),...props,children:/* @__PURE__ */ jsx(Checkbox$1.Indicator,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-[transform,opacity] duration-120 ease-out data-[state=unchecked]:scale-75 data-[state=unchecked]:opacity-0`,children:props.checked===`indeterminate`?/* @__PURE__ */ jsx(MinusIcon,{className:`size-3.5`}):/* @__PURE__ */ jsx(CheckIcon,{className:`size-3.5`})})})}const fieldVariants=cva(`group/field data-[invalid=true]:text-destructive flex w-full gap-3`,{variants:{orientation:{vertical:[`flex-col [&>*]:w-full [&>.sr-only]:w-auto`],horizontal:[`flex-row items-center`,`[&>[data-slot=field-label]]:flex-auto`,`has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`],responsive:[`flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto`,`@md/field-group:[&>[data-slot=field-label]]:flex-auto`,`@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`]}},defaultVariants:{orientation:`vertical`}});function FieldSet({className,...props}){return/* @__PURE__ */ jsx(`fieldset`,{"data-slot":`field-set`,className:cn(`flex flex-col gap-6`,`has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,className),...props})}function FieldLegend({className,variant=`legend`,...props}){return/* @__PURE__ */ jsx(`legend`,{"data-slot":`field-legend`,"data-variant":variant,className:cn(`mb-3 font-medium`,`data-[variant=legend]:text-base`,`data-[variant=label]:text-sm`,className),...props})}function FieldGroup({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`field-group`,className:cn(`group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4`,className),...props})}function Field({className,orientation=`vertical`,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`field`,"data-orientation":orientation,className:cn(fieldVariants({orientation}),className),...props})}function FieldContent({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`field-content`,className:cn(`group/field-content flex flex-1 flex-col gap-1.5 leading-snug`,className),...props})}function FieldLabel({className,...props}){return/* @__PURE__ */ jsx(Label,{"data-slot":`field-label`,className:cn(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4`,`has-data-[state=checked]:border-primary has-data-[state=checked]:bg-primary/5`,className),...props})}function FieldTitle({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`field-label`,className:cn(`flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50`,className),...props})}function FieldDescription({className,...props}){return/* @__PURE__ */ jsx(`p`,{"data-slot":`field-description`,className:cn(`text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance`,`last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5`,`[&>a:hover]:text-brand-blue [&>a]:underline [&>a]:underline-offset-4`,className),...props})}function FieldSeparator({children,className,...props}){return/* @__PURE__ */ jsxs(`div`,{"data-slot":`field-separator`,"data-content":!!children,className:cn(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,className),...props,children:[/* @__PURE__ */ jsx(Separator,{className:`absolute inset-0 top-1/2`}),children&&/* @__PURE__ */ jsx(`span`,{className:`bg-background text-muted-foreground relative mx-auto block w-fit px-2`,"data-slot":`field-separator-content`,children})]})}function FieldError({className,children,errors,...props}){let content=useMemo(()=>{if(children)return children;if(!errors?.length)return null;let uniqueErrors=[...new Map(errors.map(error=>[error?.message,error])).values()];return uniqueErrors.length===1?uniqueErrors[0]?.message:/* @__PURE__ */ jsx(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:uniqueErrors.map(error=>error?.message&&/* @__PURE__ */ jsx(`li`,{children:error.message},error.message))})},[children,errors]);return content?/* @__PURE__ */ jsx(`div`,{role:`alert`,"data-slot":`field-error`,className:cn(`text-destructive text-sm font-normal`,className),...props,children:content}):null}function Input({className,type,...props}){return/* @__PURE__ */ jsx(`input`,{type,"data-slot":`input`,className:cn(`border-input selection:bg-primary selection:text-primary-foreground file:text-foreground placeholder:text-muted-foreground h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]`,`aria-invalid:border-destructive aria-invalid:ring-destructive/20`,className),...props})}function InputOTP({className,containerClassName,...props}){return/* @__PURE__ */ jsx(OTPInput,{"data-slot":`input-otp`,containerClassName:cn(`flex items-center gap-2 has-disabled:opacity-50`,containerClassName),className:cn(`disabled:cursor-not-allowed`,className),...props})}function InputOTPGroup({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`input-otp-group`,className:cn(`flex items-center`,className),...props})}function InputOTPSlot({index,className,...props}){let{char,hasFakeCaret,isActive}=React.useContext(OTPInputContext)?.slots[index]??{};return/* @__PURE__ */ jsxs(`div`,{"data-slot":`input-otp-slot`,"data-active":isActive,className:cn(`border-input aria-invalid:border-destructive data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40 relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]`,className),...props,children:[char,hasFakeCaret&&/* @__PURE__ */ jsx(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:/* @__PURE__ */ jsx(`div`,{className:`animate-caret-blink bg-foreground h-4 w-px`})})]})}function InputOTPSeparator({...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`input-otp-separator`,"aria-hidden":`true`,...props,children:/* @__PURE__ */ jsx(MinusIcon,{})})}function PasswordInput({className,showLabel=`Mostrar senha`,hideLabel=`Ocultar senha`,showPasswordSuggestion=!1,suggestionLength=8,suggestLabel=`Gerar senha forte`,onSuggest,onChange,value,defaultValue,...props}){let[visivel,setVisivel]=React.useState(!1),inputRef=React.useRef(null),controlado=value!==void 0;function sugerir(){let senha=generateStrongPassword(suggestionLength),campo=inputRef.current;controlado?(onSuggest?.(senha),setVisivel(!0)):(campo&&((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(campo,senha),campo.dispatchEvent(new Event(`input`,{bubbles:!0}))),onSuggest?.(senha),setVisivel(!0))}return/* @__PURE__ */ jsxs(`div`,{"data-slot":`password-input`,className:`relative`,children:[/* @__PURE__ */ jsx(Input,{ref:inputRef,type:visivel?`text`:`password`,value,defaultValue,onChange,className:cn((showPasswordSuggestion?2:1)==2?`pr-16`:`pr-9`,className),...props}),/* @__PURE__ */ jsxs(`div`,{className:`absolute top-1/2 right-1 flex -translate-y-1/2 items-center`,children:[showPasswordSuggestion?/* @__PURE__ */ jsx(Button,{type:`button`,variant:`ghost`,size:`icon-sm`,tabIndex:-1,"aria-label":suggestLabel,title:suggestLabel,onClick:sugerir,className:`text-muted-foreground hover:text-foreground hover:bg-transparent`,children:/* @__PURE__ */ jsx(Sparkles,{})}):null,/* @__PURE__ */ jsx(Button,{type:`button`,variant:`ghost`,size:`icon-sm`,tabIndex:-1,"aria-label":visivel?hideLabel:showLabel,"aria-pressed":visivel,onClick:()=>setVisivel(anterior=>!anterior),className:`text-muted-foreground hover:text-foreground hover:bg-transparent`,children:jsx(visivel?EyeOff:Eye,{})})]})]})}function RadioGroup({className,...props}){return/* @__PURE__ */ jsx(RadioGroup$1.Root,{"data-slot":`radio-group`,className:cn(`grid gap-3`,className),...props})}function RadioGroupItem({className,...props}){return/* @__PURE__ */ jsx(RadioGroup$1.Item,{"data-slot":`radio-group-item`,className:cn(`border-input text-brand-ink focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50`,className),...props,children:/* @__PURE__ */ jsx(RadioGroup$1.Indicator,{"data-slot":`radio-group-indicator`,className:`relative flex items-center justify-center`,children:/* @__PURE__ */ jsx(CircleIcon,{className:`fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2`})})})}function Select({...props}){return/* @__PURE__ */ jsx(Select$1.Root,{"data-slot":`select`,...props})}function SelectGroup({...props}){return/* @__PURE__ */ jsx(Select$1.Group,{"data-slot":`select-group`,...props})}function SelectValue({...props}){return/* @__PURE__ */ jsx(Select$1.Value,{"data-slot":`select-value`,...props})}function SelectTrigger({className,size=`default`,children,...props}){return/* @__PURE__ */ jsxs(Select$1.Trigger,{"data-slot":`select-trigger`,"data-size":size,className:cn(`border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),...props,children:[children,/* @__PURE__ */ jsx(Select$1.Icon,{asChild:!0,children:/* @__PURE__ */ jsx(ChevronDownIcon,{className:`size-4 opacity-50`})})]})}function SelectContent({className,children,position=`item-aligned`,align=`center`,...props}){return/* @__PURE__ */ jsx(Select$1.Portal,{children:/* @__PURE__ */ jsxs(Select$1.Content,{"data-slot":`select-content`,className:cn(`bg-popover text-popover-foreground data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 relative z-50 max-h-(--radix-select-content-available-height) max-w-(--radix-select-content-available-width) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md ease-out data-[state=closed]:duration-150 data-[state=open]:duration-200`,position===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,className),position,align,...props,children:[/* @__PURE__ */ jsx(SelectScrollUpButton,{}),/* @__PURE__ */ jsx(Select$1.Viewport,{className:cn(`p-1`,position===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children}),/* @__PURE__ */ jsx(SelectScrollDownButton,{})]})})}function SelectLabel({className,...props}){return/* @__PURE__ */ jsx(Select$1.Label,{"data-slot":`select-label`,className:cn(`text-muted-foreground px-2 py-1.5 text-xs`,className),...props})}function SelectItem({className,children,...props}){return/* @__PURE__ */ jsxs(Select$1.Item,{"data-slot":`select-item`,className:cn(`focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,className),...props,children:[/* @__PURE__ */ jsx(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:/* @__PURE__ */ jsx(Select$1.ItemIndicator,{children:/* @__PURE__ */ jsx(CheckIcon,{className:`size-4`})})}),/* @__PURE__ */ jsx(Select$1.ItemText,{children})]})}function SelectSeparator({className,...props}){return/* @__PURE__ */ jsx(Select$1.Separator,{"data-slot":`select-separator`,className:cn(`bg-border pointer-events-none -mx-1 my-1 h-px`,className),...props})}function SelectScrollUpButton({className,...props}){return/* @__PURE__ */ jsx(Select$1.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:cn(`flex cursor-default items-center justify-center py-1`,className),...props,children:/* @__PURE__ */ jsx(ChevronUpIcon,{className:`size-4`})})}function SelectScrollDownButton({className,...props}){return/* @__PURE__ */ jsx(Select$1.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:cn(`flex cursor-default items-center justify-center py-1`,className),...props,children:/* @__PURE__ */ jsx(ChevronDownIcon,{className:`size-4`})})}function Slider({className,defaultValue,value,min=0,max=100,thumbLabels,...props}){let _values=React.useMemo(()=>Array.isArray(value)?value:Array.isArray(defaultValue)?defaultValue:[min,max],[value,defaultValue,min,max]),thumbs=React.useMemo(()=>Array.from({length:_values.length},(_,index)=>({id:`thumb-${index}`,index})),[_values.length]);return/* @__PURE__ */ jsxs(Slider$1.Root,{"data-slot":`slider`,defaultValue,value,min,max,className:cn(`relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col`,className),...props,children:[/* @__PURE__ */ jsx(Slider$1.Track,{"data-slot":`slider-track`,className:cn(`bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5`),children:/* @__PURE__ */ jsx(Slider$1.Range,{"data-slot":`slider-range`,className:cn(`bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full`)})}),thumbs.map(({id,index})=>/* @__PURE__ */ jsx(Slider$1.Thumb,{"data-slot":`slider-thumb`,"aria-label":thumbLabels?.[index]??(_values.length===1?props[`aria-label`]:void 0),className:`border-primary ring-ring/50 block size-4 shrink-0 rounded-full border bg-white shadow-sm transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50`},id))]})}function Switch({className,size=`default`,...props}){return/* @__PURE__ */ jsx(Switch$1.Root,{"data-slot":`switch`,"data-size":size,className:cn(`peer group/switch focus-visible:border-ring focus-visible:ring-ring/50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-[background-color,border-color,box-shadow] duration-150 ease-out outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6`,className),...props,children:/* @__PURE__ */ jsx(Switch$1.Thumb,{"data-slot":`switch-thumb`,className:cn(`bg-background pointer-events-none block rounded-full ring-0 transition-transform duration-150 ease-out group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0`)})})}function Textarea({className,...props}){return/* @__PURE__ */ jsx(`textarea`,{"data-slot":`textarea`,className:cn(`border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,className),...props})}function useSidebar(){let context=React.useContext(SidebarContext);if(!context)throw Error(`useSidebar must be used within a SidebarProvider.`);return context}function SidebarProvider({defaultOpen=!0,open:openProp,onOpenChange:setOpenProp,keyboardShortcut,className,style,children,...props}){let isMobile=useIsMobile(),[openMobile,setOpenMobile]=React.useState(!1),[_open,_setOpen]=React.useState(defaultOpen),open=openProp??_open,setOpen=React.useCallback(value=>{let openState=typeof value==`function`?value(open):value;setOpenProp?setOpenProp(openState):_setOpen(openState)},[setOpenProp,open]),toggleSidebar=React.useCallback(()=>isMobile?setOpenMobile(open=>!open):setOpen(open=>!open),[isMobile,setOpen]);React.useEffect(()=>{let handleKeyDown=event=>{keyboardShortcut!==!1&&event.key===(keyboardShortcut??`b`)&&(event.metaKey||event.ctrlKey)&&(event.preventDefault(),toggleSidebar())};return window.addEventListener(`keydown`,handleKeyDown),()=>window.removeEventListener(`keydown`,handleKeyDown)},[toggleSidebar,keyboardShortcut]);let state=open?`expanded`:`collapsed`,contextValue=React.useMemo(()=>({state,open,setOpen,isMobile,openMobile,setOpenMobile,toggleSidebar}),[state,open,setOpen,isMobile,openMobile,toggleSidebar]);return/* @__PURE__ */ jsx(SidebarContext.Provider,{value:contextValue,children:/* @__PURE__ */ jsx(TooltipProvider,{delayDuration:0,children:/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":`16rem`,"--sidebar-width-icon":`3rem`,...style},className:cn(`group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full`,className),...props,children})})})}function Sidebar({side=`left`,variant=`sidebar`,collapsible=`offcanvas`,className,children,...props}){let{isMobile,state,openMobile,setOpenMobile}=useSidebar();return collapsible===`none`?/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar`,className:cn(`bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col`,className),...props,children}):isMobile?/* @__PURE__ */ jsx(Sheet,{open:openMobile,onOpenChange:setOpenMobile,...props,children:/* @__PURE__ */ jsxs(SheetContent,{"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden`,style:{"--sidebar-width":`18rem`},side,children:[/* @__PURE__ */ jsxs(SheetHeader,{className:`sr-only`,children:[/* @__PURE__ */ jsx(SheetTitle,{children:`Sidebar`}),/* @__PURE__ */ jsx(SheetDescription,{children:`Displays the mobile sidebar.`})]}),/* @__PURE__ */ jsx(`div`,{className:`flex h-full w-full flex-col`,children})]})}):/* @__PURE__ */ jsxs(`div`,{className:`group peer text-sidebar-foreground hidden md:block`,"data-state":state,"data-collapsible":state===`collapsed`?collapsible:``,"data-variant":variant,"data-side":side,"data-slot":`sidebar`,children:[/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar-gap`,className:cn(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,variant===`floating`||variant===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar-container`,className:cn(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex`,side===`left`?`left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]`:`right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]`,variant===`floating`||variant===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,className),...props,children:/* @__PURE__ */ jsx(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm`,children})})]})}function SidebarTrigger({className,onClick,...props}){let{toggleSidebar}=useSidebar();return/* @__PURE__ */ jsxs(Button,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon`,className:cn(`size-7`,className),onClick:event=>{onClick?.(event),toggleSidebar()},...props,children:[/* @__PURE__ */ jsx(PanelLeftIcon,{}),/* @__PURE__ */ jsx(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function SidebarRail({className,...props}){let{toggleSidebar}=useSidebar();return/* @__PURE__ */ jsx(`button`,{"data-sidebar":`rail`,"data-slot":`sidebar-rail`,"aria-label":`Toggle Sidebar`,tabIndex:-1,onClick:toggleSidebar,title:`Toggle Sidebar`,className:cn(`hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex`,`in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize`,`[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize`,`hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full`,`[[data-side=left][data-collapsible=offcanvas]_&]:-right-2`,`[[data-side=right][data-collapsible=offcanvas]_&]:-left-2`,className),...props})}function SidebarInset({className,...props}){return/* @__PURE__ */ jsx(`main`,{"data-slot":`sidebar-inset`,className:cn(`bg-background relative flex w-full flex-1 flex-col`,`md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,className),...props})}function SidebarInput({className,...props}){return/* @__PURE__ */ jsx(Input,{"data-slot":`sidebar-input`,"data-sidebar":`input`,className:cn(`bg-background h-8 w-full shadow-none`,className),...props})}function SidebarHeader({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:cn(`flex flex-col gap-2 p-2`,className),...props})}function SidebarFooter({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:cn(`flex flex-col gap-2 p-2`,className),...props})}function SidebarSeparator({className,...props}){return/* @__PURE__ */ jsx(Separator,{"data-slot":`sidebar-separator`,"data-sidebar":`separator`,className:cn(`bg-sidebar-border mx-2 w-auto`,className),...props})}function SidebarContent({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:cn(`flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,className),...props})}function SidebarGroup({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:cn(`relative flex w-full min-w-0 flex-col p-2`,className),...props})}function SidebarGroupLabel({className,asChild=!1,...props}){let Comp=asChild?Slot.Root:`div`;return/* @__PURE__ */ jsx(Comp,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:cn(`text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0`,className),...props})}function SidebarGroupAction({className,asChild=!1,...props}){let Comp=asChild?Slot.Root:`button`;return/* @__PURE__ */ jsx(Comp,{"data-slot":`sidebar-group-action`,"data-sidebar":`group-action`,className:cn(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`group-data-[collapsible=icon]:hidden`,className),...props})}function SidebarGroupContent({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:cn(`w-full text-sm`,className),...props})}function SidebarMenu({className,...props}){return/* @__PURE__ */ jsx(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:cn(`flex w-full min-w-0 flex-col gap-1`,className),...props})}function SidebarMenuItem({className,...props}){return/* @__PURE__ */ jsx(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:cn(`group/menu-item relative`,className),...props})}function SidebarMenuButton({asChild=!1,isActive=!1,variant=`default`,size=`default`,tooltip,className,...props}){let Comp=asChild?Slot.Root:`button`,{isMobile,state}=useSidebar(),button=/* @__PURE__ */ jsx(Comp,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":size,"data-active":isActive,className:cn(sidebarMenuButtonVariants({variant,size}),className),...props});return tooltip?(typeof tooltip==`string`&&(tooltip={children:tooltip}),/* @__PURE__ */ jsxs(Tooltip,{children:[/* @__PURE__ */ jsx(TooltipTrigger,{asChild:!0,children:button}),/* @__PURE__ */ jsx(TooltipContent,{side:`right`,align:`center`,hidden:state!==`collapsed`||isMobile,...tooltip})]})):button}function SidebarMenuAction({className,asChild=!1,showOnHover=!1,...props}){let Comp=asChild?Slot.Root:`button`;return/* @__PURE__ */ jsx(Comp,{"data-slot":`sidebar-menu-action`,"data-sidebar":`menu-action`,className:cn(`text-sidebar-foreground ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,`after:absolute after:-inset-2 md:after:hidden`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,showOnHover&&`peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0`,className),...props})}function SidebarMenuBadge({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`sidebar-menu-badge`,"data-sidebar":`menu-badge`,className:cn(`text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none`,`peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground`,`peer-data-[size=sm]/menu-button:top-1`,`peer-data-[size=default]/menu-button:top-1.5`,`peer-data-[size=lg]/menu-button:top-2.5`,`group-data-[collapsible=icon]:hidden`,className),...props})}function SidebarMenuSkeleton({className,showIcon=!1,...props}){let width=React.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return/* @__PURE__ */ jsxs(`div`,{"data-slot":`sidebar-menu-skeleton`,"data-sidebar":`menu-skeleton`,className:cn(`flex h-8 items-center gap-2 rounded-md px-2`,className),...props,children:[showIcon&&/* @__PURE__ */ jsx(Skeleton,{className:`size-4 rounded-md`,"data-sidebar":`menu-skeleton-icon`}),/* @__PURE__ */ jsx(Skeleton,{className:`h-4 max-w-(--skeleton-width) flex-1`,"data-sidebar":`menu-skeleton-text`,style:{"--skeleton-width":width}})]})}function SidebarMenuSub({className,...props}){return/* @__PURE__ */ jsx(`ul`,{"data-slot":`sidebar-menu-sub`,"data-sidebar":`menu-sub`,className:cn(`border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5`,`group-data-[collapsible=icon]:hidden`,className),...props})}function SidebarMenuSubItem({className,...props}){return/* @__PURE__ */ jsx(`li`,{"data-slot":`sidebar-menu-sub-item`,"data-sidebar":`menu-sub-item`,className:cn(`group/menu-sub-item relative`,className),...props})}function SidebarMenuSubButton({asChild=!1,size=`md`,isActive=!1,className,...props}){let Comp=asChild?Slot.Root:`a`;return/* @__PURE__ */ jsx(Comp,{"data-slot":`sidebar-menu-sub-button`,"data-sidebar":`menu-sub-button`,"data-size":size,"data-active":isActive,className:cn(`text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0`,`data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground`,size===`sm`&&`text-xs`,size===`md`&&`text-sm`,`group-data-[collapsible=icon]:hidden`,className),...props})}function isSelfOrChild(item,activeHref){return activeHref?item.href===activeHref||(item.items??[]).some(filho=>isSelfOrChild(filho,activeHref)):!1}function BadgeContador({value}){return/* @__PURE__ */ jsx(`span`,{className:`bg-sidebar-accent text-sidebar-accent-foreground ml-auto grid h-5 min-w-5 place-items-center rounded-full px-1 text-[10px] font-semibold tabular-nums group-data-[collapsible=icon]:hidden`,children:value})}function SeloDesabilitado({label}){return/* @__PURE__ */ jsx(`span`,{className:`bg-sidebar-accent ml-auto rounded-full px-1.5 py-0.5 text-[9px] font-medium tracking-wide uppercase group-data-[collapsible=icon]:hidden`,children:label})}function NavItemRow({item,activeHref,linkComponent,onNavigate}){let Link=linkComponent??`a`,filhos=item.items??[],filhoAtivo=filhos.some(filho=>isSelfOrChild(filho,activeHref)),ativo=item.href===activeHref||filhoAtivo,[aberto,setAberto]=React.useState(filhoAtivo),[rotaEraDeFilho,setRotaEraDeFilho]=React.useState(filhoAtivo);if(filhoAtivo!==rotaEraDeFilho&&(setRotaEraDeFilho(filhoAtivo),filhoAtivo&&setAberto(!0)),item.disabled){let rotulo=item.disabledLabel??`Em breve`;return/* @__PURE__ */ jsx(SidebarMenuItem,{children:/* @__PURE__ */ jsxs(SidebarMenuButton,{disabled:!0,"aria-disabled":!0,tooltip:`${item.label} · ${rotulo}`,className:`cursor-not-allowed`,children:[item.icon?/* @__PURE__ */ jsx(item.icon,{}):null,/* @__PURE__ */ jsx(`span`,{children:item.label}),/* @__PURE__ */ jsx(SeloDesabilitado,{label:rotulo})]})})}return/* @__PURE__ */ jsxs(SidebarMenuItem,{children:[/* @__PURE__ */ jsx(SidebarMenuButton,{asChild:!0,isActive:ativo,tooltip:item.label,children:/* @__PURE__ */ jsxs(Link,{href:item.href,"aria-current":item.href===activeHref?`page`:void 0,onClick:onNavigate,children:[item.icon?/* @__PURE__ */ jsx(item.icon,{}):null,/* @__PURE__ */ jsx(`span`,{children:item.label}),item.badge===void 0?null:/* @__PURE__ */ jsx(BadgeContador,{value:item.badge})]})}),filhos.length>0?/* @__PURE__ */ jsxs(Fragment,{children:[/* @__PURE__ */ jsx(SidebarMenuAction,{onClick:()=>setAberto(atual=>!atual),"aria-expanded":aberto,"aria-label":`${aberto?`Recolher`:`Expandir`} ${item.label}`,children:/* @__PURE__ */ jsx(ChevronRight,{className:cn(`transition-transform duration-150 ease-out`,aberto&&`rotate-90`)})}),aberto?/* @__PURE__ */ jsx(SidebarMenuSub,{children:filhos.map(filho=>filho.disabled?/* @__PURE__ */ jsx(SidebarMenuSubItem,{children:/* @__PURE__ */ jsx(SidebarMenuSubButton,{asChild:!0,className:`cursor-not-allowed`,children:/* @__PURE__ */ jsxs(`span`,{"aria-disabled":!0,children:[filho.icon?/* @__PURE__ */ jsx(filho.icon,{}):null,/* @__PURE__ */ jsx(`span`,{children:filho.label}),/* @__PURE__ */ jsx(SeloDesabilitado,{label:filho.disabledLabel??`Em breve`})]})})},filho.href):/* @__PURE__ */ jsx(SidebarMenuSubItem,{children:/* @__PURE__ */ jsx(SidebarMenuSubButton,{asChild:!0,isActive:filho.href===activeHref,children:/* @__PURE__ */ jsxs(Link,{href:filho.href,"aria-current":filho.href===activeHref?`page`:void 0,onClick:onNavigate,children:[filho.icon?/* @__PURE__ */ jsx(filho.icon,{}):null,/* @__PURE__ */ jsx(`span`,{children:filho.label})]})})},filho.href))}):null]}):null]})}function SidebarNav({groups,activeHref,linkComponent,onNavigate,className}){let{setOpenMobile,isMobile}=useSidebar(),handleNavigate=React.useCallback(()=>{isMobile&&setOpenMobile(!1),onNavigate?.()},[isMobile,setOpenMobile,onNavigate]);return/* @__PURE__ */ jsx(Fragment,{children:groups.map((group,indice)=>/* @__PURE__ */ jsxs(SidebarGroup,{className,children:[group.label?/* @__PURE__ */ jsx(SidebarGroupLabel,{children:group.label}):null,/* @__PURE__ */ jsx(SidebarGroupContent,{children:/* @__PURE__ */ jsx(SidebarMenu,{children:group.items.map(item=>/* @__PURE__ */ jsx(NavItemRow,{item,activeHref,linkComponent,onNavigate:handleNavigate},item.href))})})]},group.label??`grupo-${indice}`))})}function Tabs({className,orientation=`horizontal`,...props}){return/* @__PURE__ */ jsx(Tabs$1.Root,{"data-slot":`tabs`,"data-orientation":orientation,orientation,className:cn(`group/tabs flex gap-2 data-[orientation=horizontal]:flex-col`,className),...props})}function useActiveTabRect(listRef){let[rect,setRect]=React.useState(null),[hasActive,setHasActive]=React.useState(!1),[settled,setSettled]=React.useState(!1);return React.useEffect(()=>{let list=listRef.current;if(!list)return;function measure(){let current=listRef.current;if(!current)return;let active=current.querySelector(`[data-slot="tabs-trigger"][data-state="active"]`);active?(setHasActive(!0),setRect({left:active.offsetLeft,top:active.offsetTop,width:active.offsetWidth,height:active.offsetHeight})):setHasActive(!1)}measure();let frame=requestAnimationFrame(()=>setSettled(!0)),mutation=new MutationObserver(measure);mutation.observe(list,{subtree:!0,attributes:!0,attributeFilter:[`data-state`],childList:!0});let resize=typeof ResizeObserver>`u`?null:new ResizeObserver(measure);if(resize){resize.observe(list);for(let trigger of list.querySelectorAll(`[data-slot="tabs-trigger"]`))resize.observe(trigger)}return()=>{cancelAnimationFrame(frame),mutation.disconnect(),resize?.disconnect()}},[listRef]),{rect,settled,hasActive}}function TabsList({className,variant=`default`,children,...props}){let listRef=React.useRef(null),{rect,settled,hasActive}=useActiveTabRect(listRef);return/* @__PURE__ */ jsxs(Tabs$1.List,{ref:listRef,"data-slot":`tabs-list`,"data-variant":variant,className:cn(tabsListVariants({variant}),className),...props,children:[rect?/* @__PURE__ */ jsx(`span`,{"aria-hidden":`true`,"data-slot":`tabs-indicator`,"data-variant":variant,className:cn(`pointer-events-none absolute top-0 left-0 z-0 ease-out motion-reduce:transition-none`,settled&&`transition-[translate,width,height,opacity] duration-200`,hasActive?`opacity-100`:`opacity-0`,variant==="default"?`bg-background rounded-md shadow-sm`:`bg-foreground`),style:variant==="default"?{translate:`${rect.left}px ${rect.top}px`,width:rect.width,height:rect.height}:{translate:`${rect.left}px ${rect.top+rect.height+3}px`,width:rect.width,height:2}}):null,children]})}function TabsTrigger({className,...props}){return/* @__PURE__ */ jsx(Tabs$1.Trigger,{"data-slot":`tabs-trigger`,className:cn(`text-foreground/60 hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring data-[state=active]:text-foreground relative z-10 inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent bg-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,border-color,box-shadow] duration-150 ease-out group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,className),...props})}function TabsContent({className,...props}){return/* @__PURE__ */ jsx(Tabs$1.Content,{"data-slot":`tabs-content`,className:cn(`data-[state=active]:animate-in data-[state=active]:fade-in-0 data-[state=active]:slide-in-from-bottom-1 flex-1 outline-none data-[state=active]:duration-200 data-[state=active]:ease-out`,className),...props})}function PackageCommand({packages,mode=`add`,managers=PACKAGE_MANAGERS,manager,defaultManager,onManagerChange,labels:rotulos,className,...props}){let labels={...PACKAGE_COMMAND_LABELS,...rotulos},{copied,copy}=useCopyToClipboard();return/* @__PURE__ */ jsx(`div`,{"data-slot":`package-command`,className:cn(`bg-card overflow-hidden rounded-lg border`,className),...props,children:/* @__PURE__ */ jsxs(Tabs,{value:manager,defaultValue:defaultManager??managers[0],onValueChange:valor=>onManagerChange?.(valor),className:`gap-0`,children:[/* @__PURE__ */ jsxs(`div`,{"data-slot":`package-command-header`,className:`flex items-center gap-2 px-3 py-1`,children:[/* @__PURE__ */ jsx(TerminalIcon,{"aria-hidden":!0,className:`text-muted-foreground size-3.5 shrink-0`}),/* @__PURE__ */ jsx(TabsList,{variant:`line`,className:`group-data-[orientation=horizontal]/tabs:h-7`,children:managers.map(id=>/* @__PURE__ */ jsx(TabsTrigger,{value:id,className:`px-1.5 text-xs`,children:id},id))})]}),/* @__PURE__ */ jsx(Separator,{fade:!0}),managers.map(id=>{let linha=`${PACKAGE_PREFIXES[mode][id]} ${packages}`;return/* @__PURE__ */ jsxs(TabsContent,{value:id,className:`flex items-center justify-between gap-2 py-1.5 pr-1.5 pl-4`,children:[/* @__PURE__ */ jsx(`code`,{className:`overflow-x-auto font-mono text-[13px] whitespace-nowrap`,children:linha}),/* @__PURE__ */ jsx(Button,{variant:`ghost`,size:`icon-sm`,onClick:()=>copy(linha),"aria-label":copied?labels.copied:labels.copy,children:copied?/* @__PURE__ */ jsx(CheckIcon,{className:`text-positive`}):/* @__PURE__ */ jsx(CopyIcon,{})})]},id)})]})})}function Progress({className,value,...props}){return/* @__PURE__ */ jsx(Progress$1.Root,{"data-slot":`progress`,value,className:cn(`bg-primary/20 relative h-2 w-full overflow-hidden rounded-full`,className),...props,children:/* @__PURE__ */ jsx(Progress$1.Indicator,{"data-slot":`progress-indicator`,className:`bg-primary h-full w-full flex-1 transition-transform duration-300 ease-out`,style:{transform:`translateX(-${100-(value||0)}%)`}})})}function ScrollArea({className,children,...props}){return/* @__PURE__ */ jsxs(ScrollArea$1.Root,{"data-slot":`scroll-area`,className:cn(`relative`,className),...props,children:[/* @__PURE__ */ jsx(ScrollArea$1.Viewport,{"data-slot":`scroll-area-viewport`,className:`focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none focus-visible:ring-[3px] focus-visible:outline-1`,children}),/* @__PURE__ */ jsx(ScrollBar,{}),/* @__PURE__ */ jsx(ScrollArea$1.Corner,{})]})}function ScrollBar({className,orientation=`vertical`,...props}){return/* @__PURE__ */ jsx(ScrollArea$1.ScrollAreaScrollbar,{"data-slot":`scroll-area-scrollbar`,orientation,className:cn(`flex touch-none p-px transition-colors duration-150 ease-out select-none`,orientation===`vertical`&&`h-full w-2.5 border-l border-l-transparent`,orientation===`horizontal`&&`h-2.5 flex-col border-t border-t-transparent`,className),...props,children:/* @__PURE__ */ jsx(ScrollArea$1.ScrollAreaThumb,{"data-slot":`scroll-area-thumb`,className:`bg-border relative flex-1 rounded-full`})})}function Separator({className,orientation=`horizontal`,decorative=!0,fade=!1,...props}){return/* @__PURE__ */ jsx(Separator$1.Root,{"data-slot":`separator`,decorative,orientation,className:cn(`shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-4 data-[orientation=vertical]:w-px`,fade?[`via-foreground/20 from-transparent to-transparent data-[orientation=vertical]:h-full`,orientation===`vertical`?`bg-gradient-to-b`:`bg-gradient-to-r`]:`bg-border/60`,className),...props})}function Skeleton({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`skeleton`,className:cn(`bg-accent animate-pulse rounded-md`,className),...props})}function useLoginMethod(nome){let context=React.useContext(LoginMethodsContext);if(!context)throw Error(`<${nome}> precisa estar dentro de <Login>.`);return context}function highlightHeadline(headline,highlight){let needle=highlight?.trim();if(!needle||typeof headline!=`string`)return headline;let index=headline.toLowerCase().indexOf(needle.toLowerCase());return index<0?headline:/* @__PURE__ */ jsxs(Fragment,{children:[headline.slice(0,index),/* @__PURE__ */ jsx(`span`,{className:`text-primary`,children:headline.slice(index,index+needle.length)}),headline.slice(index+needle.length)]})}function LoginShowcase({className,imageSrc,imageAlt=``,imageComponent,eyebrow,headline,headlineHighlight,description,...props}){let ImageComponent=imageComponent??`img`,temTexto=!!(eyebrow||headline||description);return/* @__PURE__ */ jsxs(`aside`,{"data-slot":`login-showcase`,className:cn(`relative isolate flex h-[42dvh] shrink-0 flex-col justify-end overflow-hidden px-6 pb-10 text-white lg:h-auto lg:min-h-dvh lg:p-12`,className),...props,children:[/* @__PURE__ */ jsx(ImageComponent,{src:imageSrc,alt:imageAlt,"aria-hidden":!imageAlt||void 0,className:`absolute inset-0 size-full object-cover object-center`}),temTexto?/* @__PURE__ */ jsx(`div`,{className:`absolute inset-0 bg-gradient-to-b from-black/10 via-black/20 to-black/60 lg:via-transparent lg:to-black/55`}):null,temTexto?/* @__PURE__ */ jsxs(`div`,{className:`relative flex max-w-[46ch] flex-col gap-4 drop-shadow-[0_2px_16px_rgba(0,0,0,0.22)]`,children:[eyebrow?/* @__PURE__ */ jsx(`span`,{"data-slot":`login-eyebrow`,className:`w-fit rounded-md border border-white/30 bg-white/15 px-2.5 py-1 text-[11px] font-bold tracking-[0.14em] uppercase backdrop-blur-sm`,children:eyebrow}):null,headline?/* @__PURE__ */ jsx(`h2`,{className:`text-[clamp(1.7rem,3.2vw,3rem)] leading-[1.04] font-extrabold tracking-tight`,children:highlightHeadline(headline,headlineHighlight)}):null,description?/* @__PURE__ */ jsx(`p`,{className:`hidden text-[0.98rem] leading-[1.6] text-white/90 lg:block`,children:description}):null]}):null]})}function LoginPanel({className,children,...props}){return/* @__PURE__ */ jsx(`section`,{"data-slot":`login-panel`,className:cn(`bg-card relative z-10 -mt-6 flex flex-1 flex-col rounded-t-md px-6 pt-8 pb-10 shadow-[0_-24px_48px_-24px_rgba(24,39,67,0.22)] lg:mt-0 lg:items-center lg:justify-center lg:rounded-none lg:bg-transparent lg:p-12 lg:shadow-none`,className),...props,children:/* @__PURE__ */ jsx(`div`,{className:`flex w-full flex-col gap-5 lg:max-w-[420px] lg:gap-6`,children})})}function LoginMagicLink({children=`Receber link de acesso por email`,onRequest,disabled,...props}){let{email,emailValid,busy,run}=useLoginMethod(`LoginMagicLink`);return/* @__PURE__ */ jsx(Button,{type:`button`,variant:`outline`,size:`lg`,className:`w-full basis-full`,"data-slot":`login-magic-link`,disabled:disabled||busy||!emailValid,onClick:()=>run(()=>onRequest(email)),...props,children})}function LoginOtp({children=`Entrar com um código de uso único`,onRequest,disabled,...props}){let{email,emailValid,busy,run}=useLoginMethod(`LoginOtp`);return/* @__PURE__ */ jsx(Button,{type:`button`,variant:`outline`,size:`lg`,className:`w-full basis-full`,"data-slot":`login-otp`,disabled:disabled||busy||!emailValid,onClick:()=>run(()=>onRequest(email)),...props,children})}function LoginProvider({children,onSelect,disabled,size=`default`,...props}){let{busy,run}=useLoginMethod(`LoginProvider`);return/* @__PURE__ */ jsx(Button,{type:`button`,size,variant:`outline`,className:`min-w-[8rem] flex-1 basis-[calc(50%-0.25rem)]`,"data-slot":`login-provider`,disabled:disabled||busy,onClick:()=>run(onSelect),...props,children})}function Login({className,imageSrc,imageAlt,eyebrow,headline,headlineHighlight,description,logo,logoHref,logoLabel=`Página inicial`,title=`Acesse sua conta`,subtitle,emailLabel=`Email`,emailPlaceholder=`seu@email.com`,passwordLabel=`Senha`,passwordPlaceholder=`••••••••`,submitLabel=`Entrar`,methodsLabel=`ou`,defaultEmail=``,onSubmit,loading,error,footer,imageComponent,linkComponent,children,...props}){let[email,setEmail]=React.useState(defaultEmail),[password,setPassword]=React.useState(``),[pending,setPending]=React.useState(!1),busy=loading??pending,emailValid=EMAIL_PATTERN.test(email),canSubmit=emailValid&&password.length>0&&!busy,LinkComponent=linkComponent??`a`,run=React.useCallback(async action=>{setPending(!0);try{await action()}finally{setPending(!1)}},[]),metodos=React.useMemo(()=>({email,emailValid,busy,run:action=>void run(action)}),[email,emailValid,busy,run]);function handleSubmit(event){event.preventDefault(),canSubmit&&run(()=>onSubmit({email,password}))}return/* @__PURE__ */ jsxs(`div`,{"data-slot":`login`,className:cn(`bg-background flex min-h-dvh flex-col`,imageSrc&&`lg:grid lg:grid-cols-[minmax(0,1.05fr)_minmax(0,1fr)]`,className),...props,children:[imageSrc?/* @__PURE__ */ jsx(LoginShowcase,{imageSrc,imageAlt,imageComponent,eyebrow,headline,headlineHighlight,description}):null,/* @__PURE__ */ jsxs(LoginPanel,{className:cn(!imageSrc&&`mt-0 rounded-none shadow-none`),children:[logo?logoHref?/* @__PURE__ */ jsx(LinkComponent,{href:logoHref,"aria-label":logoLabel,className:`inline-flex self-center`,children:logo}):/* @__PURE__ */ jsx(`div`,{className:`inline-flex self-center`,children:logo}):null,title||subtitle?/* @__PURE__ */ jsxs(`header`,{className:`flex flex-col gap-1.5 text-center`,children:[title?/* @__PURE__ */ jsx(`h1`,{className:`text-foreground text-[1.85rem] leading-[1.08] font-extrabold tracking-tight lg:text-[2.1rem]`,children:title}):null,subtitle?/* @__PURE__ */ jsx(`p`,{className:`text-muted-foreground text-[0.95rem] leading-[1.58]`,children:subtitle}):null]}):null,/* @__PURE__ */ jsxs(`form`,{className:`flex flex-col gap-4`,onSubmit:handleSubmit,children:[/* @__PURE__ */ jsxs(`div`,{className:`flex flex-col gap-1.5`,children:[/* @__PURE__ */ jsx(Label,{htmlFor:`login-email`,children:emailLabel}),/* @__PURE__ */ jsx(Input,{id:`login-email`,name:`email`,type:`email`,autoComplete:`email`,placeholder:emailPlaceholder,value:email,onChange:event=>setEmail(event.target.value),disabled:busy})]}),/* @__PURE__ */ jsxs(`div`,{className:`flex flex-col gap-1.5`,children:[/* @__PURE__ */ jsx(Label,{htmlFor:`login-password`,children:passwordLabel}),/* @__PURE__ */ jsx(Input,{id:`login-password`,name:`password`,type:`password`,autoComplete:`current-password`,placeholder:passwordPlaceholder,value:password,onChange:event=>setPassword(event.target.value),disabled:busy})]}),error?/* @__PURE__ */ jsx(Alert,{variant:`destructive`,className:`border-destructive/30 bg-negative-surface`,children:/* @__PURE__ */ jsx(AlertDescription,{className:`text-destructive`,children:error})}):null,/* @__PURE__ */ jsx(Button,{type:`submit`,size:`lg`,className:`w-full`,disabled:!canSubmit,children:submitLabel}),children?/* @__PURE__ */ jsx(LoginMethods,{slot:`login-methods`,label:methodsLabel,value:metodos,children}):null]}),footer]})]})}function LoginMethods({slot,label,value,children}){return/* @__PURE__ */ jsx(LoginMethodsContext.Provider,{value,children:/* @__PURE__ */ jsxs(`div`,{"data-slot":slot,className:`mt-1 flex flex-col gap-4`,children:[/* @__PURE__ */ jsxs(`div`,{className:`flex items-center gap-3`,children:[/* @__PURE__ */ jsx(`span`,{className:`bg-border h-px flex-1`}),/* @__PURE__ */ jsx(`span`,{className:`text-muted-foreground text-xs`,children:label}),/* @__PURE__ */ jsx(`span`,{className:`bg-border h-px flex-1`})]}),/* @__PURE__ */ jsx(`div`,{className:`flex flex-wrap gap-2`,children})]})})}function LoginWithSSO({onSignIn,onError,icon=/* @__PURE__ */ jsx(RockfellerMark,{className:`size-5`}),children=`Entrar com Conta Rockfeller`,variant=`outline`,size=`lg`,disabled,className,...props}){let[busy,setBusy]=React.useState(!1);async function entrar(){setBusy(!0);try{await onSignIn()}catch(error){if(!onError)throw error;onError(error)}finally{setBusy(!1)}}return/* @__PURE__ */ jsxs(Button,{type:`button`,variant,size,"data-slot":`login-with-sso`,"aria-busy":busy||void 0,disabled:disabled||busy,className:cn(`gap-2.5`,className),onClick:entrar,...props,children:[busy?/* @__PURE__ */ jsx(RockfellerGlobeSpinning,{className:`size-5`}):icon,children]})}function RockfellerMark(props){return/* @__PURE__ */ jsx(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 168 168`,fill:`currentColor`,"aria-hidden":!0,...props,children:/* @__PURE__ */ jsx(`path`,{fillRule:`evenodd`,d:`M 68.1 2 C 61.1 3.5 54.1 6 46.9 9.6 C 41.2 12.4 39.4 12.9 32.9 12.8 C 22.6 12.7 17.5 14.5 11.8 20.1 C 5.3 26.6 3.5 32.9 4.3 46.5 C 4.8 54 4.6 57.8 3.5 61.5 C 0.8 70.3 -0.2 83.8 1.1 93.6 C 1.7 98.5 2.3 106.8 2.4 112 C 2.7 123.2 3.8 127.6 8.2 134.9 C 12.1 141.3 18.8 146.3 25.9 148 C 28.7 148.7 34.3 151.4 38.3 154 C 56.9 166.4 81.5 170.8 103.1 165.7 C 107.2 164.7 110.3 164.6 115.1 165.3 C 123.4 166.5 131.4 164.9 137.7 160.7 C 143.2 157 146.5 151.3 148.1 142.7 C 148.8 138.8 150.3 135.2 152.5 132.1 C 159.8 122 167 102.5 167 92.9 C 167 90.8 167.4 88.8 168 88.5 C 168.6 88.2 169 85.9 169 83.4 C 169 80.6 168.6 79.1 168 79.5 C 167.4 79.9 167 78.4 167 75.7 C 167 73.3 166 68 164.9 63.9 C 163.3 58.5 162.7 53.1 162.5 43.5 C 162.2 33 161.7 29.4 160 24.6 C 154.5 10.1 141.5 3.5 125.3 6.9 C 119.8 8.1 119 8 110 4.9 C 101.4 2 99.2 1.7 86.5 1.4 C 78.8 1.2 70.5 1.5 68.1 2 M 74.2 6.1 C 63.4 7.5 46.7 13.2 48.6 14.9 C 49.1 15.3 51.6 16.5 54.3 17.4 L 59 19.2 65.3 15.7 C 72.1 11.9 85 7 88.1 7 C 89.2 7 89.8 6.5 89.5 6 C 88.8 4.9 83.3 4.9 74.2 6.1 M 85.4 10 C 81.5 11 74.6 13.7 70.1 16 L 61.8 20.1 69.7 24.8 C 74 27.5 78.4 30.2 79.6 30.9 C 81.5 32.2 82.3 31.8 88.7 26.4 C 92.6 23.2 99.2 18.5 103.4 16 C 107.6 13.5 111 11.2 111 10.8 C 111 9.8 101.5 8 96.7 8.1 C 94.4 8.1 89.3 8.9 85.4 10 M 127.5 8.7 C 122.6 9.7 122.7 10.2 128 13.2 C 135.4 17.4 150.7 32.9 155.9 41.5 L 160.1 48.5 159.8 38.5 C 159.3 26.6 156.8 19.9 150.9 14.6 C 145.3 9.5 135.2 7 127.5 8.7 M 107.1 16.6 C 98.2 21.5 82.8 33.3 84 34.2 C 97.4 44.5 112.5 59.3 118.6 67.9 C 120.2 70.1 121.8 72 122.1 72 C 122.4 72 123.7 68.6 125 64.4 C 129.2 50.2 129.2 33.3 125 24.9 C 122.6 20.2 116.3 13 114.5 13 C 114 13 110.6 14.6 107.1 16.6 M 18.9 17.8 C 12.9 20.9 7.8 28 6.6 34.7 C 5.8 39.7 5.8 48.5 6.6 49.3 C 7 49.7 9.3 46.5 11.8 42.2 C 14.8 37 19.5 31.3 26.1 24.8 L 35.9 15 30 15 C 25.6 15 22.9 15.7 18.9 17.8 M 40.3 18.9 C 28.1 27.1 19.3 37.3 12.8 50.8 L 8.7 59.2 10.5 65.1 C 11.5 68.3 12.6 71 12.9 71 C 13.2 71 14.9 68.4 16.7 65.2 C 23.8 52.3 41 32.5 51.8 24.7 C 54.1 23 56 21.3 56 20.9 C 56 20.5 53.4 19.3 50.1 18.2 L 44.2 16.2 40.3 18.9 M 123 16.5 C 123 16.9 123.9 18.3 125 19.7 C 127.5 22.8 129.7 30.1 130.6 37.8 C 131.3 44.8 129.6 56.8 126.4 67.1 L 124 74.7 128.6 81.6 C 131.1 85.4 134.5 91.1 136.2 94.3 C 138.5 98.9 139.4 99.9 140.5 99 C 144.2 96 158 63.2 158 57.5 C 158 54.9 150.2 41.1 145.2 34.7 C 140.4 28.7 133.1 22.2 126.2 17.9 C 124.5 16.7 123 16.1 123 16.5 M 51.8 27.8 C 39 38 28.2 50.7 19.1 66 L 14.1 74.3 17.5 80.9 C 22.1 90.1 35.5 110 36.3 108.9 C 36.5 108.7 38.1 104 39.8 98.5 C 45.8 79.2 59 56.7 73 41.7 L 80.1 34.1 73.3 29.7 C 66.7 25.4 60.6 22 59.6 22 C 59.3 22 55.8 24.6 51.8 27.8 M 75.3 42.5 C 61.2 58.6 50.6 75.7 44 93.4 C 41.7 99.3 39.6 106.3 39.3 108.8 L 38.8 113.5 51.3 125.8 C 58.2 132.5 64.3 138 64.8 138 C 67.6 138 82.7 126.4 92.1 117.1 C 102.9 106.2 112.1 93.7 118 81.6 L 121.3 75 115.4 67.8 C 105.7 55.8 84.9 36 82 36 C 81.5 36 78.5 38.9 75.3 42.5 M 159 63.9 C 159 66.6 150.7 86 145.9 94.5 L 140.9 103.5 143.5 111.2 C 145 115.5 146.7 121.3 147.4 124.2 L 148.6 129.5 151.5 125 C 160.8 110.5 165 88.2 161.6 70.7 C 160.4 64.6 159 60.9 159 63.9 M 6 73.2 C 5.4 77.8 5 83.5 5.2 86 L 5.5 90.5 8.5 82.5 C 11.5 74.7 11.5 74.4 10 70.3 C 9.2 68 8.2 65.9 7.8 65.5 C 7.5 65.2 6.7 68.6 6 73.2 M 11.1 82.3 C 10 84.9 8.4 89.5 7.6 92.6 C 6.3 97.7 6.3 98.7 8.1 105.3 C 11.5 117.5 18.4 129.4 27.5 138.7 C 35 146.5 40.2 149.5 38.5 145.2 C 35.9 138.4 34.8 130.8 35.2 122.2 C 35.7 113.6 35.5 112.6 33.5 110.2 C 28.5 104.1 21.8 93.9 17.6 86 L 13.1 77.6 11.1 82.3 M 118.1 86.4 C 109.1 103.9 91 124.1 75.7 134 C 71 137 67.1 139.7 67.1 140 C 67 140.8 84 152 85.3 152 C 87.8 152 99.5 144.3 108.4 136.8 C 117.4 129.3 126.9 118.8 134.3 108.4 L 138.2 103 134.5 96.2 C 130.1 88.2 123.7 78 123 78 C 122.7 78 120.5 81.8 118.1 86.4 M 0.3 84.5 C 0.3 87.2 0.5 88.3 0.7 86.7 C 0.9 85.2 0.9 83 0.7 81.7 C 0.5 80.5 0.3 81.8 0.3 84.5 M 133.5 113.8 C 123.8 127 106.5 143 93.8 150.4 C 91.1 151.9 89 153.5 89 154 C 89 154.4 92.3 156.1 96.4 157.8 L 103.8 160.8 110.2 158.6 C 121.9 154.5 131.6 148.1 140.9 138.7 L 146.3 133.2 145.6 128 C 144.8 121.8 140.2 107 139.1 107 C 138.7 107 136.2 110 133.5 113.8 M 5.3 118.6 C 5.9 126.7 9.3 134.1 14.5 138.9 C 18.1 142.2 24.6 146 26.8 146 C 27 146 25.3 143.9 22.8 141.2 C 17 135 12.7 128.7 8.4 119.8 L 4.8 112.5 5.3 118.6 M 37.4 119.8 C 35.7 128.5 39.5 146 43 146 C 45.3 146 56.9 142.3 59.6 140.7 C 61.6 139.6 61 138.9 49.9 127.9 L 38 116.4 37.4 119.8 M 60 143 C 58.1 144 53.7 145.6 50.2 146.6 C 46.8 147.5 44 148.6 44 149 C 44 150.1 48.3 153.7 51.9 155.5 C 58.5 158.8 72.3 158.4 79.8 154.6 C 81.9 153.5 81.6 153.1 73 147.2 C 68 143.8 63.9 141 63.7 141 C 63.6 141.1 61.9 141.9 60 143 M 142.4 144.1 C 138.2 148.6 128 155.7 120.4 159.5 L 113.8 162.7 117.2 163.4 C 121.2 164.1 129.8 162.7 133.7 160.6 C 137.2 158.8 141.3 154.4 143.3 150.5 C 144.8 147.5 146.5 141 145.8 141 C 145.6 141 144.1 142.4 142.4 144.1 M 78 157.6 C 74.4 158.9 70.2 160 68.5 160 C 65.9 160.1 65.7 160.2 67.3 161.1 C 69.8 162.6 86.3 163.4 93.6 162.5 L 99.5 161.8 92.1 158.4 C 88.1 156.5 84.7 155.1 84.6 155.1 C 84.6 155.2 81.6 156.3 78 157.6`})})}function RockfellerGlobeSpinning({className,...props}){let parado=useMediaQuery(`(prefers-reduced-motion: reduce)`);return/* @__PURE__ */ jsx(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:1.3,strokeLinecap:`round`,"aria-hidden":!0,"data-slot":`rockfeller-globe-spinning`,className,...props,children:/* @__PURE__ */ jsxs(`g`,{transform:`rotate(-24 12 12)`,children:[/* @__PURE__ */ jsx(`circle`,{cx:`12`,cy:`12`,r:10}),/* @__PURE__ */ jsx(`ellipse`,{cx:`12`,cy:`12`,rx:10,ry:`2.6`}),/* @__PURE__ */ jsx(`path`,{d:`M4.5 6.6Q12 9.4 19.5 6.6`,opacity:`0.6`}),/* @__PURE__ */ jsx(`path`,{d:`M4.5 17.4Q12 20.2 19.5 17.4`,opacity:`0.6`}),MERIDIANOS.map(meridiano=>/* @__PURE__ */ jsx(`path`,{d:meridiano.inicial,opacity:meridiano.opacidadeInicial,children:parado?null:/* @__PURE__ */ jsxs(Fragment,{children:[/* @__PURE__ */ jsx(`animate`,{attributeName:`d`,values:meridiano.caminhos,dur:`${VOLTA}s`,repeatCount:`indefinite`}),/* @__PURE__ */ jsx(`animate`,{attributeName:`opacity`,values:meridiano.opacidades,calcMode:`discrete`,dur:`${VOLTA}s`,repeatCount:`indefinite`})]})},meridiano.inicio))]})})}function validarCampo(campo,valor,todos){let limpo=valor.trim();return campo.required&&limpo.length===0?`Campo obrigatório.`:campo.minLength!==void 0&&limpo.length>0&&limpo.length<campo.minLength?`Pelo menos ${campo.minLength} caracteres.`:campo.type===`email`&&limpo.length>0&&!EMAIL_PATTERN.test(limpo)?`Informe um email válido.`:campo.validate?.(valor,todos)}function SignUpExtraField({campo,valor,erro,busy,onChange,onTouch}){let idCampo=`signup-${campo.name}`,idApoio=`${idCampo}-hint`,temApoio=!!(campo.description||erro);return/* @__PURE__ */ jsxs(`div`,{className:`flex flex-col gap-1.5`,children:[/* @__PURE__ */ jsx(Label,{htmlFor:idCampo,children:campo.label}),campo.type===`select`?/* @__PURE__ */ jsxs(Select,{value:valor||void 0,onValueChange:proximo=>{onChange(proximo),onTouch()},disabled:busy,children:[/* @__PURE__ */ jsx(SelectTrigger,{id:idCampo,className:`w-full`,"aria-invalid":erro?!0:void 0,"aria-describedby":temApoio?idApoio:void 0,children:/* @__PURE__ */ jsx(SelectValue,{placeholder:campo.placeholder})}),/* @__PURE__ */ jsx(SelectContent,{children:campo.options?.map(opcao=>/* @__PURE__ */ jsx(SelectItem,{value:opcao.value,children:opcao.label},opcao.value))})]}):campo.type===`textarea`?/* @__PURE__ */ jsx(Textarea,{id:idCampo,name:campo.name,placeholder:campo.placeholder,autoComplete:campo.autoComplete,value:valor,onChange:event=>onChange(event.target.value),onBlur:onTouch,disabled:busy,"aria-invalid":erro?!0:void 0,"aria-describedby":temApoio?idApoio:void 0}):/* @__PURE__ */ jsx(Input,{id:idCampo,name:campo.name,type:campo.type??`text`,placeholder:campo.placeholder,autoComplete:campo.autoComplete,value:valor,onChange:event=>onChange(event.target.value),onBlur:onTouch,disabled:busy,"aria-invalid":erro?!0:void 0,"aria-describedby":temApoio?idApoio:void 0}),temApoio?/* @__PURE__ */ jsx(`p`,{id:idApoio,className:cn(`text-[0.8rem]`,erro?`text-destructive`:`text-muted-foreground`),children:erro??campo.description}):null]})}function SignUp({className,imageSrc,imageAlt,eyebrow,headline,headlineHighlight,description,logo,logoHref,logoLabel=`Página inicial`,title=`Crie sua conta`,subtitle,nameLabel=`Nome`,namePlaceholder=`Seu nome completo`,showName=!0,fields=EMPTY_SIGN_UP_FIELDS,emailLabel=`Email`,emailPlaceholder=`seu@email.com`,passwordLabel=`Senha`,passwordPlaceholder=`••••••••`,submitLabel=`Criar conta`,methodsLabel=`ou`,defaultName=``,defaultEmail=``,minPasswordLength=8,termsLabel,onSubmit,loading,error,footer,imageComponent,linkComponent,children,...props}){let[name,setName]=React.useState(defaultName),[email,setEmail]=React.useState(defaultEmail),[password,setPassword]=React.useState(``),[accepted,setAccepted]=React.useState(!1),[pending,setPending]=React.useState(!1),[extras,setExtras]=React.useState(()=>Object.fromEntries(fields.map(campo=>[campo.name,campo.defaultValue??``]))),[tocados,setTocados]=React.useState({}),busy=loading??pending,emailValid=EMAIL_PATTERN.test(email),passwordValid=password.length>=minPasswordLength,termsOk=!termsLabel||accepted,errosExtras=React.useMemo(()=>{let resultado={};for(let campo of fields)resultado[campo.name]=validarCampo(campo,extras[campo.name]??``,extras);return resultado},[fields,extras]),extrasOk=Object.values(errosExtras).every(erro=>!erro),canSubmit=(!showName||name.trim().length>0)&&emailValid&&passwordValid&&termsOk&&extrasOk&&!busy,LinkComponent=linkComponent??`a`,run=React.useCallback(async action=>{setPending(!0);try{await action()}finally{setPending(!1)}},[]),metodos=React.useMemo(()=>({email,emailValid,busy,run:action=>void run(action)}),[email,emailValid,busy,run]);function handleSubmit(event){event.preventDefault(),canSubmit&&run(()=>onSubmit({...extras,name,email,password}))}return/* @__PURE__ */ jsxs(`div`,{"data-slot":`sign-up`,className:cn(`bg-background flex min-h-dvh flex-col`,imageSrc&&`lg:grid lg:grid-cols-[minmax(0,1.05fr)_minmax(0,1fr)]`,className),...props,children:[imageSrc?/* @__PURE__ */ jsx(LoginShowcase,{imageSrc,imageAlt,imageComponent,eyebrow,headline,headlineHighlight,description}):null,/* @__PURE__ */ jsxs(LoginPanel,{className:cn(!imageSrc&&`mt-0 rounded-none shadow-none`),children:[logo?logoHref?/* @__PURE__ */ jsx(LinkComponent,{href:logoHref,"aria-label":logoLabel,className:`inline-flex self-center`,children:logo}):/* @__PURE__ */ jsx(`div`,{className:`inline-flex self-center`,children:logo}):null,title||subtitle?/* @__PURE__ */ jsxs(`header`,{className:`flex flex-col gap-1.5 text-center`,children:[title?/* @__PURE__ */ jsx(`h1`,{className:`text-foreground text-[1.85rem] leading-[1.08] font-extrabold tracking-tight lg:text-[2.1rem]`,children:title}):null,subtitle?/* @__PURE__ */ jsx(`p`,{className:`text-muted-foreground text-[0.95rem] leading-[1.58]`,children:subtitle}):null]}):null,/* @__PURE__ */ jsxs(`form`,{className:`flex flex-col gap-4`,onSubmit:handleSubmit,children:[showName?/* @__PURE__ */ jsxs(`div`,{className:`flex flex-col gap-1.5`,children:[/* @__PURE__ */ jsx(Label,{htmlFor:`signup-name`,children:nameLabel}),/* @__PURE__ */ jsx(Input,{id:`signup-name`,name:`name`,autoComplete:`name`,placeholder:namePlaceholder,value:name,onChange:event=>setName(event.target.value),disabled:busy})]}):null,/* @__PURE__ */ jsxs(`div`,{className:`flex flex-col gap-1.5`,children:[/* @__PURE__ */ jsx(Label,{htmlFor:`signup-email`,children:emailLabel}),/* @__PURE__ */ jsx(Input,{id:`signup-email`,name:`email`,type:`email`,autoComplete:`email`,placeholder:emailPlaceholder,value:email,onChange:event=>setEmail(event.target.value),disabled:busy})]}),/* @__PURE__ */ jsxs(`div`,{className:`flex flex-col gap-1.5`,children:[/* @__PURE__ */ jsx(Label,{htmlFor:`signup-password`,children:passwordLabel}),/* @__PURE__ */ jsx(Input,{id:`signup-password`,name:`password`,type:`password`,autoComplete:`new-password`,placeholder:passwordPlaceholder,value:password,onChange:event=>setPassword(event.target.value),disabled:busy,"aria-describedby":`signup-password-hint`}),/* @__PURE__ */ jsxs(`p`,{id:`signup-password-hint`,className:`text-muted-foreground text-[0.8rem]`,children:[`Pelo menos `,minPasswordLength,` caracteres.`]})]}),fields.map(campo=>/* @__PURE__ */ jsx(SignUpExtraField,{campo,valor:extras[campo.name]??``,erro:tocados[campo.name]?errosExtras[campo.name]:void 0,busy,onChange:proximo=>setExtras(anterior=>({...anterior,[campo.name]:proximo})),onTouch:()=>setTocados(anterior=>({...anterior,[campo.name]:!0}))},campo.name)),termsLabel?/* @__PURE__ */ jsxs(Label,{className:`items-start text-[0.9rem] leading-[1.5] font-normal`,children:[/* @__PURE__ */ jsx(Checkbox,{checked:accepted,onCheckedChange:value=>setAccepted(value===!0),disabled:busy,className:`mt-0.5`}),termsLabel]}):null,error?/* @__PURE__ */ jsx(Alert,{variant:`destructive`,className:`border-destructive/30 bg-negative-surface`,children:/* @__PURE__ */ jsx(AlertDescription,{className:`text-destructive`,children:error})}):null,/* @__PURE__ */ jsx(Button,{type:`submit`,size:`lg`,className:`w-full`,disabled:!canSubmit,children:submitLabel}),children?/* @__PURE__ */ jsx(LoginMethods,{slot:`sign-up-methods`,label:methodsLabel,value:metodos,children}):null]}),footer]})]})}const EMPTY_DATA_TABLE_FILTERS=[];function alignClass(align){return align===`right`?`text-right`:align===`center`?`text-center`:`text-left`}function DataTableHeader({title,description,action,classNames}){return/* @__PURE__ */ jsxs(`div`,{className:cn(`flex flex-wrap items-end justify-between gap-4`,classNames?.header),children:[/* @__PURE__ */ jsxs(`div`,{className:`min-w-0`,children:[title?/* @__PURE__ */ jsx(`h2`,{className:cn(`text-2xl font-semibold tracking-tight text-balance`,classNames?.title),children:title}):null,description?/* @__PURE__ */ jsx(`p`,{className:cn(`text-muted-foreground mt-1 max-w-2xl text-sm first:mt-0`,classNames?.description),children:description}):null]}),action?/* @__PURE__ */ jsx(`div`,{className:`flex flex-wrap items-center gap-2`,children:action}):null]})}function DataTableToolbar({showSearch,searchValue,searchPlaceholder,onSearch,filters,readFilter,onFilter,hasActiveQuery,onClear,columnsToggle,columns,visibleKeysSet,onToggleColumn,toolbarSlot,classNames}){return/* @__PURE__ */ jsxs(`div`,{className:cn(`flex flex-wrap items-center gap-2`,classNames?.toolbar),children:[showSearch?/* @__PURE__ */ jsxs(`div`,{className:`relative min-w-0 basis-full sm:max-w-xs sm:basis-auto`,children:[/* @__PURE__ */ jsx(Search,{className:`text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2`}),/* @__PURE__ */ jsx(Input,{value:searchValue,onChange:event=>onSearch(event.target.value),placeholder:searchPlaceholder,"aria-label":searchPlaceholder,className:cn(`h-8 pl-8`,classNames?.search)})]}):null,filters.map(filter=>/* @__PURE__ */ jsx(DataTableFilterChip,{filter,value:readFilter(filter.key),onChange:next=>onFilter(filter.key,next)},filter.key)),hasActiveQuery?/* @__PURE__ */ jsx(Button,{variant:`ghost`,size:`sm`,onClick:onClear,children:`Limpar filtros`}):null,columnsToggle?/* @__PURE__ */ jsxs(DropdownMenu,{children:[/* @__PURE__ */ jsx(DropdownMenuTrigger,{asChild:!0,children:/* @__PURE__ */ jsxs(Button,{variant:`outline`,size:`sm`,children:[/* @__PURE__ */ jsx(Columns3,{}),`Colunas`]})}),/* @__PURE__ */ jsxs(DropdownMenuContent,{align:`end`,className:`w-52`,children:[/* @__PURE__ */ jsx(DropdownMenuLabel,{children:`Campos visíveis`}),/* @__PURE__ */ jsx(DropdownMenuSeparator,{}),columns.map(column=>/* @__PURE__ */ jsx(DropdownMenuCheckboxItem,{checked:column.alwaysVisible||visibleKeysSet.has(column.key),disabled:column.alwaysVisible,onSelect:event=>event.preventDefault(),onCheckedChange:checked=>onToggleColumn(column.key,checked),children:column.header},column.key))]})]}):null,toolbarSlot?/* @__PURE__ */ jsx(`div`,{className:`ml-auto flex items-center gap-2`,children:toolbarSlot}):null]})}function DataTableSelectionBar({count,onClear,actions,classNames}){return/* @__PURE__ */ jsxs(`div`,{className:cn(`animate-in border-brand-border bg-brand-surface fade-in-0 slide-in-from-top-1 flex flex-wrap items-center gap-3 rounded-lg border px-3 py-2 duration-150 ease-out`,classNames?.selectionBar),children:[/* @__PURE__ */ jsxs(`p`,{className:cn(`text-brand-ink text-sm`,classNames?.selectionCount),children:[count,` `,count===1?`linha selecionada`:`linhas selecionadas`]}),/* @__PURE__ */ jsx(Button,{variant:`ghost`,size:`sm`,onClick:onClear,children:`Limpar seleção`}),actions?/* @__PURE__ */ jsx(`div`,{className:`ml-auto flex flex-wrap items-center gap-2`,children:actions}):null]})}function DataTableHead({activeColumns,selectable,allOnPageSelected,someOnPageSelected,onToggleAll,selectAllDisabled,sort,sortable,onToggleSort,classNames}){return/* @__PURE__ */ jsx(`thead`,{children:/* @__PURE__ */ jsxs(`tr`,{className:cn(`bg-neutral-surface border-b`,classNames?.headRow),children:[selectable?/* @__PURE__ */ jsx(`th`,{scope:`col`,className:`w-10 px-4 py-2.5 text-left`,children:/* @__PURE__ */ jsx(Checkbox,{checked:allOnPageSelected?!0:someOnPageSelected?`indeterminate`:!1,onCheckedChange:checked=>onToggleAll(checked===!0),disabled:selectAllDisabled,className:classNames?.checkbox,"aria-label":`Selecionar todas as linhas da página`})}):null,activeColumns.map(column=>/* @__PURE__ */ jsx(`th`,{scope:`col`,style:column.width?{width:column.width}:void 0,className:cn(`text-muted-foreground px-4 py-2.5 text-[11px] font-semibold tracking-wide uppercase`,alignClass(column.align),column.hideBelowLg&&`hidden lg:table-cell`,classNames?.headCell),children:column.sortable&&sortable?/* @__PURE__ */ jsxs(`button`,{type:`button`,onClick:()=>onToggleSort(column.key),className:`group hover:text-foreground inline-flex cursor-pointer items-center gap-1 rounded-sm tracking-wide uppercase transition-colors duration-150 ease-out`,children:[column.header,sort?.key===column.key?sort.direction===`asc`?/* @__PURE__ */ jsx(ArrowUp,{className:`size-3`}):/* @__PURE__ */ jsx(ArrowDown,{className:`size-3`}):/* @__PURE__ */ jsx(ChevronsUpDown,{className:`size-3 opacity-0 transition-opacity duration-150 ease-out group-hover:opacity-60`})]}):column.header},column.key))]})})}function DataTableSkeletonRows({rows,activeColumns}){return Array.from({length:rows},(_,index)=>/* @__PURE__ */ jsx(`tr`,{className:`border-b last:border-0`,children:activeColumns.map(column=>/* @__PURE__ */ jsx(`td`,{className:cn(`px-4 py-3.5`,column.hideBelowLg&&`hidden lg:table-cell`),children:/* @__PURE__ */ jsx(Skeleton,{className:`h-3.5`,style:{width:`${55+column.key.length%3*15}%`}})},column.key))},`skeleton-${index}`))}function DataTableBodyRow({row,index,activeColumns,selectable,selected,onToggle,onRowClick,dragEnabled,dragging,onDragStart,onDrop,onDragEnd,classNames}){return/* @__PURE__ */ jsxs(`tr`,{"data-state":selected?`selected`:void 0,onClick:onRowClick?()=>onRowClick(row):void 0,tabIndex:onRowClick?0:void 0,onKeyDown:onRowClick?event=>{(event.key===`Enter`||event.key===` `)&&event.target===event.currentTarget&&(event.preventDefault(),onRowClick(row))}:void 0,draggable:dragEnabled,onDragStart,onDragOver:event=>{dragEnabled&&event.preventDefault()},onDrop,onDragEnd,className:cn(`animate-in fade-in slide-in-from-top-1 fill-mode-both border-b transition-[background-color,opacity] duration-150 ease-out last:border-0`,onRowClick&&`hover:bg-muted/40 focus-visible:outline-ring cursor-pointer focus-visible:outline-2 focus-visible:-outline-offset-2`,dragEnabled&&`hover:bg-muted/40 cursor-grab active:cursor-grabbing`,dragging&&`opacity-45`,selected&&`bg-brand-surface/60`,classNames?.row,selected&&classNames?.rowSelected),style:{animationDuration:`180ms`,animationDelay:`${Math.min(index,12)*12}ms`},children:[selectable?/* @__PURE__ */ jsx(`td`,{className:`px-4 py-3 align-middle`,children:/* @__PURE__ */ jsx(Checkbox,{onClick:event=>event.stopPropagation(),checked:selected,onCheckedChange:checked=>onToggle(checked===!0),className:classNames?.checkbox,"aria-label":`Selecionar linha ${index+1}`})}):null,activeColumns.map(column=>/* @__PURE__ */ jsx(`td`,{className:cn(`px-4 py-3 align-middle text-sm`,alignClass(column.align),column.hideBelowLg&&`hidden lg:table-cell`,classNames?.cell),children:column.render(row)},column.key))]})}function DataTablePagination({totalItems,page,totalPages,onGoToPage,classNames}){return/* @__PURE__ */ jsxs(`div`,{className:cn(`flex flex-wrap items-center justify-between gap-2`,classNames?.pagination),children:[/* @__PURE__ */ jsxs(`p`,{className:cn(`tabular text-muted-foreground text-xs`,classNames?.paginationLabel),children:[totalItems,` `,totalItems===1?`registro`:`registros`,` · página `,page,` de `,totalPages]}),/* @__PURE__ */ jsxs(`div`,{className:`flex items-center gap-1`,children:[/* @__PURE__ */ jsx(Button,{variant:`outline`,size:`icon-sm`,"aria-label":`Página anterior`,disabled:page<=1,onClick:()=>onGoToPage(page-1),children:/* @__PURE__ */ jsx(ChevronLeft,{})}),/* @__PURE__ */ jsx(Button,{variant:`outline`,size:`icon-sm`,"aria-label":`Próxima página`,disabled:page>=totalPages,onClick:()=>onGoToPage(page+1),children:/* @__PURE__ */ jsx(ChevronRight,{})})]})]})}function DataTableBody({table,keyExtractor,onRowClick,filteredEmptyState,classNames}){return/* @__PURE__ */ jsx(`tbody`,{children:table.isLoading?/* @__PURE__ */ jsx(DataTableSkeletonRows,{rows:table.skeletonRows,activeColumns:table.activeColumns}):table.visible.length===0?/* @__PURE__ */ jsx(`tr`,{children:/* @__PURE__ */ jsx(`td`,{colSpan:table.columnCount,className:`p-0`,children:/* @__PURE__ */ jsx(EmptyState,{icon:filteredEmptyState?.icon??SearchX,title:filteredEmptyState?.title??`Nenhum resultado`,description:filteredEmptyState?.description??`Nenhum registro corresponde à busca e aos filtros aplicados.`,action:filteredEmptyState?.action??/* @__PURE__ */ jsx(Button,{variant:`outline`,size:`sm`,onClick:table.clearAll,children:`Limpar filtros`}),className:cn(`border-0`,classNames?.emptyState)})})}):table.visible.map((row,index)=>{let rowKey=keyExtractor(row);return/* @__PURE__ */ jsx(DataTableBodyRow,{row,index,activeColumns:table.activeColumns,selectable:table.selectable,selected:table.selectable&&table.selectionSet.has(rowKey),onToggle:checked=>table.toggleRow(rowKey,checked),onRowClick,dragEnabled:table.dragEnabled,dragging:table.draggedRowKey===rowKey,onDragStart:()=>table.startDrag(rowKey),onDrop:()=>{table.dropRow(rowKey),table.startDrag(null)},onDragEnd:()=>table.startDrag(null),classNames},rowKey)})})}function DataTable(props){let{columns,keyExtractor,title,description,action,toolbarSlot,searchPlaceholder=`Buscar…`,emptyState,filteredEmptyState,selectionActions,columnsToggle=!1,onRowClick,className,classNames}=props,table=useDataTable(props);return/* @__PURE__ */ jsxs(`div`,{"data-slot":`data-table`,className:cn(`flex min-w-0 flex-col gap-4`,classNames?.root,className),children:[title||description||action&&!table.isBlank?/* @__PURE__ */ jsx(DataTableHeader,{title,description,action:table.isBlank?void 0:action,classNames}):null,table.isBlank?null:/* @__PURE__ */ jsx(DataTableToolbar,{showSearch:table.showSearch,searchValue:table.rawSearch,searchPlaceholder,onSearch:table.handleSearch,filters:table.filters,readFilter:table.readFilter,onFilter:table.handleFilter,hasActiveQuery:table.hasActiveQuery,onClear:table.clearAll,columnsToggle,columns,visibleKeysSet:table.visibleKeysSet,onToggleColumn:table.toggleColumn,toolbarSlot,classNames}),table.selectable&&table.selection.length>0?/* @__PURE__ */ jsx(DataTableSelectionBar,{count:table.selection.length,onClear:table.clearSelection,actions:selectionActions?.(table.selectedRows),classNames}):null,table.isBlank?/* @__PURE__ */ jsx(`div`,{className:`flex min-h-[46vh] items-center justify-center`,children:/* @__PURE__ */ jsx(EmptyState,{icon:emptyState.icon,title:emptyState.title,description:emptyState.description,action:emptyState.action,className:cn(`max-w-md border-0`,classNames?.emptyState)})}):/* @__PURE__ */ jsx(`div`,{className:cn(`w-full overflow-x-auto rounded-xl border`,classNames?.tableContainer),children:/* @__PURE__ */ jsxs(`table`,{style:{minWidth:`${table.columnCount*10}rem`},className:cn(`w-full border-collapse`,classNames?.table),children:[/* @__PURE__ */ jsx(DataTableHead,{activeColumns:table.activeColumns,selectable:table.selectable,allOnPageSelected:table.allOnPageSelected,someOnPageSelected:table.someOnPageSelected,onToggleAll:table.toggleAllOnPage,selectAllDisabled:table.selectAllDisabled,sort:table.sort,sortable:table.sortable,onToggleSort:table.toggleSort,classNames}),/* @__PURE__ */ jsx(DataTableBody,{table,keyExtractor,onRowClick,filteredEmptyState,classNames})]})}),table.totalPages>1?/* @__PURE__ */ jsx(DataTablePagination,{totalItems:table.totalItems,page:table.page,totalPages:table.totalPages,onGoToPage:table.goToPage,classNames}):null]})}function DataTableFilterChip({filter,value,onChange}){let selected=parseCsv(value),active=selected.length>0,selectedSet=new Set(selected),selectedLabels=filter.options.flatMap(option=>selectedSet.has(option.value)?[option.label]:[]),summary=active?selectedLabels.length<=1?selectedLabels[0]??filter.label:`${selectedLabels.length} selecionados`:filter.label;function toggle(optionValue){filter.multiple?onChange((selectedSet.has(optionValue)?selected.filter(item=>item!==optionValue):[...selected,optionValue]).join(`,`)):onChange(selected[0]===optionValue?``:optionValue)}return/* @__PURE__ */ jsxs(`span`,{className:cn(`inline-flex h-8 items-center rounded-md border transition-colors duration-150 ease-out`,active?`border-brand-border bg-brand-surface text-brand-ink`:`text-muted-foreground`),children:[/* @__PURE__ */ jsxs(Popover,{children:[/* @__PURE__ */ jsx(PopoverTrigger,{asChild:!0,children:/* @__PURE__ */ jsxs(`button`,{type:`button`,className:cn(`inline-flex h-full cursor-pointer items-center gap-1.5 rounded-md px-3 text-xs font-medium transition-colors duration-150 ease-out`,active?`pr-1.5`:`hover:bg-accent hover:text-foreground`),children:[summary,active?null:/* @__PURE__ */ jsx(ChevronDown,{className:`size-3.5`})]})}),/* @__PURE__ */ jsxs(PopoverContent,{align:`start`,className:`w-56 p-1`,children:[filter.multiple?/* @__PURE__ */ jsx(`p`,{className:`text-muted-foreground px-2 py-1.5 text-[11px]`,children:`Mostra quem tem todas as selecionadas.`}):null,filter.options.map(option=>{let checked=selectedSet.has(option.value);return/* @__PURE__ */ jsxs(`button`,{type:`button`,onClick:()=>toggle(option.value),className:`hover:bg-accent flex w-full cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm transition-colors duration-150 ease-out`,children:[/* @__PURE__ */ jsx(`span`,{className:`grid size-4 shrink-0 place-items-center`,children:checked?/* @__PURE__ */ jsx(Check,{className:`size-3.5`}):null}),option.dotColor?/* @__PURE__ */ jsx(`span`,{"aria-hidden":`true`,className:`size-2 shrink-0 rounded-full`,style:{backgroundColor:option.dotColor}}):null,/* @__PURE__ */ jsx(`span`,{className:`min-w-0 flex-1 truncate`,children:option.label}),option.count===void 0?null:/* @__PURE__ */ jsx(`span`,{className:`tabular text-muted-foreground text-xs`,children:option.count})]},option.value)})]})]}),active?/* @__PURE__ */ jsx(`button`,{type:`button`,"aria-label":`Limpar filtro ${filter.label}`,onClick:()=>onChange(``),className:`hover:bg-primary/15 mr-1.5 grid size-4 cursor-pointer place-items-center rounded-full transition-colors duration-150 ease-out`,children:/* @__PURE__ */ jsx(X,{className:`size-3`})}):null]})}function parseCsv(value){return value?value.split(`,`).filter(Boolean):[]}function Table({className,...props}){return/* @__PURE__ */ jsx(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:/* @__PURE__ */ jsx(`table`,{"data-slot":`table`,className:cn(`w-full caption-bottom text-sm`,className),...props})})}function TableHeader({className,...props}){return/* @__PURE__ */ jsx(`thead`,{"data-slot":`table-header`,className:cn(`[&_tr]:border-b`,className),...props})}function TableBody({className,...props}){return/* @__PURE__ */ jsx(`tbody`,{"data-slot":`table-body`,className:cn(`[&_tr:last-child]:border-0`,className),...props})}function TableFooter({className,...props}){return/* @__PURE__ */ jsx(`tfoot`,{"data-slot":`table-footer`,className:cn(`bg-muted/50 border-t font-medium [&>tr]:last:border-b-0`,className),...props})}function TableRow({className,...props}){return/* @__PURE__ */ jsx(`tr`,{"data-slot":`table-row`,className:cn(`hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors duration-150 ease-out`,className),...props})}function TableHead({className,...props}){return/* @__PURE__ */ jsx(`th`,{"data-slot":`table-head`,className:cn(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,className),...props})}function TableCell({className,...props}){return/* @__PURE__ */ jsx(`td`,{"data-slot":`table-cell`,className:cn(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,className),...props})}function TableCaption({className,...props}){return/* @__PURE__ */ jsx(`caption`,{"data-slot":`table-caption`,className:cn(`text-muted-foreground mt-4 text-sm`,className),...props})}function useDataTable({columns,data,keyExtractor,isLoading=!1,searchFn,searchValue,onSearchChange,filters=EMPTY_DATA_TABLE_FILTERS,filterValues,onFilterChange,sortFn,defaultSort,defaultPageSize=20,serverPagination,selectable=!1,selectedKeys,onSelectionChange,visibleColumnKeys,onVisibleColumnsChange,onReorder}){let[internalSearch,setInternalSearch]=React.useState(``),[internalPage,setInternalPage]=React.useState(1),[localFilters,setLocalFilters]=React.useState({}),[sort,setSort]=React.useState(defaultSort??null),[draggedRowKey,setDraggedRowKey]=React.useState(null),[internalSelection,setInternalSelection]=React.useState([]),[internalVisibleColumns,setInternalVisibleColumns]=React.useState(()=>columns.flatMap(column=>column.defaultHidden?[]:[column.key])),selectionControlled=onSelectionChange!==void 0,selection=selectionControlled?selectedKeys??[]:internalSelection,selectionSet=new Set(selection);function setSelection(next){selectionControlled?onSelectionChange?.(next):setInternalSelection(next)}let columnsControlled=onVisibleColumnsChange!==void 0,visibleKeys=columnsControlled?visibleColumnKeys??[]:internalVisibleColumns,visibleKeysSet=new Set(visibleKeys);function setVisibleKeys(next){columnsControlled?onVisibleColumnsChange?.(next):setInternalVisibleColumns(next)}let activeColumns=columns.filter(column=>column.alwaysVisible||visibleKeysSet.has(column.key)),columnCount=activeColumns.length+ +!!selectable,searchControlled=onSearchChange!==void 0,rawSearch=searchControlled?searchValue??``:internalSearch,debouncedSearch=useDebounce(rawSearch,250),effectiveSearch=searchControlled?rawSearch:debouncedSearch,filtersControlled=onFilterChange!==void 0,readFilter=React.useCallback(key=>filtersControlled?filterValues?.[key]??``:localFilters[key]??``,[filtersControlled,filterValues,localFilters]);function handleSearch(next){searchControlled?onSearchChange?.(next):(setInternalSearch(next),setInternalPage(1))}function handleFilter(key,next){filtersControlled?onFilterChange?.(key,next):(setLocalFilters(previous=>({...previous,[key]:next})),setInternalPage(1))}let activeFilterCount=filters.filter(filter=>readFilter(filter.key).length>0).length,hasActiveQuery=effectiveSearch.length>0||activeFilterCount>0,processed=React.useMemo(()=>{let rows=data;searchFn&&effectiveSearch&&(rows=rows.filter(row=>searchFn(row,effectiveSearch)));for(let filter of filters){if(!filter.predicate)continue;let value=readFilter(filter.key);if(!value)continue;let selected=parseCsv(value);rows=rows.filter(row=>filter.multiple?selected.every(item=>filter.predicate?.(row,item)):filter.predicate?.(row,value))}return sort&&sortFn&&(rows=[...rows].sort((a,b)=>sortFn(a,b,sort.key,sort.direction))),rows},[data,effectiveSearch,searchFn,filters,sort,sortFn,readFilter]),page=serverPagination?.page??internalPage,totalPages=serverPagination?.totalPages??Math.max(1,Math.ceil(processed.length/defaultPageSize)),totalItems=serverPagination?.totalItems??processed.length,visible=serverPagination?processed:processed.slice((page-1)*defaultPageSize,page*defaultPageSize),visibleKeysOnPage=visible.map(row=>keyExtractor(row)),selectedOnPage=visibleKeysOnPage.filter(key=>selectionSet.has(key)),allOnPageSelected=visibleKeysOnPage.length>0&&selectedOnPage.length===visibleKeysOnPage.length,someOnPageSelected=selectedOnPage.length>0&&!allOnPageSelected,selectedRows=data.filter(row=>selectionSet.has(keyExtractor(row)));function toggleRow(key,checked){setSelection(checked?[...selection,key]:selection.filter(item=>item!==key))}function toggleAllOnPage(checked){if(checked){let merged=/* @__PURE__ */ new Set([...selection,...visibleKeysOnPage]);setSelection(Array.from(merged));return}let naPagina=new Set(visibleKeysOnPage);setSelection(selection.filter(key=>!naPagina.has(key)))}function toggleColumn(key,checked){setVisibleKeys(checked?[...visibleKeys,key]:visibleKeys.filter(item=>item!==key))}let dragEnabled=onReorder!==void 0&&!isLoading&&effectiveSearch.length===0&&activeFilterCount===0&&!serverPagination&&totalPages===1&&sort===null;function dropRow(targetKey){if(!onReorder||!draggedRowKey||draggedRowKey===targetKey)return;let sourceIndex=visible.findIndex(row=>keyExtractor(row)===draggedRowKey),targetIndex=visible.findIndex(row=>keyExtractor(row)===targetKey);if(sourceIndex<0||targetIndex<0)return;let reordered=[...visible],[moved]=reordered.splice(sourceIndex,1);moved&&(reordered.splice(targetIndex,0,moved),onReorder(reordered))}function goToPage(next){serverPagination?serverPagination.onPageChange(next):setInternalPage(next)}function toggleSort(key){setSort(previous=>previous?.key===key?previous.direction===`asc`?{key,direction:`desc`}:null:{key,direction:`asc`})}function clearAll(){handleSearch(``);for(let filter of filters)handleFilter(filter.key,``)}return{activeColumns,columnCount,isLoading,selectable,filters,showSearch:!!searchFn||searchControlled,rawSearch,handleSearch,readFilter,handleFilter,hasActiveQuery,clearAll,visibleKeysSet,toggleColumn,selection,selectionSet,selectedRows,clearSelection:()=>setSelection([]),toggleRow,toggleAllOnPage,allOnPageSelected,someOnPageSelected,selectAllDisabled:isLoading||visibleKeysOnPage.length===0,visible,page,totalPages,totalItems,goToPage,skeletonRows:Math.min(defaultPageSize,8),sort,sortable:sortFn!==void 0,toggleSort,dragEnabled,draggedRowKey,startDrag:setDraggedRowKey,dropRow,isBlank:!isLoading&&data.length===0&&!hasActiveQuery}}const DEFAULT_THEME_LABELS={light:`Claro`,dark:`Escuro`,system:`Sistema`},THEME_ICONS={light:Sun,dark:Moon,system:Monitor},THEME_ORDER=[`light`,`dark`,`system`];function ThemeToggle({className,value,defaultValue=`system`,onValueChange,variant=`segmented`,size=`sm`,labels,...props}){let[internal,setInternal]=React.useState(defaultValue),controlled=value!==void 0,atual=controlled?value:internal,rotulos={...DEFAULT_THEME_LABELS,...labels};function alterar(proximo){controlled||setInternal(proximo),onValueChange?.(proximo)}if(variant===`menu`){let IconeAtual=THEME_ICONS[atual];return/* @__PURE__ */ jsx(`div`,{"data-slot":`theme-toggle`,"data-variant":`menu`,className:cn(`inline-flex`,className),...props,children:/* @__PURE__ */ jsxs(DropdownMenu,{children:[/* @__PURE__ */ jsx(DropdownMenuTrigger,{asChild:!0,children:/* @__PURE__ */ jsx(Button,{variant:`ghost`,size:size===`sm`?`icon-sm`:`icon`,"aria-label":`Tema: ${rotulos[atual]}`,children:/* @__PURE__ */ jsx(IconeAtual,{})})}),/* @__PURE__ */ jsx(DropdownMenuContent,{align:`end`,className:`w-40`,children:/* @__PURE__ */ jsx(DropdownMenuRadioGroup,{value:atual,onValueChange:proximo=>alterar(proximo),children:THEME_ORDER.map(tema=>{let Icone=THEME_ICONS[tema];return/* @__PURE__ */ jsxs(DropdownMenuRadioItem,{value:tema,children:[/* @__PURE__ */ jsx(Icone,{}),rotulos[tema]]},tema)})})})]})})}return/* @__PURE__ */ jsx(ToggleGroup,{"data-slot":`theme-toggle`,"data-variant":`segmented`,type:`single`,variant:`outline`,size,value:atual,onValueChange:proximo=>{proximo&&alterar(proximo)},className:cn(className),...props,children:THEME_ORDER.map(tema=>{let Icone=THEME_ICONS[tema];return/* @__PURE__ */ jsx(ToggleGroupItem,{value:tema,"aria-label":rotulos[tema],className:`px-2`,children:/* @__PURE__ */ jsx(Icone,{})},tema)})})}export{Accordion,AccordionContent,AccordionItem,AccordionTrigger,Alert,AlertDescription,AlertDialog,AlertDialogAction,AlertDialogCancel,AlertDialogContent,AlertDialogDescription,AlertDialogFooter,AlertDialogHeader,AlertDialogMedia,AlertDialogOverlay,AlertDialogPortal,AlertDialogTitle,AlertDialogTrigger,AlertTitle,Avatar,AvatarBadge,AvatarFallback,AvatarGroup,AvatarGroupCount,AvatarImage,Badge,Breadcrumb,BreadcrumbEllipsis,BreadcrumbItem,BreadcrumbLink,BreadcrumbList,BreadcrumbPage,BreadcrumbSeparator,Button,Calendar,CalendarDayButton,Card,CardAction,CardContent,CardDescription,CardFooter,CardHeader,CardTitle,Checkbox,CodeBlock,Collapsible,CollapsibleContent,CollapsibleTrigger,Command,CommandDialog,CommandEmpty,CommandGroup,CommandInput,CommandItem,CommandList,CommandSeparator,CommandShortcut,ContextMenu,ContextMenuCheckboxItem,ContextMenuContent,ContextMenuGroup,ContextMenuItem,ContextMenuLabel,ContextMenuPortal,ContextMenuRadioGroup,ContextMenuRadioItem,ContextMenuSeparator,ContextMenuShortcut,ContextMenuSub,ContextMenuSubContent,ContextMenuSubTrigger,ContextMenuTrigger,DataTable,DataTableFilterChip,Dialog,DialogClose,DialogContent,DialogDescription,DialogFooter,DialogHeader,DialogOverlay,DialogPortal,DialogTitle,DialogTrigger,Drawer,DrawerClose,DrawerContent,DrawerDescription,DrawerFooter,DrawerHeader,DrawerOverlay,DrawerPortal,DrawerTitle,DrawerTrigger,DropdownMenu,DropdownMenuCheckboxItem,DropdownMenuContent,DropdownMenuGroup,DropdownMenuItem,DropdownMenuLabel,DropdownMenuPortal,DropdownMenuRadioGroup,DropdownMenuRadioItem,DropdownMenuSeparator,DropdownMenuShortcut,DropdownMenuSub,DropdownMenuSubContent,DropdownMenuSubTrigger,DropdownMenuTrigger,EMAIL_PATTERN,EmptyState,Field,FieldContent,FieldDescription,FieldError,FieldGroup,FieldLabel,FieldLegend,FieldSeparator,FieldSet,FieldTitle,ImpersonationBanner,Input,InputOTP,InputOTPGroup,InputOTPSeparator,InputOTPSlot,Label,Login,LoginMagicLink,LoginMethods,LoginOtp,LoginPanel,LoginProvider,LoginShowcase,LoginWithSSO,PackageCommand,Pagination,PaginationContent,PaginationEllipsis,PaginationItem,PaginationLink,PaginationNext,PaginationPrevious,PasswordInput,Popover,PopoverAnchor,PopoverContent,PopoverDescription,PopoverHeader,PopoverTitle,PopoverTrigger,Progress,RadioGroup,RadioGroupItem,RockfellerGlobeSpinning,RockfellerMark,ScrollArea,ScrollBar,Select,SelectContent,SelectGroup,SelectItem,SelectLabel,SelectScrollDownButton,SelectScrollUpButton,SelectSeparator,SelectTrigger,SelectValue,Separator,Sheet,SheetClose,SheetContent,SheetDescription,SheetFooter,SheetHeader,SheetTitle,SheetTrigger,Sidebar,SidebarContent,SidebarFooter,SidebarGroup,SidebarGroupAction,SidebarGroupContent,SidebarGroupLabel,SidebarHeader,SidebarInput,SidebarInset,SidebarMenu,SidebarMenuAction,SidebarMenuBadge,SidebarMenuButton,SidebarMenuItem,SidebarMenuSkeleton,SidebarMenuSub,SidebarMenuSubButton,SidebarMenuSubItem,SidebarNav,SidebarProvider,SidebarRail,SidebarSeparator,SidebarTrigger,SignUp,Skeleton,Slider,Switch,Table,TableBody,TableCaption,TableCell,TableFooter,TableHead,TableHeader,TableRow,Tabs,TabsContent,TabsList,TabsTrigger,Textarea,ThemeToggle,Toaster,Toggle,ToggleGroup,ToggleGroupItem,Tooltip,TooltipContent,TooltipProvider,TooltipTrigger,cn,parseCsv,toast,useDataTable,useIsMobile,useSidebar};
|