@dub/ui 0.2.56 → 0.2.58
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/charts/index.mjs +1 -1
- package/dist/chunk-6K6SQYA4.mjs +2 -0
- package/dist/chunk-6LFAF6RB.mjs +2 -0
- package/dist/chunk-77XETCTM.mjs +6 -0
- package/dist/chunk-AVS5H4JD.mjs +6 -0
- package/dist/chunk-BHKMM42W.mjs +2 -0
- package/dist/chunk-BIJC6OMV.mjs +2 -0
- package/dist/chunk-BVDQI7MU.mjs +2 -0
- package/dist/chunk-C3XKYKAU.mjs +2 -0
- package/dist/chunk-E3KEJ6S4.mjs +2 -0
- package/dist/chunk-EY3HINQT.mjs +6 -0
- package/dist/chunk-GKPNED2X.mjs +2 -0
- package/dist/chunk-GSCDQIMN.mjs +2 -0
- package/dist/chunk-GV56Y3D3.mjs +2 -0
- package/dist/chunk-HHCXVEDH.mjs +2 -0
- package/dist/chunk-HHTEK6SI.mjs +6 -0
- package/dist/chunk-HMYWBAZP.mjs +2 -0
- package/dist/chunk-I4SDRWNV.mjs +6 -0
- package/dist/chunk-IXGWY4YT.mjs +2 -0
- package/dist/chunk-JIUXCVSD.mjs +6 -0
- package/dist/chunk-JT7HEABT.mjs +6 -0
- package/dist/chunk-KWRSNRBL.mjs +2 -0
- package/dist/chunk-LHV5NSFJ.mjs +2 -0
- package/dist/chunk-LSPG3K6B.mjs +2 -0
- package/dist/chunk-MPAUQNBI.mjs +2 -0
- package/dist/chunk-N3KLPZ57.mjs +2 -0
- package/dist/chunk-NGB5JURQ.mjs +6 -0
- package/dist/chunk-NOEPOLTI.mjs +6 -0
- package/dist/chunk-SJX4PNOO.mjs +6 -0
- package/dist/chunk-TVJYQNM5.mjs +2 -0
- package/dist/chunk-UBBO57LP.mjs +2 -0
- package/dist/chunk-VNOFP2G2.mjs +2 -0
- package/dist/chunk-Y353MBBG.mjs +2 -0
- package/dist/chunk-YCGJGKMC.mjs +2 -0
- package/dist/icons/index.d.ts +30 -1
- package/dist/icons/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +61 -19
- package/dist/index.mjs +8 -7
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as hp,$a as xa,$b as Z0,$c as Ff,$d as Ag,A as Xu,Aa as Wp,Ab as L0,Ac as xf,Ad as cg,B as Ju,Ba as $p,Bb as M0,Bc as Ia,Bd as dg,C as Qu,Ca as ua,Cb as rr,Cc as yf,Cd as mg,D as Jt,Da as Up,Db as D0,Dc as wf,Dd as ug,E as ep,Ea as Gp,Eb as E0,Ec as Nf,Ed as pg,F as Qt,Fa as pa,Fb as I0,Fc as Aa,Fd as fg,G as tp,Ga as Kp,Gb as A0,Gc as Oa,Gd as gg,H as rp,Ha as jp,Hb as O0,Hc as Cf,Hd as bg,I as op,Ia as Yp,Ib as Ca,Ic as kf,Id as hg,J as ap,Ja as Zp,Jb as z0,Jc as Pf,Jd as vg,K as ia,Ka as qp,Kb as H0,Kc as Sf,Kd as xg,L as sa,La as Xp,Lb as V0,Lc as or,Ld as yg,M as la,Ma as Jp,Mb as _0,Mc as Rf,Md as wg,N as ca,Na as Qp,Nb as ka,Nc as Tf,Nd as Ng,O as da,Oa as e0,Ob as Pa,Oc as Lf,Od as Cg,P as np,Pa as t0,Pb as Sa,Pc as Mf,Pd as kg,Q as ip,Qa as fa,Qb as Ra,Qc as Df,Qd as Pg,R as sp,Ra as tr,Rb as F0,Rc as Ef,Rd as Sg,S as lp,Sa as ga,Sb as B0,Sc as If,Sd as _a,T as cp,Ta as ba,Tb as W0,Tc as Af,Td as Fa,U as dp,Ua as r0,Ub as $0,Uc as Of,Ud as Rg,V as mp,Va as o0,Vb as U0,Vc as zf,Vd as Tg,W as up,Wa as ha,Wb as G0,Wc as Hf,Wd as Lg,X as pp,Xa as a0,Xb as Ta,Xc as ar,Xd as Mg,Y as fp,Ya as n0,Yb as K0,Yc as za,Yd as Dg,Z as gp,Za as i0,Zb as j0,Zc as Vf,Zd as Eg,_ as bp,_a as va,_b as Y0,_c as _f,_d as Ig,a as Xo,aa as vp,ab as ya,ac as q0,ad as Bf,ae as Og,b as Wu,ba as xp,bb as s0,bc as X0,bd as Wf,be as zg,c as nt,ca as yp,cb as l0,cc as J0,cd as $f,ce as Hg,d as Zt,da as wp,db as c0,dc as Q0,dd as Uf,de as Vg,e as $u,ea as Np,eb as d0,ec as ef,ed as Ha,ee as _g,f as it,fa as Cp,fb as m0,fc as tf,fd as Gf,fe as St,g as st,ga as kp,gb as Gr,gc as La,gd as Kf,ge as Fg,h as Jo,ha as Pp,hb as u0,hc as rf,hd as jf,he as Bg,i as Qo,ia as Sp,ib as p0,ic as of,id as Yf,ie as Wg,j as Uu,ja as Rp,jb as f0,jc as af,jd as Zf,je as $g,k as Gu,ka as Tp,kb as wa,kc as Ma,kd as qf,ke as Ba,l as ea,la as Lp,lb as g0,lc as nf,ld as Xf,le as Ug,m as ta,ma as Mp,mb as b0,mc as sf,md as Jf,me as Gg,n as ra,na as ma,nb as h0,nc as Da,nd as nr,ne as Kg,o as oa,oa as Dp,ob as v0,oc as lf,od as Qf,oe as jg,p as Pt,pa as Ep,pb as x0,pc as Ea,pd as eg,pe as Yg,q as Ku,qa as Ip,qb as y0,qc as cf,qd as tg,qe as Zg,r as Ne,ra as Ap,rb as w0,rc as df,rd as rg,re as qg,s as ju,sa as Op,sb as N0,sc as mf,sd as og,t as qt,ta as zp,tb as C0,tc as uf,td as Kr,u as Yu,ua as Hp,ub as k0,uc as pf,ud as ag,v as Zu,va as Vp,vb as P0,vc as ff,vd as ng,w as Xt,wa as _p,wb as S0,wc as gf,wd as Va,x as qu,xa as er,xb as R0,xc as bf,xd as ig,y as aa,ya as Fp,yb as Na,yc as hf,yd as sg,z as na,za as Bp,zb as T0,zc as vf,zd as lg}from"./chunk-74LJJSLI.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as $r,b as Nt,c as Wo,d as $o,e as Ct,f as Uo,g as Go,h as kt,i as Ur,j as Ko,k as V,l as we,m as jo,n as fe,o as jt,p as i,q as Yt,r as Yo,s as Zo,t as qo}from"./chunk-WSLI5B4B.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as Ii}from"lucide-react";import*as sr from"react";import{jsx as ir,jsxs as Hi}from"react/jsx-runtime";var r1=ne.Root,Ai=sr.forwardRef(({className:e,...t},r)=>ir(ne.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ai.displayName="AccordionItem";var Oi=sr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let c=r==="chevron"?Ii:nr;return ir(ne.Header,{className:"flex",children:Hi(ne.Trigger,{ref:a,className:i("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,ir(c,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Oi.displayName=ne.Trigger.displayName;var zi=sr.forwardRef(({className:e,children:t,...r},o)=>ir(ne.Content,{ref:o,className:i("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}));zi.displayName=ne.Content.displayName;import{cva as Vi}from"class-variance-authority";import*as lr from"react";import{jsx as jr}from"react/jsx-runtime";var _i=Vi("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"}}),Fi=lr.forwardRef(({className:e,variant:t,...r},o)=>jr("div",{ref:o,role:"alert",className:i(_i({variant:t}),e),...r}));Fi.displayName="Alert";var Bi=lr.forwardRef(({className:e,...t},r)=>jr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Bi.displayName="AlertTitle";var Wi=lr.forwardRef(({className:e,...t},r)=>jr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));Wi.displayName="AlertDescription";import{sha256 as $i}from"js-sha256";import{useState as Ui}from"react";import{jsx as Yr}from"react/jsx-runtime";function Gi(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/${e.id}`;return e.email?`https://0.gravatar.com/avatar/${$i(e.email)}?d=${t}`:t}function d1({user:e={},className:t}){if(!e)return Yr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ui(Gi(e));return Yr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:i("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar/${e.id}`)}})}function m1({id:e,className:t}){return Yr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:i("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Ki}from"class-variance-authority";import{jsx as Yi}from"react/jsx-runtime";var ji=Ki("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 cr({className:e,variant:t,...r}){return Yi("span",{className:i(ji({variant:t}),e),...r})}import{cva as es}from"class-variance-authority";import{forwardRef as ts}from"react";import*as ge from"@radix-ui/react-tooltip";import Zi from"linkify-react";import{HelpCircle as qi}from"lucide-react";import Xi from"next/link";import{useState as Ji}from"react";import{Fragment as Qi,jsx as U,jsxs as Ge}from"react/jsx-runtime";function P1({children:e}){return U(ge.Provider,{delayDuration:150,children:e})}function J({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:c,delayDuration:d=0,...s}){let[m,l]=Ji(!1);return Ge(ge.Root,{open:o?!1:m,onOpenChange:l,delayDuration:d,disableHoverableContent:c,children:[U(ge.Trigger,{asChild:!0,onClick:()=>{l(!0)},onBlur:()=>{l(!1)},children:e}),U(ge.Portal,{children:U(ge.Content,{sideOffset:8,side:a,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,...s,children:typeof t=="string"?U("span",{className:i("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:l}):t})})]})}function S1({title:e,cta:t,href:r,target:o,onClick:a}){return Ge("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(Xi,{href:r,...o?{target:o}:{},className:i(ie({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(ee,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function R1({title:e,cta:t,href:r}){return Ge("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&Ge(Qi,{children:[" ",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:i("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(Zi,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:i("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function L1(e){return U(J,{...e,children:U(qi,{className:"h-4 w-4 text-neutral-500"})})}function M1({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(J,{content:Ge("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Ge("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Yt(e||0,{full:!0})," ",t]}),a&&Ge("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Go(a,{withAgo:!0})]})]}),children:o})}function D1({children:e,content:t,...r}){return U(J,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(cr,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function E1({children:e,tooltipProps:t,...r}){return U(J,{...t,children:U("button",{type:"button",...r,className:i("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 dr({children:e,tooltipProps:t}){return t?U(J,{...t,children:U("div",{children:e})}):e}import{jsx as lt,jsxs as Wa}from"react/jsx-runtime";var ie=es("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:i("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"}}),ee=ts(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:c,icon:d,shortcut:s,disabledTooltip:m,right:l,...n},u)=>m?lt(J,{content:m,children:Wa("div",{className:i("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:[d,e&<("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&<("kbd",{className:i("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:s})]})}):Wa("button",{ref:u,type:n.onClick?"button":"submit",className:i("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",n.disabled||c?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ie({variant:t}),r),disabled:n.disabled||c,...n,children:[c?lt(Ne,{}):d||null,e&<("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&<("kbd",{className:i("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:s}),l]}));ee.displayName="Button";import{cva as rs}from"class-variance-authority";import{createContext as os}from"react";import{jsx as $a}from"react/jsx-runtime";var as=rs("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"}}}),Rt=os({variant:"loose",loading:!1});function Ua({variant:e="loose",loading:t=!1,className:r,children:o}){return $a("ul",{className:i(as({variant:e,loading:t}),r),"data-variant":e,children:$a(Rt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as ns}from"class-variance-authority";import{createContext as is,useContext as ss,useEffect as ls,useRef as cs,useState as ds}from"react";import{jsx as Ga,jsxs as ps}from"react/jsx-runtime";var ms=ns("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"}}}),us="w-full py-2.5 px-4",Zr=is({hovered:!1});function Ka({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:c=!0,banner:d}){let{variant:s}=ss(Rt),m=cs(null),[l,n]=ds(!1);ls(()=>{if(!l||!m.current)return;let p=setInterval(()=>{var b;((b=m.current)==null?void 0:b.matches(":hover"))===!1&&n(!1)},1e3);return()=>clearInterval(p)},[l]);let u=p=>!(document.getElementById("modal-backdrop")||kt(p));return ps("li",{ref:m,className:i(ms({variant:s}),e),onPointerEnter:()=>n(!0),onPointerLeave:()=>n(!1),"data-hover-state-enabled":c,children:[d,Ga("div",{className:i(us,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:Ga(Zr.Provider,{value:{hovered:l},children:r})})]})}var rb=Object.assign(Ua,{Card:Object.assign(Ka,{Context:Zr}),Context:Rt});import fs from"embla-carousel-autoplay";import gs from"embla-carousel-react";import{ArrowLeft as bs,ArrowRight as hs}from"lucide-react";import{createContext as vs,forwardRef as Lt,useCallback as Tt,useContext as xs,useEffect as qr,useState as Xr}from"react";import{jsx as Ce,jsxs as Za}from"react/jsx-runtime";var Jr=2e3,ja=vs(null);function be(){let e=xs(ja);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Ya(){let{api:e}=be(),[t,r]=Xr(0),o=Tt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return qr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var ys=Lt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:c,children:d,...s},m)=>{let[l,n]=gs({...t,axis:e==="horizontal"?"x":"y"},[...o?[fs(typeof o=="object"?o:{delay:Jr})]:[],...a||[]]),[u,p]=Xr(!1),[b,f]=Xr(!1),x=Tt(P=>{!P||(p(P.canScrollPrev()),f(P.canScrollNext()))},[]),v=Tt(()=>{n==null||n.scrollPrev()},[n]),w=Tt(()=>{n==null||n.scrollNext()},[n]),y=Tt(P=>{P.key==="ArrowLeft"?(P.preventDefault(),v()):P.key==="ArrowRight"&&(P.preventDefault(),w())},[v,w]);return qr(()=>{!n||!r||r(n)},[n,r]),qr(()=>{if(!!n)return x(n),n.on("reInit",x),n.on("select",x),()=>{n==null||n.off("select",x)}},[n,x]),Ce(ja.Provider,{value:{carouselRef:l,api:n,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:w,canScrollPrev:u,canScrollNext:b},children:Ce("div",{ref:m,onKeyDownCapture:y,className:i("relative",c),role:"region","aria-roledescription":"carousel",...s,children:d})})});ys.displayName="Carousel";var ws=Lt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=be();return Ce("div",{ref:o,className:"overflow-hidden",children:Ce("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ws.displayName="CarouselContent";var Ns=Lt(({className:e,...t},r)=>{let{orientation:o}=be();return Ce("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});Ns.displayName="CarouselItem";var Cs=Lt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:c}=be();return Za("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Ce(bs,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Previous slide"})]})});Cs.displayName="CarouselPrevious";var ks=Lt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:c}=be();return Za("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",ie({variant:"secondary",className:"p-2"}),e),disabled:!c,onClick:a,...t,children:[Ce(hs,{className:"h-4 w-4"}),Ce("span",{className:"sr-only",children:"Next slide"})]})});ks.displayName="CarouselNext";import{cva as Ps}from"class-variance-authority";import{motion as Ss}from"framer-motion";import{ChevronLeft as Rs,ChevronRight as Ts}from"lucide-react";import*as Me from"react";import{jsx as Ke,jsxs as Mt}from"react/jsx-runtime";var Ls=Ps("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 "}}}),yb=({variant:e="simple",className:t})=>{var f;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:c,api:d}=be(),s=(f=d==null?void 0:d.plugins())==null?void 0:f.autoplay,[m,l]=Me.useState(0),[n,u]=Me.useState(!1),p=Me.useCallback(x=>{l((x==null?void 0:x.selectedScrollSnap())??0)},[]),b=Me.useCallback(x=>()=>{s&&s.isPlaying()&&s.stop(),x()},[s]);return Me.useEffect(()=>{!d||(p(d),u((s==null?void 0:s.isPlaying())??!1),d.on("reInit",p),d.on("select",p),d.on("autoplay:play",()=>u(!0)),d.on("autoplay:stop",()=>u(!1)))},[d,s,p]),Mt("div",{className:i(Ls({variant:e}),t),children:[e!=="simple"&&Mt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!c,onClick:b(o),children:[Ke(Rs,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Previous slide"})]}),d!=null&&Ke("div",{className:"flex items-center gap-1",children:d.slideNodes().map((x,v)=>Mt("button",{onClick:b(()=>d.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ke("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===m?"bg-black":"bg-black/20",n&&v===m&&"w-6 bg-black/20"),children:n&&v===m&&Ke(Ss.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??Jr)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Mt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Mt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:b(r),children:[Ke(Ts,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Next slide"})]})]})};import Ms from"embla-carousel-react";import{forwardRef as Ds,useCallback as Es,useEffect as Is}from"react";import{jsx as mr}from"react/jsx-runtime";var Lb=({className:e,...t})=>{let{api:r}=be(),[o,a]=Ms({dragFree:!0}),c=Es(d=>{!d||!a||a==null||a.scrollTo(d.selectedScrollSnap())},[a]);return Is(()=>{if(!(!r||!a))return c(r),r.on("reInit",c),r.on("select",c),()=>{r==null||r.off("reInit",c),r==null||r.off("select",c)}},[r,a,c]),mr("div",{className:"overflow-hidden",ref:o,children:mr("div",{className:i("mx-4 flex gap-4",e),...t})})},Mb=Ds(({index:e,className:t,...r},o)=>{let{api:a}=be(),c=Ya();return mr("div",{ref:o,children:mr("button",{type:"button",onClick:()=>{var s;if(!a)return;let d=(s=a.plugins())==null?void 0:s.autoplay;d&&d.isPlaying()&&d.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===c}):t,...r})})});import*as Dt from"@radix-ui/react-checkbox";import{forwardRef as As}from"react";import{jsx as Qr,jsxs as Os}from"react/jsx-runtime";var ct=As(({className:e,...t},r)=>Qr(Dt.Root,{ref:r,className:i("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 data-[state=indeterminate]:bg-blue-500",e),...t,children:Os(Dt.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[Qr(tr,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),Qr(za,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));ct.displayName=Dt.Root.displayName;import{Command as It,CommandInput as Sl,CommandItem as Rl,useCommandState as Tl}from"cmdk";import{ChevronDown as Ll}from"lucide-react";import{forwardRef as Ml,isValidElement as Dl,useCallback as El,useEffect as gr,useRef as Il,useState as Et}from"react";import{motion as Cl}from"framer-motion";import{forwardRef as kl,useRef as Pl}from"react";import eo from"js-cookie";import{useEffect as zs,useState as Hs}from"react";function Vb(e,t,r){let[o,a]=Hs(()=>{let d=eo.get(e);return d?JSON.parse(d):t});return zs(()=>{let d=()=>{let s=eo.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}},[e]),[o,d=>{a(d),eo.set(e,JSON.stringify(d),r)}]}import{useCallback as Vs,useEffect as _s,useRef as Fs,useState as Bs}from"react";var dt=(e=3e3)=>{let t=Fs(null),[r,o]=Bs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},c=Vs(async(d,{onSuccess:s,throwOnError:m}={})=>{a();try{typeof d=="string"?await navigator.clipboard.writeText(d):d instanceof ClipboardItem&&await navigator.clipboard.write([d]),o(!0),s==null||s(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(l){if(console.error("Failed to copy: ",l),m)throw l}},[e]);return _s(()=>()=>a(),[]),[r,c]};import{useEffect as Ws,useState as $s}from"react";function $b(){let[e,t]=$s(null);return Ws(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var u,p,b;let m=s[0];if(!m)return;let l=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let f=1;f<s.length;f++){let x=s[f];if(!x)break;(x.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=x)}let n=m.target;for(;n&&n.getBoundingClientRect().bottom<o;)n=(p=c.get(n))==null?void 0:p.next;for(;n&&n.getBoundingClientRect().top>l;)n=(b=c.get(n))==null?void 0:b.prev;n&&t(n.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),c=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Us}from"react";function jb(e){return{handleKeyDown:Us(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 Gs,useState as Ks}from"react";function Xb(e,t={}){let{root:r,defaultValue:o}=t,[a,c]=Ks(o??!1);return Gs(()=>{let d=()=>{let m=e.current;if(!m)return;let l=r==null?void 0:r.current,n=m.getBoundingClientRect(),u=l?l.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};c(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",d),window.addEventListener("resize",d);let s=null;return e.current&&(s=new IntersectionObserver(d),s.observe(e.current)),d(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",d),window.removeEventListener("resize",d),s==null||s.disconnect()}},[e,r]),a}import{useEffect as js,useState as Ys}from"react";function eh(){let[e,t]=Ys(!1);return js(()=>{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 qs}from"react";function ah(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[c,d]=qs(),s=(c==null?void 0:c.isIntersecting)&&a,m=([l])=>{d(l)};return Zs(()=>{let l=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!l)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(l),()=>p.disconnect()},[e,JSON.stringify(t),r,o,s]),c}import{createContext as Xs,useCallback as Js,useContext as Qs,useEffect as qa,useId as el,useState as tl}from"react";import{jsx as rl}from"react/jsx-runtime";var Xa=Xs({listeners:[],setListeners:()=>{}});function dh({children:e}){let[t,r]=tl([]);return rl(Xa.Provider,{value:{listeners:t,setListeners:r},children:e})}function De(e,t,r={}){let o=el(),{listeners:a,setListeners:c}=Qs(Xa),d=Js(s=>{if(r.enabled===!1)return;let m=s.target,l=document.getElementById("modal-backdrop"),n=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!l!=!!r.modal||!!n!=!!r.sheet)return;let u=[...s.metaKey?["meta"]:[],...s.ctrlKey?["ctrl"]:[],...s.altKey?["alt"]:[],s.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(f=>f.enabled!==!1&&!!l==!!f.modal&&!!n==!!f.sheet&&(Array.isArray(f.key)?f.key.includes(u):f.key===u));!p.length||Uo(p,(f,x)=>(x.priority??0)-(f.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);qa(()=>(document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)),[d]),qa(()=>(c(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>c(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{useEffect as ol,useState as al}from"react";function Ja(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function ph(e,t){let[r,o]=al(Ja(e)??t);return ol(()=>{let c=Ja(e);c&&o(c)},[e]),[r,c=>{o(c),window.localStorage.setItem(e,JSON.stringify(c))}]}import{toast as nl}from"sonner";import il from"swr";function vh(e,t){let{data:r,isLoading:o,mutate:a}=il(e,fe);return{data:r,isLoading:o,update:async(c,d)=>nl.promise(a(c(r),{optimisticData:d,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 rn,useMemo as ul}from"react";import{useEffect as Qa,useState as sl}from"react";function en({pageSize:e,page:t,onPageChange:r}){let[o,a]=sl({pageIndex:t,pageSize:e});return Qa(()=>{a(c=>({...c,pageIndex:t}))},[t]),Qa(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as ll,useRouter as cl,useSearchParams as dl}from"next/navigation";import{useCallback as ml}from"react";function tn(){let e=ll(),t=cl(),r=dl(),o=Object.fromEntries(r),a=(d,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let n=new URLSearchParams;r.forEach((u,p)=>{var b;(b=s.include)!=null&&b.includes(p)&&n.set(p,u)}),m=n}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(n=>m.delete(n)),d&&Object.entries(d).forEach(([n,u])=>m.set(n,u));let l=m.toString();return l.length>0?`?${l}`:""},c=ml(({set:d,del:s,replace:m,scroll:l=!0,getNewPath:n,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);d&&Object.entries(d).forEach(([x,v])=>p.set(x,Array.isArray(v)?v.join(u):v)),s&&(Array.isArray(s)?s.forEach(x=>p.delete(x)):p.delete(s));let b=p.toString(),f=`${e}${b.length>0?`?${b}`:""}`;if(n)return f;m?t.replace(f,{scroll:!1}):t.push(f,{scroll:l})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:c,getQueryString:a}}function Mh(e=Zo){let{searchParams:t,queryParams:r}=tn(),o=ul(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:c}=en({pageSize:e,page:o,onPageChange:d=>{r(d===1?{del:"page",scroll:!1}:{set:{page:d.toString()},scroll:!1})}});return rn(()=>{let d=parseInt(t.get("page")||"1")||1;c(s=>({...s,pageIndex:d}))},[t.get("page")]),rn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:c}}import{useEffect as pl}from"react";function Ih(){pl(()=>{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 fl,useState as gl}from"react";function ur(e){let[t,r]=gl(),o=([a])=>{r(a)};return fl(()=>{let a=e==null?void 0:e.current;if(!a)return;let c=new ResizeObserver(o);return c.observe(a),()=>c.disconnect()},[e]),t}import{useCallback as bl,useEffect as on,useState as hl}from"react";function an(e,{container:t}={}){let[r,o]=hl(!1),a=bl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return on(()=>{let c=(t==null?void 0:t.current)??window;return c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)},[a]),on(()=>{a()},[a]),r}import{useCallback as vl,useEffect as xl,useState as yl}from"react";function Ee(e){let[t,r]=yl(1),o=vl(()=>{if(!e.current)return;let{scrollTop:c,scrollHeight:d,clientHeight:s}=e.current;r(d===s?1:Math.min(c/(d-s),1))},[]),a=ur(e);return xl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as wl}from"react";import{toast as sn}from"sonner";import{jsx as pr,jsxs as nn}from"react/jsx-runtime";function Nl({id:e,message:t,undo:r}){let o=()=>{r(),sn.dismiss(e)},a=c=>{c.key==="z"&&(c.ctrlKey||c.metaKey)&&o()};return wl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),nn("div",{className:"flex w-full items-center justify-between space-x-2",children:[nn("div",{className:"flex items-center space-x-2",children:[pr(ra,{}),pr("p",{className:"font-medium",children:t})]}),pr("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})=>sn(pr(Nl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as ln}from"react/jsx-runtime";var ke=kl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...c},d)=>{var l,n;let s=Pl(null),m=ur(s);return ln(Cl.div,{ref:d,className:i("overflow-hidden",r),animate:{width:e?((l=m==null?void 0:m.contentRect)==null?void 0:l.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},...c,children:ln("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});ke.displayName="AnimatedSizeContainer";import*as Ie from"@radix-ui/react-popover";import{Drawer as mt}from"vaul";import{jsx as Pe,jsxs as fr}from"react/jsx-runtime";function Ae({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:c,mobileOnly:d,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:l,sticky:n,onEscapeKeyDown:u,onWheel:p}){let{isMobile:b}=Y();return d||b?fr(mt.Root,{open:a,onOpenChange:c,children:[Pe(mt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),fr(mt.Portal,{children:[Pe(mt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),fr(mt.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:f=>{f.target instanceof Element&&f.target.closest("[data-sonner-toast]")&&f.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(mt.Overlay,{})]})]}):fr(Ie.Root,{open:a,onOpenChange:c,children:[Pe(Ie.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Pe(Ie.Portal,{children:Pe(Ie.Content,{sideOffset:8,align:r,side:o,className:i("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",s),sticky:n,collisionBoundary:l,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as br,jsx as E,jsxs as Se}from"react/jsx-runtime";function Al(e,t){return e===!0}function Cv({multiple:e,selected:t,setSelected:r,options:o,icon:a,placeholder:c="Select...",searchPlaceholder:d="Search...",emptyState:s,createLabel:m,onCreate:l,buttonProps:n,shortcutHint:u,caret:p,side:b,open:f,onOpenChange:x,onSearchChange:v,shouldFilter:w=!0,inputRight:y,inputClassName:P,optionRight:N,optionClassName:C,matchTriggerWidth:W,hideSearch:M=!1,children:D}){let L=Al(e,r),S=Array.isArray(t)?t:t?[t]:[],{isMobile:h}=Y(),[R,G]=Et(!1),k=f??R,ue=x??G,[$,Fr]=Et(""),[_o,Br]=Et(!1),[Wr,Mi]=Et(void 0),[Di,Fo]=Et(!1),Ei=H=>{var at;if(L){let $e=S.some(({value:Ue})=>Ue===H.value);r($e?S.filter(({value:Ue})=>Ue!==H.value):[...S,H])}else r(S.length&&((at=S[0])==null?void 0:at.value)===H.value?null:H),ue(!1)},Bo=El((H,at)=>at===""?[...H.filter($e=>$e.first&&!S.some(Ue=>Ue.value===$e.value)),...S,...H.filter($e=>!$e.first&&!S.some(Ue=>Ue.value===$e.value))]:H,[S]);return gr(()=>{_o&&(Mi(o&&Bo(o,$)),Br(!1))},[_o,o,Bo,$]),gr(()=>{Br(!0)},[o]),gr(()=>{k||(Fr(""),Br(!0))},[k]),gr(()=>v==null?void 0:v($),[$]),E(Ae,{openPopover:k,setOpenPopover:ue,align:"start",side:b,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(W&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(ke,{width:!h&&!W,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Se(It,{loop:!0,shouldFilter:w,children:[!M&&Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Sl,{placeholder:d,value:$,onValueChange:Fr,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",P),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!$)&&(H.preventDefault(),H.stopPropagation(),ue(!1))}}),y&&E("div",{className:"mr-2",children:y}),u&&E("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})]}),E(Ol,{children:E(It.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Wr!==void 0?Se(br,{children:[Wr.map(H=>E(zl,{option:H,multiple:L,selected:S.some(({value:at})=>at===H.value),onSelect:()=>Ei(H),right:N==null?void 0:N(H),className:C},`${H.label}, ${H.value}`)),$.length>0&&l&&Se(Rl,{className:i("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",C),onSelect:async()=>{Fo(!0),await(l==null?void 0:l($))&&(Fr(""),ue(!1)),Fo(!1)},children:[Di?E(Ne,{className:"size-4 shrink-0"}):E(nr,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(m==null?void 0:m($))||`Create "${$}"`})]}),w?E(Vl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):Wr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):E(It.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Ne,{})})})})})]})}),children:E(ee,{variant:"secondary",...n,className:i(n==null?void 0:n.className,"flex gap-2"),textWrapperClassName:i(n==null?void 0:n.textWrapperClassName,"w-full flex items-center justify-start"),text:Se(br,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:D||S.map(H=>H.label).join(", ")||c}),p&&(p===!0?E(Ll,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):p)]}),icon:a?cn(a)?a:E(a,{className:"size-4 shrink-0"}):void 0})})}var Ol=({children:e})=>{let t=Il(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return Se(br,{children:[E("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),E("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 zl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:c}){return Se(br,{children:[E(Hl,{disabledTooltip:e.disabledTooltip,children:Se(It.Item,{className:i("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",c),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&E("div",{className:"shrink-0 text-neutral-600",children:o?E(ga,{className:"size-4 text-neutral-600"}):E(ba,{className:"size-4 text-neutral-400"})}),Se("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:cn(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(tr,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(It.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Hl=({children:e,disabledTooltip:t})=>t?E(J,{content:t,children:E("div",{children:e})}):e,cn=e=>Dl(e),Vl=Ml((e,t)=>Tl(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as hr,format as _l,isSameMonth as Fl}from"date-fns";import{ChevronLeft as dn,ChevronRight as mn,ChevronsLeft as Bl,ChevronsRight as Wl}from"lucide-react";import{forwardRef as $l,useRef as Ul}from"react";import{DayPicker as Gl,useDayPicker as Kl,useDayRender as jl,useNavigation as Yl}from"react-day-picker";import{Fragment as Zl,jsx as re,jsxs as vr}from"react/jsx-runtime";var At=$l(({onClick:e,icon:t,disabled:r,...o},a)=>re("button",{ref:a,type:"button",disabled:r,className:i("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:re(t,{className:"h-full w-full shrink-0"})}));At.displayName="NavigationButton";function un({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:c,className:d,classNames:s,...m}){return re(Gl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:c,showOutsideDays:r===1,className:d,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:i("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",...s},components:{IconLeft:()=>re(dn,{className:"h-4 w-4"}),IconRight:()=>re(mn,{className:"h-4 w-4"}),Caption:({...l})=>{let{goToMonth:n,nextMonth:u,previousMonth:p,currentMonth:b,displayMonths:f}=Yl(),{numberOfMonths:x,fromDate:v,toDate:w}=Kl(),y=f.findIndex(L=>Fl(l.displayMonth,L)),P=y===0,N=y===f.length-1,C=x>1&&(P||!N),W=x>1&&(N||!P),M=()=>{let L=hr(b,-1);p&&(!v||L.getTime()>=v.getTime())&&n(L)},D=()=>{let L=hr(b,1);u&&(!w||L.getTime()<=w.getTime())&&n(L)};return vr("div",{className:"flex items-center justify-between",children:[vr("div",{className:"flex items-center gap-1",children:[o&&!W&&re(At,{disabled:a||!p||v&&hr(b,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:M,icon:Bl}),!W&&re(At,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&n(p),icon:dn})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:_l(l.displayMonth,"LLLL yyy",{locale:c})}),vr("div",{className:"flex items-center gap-1",children:[!C&&re(At,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&n(u),icon:mn}),o&&!C&&re(At,{disabled:a||!u||w&&hr(b,1).getTime()>w.getTime(),"aria-label":"Go to next year",onClick:D,icon:Wl})]})]})},Day:({date:l,displayMonth:n})=>{let u=Ul(null),{activeModifiers:p,buttonProps:b,divProps:f,isButton:x,isHidden:v}=jl(l,n,u),{selected:w,today:y,disabled:P,range_middle:N}=p;if(v)return re(Zl,{});if(!x)return re("div",{...f,className:i("flex items-center justify-center",f.className)});let{children:C,...W}=b;return vr("button",{ref:u,...W,type:"button",children:[C,y&&re("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!w,"!bg-white":w,"!bg-blue-400":w&&N,"text-neutral-400":P})})]})}},...m})}import{enUS as ic}from"date-fns/locale";import{useEffect as io,useMemo as fn,useRef as sc,useState as yr}from"react";import{Command as to}from"cmdk";import{Lock as ql}from"lucide-react";import{jsx as je,jsxs as Xl}from"react/jsx-runtime";var ro=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=l=>"dateRange"in l,c=l=>"date"in l,d=(l,n)=>l.getDate()===n.getDate()&&l.getMonth()===n.getMonth()&&l.getFullYear()===n.getFullYear(),s=(l,n)=>{let u=l.from,p=n.from,b=!1;u&&p&&d(u,p)&&(b=!0);let f=l.to,x=n.to,v=!1;return f&&x&&d(f,x)&&(v=!0),b&&v},m=l=>{if(o)return o===l.id;if(a(l)){let n=r;return n&&s(n,l.dateRange)}else if(c(l)){let n=r;return n&&d(n,l.date)}return!1};return je(to,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:je(to.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((l,n)=>Xl(to.Item,{disabled:l.requiresUpgrade,onSelect:()=>t(l),title:l.label,value:l.id,className:i("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(l)&&"font-semibold text-neutral-800"),children:[je("span",{children:l.label}),l.requiresUpgrade?je(ql,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.shortcut?je("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:l.shortcut.toUpperCase()}):null,l.requiresUpgrade&&l.tooltipContent&&je(J,{side:"bottom",content:l.tooltipContent,children:je("div",{className:"absolute inset-0 cursor-not-allowed"})})]},n))})})};ro.displayName="DatePicker.Presets";import{format as Oe}from"date-fns";import{createContext as Jl}from"react";var oo=Jl({isOpen:!1,setIsOpen:()=>{}}),Ql=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},ao=(e,t,r=!1)=>{let o=!Ql(),a;return r?a=o?Oe(e,"d MMM, yyyy h:mm a",{locale:t}):Oe(e,"d MMM, yyyy HH:mm",{locale:t}):a=Oe(e,"d MMM, yyyy",{locale:t}),a},pn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:c,fromDay:d,toDay:s}=t;if(e&&e.length>0){let m=o,l=r;e.forEach(n=>{var u,p,b,f,x,v;if("date"in n){let w=n.date.getFullYear();if(o&&w<o)throw new Error(`Preset ${n.label} is before fromYear ${m}.`);if(r&&w>r)throw new Error(`Preset ${n.label} is after toYear ${l}.`);if(a&&n.date.getMonth()<a.getMonth())throw new Error(`Preset ${n.label} is before fromMonth ${a}.`);if(c&&n.date.getMonth()>c.getMonth())throw new Error(`Preset ${n.label} is after toMonth ${c}.`);if(d&&n.date.getDate()<d.getDate())throw new Error(`Preset ${n.label} is before fromDay ${d}.`);if(s&&n.date.getDate()>s.getDate())throw new Error(`Preset ${n.label} is after toDay ${Oe(s,"MMM dd, yyyy")}.`)}if("dateRange"in n){let w=(u=n.dateRange.from)==null?void 0:u.getFullYear(),y=(p=n.dateRange.to)==null?void 0:p.getFullYear();if(w&&o&&w<o)throw new Error(`Preset ${n.label}'s 'from' is before fromYear ${m}.`);if(y&&r&&y>r)throw new Error(`Preset ${n.label}'s 'to' is after toYear ${l}.`);if(a){let P=(b=n.dateRange.from)==null?void 0:b.getMonth();if(P&&P<a.getMonth())throw new Error(`Preset ${n.label}'s 'from' is before fromMonth ${Oe(a,"MMM, yyyy")}.`)}if(c){let P=(f=n.dateRange.to)==null?void 0:f.getMonth();if(P&&P>c.getMonth())throw new Error(`Preset ${n.label}'s 'to' is after toMonth ${Oe(c,"MMM, yyyy")}.`)}if(d){let P=(x=n.dateRange.from)==null?void 0:x.getDate();if(P&&P<d.getDate())throw new Error(`Preset ${n.dateRange.from}'s 'from' is before fromDay ${Oe(d,"MMM dd, yyyy")}.`)}if(s){let P=(v=n.dateRange.to)==null?void 0:v.getDate();if(P&&P>s.getDate())throw new Error(`Preset ${n.label}'s 'to' is after toDay ${Oe(s,"MMM dd, yyyy")}.`)}}})}};import{cva as ec}from"class-variance-authority";import{Calendar as tc,ChevronDown as rc}from"lucide-react";import{forwardRef as oc}from"react";import{jsx as xr,jsxs as nc}from"react/jsx-runtime";var ac=ec(["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"}}}),no=oc(({className:e,children:t,placeholder:r,hasError:o,...a},c)=>nc("button",{ref:c,className:i(ac({hasError:o}),e),...a,children:[xr(tc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),xr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?xr("span",{className:"text-neutral-400",children:r}):null)}),xr(rc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));no.displayName="DatePicker.Trigger";import{jsx as oe,jsxs as gn}from"react/jsx-runtime";var lc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:c,disableNavigation:d,disabledDays:s,showYearNavigation:m=!1,locale:l=ic,placeholder:n="Select date range",hasError:u,align:p="center",className:b,...f})=>{let{isDesktop:x}=Y(),[v,w]=yr(!1),[y,P]=yr(a&&r?a==null?void 0:a.find(({id:k})=>k===r):void 0),[N,C]=yr((y==null?void 0:y.dateRange)??e??t??void 0),[W,M]=yr(N==null?void 0:N.to),D=fn(()=>N,[v]);io(()=>{C(e)},[e]),io(()=>{let k=a==null?void 0:a.find(({id:ue})=>ue===r);P(k),C((k==null?void 0:k.dateRange)??e??t)},[a,r]),io(()=>{v?N&&M(N.to):M(N==null?void 0:N.to)},[v]);let L=(k,ue)=>{let $=(N==null?void 0:N.from)&&(N==null?void 0:N.to)?{from:ue}:k;C($),P(void 0),($==null?void 0:$.from)&&($==null?void 0:$.to)&&(o==null||o($),w(!1))},S=k=>{C(k.dateRange),P(k),o==null||o(k.dateRange,k),w(!1)},h=()=>{C(D),w(!1)},R=k=>{k||h(),w(k)},G=fn(()=>N?`${N.from?ao(N.from,l):""} - ${N.to?ao(N.to,l):""}`:null,[N,l]);return De((a==null?void 0:a.filter(k=>k.shortcut).map(k=>k.shortcut))??[],k=>{let ue=a==null?void 0:a.find($=>$.shortcut===k.key);ue&&S(ue)}),oe(oo.Provider,{value:{isOpen:v,setIsOpen:w},children:oe(Ae,{align:p,openPopover:v,setOpenPopover:R,popoverContentClassName:"rounded-xl",content:oe("div",{className:"flex w-full",children:gn("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&&oe(cc,{children:oe("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:oe("div",{className:"sm:py-3",children:oe(ro,{currentPresetId:r,currentValue:N,presets:a,onSelect:S})})})}),oe("div",{className:"scrollbar-hide overflow-x-scroll",children:oe(un,{mode:"range",selected:N,onSelect:L,month:W,onMonthChange:M,numberOfMonths:x?2:1,disabled:s,disableNavigation:d,showYearNavigation:m,locale:l,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...f})})]})}),children:oe(no,{placeholder:n,disabled:c,className:b,hasError:u,"aria-required":f.required||f["aria-required"],"aria-invalid":f["aria-invalid"],"aria-label":f["aria-label"],"aria-labelledby":f["aria-labelledby"],children:(y==null?void 0:y.label)??G})})})};function sx({presets:e,...t}){return e&&pn(e,t),oe(lc,{presets:e,...t})}function cc({children:e}){let t=sc(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return gn("div",{className:"relative sm:h-full",children:[oe("div",{ref:t,onScroll:o,className:i("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}),oe("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{useId as dc}from"react";import{jsx as wr,jsxs as mc}from"react/jsx-runtime";function gx({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=dc();return mc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[wr("defs",{children:wr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:wr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),wr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import uc from"next/link";import{useEffect as pc,useState as bn}from"react";import fc from"swr";import{jsx as so,jsxs as hn}from"react/jsx-runtime";function vn({className:e}){let{data:t}=fc("https://status.dub.co/api/v1/summary",fe),[r,o]=bn("bg-neutral-200"),[a,c]=bn("Loading status...");return pc(()=>{if(!t)return;let{ongoing_incidents:d}=t;if(d.length>0){let{current_worst_impact:s,name:m}=d[0],l=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";c(m),o(l)}else c("All systems operational"),o("bg-green-500")},[t]),hn(uc,{href:"https://status.dub.co",target:"_blank",className:i("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:[hn("div",{className:"relative size-2",children:[so("div",{className:i("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")}),so("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),so("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Nr,jsxs as xn}from"react/jsx-runtime";function Cx({icon:e,title:t,description:r,learnMore:o,children:a}){return xn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Nr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Nr(e,{className:"size-6 text-neutral-800"})}),Nr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&xn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Nr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as gc}from"class-variance-authority";import{useState as yn}from"react";import{toast as wn}from"sonner";import{Fragment as hc,jsx as he,jsxs as co}from"react/jsx-runtime";var Nn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],lo={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:Nn,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:[...Nn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},bc=gc("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 Ax({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:c,previewClassName:d,icon:s=wa,customPreview:m,accept:l="any",imageSrc:n,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:b=!0,content:f,maxFileSizeMB:x=0,targetResolution:v,accessibilityLabel:w="File upload",disabled:y=!1}){let[P,N]=yn(!1),[C,W]=yn(null),M=async D=>{let L="dataTransfer"in D?D.dataTransfer.files&&D.dataTransfer.files[0]:D.target.files&&D.target.files[0];if(!L)return;if(W(L.name),x>0&&L.size/1024/1024>x){wn.error(`File size too big (max ${x} MB)`);return}let S=lo[l].types;if(S.length&&!S.includes(L.type)){wn.error(lo[l].errorMessage??"File type not supported");return}let h=L;if(v&&L.type.startsWith("image/"))try{let R=await $o(L,v),G=await fetch(R).then(k=>k.blob());h=new File([G],L.name,{type:L.type})}catch(R){console.error("Error resizing image:",R)}if(t){let R=new FileReader;R.onload=G=>{var k;return r==null?void 0:r({src:(k=G.target)==null?void 0:k.result,file:h})},R.readAsDataURL(h);return}r==null||r({file:h})};return co("label",{className:i(bc({variant:o}),y?"cursor-not-allowed":i(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(Pt,{})}),he("div",{className:"absolute inset-0 z-[5]",onDragOver:D=>{D.preventDefault(),D.stopPropagation(),N(!0)},onDragEnter:D=>{D.preventDefault(),D.stopPropagation(),N(!0)},onDragLeave:D=>{D.preventDefault(),D.stopPropagation(),N(!1)},onDrop:async D=>{D.preventDefault(),D.stopPropagation(),M(D),N(!1)}}),co("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",y&&"bg-neutral-50",P&&!y&&"cursor-copy border-black bg-neutral-50 opacity-100",n?i("opacity-0",b&&!y&&"group-hover:opacity-100"):i(!y&&"group-hover:bg-neutral-50")),children:[he(s,{className:i("size-7 transition-all duration-75",y?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",P?"scale-110":"scale-100"),c)}),f!==null&&he("div",{className:i("mt-2 text-center text-sm text-neutral-500",y&&"text-neutral-400"),children:f??he(hc,{children:co("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),he("span",{className:"sr-only",children:w})]}),n&&(m??he("img",{src:n,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",d)})),p&&he("div",{className:"sr-only mt-1 flex shadow-sm",children:he("input",{id:e,type:"file",accept:lo[l].types.join(","),onChange:M,disabled:y},C)})]})}import{AnimatePresence as vc,motion as Cn}from"framer-motion";import{X as xc}from"lucide-react";import yc from"next/link";import{isValidElement as wc}from"react";import{Fragment as Nc,jsx as Q,jsxs as Ot}from"react/jsx-runtime";function Pn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return De("Escape",o,{priority:1}),Q(ke,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Ot("div",{className:i("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(vc,{children:t==null?void 0:t.map(({key:c,value:d})=>{if(c==="loader")return Q(Cn.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-${d}`);let s=e.find(m=>m.key===c);return s?(s.multiple&&Array.isArray(d)?d:[d]).map(m=>{var b,f,x,v;let l=(b=s.options)==null?void 0:b.find(w=>typeof w.value=="string"&&typeof m=="string"?w.value.toLowerCase()===m.toLowerCase():w.value===m),n=(l==null?void 0:l.icon)??((f=s.getOptionIcon)==null?void 0:f.call(s,m,{key:s.key,option:l}))??s.icon,u=(l==null?void 0:l.label)??((x=s.getOptionLabel)==null?void 0:x.call(s,m,{key:s.key,option:l}))??m,p=(l==null?void 0:l.permalink)??((v=s.getOptionPermalink)==null?void 0:v.call(s,m))??null;return Ot(Cn.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:[Ot("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[Q("span",{className:"shrink-0 text-neutral-600",children:kn(s.icon)?s.icon:Q(s.icon,{className:"h-4 w-4"})}),s.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:s.options?Ot(Nc,{children:[Q("span",{className:"shrink-0 text-neutral-600",children:kn(n)?n:Q(n,{className:"h-4 w-4"})}),p?Q(yc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Ct(u,30)}):Ct(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(c,m),children:Q(xc,{className:"h-3.5 w-3.5"})})]},`${c}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&Ot("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 kn=e=>wc(e);import{Command as ze,useCommandState as Cc}from"cmdk";import{ChevronDown as kc,ListFilter as Pc}from"lucide-react";import{Fragment as Sc,forwardRef as Rc,isValidElement as Rn,useCallback as Cr,useEffect as kr,useImperativeHandle as Tc,useRef as uo,useState as mo}from"react";import{Fragment as Ac,jsx as _,jsxs as ve}from"react/jsx-runtime";function Tn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:c,activeFilters:d,askAI:s,children:m,emptyState:l,className:n}){var L,S;let{isMobile:u}=Y(),p=uo(null),b=uo(),[f,x]=mo(!1);De("f",()=>x(!0),{enabled:!f});let[v,w]=mo(""),[y,P]=mo(null),N=Cr(()=>{w(""),P(null)},[]);kr(()=>{f||N()},[f]);let C=y?e.find(({key:h})=>h===y):null,W=Cr(h=>{p.current&&(b.current={width:p.current.clientWidth,height:p.current.clientHeight}),w(""),P(h),o==null||o(h)},[]),M=Cr(h=>{if(!C||!d)return!1;let R=d.find(({key:G})=>G===y);return(R==null?void 0:R.value)===h||R&&C.multiple&&Array.isArray(R.value)&&R.value.includes(h)},[C]),D=Cr(h=>{C&&(M(h)?r(C.key,h):t(C.key,h),C.multiple||x(!1))},[d,C,s]);return kr(()=>{a==null||a(v)},[v]),kr(()=>{c==null||c(y)},[y]),kr(()=>{(C==null?void 0:C.options)&&p.current&&(b.current={width:p.current.clientWidth,height:p.current.clientHeight})},[C==null?void 0:C.options]),_(Ae,{openPopover:f,setOpenPopover:x,onEscapeKeyDown:h=>{y&&(h.preventDefault(),N())},content:_(ke,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ve(ze,{loop:!0,shouldFilter:!C||C.shouldFilter!==!1,children:[ve("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(Mc,{placeholder:`${(C==null?void 0:C.label)||"Filter"}...`,value:v,onValueChange:w,onKeyDown:h=>{(h.key==="Escape"||h.key==="Backspace"&&!v)&&(h.preventDefault(),h.stopPropagation(),y?N():x(!1))},emptySubmit:h=>{h.preventDefault(),h.stopPropagation(),s?(t("ai",C?`${C.label} ${v}`:v),x(!1)):D(v)}}),!C&&_("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"})]}),_(Dc,{ref:p,children:ve(ze.List,{className:i("flex w-full flex-col gap-1 p-1",C?"min-w-[100px]":"min-w-[180px]"),children:[C?((S=(L=C.options)==null?void 0:L.filter(h=>!v||!h.hideDuringSearch))==null?void 0:S.map(h=>{let R=M(h.value);return _(Sn,{filter:C,option:h,right:R?_(fa,{className:"h-4 w-4"}):h.right,onSelect:()=>D(h.value)},h.value)}))??_(ze.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:b.current,children:_(Ne,{})})}):e.filter(h=>!h.hideInFilterDropdown).map(h=>ve(Sc,{children:[_(Sn,{filter:h,onSelect:()=>W(h.key)}),h.separatorAfter&&_(ze.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},h.key)),(!C||C.options)&&_(Ec,{search:v,askAI:s,children:l?Lc(l)?(l==null?void 0:l[y??"default"])??"No matches":l:"No matches"})]})},y)]})}),children:ve("button",{type:"button",className:i("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:[_(Pc,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),d!=null&&d.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:d.length}):_(kc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Lc(e){return typeof e=="object"&&e!==null&&!Rn(e)}var Mc=e=>{let t=Cc(r=>r.filtered.count===0);return _(ze.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"})},Dc=Rc(({children:e},t)=>{let r=uo(null);Tc(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ee(r);return ve(Ac,{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 Sn({filter:e,option:t,right:r,onSelect:o}){var s,m;let{isMobile:a}=Y(),c=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,d=t?t.label??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return ve(ze.Item,{className:i("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:l=>{l.preventDefault()},onPointerUp:l=>{l.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:d+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:Ic(c)?c:_(c,{className:"h-4 w-4"})}),Ct(d,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var Ec=({search:e,askAI:t,children:r})=>t&&e?ve(ze.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(Qo,{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,'"']})]})]}):_(ze.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Ic=e=>Rn(e);var n2={Select:Tn,List:Pn};import{useMemo as Oc,useState as Ln}from"react";import{jsx as Ye,jsxs as Pr}from"react/jsx-runtime";function u2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:c,handleSubmit:d}){let[s,m]=Ln(r.defaultValue),[l,n]=Ln(!1),u=Oc(()=>l||!s||s===r.defaultValue,[l,s,r.defaultValue]);return Pr("form",{onSubmit:async p=>{p.preventDefault(),n(!0),await d({[r.name]:s}),n(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Pr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Pr("div",{className:"flex flex-col space-y-3",children:[Ye("h2",{className:"text-xl font-medium",children:e}),Ye("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ye("input",{...r,type:r.type||"text",required:!0,disabled:!!c,onChange:p=>m(p.target.value),className:i("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":c})}):Ye("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Pr("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"?Ye("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,Ye("div",{className:"shrink-0",children:Ye(ee,{text:a,loading:l,disabled:u,disabledTooltip:c})})]})]})}import{useId as zc}from"react";import{jsx as Sr,jsxs as Hc}from"react/jsx-runtime";function Ze({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=zc();return Hc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Sr("defs",{children:Sr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Sr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Sr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Vc}from"lucide-react";import _c,{useCallback as Fc,useState as Bc}from"react";import{jsx as qe,jsxs as po}from"react/jsx-runtime";var Wc=_c.forwardRef(({className:e,type:t,...r},o)=>{let[a,c]=Bc(!1),d=Fc(()=>c(!a),[a,c]);return po("div",{children:[po("div",{className:"relative flex",children:[qe("input",{type:a?"text":t,className:i("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}),po("div",{className:"group",children:[r.error&&qe("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:qe(Vc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&qe("button",{className:i("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>d(),"aria-label":a?"Hide password":"Show Password",children:a?qe(Pa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):qe(Sa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&qe("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Wc.displayName="Input";import{flip as jc,offset as Yc,size as Zc,useDismiss as qc,useFloating as Xc,useInteractions as Jc}from"@floating-ui/react";import{Command as Re,useCommandState as Qc}from"cmdk";import{Check as ed,ChevronDown as td,Search as rd,X as od}from"lucide-react";import{createContext as ad,forwardRef as An,useContext as ho,useEffect as fo,useMemo as Dn,useRef as En,useState as go}from"react";import{Drawer as ut}from"vaul";import $c from"next/image";import{memo as Uc,useEffect as Gc,useState as Mn}from"react";import{jsx as Kc}from"react/jsx-runtime";var zt=Uc(e=>{let[t,r]=Mn(!0),[o,a]=Mn(e.src);Gc(()=>a(e.src),[e.src]);let c=d=>{r(!1);let s=d.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Kc($c,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:c,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{jsx as A,jsxs as se}from"react/jsx-runtime";var Rr=ad({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function W2({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:c,icon:d,inputAttrs:s,noItemsElement:m}){let{isMobile:l}=Y(),n=En(null),[u,p]=go(!1),[b,f]=go(""),[x,v]=go(!1);fo(()=>{u&&v(!1)},[u]),fo(()=>v(!0),[b]),fo(()=>{t&&f(t.value)},[t]);let w=Dn(()=>{let R=b.toLowerCase();return x?e.filter(G=>G.value.toLowerCase().includes(R)):b?e.sort((G,k)=>(k.value.toLowerCase().includes(R)?1:0)-(G.value.toLowerCase().includes(R)?1:0)):e},[x,b,e]),{refs:y,floatingStyles:P,context:N}=Xc({open:u,onOpenChange:p,middleware:[Yc(8),Zc({apply({elements:{floating:R},availableHeight:G}){Object.assign(R.style,{maxHeight:`${Math.max(75,Math.min(G,290))}px`})},padding:8}),jc({fallbackStrategy:"initialPlacement",padding:8})]}),C=qc(N,{enabled:!l||!c}),{getReferenceProps:W,getFloatingProps:M}=Jc([C]),D=En(null),{scrollProgress:L,updateScrollProgress:S}=Ee(D),h=Dn(()=>t&&t.icon?t.icon:t&&t.image?A(zt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):d||A(rd,{className:"size-4 text-neutral-400"}),[t,d]);return A(Rr.Provider,{value:{inputAttrs:s||{},openCommandList:u,setOpenCommandList:p,inputValue:b,setInputValue:f,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:l&&c?se(ut.Root,{open:u,onOpenChange:p,children:[A(ut.Trigger,{className:"sm:hidden",asChild:!0,children:A(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:A(bo,{className:o,iconElement:h})})}),A(ut.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),se(ut.Portal,{children:[A(ut.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:R=>{R.target instanceof Element&&R.target.closest("[data-sonner-toast]")&&R.preventDefault()},children:se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[A("div",{className:"p-2",children:A(bo,{className:o,iconElement:h})}),u&&se(Re.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&b===""&&(m?A("div",{children:m}):A("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&A(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),A(In,{items:w})]})]})}),A(ut.Overlay,{})]})]}):se(Re,{ref:n,className:"relative",shouldFilter:!1,loop:!0,children:[A(bo,{className:o,iconElement:h,ref:y.setReference,...W()}),u&&se("div",{ref:y.setFloating,style:P,...M(),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:D,onScroll:S,className:"grow overflow-y-auto p-2",children:[se(Re.List,{children:[e.length===0&&b===""&&(m?A("div",{children:m}):A("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),b!==""&&A(Re.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),A(In,{items:w})]}),A("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(L,2)}})]})]})})}var bo=An(({iconElement:e,className:t,...r},o)=>se("label",{ref:o,className:i("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:[A("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),se("div",{className:"flex h-10 grow",children:[A(nd,{}),A(id,{})]})]})),nd=An((e,t)=>{let r=Qc(l=>l.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:c,inputValue:d,setInputValue:s,disabled:m}=ho(Rr);return A(Re.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>c(!0),value:d,onValueChange:s,onKeyDown:l=>{l.key==="Escape"?(l.preventDefault(),c(!1)):l.key==="Enter"&&r?c(!1):l.key.match(/^[a-z0-9]$/i)&&!l.metaKey&&c(!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 id(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=ho(Rr);return A("button",{type:"button",onClick:()=>{r(c=>!c),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?A(od,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):A(td,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function In({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=ho(Rr);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&&A(zt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),A("p",{className:i("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&&A(cr,{className:"text-xs",variant:"neutral",children:a.label})]}),A(ed,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as vo from"@radix-ui/react-label";import{cva as sd}from"class-variance-authority";import*as On from"react";import{jsx as dd}from"react/jsx-runtime";var ld=sd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),cd=On.forwardRef(({className:e,...t},r)=>dd(vo.Root,{ref:r,className:i(ld(),e),...t}));cd.displayName=vo.Root.displayName;import{cva as md}from"class-variance-authority";import{isValidElement as ud}from"react";import{jsx as zn,jsxs as Hn}from"react/jsx-runtime";var pd=md(["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 e4({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:c,...d}){return Hn(e||"button",{...e==="button"?{type:"button"}:{},className:i(pd({variant:t}),c),...d,children:[Hn("div",{className:"flex grow items-center gap-2",children:[o&&(fd(o)?o:zn(o,{className:"size-4"})),r]}),a&&zn("kbd",{className:i("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 fd=e=>ud(e);import{curveNatural as Vn}from"@visx/curve";import{LinearGradient as _n}from"@visx/gradient";import{Group as gd}from"@visx/group";import{ParentSize as bd}from"@visx/responsive";import{scaleLinear as hd,scaleUtc as vd}from"@visx/scale";import{Area as xd,AreaClosed as yd}from"@visx/shape";import{motion as Fn}from"framer-motion";import{useId as wd,useMemo as Bn}from"react";import{jsx as xe,jsxs as xo}from"react/jsx-runtime";var Nd={top:8,right:2,bottom:2,left:2};function d4(e){return xe(bd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&xe(Cd,{...{width:t,height:r,...e}})})}function Cd({width:e,height:t,data:r,curve:o=!0,color:a,padding:c}){let d={...Nd,...c},s=wd(),m=Bn(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:l,xScale:n}=Bn(()=>{let u=r.map(({value:v})=>v),p=Math.max(...u),b=r.map(({date:v})=>v.getTime()),f=new Date(Math.min(...b)),x=new Date(Math.max(...b));return{yScale:hd({domain:[-2,Math.max(p,2)],range:[t-d.top-d.bottom,0],nice:!0,clamp:!0}),xScale:vd({domain:[f,x],range:[0,e-d.left-d.right],nice:!0})}},[r,t,e]);return xo("svg",{width:e,height:t,children:[xo("defs",{children:[xe(_n,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-d.left-d.right,gradientUnits:"userSpaceOnUse"}),xe(_n,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),xe("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:xe("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),xo(gd,{left:d.left,top:d.top,children:[xe(xd,{data:r,x:({date:u})=>n(u),y:({value:u})=>l(u)??0,curve:o?Vn:void 0,children:({path:u})=>xe(Fn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),xe(yd,{data:r,x:({date:u})=>n(u),y:({value:u})=>l(u)??0,yScale:l,curve:o?Vn:void 0,children:({path:u})=>xe(Fn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${s}-color-gradient)`,mask:`url(#${s}-mask)`})})]})]},r.length)}import*as le from"@radix-ui/react-dialog";import*as yo from"@radix-ui/react-visually-hidden";import{useRouter as kd}from"next/navigation";import{Drawer as Xe}from"vaul";import{jsx as ae,jsxs as pt}from"react/jsx-runtime";function b4({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:c,preventDefaultClose:d,drawerRootProps:s}){let m=kd(),l=({dragged:u}={})=>{d&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:n}=Y();return n&&!c?ae(Xe.Root,{open:o?r:!0,onOpenChange:u=>{u||l({dragged:!0})},...s,children:pt(Xe.Portal,{children:[ae(Xe.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ae(Xe.Content,{onPointerDownOutside:u=>{u.target instanceof Element&&u.target.closest("[data-sonner-toast]")&&u.preventDefault()},className:i("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:pt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[pt(yo.Root,{children:[ae(Xe.Title,{children:"Modal"}),ae(Xe.Description,{children:"This is a modal"})]}),ae(Pd,{}),e]})}),ae(Xe.Overlay,{})]})}):ae(le.Root,{open:o?r:!0,onOpenChange:u=>{u||l()},children:pt(le.Portal,{children:[ae(le.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),pt(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:i("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:[pt(yo.Root,{children:[ae(le.Title,{children:"Modal"}),ae(le.Description,{children:"This is a modal"})]}),e]})]})})}function Pd(){return ae("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ae("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{Fragment as Sd,jsx as Tr,jsxs as ft}from"react/jsx-runtime";var Wn=i("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 x4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:c,showTotalCount:d=!0}){return ft("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[ft("div",{className:"flex items-center gap-2",children:[ft("div",{children:[Tr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&ft(Sd,{children:[ft("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",d&&"of "]}),d&&Tr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),c]}),ft("div",{className:"flex items-center gap-2",children:[Tr("button",{type:"button",className:Wn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Tr("button",{type:"button",className:Wn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as He from"@radix-ui/react-radio-group";import{Circle as Rd}from"lucide-react";import*as wo from"react";import{jsx as Lr}from"react/jsx-runtime";var Td=wo.forwardRef(({className:e,...t},r)=>Lr(He.Root,{className:i("grid gap-2",e),...t,ref:r}));Td.displayName=He.Root.displayName;var Ld=wo.forwardRef(({className:e,...t},r)=>Lr(He.Item,{ref:r,className:i("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:Lr(He.Indicator,{className:"flex items-center justify-center",children:Lr(Rd,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Ld.displayName=He.Item.displayName;import{Drawer as Ve}from"vaul";import{jsx as Je,jsxs as Ad}from"react/jsx-runtime";function Md({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Ve.NestedRoot:Ve.Root;return Je(a,{direction:"right",handleOnly:!0,...o,children:Ad(Ve.Portal,{children:[Je(Ve.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Je(Ve.Content,{...t,onPointerDownOutside:c=>{var d;c.target instanceof Element&&c.target.closest("[data-sonner-toast]")&&c.preventDefault(),(d=t==null?void 0:t.onPointerDownOutside)==null||d.call(t,c)},className:i("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:Je("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Dd({className:e,...t}){return Je(Ve.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Ed(e){return Je(Ve.Description,{...e})}function Id(e){return Je(Ve.Close,{...e})}var R4=Object.assign(Md,{Title:Dd,Description:Ed,Close:Id});import{useEffect as Od,useRef as zd,useState as Hd}from"react";import{jsx as $n}from"react/jsx-runtime";var Vd=`
|
|
2
|
+
import{$ as kp,$a as g0,$b as rf,$c as Kf,$d as Bg,A as da,Aa as Zp,Ab as Ra,Ac as Sf,Ad as bg,B as np,Ba as qp,Bb as V0,Bc as Rf,Bd as hg,C as ip,Ca as Xp,Cb as H0,Cc as Tf,Cd as vg,D as sp,Da as Jp,Db as _0,Dc as Ha,Dd as xg,E as tr,Ea as ha,Eb as nr,Ec as Lf,Ed as yg,F as lp,Fa as Qp,Fb as F0,Fc as Mf,Fd as wg,G as rr,Ga as e0,Gb as B0,Gc as Df,Gd as Ng,H as cp,Ha as va,Hb as W0,Hc as _a,Hd as Cg,I as dp,Ia as t0,Ib as $0,Ic as Fa,Id as kg,J as mp,Ja as r0,Jb as U0,Jc as Ef,Jd as Pg,K as up,Ka as o0,Kb as Ta,Kc as If,Kd as Sg,L as ma,La as a0,Lb as G0,Lc as Af,Ld as Rg,M as ua,Ma as n0,Mb as j0,Mc as Of,Md as Tg,N as pa,Na as i0,Nb as K0,Nc as ir,Nd as Lg,O as fa,Oa as s0,Ob as Y0,Oc as zf,Od as Mg,P as ga,Pa as l0,Pb as La,Pc as Vf,Pd as Dg,Q as pp,Qa as c0,Qb as Ma,Qc as Hf,Qd as Eg,R as fp,Ra as d0,Rb as Da,Rc as _f,Rd as Ig,S as gp,Sa as xa,Sb as Ea,Sc as Ff,Sd as Ag,T as bp,Ta as ar,Tb as Z0,Tc as Bf,Td as Og,U as hp,Ua as ya,Ub as q0,Uc as Wf,Ud as Ua,V as vp,Va as wa,Vb as X0,Vc as $f,Vd as Ga,W as xp,Wa as m0,Wb as J0,Wc as Uf,Wd as zg,X as yp,Xa as u0,Xb as Q0,Xc as Gf,Xd as Vg,Y as wp,Ya as Na,Yb as ef,Yc as jf,Yd as Hg,Z as Np,Za as p0,Zb as Ia,Zc as sr,Zd as _g,_ as Cp,_a as f0,_b as tf,_c as lr,_d as Fg,a as ra,aa as Pp,ab as Ca,ac as of,ad as Yf,ae as Wg,b as qu,ba as Sp,bb as ka,bc as af,bd as Zf,be as $g,c as it,ca as Rp,cb as Pa,cc as nf,cd as qf,ce as Ug,d as Jt,da as Tp,db as b0,dc as sf,dd as Xf,de as Gg,e as Xu,ea as Lp,eb as h0,ec as lf,ed as Jf,ee as jg,f as st,fa as Mp,fb as v0,fc as cf,fd as Qf,fe as Kg,g as lt,ga as Dp,gb as x0,gc as df,gd as Ba,ge as Yg,h as Yr,ha as Ep,hb as y0,hc as mf,hd as eg,he as Zg,i as oa,ia as Ip,ib as Zr,ic as Aa,id as tg,ie as Pt,j as aa,ja as Ap,jb as w0,jc as uf,jd as rg,je as qg,k as Ju,ka as Op,kb as N0,kc as pf,kd as og,ke as Xg,l as Qu,la as zp,lb as C0,lc as ff,ld as ag,le as Jg,m as na,ma as Vp,mb as Sa,mc as Oa,md as ng,me as Qg,n as ia,na as Hp,nb as k0,nc as gf,nd as ig,ne as ja,o as sa,oa as ba,ob as P0,oc as bf,od as sg,oe as eb,p as la,pa as _p,pb as S0,pc as za,pd as ct,pe as tb,q as kt,qa as Fp,qb as R0,qc as hf,qd as lg,qe as rb,r as ep,ra as Bp,rb as T0,rc as Va,rd as cg,re as ob,s as ke,sa as Wp,sb as L0,sc as vf,sd as dg,se as ab,t as tp,ta as $p,tb as M0,tc as xf,td as mg,te as nb,u as Qt,ua as Up,ub as D0,uc as yf,ud as ug,ue as ib,v as rp,va as Gp,vb as E0,vc as wf,vd as Wa,w as op,wa as jp,wb as I0,wc as Nf,wd as pg,x as er,xa as Kp,xb as A0,xc as Cf,xd as fg,y as ap,ya as Yp,yb as O0,yc as kf,yd as $a,z as ca,za as or,zb as z0,zc as Pf,zd as gg}from"./chunk-MPAUQNBI.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as jr,b as wt,c as Yo,d as Zo,e as Nt,f as qo,g as Xo,h as Ct,i as Kr,j as Jo,k as V,l as Ce,m as Qo,n as ge,o as qt,p as i,q as Xt,r as ea,s as ta}from"./chunk-EY3HINQT.mjs";import*as ie from"@radix-ui/react-accordion";import{ChevronDown as Hi}from"lucide-react";import*as dr from"react";import{jsx as cr,jsxs as Wi}from"react/jsx-runtime";var ub=ie.Root,_i=dr.forwardRef(({className:e,...t},r)=>cr(ie.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));_i.displayName="AccordionItem";var Fi=dr.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let n=r==="chevron"?Hi:ct;return cr(ie.Header,{className:"flex",children:Wi(ie.Trigger,{ref:a,className:i("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,cr(n,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Fi.displayName=ie.Trigger.displayName;var Bi=dr.forwardRef(({className:e,children:t,...r},o)=>cr(ie.Content,{ref:o,className:i("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}));Bi.displayName=ie.Content.displayName;import{cva as $i}from"class-variance-authority";import*as mr from"react";import{jsx as qr}from"react/jsx-runtime";var Ui=$i("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"}}),Gi=mr.forwardRef(({className:e,variant:t,...r},o)=>qr("div",{ref:o,role:"alert",className:i(Ui({variant:t}),e),...r}));Gi.displayName="Alert";var ji=mr.forwardRef(({className:e,...t},r)=>qr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));ji.displayName="AlertTitle";var Ki=mr.forwardRef(({className:e,...t},r)=>qr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));Ki.displayName="AlertDescription";import{sha256 as Yi}from"js-sha256";import{useState as Zi}from"react";import{jsx as Xr}from"react/jsx-runtime";function qi(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/${e.id}`;return e.email?`https://0.gravatar.com/avatar/${Yi(e.email)}?d=${t}`:t}function yb({user:e={},className:t}){if(!e)return Xr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Zi(qi(e));return Xr("img",{alt:`Avatar for ${e.name||e.email}`,referrerPolicy:"no-referrer",src:r,className:i("h-10 w-10 rounded-full border border-neutral-300",t),draggable:!1,onError:()=>{o(`https://api.dub.co/og/avatar/${e.id}`)}})}function wb({id:e,className:t}){return Xr("img",{src:`https://api.dicebear.com/9.x/shapes/svg?seed=${e}`,alt:"avatar",className:i("h-10 w-10 rounded-full",t),draggable:!1})}import{cva as Xi}from"class-variance-authority";import{jsx as Qi}from"react/jsx-runtime";var Ji=Xi("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 ur({className:e,variant:t,...r}){return Qi("span",{className:i(Ji({variant:t}),e),...r})}import{cva as ns}from"class-variance-authority";import{forwardRef as is}from"react";import*as be from"@radix-ui/react-tooltip";import es from"linkify-react";import{HelpCircle as ts}from"lucide-react";import rs from"next/link";import{useState as os}from"react";import{Fragment as as,jsx as U,jsxs as je}from"react/jsx-runtime";function Ob({children:e}){return U(be.Provider,{delayDuration:150,children:e})}function Q({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:n,delayDuration:c=0,...s}){let[u,l]=os(!1);return je(be.Root,{open:o?!1:u,onOpenChange:l,delayDuration:c,disableHoverableContent:n,children:[U(be.Trigger,{asChild:!0,onClick:()=>{l(!0)},onBlur:()=>{l(!1)},children:e}),U(be.Portal,{children:U(be.Content,{sideOffset:8,side:a,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,...s,children:typeof t=="string"?U("span",{className:i("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:l}):t})})]})}function zb({title:e,cta:t,href:r,target:o,onClick:a}){return je("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(rs,{href:r,...o?{target:o}:{},className:i(se({variant:"primary"}),"flex h-9 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?U(te,{onClick:a,text:t,variant:"primary",className:"h-9"}):null)]})}function Vb({title:e,cta:t,href:r}){return je("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&je(as,{children:[" ",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 Hb({children:e,className:t,tooltipClassName:r}){return U("div",{className:i("block max-w-xs whitespace-pre-wrap text-balance px-4 py-2 text-center text-sm text-neutral-700",r),children:U(es,{as:"p",options:{target:"_blank",rel:"noopener noreferrer nofollow",className:i("underline underline-offset-4 text-neutral-400 hover:text-neutral-700",t)},children:e})})}function _b(e){return U(Q,{...e,children:U(ts,{className:"h-4 w-4 text-neutral-500"})})}function Fb({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(Q,{content:je("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[je("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Xt(e||0,{full:!0})," ",t]}),a&&je("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Xo(a,{withAgo:!0})]})]}),children:o})}function Bb({children:e,content:t,...r}){return U(Q,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(ur,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function Wb({children:e,tooltipProps:t,...r}){return U(Q,{...t,children:U("button",{type:"button",...r,className:i("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 pr({children:e,tooltipProps:t}){return t?U(Q,{...t,children:U("div",{children:e})}):e}import{jsx as dt,jsxs as Ka}from"react/jsx-runtime";var se=ns("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:i("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"}}),te=is(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:n,icon:c,shortcut:s,disabledTooltip:u,right:l,...d},m)=>u?dt(Q,{content:u,children:Ka("div",{className:i("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&&dt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&dt("kbd",{className:i("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:s})]})}):Ka("button",{ref:m,type:d.onClick?"button":"submit",className:i("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-md border px-4 text-sm",d.disabled||n?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":se({variant:t}),r),disabled:d.disabled||n,...d,children:[n?dt(ke,{}):c||null,e&&dt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&dt("kbd",{className:i("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:s}),l]}));te.displayName="Button";import{cva as ss}from"class-variance-authority";import{createContext as ls}from"react";import{jsx as Ya}from"react/jsx-runtime";var cs=ss("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"}}}),St=ls({variant:"loose",loading:!1});function Za({variant:e="loose",loading:t=!1,className:r,children:o}){return Ya("ul",{className:i(cs({variant:e,loading:t}),r),"data-variant":e,children:Ya(St.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as ds}from"class-variance-authority";import{createContext as ms,useContext as us,useEffect as ps,useRef as fs,useState as gs}from"react";import{jsx as qa,jsxs as vs}from"react/jsx-runtime";var bs=ds("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"}}}),hs="w-full py-2.5 px-4",Jr=ms({hovered:!1});function Xa({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:n=!0,banner:c}){let{variant:s}=us(St),u=fs(null),[l,d]=gs(!1);ps(()=>{if(!l||!u.current)return;let p=setInterval(()=>{var f;((f=u.current)==null?void 0:f.matches(":hover"))===!1&&d(!1)},1e3);return()=>clearInterval(p)},[l]);let m=p=>!(document.getElementById("modal-backdrop")||Ct(p));return vs("li",{ref:u,className:i(bs({variant:s}),e),onPointerEnter:()=>d(!0),onPointerLeave:()=>d(!1),"data-hover-state-enabled":n,children:[c,qa("div",{className:i(hs,t),onClick:o?p=>{m(p)&&o(p)}:void 0,onAuxClick:a?p=>{m(p)&&a(p)}:void 0,children:qa(Jr.Provider,{value:{hovered:l},children:r})})]})}var u1=Object.assign(Za,{Card:Object.assign(Xa,{Context:Jr}),Context:St});import xs from"embla-carousel-autoplay";import ys from"embla-carousel-react";import{ArrowLeft as ws,ArrowRight as Ns}from"lucide-react";import{createContext as Cs,forwardRef as Tt,useCallback as Rt,useContext as ks,useEffect as Qr,useState as eo}from"react";import{jsx as Pe,jsxs as en}from"react/jsx-runtime";var to=2e3,Ja=Cs(null);function he(){let e=ks(Ja);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function Qa(){let{api:e}=he(),[t,r]=eo(0),o=Rt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return Qr(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Ps=Tt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:n,children:c,...s},u)=>{let[l,d]=ys({...t,axis:e==="horizontal"?"x":"y"},[...o?[xs(typeof o=="object"?o:{delay:to})]:[],...a||[]]),[m,p]=eo(!1),[f,b]=eo(!1),h=Rt(P=>{!P||(p(P.canScrollPrev()),b(P.canScrollNext()))},[]),y=Rt(()=>{d==null||d.scrollPrev()},[d]),w=Rt(()=>{d==null||d.scrollNext()},[d]),x=Rt(P=>{P.key==="ArrowLeft"?(P.preventDefault(),y()):P.key==="ArrowRight"&&(P.preventDefault(),w())},[y,w]);return Qr(()=>{!d||!r||r(d)},[d,r]),Qr(()=>{if(!!d)return h(d),d.on("reInit",h),d.on("select",h),()=>{d==null||d.off("select",h)}},[d,h]),Pe(Ja.Provider,{value:{carouselRef:l,api:d,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:y,scrollNext:w,canScrollPrev:m,canScrollNext:f},children:Pe("div",{ref:u,onKeyDownCapture:x,className:i("relative",n),role:"region","aria-roledescription":"carousel",...s,children:c})})});Ps.displayName="Carousel";var Ss=Tt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=he();return Pe("div",{ref:o,className:"overflow-hidden",children:Pe("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Ss.displayName="CarouselContent";var Rs=Tt(({className:e,...t},r)=>{let{orientation:o}=he();return Pe("div",{ref:r,role:"group","aria-roledescription":"slide",className:i("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",e),...t})});Rs.displayName="CarouselItem";var Ts=Tt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:n}=he();return en("button",{ref:r,className:i("absolute",o==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Pe(ws,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Previous slide"})]})});Ts.displayName="CarouselPrevious";var Ls=Tt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:n}=he();return en("button",{ref:r,className:i("absolute",o==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",se({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Pe(Ns,{className:"h-4 w-4"}),Pe("span",{className:"sr-only",children:"Next slide"})]})});Ls.displayName="CarouselNext";import{cva as Ms}from"class-variance-authority";import{motion as Ds}from"framer-motion";import{ChevronLeft as Es,ChevronRight as Is}from"lucide-react";import*as Ee from"react";import{jsx as Ke,jsxs as Lt}from"react/jsx-runtime";var As=Ms("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 "}}}),M1=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:n,api:c}=he(),s=(b=c==null?void 0:c.plugins())==null?void 0:b.autoplay,[u,l]=Ee.useState(0),[d,m]=Ee.useState(!1),p=Ee.useCallback(h=>{l((h==null?void 0:h.selectedScrollSnap())??0)},[]),f=Ee.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return Ee.useEffect(()=>{!c||(p(c),m((s==null?void 0:s.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>m(!0)),c.on("autoplay:stop",()=>m(!1)))},[c,s,p]),Lt("div",{className:i(As({variant:e}),t),children:[e!=="simple"&&Lt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!n,onClick:f(o),children:[Ke(Es,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ke("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,y)=>Lt("button",{onClick:f(()=>c.scrollTo(y)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ke("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",y===u?"bg-black":"bg-black/20",d&&y===u&&"w-6 bg-black/20"),children:d&&y===u&&Ke(Ds.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??to)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Lt("span",{className:"sr-only",children:["Slide ",y+1]})]},y))}),e!=="simple"&&Lt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:f(r),children:[Ke(Is,{className:"h-4 w-4"}),Ke("span",{className:"sr-only",children:"Next slide"})]})]})};import Os from"embla-carousel-react";import{forwardRef as zs,useCallback as Vs,useEffect as Hs}from"react";import{jsx as fr}from"react/jsx-runtime";var _1=({className:e,...t})=>{let{api:r}=he(),[o,a]=Os({dragFree:!0}),n=Vs(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Hs(()=>{if(!(!r||!a))return n(r),r.on("reInit",n),r.on("select",n),()=>{r==null||r.off("reInit",n),r==null||r.off("select",n)}},[r,a,n]),fr("div",{className:"overflow-hidden",ref:o,children:fr("div",{className:i("mx-4 flex gap-4",e),...t})})},F1=zs(({index:e,className:t,...r},o)=>{let{api:a}=he(),n=Qa();return fr("div",{ref:o,children:fr("button",{type:"button",onClick:()=>{var s;if(!a)return;let c=(s=a.plugins())==null?void 0:s.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===n}):t,...r})})});import*as Mt from"@radix-ui/react-checkbox";import{forwardRef as _s}from"react";import{jsx as ro,jsxs as Fs}from"react/jsx-runtime";var mt=_s(({className:e,...t},r)=>ro(Mt.Root,{ref:r,className:i("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 data-[state=indeterminate]:bg-blue-500",e),...t,children:Fs(Mt.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[ro(ar,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),ro(lr,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));mt.displayName=Mt.Root.displayName;import{Command as Et,CommandInput as El,CommandItem as Il,useCommandState as Al}from"cmdk";import{ChevronDown as Ol}from"lucide-react";import{forwardRef as zl,isValidElement as Vl,useCallback as Hl,useEffect as vr,useRef as _l,useState as Dt}from"react";import{motion as Ll}from"framer-motion";import{forwardRef as Ml,useRef as Dl}from"react";import{useEffect as Bs,useState as Ws}from"react";function tn(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function oo(e,t){let[r,o]=Ws(tn(e)??t);return Bs(()=>{let n=tn(e);n&&o(n)},[e]),[r,n=>{o(n),window.localStorage.setItem(e,JSON.stringify(n))}]}function $s(e){return e&&typeof e=="object"&&Array.isArray(e.all)&&Array.isArray(e.defaultVisible)}function Z1(e,t){if(!$s(t)){let o=t,a=u=>{let l=o[u];return Object.fromEntries(l.all.map(d=>[d,l.defaultVisible.includes(d)]))},n=Object.fromEntries(Object.keys(o).map(u=>[u,a(u)])),[c,s]=oo(e,n);return{columnVisibility:c,setColumnVisibility:(u,l)=>{let d=o[u].all,m=c[u]||{},p=Object.fromEntries(d.map(f=>[f,f in l?l[f]:m[f]??!1]));s({...c,[u]:p})}}}else{let o=t,a=Object.fromEntries(o.all.map(s=>[s,o.defaultVisible.includes(s)])),[n,c]=oo(e,a);return{columnVisibility:n,setColumnVisibility:s=>{let u=o.all,l=n||{},d=Object.fromEntries(u.map(m=>[m,m in s?s[m]:l[m]??!1]));c(d)}}}}import ao from"js-cookie";import{useEffect as Us,useState as Gs}from"react";function Q1(e,t,r){let[o,a]=Gs(()=>{let c=ao.get(e);return c?JSON.parse(c):t});return Us(()=>{let c=()=>{let s=ao.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),ao.set(e,JSON.stringify(c),r)}]}import{useCallback as js,useEffect as Ks,useRef as Ys,useState as Zs}from"react";var ut=(e=3e3)=>{let t=Ys(null),[r,o]=Zs(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},n=js(async(c,{onSuccess:s,throwOnError:u}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),s==null||s(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(l){if(console.error("Failed to copy: ",l),u)throw l}},[e]);return Ks(()=>()=>a(),[]),[r,n]};import{useEffect as qs,useState as Xs}from"react";function ah(){let[e,t]=Xs(null);return qs(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var m,p,f;let u=s[0];if(!u)return;let l=(((m=u.rootBounds)==null?void 0:m.height)||0)*.3+o;for(let b=1;b<s.length;b++){let h=s[b];if(!h)break;(h.boundingClientRect.top<u.boundingClientRect.top||u.boundingClientRect.bottom<o)&&(u=h)}let d=u.target;for(;d&&d.getBoundingClientRect().bottom<o;)d=(p=n.get(d))==null?void 0:p.next;for(;d&&d.getBoundingClientRect().top>l;)d=(f=n.get(d))==null?void 0:f.prev;d&&t(d.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),n=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(s=>a.observe(s)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useCallback as Js}from"react";function lh(e){return{handleKeyDown:Js(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 Qs,useState as el}from"react";function uh(e,t={}){let{root:r,defaultValue:o}=t,[a,n]=el(o??!1);return Qs(()=>{let c=()=>{let u=e.current;if(!u)return;let l=r==null?void 0:r.current,d=u.getBoundingClientRect(),m=l?l.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};n(d.top<m.bottom&&d.bottom>m.top&&d.left<m.right&&d.right>m.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",c),window.addEventListener("resize",c);let s=null;return e.current&&(s=new IntersectionObserver(c),s.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),s==null||s.disconnect()}},[e,r]),a}import{useEffect as tl,useState as rl}from"react";function gh(){let[e,t]=rl(!1);return tl(()=>{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 ol,useState as al}from"react";function xh(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[n,c]=al(),s=(n==null?void 0:n.isIntersecting)&&a,u=([l])=>{c(l)};return ol(()=>{let l=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!l)return;let m={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(u,m);return p.observe(l),()=>p.disconnect()},[e,JSON.stringify(t),r,o,s]),n}import{createContext as nl,useCallback as il,useContext as sl,useEffect as rn,useId as ll,useState as cl}from"react";import{jsx as dl}from"react/jsx-runtime";var on=nl({listeners:[],setListeners:()=>{}});function Ph({children:e}){let[t,r]=cl([]);return dl(on.Provider,{value:{listeners:t,setListeners:r},children:e})}function Ie(e,t,r={}){let o=ll(),{listeners:a,setListeners:n}=sl(on),c=il(s=>{if(r.enabled===!1)return;let u=s.target,l=document.getElementById("modal-backdrop"),d=document.querySelector("[data-sheet-overlay]");if(u.tagName==="INPUT"||u.tagName==="TEXTAREA"||!!l!=!!r.modal||!!d!=!!r.sheet)return;let m=[...s.metaKey?["meta"]:[],...s.ctrlKey?["ctrl"]:[],...s.altKey?["alt"]:[],s.key].join("+");if(Array.isArray(e)?!e.includes(m):m!==e)return;let p=a.filter(b=>b.enabled!==!1&&!!l==!!b.modal&&!!d==!!b.sheet&&(Array.isArray(b.key)?b.key.includes(m):b.key===m));!p.length||qo(p,(b,h)=>(h.priority??0)-(b.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);rn(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),rn(()=>(n(s=>[...s.filter(u=>u.id!==o),{id:o,key:e,...r}]),()=>n(s=>s.filter(u=>u.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{toast as ml}from"sonner";import ul from"swr";function Mh(e,t){let{data:r,isLoading:o,mutate:a}=ul(e,ge);return{data:r,isLoading:o,update:async(n,c)=>ml.promise(a(n(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 ln,useMemo as vl}from"react";import{useEffect as an,useState as pl}from"react";function nn({pageSize:e,page:t,onPageChange:r}){let[o,a]=pl({pageIndex:t,pageSize:e});return an(()=>{a(n=>({...n,pageIndex:t}))},[t]),an(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as fl,useRouter as gl,useSearchParams as bl}from"next/navigation";import{useCallback as hl}from"react";function sn(){let e=fl(),t=gl(),r=bl(),o=Object.fromEntries(r),a=(c,s)=>{let u=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let d=new URLSearchParams;r.forEach((m,p)=>{var f;(f=s.include)!=null&&f.includes(p)&&d.set(p,m)}),u=d}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(d=>u.delete(d)),c&&Object.entries(c).forEach(([d,m])=>u.set(d,m));let l=u.toString();return l.length>0?`?${l}`:""},n=hl(({set:c,del:s,replace:u,scroll:l=!0,getNewPath:d,arrayDelimiter:m=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([h,y])=>p.set(h,Array.isArray(y)?y.join(m):y)),s&&(Array.isArray(s)?s.forEach(h=>p.delete(h)):p.delete(s));let f=p.toString(),b=`${e}${f.length>0?`?${f}`:""}`;if(d)return b;u?t.replace(b,{scroll:!1}):t.push(b,{scroll:l})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:n,getQueryString:a}}function Wh(e=ta){let{searchParams:t,queryParams:r}=sn(),o=vl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:n}=nn({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return ln(()=>{let c=parseInt(t.get("page")||"1")||1;n(s=>({...s,pageIndex:c}))},[t.get("page")]),ln(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:n}}import{useEffect as xl}from"react";function Gh(){xl(()=>{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 yl,useState as wl}from"react";function gr(e){let[t,r]=wl(),o=([a])=>{r(a)};return yl(()=>{let a=e==null?void 0:e.current;if(!a)return;let n=new ResizeObserver(o);return n.observe(a),()=>n.disconnect()},[e]),t}import{useCallback as Nl,useEffect as cn,useState as Cl}from"react";function dn(e,{container:t}={}){let[r,o]=Cl(!1),a=Nl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return cn(()=>{let n=(t==null?void 0:t.current)??window;return n.addEventListener("scroll",a),()=>n.removeEventListener("scroll",a)},[a]),cn(()=>{a()},[a]),r}import{useCallback as kl,useEffect as Pl,useState as Sl}from"react";function Ae(e){let[t,r]=Sl(1),o=kl(()=>{if(!e.current)return;let{scrollTop:n,scrollHeight:c,clientHeight:s}=e.current;r(c===s?1:Math.min(n/(c-s),1))},[]),a=gr(e);return Pl(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as Rl}from"react";import{toast as un}from"sonner";import{jsx as br,jsxs as mn}from"react/jsx-runtime";function Tl({id:e,message:t,undo:r}){let o=()=>{r(),un.dismiss(e)},a=n=>{n.key==="z"&&(n.ctrlKey||n.metaKey)&&o()};return Rl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),mn("div",{className:"flex w-full items-center justify-between space-x-2",children:[mn("div",{className:"flex items-center space-x-2",children:[br(sa,{}),br("p",{className:"font-medium",children:t})]}),br("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 iv(){return({id:t,message:r,undo:o,duration:a})=>un(br(Tl,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as pn}from"react/jsx-runtime";var Se=Ml(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...n},c)=>{var l,d;let s=Dl(null),u=gr(s);return pn(Ll.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((l=u==null?void 0:u.contentRect)==null?void 0:l.width)??"auto":"auto",height:t?((d=u==null?void 0:u.contentRect)==null?void 0:d.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...n,children:pn("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});Se.displayName="AnimatedSizeContainer";import*as Oe from"@radix-ui/react-popover";import{Drawer as pt}from"vaul";import{jsx as Re,jsxs as hr}from"react/jsx-runtime";function ve({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:n,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:u,collisionBoundary:l,sticky:d,onEscapeKeyDown:m,onWheel:p}){let{isMobile:f}=Y();return c||f?hr(pt.Root,{open:a,onOpenChange:n,children:[Re(pt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),hr(pt.Portal,{children:[Re(pt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),hr(pt.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:m,onPointerDownOutside:b=>{b.target instanceof Element&&b.target.closest("[data-sonner-toast]")&&b.preventDefault()},children:[Re("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Re("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Re("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})]}),Re(pt.Overlay,{})]})]}):hr(Oe.Root,{open:a,onOpenChange:n,children:[Re(Oe.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Re(Oe.Portal,{children:Re(Oe.Content,{sideOffset:8,align:r,side:o,className:i("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",s),sticky:d,collisionBoundary:l,onOpenAutoFocus:u,onEscapeKeyDown:m,onWheel:p,children:t})})]})}import{Fragment as xr,jsx as M,jsxs as Te}from"react/jsx-runtime";function Fl(e,t){return e===!0}function Ov({multiple:e,selected:t,setSelected:r,onSelect:o,options:a,icon:n,placeholder:c="Select...",searchPlaceholder:s="Search...",emptyState:u,createLabel:l,onCreate:d,buttonProps:m,shortcutHint:p,caret:f,side:b,open:h,onOpenChange:y,onSearchChange:w,shouldFilter:x=!0,inputRight:P,inputClassName:k,optionRight:N,optionClassName:_,matchTriggerWidth:$,hideSearch:S=!1,children:R}){let K=Fl(e,r),v=Array.isArray(t)?t:t?[t]:[],{isMobile:C}=Y(),[F,L]=Dt(!1),I=h??F,J=y??L,[fe,$r]=Dt(""),[Go,Ur]=Dt(!1),[Gr,Oi]=Dt(void 0),[zi,jo]=Dt(!1),Vi=O=>{var nt;if(o==null||o(O),!!r)if(K){let Ue=v.some(({value:Ge})=>Ge===O.value);r(Ue?v.filter(({value:Ge})=>Ge!==O.value):[...v,O])}else r(v.length&&((nt=v[0])==null?void 0:nt.value)===O.value?null:O),J(!1)},Ko=Hl((O,nt)=>nt===""?[...O.filter(Ue=>Ue.first&&!v.some(Ge=>Ge.value===Ue.value)),...v,...O.filter(Ue=>!Ue.first&&!v.some(Ge=>Ge.value===Ue.value))]:O,[v]);return vr(()=>{Go&&(Oi(a&&Ko(a,fe)),Ur(!1))},[Go,a,Ko,fe]),vr(()=>{Ur(!0)},[a]),vr(()=>{I||($r(""),Ur(!0))},[I]),vr(()=>w==null?void 0:w(fe),[fe]),M(ve,{openPopover:I,setOpenPopover:J,align:"start",side:b,onWheel:O=>{O.stopPropagation()},popoverContentClassName:i($&&"sm:w-[var(--radix-popover-trigger-width)]"),content:M(Se,{width:!C&&!$,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Te(Et,{loop:!0,shouldFilter:x,children:[!S&&Te("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[M(El,{placeholder:s,value:fe,onValueChange:$r,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",k),onKeyDown:O=>{(O.key==="Escape"||O.key==="Backspace"&&!fe)&&(O.preventDefault(),O.stopPropagation(),J(!1))}}),P&&M("div",{className:"mr-2",children:P}),p&&M("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:p})]}),M(Bl,{children:M(Et.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Gr!==void 0?Te(xr,{children:[Gr.map(O=>M(Wl,{option:O,multiple:K,selected:v.some(({value:nt})=>nt===O.value),onSelect:()=>Vi(O),right:N==null?void 0:N(O),className:_},`${O.label}, ${O.value}`)),fe.length>0&&d&&Te(Il,{className:i("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",_),onSelect:async()=>{jo(!0),await(d==null?void 0:d(fe))&&($r(""),J(!1)),jo(!1)},children:[zi?M(ke,{className:"size-4 shrink-0"}):M(ct,{className:"size-4 shrink-0"}),M("div",{className:"grow truncate",children:(l==null?void 0:l(fe))||`Create "${fe}"`})]}),x?M(Ul,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:u||"No matches"}):Gr.length===0?M("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:u||"No matches"}):null]}):M(Et.Loading,{children:M("div",{className:"flex h-12 items-center justify-center",children:M(ke,{})})})})})]})}),children:M(te,{variant:"secondary",...m,className:i(m==null?void 0:m.className,"flex gap-2"),textWrapperClassName:i(m==null?void 0:m.textWrapperClassName,"w-full flex items-center justify-start"),text:Te(xr,{children:[M("div",{className:"min-w-0 grow truncate text-left",children:R||v.map(O=>O.label).join(", ")||c}),f&&(f===!0?M(Ol,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:n?fn(n)?n:M(n,{className:"size-4 shrink-0"}):void 0})})}var Bl=({children:e})=>{let t=_l(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Te(xr,{children:[M("div",{className:"scrollbar-hide max-h-[min(50vh,250px)] w-screen overflow-y-scroll sm:w-auto",ref:t,onScroll:o,children:e}),M("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 Wl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:n}){return Te(xr,{children:[M($l,{disabledTooltip:e.disabledTooltip,children:Te(Et.Item,{className:i("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",n),disabled:!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&M("div",{className:"shrink-0 text-neutral-600",children:o?M(ya,{className:"size-4 text-neutral-600"}):M(wa,{className:"size-4 text-neutral-400"})}),Te("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&M("span",{className:"shrink-0 text-neutral-600",children:fn(e.icon)?e.icon:M(e.icon,{className:"h-4 w-4"})}),M("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&M(ar,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&M(Et.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var $l=({children:e,disabledTooltip:t})=>t?M(Q,{content:t,children:M("div",{children:e})}):e,fn=e=>Vl(e),Ul=zl((e,t)=>Al(o=>o.filtered.count===0)?M("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as yr,format as Gl,isSameMonth as jl}from"date-fns";import{ChevronLeft as gn,ChevronRight as bn,ChevronsLeft as Kl,ChevronsRight as Yl}from"lucide-react";import{forwardRef as Zl,useRef as ql}from"react";import{DayPicker as Xl,useDayPicker as Jl,useDayRender as Ql,useNavigation as ec}from"react-day-picker";import{Fragment as tc,jsx as oe,jsxs as wr}from"react/jsx-runtime";var It=Zl(({onClick:e,icon:t,disabled:r,...o},a)=>oe("button",{ref:a,type:"button",disabled:r,className:i("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:oe(t,{className:"h-full w-full shrink-0"})}));It.displayName="NavigationButton";function hn({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:n,className:c,classNames:s,...u}){return oe(Xl,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:n,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:i("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",...s},components:{IconLeft:()=>oe(gn,{className:"h-4 w-4"}),IconRight:()=>oe(bn,{className:"h-4 w-4"}),Caption:({...l})=>{let{goToMonth:d,nextMonth:m,previousMonth:p,currentMonth:f,displayMonths:b}=ec(),{numberOfMonths:h,fromDate:y,toDate:w}=Jl(),x=b.findIndex(R=>jl(l.displayMonth,R)),P=x===0,k=x===b.length-1,N=h>1&&(P||!k),_=h>1&&(k||!P),$=()=>{let R=yr(f,-1);p&&(!y||R.getTime()>=y.getTime())&&d(R)},S=()=>{let R=yr(f,1);m&&(!w||R.getTime()<=w.getTime())&&d(R)};return wr("div",{className:"flex items-center justify-between",children:[wr("div",{className:"flex items-center gap-1",children:[o&&!_&&oe(It,{disabled:a||!p||y&&yr(f,-1).getTime()<y.getTime(),"aria-label":"Go to previous year",onClick:$,icon:Kl}),!_&&oe(It,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&d(p),icon:gn})]}),oe("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Gl(l.displayMonth,"LLLL yyy",{locale:n})}),wr("div",{className:"flex items-center gap-1",children:[!N&&oe(It,{disabled:a||!m,"aria-label":"Go to next month",onClick:()=>m&&d(m),icon:bn}),o&&!N&&oe(It,{disabled:a||!m||w&&yr(f,1).getTime()>w.getTime(),"aria-label":"Go to next year",onClick:S,icon:Yl})]})]})},Day:({date:l,displayMonth:d})=>{let m=ql(null),{activeModifiers:p,buttonProps:f,divProps:b,isButton:h,isHidden:y}=Ql(l,d,m),{selected:w,today:x,disabled:P,range_middle:k}=p;if(y)return oe(tc,{});if(!h)return oe("div",{...b,className:i("flex items-center justify-center",b.className)});let{children:N,..._}=f;return wr("button",{ref:m,..._,type:"button",children:[N,x&&oe("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!w,"!bg-white":w,"!bg-blue-400":w&&k,"text-neutral-400":P})})]})}},...u})}import{enUS as uc}from"date-fns/locale";import{useEffect as mo,useMemo as xn,useRef as pc,useState as Cr}from"react";import{Command as no}from"cmdk";import{Lock as rc}from"lucide-react";import{jsx as Ye,jsxs as oc}from"react/jsx-runtime";var io=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=l=>"dateRange"in l,n=l=>"date"in l,c=(l,d)=>l.getDate()===d.getDate()&&l.getMonth()===d.getMonth()&&l.getFullYear()===d.getFullYear(),s=(l,d)=>{let m=l.from,p=d.from,f=!1;m&&p&&c(m,p)&&(f=!0);let b=l.to,h=d.to,y=!1;return b&&h&&c(b,h)&&(y=!0),f&&y},u=l=>{if(o)return o===l.id;if(a(l)){let d=r;return d&&s(d,l.dateRange)}else if(n(l)){let d=r;return d&&c(d,l.date)}return!1};return Ye(no,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ye(no.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((l,d)=>oc(no.Item,{disabled:l.requiresUpgrade,onSelect:()=>t(l),title:l.label,value:l.id,className:i("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",u(l)&&"font-semibold text-neutral-800"),children:[Ye("span",{children:l.label}),l.requiresUpgrade?Ye(rc,{className:"h-3.5 w-3.5","aria-hidden":"true"}):l.shortcut?Ye("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:l.shortcut.toUpperCase()}):null,l.requiresUpgrade&&l.tooltipContent&&Ye(Q,{side:"bottom",content:l.tooltipContent,children:Ye("div",{className:"absolute inset-0 cursor-not-allowed"})})]},d))})})};io.displayName="DatePicker.Presets";import{format as ze}from"date-fns";import{createContext as ac}from"react";var so=ac({isOpen:!1,setIsOpen:()=>{}}),nc=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},lo=(e,t,r=!1)=>{let o=!nc(),a;return r?a=o?ze(e,"d MMM, yyyy h:mm a",{locale:t}):ze(e,"d MMM, yyyy HH:mm",{locale:t}):a=ze(e,"d MMM, yyyy",{locale:t}),a},vn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:n,fromDay:c,toDay:s}=t;if(e&&e.length>0){let u=o,l=r;e.forEach(d=>{var m,p,f,b,h,y;if("date"in d){let w=d.date.getFullYear();if(o&&w<o)throw new Error(`Preset ${d.label} is before fromYear ${u}.`);if(r&&w>r)throw new Error(`Preset ${d.label} is after toYear ${l}.`);if(a&&d.date.getMonth()<a.getMonth())throw new Error(`Preset ${d.label} is before fromMonth ${a}.`);if(n&&d.date.getMonth()>n.getMonth())throw new Error(`Preset ${d.label} is after toMonth ${n}.`);if(c&&d.date.getDate()<c.getDate())throw new Error(`Preset ${d.label} is before fromDay ${c}.`);if(s&&d.date.getDate()>s.getDate())throw new Error(`Preset ${d.label} is after toDay ${ze(s,"MMM dd, yyyy")}.`)}if("dateRange"in d){let w=(m=d.dateRange.from)==null?void 0:m.getFullYear(),x=(p=d.dateRange.to)==null?void 0:p.getFullYear();if(w&&o&&w<o)throw new Error(`Preset ${d.label}'s 'from' is before fromYear ${u}.`);if(x&&r&&x>r)throw new Error(`Preset ${d.label}'s 'to' is after toYear ${l}.`);if(a){let P=(f=d.dateRange.from)==null?void 0:f.getMonth();if(P&&P<a.getMonth())throw new Error(`Preset ${d.label}'s 'from' is before fromMonth ${ze(a,"MMM, yyyy")}.`)}if(n){let P=(b=d.dateRange.to)==null?void 0:b.getMonth();if(P&&P>n.getMonth())throw new Error(`Preset ${d.label}'s 'to' is after toMonth ${ze(n,"MMM, yyyy")}.`)}if(c){let P=(h=d.dateRange.from)==null?void 0:h.getDate();if(P&&P<c.getDate())throw new Error(`Preset ${d.dateRange.from}'s 'from' is before fromDay ${ze(c,"MMM dd, yyyy")}.`)}if(s){let P=(y=d.dateRange.to)==null?void 0:y.getDate();if(P&&P>s.getDate())throw new Error(`Preset ${d.label}'s 'to' is after toDay ${ze(s,"MMM dd, yyyy")}.`)}}})}};import{cva as ic}from"class-variance-authority";import{Calendar as sc,ChevronDown as lc}from"lucide-react";import{forwardRef as cc}from"react";import{jsx as Nr,jsxs as mc}from"react/jsx-runtime";var dc=ic(["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"}}}),co=cc(({className:e,children:t,placeholder:r,hasError:o,...a},n)=>mc("button",{ref:n,className:i(dc({hasError:o}),e),...a,children:[Nr(sc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),Nr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?Nr("span",{className:"text-neutral-400",children:r}):null)}),Nr(lc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));co.displayName="DatePicker.Trigger";import{jsx as ae,jsxs as yn}from"react/jsx-runtime";var fc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:n,disableNavigation:c,disabledDays:s,showYearNavigation:u=!1,locale:l=uc,placeholder:d="Select date range",hasError:m,align:p="center",className:f,...b})=>{let{isDesktop:h}=Y(),[y,w]=Cr(!1),[x,P]=Cr(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,N]=Cr((x==null?void 0:x.dateRange)??e??t??void 0),[_,$]=Cr(k==null?void 0:k.to),S=xn(()=>k,[y]);mo(()=>{N(e)},[e]),mo(()=>{let L=a==null?void 0:a.find(({id:I})=>I===r);P(L),N((L==null?void 0:L.dateRange)??e??t)},[a,r]),mo(()=>{y?k&&$(k.to):$(k==null?void 0:k.to)},[y]);let R=(L,I)=>{let J=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:I}:L;N(J),P(void 0),(J==null?void 0:J.from)&&(J==null?void 0:J.to)&&(o==null||o(J),w(!1))},K=L=>{N(L.dateRange),P(L),o==null||o(L.dateRange,L),w(!1)},v=()=>{N(S),w(!1)},C=L=>{L||v(),w(L)},F=xn(()=>k?`${k.from?lo(k.from,l):""} - ${k.to?lo(k.to,l):""}`:null,[k,l]);return Ie((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let I=a==null?void 0:a.find(J=>J.shortcut===L.key);I&&K(I)}),ae(so.Provider,{value:{isOpen:y,setIsOpen:w},children:ae(ve,{align:p,openPopover:y,setOpenPopover:C,popoverContentClassName:"rounded-xl",content:ae("div",{className:"flex w-full",children:yn("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&&ae(gc,{children:ae("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:ae("div",{className:"sm:py-3",children:ae(io,{currentPresetId:r,currentValue:k,presets:a,onSelect:K})})})}),ae("div",{className:"scrollbar-hide overflow-x-scroll",children:ae(hn,{mode:"range",selected:k,onSelect:R,month:_,onMonthChange:$,numberOfMonths:h?2:1,disabled:s,disableNavigation:c,showYearNavigation:u,locale:l,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...b})})]})}),children:ae(co,{placeholder:d,disabled:n,className:f,hasError:m,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(x==null?void 0:x.label)??F})})})};function xx({presets:e,...t}){return e&&vn(e,t),ae(fc,{presets:e,...t})}function gc({children:e}){let t=pc(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return yn("div",{className:"relative sm:h-full",children:[ae("div",{ref:t,onScroll:o,className:i("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}),ae("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{useId as bc}from"react";import{jsx as kr,jsxs as hc}from"react/jsx-runtime";function Rx({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=bc();return hc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[kr("defs",{children:kr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:kr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),kr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import vc from"next/link";import{useEffect as xc,useState as wn}from"react";import yc from"swr";import{jsx as uo,jsxs as Nn}from"react/jsx-runtime";function Cn({className:e}){let{data:t}=yc("https://status.dub.co/api/v1/summary",ge),[r,o]=wn("bg-neutral-200"),[a,n]=wn("Loading status...");return xc(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:s,name:u}=c[0],l=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";n(u),o(l)}else n("All systems operational"),o("bg-green-500")},[t]),Nn(vc,{href:"https://status.dub.co",target:"_blank",className:i("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:[Nn("div",{className:"relative size-2",children:[uo("div",{className:i("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")}),uo("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),uo("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Pr,jsxs as kn}from"react/jsx-runtime";function Ox({icon:e,title:t,description:r,learnMore:o,children:a}){return kn("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Pr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Pr(e,{className:"size-6 text-neutral-800"})}),Pr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&kn("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Pr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as wc}from"class-variance-authority";import{useState as Pn}from"react";import{toast as Sn}from"sonner";import{Fragment as Cc,jsx as xe,jsxs as fo}from"react/jsx-runtime";var Rn=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],po={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:Rn,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:[...Rn,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Nc=wc("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 jx({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:n,previewClassName:c,icon:s=Sa,customPreview:u,accept:l="any",imageSrc:d,loading:m=!1,clickToUpload:p=!0,showHoverOverlay:f=!0,content:b,maxFileSizeMB:h=0,targetResolution:y,accessibilityLabel:w="File upload",disabled:x=!1}){let[P,k]=Pn(!1),[N,_]=Pn(null),$=async S=>{let R="dataTransfer"in S?S.dataTransfer.files&&S.dataTransfer.files[0]:S.target.files&&S.target.files[0];if(!R)return;if(_(R.name),h>0&&R.size/1024/1024>h){Sn.error(`File size too big (max ${h} MB)`);return}let K=po[l].types;if(K.length&&!K.includes(R.type)){Sn.error(po[l].errorMessage??"File type not supported");return}let v=R;if(y&&R.type.startsWith("image/"))try{let C=await Zo(R,y),F=await fetch(C).then(L=>L.blob());v=new File([F],R.name,{type:R.type})}catch(C){console.error("Error resizing image:",C)}if(t){let C=new FileReader;C.onload=F=>{var L;return r==null?void 0:r({src:(L=F.target)==null?void 0:L.result,file:v})},C.readAsDataURL(v);return}r==null||r({file:v})};return fo("label",{className:i(Nc({variant:o}),x?"cursor-not-allowed":i(p&&"cursor-pointer"),a),children:[m&&xe("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:xe(kt,{})}),xe("div",{className:"absolute inset-0 z-[5]",onDragOver:S=>{S.preventDefault(),S.stopPropagation(),k(!0)},onDragEnter:S=>{S.preventDefault(),S.stopPropagation(),k(!0)},onDragLeave:S=>{S.preventDefault(),S.stopPropagation(),k(!1)},onDrop:async S=>{S.preventDefault(),S.stopPropagation(),$(S),k(!1)}}),fo("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",x&&"bg-neutral-50",P&&!x&&"cursor-copy border-black bg-neutral-50 opacity-100",d?i("opacity-0",f&&!x&&"group-hover:opacity-100"):i(!x&&"group-hover:bg-neutral-50")),children:[xe(s,{className:i("size-7 transition-all duration-75",x?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",P?"scale-110":"scale-100"),n)}),b!==null&&xe("div",{className:i("mt-2 text-center text-sm text-neutral-500",x&&"text-neutral-400"),children:b??xe(Cc,{children:fo("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),xe("span",{className:"sr-only",children:w})]}),d&&(u??xe("img",{src:d,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),p&&xe("div",{className:"sr-only mt-1 flex shadow-sm",children:xe("input",{id:e,type:"file",accept:po[l].types.join(","),onChange:$,disabled:x},N)})]})}import{AnimatePresence as kc,motion as Tn}from"framer-motion";import{X as Pc}from"lucide-react";import Sc from"next/link";import{isValidElement as Rc}from"react";import{Fragment as Tc,jsx as ee,jsxs as At}from"react/jsx-runtime";function Mn({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return Ie("Escape",o,{priority:1}),ee(Se,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:At("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",a),children:[ee("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:ee(kc,{children:t==null?void 0:t.map(({key:n,value:c})=>{if(n==="loader")return ee(Tn.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 s=e.find(u=>u.key===n);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(u=>{var f,b,h,y;let l=(f=s.options)==null?void 0:f.find(w=>typeof w.value=="string"&&typeof u=="string"?w.value.toLowerCase()===u.toLowerCase():w.value===u),d=(l==null?void 0:l.icon)??((b=s.getOptionIcon)==null?void 0:b.call(s,u,{key:s.key,option:l}))??s.icon,m=(l==null?void 0:l.label)??((h=s.getOptionLabel)==null?void 0:h.call(s,u,{key:s.key,option:l}))??u,p=(l==null?void 0:l.permalink)??((y=s.getOptionPermalink)==null?void 0:y.call(s,u))??null;return At(Tn.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:[At("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[ee("span",{className:"shrink-0 text-neutral-600",children:Ln(s.icon)?s.icon:ee(s.icon,{className:"h-4 w-4"})}),s.label]}),ee("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),ee("div",{className:"flex items-center gap-2.5 px-3 py-2",children:s.options?At(Tc,{children:[ee("span",{className:"shrink-0 text-neutral-600",children:Ln(d)?d:ee(d,{className:"h-4 w-4"})}),p?ee(Sc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Nt(m,30)}):Nt(m,30)]}):ee("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})}),ee("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(n,u),children:ee(Pc,{className:"h-3.5 w-3.5"})})]},`${n}-${u}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&At("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",ee("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 Ln=e=>Rc(e);import{Command as Ve,useCommandState as Lc}from"cmdk";import{ChevronDown as Mc,ListFilter as Dc}from"lucide-react";import{Fragment as Ec,forwardRef as Ic,isValidElement as En,useCallback as Sr,useEffect as Rr,useImperativeHandle as Ac,useRef as bo,useState as go}from"react";import{Fragment as Fc,jsx as H,jsxs as ye}from"react/jsx-runtime";function In({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:n,activeFilters:c,askAI:s,children:u,emptyState:l,className:d}){var R,K;let{isMobile:m}=Y(),p=bo(null),f=bo(),[b,h]=go(!1);Ie("f",()=>h(!0),{enabled:!b});let[y,w]=go(""),[x,P]=go(null),k=Sr(()=>{w(""),P(null)},[]);Rr(()=>{b||k()},[b]);let N=x?e.find(({key:v})=>v===x):null,_=Sr(v=>{p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight}),w(""),P(v),o==null||o(v)},[]),$=Sr(v=>{if(!N||!c)return!1;let C=c.find(({key:F})=>F===x);return(C==null?void 0:C.value)===v||C&&N.multiple&&Array.isArray(C.value)&&C.value.includes(v)},[N]),S=Sr(v=>{N&&($(v)?r(N.key,v):t(N.key,v),N.multiple||h(!1))},[c,N,s]);return Rr(()=>{a==null||a(y)},[y]),Rr(()=>{n==null||n(x)},[x]),Rr(()=>{(N==null?void 0:N.options)&&p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight})},[N==null?void 0:N.options]),H(ve,{openPopover:b,setOpenPopover:h,onEscapeKeyDown:v=>{x&&(v.preventDefault(),k())},content:H(Se,{width:!m,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:ye(Ve,{loop:!0,shouldFilter:!N||N.shouldFilter!==!1,children:[ye("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[H(zc,{placeholder:`${(N==null?void 0:N.label)||"Filter"}...`,value:y,onValueChange:w,onKeyDown:v=>{(v.key==="Escape"||v.key==="Backspace"&&!y)&&(v.preventDefault(),v.stopPropagation(),x?k():h(!1))},emptySubmit:v=>{v.preventDefault(),v.stopPropagation(),s?(t("ai",N?`${N.label} ${y}`:y),h(!1)):S(y)}}),!N&&H("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"})]}),H(Vc,{ref:p,children:ye(Ve.List,{className:i("flex w-full flex-col gap-1 p-1",N?"min-w-[100px]":"min-w-[180px]"),children:[N?((K=(R=N.options)==null?void 0:R.filter(v=>!y||!v.hideDuringSearch))==null?void 0:K.map(v=>{let C=$(v.value);return H(Dn,{filter:N,option:v,right:C?H(xa,{className:"h-4 w-4"}):v.right,onSelect:()=>S(v.value)},v.value)}))??H(Ve.Loading,{children:H("div",{className:"-m-1 flex items-center justify-center",style:f.current,children:H(ke,{})})}):e.filter(v=>!v.hideInFilterDropdown).map(v=>ye(Ec,{children:[H(Dn,{filter:v,onSelect:()=>_(v.key)}),v.separatorAfter&&H(Ve.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},v.key)),(!N||N.options)&&H(Hc,{search:y,askAI:s,children:l?Oc(l)?(l==null?void 0:l[x??"default"])??"No matches":l:"No matches"})]})},x)]})}),children:ye("button",{type:"button",className:i("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",d),children:[H(Dc,{className:"size-4 shrink-0"}),H("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:u??"Filter"}),c!=null&&c.length?H("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):H(Mc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Oc(e){return typeof e=="object"&&e!==null&&!En(e)}var zc=e=>{let t=Lc(r=>r.filtered.count===0);return H(Ve.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"})},Vc=Ic(({children:e},t)=>{let r=bo(null);Ac(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ae(r);return ye(Fc,{children:[H("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),H("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 Dn({filter:e,option:t,right:r,onSelect:o}){var s,u;let{isMobile:a}=Y(),n=t?t.icon??((s=e.getOptionIcon)==null?void 0:s.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,c=t?t.label??((u=e.getOptionLabel)==null?void 0:u.call(e,t.value,{key:e.key,option:t})):e.label;return ye(Ve.Item,{className:i("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:l=>{l.preventDefault()},onPointerUp:l=>{l.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[H("span",{className:"shrink-0 text-neutral-600",children:_c(n)?n:H(n,{className:"h-4 w-4"})}),Nt(c,48),H("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?ye(Ve.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[H(aa,{className:"h-4 w-4"}),ye("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",ye("span",{className:"text-black",children:['"',e,'"']})]})]}):H(Ve.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),_c=e=>En(e);var h2={Select:In,List:Mn};import{useMemo as Bc,useState as An}from"react";import{jsx as Ze,jsxs as Tr}from"react/jsx-runtime";function k2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:n,handleSubmit:c}){let[s,u]=An(r.defaultValue),[l,d]=An(!1),m=Bc(()=>l||!s||s===r.defaultValue,[l,s,r.defaultValue]);return Tr("form",{onSubmit:async p=>{p.preventDefault(),d(!0),await c({[r.name]:s}),d(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Tr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Tr("div",{className:"flex flex-col space-y-3",children:[Ze("h2",{className:"text-xl font-medium",children:e}),Ze("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Ze("input",{...r,type:r.type||"text",required:!0,disabled:!!n,onChange:p=>u(p.target.value),className:i("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":n})}):Ze("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Tr("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"?Ze("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,Ze("div",{className:"shrink-0",children:Ze(te,{text:a,loading:l,disabled:m,disabledTooltip:n})})]})]})}import{useId as Wc}from"react";import{jsx as Lr,jsxs as $c}from"react/jsx-runtime";function qe({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Wc();return $c("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Lr("defs",{children:Lr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Lr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Lr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Uc}from"lucide-react";import Gc,{useCallback as jc,useState as Kc}from"react";import{jsx as Xe,jsxs as ho}from"react/jsx-runtime";var Yc=Gc.forwardRef(({className:e,type:t,...r},o)=>{let[a,n]=Kc(!1),c=jc(()=>n(!a),[a,n]);return ho("div",{children:[ho("div",{className:"relative flex",children:[Xe("input",{type:a?"text":t,className:i("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}),ho("div",{className:"group",children:[r.error&&Xe("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Xe(Uc,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Xe("button",{className:i("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?Xe(Ma,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Xe(Da,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Xe("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Yc.displayName="Input";import{flip as Qc,offset as ed,size as td,useDismiss as rd,useFloating as od,useInteractions as ad}from"@floating-ui/react";import{Command as Le,useCommandState as nd}from"cmdk";import{Check as id,ChevronDown as sd,Search as ld,X as cd}from"lucide-react";import{createContext as dd,forwardRef as _n,useContext as wo,useEffect as vo,useMemo as zn,useRef as Vn,useState as xo}from"react";import{Drawer as ft}from"vaul";import Zc from"next/image";import{memo as qc,useEffect as Xc,useState as On}from"react";import{jsx as Jc}from"react/jsx-runtime";var Ot=qc(e=>{let[t,r]=On(!0),[o,a]=On(e.src);Xc(()=>a(e.src),[e.src]);let n=c=>{r(!1);let s=c.target;s.naturalWidth<=16&&s.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return Jc(Zc,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:n,onError:()=>{a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{jsx as E,jsxs as le}from"react/jsx-runtime";var Mr=dd({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function e4({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:n,icon:c,inputAttrs:s,noItemsElement:u}){let{isMobile:l}=Y(),d=Vn(null),[m,p]=xo(!1),[f,b]=xo(""),[h,y]=xo(!1);vo(()=>{m&&y(!1)},[m]),vo(()=>y(!0),[f]),vo(()=>{t&&b(t.value)},[t]);let w=zn(()=>{let C=f.toLowerCase();return h?e.filter(F=>F.value.toLowerCase().includes(C)):f?e.sort((F,L)=>(L.value.toLowerCase().includes(C)?1:0)-(F.value.toLowerCase().includes(C)?1:0)):e},[h,f,e]),{refs:x,floatingStyles:P,context:k}=od({open:m,onOpenChange:p,middleware:[ed(8),td({apply({elements:{floating:C},availableHeight:F}){Object.assign(C.style,{maxHeight:`${Math.max(75,Math.min(F,290))}px`})},padding:8}),Qc({fallbackStrategy:"initialPlacement",padding:8})]}),N=rd(k,{enabled:!l||!n}),{getReferenceProps:_,getFloatingProps:$}=ad([N]),S=Vn(null),{scrollProgress:R,updateScrollProgress:K}=Ae(S),v=zn(()=>t&&t.icon?t.icon:t&&t.image?E(Ot,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||E(ld,{className:"size-4 text-neutral-400"}),[t,c]);return E(Mr.Provider,{value:{inputAttrs:s||{},openCommandList:m,setOpenCommandList:p,inputValue:f,setInputValue:b,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:l&&n?le(ft.Root,{open:m,onOpenChange:p,children:[E(ft.Trigger,{className:"sm:hidden",asChild:!0,children:E(Le,{ref:d,className:"relative",shouldFilter:!1,loop:!0,children:E(yo,{className:o,iconElement:v})})}),E(ft.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(ft.Portal,{children:[E(ft.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:C=>{C.target instanceof Element&&C.target.closest("[data-sonner-toast]")&&C.preventDefault()},children:le(Le,{ref:d,className:"relative",shouldFilter:!1,loop:!0,children:[E("div",{className:"p-2",children:E(yo,{className:o,iconElement:v})}),m&&le(Le.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&f===""&&(u?E("div",{children:u}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&E(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),E(Hn,{items:w})]})]})}),E(ft.Overlay,{})]})]}):le(Le,{ref:d,className:"relative",shouldFilter:!1,loop:!0,children:[E(yo,{className:o,iconElement:v,ref:x.setReference,..._()}),m&&le("div",{ref:x.setFloating,style:P,...$(),className:"z-20 flex w-full min-w-[160px] flex-col overflow-hidden rounded-md border border-neutral-200 bg-white shadow-md",children:[le("div",{ref:S,onScroll:K,className:"grow overflow-y-auto p-2",children:[le(Le.List,{children:[e.length===0&&f===""&&(u?E("div",{children:u}):E("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&E(Le.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),E(Hn,{items:w})]}),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(R,2)}})]})]})})}var yo=_n(({iconElement:e,className:t,...r},o)=>le("label",{ref:o,className:i("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}),le("div",{className:"flex h-10 grow",children:[E(md,{}),E(ud,{})]})]})),md=_n((e,t)=>{let r=nd(l=>l.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:n,inputValue:c,setInputValue:s,disabled:u}=wo(Mr);return E(Le.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>n(!0),value:c,onValueChange:s,onKeyDown:l=>{l.key==="Escape"?(l.preventDefault(),n(!1)):l.key==="Enter"&&r?n(!1):l.key.match(/^[a-z0-9]$/i)&&!l.metaKey&&n(!0)},disabled:u,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 ud(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=wo(Mr);return E("button",{type:"button",onClick:()=>{r(n=>!n),e(null),a("")},className:"absolute inset-y-0 right-0 my-auto pr-3",children:o.length>0?E(cd,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):E(sd,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function Hn({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=wo(Mr);return e.map(a=>le(Le.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:[le("div",{className:"flex items-center space-x-2",children:[a.icon||a.image&&E(Ot,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),E("p",{className:i("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(ur,{className:"text-xs",variant:"neutral",children:a.label})]}),E(id,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as No from"@radix-ui/react-label";import{cva as pd}from"class-variance-authority";import*as Fn from"react";import{jsx as bd}from"react/jsx-runtime";var fd=pd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),gd=Fn.forwardRef(({className:e,...t},r)=>bd(No.Root,{ref:r,className:i(fd(),e),...t}));gd.displayName=No.Root.displayName;import{cva as hd}from"class-variance-authority";import{isValidElement as vd}from"react";import{jsx as Bn,jsxs as Wn}from"react/jsx-runtime";var Co=hd(["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 u4({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:n,...c}){return Wn(e||"button",{...e==="button"?{type:"button"}:{},className:i(Co({variant:t}),n),...c,children:[Wn("div",{className:"flex grow items-center gap-2",children:[o&&(xd(o)?o:Bn(o,{className:"size-4"})),r]}),a&&Bn("kbd",{className:i("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 xd=e=>vd(e);import{curveNatural as $n}from"@visx/curve";import{LinearGradient as Un}from"@visx/gradient";import{Group as yd}from"@visx/group";import{ParentSize as wd}from"@visx/responsive";import{scaleLinear as Nd,scaleUtc as Cd}from"@visx/scale";import{Area as kd,AreaClosed as Pd}from"@visx/shape";import{motion as Gn}from"framer-motion";import{useId as Sd,useMemo as jn}from"react";import{jsx as we,jsxs as ko}from"react/jsx-runtime";var Rd={top:8,right:2,bottom:2,left:2};function N4(e){return we(wd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&we(Td,{...{width:t,height:r,...e}})})}function Td({width:e,height:t,data:r,curve:o=!0,color:a,padding:n}){let c={...Rd,...n},s=Sd(),u=jn(()=>r.map(({date:m})=>({date:m,value:0})),[r]),{yScale:l,xScale:d}=jn(()=>{let m=r.map(({value:y})=>y),p=Math.max(...m),f=r.map(({date:y})=>y.getTime()),b=new Date(Math.min(...f)),h=new Date(Math.max(...f));return{yScale:Nd({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:Cd({domain:[b,h],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return ko("svg",{width:e,height:t,children:[ko("defs",{children:[we(Un,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),we(Un,{id:`${s}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),we("mask",{id:`${s}-mask`,maskContentUnits:"objectBoundingBox",children:we("rect",{width:"1",height:"1",fill:`url(#${s}-mask-gradient)`})})]}),ko(yd,{left:c.left,top:c.top,children:[we(kd,{data:r,x:({date:m})=>d(m),y:({value:m})=>l(m)??0,curve:o?$n:void 0,children:({path:m})=>we(Gn.path,{initial:{d:m(u)||"",opacity:0},animate:{d:m(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),we(Pd,{data:r,x:({date:m})=>d(m),y:({value:m})=>l(m)??0,yScale:l,curve:o?$n:void 0,children:({path:m})=>we(Gn.path,{initial:{d:m(u)||"",opacity:0},animate:{d:m(r)||"",opacity:1},fill:`url(#${s}-color-gradient)`,mask:`url(#${s}-mask)`})})]})]},r.length)}import*as ce from"@radix-ui/react-dialog";import*as Po from"@radix-ui/react-visually-hidden";import{useRouter as Ld}from"next/navigation";import{Drawer as Je}from"vaul";import{jsx as ne,jsxs as gt}from"react/jsx-runtime";function T4({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:n,preventDefaultClose:c,drawerRootProps:s}){let u=Ld(),l=({dragged:m}={})=>{c&&!m||(a&&a(),o?o(!1):u.back())},{isMobile:d}=Y();return d&&!n?ne(Je.Root,{open:o?r:!0,onOpenChange:m=>{m||l({dragged:!0})},...s,children:gt(Je.Portal,{children:[ne(Je.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ne(Je.Content,{onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest("[data-sonner-toast]")&&m.preventDefault()},className:i("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",t),children:gt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[gt(Po.Root,{children:[ne(Je.Title,{children:"Modal"}),ne(Je.Description,{children:"This is a modal"})]}),ne(Md,{}),e]})}),ne(Je.Overlay,{})]})}):ne(ce.Root,{open:o?r:!0,onOpenChange:m=>{m||l()},children:gt(ce.Portal,{children:[ne(ce.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),gt(ce.Content,{onOpenAutoFocus:m=>m.preventDefault(),onCloseAutoFocus:m=>m.preventDefault(),onPointerDownOutside:m=>{m.target instanceof Element&&m.target.closest("[data-sonner-toast]")&&m.preventDefault()},className:i("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:[gt(Po.Root,{children:[ne(ce.Title,{children:"Modal"}),ne(ce.Description,{children:"This is a modal"})]}),e]})]})})}function Md(){return ne("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ne("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{useCallback as So}from"react";import{jsx as zt,jsxs as Dd}from"react/jsx-runtime";function O4({value:e,onChange:t,min:r,max:o,step:a=1,disabled:n,className:c,id:s,formatValue:u,decrementAriaLabel:l="Decrease",incrementAriaLabel:d="Increase",...m}){let p=typeof r=="number"?e>r:!0,f=typeof o=="number"?e<o:!0,b=So(w=>{let x=w;return typeof r=="number"&&(x=Math.max(r,x)),typeof o=="number"&&(x=Math.min(o,x)),x},[r,o]),h=So(()=>{n||!p||t(b(e-a))},[n,p,b,t,a,e]),y=So(()=>{n||!f||t(b(e+a))},[n,f,b,t,a,e]);return Dd("div",{id:s,role:"group","aria-disabled":n,className:i("flex h-10 w-full select-none items-stretch overflow-hidden rounded-lg border border-neutral-200 bg-white",n&&"opacity-60",c),...m,children:[zt("button",{type:"button","aria-label":l,onClick:h,disabled:n||!p,className:i("flex h-full w-24 items-center justify-center border-r border-neutral-200 text-neutral-700 transition-colors",!(n||!p)&&"hover:bg-neutral-50"),children:zt(lr,{className:"block size-4"})}),zt("div",{role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,tabIndex:0,onKeyDown:w=>{n||((w.key==="ArrowLeft"||w.key==="ArrowDown")&&(w.preventDefault(),h()),(w.key==="ArrowRight"||w.key==="ArrowUp")&&(w.preventDefault(),y()))},className:i("flex min-w-0 flex-1 items-center justify-center px-3 text-sm text-neutral-900"),prefix:"",children:u?u(e):e}),zt("button",{type:"button","aria-label":d,onClick:y,disabled:n||!f,className:i("flex h-full w-24 items-center justify-center border-l border-neutral-200 text-neutral-700 transition-colors",!(n||!f)&&"hover:bg-neutral-50"),children:zt(ct,{className:"block size-4"})})]})}import{Fragment as Ed,jsx as Dr,jsxs as bt}from"react/jsx-runtime";var Kn=i("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 H4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:n,showTotalCount:c=!0}){return bt("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[bt("div",{className:"flex items-center gap-2",children:[bt("div",{children:[Dr("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&bt(Ed,{children:[bt("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&&Dr("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),n]}),bt("div",{className:"flex items-center gap-2",children:[Dr("button",{type:"button",className:Kn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Dr("button",{type:"button",className:Kn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import*as He from"@radix-ui/react-radio-group";import{Circle as Id}from"lucide-react";import*as Ro from"react";import{jsx as Er}from"react/jsx-runtime";var Ad=Ro.forwardRef(({className:e,...t},r)=>Er(He.Root,{className:i("grid gap-2",e),...t,ref:r}));Ad.displayName=He.Root.displayName;var Od=Ro.forwardRef(({className:e,...t},r)=>Er(He.Item,{ref:r,className:i("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:Er(He.Indicator,{className:"flex items-center justify-center",children:Er(Id,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Od.displayName=He.Item.displayName;import{Drawer as _e}from"vaul";import{jsx as Qe,jsxs as Fd}from"react/jsx-runtime";function zd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?_e.NestedRoot:_e.Root;return Qe(a,{direction:"right",handleOnly:!0,...o,children:Fd(_e.Portal,{children:[Qe(_e.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),Qe(_e.Content,{...t,onPointerDownOutside:n=>{var c;n.target instanceof Element&&n.target.closest("[data-sonner-toast]")&&n.preventDefault(),(c=t==null?void 0:t.onPointerDownOutside)==null||c.call(t,n)},className:i("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)",userSelect:"auto",...t==null?void 0:t.style},children:Qe("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function Vd({className:e,...t}){return Qe(_e.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Hd(e){return Qe(_e.Description,{...e})}function _d(e){return Qe(_e.Close,{...e})}var j4=Object.assign(zd,{Title:Vd,Description:Hd,Close:_d});import{useEffect as Bd,useRef as Wd,useState as $d}from"react";import{jsx as Yn}from"react/jsx-runtime";var Ud=`
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
|
|
5
5
|
void main()
|
|
6
6
|
{
|
|
7
7
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
8
8
|
}
|
|
9
|
-
`,
|
|
9
|
+
`,Gd=`
|
|
10
10
|
precision mediump float;
|
|
11
11
|
|
|
12
12
|
uniform vec2 resolution;
|
|
@@ -14,6 +14,7 @@ uniform float time;
|
|
|
14
14
|
uniform float dotSize;
|
|
15
15
|
uniform float cellSize;
|
|
16
16
|
uniform float speed;
|
|
17
|
+
uniform vec3 color;
|
|
17
18
|
|
|
18
19
|
// Gold noise: https://stackoverflow.com/a/28095165
|
|
19
20
|
float PHI = 1.61803398874989484820459;
|
|
@@ -34,19 +35,19 @@ void main(void) {
|
|
|
34
35
|
|
|
35
36
|
float opacity = dot * fadeEffect;
|
|
36
37
|
|
|
37
|
-
vec4 fragColor = vec4(
|
|
38
|
+
vec4 fragColor = vec4(color, opacity);
|
|
38
39
|
fragColor.rgb *= fragColor.a;
|
|
39
40
|
|
|
40
41
|
gl_FragColor = fragColor;
|
|
41
42
|
}
|
|
42
|
-
`,Fd=60,Bd=1e3/Fd;function D4({dotSize:e=1,cellSize:t=3,speed:r=5,className:o}){let a=zd(null),[c,d]=Hd(!1);return Od(()=>{let s=a.current;if(!s||!s.parentElement)return;let m=s.parentElement,l=window.devicePixelRatio||1;s.width=m.clientWidth*l,s.height=m.clientHeight*l;let n=s.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(n===null){alert("Failed to initialize WebGL");return}let u=n.createProgram();if(!u){console.error("Failed to create shader program");return}for(let M=0;M<2;++M){let D=M===0?Vd:_d,L=n.createShader(M===0?n.VERTEX_SHADER:n.FRAGMENT_SHADER);if(!L){console.error("Failed to create shader");return}n.shaderSource(L,D),n.compileShader(L),n.getShaderParameter(L,n.COMPILE_STATUS)||console.error(n.getShaderInfoLog(L)),n.attachShader(u,L),n.linkProgram(u)}n.getProgramParameter(u,n.LINK_STATUS)||console.error(n.getProgramInfoLog(u));let p=n.getAttribLocation(u,"position"),b=n.getUniformLocation(u,"time"),f=n.getUniformLocation(u,"resolution"),x=n.getUniformLocation(u,"dotSize"),v=n.getUniformLocation(u,"cellSize"),w=n.getUniformLocation(u,"speed");n.useProgram(u);let y=[1,1,-1,1,1,-1,-1,-1],P=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,P),n.bufferData(n.ARRAY_BUFFER,new Float32Array(y),n.STATIC_DRAW),n.enableVertexAttribArray(p),n.vertexAttribPointer(p,2,n.FLOAT,!1,0,0),n.uniform1f(x,e*window.devicePixelRatio),n.uniform1f(v,t*window.devicePixelRatio),n.uniform1f(w,r);let N,C=0;function W(M){if(M-C<Bd){N=requestAnimationFrame(W);return}C=M,n&&s&&u&&(n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),n.uniform1f(b,M/1e3),n.uniform2f(f,s.width,s.height),n.drawArrays(n.TRIANGLE_STRIP,0,4)),N=requestAnimationFrame(W)}return N=requestAnimationFrame(W),s.addEventListener("webglcontextlost",M=>{M.preventDefault(),d(!0),cancelAnimationFrame(N)}),()=>{cancelAnimationFrame(N),s.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),$n("div",{className:i("absolute inset-0",o,c&&"opacity-0"),children:$n("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import*as _e from"@radix-ui/react-slider";import{jsx as Qe,jsxs as Mr}from"react/jsx-runtime";function A4({value:e,onChange:t,min:r,max:o,step:a=1,marks:c,className:d,hint:s,disabled:m}){let l=c||[r,r+(o-r)/3,r+2*(o-r)/3,o];return Qe("div",{className:i("relative z-0",d),children:Mr("div",{className:"w-full",children:[Mr(_e.Root,{className:"relative flex h-8 w-full items-center [--thumb-radius:13px]",value:[e],min:r,max:o,step:a,onValueChange:([n])=>t(n),disabled:m,"aria-label":"Slider",children:[Mr(_e.Track,{className:"relative h-4 w-full overflow-visible rounded-full bg-neutral-200",children:[Qe("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Mr("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[Qe(_e.Range,{className:"absolute h-4 bg-black"}),l.map(n=>{let u=(n-r)/(o-r)*100,p=n<=e;return Qe("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${u}%`}},n)})]})]}),Qe(_e.Thumb,{className:"z-20 flex size-[calc(var(--thumb-radius)*2)] items-center justify-center rounded-full border-0 bg-white shadow-[0_2px_2px_rgba(0,0,0,0.10),0_3px_3px_rgba(0,0,0,0.09)]",children:Qe("span",{className:"block size-4 rounded-full bg-[#171717]"})})]}),Qe("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:s})]})})}import{useEffect as Wd,useId as $d,useRef as Ud}from"react";import{jsx as Dr,jsxs as Un}from"react/jsx-runtime";function V4({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:c,autoFocus:d=!1}){let s=$d(),m=Ud(null);return Wd(()=>{m.current&&d&&setTimeout(()=>{var l;(l=m.current)==null||l.focus()},10)},[d]),Un("div",{className:a,children:[r&&Dr("div",{className:"flex items-center gap-2",children:Dr("label",{htmlFor:`${s}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),Un("div",{className:"mt-2 flex w-full items-center justify-between rounded-md border border-neutral-300 bg-white shadow-sm transition-all focus-within:border-neutral-800 focus-within:outline-none focus-within:ring-1 focus-within:ring-neutral-500",children:[Dr("input",{ref:m,id:`${s}-datetime`,type:"text",placeholder:o,defaultValue:e?Nt(e):"",onBlur:l=>{if(l.target.value.length>0){let n=$r(l.target.value);n&&(t(n),l.target.value=Nt(n))}},onKeyDown:l=>{if(l.key==="Enter"&&m.current){l.preventDefault();let n=$r(m.current.value);n&&(t(n),m.current.value=Nt(n))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Dr("input",{type:"datetime-local",id:`${s}-datetime-local`,required:c,value:e?Wo(e):"",onChange:l=>{let n=new Date(l.target.value);t(n),m.current&&(m.current.value=Nt(n))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as Gd}from"class-variance-authority";import{jsx as Gn,jsxs as Yd}from"react/jsx-runtime";var Kd=Gd("flex gap-1.5 items-center max-w-fit rounded-md px-2 py-1 text-xs font-medium whitespace-nowrap",{variants:{variant:{neutral:"bg-neutral-500/[.15] text-neutral-600",new:"bg-blue-500/[.15] text-blue-600",success:"bg-green-500/[.15] text-green-600",pending:"bg-orange-500/[.15] text-orange-600",warning:"bg-yellow-500/[.15] text-yellow-600",error:"bg-red-500/[.15] text-red-600"}},defaultVariants:{variant:"neutral"}}),jd={neutral:ya,new:va,success:ha,pending:xa,warning:Gr,error:Gr};function G4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:c,...d}){let s=r!==null?r??jd[t??"neutral"]:null;return Gn(dr,{tooltipProps:{content:o},children:Yd("span",{className:i(Kd({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...d,children:[s&&Gn(s,{className:"h-3 w-3 shrink-0"}),c]})})}import*as Ir from"@radix-ui/react-switch";import{useMemo as Zd}from"react";import{jsx as Er}from"react/jsx-runtime";function Q4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:c,checked:d=!0,loading:s=!1,disabled:m=!1,disabledTooltip:l}){let n=Zd(()=>l?!0:m||s,[l,m,s]),u=Er(Ir.Root,{checked:s?!1:d,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:n,className:i("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-neutral-200 relative inline-flex h-4 w-8 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out","focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","data-[disabled]:cursor-not-allowed",r),children:Er(Ir.Thumb,{className:i(`radix-state-checked:${a}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",o,a),children:c})});return l?Er(J,{content:l,children:Er("div",{className:"inline-block leading-none",children:u})}):u}import{Command as No}from"cmdk";import{useState as qd}from"react";import{jsx as gt,jsxs as Xd}from"react/jsx-runtime";function sy({table:e}){let[t,r]=qd(!1);return gt(Ae,{openPopover:t,setOpenPopover:r,content:gt(No,{tabIndex:0,loop:!0,children:gt(No.List,{className:"flex w-screen flex-col gap-1 p-1 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[130px]",children:e.getAllColumns().filter(o=>o.getCanHide()).map(o=>{var a;return Xd(No.Item,{className:i("flex cursor-pointer select-none items-center gap-2 whitespace-nowrap rounded-md px-3 py-1.5","data-[selected=true]:bg-neutral-100"),onSelect:()=>o.toggleVisibility(),children:[gt("input",{checked:o.getIsVisible(),type:"checkbox",className:"h-3 w-3 rounded-full border-neutral-300 text-black focus:outline-none focus:ring-0",disabled:!0}),(a=o.columnDef.header)==null?void 0:a.toString()]},o.id)})})}),align:"end",children:gt(ee,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:gt(La,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Co,getCoreRowModel as em,useReactTable as tm}from"@tanstack/react-table";import{AnimatePresence as rm,motion as om}from"framer-motion";import{memo as am,useEffect as Ht,useMemo as Zn,useState as Yn}from"react";import{useEffect as Jd,useState as Qd}from"react";import{jsx as Ar,jsxs as Kn}from"react/jsx-runtime";function jn({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,c]=Qd(0);return Jd(()=>{o!==0&&c(o)},[o]),De("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),Ar("div",{className:i("border-border-subtle w-full border-b bg-white","transition-opacity duration-100",o>0?"pointer-events-auto opacity-100":"pointer-events-none opacity-0",r),...{inert:o>0?void 0:""},children:Kn("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[Ar("div",{className:"flex w-6 items-center justify-center",children:Ar(ct,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:e.getIsAllRowsSelected()?!0:e.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>e.toggleAllRowsSelected(),title:"Select all"})}),Kn("span",{className:i("text-content-emphasis mr-2 text-sm font-medium tabular-nums transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:[a," selected"]}),Ar("div",{className:i("flex items-center gap-2 transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:t==null?void 0:t(e)})]})})}import{Fragment as sm,jsx as z,jsxs as ce}from"react/jsx-runtime";var ko=(e,t)=>i(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle px-4 relative","border-l border-b",e==="select"&&"py-0 pr-0 pl-2",e==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75","group-data-[selected=true]/row:bg-blue-50"]),nm=i(["absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none","bg-neutral-300/50","opacity-0 group-hover/resize:opacity-100 hover:opacity-100","group-hover/resize:bg-neutral-300 hover:bg-neutral-400","transition-all duration-200","-mr-px","after:absolute after:right-0 after:top-0 after:h-full after:w-4 after:translate-x-1/2"]);function My(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:c,pagination:d,onPaginationChange:s,getRowId:m,enableColumnResizing:l=!1,columnResizeMode:n="onChange"}=e,u=!!e.onRowSelectionChange||!!e.selectionControls,[p,b]=Yn(e.columnVisibility??{}),[f,x]=Yn(e.selectedRows??{});Ht(()=>{if(!m||!t)return;let y=Object.entries(f);if(y.length>0){let P=y.filter(([N])=>t.find(C=>(m==null?void 0:m(C))===N));P.length!==y.length&&x(Object.fromEntries(P))}},[t,f,m]),Ht(()=>{e.selectedRows&&!Ur(e.selectedRows,f)&&x(e.selectedRows??{})},[e.selectedRows]),Ht(()=>{var y;(y=e.onRowSelectionChange)==null||y.call(e,w.getSelectedRowModel().rows)},[f]),Ht(()=>{e.columnVisibility&&!Ur(e.columnVisibility,p)&&b(e.columnVisibility??{})},[e.columnVisibility]),Ht(()=>{var y;(y=e.onColumnVisibilityChange)==null||y.call(e,p)},[p]);let v=Zn(()=>[...u?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:y})=>z("div",{className:"flex size-full items-center justify-center",children:z(ct,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:y.getIsAllRowsSelected()?!0:y.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>y.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:y})=>z("div",{className:"flex size-full items-center justify-center",children:z(ct,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:y.getIsSelected(),onCheckedChange:y.getToggleSelectedHandler(),title:"Select"})})}]:[],...o],[u,o]),w=tm({data:t,rowCount:r,columns:v,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:l,...a},getCoreRowModel:em(),onPaginationChange:s,onColumnVisibilityChange:y=>b(y),onRowSelectionChange:x,state:{pagination:d,columnVisibility:p,columnPinning:{left:[],right:[],...c},rowSelection:f},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:l,columnResizeMode:n});return{...e,columnVisibility:p,table:w,enableColumnResizing:l}}var im=am(function({row:t,onRowClick:r,rowProps:o,cellRight:a,tdClassName:c,table:d}){let{className:s,...m}=o||{};return z("tr",{className:i("group/row",r&&"cursor-pointer select-none",d.getRowModel().rows.length>8&&t.index===d.getRowModel().rows.length-1&&"[&_td]:border-b-0",s),onClick:r?l=>{kt(l)||r(t,l)}:void 0,"data-selected":t.getIsSelected(),...m,children:t.getVisibleCells().map(l=>z("td",{className:i(ko(l.column.id,!!r),"text-content-default group",Po(l.column,t.index===d.getRowModel().rows.length-1),typeof c=="function"?c(l.column.id):c),style:{width:l.column.getSize(),...So(l.column)},children:ce("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[z("div",{className:"min-w-0 shrink grow truncate",children:Co(l.column.columnDef.cell,l.getContext())}),a==null?void 0:a(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function Dy({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:c,sortOrder:d,onSortChange:s,sortableColumns:m=[],className:l,containerClassName:n,scrollWrapperClassName:u,thClassName:p,tdClassName:b,table:f,pagination:x,resourceName:v,onRowClick:w,onRowSelectionChange:y,selectionControls:P,rowProps:N,rowCount:C,children:W,enableColumnResizing:M=!1}){let D=!!y||!!P,L=Zn(()=>M?f.getVisibleLeafColumns().reduce((S,h)=>S+h.getSize(),0):"100%",[M,f.getVisibleLeafColumns()]);return ce("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",n),children:[!r&&!!(e!=null&&e.length)||t?ce(sm,{children:[D&&z(jn,{table:f,controls:P,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),ce("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",u),children:[ce("table",{className:i(["group/table w-full border-separate border-spacing-0 transition-[border-spacing,margin-top]","[&_tr>*:first-child]:border-l-transparent","[&_tr>*:last-child]:border-r-transparent","[&_tr>*:last-child]:border-r-transparent","[&_th]:relative [&_th]:select-none",M&&"[&_th]:group/resize"],l),style:{width:"100%",tableLayout:M?"fixed":"auto",minWidth:L},children:[z("thead",{className:"relative",children:f.getHeaderGroups().map(S=>z("tr",{children:S.headers.map(h=>{let R=m.includes(h.column.id),G=R?"button":"div";return ce("th",{colSpan:h.colSpan,className:i(ko(h.id),"text-content-emphasis select-none font-medium",Po(h.column,!f.getRowModel().rows.length),typeof p=="function"?p(h.column.id):p,M&&"relative"),style:{width:h.getSize(),...So(h.column)},children:[z("div",{className:"flex items-center justify-between gap-6 !pr-0",children:ce(G,{className:i("flex items-center gap-2",h.column.id==="select"&&"size-full"),...R&&{type:"button",disabled:!R,"aria-label":"Sort by column",onClick:()=>s==null?void 0:s({sortBy:h.column.id,sortOrder:c!==h.column.id||d==="asc"?"desc":"asc"})},children:[h.isPlaceholder?null:Co(h.column.columnDef.header,h.getContext()),R&&c===h.column.id&&z(ta,{className:"h-3 w-3 shrink-0",order:d||"desc"})]})}),M&&h.column.getCanResize()&&!["select","menu"].includes(h.column.id)&&z("div",{onMouseDown:h.getResizeHandler(),onTouchStart:h.getResizeHandler(),onClick:k=>k.stopPropagation(),className:nm})]},h.id)})},S.id))}),z("tbody",{children:f.getRowModel().rows.map(S=>{let h=typeof N=="function"?N(S):N,{className:R,...G}=h||{};return M?z(im,{row:S,onRowClick:w,rowProps:h,cellRight:a,tdClassName:b,table:f},`${S.id}-${f.getVisibleLeafColumns().map(k=>k.id).join(",")}`):z("tr",{className:i("group/row",w&&"cursor-pointer select-none",f.getRowModel().rows.length>8&&S.index===f.getRowModel().rows.length-1&&"[&_td]:border-b-0",R),onClick:w?k=>{kt(k)||w(S,k)}:void 0,"data-selected":S.getIsSelected(),...G,children:S.getVisibleCells().map(k=>z("td",{className:i(ko(k.column.id,!!w),"text-content-default group",Po(k.column,S.index===f.getRowModel().rows.length-1),typeof b=="function"?b(k.column.id):b),style:{minWidth:k.column.columnDef.minSize,maxWidth:k.column.columnDef.maxSize,width:k.column.columnDef.size||"auto",...So(k.column)},children:ce("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[z("div",{className:"min-w-0 shrink grow truncate",children:Co(k.column.columnDef.cell,k.getContext())}),a==null?void 0:a(k)]})},k.id))},S.id)})})]}),W]})]}):z("div",{className:"text-content-subtle flex h-96 w-full items-center justify-center text-sm",children:r||o||`No ${(v==null?void 0:v(!0))||"items"} found.`}),x&&!r&&!!(e!=null&&e.length)&&!!C&&ce("div",{className:"border-border-subtle bg-bg-default text-content-default sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t px-4 py-3.5 text-sm leading-6",children:[ce("div",{children:[z("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",ce("span",{className:"font-medium",children:[((x.pageIndex-1)*x.pageSize+1).toLocaleString(),"-",Math.min((x.pageIndex-1)*x.pageSize+x.pageSize,f.getRowCount()).toLocaleString()]})," ","of"," ",z("span",{className:"font-medium",children:f.getRowCount().toLocaleString()})," ",(v==null?void 0:v(f.getRowCount()!==1))||"items"]}),ce("div",{className:"flex items-center gap-2",children:[z(ee,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>f.previousPage(),disabled:x.pageIndex===1}),z(ee,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>f.nextPage(),disabled:x.pageIndex===f.getPageCount()})]})]}),z(rm,{children:t&&z(om.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:z("div",{className:"flex h-[75vh] w-full items-center justify-center",children:z(Ne,{})})})})]})}var Po=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},So=e=>{let t=e.getIsPinned();return{left:t==="left"?`${e.getStart("left")}px`:void 0,right:t==="right"?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative"}};import{LayoutGroup as lm,motion as qn}from"framer-motion";import cm from"next/link";import{useId as dm}from"react";import{jsx as Or,jsxs as mm}from"react/jsx-runtime";function Hy({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:c,style:d}){let s=dm();return Or(lm,{id:s,children:Or(qn.div,{layout:!0,className:i("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",o),style:d,children:e.map(m=>{let l=m.value===t,n=m.href?cm:"button";return mm(n,{...m.href?{href:m.href}:{type:"button"},"data-selected":l,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!l&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(m.value),children:[typeof m.label=="string"?Or("p",{children:m.label}):m.label,m.badge,l&&Or(qn.div,{layoutId:s,className:i("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",c),transition:{duration:.25}})]},m.value)})})})}import{useEffect as um,useId as pm,useRef as fm,useState as gm}from"react";import{jsx as pe,jsxs as Ro}from"react/jsx-runtime";var bm=[{key:"utm_source",icon:Da,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Va,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Ta,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Oa,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Ha,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Ma,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function Gy({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:c}){let{isMobile:d}=Y(),s=pm(),[m,l]=gm(!1),n=fm(null);return um(()=>{n.current&&!d&&o&&setTimeout(()=>{var u;return(u=n.current)==null?void 0:u.focus()},10)},[]),pe("div",{className:i("grid gap-y-3",c),children:bm.map(({key:u,icon:p,label:b,placeholder:f,description:x},v)=>pe("div",{className:"group relative",children:Ro("div",{className:"relative z-10 flex",children:[pe(J,{content:Ro("div",{className:"p-3 text-center text-xs",children:[pe("p",{className:"text-neutral-600",children:x}),pe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:Ro("div",{className:i("flex items-center gap-1.5 rounded-l-md border-y border-l border-neutral-300 bg-neutral-50 px-3 py-1.5 text-neutral-700",m?"sm:min-w-36":"sm:min-w-28"),onClick:()=>l(w=>!w),children:[pe(p,{className:"size-4 shrink-0"}),pe("label",{htmlFor:`${s}-${u}`,className:"select-none text-sm",children:m?pe("span",{className:"font-mono text-xs",children:u}):b})]})}),pe("div",{className:"min-w-0 grow",children:pe(dr,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:pe("input",{type:"text",id:`${s}-${u}`,ref:v===0?n:void 0,placeholder:f,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[u]||"",onChange:w=>t(u,w.target.value)})})})]})},u))})}import{jsx as To,jsxs as hm}from"react/jsx-runtime";function jy(){return hm("div",{style:zr.backgroundMain,children:[To("div",{style:zr.backgroundMainBefore}),To("div",{style:zr.backgroundMainAfter}),To("div",{style:zr.backgroundContent})]})}var zr={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
|
|
43
|
+
`,jd=60,Kd=1e3/jd;function q4({dotSize:e=1,cellSize:t=3,speed:r=5,color:o=[0,0,0],className:a}){let n=Wd(null),[c,s]=$d(!1);return Bd(()=>{let u=n.current;if(!u||!u.parentElement)return;let l=u.parentElement,d=window.devicePixelRatio||1;u.width=l.clientWidth*d,u.height=l.clientHeight*d;let m=u.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(m===null){alert("Failed to initialize WebGL");return}let p=m.createProgram();if(!p){console.error("Failed to create shader program");return}for(let R=0;R<2;++R){let K=R===0?Ud:Gd,v=m.createShader(R===0?m.VERTEX_SHADER:m.FRAGMENT_SHADER);if(!v){console.error("Failed to create shader");return}m.shaderSource(v,K),m.compileShader(v),m.getShaderParameter(v,m.COMPILE_STATUS)||console.error(m.getShaderInfoLog(v)),m.attachShader(p,v),m.linkProgram(p)}m.getProgramParameter(p,m.LINK_STATUS)||console.error(m.getProgramInfoLog(p));let f=m.getAttribLocation(p,"position"),b=m.getUniformLocation(p,"time"),h=m.getUniformLocation(p,"resolution"),y=m.getUniformLocation(p,"dotSize"),w=m.getUniformLocation(p,"cellSize"),x=m.getUniformLocation(p,"speed"),P=m.getUniformLocation(p,"color");m.useProgram(p);let k=[1,1,-1,1,1,-1,-1,-1],N=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,N),m.bufferData(m.ARRAY_BUFFER,new Float32Array(k),m.STATIC_DRAW),m.enableVertexAttribArray(f),m.vertexAttribPointer(f,2,m.FLOAT,!1,0,0),m.uniform1f(y,e*window.devicePixelRatio),m.uniform1f(w,t*window.devicePixelRatio),m.uniform1f(x,r),m.uniform3f(P,o[0],o[1],o[2]);let _,$=0;function S(R){if(R-$<Kd){_=requestAnimationFrame(S);return}$=R,m&&u&&p&&(m.clear(m.COLOR_BUFFER_BIT|m.DEPTH_BUFFER_BIT),m.uniform1f(b,R/1e3),m.uniform2f(h,u.width,u.height),m.drawArrays(m.TRIANGLE_STRIP,0,4)),_=requestAnimationFrame(S)}return _=requestAnimationFrame(S),u.addEventListener("webglcontextlost",R=>{R.preventDefault(),s(!0),cancelAnimationFrame(_)}),()=>{cancelAnimationFrame(_),u.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),Yn("div",{className:i("absolute inset-0",a,c&&"opacity-0"),children:Yn("canvas",{ref:n,width:"100%",height:"100%",className:"size-full"})})}import*as Fe from"@radix-ui/react-slider";import{jsx as et,jsxs as Ir}from"react/jsx-runtime";function Q4({value:e,onChange:t,min:r,max:o,step:a=1,marks:n,className:c,hint:s,disabled:u}){let l=n||[r,r+(o-r)/3,r+2*(o-r)/3,o];return et("div",{className:i("relative z-0",c),children:Ir("div",{className:"w-full",children:[Ir(Fe.Root,{className:"relative flex h-8 w-full items-center [--thumb-radius:13px]",value:[e],min:r,max:o,step:a,onValueChange:([d])=>t(d),disabled:u,"aria-label":"Slider",children:[Ir(Fe.Track,{className:"relative h-4 w-full overflow-visible rounded-full bg-neutral-200",children:[et("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Ir("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[et(Fe.Range,{className:"absolute h-4 bg-black"}),l.map(d=>{let m=(d-r)/(o-r)*100,p=d<=e;return et("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${m}%`}},d)})]})]}),et(Fe.Thumb,{className:"z-20 flex size-[calc(var(--thumb-radius)*2)] items-center justify-center rounded-full border-0 bg-white shadow-[0_2px_2px_rgba(0,0,0,0.10),0_3px_3px_rgba(0,0,0,0.09)]",children:et("span",{className:"block size-4 rounded-full bg-[#171717]"})})]}),et("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:s})]})})}import{useEffect as Yd,useId as Zd,useRef as qd}from"react";import{jsx as Ar,jsxs as Zn}from"react/jsx-runtime";function oy({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:a,required:n,autoFocus:c=!1}){let s=Zd(),u=qd(null);return Yd(()=>{u.current&&c&&setTimeout(()=>{var l;(l=u.current)==null||l.focus()},10)},[c]),Zn("div",{className:a,children:[r&&Ar("div",{className:"flex items-center gap-2",children:Ar("label",{htmlFor:`${s}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),Zn("div",{className:"mt-2 flex w-full items-center justify-between rounded-md border border-neutral-300 bg-white shadow-sm transition-all focus-within:border-neutral-800 focus-within:outline-none focus-within:ring-1 focus-within:ring-neutral-500",children:[Ar("input",{ref:u,id:`${s}-datetime`,type:"text",placeholder:o,defaultValue:e?wt(e):"",onBlur:l=>{if(l.target.value.length>0){let d=jr(l.target.value);d&&(t(d),l.target.value=wt(d))}},onKeyDown:l=>{if(l.key==="Enter"&&u.current){l.preventDefault();let d=jr(u.current.value);d&&(t(d),u.current.value=wt(d))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Ar("input",{type:"datetime-local",id:`${s}-datetime-local`,required:n,value:e?Yo(e):"",onChange:l=>{let d=new Date(l.target.value);t(d),u.current&&(u.current.value=wt(d))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as Xd}from"class-variance-authority";import{jsx as qn,jsxs as em}from"react/jsx-runtime";var Jd=Xd("flex gap-1.5 items-center max-w-fit rounded-md px-2 py-1 text-xs font-medium whitespace-nowrap",{variants:{variant:{neutral:"bg-neutral-500/[.15] text-neutral-600",new:"bg-blue-500/[.15] text-blue-600",success:"bg-green-500/[.15] text-green-600",pending:"bg-orange-500/[.15] text-orange-600",warning:"bg-yellow-500/[.15] text-yellow-600",error:"bg-red-500/[.15] text-red-600"}},defaultVariants:{variant:"neutral"}}),Qd={neutral:Pa,new:Ca,success:Na,pending:ka,warning:Zr,error:Zr};function dy({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:n,...c}){let s=r!==null?r??Qd[t??"neutral"]:null;return qn(pr,{tooltipProps:{content:o},children:em("span",{className:i(Jd({variant:t}),o&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...c,children:[s&&qn(s,{className:"h-3 w-3 shrink-0"}),n]})})}import*as zr from"@radix-ui/react-switch";import{useMemo as tm}from"react";import{jsx as Or}from"react/jsx-runtime";function vy({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:n,checked:c=!0,loading:s=!1,disabled:u=!1,disabledTooltip:l}){let d=tm(()=>l?!0:u||s,[l,u,s]),m=Or(zr.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:d,className:i("radix-state-checked:bg-blue-500 radix-state-unchecked:bg-neutral-200 relative inline-flex h-4 w-8 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out","focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","data-[disabled]:cursor-not-allowed",r),children:Or(zr.Thumb,{className:i(`radix-state-checked:${a}`,"radix-state-unchecked:translate-x-0","pointer-events-none h-3 w-3 translate-x-4 transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out",o,a),children:n})});return l?Or(Q,{content:l,children:Or("div",{className:"inline-block leading-none",children:m})}):m}import{Command as To}from"cmdk";import{useState as rm}from"react";import{jsx as ht,jsxs as om}from"react/jsx-runtime";function Sy({table:e}){let[t,r]=rm(!1);return ht(ve,{openPopover:t,setOpenPopover:r,content:ht(To,{tabIndex:0,loop:!0,children:ht(To.List,{className:"flex w-screen flex-col gap-1 p-1 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[130px]",children:e.getAllColumns().filter(o=>o.getCanHide()).map(o=>{var a;return om(To.Item,{className:i("flex cursor-pointer select-none items-center gap-2 whitespace-nowrap rounded-md px-3 py-1.5","data-[selected=true]:bg-neutral-100"),onSelect:()=>o.toggleVisibility(),children:[ht("input",{checked:o.getIsVisible(),type:"checkbox",className:"h-3 w-3 rounded-full border-neutral-300 text-black focus:outline-none focus:ring-0",disabled:!0}),(a=o.columnDef.header)==null?void 0:a.toString()]},o.id)})})}),align:"end",children:ht(te,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:ht(Aa,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Lo,getCoreRowModel as im,useReactTable as sm}from"@tanstack/react-table";import{AnimatePresence as lm,motion as cm}from"framer-motion";import{memo as dm,useEffect as Vt,useMemo as ei,useState as Qn}from"react";import{useEffect as am,useState as nm}from"react";import{jsx as Vr,jsxs as Xn}from"react/jsx-runtime";function Jn({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,n]=nm(0);return am(()=>{o!==0&&n(o)},[o]),Ie("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),Vr("div",{className:i("border-border-subtle w-full border-b bg-white","transition-opacity duration-100",o>0?"pointer-events-auto opacity-100":"pointer-events-none opacity-0",r),...{inert:o>0?void 0:""},children:Xn("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[Vr("div",{className:"flex w-6 items-center justify-center",children:Vr(mt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:e.getIsAllRowsSelected()?!0:e.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>e.toggleAllRowsSelected(),title:"Select all"})}),Xn("span",{className:i("text-content-emphasis mr-2 text-sm font-medium tabular-nums transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:[a," selected"]}),Vr("div",{className:i("flex items-center gap-2 transition-transform duration-150",o>0?"translate-x-0":"-translate-x-1"),children:t==null?void 0:t(e)})]})})}import{Fragment as pm,jsx as z,jsxs as de}from"react/jsx-runtime";var Mo=(e,t)=>i(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle px-4 relative","border-l border-b",e==="select"&&"py-0 pr-0 pl-2",e==="menu"&&"bg-bg-default border-l-transparent py-0 px-1",t&&"group-hover/row:bg-bg-muted transition-colors duration-75","group-data-[selected=true]/row:bg-blue-50"]),mm=i(["absolute right-0 top-0 h-full w-1 cursor-col-resize select-none touch-none","bg-neutral-300/50","opacity-0 group-hover/resize:opacity-100 hover:opacity-100","group-hover/resize:bg-neutral-300 hover:bg-neutral-400","transition-all duration-200","-mr-px","after:absolute after:right-0 after:top-0 after:h-full after:w-4 after:translate-x-1/2"]);function Zy(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:n,pagination:c,onPaginationChange:s,getRowId:u,enableColumnResizing:l=!1,columnResizeMode:d="onChange"}=e,m=!!e.onRowSelectionChange||!!e.selectionControls,[p,f]=Qn(e.columnVisibility??{}),[b,h]=Qn(e.selectedRows??{});Vt(()=>{if(!u||!t)return;let x=Object.entries(b);if(x.length>0){let P=x.filter(([k])=>t.find(N=>(u==null?void 0:u(N))===k));P.length!==x.length&&h(Object.fromEntries(P))}},[t,b,u]),Vt(()=>{e.selectedRows&&!Kr(e.selectedRows,b)&&h(e.selectedRows??{})},[e.selectedRows]),Vt(()=>{var x;(x=e.onRowSelectionChange)==null||x.call(e,w.getSelectedRowModel().rows)},[b]),Vt(()=>{e.columnVisibility&&!Kr(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),Vt(()=>{var x;(x=e.onColumnVisibilityChange)==null||x.call(e,p)},[p]);let y=ei(()=>[...m?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:x})=>z("div",{className:"flex size-full items-center justify-center",children:z(mt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsAllRowsSelected()?!0:x.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>x.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:x})=>z("div",{className:"flex size-full items-center justify-center",children:z(mt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsSelected(),onCheckedChange:x.getToggleSelectedHandler(),title:"Select"})})}]:[],...o],[m,o]),w=sm({data:t,rowCount:r,columns:y,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:l,...a},getCoreRowModel:im(),onPaginationChange:s,onColumnVisibilityChange:x=>f(x),onRowSelectionChange:h,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...n},rowSelection:b},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:u,enableColumnResizing:l,columnResizeMode:d});return{...e,columnVisibility:p,table:w,enableColumnResizing:l}}var um=dm(function({row:t,onRowClick:r,rowProps:o,cellRight:a,tdClassName:n,table:c}){let{className:s,...u}=o||{};return z("tr",{className:i("group/row",r&&"cursor-pointer select-none",c.getRowModel().rows.length>8&&t.index===c.getRowModel().rows.length-1&&"[&_td]:border-b-0",s),onClick:r?l=>{Ct(l)||r(t,l)}:void 0,"data-selected":t.getIsSelected(),...u,children:t.getVisibleCells().map(l=>z("td",{className:i(Mo(l.column.id,!!r),"text-content-default group",Do(l.column,t.index===c.getRowModel().rows.length-1),typeof n=="function"?n(l.column.id,t):n),style:{width:l.column.getSize(),...Eo(l.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[z("div",{className:"min-w-0 shrink grow truncate",children:Lo(l.column.columnDef.cell,l.getContext())}),a==null?void 0:a(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function qy({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:n,sortOrder:c,onSortChange:s,sortableColumns:u=[],className:l,containerClassName:d,scrollWrapperClassName:m,emptyWrapperClassName:p,thClassName:f,tdClassName:b,table:h,pagination:y,resourceName:w,onRowClick:x,onRowSelectionChange:P,selectionControls:k,rowProps:N,rowCount:_,children:$,enableColumnResizing:S=!1}){let R=!!P||!!k,K=ei(()=>S?h.getVisibleLeafColumns().reduce((v,C)=>v+C.getSize(),0):"100%",[S,h.getVisibleLeafColumns()]);return de("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",d),children:[!r&&!!(e!=null&&e.length)||t?de(pm,{children:[R&&z(Jn,{table:h,controls:k,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),de("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",m),children:[de("table",{className:i(["group/table w-full border-separate border-spacing-0 transition-[border-spacing,margin-top]","[&_tr>*:first-child]:border-l-transparent","[&_tr>*:last-child]:border-r-transparent","[&_tr>*:last-child]:border-r-transparent","[&_th]:relative [&_th]:select-none",S&&"[&_th]:group/resize"],l),style:{width:"100%",tableLayout:S?"fixed":"auto",minWidth:K},children:[z("thead",{className:"relative",children:h.getHeaderGroups().map(v=>z("tr",{children:v.headers.map(C=>{let F=u.includes(C.column.id),L=F?"button":"div";return de("th",{colSpan:C.colSpan,className:i(Mo(C.id),"text-content-emphasis select-none font-medium",Do(C.column,!h.getRowModel().rows.length),typeof f=="function"?f(C.column.id):f,S&&"relative"),style:{width:C.getSize(),...Eo(C.column)},children:[z("div",{className:"flex items-center justify-between gap-6 !pr-0",children:de(L,{className:i("flex items-center gap-2",C.column.id==="select"&&"size-full"),...F&&{type:"button",disabled:!F,"aria-label":"Sort by column",onClick:()=>s==null?void 0:s({sortBy:C.column.id,sortOrder:n!==C.column.id||c==="asc"?"desc":"asc"})},children:[C.isPlaceholder?null:Lo(C.column.columnDef.header,C.getContext()),F&&n===C.column.id&&z(ia,{className:"h-3 w-3 shrink-0",order:c||"desc"})]})}),S&&C.column.getCanResize()&&!["select","menu"].includes(C.column.id)&&z("div",{onMouseDown:C.getResizeHandler(),onTouchStart:C.getResizeHandler(),onClick:I=>I.stopPropagation(),className:mm})]},C.id)})},v.id))}),z("tbody",{children:h.getRowModel().rows.map(v=>{let C=typeof N=="function"?N(v):N,{className:F,...L}=C||{};return S?z(um,{row:v,onRowClick:x,rowProps:C,cellRight:a,tdClassName:b,table:h},`${v.id}-${h.getVisibleLeafColumns().map(I=>I.id).join(",")}`):z("tr",{className:i("group/row",x&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&v.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0",F),onClick:x?I=>{Ct(I)||x(v,I)}:void 0,"data-selected":v.getIsSelected(),...L,children:v.getVisibleCells().map(I=>z("td",{className:i(Mo(I.column.id,!!x),"text-content-default group",Do(I.column,v.index===h.getRowModel().rows.length-1),typeof b=="function"?b(I.column.id,v):b),style:{minWidth:I.column.columnDef.minSize,maxWidth:I.column.columnDef.maxSize,width:I.column.columnDef.size||"auto",...Eo(I.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[z("div",{className:"min-w-0 shrink grow truncate",children:Lo(I.column.columnDef.cell,I.getContext())}),a==null?void 0:a(I)]})},I.id))},v.id)})})]}),$]})]}):z("div",{className:i("text-content-subtle flex h-96 w-full items-center justify-center text-sm",p),children:r||o||`No ${(w==null?void 0:w(!0))||"items"} found.`}),y&&!r&&!!(e!=null&&e.length)&&!!_&&de("div",{className:"border-border-subtle bg-bg-default text-content-default sticky bottom-0 mx-auto -mt-px flex w-full max-w-full items-center justify-between rounded-b-[inherit] border-t px-4 py-3.5 text-sm leading-6",children:[de("div",{children:[z("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",de("span",{className:"font-medium",children:[((y.pageIndex-1)*y.pageSize+1).toLocaleString(),"-",Math.min((y.pageIndex-1)*y.pageSize+y.pageSize,h.getRowCount()).toLocaleString()]})," ","of"," ",z("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(w==null?void 0:w(h.getRowCount()!==1))||"items"]}),de("div",{className:"flex items-center gap-2",children:[z(te,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:y.pageIndex===1}),z(te,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:y.pageIndex===h.getPageCount()})]})]}),z(lm,{children:t&&z(cm.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:z("div",{className:"flex h-[75vh] w-full items-center justify-center",children:z(ke,{})})})})]})}var Do=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},Eo=e=>{let t=e.getIsPinned();return{left:t==="left"?`${e.getStart("left")}px`:void 0,right:t==="right"?`${e.getAfter("right")}px`:void 0,position:t?"sticky":"relative"}};import{LayoutGroup as fm,motion as ti}from"framer-motion";import gm from"next/link";import{useId as bm}from"react";import{jsx as Hr,jsxs as hm}from"react/jsx-runtime";function r3({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:n,style:c}){let s=bm();return Hr(fm,{id:s,children:Hr(ti.div,{layout:!0,className:i("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",o),style:c,children:e.map(u=>{let l=u.value===t,d=u.href?gm:"button";return hm(d,{...u.href?{href:u.href}:{type:"button"},"data-selected":l,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!l&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(u.value),children:[typeof u.label=="string"?Hr("p",{children:u.label}):u.label,u.badge,l&&Hr(ti.div,{layoutId:s,className:i("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",n),transition:{duration:.25}})]},u.value)})})})}import{useEffect as vm,useId as xm,useRef as ym,useState as wm}from"react";import{jsx as pe,jsxs as Io}from"react/jsx-runtime";var Nm=[{key:"utm_source",icon:za,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:$a,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Ia,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Fa,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Ba,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:Oa,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function d3({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:n}){let{isMobile:c}=Y(),s=xm(),[u,l]=wm(!1),d=ym(null);return vm(()=>{d.current&&!c&&o&&setTimeout(()=>{var m;return(m=d.current)==null?void 0:m.focus()},10)},[]),pe("div",{className:i("grid gap-y-3",n),children:Nm.map(({key:m,icon:p,label:f,placeholder:b,description:h},y)=>pe("div",{className:"group relative",children:Io("div",{className:"relative z-10 flex",children:[pe(Q,{content:Io("div",{className:"p-3 text-center text-xs",children:[pe("p",{className:"text-neutral-600",children:h}),pe("span",{className:"font-mono text-neutral-400",children:m})]}),sideOffset:4,disableHoverableContent:!0,children:Io("div",{className:i("flex items-center gap-1.5 rounded-l-md border-y border-l border-neutral-300 bg-neutral-50 px-3 py-1.5 text-neutral-700",u?"sm:min-w-36":"sm:min-w-28"),onClick:()=>l(w=>!w),children:[pe(p,{className:"size-4 shrink-0"}),pe("label",{htmlFor:`${s}-${m}`,className:"select-none text-sm",children:u?pe("span",{className:"font-mono text-xs",children:m}):f})]})}),pe("div",{className:"min-w-0 grow",children:pe(pr,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:pe("input",{type:"text",id:`${s}-${m}`,ref:y===0?d:void 0,placeholder:b,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[m]||"",onChange:w=>t(m,w.target.value)})})})]})},m))})}import{jsx as Ao,jsxs as Cm}from"react/jsx-runtime";function u3(){return Cm("div",{style:_r.backgroundMain,children:[Ao("div",{style:_r.backgroundMainBefore}),Ao("div",{style:_r.backgroundMainAfter}),Ao("div",{style:_r.backgroundContent})]})}var _r={backgroundMain:{width:"100vw",minHeight:"100vh",position:"fixed",zIndex:1,display:"flex",justifyContent:"center",padding:"120px 24px 160px 24px",pointerEvents:"none"},backgroundMainBefore:{background:"radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%)",position:"absolute",content:'""',zIndex:2,width:"100%",height:"100%",top:0},backgroundMainAfter:{content:'""',backgroundImage:"url(https://assets.dub.co/misc/grid.svg)",zIndex:1,position:"absolute",width:"100%",height:"100%",top:0,opacity:.4,filter:"invert(1)"},backgroundContent:{zIndex:3,width:"100%",maxWidth:"640px",backgroundImage:`radial-gradient(at 27% 37%, hsla(215, 98%, 61%, 1) 0px, transparent 0%),
|
|
43
44
|
radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
|
|
44
45
|
radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
|
|
45
46
|
radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
|
|
46
47
|
radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
|
|
47
48
|
radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
|
|
48
|
-
radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import su from"next/image";import Be from"next/link";import{useParams as lu}from"next/navigation";import{jsx as Xn}from"react/jsx-runtime";function Jn(e){return Xn("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:Xn("path",{d:"M10.1552 10.5H5.8442C3.15868 10.5 0.840663 8.4364 0.706388 5.75088C0.565045 2.88163 2.86186 0.5 5.70285 0.5H10.1622C12.9184 0.5 15.3071 2.74028 15.3 5.50353C15.3 5.95583 14.9325 6.32332 14.4732 6.32332H3.8442C3.61805 6.32332 3.4343 6.13958 3.4343 5.91343V5.08657C3.4343 4.86042 3.61805 4.67668 3.8442 4.67668H13.2647C12.8972 3.22792 11.5827 2.14664 10.0138 2.14664H6.10568C4.32476 2.14664 2.76292 3.4894 2.64278 5.27032C2.51557 7.22085 4.06328 8.85336 5.98554 8.85336H10.1552C11.2435 8.85336 12.1198 8.33039 12.7488 7.43993L12.9891 7.10777C13.1233 6.92403 13.3778 6.88163 13.5615 7.00883L14.5156 7.4894C14.6993 7.62367 14.7417 7.87809 14.6145 8.06184L14.3742 8.39399C13.4414 9.71555 11.7806 10.5 10.1552 10.5Z",fill:"currentColor"})})}import{jsx as Qn}from"react/jsx-runtime";function Vt({className:e}){return Qn("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-10 w-10 text-black dark:text-white",e),children:Qn("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 64C49.6731 64 64 49.6731 64 32C64 20.1555 57.5648 9.81398 48 4.28103V31.9999V47.9999H40V45.8594C37.6466 47.2208 34.9143 47.9999 32 47.9999C23.1634 47.9999 16 40.8365 16 31.9999C16 23.1634 23.1634 15.9999 32 15.9999C34.9143 15.9999 37.6466 16.7791 40 18.1404V1.00814C37.443 0.350024 34.7624 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"currentColor"})})}var Hr=[{title:"Dub Links",description:"Short links with superpowers",icon:it,href:"/links"},{title:"Dub Partners",description:"Grow your revenue with partnerships",icon:st,href:"/partners"},{title:"Dub Analytics",description:"Powerful real-time analytics",icon:nt,href:"/analytics"},{title:"Dub API",description:"Programmatic link creation at scale",icon:Zt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Fa,href:"/integrations"}],r3=[{icon:na,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:aa,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:Jn,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],Lo=[{icon:da,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:la,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:ia,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:ca,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:sa,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],ei=[{icon:rr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:ar,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:St,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Lo}],_t=[{icon:or,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:er,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:St,title:"About",description:"Company, values, and team",href:"/about"},{icon:ua,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:Ra,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:pa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Vt,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:ka,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],ti=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],ri=[{name:"Privacy",slug:"privacy"},{name:"Terms",slug:"terms"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],o3=[{name:"X (Twitter)",icon:Jt,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:Xt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Qt,href:"https://www.youtube.com/@dubdotco"}];import{jsx as vm}from"react/jsx-runtime";function Vr({className:e,children:t}){return vm("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Fe from"@radix-ui/react-popover";import{BoxSelect as qm,Home as Xm,LayoutGrid as Jm,Type as Qm}from"lucide-react";import{useParams as eu}from"next/navigation";import{useCallback as tu,useContext as ru,useState as ou}from"react";import{toast as au}from"sonner";import*as me from"@radix-ui/react-navigation-menu";import{LayoutGroup as Am}from"framer-motion";import Ut from"next/link";import{useParams as Om,usePathname as zm}from"next/navigation";import{createContext as Hm,useId as Vm}from"react";import _m from"swr";import{Link as li}from"@radix-ui/react-navigation-menu";import ci from"next/image";import di from"next/link";import{Link2 as xm}from"lucide-react";import{jsx as Z,jsxs as X}from"react/jsx-runtime";var oi={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},et={name:"Danielle Wilson",email:"danielle@dub.co",avatarIndex:8,origin:"dub.sh",country:"US",details:{"Lifetime value":"$12.5k",Account:"Pro",Subscription:"2y 10m"}};function ai({className:e}){return X("div",{className:i("pointer-events-none relative size-full",e),children:[X("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 339 168",className:"h-auto w-full [mask-image:linear-gradient(90deg,transparent,black_10%,black_90%,transparent)]",children:[Z("path",{stroke:"#00BBA7",strokeWidth:"2",d:"m345 1-60.533 76.487a8 8 0 0 1-9.732 2.25l-25.53-12.241a8 8 0 0 0-9.214 1.657l-62.736 64.993a8 8 0 0 1-6.695 2.388L67.303 124.331a8 8 0 0 0-5.193 1.17L-3.166 166.5"}),Z("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),Z("circle",{cx:"259.333",cy:"72",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"})]}),X("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[X("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[X("div",{className:"p-1.5",children:[X("div",{className:"bg-bg-subtle border-border-subtle text-content-default hidden items-center gap-2 rounded border p-2 text-xs font-medium leading-none sm:flex",children:[Z(xm,{className:"size-3 rotate-90"}),"d.to/try"]}),Z("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),Z("div",{className:"border-border-default flex flex-col gap-2 border-t p-3",children:["clicks","leads","sales"].map(t=>X("div",{className:"flex items-center justify-between gap-2",children:[X("div",{className:"flex items-center gap-2",children:[Z("div",{className:"size-2 rounded-sm border border-black/20 bg-current opacity-70",style:{color:oi[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:jt(t)})]}),X("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",oi[t].value]})]},t))})]}),Z("div",{className:"relative",children:X("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[X("div",{className:"px-3 py-2.5",children:[X("div",{className:"flex justify-between gap-2",children:[Z("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:et.avatarIndex*100+"%"}}),X("div",{className:"flex flex-col items-end gap-1",children:[X("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z(Na,{className:"text-content-default size-3.5"}),et.origin]}),X("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z("img",{src:`https://flag.vercel.app/m/${et.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),et.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:et.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:et.email})]}),Z("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(et.details).map(([t,r])=>X("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[Z("span",{className:"text-content-muted truncate font-medium",children:t}),Z("span",{className:"text-content-default",children:r})]},t))})]})})]})]})}import{useId as ym}from"react";import{jsx as g,jsxs as de}from"react/jsx-runtime";function ni(e){let t=ym();return de("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"300",height:"180",fill:"none",viewBox:"0 0 300 180",...e,className:i("pointer-events-none text-[var(--fg)] [--bg:white] [--border:#e5e5e5] [--fg:#171717] [--muted:#404040] dark:[--bg:black] dark:[--border:#fff3] dark:[--fg:#fffa] dark:[--muted:#fff7]",e.className),children:[de("defs",{children:[g("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),g("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),g("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),g("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("path",{className:"fill-[var(--fg)]",d:"M29.61 23c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[g("path",{d:"M84.47 26.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),g("path",{d:"M82.05 24a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.14-1.13h3.98c.48 0 .89.29 1.05.7"})]}),g("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M106.87 23.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[g("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),g("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),g("path",{className:"fill-[var(--bg)]",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:g("path",{d:"m209.95 29.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),g("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("path",{className:"fill-[var(--fg)]",d:"M29.61 83c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[g("path",{d:"M126.47 86.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),g("path",{d:"M124.05 84a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.13-1.13h3.99c.48 0 .89.29 1.05.7"})]}),g("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M148.87 83.66h-1.28a.85.85 0 0 0-.86.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[g("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),g("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),g("path",{className:"fill-[var(--bg)]",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:g("path",{d:"m215.95 89.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),g("path",{className:"fill-[var(--bg)]",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),g("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("path",{className:"fill-[var(--fg)]",d:"M29.61 143c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),de("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[g("path",{d:"M102.47 146.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),g("path",{d:"M100.05 144a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.14 1.13-1.14h3.99c.48 0 .89.3 1.06.72"})]}),g("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M124.87 143.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),de("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[g("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),g("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),g("path",{className:"fill-[var(--bg)]",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:g("path",{d:"m212.95 149.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.17.17 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),de("defs",{children:[g("clipPath",{id:`${t}-b`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),g("clipPath",{id:`${t}-c`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),g("clipPath",{id:`${t}-d`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),g("clipPath",{id:`${t}-f`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),g("clipPath",{id:`${t}-g`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),g("clipPath",{id:`${t}-h`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),g("clipPath",{id:`${t}-j`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),g("clipPath",{id:`${t}-k`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),g("clipPath",{id:`${t}-l`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),de("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),de("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),de("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as Nm,jsx as Te,jsxs as Ft}from"react/jsx-runtime";var wm=[{name:"Lauren Anderson",country:"US",revenue:1800,payouts:550},{name:"Mia Taylor",country:"US",revenue:22600,payouts:6800},{name:"Sophie Laurent",country:"CA",revenue:11e3,payouts:3300},{name:"Hiroshi Tanaka",country:"JP",revenue:19200,payouts:5700},{name:"Elias Weber",country:"DE",revenue:783,payouts:235},{name:"Liam Carter",country:"US",revenue:3e4,payouts:9200}];function ii({className:e}){return Te("div",{className:i("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:Te("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:wm.map((t,r)=>Te("div",{className:"h-[60px] w-[180px] p-[3px]",children:Te("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Ft(Nm,{children:[Te("div",{className:"bg-bg-emphasis aspect-square h-full",style:{backgroundImage:"url(https://assets.dub.co/partners/partner-images.jpg)",backgroundSize:"1400%",backgroundPositionX:(14-r%14)*100+"%"}},r),Ft("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Ft("div",{className:"flex items-center gap-1.5",children:[Te("img",{alt:"US Flag",src:`https://flag.vercel.app/m/${t.country}.svg`,className:"h-2.5 w-3 rounded-sm border-[0.5px] border-black/15"}),Te("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),Te("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,a)=>Ft("div",{className:i("flex flex-col",a===0?"pr-4":"pl-4"),children:[Te("span",{className:"text-content-muted text-[6px] font-medium",children:jt(o)}),Ft("span",{className:"text-content-default text-[9px] font-medium",children:["$",Yt(t[o])]})]},o))})]})]})})},r))})})}import{Link as Cm}from"@radix-ui/react-navigation-menu";import km from"next/link";import{jsx as Bt,jsxs as si}from"react/jsx-runtime";var tt="text-xs uppercase text-neutral-500 dark:text-white/60",Pm="group rounded-[8px] p-2 transition-colors hover:bg-neutral-50 active:bg-neutral-100 dark:hover:bg-white/[0.15] dark:active:bg-white/20",ye=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Wt({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:c,...d}){return Bt(Cm,{asChild:!0,children:Bt(km,{className:i(Pm,a),...d,children:si("div",{className:"flex items-center justify-between gap-3",children:[e,si("div",{className:"flex-1",children:[Bt("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&Bt("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),c&&Bt(Jo,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}import{jsx as O,jsxs as $t}from"react/jsx-runtime";var Sm=[{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:O(it,{className:"size-2.5 text-orange-900"})}),title:"Dub Links",description:"Short links with superpowers for modern marketing teams.",href:"/links",color:"#f4950c",graphicsContainerClassName:"px-2",graphic:O(ni,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:O(nt,{className:"size-2.5 text-green-900"})}),title:"Dub Analytics",description:"Powerful analytics delivered instantly.",href:"/analytics",color:"#36D78F",graphicsContainerClassName:"h-[170%] bottom-0 top-[unset]",graphic:O(ai,{className:"absolute bottom-0 left-0 size-full"})},{icon:O("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:O(st,{className:"size-2.5 text-violet-900"})}),title:"Dub Partners",description:"Grow your revenue on auto-pilot with partnerships.",href:"/partners",color:"#818cf8",graphicsContainerClassName:"pl-2",graphic:O(ii,{})}],Rm=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:O("div",{className:"absolute -right-4 top-1/2 h-[180px] w-[240px] -translate-y-1/2 [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-80",children:O(ci,{src:"https://assets.dub.co/misc/integrations-grid.png",alt:"",fill:!0})})},{title:"Dub API",description:"Unlock further capabilities",href:"/docs/api-reference/introduction",graphic:O("div",{className:"absolute -right-4 top-2.5 h-[180px] w-[240px] [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-60",children:O(ci,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function mi({domain:e}){return $t("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[O("div",{className:"grid grid-cols-3 gap-4",children:Sm.map(({title:t,description:r,icon:o,href:a,color:c,graphicsContainerClassName:d,graphic:s})=>O(li,{asChild:!0,children:$t(di,{href:V(a,e,ye({domain:e,utm_content:t})),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[O(Ze,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),$t("div",{className:"relative p-5 pb-0",children:[o,O("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),O("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),O("div",{className:"relative mt-10 h-40 grow",children:O("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",d),children:O("div",{className:"relative size-full",children:s})})}),O("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,var(--color),transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-15",style:{"--color":c}})]})},t))}),O("div",{className:"grid grow grid-cols-2 gap-4",children:Rm.map(({title:t,description:r,href:o,graphic:a})=>O(li,{asChild:!0,children:$t(di,{href:V(o,e,ye({domain:e,utm_content:t})),className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:[O(Ze,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),O("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),O("div",{className:"relative flex items-center justify-between px-5 py-4",children:$t("div",{children:[O("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),O("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as Tm}from"@radix-ui/react-navigation-menu";import Lm from"next/link";import{jsx as K,jsxs as rt}from"react/jsx-runtime";var Mm=[{icon:or,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:er,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function ui({domain:e}){return rt("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[rt("div",{className:"flex h-full flex-col p-4",children:[K("p",{className:i(tt,"mb-4 ml-2"),children:"Explore"}),K("div",{className:"grid grow grid-cols-2 gap-4",children:Mm.map(({icon:t,title:r,description:o,href:a})=>K(Tm,{asChild:!0,children:rt(Lm,{href:V(a,e,ye({domain:e,utm_content:r})),className:i("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[rt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[K("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:K(Ze,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),K("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),K(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),rt("div",{className:"relative",children:[K("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),K("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),rt("div",{className:"px-6 py-4",children:[K("p",{className:i(tt,"mb-2"),children:"Company"}),K("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>K(Wt,{className:"-mx-2",href:V(a,e,ye({domain:e,utm_content:r})),icon:K("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:K(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]}),rt("div",{className:"px-6 py-4",children:[K("p",{className:i(tt,"mb-2"),children:"Updates"}),K("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>K(Wt,{className:"-mx-2",href:V(a,e,ye({domain:e,utm_content:r})),icon:K("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:K(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]})]})}import{Link as Dm}from"@radix-ui/react-navigation-menu";import Em from"next/link";import{jsx as te,jsxs as bt}from"react/jsx-runtime";var Im=[{icon:rr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:ar,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:St,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function pi({domain:e}){return bt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[bt("div",{className:"flex h-full flex-col p-4",children:[te("p",{className:i(tt,"mb-4 ml-2"),children:"Use case"}),te("div",{className:"grid grow grid-cols-3 gap-4",children:Im.map(({icon:t,title:r,description:o,href:a})=>te(Dm,{asChild:!0,children:bt(Em,{href:V(a,e,ye({domain:e,utm_content:r})),className:i("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[bt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[te("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:te(Ze,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),te("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),te(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),bt("div",{className:"relative",children:[te("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),te("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),bt("div",{className:"px-6 py-4",children:[te("p",{className:i(tt,"mb-2"),children:"SDKs"}),te("div",{className:"flex flex-col gap-0.5",children:Lo.map(({icon:t,iconClassName:r,title:o,href:a})=>te(Wt,{className:"-mx-2",href:V(a,e,ye({domain:e,utm_content:o})),icon:te("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:te(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Wm,jsx as F,jsxs as ht}from"react/jsx-runtime";var Mo=Hm({theme:"light"}),Do=[{name:"Product",content:mi,childItems:Hr,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:pi,childItems:ei,segments:["/solutions","/sdks"]},{name:"Resources",content:ui,childItems:_t,segments:["/help","/docs","/about","/careers","/brand","/blog","/changelog","/contact"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],fi=i("relative group/item flex items-center rounded-md px-4 py-2 text-sm rounded-lg font-medium text-neutral-700 hover:text-neutral-900 transition-colors","dark:text-white/90 dark:hover:text-white","hover:bg-neutral-900/5 dark:hover:bg-white/10","data-[active=true]:bg-neutral-900/5 dark:data-[active=true]:bg-white/10","group-has-[:hover]:data-[active=true]:[&:not(:hover)]:bg-transparent");function uw({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Om();t&&(o=t);let a=Vm(),c=an(40),d=zm(),{data:s,isLoading:m}=_m(o.endsWith("dub.co")&&"/api/auth/session",fe,{dedupingInterval:6e4});return F(Mo.Provider,{value:{theme:e},children:F(Am,{id:a,children:ht("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[F("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",c&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),F(Vr,{className:i("relative",r),children:ht("div",{className:"flex h-14 items-center justify-between",children:[F("div",{className:"grow basis-0",children:F(Ut,{className:"block w-fit py-2 pr-2",href:V("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:F(_r,{})})}),ht(me.Root,{delayDuration:0,className:"relative hidden lg:block",children:[F(me.List,{className:"group relative z-0 flex",children:Do.map(({name:l,href:n,segments:u,content:p})=>{let b=u.some(f=>d==null?void 0:d.startsWith(f));return ht(me.Item,{children:[F(Bm,{trigger:!!p,children:n!==void 0?F(Ut,{id:`nav-${n}`,href:V(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:l}),className:fi,"data-active":b,children:l}):ht("button",{className:fi,"data-active":b,children:[l,F(Fm,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&F(me.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:F(p,{domain:o})})]},l)})}),F("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:F(me.Viewport,{className:i("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),F("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?F(Ut,{href:we,className:i(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):m?null:ht(Wm,{children:[F(Ut,{href:"https://app.dub.co/login",className:i(ie({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),F(Ut,{href:"https://app.dub.co/register",className:i(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function Fm(e){return F("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:F("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M7.278 3.389 4.5 6.167 1.722 3.389",className:"transition-transform duration-150 [transform-box:view-box] [transform-origin:center] [vector-effect:non-scaling-stroke] group-data-[state=open]/item:-scale-y-100"})})}function Bm({trigger:e,children:t}){return e?F(me.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as $m,Menu as Um,X as Gm}from"lucide-react";import vt from"next/link";import{useParams as Ao}from"next/navigation";import{useEffect as Km,useState as bi}from"react";import jm from"swr";import{Fragment as Zm,jsx as T,jsxs as Le}from"react/jsx-runtime";var Eo={"Dub Links":T("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:T(it,{className:"size-3 text-orange-900"})}),"Dub Partners":T("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:T(st,{className:"size-3 text-violet-900"})}),"Dub Analytics":T("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:T(nt,{className:"size-3 text-green-900"})}),"Dub API":T("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:T(Zt,{className:"size-3 text-neutral-900"})})};function Rw({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Ao();t&&(r=t);let[o,a]=bi(!1);Km(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:c,isLoading:d}=jm(r.endsWith("dub.co")&&"/api/auth/session",fe,{dedupingInterval:6e4});return Le("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[c&&Object.keys(c).length>0?T(Io,{href:we,className:"max-[280px]:hidden",children:"Dashboard"}):d?null:Le("div",{className:"flex gap-2 max-[280px]:hidden",children:[T(Io,{variant:"secondary",href:`${we}/login`,children:"Log in"}),T(Io,{href:`${we}/register`,children:"Sign Up"})]}),T("button",{onClick:()=>a(!o),className:i("z-30 rounded-full p-2 transition-colors duration-200 hover:bg-neutral-200 focus:outline-none active:bg-neutral-300 dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-neutral-100 active:bg-neutral-200"),children:o?T(Gm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):T(Um,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),T("nav",{className:i("fixed inset-0 z-20 hidden max-h-screen w-full overflow-y-auto bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:Le("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[Do.map(({name:s,href:m,childItems:l},n)=>T(Ym,{name:s,href:m,childItems:l,setOpen:a},n)),c&&Object.keys(c).length>0?T("li",{className:"py-3 min-[281px]:hidden",children:T(vt,{href:we,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Le(Zm,{children:[T("li",{className:"py-3 min-[281px]:hidden",children:T(vt,{href:`${we}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),T("li",{className:"py-3 min-[281px]:hidden",children:T(vt,{href:`${we}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Ym=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Ao(),[c,d]=bi(!1);return r?T("li",{className:"py-3",children:Le(ke,{height:!0,children:[Le("button",{className:"flex w-full justify-between",onClick:()=>d(!c),children:[T("p",{className:"font-semibold",children:e}),T($m,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",c&&"rotate-180")})]}),c&&T("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,m)=>"items"in s?Le("div",{className:"grid grid-cols-1 gap-3",children:[T("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:s.label}),s.items.map((l,n)=>T(gi,{item:l,setOpen:o,size:"small"},n))]},m):T(gi,{item:s,setOpen:o},m))})]})}):t?T("li",{className:"py-3",children:T(vt,{href:V(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null},gi=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:c="normal"})=>{let{domain:d="dub.co"}=Ao(),s=Eo==null?void 0:Eo[e];return Le(vt,{href:V(r,d,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:d,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[T("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",c==="small"&&"size-8"),children:s??T(o,{className:i("size-5 text-neutral-700 grayscale",c==="small"&&"size-4")})}),Le("div",{children:[T("div",{className:"flex items-center gap-2",children:T("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&T("p",{className:"text-sm text-neutral-500",children:t})]})]})};function Io({variant:e,className:t,...r}){return T(vt,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",ie({variant:e}),t)})}import{jsx as hi}from"react/jsx-runtime";function vi({className:e}){return hi("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:hi("path",{fillRule:"evenodd",clipRule:"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:"currentColor"})})}import{jsx as q,jsxs as xi}from"react/jsx-runtime";var nu=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
|
+
radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};import{ChevronDown as pu}from"lucide-react";import fu from"next/image";import We from"next/link";import{useParams as gu}from"next/navigation";import{useState as bu}from"react";import{jsx as ri}from"react/jsx-runtime";function oi(e){return ri("svg",{width:"16",height:"11",viewBox:"0 0 16 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:ri("path",{d:"M10.1552 10.5H5.8442C3.15868 10.5 0.840663 8.4364 0.706388 5.75088C0.565045 2.88163 2.86186 0.5 5.70285 0.5H10.1622C12.9184 0.5 15.3071 2.74028 15.3 5.50353C15.3 5.95583 14.9325 6.32332 14.4732 6.32332H3.8442C3.61805 6.32332 3.4343 6.13958 3.4343 5.91343V5.08657C3.4343 4.86042 3.61805 4.67668 3.8442 4.67668H13.2647C12.8972 3.22792 11.5827 2.14664 10.0138 2.14664H6.10568C4.32476 2.14664 2.76292 3.4894 2.64278 5.27032C2.51557 7.22085 4.06328 8.85336 5.98554 8.85336H10.1552C11.2435 8.85336 12.1198 8.33039 12.7488 7.43993L12.9891 7.10777C13.1233 6.92403 13.3778 6.88163 13.5615 7.00883L14.5156 7.4894C14.6993 7.62367 14.7417 7.87809 14.6145 8.06184L14.3742 8.39399C13.4414 9.71555 11.7806 10.5 10.1552 10.5Z",fill:"currentColor"})})}import{jsx as ai}from"react/jsx-runtime";function Ht({className:e}){return ai("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-10 w-10 text-black dark:text-white",e),children:ai("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 64C49.6731 64 64 49.6731 64 32C64 20.1555 57.5648 9.81398 48 4.28103V31.9999V47.9999H40V45.8594C37.6466 47.2208 34.9143 47.9999 32 47.9999C23.1634 47.9999 16 40.8365 16 31.9999C16 23.1634 23.1634 15.9999 32 15.9999C34.9143 15.9999 37.6466 16.7791 40 18.1404V1.00814C37.443 0.350024 34.7624 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64Z",fill:"currentColor"})})}var Fr=[{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:st,href:"/links"},{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:lt,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:it,href:"/analytics"},{id:"api",title:"Dub API",description:"Programmatic link creation at scale",icon:Jt,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ga,href:"/integrations"}],w3=[{icon:da,iconClassName:"group-hover:text-[#FF6363]",title:"Raycast",description:"Programmatic link sharing",href:"/customers/raycast"},{icon:ca,iconClassName:"group-hover:text-[#FF6154]",title:"Product Hunt",description:"Unlocking new growth",href:"/customers/product-hunt"},{icon:oi,iconClassName:"group-hover:text-[#353D7C]",title:"Elxo",description:"Overcoming API latency",href:"/customers/elxo"}],Oo=[{icon:ga,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:pa,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:ma,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:fa,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:ua,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],ni=[{icon:nr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:sr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Pt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Oo}],_t=[{icon:ir,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:or,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Pt,title:"About",description:"Company, values, and team",href:"/about"},{icon:ha,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:Ea,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:va,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Ht,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:La,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],ii=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],si=[{name:"Privacy Policy",slug:"privacy"},{name:"Terms of Service",slug:"terms"},{name:"Partner Terms",slug:"partners"},{name:"Affiliate Program Terms",slug:"affiliates"},{name:"DPA",slug:"dpa"},{name:"Subprocessors",slug:"subprocessors"},{name:"Report Abuse",slug:"abuse"}],N3=[{name:"X (Twitter)",icon:tr,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:er,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:rr,href:"https://www.youtube.com/@dubdotco"}];import{jsx as km}from"react/jsx-runtime";function Br({className:e,children:t}){return km("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Be from"@radix-ui/react-popover";import{BoxSelect as ru,Home as ou,LayoutGrid as au,Type as nu}from"lucide-react";import{useParams as iu}from"next/navigation";import{useCallback as su,useContext as lu,useState as cu}from"react";import{toast as du}from"sonner";import*as ue from"@radix-ui/react-navigation-menu";import{LayoutGroup as Fm}from"framer-motion";import Ut from"next/link";import{useParams as Bm,usePathname as Wm}from"next/navigation";import{createContext as $m,useId as Um}from"react";import Gm from"swr";import{Link as pi}from"@radix-ui/react-navigation-menu";import fi from"next/image";import gi from"next/link";import{Link2 as Pm}from"lucide-react";import{jsx as Z,jsxs as X}from"react/jsx-runtime";var li={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},tt={name:"Danielle Wilson",email:"danielle@dub.co",avatarIndex:8,origin:"dub.sh",country:"US",details:{"Lifetime value":"$12.5k",Account:"Pro",Subscription:"2y 10m"}};function ci({className:e}){return X("div",{className:i("pointer-events-none relative size-full",e),children:[X("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 339 168",className:"h-auto w-full [mask-image:linear-gradient(90deg,transparent,black_10%,black_90%,transparent)]",children:[Z("path",{stroke:"#00BBA7",strokeWidth:"2",d:"m345 1-60.533 76.487a8 8 0 0 1-9.732 2.25l-25.53-12.241a8 8 0 0 0-9.214 1.657l-62.736 64.993a8 8 0 0 1-6.695 2.388L67.303 124.331a8 8 0 0 0-5.193 1.17L-3.166 166.5"}),Z("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),Z("circle",{cx:"259.333",cy:"72",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"})]}),X("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[X("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[X("div",{className:"p-1.5",children:[X("div",{className:"bg-bg-subtle border-border-subtle text-content-default hidden items-center gap-2 rounded border p-2 text-xs font-medium leading-none sm:flex",children:[Z(Pm,{className:"size-3 rotate-90"}),"d.to/try"]}),Z("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),Z("div",{className:"border-border-default flex flex-col gap-2 border-t p-3",children:["clicks","leads","sales"].map(t=>X("div",{className:"flex items-center justify-between gap-2",children:[X("div",{className:"flex items-center gap-2",children:[Z("div",{className:"size-2 rounded-sm border border-black/20 bg-current opacity-70",style:{color:li[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:qt(t)})]}),X("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",li[t].value]})]},t))})]}),Z("div",{className:"relative",children:X("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[X("div",{className:"px-3 py-2.5",children:[X("div",{className:"flex justify-between gap-2",children:[Z("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:tt.avatarIndex*100+"%"}}),X("div",{className:"flex flex-col items-end gap-1",children:[X("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z(Ra,{className:"text-content-default size-3.5"}),tt.origin]}),X("div",{className:"bg-bg-default border-border-subtle text-content-default flex items-center gap-1.5 rounded-full border px-1.5 py-0.5 text-xs",children:[Z("img",{src:`https://flag.vercel.app/m/${tt.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),tt.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:tt.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:tt.email})]}),Z("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(tt.details).map(([t,r])=>X("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[Z("span",{className:"text-content-muted truncate font-medium",children:t}),Z("span",{className:"text-content-default",children:r})]},t))})]})})]})]})}import{useId as Sm}from"react";import{jsx as g,jsxs as me}from"react/jsx-runtime";function di(e){let t=Sm();return me("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:"300",height:"180",fill:"none",viewBox:"0 0 300 180",...e,className:i("pointer-events-none text-[var(--fg)] [--bg:white] [--border:#e5e5e5] [--fg:#171717] [--muted:#404040] dark:[--bg:black] dark:[--border:#fff3] dark:[--fg:#fffa] dark:[--muted:#fff7]",e.className),children:[me("defs",{children:[g("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),g("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),g("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),g("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("path",{className:"fill-[var(--fg)]",d:"M29.61 23c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[g("path",{d:"M84.47 26.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),g("path",{d:"M82.05 24a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.14-1.13h3.98c.48 0 .89.29 1.05.7"})]}),g("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M106.87 23.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[g("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),g("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),g("path",{className:"fill-[var(--bg)]",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M205.12 19.4h69.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-69.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:g("path",{d:"m209.95 29.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),g("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),g("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("path",{className:"fill-[var(--fg)]",d:"M29.61 83c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[g("path",{d:"M126.47 86.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),g("path",{d:"M124.05 84a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.13 1.13-1.13h3.99c.48 0 .89.29 1.05.7"})]}),g("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M148.87 83.66h-1.28a.85.85 0 0 0-.86.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[g("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),g("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),g("path",{className:"fill-[var(--bg)]",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M211.12 79.4h63.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.85a4.6 4.6 0 0 1-.3 1.45l-.08.16a4.03 4.03 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-63.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.85s.17-1.2.38-1.61c.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:g("path",{d:"m215.95 89.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.16.16 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),g("path",{className:"fill-[var(--bg)]",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),g("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M4 138.05c0-4.92 0-7.38.96-9.26a8.7 8.7 0 0 1 3.83-3.83c1.88-.96 4.34-.96 9.26-.96h263.9c4.92 0 7.38 0 9.26.96a8.7 8.7 0 0 1 3.83 3.83c.96 1.88.96 4.34.96 9.26v23.9c0 4.92 0 7.38-.96 9.26a8.78 8.78 0 0 1-3.83 3.83c-1.88.96-4.34.96-9.26.96H18.05c-4.92 0-7.38 0-9.26-.96a8.78 8.78 0 0 1-3.83-3.83C4 169.33 4 166.87 4 161.95z"}),g("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),g("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),g("path",{className:"fill-[var(--fg)]",d:"M29.61 143c.6 0 1.19.08 1.75.22v3.75a3.5 3.5 0 1 0 0 6.06v.47h1.75v-9.56a7 7 0 1 1-3.5-.94m2.29.39"}),g("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:g("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),me("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[g("path",{d:"M102.47 146.08h3.98c.63 0 1.14-.51 1.14-1.14v-3.98c0-.63-.51-1.14-1.14-1.14h-3.98c-.63 0-1.14.5-1.14 1.14v3.98c0 .63.5 1.14 1.14 1.14"}),g("path",{d:"M100.05 144a1.14 1.14 0 0 1-.71-1.05v-3.99c0-.63.5-1.14 1.13-1.14h3.99c.48 0 .89.3 1.06.72"})]}),g("path",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",d:"M124.87 143.66h-1.29a.85.85 0 0 0-.85.85v1.28m-1.71-5.97v1.28a.85.85 0 0 1-.85.85h-1.28m3.84.01h.43m-2.14 3.83v-.42m-3.41-7.26h1.28c.24 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m5.55 0h1.28c.23 0 .43.2.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43m-5.55 5.55h1.28c.24 0 .43.19.43.43v1.28c0 .23-.2.42-.43.42h-1.28a.43.43 0 0 1-.43-.42v-1.28c0-.24.2-.43.43-.43"}),me("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[g("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),g("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),g("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),g("path",{className:"fill-[var(--bg)]",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("path",{className:"stroke-[var(--border)]",strokeWidth:"0.73",d:"M208.12 139.4h66.22c1.24 0 2.14 0 2.86.05.62.05 1.07.14 1.44.3l.16.08c.66.34 1.22.85 1.6 1.48l.16.28c.21.4.32.9.38 1.6.06.72.06 1.62.06 2.86v7.9c0 1.24 0 2.14-.06 2.86a4.6 4.6 0 0 1-.3 1.44l-.08.16a4 4 0 0 1-1.48 1.6l-.28.16c-.4.2-.9.32-1.6.38-.72.06-1.62.06-2.86.06h-66.22c-1.23 0-2.14 0-2.85-.06a4.6 4.6 0 0 1-1.45-.3l-.16-.08a4 4 0 0 1-1.6-1.48l-.16-.28c-.2-.4-.32-.9-.38-1.6-.06-.72-.06-1.62-.06-2.86v-7.9c0-1.24 0-2.14.06-2.86.06-.7.17-1.2.38-1.6.39-.76 1-1.38 1.76-1.76.41-.2.9-.32 1.6-.38.72-.06 1.63-.06 2.86-.06Z"}),g("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:g("path",{d:"m212.95 149.2 4.75 1.64c.15.05.15.25 0 .3l-2.13.8a.17.17 0 0 0-.09.1l-.8 2.13a.16.16 0 0 1-.3 0l-1.64-4.76a.16.16 0 0 1 .2-.2h0Zm2.55 2.77 2.75 2.74m-5.53-9.43v1.3m2.76-.15-.92.92m-4.6 4.6.92-.92m-2.06-1.84h1.3m-.16-2.76.92.92"})}),g("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:g("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),me("defs",{children:[g("clipPath",{id:`${t}-b`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),g("clipPath",{id:`${t}-c`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),g("clipPath",{id:`${t}-d`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),g("clipPath",{id:`${t}-f`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),g("clipPath",{id:`${t}-g`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),g("clipPath",{id:`${t}-h`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),g("clipPath",{id:`${t}-j`,children:g("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),g("clipPath",{id:`${t}-k`,children:g("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),g("clipPath",{id:`${t}-l`,children:g("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),me("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),me("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[g("stop",{stopColor:"#030712",stopOpacity:"0"}),g("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as Tm,jsx as Me,jsxs as Ft}from"react/jsx-runtime";var Rm=[{name:"Lauren Anderson",country:"US",revenue:1800,payouts:550},{name:"Mia Taylor",country:"US",revenue:22600,payouts:6800},{name:"Sophie Laurent",country:"CA",revenue:11e3,payouts:3300},{name:"Hiroshi Tanaka",country:"JP",revenue:19200,payouts:5700},{name:"Elias Weber",country:"DE",revenue:783,payouts:235},{name:"Liam Carter",country:"US",revenue:3e4,payouts:9200}];function mi({className:e}){return Me("div",{className:i("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:Me("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:Rm.map((t,r)=>Me("div",{className:"h-[60px] w-[180px] p-[3px]",children:Me("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Ft(Tm,{children:[Me("div",{className:"bg-bg-emphasis aspect-square h-full",style:{backgroundImage:"url(https://assets.dub.co/partners/partner-images.jpg)",backgroundSize:"1400%",backgroundPositionX:(14-r%14)*100+"%"}},r),Ft("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Ft("div",{className:"flex items-center gap-1.5",children:[Me("img",{alt:"US Flag",src:`https://flag.vercel.app/m/${t.country}.svg`,className:"h-2.5 w-3 rounded-sm border-[0.5px] border-black/15"}),Me("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),Me("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,a)=>Ft("div",{className:i("flex flex-col",a===0?"pr-4":"pl-4"),children:[Me("span",{className:"text-content-muted text-[6px] font-medium",children:qt(o)}),Ft("span",{className:"text-content-default text-[9px] font-medium",children:["$",Xt(t[o])]})]},o))})]})]})})},r))})})}import{Link as Lm}from"@radix-ui/react-navigation-menu";import Mm from"next/link";import{jsx as Bt,jsxs as ui}from"react/jsx-runtime";var rt="text-xs uppercase text-neutral-500 dark:text-white/60",Dm="group rounded-[8px] p-2 transition-colors hover:bg-neutral-50 active:bg-neutral-100 dark:hover:bg-white/[0.15] dark:active:bg-white/20",Ne=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Wt({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:n,...c}){return Bt(Lm,{asChild:!0,children:Bt(Mm,{className:i(Dm,a),...c,children:ui("div",{className:"flex items-center justify-between gap-3",children:[e,ui("div",{className:"flex-1",children:[Bt("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&Bt("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),n&&Bt(oa,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}import{jsx as A,jsxs as $t}from"react/jsx-runtime";var Em=[{icon:A("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:A(st,{className:"size-2.5 text-orange-900"})}),title:"Dub Links",description:"Short links with superpowers for modern marketing teams.",href:"/links",color:"#f4950c",graphicsContainerClassName:"px-2",graphic:A(di,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:A("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:A(it,{className:"size-2.5 text-green-900"})}),title:"Dub Analytics",description:"Powerful analytics delivered instantly.",href:"/analytics",color:"#36D78F",graphicsContainerClassName:"h-[170%] bottom-0 top-[unset]",graphic:A(ci,{className:"absolute bottom-0 left-0 size-full"})},{icon:A("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:A(lt,{className:"size-2.5 text-violet-900"})}),title:"Dub Partners",description:"Grow your revenue on auto-pilot with partnerships.",href:"/partners",color:"#818cf8",graphicsContainerClassName:"pl-2",graphic:A(mi,{})}],Im=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:A("div",{className:"absolute -right-4 top-1/2 h-[180px] w-[240px] -translate-y-1/2 [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-80",children:A(fi,{src:"https://assets.dub.co/misc/integrations-grid.png",alt:"",fill:!0})})},{title:"Dub API",description:"Unlock further capabilities",href:"/docs/api-reference/introduction",graphic:A("div",{className:"absolute -right-4 top-2.5 h-[180px] w-[240px] [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-60",children:A(fi,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function bi({domain:e}){return $t("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[A("div",{className:"grid grid-cols-3 gap-4",children:Em.map(({title:t,description:r,icon:o,href:a,color:n,graphicsContainerClassName:c,graphic:s})=>A(pi,{asChild:!0,children:$t(gi,{href:V(a,e,Ne({domain:e,utm_content:t})),className:"group relative flex flex-col overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 dark:border-white/20 dark:bg-white/10",children:[A(qe,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),$t("div",{className:"relative p-5 pb-0",children:[o,A("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),A("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),A("div",{className:"relative mt-10 h-40 grow",children:A("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",c),children:A("div",{className:"relative size-full",children:s})})}),A("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_50%_100%,var(--color),transparent)] opacity-[0.07] transition-opacity duration-150 group-hover:opacity-15",style:{"--color":n}})]})},t))}),A("div",{className:"grid grow grid-cols-2 gap-4",children:Im.map(({title:t,description:r,href:o,graphic:a})=>A(pi,{asChild:!0,children:$t(gi,{href:V(o,e,Ne({domain:e,utm_content:t})),className:"group relative flex flex-col justify-center rounded-xl border border-neutral-100 bg-neutral-50 transition-colors duration-150 hover:bg-neutral-100 active:bg-neutral-200 dark:border-white/20 dark:bg-white/10 dark:hover:bg-white/15 dark:active:bg-white/20",children:[A(qe,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),A("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),A("div",{className:"relative flex items-center justify-between px-5 py-4",children:$t("div",{children:[A("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),A("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as Am}from"@radix-ui/react-navigation-menu";import Om from"next/link";import{jsx as G,jsxs as ot}from"react/jsx-runtime";var zm=[{icon:ir,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:or,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function hi({domain:e}){return ot("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[ot("div",{className:"flex h-full flex-col p-4",children:[G("p",{className:i(rt,"mb-4 ml-2"),children:"Explore"}),G("div",{className:"grid grow grid-cols-2 gap-4",children:zm.map(({icon:t,title:r,description:o,href:a})=>G(Am,{asChild:!0,children:ot(Om,{href:V(a,e,Ne({domain:e,utm_content:r})),className:i("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[ot("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[G("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:G(qe,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),G("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),G(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),ot("div",{className:"relative",children:[G("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),G("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),ot("div",{className:"px-6 py-4",children:[G("p",{className:i(rt,"mb-2"),children:"Company"}),G("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>G(Wt,{className:"-mx-2",href:V(a,e,Ne({domain:e,utm_content:r})),icon:G("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:G(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]}),ot("div",{className:"px-6 py-4",children:[G("p",{className:i(rt,"mb-2"),children:"Updates"}),G("div",{className:"flex flex-col gap-0.5",children:_t.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>G(Wt,{className:"-mx-2",href:V(a,e,Ne({domain:e,utm_content:r})),icon:G("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:G(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]})]})}import{Link as Vm}from"@radix-ui/react-navigation-menu";import Hm from"next/link";import{jsx as re,jsxs as vt}from"react/jsx-runtime";var _m=[{icon:nr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:sr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Pt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function vi({domain:e}){return vt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[vt("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(rt,"mb-4 ml-2"),children:"Use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:_m.map(({icon:t,title:r,description:o,href:a})=>re(Vm,{asChild:!0,children:vt(Hm,{href:V(a,e,Ne({domain:e,utm_content:r})),className:i("group relative isolate z-0 flex flex-col justify-between overflow-hidden rounded-xl border border-neutral-100 bg-neutral-50 px-5 py-4 transition-colors duration-75","dark:border-white/20 dark:bg-neutral-900"),children:[vt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[re("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:re(qe,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),re("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),re(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),vt("div",{className:"relative",children:[re("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),re("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),vt("div",{className:"px-6 py-4",children:[re("p",{className:i(rt,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:Oo.map(({icon:t,iconClassName:r,title:o,href:a})=>re(Wt,{className:"-mx-2",href:V(a,e,Ne({domain:e,utm_content:o})),icon:re("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:re(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Ym,jsx as B,jsxs as xt}from"react/jsx-runtime";var zo=$m({theme:"light"}),Vo=[{name:"Product",content:bi,childItems:Fr,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:vi,childItems:ni,segments:["/solutions","/sdks"]},{name:"Resources",content:hi,childItems:_t,segments:["/help","/docs","/about","/careers","/brand","/blog","/changelog","/contact"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]}],xi=i("relative group/item flex items-center rounded-md px-4 py-2 text-sm rounded-lg font-medium text-neutral-700 hover:text-neutral-900 transition-colors","dark:text-white/90 dark:hover:text-white","hover:bg-neutral-900/5 dark:hover:bg-white/10","data-[active=true]:bg-neutral-900/5 dark:data-[active=true]:bg-white/10","group-has-[:hover]:data-[active=true]:[&:not(:hover)]:bg-transparent");function Dw({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Bm();t&&(o=t);let a=Um(),n=dn(40),c=Wm(),{data:s,isLoading:u}=Gm(o.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return B(zo.Provider,{value:{theme:e},children:B(Fm,{id:a,children:xt("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[B("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",n&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),B(Br,{className:i("relative",r),children:xt("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(Ut,{className:"block w-fit py-2 pr-2",href:V("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:B(Wr,{})})}),xt(ue.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(ue.List,{className:"group relative z-0 flex",children:Vo.map(({name:l,href:d,segments:m,content:p})=>{let f=m.some(b=>c==null?void 0:c.startsWith(b));return xt(ue.Item,{children:[B(Km,{trigger:!!p,children:d!==void 0?B(Ut,{id:`nav-${d}`,href:V(d,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:l}),className:xi,"data-active":f,children:l}):xt("button",{className:xi,"data-active":f,children:[l,B(jm,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&B(ue.Content,{className:"data-[motion=from-start]:animate-enter-from-left data-[motion=from-end]:animate-enter-from-right data-[motion=to-start]:animate-exit-to-left data-[motion=to-end]:animate-exit-to-right absolute left-0 top-0",children:B(p,{domain:o})})]},l)})}),B("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:B(ue.Viewport,{className:i("relative flex origin-[top_center] justify-start overflow-hidden rounded-[20px] border border-neutral-200 bg-white shadow-md dark:border-white/[0.15] dark:bg-black","data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content","h-[var(--radix-navigation-menu-viewport-height)] w-[var(--radix-navigation-menu-viewport-width)] transition-[width,height]")})})]}),B("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:s&&Object.keys(s).length>0?B(Ut,{href:Ce,className:i(se({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):u?null:xt(Ym,{children:[B(Ut,{href:"https://app.dub.co/login",className:i(se({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),B(Ut,{href:"https://app.dub.co/register",className:i(se({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function jm(e){return B("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:B("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M7.278 3.389 4.5 6.167 1.722 3.389",className:"transition-transform duration-150 [transform-box:view-box] [transform-origin:center] [vector-effect:non-scaling-stroke] group-data-[state=open]/item:-scale-y-100"})})}function Km({trigger:e,children:t}){return e?B(ue.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Zm,Menu as qm,X as Xm}from"lucide-react";import yt from"next/link";import{useParams as Fo}from"next/navigation";import{useEffect as Jm,useState as wi}from"react";import Qm from"swr";import{Fragment as tu,jsx as T,jsxs as De}from"react/jsx-runtime";var Ho={"Dub Links":T("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:T(st,{className:"size-3 text-orange-900"})}),"Dub Partners":T("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:T(lt,{className:"size-3 text-violet-900"})}),"Dub Analytics":T("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:T(it,{className:"size-3 text-green-900"})}),"Dub API":T("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:T(Jt,{className:"size-3 text-neutral-900"})})};function jw({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Fo();t&&(r=t);let[o,a]=wi(!1);Jm(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:n,isLoading:c}=Qm(r.endsWith("dub.co")&&"/api/auth/session",ge,{dedupingInterval:6e4});return De("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[n&&Object.keys(n).length>0?T(_o,{href:Ce,className:"max-[280px]:hidden",children:"Dashboard"}):c?null:De("div",{className:"flex gap-2 max-[280px]:hidden",children:[T(_o,{variant:"secondary",href:`${Ce}/login`,children:"Log in"}),T(_o,{href:`${Ce}/register`,children:"Sign Up"})]}),T("button",{onClick:()=>a(!o),className:i("z-30 rounded-full p-2 transition-colors duration-200 hover:bg-neutral-200 focus:outline-none active:bg-neutral-300 dark:hover:bg-white/20 dark:active:bg-white/30",o&&"hover:bg-neutral-100 active:bg-neutral-200"),children:o?T(Xm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):T(qm,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),T("nav",{className:i("fixed inset-0 z-20 hidden max-h-screen w-full overflow-y-auto bg-white px-5 py-16 lg:hidden dark:bg-black dark:text-white/70",o&&"block"),children:De("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[Vo.map(({name:s,href:u,childItems:l},d)=>T(eu,{name:s,href:u,childItems:l,setOpen:a},d)),n&&Object.keys(n).length>0?T("li",{className:"py-3 min-[281px]:hidden",children:T(yt,{href:Ce,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):De(tu,{children:[T("li",{className:"py-3 min-[281px]:hidden",children:T(yt,{href:`${Ce}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),T("li",{className:"py-3 min-[281px]:hidden",children:T(yt,{href:`${Ce}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var eu=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Fo(),[n,c]=wi(!1);return r?T("li",{className:"py-3",children:De(Se,{height:!0,children:[De("button",{className:"flex w-full justify-between",onClick:()=>c(!n),children:[T("p",{className:"font-semibold",children:e}),T(Zm,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",n&&"rotate-180")})]}),n&&T("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,u)=>"items"in s?De("div",{className:"grid grid-cols-1 gap-3",children:[T("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:s.label}),s.items.map((l,d)=>T(yi,{item:l,setOpen:o,size:"small"},d))]},u):T(yi,{item:s,setOpen:o},u))})]})}):t?T("li",{className:"py-3",children:T(yt,{href:V(t,a,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:a,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null},yi=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:n="normal"})=>{let{domain:c="dub.co"}=Fo(),s=Ho==null?void 0:Ho[e];return De(yt,{href:V(r,c,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:c,utm_content:e}),onClick:()=>a(!1),className:"flex w-full items-center gap-3",children:[T("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",n==="small"&&"size-8"),children:s??T(o,{className:i("size-5 text-neutral-700 grayscale",n==="small"&&"size-4")})}),De("div",{children:[T("div",{className:"flex items-center gap-2",children:T("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&T("p",{className:"text-sm text-neutral-500",children:t})]})]})};function _o({variant:e,className:t,...r}){return T(yt,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",se({variant:e}),t)})}import{jsx as Ni}from"react/jsx-runtime";function Ci({className:e}){return Ni("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:Ni("path",{fillRule:"evenodd",clipRule:"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:"currentColor"})})}import{jsx as q,jsxs as ki}from"react/jsx-runtime";var mu=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
50
|
<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
|
-
</svg>`,
|
|
51
|
+
</svg>`,uu=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
51
52
|
<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 _r({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=eu(),{theme:a}=ru(Mo),[c,d]=ou(!1),s=tu(n=>{n.preventDefault(),d(!0)},[]),[,m]=dt();function l(n){au.promise(m(n),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return xi(Fe.Root,{open:c,onOpenChange:d,children:[q(Fe.Anchor,{asChild:!0,children:q("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?q(vi,{className:r}):q(Vt,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),q(Fe.Portal,{children:q(Fe.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:n=>{n.stopPropagation(),d(!1)},children:xi("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:[q(Gt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>l(nu),icon:q(Vt,{className:"h-4 w-4"})}),q(Gt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>l(iu),icon:q(Qm,{strokeWidth:2,className:"h-4 w-4"})}),q(Gt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:q(qm,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?q(Gt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:q(Xm,{strokeWidth:2,className:"h-4 w-4"})}):q(Gt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:q(Jm,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Gt({className:e,...t}){return q(ee,{className:i("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 I,jsxs as B}from"react/jsx-runtime";var cu=[{name:"Twitter",icon:Jt,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:Xt,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:Qt,href:"https://www.youtube.com/@dubdotco"}],xt={product:[...Hr.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:ti.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`})),legal:ri.map(({name:e,slug:t})=>({name:e,href:`/legal/${t}`})),tools:qo.map(({name:e,slug:t})=>({name:e,href:`/tools/${t}`}))},yt="text-sm font-medium text-neutral-900",wt="flex flex-col mt-2.5 gap-3.5",ot="flex items-center gap-1 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function Qw({staticDomain:e,className:t}){let{domain:r="dub.co"}=lu();return e&&(r=e),I(Vr,{className:i("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:B("footer",{children:[B("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[B("div",{className:"flex flex-col gap-6",children:[I("div",{className:"grow",children:B(Be,{href:V("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[B("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),I(_r,{className:"h-8 text-neutral-800"})]})}),I("div",{className:"flex items-center gap-3",children:cu.map(({name:o,icon:a,href:c})=>B("a",{href:c,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[I("span",{className:"sr-only",children:o}),I(a,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},o))})]}),B("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{className:"grid gap-8",children:[B("div",{children:[I("h3",{className:yt,children:"Product"}),I("ul",{role:"list",className:wt,children:xt.product.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]}),B("div",{children:[I("h3",{className:yt,children:"Solutions"}),I("ul",{role:"list",className:wt,children:xt.solutions.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]})]}),B("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:yt,children:"Resources"}),I("ul",{role:"list",className:wt,children:xt.resources.map(o=>I("li",{children:B(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),target:o.target,className:ot,children:[o.name,o.target&&I(Kr,{className:"size-3.5"})]})},o.name))})]})]}),B("div",{className:"md:grid md:grid-cols-2",children:[B("div",{className:"grid gap-8",children:[B("div",{children:[I("h3",{className:yt,children:"Compare"}),I("ul",{role:"list",className:wt,children:xt.compare.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]}),B("div",{children:[I("h3",{className:yt,children:"Legal"}),B("ul",{role:"list",className:wt,children:[xt.legal.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name)),I("li",{children:B("a",{href:"https://security.dub.co",target:"_blank",rel:"noreferrer",className:ot,children:["Trust Center ",I(Kr,{className:"size-3.5"})]})})]})]})]}),B("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:yt,children:"Tools"}),I("ul",{role:"list",className:wt,children:xt.tools.map(o=>I("li",{children:I(Be,{href:V(o.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:o.name}),className:ot,children:o.name})},o.name))})]})]})]})]}),B("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[I(vn,{}),I(Be,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:I(su,{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"})}),B("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as du,motion as mu}from"framer-motion";import{useEffect as uu,useState as pu}from"react";import{jsx as yi}from"react/jsx-runtime";var wi=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,c]=pu(!1);uu(()=>{c(!0)},[]);let d=r?mu.div:"div";return yi(du,{children:a?yi(d,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as fu}from"class-variance-authority";import{toast as gu}from"sonner";import{jsx as Oo,jsxs as hu}from"react/jsx-runtime";var bu=fu("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 m6({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[c,d]=dt(),s=o||Xo;return hu("button",{onClick:m=>{m.stopPropagation(),gu.promise(d(t),{success:a||"Copied to clipboard!"})},className:i(bu({variant:e}),r),type:"button",children:[Oo("span",{className:"sr-only",children:"Copy"}),c?Oo(oa,{className:"h-3.5 w-3.5"}):Oo(s,{className:"h-3.5 w-3.5"})]})}import{toast as vu}from"sonner";import{jsx as xu}from"react/jsx-runtime";function b6({value:e,children:t,className:r,successMessage:o}){let[a,c]=dt();return xu("button",{onClick:d=>{d.stopPropagation(),vu.promise(c(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as yu,jsxs as wu}from"react/jsx-runtime";function v6({icon:e,text:t}){return wu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,yu("p",{className:"truncate text-sm",children:t})]})}import{jsx as Nu}from"react/jsx-runtime";var y6=({children:e})=>Nu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as zo}from"react/jsx-runtime";function P6({apexDomain:e,className:t,imageProps:r}){return e?zo(zt,{src:`${Yo}${e}`,alt:e,className:i("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):zo("div",{className:i("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:zo(Ea,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Ni}from"lucide-react";import{useSearchParams as Cu}from"next/navigation";import{useEffect as ku,useMemo as Pu,useRef as Su}from"react";import Ru from"swr";import{useDebounce as Tu}from"use-debounce";import{Fragment as Ci,jsx as j,jsxs as We}from"react/jsx-runtime";function O6({defaultUrl:e}){let t=Cu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=Tu(Ko(r),500),a=Pu(()=>jo(o||""),[o]),{data:c,isValidating:d}=Ru(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,fe,{revalidateOnFocus:!1}),{title:s,description:m,image:l}=c||{},n=Su(null);ku(()=>{!e&&n.current&&n.current.select()},[e]);let{isMobile:u}=Y();return We(Ci,{children:[!e&&We("div",{className:"relative flex items-center",children:[j(Ni,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("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"})]}),We("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[d&&j("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:j(Pt,{})}),l?j("img",{src:l,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):We("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[j(ea,{className:"h-8 w-8 text-neutral-400"}),j("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),We("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?j("p",{className:"text-sm text-[#536471]",children:a}):j("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),s?j("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:s}):j("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?j("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):We("div",{className:"grid gap-2",children:[j("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),j("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function z6({defaultUrl:e}){return We(Ci,{children:[We("div",{className:"relative flex items-center",children:[j(Ni,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("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"})]}),j("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:j("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:j(Pt,{})})})]})}import{AnimatePresence as Lu}from"framer-motion";import ki from"js-cookie";import{createContext as Mu,useState as Du}from"react";import{jsx as Ho}from"react/jsx-runtime";var Eu=Mu({hidePopup:()=>{}});function $6({children:e,hiddenCookieId:t}){let[r,o]=Du(ki.get(t)==="1"),a=()=>{o(!0),ki.set(t,"1")};return Ho(wi,{children:Ho(Eu.Provider,{value:{hidePopup:a},children:Ho(Lu,{children:!r&&e})})})}import{motion as Iu}from"framer-motion";import{jsx as Pi}from"react/jsx-runtime";function j6({value:e=0,max:t=100,className:r}){return Pi("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Pi(Iu.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 Ri}from"class-variance-authority";import{LayoutGroup as Au,motion as Ou}from"framer-motion";import zu from"next/link";import{useId as Hu}from"react";import{jsx as Kt,jsxs as Si}from"react/jsx-runtime";var Vu=Ri("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"}}),_u=Ri("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function aN({variant:e,options:t,selected:r,onSelect:o,className:a}){let c=Hu();return Kt("div",{className:i("flex text-sm",a),children:Kt(Au,{id:c,children:t.map(({id:d,label:s,href:m,target:l})=>{let n=d===r;return Si(m?zu:"div",{className:"relative",href:m??"#",target:l??void 0,children:[Si("button",{type:"button",...o&&!m&&{onClick:()=>o(d)},className:i(Vu({variant:e}),l==="_blank"&&"group flex items-center gap-1.5"),"data-selected":n,"aria-selected":n,children:[s,l==="_blank"&&Kt(ma,{className:"size-2.5"})]}),n&&Kt(Ou.div,{layoutId:"indicator",transition:{duration:.1},className:_u({variant:e}),children:Kt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},d)})})})}import{jsx as Vo,jsxs as Ti}from"react/jsx-runtime";var Fu=[{icon:Ba,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Ca,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Aa,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:_a,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Ia,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function sN(){return Ti("div",{className:"p-3",children:[Vo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Vo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:Fu.map(({text:e,icon:t,href:r})=>Ti("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Vo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Li,jsxs as Bu}from"react/jsx-runtime";function dN({className:e}){return Bu("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:[Li("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"}),Li("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{Jr as AUTOPLAY_DEFAULT_DELAY,r1 as Accordion,zi as AccordionContent,Ai as AccordionItem,Oi as AccordionTrigger,sN as AdvancedLinkFeaturesTooltip,np as Africa,hp as Airtm,Fi as Alert,Wi as AlertDescription,Bi as AlertTitle,mp as Amazon,kp as AndroidLogo,ke as AnimatedSizeContainer,Pp as AppleLogo,Sp as ArrowBoldUp,Rp as ArrowRight,Tp as ArrowTrendUp,Lp as ArrowTurnLeft,Mp as ArrowTurnRight2,ma as ArrowUpRight,Dp as ArrowsOppositeDirectionX,Ep as ArrowsOppositeDirectionY,ip as Asia,Io as AuthButton,d1 as Avatar,jy as Background,cr as Badge,Ip as BadgeCheck,Ap as BadgeCheck2Fill,D1 as BadgeTooltip,Op as Blog,zt as BlurImage,zp as Bolt,Hp as BoltFill,_p as Book2,er as Book2Fill,Fp as Book2Small,Vp as BookOpen,Bp as Books2,Wp as BoxArchive,$p as BracketsCurly,ua as BriefcaseFill,Up as Brush,Gp as BulletList,pa as BulletListFill,ee as Button,E1 as ButtonTooltip,ti as COMPARE_PAGES,r3 as CUSTOMER_STORIES,Kp as Calculator,un as Calendar,qp as Calendar6,Yp as CalendarDays,jp as CalendarIcon,Zp as CalendarRefresh,tp as CardAmex,rp as CardDiscover,rb as CardList,op as CardMastercard,ap as CardVisa,Xp as Cards,Jp as CaretUpFill,ys as Carousel,ws as CarouselContent,Ns as CarouselItem,yb as CarouselNavBar,ks as CarouselNext,Cs as CarouselPrevious,Mb as CarouselThumbnail,Lb as CarouselThumbnails,vp as CashApp,Qp as ChartActivity2,e0 as ChartArea2,t0 as ChartLine,up as ChatGPT,fa as Check,tr as Check2,ct as Checkbox,ga as CheckboxCheckedFill,ba as CheckboxUnchecked,r0 as ChevronLeft,o0 as ChevronRight,ha as CircleCheck,a0 as CircleCheckFill,n0 as CircleDollar,i0 as CircleDotted,va as CircleHalfDottedCheck,xa as CircleHalfDottedClock,ya as CircleInfo,s0 as CirclePercentage,l0 as CirclePlay,c0 as CirclePlayFill,d0 as CircleQuestion,m0 as CircleUser,Gr as CircleWarning,u0 as CircleXmark,p0 as Circles,f0 as Circles3,wi as ClientOnly,wa as CloudUpload,g0 as Code,b0 as ColorPalette2,Cv as Combobox,dN as CompositeLogo,h0 as ConnectedDots,x0 as ConnectedDots4,v0 as ConnectedDotsFill,y0 as Connections3,Xo as Copy,m6 as CopyButton,b6 as CopyText,w0 as CreditCard,N0 as Crosshairs3,C0 as Crown,Wu as CrownSmall,k0 as Cube,P0 as CubeSettings,S0 as CubeSettingsFill,R0 as CurrencyDollar,Na as CursorRays,T0 as DatabaseKey,oo as DatePickerContext,sx as DateRangePicker,L0 as Desktop,M0 as DiamondTurnRight,rr as DiamondTurnRightFill,D0 as Directions,E0 as Discount,I0 as Dots,gx as DotsPattern,A0 as Download,nt as DubAnalyticsIcon,Zt as DubApiIcon,$u as DubCraftedShield,it as DubLinksIcon,st as DubPartnersIcon,vn as DubStatusBadge,O0 as Duplicate,dr as DynamicTooltipWrapper,Ca as Earth,z0 as EarthPosition,sy as EditColumnsButton,Cx as EmptyState,H0 as Envelope,V0 as EnvelopeAlert,_0 as EnvelopeArrowRight,ka as EnvelopeFill,sp as Europe,Jo as ExpandingArrow,Pa as Eye,Sa as EyeSlash,Hr as FEATURES_LIST,ju as Facebook,Ra as FeatherFill,pp as Figma,F0 as FileContent,Ax as FileUpload,B0 as FileZip2,n2 as Filter,$0 as Filter2,W0 as FilterBars,G0 as Flag2,Ta as Flag6,U0 as FlagWavy,K0 as Flask,j0 as FlaskSmall,Y0 as Folder,Q0 as Folder5,Z0 as FolderBookmark,q0 as FolderLock,X0 as FolderPlus,J0 as FolderShield,Qw as Footer,u2 as Form,ef as GamingConsole,tf as Gauge6,La as Gear,rf as Gear2,of as Gear3,af as Gem,Ma as Gift,nf as GiftFill,fp as GitHubEnhanced,qt as Github,sf as Globe,Ea as Globe2,Da as GlobePointer,lf as GlobeSearch,ia as Go,Yu as Google,gp as GoogleEnhanced,cf as GreekTemple,Ze as Grid,df as GridIcon,mf as GridLayoutRows,uf as GridPlus,pf as GripDotsVertical,ff as Headset,gf as HeartFill,bf as HexadecagonStar,hf as History,vf as Hyperlink,v6 as IconMenu,xf as Icosahedron,Ia as Incognito,yf as InfinityIcon,L1 as InfoTooltip,y6 as InlineSnippet,Wc as Input,wf as InputField,Nf as InputPassword,Aa as InputPasswordPointer,Oa as InputSearch,W2 as InputSelect,Zu as Instagram,Cf as InvoiceDollar,kf as Key,Xa as KeyboardShortcutContext,dh as KeyboardShortcutProvider,ri as LEGAL_PAGES,cd as Label,Pf as LayoutSidebar,Sf as License,or as LifeRing,Rf as LinesY,Lf as Link4,Tf as LinkBroken,P6 as LinkLogo,O6 as LinkPreview,z6 as LinkPreviewPlaceholder,Xt as LinkedIn,T1 as LinkifyTooltipContent,Pt as LoadingCircle,Ku as LoadingDots,Ne as LoadingSpinner,Mf as LocationPin,Df as Lock,Ef as LockFill,Vt as Logo,Qo as Magic,If as Magnifier,Af as MapPosition,Uu as MarkdownIcon,Of as MarketingTarget,Gu as MatrixLines,Vr as MaxWidthWrapper,zf as Menu3,e4 as MenuItem,Hf as MessageSmile,ar as MicrophoneFill,d4 as MiniAreaChart,za as Minus,Vf as MobilePhone,b4 as Modal,_f as MoneyBill,Ff as MoneyBill2,Bf as MoneyBills2,Wf as Msgs,uw as Nav,Mo as NavContext,Rw as NavMobile,_r as NavWordmark,lp as NorthAmerica,$f as Note,Xf as NucleoPhoto,M1 as NumberTooltip,cp as Oceania,Uf as OfficeBuilding,qg as PLAN_FEATURE_ICONS,Ha as Page2,x4 as PaginationControls,Gf as Paintbrush,Kf as Palette2,jf as PaperPlane,xp as Payoneer,yp as Paypal,Zf as Pen2,Yf as PenWriting,qf as PercentageArrowDown,ea as Photo,sa as Php,Jf as Plug2,nr as Plus,Qf as Plus2,Ae as Popover,$6 as Popup,Eu as PopupContext,eg as Post,qu as Prisma,aa as ProductHunt,j6 as ProgressBar,tg as Pyramid,la as Python,rg as QRCode,_t as RESOURCES,Td as RadioGroup,Ld as RadioGroupItem,na as Raycast,og as Receipt2,Kr as ReferredVia,ag as Refresh2,ng as Robot,ca as Ruby,Lo as SDKS,o3 as SOCIAL_LINKS,ei as SOLUTIONS,Va as SatelliteDish,ig as ScanText,sg as Scribble,R4 as Sheet,lg as ShieldAlert,cg as ShieldCheck,dg as ShieldKeyhole,mg as ShieldSlash,ug as ShieldUser,D4 as ShimmerDots,pg as Shuffle,R1 as SimpleTooltipContent,Xu as Slack,A4 as Slider,fg as Sliders,V4 as SmartDateTimePicker,ta as SortOrder,dp as SouthAmerica,gg as Sparkle3,bp as Spotify,bg as SquareChart,hg as SquareLayoutGrid5,vg as SquareLayoutGrid6,xg as SquareUserSparkle2,yg as SquareXmark,wg as Stars2,G4 as StatusBadge,wp as Stripe,Np as StripeLink,ra as Success,Q4 as Switch,Mg as TV,aN as TabSelect,Dy as Table,Ng as TableIcon,Cg as TableRows2,kg as Tablet,Pg as Tag,Sg as Tags,oa as Tick,Ju as TikTok,_a as Timer2,Qu as Tinybird,Fa as Toggle2Fill,Hy as ToggleGroup,Rg as Toggles,m1 as TokenAvatar,J as Tooltip,S1 as TooltipContent,P1 as TooltipProvider,Tg as Trash,Lg as TriangleWarning,Jt as Twitter,da as Typescript,Gy as UTMBuilder,bm as UTM_PARAMETERS,Dg as UiCard,ep as Unsplash,Eg as User,Ig as UserCheck,Ag as UserCrown,Og as UserDelete,zg as UserFocus,Hg as UserPlus,Vg as UserXmark,_g as Users,Bg as Users2,Wg as Users6,St as UsersFill,Fg as UsersSettings,Cp as Venmo,$g as Versions2,Ba as Views,Ug as Watch,Gg as Webhook,Kg as Window,jg as WindowSearch,Yg as WindowSettings,vi as Wordmark,Zg as Xmark,Qt as YouTube,ji as badgeVariants,ie as buttonVariants,Gi as getUserAvatarUrl,Do as navItems,Kd as statusBadgeVariants,be as useCarousel,Ya as useCarouselActiveIndex,Vb as useCookies,dt as useCopyToClipboard,$b as useCurrentAnchor,jb as useEnterSubmit,Xb as useInViewport,eh as useInputFocused,ah as useIntersectionObserver,De as useKeyboardShortcut,ph as useLocalStorage,Y as useMediaQuery,vh as useOptimisticUpdate,Mh as usePagination,Ih as useRemoveGAParams,ur as useResizeObserver,tn as useRouterStuff,an as useScroll,Ee as useScrollProgress,My as useTable,en as useTablePagination,Yh as useToastWithUndo};
|
|
53
|
+
</svg>`;function Wr({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=iu(),{theme:a}=lu(zo),[n,c]=cu(!1),s=su(d=>{d.preventDefault(),c(!0)},[]),[,u]=ut();function l(d){du.promise(u(d),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return ki(Be.Root,{open:n,onOpenChange:c,children:[q(Be.Anchor,{asChild:!0,children:q("div",{onContextMenu:s,className:"max-w-fit",children:e==="full"?q(Ci,{className:r}):q(Ht,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),q(Be.Portal,{children:q(Be.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",a==="dark"&&"dark"),onClick:d=>{d.stopPropagation(),c(!1)},children:ki("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:[q(Gt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>l(mu),icon:q(Ht,{className:"h-4 w-4"})}),q(Gt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>l(uu),icon:q(nu,{strokeWidth:2,className:"h-4 w-4"})}),q(Gt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:q(ru,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?q(Gt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:q(ou,{strokeWidth:2,className:"h-4 w-4"})}):q(Gt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:q(au,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Gt({className:e,...t}){return q(te,{className:i("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 D,jsxs as W}from"react/jsx-runtime";var hu=[{name:"Twitter",icon:tr,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:er,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:Qt,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:rr,href:"https://www.youtube.com/@dubdotco"}],jt={product:[...Fr.filter(({title:e})=>e!=="Dub Integrations").map(({id:e,title:t,href:r})=>({id:e,name:t,href:r})),{id:null,name:"Dub Enterprise",href:"/enterprise"}],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:"Integrations",href:"/integrations"},{name:"Pricing",href:"/pricing"},{name:"Affiliates",href:"https://partners.dub.co/dub",target:"_blank"}],company:[{name:"About",href:"/about"},{name:"Blog",href:"/blog"},{name:"Careers",href:"/careers"},{name:"Changelog",href:"/changelog"},{name:"Customers",href:"/customers"},{name:"Brand",href:"/brand"},{name:"Contact",href:"/contact"}],compare:ii.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`,product:"links"})).concat(["Rewardful","PartnerStack","Tolt"].map(e=>({name:e,href:`/help/article/migrating-from-${e.toLowerCase()}`,product:"partners"})))},Kt="text-sm font-medium text-neutral-900",Yt="flex flex-col mt-2.5 gap-3.5",at="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function CN({staticDomain:e,className:t}){let{domain:r="dub.co"}=gu();e&&(r=e);let[o,a]=bu(!1);return D(Br,{className:i("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:[D("div",{className:"grow",children:W(We,{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"]}),D(Wr,{className:"h-8 text-neutral-800"})]})}),D("div",{className:"flex items-center gap-3",children:hu.map(({name:n,icon:c,href:s})=>W("a",{href:s,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[D("span",{className:"sr-only",children:n}),D(c,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},n))})]}),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:[D("h3",{className:Kt,children:"Product"}),D("ul",{role:"list",className:Yt,children:jt.product.map(n=>D("li",{children:W(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:at,children:[n.id&&D(Yr,{product:n.id}),n.name]})},n.name))})]}),W("div",{children:[D("h3",{className:Kt,children:"Solutions"}),D("ul",{role:"list",className:Yt,children:jt.solutions.map(n=>D("li",{children:D(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:at,children:n.name})},n.name))})]})]}),W("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:Kt,children:"Resources"}),D("ul",{role:"list",className:Yt,children:jt.resources.map(n=>D("li",{children:W(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),target:n.target,className:i(at,"gap-1"),children:[n.name,n.target&&D(Wa,{className:"size-3.5"})]})},n.name))})]})]}),W("div",{className:"md:grid md:grid-cols-2",children:[D("div",{className:"grid gap-8",children:W("div",{children:[D("h3",{className:Kt,children:"Company"}),W("ul",{role:"list",className:Yt,children:[jt.company.map(n=>D("li",{children:D(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(at,"gap-1"),children:n.name})},n.name)),D("li",{className:"-mt-1",children:D(ve,{content:D("div",{className:"flex w-screen flex-col gap-1 p-1.5 text-sm focus-visible:outline-none sm:w-auto sm:min-w-[200px]",children:si.map(n=>D(We,{href:V(`/legal/${n.slug}`,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(Co({variant:"default"}),at,"justify-start font-normal"),children:n.name},n.name))}),openPopover:o,setOpenPopover:a,children:W("button",{className:at,children:["Legal",D(pu,{className:"size-3.5"})]})})})]})]})}),W("div",{className:"mt-10 md:mt-0",children:[D("h3",{className:Kt,children:"Compare"}),D("ul",{role:"list",className:Yt,children:jt.compare.map(n=>D("li",{children:W(We,{href:V(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:at,children:[D(Yr,{product:n.product}),n.name]})},n.name))})]})]})]})]}),W("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[D(Cn,{}),D(We,{href:V("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:D(fu,{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 vu,motion as xu}from"framer-motion";import{useEffect as yu,useState as wu}from"react";import{jsx as Pi}from"react/jsx-runtime";var Si=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,n]=wu(!1);yu(()=>{n(!0)},[]);let c=r?xu.div:"div";return Pi(vu,{children:a?Pi(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Nu}from"class-variance-authority";import{toast as Cu}from"sonner";import{jsx as Bo,jsxs as Pu}from"react/jsx-runtime";var ku=Nu("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 ON({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[n,c]=ut(),s=o||ra;return Pu("button",{onClick:u=>{u.stopPropagation(),Cu.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(ku({variant:e}),r),type:"button",children:[Bo("span",{className:"sr-only",children:"Copy"}),n?Bo(la,{className:"h-3.5 w-3.5"}):Bo(s,{className:"h-3.5 w-3.5"})]})}import{toast as Su}from"sonner";import{jsx as Ru}from"react/jsx-runtime";function FN({value:e,children:t,className:r,successMessage:o}){let[a,n]=ut();return Ru("button",{onClick:c=>{c.stopPropagation(),Su.promise(n(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",a&&"cursor-default",r),children:t})}import{jsx as Tu,jsxs as Lu}from"react/jsx-runtime";function WN({icon:e,text:t}){return Lu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Tu("p",{className:"truncate text-sm",children:t})]})}import{jsx as Mu}from"react/jsx-runtime";var UN=({children:e})=>Mu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Wo}from"react/jsx-runtime";function ZN({apexDomain:e,className:t,imageProps:r}){return e?Wo(Ot,{src:`${ea}${e}`,alt:e,className:i("h-8 w-8 rounded-full sm:h-10 sm:w-10",t),width:20,height:20,draggable:!1,...r}):Wo("div",{className:i("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",t),children:Wo(Va,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Ri}from"lucide-react";import{useSearchParams as Du}from"next/navigation";import{useEffect as Eu,useMemo as Iu,useRef as Au}from"react";import Ou from"swr";import{useDebounce as zu}from"use-debounce";import{Fragment as Ti,jsx as j,jsxs as $e}from"react/jsx-runtime";function n6({defaultUrl:e}){let t=Du(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=zu(Jo(r),500),a=Iu(()=>Qo(o||""),[o]),{data:n,isValidating:c}=Ou(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,ge,{revalidateOnFocus:!1}),{title:s,description:u,image:l}=n||{},d=Au(null);Eu(()=>{!e&&d.current&&d.current.select()},[e]);let{isMobile:m}=Y();return $e(Ti,{children:[!e&&$e("div",{className:"relative flex items-center",children:[j(Ri,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("input",{ref:d,name:"url",id:"url",type:"url",autoFocus:!m,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&&j("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:j(kt,{})}),l?j("img",{src:l,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:[j(na,{className:"h-8 w-8 text-neutral-400"}),j("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?j("p",{className:"text-sm text-[#536471]",children:a}):j("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),s?j("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:s}):j("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),u?j("p",{className:"line-clamp-2 text-sm text-[#536471]",children:u}):$e("div",{className:"grid gap-2",children:[j("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),j("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function i6({defaultUrl:e}){return $e(Ti,{children:[$e("div",{className:"relative flex items-center",children:[j(Ri,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("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"})]}),j("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:j("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:j(kt,{})})})]})}import{AnimatePresence as Vu}from"framer-motion";import Li from"js-cookie";import{createContext as Hu,useState as _u}from"react";import{jsx as $o}from"react/jsx-runtime";var Fu=Hu({hidePopup:()=>{}});function p6({children:e,hiddenCookieId:t}){let[r,o]=_u(Li.get(t)==="1"),a=()=>{o(!0),Li.set(t,"1")};return $o(Si,{children:$o(Fu.Provider,{value:{hidePopup:a},children:$o(Vu,{children:!r&&e})})})}import{motion as Bu}from"framer-motion";import{jsx as Mi}from"react/jsx-runtime";function h6({value:e=0,max:t=100,className:r}){return Mi("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Mi(Bu.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 Ei}from"class-variance-authority";import{LayoutGroup as Wu,motion as $u}from"framer-motion";import Uu from"next/link";import{useId as Gu}from"react";import{jsx as Zt,jsxs as Di}from"react/jsx-runtime";var ju=Ei("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"}}),Ku=Ei("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function T6({variant:e,options:t,selected:r,onSelect:o,className:a}){let n=Gu();return Zt("div",{className:i("flex text-sm",a),children:Zt(Wu,{id:n,children:t.map(({id:c,label:s,href:u,target:l})=>{let d=c===r;return Di(u?Uu:"div",{className:"relative",href:u??"#",target:l??void 0,children:[Di("button",{type:"button",...o&&!u&&{onClick:()=>o(c)},className:i(ju({variant:e}),l==="_blank"&&"group flex items-center gap-1.5"),"data-selected":d,"aria-selected":d,children:[s,l==="_blank"&&Zt(ba,{className:"size-2.5"})]}),d&&Zt($u.div,{layoutId:"indicator",transition:{duration:.1},className:Ku({variant:e}),children:Zt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Uo,jsxs as Ii}from"react/jsx-runtime";var Yu=[{icon:ja,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Ta,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:_a,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Ua,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Ha,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function D6(){return Ii("div",{className:"p-3",children:[Uo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Uo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:Yu.map(({text:e,icon:t,href:r})=>Ii("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Uo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Ai,jsxs as Zu}from"react/jsx-runtime";function A6({className:e}){return Zu("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-6 w-auto text-black dark:text-white",e),children:[Ai("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"}),Ai("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{to as AUTOPLAY_DEFAULT_DELAY,ub as Accordion,Bi as AccordionContent,_i as AccordionItem,Fi as AccordionTrigger,D6 as AdvancedLinkFeaturesTooltip,pp as Africa,Pp as Airtm,Gi as Alert,Ki as AlertDescription,ji as AlertTitle,xp as Amazon,Ep as AndroidLogo,Se as AnimatedSizeContainer,Ip as AppleLogo,Ap as ArrowBoldUp,Op as ArrowRight,zp as ArrowTrendUp,Vp as ArrowTurnLeft,Hp as ArrowTurnRight2,ba as ArrowUpRight,_p as ArrowsOppositeDirectionX,Fp as ArrowsOppositeDirectionY,fp as Asia,_o as AuthButton,yb as Avatar,u3 as Background,ur as Badge,Bp as BadgeCheck,Wp as BadgeCheck2Fill,Bb as BadgeTooltip,$p as Bell,Up as Blog,Ot as BlurImage,Gp as Bolt,jp as BoltFill,Yp as Book2,or as Book2Fill,Zp as Book2Small,Kp as BookOpen,qp as Books2,Xp as BoxArchive,Jp as BracketsCurly,ha as BriefcaseFill,Qp as Brush,e0 as BulletList,va as BulletListFill,te as Button,Wb as ButtonTooltip,ii as COMPARE_PAGES,w3 as CUSTOMER_STORIES,t0 as Calculator,hn as Calendar,n0 as Calendar6,o0 as CalendarDays,r0 as CalendarIcon,a0 as CalendarRefresh,cp as CardAmex,dp as CardDiscover,u1 as CardList,mp as CardMastercard,up as CardVisa,i0 as Cards,s0 as CaretUpFill,Ps as Carousel,Ss as CarouselContent,Rs as CarouselItem,M1 as CarouselNavBar,Ls as CarouselNext,Ts as CarouselPrevious,F1 as CarouselThumbnail,_1 as CarouselThumbnails,Sp as CashApp,l0 as ChartActivity2,c0 as ChartArea2,d0 as ChartLine,yp as ChatGPT,xa as Check,ar as Check2,mt as Checkbox,ya as CheckboxCheckedFill,wa as CheckboxUnchecked,m0 as ChevronLeft,u0 as ChevronRight,Na as CircleCheck,p0 as CircleCheckFill,f0 as CircleDollar,g0 as CircleDotted,Ca as CircleHalfDottedCheck,ka as CircleHalfDottedClock,Pa as CircleInfo,b0 as CirclePercentage,h0 as CirclePlay,v0 as CirclePlayFill,x0 as CircleQuestion,y0 as CircleUser,Zr as CircleWarning,w0 as CircleXmark,N0 as Circles,C0 as Circles3,Si as ClientOnly,Sa as CloudUpload,k0 as Code,P0 as ColorPalette2,Ov as Combobox,A6 as CompositeLogo,S0 as ConnectedDots,T0 as ConnectedDots4,R0 as ConnectedDotsFill,L0 as Connections3,ra as Copy,ON as CopyButton,FN as CopyText,M0 as CreditCard,D0 as Crosshairs3,E0 as Crown,qu as CrownSmall,I0 as Cube,A0 as CubeSettings,O0 as CubeSettingsFill,z0 as CurrencyDollar,Ra as CursorRays,V0 as DatabaseKey,so as DatePickerContext,xx as DateRangePicker,H0 as Desktop,_0 as DiamondTurnRight,nr as DiamondTurnRightFill,F0 as Directions,B0 as Discount,W0 as Dots,Rx as DotsPattern,$0 as Download,it as DubAnalyticsIcon,Jt as DubApiIcon,Xu as DubCraftedShield,st as DubLinksIcon,lt as DubPartnersIcon,Yr as DubProductIcon,Cn as DubStatusBadge,U0 as Duplicate,pr as DynamicTooltipWrapper,Ta as Earth,G0 as EarthPosition,Sy as EditColumnsButton,Ox as EmptyState,j0 as Envelope,K0 as EnvelopeAlert,Y0 as EnvelopeArrowRight,La as EnvelopeFill,gp as Europe,oa as ExpandingArrow,Ma as Eye,Da as EyeSlash,Fr as FEATURES_LIST,tp as Facebook,Ea as FeatherFill,wp as Figma,Z0 as FileContent,jx as FileUpload,q0 as FileZip2,h2 as Filter,J0 as Filter2,X0 as FilterBars,ef as Flag2,Ia as Flag6,Q0 as FlagWavy,tf as Flask,rf as FlaskSmall,of as Folder,cf as Folder5,af as FolderBookmark,nf as FolderLock,sf as FolderPlus,lf as FolderShield,CN as Footer,k2 as Form,df as GamingConsole,mf as Gauge6,Aa as Gear,uf as Gear2,pf as Gear3,ff as Gem,Oa as Gift,gf as GiftFill,Np as GitHubEnhanced,Qt as Github,bf as Globe,Va as Globe2,za as GlobePointer,hf as GlobeSearch,ma as Go,rp as Google,Cp as GoogleEnhanced,vf as GreekTemple,qe as Grid,xf as GridIcon,yf as GridLayoutRows,wf as GridPlus,Nf as GripDotsVertical,Cf as Headset,kf as HeartFill,Pf as HexadecagonStar,Sf as History,Rf as Hyperlink,WN as IconMenu,Tf as Icosahedron,Ha as Incognito,Lf as InfinityIcon,_b as InfoTooltip,UN as InlineSnippet,Yc as Input,Mf as InputField,Df as InputPassword,_a as InputPasswordPointer,Fa as InputSearch,e4 as InputSelect,op as Instagram,Ef as InvoiceDollar,If as Key,on as KeyboardShortcutContext,Ph as KeyboardShortcutProvider,si as LEGAL_PAGES,gd as Label,Af as LayoutSidebar,Of as License,ir as LifeRing,zf as LinesY,Hf as Link4,Vf as LinkBroken,ZN as LinkLogo,n6 as LinkPreview,i6 as LinkPreviewPlaceholder,er as LinkedIn,Hb as LinkifyTooltipContent,kt as LoadingCircle,ep as LoadingDots,ke as LoadingSpinner,_f as LocationPin,Ff as Lock,Bf as LockFill,Ht as Logo,aa as Magic,Wf as Magnifier,$f as MapPosition,Ju as MarkdownIcon,Uf as MarketingTarget,Qu as MatrixLines,Br as MaxWidthWrapper,Gf as Menu3,u4 as MenuItem,jf as MessageSmile,sr as MicrophoneFill,N4 as MiniAreaChart,lr as Minus,Kf as MobilePhone,T4 as Modal,Yf as MoneyBill,Zf as MoneyBill2,qf as MoneyBills2,Xf as Msgs,Dw as Nav,zo as NavContext,jw as NavMobile,Wr as NavWordmark,bp as NorthAmerica,Jf as Note,ig as NucleoPhoto,O4 as NumberStepper,Fb as NumberTooltip,hp as Oceania,Qf as OfficeBuilding,ib as PLAN_FEATURE_ICONS,Ba as Page2,H4 as PaginationControls,eg as Paintbrush,tg as Palette2,rg as PaperPlane,Rp as Payoneer,Tp as Paypal,ag as Pen2,og as PenWriting,ng as PercentageArrowDown,na as Photo,ua as Php,sg as Plug2,ct as Plus,lg as Plus2,ve as Popover,p6 as Popup,Fu as PopupContext,cg as Post,ap as Prisma,ca as ProductHunt,h6 as ProgressBar,dg as Pyramid,pa as Python,mg as QRCode,_t as RESOURCES,Ad as RadioGroup,Od as RadioGroupItem,da as Raycast,ug as Receipt2,Wa as ReferredVia,pg as Refresh2,fg as Robot,fa as Ruby,Oo as SDKS,N3 as SOCIAL_LINKS,ni as SOLUTIONS,$a as SatelliteDish,gg as ScanText,bg as Scribble,j4 as Sheet,hg as ShieldAlert,vg as ShieldCheck,xg as ShieldKeyhole,yg as ShieldSlash,wg as ShieldUser,q4 as ShimmerDots,Ng as Shuffle,Vb as SimpleTooltipContent,np as Slack,Q4 as Slider,Cg as Sliders,oy as SmartDateTimePicker,ia as SortOrder,vp as SouthAmerica,kg as Sparkle3,kp as Spotify,Pg as SquareChart,Sg as SquareLayoutGrid5,Rg as SquareLayoutGrid6,Tg as SquareUserSparkle2,Lg as SquareXmark,Mg as Stars2,dy as StatusBadge,Lp as Stripe,Mp as StripeLink,sa as Success,vy as Switch,_g as TV,T6 as TabSelect,qy as Table,Dg as TableIcon,Eg as TableRows2,Ig as Tablet,Ag as Tag,Og as Tags,la as Tick,ip as TikTok,Ua as Timer2,sp as Tinybird,Ga as Toggle2Fill,r3 as ToggleGroup,zg as Toggles,wb as TokenAvatar,Q as Tooltip,zb as TooltipContent,Ob as TooltipProvider,Vg as Trash,Hg as TriangleWarning,tr as Twitter,ga as Typescript,d3 as UTMBuilder,Nm as UTM_PARAMETERS,Fg as UiCard,lp as Unsplash,Bg as User,Wg as UserCheck,$g as UserCrown,Ug as UserDelete,Gg as UserFocus,jg as UserMinus,Kg as UserPlus,Yg as UserXmark,Zg as Users,Xg as Users2,Jg as Users6,Pt as UsersFill,qg as UsersSettings,Dp as Venmo,Qg as Versions2,ja as Views,eb as Watch,tb as Webhook,rb as Window,ob as WindowSearch,ab as WindowSettings,Ci as Wordmark,nb as Xmark,rr as YouTube,Ji as badgeVariants,se as buttonVariants,qi as getUserAvatarUrl,Co as menuItemVariants,Vo as navItems,Jd as statusBadgeVariants,he as useCarousel,Qa as useCarouselActiveIndex,Z1 as useColumnVisibility,Q1 as useCookies,ut as useCopyToClipboard,ah as useCurrentAnchor,lh as useEnterSubmit,uh as useInViewport,gh as useInputFocused,xh as useIntersectionObserver,Ie as useKeyboardShortcut,oo as useLocalStorage,Y as useMediaQuery,Mh as useOptimisticUpdate,Wh as usePagination,Gh as useRemoveGAParams,gr as useResizeObserver,sn as useRouterStuff,dn as useScroll,Ae as useScrollProgress,Zy as useTable,nn as useTablePagination,iv as useToastWithUndo};
|