@dub/ui 0.2.50 → 0.2.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-ITQ6LPW2.mjs +2 -0
- package/dist/chunk-TJ4JURNI.mjs +2 -0
- package/dist/icons/index.d.ts +4 -3
- package/dist/icons/index.mjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as Xu,$a as _p,$b as L0,$c as wf,$d as gg,A as Du,Aa as Np,Ab as l0,Ac as X0,Ad as Gf,B as Eu,Ba as oa,Bb as c0,Bc as Pa,Bd as Kf,C as jt,Ca as Cp,Cb as d0,Cc as Sa,Cd as jf,D as Iu,Da as kp,Db as m0,Dc as J0,Dd as Yf,E as Yt,Ea as aa,Eb as u0,Ec as Q0,Ed as Zf,F as Au,Fa as Pp,Fb as ga,Fc as ef,Fd as qf,G as Ou,Ga as Sp,Gb as p0,Gc as tf,Gd as Xf,H as zu,Ha as Rp,Hb as f0,Hc as rf,Hd as Jf,I as Hu,Ia as Tp,Ib as g0,Ic as of,Id as Qf,J as Xo,Ja as Lp,Jb as b0,Jc as af,Jd as eg,K as Jo,Ka as Mp,Kb as ba,Kc as nf,Kd as La,L as Qo,La as Dp,Lb as ha,Lc as sf,Ld as Ma,M as ea,Ma as Ep,Mb as va,Mc as lf,Md as tg,N as ta,Na as Ip,Nb as xa,Nc as cf,Nd as rg,O as Vu,Oa as Ap,Ob as h0,Oc as df,Od as og,P as _u,Pa as na,Pb as v0,Pc as mf,Pd as ag,Q as Fu,Qa as ia,Qb as x0,Qc as uf,Qd as ng,R as Bu,Ra as sa,Rb as y0,Rc as Jt,Rd as ig,S as Wu,Sa as la,Sb as w0,Sc as pf,Sd as sg,T as $u,Ta as ca,Tb as N0,Tc as ff,Td as lg,U as Uu,Ua as Op,Ub as ya,Uc as gf,Ud as cg,V as Gu,Va as zp,Vb as C0,Vc as bf,Vd as dg,W as Ku,Wa as Hp,Wb as k0,Wc as hf,Wd as mg,X as ju,Xa as da,Xb as P0,Xc as vf,Xd as ug,Y as Yu,Ya as ma,Yb as S0,Yc as xf,Yd as Nt,Z as Zu,Za as ua,Zb as R0,Zc as Ra,Zd as pg,_ as qu,_a as Vp,_b as T0,_c as yf,_d as fg,a as Wo,aa as Ju,ab as Fp,ac as M0,ad as Nf,ae as bg,b as Nu,ba as Qu,bb as Bp,bc as D0,bd as Cf,be as Da,c as et,ca as ep,cb as Wp,cc as E0,cd as kf,ce as hg,d as Ut,da as tp,db as Hr,dc as I0,dd as Pf,de as vg,e as Cu,ea as rp,eb as $p,ec as A0,ed as Sf,ee as xg,f as tt,fa as op,fb as Up,fc as O0,fd as Rf,fe as yg,g as rt,ga as ap,gb as Gp,gc as z0,gd as Qt,ge as wg,h as $o,ha as np,hb as pa,hc as wa,hd as Tf,he as Ng,i as Uo,ia as ip,ib as Kp,ic as H0,id as Lf,ie as Cg,j as ku,ja as sp,jb as jp,jc as V0,jd as Mf,k as Go,ka as lp,kb as Yp,kc as Na,kd as Df,l as Ko,la as cp,lb as Zp,lc as _0,ld as Ef,m as jo,ma as ra,mb as qp,mc as Ca,md as Vr,n as Yo,na as dp,nb as Xp,nc as F0,nd as If,o as wt,oa as mp,ob as Jp,oc as B0,od as Af,p as Pu,pa as up,pb as Qp,pc as W0,pd as Ta,q as Ne,qa as pp,qb as e0,qc as $0,qd as Of,r as Su,ra as fp,rb as t0,rc as U0,rd as zf,s as Gt,sa as gp,sb as r0,sc as G0,sd as Hf,t as Ru,ta as bp,tb as o0,tc as Xt,td as Vf,u as Tu,ua as hp,ub as a0,uc as K0,ud as _f,v as Kt,va as vp,vb as fa,vc as j0,vd as Ff,w as Lu,wa as Zt,wb as n0,wc as Y0,wd as Bf,x as Zo,xa as xp,xb as i0,xc as Z0,xd as Wf,y as qo,ya as yp,yb as s0,yc as q0,yd as $f,z as Mu,za as wp,zb as qt,zc as ka,zd as Uf}from"./chunk-DCXMLT66.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as vt,b as Io,c as Or,d as xt,e as Ao,f as Oo,g as zo,h as yt,i as zr,j as Ho,k as V,l as we,m as Vo,n as fe,o as Wt,p as s,q as $t,r as _o,s as Fo,t as Bo}from"./chunk-LVO2QIFF.mjs";import*as ae from"@radix-ui/react-accordion";import{ChevronDown as wi}from"lucide-react";import*as tr from"react";import{jsx as er,jsxs as Pi}from"react/jsx-runtime";var Lg=ae.Root,Ni=tr.forwardRef(({className:e,...t},r)=>er(ae.Item,{ref:r,className:s("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ni.displayName="AccordionItem";var Ci=tr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?wi:Qt;return er(ae.Header,{className:"flex",children:Pi(ae.Trigger,{ref:a,className:s("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,er(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Ci.displayName=ae.Trigger.displayName;var ki=tr.forwardRef(({className:e,children:t,...r},o)=>er(ae.Content,{ref:o,className:s("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));ki.displayName=ae.Content.displayName;import{cva as Si}from"class-variance-authority";import*as rr from"react";import{jsx as _r}from"react/jsx-runtime";var Ri=Si("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Ti=rr.forwardRef(({className:e,variant:t,...r},o)=>_r("div",{ref:o,role:"alert",className:s(Ri({variant:t}),e),...r}));Ti.displayName="Alert";var Li=rr.forwardRef(({className:e,...t},r)=>_r("h5",{ref:r,className:s("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Li.displayName="AlertTitle";var Mi=rr.forwardRef(({className:e,...t},r)=>_r("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Mi.displayName="AlertDescription";import{sha256 as Di}from"js-sha256";import{useState as Ei}from"react";import{jsx as Fr}from"react/jsx-runtime";function Ii(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dub.co/og/avatar";let t=`https://api.dub.co/og/avatar?seed=${encodeURIComponent(e.id)}`,r=`https://api.dub.co/og/avatar${encodeURIComponent(`?seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${Di(e.email)}?d=${encodeURIComponent(r)}`:t}function Hg({user:e={},className:t}){if(!e)return Fr("div",{className:s("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ei(Ii(e));return Fr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:s("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar?seed=${e.id}`)}})}function Vg({id:e,className:t}){return Fr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:s("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Ai}from"class-variance-authority";import{jsx as zi}from"react/jsx-runtime";var Oi=Ai("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-neutral-400 text-neutral-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",green:"border-green-100 bg-green-100 text-green-900",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-neutral-200 bg-neutral-100 text-neutral-800",neutral:"border-neutral-400 text-neutral-500",amber:"border-amber-800 bg-amber-800 text-white",blueGradient:"bg-gradient-to-r from-blue-100 via-blue-100/50 to-blue-100 border border-blue-200 text-blue-900",rainbow:"bg-gradient-to-r from-violet-600 to-pink-600 text-white border-transparent"}},defaultVariants:{variant:"neutral"}});function or({className:e,variant:t,...r}){return zi("span",{className:s(Oi({variant:t}),e),...r})}import{cva as Bi}from"class-variance-authority";import{forwardRef as Wi}from"react";import*as ge from"@radix-ui/react-tooltip";import Hi from"linkify-react";import{HelpCircle as Vi}from"lucide-react";import _i from"next/link";import{useState as Fi}from"react";import{jsx as U,jsxs as ot}from"react/jsx-runtime";function Jg({children:e}){return U(ge.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:l=0,...c}){let[i,m]=Fi(!1);return ot(ge.Root,{open:i,onOpenChange:m,delayDuration:l,disableHoverableContent:a,children:[U(ge.Trigger,{asChild:!0,onClick:()=>{m(!0)},onBlur:()=>{m(!1)},children:e}),U(ge.Portal,{children:U(ge.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...c,children:typeof t=="string"?U("span",{className:s("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:m}):t})})]})}function Qg({title:e,cta:t,href:r,target:o,onClick:a}){return ot("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?U(_i,{href:r,...o?{target:o}:{},className:s(ne({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ie,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function e1({title:e,cta:t,href:r}){return ot("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})}function t1({children:e,className:t,tooltipClassName:r}){return U("div",{className:s("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(Hi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:s("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function r1(e){return U(J,{...e,children:U(Vi,{className:"h-4 w-4 text-neutral-500"})})}function o1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:ot("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[ot("p",{className:"text-sm font-semibold text-neutral-700",children:[r,$t(e||0,{full:!0})," ",t]}),a&&ot("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Oo(a,{withAgo:!0})]})]}),children:o})}function a1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(or,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function n1({children:e,tooltipProps:t,...r}){return U(J,{...t,children:U("button",{type:"button",...r,className:s("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}function ar({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as at,jsxs as Ea}from"react/jsx-runtime";var ne=Bi("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:s("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ie=Wi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:l,icon:c,shortcut:i,disabledTooltip:m,right:d,...n},u)=>m?at(J,{content:m,children:Ea("div",{className:s("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[c,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("kbd",{className:s("hidden rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-400 md:inline-block",{"bg-neutral-100":t==null?void 0:t.endsWith("outline")},a),children:i})]})}):Ea("button",{ref:u,type:n.onClick?"button":"submit",className:s("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||l?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ne({variant:t}),r),disabled:n.disabled||l,...n,children:[l?at(Ne,{}):c||null,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("kbd",{className:s("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-neutral-700 text-neutral-400 group-hover:bg-neutral-600 group-hover:text-neutral-300":t==="primary","bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":t==="secondary","bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:i}),d]}));ie.displayName="Button";import{cva as $i}from"class-variance-authority";import{createContext as Ui}from"react";import{jsx as Ia}from"react/jsx-runtime";var Gi=$i("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),Ct=Ui({variant:"loose",loading:!1});function Aa({variant:e="loose",loading:t=!1,className:r,children:o}){return Ia("ul",{className:s(Gi({variant:e,loading:t}),r),"data-variant":e,children:Ia(Ct.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as Ki}from"class-variance-authority";import{createContext as ji,useContext as Yi,useEffect as Zi,useRef as qi,useState as Xi}from"react";import{jsx as Oa,jsxs as es}from"react/jsx-runtime";var Ji=Ki("w-full group/card border-neutral-200 bg-white",{variants:{variant:{compact:"first-of-type:rounded-t-xl last-of-type:rounded-b-xl first-of-type:border-t border-b border-x data-[hover-state-enabled=true]:hover:bg-neutral-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),Qi="w-full py-2.5 px-4",Br=ji({hovered:!1});function za({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:l=!0,banner:c}){let{variant:i}=Yi(Ct),m=qi(null),[d,n]=Xi(!1);Zi(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var v;((v=m.current)==null?void 0:v.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||yt(p));return es("li",{ref:m,className:s(Ji({variant:i}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":l,children:[c,Oa("div",{className:s(Qi,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Oa(Br.Provider,{value:{hovered:d},children:r})})]})}var L1=Object.assign(Aa,{Card:Object.assign(za,{Context:Br}),Context:Ct});import ts from"embla-carousel-autoplay";import rs from"embla-carousel-react";import{ArrowLeft as os,ArrowRight as as}from"lucide-react";import{createContext as ns,forwardRef as Pt,useCallback as kt,useContext as is,useEffect as Wr,useState as $r}from"react";import{jsx as Ce,jsxs as _a}from"react/jsx-runtime";var Ur=2e3,Ha=ns(null);function be(){let e=is(Ha);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Va(){let{api:e}=be(),[t,r]=$r(0),o=kt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Wr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var ss=Pt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...i},m)=>{let[d,n]=rs({...t,axis:e==="horizontal"?"x":"y"},[...o?[ts(typeof o=="object"?o:{delay:Ur})]:[],...a||[]]),[u,p]=$r(!1),[v,h]=$r(!1),b=kt(R=>{!R||(p(R.canScrollPrev()),h(R.canScrollNext()))},[]),g=kt(()=>{n==null||n.scrollPrev()},[n]),y=kt(()=>{n==null||n.scrollNext()},[n]),w=kt(R=>{R.key==="ArrowLeft"?(R.preventDefault(),g()):R.key==="ArrowRight"&&(R.preventDefault(),y())},[g,y]);return Wr(()=>{!n||!r||r(n)},[n,r]),Wr(()=>{if(!!n)return b(n),n.on("reInit",b),n.on("select",b),()=>{n==null||n.off("select",b)}},[n,b]),Ce(Ha.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:y,canScrollPrev:u,canScrollNext:v},children:Ce("div",{ref:m,onKeyDownCapture:w,className:s("relative",l),role:"region","aria-roledescription":"carousel",...i,children:c})})});ss.displayName="Carousel";var ls=Pt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:s("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ls.displayName="CarouselContent";var cs=Pt(({className:e,...t},r)=>{let{orientation:o}=be();return Ce("div",{ref:r,role:"group","aria-roledescription":"slide",className:s("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});cs.displayName="CarouselItem";var ds=Pt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=be();return _a("button",{ref:r,className:s("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(os,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});ds.displayName="CarouselPrevious";var ms=Pt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=be();return _a("button",{ref:r,className:s("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(as,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});ms.displayName="CarouselNext";import{cva as us}from"class-variance-authority";import{motion as ps}from"framer-motion";import{ChevronLeft as fs,ChevronRight as gs}from"lucide-react";import*as Me from"react";import{jsx as We,jsxs as St}from"react/jsx-runtime";var bs=us("flex items-center justify-center gap-3 sm:gap-6",{variants:{variant:{simple:"relative",floating:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full border border-neutral-800/10 bg-white sm:bottom-6 "}}}),j1=({variant:e="simple",className:t})=>{var h;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=be(),i=(h=c==null?void 0:c.plugins())==null?void 0:h.autoplay,[m,d]=Me.useState(0),[n,u]=Me.useState(!1),p=Me.useCallback(b=>{d((b==null?void 0:b.selectedScrollSnap())??0)},[]),v=Me.useCallback(b=>()=>{i&&i.isPlaying()&&i.stop(),b()},[i]);return Me.useEffect(()=>{!c||(p(c),u((i==null?void 0:i.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,i,p]),St("div",{className:s(bs({variant:e}),t),children:[e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:v(o),children:[We(fs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&We("div",{className:"flex items-center gap-1",children:c.slideNodes().map((b,g)=>St("button",{onClick:v(()=>c.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[We("div",{className:s("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",g===m?"bg-black":"bg-black/20",n&&g===m&&"w-6 bg-black/20"),children:n&&g===m&&We(ps.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((i==null?void 0:i.options.delay)??Ur)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),St("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:v(r),children:[We(gs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Next slide"})]})]})};import hs from"embla-carousel-react";import{forwardRef as vs,useCallback as xs,useEffect as ys}from"react";import{jsx as nr}from"react/jsx-runtime";var rb=({className:e,...t})=>{let{api:r}=be(),[o,a]=hs({dragFree:!0}),l=xs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return ys(()=>{if(!(!r||!a))return l(r),r.on("reInit",l),r.on("select",l),()=>{r==null||r.off("reInit",l),r==null||r.off("select",l)}},[r,a,l]),nr("div",{className:"overflow-hidden",ref:o,children:nr("div",{className:s("mx-4 flex gap-4",e),...t})})},ob=vs(({index:e,className:t,...r},o)=>{let{api:a}=be(),l=Va();return nr("div",{ref:o,children:nr("button",{type:"button",onClick:()=>{var i;if(!a)return;let c=(i=a.plugins())==null?void 0:i.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===l}):t,...r})})});import*as Rt from"@radix-ui/react-checkbox";import{Check as ws}from"lucide-react";import*as Fa from"react";import{jsx as Gr}from"react/jsx-runtime";var Ns=Fa.forwardRef(({className:e,...t},r)=>Gr(Rt.Root,{ref:r,className:s("peer h-5 w-5 shrink-0 rounded-md border border-neutral-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500",e),...t,children:Gr(Rt.Indicator,{className:"flex items-center justify-center",children:Gr(ws,{className:"h-3 w-3 text-white"})})}));Ns.displayName=Rt.Root.displayName;import{Command as Lt,CommandInput as pl,CommandItem as fl,useCommandState as gl}from"cmdk";import{ChevronDown as bl}from"lucide-react";import{forwardRef as hl,isValidElement as vl,useCallback as xl,useEffect as cr,useRef as yl,useState as Tt}from"react";import{motion as dl}from"framer-motion";import{forwardRef as ml,useRef as ul}from"react";import Kr from"js-cookie";import{useEffect as Cs,useState as ks}from"react";function db(e,t,r){let[o,a]=ks(()=>{let c=Kr.get(e);return c?JSON.parse(c):t});return Cs(()=>{let c=()=>{let i=Kr.get(e);i&&a(JSON.parse(i))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Kr.set(e,JSON.stringify(c),r)}]}import{useCallback as Ps,useEffect as Ss,useRef as Rs,useState as Ts}from"react";var nt=(e=3e3)=>{let t=Rs(null),[r,o]=Ts(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=Ps(async(c,{onSuccess:i,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),i==null||i(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(d){if(console.error("Failed to copy: ",d),m)throw d}},[e]);return Ss(()=>()=>a(),[]),[r,l]};import{useEffect as Ls,useState as Ms}from"react";function gb(){let[e,t]=Ms(null);return Ls(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(i=>{var u,p,v;let m=i[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let h=1;h<i.length;h++){let b=i[h];if(!b)break;(b.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=b)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=l.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=l.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(i=>a.observe(i)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Ds}from"react";function xb(e){return{handleKeyDown:Ds(r=>{if(r.key==="Enter"&&r.metaKey){if(r.preventDefault(),e!=null&&e.current){e.current.requestSubmit();return}let o=r.target.form;o==null||o.requestSubmit()}},[])}}import{useEffect as Es,useState as Is}from"react";function Cb(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=Is(o??!1);return Es(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,n=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};l(n.top<u.bottom&&n.bottom>u.top&&n.left<u.right&&n.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let i=null;return e.current&&(i=new IntersectionObserver(c),i.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),i==null||i.disconnect()}},[e,r]),a}import{useEffect as As,useState as Os}from"react";function Sb(){let[e,t]=Os(!1);return As(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as zs,useState as Hs}from"react";function Mb(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[l,c]=Hs(),i=(l==null?void 0:l.isIntersecting)&&a,m=([d])=>{c(d)};return zs(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||i||!d)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(d),()=>p.disconnect()},[e,JSON.stringify(t),r,o,i]),l}import{createContext as Vs,useCallback as _s,useContext as Fs,useEffect as Ba,useId as Bs,useState as Ws}from"react";import{jsx as $s}from"react/jsx-runtime";var Wa=Vs({listeners:[],setListeners:()=>{}});function zb({children:e}){let[t,r]=Ws([]);return $s(Wa.Provider,{value:{listeners:t,setListeners:r},children:e})}function it(e,t,r={}){let o=Bs(),{listeners:a,setListeners:l}=Fs(Wa),c=_s(i=>{if(r.enabled===!1)return;let m=i.target,d=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!n!=!!r.sheet)return;let u=[...i.metaKey?["meta"]:[],...i.ctrlKey?["ctrl"]:[],...i.altKey?["alt"]:[],i.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(h=>h.enabled!==!1&&!!d==!!h.modal&&!!n==!!h.sheet&&(Array.isArray(h.key)?h.key.includes(u):h.key===u));!p.length||Ao(p,(h,b)=>(b.priority??0)-(h.priority??0))[0].id!==o||(i.preventDefault(),t(i))},[e,a,o,t,r.enabled,r.modal,r.sheet]);Ba(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),Ba(()=>(l(i=>[...i.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>l(i=>i.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Us,useState as Gs}from"react";function $a(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function _b(e,t){let[r,o]=Gs($a(e)??t);return Us(()=>{let l=$a(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as Ks}from"sonner";import js from"swr";function Ub(e,t){let{data:r,isLoading:o,mutate:a}=js(e,fe);return{data:r,isLoading:o,update:async(l,c)=>Ks.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as ja,useMemo as Qs}from"react";import{useEffect as Ua,useState as Ys}from"react";function Ga({pageSize:e,page:t,onPageChange:r}){let[o,a]=Ys({pageIndex:t,pageSize:e});return Ua(()=>{a(l=>({...l,pageIndex:t}))},[t]),Ua(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Zs,useRouter as qs,useSearchParams as Xs}from"next/navigation";import{useCallback as Js}from"react";function Ka(){let e=Zs(),t=qs(),r=Xs(),o=Object.fromEntries(r),a=(c,i)=>{let m=new URLSearchParams(r);if((i==null?void 0:i.include)&&Array.isArray(i.include)){let n=new URLSearchParams;r.forEach((u,p)=>{var v;(v=i.include)!=null&&v.includes(p)&&n.set(p,u)}),m=n}(i==null?void 0:i.exclude)&&Array.isArray(i.exclude)&&i.exclude.forEach(n=>m.delete(n)),c&&Object.entries(c).forEach(([n,u])=>m.set(n,u));let d=m.toString();return d.length>0?`?${d}`:""},l=Js(({set:c,del:i,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([b,g])=>p.set(b,Array.isArray(g)?g.join(u):g)),i&&(Array.isArray(i)?i.forEach(b=>p.delete(b)):p.delete(i));let v=p.toString(),h=`${e}${v.length>0?`?${v}`:""}`;if(n)return h;m?t.replace(h,{scroll:!1}):t.push(h,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:l,getQueryString:a}}function rh(e=Fo){let{searchParams:t,queryParams:r}=Ka(),o=Qs(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=Ga({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return ja(()=>{let c=parseInt(t.get("page")||"1")||1;l(i=>({...i,pageIndex:c}))},[t.get("page")]),ja(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:l}}import{useEffect as el}from"react";function nh(){el(()=>{let e=new URL(window.location.href);e.searchParams.has("_gl")&&setTimeout(()=>{e.searchParams.delete("_gl"),window.history.replaceState({},"",e.toString())},2e3)},[])}import{useEffect as tl,useState as rl}from"react";function ir(e){let[t,r]=rl(),o=([a])=>{r(a)};return tl(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as ol,useEffect as Ya,useState as al}from"react";function Za(e,{container:t}={}){let[r,o]=al(!1),a=ol(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return Ya(()=>{let l=(t==null?void 0:t.current)??window;return l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)},[a]),Ya(()=>{a()},[a]),r}import{useCallback as nl,useEffect as il,useState as sl}from"react";function De(e){let[t,r]=sl(1),o=nl(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:i}=e.current;r(c===i?1:Math.min(l/(c-i),1))},[]),a=ir(e);return il(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as ll}from"react";import{toast as Xa}from"sonner";import{jsx as sr,jsxs as qa}from"react/jsx-runtime";function cl({id:e,message:t,undo:r}){let o=()=>{r(),Xa.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return ll(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),qa("div",{className:"flex w-full items-center justify-between space-x-2",children:[qa("div",{className:"flex items-center space-x-2",children:[sr(jo,{}),sr("p",{className:"font-medium",children:t})]}),sr("button",{className:"whitespace-nowrap rounded border border-black bg-black px-2 py-1 text-xs font-normal text-white transition-all duration-75 active:scale-95",onClick:o,children:"Undo"})]})}function yh(){return({id:t,message:r,undo:o,duration:a})=>Xa(sr(cl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as Ja}from"react/jsx-runtime";var ke=ml(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var d,n;let i=ul(null),m=ir(i);return Ja(dl.div,{ref:c,className:s("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((n=m==null?void 0:m.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...l,children:Ja("div",{ref:i,className:s(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Ee from"@radix-ui/react-popover";import{Drawer as st}from"vaul";import{jsx as Pe,jsxs as lr}from"react/jsx-runtime";function lt({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:i,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:v}=j();return c||v?lr(st.Root,{open:a,onOpenChange:l,children:[Pe(st.Trigger,{className:"sm:hidden",asChild:!0,children:e}),lr(st.Portal,{children:[Pe(st.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),lr(st.Content,{className:"border-border-subtle bg-bg-default fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t",onEscapeKeyDown:u,onPointerDownOutside:h=>{h.target instanceof Element&&h.target.closest("[data-sonner-toast]")&&h.preventDefault()},children:[Pe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Pe("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Pe("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Pe(st.Overlay,{})]})]}):lr(Ee.Root,{open:a,onOpenChange:l,children:[Pe(Ee.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Ee.Portal,{children:Pe(Ee.Content,{sideOffset:8,align:r,side:o,className:s("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",i),sticky:n,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as dr,jsx as L,jsxs as Se}from"react/jsx-runtime";function wl(e,t){return e===!0}function Zh({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:i,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:u,caret:p,side:v,open:h,onOpenChange:b,onSearchChange:g,shouldFilter:y=!0,inputRight:w,inputClassName:R,optionRight:C,optionClassName:k,matchTriggerWidth:z,hideSearch:O=!1,children:S}){let x=wl(e,r),I=Array.isArray(t)?t:t?[t]:[],{isMobile:N}=j(),[P,X]=Tt(!1),D=h??P,me=b??X,[$,Er]=Tt(""),[Mo,Ir]=Tt(!1),[Ar,vi]=Tt(void 0),[xi,Do]=Tt(!1),yi=H=>{var Qe;if(x){let Fe=I.some(({value:Be})=>Be===H.value);r(Fe?I.filter(({value:Be})=>Be!==H.value):[...I,H])}else r(I.length&&((Qe=I[0])==null?void 0:Qe.value)===H.value?null:H),me(!1)},Eo=xl((H,Qe)=>Qe===""?[...H.filter(Fe=>Fe.first&&!I.some(Be=>Be.value===Fe.value)),...I,...H.filter(Fe=>!Fe.first&&!I.some(Be=>Be.value===Fe.value))]:H,[I]);return cr(()=>{Mo&&(vi(o&&Eo(o,$)),Ir(!1))},[Mo,o,Eo,$]),cr(()=>{Ir(!0)},[o]),cr(()=>{D||(Er(""),Ir(!0))},[D]),cr(()=>g==null?void 0:g($),[$]),L(lt,{openPopover:D,setOpenPopover:me,align:"start",side:v,onWheel:H=>{H.stopPropagation()},popoverContentClassName:s(z&&"sm:w-[var(--radix-popover-trigger-width)]"),content:L(ke,{width:!N&&!z,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(Lt,{loop:!0,shouldFilter:y,children:[!O&&Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[L(pl,{placeholder:c,value:$,onValueChange:Er,className:s("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",R),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!$)&&(H.preventDefault(),H.stopPropagation(),me(!1))}}),w&&L("div",{className:"mr-2",children:w}),u&&L("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:u})]}),L(Nl,{children:L(Lt.List,{className:s("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Ar!==void 0?Se(dr,{children:[Ar.map(H=>L(Cl,{option:H,multiple:x,selected:I.some(({value:Qe})=>Qe===H.value),onSelect:()=>yi(H),right:C==null?void 0:C(H),className:k},`${H.label}, ${H.value}`)),$.length>0&&d&&Se(fl,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",k),onSelect:async()=>{Do(!0),await(d==null?void 0:d($))&&(Er(""),me(!1)),Do(!1)},children:[xi?L(Ne,{className:"size-4 shrink-0"}):L(Qt,{className:"size-4 shrink-0"}),L("div",{className:"grow truncate",children:(m==null?void 0:m($))||`Create "${$}"`})]}),y?L(Pl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):Ar.length===0?L("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):null]}):L(Lt.Loading,{children:L("div",{className:"flex h-12 items-center justify-center",children:L(Ne,{})})})})})]})}),children:L(ie,{variant:"secondary",...n,className:s(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:s(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(dr,{children:[L("div",{className:"min-w-0 grow truncate text-left",children:S||I.map(H=>H.label).join(", ")||l}),p&&(p===!0?L(bl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?Qa(a)?a:L(a,{className:"size-4 shrink-0"}):void 0})})}var Nl=({children:e})=>{let t=yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return Se(dr,{children:[L("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),L("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})};function Cl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return Se(dr,{children:[L(kl,{disabledTooltip:e.disabledTooltip,children:Se(Lt.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(e.disabledTooltip)&&"cursor-not-allowed opacity-50",l),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&L("div",{className:"shrink-0 text-neutral-600",children:o?L(sa,{className:"size-4 text-neutral-600"}):L(la,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&L("span",{className:"shrink-0 text-neutral-600",children:Qa(e.icon)?e.icon:L(e.icon,{className:"h-4 w-4"})}),L("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&L(ia,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&L(Lt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var kl=({children:e,disabledTooltip:t})=>t?L(J,{content:t,children:L("div",{children:e})}):e,Qa=e=>vl(e),Pl=hl((e,t)=>gl(o=>o.filtered.count===0)?L("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as mr,format as Sl,isSameMonth as Rl}from"date-fns";import{ChevronLeft as en,ChevronRight as tn,ChevronsLeft as Tl,ChevronsRight as Ll}from"lucide-react";import{forwardRef as Ml,useRef as Dl}from"react";import{DayPicker as El,useDayPicker as Il,useDayRender as Al,useNavigation as Ol}from"react-day-picker";import{Fragment as zl,jsx as te,jsxs as ur}from"react/jsx-runtime";var Mt=Ml(({onClick:e,icon:t,disabled:r,...o},a)=>te("button",{ref:a,type:"button",disabled:r,className:s("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:te(t,{className:"h-full w-full shrink-0"})}));Mt.displayName="NavigationButton";function rn({mode:e="single",weekStartsOn:t=1,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:i,...m}){return te(El,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:s("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...i},components:{IconLeft:()=>te(en,{className:"h-4 w-4"}),IconRight:()=>te(tn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:v,displayMonths:h}=Ol(),{numberOfMonths:b,fromDate:g,toDate:y}=Il(),w=h.findIndex(x=>Rl(d.displayMonth,x)),R=w===0,C=w===h.length-1,k=b>1&&(R||!C),z=b>1&&(C||!R),O=()=>{let x=mr(v,-1);p&&(!g||x.getTime()>=g.getTime())&&n(x)},S=()=>{let x=mr(v,1);u&&(!y||x.getTime()<=y.getTime())&&n(x)};return ur("div",{className:"flex items-center justify-between",children:[ur("div",{className:"flex items-center gap-1",children:[o&&!z&&te(Mt,{disabled:a||!p||g&&mr(v,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:O,icon:Tl}),!z&&te(Mt,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:en})]}),te("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Sl(d.displayMonth,"LLLL yyy",{locale:l})}),ur("div",{className:"flex items-center gap-1",children:[!k&&te(Mt,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:tn}),o&&!k&&te(Mt,{disabled:a||!u||y&&mr(v,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:S,icon:Ll})]})]})},Day:({date:d,displayMonth:n})=>{let u=Dl(null),{activeModifiers:p,buttonProps:v,divProps:h,isButton:b,isHidden:g}=Al(d,n,u),{selected:y,today:w,disabled:R,range_middle:C}=p;if(g)return te(zl,{});if(!b)return te("div",{...h,className:s("flex items-center justify-center",h.className)});let{children:k,...z}=v;return ur("button",{ref:u,...z,type:"button",children:[k,w&&te("span",{className:s("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!y,"!bg-white":y,"!bg-blue-400":y&&C,"text-neutral-400":R})})]})}},...m})}import{enUS as jl}from"date-fns/locale";import{useEffect as Jr,useMemo as an,useRef as Yl,useState as fr}from"react";import{Command as jr}from"cmdk";import{Lock as Hl}from"lucide-react";import{jsx as $e,jsxs as Vl}from"react/jsx-runtime";var Yr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,l=d=>"date"in d,c=(d,n)=>d.getDate()===n.getDate()&&d.getMonth()===n.getMonth()&&d.getFullYear()===n.getFullYear(),i=(d,n)=>{let u=d.from,p=n.from,v=!1;u&&p&&c(u,p)&&(v=!0);let h=d.to,b=n.to,g=!1;return h&&b&&c(h,b)&&(g=!0),v&&g},m=d=>{if(o)return o===d.id;if(a(d)){let n=r;return n&&i(n,d.dateRange)}else if(l(d)){let n=r;return n&&c(n,d.date)}return!1};return $e(jr,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:$e(jr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Vl(jr.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:s("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-neutral-100",m(d)&&"font-semibold text-neutral-800"),children:[$e("span",{children:d.label}),d.requiresUpgrade?$e(Hl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?$e("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&$e(J,{side:"bottom",content:d.tooltipContent,children:$e("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Yr.displayName="DatePicker.Presets";import{format as Ie}from"date-fns";import{createContext as _l}from"react";var Zr=_l({isOpen:!1,setIsOpen:()=>{}}),Fl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},qr=(e,t,r=!1)=>{let o=!Fl(),a;return r?a=o?Ie(e,"d MMM, yyyy h:mm a",{locale:t}):Ie(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ie(e,"d MMM, yyyy",{locale:t}),a},on=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:i}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(n=>{var u,p,v,h,b,g;if("date"in n){let y=n.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&y>r)throw new Error(`Preset ${n.label} is after toYear ${d}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(l&&n.date.getMonth()>l.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${l}.`);if(c&&n.date.getDate()<c.getDate())throw new Error(`Preset ${n.label} is before fromDay ${c}.`);if(i&&n.date.getDate()>i.getDate())throw new Error(`Preset ${n.label} is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}if("dateRange"in n){let y=(u=n.dateRange.from)==null?void 0:u.getFullYear(),w=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(w&&r&&w>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let R=(v=n.dateRange.from)==null?void 0:v.getMonth();if(R&&R<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Ie(a,"MMM, yyyy")}.`)}if(l){let R=(h=n.dateRange.to)==null?void 0:h.getMonth();if(R&&R>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Ie(l,"MMM, yyyy")}.`)}if(c){let R=(b=n.dateRange.from)==null?void 0:b.getDate();if(R&&R<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Ie(c,"MMM dd, yyyy")}.`)}if(i){let R=(g=n.dateRange.to)==null?void 0:g.getDate();if(R&&R>i.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}}})}};import{cva as Bl}from"class-variance-authority";import{Calendar as Wl,ChevronDown as $l}from"lucide-react";import{forwardRef as Ul}from"react";import{jsx as pr,jsxs as Kl}from"react/jsx-runtime";var Gl=Bl(["group peer flex cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 h-10 outline-none transition-all text-sm","bg-white border-neutral-200 text-neutral-900 placeholder-neutral-400 transition-all","disabled:pointer-events-none disabled:bg-neutral-100 disabled:text-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),Xr=Ul(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>Kl("button",{ref:l,className:s(Gl({hasError:o}),e),...a,children:[pr(Wl,{className:s("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),pr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?pr("span",{className:"text-neutral-400",children:r}):null)}),pr($l,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Xr.displayName="DatePicker.Trigger";import{jsx as re,jsxs as nn}from"react/jsx-runtime";var Zl=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:i,showYearNavigation:m=!1,locale:d=jl,placeholder:n="Select date range",hasError:u,align:p="center",className:v,...h})=>{let{isDesktop:b}=j(),[g,y]=fr(!1),[w,R]=fr(a&&r?a==null?void 0:a.find(({id:D})=>D===r):void 0),[C,k]=fr((w==null?void 0:w.dateRange)??e??t??void 0),[z,O]=fr(C==null?void 0:C.to),S=an(()=>C,[g]);Jr(()=>{k(e)},[e]),Jr(()=>{let D=a==null?void 0:a.find(({id:me})=>me===r);R(D),k((D==null?void 0:D.dateRange)??e??t)},[a,r]),Jr(()=>{g?C&&O(C.to):O(C==null?void 0:C.to)},[g]);let x=(D,me)=>{let $=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:me}:D;k($),R(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),y(!1))},I=D=>{k(D.dateRange),R(D),o==null||o(D.dateRange,D),y(!1)},N=()=>{k(S),y(!1)},P=D=>{D||N(),y(D)},X=an(()=>C?`${C.from?qr(C.from,d):""} - ${C.to?qr(C.to,d):""}`:null,[C,d]);return it((a==null?void 0:a.filter(D=>D.shortcut).map(D=>D.shortcut))??[],D=>{let me=a==null?void 0:a.find($=>$.shortcut===D.key);me&&I(me)}),re(Zr.Provider,{value:{isOpen:g,setIsOpen:y},children:re(lt,{align:p,openPopover:g,setOpenPopover:P,popoverContentClassName:"rounded-xl",content:re("div",{className:"flex w-full",children:nn("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&re(ql,{children:re("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:re("div",{className:"sm:py-3",children:re(Yr,{currentPresetId:r,currentValue:C,presets:a,onSelect:I})})})}),re("div",{className:"scrollbar-hide overflow-x-scroll",children:re(rn,{mode:"range",selected:C,onSelect:x,month:z,onMonthChange:O,numberOfMonths:b?2:1,disabled:i,disableNavigation:c,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...h})})]})}),children:re(Xr,{placeholder:n,disabled:l,className:v,hasError:u,"aria-required":h.required||h["aria-required"],"aria-invalid":h["aria-invalid"],"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],children:(w==null?void 0:w.label)??X})})})};function Iv({presets:e,...t}){return e&&on(e,t),re(Zl,{presets:e,...t})}function ql({children:e}){let t=Yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return nn("div",{className:"relative sm:h-full",children:[re("div",{ref:t,onScroll:o,className:s("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),re("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})}import Xl from"next/link";import{useEffect as Jl,useState as sn}from"react";import Ql from"swr";import{jsx as Qr,jsxs as ln}from"react/jsx-runtime";function cn({className:e}){let{data:t}=Ql("https://status.dub.co/api/v1/summary",fe),[r,o]=sn("bg-neutral-200"),[a,l]=sn("Loading status...");return Jl(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:i,name:m}=c[0],d=i==="degraded_performance"?"bg-yellow-500":"bg-red-500";l(m),o(d)}else l("All systems operational"),o("bg-green-500")},[t]),ln(Xl,{href:"https://status.dub.co",target:"_blank",className:s("group flex max-w-fit items-center gap-2 rounded-lg border border-neutral-200 bg-white py-2 pl-2 pr-2.5 transition-colors hover:bg-neutral-50 active:bg-neutral-100",e),children:[ln("div",{className:"relative size-2",children:[Qr("div",{className:s("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,a==="Loading status..."&&"animate-none")}),Qr("div",{className:s("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),Qr("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as gr,jsxs as dn}from"react/jsx-runtime";function Gv({icon:e,title:t,description:r,learnMore:o,children:a}){return dn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[gr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:gr(e,{className:"size-6 text-neutral-800"})}),gr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&dn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&gr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as ec}from"class-variance-authority";import{useState as mn}from"react";import{toast as un}from"sonner";import{Fragment as rc,jsx as he,jsxs as to}from"react/jsx-runtime";var pn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],eo={any:{types:[]},images:{types:["image/png","image/jpeg"],errorMessage:"File type not supported (.png or .jpg only)"},csv:{types:["text/csv"],errorMessage:"File type not supported (.csv only)"},documents:{types:pn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp only)"},programResourceFiles:{types:[...pn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},tc=ec("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-neutral-50",{variants:{variant:{default:"rounded-md border border-neutral-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function rx({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,icon:i=pa,customPreview:m,accept:d="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:v=!0,content:h,maxFileSizeMB:b=0,targetResolution:g,accessibilityLabel:y="File upload",disabled:w=!1}){let[R,C]=mn(!1),[k,z]=mn(null),O=async S=>{let x="dataTransfer"in S?S.dataTransfer.files&&S.dataTransfer.files[0]:S.target.files&&S.target.files[0];if(!x)return;if(z(x.name),b>0&&x.size/1024/1024>b){un.error(`File size too big (max ${b} MB)`);return}let I=eo[d].types;if(I.length&&!I.includes(x.type)){un.error(eo[d].errorMessage??"File type not supported");return}let N=x;if(g&&x.type.startsWith("image/"))try{let P=await zo(x,g),X=await fetch(P).then(D=>D.blob());N=new File([X],x.name,{type:x.type})}catch(P){console.error("Error resizing image:",P)}if(t){let P=new FileReader;P.onload=X=>{var D;return r==null?void 0:r({src:(D=X.target)==null?void 0:D.result,file:N})},P.readAsDataURL(N);return}r==null||r({file:N})};return to("label",{className:s(tc({variant:o}),w?"cursor-not-allowed":s(p&&"cursor-pointer"),a),children:[u&&he("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:he(wt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragEnter:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragLeave:S=>{S.preventDefault(),S.stopPropagation(),C(!1)},onDrop:async S=>{S.preventDefault(),S.stopPropagation(),O(S),C(!1)}}),to("div",{className:s("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",w&&"bg-neutral-50",R&&!w&&"cursor-copy border-black bg-neutral-50 opacity-100",n?s("opacity-0",v&&!w&&"group-hover:opacity-100"):s(!w&&"group-hover:bg-neutral-50")),children:[he(i,{className:s("size-7 transition-all duration-75",w?"text-neutral-400":s("text-neutral-500 group-hover:scale-110 group-active:scale-95",R?"scale-110":"scale-100"),l)}),h!==null&&he("div",{className:s("mt-2 text-center text-sm text-neutral-500",w&&"text-neutral-400"),children:h??he(rc,{children:to("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:y})]}),n&&(m??he("img",{src:n,alt:"Preview",className:s("h-full w-full rounded-[inherit] object-cover",c)})),p&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{id:e,type:"file",accept:eo[d].types.join(","),onChange:O,disabled:w},k)})]})}import{AnimatePresence as oc,motion as fn}from"framer-motion";import{X as ac}from"lucide-react";import nc from"next/link";import{isValidElement as ic}from"react";import{Fragment as sc,jsx as Q,jsxs as Dt}from"react/jsx-runtime";function bn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return it("Escape",o,{priority:1}),Q(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Dt("div",{className:s("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[Q("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:Q(oc,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return Q(fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${c}`);let i=e.find(m=>m.key===l);return i?(i.multiple&&Array.isArray(c)?c:[c]).map(m=>{var v,h,b,g;let d=(v=i.options)==null?void 0:v.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),n=(d==null?void 0:d.icon)??((h=i.getOptionIcon)==null?void 0:h.call(i,m,{key:i.key,option:d}))??i.icon,u=(d==null?void 0:d.label)??((b=i.getOptionLabel)==null?void 0:b.call(i,m,{key:i.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((g=i.getOptionPermalink)==null?void 0:g.call(i,m))??null;return Dt(fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-neutral-200 bg-white text-sm text-black",children:[Dt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(i.icon)?i.icon:Q(i.icon,{className:"h-4 w-4"})}),i.label]}),Q("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),Q("div",{className:"flex items-center gap-2.5 px-3 py-2",children:i.options?Dt(sc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(nc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:xt(u,30)}):xt(u,30)]}):Q("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),Q("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,m),children:Q(ac,{className:"h-3.5 w-3.5"})})]},`${l}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Dt("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-neutral-500 ring-inset ring-neutral-500 transition-colors hover:border-neutral-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",Q("kbd",{className:"rounded-md border border-neutral-200 px-1.5 py-0.5 text-xs text-neutral-950 group-hover:bg-neutral-50",children:"ESC"})]})]})})}var gn=e=>ic(e);import{Command as Ae,useCommandState as lc}from"cmdk";import{ChevronDown as cc,ListFilter as dc}from"lucide-react";import{Fragment as mc,forwardRef as uc,isValidElement as vn,useCallback as br,useEffect as hr,useImperativeHandle as pc,useRef as oo,useState as ro}from"react";import{Fragment as xc,jsx as _,jsxs as ve}from"react/jsx-runtime";function xn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:i,children:m,emptyState:d,className:n}){var x,I;let{isMobile:u}=j(),p=oo(null),v=oo(),[h,b]=ro(!1);it("f",()=>b(!0),{enabled:!h});let[g,y]=ro(""),[w,R]=ro(null),C=br(()=>{y(""),R(null)},[]);hr(()=>{h||C()},[h]);let k=w?e.find(({key:N})=>N===w):null,z=br(N=>{p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),R(N),o==null||o(N)},[]),O=br(N=>{if(!k||!c)return!1;let P=c.find(({key:X})=>X===w);return(P==null?void 0:P.value)===N||P&&k.multiple&&Array.isArray(P.value)&&P.value.includes(N)},[k]),S=br(N=>{k&&(O(N)?r(k.key,N):t(k.key,N),k.multiple||b(!1))},[c,k,i]);return hr(()=>{a==null||a(g)},[g]),hr(()=>{l==null||l(w)},[w]),hr(()=>{(k==null?void 0:k.options)&&p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight})},[k==null?void 0:k.options]),_(lt,{openPopover:h,setOpenPopover:b,onEscapeKeyDown:N=>{w&&(N.preventDefault(),C())},content:_(ke,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(Ae,{loop:!0,shouldFilter:!k||k.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(gc,{placeholder:`${(k==null?void 0:k.label)||"Filter"}...`,value:g,onValueChange:y,onKeyDown:N=>{(N.key==="Escape"||N.key==="Backspace"&&!g)&&(N.preventDefault(),N.stopPropagation(),w?C():b(!1))},emptySubmit:N=>{N.preventDefault(),N.stopPropagation(),i?(t("ai",k?`${k.label} ${g}`:g),b(!1)):S(g)}}),!k&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),_(bc,{ref:p,children:ve(Ae.List,{className:s("flex w-full flex-col gap-1 p-1",k?"min-w-[100px]":"min-w-[180px]"),children:[k?((I=(x=k.options)==null?void 0:x.filter(N=>!g||!N.hideDuringSearch))==null?void 0:I.map(N=>{let P=O(N.value);return _(hn,{filter:k,option:N,right:P?_(na,{className:"h-4 w-4"}):N.right,onSelect:()=>S(N.value)},N.value)}))??_(Ae.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:_(Ne,{})})}):e.filter(N=>!N.hideInFilterDropdown).map(N=>ve(mc,{children:[_(hn,{filter:N,onSelect:()=>z(N.key)}),N.separatorAfter&&_(Ae.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},N.key)),(!k||k.options)&&_(hc,{search:g,askAI:i,children:d?fc(d)?(d==null?void 0:d[w??"default"])??"No matches":d:"No matches"})]})},w)]})}),children:ve("button",{type:"button",className:s("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[_(dc,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(cc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function fc(e){return typeof e=="object"&&e!==null&&!vn(e)}var gc=e=>{let t=lc(r=>r.filtered.count===0);return _(Ae.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},bc=uc(({children:e},t)=>{let r=oo(null);pc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=De(r);return ve(xc,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function hn({filter:e,option:t,right:r,onSelect:o}){var i,m;let{isMobile:a}=j(),l=t?t.icon??((i=e.getOptionIcon)==null?void 0:i.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ve(Ae.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:vc(l)?l:_(l,{className:"h-4 w-4"})}),xt(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var hc=({search:e,askAI:t,children:r})=>t&&e?ve(Ae.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Uo,{className:"h-4 w-4"}),ve("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ve("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Ae.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),vc=e=>vn(e);var Rx={Select:xn,List:bn};import{useMemo as yc,useState as yn}from"react";import{jsx as Ue,jsxs as vr}from"react/jsx-runtime";function Ax({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[i,m]=yn(r.defaultValue),[d,n]=yn(!1),u=yc(()=>d||!i||i===r.defaultValue,[d,i,r.defaultValue]);return vr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await c({[r.name]:i}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[vr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[vr("div",{className:"flex flex-col space-y-3",children:[Ue("h2",{className:"text-xl font-medium",children:e}),Ue("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ue("input",{...r,type:r.type||"text",required:!0,disabled:!!l,onChange:p=>m(p.target.value),className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":l})}):Ue("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),vr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?Ue("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-neutral-700 text-neutral-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Ue("div",{className:"shrink-0",children:Ue(ie,{text:a,loading:d,disabled:u,disabledTooltip:l})})]})]})}import{useId as wc}from"react";import{jsx as xr,jsxs as Nc}from"react/jsx-runtime";function Ge({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=wc();return Nc("svg",{className:s("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[xr("defs",{children:xr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:xr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),xr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Cc}from"lucide-react";import kc,{useCallback as Pc,useState as Sc}from"react";import{jsx as Ke,jsxs as ao}from"react/jsx-runtime";var Rc=kc.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=Sc(!1),c=Pc(()=>l(!a),[a,l]);return ao("div",{children:[ao("div",{className:"relative flex",children:[Ke("input",{type:a?"text":t,className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),ao("div",{className:"group",children:[r.error&&Ke("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Ke(Cc,{className:s("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ke("button",{className:s("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Ke(ha,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Ke(va,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Ke("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Rc.displayName="Input";import{flip as Dc,offset as Ec,size as Ic,useDismiss as Ac,useFloating as Oc,useInteractions as zc}from"@floating-ui/react";import{Command as Re,useCommandState as Hc}from"cmdk";import{Check as Vc,ChevronDown as _c,Search as Fc,X as Bc}from"lucide-react";import{createContext as Wc,forwardRef as Pn,useContext as lo,useEffect as no,useMemo as Nn,useRef as Cn,useState as io}from"react";import{Drawer as ct}from"vaul";import Tc from"next/image";import{useEffect as Lc,useState as wn}from"react";import{jsx as Mc}from"react/jsx-runtime";function Et(e){let[t,r]=wn(!0),[o,a]=wn(e.src);Lc(()=>a(e.src),[e.src]);let l=c=>{r(!1);let i=c.target;i.naturalWidth<=16&&i.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Mc(Tc,{...e,src:o,alt:e.alt,className:s(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as E,jsxs as se}from"react/jsx-runtime";var yr=Wc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function d2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:i,noItemsElement:m}){let{isMobile:d}=j(),n=Cn(null),[u,p]=io(!1),[v,h]=io(""),[b,g]=io(!1);no(()=>{u&&g(!1)},[u]),no(()=>g(!0),[v]),no(()=>{t&&h(t.value)},[t]);let y=Nn(()=>{let P=v.toLowerCase();return b?e.filter(X=>X.value.toLowerCase().includes(P)):v?e.sort((X,D)=>(D.value.toLowerCase().includes(P)?1:0)-(X.value.toLowerCase().includes(P)?1:0)):e},[b,v,e]),{refs:w,floatingStyles:R,context:C}=Oc({open:u,onOpenChange:p,middleware:[Ec(8),Ic({apply({elements:{floating:P},availableHeight:X}){Object.assign(P.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Dc({fallbackStrategy:"initialPlacement",padding:8})]}),k=Ac(C,{enabled:!d||!l}),{getReferenceProps:z,getFloatingProps:O}=zc([k]),S=Cn(null),{scrollProgress:x,updateScrollProgress:I}=De(S),N=Nn(()=>t&&t.icon?t.icon:t&&t.image?E(Et,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||E(Fc,{className:"size-4 text-neutral-400"}),[t,c]);return E(yr.Provider,{value:{inputAttrs:i||{},openCommandList:u,setOpenCommandList:p,inputValue:v,setInputValue:h,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?se(ct.Root,{open:u,onOpenChange:p,children:[E(ct.Trigger,{className:"sm:hidden",asChild:!0,children:E(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:E(so,{className:o,iconElement:N})})}),E(ct.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(ct.Portal,{children:[E(ct.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:P=>{P.target instanceof Element&&P.target.closest("[data-sonner-toast]")&&P.preventDefault()},children:se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(so,{className:o,iconElement:N})}),u&&se(Re.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(kn,{items:y})]})]})}),E(ct.Overlay,{})]})]}):se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E(so,{className:o,iconElement:N,ref:w.setReference,...z()}),u&&se("div",{ref:w.setFloating,style:R,...O(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[se("div",{ref:S,onScroll:I,className:"grow overflow-y-auto p-2",children:[se(Re.List,{children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(kn,{items:y})]}),E("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(x,2)}})]})]})})}var so=Pn(({iconElement:e,className:t,...r},o)=>se("label",{ref:o,className:s("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[E("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),se("div",{className:"flex h-10 grow",children:[E($c,{}),E(Uc,{})]})]})),$c=Pn((e,t)=>{let r=Hc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:i,disabled:m}=lo(yr);return E(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:i,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),l(!1)):d.key==="Enter"&&r?l(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&l(!0)},disabled:m,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function Uc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=lo(yr);return E("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(Bc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(_c,{className:s("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function kn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=lo(yr);return e.map(a=>se(Re.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[se("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&E(Et,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),E("p",{className:s("whitespace-nowrap py-0.5 text-sm",a.color&&"rounded-md px-2",a.color==="red"&&"bg-red-100 text-red-600",a.color==="yellow"&&"bg-yellow-100 text-yellow-600",a.color==="green"&&"bg-green-100 text-green-600",a.color==="blue"&&"bg-blue-100 text-blue-600",a.color==="purple"&&"bg-purple-100 text-purple-600",a.color==="brown"&&"bg-brown-100 text-brown-600"),children:a.value}),a.label&&E(or,{className:"text-xs",variant:"neutral",children:a.label})]}),E(Vc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as co from"@radix-ui/react-label";import{cva as Gc}from"class-variance-authority";import*as Sn from"react";import{jsx as Yc}from"react/jsx-runtime";var Kc=Gc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jc=Sn.forwardRef(({className:e,...t},r)=>Yc(co.Root,{ref:r,className:s(Kc(),e),...t}));jc.displayName=co.Root.displayName;import{cva as Zc}from"class-variance-authority";import{isValidElement as qc}from"react";import{jsx as Rn,jsxs as Tn}from"react/jsx-runtime";var Xc=Zc(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors cursor-pointer","whitespace-nowrap text-sm font-medium text-content-default enabled:hover:bg-bg-subtle transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function N2({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:l,...c}){return Tn(e||"button",{...e==="button"?{type:"button"}:{},className:s(Xc({variant:t}),l),...c,children:[Tn("div",{className:"flex grow items-center gap-2",children:[o&&(Jc(o)?o:Rn(o,{className:"size-4"})),r]}),a&&Rn("kbd",{className:s("bg-bg-inverted/5 group-hover:bg-bg-inverted/10 hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:block"),children:a})]})}var Jc=e=>qc(e);import{curveNatural as Ln}from"@visx/curve";import{LinearGradient as Mn}from"@visx/gradient";import{Group as Qc}from"@visx/group";import{ParentSize as ed}from"@visx/responsive";import{scaleLinear as td,scaleUtc as rd}from"@visx/scale";import{Area as od,AreaClosed as ad}from"@visx/shape";import{motion as Dn}from"framer-motion";import{useId as nd,useMemo as En}from"react";import{jsx as xe,jsxs as mo}from"react/jsx-runtime";var id={top:8,right:2,bottom:2,left:2};function E2(e){return xe(ed,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(sd,{...{width:t,height:r,...e}})})}function sd({width:e,height:t,data:r,curve:o=!0,color:a,padding:l}){let c={...id,...l},i=nd(),m=En(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:n}=En(()=>{let u=r.map(({value:g})=>g),p=Math.max(...u),v=r.map(({date:g})=>g.getTime()),h=new Date(Math.min(...v)),b=new Date(Math.max(...v));return{yScale:td({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:rd({domain:[h,b],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return mo("svg",{width:e,height:t,children:[mo("defs",{children:[xe(Mn,{id:`${i}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),xe(Mn,{id:`${i}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${i}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${i}-mask-gradient)`})})]}),mo(Qc,{left:c.left,top:c.top,children:[xe(od,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${i}-color-gradient)`})}),xe(ad,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${i}-color-gradient)`,mask:`url(#${i}-mask)`})})]})]},r.length)}import*as le from"@radix-ui/react-dialog";import*as uo from"@radix-ui/react-visually-hidden";import{useRouter as ld}from"next/navigation";import{Drawer as je}from"vaul";import{jsx as oe,jsxs as dt}from"react/jsx-runtime";function V2({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:i}){let m=ld(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=j();return n&&!l?oe(je.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...i,children:dt(je.Portal,{children:[oe(je.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),oe(je.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:dt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[dt(uo.Root,{children:[oe(je.Title,{children:"Modal"}),oe(je.Description,{children:"This is a modal"})]}),oe(cd,{}),e]})}),oe(je.Overlay,{})]})}):oe(le.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:dt(le.Portal,{children:[oe(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),dt(le.Content,{onOpenAutoFocus:u=>u.preventDefault(),onCloseAutoFocus:u=>u.preventDefault(),onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-neutral-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[dt(uo.Root,{children:[oe(le.Title,{children:"Modal"}),oe(le.Description,{children:"This is a modal"})]}),e]})]})})}function cd(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as dd,jsx as wr,jsxs as mt}from"react/jsx-runtime";var In=s("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-600","outline-none hover:bg-neutral-50 focus-visible:border-neutral-500","disabled:cursor-not-allowed disabled:border-neutral-200 disabled:text-neutral-400 disabled:bg-neutral-100");function B2({pagination:e,setPagination:t,totalCount:r,unit:o=i=>`item${i?"s":""}`,className:a,children:l,showTotalCount:c=!0}){return mt("div",{className:s("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[mt("div",{className:"flex items-center gap-2",children:[mt("div",{children:[wr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&mt(dd,{children:[mt("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",c&&"of "]}),c&&wr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),l]}),mt("div",{className:"flex items-center gap-2",children:[wr("button",{type:"button",className:In,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),wr("button",{type:"button",className:In,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as Oe from"@radix-ui/react-radio-group";import{Circle as md}from"lucide-react";import*as po from"react";import{jsx as Nr}from"react/jsx-runtime";var ud=po.forwardRef(({className:e,...t},r)=>Nr(Oe.Root,{className:s("grid gap-2",e),...t,ref:r}));ud.displayName=Oe.Root.displayName;var pd=po.forwardRef(({className:e,...t},r)=>Nr(Oe.Item,{ref:r,className:s("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Nr(Oe.Indicator,{className:"flex items-center justify-center",children:Nr(md,{className:"h-2.5 w-2.5 fill-current text-current"})})}));pd.displayName=Oe.Item.displayName;import{Drawer as ze}from"vaul";import{jsx as Ye,jsxs as vd}from"react/jsx-runtime";function fd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?ze.NestedRoot:ze.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:vd(ze.Portal,{children:[Ye(ze.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(ze.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className:s("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:Ye("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function gd({className:e,...t}){return Ye(ze.Title,{className:s("text-xl font-medium text-zinc-900",e),...t})}function bd(e){return Ye(ze.Description,{...e})}function hd(e){return Ye(ze.Close,{...e})}var Z2=Object.assign(fd,{Title:gd,Description:bd,Close:hd});import{useEffect as xd,useRef as yd,useState as wd}from"react";import{jsx as An}from"react/jsx-runtime";var Nd=`
|
|
2
|
+
import{$ as Xu,$a as _p,$b as L0,$c as wf,$d as gg,A as Du,Aa as Np,Ab as l0,Ac as Pa,Ad as Gf,B as Eu,Ba as oa,Bb as c0,Bc as Sa,Bd as Kf,C as jt,Ca as Cp,Cb as d0,Cc as J0,Cd as jf,D as Iu,Da as kp,Db as m0,Dc as Q0,Dd as Yf,E as Yt,Ea as aa,Eb as u0,Ec as ef,Ed as Zf,F as Au,Fa as Pp,Fb as ga,Fc as tf,Fd as qf,G as Ou,Ga as Sp,Gb as p0,Gc as Xt,Gd as Xf,H as zu,Ha as Rp,Hb as f0,Hc as rf,Hd as Jf,I as Hu,Ia as Tp,Ib as g0,Ic as of,Id as Qf,J as Xo,Ja as Lp,Jb as b0,Jc as af,Jd as eg,K as Jo,Ka as Mp,Kb as ba,Kc as nf,Kd as La,L as Qo,La as Dp,Lb as ha,Lc as sf,Ld as Ma,M as ea,Ma as Ep,Mb as va,Mc as lf,Md as tg,N as ta,Na as Ip,Nb as xa,Nc as cf,Nd as rg,O as Vu,Oa as Ap,Ob as h0,Oc as df,Od as og,P as _u,Pa as na,Pb as v0,Pc as mf,Pd as ag,Q as Fu,Qa as ia,Qb as x0,Qc as uf,Qd as ng,R as Bu,Ra as sa,Rb as y0,Rc as Jt,Rd as ig,S as Wu,Sa as la,Sb as w0,Sc as pf,Sd as sg,T as $u,Ta as ca,Tb as N0,Tc as ff,Td as lg,U as Uu,Ua as Op,Ub as ya,Uc as gf,Ud as cg,V as Gu,Va as zp,Vb as C0,Vc as bf,Vd as dg,W as Ku,Wa as Hp,Wb as k0,Wc as hf,Wd as mg,X as ju,Xa as da,Xb as P0,Xc as vf,Xd as ug,Y as Yu,Ya as ma,Yb as S0,Yc as xf,Yd as Nt,Z as Zu,Za as ua,Zb as R0,Zc as Ra,Zd as pg,_ as qu,_a as Vp,_b as T0,_c as yf,_d as fg,a as Wo,aa as Ju,ab as Fp,ac as M0,ad as Nf,ae as bg,b as Nu,ba as Qu,bb as Bp,bc as D0,bd as Cf,be as Da,c as et,ca as ep,cb as Wp,cc as E0,cd as kf,ce as hg,d as Ut,da as tp,db as Hr,dc as I0,dd as Pf,de as vg,e as Cu,ea as rp,eb as $p,ec as A0,ed as Sf,ee as xg,f as tt,fa as op,fb as Up,fc as O0,fd as Rf,fe as yg,g as rt,ga as ap,gb as Gp,gc as z0,gd as Qt,ge as wg,h as $o,ha as np,hb as pa,hc as wa,hd as Tf,he as Ng,i as Uo,ia as ip,ib as Kp,ic as H0,id as Lf,ie as Cg,j as ku,ja as sp,jb as jp,jc as V0,jd as Mf,k as Go,ka as lp,kb as Yp,kc as Na,kd as Df,l as Ko,la as cp,lb as Zp,lc as _0,ld as Ef,m as jo,ma as ra,mb as qp,mc as Ca,md as Vr,n as Yo,na as dp,nb as Xp,nc as F0,nd as If,o as wt,oa as mp,ob as Jp,oc as B0,od as Af,p as Pu,pa as up,pb as Qp,pc as W0,pd as Ta,q as Ne,qa as pp,qb as e0,qc as $0,qd as Of,r as Su,ra as fp,rb as t0,rc as U0,rd as zf,s as Gt,sa as gp,sb as r0,sc as G0,sd as Hf,t as Ru,ta as bp,tb as o0,tc as K0,td as Vf,u as Tu,ua as hp,ub as a0,uc as j0,ud as _f,v as Kt,va as vp,vb as fa,vc as Y0,vd as Ff,w as Lu,wa as Zt,wb as n0,wc as Z0,wd as Bf,x as Zo,xa as xp,xb as i0,xc as q0,xd as Wf,y as qo,ya as yp,yb as s0,yc as ka,yd as $f,z as Mu,za as wp,zb as qt,zc as X0,zd as Uf}from"./chunk-TJ4JURNI.mjs";import{a as j}from"./chunk-NWME2ANF.mjs";import{a as vt,b as Io,c as Or,d as xt,e as Ao,f as Oo,g as zo,h as yt,i as zr,j as Ho,k as V,l as we,m as Vo,n as fe,o as Wt,p as s,q as $t,r as _o,s as Fo,t as Bo}from"./chunk-LVO2QIFF.mjs";import*as ae from"@radix-ui/react-accordion";import{ChevronDown as wi}from"lucide-react";import*as tr from"react";import{jsx as er,jsxs as Pi}from"react/jsx-runtime";var Lg=ae.Root,Ni=tr.forwardRef(({className:e,...t},r)=>er(ae.Item,{ref:r,className:s("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ni.displayName="AccordionItem";var Ci=tr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let l=r==="chevron"?wi:Qt;return er(ae.Header,{className:"flex",children:Pi(ae.Trigger,{ref:a,className:s("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,er(l,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Ci.displayName=ae.Trigger.displayName;var ki=tr.forwardRef(({className:e,children:t,...r},o)=>er(ae.Content,{ref:o,className:s("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));ki.displayName=ae.Content.displayName;import{cva as Si}from"class-variance-authority";import*as rr from"react";import{jsx as _r}from"react/jsx-runtime";var Ri=Si("relative w-full rounded-lg border px-4 py-6 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive border-red-500 dark:border-red-500"}},defaultVariants:{variant:"default"}}),Ti=rr.forwardRef(({className:e,variant:t,...r},o)=>_r("div",{ref:o,role:"alert",className:s(Ri({variant:t}),e),...r}));Ti.displayName="Alert";var Li=rr.forwardRef(({className:e,...t},r)=>_r("h5",{ref:r,className:s("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Li.displayName="AlertTitle";var Mi=rr.forwardRef(({className:e,...t},r)=>_r("div",{ref:r,className:s("text-sm [&_p]:leading-relaxed",e),...t}));Mi.displayName="AlertDescription";import{sha256 as Di}from"js-sha256";import{useState as Ei}from"react";import{jsx as Fr}from"react/jsx-runtime";function Ii(e){if(e!=null&&e.image)return e.image;if(!(e!=null&&e.id))return"https://api.dub.co/og/avatar";let t=`https://api.dub.co/og/avatar?seed=${encodeURIComponent(e.id)}`,r=`https://api.dub.co/og/avatar${encodeURIComponent(`?seed=${encodeURIComponent(e.id)}`)}`;return e.email?`https://www.gravatar.com/avatar/${Di(e.email)}?d=${encodeURIComponent(r)}`:t}function Hg({user:e={},className:t}){if(!e)return Fr("div",{className:s("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ei(Ii(e));return Fr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:s("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar?seed=${e.id}`)}})}function Vg({id:e,className:t}){return Fr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:s("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Ai}from"class-variance-authority";import{jsx as zi}from"react/jsx-runtime";var Oi=Ai("max-w-fit rounded-full border px-2 py-px text-xs font-medium whitespace-nowrap",{variants:{variant:{default:"border-neutral-400 text-neutral-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",green:"border-green-100 bg-green-100 text-green-900",sky:"border-sky-900 bg-sky-900 text-white",black:"border-black bg-black text-white",gray:"border-neutral-200 bg-neutral-100 text-neutral-800",neutral:"border-neutral-400 text-neutral-500",amber:"border-amber-800 bg-amber-800 text-white",blueGradient:"bg-gradient-to-r from-blue-100 via-blue-100/50 to-blue-100 border border-blue-200 text-blue-900",rainbow:"bg-gradient-to-r from-violet-600 to-pink-600 text-white border-transparent"}},defaultVariants:{variant:"neutral"}});function or({className:e,variant:t,...r}){return zi("span",{className:s(Oi({variant:t}),e),...r})}import{cva as Bi}from"class-variance-authority";import{forwardRef as Wi}from"react";import*as ge from"@radix-ui/react-tooltip";import Hi from"linkify-react";import{HelpCircle as Vi}from"lucide-react";import _i from"next/link";import{useState as Fi}from"react";import{jsx as U,jsxs as ot}from"react/jsx-runtime";function Jg({children:e}){return U(ge.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,side:o="top",disableHoverableContent:a,delayDuration:l=0,...c}){let[i,m]=Fi(!1);return ot(ge.Root,{open:i,onOpenChange:m,delayDuration:l,disableHoverableContent:a,children:[U(ge.Trigger,{asChild:!0,onClick:()=>{m(!0)},onBlur:()=>{m(!1)},children:e}),U(ge.Portal,{children:U(ge.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border border-neutral-200 bg-white shadow-sm",collisionPadding:0,...c,children:typeof t=="string"?U("span",{className:s("block max-w-xs text-pretty px-4 py-2 text-center text-sm text-neutral-700",r),children:t}):typeof t=="function"?t({setOpen:m}):t})})]})}function Qg({title:e,cta:t,href:r,target:o,onClick:a}){return ot("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[U("p",{className:"text-sm text-neutral-700",children:e}),t&&(r?U(_i,{href:r,...o?{target:o}:{},className:s(ne({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ie,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function e1({title:e,cta:t,href:r}){return ot("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e," ",U("a",{href:r,target:"_blank",rel:"noopener noreferrer",onClick:o=>o.stopPropagation(),className:"inline-flex text-neutral-500 underline underline-offset-4 hover:text-neutral-800",children:t})]})}function t1({children:e,className:t,tooltipClassName:r}){return U("div",{className:s("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(Hi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:s("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function r1(e){return U(J,{...e,children:U(Vi,{className:"h-4 w-4 text-neutral-500"})})}function o1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:ot("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[ot("p",{className:"text-sm font-semibold text-neutral-700",children:[r,$t(e||0,{full:!0})," ",t]}),a&&ot("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Oo(a,{withAgo:!0})]})]}),children:o})}function a1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(or,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function n1({children:e,tooltipProps:t,...r}){return U(J,{...t,children:U("button",{type:"button",...r,className:s("flex h-6 w-6 items-center justify-center rounded-md text-neutral-500 transition-colors duration-75 hover:bg-neutral-100 active:bg-neutral-200 disabled:cursor-not-allowed disabled:hover:bg-transparent",r.className),children:e})})}function ar({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as at,jsxs as Ea}from"react/jsx-runtime";var ne=Bi("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:s("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ie=Wi(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:l,icon:c,shortcut:i,disabledTooltip:m,right:d,...n},u)=>m?at(J,{content:m,children:Ea("div",{className:s("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[c,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("kbd",{className:s("hidden rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-400 md:inline-block",{"bg-neutral-100":t==null?void 0:t.endsWith("outline")},a),children:i})]})}):Ea("button",{ref:u,type:n.onClick?"button":"submit",className:s("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||l?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ne({variant:t}),r),disabled:n.disabled||l,...n,children:[l?at(Ne,{}):c||null,e&&at("div",{className:s("min-w-0 truncate",i&&"flex-1 text-left",o),children:e}),i&&at("kbd",{className:s("hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:inline-block",{"bg-neutral-700 text-neutral-400 group-hover:bg-neutral-600 group-hover:text-neutral-300":t==="primary","bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":t==="secondary","bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":t==="outline","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:i}),d]}));ie.displayName="Button";import{cva as $i}from"class-variance-authority";import{createContext as Ui}from"react";import{jsx as Ia}from"react/jsx-runtime";var Gi=$i("group/card-list w-full flex flex-col transition-[gap,opacity] min-w-0",{variants:{variant:{compact:"gap-0",loose:"gap-4"},loading:{true:"opacity-50"}}}),Ct=Ui({variant:"loose",loading:!1});function Aa({variant:e="loose",loading:t=!1,className:r,children:o}){return Ia("ul",{className:s(Gi({variant:e,loading:t}),r),"data-variant":e,children:Ia(Ct.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as Ki}from"class-variance-authority";import{createContext as ji,useContext as Yi,useEffect as Zi,useRef as qi,useState as Xi}from"react";import{jsx as Oa,jsxs as es}from"react/jsx-runtime";var Ji=Ki("w-full group/card border-neutral-200 bg-white",{variants:{variant:{compact:"first-of-type:rounded-t-xl last-of-type:rounded-b-xl first-of-type:border-t border-b border-x data-[hover-state-enabled=true]:hover:bg-neutral-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),Qi="w-full py-2.5 px-4",Br=ji({hovered:!1});function za({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:l=!0,banner:c}){let{variant:i}=Yi(Ct),m=qi(null),[d,n]=Xi(!1);Zi(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var v;((v=m.current)==null?void 0:v.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||yt(p));return es("li",{ref:m,className:s(Ji({variant:i}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":l,children:[c,Oa("div",{className:s(Qi,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Oa(Br.Provider,{value:{hovered:d},children:r})})]})}var L1=Object.assign(Aa,{Card:Object.assign(za,{Context:Br}),Context:Ct});import ts from"embla-carousel-autoplay";import rs from"embla-carousel-react";import{ArrowLeft as os,ArrowRight as as}from"lucide-react";import{createContext as ns,forwardRef as Pt,useCallback as kt,useContext as is,useEffect as Wr,useState as $r}from"react";import{jsx as Ce,jsxs as _a}from"react/jsx-runtime";var Ur=2e3,Ha=ns(null);function be(){let e=is(Ha);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Va(){let{api:e}=be(),[t,r]=$r(0),o=kt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Wr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var ss=Pt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:l,children:c,...i},m)=>{let[d,n]=rs({...t,axis:e==="horizontal"?"x":"y"},[...o?[ts(typeof o=="object"?o:{delay:Ur})]:[],...a||[]]),[u,p]=$r(!1),[v,h]=$r(!1),b=kt(R=>{!R||(p(R.canScrollPrev()),h(R.canScrollNext()))},[]),g=kt(()=>{n==null||n.scrollPrev()},[n]),y=kt(()=>{n==null||n.scrollNext()},[n]),w=kt(R=>{R.key==="ArrowLeft"?(R.preventDefault(),g()):R.key==="ArrowRight"&&(R.preventDefault(),y())},[g,y]);return Wr(()=>{!n||!r||r(n)},[n,r]),Wr(()=>{if(!!n)return b(n),n.on("reInit",b),n.on("select",b),()=>{n==null||n.off("select",b)}},[n,b]),Ce(Ha.Provider,{value:{carouselRef:d,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:g,scrollNext:y,canScrollPrev:u,canScrollNext:v},children:Ce("div",{ref:m,onKeyDownCapture:w,className:s("relative",l),role:"region","aria-roledescription":"carousel",...i,children:c})})});ss.displayName="Carousel";var ls=Pt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:s("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ls.displayName="CarouselContent";var cs=Pt(({className:e,...t},r)=>{let{orientation:o}=be();return Ce("div",{ref:r,role:"group","aria-roledescription":"slide",className:s("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});cs.displayName="CarouselItem";var ds=Pt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:l}=be();return _a("button",{ref:r,className:s("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(os,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});ds.displayName="CarouselPrevious";var ms=Pt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:l}=be();return _a("button",{ref:r,className:s("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",ne({variant:"secondary",className:"p-2"}),e),disabled:!l,onClick:a,...t,children:[Ce(as,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});ms.displayName="CarouselNext";import{cva as us}from"class-variance-authority";import{motion as ps}from"framer-motion";import{ChevronLeft as fs,ChevronRight as gs}from"lucide-react";import*as Me from"react";import{jsx as We,jsxs as St}from"react/jsx-runtime";var bs=us("flex items-center justify-center gap-3 sm:gap-6",{variants:{variant:{simple:"relative",floating:"absolute bottom-4 left-1/2 -translate-x-1/2 rounded-full border border-neutral-800/10 bg-white sm:bottom-6 "}}}),j1=({variant:e="simple",className:t})=>{var h;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:l,api:c}=be(),i=(h=c==null?void 0:c.plugins())==null?void 0:h.autoplay,[m,d]=Me.useState(0),[n,u]=Me.useState(!1),p=Me.useCallback(b=>{d((b==null?void 0:b.selectedScrollSnap())??0)},[]),v=Me.useCallback(b=>()=>{i&&i.isPlaying()&&i.stop(),b()},[i]);return Me.useEffect(()=>{!c||(p(c),u((i==null?void 0:i.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,i,p]),St("div",{className:s(bs({variant:e}),t),children:[e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!l,onClick:v(o),children:[We(fs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&We("div",{className:"flex items-center gap-1",children:c.slideNodes().map((b,g)=>St("button",{onClick:v(()=>c.scrollTo(g)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[We("div",{className:s("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",g===m?"bg-black":"bg-black/20",n&&g===m&&"w-6 bg-black/20"),children:n&&g===m&&We(ps.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((i==null?void 0:i.options.delay)??Ur)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),St("span",{className:"sr-only",children:["Slide ",g+1]})]},g))}),e!=="simple"&&St("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:v(r),children:[We(gs,{className:"h-4 w-4"}),We("span",{className:"sr-only",children:"Next slide"})]})]})};import hs from"embla-carousel-react";import{forwardRef as vs,useCallback as xs,useEffect as ys}from"react";import{jsx as nr}from"react/jsx-runtime";var rb=({className:e,...t})=>{let{api:r}=be(),[o,a]=hs({dragFree:!0}),l=xs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return ys(()=>{if(!(!r||!a))return l(r),r.on("reInit",l),r.on("select",l),()=>{r==null||r.off("reInit",l),r==null||r.off("select",l)}},[r,a,l]),nr("div",{className:"overflow-hidden",ref:o,children:nr("div",{className:s("mx-4 flex gap-4",e),...t})})},ob=vs(({index:e,className:t,...r},o)=>{let{api:a}=be(),l=Va();return nr("div",{ref:o,children:nr("button",{type:"button",onClick:()=>{var i;if(!a)return;let c=(i=a.plugins())==null?void 0:i.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===l}):t,...r})})});import*as Rt from"@radix-ui/react-checkbox";import{Check as ws}from"lucide-react";import*as Fa from"react";import{jsx as Gr}from"react/jsx-runtime";var Ns=Fa.forwardRef(({className:e,...t},r)=>Gr(Rt.Root,{ref:r,className:s("peer h-5 w-5 shrink-0 rounded-md border border-neutral-200 bg-white outline-none focus-visible:border-black disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-500",e),...t,children:Gr(Rt.Indicator,{className:"flex items-center justify-center",children:Gr(ws,{className:"h-3 w-3 text-white"})})}));Ns.displayName=Rt.Root.displayName;import{Command as Lt,CommandInput as pl,CommandItem as fl,useCommandState as gl}from"cmdk";import{ChevronDown as bl}from"lucide-react";import{forwardRef as hl,isValidElement as vl,useCallback as xl,useEffect as cr,useRef as yl,useState as Tt}from"react";import{motion as dl}from"framer-motion";import{forwardRef as ml,useRef as ul}from"react";import Kr from"js-cookie";import{useEffect as Cs,useState as ks}from"react";function db(e,t,r){let[o,a]=ks(()=>{let c=Kr.get(e);return c?JSON.parse(c):t});return Cs(()=>{let c=()=>{let i=Kr.get(e);i&&a(JSON.parse(i))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),Kr.set(e,JSON.stringify(c),r)}]}import{useCallback as Ps,useEffect as Ss,useRef as Rs,useState as Ts}from"react";var nt=(e=3e3)=>{let t=Rs(null),[r,o]=Ts(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},l=Ps(async(c,{onSuccess:i,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),i==null||i(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(d){if(console.error("Failed to copy: ",d),m)throw d}},[e]);return Ss(()=>()=>a(),[]),[r,l]};import{useEffect as Ls,useState as Ms}from"react";function gb(){let[e,t]=Ms(null);return Ls(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(i=>{var u,p,v;let m=i[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let h=1;h<i.length;h++){let b=i[h];if(!b)break;(b.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=b)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=l.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>d;)n=(v=l.get(n))==null?void 0:v.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),l=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(i=>a.observe(i)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Ds}from"react";function xb(e){return{handleKeyDown:Ds(r=>{if(r.key==="Enter"&&r.metaKey){if(r.preventDefault(),e!=null&&e.current){e.current.requestSubmit();return}let o=r.target.form;o==null||o.requestSubmit()}},[])}}import{useEffect as Es,useState as Is}from"react";function Cb(e,t={}){let{root:r,defaultValue:o}=t,[a,l]=Is(o??!1);return Es(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,n=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};l(n.top<u.bottom&&n.bottom>u.top&&n.left<u.right&&n.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let i=null;return e.current&&(i=new IntersectionObserver(c),i.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),i==null||i.disconnect()}},[e,r]),a}import{useEffect as As,useState as Os}from"react";function Sb(){let[e,t]=Os(!1);return As(()=>{let r=()=>{let o=document.activeElement;t((o==null?void 0:o.tagName)!=null&&["INPUT","TEXTAREA"].includes(o.tagName))};return window.addEventListener("focusin",r),window.addEventListener("focusout",r),()=>{window.removeEventListener("focusin",r),window.removeEventListener("focusout",r)}},[]),e}import{useEffect as zs,useState as Hs}from"react";function Mb(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[l,c]=Hs(),i=(l==null?void 0:l.isIntersecting)&&a,m=([d])=>{c(d)};return zs(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||i||!d)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(d),()=>p.disconnect()},[e,JSON.stringify(t),r,o,i]),l}import{createContext as Vs,useCallback as _s,useContext as Fs,useEffect as Ba,useId as Bs,useState as Ws}from"react";import{jsx as $s}from"react/jsx-runtime";var Wa=Vs({listeners:[],setListeners:()=>{}});function zb({children:e}){let[t,r]=Ws([]);return $s(Wa.Provider,{value:{listeners:t,setListeners:r},children:e})}function it(e,t,r={}){let o=Bs(),{listeners:a,setListeners:l}=Fs(Wa),c=_s(i=>{if(r.enabled===!1)return;let m=i.target,d=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!n!=!!r.sheet)return;let u=[...i.metaKey?["meta"]:[],...i.ctrlKey?["ctrl"]:[],...i.altKey?["alt"]:[],i.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(h=>h.enabled!==!1&&!!d==!!h.modal&&!!n==!!h.sheet&&(Array.isArray(h.key)?h.key.includes(u):h.key===u));!p.length||Ao(p,(h,b)=>(b.priority??0)-(h.priority??0))[0].id!==o||(i.preventDefault(),t(i))},[e,a,o,t,r.enabled,r.modal,r.sheet]);Ba(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),Ba(()=>(l(i=>[...i.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>l(i=>i.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as Us,useState as Gs}from"react";function $a(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function _b(e,t){let[r,o]=Gs($a(e)??t);return Us(()=>{let l=$a(e);l&&o(l)},[e]),[r,l=>{o(l),window.localStorage.setItem(e,JSON.stringify(l))}]}import{toast as Ks}from"sonner";import js from"swr";function Ub(e,t){let{data:r,isLoading:o,mutate:a}=js(e,fe);return{data:r,isLoading:o,update:async(l,c)=>Ks.promise(a(l(r),{optimisticData:c,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as ja,useMemo as Qs}from"react";import{useEffect as Ua,useState as Ys}from"react";function Ga({pageSize:e,page:t,onPageChange:r}){let[o,a]=Ys({pageIndex:t,pageSize:e});return Ua(()=>{a(l=>({...l,pageIndex:t}))},[t]),Ua(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Zs,useRouter as qs,useSearchParams as Xs}from"next/navigation";import{useCallback as Js}from"react";function Ka(){let e=Zs(),t=qs(),r=Xs(),o=Object.fromEntries(r),a=(c,i)=>{let m=new URLSearchParams(r);if((i==null?void 0:i.include)&&Array.isArray(i.include)){let n=new URLSearchParams;r.forEach((u,p)=>{var v;(v=i.include)!=null&&v.includes(p)&&n.set(p,u)}),m=n}(i==null?void 0:i.exclude)&&Array.isArray(i.exclude)&&i.exclude.forEach(n=>m.delete(n)),c&&Object.entries(c).forEach(([n,u])=>m.set(n,u));let d=m.toString();return d.length>0?`?${d}`:""},l=Js(({set:c,del:i,replace:m,scroll:d=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([b,g])=>p.set(b,Array.isArray(g)?g.join(u):g)),i&&(Array.isArray(i)?i.forEach(b=>p.delete(b)):p.delete(i));let v=p.toString(),h=`${e}${v.length>0?`?${v}`:""}`;if(n)return h;m?t.replace(h,{scroll:!1}):t.push(h,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:l,getQueryString:a}}function rh(e=Fo){let{searchParams:t,queryParams:r}=Ka(),o=Qs(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:l}=Ga({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return ja(()=>{let c=parseInt(t.get("page")||"1")||1;l(i=>({...i,pageIndex:c}))},[t.get("page")]),ja(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:l}}import{useEffect as el}from"react";function nh(){el(()=>{let e=new URL(window.location.href);e.searchParams.has("_gl")&&setTimeout(()=>{e.searchParams.delete("_gl"),window.history.replaceState({},"",e.toString())},2e3)},[])}import{useEffect as tl,useState as rl}from"react";function ir(e){let[t,r]=rl(),o=([a])=>{r(a)};return tl(()=>{let a=e==null?void 0:e.current;if(!a)return;let l=new ResizeObserver(o);return l.observe(a),()=>l.disconnect()},[e]),t}import{useCallback as ol,useEffect as Ya,useState as al}from"react";function Za(e,{container:t}={}){let[r,o]=al(!1),a=ol(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return Ya(()=>{let l=(t==null?void 0:t.current)??window;return l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)},[a]),Ya(()=>{a()},[a]),r}import{useCallback as nl,useEffect as il,useState as sl}from"react";function De(e){let[t,r]=sl(1),o=nl(()=>{if(!e.current)return;let{scrollTop:l,scrollHeight:c,clientHeight:i}=e.current;r(c===i?1:Math.min(l/(c-i),1))},[]),a=ir(e);return il(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as ll}from"react";import{toast as Xa}from"sonner";import{jsx as sr,jsxs as qa}from"react/jsx-runtime";function cl({id:e,message:t,undo:r}){let o=()=>{r(),Xa.dismiss(e)},a=l=>{l.key==="z"&&(l.ctrlKey||l.metaKey)&&o()};return ll(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),qa("div",{className:"flex w-full items-center justify-between space-x-2",children:[qa("div",{className:"flex items-center space-x-2",children:[sr(jo,{}),sr("p",{className:"font-medium",children:t})]}),sr("button",{className:"whitespace-nowrap rounded border border-black bg-black px-2 py-1 text-xs font-normal text-white transition-all duration-75 active:scale-95",onClick:o,children:"Undo"})]})}function yh(){return({id:t,message:r,undo:o,duration:a})=>Xa(sr(cl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as Ja}from"react/jsx-runtime";var ke=ml(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...l},c)=>{var d,n;let i=ul(null),m=ir(i);return Ja(dl.div,{ref:c,className:s("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((n=m==null?void 0:m.contentRect)==null?void 0:n.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...l,children:Ja("div",{ref:i,className:s(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Ee from"@radix-ui/react-popover";import{Drawer as st}from"vaul";import{jsx as Pe,jsxs as lr}from"react/jsx-runtime";function lt({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:l,mobileOnly:c,popoverContentClassName:i,onOpenAutoFocus:m,collisionBoundary:d,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:v}=j();return c||v?lr(st.Root,{open:a,onOpenChange:l,children:[Pe(st.Trigger,{className:"sm:hidden",asChild:!0,children:e}),lr(st.Portal,{children:[Pe(st.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),lr(st.Content,{className:"border-border-subtle bg-bg-default fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t",onEscapeKeyDown:u,onPointerDownOutside:h=>{h.target instanceof Element&&h.target.closest("[data-sonner-toast]")&&h.preventDefault()},children:[Pe("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Pe("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Pe("div",{className:"bg-bg-default flex min-h-[150px] w-full items-center justify-center overflow-hidden pb-8 align-middle shadow-xl",children:t})]}),Pe(st.Overlay,{})]})]}):lr(Ee.Root,{open:a,onOpenChange:l,children:[Pe(Ee.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Ee.Portal,{children:Pe(Ee.Content,{sideOffset:8,align:r,side:o,className:s("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",i),sticky:n,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as dr,jsx as L,jsxs as Se}from"react/jsx-runtime";function wl(e,t){return e===!0}function Zh({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:l="Select...",searchPlaceholder:c="Search...",emptyState:i,createLabel:m,onCreate:d,buttonProps:n,shortcutHint:u,caret:p,side:v,open:h,onOpenChange:b,onSearchChange:g,shouldFilter:y=!0,inputRight:w,inputClassName:R,optionRight:C,optionClassName:k,matchTriggerWidth:z,hideSearch:O=!1,children:S}){let x=wl(e,r),I=Array.isArray(t)?t:t?[t]:[],{isMobile:N}=j(),[P,X]=Tt(!1),D=h??P,me=b??X,[$,Er]=Tt(""),[Mo,Ir]=Tt(!1),[Ar,vi]=Tt(void 0),[xi,Do]=Tt(!1),yi=H=>{var Qe;if(x){let Fe=I.some(({value:Be})=>Be===H.value);r(Fe?I.filter(({value:Be})=>Be!==H.value):[...I,H])}else r(I.length&&((Qe=I[0])==null?void 0:Qe.value)===H.value?null:H),me(!1)},Eo=xl((H,Qe)=>Qe===""?[...H.filter(Fe=>Fe.first&&!I.some(Be=>Be.value===Fe.value)),...I,...H.filter(Fe=>!Fe.first&&!I.some(Be=>Be.value===Fe.value))]:H,[I]);return cr(()=>{Mo&&(vi(o&&Eo(o,$)),Ir(!1))},[Mo,o,Eo,$]),cr(()=>{Ir(!0)},[o]),cr(()=>{D||(Er(""),Ir(!0))},[D]),cr(()=>g==null?void 0:g($),[$]),L(lt,{openPopover:D,setOpenPopover:me,align:"start",side:v,onWheel:H=>{H.stopPropagation()},popoverContentClassName:s(z&&"sm:w-[var(--radix-popover-trigger-width)]"),content:L(ke,{width:!N&&!z,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(Lt,{loop:!0,shouldFilter:y,children:[!O&&Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[L(pl,{placeholder:c,value:$,onValueChange:Er,className:s("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",R),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!$)&&(H.preventDefault(),H.stopPropagation(),me(!1))}}),w&&L("div",{className:"mr-2",children:w}),u&&L("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:u})]}),L(Nl,{children:L(Lt.List,{className:s("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Ar!==void 0?Se(dr,{children:[Ar.map(H=>L(Cl,{option:H,multiple:x,selected:I.some(({value:Qe})=>Qe===H.value),onSelect:()=>yi(H),right:C==null?void 0:C(H),className:k},`${H.label}, ${H.value}`)),$.length>0&&d&&Se(fl,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm text-neutral-700","data-[selected=true]:bg-neutral-100",k),onSelect:async()=>{Do(!0),await(d==null?void 0:d($))&&(Er(""),me(!1)),Do(!1)},children:[xi?L(Ne,{className:"size-4 shrink-0"}):L(Qt,{className:"size-4 shrink-0"}),L("div",{className:"grow truncate",children:(m==null?void 0:m($))||`Create "${$}"`})]}),y?L(Pl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):Ar.length===0?L("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:i||"No matches"}):null]}):L(Lt.Loading,{children:L("div",{className:"flex h-12 items-center justify-center",children:L(Ne,{})})})})})]})}),children:L(ie,{variant:"secondary",...n,className:s(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:s(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(dr,{children:[L("div",{className:"min-w-0 grow truncate text-left",children:S||I.map(H=>H.label).join(", ")||l}),p&&(p===!0?L(bl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?Qa(a)?a:L(a,{className:"size-4 shrink-0"}):void 0})})}var Nl=({children:e})=>{let t=yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return Se(dr,{children:[L("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),L("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})};function Cl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:l}){return Se(dr,{children:[L(kl,{disabledTooltip:e.disabledTooltip,children:Se(Lt.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(e.disabledTooltip)&&"cursor-not-allowed opacity-50",l),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&L("div",{className:"shrink-0 text-neutral-600",children:o?L(sa,{className:"size-4 text-neutral-600"}):L(la,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&L("span",{className:"shrink-0 text-neutral-600",children:Qa(e.icon)?e.icon:L(e.icon,{className:"h-4 w-4"})}),L("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&L(ia,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&L(Lt.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var kl=({children:e,disabledTooltip:t})=>t?L(J,{content:t,children:L("div",{children:e})}):e,Qa=e=>vl(e),Pl=hl((e,t)=>gl(o=>o.filtered.count===0)?L("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as mr,format as Sl,isSameMonth as Rl}from"date-fns";import{ChevronLeft as en,ChevronRight as tn,ChevronsLeft as Tl,ChevronsRight as Ll}from"lucide-react";import{forwardRef as Ml,useRef as Dl}from"react";import{DayPicker as El,useDayPicker as Il,useDayRender as Al,useNavigation as Ol}from"react-day-picker";import{Fragment as zl,jsx as te,jsxs as ur}from"react/jsx-runtime";var Mt=Ml(({onClick:e,icon:t,disabled:r,...o},a)=>te("button",{ref:a,type:"button",disabled:r,className:s("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:te(t,{className:"h-full w-full shrink-0"})}));Mt.displayName="NavigationButton";function rn({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:l,className:c,classNames:i,...m}){return te(El,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:l,showOutsideDays:r===1,className:c,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:s("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...i},components:{IconLeft:()=>te(en,{className:"h-4 w-4"}),IconRight:()=>te(tn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:v,displayMonths:h}=Ol(),{numberOfMonths:b,fromDate:g,toDate:y}=Il(),w=h.findIndex(x=>Rl(d.displayMonth,x)),R=w===0,C=w===h.length-1,k=b>1&&(R||!C),z=b>1&&(C||!R),O=()=>{let x=mr(v,-1);p&&(!g||x.getTime()>=g.getTime())&&n(x)},S=()=>{let x=mr(v,1);u&&(!y||x.getTime()<=y.getTime())&&n(x)};return ur("div",{className:"flex items-center justify-between",children:[ur("div",{className:"flex items-center gap-1",children:[o&&!z&&te(Mt,{disabled:a||!p||g&&mr(v,-1).getTime()<g.getTime(),"aria-label":"Go to previous year",onClick:O,icon:Tl}),!z&&te(Mt,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:en})]}),te("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Sl(d.displayMonth,"LLLL yyy",{locale:l})}),ur("div",{className:"flex items-center gap-1",children:[!k&&te(Mt,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:tn}),o&&!k&&te(Mt,{disabled:a||!u||y&&mr(v,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:S,icon:Ll})]})]})},Day:({date:d,displayMonth:n})=>{let u=Dl(null),{activeModifiers:p,buttonProps:v,divProps:h,isButton:b,isHidden:g}=Al(d,n,u),{selected:y,today:w,disabled:R,range_middle:C}=p;if(g)return te(zl,{});if(!b)return te("div",{...h,className:s("flex items-center justify-center",h.className)});let{children:k,...z}=v;return ur("button",{ref:u,...z,type:"button",children:[k,w&&te("span",{className:s("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!y,"!bg-white":y,"!bg-blue-400":y&&C,"text-neutral-400":R})})]})}},...m})}import{enUS as jl}from"date-fns/locale";import{useEffect as Jr,useMemo as an,useRef as Yl,useState as fr}from"react";import{Command as jr}from"cmdk";import{Lock as Hl}from"lucide-react";import{jsx as $e,jsxs as Vl}from"react/jsx-runtime";var Yr=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,l=d=>"date"in d,c=(d,n)=>d.getDate()===n.getDate()&&d.getMonth()===n.getMonth()&&d.getFullYear()===n.getFullYear(),i=(d,n)=>{let u=d.from,p=n.from,v=!1;u&&p&&c(u,p)&&(v=!0);let h=d.to,b=n.to,g=!1;return h&&b&&c(h,b)&&(g=!0),v&&g},m=d=>{if(o)return o===d.id;if(a(d)){let n=r;return n&&i(n,d.dateRange)}else if(l(d)){let n=r;return n&&c(n,d.date)}return!1};return $e(jr,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:$e(jr.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,n)=>Vl(jr.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.id,className:s("group relative flex cursor-pointer items-center justify-between overflow-hidden text-ellipsis whitespace-nowrap rounded border border-neutral-200","px-2.5 py-1.5 text-left text-sm text-neutral-700 shadow-sm outline-none sm:w-full sm:border-none sm:py-2 sm:shadow-none","disabled:pointer-events-none disabled:opacity-50","sm:data-[selected=true]:bg-neutral-100",m(d)&&"font-semibold text-neutral-800"),children:[$e("span",{children:d.label}),d.requiresUpgrade?$e(Hl,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?$e("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&$e(J,{side:"bottom",content:d.tooltipContent,children:$e("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};Yr.displayName="DatePicker.Presets";import{format as Ie}from"date-fns";import{createContext as _l}from"react";var Zr=_l({isOpen:!1,setIsOpen:()=>{}}),Fl=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},qr=(e,t,r=!1)=>{let o=!Fl(),a;return r?a=o?Ie(e,"d MMM, yyyy h:mm a",{locale:t}):Ie(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ie(e,"d MMM, yyyy",{locale:t}),a},on=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:l,fromDay:c,toDay:i}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(n=>{var u,p,v,h,b,g;if("date"in n){let y=n.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&y>r)throw new Error(`Preset ${n.label} is after toYear ${d}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(l&&n.date.getMonth()>l.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${l}.`);if(c&&n.date.getDate()<c.getDate())throw new Error(`Preset ${n.label} is before fromDay ${c}.`);if(i&&n.date.getDate()>i.getDate())throw new Error(`Preset ${n.label} is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}if("dateRange"in n){let y=(u=n.dateRange.from)==null?void 0:u.getFullYear(),w=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(w&&r&&w>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${d}.`);if(a){let R=(v=n.dateRange.from)==null?void 0:v.getMonth();if(R&&R<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Ie(a,"MMM, yyyy")}.`)}if(l){let R=(h=n.dateRange.to)==null?void 0:h.getMonth();if(R&&R>l.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Ie(l,"MMM, yyyy")}.`)}if(c){let R=(b=n.dateRange.from)==null?void 0:b.getDate();if(R&&R<c.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Ie(c,"MMM dd, yyyy")}.`)}if(i){let R=(g=n.dateRange.to)==null?void 0:g.getDate();if(R&&R>i.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Ie(i,"MMM dd, yyyy")}.`)}}})}};import{cva as Bl}from"class-variance-authority";import{Calendar as Wl,ChevronDown as $l}from"lucide-react";import{forwardRef as Ul}from"react";import{jsx as pr,jsxs as Kl}from"react/jsx-runtime";var Gl=Bl(["group peer flex cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 h-10 outline-none transition-all text-sm","bg-white border-neutral-200 text-neutral-900 placeholder-neutral-400 transition-all","disabled:pointer-events-none disabled:bg-neutral-100 disabled:text-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200"],{variants:{hasError:{true:"ring-2 ring-red-200 border-red-500"}}}),Xr=Ul(({className:e,children:t,placeholder:r,hasError:o,...a},l)=>Kl("button",{ref:l,className:s(Gl({hasError:o}),e),...a,children:[pr(Wl,{className:s("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),pr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?pr("span",{className:"text-neutral-400",children:r}):null)}),pr($l,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Xr.displayName="DatePicker.Trigger";import{jsx as re,jsxs as nn}from"react/jsx-runtime";var Zl=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:l,disableNavigation:c,disabledDays:i,showYearNavigation:m=!1,locale:d=jl,placeholder:n="Select date range",hasError:u,align:p="center",className:v,...h})=>{let{isDesktop:b}=j(),[g,y]=fr(!1),[w,R]=fr(a&&r?a==null?void 0:a.find(({id:D})=>D===r):void 0),[C,k]=fr((w==null?void 0:w.dateRange)??e??t??void 0),[z,O]=fr(C==null?void 0:C.to),S=an(()=>C,[g]);Jr(()=>{k(e)},[e]),Jr(()=>{let D=a==null?void 0:a.find(({id:me})=>me===r);R(D),k((D==null?void 0:D.dateRange)??e??t)},[a,r]),Jr(()=>{g?C&&O(C.to):O(C==null?void 0:C.to)},[g]);let x=(D,me)=>{let $=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:me}:D;k($),R(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),y(!1))},I=D=>{k(D.dateRange),R(D),o==null||o(D.dateRange,D),y(!1)},N=()=>{k(S),y(!1)},P=D=>{D||N(),y(D)},X=an(()=>C?`${C.from?qr(C.from,d):""} - ${C.to?qr(C.to,d):""}`:null,[C,d]);return it((a==null?void 0:a.filter(D=>D.shortcut).map(D=>D.shortcut))??[],D=>{let me=a==null?void 0:a.find($=>$.shortcut===D.key);me&&I(me)}),re(Zr.Provider,{value:{isOpen:g,setIsOpen:y},children:re(lt,{align:p,openPopover:g,setOpenPopover:P,popoverContentClassName:"rounded-xl",content:re("div",{className:"flex w-full",children:nn("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&re(ql,{children:re("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:re("div",{className:"sm:py-3",children:re(Yr,{currentPresetId:r,currentValue:C,presets:a,onSelect:I})})})}),re("div",{className:"scrollbar-hide overflow-x-scroll",children:re(rn,{mode:"range",selected:C,onSelect:x,month:z,onMonthChange:O,numberOfMonths:b?2:1,disabled:i,disableNavigation:c,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...h})})]})}),children:re(Xr,{placeholder:n,disabled:l,className:v,hasError:u,"aria-required":h.required||h["aria-required"],"aria-invalid":h["aria-invalid"],"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],children:(w==null?void 0:w.label)??X})})})};function Iv({presets:e,...t}){return e&&on(e,t),re(Zl,{presets:e,...t})}function ql({children:e}){let t=Yl(null),{scrollProgress:r,updateScrollProgress:o}=De(t);return nn("div",{className:"relative sm:h-full",children:[re("div",{ref:t,onScroll:o,className:s("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),re("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})}import Xl from"next/link";import{useEffect as Jl,useState as sn}from"react";import Ql from"swr";import{jsx as Qr,jsxs as ln}from"react/jsx-runtime";function cn({className:e}){let{data:t}=Ql("https://status.dub.co/api/v1/summary",fe),[r,o]=sn("bg-neutral-200"),[a,l]=sn("Loading status...");return Jl(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:i,name:m}=c[0],d=i==="degraded_performance"?"bg-yellow-500":"bg-red-500";l(m),o(d)}else l("All systems operational"),o("bg-green-500")},[t]),ln(Xl,{href:"https://status.dub.co",target:"_blank",className:s("group flex max-w-fit items-center gap-2 rounded-lg border border-neutral-200 bg-white py-2 pl-2 pr-2.5 transition-colors hover:bg-neutral-50 active:bg-neutral-100",e),children:[ln("div",{className:"relative size-2",children:[Qr("div",{className:s("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,a==="Loading status..."&&"animate-none")}),Qr("div",{className:s("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),Qr("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as gr,jsxs as dn}from"react/jsx-runtime";function Gv({icon:e,title:t,description:r,learnMore:o,children:a}){return dn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[gr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:gr(e,{className:"size-6 text-neutral-800"})}),gr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&dn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&gr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as ec}from"class-variance-authority";import{useState as mn}from"react";import{toast as un}from"sonner";import{Fragment as rc,jsx as he,jsxs as to}from"react/jsx-runtime";var pn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],eo={any:{types:[]},images:{types:["image/png","image/jpeg"],errorMessage:"File type not supported (.png or .jpg only)"},csv:{types:["text/csv"],errorMessage:"File type not supported (.csv only)"},documents:{types:pn,errorMessage:"File type not supported (document files only)"},programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp"],errorMessage:"File type not supported (.svg, .png, .jpg, or .webp only)"},programResourceFiles:{types:[...pn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},tc=ec("group relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden bg-white transition-all hover:bg-neutral-50",{variants:{variant:{default:"rounded-md border border-neutral-300 shadow-sm",plain:""}},defaultVariants:{variant:"default"}});function rx({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:l,previewClassName:c,icon:i=pa,customPreview:m,accept:d="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:v=!0,content:h,maxFileSizeMB:b=0,targetResolution:g,accessibilityLabel:y="File upload",disabled:w=!1}){let[R,C]=mn(!1),[k,z]=mn(null),O=async S=>{let x="dataTransfer"in S?S.dataTransfer.files&&S.dataTransfer.files[0]:S.target.files&&S.target.files[0];if(!x)return;if(z(x.name),b>0&&x.size/1024/1024>b){un.error(`File size too big (max ${b} MB)`);return}let I=eo[d].types;if(I.length&&!I.includes(x.type)){un.error(eo[d].errorMessage??"File type not supported");return}let N=x;if(g&&x.type.startsWith("image/"))try{let P=await zo(x,g),X=await fetch(P).then(D=>D.blob());N=new File([X],x.name,{type:x.type})}catch(P){console.error("Error resizing image:",P)}if(t){let P=new FileReader;P.onload=X=>{var D;return r==null?void 0:r({src:(D=X.target)==null?void 0:D.result,file:N})},P.readAsDataURL(N);return}r==null||r({file:N})};return to("label",{className:s(tc({variant:o}),w?"cursor-not-allowed":s(p&&"cursor-pointer"),a),children:[u&&he("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:he(wt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragEnter:S=>{S.preventDefault(),S.stopPropagation(),C(!0)},onDragLeave:S=>{S.preventDefault(),S.stopPropagation(),C(!1)},onDrop:async S=>{S.preventDefault(),S.stopPropagation(),O(S),C(!1)}}),to("div",{className:s("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",w&&"bg-neutral-50",R&&!w&&"cursor-copy border-black bg-neutral-50 opacity-100",n?s("opacity-0",v&&!w&&"group-hover:opacity-100"):s(!w&&"group-hover:bg-neutral-50")),children:[he(i,{className:s("size-7 transition-all duration-75",w?"text-neutral-400":s("text-neutral-500 group-hover:scale-110 group-active:scale-95",R?"scale-110":"scale-100"),l)}),h!==null&&he("div",{className:s("mt-2 text-center text-sm text-neutral-500",w&&"text-neutral-400"),children:h??he(rc,{children:to("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:y})]}),n&&(m??he("img",{src:n,alt:"Preview",className:s("h-full w-full rounded-[inherit] object-cover",c)})),p&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{id:e,type:"file",accept:eo[d].types.join(","),onChange:O,disabled:w},k)})]})}import{AnimatePresence as oc,motion as fn}from"framer-motion";import{X as ac}from"lucide-react";import nc from"next/link";import{isValidElement as ic}from"react";import{Fragment as sc,jsx as Q,jsxs as Dt}from"react/jsx-runtime";function bn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return it("Escape",o,{priority:1}),Q(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Dt("div",{className:s("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[Q("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:Q(oc,{children:t==null?void 0:t.map(({key:l,value:c})=>{if(l==="loader")return Q(fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${c}`);let i=e.find(m=>m.key===l);return i?(i.multiple&&Array.isArray(c)?c:[c]).map(m=>{var v,h,b,g;let d=(v=i.options)==null?void 0:v.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),n=(d==null?void 0:d.icon)??((h=i.getOptionIcon)==null?void 0:h.call(i,m,{key:i.key,option:d}))??i.icon,u=(d==null?void 0:d.label)??((b=i.getOptionLabel)==null?void 0:b.call(i,m,{key:i.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((g=i.getOptionPermalink)==null?void 0:g.call(i,m))??null;return Dt(fn.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-md border border-neutral-200 bg-white text-sm text-black",children:[Dt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(i.icon)?i.icon:Q(i.icon,{className:"h-4 w-4"})}),i.label]}),Q("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),Q("div",{className:"flex items-center gap-2.5 px-3 py-2",children:i.options?Dt(sc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:gn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(nc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:xt(u,30)}):xt(u,30)]}):Q("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),Q("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(l,m),children:Q(ac,{className:"h-3.5 w-3.5"})})]},`${l}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Dt("button",{type:"button",className:"group mt-px flex items-center gap-2 whitespace-nowrap rounded-lg border border-transparent px-3 py-2 text-sm text-neutral-500 ring-inset ring-neutral-500 transition-colors hover:border-neutral-200 hover:bg-white hover:text-black focus:outline-none",onClick:o,children:["Clear Filters",Q("kbd",{className:"rounded-md border border-neutral-200 px-1.5 py-0.5 text-xs text-neutral-950 group-hover:bg-neutral-50",children:"ESC"})]})]})})}var gn=e=>ic(e);import{Command as Ae,useCommandState as lc}from"cmdk";import{ChevronDown as cc,ListFilter as dc}from"lucide-react";import{Fragment as mc,forwardRef as uc,isValidElement as vn,useCallback as br,useEffect as hr,useImperativeHandle as pc,useRef as oo,useState as ro}from"react";import{Fragment as xc,jsx as _,jsxs as ve}from"react/jsx-runtime";function xn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:l,activeFilters:c,askAI:i,children:m,emptyState:d,className:n}){var x,I;let{isMobile:u}=j(),p=oo(null),v=oo(),[h,b]=ro(!1);it("f",()=>b(!0),{enabled:!h});let[g,y]=ro(""),[w,R]=ro(null),C=br(()=>{y(""),R(null)},[]);hr(()=>{h||C()},[h]);let k=w?e.find(({key:N})=>N===w):null,z=br(N=>{p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),R(N),o==null||o(N)},[]),O=br(N=>{if(!k||!c)return!1;let P=c.find(({key:X})=>X===w);return(P==null?void 0:P.value)===N||P&&k.multiple&&Array.isArray(P.value)&&P.value.includes(N)},[k]),S=br(N=>{k&&(O(N)?r(k.key,N):t(k.key,N),k.multiple||b(!1))},[c,k,i]);return hr(()=>{a==null||a(g)},[g]),hr(()=>{l==null||l(w)},[w]),hr(()=>{(k==null?void 0:k.options)&&p.current&&(v.current={width:p.current.clientWidth,height:p.current.clientHeight})},[k==null?void 0:k.options]),_(lt,{openPopover:h,setOpenPopover:b,onEscapeKeyDown:N=>{w&&(N.preventDefault(),C())},content:_(ke,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(Ae,{loop:!0,shouldFilter:!k||k.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(gc,{placeholder:`${(k==null?void 0:k.label)||"Filter"}...`,value:g,onValueChange:y,onKeyDown:N=>{(N.key==="Escape"||N.key==="Backspace"&&!g)&&(N.preventDefault(),N.stopPropagation(),w?C():b(!1))},emptySubmit:N=>{N.preventDefault(),N.stopPropagation(),i?(t("ai",k?`${k.label} ${g}`:g),b(!1)):S(g)}}),!k&&_("kbd",{className:"mr-2 hidden shrink-0 rounded border border-neutral-200 bg-neutral-100 px-2 py-0.5 text-xs font-light text-neutral-500 md:block",children:"F"})]}),_(bc,{ref:p,children:ve(Ae.List,{className:s("flex w-full flex-col gap-1 p-1",k?"min-w-[100px]":"min-w-[180px]"),children:[k?((I=(x=k.options)==null?void 0:x.filter(N=>!g||!N.hideDuringSearch))==null?void 0:I.map(N=>{let P=O(N.value);return _(hn,{filter:k,option:N,right:P?_(na,{className:"h-4 w-4"}):N.right,onSelect:()=>S(N.value)},N.value)}))??_(Ae.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:v.current,children:_(Ne,{})})}):e.filter(N=>!N.hideInFilterDropdown).map(N=>ve(mc,{children:[_(hn,{filter:N,onSelect:()=>z(N.key)}),N.separatorAfter&&_(Ae.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},N.key)),(!k||k.options)&&_(hc,{search:g,askAI:i,children:d?fc(d)?(d==null?void 0:d[w??"default"])??"No matches":d:"No matches"})]})},w)]})}),children:ve("button",{type:"button",className:s("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-md border px-3 text-sm outline-none transition-all","border-neutral-200 bg-white text-neutral-900 placeholder-neutral-400","focus-visible:border-neutral-500 data-[state=open]:border-neutral-500 data-[state=open]:ring-4 data-[state=open]:ring-neutral-200",n),children:[_(dc,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(cc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function fc(e){return typeof e=="object"&&e!==null&&!vn(e)}var gc=e=>{let t=lc(r=>r.filtered.count===0);return _(Ae.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},bc=uc(({children:e},t)=>{let r=oo(null);pc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=De(r);return ve(xc,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function hn({filter:e,option:t,right:r,onSelect:o}){var i,m;let{isMobile:a}=j(),l=t?t.icon??((i=e.getOptionIcon)==null?void 0:i.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ve(Ae.Item,{className:s("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100"),onPointerDown:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:vc(l)?l:_(l,{className:"h-4 w-4"})}),xt(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var hc=({search:e,askAI:t,children:r})=>t&&e?ve(Ae.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Uo,{className:"h-4 w-4"}),ve("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ve("span",{className:"text-black",children:['"',e,'"']})]})]}):_(Ae.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),vc=e=>vn(e);var Rx={Select:xn,List:bn};import{useMemo as yc,useState as yn}from"react";import{jsx as Ue,jsxs as vr}from"react/jsx-runtime";function Ax({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:l,handleSubmit:c}){let[i,m]=yn(r.defaultValue),[d,n]=yn(!1),u=yc(()=>d||!i||i===r.defaultValue,[d,i,r.defaultValue]);return vr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await c({[r.name]:i}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[vr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[vr("div",{className:"flex flex-col space-y-3",children:[Ue("h2",{className:"text-xl font-medium",children:e}),Ue("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ue("input",{...r,type:r.type||"text",required:!0,disabled:!!l,onChange:p=>m(p.target.value),className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",{"cursor-not-allowed bg-neutral-100 text-neutral-400":l})}):Ue("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),vr("div",{className:"flex items-center justify-between space-x-4 rounded-b-lg border-t border-neutral-200 bg-neutral-50 p-3 sm:px-10",children:[typeof o=="string"?Ue("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-neutral-700 text-neutral-500 transition-colors",dangerouslySetInnerHTML:{__html:o||""}}):o,Ue("div",{className:"shrink-0",children:Ue(ie,{text:a,loading:d,disabled:u,disabledTooltip:l})})]})]})}import{useId as wc}from"react";import{jsx as xr,jsxs as Nc}from"react/jsx-runtime";function Ge({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=wc();return Nc("svg",{className:s("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[xr("defs",{children:xr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:xr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),xr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Cc}from"lucide-react";import kc,{useCallback as Pc,useState as Sc}from"react";import{jsx as Ke,jsxs as ao}from"react/jsx-runtime";var Rc=kc.forwardRef(({className:e,type:t,...r},o)=>{let[a,l]=Sc(!1),c=Pc(()=>l(!a),[a,l]);return ao("div",{children:[ao("div",{className:"relative flex",children:[Ke("input",{type:a?"text":t,className:s("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),ao("div",{className:"group",children:[r.error&&Ke("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Ke(Cc,{className:s("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Ke("button",{className:s("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Ke(ha,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Ke(va,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Ke("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Rc.displayName="Input";import{flip as Dc,offset as Ec,size as Ic,useDismiss as Ac,useFloating as Oc,useInteractions as zc}from"@floating-ui/react";import{Command as Re,useCommandState as Hc}from"cmdk";import{Check as Vc,ChevronDown as _c,Search as Fc,X as Bc}from"lucide-react";import{createContext as Wc,forwardRef as Pn,useContext as lo,useEffect as no,useMemo as Nn,useRef as Cn,useState as io}from"react";import{Drawer as ct}from"vaul";import Tc from"next/image";import{useEffect as Lc,useState as wn}from"react";import{jsx as Mc}from"react/jsx-runtime";function Et(e){let[t,r]=wn(!0),[o,a]=wn(e.src);Lc(()=>a(e.src),[e.src]);let l=c=>{r(!1);let i=c.target;i.naturalWidth<=16&&i.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Mc(Tc,{...e,src:o,alt:e.alt,className:s(t?"blur-[2px]":"blur-0",e.className),onLoad:l,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})}import{jsx as E,jsxs as se}from"react/jsx-runtime";var yr=Wc({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function d2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:l,icon:c,inputAttrs:i,noItemsElement:m}){let{isMobile:d}=j(),n=Cn(null),[u,p]=io(!1),[v,h]=io(""),[b,g]=io(!1);no(()=>{u&&g(!1)},[u]),no(()=>g(!0),[v]),no(()=>{t&&h(t.value)},[t]);let y=Nn(()=>{let P=v.toLowerCase();return b?e.filter(X=>X.value.toLowerCase().includes(P)):v?e.sort((X,D)=>(D.value.toLowerCase().includes(P)?1:0)-(X.value.toLowerCase().includes(P)?1:0)):e},[b,v,e]),{refs:w,floatingStyles:R,context:C}=Oc({open:u,onOpenChange:p,middleware:[Ec(8),Ic({apply({elements:{floating:P},availableHeight:X}){Object.assign(P.style,{maxHeight:`${Math.max(75,Math.min(X,290))}px`})},padding:8}),Dc({fallbackStrategy:"initialPlacement",padding:8})]}),k=Ac(C,{enabled:!d||!l}),{getReferenceProps:z,getFloatingProps:O}=zc([k]),S=Cn(null),{scrollProgress:x,updateScrollProgress:I}=De(S),N=Nn(()=>t&&t.icon?t.icon:t&&t.image?E(Et,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||E(Fc,{className:"size-4 text-neutral-400"}),[t,c]);return E(yr.Provider,{value:{inputAttrs:i||{},openCommandList:u,setOpenCommandList:p,inputValue:v,setInputValue:h,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&l?se(ct.Root,{open:u,onOpenChange:p,children:[E(ct.Trigger,{className:"sm:hidden",asChild:!0,children:E(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:E(so,{className:o,iconElement:N})})}),E(ct.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(ct.Portal,{children:[E(ct.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:P=>{P.target instanceof Element&&P.target.closest("[data-sonner-toast]")&&P.preventDefault()},children:se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(so,{className:o,iconElement:N})}),u&&se(Re.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(kn,{items:y})]})]})}),E(ct.Overlay,{})]})]}):se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[E(so,{className:o,iconElement:N,ref:w.setReference,...z()}),u&&se("div",{ref:w.setFloating,style:R,...O(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[se("div",{ref:S,onScroll:I,className:"grow overflow-y-auto p-2",children:[se(Re.List,{children:[e.length===0&&v===""&&(m?E("div",{children:m}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),v!==""&&E(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(kn,{items:y})]}),E("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(x,2)}})]})]})})}var so=Pn(({iconElement:e,className:t,...r},o)=>se("label",{ref:o,className:s("group relative flex cursor-pointer gap-2 rounded-md border border-neutral-200 bg-white px-1 pl-3 transition-all focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200",t),...r,children:[E("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),se("div",{className:"flex h-10 grow",children:[E($c,{}),E(Uc,{})]})]})),$c=Pn((e,t)=>{let r=Hc(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:l,inputValue:c,setInputValue:i,disabled:m}=lo(yr);return E(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>l(!0),value:c,onValueChange:i,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),l(!1)):d.key==="Enter"&&r?l(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&l(!0)},disabled:m,className:"block w-full truncate rounded-md border-none px-0 text-base text-neutral-900 placeholder-neutral-400 outline-none outline-0 transition-all duration-300 focus:ring-0 md:text-sm",autoCapitalize:"none"})});function Uc(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=lo(yr);return E("button",{type:"button",onClick:()=>{r(l=>!l),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(Bc,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(_c,{className:s("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function kn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=lo(yr);return e.map(a=>se(Re.Item,{value:a.value,disabled:a.disabled,onSelect:()=>{t(a),o(a.value),r(!1)},className:"group flex cursor-pointer items-center justify-between rounded-md px-4 py-2 text-sm text-neutral-900 hover:bg-neutral-100 hover:text-neutral-900 active:bg-neutral-200 aria-disabled:cursor-not-allowed aria-disabled:opacity-75 aria-disabled:hover:bg-white aria-selected:bg-neutral-100 aria-selected:text-neutral-900",children:[se("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&E(Et,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),E("p",{className:s("whitespace-nowrap py-0.5 text-sm",a.color&&"rounded-md px-2",a.color==="red"&&"bg-red-100 text-red-600",a.color==="yellow"&&"bg-yellow-100 text-yellow-600",a.color==="green"&&"bg-green-100 text-green-600",a.color==="blue"&&"bg-blue-100 text-blue-600",a.color==="purple"&&"bg-purple-100 text-purple-600",a.color==="brown"&&"bg-brown-100 text-brown-600"),children:a.value}),a.label&&E(or,{className:"text-xs",variant:"neutral",children:a.label})]}),E(Vc,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as co from"@radix-ui/react-label";import{cva as Gc}from"class-variance-authority";import*as Sn from"react";import{jsx as Yc}from"react/jsx-runtime";var Kc=Gc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),jc=Sn.forwardRef(({className:e,...t},r)=>Yc(co.Root,{ref:r,className:s(Kc(),e),...t}));jc.displayName=co.Root.displayName;import{cva as Zc}from"class-variance-authority";import{isValidElement as qc}from"react";import{jsx as Rn,jsxs as Tn}from"react/jsx-runtime";var Xc=Zc(["flex h-9 w-full rounded-md px-2 items-center justify-center gap-2 transition-colors cursor-pointer","whitespace-nowrap text-sm font-medium text-content-default enabled:hover:bg-bg-subtle transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-bg-error"}}});function N2({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:l,...c}){return Tn(e||"button",{...e==="button"?{type:"button"}:{},className:s(Xc({variant:t}),l),...c,children:[Tn("div",{className:"flex grow items-center gap-2",children:[o&&(Jc(o)?o:Rn(o,{className:"size-4"})),r]}),a&&Rn("kbd",{className:s("bg-bg-inverted/5 group-hover:bg-bg-inverted/10 hidden rounded px-2 py-0.5 text-xs font-light transition-all duration-75 md:block"),children:a})]})}var Jc=e=>qc(e);import{curveNatural as Ln}from"@visx/curve";import{LinearGradient as Mn}from"@visx/gradient";import{Group as Qc}from"@visx/group";import{ParentSize as ed}from"@visx/responsive";import{scaleLinear as td,scaleUtc as rd}from"@visx/scale";import{Area as od,AreaClosed as ad}from"@visx/shape";import{motion as Dn}from"framer-motion";import{useId as nd,useMemo as En}from"react";import{jsx as xe,jsxs as mo}from"react/jsx-runtime";var id={top:8,right:2,bottom:2,left:2};function E2(e){return xe(ed,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(sd,{...{width:t,height:r,...e}})})}function sd({width:e,height:t,data:r,curve:o=!0,color:a,padding:l}){let c={...id,...l},i=nd(),m=En(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:n}=En(()=>{let u=r.map(({value:g})=>g),p=Math.max(...u),v=r.map(({date:g})=>g.getTime()),h=new Date(Math.min(...v)),b=new Date(Math.max(...v));return{yScale:td({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:rd({domain:[h,b],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return mo("svg",{width:e,height:t,children:[mo("defs",{children:[xe(Mn,{id:`${i}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),xe(Mn,{id:`${i}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${i}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${i}-mask-gradient)`})})]}),mo(Qc,{left:c.left,top:c.top,children:[xe(od,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${i}-color-gradient)`})}),xe(ad,{data:r,x:({date:u})=>n(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Ln:void 0,children:({path:u})=>xe(Dn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${i}-color-gradient)`,mask:`url(#${i}-mask)`})})]})]},r.length)}import*as le from"@radix-ui/react-dialog";import*as uo from"@radix-ui/react-visually-hidden";import{useRouter as ld}from"next/navigation";import{Drawer as je}from"vaul";import{jsx as oe,jsxs as dt}from"react/jsx-runtime";function V2({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:l,preventDefaultClose:c,drawerRootProps:i}){let m=ld(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=j();return n&&!l?oe(je.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...i,children:dt(je.Portal,{children:[oe(je.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),oe(je.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:dt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[dt(uo.Root,{children:[oe(je.Title,{children:"Modal"}),oe(je.Description,{children:"This is a modal"})]}),oe(cd,{}),e]})}),oe(je.Overlay,{})]})}):oe(le.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:dt(le.Portal,{children:[oe(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),dt(le.Content,{onOpenAutoFocus:u=>u.preventDefault(),onCloseAutoFocus:u=>u.preventDefault(),onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:s("fixed inset-0 z-40 m-auto h-fit w-full max-w-md","border border-neutral-200 bg-white p-0 shadow-xl sm:rounded-2xl","scrollbar-hide animate-scale-in overflow-y-auto",t),children:[dt(uo.Root,{children:[oe(le.Title,{children:"Modal"}),oe(le.Description,{children:"This is a modal"})]}),e]})]})})}function cd(){return oe("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:oe("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as dd,jsx as wr,jsxs as mt}from"react/jsx-runtime";var In=s("flex h-7 items-center justify-center gap-2 whitespace-nowrap rounded-md border border-neutral-200 bg-white px-2 text-sm text-neutral-600","outline-none hover:bg-neutral-50 focus-visible:border-neutral-500","disabled:cursor-not-allowed disabled:border-neutral-200 disabled:text-neutral-400 disabled:bg-neutral-100");function B2({pagination:e,setPagination:t,totalCount:r,unit:o=i=>`item${i?"s":""}`,className:a,children:l,showTotalCount:c=!0}){return mt("div",{className:s("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[mt("div",{className:"flex items-center gap-2",children:[mt("div",{children:[wr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&mt(dd,{children:[mt("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",c&&"of "]}),c&&wr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),l]}),mt("div",{className:"flex items-center gap-2",children:[wr("button",{type:"button",className:In,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),wr("button",{type:"button",className:In,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as Oe from"@radix-ui/react-radio-group";import{Circle as md}from"lucide-react";import*as po from"react";import{jsx as Nr}from"react/jsx-runtime";var ud=po.forwardRef(({className:e,...t},r)=>Nr(Oe.Root,{className:s("grid gap-2",e),...t,ref:r}));ud.displayName=Oe.Root.displayName;var pd=po.forwardRef(({className:e,...t},r)=>Nr(Oe.Item,{ref:r,className:s("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Nr(Oe.Indicator,{className:"flex items-center justify-center",children:Nr(md,{className:"h-2.5 w-2.5 fill-current text-current"})})}));pd.displayName=Oe.Item.displayName;import{Drawer as ze}from"vaul";import{jsx as Ye,jsxs as vd}from"react/jsx-runtime";function fd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?ze.NestedRoot:ze.Root;return Ye(a,{direction:"right",handleOnly:!0,...o,children:vd(ze.Portal,{children:[Ye(ze.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Ye(ze.Content,{...t,onPointerDownOutside:l=>{var c;l.target instanceof Element&&l.target.closest("[data-sonner-toast]")&&l.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,l)},className:s("fixed bottom-2 right-2 top-2 z-10 flex w-[calc(100%-16px)] outline-none md:w-[540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)","user-select":"auto",...t==null?void 0:t.style},children:Ye("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function gd({className:e,...t}){return Ye(ze.Title,{className:s("text-xl font-medium text-zinc-900",e),...t})}function bd(e){return Ye(ze.Description,{...e})}function hd(e){return Ye(ze.Close,{...e})}var Z2=Object.assign(fd,{Title:gd,Description:bd,Close:hd});import{useEffect as xd,useRef as yd,useState as wd}from"react";import{jsx as An}from"react/jsx-runtime";var Nd=`
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
|
|
5
5
|
void main()
|
|
@@ -49,4 +49,4 @@ void main(void) {
|
|
|
49
49
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z" fill="black"/>
|
|
50
50
|
</svg>`,Fm=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
51
51
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M11 2H14V13.9332L14.0003 13.9731L14.0003 14C14.0003 14.0223 14.0002 14.0445 14 14.0668V21H11V19.7455C9.86619 20.5362 8.48733 21 7.00016 21C3.13408 21 0 17.866 0 14C0 10.134 3.13408 7 7.00016 7C8.48733 7 9.86619 7.46375 11 8.25452V2ZM7 17.9998C9.20914 17.9998 11 16.209 11 13.9999C11 11.7908 9.20914 10 7 10C4.79086 10 3 11.7908 3 13.9999C3 16.209 4.79086 17.9998 7 17.9998ZM32 2H35V8.25474C36.1339 7.46383 37.5128 7 39.0002 7C42.8662 7 46.0003 10.134 46.0003 14C46.0003 17.866 42.8662 21 39.0002 21C35.1341 21 32 17.866 32 14V2ZM39 17.9998C41.2091 17.9998 43 16.209 43 13.9999C43 11.7908 41.2091 10 39 10C36.7909 10 35 11.7908 35 13.9999C35 16.209 36.7909 17.9998 39 17.9998ZM19 7H16V14C16 14.9192 16.1811 15.8295 16.5329 16.6788C16.8846 17.5281 17.4003 18.2997 18.0503 18.9497C18.7003 19.5997 19.472 20.1154 20.3213 20.4671C21.1706 20.8189 22.0809 21 23.0002 21C23.9194 21 24.8297 20.8189 25.679 20.4671C26.5283 20.1154 27.3 19.5997 27.95 18.9497C28.6 18.2997 29.1157 17.5281 29.4675 16.6788C29.8192 15.8295 30.0003 14.9192 30.0003 14H30V7H27V14C27 15.0608 26.5785 16.0782 25.8284 16.8283C25.0783 17.5784 24.0609 17.9998 23 17.9998C21.9391 17.9998 20.9217 17.5784 20.1716 16.8283C19.4215 16.0782 19 15.0608 19 14V7Z" fill="black"/>
|
|
52
|
-
</svg>`;function Dr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Am(),{theme:a}=zm(wo),[l,c]=Hm(!1),i=Om(n=>{n.preventDefault(),c(!0)},[]),[,m]=nt();function d(n){Vm.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return si(He.Root,{open:l,onOpenChange:c,children:[Z(He.Anchor,{asChild:!0,children:Z("div",{onContextMenu:i,className:"max-w-fit",children:e==="full"?Z(ii,{className:r}):Z(It,{className:s("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Z(He.Portal,{children:Z(He.Content,{sideOffset:14,align:"start",className:s("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),c(!1)},children:si("div",{className:"grid gap-1 rounded-lg border border-neutral-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Z(Ft,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(_m),icon:Z(It,{className:"h-4 w-4"})}),Z(Ft,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Fm),icon:Z(Im,{strokeWidth:2,className:"h-4 w-4"})}),Z(Ft,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Z(Mm,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Z(Ft,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Z(Dm,{strokeWidth:2,className:"h-4 w-4"})}):Z(Ft,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Z(Em,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Ft({className:e,...t}){return Z(ie,{className:s("h-9 justify-start px-3 font-medium hover:text-neutral-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as M,jsxs as W}from"react/jsx-runtime";var $m=[{name:"Twitter",icon:jt,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:Kt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Gt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Yt,href:"https://www.youtube.com/@dubdotco"}],gt={product:[...Lr.map(({title:e,href:t})=>({name:e,href:t})),{name:"Dub Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"}],solutions:[{name:"Marketing attribution",href:"/analytics"},{name:"Content creators",href:"/solutions/creators"},{name:"Affiliate management",href:"/partners"}],resources:[{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Changelog",href:"/changelog"},{name:"Blog",href:"/blog"},{name:"Customers",href:"/customers"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"},{name:"About",href:"/about"},{name:"Careers",href:"/careers"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"}],compare:$n.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Un.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:Bo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},bt="text-sm font-medium text-neutral-900",ht="flex flex-col mt-2.5 gap-3.5",Je="flex items-center gap-1 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function u6({staticDomain:e,className:t}){let{domain:r="dub.co"}=Wm();return e&&(r=e),M(Mr,{className:s("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:W("footer",{children:[W("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[W("div",{className:"flex flex-col gap-6",children:[M("div",{className:"grow",children:W(Ve,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[W("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),M(Dr,{className:"h-8 text-neutral-800"})]})}),M("div",{className:"flex items-center gap-3",children:$m.map(({name:o,icon:a,href:l})=>W("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[M("span",{className:"sr-only",children:o}),M(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),W("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[W("div",{className:"md:grid md:grid-cols-2",children:[W("div",{className:"grid gap-8",children:[W("div",{children:[M("h3",{className:bt,children:"Product"}),M("ul",{role:"list",className:ht,children:gt.product.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),W("div",{children:[M("h3",{className:bt,children:"Solutions"}),M("ul",{role:"list",className:ht,children:gt.solutions.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]}),W("div",{className:"mt-10 md:mt-0",children:[M("h3",{className:bt,children:"Resources"}),M("ul",{role:"list",className:ht,children:gt.resources.map(o=>M("li",{children:W(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),target:o.target,className:Je,children:[o.name,o.target&&M(Vr,{className:"size-3.5"})]})},o.name))})]})]}),W("div",{className:"md:grid md:grid-cols-2",children:[W("div",{className:"grid gap-8",children:[W("div",{children:[M("h3",{className:bt,children:"Compare"}),M("ul",{role:"list",className:ht,children:gt.compare.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),W("div",{children:[M("h3",{className:bt,children:"Legal"}),W("ul",{role:"list",className:ht,children:[gt.legal.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name)),M("li",{children:W("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:Je,children:["Trust Center ",M(Vr,{className:"size-3.5"})]})})]})]})]}),W("div",{className:"mt-10 md:mt-0",children:[M("h3",{className:bt,children:"Tools"}),M("ul",{role:"list",className:ht,children:gt.tools.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]})]})]}),W("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[M(cn,{}),M(Ve,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:M(Bm,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),W("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as Um,motion as Gm}from"framer-motion";import{useEffect as Km,useState as jm}from"react";import{jsx as li}from"react/jsx-runtime";var ci=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=jm(!1);Km(()=>{l(!0)},[]);let c=r?Gm.div:"div";return li(Um,{children:a?li(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Ym}from"class-variance-authority";import{toast as Zm}from"sonner";import{jsx as So,jsxs as Xm}from"react/jsx-runtime";var qm=Ym("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200",neutral:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200"}},defaultVariants:{variant:"default"}});function k6({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=nt(),i=o||Wo;return Xm("button",{onClick:m=>{m.stopPropagation(),Zm.promise(c(t),{success:a||"Copied to clipboard!"})},className:s(qm({variant:e}),r),type:"button",children:[So("span",{className:"sr-only",children:"Copy"}),l?So(Yo,{className:"h-3.5 w-3.5"}):So(i,{className:"h-3.5 w-3.5"})]})}import{toast as Jm}from"sonner";import{jsx as Qm}from"react/jsx-runtime";function L6({value:e,children:t,className:r,successMessage:o}){let[a,l]=nt();return Qm("button",{onClick:c=>{c.stopPropagation(),Jm.promise(l(e),{success:o||"Copied to clipboard!"})},type:"button",className:s("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as eu,jsxs as tu}from"react/jsx-runtime";function D6({icon:e,text:t}){return tu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,eu("p",{className:"truncate text-sm",children:t})]})}import{jsx as ru}from"react/jsx-runtime";var I6=({children:e})=>ru("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Ro}from"react/jsx-runtime";function V6({apexDomain:e,className:t,imageProps:r}){return e?Ro(Et,{src:`${_o}${e}`,alt:e,className:s("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Ro("div",{className:s("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:Ro(Ca,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as di}from"lucide-react";import{useSearchParams as ou}from"next/navigation";import{useEffect as au,useMemo as nu,useRef as iu}from"react";import su from"swr";import{useDebounce as lu}from"use-debounce";import{Fragment as mi,jsx as K,jsxs as _e}from"react/jsx-runtime";function Y6({defaultUrl:e}){let t=ou(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=lu(Ho(r),500),a=nu(()=>Vo(o||""),[o]),{data:l,isValidating:c}=su(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,fe,{revalidateOnFocus:!1}),{title:i,description:m,image:d}=l||{},n=iu(null);au(()=>{!e&&n.current&&n.current.select()},[e]);let{isMobile:u}=j();return _e(mi,{children:[!e&&_e("div",{className:"relative flex items-center",children:[K(di,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{ref:n,name:"url",id:"url",type:"url",autoFocus:!u,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:r,"aria-invalid":"true"})]}),_e("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(wt,{})}),d?K("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):_e("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[K(Go,{className:"h-8 w-8 text-neutral-400"}),K("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),_e("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?K("p",{className:"text-sm text-[#536471]",children:a}):K("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),i?K("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:i}):K("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?K("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):_e("div",{className:"grid gap-2",children:[K("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),K("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function Z6({defaultUrl:e}){return _e(mi,{children:[_e("div",{className:"relative flex items-center",children:[K(di,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),K("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(wt,{})})})]})}import{AnimatePresence as cu}from"framer-motion";import ui from"js-cookie";import{createContext as du,useState as mu}from"react";import{jsx as To}from"react/jsx-runtime";var uu=du({hidePopup:()=>{}});function rw({children:e,hiddenCookieId:t}){let[r,o]=mu(ui.get(t)==="1"),a=()=>{o(!0),ui.set(t,"1")};return To(ci,{children:To(uu.Provider,{value:{hidePopup:a},children:To(cu,{children:!r&&e})})})}import{motion as pu}from"framer-motion";import{jsx as pi}from"react/jsx-runtime";function iw({value:e=0,max:t=100,className:r}){return pi("div",{className:s("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:pi(pu.div,{initial:{width:0},animate:{width:e&&t?e/t*100+"%":"0%"},transition:{duration:.5,type:"spring",delay:.2},className:`${e&&t&&e>t?"bg-red-500":"bg-blue-500"} h-full`})})}import{cva as gi}from"class-variance-authority";import{LayoutGroup as fu,motion as gu}from"framer-motion";import bu from"next/link";import{useId as hu}from"react";import{jsx as Bt,jsxs as fi}from"react/jsx-runtime";var vu=gi("p-4 transition-colors duration-75",{variants:{variant:{default:"text-content-subtle data-[selected=true]:text-content-emphasis data-[selected=false]:hover:text-content-default",accent:"text-content-subtle transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-content-default data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),xu=gi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function hw({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=hu();return Bt("div",{className:s("flex text-sm",a),children:Bt(fu,{id:l,children:t.map(({id:c,label:i,href:m,target:d})=>{let n=c===r;return fi(m?bu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[fi("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:s(vu({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":n,"aria-selected":n,children:[i,d==="_blank"&&Bt(ra,{className:"size-2.5"})]}),n&&Bt(gu.div,{layoutId:"indicator",transition:{duration:.1},className:xu({variant:e}),children:Bt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Lo,jsxs as bi}from"react/jsx-runtime";var yu=[{icon:Da,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:ga,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Pa,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:La,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:ka,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function yw(){return bi("div",{className:"p-3",children:[Lo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Lo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:yu.map(({text:e,icon:t,href:r})=>bi("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Lo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as hi,jsxs as wu}from"react/jsx-runtime";function Cw({className:e}){return wu("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-6 w-auto text-black dark:text-white",e),children:[hi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.5 8H112.5V31.8666C112.5 31.911 112.501 31.9554 112.501 31.9999C112.501 32.0444 112.5 32.0888 112.5 32.1332V46H106.5V43.4909C104.232 45.0724 101.475 45.9999 98.5003 45.9999C90.7682 45.9999 84.5 39.7319 84.5 31.9999C84.5 24.2679 90.7682 17.9999 98.5003 17.9999C101.475 17.9999 104.232 18.9274 106.5 20.5089V8ZM98.5 39.9996C102.918 39.9996 106.5 36.418 106.5 31.9998C106.5 27.5816 102.918 24 98.5 24C94.0818 24 90.5 27.5816 90.5 31.9998C90.5 36.418 94.0818 39.9996 98.5 39.9996ZM148.5 8.0001H154.5V20.5096C156.768 18.9278 159.526 18.0002 162.5 18.0002C170.233 18.0002 176.501 24.2682 176.501 32.0002C176.501 39.7322 170.233 46.0002 162.5 46.0002C154.768 46.0002 148.5 39.7322 148.5 32.0002V32.0001V8.0001ZM162.5 39.9997C166.918 39.9997 170.5 36.4181 170.5 31.9999C170.5 27.5817 166.918 24.0001 162.5 24.0001C158.082 24.0001 154.5 27.5817 154.5 31.9999C154.5 36.4181 158.082 39.9997 162.5 39.9997ZM122.5 18H116.5V32C116.5 33.8385 116.862 35.659 117.566 37.3576C118.269 39.0561 119.301 40.5995 120.601 41.8995C121.901 43.1995 123.444 44.2307 125.143 44.9343C126.841 45.6379 128.662 46 130.5 46C132.339 46 134.159 45.6379 135.858 44.9343C137.557 44.2307 139.1 43.1995 140.4 41.8995C141.7 40.5995 142.731 39.0561 143.435 37.3576C144.139 35.659 144.501 33.8385 144.501 32H144.5V18H138.5V32H138.5C138.5 34.1216 137.657 36.1563 136.157 37.6566C134.657 39.1568 132.622 39.9996 130.5 39.9996C128.378 39.9996 126.344 39.1568 124.843 37.6566C123.343 36.1563 122.5 34.1216 122.5 32H122.5V18Z",fill:"currentColor"}),hi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z",fill:"currentColor"})]})}export{Ur as AUTOPLAY_DEFAULT_DELAY,Lg as Accordion,ki as AccordionContent,Ni as AccordionItem,Ci as AccordionTrigger,yw as AdvancedLinkFeaturesTooltip,Vu as Africa,qu as Airtm,Ti as Alert,Mi as AlertDescription,Li as AlertTitle,Uu as Amazon,op as AndroidLogo,ke as AnimatedSizeContainer,ap as AppleLogo,np as ArrowBoldUp,ip as ArrowRight,sp as ArrowTrendUp,lp as ArrowTurnLeft,cp as ArrowTurnRight2,ra as ArrowUpRight,dp as ArrowsOppositeDirectionX,mp as ArrowsOppositeDirectionY,_u as Asia,ko as AuthButton,Hg as Avatar,iy as Background,or as Badge,up as BadgeCheck,pp as BadgeCheck2Fill,a1 as BadgeTooltip,fp as Blog,Et as BlurImage,gp as Bolt,bp as BoltFill,vp as Book2,Zt as Book2Fill,xp as Book2Small,hp as BookOpen,yp as Books2,wp as BoxArchive,Np as BracketsCurly,oa as BriefcaseFill,Cp as Brush,kp as BulletList,aa as BulletListFill,ie as Button,n1 as ButtonTooltip,$n as COMPARE_PAGES,gy as CUSTOMER_STORIES,Pp as Calculator,rn as Calendar,Lp as Calendar6,Rp as CalendarDays,Sp as CalendarIcon,Tp as CalendarRefresh,Au as CardAmex,Ou as CardDiscover,L1 as CardList,zu as CardMastercard,Hu as CardVisa,Mp as Cards,Dp as CaretUpFill,ss as Carousel,ls as CarouselContent,cs as CarouselItem,j1 as CarouselNavBar,ms as CarouselNext,ds as CarouselPrevious,ob as CarouselThumbnail,rb as CarouselThumbnails,Xu as CashApp,Ep as ChartActivity2,Ip as ChartArea2,Ap as ChartLine,Gu as ChatGPT,na as Check,ia as Check2,Ns as Checkbox,sa as CheckboxCheckedFill,la as CheckboxUnchecked,ca as CircleCheck,Op as CircleCheckFill,zp as CircleDollar,Hp as CircleDotted,da as CircleHalfDottedCheck,ma as CircleHalfDottedClock,ua as CircleInfo,Vp as CirclePercentage,_p as CirclePlay,Fp as CirclePlayFill,Bp as CircleQuestion,Wp as CircleUser,Hr as CircleWarning,$p as CircleXmark,Up as Circles,Gp as Circles3,ci as ClientOnly,pa as CloudUpload,Kp as Code,jp as ColorPalette2,Zh as Combobox,Cw as CompositeLogo,Yp as ConnectedDots,qp as ConnectedDots4,Zp as ConnectedDotsFill,Xp as Connections3,Wo as Copy,k6 as CopyButton,L6 as CopyText,Jp as CreditCard,Qp as Crosshairs3,e0 as Crown,Nu as CrownSmall,t0 as Cube,r0 as CubeSettings,o0 as CubeSettingsFill,a0 as CurrencyDollar,fa as CursorRays,n0 as DatabaseKey,Zr as DatePickerContext,Iv as DateRangePicker,i0 as Desktop,s0 as DiamondTurnRight,qt as DiamondTurnRightFill,l0 as Directions,c0 as Discount,d0 as Dots,m0 as Download,et as DubAnalyticsIcon,Ut as DubApiIcon,Cu as DubCraftedShield,tt as DubLinksIcon,rt as DubPartnersIcon,cn as DubStatusBadge,u0 as Duplicate,ar as DynamicTooltipWrapper,ga as Earth,p0 as EarthPosition,Gv as EmptyState,f0 as Envelope,g0 as EnvelopeAlert,b0 as EnvelopeArrowRight,ba as EnvelopeFill,Fu as Europe,$o as ExpandingArrow,ha as Eye,va as EyeSlash,Lr as FEATURES_LIST,Su as Facebook,xa as FeatherFill,Ku as Figma,h0 as FileContent,rx as FileUpload,v0 as FileZip2,Rx as Filter,y0 as Filter2,x0 as FilterBars,N0 as Flag2,ya as Flag6,w0 as FlagWavy,C0 as Flask,k0 as FlaskSmall,P0 as Folder,M0 as Folder5,S0 as FolderBookmark,R0 as FolderLock,T0 as FolderPlus,L0 as FolderShield,u6 as Footer,Ax as Form,D0 as GamingConsole,E0 as Gauge6,I0 as Gear,A0 as Gear2,O0 as Gear3,z0 as Gem,wa as Gift,H0 as GiftFill,ju as GitHubEnhanced,Gt as Github,V0 as Globe,Ca as Globe2,Na as GlobePointer,_0 as GlobeSearch,Xo as Go,Ru as Google,Yu as GoogleEnhanced,F0 as GreekTemple,Ge as Grid,B0 as GridIcon,W0 as GridLayoutRows,$0 as GridPlus,U0 as GripDotsVertical,G0 as Headset,Xt as HeadsetFill,K0 as HeartFill,j0 as HexadecagonStar,Y0 as History,Z0 as Hyperlink,D6 as IconMenu,q0 as Icosahedron,ka as Incognito,r1 as InfoTooltip,I6 as InlineSnippet,Rc as Input,X0 as InputPassword,Pa as InputPasswordPointer,Sa as InputSearch,d2 as InputSelect,Tu as Instagram,J0 as InvoiceDollar,Q0 as Key,Wa as KeyboardShortcutContext,zb as KeyboardShortcutProvider,Un as LEGAL_PAGES,jc as Label,ef as LayoutSidebar,tf as License,rf as LinesY,af as Link4,of as LinkBroken,V6 as LinkLogo,Y6 as LinkPreview,Z6 as LinkPreviewPlaceholder,Kt as LinkedIn,t1 as LinkifyTooltipContent,wt as LoadingCircle,Pu as LoadingDots,Ne as LoadingSpinner,nf as LocationPin,sf as LockFill,It as Logo,Uo as Magic,lf as Magnifier,cf as MapPosition,df as MarketingTarget,ku as MatrixLines,Mr as MaxWidthWrapper,mf as Menu3,N2 as MenuItem,uf as MessageSmile,Jt as MicrophoneFill,E2 as MiniAreaChart,pf as MobilePhone,V2 as Modal,ff as MoneyBill,gf as MoneyBill2,bf as MoneyBills2,hf as Msgs,P3 as Nav,wo as NavContext,F3 as NavMobile,Dr as NavWordmark,Bu as NorthAmerica,vf as Note,Sf as NucleoPhoto,o1 as NumberTooltip,Wu as Oceania,xf as OfficeBuilding,Cg as PLAN_FEATURE_ICONS,Ra as Page2,B2 as PaginationControls,yf as Paintbrush,wf as Palette2,Nf as PaperPlane,Ju as Payoneer,Qu as Paypal,kf as Pen2,Cf as PenWriting,Pf as PercentageArrowDown,Go as Photo,Jo as Php,Rf as Plug2,Qt as Plus,Tf as Plus2,lt as Popover,rw as Popup,uu as PopupContext,Lf as Post,Lu as Prisma,Zo as ProductHunt,iw as ProgressBar,Mf as Pyramid,Qo as Python,Df as QRCode,At as RESOURCES,ud as RadioGroup,pd as RadioGroupItem,qo as Raycast,Ef as Receipt2,Vr as ReferredVia,If as Refresh2,Af as Robot,ea as Ruby,yo as SDKS,by as SOCIAL_LINKS,Wn as SOLUTIONS,Ta as SatelliteDish,Of as ScanText,zf as Scribble,Z2 as Sheet,Hf as ShieldAlert,Vf as ShieldCheck,_f as ShieldKeyhole,Ff as ShieldSlash,Bf as ShieldUser,Q2 as ShimmerDots,Wf as Shuffle,e1 as SimpleTooltipContent,Mu as Slack,$f as Sliders,o4 as SmartDateTimePicker,Ko as SortOrder,$u as SouthAmerica,Uf as Sparkle3,Zu as Spotify,Gf as SquareChart,Kf as SquareLayoutGrid5,jf as SquareLayoutGrid6,Yf as SquareXmark,Zf as Stars2,d4 as StatusBadge,ep as Stripe,tp as StripeLink,jo as Success,v4 as Switch,ag as TV,hw as TabSelect,U4 as Table,qf as TableIcon,Xf as TableRows2,Jf as Tablet,Qf as Tag,eg as Tags,Yo as Tick,Du as TikTok,La as Timer2,Eu as Tinybird,Ma as Toggle2Fill,q4 as ToggleGroup,tg as Toggles,Vg as TokenAvatar,J as Tooltip,Qg as TooltipContent,Jg as TooltipProvider,rg as Trash,og as TriangleWarning,jt as Twitter,ta as Typescript,ay as UTMBuilder,qd as UTM_PARAMETERS,ng as UiCard,Iu as Unsplash,ig as User,sg as UserCheck,lg as UserCrown,cg as UserDelete,dg as UserFocus,mg as UserPlus,ug as Users,fg as Users2,gg as Users6,Nt as UsersFill,pg as UsersSettings,rp as Venmo,bg as Versions2,Da as Views,hg as Watch,vg as Webhook,xg as Window,yg as WindowSearch,wg as WindowSettings,ii as Wordmark,Ng as Xmark,Yt as YouTube,Oi as badgeVariants,ne as buttonVariants,Ii as getUserAvatarUrl,No as navItems,Md as statusBadgeVariants,be as useCarousel,Va as useCarouselActiveIndex,db as useCookies,nt as useCopyToClipboard,gb as useCurrentAnchor,xb as useEnterSubmit,Cb as useInViewport,Sb as useInputFocused,Mb as useIntersectionObserver,it as useKeyboardShortcut,_b as useLocalStorage,j as useMediaQuery,Ub as useOptimisticUpdate,rh as usePagination,nh as useRemoveGAParams,ir as useResizeObserver,Ka as useRouterStuff,Za as useScroll,De as useScrollProgress,$4 as useTable,Ga as useTablePagination,yh as useToastWithUndo};
|
|
52
|
+
</svg>`;function Dr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=Am(),{theme:a}=zm(wo),[l,c]=Hm(!1),i=Om(n=>{n.preventDefault(),c(!0)},[]),[,m]=nt();function d(n){Vm.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return si(He.Root,{open:l,onOpenChange:c,children:[Z(He.Anchor,{asChild:!0,children:Z("div",{onContextMenu:i,className:"max-w-fit",children:e==="full"?Z(ii,{className:r}):Z(It,{className:s("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),Z(He.Portal,{children:Z(He.Content,{sideOffset:14,align:"start",className:s("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),c(!1)},children:si("div",{className:"grid gap-1 rounded-lg border border-neutral-200 bg-white p-2 drop-shadow-sm sm:min-w-[240px] dark:border-white/[0.15] dark:bg-black",children:[Z(Ft,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(_m),icon:Z(It,{className:"h-4 w-4"})}),Z(Ft,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(Fm),icon:Z(Im,{strokeWidth:2,className:"h-4 w-4"})}),Z(Ft,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:Z(Mm,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?Z(Ft,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:Z(Dm,{strokeWidth:2,className:"h-4 w-4"})}):Z(Ft,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:Z(Em,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Ft({className:e,...t}){return Z(ie,{className:s("h-9 justify-start px-3 font-medium hover:text-neutral-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as M,jsxs as W}from"react/jsx-runtime";var $m=[{name:"Twitter",icon:jt,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:Kt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Gt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Yt,href:"https://www.youtube.com/@dubdotco"}],gt={product:[...Lr.map(({title:e,href:t})=>({name:e,href:t})),{name:"Dub Enterprise",href:"/enterprise"},{name:"Pricing",href:"/pricing"}],solutions:[{name:"Marketing attribution",href:"/analytics"},{name:"Content creators",href:"/solutions/creators"},{name:"Affiliate management",href:"/partners"}],resources:[{name:"Docs",href:"/docs/introduction"},{name:"Help Center",href:"/help"},{name:"Changelog",href:"/changelog"},{name:"Blog",href:"/blog"},{name:"Customers",href:"/customers"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"},{name:"About",href:"/about"},{name:"Careers",href:"/careers"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"}],compare:$n.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:Un.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:Bo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},bt="text-sm font-medium text-neutral-900",ht="flex flex-col mt-2.5 gap-3.5",Je="flex items-center gap-1 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function u6({staticDomain:e,className:t}){let{domain:r="dub.co"}=Wm();return e&&(r=e),M(Mr,{className:s("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",t),children:W("footer",{children:[W("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[W("div",{className:"flex flex-col gap-6",children:[M("div",{className:"grow",children:W(Ve,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[W("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),M(Dr,{className:"h-8 text-neutral-800"})]})}),M("div",{className:"flex items-center gap-3",children:$m.map(({name:o,icon:a,href:l})=>W("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[M("span",{className:"sr-only",children:o}),M(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),W("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[W("div",{className:"md:grid md:grid-cols-2",children:[W("div",{className:"grid gap-8",children:[W("div",{children:[M("h3",{className:bt,children:"Product"}),M("ul",{role:"list",className:ht,children:gt.product.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),W("div",{children:[M("h3",{className:bt,children:"Solutions"}),M("ul",{role:"list",className:ht,children:gt.solutions.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]}),W("div",{className:"mt-10 md:mt-0",children:[M("h3",{className:bt,children:"Resources"}),M("ul",{role:"list",className:ht,children:gt.resources.map(o=>M("li",{children:W(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),target:o.target,className:Je,children:[o.name,o.target&&M(Vr,{className:"size-3.5"})]})},o.name))})]})]}),W("div",{className:"md:grid md:grid-cols-2",children:[W("div",{className:"grid gap-8",children:[W("div",{children:[M("h3",{className:bt,children:"Compare"}),M("ul",{role:"list",className:ht,children:gt.compare.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]}),W("div",{children:[M("h3",{className:bt,children:"Legal"}),W("ul",{role:"list",className:ht,children:[gt.legal.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name)),M("li",{children:W("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:Je,children:["Trust Center ",M(Vr,{className:"size-3.5"})]})})]})]})]}),W("div",{className:"mt-10 md:mt-0",children:[M("h3",{className:bt,children:"Tools"}),M("ul",{role:"list",className:ht,children:gt.tools.map(o=>M("li",{children:M(Ve,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:Je,children:o.name})},o.name))})]})]})]})]}),W("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[M(cn,{}),M(Ve,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:M(Bm,{src:"https://assets.dub.co/misc/soc2.svg",alt:"AICPA SOC 2 Type II Certified",width:63,height:32,className:"h-8 transition-[filter] duration-75 hover:brightness-90"})}),W("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as Um,motion as Gm}from"framer-motion";import{useEffect as Km,useState as jm}from"react";import{jsx as li}from"react/jsx-runtime";var ci=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,l]=jm(!1);Km(()=>{l(!0)},[]);let c=r?Gm.div:"div";return li(Um,{children:a?li(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Ym}from"class-variance-authority";import{toast as Zm}from"sonner";import{jsx as So,jsxs as Xm}from"react/jsx-runtime";var qm=Ym("relative group rounded-full p-1.5 transition-all duration-75",{variants:{variant:{default:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200",neutral:"bg-transparent hover:bg-neutral-100 active:bg-neutral-200"}},defaultVariants:{variant:"default"}});function k6({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[l,c]=nt(),i=o||Wo;return Xm("button",{onClick:m=>{m.stopPropagation(),Zm.promise(c(t),{success:a||"Copied to clipboard!"})},className:s(qm({variant:e}),r),type:"button",children:[So("span",{className:"sr-only",children:"Copy"}),l?So(Yo,{className:"h-3.5 w-3.5"}):So(i,{className:"h-3.5 w-3.5"})]})}import{toast as Jm}from"sonner";import{jsx as Qm}from"react/jsx-runtime";function L6({value:e,children:t,className:r,successMessage:o}){let[a,l]=nt();return Qm("button",{onClick:c=>{c.stopPropagation(),Jm.promise(l(e),{success:o||"Copied to clipboard!"})},type:"button",className:s("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as eu,jsxs as tu}from"react/jsx-runtime";function D6({icon:e,text:t}){return tu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,eu("p",{className:"truncate text-sm",children:t})]})}import{jsx as ru}from"react/jsx-runtime";var I6=({children:e})=>ru("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Ro}from"react/jsx-runtime";function V6({apexDomain:e,className:t,imageProps:r}){return e?Ro(Et,{src:`${_o}${e}`,alt:e,className:s("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Ro("div",{className:s("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:Ro(Ca,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as di}from"lucide-react";import{useSearchParams as ou}from"next/navigation";import{useEffect as au,useMemo as nu,useRef as iu}from"react";import su from"swr";import{useDebounce as lu}from"use-debounce";import{Fragment as mi,jsx as K,jsxs as _e}from"react/jsx-runtime";function Y6({defaultUrl:e}){let t=ou(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=lu(Ho(r),500),a=nu(()=>Vo(o||""),[o]),{data:l,isValidating:c}=su(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,fe,{revalidateOnFocus:!1}),{title:i,description:m,image:d}=l||{},n=iu(null);au(()=>{!e&&n.current&&n.current.select()},[e]);let{isMobile:u}=j();return _e(mi,{children:[!e&&_e("div",{className:"relative flex items-center",children:[K(di,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{ref:n,name:"url",id:"url",type:"url",autoFocus:!u,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:r,"aria-invalid":"true"})]}),_e("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(wt,{})}),d?K("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):_e("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[K(Go,{className:"h-8 w-8 text-neutral-400"}),K("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),_e("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?K("p",{className:"text-sm text-[#536471]",children:a}):K("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),i?K("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:i}):K("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?K("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):_e("div",{className:"grid gap-2",children:[K("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),K("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function Z6({defaultUrl:e}){return _e(mi,{children:[_e("div",{className:"relative flex items-center",children:[K(di,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),K("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(wt,{})})})]})}import{AnimatePresence as cu}from"framer-motion";import ui from"js-cookie";import{createContext as du,useState as mu}from"react";import{jsx as To}from"react/jsx-runtime";var uu=du({hidePopup:()=>{}});function rw({children:e,hiddenCookieId:t}){let[r,o]=mu(ui.get(t)==="1"),a=()=>{o(!0),ui.set(t,"1")};return To(ci,{children:To(uu.Provider,{value:{hidePopup:a},children:To(cu,{children:!r&&e})})})}import{motion as pu}from"framer-motion";import{jsx as pi}from"react/jsx-runtime";function iw({value:e=0,max:t=100,className:r}){return pi("div",{className:s("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:pi(pu.div,{initial:{width:0},animate:{width:e&&t?e/t*100+"%":"0%"},transition:{duration:.5,type:"spring",delay:.2},className:`${e&&t&&e>t?"bg-red-500":"bg-blue-500"} h-full`})})}import{cva as gi}from"class-variance-authority";import{LayoutGroup as fu,motion as gu}from"framer-motion";import bu from"next/link";import{useId as hu}from"react";import{jsx as Bt,jsxs as fi}from"react/jsx-runtime";var vu=gi("p-4 transition-colors duration-75",{variants:{variant:{default:"text-content-subtle data-[selected=true]:text-content-emphasis data-[selected=false]:hover:text-content-default",accent:"text-content-subtle transition-[color,font-weight] data-[selected=true]:text-blue-600 data-[selected=false]:hover:text-content-default data-[selected=true]:font-medium"}},defaultVariants:{variant:"default"}}),xu=gi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function hw({variant:e,options:t,selected:r,onSelect:o,className:a}){let l=hu();return Bt("div",{className:s("flex text-sm",a),children:Bt(fu,{id:l,children:t.map(({id:c,label:i,href:m,target:d})=>{let n=c===r;return fi(m?bu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[fi("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:s(vu({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":n,"aria-selected":n,children:[i,d==="_blank"&&Bt(ra,{className:"size-2.5"})]}),n&&Bt(gu.div,{layoutId:"indicator",transition:{duration:.1},className:xu({variant:e}),children:Bt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Lo,jsxs as bi}from"react/jsx-runtime";var yu=[{icon:Da,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:ga,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Pa,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:La,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:ka,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function yw(){return bi("div",{className:"p-3",children:[Lo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Lo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:yu.map(({text:e,icon:t,href:r})=>bi("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Lo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as hi,jsxs as wu}from"react/jsx-runtime";function Cw({className:e}){return wu("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:s("h-6 w-auto text-black dark:text-white",e),children:[hi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M106.5 8H112.5V31.8666C112.5 31.911 112.501 31.9554 112.501 31.9999C112.501 32.0444 112.5 32.0888 112.5 32.1332V46H106.5V43.4909C104.232 45.0724 101.475 45.9999 98.5003 45.9999C90.7682 45.9999 84.5 39.7319 84.5 31.9999C84.5 24.2679 90.7682 17.9999 98.5003 17.9999C101.475 17.9999 104.232 18.9274 106.5 20.5089V8ZM98.5 39.9996C102.918 39.9996 106.5 36.418 106.5 31.9998C106.5 27.5816 102.918 24 98.5 24C94.0818 24 90.5 27.5816 90.5 31.9998C90.5 36.418 94.0818 39.9996 98.5 39.9996ZM148.5 8.0001H154.5V20.5096C156.768 18.9278 159.526 18.0002 162.5 18.0002C170.233 18.0002 176.501 24.2682 176.501 32.0002C176.501 39.7322 170.233 46.0002 162.5 46.0002C154.768 46.0002 148.5 39.7322 148.5 32.0002V32.0001V8.0001ZM162.5 39.9997C166.918 39.9997 170.5 36.4181 170.5 31.9999C170.5 27.5817 166.918 24.0001 162.5 24.0001C158.082 24.0001 154.5 27.5817 154.5 31.9999C154.5 36.4181 158.082 39.9997 162.5 39.9997ZM122.5 18H116.5V32C116.5 33.8385 116.862 35.659 117.566 37.3576C118.269 39.0561 119.301 40.5995 120.601 41.8995C121.901 43.1995 123.444 44.2307 125.143 44.9343C126.841 45.6379 128.662 46 130.5 46C132.339 46 134.159 45.6379 135.858 44.9343C137.557 44.2307 139.1 43.1995 140.4 41.8995C141.7 40.5995 142.731 39.0561 143.435 37.3576C144.139 35.659 144.501 33.8385 144.501 32H144.5V18H138.5V32H138.5C138.5 34.1216 137.657 36.1563 136.157 37.6566C134.657 39.1568 132.622 39.9996 130.5 39.9996C128.378 39.9996 126.344 39.1568 124.843 37.6566C123.343 36.1563 122.5 34.1216 122.5 32H122.5V18Z",fill:"currentColor"}),hi("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32.5 64C50.1731 64 64.5 49.6731 64.5 32C64.5 20.1555 58.0648 9.81393 48.5 4.28099V31.9999V47.9998H40.5V45.8594C38.1466 47.2207 35.4143 47.9999 32.5 47.9999C23.6634 47.9999 16.5 40.8364 16.5 31.9999C16.5 23.1633 23.6634 15.9999 32.5 15.9999C35.4143 15.9999 38.1466 16.779 40.5 18.1404V1.00812C37.943 0.350018 35.2624 0 32.5 0C14.8269 0 0.500038 14.3269 0.500038 32C0.500038 49.6731 14.8269 64 32.5 64Z",fill:"currentColor"})]})}export{Ur as AUTOPLAY_DEFAULT_DELAY,Lg as Accordion,ki as AccordionContent,Ni as AccordionItem,Ci as AccordionTrigger,yw as AdvancedLinkFeaturesTooltip,Vu as Africa,qu as Airtm,Ti as Alert,Mi as AlertDescription,Li as AlertTitle,Uu as Amazon,op as AndroidLogo,ke as AnimatedSizeContainer,ap as AppleLogo,np as ArrowBoldUp,ip as ArrowRight,sp as ArrowTrendUp,lp as ArrowTurnLeft,cp as ArrowTurnRight2,ra as ArrowUpRight,dp as ArrowsOppositeDirectionX,mp as ArrowsOppositeDirectionY,_u as Asia,ko as AuthButton,Hg as Avatar,iy as Background,or as Badge,up as BadgeCheck,pp as BadgeCheck2Fill,a1 as BadgeTooltip,fp as Blog,Et as BlurImage,gp as Bolt,bp as BoltFill,vp as Book2,Zt as Book2Fill,xp as Book2Small,hp as BookOpen,yp as Books2,wp as BoxArchive,Np as BracketsCurly,oa as BriefcaseFill,Cp as Brush,kp as BulletList,aa as BulletListFill,ie as Button,n1 as ButtonTooltip,$n as COMPARE_PAGES,gy as CUSTOMER_STORIES,Pp as Calculator,rn as Calendar,Lp as Calendar6,Rp as CalendarDays,Sp as CalendarIcon,Tp as CalendarRefresh,Au as CardAmex,Ou as CardDiscover,L1 as CardList,zu as CardMastercard,Hu as CardVisa,Mp as Cards,Dp as CaretUpFill,ss as Carousel,ls as CarouselContent,cs as CarouselItem,j1 as CarouselNavBar,ms as CarouselNext,ds as CarouselPrevious,ob as CarouselThumbnail,rb as CarouselThumbnails,Xu as CashApp,Ep as ChartActivity2,Ip as ChartArea2,Ap as ChartLine,Gu as ChatGPT,na as Check,ia as Check2,Ns as Checkbox,sa as CheckboxCheckedFill,la as CheckboxUnchecked,ca as CircleCheck,Op as CircleCheckFill,zp as CircleDollar,Hp as CircleDotted,da as CircleHalfDottedCheck,ma as CircleHalfDottedClock,ua as CircleInfo,Vp as CirclePercentage,_p as CirclePlay,Fp as CirclePlayFill,Bp as CircleQuestion,Wp as CircleUser,Hr as CircleWarning,$p as CircleXmark,Up as Circles,Gp as Circles3,ci as ClientOnly,pa as CloudUpload,Kp as Code,jp as ColorPalette2,Zh as Combobox,Cw as CompositeLogo,Yp as ConnectedDots,qp as ConnectedDots4,Zp as ConnectedDotsFill,Xp as Connections3,Wo as Copy,k6 as CopyButton,L6 as CopyText,Jp as CreditCard,Qp as Crosshairs3,e0 as Crown,Nu as CrownSmall,t0 as Cube,r0 as CubeSettings,o0 as CubeSettingsFill,a0 as CurrencyDollar,fa as CursorRays,n0 as DatabaseKey,Zr as DatePickerContext,Iv as DateRangePicker,i0 as Desktop,s0 as DiamondTurnRight,qt as DiamondTurnRightFill,l0 as Directions,c0 as Discount,d0 as Dots,m0 as Download,et as DubAnalyticsIcon,Ut as DubApiIcon,Cu as DubCraftedShield,tt as DubLinksIcon,rt as DubPartnersIcon,cn as DubStatusBadge,u0 as Duplicate,ar as DynamicTooltipWrapper,ga as Earth,p0 as EarthPosition,Gv as EmptyState,f0 as Envelope,g0 as EnvelopeAlert,b0 as EnvelopeArrowRight,ba as EnvelopeFill,Fu as Europe,$o as ExpandingArrow,ha as Eye,va as EyeSlash,Lr as FEATURES_LIST,Su as Facebook,xa as FeatherFill,Ku as Figma,h0 as FileContent,rx as FileUpload,v0 as FileZip2,Rx as Filter,y0 as Filter2,x0 as FilterBars,N0 as Flag2,ya as Flag6,w0 as FlagWavy,C0 as Flask,k0 as FlaskSmall,P0 as Folder,M0 as Folder5,S0 as FolderBookmark,R0 as FolderLock,T0 as FolderPlus,L0 as FolderShield,u6 as Footer,Ax as Form,D0 as GamingConsole,E0 as Gauge6,I0 as Gear,A0 as Gear2,O0 as Gear3,z0 as Gem,wa as Gift,H0 as GiftFill,ju as GitHubEnhanced,Gt as Github,V0 as Globe,Ca as Globe2,Na as GlobePointer,_0 as GlobeSearch,Xo as Go,Ru as Google,Yu as GoogleEnhanced,F0 as GreekTemple,Ge as Grid,B0 as GridIcon,W0 as GridLayoutRows,$0 as GridPlus,U0 as GripDotsVertical,G0 as Headset,K0 as HeartFill,j0 as HexadecagonStar,Y0 as History,Z0 as Hyperlink,D6 as IconMenu,q0 as Icosahedron,ka as Incognito,r1 as InfoTooltip,I6 as InlineSnippet,Rc as Input,X0 as InputPassword,Pa as InputPasswordPointer,Sa as InputSearch,d2 as InputSelect,Tu as Instagram,J0 as InvoiceDollar,Q0 as Key,Wa as KeyboardShortcutContext,zb as KeyboardShortcutProvider,Un as LEGAL_PAGES,jc as Label,ef as LayoutSidebar,tf as License,Xt as LifeRing,rf as LinesY,af as Link4,of as LinkBroken,V6 as LinkLogo,Y6 as LinkPreview,Z6 as LinkPreviewPlaceholder,Kt as LinkedIn,t1 as LinkifyTooltipContent,wt as LoadingCircle,Pu as LoadingDots,Ne as LoadingSpinner,nf as LocationPin,sf as LockFill,It as Logo,Uo as Magic,lf as Magnifier,cf as MapPosition,df as MarketingTarget,ku as MatrixLines,Mr as MaxWidthWrapper,mf as Menu3,N2 as MenuItem,uf as MessageSmile,Jt as MicrophoneFill,E2 as MiniAreaChart,pf as MobilePhone,V2 as Modal,ff as MoneyBill,gf as MoneyBill2,bf as MoneyBills2,hf as Msgs,P3 as Nav,wo as NavContext,F3 as NavMobile,Dr as NavWordmark,Bu as NorthAmerica,vf as Note,Sf as NucleoPhoto,o1 as NumberTooltip,Wu as Oceania,xf as OfficeBuilding,Cg as PLAN_FEATURE_ICONS,Ra as Page2,B2 as PaginationControls,yf as Paintbrush,wf as Palette2,Nf as PaperPlane,Ju as Payoneer,Qu as Paypal,kf as Pen2,Cf as PenWriting,Pf as PercentageArrowDown,Go as Photo,Jo as Php,Rf as Plug2,Qt as Plus,Tf as Plus2,lt as Popover,rw as Popup,uu as PopupContext,Lf as Post,Lu as Prisma,Zo as ProductHunt,iw as ProgressBar,Mf as Pyramid,Qo as Python,Df as QRCode,At as RESOURCES,ud as RadioGroup,pd as RadioGroupItem,qo as Raycast,Ef as Receipt2,Vr as ReferredVia,If as Refresh2,Af as Robot,ea as Ruby,yo as SDKS,by as SOCIAL_LINKS,Wn as SOLUTIONS,Ta as SatelliteDish,Of as ScanText,zf as Scribble,Z2 as Sheet,Hf as ShieldAlert,Vf as ShieldCheck,_f as ShieldKeyhole,Ff as ShieldSlash,Bf as ShieldUser,Q2 as ShimmerDots,Wf as Shuffle,e1 as SimpleTooltipContent,Mu as Slack,$f as Sliders,o4 as SmartDateTimePicker,Ko as SortOrder,$u as SouthAmerica,Uf as Sparkle3,Zu as Spotify,Gf as SquareChart,Kf as SquareLayoutGrid5,jf as SquareLayoutGrid6,Yf as SquareXmark,Zf as Stars2,d4 as StatusBadge,ep as Stripe,tp as StripeLink,jo as Success,v4 as Switch,ag as TV,hw as TabSelect,U4 as Table,qf as TableIcon,Xf as TableRows2,Jf as Tablet,Qf as Tag,eg as Tags,Yo as Tick,Du as TikTok,La as Timer2,Eu as Tinybird,Ma as Toggle2Fill,q4 as ToggleGroup,tg as Toggles,Vg as TokenAvatar,J as Tooltip,Qg as TooltipContent,Jg as TooltipProvider,rg as Trash,og as TriangleWarning,jt as Twitter,ta as Typescript,ay as UTMBuilder,qd as UTM_PARAMETERS,ng as UiCard,Iu as Unsplash,ig as User,sg as UserCheck,lg as UserCrown,cg as UserDelete,dg as UserFocus,mg as UserPlus,ug as Users,fg as Users2,gg as Users6,Nt as UsersFill,pg as UsersSettings,rp as Venmo,bg as Versions2,Da as Views,hg as Watch,vg as Webhook,xg as Window,yg as WindowSearch,wg as WindowSettings,ii as Wordmark,Ng as Xmark,Yt as YouTube,Oi as badgeVariants,ne as buttonVariants,Ii as getUserAvatarUrl,No as navItems,Md as statusBadgeVariants,be as useCarousel,Va as useCarouselActiveIndex,db as useCookies,nt as useCopyToClipboard,gb as useCurrentAnchor,xb as useEnterSubmit,Cb as useInViewport,Sb as useInputFocused,Mb as useIntersectionObserver,it as useKeyboardShortcut,_b as useLocalStorage,j as useMediaQuery,Ub as useOptimisticUpdate,rh as usePagination,nh as useRemoveGAParams,ir as useResizeObserver,Ka as useRouterStuff,Za as useScroll,De as useScrollProgress,$4 as useTable,Ga as useTablePagination,yh as useToastWithUndo};
|