@dub/ui 0.2.63 → 0.2.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client"
2
- import{$ as Ip,$a as Ra,$b as mf,$c as tg,$d as Zg,A as pp,Aa as a0,Ab as U0,Ac as Af,Ad as kg,B as fp,Ba as n0,Bb as G0,Bc as Of,Bd as Pg,C as gp,Ca as i0,Cb as j0,Cc as zf,Cd as Sg,D as or,Da as ya,Db as sr,Dc as Ba,Dd as Rg,E as bp,Ea as s0,Eb as K0,Ec as Vf,Ed as Tg,F as ar,Fa as l0,Fb as Y0,Fc as Hf,Fd as Lg,G as hp,Ga as Na,Gb as Z0,Gc as _f,Gd as Mg,H as vp,Ha as c0,Hb as q0,Hc as $a,Hd as Dg,I as xp,Ia as d0,Ib as X0,Ic as Ua,Id as Eg,J as yp,Ja as m0,Jb as Ea,Jc as Ff,Jd as Ig,K as fa,Ka as u0,Kb as J0,Kc as Wf,Kd as Ag,L as ga,La as p0,Lb as Q0,Lc as Bf,Ld as Og,M as ba,Ma as f0,Mb as ef,Mc as $f,Md as zg,N as ha,Na as g0,Nb as tf,Nc as lr,Nd as Vg,O as va,Oa as b0,Ob as Ia,Oc as Uf,Od as Hg,P as Np,Pa as h0,Pb as Aa,Pc as Gf,Pd as _g,Q as wp,Qa as v0,Qb as Oa,Qc as jf,Qd as Fg,R as Cp,Ra as wa,Rb as za,Rc as Kf,Rd as Wg,S as kp,Sa as ir,Sb as rf,Sc as Yf,Sd as Bg,T as Pp,Ta as Ca,Tb as of,Tc as Zf,Td as $g,U as Sp,Ua as ka,Ub as af,Uc as qf,Ud as Ya,V as Rp,Va as x0,Vb as nf,Vc as Xf,Vd as Za,W as Tp,Wa as y0,Wb as sf,Wc as Jf,Wd as Ug,X as Lp,Xa as Pa,Xb as lf,Xc as Qf,Xd as Gg,Y as Mp,Ya as Sa,Yb as Va,Yc as eg,Yd as jg,Z as Dp,Za as N0,Zb as cf,Zc as cr,Zd as Kg,_ as Ep,_a as w0,_b as df,_c as dr,_d as Yg,a as op,aa as Ap,ab as Ta,ac as uf,ad as rg,ae as qg,b as sa,ba as Op,bb as La,bc as pf,bd as og,be as Xg,c as ap,ca as zp,cb as C0,cc as ff,cd as ag,ce as Jg,d as lt,da as Vp,db as k0,dc as gf,dd as ng,de as Qg,e as er,ea as Hp,eb as P0,ec as bf,ed as ig,ee as eb,f as np,fa as _p,fb as S0,fc as hf,fd as sg,fe as tb,g as ct,ga as Fp,gb as R0,gc as vf,gd as Ga,ge as rb,h as dt,ha as Wp,hb as qr,hc as Ha,hd as lg,he as ob,i as Zr,ia as Bp,ib as T0,ic as xf,id as cg,ie as ab,j as la,ja as $p,jb as L0,jc as yf,jd as dg,je as Rt,k as ip,ka as Up,kb as M0,kc as Nf,kd as mg,ke as nb,l as ca,la as Gp,lb as Ma,lc as _a,ld as ug,le as ib,m as sp,ma as jp,mb as D0,mc as wf,md as pg,me as sb,n as lp,na as xa,nb as E0,nc as Cf,nd as fg,ne as lb,o as da,oa as Kp,ob as I0,oc as Fa,od as gg,oe as qa,p as ma,pa as Yp,pb as A0,pc as kf,pd as mt,pe as cb,q as ua,qa as Zp,qb as O0,qc as Wa,qd as bg,qe as db,r as pa,ra as qp,rb as z0,rc as Pf,rd as hg,re as mb,s as St,sa as Xp,sb as V0,sc as Sf,sd as vg,se as ub,t as cp,ta as Jp,tb as H0,tc as Rf,td as xg,te as pb,u as Pe,ua as Qp,ub as _0,uc as Tf,ud as yg,ue as fb,v as dp,va as e0,vb as F0,vc as Lf,vd as ja,ve as gb,w as tr,wa as t0,wb as W0,wc as Mf,wd as Ng,x as mp,xa as r0,xb as B0,xc as Df,xd as wg,y as up,ya as nr,yb as $0,yc as Ef,yd as Ka,z as rr,za as o0,zb as Da,zc as If,zd as Cg}from"./chunk-G5GFXTXL.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as Kr,b as kt,c as qo,d as Xo,e as Pt,f as Jo,g as Qo,h as be,i as Ke,j as i,k as Yr,l as ea,m as _,n as ta,o as ke,p as ra,q as oa,r as aa,s as Jt,t as Qt,u as na,v as ia}from"./chunk-7HQBUAV4.mjs";import*as ie from"@radix-ui/react-accordion";import{ChevronDown as Wi}from"lucide-react";import*as ur from"react";import{jsx as mr,jsxs as Gi}from"react/jsx-runtime";var Nb=ie.Root,Bi=ur.forwardRef(({className:e,...t},r)=>mr(ie.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Bi.displayName="AccordionItem";var $i=ur.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let n=r==="chevron"?Wi:mt;return mr(ie.Header,{className:"flex",children:Gi(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,mr(n,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});$i.displayName=ie.Trigger.displayName;var Ui=ur.forwardRef(({className:e,children:t,...r},o)=>mr(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}));Ui.displayName=ie.Content.displayName;import{cva as ji}from"class-variance-authority";import*as pr from"react";import{jsx as Xr}from"react/jsx-runtime";var Ki=ji("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"}}),Yi=pr.forwardRef(({className:e,variant:t,...r},o)=>Xr("div",{ref:o,role:"alert",className:i(Ki({variant:t}),e),...r}));Yi.displayName="Alert";var Zi=pr.forwardRef(({className:e,...t},r)=>Xr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Zi.displayName="AlertTitle";var qi=pr.forwardRef(({className:e,...t},r)=>Xr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));qi.displayName="AlertDescription";import{sha256 as Xi}from"js-sha256";import{useState as Ji}from"react";import{jsx as Jr}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/${Xi(e.email)}?d=${t}`:t}function Lb({user:e={},className:t}){if(!e)return Jr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ji(Qi(e));return Jr("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 Mb({id:e,className:t}){return Jr("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 es}from"class-variance-authority";import{jsx as rs}from"react/jsx-runtime";var ts=es("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 fr({className:e,variant:t,...r}){return rs("span",{className:i(ts({variant:t}),e),...r})}import{cva as ls}from"class-variance-authority";import{forwardRef as cs}from"react";import*as he from"@radix-ui/react-tooltip";import os from"linkify-react";import{HelpCircle as as}from"lucide-react";import ns from"next/link";import{useState as is}from"react";import{Fragment as ss,jsx as U,jsxs as Ye}from"react/jsx-runtime";function Ub({children:e}){return U(he.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[m,d]=is(!1);return Ye(he.Root,{open:o?!1:m,onOpenChange:d,delayDuration:c,disableHoverableContent:n,children:[U(he.Trigger,{asChild:!0,onClick:()=>{d(!0)},onBlur:()=>{d(!1)},children:e}),U(he.Portal,{children:U(he.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:d}):t})})]})}function Gb({title:e,cta:t,href:r,target:o,onClick:a}){return Ye("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(ns,{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 jb({title:e,cta:t,href:r}){return Ye("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&Ye(ss,{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 Kb({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(os,{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 Yb(e){return U(Q,{...e,children:U(as,{className:"h-4 w-4 text-neutral-500"})})}function Zb({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(Q,{content:Ye("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Ye("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Qt(e||0,{full:!0})," ",t]}),a&&Ye("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Qo(a,{withAgo:!0})]})]}),children:o})}function qb({children:e,content:t,...r}){return U(Q,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(fr,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function Xb({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 ut({children:e,tooltipProps:t}){return t?U(Q,{...t,children:U("div",{children:e})}):e}import{jsx as pt,jsxs as Xa}from"react/jsx-runtime";var se=ls("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=cs(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:n,icon:c,shortcut:s,disabledTooltip:m,right:d,...l},u)=>m?pt(Q,{content:m,children:Xa("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&&pt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&pt("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})]})}):Xa("button",{ref:u,type:l.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",l.disabled||n?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":se({variant:t}),r),disabled:l.disabled||n,...l,children:[n?pt(Pe,{}):c||null,e&&pt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&pt("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}),d]}));te.displayName="Button";import{cva as ds}from"class-variance-authority";import{createContext as ms}from"react";import{jsx as Ja}from"react/jsx-runtime";var us=ds("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"}}}),Tt=ms({variant:"loose",loading:!1});function Qa({variant:e="loose",loading:t=!1,className:r,children:o}){return Ja("ul",{className:i(us({variant:e,loading:t}),r),"data-variant":e,children:Ja(Tt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as ps}from"class-variance-authority";import{createContext as fs,useContext as gs,useEffect as bs,useRef as hs,useState as vs}from"react";import{jsx as en,jsxs as Ns}from"react/jsx-runtime";var xs=ps("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"}}}),ys="w-full py-2.5 px-4",Qr=fs({hovered:!1});function tn({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:n=!0,banner:c}){let{variant:s}=gs(Tt),m=hs(null),[d,l]=vs(!1);bs(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var f;((f=m.current)==null?void 0:f.matches(":hover"))===!1&&l(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||Ke(p));return Ns("li",{ref:m,className:i(xs({variant:s}),e),onPointerEnter:()=>l(!0),onPointerLeave:()=>l(!1),"data-hover-state-enabled":n,children:[c,en("div",{className:i(ys,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:en(Qr.Provider,{value:{hovered:d},children:r})})]})}var N1=Object.assign(Qa,{Card:Object.assign(tn,{Context:Qr}),Context:Tt});import{motion as ul}from"framer-motion";import{forwardRef as pl,useRef as fl}from"react";import{useEffect as ws,useState as Cs}from"react";function rn(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function eo(e,t){let[r,o]=Cs(rn(e)??t);return ws(()=>{let n=rn(e);n&&o(n)},[e]),[r,n=>{o(n),window.localStorage.setItem(e,JSON.stringify(n))}]}function ks(e){return e&&typeof e=="object"&&Array.isArray(e.all)&&Array.isArray(e.defaultVisible)}function S1(e,t){if(!ks(t)){let o=t,a=m=>{let d=o[m];return Object.fromEntries(d.all.map(l=>[l,d.defaultVisible.includes(l)]))},n=Object.fromEntries(Object.keys(o).map(m=>[m,a(m)])),[c,s]=eo(e,n);return{columnVisibility:c,setColumnVisibility:(m,d)=>{let l=o[m].all,u=c[m]||{},p=Object.fromEntries(l.map(f=>[f,f in d?d[f]:u[f]??!1]));s({...c,[m]:p})}}}else{let o=t,a=Object.fromEntries(o.all.map(s=>[s,o.defaultVisible.includes(s)])),[n,c]=eo(e,a);return{columnVisibility:n,setColumnVisibility:s=>{let m=o.all,d=n||{},l=Object.fromEntries(m.map(u=>[u,u in s?s[u]:d[u]??!1]));c(l)}}}}import to from"js-cookie";import{useEffect as Ps,useState as Ss}from"react";function M1(e,t,r){let[o,a]=Ss(()=>{let c=to.get(e);return c?JSON.parse(c):t});return Ps(()=>{let c=()=>{let s=to.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),to.set(e,JSON.stringify(c),r)}]}import{useCallback as Rs,useEffect as Ts,useRef as Ls,useState as Ms}from"react";var ft=(e=3e3)=>{let t=Ls(null),[r,o]=Ms(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},n=Rs(async(c,{onSuccess:s,throwOnError:m}={})=>{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(d){if(console.error("Failed to copy: ",d),m)throw d}},[e]);return Ts(()=>()=>a(),[]),[r,n]};import{useEffect as Ds,useState as Es}from"react";function O1(){let[e,t]=Es(null);return Ds(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var u,p,f;let m=s[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let g=1;g<s.length;g++){let h=s[g];if(!h)break;(h.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=h)}let l=m.target;for(;l&&l.getBoundingClientRect().bottom<o;)l=(p=n.get(l))==null?void 0:p.next;for(;l&&l.getBoundingClientRect().top>d;)l=(f=n.get(l))==null?void 0:f.prev;l&&t(l.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{useEffect as Is,useState as As}from"react";function _1(){let[e,t]=As(null);return Is(()=>{let r=window.location.hostname;ta.has(r)?t("app"):oa.has(r)?t("partners"):ra.has(r)&&t("admin")},[]),{subdomain:e}}import{useCallback as Os}from"react";function $1(e){return{handleKeyDown:Os(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 zs,useState as Vs}from"react";function K1(e,t={}){let{root:r,defaultValue:o}=t,[a,n]=Vs(o??!1);return zs(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,l=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};n(l.top<u.bottom&&l.bottom>u.top&&l.left<u.right&&l.right>u.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 Hs,useState as _s}from"react";function q1(){let[e,t]=_s(!1);return Hs(()=>{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 Fs,useState as Ws}from"react";function eh(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[n,c]=Ws(),s=(n==null?void 0:n.isIntersecting)&&a,m=([d])=>{c(d)};return Fs(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!d)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(d),()=>p.disconnect()},[e,JSON.stringify(t),r,o,s]),n}import{createContext as Bs,useCallback as $s,useContext as Us,useEffect as on,useId as Gs,useState as js}from"react";import{jsx as Ks}from"react/jsx-runtime";var an=Bs({listeners:[],setListeners:()=>{}});function ih({children:e}){let[t,r]=js([]);return Ks(an.Provider,{value:{listeners:t,setListeners:r},children:e})}function Ie(e,t,r={}){let o=Gs(),{listeners:a,setListeners:n}=Us(an),c=$s(s=>{if(r.enabled===!1)return;let m=s.target,d=document.getElementById("modal-backdrop"),l=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!l!=!!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(g=>g.enabled!==!1&&!!d==!!g.modal&&!!l==!!g.sheet&&(Array.isArray(g.key)?g.key.includes(u):g.key===u));!p.length||Jo(p,(g,h)=>(h.priority??0)-(g.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);on(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),on(()=>(n(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>n(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{toast as Ys}from"sonner";import Zs from"swr";function mh(e,t){let{data:r,isLoading:o,mutate:a}=Zs(e,be);return{data:r,isLoading:o,update:async(n,c)=>Ys.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 cn,useMemo as tl}from"react";import{useEffect as nn,useState as qs}from"react";function sn({pageSize:e,page:t,onPageChange:r}){let[o,a]=qs({pageIndex:t,pageSize:e});return nn(()=>{a(n=>({...n,pageIndex:t}))},[t]),nn(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Xs,useRouter as Js,useSearchParams as Qs}from"next/navigation";import{useCallback as el}from"react";function ln(){let e=Xs(),t=Js(),r=Qs(),o=Object.fromEntries(r),a=(c,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let l=new URLSearchParams;r.forEach((u,p)=>{var f;(f=s.include)!=null&&f.includes(p)&&l.set(p,u)}),m=l}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(l=>m.delete(l)),c&&Object.entries(c).forEach(([l,u])=>m.set(l,u));let d=m.toString();return d.length>0?`?${d}`:""},n=el(({set:c,del:s,replace:m,scroll:d=!0,getNewPath:l,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([h,v])=>p.set(h,Array.isArray(v)?v.join(u):v)),s&&(Array.isArray(s)?s.forEach(h=>p.delete(h)):p.delete(s));let f=p.toString(),g=`${e}${f.length>0?`?${f}`:""}`;if(l)return g;m?t.replace(g,{scroll:!1}):t.push(g,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:n,getQueryString:a}}function Ch(e=ia){let{searchParams:t,queryParams:r}=ln(),o=tl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:n}=sn({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return cn(()=>{let c=parseInt(t.get("page")||"1")||1;n(s=>({...s,pageIndex:c}))},[t.get("page")]),cn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:n}}import{useEffect as rl}from"react";function Sh(){rl(()=>{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 ol,useState as al}from"react";function gr(e){let[t,r]=al(),o=([a])=>{r(a)};return ol(()=>{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 dn,useState as il}from"react";function mn(e,{container:t}={}){let[r,o]=il(!1),a=nl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return dn(()=>{let n=(t==null?void 0:t.current)??window;return n.addEventListener("scroll",a),()=>n.removeEventListener("scroll",a)},[a]),dn(()=>{a()},[a]),r}import{useCallback as sl,useEffect as ll,useState as cl}from"react";function Ae(e){let[t,r]=cl(1),o=sl(()=>{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 ll(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as dl}from"react";import{toast as pn}from"sonner";import{jsx as br,jsxs as un}from"react/jsx-runtime";function ml({id:e,message:t,undo:r}){let o=()=>{r(),pn.dismiss(e)},a=n=>{n.key==="z"&&(n.ctrlKey||n.metaKey)&&o()};return dl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),un("div",{className:"flex w-full items-center justify-between space-x-2",children:[un("div",{className:"flex items-center space-x-2",children:[br(ua,{}),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 Wh(){return({id:t,message:r,undo:o,duration:a})=>pn(br(ml,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as fn}from"react/jsx-runtime";var pe=pl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...n},c)=>{var d,l;let s=fl(null),m=gr(s);return fn(ul.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((l=m==null?void 0:m.contentRect)==null?void 0:l.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...n,children:fn("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});pe.displayName="AnimatedSizeContainer";import{jsx as Se,jsxs as gn}from"react/jsx-runtime";function Qh({options:e,value:t,onChange:r,className:o,gridCols:a="2",name:n,disabled:c=!1,animated:s=!0}){let m={1:"grid-cols-1",2:"grid-cols-1 lg:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}[a],d=Se("div",{className:i("grid gap-3",m),children:e.map(({key:l,label:u,description:p,icon:f})=>{let g=t===l;return gn("label",{className:i("relative flex w-full cursor-pointer items-start rounded-md border border-neutral-200 bg-white text-neutral-600 hover:bg-neutral-50","transition-all duration-150",g&&"border-black bg-neutral-50 text-neutral-900 ring-1 ring-black",c&&"cursor-not-allowed opacity-50",o),children:[Se("input",{type:"radio",name:n,value:l,className:"hidden",checked:g,disabled:c,onChange:h=>{h.target.checked&&r&&r(l)}}),f&&Se("div",{className:"flex-shrink-0 pt-0.5",children:f}),gn("div",{className:"flex grow flex-col p-3 pr-0",children:[Se("span",{className:"pr-1 text-sm font-semibold text-neutral-900",children:u}),Se("span",{className:"text-xs text-neutral-600",children:p})]}),Se(Sa,{className:i("mr-1.5 mt-1.5 flex size-4 scale-75 items-center justify-center rounded-full opacity-0 transition-[transform,opacity] duration-150",g&&"scale-100 opacity-100")})]},l)})});return s?Se("div",{className:"-m-1",children:Se(pe,{height:!0,transition:{ease:"easeInOut",duration:.2},children:Se("div",{className:"p-1",children:d})})}):d}import gl from"embla-carousel-autoplay";import bl from"embla-carousel-react";import{ArrowLeft as hl,ArrowRight as vl}from"lucide-react";import{createContext as xl,forwardRef as Mt,useCallback as Lt,useContext as yl,useEffect as ro,useState as oo}from"react";import{jsx as Re,jsxs as vn}from"react/jsx-runtime";var ao=2e3,bn=xl(null);function ve(){let e=yl(bn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function hn(){let{api:e}=ve(),[t,r]=oo(0),o=Lt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return ro(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Nl=Mt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:n,children:c,...s},m)=>{let[d,l]=bl({...t,axis:e==="horizontal"?"x":"y"},[...o?[gl(typeof o=="object"?o:{delay:ao})]:[],...a||[]]),[u,p]=oo(!1),[f,g]=oo(!1),h=Lt(N=>{!N||(p(N.canScrollPrev()),g(N.canScrollNext()))},[]),v=Lt(()=>{l==null||l.scrollPrev()},[l]),y=Lt(()=>{l==null||l.scrollNext()},[l]),w=Lt(N=>{N.key==="ArrowLeft"?(N.preventDefault(),v()):N.key==="ArrowRight"&&(N.preventDefault(),y())},[v,y]);return ro(()=>{!l||!r||r(l)},[l,r]),ro(()=>{if(!!l)return h(l),l.on("reInit",h),l.on("select",h),()=>{l==null||l.off("select",h)}},[l,h]),Re(bn.Provider,{value:{carouselRef:d,api:l,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:y,canScrollPrev:u,canScrollNext:f},children:Re("div",{ref:m,onKeyDownCapture:w,className:i("relative",n),role:"region","aria-roledescription":"carousel",...s,children:c})})});Nl.displayName="Carousel";var wl=Mt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=ve();return Re("div",{ref:o,className:"overflow-hidden",children:Re("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});wl.displayName="CarouselContent";var Cl=Mt(({className:e,...t},r)=>{let{orientation:o}=ve();return Re("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})});Cl.displayName="CarouselItem";var kl=Mt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:n}=ve();return vn("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:[Re(hl,{className:"h-4 w-4"}),Re("span",{className:"sr-only",children:"Previous slide"})]})});kl.displayName="CarouselPrevious";var Pl=Mt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:n}=ve();return vn("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:[Re(vl,{className:"h-4 w-4"}),Re("span",{className:"sr-only",children:"Next slide"})]})});Pl.displayName="CarouselNext";import{cva as Sl}from"class-variance-authority";import{motion as Rl}from"framer-motion";import{ChevronLeft as Tl,ChevronRight as Ll}from"lucide-react";import*as Oe from"react";import{jsx as Ze,jsxs as Dt}from"react/jsx-runtime";var Ml=Sl("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 "}}}),hv=({variant:e="simple",className:t})=>{var g;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:n,api:c}=ve(),s=(g=c==null?void 0:c.plugins())==null?void 0:g.autoplay,[m,d]=Oe.useState(0),[l,u]=Oe.useState(!1),p=Oe.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),f=Oe.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return Oe.useEffect(()=>{!c||(p(c),u((s==null?void 0:s.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,s,p]),Dt("div",{className:i(Ml({variant:e}),t),children:[e!=="simple"&&Dt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!n,onClick:f(o),children:[Ze(Tl,{className:"h-4 w-4"}),Ze("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ze("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,v)=>Dt("button",{onClick:f(()=>c.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ze("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===m?"bg-black":"bg-black/20",l&&v===m&&"w-6 bg-black/20"),children:l&&v===m&&Ze(Rl.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??ao)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Dt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Dt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:f(r),children:[Ze(Ll,{className:"h-4 w-4"}),Ze("span",{className:"sr-only",children:"Next slide"})]})]})};import Dl from"embla-carousel-react";import{forwardRef as El,useCallback as Il,useEffect as Al}from"react";import{jsx as hr}from"react/jsx-runtime";var Sv=({className:e,...t})=>{let{api:r}=ve(),[o,a]=Dl({dragFree:!0}),n=Il(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Al(()=>{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]),hr("div",{className:"overflow-hidden",ref:o,children:hr("div",{className:i("mx-4 flex gap-4",e),...t})})},Rv=El(({index:e,className:t,...r},o)=>{let{api:a}=ve(),n=hn();return hr("div",{ref:o,children:hr("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 Et from"@radix-ui/react-checkbox";import{forwardRef as Ol}from"react";import{jsx as no,jsxs as zl}from"react/jsx-runtime";var gt=Ol(({className:e,...t},r)=>no(Et.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:zl(Et.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[no(ir,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),no(dr,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));gt.displayName=Et.Root.displayName;import{Command as At,CommandInput as Vl,CommandItem as Hl,useCommandState as _l}from"cmdk";import{ChevronDown as Fl}from"lucide-react";import{forwardRef as Wl,isValidElement as Bl,useCallback as $l,useEffect as xr,useRef as Ul,useState as It}from"react";import*as ze from"@radix-ui/react-popover";import{Drawer as bt}from"vaul";import{jsx as Te,jsxs as vr}from"react/jsx-runtime";function xe({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:n,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:d,sticky:l,onEscapeKeyDown:u,onWheel:p}){let{isMobile:f}=Y();return c||f?vr(bt.Root,{open:a,onOpenChange:n,children:[Te(bt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),vr(bt.Portal,{children:[Te(bt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),vr(bt.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:g=>{g.target instanceof Element&&g.target.closest("[data-sonner-toast]")&&g.preventDefault()},children:[Te("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Te("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Te("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})]}),Te(bt.Overlay,{})]})]}):vr(ze.Root,{open:a,onOpenChange:n,children:[Te(ze.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Te(ze.Portal,{children:Te(ze.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:l,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as yr,jsx as E,jsxs as Le}from"react/jsx-runtime";function Gl(e,t){return e===!0}function Qv({multiple:e,selected:t,setSelected:r,onSelect:o,options:a,icon:n,placeholder:c="Select...",searchPlaceholder:s="Search...",emptyState:m,createLabel:d,onCreate:l,buttonProps:u,shortcutHint:p,caret:f,side:g,open:h,onOpenChange:v,onSearchChange:y,shouldFilter:w=!0,inputRight:N,inputClassName:k,optionRight:C,optionClassName:A,matchTriggerWidth:W,hideSearch:T=!1,children:P}){let G=Gl(e,r),x=Array.isArray(t)?t:t?[t]:[],{isMobile:S}=Y(),[R,L]=It(!1),X=h??R,M=v??L,[ge,Ur]=It(""),[Ko,Gr]=It(!1),[jr,Hi]=It(void 0),[_i,Yo]=It(!1),Fi=V=>{var st;if(o==null||o(V),!!r)if(G){let Ge=x.some(({value:je})=>je===V.value);r(Ge?x.filter(({value:je})=>je!==V.value):[...x,V])}else r(x.length&&((st=x[0])==null?void 0:st.value)===V.value?null:V),M(!1)},Zo=$l((V,st)=>st===""?[...V.filter(Ge=>Ge.first&&!x.some(je=>je.value===Ge.value)),...x,...V.filter(Ge=>!Ge.first&&!x.some(je=>je.value===Ge.value))]:V,[x]);return xr(()=>{Ko&&(Hi(a&&Zo(a,ge)),Gr(!1))},[Ko,a,Zo,ge]),xr(()=>{Gr(!0)},[a]),xr(()=>{X||(Ur(""),Gr(!0))},[X]),xr(()=>y==null?void 0:y(ge),[ge]),E(xe,{openPopover:X,setOpenPopover:M,align:"start",side:g,onWheel:V=>{V.stopPropagation()},popoverContentClassName:i(W&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(pe,{width:!S&&!W,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Le(At,{loop:!0,shouldFilter:w,children:[!T&&Le("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Vl,{placeholder:s,value:ge,onValueChange:Ur,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:V=>{(V.key==="Escape"||V.key==="Backspace"&&!ge)&&(V.preventDefault(),V.stopPropagation(),M(!1))}}),N&&E("div",{className:"mr-2",children:N}),p&&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:p})]}),E(jl,{children:E(At.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:jr!==void 0?Le(yr,{children:[jr.map(V=>E(Kl,{option:V,multiple:G,selected:x.some(({value:st})=>st===V.value),onSelect:()=>Fi(V),right:C==null?void 0:C(V),className:A},`${V.label}, ${V.value}`)),ge.length>0&&l&&Le(Hl,{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",A),onSelect:async()=>{Yo(!0),await(l==null?void 0:l(ge))&&(Ur(""),M(!1)),Yo(!1)},children:[_i?E(Pe,{className:"size-4 shrink-0"}):E(mt,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(d==null?void 0:d(ge))||`Create "${ge}"`})]}),w?E(Zl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:m||"No matches"}):jr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:m||"No matches"}):null]}):E(At.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Pe,{})})})})})]})}),children:E(te,{variant:"secondary",...u,className:i(u==null?void 0:u.className,"flex gap-2"),textWrapperClassName:i(u==null?void 0:u.textWrapperClassName,"w-full flex items-center justify-start"),text:Le(yr,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:P||x.map(V=>V.label).join(", ")||c}),f&&(f===!0?E(Fl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:n?xn(n)?n:E(n,{className:"size-4 shrink-0"}):void 0})})}var jl=({children:e})=>{let t=Ul(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Le(yr,{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 Kl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:n}){return Le(yr,{children:[E(Yl,{disabledTooltip:e.disabledTooltip,children:Le(At.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&&E("div",{className:"shrink-0 text-neutral-600",children:o?E(Ca,{className:"size-4 text-neutral-600"}):E(ka,{className:"size-4 text-neutral-400"})}),Le("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:xn(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(ir,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(At.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Yl=({children:e,disabledTooltip:t})=>t?E(Q,{content:t,children:E("div",{children:e})}):e,xn=e=>Bl(e),Zl=Wl((e,t)=>_l(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Nr,format as ql,isSameMonth as Xl}from"date-fns";import{ChevronLeft as yn,ChevronRight as Nn,ChevronsLeft as Jl,ChevronsRight as Ql}from"lucide-react";import{forwardRef as ec,useRef as tc}from"react";import{DayPicker as rc,useDayPicker as oc,useDayRender as ac,useNavigation as nc}from"react-day-picker";import{Fragment as ic,jsx as oe,jsxs as wr}from"react/jsx-runtime";var Ot=ec(({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"})}));Ot.displayName="NavigationButton";function wn({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:n,className:c,classNames:s,...m}){return oe(rc,{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(yn,{className:"h-4 w-4"}),IconRight:()=>oe(Nn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:l,nextMonth:u,previousMonth:p,currentMonth:f,displayMonths:g}=nc(),{numberOfMonths:h,fromDate:v,toDate:y}=oc(),w=g.findIndex(P=>Xl(d.displayMonth,P)),N=w===0,k=w===g.length-1,C=h>1&&(N||!k),A=h>1&&(k||!N),W=()=>{let P=Nr(f,-1);p&&(!v||P.getTime()>=v.getTime())&&l(P)},T=()=>{let P=Nr(f,1);u&&(!y||P.getTime()<=y.getTime())&&l(P)};return wr("div",{className:"flex items-center justify-between",children:[wr("div",{className:"flex items-center gap-1",children:[o&&!A&&oe(Ot,{disabled:a||!p||v&&Nr(f,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:W,icon:Jl}),!A&&oe(Ot,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&l(p),icon:yn})]}),oe("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:ql(d.displayMonth,"LLLL yyy",{locale:n})}),wr("div",{className:"flex items-center gap-1",children:[!C&&oe(Ot,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&l(u),icon:Nn}),o&&!C&&oe(Ot,{disabled:a||!u||y&&Nr(f,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:T,icon:Ql})]})]})},Day:({date:d,displayMonth:l})=>{let u=tc(null),{activeModifiers:p,buttonProps:f,divProps:g,isButton:h,isHidden:v}=ac(d,l,u),{selected:y,today:w,disabled:N,range_middle:k}=p;if(v)return oe(ic,{});if(!h)return oe("div",{...g,className:i("flex items-center justify-center",g.className)});let{children:C,...A}=f;return wr("button",{ref:u,...A,type:"button",children:[C,w&&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":!y,"!bg-white":y,"!bg-blue-400":y&&k,"text-neutral-400":N})})]})}},...m})}import{enUS as hc}from"date-fns/locale";import{useEffect as uo,useMemo as kn,useRef as vc,useState as kr}from"react";import{Command as io}from"cmdk";import{Lock as sc}from"lucide-react";import{jsx as qe,jsxs as lc}from"react/jsx-runtime";var so=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,n=d=>"date"in d,c=(d,l)=>d.getDate()===l.getDate()&&d.getMonth()===l.getMonth()&&d.getFullYear()===l.getFullYear(),s=(d,l)=>{let u=d.from,p=l.from,f=!1;u&&p&&c(u,p)&&(f=!0);let g=d.to,h=l.to,v=!1;return g&&h&&c(g,h)&&(v=!0),f&&v},m=d=>{if(o)return o===d.id;if(a(d)){let l=r;return l&&s(l,d.dateRange)}else if(n(d)){let l=r;return l&&c(l,d.date)}return!1};return qe(io,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:qe(io.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,l)=>lc(io.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.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(d)&&"font-semibold text-neutral-800"),children:[qe("span",{children:d.label}),d.requiresUpgrade?qe(sc,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?qe("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&qe(Q,{side:"bottom",content:d.tooltipContent,children:qe("div",{className:"absolute inset-0 cursor-not-allowed"})})]},l))})})};so.displayName="DatePicker.Presets";import{format as Ve}from"date-fns";import{createContext as cc}from"react";var lo=cc({isOpen:!1,setIsOpen:()=>{}}),dc=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},co=(e,t,r=!1)=>{let o=!dc(),a;return r?a=o?Ve(e,"d MMM, yyyy h:mm a",{locale:t}):Ve(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ve(e,"d MMM, yyyy",{locale:t}),a},Cn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:n,fromDay:c,toDay:s}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(l=>{var u,p,f,g,h,v;if("date"in l){let y=l.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${l.label} is before fromYear ${m}.`);if(r&&y>r)throw new Error(`Preset ${l.label} is after toYear ${d}.`);if(a&&l.date.getMonth()<a.getMonth())throw new Error(`Preset ${l.label} is before fromMonth ${a}.`);if(n&&l.date.getMonth()>n.getMonth())throw new Error(`Preset ${l.label} is after toMonth ${n}.`);if(c&&l.date.getDate()<c.getDate())throw new Error(`Preset ${l.label} is before fromDay ${c}.`);if(s&&l.date.getDate()>s.getDate())throw new Error(`Preset ${l.label} is after toDay ${Ve(s,"MMM dd, yyyy")}.`)}if("dateRange"in l){let y=(u=l.dateRange.from)==null?void 0:u.getFullYear(),w=(p=l.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${l.label}'s 'from' is before fromYear ${m}.`);if(w&&r&&w>r)throw new Error(`Preset ${l.label}'s 'to' is after toYear ${d}.`);if(a){let N=(f=l.dateRange.from)==null?void 0:f.getMonth();if(N&&N<a.getMonth())throw new Error(`Preset ${l.label}'s 'from' is before fromMonth ${Ve(a,"MMM, yyyy")}.`)}if(n){let N=(g=l.dateRange.to)==null?void 0:g.getMonth();if(N&&N>n.getMonth())throw new Error(`Preset ${l.label}'s 'to' is after toMonth ${Ve(n,"MMM, yyyy")}.`)}if(c){let N=(h=l.dateRange.from)==null?void 0:h.getDate();if(N&&N<c.getDate())throw new Error(`Preset ${l.dateRange.from}'s 'from' is before fromDay ${Ve(c,"MMM dd, yyyy")}.`)}if(s){let N=(v=l.dateRange.to)==null?void 0:v.getDate();if(N&&N>s.getDate())throw new Error(`Preset ${l.label}'s 'to' is after toDay ${Ve(s,"MMM dd, yyyy")}.`)}}})}};import{cva as mc}from"class-variance-authority";import{Calendar as uc,ChevronDown as pc}from"lucide-react";import{forwardRef as fc}from"react";import{jsx as Cr,jsxs as bc}from"react/jsx-runtime";var gc=mc(["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"}}}),mo=fc(({className:e,children:t,placeholder:r,hasError:o,...a},n)=>bc("button",{ref:n,className:i(gc({hasError:o}),e),...a,children:[Cr(uc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),Cr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?Cr("span",{className:"text-neutral-400",children:r}):null)}),Cr(pc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));mo.displayName="DatePicker.Trigger";import{jsx as ae,jsxs as Pn}from"react/jsx-runtime";var xc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:n,disableNavigation:c,disabledDays:s,showYearNavigation:m=!1,locale:d=hc,placeholder:l="Select date range",hasError:u,align:p="center",className:f,...g})=>{let{isDesktop:h}=Y(),[v,y]=kr(!1),[w,N]=kr(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,C]=kr((w==null?void 0:w.dateRange)??e??t??void 0),[A,W]=kr(k==null?void 0:k.to),T=kn(()=>k,[v]);uo(()=>{C(e)},[e]),uo(()=>{let L=a==null?void 0:a.find(({id:X})=>X===r);N(L),C((L==null?void 0:L.dateRange)??e??t)},[a,r]),uo(()=>{v?k&&W(k.to):W(k==null?void 0:k.to)},[v]);let P=(L,X)=>{let M=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:X}:L;C(M),N(void 0),(M==null?void 0:M.from)&&(M==null?void 0:M.to)&&(o==null||o(M),y(!1))},G=L=>{C(L.dateRange),N(L),o==null||o(L.dateRange,L),y(!1)},x=()=>{C(T),y(!1)},S=L=>{L||x(),y(L)},R=kn(()=>k?`${k.from?co(k.from,d):""} - ${k.to?co(k.to,d):""}`:null,[k,d]);return Ie((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let X=a==null?void 0:a.find(M=>M.shortcut===L.key);X&&G(X)}),ae(lo.Provider,{value:{isOpen:v,setIsOpen:y},children:ae(xe,{align:p,openPopover:v,setOpenPopover:S,popoverContentClassName:"rounded-xl",content:ae("div",{className:"flex w-full",children:Pn("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(yc,{children:ae("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:ae("div",{className:"sm:py-3",children:ae(so,{currentPresetId:r,currentValue:k,presets:a,onSelect:G})})})}),ae("div",{className:"scrollbar-hide overflow-x-scroll",children:ae(wn,{mode:"range",selected:k,onSelect:P,month:A,onMonthChange:W,numberOfMonths:h?2:1,disabled:s,disableNavigation:c,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...g})})]})}),children:ae(mo,{placeholder:l,disabled:n,className:f,hasError:u,"aria-required":g.required||g["aria-required"],"aria-invalid":g["aria-invalid"],"aria-label":g["aria-label"],"aria-labelledby":g["aria-labelledby"],children:(w==null?void 0:w.label)??R})})})};function Vx({presets:e,...t}){return e&&Cn(e,t),ae(xc,{presets:e,...t})}function yc({children:e}){let t=vc(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Pn("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 Nc}from"react";import{jsx as Pr,jsxs as wc}from"react/jsx-runtime";function Gx({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=Nc();return wc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Pr("defs",{children:Pr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:Pr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),Pr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import Cc from"next/link";import{useEffect as kc,useState as Sn}from"react";import Pc from"swr";import{jsx as po,jsxs as Rn}from"react/jsx-runtime";function Tn({className:e}){let{data:t}=Pc("https://status.dub.co/api/v1/summary",be),[r,o]=Sn("bg-neutral-200"),[a,n]=Sn("Loading status...");return kc(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:s,name:m}=c[0],d=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";n(m),o(d)}else n("All systems operational"),o("bg-green-500")},[t]),Rn(Cc,{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:[Rn("div",{className:"relative size-2",children:[po("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")}),po("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),po("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Sr,jsxs as Ln}from"react/jsx-runtime";function Qx({icon:e,title:t,description:r,learnMore:o,children:a}){return Ln("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Sr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Sr(e,{className:"size-6 text-neutral-800"})}),Sr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&Ln("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Sr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as Sc}from"class-variance-authority";import{useState as Mn}from"react";import{toast as Dn}from"sonner";import{Fragment as Tc,jsx as ye,jsxs as go}from"react/jsx-runtime";var En=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],fo={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:En,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:[...En,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Rc=Sc("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 d2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:n,previewClassName:c,icon:s=Ma,customPreview:m,accept:d="any",imageSrc:l,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:f=!0,content:g,maxFileSizeMB:h=0,targetResolution:v,accessibilityLabel:y="File upload",disabled:w=!1}){let[N,k]=Mn(!1),[C,A]=Mn(null),W=async T=>{let P="dataTransfer"in T?T.dataTransfer.files&&T.dataTransfer.files[0]:T.target.files&&T.target.files[0];if(!P)return;if(A(P.name),h>0&&P.size/1024/1024>h){Dn.error(`File size too big (max ${h} MB)`);return}let G=fo[d].types;if(G.length&&!G.includes(P.type)){Dn.error(fo[d].errorMessage??"File type not supported");return}let x=P;if(v&&P.type.startsWith("image/"))try{let S=await Xo(P,v),R=await fetch(S).then(L=>L.blob());x=new File([R],P.name,{type:P.type})}catch(S){console.error("Error resizing image:",S)}if(t){let S=new FileReader;S.onload=R=>{var L;return r==null?void 0:r({src:(L=R.target)==null?void 0:L.result,file:x})},S.readAsDataURL(x);return}r==null||r({file:x})};return go("label",{className:i(Rc({variant:o}),w?"cursor-not-allowed":i(p&&"cursor-pointer"),a),children:[u&&ye("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ye(St,{})}),ye("div",{className:"absolute inset-0 z-[5]",onDragOver:T=>{T.preventDefault(),T.stopPropagation(),k(!0)},onDragEnter:T=>{T.preventDefault(),T.stopPropagation(),k(!0)},onDragLeave:T=>{T.preventDefault(),T.stopPropagation(),k(!1)},onDrop:async T=>{T.preventDefault(),T.stopPropagation(),W(T),k(!1)}}),go("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",w&&"bg-neutral-50",N&&!w&&"cursor-copy border-black bg-neutral-50 opacity-100",l?i("opacity-0",f&&!w&&"group-hover:opacity-100"):i(!w&&"group-hover:bg-neutral-50")),children:[ye(s,{className:i("size-7 transition-all duration-75",w?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",N?"scale-110":"scale-100"),n)}),g!==null&&ye("div",{className:i("mt-2 text-center text-sm text-neutral-500",w&&"text-neutral-400"),children:g??ye(Tc,{children:go("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),ye("span",{className:"sr-only",children:y})]}),l&&(m??ye("img",{src:l,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),p&&ye("div",{className:"sr-only mt-1 flex shadow-sm",children:ye("input",{id:e,type:"file",accept:fo[d].types.join(","),onChange:W,disabled:w},C)})]})}import{AnimatePresence as Lc,motion as In}from"framer-motion";import{X as Mc}from"lucide-react";import Dc from"next/link";import{isValidElement as Ec}from"react";import{Fragment as Ic,jsx as ee,jsxs as zt}from"react/jsx-runtime";function On({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return Ie("Escape",o,{priority:1}),ee(pe,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:zt("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(Lc,{children:t==null?void 0:t.map(({key:n,value:c})=>{if(n==="loader")return ee(In.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(m=>m.key===n);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(m=>{var f,g,h,v;let d=(f=s.options)==null?void 0:f.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),l=(d==null?void 0:d.icon)??((g=s.getOptionIcon)==null?void 0:g.call(s,m,{key:s.key,option:d}))??s.icon,u=(d==null?void 0:d.label)??((h=s.getOptionLabel)==null?void 0:h.call(s,m,{key:s.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((v=s.getOptionPermalink)==null?void 0:v.call(s,m))??null;return zt(In.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:[zt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[ee("span",{className:"shrink-0 text-neutral-600",children:An(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?zt(Ic,{children:[ee("span",{className:"shrink-0 text-neutral-600",children:An(l)?l:ee(l,{className:"h-4 w-4"})}),p?ee(Dc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Pt(u,30)}):Pt(u,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,m),children:ee(Mc,{className:"h-3.5 w-3.5"})})]},`${n}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&zt("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 An=e=>Ec(e);import{Command as He,useCommandState as Ac}from"cmdk";import{ChevronDown as Oc,ListFilter as zc}from"lucide-react";import{Fragment as Vc,forwardRef as Hc,isValidElement as Vn,useCallback as Rr,useEffect as Tr,useImperativeHandle as _c,useRef as ho,useState as bo}from"react";import{Fragment as Gc,jsx as F,jsxs as Ne}from"react/jsx-runtime";function Hn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:n,activeFilters:c,askAI:s,children:m,emptyState:d,className:l}){var P,G;let{isMobile:u}=Y(),p=ho(null),f=ho(),[g,h]=bo(!1);Ie("f",()=>h(!0),{enabled:!g});let[v,y]=bo(""),[w,N]=bo(null),k=Rr(()=>{y(""),N(null)},[]);Tr(()=>{g||k()},[g]);let C=w?e.find(({key:x})=>x===w):null,A=Rr(x=>{p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),N(x),o==null||o(x)},[]),W=Rr(x=>{if(!C||!c)return!1;let S=c.find(({key:R})=>R===w);return(S==null?void 0:S.value)===x||S&&C.multiple&&Array.isArray(S.value)&&S.value.includes(x)},[C]),T=Rr(x=>{C&&(W(x)?r(C.key,x):t(C.key,x),C.multiple||h(!1))},[c,C,s]);return Tr(()=>{a==null||a(v)},[v]),Tr(()=>{n==null||n(w)},[w]),Tr(()=>{(C==null?void 0:C.options)&&p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight})},[C==null?void 0:C.options]),F(xe,{openPopover:g,setOpenPopover:h,onEscapeKeyDown:x=>{w&&(x.preventDefault(),k())},content:F(pe,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:Ne(He,{loop:!0,shouldFilter:!C||C.shouldFilter!==!1,children:[Ne("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[F(Wc,{placeholder:`${(C==null?void 0:C.label)||"Filter"}...`,value:v,onValueChange:y,onKeyDown:x=>{(x.key==="Escape"||x.key==="Backspace"&&!v)&&(x.preventDefault(),x.stopPropagation(),w?k():h(!1))},emptySubmit:x=>{x.preventDefault(),x.stopPropagation(),s?(t("ai",C?`${C.label} ${v}`:v),h(!1)):T(v)}}),!C&&F("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"})]}),F(Bc,{ref:p,children:Ne(He.List,{className:i("flex w-full flex-col gap-1 p-1",C?"min-w-[100px]":"min-w-[180px]"),children:[C?((G=(P=C.options)==null?void 0:P.filter(x=>!v||!x.hideDuringSearch))==null?void 0:G.map(x=>{let S=W(x.value);return F(zn,{filter:C,option:x,right:S?F(wa,{className:"h-4 w-4"}):x.right,onSelect:()=>T(x.value)},x.value)}))??F(He.Loading,{children:F("div",{className:"-m-1 flex items-center justify-center",style:f.current,children:F(Pe,{})})}):e.filter(x=>!x.hideInFilterDropdown).map(x=>Ne(Vc,{children:[F(zn,{filter:x,onSelect:()=>A(x.key)}),x.separatorAfter&&F(He.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},x.key)),(!C||C.options)&&F($c,{search:v,askAI:s,children:d?Fc(d)?(d==null?void 0:d[w??"default"])??"No matches":d:"No matches"})]})},w)]})}),children:Ne("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",l),children:[F(zc,{className:"size-4 shrink-0"}),F("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?F("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):F(Oc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Fc(e){return typeof e=="object"&&e!==null&&!Vn(e)}var Wc=e=>{let t=Ac(r=>r.filtered.count===0);return F(He.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},Bc=Hc(({children:e},t)=>{let r=ho(null);_c(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ae(r);return Ne(Gc,{children:[F("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),F("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 zn({filter:e,option:t,right:r,onSelect:o}){var s,m;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??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return Ne(He.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:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[F("span",{className:"shrink-0 text-neutral-600",children:Uc(n)?n:F(n,{className:"h-4 w-4"})}),Pt(c,48),F("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var $c=({search:e,askAI:t,children:r})=>t&&e?Ne(He.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[F(ca,{className:"h-4 w-4"}),Ne("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",Ne("span",{className:"text-black",children:['"',e,'"']})]})]}):F(He.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Uc=e=>Vn(e);var O2={Select:Hn,List:On};import{useMemo as jc,useState as _n}from"react";import{jsx as Xe,jsxs as Lr}from"react/jsx-runtime";function B2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:n,handleSubmit:c}){let[s,m]=_n(r.defaultValue),[d,l]=_n(!1),u=jc(()=>d||!s||s===r.defaultValue,[d,s,r.defaultValue]);return Lr("form",{onSubmit:async p=>{p.preventDefault(),l(!0),await c({[r.name]:s}),l(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Lr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Lr("div",{className:"flex flex-col space-y-3",children:[Xe("h2",{className:"text-xl font-medium",children:e}),Xe("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Xe("input",{...r,type:r.type||"text",required:!0,disabled:!!n,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":n})}):Xe("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Lr("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"?Xe("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,Xe("div",{className:"shrink-0",children:Xe(te,{text:a,loading:d,disabled:u,disabledTooltip:n})})]})]})}import{useId as Kc}from"react";import{jsx as Mr,jsxs as Yc}from"react/jsx-runtime";function Je({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Kc();return Yc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Mr("defs",{children:Mr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Mr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Mr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Zc}from"lucide-react";import qc,{useCallback as Xc,useState as Jc}from"react";import{jsx as Qe,jsxs as vo}from"react/jsx-runtime";var Qc=qc.forwardRef(({className:e,type:t,...r},o)=>{let[a,n]=Jc(!1),c=Xc(()=>n(!a),[a,n]);return vo("div",{children:[vo("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}),vo("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(Zc,{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:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Qe(Aa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Qe(Oa,{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})]})});Qc.displayName="Input";import{flip as ad,offset as nd,size as id,useDismiss as sd,useFloating as ld,useInteractions as cd}from"@floating-ui/react";import{Command as Me,useCommandState as dd}from"cmdk";import{Check as md,ChevronDown as ud,Search as pd,X as fd}from"lucide-react";import{createContext as gd,forwardRef as Un,useContext as wo,useEffect as xo,useMemo as Wn,useRef as Bn,useState as yo}from"react";import{Drawer as ht}from"vaul";import ed from"next/image";import{memo as td,useEffect as rd,useState as Fn}from"react";import{jsx as od}from"react/jsx-runtime";var Vt=td(e=>{let[t,r]=Fn(!0),[o,a]=Fn(e.src);rd(()=>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 od(ed,{...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 O,jsxs as le}from"react/jsx-runtime";var Dr=gd({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function vy({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:n,icon:c,inputAttrs:s,noItemsElement:m}){let{isMobile:d}=Y(),l=Bn(null),[u,p]=yo(!1),[f,g]=yo(""),[h,v]=yo(!1);xo(()=>{u&&v(!1)},[u]),xo(()=>v(!0),[f]),xo(()=>{t&&g(t.value)},[t]);let y=Wn(()=>{let S=f.toLowerCase();return h?e.filter(R=>R.value.toLowerCase().includes(S)):f?e.sort((R,L)=>(L.value.toLowerCase().includes(S)?1:0)-(R.value.toLowerCase().includes(S)?1:0)):e},[h,f,e]),{refs:w,floatingStyles:N,context:k}=ld({open:u,onOpenChange:p,middleware:[nd(8),id({apply({elements:{floating:S},availableHeight:R}){Object.assign(S.style,{maxHeight:`${Math.max(75,Math.min(R,290))}px`})},padding:8}),ad({fallbackStrategy:"initialPlacement",padding:8})]}),C=sd(k,{enabled:!d||!n}),{getReferenceProps:A,getFloatingProps:W}=cd([C]),T=Bn(null),{scrollProgress:P,updateScrollProgress:G}=Ae(T),x=Wn(()=>t&&t.icon?t.icon:t&&t.image?O(Vt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||O(pd,{className:"size-4 text-neutral-400"}),[t,c]);return O(Dr.Provider,{value:{inputAttrs:s||{},openCommandList:u,setOpenCommandList:p,inputValue:f,setInputValue:g,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&n?le(ht.Root,{open:u,onOpenChange:p,children:[O(ht.Trigger,{className:"sm:hidden",asChild:!0,children:O(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:O(No,{className:o,iconElement:x})})}),O(ht.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(ht.Portal,{children:[O(ht.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:S=>{S.target instanceof Element&&S.target.closest("[data-sonner-toast]")&&S.preventDefault()},children:le(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:[O("div",{className:"p-2",children:O(No,{className:o,iconElement:x})}),u&&le(Me.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&f===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&O(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),O($n,{items:y})]})]})}),O(ht.Overlay,{})]})]}):le(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:[O(No,{className:o,iconElement:x,ref:w.setReference,...A()}),u&&le("div",{ref:w.setFloating,style:N,...W(),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:T,onScroll:G,className:"grow overflow-y-auto p-2",children:[le(Me.List,{children:[e.length===0&&f===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&O(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),O($n,{items:y})]}),O("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(P,2)}})]})]})})}var No=Un(({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:[O("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),le("div",{className:"flex h-10 grow",children:[O(bd,{}),O(hd,{})]})]})),bd=Un((e,t)=>{let r=dd(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:n,inputValue:c,setInputValue:s,disabled:m}=wo(Dr);return O(Me.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>n(!0),value:c,onValueChange:s,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),n(!1)):d.key==="Enter"&&r?n(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&n(!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 hd(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=wo(Dr);return O("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?O(fd,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):O(ud,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function $n({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=wo(Dr);return e.map(a=>le(Me.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&&O(Vt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),O("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&&O(fr,{className:"text-xs",variant:"neutral",children:a.label})]}),O(md,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as Co from"@radix-ui/react-label";import{cva as vd}from"class-variance-authority";import*as Gn from"react";import{jsx as Nd}from"react/jsx-runtime";var xd=vd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),yd=Gn.forwardRef(({className:e,...t},r)=>Nd(Co.Root,{ref:r,className:i(xd(),e),...t}));yd.displayName=Co.Root.displayName;import{cva as wd}from"class-variance-authority";import{isValidElement as Cd}from"react";import{jsx as ko,jsxs as jn}from"react/jsx-runtime";var Po=wd(["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"},disabled:{true:"opacity-50 cursor-default text-content-disabled hover:bg-bg-default"}}});function Dy({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:n,disabledTooltip:c,...s}){return ko(ut,{tooltipProps:{content:c},children:jn(e||"button",{...e==="button"?{type:"button"}:{},className:i(Po({variant:t,disabled:!!c}),n),disabled:c?!0:s.disabled,...s,children:[jn("div",{className:"flex grow items-center gap-2",children:[o&&(kd(o)?o:ko(o,{className:"size-4"})),r]}),a&&ko("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 kd=e=>Cd(e);import{curveNatural as Kn}from"@visx/curve";import{LinearGradient as Yn}from"@visx/gradient";import{Group as Pd}from"@visx/group";import{ParentSize as Sd}from"@visx/responsive";import{scaleLinear as Rd,scaleUtc as Td}from"@visx/scale";import{Area as Ld,AreaClosed as Md}from"@visx/shape";import{motion as Zn}from"framer-motion";import{useId as Dd,useMemo as qn}from"react";import{jsx as we,jsxs as So}from"react/jsx-runtime";var Ed={top:8,right:2,bottom:2,left:2};function Wy(e){return we(Sd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&we(Id,{...{width:t,height:r,...e}})})}function Id({width:e,height:t,data:r,curve:o=!0,color:a,padding:n}){let c={...Ed,...n},s=Dd(),m=qn(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:l}=qn(()=>{let u=r.map(({value:v})=>v),p=Math.max(...u),f=r.map(({date:v})=>v.getTime()),g=new Date(Math.min(...f)),h=new Date(Math.max(...f));return{yScale:Rd({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:Td({domain:[g,h],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return So("svg",{width:e,height:t,children:[So("defs",{children:[we(Yn,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),we(Yn,{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)`})})]}),So(Pd,{left:c.left,top:c.top,children:[we(Ld,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,curve:o?Kn:void 0,children:({path:u})=>we(Zn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),we(Md,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Kn:void 0,children:({path:u})=>we(Zn.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 ce from"@radix-ui/react-dialog";import*as Ro from"@radix-ui/react-visually-hidden";import{useRouter as Ad}from"next/navigation";import{Drawer as et}from"vaul";import{jsx as ne,jsxs as vt}from"react/jsx-runtime";function Ky({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:n,preventDefaultClose:c,drawerRootProps:s}){let m=Ad(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:l}=Y();return l&&!n?ne(et.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...s,children:vt(et.Portal,{children:[ne(et.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ne(et.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:vt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[vt(Ro.Root,{children:[ne(et.Title,{children:"Modal"}),ne(et.Description,{children:"This is a modal"})]}),ne(Od,{}),e]})}),ne(et.Overlay,{})]})}):ne(ce.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:vt(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"}),vt(ce.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:[vt(Ro.Root,{children:[ne(ce.Title,{children:"Modal"}),ne(ce.Description,{children:"This is a modal"})]}),e]})]})})}function Od(){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 To}from"react";import{jsx as Ht,jsxs as zd}from"react/jsx-runtime";function e4({value:e,onChange:t,min:r,max:o,step:a=1,disabled:n,className:c,id:s,formatValue:m,decrementAriaLabel:d="Decrease",incrementAriaLabel:l="Increase",...u}){let p=typeof r=="number"?e>r:!0,f=typeof o=="number"?e<o:!0,g=To(y=>{let w=y;return typeof r=="number"&&(w=Math.max(r,w)),typeof o=="number"&&(w=Math.min(o,w)),w},[r,o]),h=To(()=>{n||!p||t(g(e-a))},[n,p,g,t,a,e]),v=To(()=>{n||!f||t(g(e+a))},[n,f,g,t,a,e]);return zd("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),...u,children:[Ht("button",{type:"button","aria-label":d,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:Ht(dr,{className:"block size-4"})}),Ht("div",{role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,tabIndex:0,onKeyDown:y=>{n||((y.key==="ArrowLeft"||y.key==="ArrowDown")&&(y.preventDefault(),h()),(y.key==="ArrowRight"||y.key==="ArrowUp")&&(y.preventDefault(),v()))},className:i("flex min-w-0 flex-1 items-center justify-center px-3 text-sm text-neutral-900"),prefix:"",children:m?m(e):e}),Ht("button",{type:"button","aria-label":l,onClick:v,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:Ht(mt,{className:"block size-4"})})]})}import{Fragment as Vd,jsx as Er,jsxs as xt}from"react/jsx-runtime";var Xn=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 o4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:n,showTotalCount:c=!0}){return xt("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[xt("div",{className:"flex items-center gap-2",children:[xt("div",{children:[Er("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&xt(Vd,{children:[xt("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&&Er("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),n]}),xt("div",{className:"flex items-center gap-2",children:[Er("button",{type:"button",className:Xn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Er("button",{type:"button",className:Xn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import{jsx as Jn,jsxs as Hd}from"react/jsx-runtime";function i4({progress:e,strokeWidth:t=16,className:r}){let o=Math.min(Math.max(e,0),1),a=(100-t)/2,n=a*Math.PI*2,c=o*n;return Hd("svg",{width:"100",height:"100",viewBox:"0 0 100 100",className:i("size-3 shrink-0 text-green-600",r),children:[Jn("circle",{cx:"50",cy:"50",r:a,stroke:"#e5e5e5",strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round"}),o>0&&Jn("circle",{cx:"50",cy:"50",r:a,stroke:"currentColor",strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round",strokeDasharray:`${c} ${n-c}`,style:{transformOrigin:"50px 50px",transform:"rotate(-90deg)"}})]})}import*as _e from"@radix-ui/react-radio-group";import{Circle as _d}from"lucide-react";import*as Lo from"react";import{jsx as Ir}from"react/jsx-runtime";var Fd=Lo.forwardRef(({className:e,...t},r)=>Ir(_e.Root,{className:i("grid gap-2",e),...t,ref:r}));Fd.displayName=_e.Root.displayName;var Wd=Lo.forwardRef(({className:e,...t},r)=>Ir(_e.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:Ir(_e.Indicator,{className:"flex items-center justify-center",children:Ir(_d,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Wd.displayName=_e.Item.displayName;import{Drawer as Fe}from"vaul";import{jsx as tt,jsxs as jd}from"react/jsx-runtime";function Bd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Fe.NestedRoot:Fe.Root;return tt(a,{direction:"right",handleOnly:!0,...o,children:jd(Fe.Portal,{children:[tt(Fe.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),tt(Fe.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:tt("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function $d({className:e,...t}){return tt(Fe.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Ud(e){return tt(Fe.Description,{...e})}function Gd(e){return tt(Fe.Close,{...e})}var f4=Object.assign(Bd,{Title:$d,Description:Ud,Close:Gd});import{useEffect as Kd,useRef as Yd,useState as Zd}from"react";import{jsx as Qn}from"react/jsx-runtime";var qd=`
2
+ import{$ as Ip,$a as C0,$b as mf,$c as cr,$d as Zg,A as fp,Aa as nr,Ab as G0,Ac as Af,Ad as Ka,B as rr,Ba as n0,Bb as Da,Bc as Of,Bd as Pg,C as gp,Ca as i0,Cb as j0,Cc as zf,Cd as Sg,D as bp,Da as s0,Db as K0,Dc as Vf,Dd as Rg,E as hp,Ea as l0,Eb as Y0,Ec as Hf,Ed as Tg,F as or,Fa as ya,Fb as sr,Fc as Ba,Fd as Lg,G as vp,Ga as c0,Gb as Z0,Gc as _f,Gd as Mg,H as ar,Ha as d0,Hb as q0,Hc as Ff,Hd as Dg,I as xp,Ia as Na,Ib as X0,Ic as Wf,Id as Eg,J as yp,Ja as m0,Jb as J0,Jc as $a,Jd as Ig,K as Np,Ka as u0,Kb as Q0,Kc as Ua,Kd as Ag,L as wp,La as p0,Lb as Ea,Lc as Bf,Ld as Og,M as fa,Ma as f0,Mb as ef,Mc as $f,Md as zg,N as ga,Na as g0,Nb as tf,Nc as Uf,Nd as Vg,O as ba,Oa as b0,Ob as rf,Oc as Gf,Od as Hg,P as ha,Pa as h0,Pb as of,Pc as lr,Pd as _g,Q as va,Qa as v0,Qb as Ia,Qc as jf,Qd as Fg,R as Cp,Ra as x0,Rb as Aa,Rc as Kf,Rd as Wg,S as kp,Sa as y0,Sb as Oa,Sc as Yf,Sd as Bg,T as Pp,Ta as wa,Tb as za,Tc as Zf,Td as $g,U as Sp,Ua as ir,Ub as af,Uc as qf,Ud as Ug,V as Rp,Va as Ca,Vb as nf,Vc as Xf,Vd as Gg,W as Tp,Wa as ka,Wb as sf,Wc as Jf,Wd as Ya,X as Lp,Xa as N0,Xb as lf,Xc as Qf,Xd as Za,Y as Mp,Ya as w0,Yb as cf,Yc as eg,Yd as jg,Z as Dp,Za as Pa,Zb as df,Zc as tg,Zd as Kg,_ as Ep,_a as Sa,_b as Va,_c as rg,_d as Yg,a as op,aa as Ap,ab as k0,ac as uf,ad as dr,ae as qg,b as sa,ba as Op,bb as Ra,bc as pf,bd as og,be as Xg,c as ap,ca as zp,cb as Ta,cc as ff,cd as ag,ce as Jg,d as lt,da as Vp,db as La,dc as gf,dd as ng,de as Qg,e as er,ea as Hp,eb as P0,ec as bf,ed as ig,ee as eb,f as np,fa as _p,fb as S0,fc as hf,fd as sg,fe as tb,g as ct,ga as Fp,gb as R0,gc as vf,gd as lg,ge as rb,h as dt,ha as Wp,hb as T0,hc as xf,hd as cg,he as ob,i as Zr,ia as Bp,ib as L0,ic as yf,id as Ga,ie as ab,j as la,ja as $p,jb as qr,jc as Ha,jd as dg,je as nb,k as ip,ka as Up,kb as M0,kc as Nf,kd as mg,ke as ib,l as ca,la as Gp,lb as D0,lc as wf,ld as ug,le as Rt,m as sp,ma as jp,mb as E0,mc as Cf,md as pg,me as sb,n as lp,na as Kp,nb as Ma,nc as _a,nd as fg,ne as lb,o as da,oa as Yp,ob as I0,oc as kf,od as gg,oe as cb,p as ma,pa as xa,pb as A0,pc as Pf,pd as bg,pe as db,q as ua,qa as Zp,qb as O0,qc as Fa,qd as hg,qe as qa,r as pa,ra as qp,rb as z0,rc as Sf,rd as mt,re as mb,s as St,sa as Xp,sb as V0,sc as Wa,sd as vg,se as ub,t as cp,ta as Jp,tb as H0,tc as Rf,td as xg,te as pb,u as Pe,ua as Qp,ub as _0,uc as Tf,ud as yg,ue as fb,v as dp,va as e0,vb as F0,vc as Lf,vd as Ng,ve as gb,w as mp,wa as t0,wb as W0,wc as Mf,wd as wg,we as bb,x as up,xa as r0,xb as B0,xc as Df,xd as ja,xe as hb,y as tr,ya as o0,yb as $0,yc as Ef,yd as Cg,z as pp,za as a0,zb as U0,zc as If,zd as kg}from"./chunk-5DA5ABGV.mjs";import{a as Y}from"./chunk-NWME2ANF.mjs";import{a as Kr,b as kt,c as qo,d as Xo,e as Pt,f as Jo,g as Qo,h as be,i as Ke,j as i,k as Yr,l as ea,m as _,n as ta,o as ke,p as ra,q as oa,r as aa,s as Jt,t as Qt,u as na,v as ia}from"./chunk-7HQBUAV4.mjs";import*as ie from"@radix-ui/react-accordion";import{ChevronDown as Wi}from"lucide-react";import*as ur from"react";import{jsx as mr,jsxs as Gi}from"react/jsx-runtime";var Cb=ie.Root,Bi=ur.forwardRef(({className:e,...t},r)=>mr(ie.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Bi.displayName="AccordionItem";var $i=ur.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let n=r==="chevron"?Wi:mt;return mr(ie.Header,{className:"flex",children:Gi(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,mr(n,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});$i.displayName=ie.Trigger.displayName;var Ui=ur.forwardRef(({className:e,children:t,...r},o)=>mr(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}));Ui.displayName=ie.Content.displayName;import{cva as ji}from"class-variance-authority";import*as pr from"react";import{jsx as Xr}from"react/jsx-runtime";var Ki=ji("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"}}),Yi=pr.forwardRef(({className:e,variant:t,...r},o)=>Xr("div",{ref:o,role:"alert",className:i(Ki({variant:t}),e),...r}));Yi.displayName="Alert";var Zi=pr.forwardRef(({className:e,...t},r)=>Xr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Zi.displayName="AlertTitle";var qi=pr.forwardRef(({className:e,...t},r)=>Xr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));qi.displayName="AlertDescription";import{sha256 as Xi}from"js-sha256";import{useState as Ji}from"react";import{jsx as Jr}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/${Xi(e.email)}?d=${t}`:t}function Db({user:e={},className:t}){if(!e)return Jr("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Ji(Qi(e));return Jr("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 Eb({id:e,className:t}){return Jr("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 es}from"class-variance-authority";import{jsx as rs}from"react/jsx-runtime";var ts=es("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 fr({className:e,variant:t,...r}){return rs("span",{className:i(ts({variant:t}),e),...r})}import{cva as ls}from"class-variance-authority";import{forwardRef as cs}from"react";import*as he from"@radix-ui/react-tooltip";import os from"linkify-react";import{HelpCircle as as}from"lucide-react";import ns from"next/link";import{useState as is}from"react";import{Fragment as ss,jsx as U,jsxs as Ye}from"react/jsx-runtime";function jb({children:e}){return U(he.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[m,d]=is(!1);return Ye(he.Root,{open:o?!1:m,onOpenChange:d,delayDuration:c,disableHoverableContent:n,children:[U(he.Trigger,{asChild:!0,onClick:()=>{d(!0)},onBlur:()=>{d(!1)},children:e}),U(he.Portal,{children:U(he.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:d}):t})})]})}function Kb({title:e,cta:t,href:r,target:o,onClick:a}){return Ye("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(ns,{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 Yb({title:e,cta:t,href:r}){return Ye("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[e,t&&r&&Ye(ss,{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 Zb({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(os,{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 qb(e){return U(Q,{...e,children:U(as,{className:"h-4 w-4 text-neutral-500"})})}function Xb({value:e,unit:t="total clicks",prefix:r,children:o,lastClicked:a}){return(!e||e<1e3)&&!a?o:U(Q,{content:Ye("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-neutral-700",children:[Ye("p",{className:"text-sm font-semibold text-neutral-700",children:[r,Qt(e||0,{full:!0})," ",t]}),a&&Ye("p",{className:"mt-1 text-xs text-neutral-500",suppressHydrationWarning:!0,children:["Last clicked ",Qo(a,{withAgo:!0})]})]}),children:o})}function Jb({children:e,content:t,...r}){return U(Q,{content:t,...r,children:U("div",{className:"flex cursor-pointer items-center",children:U(fr,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function Qb({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 ut({children:e,tooltipProps:t}){return t?U(Q,{...t,children:U("div",{children:e})}):e}import{jsx as pt,jsxs as Xa}from"react/jsx-runtime";var se=ls("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=cs(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:n,icon:c,shortcut:s,disabledTooltip:m,right:d,...l},u)=>m?pt(Q,{content:m,children:Xa("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&&pt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&pt("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})]})}):Xa("button",{ref:u,type:l.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",l.disabled||n?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":se({variant:t}),r),disabled:l.disabled||n,...l,children:[n?pt(Pe,{}):c||null,e&&pt("div",{className:i("min-w-0 truncate",s&&"flex-1 text-left",o),children:e}),s&&pt("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}),d]}));te.displayName="Button";import{cva as ds}from"class-variance-authority";import{createContext as ms}from"react";import{jsx as Ja}from"react/jsx-runtime";var us=ds("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"}}}),Tt=ms({variant:"loose",loading:!1});function Qa({variant:e="loose",loading:t=!1,className:r,children:o}){return Ja("ul",{className:i(us({variant:e,loading:t}),r),"data-variant":e,children:Ja(Tt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as ps}from"class-variance-authority";import{createContext as fs,useContext as gs,useEffect as bs,useRef as hs,useState as vs}from"react";import{jsx as en,jsxs as Ns}from"react/jsx-runtime";var xs=ps("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"}}}),ys="w-full py-2.5 px-4",Qr=fs({hovered:!1});function tn({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:n=!0,banner:c}){let{variant:s}=gs(Tt),m=hs(null),[d,l]=vs(!1);bs(()=>{if(!d||!m.current)return;let p=setInterval(()=>{var f;((f=m.current)==null?void 0:f.matches(":hover"))===!1&&l(!1)},1e3);return()=>clearInterval(p)},[d]);let u=p=>!(document.getElementById("modal-backdrop")||Ke(p));return Ns("li",{ref:m,className:i(xs({variant:s}),e),onPointerEnter:()=>l(!0),onPointerLeave:()=>l(!1),"data-hover-state-enabled":n,children:[c,en("div",{className:i(ys,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:en(Qr.Provider,{value:{hovered:d},children:r})})]})}var C1=Object.assign(Qa,{Card:Object.assign(tn,{Context:Qr}),Context:Tt});import{motion as ul}from"framer-motion";import{forwardRef as pl,useRef as fl}from"react";import{useEffect as ws,useState as Cs}from"react";function rn(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function eo(e,t){let[r,o]=Cs(rn(e)??t);return ws(()=>{let n=rn(e);n&&o(n)},[e]),[r,n=>{o(n),window.localStorage.setItem(e,JSON.stringify(n))}]}function ks(e){return e&&typeof e=="object"&&Array.isArray(e.all)&&Array.isArray(e.defaultVisible)}function T1(e,t){if(!ks(t)){let o=t,a=m=>{let d=o[m];return Object.fromEntries(d.all.map(l=>[l,d.defaultVisible.includes(l)]))},n=Object.fromEntries(Object.keys(o).map(m=>[m,a(m)])),[c,s]=eo(e,n);return{columnVisibility:c,setColumnVisibility:(m,d)=>{let l=o[m].all,u=c[m]||{},p=Object.fromEntries(l.map(f=>[f,f in d?d[f]:u[f]??!1]));s({...c,[m]:p})}}}else{let o=t,a=Object.fromEntries(o.all.map(s=>[s,o.defaultVisible.includes(s)])),[n,c]=eo(e,a);return{columnVisibility:n,setColumnVisibility:s=>{let m=o.all,d=n||{},l=Object.fromEntries(m.map(u=>[u,u in s?s[u]:d[u]??!1]));c(l)}}}}import to from"js-cookie";import{useEffect as Ps,useState as Ss}from"react";function E1(e,t,r){let[o,a]=Ss(()=>{let c=to.get(e);return c?JSON.parse(c):t});return Ps(()=>{let c=()=>{let s=to.get(e);s&&a(JSON.parse(s))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),to.set(e,JSON.stringify(c),r)}]}import{useCallback as Rs,useEffect as Ts,useRef as Ls,useState as Ms}from"react";var ft=(e=3e3)=>{let t=Ls(null),[r,o]=Ms(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},n=Rs(async(c,{onSuccess:s,throwOnError:m}={})=>{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(d){if(console.error("Failed to copy: ",d),m)throw d}},[e]);return Ts(()=>()=>a(),[]),[r,n]};import{useEffect as Ds,useState as Es}from"react";function V1(){let[e,t]=Es(null);return Ds(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(s=>{var u,p,f;let m=s[0];if(!m)return;let d=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let g=1;g<s.length;g++){let h=s[g];if(!h)break;(h.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=h)}let l=m.target;for(;l&&l.getBoundingClientRect().bottom<o;)l=(p=n.get(l))==null?void 0:p.next;for(;l&&l.getBoundingClientRect().top>d;)l=(f=n.get(l))==null?void 0:f.prev;l&&t(l.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{useEffect as Is,useState as As}from"react";function W1(){let[e,t]=As(null);return Is(()=>{let r=window.location.hostname;ta.has(r)?t("app"):oa.has(r)?t("partners"):ra.has(r)&&t("admin")},[]),{subdomain:e}}import{useCallback as Os}from"react";function G1(e){return{handleKeyDown:Os(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 zs,useState as Vs}from"react";function Z1(e,t={}){let{root:r,defaultValue:o}=t,[a,n]=Vs(o??!1);return zs(()=>{let c=()=>{let m=e.current;if(!m)return;let d=r==null?void 0:r.current,l=m.getBoundingClientRect(),u=d?d.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};n(l.top<u.bottom&&l.bottom>u.top&&l.left<u.right&&l.right>u.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 Hs,useState as _s}from"react";function J1(){let[e,t]=_s(!1);return Hs(()=>{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 Fs,useState as Ws}from"react";function rh(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[n,c]=Ws(),s=(n==null?void 0:n.isIntersecting)&&a,m=([d])=>{c(d)};return Fs(()=>{let d=e==null?void 0:e.current;if(!!!window.IntersectionObserver||s||!d)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(d),()=>p.disconnect()},[e,JSON.stringify(t),r,o,s]),n}import{createContext as Bs,useCallback as $s,useContext as Us,useEffect as on,useId as Gs,useState as js}from"react";import{jsx as Ks}from"react/jsx-runtime";var an=Bs({listeners:[],setListeners:()=>{}});function lh({children:e}){let[t,r]=js([]);return Ks(an.Provider,{value:{listeners:t,setListeners:r},children:e})}function Ie(e,t,r={}){let o=Gs(),{listeners:a,setListeners:n}=Us(an),c=$s(s=>{if(r.enabled===!1)return;let m=s.target,d=document.getElementById("modal-backdrop"),l=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||!!d!=!!r.modal||!!l!=!!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(g=>g.enabled!==!1&&!!d==!!g.modal&&!!l==!!g.sheet&&(Array.isArray(g.key)?g.key.includes(u):g.key===u));!p.length||Jo(p,(g,h)=>(h.priority??0)-(g.priority??0))[0].id!==o||(s.preventDefault(),t(s))},[e,a,o,t,r.enabled,r.modal,r.sheet]);on(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),on(()=>(n(s=>[...s.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>n(s=>s.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{toast as Ys}from"sonner";import Zs from"swr";function ph(e,t){let{data:r,isLoading:o,mutate:a}=Zs(e,be);return{data:r,isLoading:o,update:async(n,c)=>Ys.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 cn,useMemo as tl}from"react";import{useEffect as nn,useState as qs}from"react";function sn({pageSize:e,page:t,onPageChange:r}){let[o,a]=qs({pageIndex:t,pageSize:e});return nn(()=>{a(n=>({...n,pageIndex:t}))},[t]),nn(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as Xs,useRouter as Js,useSearchParams as Qs}from"next/navigation";import{useCallback as el}from"react";function ln(){let e=Xs(),t=Js(),r=Qs(),o=Object.fromEntries(r),a=(c,s)=>{let m=new URLSearchParams(r);if((s==null?void 0:s.include)&&Array.isArray(s.include)){let l=new URLSearchParams;r.forEach((u,p)=>{var f;(f=s.include)!=null&&f.includes(p)&&l.set(p,u)}),m=l}(s==null?void 0:s.exclude)&&Array.isArray(s.exclude)&&s.exclude.forEach(l=>m.delete(l)),c&&Object.entries(c).forEach(([l,u])=>m.set(l,u));let d=m.toString();return d.length>0?`?${d}`:""},n=el(({set:c,del:s,replace:m,scroll:d=!0,getNewPath:l,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([h,v])=>p.set(h,Array.isArray(v)?v.join(u):v)),s&&(Array.isArray(s)?s.forEach(h=>p.delete(h)):p.delete(s));let f=p.toString(),g=`${e}${f.length>0?`?${f}`:""}`;if(l)return g;m?t.replace(g,{scroll:!1}):t.push(g,{scroll:d})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:n,getQueryString:a}}function Ph(e=ia){let{searchParams:t,queryParams:r}=ln(),o=tl(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:a,setPagination:n}=sn({pageSize:e,page:o,onPageChange:c=>{r(c===1?{del:"page",scroll:!1}:{set:{page:c.toString()},scroll:!1})}});return cn(()=>{let c=parseInt(t.get("page")||"1")||1;n(s=>({...s,pageIndex:c}))},[t.get("page")]),cn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:n}}import{useEffect as rl}from"react";function Th(){rl(()=>{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 ol,useState as al}from"react";function gr(e){let[t,r]=al(),o=([a])=>{r(a)};return ol(()=>{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 dn,useState as il}from"react";function mn(e,{container:t}={}){let[r,o]=il(!1),a=nl(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return dn(()=>{let n=(t==null?void 0:t.current)??window;return n.addEventListener("scroll",a),()=>n.removeEventListener("scroll",a)},[a]),dn(()=>{a()},[a]),r}import{useCallback as sl,useEffect as ll,useState as cl}from"react";function Ae(e){let[t,r]=cl(1),o=sl(()=>{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 ll(o,[a]),{scrollProgress:t,updateScrollProgress:o}}import{useEffect as dl}from"react";import{toast as pn}from"sonner";import{jsx as br,jsxs as un}from"react/jsx-runtime";function ml({id:e,message:t,undo:r}){let o=()=>{r(),pn.dismiss(e)},a=n=>{n.key==="z"&&(n.ctrlKey||n.metaKey)&&o()};return dl(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),un("div",{className:"flex w-full items-center justify-between space-x-2",children:[un("div",{className:"flex items-center space-x-2",children:[br(ua,{}),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 $h(){return({id:t,message:r,undo:o,duration:a})=>pn(br(ml,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as fn}from"react/jsx-runtime";var pe=pl(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...n},c)=>{var d,l;let s=fl(null),m=gr(s);return fn(ul.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((d=m==null?void 0:m.contentRect)==null?void 0:d.width)??"auto":"auto",height:t?((l=m==null?void 0:m.contentRect)==null?void 0:l.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...n,children:fn("div",{ref:s,className:i(t&&"h-max",e&&"w-max"),children:a})})});pe.displayName="AnimatedSizeContainer";import{jsx as Se,jsxs as gn}from"react/jsx-runtime";function tv({options:e,value:t,onChange:r,className:o,gridCols:a="2",name:n,disabled:c=!1,animated:s=!0}){let m={1:"grid-cols-1",2:"grid-cols-1 lg:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}[a],d=Se("div",{className:i("grid gap-3",m),children:e.map(({key:l,label:u,description:p,icon:f})=>{let g=t===l;return gn("label",{className:i("relative flex w-full cursor-pointer items-start rounded-md border border-neutral-200 bg-white text-neutral-600 hover:bg-neutral-50","transition-all duration-150",g&&"border-black bg-neutral-50 text-neutral-900 ring-1 ring-black",c&&"cursor-not-allowed opacity-50",o),children:[Se("input",{type:"radio",name:n,value:l,className:"hidden",checked:g,disabled:c,onChange:h=>{h.target.checked&&r&&r(l)}}),f&&Se("div",{className:"flex-shrink-0 pt-0.5",children:f}),gn("div",{className:"flex grow flex-col p-3 pr-0",children:[Se("span",{className:"pr-1 text-sm font-semibold text-neutral-900",children:u}),Se("span",{className:"text-xs text-neutral-600",children:p})]}),Se(Sa,{className:i("mr-1.5 mt-1.5 flex size-4 scale-75 items-center justify-center rounded-full opacity-0 transition-[transform,opacity] duration-150",g&&"scale-100 opacity-100")})]},l)})});return s?Se("div",{className:"-m-1",children:Se(pe,{height:!0,transition:{ease:"easeInOut",duration:.2},children:Se("div",{className:"p-1",children:d})})}):d}import gl from"embla-carousel-autoplay";import bl from"embla-carousel-react";import{ArrowLeft as hl,ArrowRight as vl}from"lucide-react";import{createContext as xl,forwardRef as Mt,useCallback as Lt,useContext as yl,useEffect as ro,useState as oo}from"react";import{jsx as Re,jsxs as vn}from"react/jsx-runtime";var ao=2e3,bn=xl(null);function ve(){let e=yl(bn);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function hn(){let{api:e}=ve(),[t,r]=oo(0),o=Lt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return ro(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Nl=Mt(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:n,children:c,...s},m)=>{let[d,l]=bl({...t,axis:e==="horizontal"?"x":"y"},[...o?[gl(typeof o=="object"?o:{delay:ao})]:[],...a||[]]),[u,p]=oo(!1),[f,g]=oo(!1),h=Lt(N=>{!N||(p(N.canScrollPrev()),g(N.canScrollNext()))},[]),v=Lt(()=>{l==null||l.scrollPrev()},[l]),y=Lt(()=>{l==null||l.scrollNext()},[l]),w=Lt(N=>{N.key==="ArrowLeft"?(N.preventDefault(),v()):N.key==="ArrowRight"&&(N.preventDefault(),y())},[v,y]);return ro(()=>{!l||!r||r(l)},[l,r]),ro(()=>{if(!!l)return h(l),l.on("reInit",h),l.on("select",h),()=>{l==null||l.off("select",h)}},[l,h]),Re(bn.Provider,{value:{carouselRef:d,api:l,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:y,canScrollPrev:u,canScrollNext:f},children:Re("div",{ref:m,onKeyDownCapture:w,className:i("relative",n),role:"region","aria-roledescription":"carousel",...s,children:c})})});Nl.displayName="Carousel";var wl=Mt(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=ve();return Re("div",{ref:o,className:"overflow-hidden",children:Re("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});wl.displayName="CarouselContent";var Cl=Mt(({className:e,...t},r)=>{let{orientation:o}=ve();return Re("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})});Cl.displayName="CarouselItem";var kl=Mt(({className:e,...t},r)=>{let{orientation:o,scrollPrev:a,canScrollPrev:n}=ve();return vn("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:[Re(hl,{className:"h-4 w-4"}),Re("span",{className:"sr-only",children:"Previous slide"})]})});kl.displayName="CarouselPrevious";var Pl=Mt(({className:e,...t},r)=>{let{orientation:o,scrollNext:a,canScrollNext:n}=ve();return vn("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:[Re(vl,{className:"h-4 w-4"}),Re("span",{className:"sr-only",children:"Next slide"})]})});Pl.displayName="CarouselNext";import{cva as Sl}from"class-variance-authority";import{motion as Rl}from"framer-motion";import{ChevronLeft as Tl,ChevronRight as Ll}from"lucide-react";import*as Oe from"react";import{jsx as Ze,jsxs as Dt}from"react/jsx-runtime";var Ml=Sl("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 "}}}),xv=({variant:e="simple",className:t})=>{var g;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:n,api:c}=ve(),s=(g=c==null?void 0:c.plugins())==null?void 0:g.autoplay,[m,d]=Oe.useState(0),[l,u]=Oe.useState(!1),p=Oe.useCallback(h=>{d((h==null?void 0:h.selectedScrollSnap())??0)},[]),f=Oe.useCallback(h=>()=>{s&&s.isPlaying()&&s.stop(),h()},[s]);return Oe.useEffect(()=>{!c||(p(c),u((s==null?void 0:s.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,s,p]),Dt("div",{className:i(Ml({variant:e}),t),children:[e!=="simple"&&Dt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!n,onClick:f(o),children:[Ze(Tl,{className:"h-4 w-4"}),Ze("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&Ze("div",{className:"flex items-center gap-1",children:c.slideNodes().map((h,v)=>Dt("button",{onClick:f(()=>c.scrollTo(v)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Ze("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",v===m?"bg-black":"bg-black/20",l&&v===m&&"w-6 bg-black/20"),children:l&&v===m&&Ze(Rl.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((s==null?void 0:s.options.delay)??ao)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Dt("span",{className:"sr-only",children:["Slide ",v+1]})]},v))}),e!=="simple"&&Dt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:f(r),children:[Ze(Ll,{className:"h-4 w-4"}),Ze("span",{className:"sr-only",children:"Next slide"})]})]})};import Dl from"embla-carousel-react";import{forwardRef as El,useCallback as Il,useEffect as Al}from"react";import{jsx as hr}from"react/jsx-runtime";var Tv=({className:e,...t})=>{let{api:r}=ve(),[o,a]=Dl({dragFree:!0}),n=Il(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return Al(()=>{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]),hr("div",{className:"overflow-hidden",ref:o,children:hr("div",{className:i("mx-4 flex gap-4",e),...t})})},Lv=El(({index:e,className:t,...r},o)=>{let{api:a}=ve(),n=hn();return hr("div",{ref:o,children:hr("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 Et from"@radix-ui/react-checkbox";import{forwardRef as Ol}from"react";import{jsx as no,jsxs as zl}from"react/jsx-runtime";var gt=Ol(({className:e,...t},r)=>no(Et.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:zl(Et.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[no(ir,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),no(dr,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));gt.displayName=Et.Root.displayName;import{Command as At,CommandInput as Vl,CommandItem as Hl,useCommandState as _l}from"cmdk";import{ChevronDown as Fl}from"lucide-react";import{forwardRef as Wl,isValidElement as Bl,useCallback as $l,useEffect as xr,useRef as Ul,useState as It}from"react";import*as ze from"@radix-ui/react-popover";import{Drawer as bt}from"vaul";import{jsx as Te,jsxs as vr}from"react/jsx-runtime";function xe({children:e,content:t,align:r="center",side:o="bottom",openPopover:a,setOpenPopover:n,mobileOnly:c,popoverContentClassName:s,onOpenAutoFocus:m,collisionBoundary:d,sticky:l,onEscapeKeyDown:u,onWheel:p}){let{isMobile:f}=Y();return c||f?vr(bt.Root,{open:a,onOpenChange:n,children:[Te(bt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),vr(bt.Portal,{children:[Te(bt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),vr(bt.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:g=>{g.target instanceof Element&&g.target.closest("[data-sonner-toast]")&&g.preventDefault()},children:[Te("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:Te("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),Te("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})]}),Te(bt.Overlay,{})]})]}):vr(ze.Root,{open:a,onOpenChange:n,children:[Te(ze.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Te(ze.Portal,{children:Te(ze.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:l,collisionBoundary:d,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{Fragment as yr,jsx as E,jsxs as Le}from"react/jsx-runtime";function Gl(e,t){return e===!0}function tx({multiple:e,selected:t,setSelected:r,onSelect:o,options:a,icon:n,placeholder:c="Select...",searchPlaceholder:s="Search...",emptyState:m,createLabel:d,onCreate:l,buttonProps:u,shortcutHint:p,caret:f,side:g,open:h,onOpenChange:v,onSearchChange:y,shouldFilter:w=!0,inputRight:N,inputClassName:k,optionRight:C,optionClassName:A,matchTriggerWidth:W,hideSearch:T=!1,children:P}){let G=Gl(e,r),x=Array.isArray(t)?t:t?[t]:[],{isMobile:S}=Y(),[R,L]=It(!1),X=h??R,M=v??L,[ge,Ur]=It(""),[Ko,Gr]=It(!1),[jr,Hi]=It(void 0),[_i,Yo]=It(!1),Fi=V=>{var st;if(o==null||o(V),!!r)if(G){let Ge=x.some(({value:je})=>je===V.value);r(Ge?x.filter(({value:je})=>je!==V.value):[...x,V])}else r(x.length&&((st=x[0])==null?void 0:st.value)===V.value?null:V),M(!1)},Zo=$l((V,st)=>st===""?[...V.filter(Ge=>Ge.first&&!x.some(je=>je.value===Ge.value)),...x,...V.filter(Ge=>!Ge.first&&!x.some(je=>je.value===Ge.value))]:V,[x]);return xr(()=>{Ko&&(Hi(a&&Zo(a,ge)),Gr(!1))},[Ko,a,Zo,ge]),xr(()=>{Gr(!0)},[a]),xr(()=>{X||(Ur(""),Gr(!0))},[X]),xr(()=>y==null?void 0:y(ge),[ge]),E(xe,{openPopover:X,setOpenPopover:M,align:"start",side:g,onWheel:V=>{V.stopPropagation()},popoverContentClassName:i(W&&"sm:w-[var(--radix-popover-trigger-width)]"),content:E(pe,{width:!S&&!W,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Le(At,{loop:!0,shouldFilter:w,children:[!T&&Le("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[E(Vl,{placeholder:s,value:ge,onValueChange:Ur,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:V=>{(V.key==="Escape"||V.key==="Backspace"&&!ge)&&(V.preventDefault(),V.stopPropagation(),M(!1))}}),N&&E("div",{className:"mr-2",children:N}),p&&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:p})]}),E(jl,{children:E(At.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:jr!==void 0?Le(yr,{children:[jr.map(V=>E(Kl,{option:V,multiple:G,selected:x.some(({value:st})=>st===V.value),onSelect:()=>Fi(V),right:C==null?void 0:C(V),className:A},`${V.label}, ${V.value}`)),ge.length>0&&l&&Le(Hl,{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",A),onSelect:async()=>{Yo(!0),await(l==null?void 0:l(ge))&&(Ur(""),M(!1)),Yo(!1)},children:[_i?E(Pe,{className:"size-4 shrink-0"}):E(mt,{className:"size-4 shrink-0"}),E("div",{className:"grow truncate",children:(d==null?void 0:d(ge))||`Create "${ge}"`})]}),w?E(Zl,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:m||"No matches"}):jr.length===0?E("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:m||"No matches"}):null]}):E(At.Loading,{children:E("div",{className:"flex h-12 items-center justify-center",children:E(Pe,{})})})})})]})}),children:E(te,{variant:"secondary",...u,className:i(u==null?void 0:u.className,"flex gap-2"),textWrapperClassName:i(u==null?void 0:u.textWrapperClassName,"w-full flex items-center justify-start"),text:Le(yr,{children:[E("div",{className:"min-w-0 grow truncate text-left",children:P||x.map(V=>V.label).join(", ")||c}),f&&(f===!0?E(Fl,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):f)]}),icon:n?xn(n)?n:E(n,{className:"size-4 shrink-0"}):void 0})})}var jl=({children:e})=>{let t=Ul(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Le(yr,{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 Kl({option:e,onSelect:t,multiple:r,selected:o,right:a,className:n}){return Le(yr,{children:[E(Yl,{disabledTooltip:e.disabledTooltip,children:Le(At.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&&E("div",{className:"shrink-0 text-neutral-600",children:o?E(Ca,{className:"size-4 text-neutral-600"}):E(ka,{className:"size-4 text-neutral-400"})}),Le("div",{className:"flex min-w-0 grow items-center gap-1",children:[e.icon&&E("span",{className:"shrink-0 text-neutral-600",children:xn(e.icon)?e.icon:E(e.icon,{className:"h-4 w-4"})}),E("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&E(ir,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&E(At.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Yl=({children:e,disabledTooltip:t})=>t?E(Q,{content:t,children:E("div",{children:e})}):e,xn=e=>Bl(e),Zl=Wl((e,t)=>_l(o=>o.filtered.count===0)?E("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Nr,format as ql,isSameMonth as Xl}from"date-fns";import{ChevronLeft as yn,ChevronRight as Nn,ChevronsLeft as Jl,ChevronsRight as Ql}from"lucide-react";import{forwardRef as ec,useRef as tc}from"react";import{DayPicker as rc,useDayPicker as oc,useDayRender as ac,useNavigation as nc}from"react-day-picker";import{Fragment as ic,jsx as oe,jsxs as wr}from"react/jsx-runtime";var Ot=ec(({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"})}));Ot.displayName="NavigationButton";function wn({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:n,className:c,classNames:s,...m}){return oe(rc,{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(yn,{className:"h-4 w-4"}),IconRight:()=>oe(Nn,{className:"h-4 w-4"}),Caption:({...d})=>{let{goToMonth:l,nextMonth:u,previousMonth:p,currentMonth:f,displayMonths:g}=nc(),{numberOfMonths:h,fromDate:v,toDate:y}=oc(),w=g.findIndex(P=>Xl(d.displayMonth,P)),N=w===0,k=w===g.length-1,C=h>1&&(N||!k),A=h>1&&(k||!N),W=()=>{let P=Nr(f,-1);p&&(!v||P.getTime()>=v.getTime())&&l(P)},T=()=>{let P=Nr(f,1);u&&(!y||P.getTime()<=y.getTime())&&l(P)};return wr("div",{className:"flex items-center justify-between",children:[wr("div",{className:"flex items-center gap-1",children:[o&&!A&&oe(Ot,{disabled:a||!p||v&&Nr(f,-1).getTime()<v.getTime(),"aria-label":"Go to previous year",onClick:W,icon:Jl}),!A&&oe(Ot,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&l(p),icon:yn})]}),oe("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:ql(d.displayMonth,"LLLL yyy",{locale:n})}),wr("div",{className:"flex items-center gap-1",children:[!C&&oe(Ot,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&l(u),icon:Nn}),o&&!C&&oe(Ot,{disabled:a||!u||y&&Nr(f,1).getTime()>y.getTime(),"aria-label":"Go to next year",onClick:T,icon:Ql})]})]})},Day:({date:d,displayMonth:l})=>{let u=tc(null),{activeModifiers:p,buttonProps:f,divProps:g,isButton:h,isHidden:v}=ac(d,l,u),{selected:y,today:w,disabled:N,range_middle:k}=p;if(v)return oe(ic,{});if(!h)return oe("div",{...g,className:i("flex items-center justify-center",g.className)});let{children:C,...A}=f;return wr("button",{ref:u,...A,type:"button",children:[C,w&&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":!y,"!bg-white":y,"!bg-blue-400":y&&k,"text-neutral-400":N})})]})}},...m})}import{enUS as hc}from"date-fns/locale";import{useEffect as uo,useMemo as kn,useRef as vc,useState as kr}from"react";import{Command as io}from"cmdk";import{Lock as sc}from"lucide-react";import{jsx as qe,jsxs as lc}from"react/jsx-runtime";var so=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=d=>"dateRange"in d,n=d=>"date"in d,c=(d,l)=>d.getDate()===l.getDate()&&d.getMonth()===l.getMonth()&&d.getFullYear()===l.getFullYear(),s=(d,l)=>{let u=d.from,p=l.from,f=!1;u&&p&&c(u,p)&&(f=!0);let g=d.to,h=l.to,v=!1;return g&&h&&c(g,h)&&(v=!0),f&&v},m=d=>{if(o)return o===d.id;if(a(d)){let l=r;return l&&s(l,d.dateRange)}else if(n(d)){let l=r;return l&&c(l,d.date)}return!1};return qe(io,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:qe(io.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((d,l)=>lc(io.Item,{disabled:d.requiresUpgrade,onSelect:()=>t(d),title:d.label,value:d.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(d)&&"font-semibold text-neutral-800"),children:[qe("span",{children:d.label}),d.requiresUpgrade?qe(sc,{className:"h-3.5 w-3.5","aria-hidden":"true"}):d.shortcut?qe("kbd",{className:"text-neutral-4000 hidden rounded bg-neutral-100 px-2 py-0.5 text-xs font-light group-data-[selected=true]:bg-neutral-200 md:block",children:d.shortcut.toUpperCase()}):null,d.requiresUpgrade&&d.tooltipContent&&qe(Q,{side:"bottom",content:d.tooltipContent,children:qe("div",{className:"absolute inset-0 cursor-not-allowed"})})]},l))})})};so.displayName="DatePicker.Presets";import{format as Ve}from"date-fns";import{createContext as cc}from"react";var lo=cc({isOpen:!1,setIsOpen:()=>{}}),dc=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},co=(e,t,r=!1)=>{let o=!dc(),a;return r?a=o?Ve(e,"d MMM, yyyy h:mm a",{locale:t}):Ve(e,"d MMM, yyyy HH:mm",{locale:t}):a=Ve(e,"d MMM, yyyy",{locale:t}),a},Cn=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:n,fromDay:c,toDay:s}=t;if(e&&e.length>0){let m=o,d=r;e.forEach(l=>{var u,p,f,g,h,v;if("date"in l){let y=l.date.getFullYear();if(o&&y<o)throw new Error(`Preset ${l.label} is before fromYear ${m}.`);if(r&&y>r)throw new Error(`Preset ${l.label} is after toYear ${d}.`);if(a&&l.date.getMonth()<a.getMonth())throw new Error(`Preset ${l.label} is before fromMonth ${a}.`);if(n&&l.date.getMonth()>n.getMonth())throw new Error(`Preset ${l.label} is after toMonth ${n}.`);if(c&&l.date.getDate()<c.getDate())throw new Error(`Preset ${l.label} is before fromDay ${c}.`);if(s&&l.date.getDate()>s.getDate())throw new Error(`Preset ${l.label} is after toDay ${Ve(s,"MMM dd, yyyy")}.`)}if("dateRange"in l){let y=(u=l.dateRange.from)==null?void 0:u.getFullYear(),w=(p=l.dateRange.to)==null?void 0:p.getFullYear();if(y&&o&&y<o)throw new Error(`Preset ${l.label}'s 'from' is before fromYear ${m}.`);if(w&&r&&w>r)throw new Error(`Preset ${l.label}'s 'to' is after toYear ${d}.`);if(a){let N=(f=l.dateRange.from)==null?void 0:f.getMonth();if(N&&N<a.getMonth())throw new Error(`Preset ${l.label}'s 'from' is before fromMonth ${Ve(a,"MMM, yyyy")}.`)}if(n){let N=(g=l.dateRange.to)==null?void 0:g.getMonth();if(N&&N>n.getMonth())throw new Error(`Preset ${l.label}'s 'to' is after toMonth ${Ve(n,"MMM, yyyy")}.`)}if(c){let N=(h=l.dateRange.from)==null?void 0:h.getDate();if(N&&N<c.getDate())throw new Error(`Preset ${l.dateRange.from}'s 'from' is before fromDay ${Ve(c,"MMM dd, yyyy")}.`)}if(s){let N=(v=l.dateRange.to)==null?void 0:v.getDate();if(N&&N>s.getDate())throw new Error(`Preset ${l.label}'s 'to' is after toDay ${Ve(s,"MMM dd, yyyy")}.`)}}})}};import{cva as mc}from"class-variance-authority";import{Calendar as uc,ChevronDown as pc}from"lucide-react";import{forwardRef as fc}from"react";import{jsx as Cr,jsxs as bc}from"react/jsx-runtime";var gc=mc(["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"}}}),mo=fc(({className:e,children:t,placeholder:r,hasError:o,...a},n)=>bc("button",{ref:n,className:i(gc({hasError:o}),e),...a,children:[Cr(uc,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),Cr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?Cr("span",{className:"text-neutral-400",children:r}):null)}),Cr(pc,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));mo.displayName="DatePicker.Trigger";import{jsx as ae,jsxs as Pn}from"react/jsx-runtime";var xc=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:n,disableNavigation:c,disabledDays:s,showYearNavigation:m=!1,locale:d=hc,placeholder:l="Select date range",hasError:u,align:p="center",className:f,...g})=>{let{isDesktop:h}=Y(),[v,y]=kr(!1),[w,N]=kr(a&&r?a==null?void 0:a.find(({id:L})=>L===r):void 0),[k,C]=kr((w==null?void 0:w.dateRange)??e??t??void 0),[A,W]=kr(k==null?void 0:k.to),T=kn(()=>k,[v]);uo(()=>{C(e)},[e]),uo(()=>{let L=a==null?void 0:a.find(({id:X})=>X===r);N(L),C((L==null?void 0:L.dateRange)??e??t)},[a,r]),uo(()=>{v?k&&W(k.to):W(k==null?void 0:k.to)},[v]);let P=(L,X)=>{let M=(k==null?void 0:k.from)&&(k==null?void 0:k.to)?{from:X}:L;C(M),N(void 0),(M==null?void 0:M.from)&&(M==null?void 0:M.to)&&(o==null||o(M),y(!1))},G=L=>{C(L.dateRange),N(L),o==null||o(L.dateRange,L),y(!1)},x=()=>{C(T),y(!1)},S=L=>{L||x(),y(L)},R=kn(()=>k?`${k.from?co(k.from,d):""} - ${k.to?co(k.to,d):""}`:null,[k,d]);return Ie((a==null?void 0:a.filter(L=>L.shortcut).map(L=>L.shortcut))??[],L=>{let X=a==null?void 0:a.find(M=>M.shortcut===L.key);X&&G(X)}),ae(lo.Provider,{value:{isOpen:v,setIsOpen:y},children:ae(xe,{align:p,openPopover:v,setOpenPopover:S,popoverContentClassName:"rounded-xl",content:ae("div",{className:"flex w-full",children:Pn("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(yc,{children:ae("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:ae("div",{className:"sm:py-3",children:ae(so,{currentPresetId:r,currentValue:k,presets:a,onSelect:G})})})}),ae("div",{className:"scrollbar-hide overflow-x-scroll",children:ae(wn,{mode:"range",selected:k,onSelect:P,month:A,onMonthChange:W,numberOfMonths:h?2:1,disabled:s,disableNavigation:c,showYearNavigation:m,locale:d,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...g})})]})}),children:ae(mo,{placeholder:l,disabled:n,className:f,hasError:u,"aria-required":g.required||g["aria-required"],"aria-invalid":g["aria-invalid"],"aria-label":g["aria-label"],"aria-labelledby":g["aria-labelledby"],children:(w==null?void 0:w.label)??R})})})};function _x({presets:e,...t}){return e&&Cn(e,t),ae(xc,{presets:e,...t})}function yc({children:e}){let t=vc(null),{scrollProgress:r,updateScrollProgress:o}=Ae(t);return Pn("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 Nc}from"react";import{jsx as Pr,jsxs as wc}from"react/jsx-runtime";function Kx({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=Nc();return wc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Pr("defs",{children:Pr("pattern",{id:`dots-${a}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:Pr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),Pr("rect",{fill:`url(#dots-${a})`,width:"100%",height:"100%"})]})}import Cc from"next/link";import{useEffect as kc,useState as Sn}from"react";import Pc from"swr";import{jsx as po,jsxs as Rn}from"react/jsx-runtime";function Tn({className:e}){let{data:t}=Pc("https://status.dub.co/api/v1/summary",be),[r,o]=Sn("bg-neutral-200"),[a,n]=Sn("Loading status...");return kc(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:s,name:m}=c[0],d=s==="degraded_performance"?"bg-yellow-500":"bg-red-500";n(m),o(d)}else n("All systems operational"),o("bg-green-500")},[t]),Rn(Cc,{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:[Rn("div",{className:"relative size-2",children:[po("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")}),po("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),po("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Sr,jsxs as Ln}from"react/jsx-runtime";function t2({icon:e,title:t,description:r,learnMore:o,children:a}){return Ln("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Sr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Sr(e,{className:"size-6 text-neutral-800"})}),Sr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&Ln("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Sr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),a]})}import{cva as Sc}from"class-variance-authority";import{useState as Mn}from"react";import{toast as Dn}from"sonner";import{Fragment as Tc,jsx as ye,jsxs as go}from"react/jsx-runtime";var En=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],fo={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:En,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:[...En,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Rc=Sc("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 u2({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:n,previewClassName:c,icon:s=Ma,customPreview:m,accept:d="any",imageSrc:l,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:f=!0,content:g,maxFileSizeMB:h=0,targetResolution:v,accessibilityLabel:y="File upload",disabled:w=!1}){let[N,k]=Mn(!1),[C,A]=Mn(null),W=async T=>{let P="dataTransfer"in T?T.dataTransfer.files&&T.dataTransfer.files[0]:T.target.files&&T.target.files[0];if(!P)return;if(A(P.name),h>0&&P.size/1024/1024>h){Dn.error(`File size too big (max ${h} MB)`);return}let G=fo[d].types;if(G.length&&!G.includes(P.type)){Dn.error(fo[d].errorMessage??"File type not supported");return}let x=P;if(v&&P.type.startsWith("image/"))try{let S=await Xo(P,v),R=await fetch(S).then(L=>L.blob());x=new File([R],P.name,{type:P.type})}catch(S){console.error("Error resizing image:",S)}if(t){let S=new FileReader;S.onload=R=>{var L;return r==null?void 0:r({src:(L=R.target)==null?void 0:L.result,file:x})},S.readAsDataURL(x);return}r==null||r({file:x})};return go("label",{className:i(Rc({variant:o}),w?"cursor-not-allowed":i(p&&"cursor-pointer"),a),children:[u&&ye("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:ye(St,{})}),ye("div",{className:"absolute inset-0 z-[5]",onDragOver:T=>{T.preventDefault(),T.stopPropagation(),k(!0)},onDragEnter:T=>{T.preventDefault(),T.stopPropagation(),k(!0)},onDragLeave:T=>{T.preventDefault(),T.stopPropagation(),k(!1)},onDrop:async T=>{T.preventDefault(),T.stopPropagation(),W(T),k(!1)}}),go("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",w&&"bg-neutral-50",N&&!w&&"cursor-copy border-black bg-neutral-50 opacity-100",l?i("opacity-0",f&&!w&&"group-hover:opacity-100"):i(!w&&"group-hover:bg-neutral-50")),children:[ye(s,{className:i("size-7 transition-all duration-75",w?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",N?"scale-110":"scale-100"),n)}),g!==null&&ye("div",{className:i("mt-2 text-center text-sm text-neutral-500",w&&"text-neutral-400"),children:g??ye(Tc,{children:go("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),ye("span",{className:"sr-only",children:y})]}),l&&(m??ye("img",{src:l,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",c)})),p&&ye("div",{className:"sr-only mt-1 flex shadow-sm",children:ye("input",{id:e,type:"file",accept:fo[d].types.join(","),onChange:W,disabled:w},C)})]})}import{AnimatePresence as Lc,motion as In}from"framer-motion";import{X as Mc}from"lucide-react";import Dc from"next/link";import{isValidElement as Ec}from"react";import{Fragment as Ic,jsx as ee,jsxs as zt}from"react/jsx-runtime";function On({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,className:a}){return Ie("Escape",o,{priority:1}),ee(pe,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:zt("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(Lc,{children:t==null?void 0:t.map(({key:n,value:c})=>{if(n==="loader")return ee(In.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(m=>m.key===n);return s?(s.multiple&&Array.isArray(c)?c:[c]).map(m=>{var f,g,h,v;let d=(f=s.options)==null?void 0:f.find(y=>typeof y.value=="string"&&typeof m=="string"?y.value.toLowerCase()===m.toLowerCase():y.value===m),l=(d==null?void 0:d.icon)??((g=s.getOptionIcon)==null?void 0:g.call(s,m,{key:s.key,option:d}))??s.icon,u=(d==null?void 0:d.label)??((h=s.getOptionLabel)==null?void 0:h.call(s,m,{key:s.key,option:d}))??m,p=(d==null?void 0:d.permalink)??((v=s.getOptionPermalink)==null?void 0:v.call(s,m))??null;return zt(In.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:[zt("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[ee("span",{className:"shrink-0 text-neutral-600",children:An(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?zt(Ic,{children:[ee("span",{className:"shrink-0 text-neutral-600",children:An(l)?l:ee(l,{className:"h-4 w-4"})}),p?ee(Dc,{href:p,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:Pt(u,30)}):Pt(u,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,m),children:ee(Mc,{className:"h-3.5 w-3.5"})})]},`${n}-${m}`)}):(console.error("Filter.List received an activeFilter without a corresponding filter"),null)})})}),(t==null?void 0:t.length)!==0&&zt("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 An=e=>Ec(e);import{Command as He,useCommandState as Ac}from"cmdk";import{ChevronDown as Oc,ListFilter as zc}from"lucide-react";import{Fragment as Vc,forwardRef as Hc,isValidElement as Vn,useCallback as Rr,useEffect as Tr,useImperativeHandle as _c,useRef as ho,useState as bo}from"react";import{Fragment as Gc,jsx as F,jsxs as Ne}from"react/jsx-runtime";function Hn({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:n,activeFilters:c,askAI:s,children:m,emptyState:d,className:l}){var P,G;let{isMobile:u}=Y(),p=ho(null),f=ho(),[g,h]=bo(!1);Ie("f",()=>h(!0),{enabled:!g});let[v,y]=bo(""),[w,N]=bo(null),k=Rr(()=>{y(""),N(null)},[]);Tr(()=>{g||k()},[g]);let C=w?e.find(({key:x})=>x===w):null,A=Rr(x=>{p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight}),y(""),N(x),o==null||o(x)},[]),W=Rr(x=>{if(!C||!c)return!1;let S=c.find(({key:R})=>R===w);return(S==null?void 0:S.value)===x||S&&C.multiple&&Array.isArray(S.value)&&S.value.includes(x)},[C]),T=Rr(x=>{C&&(W(x)?r(C.key,x):t(C.key,x),C.multiple||h(!1))},[c,C,s]);return Tr(()=>{a==null||a(v)},[v]),Tr(()=>{n==null||n(w)},[w]),Tr(()=>{(C==null?void 0:C.options)&&p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight})},[C==null?void 0:C.options]),F(xe,{openPopover:g,setOpenPopover:h,onEscapeKeyDown:x=>{w&&(x.preventDefault(),k())},content:F(pe,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:Ne(He,{loop:!0,shouldFilter:!C||C.shouldFilter!==!1,children:[Ne("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[F(Wc,{placeholder:`${(C==null?void 0:C.label)||"Filter"}...`,value:v,onValueChange:y,onKeyDown:x=>{(x.key==="Escape"||x.key==="Backspace"&&!v)&&(x.preventDefault(),x.stopPropagation(),w?k():h(!1))},emptySubmit:x=>{x.preventDefault(),x.stopPropagation(),s?(t("ai",C?`${C.label} ${v}`:v),h(!1)):T(v)}}),!C&&F("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"})]}),F(Bc,{ref:p,children:Ne(He.List,{className:i("flex w-full flex-col gap-1 p-1",C?"min-w-[100px]":"min-w-[180px]"),children:[C?((G=(P=C.options)==null?void 0:P.filter(x=>!v||!x.hideDuringSearch))==null?void 0:G.map(x=>{let S=W(x.value);return F(zn,{filter:C,option:x,right:S?F(wa,{className:"h-4 w-4"}):x.right,onSelect:()=>T(x.value)},x.value)}))??F(He.Loading,{children:F("div",{className:"-m-1 flex items-center justify-center",style:f.current,children:F(Pe,{})})}):e.filter(x=>!x.hideInFilterDropdown).map(x=>Ne(Vc,{children:[F(zn,{filter:x,onSelect:()=>A(x.key)}),x.separatorAfter&&F(He.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},x.key)),(!C||C.options)&&F($c,{search:v,askAI:s,children:d?Fc(d)?(d==null?void 0:d[w??"default"])??"No matches":d:"No matches"})]})},w)]})}),children:Ne("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",l),children:[F(zc,{className:"size-4 shrink-0"}),F("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?F("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):F(Oc,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Fc(e){return typeof e=="object"&&e!==null&&!Vn(e)}var Wc=e=>{let t=Ac(r=>r.filtered.count===0);return F(He.Input,{...e,size:1,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",onKeyDown:r=>{var o,a;(o=e.onKeyDown)==null||o.call(e,r),r.key==="Enter"&&t&&((a=e.emptySubmit)==null||a.call(e,r))},autoCapitalize:"none"})},Bc=Hc(({children:e},t)=>{let r=ho(null);_c(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ae(r);return Ne(Gc,{children:[F("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),F("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 zn({filter:e,option:t,right:r,onSelect:o}){var s,m;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??((m=e.getOptionLabel)==null?void 0:m.call(e,t.value,{key:e.key,option:t})):e.label;return Ne(He.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:d=>{d.preventDefault()},onPointerUp:d=>{d.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[F("span",{className:"shrink-0 text-neutral-600",children:Uc(n)?n:F(n,{className:"h-4 w-4"})}),Pt(c,48),F("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var $c=({search:e,askAI:t,children:r})=>t&&e?Ne(He.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[F(ca,{className:"h-4 w-4"}),Ne("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",Ne("span",{className:"text-black",children:['"',e,'"']})]})]}):F(He.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:r}),Uc=e=>Vn(e);var V2={Select:Hn,List:On};import{useMemo as jc,useState as _n}from"react";import{jsx as Xe,jsxs as Lr}from"react/jsx-runtime";function U2({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:n,handleSubmit:c}){let[s,m]=_n(r.defaultValue),[d,l]=_n(!1),u=jc(()=>d||!s||s===r.defaultValue,[d,s,r.defaultValue]);return Lr("form",{onSubmit:async p=>{p.preventDefault(),l(!0),await c({[r.name]:s}),l(!1)},className:"rounded-lg border border-neutral-200 bg-white",children:[Lr("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[Lr("div",{className:"flex flex-col space-y-3",children:[Xe("h2",{className:"text-xl font-medium",children:e}),Xe("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?Xe("input",{...r,type:r.type||"text",required:!0,disabled:!!n,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":n})}):Xe("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Lr("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"?Xe("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,Xe("div",{className:"shrink-0",children:Xe(te,{text:a,loading:d,disabled:u,disabledTooltip:n})})]})]})}import{useId as Kc}from"react";import{jsx as Mr,jsxs as Yc}from"react/jsx-runtime";function Je({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Kc();return Yc("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Mr("defs",{children:Mr("pattern",{id:`grid-${a}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Mr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Mr("rect",{fill:`url(#grid-${a})`,width:"100%",height:"100%"})]})}import{AlertCircle as Zc}from"lucide-react";import qc,{useCallback as Xc,useState as Jc}from"react";import{jsx as Qe,jsxs as vo}from"react/jsx-runtime";var Qc=qc.forwardRef(({className:e,type:t,...r},o)=>{let[a,n]=Jc(!1),c=Xc(()=>n(!a),[a,n]);return vo("div",{children:[vo("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}),vo("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(Zc,{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:()=>c(),"aria-label":a?"Hide password":"Show Password",children:a?Qe(Aa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Qe(Oa,{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})]})});Qc.displayName="Input";import{flip as ad,offset as nd,size as id,useDismiss as sd,useFloating as ld,useInteractions as cd}from"@floating-ui/react";import{Command as Me,useCommandState as dd}from"cmdk";import{Check as md,ChevronDown as ud,Search as pd,X as fd}from"lucide-react";import{createContext as gd,forwardRef as Un,useContext as wo,useEffect as xo,useMemo as Wn,useRef as Bn,useState as yo}from"react";import{Drawer as ht}from"vaul";import ed from"next/image";import{memo as td,useEffect as rd,useState as Fn}from"react";import{jsx as od}from"react/jsx-runtime";var Vt=td(e=>{let[t,r]=Fn(!0),[o,a]=Fn(e.src);rd(()=>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 od(ed,{...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 O,jsxs as le}from"react/jsx-runtime";var Dr=gd({inputAttrs:{},openCommandList:!1,setOpenCommandList:()=>{},inputValue:"",setInputValue:()=>{},disabled:!1,selectedItem:null,setSelectedItem:()=>{}});function yy({items:e,selectedItem:t,setSelectedItem:r,className:o,disabled:a,adjustForMobile:n,icon:c,inputAttrs:s,noItemsElement:m}){let{isMobile:d}=Y(),l=Bn(null),[u,p]=yo(!1),[f,g]=yo(""),[h,v]=yo(!1);xo(()=>{u&&v(!1)},[u]),xo(()=>v(!0),[f]),xo(()=>{t&&g(t.value)},[t]);let y=Wn(()=>{let S=f.toLowerCase();return h?e.filter(R=>R.value.toLowerCase().includes(S)):f?e.sort((R,L)=>(L.value.toLowerCase().includes(S)?1:0)-(R.value.toLowerCase().includes(S)?1:0)):e},[h,f,e]),{refs:w,floatingStyles:N,context:k}=ld({open:u,onOpenChange:p,middleware:[nd(8),id({apply({elements:{floating:S},availableHeight:R}){Object.assign(S.style,{maxHeight:`${Math.max(75,Math.min(R,290))}px`})},padding:8}),ad({fallbackStrategy:"initialPlacement",padding:8})]}),C=sd(k,{enabled:!d||!n}),{getReferenceProps:A,getFloatingProps:W}=cd([C]),T=Bn(null),{scrollProgress:P,updateScrollProgress:G}=Ae(T),x=Wn(()=>t&&t.icon?t.icon:t&&t.image?O(Vt,{src:t.image,alt:t.value,className:"size-4 rounded-full",width:16,height:16}):c||O(pd,{className:"size-4 text-neutral-400"}),[t,c]);return O(Dr.Provider,{value:{inputAttrs:s||{},openCommandList:u,setOpenCommandList:p,inputValue:f,setInputValue:g,disabled:Boolean(a),selectedItem:t,setSelectedItem:r},children:d&&n?le(ht.Root,{open:u,onOpenChange:p,children:[O(ht.Trigger,{className:"sm:hidden",asChild:!0,children:O(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:O(No,{className:o,iconElement:x})})}),O(ht.Overlay,{className:"fixed inset-0 z-40 bg-neutral-100 bg-opacity-10 backdrop-blur"}),le(ht.Portal,{children:[O(ht.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-lg border-t border-neutral-200 bg-white",onPointerDownOutside:S=>{S.target instanceof Element&&S.target.closest("[data-sonner-toast]")&&S.preventDefault()},children:le(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:[O("div",{className:"p-2",children:O(No,{className:o,iconElement:x})}),u&&le(Me.List,{className:"dub-scrollbar h-[70vh] overflow-y-auto p-2",children:[e.length===0&&f===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&O(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."}),O($n,{items:y})]})]})}),O(ht.Overlay,{})]})]}):le(Me,{ref:l,className:"relative",shouldFilter:!1,loop:!0,children:[O(No,{className:o,iconElement:x,ref:w.setReference,...A()}),u&&le("div",{ref:w.setFloating,style:N,...W(),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:T,onScroll:G,className:"grow overflow-y-auto p-2",children:[le(Me.List,{children:[e.length===0&&f===""&&(m?O("div",{children:m}):O("p",{className:"px-4 py-2 text-sm text-neutral-600",children:"No items found."})),f!==""&&O(Me.Empty,{className:"px-4 py-2 text-sm text-neutral-600",children:"No results found."})]}),O($n,{items:y})]}),O("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(P,2)}})]})]})})}var No=Un(({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:[O("div",{className:"flex shrink-0 items-center justify-center text-neutral-400",children:e}),le("div",{className:"flex h-10 grow",children:[O(bd,{}),O(hd,{})]})]})),bd=Un((e,t)=>{let r=dd(d=>d.filtered.count===0),{inputAttrs:o,openCommandList:a,setOpenCommandList:n,inputValue:c,setInputValue:s,disabled:m}=wo(Dr);return O(Me.Input,{ref:t,placeholder:(o==null?void 0:o.placeholder)||"Search...",autoFocus:a,onFocus:()=>n(!0),value:c,onValueChange:s,onKeyDown:d=>{d.key==="Escape"?(d.preventDefault(),n(!1)):d.key==="Enter"&&r?n(!1):d.key.match(/^[a-z0-9]$/i)&&!d.metaKey&&n(!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 hd(){let{setSelectedItem:e,openCommandList:t,setOpenCommandList:r,inputValue:o,setInputValue:a}=wo(Dr);return O("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?O(fd,{className:"size-4 text-neutral-400 transition-all hover:text-neutral-700"}):O(ud,{className:i("size-4 text-neutral-400 transition-all hover:text-neutral-700",{"rotate-180 transform":t})})})}function $n({items:e}){let{setSelectedItem:t,setOpenCommandList:r,setInputValue:o}=wo(Dr);return e.map(a=>le(Me.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&&O(Vt,{src:a.image,alt:a.value,className:"size-4 rounded-full",width:16,height:16}),O("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&&O(fr,{className:"text-xs",variant:"neutral",children:a.label})]}),O(md,{className:"invisible h-5 w-5 text-neutral-500 aria-selected:visible"})]},a.id))}import*as Co from"@radix-ui/react-label";import{cva as vd}from"class-variance-authority";import*as Gn from"react";import{jsx as Nd}from"react/jsx-runtime";var xd=vd("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),yd=Gn.forwardRef(({className:e,...t},r)=>Nd(Co.Root,{ref:r,className:i(xd(),e),...t}));yd.displayName=Co.Root.displayName;import{cva as wd}from"class-variance-authority";import{isValidElement as Cd}from"react";import{jsx as ko,jsxs as jn}from"react/jsx-runtime";var Po=wd(["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"},disabled:{true:"opacity-50 cursor-default text-content-disabled hover:bg-bg-default"}}});function Iy({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:n,disabledTooltip:c,...s}){return ko(ut,{tooltipProps:{content:c},children:jn(e||"button",{...e==="button"?{type:"button"}:{},className:i(Po({variant:t,disabled:!!c}),n),disabled:c?!0:s.disabled,...s,children:[jn("div",{className:"flex grow items-center gap-2",children:[o&&(kd(o)?o:ko(o,{className:"size-4"})),r]}),a&&ko("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 kd=e=>Cd(e);import{curveNatural as Kn}from"@visx/curve";import{LinearGradient as Yn}from"@visx/gradient";import{Group as Pd}from"@visx/group";import{ParentSize as Sd}from"@visx/responsive";import{scaleLinear as Rd,scaleUtc as Td}from"@visx/scale";import{Area as Ld,AreaClosed as Md}from"@visx/shape";import{motion as Zn}from"framer-motion";import{useId as Dd,useMemo as qn}from"react";import{jsx as we,jsxs as So}from"react/jsx-runtime";var Ed={top:8,right:2,bottom:2,left:2};function $y(e){return we(Sd,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&we(Id,{...{width:t,height:r,...e}})})}function Id({width:e,height:t,data:r,curve:o=!0,color:a,padding:n}){let c={...Ed,...n},s=Dd(),m=qn(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:d,xScale:l}=qn(()=>{let u=r.map(({value:v})=>v),p=Math.max(...u),f=r.map(({date:v})=>v.getTime()),g=new Date(Math.min(...f)),h=new Date(Math.max(...f));return{yScale:Rd({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:Td({domain:[g,h],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return So("svg",{width:e,height:t,children:[So("defs",{children:[we(Yn,{id:`${s}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),we(Yn,{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)`})})]}),So(Pd,{left:c.left,top:c.top,children:[we(Ld,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,curve:o?Kn:void 0,children:({path:u})=>we(Zn.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${s}-color-gradient)`})}),we(Md,{data:r,x:({date:u})=>l(u),y:({value:u})=>d(u)??0,yScale:d,curve:o?Kn:void 0,children:({path:u})=>we(Zn.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 ce from"@radix-ui/react-dialog";import*as Ro from"@radix-ui/react-visually-hidden";import{useRouter as Ad}from"next/navigation";import{Drawer as et}from"vaul";import{jsx as ne,jsxs as vt}from"react/jsx-runtime";function Zy({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:n,preventDefaultClose:c,drawerRootProps:s}){let m=Ad(),d=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:l}=Y();return l&&!n?ne(et.Root,{open:o?r:!0,onOpenChange:u=>{u||d({dragged:!0})},...s,children:vt(et.Portal,{children:[ne(et.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ne(et.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:vt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[vt(Ro.Root,{children:[ne(et.Title,{children:"Modal"}),ne(et.Description,{children:"This is a modal"})]}),ne(Od,{}),e]})}),ne(et.Overlay,{})]})}):ne(ce.Root,{open:o?r:!0,onOpenChange:u=>{u||d()},children:vt(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"}),vt(ce.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:[vt(Ro.Root,{children:[ne(ce.Title,{children:"Modal"}),ne(ce.Description,{children:"This is a modal"})]}),e]})]})})}function Od(){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 To}from"react";import{jsx as Ht,jsxs as zd}from"react/jsx-runtime";function r4({value:e,onChange:t,min:r,max:o,step:a=1,disabled:n,className:c,id:s,formatValue:m,decrementAriaLabel:d="Decrease",incrementAriaLabel:l="Increase",...u}){let p=typeof r=="number"?e>r:!0,f=typeof o=="number"?e<o:!0,g=To(y=>{let w=y;return typeof r=="number"&&(w=Math.max(r,w)),typeof o=="number"&&(w=Math.min(o,w)),w},[r,o]),h=To(()=>{n||!p||t(g(e-a))},[n,p,g,t,a,e]),v=To(()=>{n||!f||t(g(e+a))},[n,f,g,t,a,e]);return zd("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),...u,children:[Ht("button",{type:"button","aria-label":d,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:Ht(dr,{className:"block size-4"})}),Ht("div",{role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,tabIndex:0,onKeyDown:y=>{n||((y.key==="ArrowLeft"||y.key==="ArrowDown")&&(y.preventDefault(),h()),(y.key==="ArrowRight"||y.key==="ArrowUp")&&(y.preventDefault(),v()))},className:i("flex min-w-0 flex-1 items-center justify-center px-3 text-sm text-neutral-900"),prefix:"",children:m?m(e):e}),Ht("button",{type:"button","aria-label":l,onClick:v,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:Ht(mt,{className:"block size-4"})})]})}import{Fragment as Vd,jsx as Er,jsxs as xt}from"react/jsx-runtime";var Xn=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 n4({pagination:e,setPagination:t,totalCount:r,unit:o=s=>`item${s?"s":""}`,className:a,children:n,showTotalCount:c=!0}){return xt("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[xt("div",{className:"flex items-center gap-2",children:[xt("div",{children:[Er("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&xt(Vd,{children:[xt("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&&Er("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]}),n]}),xt("div",{className:"flex items-center gap-2",children:[Er("button",{type:"button",className:Xn,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Er("button",{type:"button",className:Xn,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import{jsx as Jn,jsxs as Hd}from"react/jsx-runtime";function l4({progress:e,strokeWidth:t=16,className:r}){let o=Math.min(Math.max(e,0),1),a=(100-t)/2,n=a*Math.PI*2,c=o*n;return Hd("svg",{width:"100",height:"100",viewBox:"0 0 100 100",className:i("size-3 shrink-0 text-green-600",r),children:[Jn("circle",{cx:"50",cy:"50",r:a,stroke:"#e5e5e5",strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round"}),o>0&&Jn("circle",{cx:"50",cy:"50",r:a,stroke:"currentColor",strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round",strokeDasharray:`${c} ${n-c}`,style:{transformOrigin:"50px 50px",transform:"rotate(-90deg)"}})]})}import*as _e from"@radix-ui/react-radio-group";import{Circle as _d}from"lucide-react";import*as Lo from"react";import{jsx as Ir}from"react/jsx-runtime";var Fd=Lo.forwardRef(({className:e,...t},r)=>Ir(_e.Root,{className:i("grid gap-2",e),...t,ref:r}));Fd.displayName=_e.Root.displayName;var Wd=Lo.forwardRef(({className:e,...t},r)=>Ir(_e.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:Ir(_e.Indicator,{className:"flex items-center justify-center",children:Ir(_d,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Wd.displayName=_e.Item.displayName;import{Drawer as Fe}from"vaul";import{jsx as tt,jsxs as jd}from"react/jsx-runtime";function Bd({children:e,contentProps:t,nested:r=!1,...o}){let a=r?Fe.NestedRoot:Fe.Root;return tt(a,{direction:"right",handleOnly:!0,...o,children:jd(Fe.Portal,{children:[tt(Fe.Overlay,{className:"fixed inset-0 bg-black/20","data-sheet-overlay":!0}),tt(Fe.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:tt("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-lg bg-white",children:e})})]})})}function $d({className:e,...t}){return tt(Fe.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Ud(e){return tt(Fe.Description,{...e})}function Gd(e){return tt(Fe.Close,{...e})}var b4=Object.assign(Bd,{Title:$d,Description:Ud,Close:Gd});import{useEffect as Kd,useRef as Yd,useState as Zd}from"react";import{jsx as Qn}from"react/jsx-runtime";var qd=`
3
3
  attribute vec2 position;
4
4
 
5
5
  void main()
@@ -40,14 +40,14 @@ void main(void) {
40
40
 
41
41
  gl_FragColor = fragColor;
42
42
  }
43
- `,Jd=60,Qd=1e3/Jd;function v4({dotSize:e=1,cellSize:t=3,speed:r=5,color:o=[0,0,0],className:a}){let n=Yd(null),[c,s]=Zd(!1);return Kd(()=>{let m=n.current;if(!m||!m.parentElement)return;let d=m.parentElement,l=window.devicePixelRatio||1;m.width=d.clientWidth*l,m.height=d.clientHeight*l;let u=m.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(u===null){alert("Failed to initialize WebGL");return}let p=u.createProgram();if(!p){console.error("Failed to create shader program");return}for(let P=0;P<2;++P){let G=P===0?qd:Xd,x=u.createShader(P===0?u.VERTEX_SHADER:u.FRAGMENT_SHADER);if(!x){console.error("Failed to create shader");return}u.shaderSource(x,G),u.compileShader(x),u.getShaderParameter(x,u.COMPILE_STATUS)||console.error(u.getShaderInfoLog(x)),u.attachShader(p,x),u.linkProgram(p)}u.getProgramParameter(p,u.LINK_STATUS)||console.error(u.getProgramInfoLog(p));let f=u.getAttribLocation(p,"position"),g=u.getUniformLocation(p,"time"),h=u.getUniformLocation(p,"resolution"),v=u.getUniformLocation(p,"dotSize"),y=u.getUniformLocation(p,"cellSize"),w=u.getUniformLocation(p,"speed"),N=u.getUniformLocation(p,"color");u.useProgram(p);let k=[1,1,-1,1,1,-1,-1,-1],C=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,C),u.bufferData(u.ARRAY_BUFFER,new Float32Array(k),u.STATIC_DRAW),u.enableVertexAttribArray(f),u.vertexAttribPointer(f,2,u.FLOAT,!1,0,0),u.uniform1f(v,e*window.devicePixelRatio),u.uniform1f(y,t*window.devicePixelRatio),u.uniform1f(w,r),u.uniform3f(N,o[0],o[1],o[2]);let A,W=0;function T(P){if(P-W<Qd){A=requestAnimationFrame(T);return}W=P,u&&m&&p&&(u.clear(u.COLOR_BUFFER_BIT|u.DEPTH_BUFFER_BIT),u.uniform1f(g,P/1e3),u.uniform2f(h,m.width,m.height),u.drawArrays(u.TRIANGLE_STRIP,0,4)),A=requestAnimationFrame(T)}return A=requestAnimationFrame(T),m.addEventListener("webglcontextlost",P=>{P.preventDefault(),s(!0),cancelAnimationFrame(A)}),()=>{cancelAnimationFrame(A),m.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),Qn("div",{className:i("absolute inset-0",a,c&&"opacity-0"),children:Qn("canvas",{ref:n,width:"100%",height:"100%",className:"size-full"})})}import*as We from"@radix-ui/react-slider";import{jsx as rt,jsxs as Ar}from"react/jsx-runtime";function N4({value:e,onChange:t,min:r,max:o,step:a=1,marks:n,className:c,hint:s,disabled:m}){let d=n||[r,r+(o-r)/3,r+2*(o-r)/3,o];return rt("div",{className:i("relative z-0",c),children:Ar("div",{className:"w-full",children:[Ar(We.Root,{className:"relative flex h-8 w-full items-center [--thumb-radius:13px]",value:[e],min:r,max:o,step:a,onValueChange:([l])=>t(l),disabled:m,"aria-label":"Slider",children:[Ar(We.Track,{className:"relative h-4 w-full overflow-visible rounded-full bg-neutral-200",children:[rt("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Ar("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[rt(We.Range,{className:"absolute h-4 bg-black"}),d.map(l=>{let u=(l-r)/(o-r)*100,p=l<=e;return rt("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${u}%`}},l)})]})]}),rt(We.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:rt("span",{className:"block size-4 rounded-full bg-[#171717]"})})]}),rt("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:s})]})})}import{useEffect as em,useId as tm,useRef as rm}from"react";import{jsx as Or,jsxs as ei}from"react/jsx-runtime";function P4({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=tm(),m=rm(null);return em(()=>{m.current&&c&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[c]),ei("div",{className:a,children:[r&&Or("div",{className:"flex items-center gap-2",children:Or("label",{htmlFor:`${s}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),ei("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:[Or("input",{ref:m,id:`${s}-datetime`,type:"text",placeholder:o,defaultValue:e?kt(e):"",onBlur:d=>{if(d.target.value.length>0){let l=Kr(d.target.value);l&&(t(l),d.target.value=kt(l))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let l=Kr(m.current.value);l&&(t(l),m.current.value=kt(l))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Or("input",{type:"datetime-local",id:`${s}-datetime-local`,required:n,value:e?qo(e):"",onChange:d=>{let l=new Date(d.target.value);t(l),m.current&&(m.current.value=kt(l))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as om}from"class-variance-authority";import{jsx as ti,jsxs as im}from"react/jsx-runtime";var am=om("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"}}),nm={neutral:La,new:Ra,success:Pa,pending:Ta,warning:qr,error:qr};function E4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:n,...c}){let s=r!==null?r??nm[t??"neutral"]:null;return ti(ut,{tooltipProps:{content:o},children:im("span",{className:i(am({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&&ti(s,{className:"h-3 w-3 shrink-0"}),n]})})}import*as Vr from"@radix-ui/react-switch";import{useMemo as sm}from"react";import{jsx as zr}from"react/jsx-runtime";function F4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:n,checked:c=!0,loading:s=!1,disabled:m=!1,disabledTooltip:d}){let l=sm(()=>d?!0:m||s,[d,m,s]),u=zr(Vr.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:l,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:zr(Vr.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 d?zr(Q,{content:d,children:zr("div",{className:"inline-block leading-none",children:u})}):u}import{Command as Mo}from"cmdk";import{useState as lm}from"react";import{jsx as yt,jsxs as cm}from"react/jsx-runtime";function Y4({table:e}){let[t,r]=lm(!1);return yt(xe,{openPopover:t,setOpenPopover:r,content:yt(Mo,{tabIndex:0,loop:!0,children:yt(Mo.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 cm(Mo.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:[yt("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:yt(te,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:yt(Ha,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Do,getCoreRowModel as um,useReactTable as pm}from"@tanstack/react-table";import{AnimatePresence as fm,motion as gm}from"framer-motion";import{memo as bm,useEffect as _t,useMemo as ni,useRef as hm,useState as ai}from"react";import{useEffect as dm,useState as mm}from"react";import{jsx as Hr,jsxs as ri}from"react/jsx-runtime";function oi({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,n]=mm(0);return dm(()=>{o!==0&&n(o)},[o]),Ie("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),Hr("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:ri("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[Hr("div",{className:"flex w-6 items-center justify-center",children:Hr(gt,{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"})}),ri("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"]}),Hr("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 ym,jsx as H,jsxs as de}from"react/jsx-runtime";var Eo=(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"]),vm=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 h3(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:n,pagination:c,onPaginationChange:s,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:l="onChange"}=e,u=!!e.onRowSelectionChange||!!e.selectionControls,[p,f]=ai(e.columnVisibility??{}),[g,h]=ai(e.selectedRows??{}),v=hm(null);_t(()=>{if(!m||!t)return;let N=Object.entries(g);if(N.length>0){let k=N.filter(([C])=>t.find(A=>(m==null?void 0:m(A))===C));k.length!==N.length&&h(Object.fromEntries(k))}},[t,g,m]),_t(()=>{e.selectedRows&&!Yr(e.selectedRows,g)&&h(e.selectedRows??{})},[e.selectedRows]),_t(()=>{var N;(N=e.onRowSelectionChange)==null||N.call(e,w.getSelectedRowModel().rows)},[g]),_t(()=>{e.columnVisibility&&!Yr(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),_t(()=>{var N;(N=e.onColumnVisibilityChange)==null||N.call(e,p)},[p]);let y=ni(()=>[...u?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:N})=>H("div",{className:"flex size-full items-center justify-center",children:H(gt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:N.getIsAllRowsSelected()?!0:N.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>N.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:N,table:k})=>H("div",{className:"flex size-full items-center justify-center",children:H(gt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:N.getIsSelected(),onClick:C=>{let A=m==null?void 0:m(N.original),W=k.getRowModel().rows,T=v.current!==null?W.findIndex(P=>(m==null?void 0:m(P.original))===v.current):-1;if(C.shiftKey&&v.current!==null&&T!==-1){let P=N.index,G=Math.min(T,P),x=Math.max(T,P),S=W.slice(G,x+1).map(R=>m==null?void 0:m(R.original));k.setRowSelection(R=>{let L=A!==void 0&&((R==null?void 0:R[A])??!1);return{...R,...Object.fromEntries(S.map(X=>[X,!L]))}}),v.current=A??null}else N.toggleSelected(),v.current=A??null},title:"Select"})})}]:[],...o],[u,o]),w=pm({data:t,rowCount:r,columns:y,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:um(),onPaginationChange:s,onColumnVisibilityChange:N=>f(N),onRowSelectionChange:h,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...n},rowSelection:g},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:l});return{...e,columnVisibility:p,table:w,enableColumnResizing:d}}var xm=bm(function({row:t,onRowClick:r,onRowAuxClick:o,rowProps:a,cellRight:n,tdClassName:c,table:s}){let{className:m,...d}=a||{};return H("tr",{className:i("group/row",r&&"cursor-pointer select-none",s.getRowModel().rows.length>8&&t.index===s.getRowModel().rows.length-1&&"[&_td]:border-b-0",m),onClick:r?l=>{Ke(l)||r(t,l)}:void 0,onAuxClick:o?l=>{Ke(l)||o(t,l)}:void 0,"data-selected":t.getIsSelected(),...d,children:t.getVisibleCells().map(l=>H("td",{className:i(Eo(l.column.id,!!r),"text-content-default group",Io(l.column,t.index===s.getRowModel().rows.length-1),typeof c=="function"?c(l.column.id,t):c),style:{width:l.column.getSize(),...Ao(l.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Do(l.column.columnDef.cell,l.getContext())}),n==null?void 0:n(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function v3({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:n,sortOrder:c,onSortChange:s,sortableColumns:m=[],className:d,containerClassName:l,scrollWrapperClassName:u,emptyWrapperClassName:p,thClassName:f,tdClassName:g,table:h,pagination:v,resourceName:y,onRowClick:w,onRowAuxClick:N,onRowSelectionChange:k,selectionControls:C,rowProps:A,rowCount:W,children:T,enableColumnResizing:P=!1}){let G=!!k||!!C,x=ni(()=>P?h.getVisibleLeafColumns().reduce((S,R)=>S+R.getSize(),0):"100%",[P,h.getVisibleLeafColumns()]);return de("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",l),children:[!r&&!!(e!=null&&e.length)||t?de(ym,{children:[G&&H(oi,{table:h,controls:C,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),de("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",u),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",P&&"[&_th]:group/resize"],d),style:{width:"100%",tableLayout:P?"fixed":"auto",minWidth:x},children:[H("thead",{className:"relative",children:h.getHeaderGroups().map(S=>H("tr",{children:S.headers.map(R=>{let L=m.includes(R.column.id),X=L?"button":"div";return de("th",{colSpan:R.colSpan,className:i(Eo(R.id),"text-content-emphasis select-none font-medium",Io(R.column,!h.getRowModel().rows.length),typeof f=="function"?f(R.column.id):f,P&&"relative"),style:{width:R.getSize(),...Ao(R.column)},children:[H("div",{className:"flex items-center justify-between gap-6 !pr-0",children:de(X,{className:i("flex items-center gap-2",R.column.id==="select"&&"size-full"),...L&&{type:"button",disabled:!L,"aria-label":"Sort by column",onClick:()=>s==null?void 0:s({sortBy:R.column.id,sortOrder:n!==R.column.id||c==="asc"?"desc":"asc"})},children:[R.isPlaceholder?null:Do(R.column.columnDef.header,R.getContext()),L&&n===R.column.id&&H(ma,{className:"h-3 w-3 shrink-0",order:c||"desc"})]})}),P&&R.column.getCanResize()&&!["select","menu"].includes(R.column.id)&&H("div",{onMouseDown:R.getResizeHandler(),onTouchStart:R.getResizeHandler(),onClick:M=>M.stopPropagation(),className:vm})]},R.id)})},S.id))}),H("tbody",{children:h.getRowModel().rows.map(S=>{let R=typeof A=="function"?A(S):A,{className:L,...X}=R||{};return P?H(xm,{row:S,onRowClick:w,onRowAuxClick:N,rowProps:R,cellRight:a,tdClassName:g,table:h},`${S.id}-${h.getVisibleLeafColumns().map(M=>M.id).join(",")}`):H("tr",{className:i("group/row",w&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&S.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0",L),onClick:w?M=>{Ke(M)||w(S,M)}:void 0,onAuxClick:N?M=>{Ke(M)||N(S,M)}:void 0,"data-selected":S.getIsSelected(),...X,children:S.getVisibleCells().map(M=>H("td",{className:i(Eo(M.column.id,!!w),"text-content-default group",Io(M.column,S.index===h.getRowModel().rows.length-1),typeof g=="function"?g(M.column.id,S):g),style:{minWidth:M.column.columnDef.minSize,maxWidth:M.column.columnDef.maxSize,width:M.column.columnDef.size||"auto",...Ao(M.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Do(M.column.columnDef.cell,M.getContext())}),a==null?void 0:a(M)]})},M.id))},S.id)})})]}),T]})]}):H("div",{className:i("text-content-subtle flex h-96 w-full items-center justify-center text-sm",p),children:r||o||`No ${(y==null?void 0:y(!0))||"items"} found.`}),v&&!r&&!!(e!=null&&e.length)&&!!W&&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:[H("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",de("span",{className:"font-medium",children:[((v.pageIndex-1)*v.pageSize+1).toLocaleString(),"-",Math.min((v.pageIndex-1)*v.pageSize+v.pageSize,h.getRowCount()).toLocaleString()]})," ","of"," ",H("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(y==null?void 0:y(h.getRowCount()!==1))||"items"]}),de("div",{className:"flex items-center gap-2",children:[H(te,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:v.pageIndex===1}),H(te,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:v.pageIndex===h.getPageCount()})]})]}),H(fm,{children:t&&H(gm.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:H("div",{className:"flex h-[75vh] w-full items-center justify-center",children:H(Pe,{})})})})]})}var Io=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},Ao=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 Nm,motion as ii}from"framer-motion";import wm from"next/link";import{useId as Cm}from"react";import{jsx as _r,jsxs as km}from"react/jsx-runtime";function k3({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:n,style:c}){let s=Cm();return _r(Nm,{id:s,children:_r(ii.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(m=>{let d=m.value===t,l=m.href?wm:"button";return km(l,{...m.href?{href:m.href}:{type:"button"},"data-selected":d,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!d&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(m.value),children:[typeof m.label=="string"?_r("p",{children:m.label}):m.label,m.badge,d&&_r(ii.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}})]},m.value)})})})}import{useEffect as Pm,useId as Sm,useRef as Rm,useState as Tm}from"react";import{jsx as fe,jsxs as Oo}from"react/jsx-runtime";var Lm=[{key:"utm_source",icon:Fa,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Ka,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Va,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Ua,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Ga,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:_a,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function E3({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:n}){let{isMobile:c}=Y(),s=Sm(),[m,d]=Tm(!1),l=Rm(null);return Pm(()=>{l.current&&!c&&o&&setTimeout(()=>{var u;return(u=l.current)==null?void 0:u.focus()},10)},[]),fe("div",{className:i("grid gap-y-3",n),children:Lm.map(({key:u,icon:p,label:f,placeholder:g,description:h},v)=>fe("div",{className:"group relative",children:Oo("div",{className:"relative z-10 flex",children:[fe(Q,{content:Oo("div",{className:"p-3 text-center text-xs",children:[fe("p",{className:"text-neutral-600",children:h}),fe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:Oo("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:()=>d(y=>!y),children:[fe(p,{className:"size-4 shrink-0"}),fe("label",{htmlFor:`${s}-${u}`,className:"select-none text-sm",children:m?fe("span",{className:"font-mono text-xs",children:u}):f})]})}),fe("div",{className:"min-w-0 grow",children:fe(ut,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:fe("input",{type:"text",id:`${s}-${u}`,ref:v===0?l:void 0,placeholder:g,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:y=>t(u,y.target.value)})})})]})},u))})}import{jsx as zo,jsxs as Mm}from"react/jsx-runtime";function A3(){return Mm("div",{style:Fr.backgroundMain,children:[zo("div",{style:Fr.backgroundMainBefore}),zo("div",{style:Fr.backgroundMainAfter}),zo("div",{style:Fr.backgroundContent})]})}var Fr={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,Qd=1e3/Jd;function y4({dotSize:e=1,cellSize:t=3,speed:r=5,color:o=[0,0,0],className:a}){let n=Yd(null),[c,s]=Zd(!1);return Kd(()=>{let m=n.current;if(!m||!m.parentElement)return;let d=m.parentElement,l=window.devicePixelRatio||1;m.width=d.clientWidth*l,m.height=d.clientHeight*l;let u=m.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(u===null){alert("Failed to initialize WebGL");return}let p=u.createProgram();if(!p){console.error("Failed to create shader program");return}for(let P=0;P<2;++P){let G=P===0?qd:Xd,x=u.createShader(P===0?u.VERTEX_SHADER:u.FRAGMENT_SHADER);if(!x){console.error("Failed to create shader");return}u.shaderSource(x,G),u.compileShader(x),u.getShaderParameter(x,u.COMPILE_STATUS)||console.error(u.getShaderInfoLog(x)),u.attachShader(p,x),u.linkProgram(p)}u.getProgramParameter(p,u.LINK_STATUS)||console.error(u.getProgramInfoLog(p));let f=u.getAttribLocation(p,"position"),g=u.getUniformLocation(p,"time"),h=u.getUniformLocation(p,"resolution"),v=u.getUniformLocation(p,"dotSize"),y=u.getUniformLocation(p,"cellSize"),w=u.getUniformLocation(p,"speed"),N=u.getUniformLocation(p,"color");u.useProgram(p);let k=[1,1,-1,1,1,-1,-1,-1],C=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,C),u.bufferData(u.ARRAY_BUFFER,new Float32Array(k),u.STATIC_DRAW),u.enableVertexAttribArray(f),u.vertexAttribPointer(f,2,u.FLOAT,!1,0,0),u.uniform1f(v,e*window.devicePixelRatio),u.uniform1f(y,t*window.devicePixelRatio),u.uniform1f(w,r),u.uniform3f(N,o[0],o[1],o[2]);let A,W=0;function T(P){if(P-W<Qd){A=requestAnimationFrame(T);return}W=P,u&&m&&p&&(u.clear(u.COLOR_BUFFER_BIT|u.DEPTH_BUFFER_BIT),u.uniform1f(g,P/1e3),u.uniform2f(h,m.width,m.height),u.drawArrays(u.TRIANGLE_STRIP,0,4)),A=requestAnimationFrame(T)}return A=requestAnimationFrame(T),m.addEventListener("webglcontextlost",P=>{P.preventDefault(),s(!0),cancelAnimationFrame(A)}),()=>{cancelAnimationFrame(A),m.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),Qn("div",{className:i("absolute inset-0",a,c&&"opacity-0"),children:Qn("canvas",{ref:n,width:"100%",height:"100%",className:"size-full"})})}import*as We from"@radix-ui/react-slider";import{jsx as rt,jsxs as Ar}from"react/jsx-runtime";function C4({value:e,onChange:t,min:r,max:o,step:a=1,marks:n,className:c,hint:s,disabled:m}){let d=n||[r,r+(o-r)/3,r+2*(o-r)/3,o];return rt("div",{className:i("relative z-0",c),children:Ar("div",{className:"w-full",children:[Ar(We.Root,{className:"relative flex h-8 w-full items-center [--thumb-radius:13px]",value:[e],min:r,max:o,step:a,onValueChange:([l])=>t(l),disabled:m,"aria-label":"Slider",children:[Ar(We.Track,{className:"relative h-4 w-full overflow-visible rounded-full bg-neutral-200",children:[rt("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Ar("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[rt(We.Range,{className:"absolute h-4 bg-black"}),d.map(l=>{let u=(l-r)/(o-r)*100,p=l<=e;return rt("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${u}%`}},l)})]})]}),rt(We.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:rt("span",{className:"block size-4 rounded-full bg-[#171717]"})})]}),rt("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:s})]})})}import{useEffect as em,useId as tm,useRef as rm}from"react";import{jsx as Or,jsxs as ei}from"react/jsx-runtime";function R4({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=tm(),m=rm(null);return em(()=>{m.current&&c&&setTimeout(()=>{var d;(d=m.current)==null||d.focus()},10)},[c]),ei("div",{className:a,children:[r&&Or("div",{className:"flex items-center gap-2",children:Or("label",{htmlFor:`${s}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),ei("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:[Or("input",{ref:m,id:`${s}-datetime`,type:"text",placeholder:o,defaultValue:e?kt(e):"",onBlur:d=>{if(d.target.value.length>0){let l=Kr(d.target.value);l&&(t(l),d.target.value=kt(l))}},onKeyDown:d=>{if(d.key==="Enter"&&m.current){d.preventDefault();let l=Kr(m.current.value);l&&(t(l),m.current.value=kt(l))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Or("input",{type:"datetime-local",id:`${s}-datetime-local`,required:n,value:e?qo(e):"",onChange:d=>{let l=new Date(d.target.value);t(l),m.current&&(m.current.value=kt(l))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as om}from"class-variance-authority";import{jsx as ti,jsxs as im}from"react/jsx-runtime";var am=om("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"}}),nm={neutral:La,new:Ra,success:Pa,pending:Ta,warning:qr,error:qr};function A4({className:e,variant:t,icon:r,tooltip:o,onClick:a,children:n,...c}){let s=r!==null?r??nm[t??"neutral"]:null;return ti(ut,{tooltipProps:{content:o},children:im("span",{className:i(am({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&&ti(s,{className:"h-3 w-3 shrink-0"}),n]})})}import*as Vr from"@radix-ui/react-switch";import{useMemo as sm}from"react";import{jsx as zr}from"react/jsx-runtime";function B4({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:n,checked:c=!0,loading:s=!1,disabled:m=!1,disabledTooltip:d}){let l=sm(()=>d?!0:m||s,[d,m,s]),u=zr(Vr.Root,{checked:s?!1:c,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:l,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:zr(Vr.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 d?zr(Q,{content:d,children:zr("div",{className:"inline-block leading-none",children:u})}):u}import{Command as Mo}from"cmdk";import{useState as lm}from"react";import{jsx as yt,jsxs as cm}from"react/jsx-runtime";function q4({table:e}){let[t,r]=lm(!1);return yt(xe,{openPopover:t,setOpenPopover:r,content:yt(Mo,{tabIndex:0,loop:!0,children:yt(Mo.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 cm(Mo.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:[yt("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:yt(te,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:yt(Ha,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Do,getCoreRowModel as um,useReactTable as pm}from"@tanstack/react-table";import{AnimatePresence as fm,motion as gm}from"framer-motion";import{memo as bm,useEffect as _t,useMemo as ni,useRef as hm,useState as ai}from"react";import{useEffect as dm,useState as mm}from"react";import{jsx as Hr,jsxs as ri}from"react/jsx-runtime";function oi({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,n]=mm(0);return dm(()=>{o!==0&&n(o)},[o]),Ie("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),Hr("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:ri("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[Hr("div",{className:"flex w-6 items-center justify-center",children:Hr(gt,{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"})}),ri("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"]}),Hr("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 ym,jsx as H,jsxs as de}from"react/jsx-runtime";var Eo=(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"]),vm=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 x3(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:n,pagination:c,onPaginationChange:s,getRowId:m,enableColumnResizing:d=!1,columnResizeMode:l="onChange"}=e,u=!!e.onRowSelectionChange||!!e.selectionControls,[p,f]=ai(e.columnVisibility??{}),[g,h]=ai(e.selectedRows??{}),v=hm(null);_t(()=>{if(!m||!t)return;let N=Object.entries(g);if(N.length>0){let k=N.filter(([C])=>t.find(A=>(m==null?void 0:m(A))===C));k.length!==N.length&&h(Object.fromEntries(k))}},[t,g,m]),_t(()=>{e.selectedRows&&!Yr(e.selectedRows,g)&&h(e.selectedRows??{})},[e.selectedRows]),_t(()=>{var N;(N=e.onRowSelectionChange)==null||N.call(e,w.getSelectedRowModel().rows)},[g]),_t(()=>{e.columnVisibility&&!Yr(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),_t(()=>{var N;(N=e.onColumnVisibilityChange)==null||N.call(e,p)},[p]);let y=ni(()=>[...u?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:N})=>H("div",{className:"flex size-full items-center justify-center",children:H(gt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:N.getIsAllRowsSelected()?!0:N.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>N.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:N,table:k})=>H("div",{className:"flex size-full items-center justify-center",children:H(gt,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:N.getIsSelected(),onClick:C=>{let A=m==null?void 0:m(N.original),W=k.getRowModel().rows,T=v.current!==null?W.findIndex(P=>(m==null?void 0:m(P.original))===v.current):-1;if(C.shiftKey&&v.current!==null&&T!==-1){let P=N.index,G=Math.min(T,P),x=Math.max(T,P),S=W.slice(G,x+1).map(R=>m==null?void 0:m(R.original));k.setRowSelection(R=>{let L=A!==void 0&&((R==null?void 0:R[A])??!1);return{...R,...Object.fromEntries(S.map(X=>[X,!L]))}}),v.current=A??null}else N.toggleSelected(),v.current=A??null},title:"Select"})})}]:[],...o],[u,o]),w=pm({data:t,rowCount:r,columns:y,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:d,...a},getCoreRowModel:um(),onPaginationChange:s,onColumnVisibilityChange:N=>f(N),onRowSelectionChange:h,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...n},rowSelection:g},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:d,columnResizeMode:l});return{...e,columnVisibility:p,table:w,enableColumnResizing:d}}var xm=bm(function({row:t,onRowClick:r,onRowAuxClick:o,rowProps:a,cellRight:n,tdClassName:c,table:s}){let{className:m,...d}=a||{};return H("tr",{className:i("group/row",r&&"cursor-pointer select-none",s.getRowModel().rows.length>8&&t.index===s.getRowModel().rows.length-1&&"[&_td]:border-b-0",m),onClick:r?l=>{Ke(l)||r(t,l)}:void 0,onAuxClick:o?l=>{Ke(l)||o(t,l)}:void 0,"data-selected":t.getIsSelected(),...d,children:t.getVisibleCells().map(l=>H("td",{className:i(Eo(l.column.id,!!r),"text-content-default group",Io(l.column,t.index===s.getRowModel().rows.length-1),typeof c=="function"?c(l.column.id,t):c),style:{width:l.column.getSize(),...Ao(l.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Do(l.column.columnDef.cell,l.getContext())}),n==null?void 0:n(l)]})},l.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function y3({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:n,sortOrder:c,onSortChange:s,sortableColumns:m=[],className:d,containerClassName:l,scrollWrapperClassName:u,emptyWrapperClassName:p,thClassName:f,tdClassName:g,table:h,pagination:v,resourceName:y,onRowClick:w,onRowAuxClick:N,onRowSelectionChange:k,selectionControls:C,rowProps:A,rowCount:W,children:T,enableColumnResizing:P=!1}){let G=!!k||!!C,x=ni(()=>P?h.getVisibleLeafColumns().reduce((S,R)=>S+R.getSize(),0):"100%",[P,h.getVisibleLeafColumns()]);return de("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",l),children:[!r&&!!(e!=null&&e.length)||t?de(ym,{children:[G&&H(oi,{table:h,controls:C,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),de("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",u),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",P&&"[&_th]:group/resize"],d),style:{width:"100%",tableLayout:P?"fixed":"auto",minWidth:x},children:[H("thead",{className:"relative",children:h.getHeaderGroups().map(S=>H("tr",{children:S.headers.map(R=>{let L=m.includes(R.column.id),X=L?"button":"div";return de("th",{colSpan:R.colSpan,className:i(Eo(R.id),"text-content-emphasis select-none font-medium",Io(R.column,!h.getRowModel().rows.length),typeof f=="function"?f(R.column.id):f,P&&"relative"),style:{width:R.getSize(),...Ao(R.column)},children:[H("div",{className:"flex items-center justify-between gap-6 !pr-0",children:de(X,{className:i("flex items-center gap-2",R.column.id==="select"&&"size-full"),...L&&{type:"button",disabled:!L,"aria-label":"Sort by column",onClick:()=>s==null?void 0:s({sortBy:R.column.id,sortOrder:n!==R.column.id||c==="asc"?"desc":"asc"})},children:[R.isPlaceholder?null:Do(R.column.columnDef.header,R.getContext()),L&&n===R.column.id&&H(ma,{className:"h-3 w-3 shrink-0",order:c||"desc"})]})}),P&&R.column.getCanResize()&&!["select","menu"].includes(R.column.id)&&H("div",{onMouseDown:R.getResizeHandler(),onTouchStart:R.getResizeHandler(),onClick:M=>M.stopPropagation(),className:vm})]},R.id)})},S.id))}),H("tbody",{children:h.getRowModel().rows.map(S=>{let R=typeof A=="function"?A(S):A,{className:L,...X}=R||{};return P?H(xm,{row:S,onRowClick:w,onRowAuxClick:N,rowProps:R,cellRight:a,tdClassName:g,table:h},`${S.id}-${h.getVisibleLeafColumns().map(M=>M.id).join(",")}`):H("tr",{className:i("group/row",w&&"cursor-pointer select-none",h.getRowModel().rows.length>8&&S.index===h.getRowModel().rows.length-1&&"[&_td]:border-b-0",L),onClick:w?M=>{Ke(M)||w(S,M)}:void 0,onAuxClick:N?M=>{Ke(M)||N(S,M)}:void 0,"data-selected":S.getIsSelected(),...X,children:S.getVisibleCells().map(M=>H("td",{className:i(Eo(M.column.id,!!w),"text-content-default group",Io(M.column,S.index===h.getRowModel().rows.length-1),typeof g=="function"?g(M.column.id,S):g),style:{minWidth:M.column.columnDef.minSize,maxWidth:M.column.columnDef.maxSize,width:M.column.columnDef.size||"auto",...Ao(M.column)},children:de("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Do(M.column.columnDef.cell,M.getContext())}),a==null?void 0:a(M)]})},M.id))},S.id)})})]}),T]})]}):H("div",{className:i("text-content-subtle flex h-96 w-full items-center justify-center text-sm",p),children:r||o||`No ${(y==null?void 0:y(!0))||"items"} found.`}),v&&!r&&!!(e!=null&&e.length)&&!!W&&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:[H("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",de("span",{className:"font-medium",children:[((v.pageIndex-1)*v.pageSize+1).toLocaleString(),"-",Math.min((v.pageIndex-1)*v.pageSize+v.pageSize,h.getRowCount()).toLocaleString()]})," ","of"," ",H("span",{className:"font-medium",children:h.getRowCount().toLocaleString()})," ",(y==null?void 0:y(h.getRowCount()!==1))||"items"]}),de("div",{className:"flex items-center gap-2",children:[H(te,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>h.previousPage(),disabled:v.pageIndex===1}),H(te,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>h.nextPage(),disabled:v.pageIndex===h.getPageCount()})]})]}),H(fm,{children:t&&H(gm.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:H("div",{className:"flex h-[75vh] w-full items-center justify-center",children:H(Pe,{})})})})]})}var Io=(e,t)=>{let r=e.getIsPinned();return i(r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},Ao=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 Nm,motion as ii}from"framer-motion";import wm from"next/link";import{useId as Cm}from"react";import{jsx as _r,jsxs as km}from"react/jsx-runtime";function S3({options:e,selected:t,selectAction:r,className:o,optionClassName:a,indicatorClassName:n,style:c}){let s=Cm();return _r(Nm,{id:s,children:_r(ii.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(m=>{let d=m.value===t,l=m.href?wm:"button";return km(l,{...m.href?{href:m.href}:{type:"button"},"data-selected":d,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!d&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(m.value),children:[typeof m.label=="string"?_r("p",{children:m.label}):m.label,m.badge,d&&_r(ii.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}})]},m.value)})})})}import{useEffect as Pm,useId as Sm,useRef as Rm,useState as Tm}from"react";import{jsx as fe,jsxs as Oo}from"react/jsx-runtime";var Lm=[{key:"utm_source",icon:Fa,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Ka,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Va,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Ua,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:Ga,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:_a,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function A3({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:n}){let{isMobile:c}=Y(),s=Sm(),[m,d]=Tm(!1),l=Rm(null);return Pm(()=>{l.current&&!c&&o&&setTimeout(()=>{var u;return(u=l.current)==null?void 0:u.focus()},10)},[]),fe("div",{className:i("grid gap-y-3",n),children:Lm.map(({key:u,icon:p,label:f,placeholder:g,description:h},v)=>fe("div",{className:"group relative",children:Oo("div",{className:"relative z-10 flex",children:[fe(Q,{content:Oo("div",{className:"p-3 text-center text-xs",children:[fe("p",{className:"text-neutral-600",children:h}),fe("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:Oo("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:()=>d(y=>!y),children:[fe(p,{className:"size-4 shrink-0"}),fe("label",{htmlFor:`${s}-${u}`,className:"select-none text-sm",children:m?fe("span",{className:"font-mono text-xs",children:u}):f})]})}),fe("div",{className:"min-w-0 grow",children:fe(ut,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:fe("input",{type:"text",id:`${s}-${u}`,ref:v===0?l:void 0,placeholder:g,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:y=>t(u,y.target.value)})})})]})},u))})}import{jsx as zo,jsxs as Mm}from"react/jsx-runtime";function z3(){return Mm("div",{style:Fr.backgroundMain,children:[zo("div",{style:Fr.backgroundMainBefore}),zo("div",{style:Fr.backgroundMainAfter}),zo("div",{style:Fr.backgroundContent})]})}var Fr={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%),
44
44
  radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
45
45
  radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
46
46
  radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
47
47
  radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
48
48
  radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
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 yu}from"lucide-react";import Nu from"next/image";import $e from"next/link";import{useParams as wu}from"next/navigation";import{useState as Cu}from"react";import{jsx as si}from"react/jsx-runtime";function Ft({className:e}){return si("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:si("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 Wr=[{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:ct,href:"/links"},{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:dt,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:lt,href:"/analytics"},{id:"api",title:"Dub API",description:"Programmatic link creation at scale",icon:er,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Za,href:"/integrations"}],Vo=[{icon:va,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:ba,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:fa,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:ha,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:ga,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],li=[{icon:sr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:cr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Rt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Vo}],Wt=[{icon:lr,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:nr,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Rt,title:"About",description:"Company, values, and team",href:"/about"},{icon:ya,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:za,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:Na,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Ft,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:Ia,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],ci=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],di=[{name:"Affiliate Program Terms",slug:"affiliates"},{name:"DPA",slug:"dpa"},{name:"Partner Terms",slug:"partners"},{name:"Privacy Policy",slug:"privacy"},{name:"Report Abuse",slug:"abuse"},{name:"SLA",slug:"sla"},{name:"Subprocessors",slug:"subprocessors"},{name:"Terms of Service",slug:"terms"}],W3=[{name:"X (Twitter)",icon:or,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:rr,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:tr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:ar,href:"https://www.youtube.com/@dubdotco"}];import{jsx as Dm}from"react/jsx-runtime";function Br({className:e,children:t}){return Dm("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 cu,Home as du,LayoutGrid as mu,Type as uu}from"lucide-react";import{useParams as pu}from"next/navigation";import{useCallback as fu,useContext as gu,useState as bu}from"react";import{toast as hu}from"sonner";import*as ue from"@radix-ui/react-navigation-menu";import{LayoutGroup as Km}from"framer-motion";import jt from"next/link";import{useParams as Ym,usePathname as Zm}from"next/navigation";import{createContext as qm,useId as Xm}from"react";import Jm from"swr";import{Link as bi}from"@radix-ui/react-navigation-menu";import hi from"next/image";import vi from"next/link";import{Link2 as Em}from"lucide-react";import{jsx as Z,jsxs as J}from"react/jsx-runtime";var mi={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},ot={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 ui({className:e}){return J("div",{className:i("pointer-events-none relative size-full",e),children:[J("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"})]}),J("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[J("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[J("div",{className:"p-1.5",children:[J("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(Em,{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=>J("div",{className:"flex items-center justify-between gap-2",children:[J("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:mi[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:Jt(t)})]}),J("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",mi[t].value]})]},t))})]}),Z("div",{className:"relative",children:J("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[J("div",{className:"px-3 py-2.5",children:[J("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:ot.avatarIndex*100+"%"}}),J("div",{className:"flex flex-col items-end gap-1",children:[J("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(Da,{className:"text-content-default size-3.5"}),ot.origin]}),J("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/${ot.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),ot.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:ot.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:ot.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(ot.details).map(([t,r])=>J("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 Im}from"react";import{jsx as b,jsxs as me}from"react/jsx-runtime";function pi(e){let t=Im();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:[b("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),b("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),b("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),b("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),b("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),b("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),b("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),b("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"}),b("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:b("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:[b("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"}),b("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"})]}),b("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:[b("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),b("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),b("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),b("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"}),b("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"}),b("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:b("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"})}),b("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),b("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),b("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),b("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),b("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),b("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"}),b("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:b("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:[b("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"}),b("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"})]}),b("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:[b("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),b("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),b("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),b("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"}),b("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"}),b("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:b("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"})}),b("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),b("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"}),b("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"}),b("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),b("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),b("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"}),b("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:b("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:[b("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"}),b("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"})]}),b("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:[b("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),b("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),b("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),b("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"}),b("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"}),b("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:b("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"})}),b("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),me("defs",{children:[b("clipPath",{id:`${t}-b`,children:b("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),b("clipPath",{id:`${t}-c`,children:b("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),b("clipPath",{id:`${t}-d`,children:b("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),b("clipPath",{id:`${t}-f`,children:b("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),b("clipPath",{id:`${t}-g`,children:b("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),b("clipPath",{id:`${t}-h`,children:b("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),b("clipPath",{id:`${t}-j`,children:b("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),b("clipPath",{id:`${t}-k`,children:b("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),b("clipPath",{id:`${t}-l`,children:b("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:[b("stop",{stopColor:"#030712",stopOpacity:"0"}),b("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:[b("stop",{stopColor:"#030712",stopOpacity:"0"}),b("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:[b("stop",{stopColor:"#030712",stopOpacity:"0"}),b("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as Om,jsx as De,jsxs as Bt}from"react/jsx-runtime";var Am=[{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 fi({className:e}){return De("div",{className:i("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:De("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:Am.map((t,r)=>De("div",{className:"h-[60px] w-[180px] p-[3px]",children:De("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Bt(Om,{children:[De("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),Bt("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Bt("div",{className:"flex items-center gap-1.5",children:[De("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"}),De("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),De("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,a)=>Bt("div",{className:i("flex flex-col",a===0?"pr-4":"pl-4"),children:[De("span",{className:"text-content-muted text-[6px] font-medium",children:Jt(o)}),Bt("span",{className:"text-content-default text-[9px] font-medium",children:["$",Qt(t[o])]})]},o))})]})]})})},r))})})}import{Link as zm}from"@radix-ui/react-navigation-menu";import Vm from"next/link";import{jsx as $t,jsxs as gi}from"react/jsx-runtime";var at="text-xs uppercase text-neutral-500 dark:text-white/60",Hm="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",Ce=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Ut({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:n,...c}){return $t(zm,{asChild:!0,children:$t(Vm,{className:i(Hm,a),...c,children:gi("div",{className:"flex items-center justify-between gap-3",children:[e,gi("div",{className:"flex-1",children:[$t("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&$t("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),n&&$t(la,{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 z,jsxs as Gt}from"react/jsx-runtime";var _m=[{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:z(ct,{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:z(pi,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:z(lt,{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:z(ui,{className:"absolute bottom-0 left-0 size-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:z(dt,{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:z(fi,{})}],Fm=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:z("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:z(hi,{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:z("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:z(hi,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function xi({domain:e}){return Gt("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[z("div",{className:"grid grid-cols-3 gap-4",children:_m.map(({title:t,description:r,icon:o,href:a,color:n,graphicsContainerClassName:c,graphic:s})=>z(bi,{asChild:!0,children:Gt(vi,{href:_(a,e,Ce({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:[z(Je,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),Gt("div",{className:"relative p-5 pb-0",children:[o,z("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),z("div",{className:"relative mt-10 h-40 grow",children:z("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",c),children:z("div",{className:"relative size-full",children:s})})}),z("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))}),z("div",{className:"grid grow grid-cols-2 gap-4",children:Fm.map(({title:t,description:r,href:o,graphic:a})=>z(bi,{asChild:!0,children:Gt(vi,{href:_(o,e,Ce({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:[z(Je,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),z("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),z("div",{className:"relative flex items-center justify-between px-5 py-4",children:Gt("div",{children:[z("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as Wm}from"@radix-ui/react-navigation-menu";import Bm from"next/link";import{jsx as j,jsxs as nt}from"react/jsx-runtime";var $m=[{icon:lr,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:nr,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function yi({domain:e}){return nt("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[nt("div",{className:"flex h-full flex-col p-4",children:[j("p",{className:i(at,"mb-4 ml-2"),children:"Explore"}),j("div",{className:"grid grow grid-cols-2 gap-4",children:$m.map(({icon:t,title:r,description:o,href:a})=>j(Wm,{asChild:!0,children:nt(Bm,{href:_(a,e,Ce({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:[nt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[j("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:j(Je,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),j("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)]")})]}),j(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),nt("div",{className:"relative",children:[j("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),j("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),nt("div",{className:"px-6 py-4",children:[j("p",{className:i(at,"mb-2"),children:"Company"}),j("div",{className:"flex flex-col gap-0.5",children:Wt.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>j(Ut,{className:"-mx-2",href:_(a,e,Ce({domain:e,utm_content:r})),icon:j("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:j(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]}),nt("div",{className:"px-6 py-4",children:[j("p",{className:i(at,"mb-2"),children:"Updates"}),j("div",{className:"flex flex-col gap-0.5",children:Wt.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>j(Ut,{className:"-mx-2",href:_(a,e,Ce({domain:e,utm_content:r})),icon:j("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:j(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]})]})}import{Link as Um}from"@radix-ui/react-navigation-menu";import Gm from"next/link";import{jsx as re,jsxs as Nt}from"react/jsx-runtime";var jm=[{icon:sr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:cr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Rt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function Ni({domain:e}){return Nt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[Nt("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(at,"mb-4 ml-2"),children:"Use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:jm.map(({icon:t,title:r,description:o,href:a})=>re(Um,{asChild:!0,children:Nt(Gm,{href:_(a,e,Ce({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:[Nt("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(Je,{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"}),Nt("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))})]}),Nt("div",{className:"px-6 py-4",children:[re("p",{className:i(at,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:Vo.map(({icon:t,iconClassName:r,title:o,href:a})=>re(Ut,{className:"-mx-2",href:_(a,e,Ce({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 tu,jsx as B,jsxs as wt}from"react/jsx-runtime";var Ho=qm({theme:"light"}),_o=[{name:"Product",content:xi,childItems:Wr,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:Ni,childItems:li,segments:["/solutions","/sdks"]},{name:"Resources",content:yi,childItems:Wt,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"]}],wi=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 qN({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Ym();t&&(o=t);let a=Xm(),n=mn(40),c=Zm(),{data:s,isLoading:m}=Jm(o.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return B(Ho.Provider,{value:{theme:e},children:B(Km,{id:a,children:wt("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:wt("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(jt,{className:"block w-fit py-2 pr-2",href:_("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:B($r,{})})}),wt(ue.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(ue.List,{className:"group relative z-0 flex",children:_o.map(({name:d,href:l,segments:u,content:p})=>{let f=u.some(g=>c==null?void 0:c.startsWith(g));return wt(ue.Item,{children:[B(eu,{trigger:!!p,children:l!==void 0?B(jt,{id:`nav-${l}`,href:_(l,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:wi,"data-active":f,children:d}):wt("button",{className:wi,"data-active":f,children:[d,B(Qm,{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})})]},d)})}),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(jt,{href:ke,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"}):m?null:wt(tu,{children:[B(jt,{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(jt,{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 Qm(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 eu({trigger:e,children:t}){return e?B(ue.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as ru,Menu as ou,X as au}from"lucide-react";import Ct from"next/link";import{useParams as Bo}from"next/navigation";import{useEffect as nu,useState as ki}from"react";import iu from"swr";import{Fragment as lu,jsx as D,jsxs as Ee}from"react/jsx-runtime";var Fo={"Dub Links":D("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:D(ct,{className:"size-3 text-orange-900"})}),"Dub Partners":D("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:D(dt,{className:"size-3 text-violet-900"})}),"Dub Analytics":D("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:D(lt,{className:"size-3 text-green-900"})}),"Dub API":D("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:D(er,{className:"size-3 text-neutral-900"})})};function mw({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Bo();t&&(r=t);let[o,a]=ki(!1);nu(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:n,isLoading:c}=iu(r.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return Ee("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?D(Wo,{href:ke,className:"max-[280px]:hidden",children:"Dashboard"}):c?null:Ee("div",{className:"flex gap-2 max-[280px]:hidden",children:[D(Wo,{variant:"secondary",href:`${ke}/login`,children:"Log in"}),D(Wo,{href:`${ke}/register`,children:"Sign Up"})]}),D("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?D(au,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):D(ou,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),D("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:Ee("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[_o.map(({name:s,href:m,childItems:d},l)=>D(su,{name:s,href:m,childItems:d,setOpen:a},l)),n&&Object.keys(n).length>0?D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:ke,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Ee(lu,{children:[D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:`${ke}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:`${ke}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var su=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Bo(),[n,c]=ki(!1);return r?D("li",{className:"py-3",children:Ee(pe,{height:!0,children:[Ee("button",{className:"flex w-full justify-between",onClick:()=>c(!n),children:[D("p",{className:"font-semibold",children:e}),D(ru,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",n&&"rotate-180")})]}),n&&D("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,m)=>"items"in s?Ee("div",{className:"grid grid-cols-1 gap-3",children:[D("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:s.label}),s.items.map((d,l)=>D(Ci,{item:d,setOpen:o,size:"small"},l))]},m):D(Ci,{item:s,setOpen:o},m))})]})}):t?D("li",{className:"py-3",children:D(Ct,{href:_(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},Ci=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:n="normal"})=>{let{domain:c="dub.co"}=Bo(),s=Fo==null?void 0:Fo[e];return Ee(Ct,{href:_(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:[D("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??D(o,{className:i("size-5 text-neutral-700 grayscale",n==="small"&&"size-4")})}),Ee("div",{children:[D("div",{className:"flex items-center gap-2",children:D("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&D("p",{className:"text-sm text-neutral-500",children:t})]})]})};function Wo({variant:e,className:t,...r}){return D(Ct,{...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 Pi}from"react/jsx-runtime";function Si({className:e}){return Pi("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:Pi("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 Ri}from"react/jsx-runtime";var vu=`<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 yu}from"lucide-react";import Nu from"next/image";import $e from"next/link";import{useParams as wu}from"next/navigation";import{useState as Cu}from"react";import{jsx as si}from"react/jsx-runtime";function Ft({className:e}){return si("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:si("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 Wr=[{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:ct,href:"/links"},{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:dt,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:lt,href:"/analytics"},{id:"api",title:"Dub API",description:"Programmatic link creation at scale",icon:er,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Za,href:"/integrations"}],Vo=[{icon:va,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:ba,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:fa,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:ha,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:ga,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],li=[{icon:sr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:cr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Rt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Vo}],Wt=[{icon:lr,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:nr,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Rt,title:"About",description:"Company, values, and team",href:"/about"},{icon:ya,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:za,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:Na,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Ft,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:Ia,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],ci=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],di=[{name:"Affiliate Program Terms",slug:"affiliates"},{name:"DPA",slug:"dpa"},{name:"Partner Terms",slug:"partners"},{name:"Privacy Policy",slug:"privacy"},{name:"Report Abuse",slug:"abuse"},{name:"SLA",slug:"sla"},{name:"Subprocessors",slug:"subprocessors"},{name:"Terms of Service",slug:"terms"}],$3=[{name:"X (Twitter)",icon:or,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:rr,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:tr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:ar,href:"https://www.youtube.com/@dubdotco"}];import{jsx as Dm}from"react/jsx-runtime";function Br({className:e,children:t}){return Dm("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 cu,Home as du,LayoutGrid as mu,Type as uu}from"lucide-react";import{useParams as pu}from"next/navigation";import{useCallback as fu,useContext as gu,useState as bu}from"react";import{toast as hu}from"sonner";import*as ue from"@radix-ui/react-navigation-menu";import{LayoutGroup as Km}from"framer-motion";import jt from"next/link";import{useParams as Ym,usePathname as Zm}from"next/navigation";import{createContext as qm,useId as Xm}from"react";import Jm from"swr";import{Link as bi}from"@radix-ui/react-navigation-menu";import hi from"next/image";import vi from"next/link";import{Link2 as Em}from"lucide-react";import{jsx as Z,jsxs as J}from"react/jsx-runtime";var mi={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},ot={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 ui({className:e}){return J("div",{className:i("pointer-events-none relative size-full",e),children:[J("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"})]}),J("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[J("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[J("div",{className:"p-1.5",children:[J("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(Em,{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=>J("div",{className:"flex items-center justify-between gap-2",children:[J("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:mi[t].color}}),Z("div",{className:"text-content-subtle text-xs font-medium leading-none",children:Jt(t)})]}),J("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",mi[t].value]})]},t))})]}),Z("div",{className:"relative",children:J("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[J("div",{className:"px-3 py-2.5",children:[J("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:ot.avatarIndex*100+"%"}}),J("div",{className:"flex flex-col items-end gap-1",children:[J("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(Da,{className:"text-content-default size-3.5"}),ot.origin]}),J("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/${ot.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),ot.country]})]})]}),Z("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:ot.name}),Z("div",{className:"text-content-subtle mt-px text-xs",children:ot.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(ot.details).map(([t,r])=>J("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 Im}from"react";import{jsx as b,jsxs as me}from"react/jsx-runtime";function pi(e){let t=Im();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:[b("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),b("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),b("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),b("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),b("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),b("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),b("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),b("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"}),b("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:b("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:[b("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"}),b("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"})]}),b("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:[b("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),b("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),b("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),b("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"}),b("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"}),b("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:b("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"})}),b("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),b("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),b("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),b("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),b("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),b("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"}),b("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:b("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:[b("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"}),b("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"})]}),b("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:[b("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),b("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),b("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),b("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"}),b("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"}),b("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:b("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"})}),b("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),b("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"}),b("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"}),b("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),b("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),b("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"}),b("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:b("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:[b("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"}),b("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"})]}),b("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:[b("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),b("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),b("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),b("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"}),b("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"}),b("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:b("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"})}),b("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:b("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),me("defs",{children:[b("clipPath",{id:`${t}-b`,children:b("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),b("clipPath",{id:`${t}-c`,children:b("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),b("clipPath",{id:`${t}-d`,children:b("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),b("clipPath",{id:`${t}-f`,children:b("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),b("clipPath",{id:`${t}-g`,children:b("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),b("clipPath",{id:`${t}-h`,children:b("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),b("clipPath",{id:`${t}-j`,children:b("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),b("clipPath",{id:`${t}-k`,children:b("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),b("clipPath",{id:`${t}-l`,children:b("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:[b("stop",{stopColor:"#030712",stopOpacity:"0"}),b("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:[b("stop",{stopColor:"#030712",stopOpacity:"0"}),b("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:[b("stop",{stopColor:"#030712",stopOpacity:"0"}),b("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as Om,jsx as De,jsxs as Bt}from"react/jsx-runtime";var Am=[{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 fi({className:e}){return De("div",{className:i("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:De("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:Am.map((t,r)=>De("div",{className:"h-[60px] w-[180px] p-[3px]",children:De("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Bt(Om,{children:[De("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),Bt("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Bt("div",{className:"flex items-center gap-1.5",children:[De("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"}),De("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),De("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,a)=>Bt("div",{className:i("flex flex-col",a===0?"pr-4":"pl-4"),children:[De("span",{className:"text-content-muted text-[6px] font-medium",children:Jt(o)}),Bt("span",{className:"text-content-default text-[9px] font-medium",children:["$",Qt(t[o])]})]},o))})]})]})})},r))})})}import{Link as zm}from"@radix-ui/react-navigation-menu";import Vm from"next/link";import{jsx as $t,jsxs as gi}from"react/jsx-runtime";var at="text-xs uppercase text-neutral-500 dark:text-white/60",Hm="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",Ce=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function Ut({icon:e,title:t,description:r,descriptionLines:o=1,className:a,showArrow:n,...c}){return $t(zm,{asChild:!0,children:$t(Vm,{className:i(Hm,a),...c,children:gi("div",{className:"flex items-center justify-between gap-3",children:[e,gi("div",{className:"flex-1",children:[$t("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&$t("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),n&&$t(la,{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 z,jsxs as Gt}from"react/jsx-runtime";var _m=[{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:z(ct,{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:z(pi,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:z(lt,{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:z(ui,{className:"absolute bottom-0 left-0 size-full"})},{icon:z("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:z(dt,{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:z(fi,{})}],Fm=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:z("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:z(hi,{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:z("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:z(hi,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function xi({domain:e}){return Gt("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[z("div",{className:"grid grid-cols-3 gap-4",children:_m.map(({title:t,description:r,icon:o,href:a,color:n,graphicsContainerClassName:c,graphic:s})=>z(bi,{asChild:!0,children:Gt(vi,{href:_(a,e,Ce({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:[z(Je,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),Gt("div",{className:"relative p-5 pb-0",children:[o,z("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),z("div",{className:"relative mt-10 h-40 grow",children:z("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",c),children:z("div",{className:"relative size-full",children:s})})}),z("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))}),z("div",{className:"grid grow grid-cols-2 gap-4",children:Fm.map(({title:t,description:r,href:o,graphic:a})=>z(bi,{asChild:!0,children:Gt(vi,{href:_(o,e,Ce({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:[z(Je,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),z("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),z("div",{className:"relative flex items-center justify-between px-5 py-4",children:Gt("div",{children:[z("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),z("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as Wm}from"@radix-ui/react-navigation-menu";import Bm from"next/link";import{jsx as j,jsxs as nt}from"react/jsx-runtime";var $m=[{icon:lr,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:nr,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs/introduction"}];function yi({domain:e}){return nt("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[nt("div",{className:"flex h-full flex-col p-4",children:[j("p",{className:i(at,"mb-4 ml-2"),children:"Explore"}),j("div",{className:"grid grow grid-cols-2 gap-4",children:$m.map(({icon:t,title:r,description:o,href:a})=>j(Wm,{asChild:!0,children:nt(Bm,{href:_(a,e,Ce({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:[nt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[j("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:j(Je,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),j("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)]")})]}),j(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),nt("div",{className:"relative",children:[j("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),j("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),nt("div",{className:"px-6 py-4",children:[j("p",{className:i(at,"mb-2"),children:"Company"}),j("div",{className:"flex flex-col gap-0.5",children:Wt.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>j(Ut,{className:"-mx-2",href:_(a,e,Ce({domain:e,utm_content:r})),icon:j("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:j(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]}),nt("div",{className:"px-6 py-4",children:[j("p",{className:i(at,"mb-2"),children:"Updates"}),j("div",{className:"flex flex-col gap-0.5",children:Wt.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>j(Ut,{className:"-mx-2",href:_(a,e,Ce({domain:e,utm_content:r})),icon:j("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:j(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]})]})}import{Link as Um}from"@radix-ui/react-navigation-menu";import Gm from"next/link";import{jsx as re,jsxs as Nt}from"react/jsx-runtime";var jm=[{icon:sr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:cr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:Rt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function Ni({domain:e}){return Nt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[Nt("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(at,"mb-4 ml-2"),children:"Use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:jm.map(({icon:t,title:r,description:o,href:a})=>re(Um,{asChild:!0,children:Nt(Gm,{href:_(a,e,Ce({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:[Nt("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(Je,{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"}),Nt("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))})]}),Nt("div",{className:"px-6 py-4",children:[re("p",{className:i(at,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:Vo.map(({icon:t,iconClassName:r,title:o,href:a})=>re(Ut,{className:"-mx-2",href:_(a,e,Ce({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 tu,jsx as B,jsxs as wt}from"react/jsx-runtime";var Ho=qm({theme:"light"}),_o=[{name:"Product",content:xi,childItems:Wr,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:Ni,childItems:li,segments:["/solutions","/sdks"]},{name:"Resources",content:yi,childItems:Wt,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"]}],wi=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 JN({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Ym();t&&(o=t);let a=Xm(),n=mn(40),c=Zm(),{data:s,isLoading:m}=Jm(o.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return B(Ho.Provider,{value:{theme:e},children:B(Km,{id:a,children:wt("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:wt("div",{className:"flex h-14 items-center justify-between",children:[B("div",{className:"grow basis-0",children:B(jt,{className:"block w-fit py-2 pr-2",href:_("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:B($r,{})})}),wt(ue.Root,{delayDuration:0,className:"relative hidden lg:block",children:[B(ue.List,{className:"group relative z-0 flex",children:_o.map(({name:d,href:l,segments:u,content:p})=>{let f=u.some(g=>c==null?void 0:c.startsWith(g));return wt(ue.Item,{children:[B(eu,{trigger:!!p,children:l!==void 0?B(jt,{id:`nav-${l}`,href:_(l,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:d}),className:wi,"data-active":f,children:d}):wt("button",{className:wi,"data-active":f,children:[d,B(Qm,{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})})]},d)})}),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(jt,{href:ke,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"}):m?null:wt(tu,{children:[B(jt,{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(jt,{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 Qm(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 eu({trigger:e,children:t}){return e?B(ue.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as ru,Menu as ou,X as au}from"lucide-react";import Ct from"next/link";import{useParams as Bo}from"next/navigation";import{useEffect as nu,useState as ki}from"react";import iu from"swr";import{Fragment as lu,jsx as D,jsxs as Ee}from"react/jsx-runtime";var Fo={"Dub Links":D("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:D(ct,{className:"size-3 text-orange-900"})}),"Dub Partners":D("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:D(dt,{className:"size-3 text-violet-900"})}),"Dub Analytics":D("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:D(lt,{className:"size-3 text-green-900"})}),"Dub API":D("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:D(er,{className:"size-3 text-neutral-900"})})};function pw({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Bo();t&&(r=t);let[o,a]=ki(!1);nu(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:n,isLoading:c}=iu(r.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return Ee("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?D(Wo,{href:ke,className:"max-[280px]:hidden",children:"Dashboard"}):c?null:Ee("div",{className:"flex gap-2 max-[280px]:hidden",children:[D(Wo,{variant:"secondary",href:`${ke}/login`,children:"Log in"}),D(Wo,{href:`${ke}/register`,children:"Sign Up"})]}),D("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?D(au,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):D(ou,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),D("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:Ee("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[_o.map(({name:s,href:m,childItems:d},l)=>D(su,{name:s,href:m,childItems:d,setOpen:a},l)),n&&Object.keys(n).length>0?D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:ke,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Ee(lu,{children:[D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:`${ke}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:`${ke}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var su=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Bo(),[n,c]=ki(!1);return r?D("li",{className:"py-3",children:Ee(pe,{height:!0,children:[Ee("button",{className:"flex w-full justify-between",onClick:()=>c(!n),children:[D("p",{className:"font-semibold",children:e}),D(ru,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",n&&"rotate-180")})]}),n&&D("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((s,m)=>"items"in s?Ee("div",{className:"grid grid-cols-1 gap-3",children:[D("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:s.label}),s.items.map((d,l)=>D(Ci,{item:d,setOpen:o,size:"small"},l))]},m):D(Ci,{item:s,setOpen:o},m))})]})}):t?D("li",{className:"py-3",children:D(Ct,{href:_(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},Ci=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:n="normal"})=>{let{domain:c="dub.co"}=Bo(),s=Fo==null?void 0:Fo[e];return Ee(Ct,{href:_(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:[D("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??D(o,{className:i("size-5 text-neutral-700 grayscale",n==="small"&&"size-4")})}),Ee("div",{children:[D("div",{className:"flex items-center gap-2",children:D("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&D("p",{className:"text-sm text-neutral-500",children:t})]})]})};function Wo({variant:e,className:t,...r}){return D(Ct,{...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 Pi}from"react/jsx-runtime";function Si({className:e}){return Pi("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:Pi("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 Ri}from"react/jsx-runtime";var vu=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
50
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"/>
51
51
  </svg>`,xu=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
52
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"/>
53
- </svg>`;function $r({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=pu(),{theme:a}=gu(Ho),[n,c]=bu(!1),s=fu(l=>{l.preventDefault(),c(!0)},[]),[,m]=ft();function d(l){hu.promise(m(l),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return Ri(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(Si,{className:r}):q(Ft,{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:l=>{l.stopPropagation(),c(!1)},children:Ri("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(Kt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(vu),icon:q(Ft,{className:"h-4 w-4"})}),q(Kt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(xu),icon:q(uu,{strokeWidth:2,className:"h-4 w-4"})}),q(Kt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:q(cu,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?q(Kt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:q(du,{strokeWidth:2,className:"h-4 w-4"})}):q(Kt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:q(mu,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Kt({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 I,jsxs as $}from"react/jsx-runtime";var ku=[{name:"Twitter",icon:or,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:rr,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:tr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:ar,href:"https://www.youtube.com/@dubdotco"}],Yt={product:[...Wr.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"},{name:"Privacy",href:"/privacy"}],compare:ci.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`,product:"links"})).concat(["Rewardful","PartnerStack","Tolt"].map(e=>({name:e,href:e==="Rewardful"?"/blog/dub-vs-rewardful":`/help/article/migrating-from-${e.toLowerCase()}`,product:"partners"})))},Zt="text-sm font-medium text-neutral-900",qt="flex flex-col mt-2.5 gap-3.5",it="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function Bw({staticDomain:e,className:t}){let{domain:r="dub.co"}=wu();e&&(r=e);let[o,a]=Cu(!1);return I(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:$("footer",{children:[$("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[$("div",{className:"flex flex-col gap-6",children:[I("div",{className:"grow",children:$($e,{href:_("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[$("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:ku.map(({name:n,icon:c,href:s})=>$("a",{href:s,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[I("span",{className:"sr-only",children:n}),I(c,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},n))})]}),$("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{className:"grid gap-8",children:[$("div",{children:[I("h3",{className:Zt,children:"Product"}),I("ul",{role:"list",className:qt,children:Yt.product.map(n=>I("li",{children:$($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:[n.id&&I(Zr,{product:n.id}),n.name]})},n.name))})]}),$("div",{children:[I("h3",{className:Zt,children:"Solutions"}),I("ul",{role:"list",className:qt,children:Yt.solutions.map(n=>I("li",{children:I($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:n.name})},n.name))})]})]}),$("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Zt,children:"Resources"}),I("ul",{role:"list",className:qt,children:Yt.resources.map(n=>I("li",{children:$($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),target:n.target,className:i(it,"gap-1"),children:[n.name,n.target&&I(ja,{className:"size-3.5"})]})},n.name))})]})]}),$("div",{className:"md:grid md:grid-cols-2",children:[I("div",{className:"grid gap-8",children:$("div",{children:[I("h3",{className:Zt,children:"Company"}),$("ul",{role:"list",className:qt,children:[Yt.company.map(n=>I("li",{children:I($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(it,"gap-1"),children:n.name})},n.name)),I("li",{className:"-mt-1",children:I(xe,{content:I("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:di.map(n=>I($e,{href:_(`/legal/${n.slug}`,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(Po({variant:"default"}),it,"justify-start font-normal"),children:n.name},n.name))}),openPopover:o,setOpenPopover:a,children:$("button",{className:it,children:["Legal",I(yu,{className:"size-3.5"})]})})})]})]})}),$("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Zt,children:"Compare"}),I("ul",{role:"list",className:qt,children:Yt.compare.map(n=>I("li",{children:$($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:[I(Zr,{product:n.product}),n.name]})},n.name))})]})]})]})]}),$("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[I(Tn,{}),I($e,{href:_("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:I(Nu,{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"})}),$("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as Pu,motion as Su}from"framer-motion";import{useEffect as Ru,useState as Tu}from"react";import{jsx as Ti}from"react/jsx-runtime";var Li=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,n]=Tu(!1);Ru(()=>{n(!0)},[]);let c=r?Su.div:"div";return Ti(Pu,{children:a?Ti(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Lu}from"class-variance-authority";import{toast as Mu}from"sonner";import{jsx as $o,jsxs as Eu}from"react/jsx-runtime";var Du=Lu("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 e6({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[n,c]=ft(),s=o||sa;return Eu("button",{onClick:m=>{m.stopPropagation(),Mu.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(Du({variant:e}),r),type:"button",children:[$o("span",{className:"sr-only",children:"Copy"}),n?$o(pa,{className:"h-3.5 w-3.5"}):$o(s,{className:"h-3.5 w-3.5"})]})}import{toast as Iu}from"sonner";import{jsx as Au}from"react/jsx-runtime";function n6({value:e,children:t,className:r,successMessage:o}){let[a,n]=ft();return Au("button",{onClick:c=>{c.stopPropagation(),Iu.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 Ou,jsxs as zu}from"react/jsx-runtime";function s6({icon:e,text:t}){return zu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Ou("p",{className:"truncate text-sm",children:t})]})}import{jsx as Vu}from"react/jsx-runtime";var c6=({children:e})=>Vu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Uo}from"react/jsx-runtime";function f6({apexDomain:e,className:t,imageProps:r}){return e?Uo(Vt,{src:`${na}${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}):Uo("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:Uo(Wa,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Mi}from"lucide-react";import{useSearchParams as Hu}from"next/navigation";import{useEffect as _u,useMemo as Fu,useRef as Wu}from"react";import Bu from"swr";import{useDebounce as $u}from"use-debounce";import{Fragment as Di,jsx as K,jsxs as Ue}from"react/jsx-runtime";function k6({defaultUrl:e}){let t=Hu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=$u(ea(r),500),a=Fu(()=>aa(o||""),[o]),{data:n,isValidating:c}=Bu(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,be,{revalidateOnFocus:!1}),{title:s,description:m,image:d}=n||{},l=Wu(null);_u(()=>{!e&&l.current&&l.current.select()},[e]);let{isMobile:u}=Y();return Ue(Di,{children:[!e&&Ue("div",{className:"relative flex items-center",children:[K(Mi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{ref:l,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"})]}),Ue("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(St,{})}),d?K("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Ue("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[K(da,{className:"h-8 w-8 text-neutral-400"}),K("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Ue("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?K("p",{className:"text-sm text-[#536471]",children:a}):K("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),s?K("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:s}):K("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?K("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):Ue("div",{className:"grid gap-2",children:[K("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),K("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function P6({defaultUrl:e}){return Ue(Di,{children:[Ue("div",{className:"relative flex items-center",children:[K(Mi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),K("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(St,{})})})]})}import{AnimatePresence as Uu}from"framer-motion";import Ei from"js-cookie";import{createContext as Gu,useState as ju}from"react";import{jsx as Go}from"react/jsx-runtime";var Ku=Gu({hidePopup:()=>{}});function E6({children:e,hiddenCookieId:t}){let[r,o]=ju(Ei.get(t)==="1"),a=()=>{o(!0),Ei.set(t,"1")};return Go(Li,{children:Go(Ku.Provider,{value:{hidePopup:a},children:Go(Uu,{children:!r&&e})})})}import{motion as Yu}from"framer-motion";import{jsx as Ii}from"react/jsx-runtime";function z6({value:e=0,max:t=100,className:r}){return Ii("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Ii(Yu.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 Oi}from"class-variance-authority";import{LayoutGroup as Zu,motion as qu}from"framer-motion";import Xu from"next/link";import{useId as Ju}from"react";import{jsx as Xt,jsxs as Ai}from"react/jsx-runtime";var Qu=Oi("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"}}),ep=Oi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function K6({variant:e,options:t,selected:r,onSelect:o,className:a}){let n=Ju();return Xt("div",{className:i("flex text-sm",a),children:Xt(Zu,{id:n,children:t.map(({id:c,label:s,href:m,target:d})=>{let l=c===r;return Ai(m?Xu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[Ai("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:i(Qu({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":l,"aria-selected":l,children:[s,d==="_blank"&&Xt(xa,{className:"size-2.5"})]}),l&&Xt(qu.div,{layoutId:"indicator",transition:{duration:.1},className:ep({variant:e}),children:Xt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as jo,jsxs as zi}from"react/jsx-runtime";var tp=[{icon:qa,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Ea,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:Ya,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Ba,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function q6(){return zi("div",{className:"p-3",children:[jo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),jo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:tp.map(({text:e,icon:t,href:r})=>zi("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[jo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Vi,jsxs as rp}from"react/jsx-runtime";function Q6({className:e}){return rp("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:[Vi("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"}),Vi("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{ao as AUTOPLAY_DEFAULT_DELAY,Nb as Accordion,Ui as AccordionContent,Bi as AccordionItem,$i as AccordionTrigger,q6 as AdvancedLinkFeaturesTooltip,Np as Africa,Ip as Airtm,Yi as Alert,qi as AlertDescription,Zi as AlertTitle,Rp as Amazon,Fp as AndroidLogo,pe as AnimatedSizeContainer,Wp as AppleLogo,Bp as ArrowBoldUp,$p as ArrowRight,Up as ArrowTrendUp,Gp as ArrowTurnLeft,jp as ArrowTurnRight2,xa as ArrowUpRight,op as ArrowUpRight2,Kp as ArrowsOppositeDirectionX,Yp as ArrowsOppositeDirectionY,wp as Asia,Wo as AuthButton,Lb as Avatar,A3 as Background,fr as Badge,Zp as BadgeCheck,qp as BadgeCheck2Fill,qb as BadgeTooltip,Xp as Bell,Jp as Blog,Vt as BlurImage,Qp as Bolt,e0 as BoltFill,r0 as Book2,nr as Book2Fill,o0 as Book2Small,t0 as BookOpen,a0 as Books2,n0 as BoxArchive,i0 as BracketsCurly,ya as BriefcaseFill,s0 as Brush,l0 as BulletList,Na as BulletListFill,te as Button,Xb as ButtonTooltip,ci as COMPARE_PAGES,c0 as Calculator,wn as Calendar,p0 as Calendar6,m0 as CalendarDays,d0 as CalendarIcon,u0 as CalendarRefresh,hp as CardAmex,vp as CardDiscover,N1 as CardList,xp as CardMastercard,Qh as CardSelector,yp as CardVisa,f0 as Cards,g0 as CaretUpFill,Nl as Carousel,wl as CarouselContent,Cl as CarouselItem,hv as CarouselNavBar,Pl as CarouselNext,kl as CarouselPrevious,Rv as CarouselThumbnail,Sv as CarouselThumbnails,Ap as CashApp,b0 as ChartActivity2,h0 as ChartArea2,v0 as ChartLine,Tp as ChatGPT,wa as Check,ir as Check2,gt as Checkbox,Ca as CheckboxCheckedFill,ka as CheckboxUnchecked,x0 as ChevronLeft,y0 as ChevronRight,Pa as CircleCheck,Sa as CircleCheckFill,N0 as CircleDollar,w0 as CircleDotted,Ra as CircleHalfDottedCheck,Ta as CircleHalfDottedClock,La as CircleInfo,C0 as CirclePercentage,k0 as CirclePlay,P0 as CirclePlayFill,S0 as CircleQuestion,R0 as CircleUser,qr as CircleWarning,T0 as CircleXmark,L0 as Circles,M0 as Circles3,Li as ClientOnly,Ma as CloudUpload,D0 as Code,E0 as ColorPalette2,Qv as Combobox,Q6 as CompositeLogo,I0 as ConnectedDots,O0 as ConnectedDots4,A0 as ConnectedDotsFill,z0 as Connections3,sa as Copy,e6 as CopyButton,n6 as CopyText,V0 as CreditCard,H0 as Crosshairs3,_0 as Crown,ap as CrownSmall,F0 as Cube,W0 as CubeSettings,B0 as CubeSettingsFill,$0 as CurrencyDollar,Da as CursorRays,U0 as DatabaseKey,lo as DatePickerContext,Vx as DateRangePicker,G0 as Desktop,j0 as DiamondTurnRight,sr as DiamondTurnRightFill,K0 as Directions,Y0 as Discount,Z0 as Dots,Gx as DotsPattern,q0 as Download,lt as DubAnalyticsIcon,er as DubApiIcon,np as DubCraftedShield,ct as DubLinksIcon,dt as DubPartnersIcon,Zr as DubProductIcon,Tn as DubStatusBadge,X0 as Duplicate,ut as DynamicTooltipWrapper,Ea as Earth,J0 as EarthPosition,Y4 as EditColumnsButton,Qx as EmptyState,Q0 as Envelope,ef as EnvelopeAlert,tf as EnvelopeArrowRight,Ia as EnvelopeFill,Cp as Europe,la as ExpandingArrow,Aa as Eye,Oa as EyeSlash,Wr as FEATURES_LIST,dp as Facebook,za as FeatherFill,Lp as Figma,rf as FileContent,d2 as FileUpload,of as FileZip2,O2 as Filter,nf as Filter2,af as FilterBars,lf as Flag2,Va as Flag6,sf as FlagWavy,cf as Flask,df as FlaskSmall,mf as Folder,bf as Folder5,uf as FolderBookmark,pf as FolderLock,ff as FolderPlus,gf as FolderShield,Bw as Footer,B2 as Form,hf as GamingConsole,vf as Gauge6,Ha as Gear,xf as Gear2,yf as Gear3,Nf as Gem,_a as Gift,wf as GiftFill,Mp as GitHubEnhanced,tr as Github,Cf as Globe,Wa as Globe2,Fa as GlobePointer,kf as GlobeSearch,fa as Go,mp as Google,Dp as GoogleEnhanced,Pf as GreekTemple,Je as Grid,Sf as GridIcon,Rf as GridLayoutRows,Tf as GridPlus,Lf as GripDotsVertical,Mf as Headset,Df as Heart,Ef as HeartFill,If as HexadecagonStar,Af as History,Of as Hyperlink,ip as IOSAppStore,s6 as IconMenu,zf as Icosahedron,Ba as Incognito,Vf as InfinityIcon,Yb as InfoTooltip,c6 as InlineSnippet,Qc as Input,Hf as InputField,_f as InputPassword,$a as InputPasswordPointer,Ua as InputSearch,vy as InputSelect,up as Instagram,Ff as InvoiceDollar,Wf as Key,an as KeyboardShortcutContext,ih as KeyboardShortcutProvider,di as LEGAL_PAGES,yd as Label,Bf as LayoutSidebar,$f as License,lr as LifeRing,Uf as LinesY,jf as Link4,Gf as LinkBroken,f6 as LinkLogo,k6 as LinkPreview,P6 as LinkPreviewPlaceholder,rr as LinkedIn,Kb as LinkifyTooltipContent,St as LoadingCircle,cp as LoadingDots,Pe as LoadingSpinner,Kf as LocationPin,Yf as Lock,Zf as LockFill,Ft as Logo,ca as Magic,qf as Magnifier,Xf as MapPosition,sp as MarkdownIcon,Jf as MarketingTarget,lp as MatrixLines,Br as MaxWidthWrapper,Qf as Menu3,Dy as MenuItem,eg as MessageSmile,cr as MicrophoneFill,Wy as MiniAreaChart,dr as Minus,tg as MobilePhone,Ky as Modal,rg as MoneyBill,og as MoneyBill2,ag as MoneyBills2,ng as Msgs,qN as Nav,Ho as NavContext,mw as NavMobile,$r as NavWordmark,kp as NorthAmerica,ig as Note,fg as NucleoPhoto,e4 as NumberStepper,Zb as NumberTooltip,Pp as Oceania,sg as OfficeBuilding,gb as PLAN_FEATURE_ICONS,Ga as Page2,o4 as PaginationControls,lg as Paintbrush,cg as Palette2,dg as PaperPlane,Op as Payoneer,zp as Paypal,ug as Pen2,mg as PenWriting,pg as PercentageArrowDown,da as Photo,ga as Php,gg as Plug2,mt as Plus,bg as Plus2,xe as Popover,E6 as Popup,Ku as PopupContext,hg as Post,pp as ProductHunt,z6 as ProgressBar,i4 as ProgressCircle,vg as Pyramid,ba as Python,xg as QRCode,Wt as RESOURCES,Fd as RadioGroup,Wd as RadioGroupItem,yg as Receipt2,ja as ReferredVia,Ng as Refresh2,wg as Robot,ha as Ruby,Vo as SDKS,W3 as SOCIAL_LINKS,li as SOLUTIONS,Ka as SatelliteDish,Cg as ScanText,kg as Scribble,f4 as Sheet,Pg as ShieldAlert,Sg as ShieldCheck,Rg as ShieldKeyhole,Tg as ShieldSlash,Lg as ShieldUser,v4 as ShimmerDots,Mg as Shuffle,jb as SimpleTooltipContent,fp as Slack,N4 as Slider,Dg as Sliders,P4 as SmartDateTimePicker,ma as SortOrder,Sp as SouthAmerica,Eg as Sparkle3,Ep as Spotify,Ig as SquareChart,Ag as SquareLayoutGrid5,Og as SquareLayoutGrid6,zg as SquareUserSparkle2,Vg as SquareXmark,Hg as Stars2,E4 as StatusBadge,Vp as Stripe,Hp as StripeLink,ua as Success,F4 as Switch,Yg as TV,K6 as TabSelect,v3 as Table,_g as TableIcon,Fg as TableRows2,Wg as Tablet,Bg as Tag,$g as Tags,pa as Tick,gp as TikTok,Ya as Timer2,Za as Toggle2Fill,k3 as ToggleGroup,Ug as Toggles,Mb as TokenAvatar,Q as Tooltip,Gb as TooltipContent,Ub as TooltipProvider,Gg as Trash,jg as TriangleWarning,Kg as Trophy,or as Twitter,va as Typescript,E3 as UTMBuilder,Lm as UTM_PARAMETERS,Zg as UiCard,bp as Unsplash,qg as User,Xg as UserCheck,Jg as UserCrown,Qg as UserDelete,eb as UserFocus,tb as UserMinus,rb as UserPlus,ob as UserXmark,ab as Users,ib as Users2,sb as Users6,Rt as UsersFill,nb as UsersSettings,_p as Venmo,lb as Versions2,qa as Views,cb as Watch,db as Webhook,mb as Window,ub as WindowSearch,pb as WindowSettings,Si as Wordmark,fb as Xmark,ar as YouTube,ts as badgeVariants,se as buttonVariants,Qi as getUserAvatarUrl,Po as menuItemVariants,_o as navItems,am as statusBadgeVariants,ve as useCarousel,hn as useCarouselActiveIndex,S1 as useColumnVisibility,M1 as useCookies,ft as useCopyToClipboard,O1 as useCurrentAnchor,_1 as useCurrentSubdomain,$1 as useEnterSubmit,K1 as useInViewport,q1 as useInputFocused,eh as useIntersectionObserver,Ie as useKeyboardShortcut,eo as useLocalStorage,Y as useMediaQuery,mh as useOptimisticUpdate,Ch as usePagination,Sh as useRemoveGAParams,gr as useResizeObserver,ln as useRouterStuff,mn as useScroll,Ae as useScrollProgress,h3 as useTable,sn as useTablePagination,Wh as useToastWithUndo};
53
+ </svg>`;function $r({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=pu(),{theme:a}=gu(Ho),[n,c]=bu(!1),s=fu(l=>{l.preventDefault(),c(!0)},[]),[,m]=ft();function d(l){hu.promise(m(l),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return Ri(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(Si,{className:r}):q(Ft,{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:l=>{l.stopPropagation(),c(!1)},children:Ri("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(Kt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>d(vu),icon:q(Ft,{className:"h-4 w-4"})}),q(Kt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>d(xu),icon:q(uu,{strokeWidth:2,className:"h-4 w-4"})}),q(Kt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:q(cu,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?q(Kt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:q(du,{strokeWidth:2,className:"h-4 w-4"})}):q(Kt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:q(mu,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Kt({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 I,jsxs as $}from"react/jsx-runtime";var ku=[{name:"Twitter",icon:or,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:rr,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:tr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:ar,href:"https://www.youtube.com/@dubdotco"}],Yt={product:[...Wr.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"},{name:"Privacy",href:"/privacy"}],compare:ci.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`,product:"links"})).concat(["Rewardful","PartnerStack","Tolt"].map(e=>({name:e,href:e==="Rewardful"?"/blog/dub-vs-rewardful":`/help/article/migrating-from-${e.toLowerCase()}`,product:"partners"})))},Zt="text-sm font-medium text-neutral-900",qt="flex flex-col mt-2.5 gap-3.5",it="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function Uw({staticDomain:e,className:t}){let{domain:r="dub.co"}=wu();e&&(r=e);let[o,a]=Cu(!1);return I(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:$("footer",{children:[$("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[$("div",{className:"flex flex-col gap-6",children:[I("div",{className:"grow",children:$($e,{href:_("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[$("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:ku.map(({name:n,icon:c,href:s})=>$("a",{href:s,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[I("span",{className:"sr-only",children:n}),I(c,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},n))})]}),$("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[$("div",{className:"md:grid md:grid-cols-2",children:[$("div",{className:"grid gap-8",children:[$("div",{children:[I("h3",{className:Zt,children:"Product"}),I("ul",{role:"list",className:qt,children:Yt.product.map(n=>I("li",{children:$($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:[n.id&&I(Zr,{product:n.id}),n.name]})},n.name))})]}),$("div",{children:[I("h3",{className:Zt,children:"Solutions"}),I("ul",{role:"list",className:qt,children:Yt.solutions.map(n=>I("li",{children:I($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:n.name})},n.name))})]})]}),$("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Zt,children:"Resources"}),I("ul",{role:"list",className:qt,children:Yt.resources.map(n=>I("li",{children:$($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),target:n.target,className:i(it,"gap-1"),children:[n.name,n.target&&I(ja,{className:"size-3.5"})]})},n.name))})]})]}),$("div",{className:"md:grid md:grid-cols-2",children:[I("div",{className:"grid gap-8",children:$("div",{children:[I("h3",{className:Zt,children:"Company"}),$("ul",{role:"list",className:qt,children:[Yt.company.map(n=>I("li",{children:I($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(it,"gap-1"),children:n.name})},n.name)),I("li",{className:"-mt-1",children:I(xe,{content:I("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:di.map(n=>I($e,{href:_(`/legal/${n.slug}`,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(Po({variant:"default"}),it,"justify-start font-normal"),children:n.name},n.name))}),openPopover:o,setOpenPopover:a,children:$("button",{className:it,children:["Legal",I(yu,{className:"size-3.5"})]})})})]})]})}),$("div",{className:"mt-10 md:mt-0",children:[I("h3",{className:Zt,children:"Compare"}),I("ul",{role:"list",className:qt,children:Yt.compare.map(n=>I("li",{children:$($e,{href:_(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:it,children:[I(Zr,{product:n.product}),n.name]})},n.name))})]})]})]})]}),$("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[I(Tn,{}),I($e,{href:_("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:I(Nu,{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"})}),$("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import{AnimatePresence as Pu,motion as Su}from"framer-motion";import{useEffect as Ru,useState as Tu}from"react";import{jsx as Ti}from"react/jsx-runtime";var Li=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,n]=Tu(!1);Ru(()=>{n(!0)},[]);let c=r?Su.div:"div";return Ti(Pu,{children:a?Ti(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as Lu}from"class-variance-authority";import{toast as Mu}from"sonner";import{jsx as $o,jsxs as Eu}from"react/jsx-runtime";var Du=Lu("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 r6({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[n,c]=ft(),s=o||sa;return Eu("button",{onClick:m=>{m.stopPropagation(),Mu.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(Du({variant:e}),r),type:"button",children:[$o("span",{className:"sr-only",children:"Copy"}),n?$o(pa,{className:"h-3.5 w-3.5"}):$o(s,{className:"h-3.5 w-3.5"})]})}import{toast as Iu}from"sonner";import{jsx as Au}from"react/jsx-runtime";function s6({value:e,children:t,className:r,successMessage:o}){let[a,n]=ft();return Au("button",{onClick:c=>{c.stopPropagation(),Iu.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 Ou,jsxs as zu}from"react/jsx-runtime";function c6({icon:e,text:t}){return zu("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Ou("p",{className:"truncate text-sm",children:t})]})}import{jsx as Vu}from"react/jsx-runtime";var m6=({children:e})=>Vu("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as Uo}from"react/jsx-runtime";function b6({apexDomain:e,className:t,imageProps:r}){return e?Uo(Vt,{src:`${na}${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}):Uo("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:Uo(Wa,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Mi}from"lucide-react";import{useSearchParams as Hu}from"next/navigation";import{useEffect as _u,useMemo as Fu,useRef as Wu}from"react";import Bu from"swr";import{useDebounce as $u}from"use-debounce";import{Fragment as Di,jsx as K,jsxs as Ue}from"react/jsx-runtime";function S6({defaultUrl:e}){let t=Hu(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=$u(ea(r),500),a=Fu(()=>aa(o||""),[o]),{data:n,isValidating:c}=Bu(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,be,{revalidateOnFocus:!1}),{title:s,description:m,image:d}=n||{},l=Wu(null);_u(()=>{!e&&l.current&&l.current.select()},[e]);let{isMobile:u}=Y();return Ue(Di,{children:[!e&&Ue("div",{className:"relative flex items-center",children:[K(Mi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{ref:l,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"})]}),Ue("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(St,{})}),d?K("img",{src:d,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Ue("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[K(da,{className:"h-8 w-8 text-neutral-400"}),K("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Ue("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?K("p",{className:"text-sm text-[#536471]",children:a}):K("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),s?K("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:s}):K("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?K("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):Ue("div",{className:"grid gap-2",children:[K("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),K("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function R6({defaultUrl:e}){return Ue(Di,{children:[Ue("div",{className:"relative flex items-center",children:[K(Mi,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),K("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),K("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:K("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:K(St,{})})})]})}import{AnimatePresence as Uu}from"framer-motion";import Ei from"js-cookie";import{createContext as Gu,useState as ju}from"react";import{jsx as Go}from"react/jsx-runtime";var Ku=Gu({hidePopup:()=>{}});function A6({children:e,hiddenCookieId:t}){let[r,o]=ju(Ei.get(t)==="1"),a=()=>{o(!0),Ei.set(t,"1")};return Go(Li,{children:Go(Ku.Provider,{value:{hidePopup:a},children:Go(Uu,{children:!r&&e})})})}import{motion as Yu}from"framer-motion";import{jsx as Ii}from"react/jsx-runtime";function H6({value:e=0,max:t=100,className:r}){return Ii("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Ii(Yu.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 Oi}from"class-variance-authority";import{LayoutGroup as Zu,motion as qu}from"framer-motion";import Xu from"next/link";import{useId as Ju}from"react";import{jsx as Xt,jsxs as Ai}from"react/jsx-runtime";var Qu=Oi("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"}}),ep=Oi("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function Z6({variant:e,options:t,selected:r,onSelect:o,className:a}){let n=Ju();return Xt("div",{className:i("flex text-sm",a),children:Xt(Zu,{id:n,children:t.map(({id:c,label:s,href:m,target:d})=>{let l=c===r;return Ai(m?Xu:"div",{className:"relative",href:m??"#",target:d??void 0,children:[Ai("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:i(Qu({variant:e}),d==="_blank"&&"group flex items-center gap-1.5"),"data-selected":l,"aria-selected":l,children:[s,d==="_blank"&&Xt(xa,{className:"size-2.5"})]}),l&&Xt(qu.div,{layoutId:"indicator",transition:{duration:.1},className:ep({variant:e}),children:Xt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as jo,jsxs as zi}from"react/jsx-runtime";var tp=[{icon:qa,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Ea,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:Ya,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Ba,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function J6(){return zi("div",{className:"p-3",children:[jo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),jo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:tp.map(({text:e,icon:t,href:r})=>zi("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[jo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Vi,jsxs as rp}from"react/jsx-runtime";function t5({className:e}){return rp("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:[Vi("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"}),Vi("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{ao as AUTOPLAY_DEFAULT_DELAY,Cb as Accordion,Ui as AccordionContent,Bi as AccordionItem,$i as AccordionTrigger,J6 as AdvancedLinkFeaturesTooltip,Cp as Africa,Op as Airtm,Yi as Alert,qi as AlertDescription,Zi as AlertTitle,Lp as Amazon,Bp as AndroidLogo,pe as AnimatedSizeContainer,dp as Anthropic,$p as AppleLogo,Up as ArrowBoldUp,Gp as ArrowRight,jp as ArrowTrendUp,Kp as ArrowTurnLeft,Yp as ArrowTurnRight2,xa as ArrowUpRight,op as ArrowUpRight2,Zp as ArrowsOppositeDirectionX,qp as ArrowsOppositeDirectionY,kp as Asia,Wo as AuthButton,Db as Avatar,z3 as Background,fr as Badge,Xp as BadgeCheck,Jp as BadgeCheck2Fill,Jb as BadgeTooltip,Qp as Bell,e0 as Blog,Vt as BlurImage,t0 as Bolt,r0 as BoltFill,a0 as Book2,nr as Book2Fill,n0 as Book2Small,o0 as BookOpen,i0 as Books2,s0 as BoxArchive,l0 as BracketsCurly,ya as BriefcaseFill,c0 as Brush,d0 as BulletList,Na as BulletListFill,te as Button,Qb as ButtonTooltip,ci as COMPARE_PAGES,m0 as Calculator,wn as Calendar,g0 as Calendar6,p0 as CalendarDays,u0 as CalendarIcon,f0 as CalendarRefresh,xp as CardAmex,yp as CardDiscover,C1 as CardList,Np as CardMastercard,tv as CardSelector,wp as CardVisa,b0 as Cards,h0 as CaretUpFill,Nl as Carousel,wl as CarouselContent,Cl as CarouselItem,xv as CarouselNavBar,Pl as CarouselNext,kl as CarouselPrevious,Lv as CarouselThumbnail,Tv as CarouselThumbnails,zp as CashApp,v0 as ChartActivity2,x0 as ChartArea2,y0 as ChartLine,Mp as ChatGPT,wa as Check,ir as Check2,gt as Checkbox,Ca as CheckboxCheckedFill,ka as CheckboxUnchecked,N0 as ChevronLeft,w0 as ChevronRight,Pa as CircleCheck,Sa as CircleCheckFill,C0 as CircleDollar,k0 as CircleDotted,Ra as CircleHalfDottedCheck,Ta as CircleHalfDottedClock,La as CircleInfo,P0 as CirclePercentage,S0 as CirclePlay,R0 as CirclePlayFill,T0 as CircleQuestion,L0 as CircleUser,qr as CircleWarning,M0 as CircleXmark,D0 as Circles,E0 as Circles3,Li as ClientOnly,Ma as CloudUpload,I0 as Code,A0 as ColorPalette2,tx as Combobox,t5 as CompositeLogo,O0 as ConnectedDots,V0 as ConnectedDots4,z0 as ConnectedDotsFill,H0 as Connections3,sa as Copy,r6 as CopyButton,s6 as CopyText,_0 as CreditCard,F0 as Crosshairs3,W0 as Crown,ap as CrownSmall,B0 as Cube,$0 as CubeSettings,U0 as CubeSettingsFill,G0 as CurrencyDollar,Da as CursorRays,j0 as DatabaseKey,lo as DatePickerContext,_x as DateRangePicker,K0 as Desktop,Y0 as DiamondTurnRight,sr as DiamondTurnRightFill,Z0 as Directions,q0 as Discount,X0 as Dots,Kx as DotsPattern,J0 as Download,lt as DubAnalyticsIcon,er as DubApiIcon,np as DubCraftedShield,ct as DubLinksIcon,dt as DubPartnersIcon,Zr as DubProductIcon,Tn as DubStatusBadge,Q0 as Duplicate,ut as DynamicTooltipWrapper,Ea as Earth,ef as EarthPosition,q4 as EditColumnsButton,t2 as EmptyState,tf as Envelope,rf as EnvelopeAlert,of as EnvelopeArrowRight,Ia as EnvelopeFill,Pp as Europe,la as ExpandingArrow,Aa as Eye,Oa as EyeSlash,Wr as FEATURES_LIST,up as Facebook,za as FeatherFill,Dp as Figma,af as FileContent,u2 as FileUpload,nf as FileZip2,V2 as Filter,lf as Filter2,sf as FilterBars,df as Flag2,Va as Flag6,cf as FlagWavy,mf as Flask,uf as FlaskSmall,pf as Folder,vf as Folder5,ff as FolderBookmark,gf as FolderLock,bf as FolderPlus,hf as FolderShield,Uw as Footer,U2 as Form,xf as GamingConsole,yf as Gauge6,Ha as Gear,Nf as Gear2,wf as Gear3,Cf as Gem,_a as Gift,kf as GiftFill,Ep as GitHubEnhanced,tr as Github,Pf as Globe,Wa as Globe2,Fa as GlobePointer,Sf as GlobeSearch,fa as Go,pp as Google,Ip as GoogleEnhanced,Rf as GreekTemple,Je as Grid,Tf as GridIcon,Lf as GridLayoutRows,Mf as GridPlus,Df as GripDotsVertical,Ef as Headset,If as Heart,Af as HeartFill,Of as HexadecagonStar,zf as History,Vf as Hyperlink,ip as IOSAppStore,c6 as IconMenu,Hf as Icosahedron,Ba as Incognito,_f as InfinityIcon,qb as InfoTooltip,m6 as InlineSnippet,Qc as Input,Ff as InputField,Wf as InputPassword,$a as InputPasswordPointer,Ua as InputSearch,yy as InputSelect,fp as Instagram,Bf as InvoiceDollar,$f as Key,an as KeyboardShortcutContext,lh as KeyboardShortcutProvider,di as LEGAL_PAGES,yd as Label,Uf as LayoutSidebar,Gf as License,lr as LifeRing,jf as LinesY,Yf as Link4,Kf as LinkBroken,b6 as LinkLogo,S6 as LinkPreview,R6 as LinkPreviewPlaceholder,rr as LinkedIn,Zb as LinkifyTooltipContent,St as LoadingCircle,cp as LoadingDots,Pe as LoadingSpinner,Zf as LocationPin,qf as Lock,Xf as LockFill,Ft as Logo,ca as Magic,Jf as Magnifier,Qf as MapPosition,sp as MarkdownIcon,eg as MarketingTarget,lp as MatrixLines,Br as MaxWidthWrapper,tg as Menu3,Iy as MenuItem,rg as MessageSmile,cr as MicrophoneFill,$y as MiniAreaChart,dr as Minus,og as MobilePhone,Zy as Modal,ag as MoneyBill,ng as MoneyBill2,ig as MoneyBills2,sg as Msgs,JN as Nav,Ho as NavContext,pw as NavMobile,$r as NavWordmark,Sp as NorthAmerica,lg as Note,bg as NucleoPhoto,r4 as NumberStepper,Xb as NumberTooltip,Rp as Oceania,cg as OfficeBuilding,mp as OpenAI,hb as PLAN_FEATURE_ICONS,Ga as Page2,n4 as PaginationControls,dg as Paintbrush,mg as Palette2,ug as PaperPlane,Vp as Payoneer,Hp as Paypal,fg as Pen2,pg as PenWriting,gg as PercentageArrowDown,da as Photo,ga as Php,hg as Plug2,mt as Plus,vg as Plus2,xe as Popover,A6 as Popup,Ku as PopupContext,xg as Post,gp as ProductHunt,H6 as ProgressBar,l4 as ProgressCircle,yg as Pyramid,ba as Python,Ng as QRCode,Wt as RESOURCES,Fd as RadioGroup,Wd as RadioGroupItem,wg as Receipt2,ja as ReferredVia,Cg as Refresh2,kg as Robot,ha as Ruby,Vo as SDKS,$3 as SOCIAL_LINKS,li as SOLUTIONS,Ka as SatelliteDish,Pg as ScanText,Sg as Scribble,b4 as Sheet,Rg as ShieldAlert,Tg as ShieldCheck,Lg as ShieldKeyhole,Mg as ShieldSlash,Dg as ShieldUser,y4 as ShimmerDots,Eg as Shuffle,Yb as SimpleTooltipContent,bp as Slack,C4 as Slider,Ig as Sliders,R4 as SmartDateTimePicker,ma as SortOrder,Tp as SouthAmerica,Ag as Sparkle3,Ap as Spotify,Og as SquareChart,zg as SquareLayoutGrid5,Vg as SquareLayoutGrid6,Hg as SquareUserSparkle2,_g as SquareXmark,Fg as Stars2,A4 as StatusBadge,_p as Stripe,Fp as StripeLink,ua as Success,B4 as Switch,qg as TV,Z6 as TabSelect,y3 as Table,Wg as TableIcon,Bg as TableRows2,$g as Tablet,Ug as Tag,Gg as Tags,pa as Tick,hp as TikTok,Ya as Timer2,Za as Toggle2Fill,S3 as ToggleGroup,jg as Toggles,Eb as TokenAvatar,Q as Tooltip,Kb as TooltipContent,jb as TooltipProvider,Kg as Trash,Yg as TriangleWarning,Zg as Trophy,or as Twitter,va as Typescript,A3 as UTMBuilder,Lm as UTM_PARAMETERS,Xg as UiCard,vp as Unsplash,Jg as User,Qg as UserCheck,eb as UserCrown,tb as UserDelete,rb as UserFocus,ob as UserMinus,ab as UserPlus,nb as UserXmark,ib as Users,lb as Users2,cb as Users6,Rt as UsersFill,sb as UsersSettings,Wp as Venmo,db as Versions2,qa as Views,mb as Watch,ub as Webhook,pb as Window,fb as WindowSearch,gb as WindowSettings,Si as Wordmark,bb as Xmark,ar as YouTube,ts as badgeVariants,se as buttonVariants,Qi as getUserAvatarUrl,Po as menuItemVariants,_o as navItems,am as statusBadgeVariants,ve as useCarousel,hn as useCarouselActiveIndex,T1 as useColumnVisibility,E1 as useCookies,ft as useCopyToClipboard,V1 as useCurrentAnchor,W1 as useCurrentSubdomain,G1 as useEnterSubmit,Z1 as useInViewport,J1 as useInputFocused,rh as useIntersectionObserver,Ie as useKeyboardShortcut,eo as useLocalStorage,Y as useMediaQuery,ph as useOptimisticUpdate,Ph as usePagination,Th as useRemoveGAParams,gr as useResizeObserver,ln as useRouterStuff,mn as useScroll,Ae as useScrollProgress,x3 as useTable,sn as useTablePagination,$h as useToastWithUndo};