@dub/ui 0.2.68 → 0.2.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts/index.mjs +1 -1
- package/dist/chunk-2OLKG5VD.mjs +2 -0
- package/dist/chunk-2RTNOM7D.mjs +2 -0
- package/dist/chunk-2ZKUQRT2.mjs +6 -0
- package/dist/chunk-3EJ3KJXV.mjs +2 -0
- package/dist/chunk-4V6O5DP3.mjs +6 -0
- package/dist/chunk-5FR5TVE6.mjs +6 -0
- package/dist/chunk-6HGQA5C2.mjs +2 -0
- package/dist/chunk-6PXKSHG4.mjs +6 -0
- package/dist/chunk-6VPQEKGX.mjs +2 -0
- package/dist/chunk-746QNBBF.mjs +6 -0
- package/dist/chunk-7GDJPUUC.mjs +6 -0
- package/dist/chunk-7HRXNCEW.mjs +6 -0
- package/dist/chunk-7IX4YIZG.mjs +6 -0
- package/dist/chunk-AR5EQG6S.mjs +6 -0
- package/dist/chunk-B4JAPMF7.mjs +2 -0
- package/dist/chunk-BMAJZ2WA.mjs +2 -0
- package/dist/chunk-BO3GYFXE.mjs +2 -0
- package/dist/chunk-CI55POCL.mjs +2 -0
- package/dist/chunk-CYQQWKYO.mjs +2 -0
- package/dist/chunk-D2X3C7SN.mjs +2 -0
- package/dist/chunk-DLRHWE2P.mjs +2 -0
- package/dist/chunk-E4HWUKXO.mjs +6 -0
- package/dist/chunk-F7TG5QIV.mjs +2 -0
- package/dist/chunk-FEGYN2RG.mjs +6 -0
- package/dist/chunk-FNPKHQVW.mjs +2 -0
- package/dist/chunk-GVSY4EEU.mjs +2 -0
- package/dist/chunk-H74HRWYP.mjs +2 -0
- package/dist/chunk-HE7D3ZSP.mjs +2 -0
- package/dist/chunk-IP3TRQVC.mjs +6 -0
- package/dist/chunk-J6FZHCQU.mjs +2 -0
- package/dist/chunk-JNGL4IFE.mjs +2 -0
- package/dist/chunk-JOLCDANY.mjs +2 -0
- package/dist/chunk-KJPINAI2.mjs +2 -0
- package/dist/chunk-KONKTXXG.mjs +6 -0
- package/dist/chunk-M5MUPZEN.mjs +2 -0
- package/dist/chunk-P2IJR7OL.mjs +6 -0
- package/dist/chunk-PDTM75SS.mjs +2 -0
- package/dist/chunk-PJYVB2JH.mjs +2 -0
- package/dist/chunk-PMLAVU2X.mjs +6 -0
- package/dist/chunk-PW5W5G2F.mjs +2 -0
- package/dist/chunk-Q7TE7VVT.mjs +2 -0
- package/dist/chunk-QGKU72XQ.mjs +6 -0
- package/dist/chunk-QIA3GT5T.mjs +2 -0
- package/dist/chunk-RLXZTKXL.mjs +2 -0
- package/dist/chunk-RNZZ7TGZ.mjs +2 -0
- package/dist/chunk-RSC43RXH.mjs +2 -0
- package/dist/chunk-S6UCRI4B.mjs +2 -0
- package/dist/chunk-SH6LFBJC.mjs +2 -0
- package/dist/chunk-SHSVHA4U.mjs +2 -0
- package/dist/chunk-SJX23PQU.mjs +2 -0
- package/dist/chunk-TKHNB2F3.mjs +2 -0
- package/dist/chunk-U53H44XX.mjs +6 -0
- package/dist/chunk-UDPZCIHW.mjs +2 -0
- package/dist/chunk-UXLTIKME.mjs +2 -0
- package/dist/chunk-V2KYE7EE.mjs +2 -0
- package/dist/chunk-VMYCUV2C.mjs +2 -0
- package/dist/chunk-W3YBFHMA.mjs +6 -0
- package/dist/chunk-WE2RCEPL.mjs +2 -0
- package/dist/chunk-WHHNTDMN.mjs +6 -0
- package/dist/chunk-X6IUUCWJ.mjs +2 -0
- package/dist/chunk-X7SGDEJI.mjs +2 -0
- package/dist/chunk-ZESUMHML.mjs +6 -0
- package/dist/chunk-ZNXASZTY.mjs +6 -0
- package/dist/chunk-ZQSYRTLP.mjs +6 -0
- package/dist/icons/index.d.ts +25 -1
- package/dist/icons/index.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +107 -24
- package/dist/index.mjs +27 -6
- package/package.json +15 -14
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
import{$ as Rf,$a as x0,$b as ig,$c as jg,$d as Fb,A as cf,Aa as Qf,Ab as _0,Ac as Ga,Ad as hb,Ae as ch,B as df,Ba as nr,Bb as F0,Bc as Lg,Bd as en,Be as dh,C as rr,Ca as e0,Cb as B0,Cc as Ka,Cd as vb,Ce as mh,D as mf,Da as t0,Db as W0,Dc as Mg,Dd as xb,De as uh,E as uf,Ea as r0,Eb as U0,Ec as Eg,Ed as yb,Ee as ph,F as pf,Fa as o0,Fb as $0,Fc as Dg,Fd as Nb,Fe as fh,G as ff,Ga as Pa,Gb as za,Gc as Ag,Gd as wb,Ge as gh,H as gf,Ha as a0,Hb as G0,Hc as Ig,Hd as kb,He as bh,I as or,Ia as n0,Ib as K0,Ic as ja,Id as Cb,Ie as hh,J as bf,Ja as Sa,Jb as j0,Jc as Ya,Jd as Pb,Je as vh,K as ar,Ka as i0,Kb as sr,Kc as Og,Kd as pt,Ke as Tt,L as hf,La as s0,Lb as Y0,Lc as zg,Ld as Sb,Le as xh,M as vf,Ma as l0,Mb as Z0,Mc as Vg,Md as Tb,Me as yh,N as xf,Na as c0,Nb as q0,Nc as Hg,Nd as Rb,Ne as Nh,O as yf,Oa as d0,Ob as X0,Oc as _g,Od as Lb,Oe as wh,P as Nf,Pa as m0,Pb as J0,Pc as Za,Pd as Mb,Pe as ln,Q as wf,Qa as u0,Qb as Va,Qc as Fg,Qd as tn,Qe as kh,R as kf,Ra as p0,Rb as Q0,Rc as qa,Rd as Eb,Re as Ch,S as va,Sa as f0,Sb as eg,Sc as Xa,Sd as Db,Se as Ph,T as xa,Ta as g0,Tb as tg,Tc as Bg,Td as rn,Te as Sh,U as ya,Ua as Ta,Ub as rg,Uc as Wg,Ud as Ab,Ue as Th,V as Na,Va as ir,Vb as og,Vc as Ug,Vd as Ib,Ve as Rh,W as wa,Wa as Ra,Wb as ag,Wc as Ja,Wd as Ob,We as Lh,X as Cf,Xa as La,Xb as Ha,Xc as Qa,Xd as zb,Xe as Mh,Y as Pf,Ya as b0,Yb as ng,Yc as $g,Yd as Vb,Z as Sf,Za as h0,Zb as _a,Zc as Gg,Zd as Hb,_ as Tf,_a as v0,_b as Fa,_c as Kg,_d as _b,a as Xp,aa as Lf,ab as Ma,ac as Ba,ad as Yg,ae as Bb,b as ma,ba as Mf,bb as Ea,bc as sg,bd as lr,be as Wb,c as Jp,ca as Ef,cb as y0,cc as lg,cd as Zg,ce as Ub,d as dt,da as Df,db as N0,dc as cg,dd as qg,de as $b,e as er,ea as Af,eb as w0,ec as dg,ed as Xg,ee as Gb,f as Qp,fa as If,fb as Da,fc as mg,fd as Jg,fe as Kb,g as mt,ga as Of,gb as Aa,gc as ug,gd as Qg,ge as jb,h as ut,ha as zf,hb as Ia,hc as pg,hd as eb,he as Yb,i as Zr,ia as Vf,ib as k0,ic as Wa,id as tb,ie as Zb,j as ua,ja as Hf,jb as C0,jc as fg,jd as rb,je as qb,k as ef,ka as _f,kb as P0,kc as gg,kd as ob,ke as Xb,l as tf,la as Ff,lb as S0,lc as bg,ld as ab,le as Jb,m as pa,ma as Bf,mb as T0,mc as hg,md as nb,me as Qb,n as rf,na as Wf,nb as qr,nc as vg,nd as ib,ne as eh,o as of,oa as Uf,ob as R0,oc as xg,od as sb,oe as th,p as fa,pa as ka,pb as L0,pc as yg,pd as lb,pe as rh,q as ga,qa as $f,qb as M0,qc as Ng,qd as cr,qe as on,r as ba,ra as Gf,rb as E0,rc as wg,rd as dr,re as an,s as ha,sa as Ca,sb as Oa,sc as kg,sd as cb,se as nn,t as St,ta as Kf,tb as D0,tc as Ua,td as db,te as sn,u as af,ua as jf,ub as A0,uc as Cg,ud as mb,ue as oh,v as ue,va as Yf,vb as I0,vc as Pg,vd as ub,ve as ah,w as nf,wa as Zf,wb as O0,wc as Sg,wd as pb,we as nh,x as sf,xa as qf,xb as z0,xc as $a,xd as fb,xe as ih,y as lf,ya as Xf,yb as V0,yc as Tg,yd as gb,ye as sh,z as tr,za as Jf,zb as H0,zc as Rg,zd as bb,ze as lh}from"./chunk-QIO44XG4.mjs";import{a as Q}from"./chunk-NWME2ANF.mjs";import{a as ea,b as F,c as ta,d as ra,e as Ce,f as oa,g as aa,h as na,i as ia,j as sa,k as Pt,l as la,m as jr,n as ca,o as ct,p as da,q as be,r as Ge,s as i,u as Yr,v as Qt}from"./chunk-CP3HS3MG.mjs";import*as ne from"@radix-ui/react-accordion";import{ChevronDown as ps}from"lucide-react";import*as ur from"react";import{jsx as mr,jsxs as hs}from"react/jsx-runtime";var zh=ne.Root,fs=ur.forwardRef(({className:e,...t},r)=>mr(ne.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));fs.displayName="AccordionItem";var gs=ur.forwardRef(({className:e,children:t,variant:r="chevron",...o},a)=>{let n=r==="chevron"?ps:pt;return mr(ne.Header,{className:"flex",children:hs(ne.Trigger,{ref:a,className:i("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":r==="chevron","[&[data-state=open]>svg]:rotate-45":r==="plus"},e),...o,children:[t,mr(n,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});gs.displayName=ne.Trigger.displayName;var bs=ur.forwardRef(({className:e,children:t,...r},o)=>mr(ne.Content,{ref:o,className:i("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",e),...r,children:t}));bs.displayName=ne.Content.displayName;import{cva as vs}from"class-variance-authority";import*as pr from"react";import{jsx as Xr}from"react/jsx-runtime";var xs=vs("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"}}),ys=pr.forwardRef(({className:e,variant:t,...r},o)=>Xr("div",{ref:o,role:"alert",className:i(xs({variant:t}),e),...r}));ys.displayName="Alert";var Ns=pr.forwardRef(({className:e,...t},r)=>Xr("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));Ns.displayName="AlertTitle";var ws=pr.forwardRef(({className:e,...t},r)=>Xr("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));ws.displayName="AlertDescription";import{sha256 as ks}from"js-sha256";import{useState as Cs}from"react";import{jsx as Jr}from"react/jsx-runtime";function Ps(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/${ks(e.email)}?d=${t}`:t}function $h({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]=Cs(Ps(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 Gh({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 Ss}from"class-variance-authority";import{jsx as Rs}from"react/jsx-runtime";var Ts=Ss("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 cn({className:e,variant:t,...r}){return Rs("span",{className:i(Ts({variant:t}),e),...r})}import{cva as gl}from"class-variance-authority";import{forwardRef as bl}from"react";import*as he from"@radix-ui/react-tooltip";import{HelpCircle as dl}from"lucide-react";import ml from"next/link";import{useEffect as ul,useRef as pl,useState as ro}from"react";import fl from"react-markdown";import{useCallback as Es,useEffect as Ds,useState as As}from"react";import{useEffect as Ls,useState as Ms}from"react";function fr(e){let[t,r]=Ms(),o=([a])=>{r(a)};return Ls(()=>{let a=e==null?void 0:e.current;if(!a)return;let n=new ResizeObserver(o);return n.observe(a),()=>n.disconnect()},[e]),t}function Ee(e,{direction:t="vertical"}={}){let[r,o]=As(1),a=Es(()=>{if(!e.current)return;let c=t==="vertical"?e.current.scrollTop:e.current.scrollLeft,d=t==="vertical"?e.current.scrollHeight:e.current.scrollWidth,m=t==="vertical"?e.current.clientHeight:e.current.clientWidth;o(d===m?1:Math.min(c/(d-m),1))},[t]),n=fr(e);return Ds(a,[n]),{scrollProgress:r,updateScrollProgress:a}}import{EditorContent as ll}from"@tiptap/react";import $s from"@tiptap/extension-file-handler";import Gs from"@tiptap/extension-image";import Ks from"@tiptap/extension-mention";import{Placeholder as js}from"@tiptap/extensions";import{Markdown as Ys}from"@tiptap/markdown";import{useEditor as Zs}from"@tiptap/react";import qs from"@tiptap/starter-kit";import{createContext as Xs,forwardRef as Js,useContext as Qs,useImperativeHandle as el,useMemo as tl,useState as rl}from"react";import{computePosition as Is,flip as Os,shift as zs}from"@floating-ui/dom";import{posToDOMRect as Vs,ReactRenderer as Hs}from"@tiptap/react";import{forwardRef as _s,useEffect as Fs,useImperativeHandle as Bs,useState as Ws}from"react";import{jsx as Qr}from"react/jsx-runtime";var dn=(e,t)=>{Is({getBoundingClientRect:()=>Vs(e.view,e.state.selection.from,e.state.selection.to)},t,{placement:"bottom-start",strategy:"absolute",middleware:[zs(),Os()]}).then(({x:o,y:a,strategy:n})=>{t.style.width="max-content",t.style.position=n,t.style.left=`${o}px`,t.style.top=`${a}px`})},un=e=>({items:({query:t})=>e.filter(r=>r.toLowerCase().startsWith(t.toLowerCase())).slice(0,5),render:()=>{let t;return{onStart:r=>{t=new Hs(Us,{props:r,editor:r.editor}),r.clientRect&&(t.element.style.position="absolute",document.body.appendChild(t.element),dn(r.editor,t.element))},onUpdate(r){t.updateProps(r),r.clientRect&&dn(r.editor,t.element)},onKeyDown(r){var o;return r.event.key==="Escape"?(t.destroy(),!0):(o=t.ref)==null?void 0:o.onKeyDown(r)},onExit(){t.element.remove(),t.destroy()}}}}),mn=i("flex cursor-pointer select-none items-center gap-2 whitespace-nowrap rounded-md px-2 py-1 font-mono text-sm text-neutral-950","data-[selected=true]:bg-neutral-100"),Us=_s(({items:e,command:t},r)=>{let[o,a]=Ws(0),n=()=>{a((o+e.length-1)%e.length)},c=()=>{a((o+1)%e.length)},d=()=>{t({id:e[o]})};return Fs(()=>a(0),[e]),Bs(r,()=>({onKeyDown:({event:m})=>m.key==="ArrowUp"?(n(),!0):m.key==="ArrowDown"?(c(),!0):m.key==="Enter"?(d(),!0):!1})),Qr("div",{className:"border-border-subtle flex flex-col rounded-lg border bg-white p-1 shadow-sm",children:e.length?e.map((m,s)=>Qr("button",{type:"button",onClick:()=>t({id:m}),"data-selected":o===s,onPointerEnter:()=>a(s),className:mn,children:m},s)):Qr("div",{className:i(mn,"text-content-subtle font-sans"),children:"No results"})})});import{jsx as al}from"react/jsx-runtime";var eo={default:"prose-p:my-2 prose-ul:my-2 prose-ol:my-2",condensed:"prose-p:my-0 prose-ul:my-2 prose-ol:my-2",relaxed:""},ol=["images","variables","links","headings","bold","italic"],pn=Xs(null),N1=Js(({children:e,features:t=ol,markdown:r=!1,style:o="default",placeholder:a="Start typing...",uploadImage:n,editable:c,autoFocus:d,variables:m,initialValue:s,onChange:l,editorProps:u,editorClassName:p},f)=>{let[b,g]=rl(!1),h=tl(()=>n?async(x,y,C)=>{g(!0);let w=await(n==null?void 0:n(x));if(!w){g(!1);return}y.chain().insertContentAt(C,{type:"image",attrs:{src:w}}).focus().run(),g(!1)}:null,[n]),N=Zs({editable:c??!0,autofocus:d?"end":!1,extensions:[...r?[Ys]:[],qs.configure({heading:t.includes("headings")?{levels:[1,2]}:!1,bold:t.includes("bold")?void 0:!1,italic:t.includes("italic")?void 0:!1,link:t.includes("links")?void 0:!1}),js.configure({placeholder:a,emptyEditorClass:"before:content-[attr(data-placeholder)] before:float-left before:text-content-muted before:h-0 before:pointer-events-none"}),...t.includes("images")&&h?[Gs.configure({inline:!1,HTMLAttributes:{class:"rounded-lg max-w-full h-auto"}}),$s.configure({allowedMimeTypes:["image/png","image/jpeg","image/gif","image/webp"],onDrop:(x,y,C)=>{y.forEach(w=>h(w,x,C))},onPaste:(x,y,C)=>{if(C)return!1;y.forEach(w=>h(w,x,x.state.selection.anchor))}})]:[],...t.includes("variables")&&m?[Ks.extend({renderHTML({node:x}){return["span",{class:"px-1 py-0.5 bg-blue-100 text-blue-700 rounded font-semibold","data-type":"mention","data-id":x.attrs.id},`{{${x.attrs.id}}}`]},renderText({node:x}){return`{{${x.attrs.id}}}`}}).configure({suggestion:un(m)})]:[]],editorProps:{attributes:{...u==null?void 0:u.attributes,class:i("max-w-none focus:outline-none","prose prose-sm prose-neutral",eo[o],"[&_.ProseMirror-selectednode]:outline [&_.ProseMirror-selectednode]:outline-2 [&_.ProseMirror-selectednode]:outline-blue-500 [&_.ProseMirror-selectednode]:outline-offset-2",p)},...u},content:s,contentType:r?"markdown":void 0,onUpdate:({editor:x})=>l==null?void 0:l(x),immediatelyRender:!1});return el(f,()=>({setContent:x=>{N==null||N.commands.setContent(x)}})),al(pn.Provider,{value:{features:t,markdown:r,editable:c,variables:m,editor:N,isUploading:b,handleImageUpload:h},children:e})});function Rt(){let e=Qs(pn);if(!e)throw new Error("useRichTextContext must be used within a RichTextProvider");return e}import{useEditorState as gn}from"@tiptap/react";import{forwardRef as nl,useRef as il}from"react";import{Fragment as fn,jsx as pe,jsxs as gr}from"react/jsx-runtime";function M1({toolsStart:e,toolsEnd:t,className:r}){let{editor:o,features:a,handleImageUpload:n,isUploading:c}=Rt(),d=gn({editor:o,selector:({editor:s})=>({isBold:Boolean(s==null?void 0:s.isActive("bold")),isItalic:Boolean(s==null?void 0:s.isActive("italic")),isHeading1:Boolean(s==null?void 0:s.isActive("heading",{level:1})),isHeading2:Boolean(s==null?void 0:s.isActive("heading",{level:2})),isSelection:(s==null?void 0:s.state.selection.from)!==(s==null?void 0:s.state.selection.to)})}),m=il(null);return gr("div",{className:i("flex gap-1",c&&"pointer-events-none opacity-50",r),children:[e,(a==null?void 0:a.includes("bold"))&&pe(Ke,{icon:on,label:"Bold",isActive:d==null?void 0:d.isBold,onClick:()=>o==null?void 0:o.chain().focus().toggleBold().run()}),(a==null?void 0:a.includes("italic"))&&pe(Ke,{icon:an,label:"Italic",isActive:d==null?void 0:d.isItalic,onClick:()=>o==null?void 0:o.chain().focus().toggleItalic().run()}),(a==null?void 0:a.includes("headings"))&&gr(fn,{children:[pe(Ke,{icon:ja,label:"Heading 1",isActive:d==null?void 0:d.isHeading1,onClick:()=>o==null?void 0:o.chain().focus().toggleHeading({level:1}).run()}),pe(Ke,{icon:Ya,label:"Heading 2",isActive:d==null?void 0:d.isHeading2,onClick:()=>o==null?void 0:o.chain().focus().toggleHeading({level:2}).run()})]}),(a==null?void 0:a.includes("links"))&&pe(sl,{}),(a==null?void 0:a.includes("variables"))&&pe(Ke,{icon:Ca,label:"Variable",isActive:!1,onClick:()=>{var s,l;if((l=(s=o==null?void 0:o.state.selection.$from.nodeBefore)==null?void 0:s.text)!=null&&l.endsWith("@")){o==null||o.commands.focus();return}o==null||o.chain().focus().insertContent("@").run()}}),(a==null?void 0:a.includes("images"))&&n&&o&&gr(fn,{children:[pe("input",{ref:m,type:"file",className:"hidden",onChange:s=>{var u;let l=(u=s.target.files)==null?void 0:u[0];!l||(n(l,o,o.state.selection.anchor),s.target.value="")}}),pe(Ke,{icon:qa,label:"Image",isActive:!1,onClick:()=>{var s;return(s=m.current)==null?void 0:s.click()}})]}),t]})}function sl(){let{editor:e}=Rt(),t=gn({editor:e,selector:({editor:r})=>({isSelection:(r==null?void 0:r.state.selection.from)!==(r==null?void 0:r.state.selection.to)})});return pe(Ke,{icon:Za,label:"Link",onClick:()=>{if(!e)return;let r=e.getAttributes("link").href,o=window.prompt("Link URL",r);if(!(o!=null&&o.trim())){e.chain().focus().extendMarkRange("link").unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:o}).run()},disabled:!(t!=null&&t.isSelection)})}var Ke=nl(({icon:e,label:t,isActive:r,onClick:o,disabled:a},n)=>gr("button",{ref:n,type:"button",onClick:o,disabled:a,className:i("flex size-8 items-center justify-center rounded-md transition-colors duration-150 disabled:opacity-50",r?"bg-neutral-200":"hover:bg-neutral-50 active:bg-neutral-100"),title:t,children:[pe(e,{className:"size-4 shrink-0 text-neutral-700"}),t&&pe("span",{className:"sr-only",children:t})]}));import{jsx as to,jsxs as cl}from"react/jsx-runtime";function V1({className:e,...t}){let{editor:r,isUploading:o}=Rt();return cl("div",{className:i("relative",o&&"pointer-events-none opacity-50",e),children:[to(ll,{editor:r,...t}),o&&to("div",{className:"absolute inset-0 flex items-center justify-center",children:to(ue,{className:"size-4"})})]})}import{jsx as W,jsxs as oo}from"react/jsx-runtime";function J1({children:e}){return W(he.Provider,{delayDuration:150,children:e})}var bn=({className:e,children:t})=>W(fl,{className:i("prose prose-sm prose-neutral max-w-xs text-pretty px-4 py-2 text-center leading-snug transition-all","prose-a:cursor-alias prose-a:underline prose-a:decoration-dotted prose-a:underline-offset-2","prose-code:inline-block prose-code:leading-none",eo.condensed,e),components:{a:({node:r,...o})=>W("a",{...o,target:"_blank",rel:"noopener noreferrer",onClick:a=>a.stopPropagation()}),code:({node:r,...o})=>W("code",{...o,className:"rounded-md bg-neutral-100 px-1 py-0.5"})},children:t});function Z({children:e,content:t,contentClassName:r,disabled:o,side:a="top",disableHoverableContent:n,delayDuration:c=0,...d}){let[m,s]=ro(!1);return oo(he.Root,{open:o?!1:m,onOpenChange:s,delayDuration:c,disableHoverableContent:n,children:[W(he.Trigger,{asChild:!0,onClick:()=>{s(!0)},onBlur:()=>{s(!1)},children:e}),W(he.Portal,{children:W(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,...d,children:typeof t=="string"?W(bn,{className:r,children:t}):typeof t=="function"?t({setOpen:s}):t})})]})}function Q1({title:e,cta:t,href:r,target:o,onClick:a}){return oo("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[W(bn,{className:"p-0",children:e}),t&&(r?W(ml,{href:r,...o?{target:o}:{},className:i(ie({variant:"primary"}),"flex h-8 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):a?W(ee,{onClick:a,text:t,variant:"primary",className:"h-8"}):null)]})}function ev(e){return W(Z,{...e,children:W(dl,{className:"h-4 w-4 text-neutral-500"})})}function tv({children:e,content:t,...r}){return W(Z,{content:t,...r,children:W("div",{className:"flex cursor-pointer items-center",children:W(cn,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function rv({children:e,tooltipProps:t,...r}){return W(Z,{...t,children:W("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 ft({children:e,tooltipProps:t}){return t?W(Z,{...t,children:W("div",{children:e})}):e}function ov({children:e,maxHeight:t="240px",className:r}){let o=pl(null),{scrollProgress:a,updateScrollProgress:n}=Ee(o,{direction:"vertical"}),[c,d]=ro(!1),[m,s]=ro(!1);return ul(()=>{let l=o.current;if(!l)return;let{scrollHeight:u,clientHeight:p}=l,f=u>p;d(f&&a>0),s(f&&a<1)},[a]),oo("div",{className:"relative",children:[c&&W("div",{className:"pointer-events-none absolute left-0 right-0 top-0 z-10 h-6 rounded-t-xl bg-gradient-to-b from-white to-transparent"}),W("div",{ref:o,onScroll:n,className:i("flex flex-col gap-2 overflow-y-auto px-3 py-2",r),style:{maxHeight:t},children:e}),m&&W("div",{className:"pointer-events-none absolute bottom-0 left-0 right-0 z-10 h-6 rounded-b-xl bg-gradient-to-t from-white to-transparent"})]})}import{jsx as gt,jsxs as hn}from"react/jsx-runtime";var ie=gl("transition-all",{variants:{variant:{primary:"border-black bg-black dark:bg-white dark:border-white text-content-inverted hover:bg-inverted hover:ring-4 hover:ring-border-subtle",secondary:i("border-border-subtle bg-white dark:bg-black text-content-emphasis hover:bg-bg-muted focus-visible:border-border-emphasis outline-none","data-[state=open]:border-border-emphasis data-[state=open]:ring-4 data-[state=open]:ring-border-subtle"),outline:"border-transparent text-content-default hover:bg-bg-subtle",success:"border-blue-500 bg-blue-500 text-white hover:bg-blue-600 hover:ring-4 hover:ring-blue-100",danger:"border-red-500 bg-red-500 text-white hover:bg-red-600 hover:ring-4 hover:ring-red-100","danger-outline":"border-transparent bg-white text-red-500 hover:bg-red-600 hover:text-white"}},defaultVariants:{variant:"primary"}}),ee=bl(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:a,loading:n,icon:c,shortcut:d,disabledTooltip:m,right:s,...l},u)=>m?gt(Z,{content:m,children:hn("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&>("div",{className:i("min-w-0 truncate",d&&"flex-1 text-left",o),children:e}),d&>("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:d})]})}):hn("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":ie({variant:t}),r),disabled:l.disabled||n,...l,children:[n?gt(ue,{}):c||null,e&>("div",{className:i("min-w-0 truncate",d&&"flex-1 text-left",o),children:e}),d&>("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-400 text-white":t==="danger","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},a),children:d}),s]}));ee.displayName="Button";import{cva as hl}from"class-variance-authority";import{createContext as vl}from"react";import{jsx as vn}from"react/jsx-runtime";var xl=hl("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"}}}),Lt=vl({variant:"loose",loading:!1});function xn({variant:e="loose",loading:t=!1,className:r,children:o}){return vn("ul",{className:i(xl({variant:e,loading:t}),r),"data-variant":e,children:vn(Lt.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as yl}from"class-variance-authority";import{createContext as Nl,useContext as wl,useEffect as kl,useRef as Cl,useState as Pl}from"react";import{jsx as yn,jsxs as Rl}from"react/jsx-runtime";var Sl=yl("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"}}}),Tl="w-full py-2.5 px-4",ao=Nl({hovered:!1});function Nn({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:a,hoverStateEnabled:n=!0,banner:c}){let{variant:d}=wl(Lt),m=Cl(null),[s,l]=Pl(!1);kl(()=>{if(!s||!m.current)return;let p=setInterval(()=>{var f;((f=m.current)==null?void 0:f.matches(":hover"))===!1&&l(!1)},1e3);return()=>clearInterval(p)},[s]);let u=p=>!(document.getElementById("modal-backdrop")||Ge(p));return Rl("li",{ref:m,className:i(Sl({variant:d}),e),onPointerEnter:()=>l(!0),onPointerLeave:()=>l(!1),"data-hover-state-enabled":n,children:[c,yn("div",{className:i(Tl,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:a?p=>{u(p)&&a(p)}:void 0,children:yn(ao.Provider,{value:{hovered:s},children:r})})]})}var Tv=Object.assign(xn,{Card:Object.assign(Nn,{Context:ao}),Context:Lt});import{motion as fc}from"motion/react";import{forwardRef as gc,useRef as bc}from"react";import{useEffect as Ll,useState as Ml}from"react";function wn(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function no(e,t){let[r,o]=Ml(wn(e)??t);return Ll(()=>{let n=wn(e);n&&o(n)},[e]),[r,n=>{o(n),window.localStorage.setItem(e,JSON.stringify(n))}]}function El(e){return e&&typeof e=="object"&&Array.isArray(e.all)&&Array.isArray(e.defaultVisible)}function Dv(e,t){if(!El(t)){let o=t,a=m=>{let s=o[m];return Object.fromEntries(s.all.map(l=>[l,s.defaultVisible.includes(l)]))},n=Object.fromEntries(Object.keys(o).map(m=>[m,a(m)])),[c,d]=no(e,n);return{columnVisibility:c,setColumnVisibility:(m,s)=>{let l=o[m].all,u=c[m]||{},p=Object.fromEntries(l.map(f=>[f,f in s?s[f]:u[f]??!1]));d({...c,[m]:p})}}}else{let o=t,a=Object.fromEntries(o.all.map(d=>[d,o.defaultVisible.includes(d)])),[n,c]=no(e,a);return{columnVisibility:n,setColumnVisibility:d=>{let m=o.all,s=n||{},l=Object.fromEntries(m.map(u=>[u,u in d?d[u]:s[u]??!1]));c(l)}}}}import io from"js-cookie";import{useEffect as Dl,useState as Al}from"react";function zv(e,t,r){let[o,a]=Al(()=>{let c=io.get(e);return c?JSON.parse(c):t});return Dl(()=>{let c=()=>{let d=io.get(e);d&&a(JSON.parse(d))};return window.addEventListener("storage",c),()=>{window.removeEventListener("storage",c)}},[e]),[o,c=>{a(c),io.set(e,JSON.stringify(c),r)}]}import{useCallback as Il,useEffect as Ol,useRef as zl,useState as Vl}from"react";var bt=(e=3e3)=>{let t=zl(null),[r,o]=Vl(!1),a=()=>{t.current&&(clearTimeout(t.current),t.current=null)},n=Il(async(c,{onSuccess:d,throwOnError:m}={})=>{a();try{typeof c=="string"?await navigator.clipboard.writeText(c):c instanceof ClipboardItem&&await navigator.clipboard.write([c]),o(!0),d==null||d(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(s){if(console.error("Failed to copy: ",s),m)throw s}},[e]);return Ol(()=>()=>a(),[]),[r,n]};import{useEffect as Hl,useState as _l}from"react";function Bv(){let[e,t]=_l(null);return Hl(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,a=new IntersectionObserver(d=>{var u,p,f;let m=d[0];if(!m)return;let s=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let b=1;b<d.length;b++){let g=d[b];if(!g)break;(g.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=g)}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>s;)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(d=>a.observe(d)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useEffect as Fl,useState as Bl}from"react";function Gv(){let[e,t]=Bl(null);return Fl(()=>{let r=window.location.hostname;ra.has(r)?t("app"):aa.has(r)?t("partners"):oa.has(r)&&t("admin")},[]),{subdomain:e}}import{useCallback as Wl}from"react";function Zv(e){return{handleKeyDown:Wl(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 Ul,useState as $l}from"react";function Qv(e,t={}){let{root:r,defaultValue:o}=t,[a,n]=$l(o??!1);return Ul(()=>{let c=()=>{let m=e.current;if(!m)return;let s=r==null?void 0:r.current,l=m.getBoundingClientRect(),u=s?s.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 d=null;return e.current&&(d=new IntersectionObserver(c),d.observe(e.current)),c(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",c),window.removeEventListener("resize",c),d==null||d.disconnect()}},[e,r]),a}import{useEffect as Gl,useState as Kl}from"react";function rx(){let[e,t]=Kl(!1);return Gl(()=>{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 jl,useState as Yl}from"react";function ix(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:a=!1}={}){let[n,c]=Yl(),d=(n==null?void 0:n.isIntersecting)&&a,m=([s])=>{c(s)};return jl(()=>{let s=e==null?void 0:e.current;if(!!!window.IntersectionObserver||d||!s)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(s),()=>p.disconnect()},[e,JSON.stringify(t),r,o,d]),n}import{createContext as Zl,useCallback as ql,useContext as Xl,useEffect as kn,useId as Jl,useState as Ql}from"react";import{jsx as ec}from"react/jsx-runtime";var Cn=Zl({listeners:[],setListeners:()=>{}});function ux({children:e}){let[t,r]=Ql([]);return ec(Cn.Provider,{value:{listeners:t,setListeners:r},children:e})}function De(e,t,r={}){let o=Jl(),{listeners:a,setListeners:n}=Xl(Cn),c=ql(d=>{if(r.enabled===!1)return;let m=d.target,s=document.getElementById("modal-backdrop"),l=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||m.isContentEditable||!!s!=!!r.modal||!!l!=!!r.sheet)return;let u=[...d.metaKey?["meta"]:[],...d.ctrlKey?["ctrl"]:[],...d.altKey?["alt"]:[],d.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=a.filter(b=>b.enabled!==!1&&!!s==!!b.modal&&!!l==!!b.sheet&&(Array.isArray(b.key)?b.key.includes(u):b.key===u));!p.length||da(p,(b,g)=>(g.priority??0)-(b.priority??0))[0].id!==o||(d.preventDefault(),t(d))},[e,a,o,t,r.enabled,r.modal,r.sheet]);kn(()=>(document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)),[c]),kn(()=>(n(d=>[...d.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>n(d=>d.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{toast as tc}from"sonner";import rc from"swr";function hx(e,t){let{data:r,isLoading:o,mutate:a}=rc(e,be);return{data:r,isLoading:o,update:async(n,c)=>tc.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 Rn,useMemo as lc}from"react";import{useEffect as Pn,useState as oc}from"react";function Sn({pageSize:e,page:t,onPageChange:r}){let[o,a]=oc({pageIndex:t,pageSize:e});return Pn(()=>{a(n=>({...n,pageIndex:t}))},[t]),Pn(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:a}}import{usePathname as ac,useRouter as nc,useSearchParams as ic}from"next/navigation";import{useCallback as sc}from"react";function Tn(){let e=ac(),t=nc(),r=ic(),o=Object.fromEntries(r),a=(c,d)=>{let m=new URLSearchParams(r);if((d==null?void 0:d.include)&&Array.isArray(d.include)){let l=new URLSearchParams;r.forEach((u,p)=>{var f;(f=d.include)!=null&&f.includes(p)&&l.set(p,u)}),m=l}(d==null?void 0:d.exclude)&&Array.isArray(d.exclude)&&d.exclude.forEach(l=>m.delete(l)),c&&Object.entries(c).forEach(([l,u])=>m.set(l,u));let s=m.toString();return s.length>0?`?${s}`:""},n=sc(({set:c,del:d,replace:m,scroll:s=!0,getNewPath:l,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);c&&Object.entries(c).forEach(([g,h])=>p.set(g,Array.isArray(h)?h.join(u):h)),d&&(Array.isArray(d)?d.forEach(g=>p.delete(g)):p.delete(d));let f=p.toString(),b=`${e}${f.length>0?`?${f}`:""}`;if(l)return b;m?t.replace(b,{scroll:!1}):t.push(b,{scroll:s})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:n,getQueryString:a}}function Lx(e=ia){let{searchParams:t,queryParams:r}=Tn(),o=lc(()=>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 Rn(()=>{let c=parseInt(t.get("page")||"1")||1;n(d=>({...d,pageIndex:c}))},[t.get("page")]),Rn(()=>{r(a.pageIndex===1?{del:"page",scroll:!1}:{set:{page:a.pageIndex.toString()},scroll:!1})},[a]),{pagination:a,setPagination:n}}import{useEffect as cc}from"react";function Dx(){cc(()=>{let e=new URL(window.location.href);e.searchParams.has("_gl")&&setTimeout(()=>{e.searchParams.delete("_gl"),window.history.replaceState({},"",e.toString())},2e3)},[])}import{useCallback as dc,useEffect as Ln,useState as mc}from"react";function Mn(e,{container:t}={}){let[r,o]=mc(!1),a=dc(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return Ln(()=>{let n=(t==null?void 0:t.current)??window;return n.addEventListener("scroll",a),()=>n.removeEventListener("scroll",a)},[a]),Ln(()=>{a()},[a]),r}import{useEffect as uc}from"react";import{toast as Dn}from"sonner";import{jsx as br,jsxs as En}from"react/jsx-runtime";function pc({id:e,message:t,undo:r}){let o=()=>{r(),Dn.dismiss(e)},a=n=>{n.key==="z"&&(n.ctrlKey||n.metaKey)&&o()};return uc(()=>(document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)),[]),En("div",{className:"flex w-full items-center justify-between space-x-2",children:[En("div",{className:"flex items-center space-x-2",children:[br(ba,{}),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 Fx(){return({id:t,message:r,undo:o,duration:a})=>Dn(br(pc,{id:t,message:r,undo:o}),{id:t,...a&&{duration:a}})}import{jsx as An}from"react/jsx-runtime";var fe=gc(({width:e=!1,height:t=!1,className:r,transition:o,children:a,...n},c)=>{var s,l;let d=bc(null),m=fr(d);return An(fc.div,{ref:c,className:i("overflow-hidden",r),animate:{width:e?((s=m==null?void 0:m.contentRect)==null?void 0:s.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:An("div",{ref:d,className:i(t&&"h-max",e&&"w-max"),children:a})})});fe.displayName="AnimatedSizeContainer";import{jsx as Pe,jsxs as In}from"react/jsx-runtime";function e2({options:e,value:t,onChange:r,className:o,gridCols:a="2",name:n,disabled:c=!1,animated:d=!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],s=Pe("div",{className:i("grid gap-3",m),children:e.map(({key:l,label:u,description:p,icon:f})=>{let b=t===l;return In("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",b&&"border-black bg-neutral-50 text-neutral-900 ring-1 ring-black",c&&"cursor-not-allowed opacity-50",o),children:[Pe("input",{type:"radio",name:n,value:l,className:"hidden",checked:b,disabled:c,onChange:g=>{g.target.checked&&r&&r(l)}}),f&&Pe("div",{className:"flex-shrink-0 pt-0.5",children:f}),In("div",{className:"flex grow flex-col p-3 pr-0",children:[Pe("span",{className:"pr-1 text-sm font-semibold text-neutral-900",children:u}),Pe("span",{className:"text-xs text-neutral-600",children:p})]}),Pe(Ea,{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",b&&"scale-100 opacity-100")})]},l)})});return d?Pe("div",{className:"-m-1",children:Pe(fe,{height:!0,transition:{ease:"easeInOut",duration:.2},children:Pe("div",{className:"p-1",children:s})})}):s}import hc from"embla-carousel-autoplay";import vc from"embla-carousel-react";import{ArrowLeft as xc,ArrowRight as yc}from"lucide-react";import{createContext as Nc,forwardRef as Et,useCallback as Mt,useContext as wc,useEffect as so,useState as lo}from"react";import{jsx as Se,jsxs as Vn}from"react/jsx-runtime";var co=2e3,On=Nc(null);function ve(){let e=wc(On);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function zn(){let{api:e}=ve(),[t,r]=lo(0),o=Mt(a=>r((a==null?void 0:a.selectedScrollSnap())??0),[]);return so(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var kc=Et(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:a,className:n,children:c,...d},m)=>{let[s,l]=vc({...t,axis:e==="horizontal"?"x":"y"},[...o?[hc(typeof o=="object"?o:{delay:co})]:[],...a||[]]),[u,p]=lo(!1),[f,b]=lo(!1),g=Mt(y=>{!y||(p(y.canScrollPrev()),b(y.canScrollNext()))},[]),h=Mt(()=>{l==null||l.scrollPrev()},[l]),N=Mt(()=>{l==null||l.scrollNext()},[l]),x=Mt(y=>{y.key==="ArrowLeft"?(y.preventDefault(),h()):y.key==="ArrowRight"&&(y.preventDefault(),N())},[h,N]);return so(()=>{!l||!r||r(l)},[l,r]),so(()=>{if(!!l)return g(l),l.on("reInit",g),l.on("select",g),()=>{l==null||l.off("select",g)}},[l,g]),Se(On.Provider,{value:{carouselRef:s,api:l,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:h,scrollNext:N,canScrollPrev:u,canScrollNext:f},children:Se("div",{ref:m,onKeyDownCapture:x,className:i("relative",n),role:"region","aria-roledescription":"carousel",...d,children:c})})});kc.displayName="Carousel";var Cc=Et(({className:e,...t},r)=>{let{carouselRef:o,orientation:a}=ve();return Se("div",{ref:o,className:"overflow-hidden",children:Se("div",{ref:r,className:i("flex",a==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});Cc.displayName="CarouselContent";var Pc=Et(({className:e,...t},r)=>{let{orientation:o}=ve();return Se("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})});Pc.displayName="CarouselItem";var Sc=Et(({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",ie({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Se(xc,{className:"h-4 w-4"}),Se("span",{className:"sr-only",children:"Previous slide"})]})});Sc.displayName="CarouselPrevious";var Tc=Et(({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",ie({variant:"secondary",className:"p-2"}),e),disabled:!n,onClick:a,...t,children:[Se(yc,{className:"h-4 w-4"}),Se("span",{className:"sr-only",children:"Next slide"})]})});Tc.displayName="CarouselNext";import{cva as Rc}from"class-variance-authority";import{ChevronLeft as Lc,ChevronRight as Mc}from"lucide-react";import{motion as Ec}from"motion/react";import*as Ae from"react";import{jsx as je,jsxs as Dt}from"react/jsx-runtime";var Dc=Rc("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 "}}}),v2=({variant:e="simple",className:t})=>{var b;let{scrollNext:r,scrollPrev:o,canScrollNext:a,canScrollPrev:n,api:c}=ve(),d=(b=c==null?void 0:c.plugins())==null?void 0:b.autoplay,[m,s]=Ae.useState(0),[l,u]=Ae.useState(!1),p=Ae.useCallback(g=>{s((g==null?void 0:g.selectedScrollSnap())??0)},[]),f=Ae.useCallback(g=>()=>{d&&d.isPlaying()&&d.stop(),g()},[d]);return Ae.useEffect(()=>{!c||(p(c),u((d==null?void 0:d.isPlaying())??!1),c.on("reInit",p),c.on("select",p),c.on("autoplay:play",()=>u(!0)),c.on("autoplay:stop",()=>u(!1)))},[c,d,p]),Dt("div",{className:i(Dc({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:[je(Lc,{className:"h-4 w-4"}),je("span",{className:"sr-only",children:"Previous slide"})]}),c!=null&&je("div",{className:"flex items-center gap-1",children:c.slideNodes().map((g,h)=>Dt("button",{onClick:f(()=>c.scrollTo(h)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[je("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",h===m?"bg-black":"bg-black/20",l&&h===m&&"w-6 bg-black/20"),children:l&&h===m&&je(Ec.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((d==null?void 0:d.options.delay)??co)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Dt("span",{className:"sr-only",children:["Slide ",h+1]})]},h))}),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:[je(Mc,{className:"h-4 w-4"}),je("span",{className:"sr-only",children:"Next slide"})]})]})};import Ac from"embla-carousel-react";import{forwardRef as Ic,useCallback as Oc,useEffect as zc}from"react";import{jsx as hr}from"react/jsx-runtime";var T2=({className:e,...t})=>{let{api:r}=ve(),[o,a]=Ac({dragFree:!0}),n=Oc(c=>{!c||!a||a==null||a.scrollTo(c.selectedScrollSnap())},[a]);return zc(()=>{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})})},R2=Ic(({index:e,className:t,...r},o)=>{let{api:a}=ve(),n=zn();return hr("div",{ref:o,children:hr("button",{type:"button",onClick:()=>{var d;if(!a)return;let c=(d=a.plugins())==null?void 0:d.autoplay;c&&c.isPlaying()&&c.stop(),a.scrollTo(e)},className:typeof t=="function"?t({active:e===n}):t,...r})})});import*as At from"@radix-ui/react-checkbox";import{forwardRef as Vc}from"react";import{jsx as mo,jsxs as Hc}from"react/jsx-runtime";var ht=Vc(({className:e,...t},r)=>mo(At.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:Hc(At.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[mo(ir,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),mo(dr,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));ht.displayName=At.Root.displayName;import{Command as Ye,useCommandState as Bc}from"cmdk";import{ChevronDown as Wc}from"lucide-react";import{forwardRef as Uc,isValidElement as $c,useCallback as Gc,useEffect as yr,useState as It}from"react";import*as Ie from"@radix-ui/react-popover";import{Drawer as vt}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:d,onOpenAutoFocus:m,collisionBoundary:s,sticky:l,onEscapeKeyDown:u,onWheel:p,sideOffset:f=8}){let{isMobile:b}=Q();return c||b?vr(vt.Root,{open:a,onOpenChange:n,children:[Te(vt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),vr(vt.Portal,{children:[Te(vt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),vr(vt.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(vt.Overlay,{})]})]}):vr(Ie.Root,{open:a,onOpenChange:n,children:[Te(Ie.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),Te(Ie.Portal,{children:Te(Ie.Content,{sideOffset:f,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",d),sticky:l,collisionBoundary:s,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{useRef as _c}from"react";import{jsx as Hn,jsxs as Fc}from"react/jsx-runtime";function xr({children:e,className:t}){let r=_c(null),{scrollProgress:o,updateScrollProgress:a}=Ee(r);return Fc("div",{className:"relative",children:[Hn("div",{className:i("scrollbar-hide h-full w-screen overflow-y-scroll [clip-path:inset(0)] sm:w-auto",t),ref:r,onScroll:a,children:e}),Hn("div",{className:"pointer-events-none absolute bottom-0 left-0 z-10 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white to-transparent sm:block",style:{opacity:1-Math.pow(o,2)}})]})}import{Fragment as uo,jsx as I,jsxs as Oe}from"react/jsx-runtime";function Kc(e,t){return e===!0}function _n({multiple:e,selected:t,setSelected:r,onSelect:o,options:a,trigger:n,icon:c,placeholder:d="Select...",searchPlaceholder:m="Search...",emptyState:s,createLabel:l,createIcon:u=pt,onCreate:p,buttonProps:f,labelProps:b,iconProps:g,popoverProps:h,shortcutHint:N,caret:x,side:y,open:C,onOpenChange:w,onSearchChange:T,shouldFilter:B=!0,inputRight:R,inputClassName:S,optionRight:Y,optionClassName:P,matchTriggerWidth:M,hideSearch:L=!1,children:E}){let z=Kc(e,r),k=Array.isArray(t)?t:t?[t]:[],{isMobile:Wr}=Q(),[Xt,cs]=It(!1),Ur=C??Xt,Jt=w??cs,[me,$r]=It(""),[qo,Gr]=It(!1),[Kr,ds]=It(void 0),[ms,Xo]=It(!1),us=H=>{var lt;if(o==null||o(H),!!r)if(z){let Ue=k.some(({value:$e})=>$e===H.value);r(Ue?k.filter(({value:$e})=>$e!==H.value):[...k,H])}else r(k.length&&((lt=k[0])==null?void 0:lt.value)===H.value?null:H),Jt(!1)},Jo=Gc((H,lt)=>lt===""?[...H.filter(Ue=>Ue.first&&!k.some($e=>$e.value===Ue.value)),...k,...H.filter(Ue=>!Ue.first&&!k.some($e=>$e.value===Ue.value))]:H,[k]);yr(()=>{qo&&(ds(a&&Jo(a,me)),Gr(!1))},[qo,a,Jo,me]),yr(()=>{Gr(!0)},[a]),yr(()=>{Ur||($r(""),Gr(!0))},[Ur]),yr(()=>T==null?void 0:T(me),[me]);let Qo=Oe(Ye.Item,{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",P),onSelect:async()=>{Xo(!0),await(p==null?void 0:p(me))&&($r(""),Jt(!1)),Xo(!1)},children:[ms?I(ue,{className:"size-4 shrink-0"}):I(u,{className:"size-4 shrink-0"}),I("div",{className:"grow truncate",children:(l==null?void 0:l(me))??`Create ${me?`"${me}"`:"new option..."}`})]});return I(xe,{openPopover:Ur,setOpenPopover:Jt,align:"start",side:y,onWheel:H=>{H.stopPropagation()},popoverContentClassName:i(M&&"sm:w-[var(--radix-popover-trigger-width)]",h==null?void 0:h.contentClassName),content:I(fe,{width:!Wr&&!M,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:Oe(Ye,{loop:!0,shouldFilter:B,children:[!L&&Oe("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[I(Ye.Input,{placeholder:m,value:me,onValueChange:$r,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",S),onKeyDown:H=>{(H.key==="Escape"||H.key==="Backspace"&&!me)&&(H.preventDefault(),H.stopPropagation(),Jt(!1))}}),R&&I("div",{className:"mr-2",children:R}),N&&I("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:N})]}),I(xr,{className:i("max-h-[min(50vh,250px)]",p&&!e&&"max-h-[calc(min(50vh,250px)-3.5rem)]"),children:I(Ye.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:Kr!==void 0?Oe(uo,{children:[Kr.map(H=>I(jc,{option:H,multiple:z,selected:k.some(({value:lt})=>lt===H.value),onSelect:()=>us(H),right:Y==null?void 0:Y(H),className:P},`${H.label}, ${H.value}`)),p&&e&&me.length>0&&Qo,B?I(Zc,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):Kr.length===0?I("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):I(Ye.Loading,{children:I("div",{className:"flex h-12 items-center justify-center",children:I(ue,{})})})})}),p&&!e&&I("div",{className:"rounded-b-lg border-t border-neutral-200 bg-white p-1",children:Qo})]})}),children:n??I(ee,{variant:"secondary",...f,className:i(f==null?void 0:f.className,"flex gap-2"),textWrapperClassName:i(f==null?void 0:f.textWrapperClassName,"w-full flex items-center justify-start"),text:Oe(uo,{children:[I("div",{className:i("min-w-0 grow truncate text-left",b==null?void 0:b.className),children:E||k.map(H=>H.label).join(", ")||d}),x&&(x===!0?I(Wc,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):x)]}),icon:c?Fn(c)?c:I(c,{className:i("size-4 shrink-0",g==null?void 0:g.className)}):void 0})})}function jc({option:e,onSelect:t,multiple:r,selected:o,right:a,className:n}){return Oe(uo,{children:[I(Yc,{disabledTooltip:e.disabledTooltip,children:Oe(Ye.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&&I("div",{className:"shrink-0 text-neutral-600",children:o?I(Ra,{className:"size-4 text-neutral-600"}):I(La,{className:"size-4 text-neutral-400"})}),Oe("div",{className:"flex min-w-0 grow items-center gap-2",children:[e.icon&&I("span",{className:"shrink-0 text-neutral-600",children:Fn(e.icon)?e.icon:I(e.icon,{className:"h-4 w-4"})}),I("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&I(ir,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&I(Ye.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Yc=({children:e,disabledTooltip:t})=>t?I(Z,{content:t,children:I("div",{children:e})}):e,Fn=e=>$c(e),Zc=Uc((e,t)=>Bc(o=>o.filtered.count===0)?I("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Nr,format as qc,isSameMonth as Xc}from"date-fns";import{ChevronLeft as Bn,ChevronRight as Wn,ChevronsLeft as Jc,ChevronsRight as Qc}from"lucide-react";import{forwardRef as ed,useRef as td}from"react";import{DayPicker as rd,useDayPicker as od,useDayRender as ad,useNavigation as nd}from"react-day-picker";import{Fragment as id,jsx as re,jsxs as wr}from"react/jsx-runtime";var Ot=ed(({onClick:e,icon:t,disabled:r,...o},a)=>re("button",{ref:a,type:"button",disabled:r,className:i("flex size-7 shrink-0 select-none items-center justify-center rounded border p-1 outline-none transition","border-neutral-200 text-neutral-600 hover:text-neutral-800","hover:bg-neutral-50 active:bg-neutral-100","disabled:pointer-events-none disabled:text-neutral-400"),onClick:e,...o,children:re(t,{className:"h-full w-full shrink-0"})}));Ot.displayName="NavigationButton";function Un({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:a,locale:n,className:c,classNames:d,...m}){return re(rd,{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",...d},components:{IconLeft:()=>re(Bn,{className:"h-4 w-4"}),IconRight:()=>re(Wn,{className:"h-4 w-4"}),Caption:({...s})=>{let{goToMonth:l,nextMonth:u,previousMonth:p,currentMonth:f,displayMonths:b}=nd(),{numberOfMonths:g,fromDate:h,toDate:N}=od(),x=b.findIndex(S=>Xc(s.displayMonth,S)),y=x===0,C=x===b.length-1,w=g>1&&(y||!C),T=g>1&&(C||!y),B=()=>{let S=Nr(f,-1);p&&(!h||S.getTime()>=h.getTime())&&l(S)},R=()=>{let S=Nr(f,1);u&&(!N||S.getTime()<=N.getTime())&&l(S)};return wr("div",{className:"flex items-center justify-between",children:[wr("div",{className:"flex items-center gap-1",children:[o&&!T&&re(Ot,{disabled:a||!p||h&&Nr(f,-1).getTime()<h.getTime(),"aria-label":"Go to previous year",onClick:B,icon:Jc}),!T&&re(Ot,{disabled:a||!p,"aria-label":"Go to previous month",onClick:()=>p&&l(p),icon:Bn})]}),re("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:qc(s.displayMonth,"LLLL yyy",{locale:n})}),wr("div",{className:"flex items-center gap-1",children:[!w&&re(Ot,{disabled:a||!u,"aria-label":"Go to next month",onClick:()=>u&&l(u),icon:Wn}),o&&!w&&re(Ot,{disabled:a||!u||N&&Nr(f,1).getTime()>N.getTime(),"aria-label":"Go to next year",onClick:R,icon:Qc})]})]})},Day:({date:s,displayMonth:l})=>{let u=td(null),{activeModifiers:p,buttonProps:f,divProps:b,isButton:g,isHidden:h}=ad(s,l,u),{selected:N,today:x,disabled:y,range_middle:C}=p;if(h)return re(id,{});if(!g)return re("div",{...b,className:i("flex items-center justify-center",b.className)});let{children:w,...T}=f;return wr("button",{ref:u,...T,type:"button",children:[w,x&&re("span",{className:i("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!N,"!bg-white":N,"!bg-blue-400":N&&C,"text-neutral-400":y})})]})}},...m})}import{endOfDay as Gn,isSameDay as Kn,startOfDay as jn}from"date-fns";import{enUS as hd}from"date-fns/locale";import{useEffect as vo,useMemo as Yn,useRef as vd,useState as Cr}from"react";import{Command as po}from"cmdk";import{Lock as sd}from"lucide-react";import{jsx as Ze,jsxs as ld}from"react/jsx-runtime";var fo=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let a=s=>"dateRange"in s,n=s=>"date"in s,c=(s,l)=>s.getDate()===l.getDate()&&s.getMonth()===l.getMonth()&&s.getFullYear()===l.getFullYear(),d=(s,l)=>{let u=s.from,p=l.from,f=!1;u&&p&&c(u,p)&&(f=!0);let b=s.to,g=l.to,h=!1;return b&&g&&c(b,g)&&(h=!0),f&&h},m=s=>{if(o)return o===s.id;if(a(s)){let l=r;return l&&d(l,s.dateRange)}else if(n(s)){let l=r;return l&&c(l,s.date)}return!1};return Ze(po,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:Ze(po.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((s,l)=>ld(po.Item,{disabled:s.requiresUpgrade,onSelect:()=>t(s),title:s.label,value:s.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(s)&&"font-semibold text-neutral-800"),children:[Ze("span",{children:s.label}),s.requiresUpgrade?Ze(sd,{className:"h-3.5 w-3.5","aria-hidden":"true"}):s.shortcut?Ze("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:s.shortcut.toUpperCase()}):null,s.requiresUpgrade&&s.tooltipContent&&Ze(Z,{side:"bottom",content:s.tooltipContent,children:Ze("div",{className:"absolute inset-0 cursor-not-allowed"})})]},l))})})};fo.displayName="DatePicker.Presets";import{format as ze}from"date-fns";import{createContext as cd}from"react";var go=cd({isOpen:!1,setIsOpen:()=>{}}),dd=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},bo=(e,t,r=!1)=>{let o=!dd(),a;return r?a=o?ze(e,"d MMM, yyyy h:mm a",{locale:t}):ze(e,"d MMM, yyyy HH:mm",{locale:t}):a=ze(e,"d MMM, yyyy",{locale:t}),a},$n=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:a,toMonth:n,fromDay:c,toDay:d}=t;if(e&&e.length>0){let m=o,s=r;e.forEach(l=>{var u,p,f,b,g,h;if("date"in l){let N=l.date.getFullYear();if(o&&N<o)throw new Error(`Preset ${l.label} is before fromYear ${m}.`);if(r&&N>r)throw new Error(`Preset ${l.label} is after toYear ${s}.`);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(d&&l.date.getDate()>d.getDate())throw new Error(`Preset ${l.label} is after toDay ${ze(d,"MMM dd, yyyy")}.`)}if("dateRange"in l){let N=(u=l.dateRange.from)==null?void 0:u.getFullYear(),x=(p=l.dateRange.to)==null?void 0:p.getFullYear();if(N&&o&&N<o)throw new Error(`Preset ${l.label}'s 'from' is before fromYear ${m}.`);if(x&&r&&x>r)throw new Error(`Preset ${l.label}'s 'to' is after toYear ${s}.`);if(a){let y=(f=l.dateRange.from)==null?void 0:f.getMonth();if(y&&y<a.getMonth())throw new Error(`Preset ${l.label}'s 'from' is before fromMonth ${ze(a,"MMM, yyyy")}.`)}if(n){let y=(b=l.dateRange.to)==null?void 0:b.getMonth();if(y&&y>n.getMonth())throw new Error(`Preset ${l.label}'s 'to' is after toMonth ${ze(n,"MMM, yyyy")}.`)}if(c){let y=(g=l.dateRange.from)==null?void 0:g.getDate();if(y&&y<c.getDate())throw new Error(`Preset ${l.dateRange.from}'s 'from' is before fromDay ${ze(c,"MMM dd, yyyy")}.`)}if(d){let y=(h=l.dateRange.to)==null?void 0:h.getDate();if(y&&y>d.getDate())throw new Error(`Preset ${l.label}'s 'to' is after toDay ${ze(d,"MMM dd, yyyy")}.`)}}})}};import{cva as md}from"class-variance-authority";import{Calendar as ud,ChevronDown as pd}from"lucide-react";import{forwardRef as fd}from"react";import{jsx as kr,jsxs as bd}from"react/jsx-runtime";var gd=md(["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"}}}),ho=fd(({className:e,children:t,placeholder:r,hasError:o,...a},n)=>bd("button",{ref:n,className:i(gd({hasError:o}),e),...a,children:[kr(ud,{className:i("h-4 w-4 shrink-0 text-neutral-400",!!t&&"text-neutral-900")}),kr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:t||(r?kr("span",{className:"text-neutral-400",children:r}):null)}),kr(pd,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));ho.displayName="DatePicker.Trigger";import{jsx as oe,jsxs as Zn}from"react/jsx-runtime";var xd=({value:e,defaultValue:t,presetId:r,onChange:o,presets:a,disabled:n,disableNavigation:c,disabledDays:d,showYearNavigation:m=!1,locale:s=hd,placeholder:l="Select date range",hasError:u,align:p="center",className:f,...b})=>{let{isDesktop:g}=Q(),[h,N]=Cr(!1),[x,y]=Cr(a&&r?a==null?void 0:a.find(({id:E})=>E===r):void 0),[C,w]=Cr((x==null?void 0:x.dateRange)??e??t??void 0),[T,B]=Cr(C==null?void 0:C.to),R=Yn(()=>C,[h]);vo(()=>{w(e)},[e]),vo(()=>{let E=a==null?void 0:a.find(({id:z})=>z===r);y(E),w((E==null?void 0:E.dateRange)??e??t)},[a,r]),vo(()=>{h?C&&B(C.to):B(C==null?void 0:C.to)},[h]);let S=(E,z)=>{let k=(C==null?void 0:C.from)&&(C==null?void 0:C.to)?{from:z}:E;(k==null?void 0:k.from)&&(k==null?void 0:k.to)&&Kn(k.from,k.to)&&(k.from=jn(k.from),k.to=Gn(k.to)),w(k),y(void 0),(k==null?void 0:k.from)&&(k==null?void 0:k.to)&&(o==null||o(k),N(!1))},Y=E=>{let z=E.dateRange;(z==null?void 0:z.from)&&(z==null?void 0:z.to)&&Kn(z.from,z.to)&&(z={from:jn(z.from),to:Gn(z.to)}),w(z),y(E),o==null||o(z,E),N(!1)},P=()=>{w(R),N(!1)},M=E=>{E||P(),N(E)},L=Yn(()=>C?`${C.from?bo(C.from,s):""} - ${C.to?bo(C.to,s):""}`:null,[C,s]);return De((a==null?void 0:a.filter(E=>E.shortcut).map(E=>E.shortcut))??[],E=>{let z=a==null?void 0:a.find(k=>k.shortcut===E.key);z&&Y(z)}),oe(go.Provider,{value:{isOpen:h,setIsOpen:N},children:oe(xe,{align:p,openPopover:h,setOpenPopover:M,popoverContentClassName:"rounded-xl",content:oe("div",{className:"flex w-full",children:Zn("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[a&&a.length>0&&oe(yd,{children:oe("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:oe("div",{className:"sm:py-3",children:oe(fo,{currentPresetId:r,currentValue:C,presets:a,onSelect:Y})})})}),oe("div",{className:"scrollbar-hide overflow-x-scroll",children:oe(Un,{mode:"range",selected:C,onSelect:S,month:T,onMonthChange:B,numberOfMonths:g?2:1,disabled:d,disableNavigation:c,showYearNavigation:m,locale:s,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...b})})]})}),children:oe(ho,{placeholder:l,disabled:n,className:f,hasError:u,"aria-required":b.required||b["aria-required"],"aria-invalid":b["aria-invalid"],"aria-label":b["aria-label"],"aria-labelledby":b["aria-labelledby"],children:(x==null?void 0:x.label)??L})})})};function $y({presets:e,...t}){return e&&$n(e,t),oe(xd,{presets:e,...t})}function yd({children:e}){let t=vd(null),{scrollProgress:r,updateScrollProgress:o}=Ee(t);return Zn("div",{className:"relative sm:h-full",children:[oe("div",{ref:t,onScroll:o,className:i("relative flex h-16 w-full items-center sm:h-full sm:w-48","border-b border-neutral-200 sm:border-b-0 sm:border-l","scrollbar-hide overflow-auto"),children:e}),oe("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(r,2)}})]})}import{useId as Nd}from"react";import{jsx as Pr,jsxs as wd}from"react/jsx-runtime";function Jy({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let a=Nd();return wd("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 kd from"next/link";import{useEffect as Cd,useState as qn}from"react";import Pd from"swr";import{jsx as xo,jsxs as Xn}from"react/jsx-runtime";function Jn({className:e}){let{data:t}=Pd("https://status.dub.co/api/v1/summary",be),[r,o]=qn("bg-neutral-200"),[a,n]=qn("Loading status...");return Cd(()=>{if(!t)return;let{ongoing_incidents:c}=t;if(c.length>0){let{current_worst_impact:d,name:m}=c[0],s=d==="degraded_performance"?"bg-yellow-500":"bg-red-500";n(m),o(s)}else n("All systems operational"),o("bg-green-500")},[t]),Xn(kd,{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:[Xn("div",{className:"relative size-2",children:[xo("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")}),xo("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),xo("p",{className:"text-xs font-medium leading-none text-neutral-600",children:a})]})}import{jsx as Sr,jsxs as Qn}from"react/jsx-runtime";function i4({icon:e,title:t,description:r,learnMore:o,children:a}){return Qn("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&&Qn("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 Sd}from"class-variance-authority";import{useState as ei}from"react";import{toast as ti}from"sonner";import{Fragment as Rd,jsx as ye,jsxs as No}from"react/jsx-runtime";var ri=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],yo={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:ri,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:[...ri,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},Td=Sd("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 h4({id:e,readFile:t,onChange:r,variant:o,className:a,iconClassName:n,previewClassName:c,icon:d=Oa,customPreview:m,accept:s="any",imageSrc:l,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:f=!0,content:b,maxFileSizeMB:g=5,targetResolution:h,accessibilityLabel:N="File upload",disabled:x=!1}){let[y,C]=ei(!1),[w,T]=ei(null),B=async R=>{let S="dataTransfer"in R?R.dataTransfer.files&&R.dataTransfer.files[0]:R.target.files&&R.target.files[0];if(!S)return;if(T(S.name),g>0&&S.size/1024/1024>g){ti.error(`File size too big (max ${g} MB)`);return}let Y=yo[s].types;if(Y.length&&!Y.includes(S.type)){ti.error(yo[s].errorMessage??"File type not supported");return}let P=S;if(h&&S.type.startsWith("image/"))try{let M=await ca(S,h),L=await fetch(M).then(E=>E.blob());P=new File([L],S.name,{type:S.type})}catch(M){console.error("Error resizing image:",M)}if(t){let M=new FileReader;M.onload=L=>{var E;return r==null?void 0:r({src:(E=L.target)==null?void 0:E.result,file:P})},M.readAsDataURL(P);return}r==null||r({file:P})};return No("label",{className:i(Td({variant:o}),x?"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:R=>{R.preventDefault(),R.stopPropagation(),C(!0)},onDragEnter:R=>{R.preventDefault(),R.stopPropagation(),C(!0)},onDragLeave:R=>{R.preventDefault(),R.stopPropagation(),C(!1)},onDrop:async R=>{R.preventDefault(),R.stopPropagation(),B(R),C(!1)}}),No("div",{className:i("absolute inset-0 z-[3] flex flex-col items-center justify-center rounded-[inherit] border-2 border-transparent bg-white transition-all",x&&"bg-neutral-50",y&&!x&&"cursor-copy border-black bg-neutral-50 opacity-100",l?i("opacity-0",f&&!x&&"group-hover:opacity-100"):i(!x&&"group-hover:bg-neutral-50")),children:[ye(d,{className:i("size-7 transition-all duration-75",x?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",y?"scale-110":"scale-100"),n)}),b!==null&&ye("div",{className:i("mt-2 text-center text-sm text-neutral-500",x&&"text-neutral-400"),children:b??ye(Rd,{children:No("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),ye("span",{className:"sr-only",children:N})]}),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:yo[s].types.join(","),onChange:B,disabled:x},w)})]})}import{X as Ld}from"lucide-react";import{AnimatePresence as Md,motion as oi}from"motion/react";import Ed from"next/link";import{isValidElement as Dd,useState as Ad}from"react";import{jsx as G,jsxs as zt}from"react/jsx-runtime";function ni({filters:e,activeFilters:t,onRemove:r,onRemoveAll:o,onSelect:a,className:n}){return De("Escape",o,{priority:1}),G(fe,{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",n),children:[G("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:G(Md,{children:t==null?void 0:t.map(({key:c,value:d})=>{if(c==="loader")return G(oi.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},`loader-${d}`);let m=e.find(s=>s.key===c);return m?(m.multiple&&Array.isArray(d)?d:[d]).map(s=>{var g,h,N,x;let l=(g=m.options)==null?void 0:g.find(y=>typeof y.value=="string"&&typeof s=="string"?y.value.toLowerCase()===s.toLowerCase():y.value===s),u=(l==null?void 0:l.icon)??((h=m.getOptionIcon)==null?void 0:h.call(m,s,{key:m.key,option:l}))??m.icon,p=(l==null?void 0:l.label)??((N=m.getOptionLabel)==null?void 0:N.call(m,s,{key:m.key,option:l}))??s,f=(l==null?void 0:l.permalink)??((x=m.getOptionPermalink)==null?void 0:x.call(m,s))??null,b=({className:y})=>zt("div",{className:i("flex items-center gap-2.5 px-3 py-2",y),children:[G("span",{className:"shrink-0 text-neutral-600",children:ai(u)?u:G(u,{className:"h-4 w-4"})}),f?G(Ed,{href:f,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:ct(p,30)}):ct(p,30)]});return zt(oi.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:[G("span",{className:"shrink-0 text-neutral-600",children:ai(m.icon)?m.icon:G(m.icon,{className:"h-4 w-4"})}),m.label]}),G("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),G("div",{className:"flex items-center",children:m.options?a&&!m.hideInFilterDropdown?(()=>{var w;let y=((w=m.options)==null?void 0:w.map(T=>{var R,S;let B=T.icon??((R=m.getOptionIcon)==null?void 0:R.call(m,T.value,{key:m.key,option:T}))??m.icon;return{label:T.label??((S=m.getOptionLabel)==null?void 0:S.call(m,T.value,{key:m.key,option:T}))??String(T.value),value:String(T.value),icon:B}}))??[],C=y.find(T=>typeof T.value=="string"&&typeof s=="string"?T.value.toLowerCase()===String(s).toLowerCase():T.value===String(s));return G(Id,{filter:m,value:s,filterKey:c,options:y,selectedOption:C,onRemove:r,onSelect:a,OptionDisplay:b,optionLabel:p},`${c}-${s}`)})():b({}):G("div",{className:"flex items-center gap-2.5 px-3 py-2",children:G("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})})}),G("button",{type:"button",className:"h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500 hover:bg-neutral-100 hover:text-neutral-800 focus:outline-none focus-visible:ring-1",onClick:()=>r(c,s),children:G(Ld,{className:"h-3.5 w-3.5"})})]},`${c}-${s}`)}):(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",G("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"})]})]})})}function Id({filter:e,value:t,filterKey:r,options:o,selectedOption:a,onRemove:n,onSelect:c,OptionDisplay:d,optionLabel:m}){let[s,l]=Ad(""),u=e.options&&e.options.length===0,p=(()=>u?s?null:G("div",{className:"p-2 text-center text-sm text-neutral-400",children:"Start typing to search..."}):G("div",{className:"p-2 text-center text-sm text-neutral-400",children:"No matching options"}))();return G(_n,{selected:a??null,setSelected:f=>{f&&f.value!==String(t)&&(n(r,t),c(r,f.value))},options:o,onSearchChange:l,onCreate:u&&c?async f=>(n(r,t),c(r,f),!0):void 0,createLabel:u?f=>f:void 0,createIcon:e.icon,optionRight:f=>{var g;if(f.value===String(t))return;let b=(g=e.options)==null?void 0:g.find(h=>typeof String(h.value)=="string"&&typeof f.value=="string"?String(h.value).toLowerCase()===f.value.toLowerCase():String(h.value)===f.value);return b?G("span",{className:"ml-2 text-neutral-500",children:b.right}):null},placeholder:ct(m,30),caret:!1,emptyState:p,trigger:d({className:"cursor-pointer hover:bg-neutral-50"})})}var ai=e=>Dd(e);import{Command as Re,useCommandState as Od}from"cmdk";import{ChevronDown as zd,ListFilter as Vd}from"lucide-react";import{Fragment as Hd,forwardRef as _d,isValidElement as ii,useCallback as Tr,useEffect as Rr,useImperativeHandle as Fd,useRef as ko,useState as wo}from"react";import{Fragment as Kd,jsx as _,jsxs as Ne}from"react/jsx-runtime";function si({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:a,onSelectedFilterChange:n,activeFilters:c,askAI:d,children:m,emptyState:s,className:l}){var S,Y;let{isMobile:u}=Q(),p=ko(null),f=ko(void 0),[b,g]=wo(!1);De("f",()=>g(!0),{enabled:!b});let[h,N]=wo(""),[x,y]=wo(null),C=Tr(()=>{N(""),y(null)},[]);Rr(()=>{b||C()},[b]);let w=x?e.find(({key:P})=>P===x):null,T=Tr(P=>{p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight}),N(""),y(P),o==null||o(P)},[]),B=Tr(P=>{if(!w||!c)return!1;let M=c.find(({key:L})=>L===x);return(M==null?void 0:M.value)===P||M&&w.multiple&&Array.isArray(M.value)&&M.value.includes(P)},[w]),R=Tr(P=>{w&&(B(P)?r(w.key,P):t(w.key,P),w.multiple||g(!1))},[c,w,d]);return Rr(()=>{a==null||a(h)},[h]),Rr(()=>{n==null||n(x)},[x]),Rr(()=>{(w==null?void 0:w.options)&&p.current&&(f.current={width:p.current.clientWidth,height:p.current.clientHeight})},[w==null?void 0:w.options]),_(xe,{openPopover:b,setOpenPopover:g,onEscapeKeyDown:P=>{x&&(P.preventDefault(),C())},content:_(fe,{width:!u,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:Ne(Re,{loop:!0,shouldFilter:!w||w.shouldFilter!==!1,children:[Ne("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[_(Wd,{placeholder:`${(w==null?void 0:w.label)||"Filter"}...`,value:h,onValueChange:N,onKeyDown:P=>{(P.key==="Escape"||P.key==="Backspace"&&!h)&&(P.preventDefault(),P.stopPropagation(),x?C():g(!1))},onEmptySubmit:P=>{P.preventDefault(),P.stopPropagation(),d?(t("ai",w?`${w.label} ${h}`:h),g(!1)):R(h)}}),!w&&_("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"})]}),_(Ud,{ref:p,children:Ne(Re.List,{className:i("flex w-full flex-col gap-1 p-1",w?"min-w-[100px]":"min-w-[180px]"),children:[w?((Y=(S=w.options)==null?void 0:S.filter(P=>!h||!P.hideDuringSearch))==null?void 0:Y.map(P=>{let M=B(P.value);return _(Co,{filter:w,option:P,right:M?_(Ta,{className:"h-4 w-4"}):P.right,onSelect:()=>R(P.value)},P.value)}))??_(Re.Loading,{children:_("div",{className:"-m-1 flex items-center justify-center",style:f.current,children:_(ue,{})})}):e.filter(P=>!P.hideInFilterDropdown).map(P=>Ne(Hd,{children:[_(Co,{filter:P,onSelect:()=>T(P.key)}),P.separatorAfter&&_(Re.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},P.key)),(!w||w.options)&&_($d,{search:h,selectedFilter:w,onSelect:()=>R(h),askAI:d,children:s?Bd(s)?(s==null?void 0:s[x??"default"])??"No matching options":s:"No matching options"})]})},x)]})}),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:[_(Vd,{className:"size-4 shrink-0"}),_("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:m??"Filter"}),c!=null&&c.length?_("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:c.length}):_(zd,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function Bd(e){return typeof e=="object"&&e!==null&&!ii(e)}var Wd=e=>{let{onEmptySubmit:t,...r}=e,o=Od(a=>a.filtered.count===0);return _(Re.Input,{...r,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:a=>{var n;(n=e.onKeyDown)==null||n.call(e,a),a.key==="Enter"&&o&&(t==null||t(a))},autoCapitalize:"none"})},Ud=_d(({children:e},t)=>{let r=ko(null);Fd(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:a}=Ee(r);return Ne(Kd,{children:[_("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:a,children:e}),_("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Co({filter:e,option:t,right:r,onSelect:o}){var d,m;let{isMobile:a}=Q(),n=t?t.icon??((d=e.getOptionIcon)==null?void 0:d.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(Re.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:s=>{s.preventDefault()},onPointerUp:s=>{s.preventDefault(),a?setTimeout(o,100):o()},onSelect:o,value:c+(t==null?void 0:t.value),children:[_("span",{className:"shrink-0 text-neutral-600",children:Gd(n)?n:_(n,{className:"h-4 w-4"})}),ct(c,48),_("div",{className:"ml-1 flex shrink-0 grow justify-end text-neutral-500",children:r})]})}var $d=({search:e,selectedFilter:t,onSelect:r,askAI:o,children:a})=>t&&t.options&&t.options.length===0?e?_(Co,{filter:t,option:{value:e,label:e},onSelect:r}):_(Re.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:"Start typing to search..."}):!t&&o&&e?Ne(Re.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[_(pa,{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,'"']})]})]}):_(Re.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:a}),Gd=e=>ii(e);var $4={Select:si,List:ni};import{useMemo as jd,useState as li}from"react";import{jsx as qe,jsxs as Lr}from"react/jsx-runtime";function X4({title:e,description:t,inputAttrs:r,helpText:o,buttonText:a="Save Changes",disabledTooltip:n,handleSubmit:c}){let[d,m]=li(r.defaultValue),[s,l]=li(!1),u=jd(()=>s||!d||d===r.defaultValue,[s,d,r.defaultValue]);return Lr("form",{onSubmit:async p=>{p.preventDefault(),l(!0),await c({[r.name]:d}),l(!1)},className:"rounded-xl border border-neutral-200 bg-white",children:[Lr("div",{className:"relative flex flex-col space-y-6 p-6",children:[Lr("div",{className:"flex flex-col space-y-1",children:[qe("h2",{className:"text-base font-semibold",children:e}),qe("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?qe("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})}):qe("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Lr("div",{className:"flex flex-col items-start justify-between gap-4 rounded-b-xl border-t border-neutral-200 bg-neutral-50 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:space-y-0 sm:py-3",children:[typeof o=="string"?qe("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,qe("div",{className:"w-fit shrink-0",children:qe(ee,{text:a,loading:s,disabled:u,disabledTooltip:n})})]})]})}import{useId as Yd}from"react";import{jsx as Mr,jsxs as Zd}from"react/jsx-runtime";function Xe({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let a=Yd();return Zd("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 qd}from"lucide-react";import Xd,{useCallback as Jd,useState as Qd}from"react";import{jsx as Je,jsxs as Po}from"react/jsx-runtime";var em=Xd.forwardRef(({className:e,type:t,...r},o)=>{let[a,n]=Qd(!1),c=Jd(()=>n(!a),[a,n]);return Po("div",{children:[Po("div",{className:"relative flex",children:[Je("input",{type:a?"text":t,className:i("w-full max-w-md rounded-md border border-neutral-300 text-neutral-900 placeholder-neutral-400 read-only:bg-neutral-100 read-only:text-neutral-500 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm",r.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",e),ref:o,...r}),Po("div",{className:"group",children:[r.error&&Je("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:Je(qd,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&Je("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?Je(_a,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):Je(Fa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&Je("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});em.displayName="Input";import*as So from"@radix-ui/react-label";import{cva as tm}from"class-variance-authority";import*as ci from"react";import{jsx as am}from"react/jsx-runtime";var rm=tm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),om=ci.forwardRef(({className:e,...t},r)=>am(So.Root,{ref:r,className:i(rm(),e),...t}));om.displayName=So.Root.displayName;import{cva as nm}from"class-variance-authority";import{isValidElement as im}from"react";import{jsx as To,jsxs as di}from"react/jsx-runtime";var Ro=nm(["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 transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-red-50 dark:hover:bg-red-950/20"},disabled:{true:"opacity-50 cursor-default text-content-disabled hover:bg-bg-default"}}});function vN({as:e,variant:t="default",children:r,icon:o,shortcut:a,className:n,disabledTooltip:c,...d}){return To(ft,{tooltipProps:{content:c},children:di(e||"button",{...e==="button"?{type:"button"}:{},className:i(Ro({variant:t,disabled:!!c}),n),disabled:c?!0:d.disabled,...d,children:[di("div",{className:"flex grow items-center gap-2",children:[o&&(sm(o)?o:To(o,{className:"size-4"})),r]}),a&&To("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 sm=e=>im(e);import{curveNatural as mi}from"@visx/curve";import{LinearGradient as ui}from"@visx/gradient";import{Group as lm}from"@visx/group";import{ParentSize as cm}from"@visx/responsive";import{scaleLinear as dm,scaleUtc as mm}from"@visx/scale";import{Area as um,AreaClosed as pm}from"@visx/shape";import{motion as pi}from"motion/react";import{useId as fm,useMemo as fi}from"react";import{jsx as we,jsxs as Lo}from"react/jsx-runtime";var gm={top:8,right:2,bottom:2,left:2};function RN(e){return we(cm,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&we(bm,{...{width:t,height:r,...e}})})}function bm({width:e,height:t,data:r,curve:o=!0,color:a,padding:n}){let c={...gm,...n},d=fm(),m=fi(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:s,xScale:l}=fi(()=>{let u=r.map(({value:h})=>h),p=Math.max(...u),f=r.map(({date:h})=>h.getTime()),b=new Date(Math.min(...f)),g=new Date(Math.max(...f));return{yScale:dm({domain:[-2,Math.max(p,2)],range:[t-c.top-c.bottom,0],nice:!0,clamp:!0}),xScale:mm({domain:[b,g],range:[0,e-c.left-c.right],nice:!0})}},[r,t,e]);return Lo("svg",{width:e,height:t,children:[Lo("defs",{children:[we(ui,{id:`${d}-color-gradient`,from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:e-c.left-c.right,gradientUnits:"userSpaceOnUse"}),we(ui,{id:`${d}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),we("mask",{id:`${d}-mask`,maskContentUnits:"objectBoundingBox",children:we("rect",{width:"1",height:"1",fill:`url(#${d}-mask-gradient)`})})]}),Lo(lm,{left:c.left,top:c.top,children:[we(um,{data:r,x:({date:u})=>l(u),y:({value:u})=>s(u)??0,curve:o?mi:void 0,children:({path:u})=>we(pi.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${d}-color-gradient)`})}),we(pm,{data:r,x:({date:u})=>l(u),y:({value:u})=>s(u)??0,yScale:s,curve:o?mi:void 0,children:({path:u})=>we(pi.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${d}-color-gradient)`,mask:`url(#${d}-mask)`})})]})]},r.length)}import*as se from"@radix-ui/react-dialog";import*as Mo from"@radix-ui/react-visually-hidden";import{useRouter as hm}from"next/navigation";import{Drawer as Qe}from"vaul";import{jsx as ae,jsxs as xt}from"react/jsx-runtime";function IN({children:e,className:t,showModal:r,setShowModal:o,onClose:a,desktopOnly:n,preventDefaultClose:c,drawerRootProps:d}){let m=hm(),s=({dragged:u}={})=>{c&&!u||(a&&a(),o?o(!1):m.back())},{isMobile:l}=Q();return l&&!n?ae(Qe.Root,{open:o?r:!0,onOpenChange:u=>{u||s({dragged:!0})},...d,children:xt(Qe.Portal,{children:[ae(Qe.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ae(Qe.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:xt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[xt(Mo.Root,{children:[ae(Qe.Title,{children:"Modal"}),ae(Qe.Description,{children:"This is a modal"})]}),ae(vm,{}),e]})}),ae(Qe.Overlay,{})]})}):ae(se.Root,{open:o?r:!0,onOpenChange:u=>{u||s()},children:xt(se.Portal,{children:[ae(se.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),xt(se.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:[xt(Mo.Root,{children:[ae(se.Title,{children:"Modal"}),ae(se.Description,{children:"This is a modal"})]}),e]})]})})}function vm(){return ae("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ae("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{useCallback as Eo}from"react";import{jsx as Vt,jsxs as xm}from"react/jsx-runtime";function BN({value:e,onChange:t,min:r,max:o,step:a=1,disabled:n,className:c,id:d,formatValue:m,decrementAriaLabel:s="Decrease",incrementAriaLabel:l="Increase",...u}){let p=typeof r=="number"?e>r:!0,f=typeof o=="number"?e<o:!0,b=Eo(N=>{let x=N;return typeof r=="number"&&(x=Math.max(r,x)),typeof o=="number"&&(x=Math.min(o,x)),x},[r,o]),g=Eo(()=>{n||!p||t(b(e-a))},[n,p,b,t,a,e]),h=Eo(()=>{n||!f||t(b(e+a))},[n,f,b,t,a,e]);return xm("div",{id:d,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:[Vt("button",{type:"button","aria-label":s,onClick:g,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:Vt(dr,{className:"block size-4"})}),Vt("div",{role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,tabIndex:0,onKeyDown:N=>{n||((N.key==="ArrowLeft"||N.key==="ArrowDown")&&(N.preventDefault(),g()),(N.key==="ArrowRight"||N.key==="ArrowUp")&&(N.preventDefault(),h()))},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}),Vt("button",{type:"button","aria-label":l,onClick:h,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:Vt(pt,{className:"block size-4"})})]})}import{Fragment as bi,jsx as yt,jsxs as Nt}from"react/jsx-runtime";var gi=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 $N({pagination:e,setPagination:t,totalCount:r,unit:o=d=>`item${d?"s":""}`,className:a,children:n,showTotalCount:c=!0}){return Nt("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",a),children:[Nt("div",{className:"flex items-center gap-2",children:[yt("div",{children:r===void 0?yt("div",{className:"h-5 w-24 animate-pulse rounded-lg bg-neutral-200"}):Nt(bi,{children:[yt("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&Nt(bi,{children:[Nt("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&&yt("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]})}),n]}),Nt("div",{className:"flex items-center gap-2",children:[yt("button",{type:"button",className:gi,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),yt("button",{type:"button",className:gi,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:!r||(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import{jsx as hi,jsxs as ym}from"react/jsx-runtime";function jN({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 ym("svg",{width:"100",height:"100",viewBox:"0 0 100 100",className:i("size-3 shrink-0 text-green-600 [--track-color:#e5e5e5]",r),children:[hi("circle",{cx:"50",cy:"50",r:a,strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round",className:"stroke-[var(--track-color)]"}),o>0&&hi("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 Ve from"@radix-ui/react-radio-group";import{Circle as Nm}from"lucide-react";import*as Do from"react";import{jsx as Er}from"react/jsx-runtime";var wm=Do.forwardRef(({className:e,...t},r)=>Er(Ve.Root,{className:i("grid gap-2",e),...t,ref:r}));wm.displayName=Ve.Root.displayName;var km=Do.forwardRef(({className:e,...t},r)=>Er(Ve.Item,{ref:r,className:i("border-primary text-primary ring-offset-background focus-visible:ring-ring aspect-square h-4 w-4 rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:Er(Ve.Indicator,{className:"flex items-center justify-center",children:Er(Nm,{className:"h-2.5 w-2.5 fill-current text-current"})})}));km.displayName=Ve.Item.displayName;import{Drawer as He}from"vaul";import{jsx as et,jsxs as Rm}from"react/jsx-runtime";function Cm({children:e,contentProps:t,nested:r=!1,...o}){let a=r?He.NestedRoot:He.Root;return et(a,{direction:"right",handleOnly:!0,...o,children:Rm(He.Portal,{children:[et(He.Overlay,{className:"fixed inset-0 z-40 bg-black/20","data-sheet-overlay":!0}),et(He.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("@container/sheet fixed bottom-2 right-2 top-2 z-40 flex outline-none","w-[min(var(--sheet-width),calc(100%-2*var(--sheet-margin)))] [--sheet-margin:8px] [--sheet-width:540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)",userSelect:"auto",...t==null?void 0:t.style},children:et("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-xl bg-white",children:e})})]})})}function Pm({className:e,...t}){return et(He.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function Sm(e){return et(He.Description,{...e})}function Tm(e){return et(He.Close,{...e})}var t3=Object.assign(Cm,{Title:Pm,Description:Sm,Close:Tm});import{useEffect as Lm,useRef as Mm,useState as Em}from"react";import{jsx as vi}from"react/jsx-runtime";var Dm=`
|
|
2
|
+
import{$ as m0,$a as og,$b as Kg,$c as Eb,$d as Ch,$e as hv,A as Yf,Aa as z0,Ab as kg,Ac as da,Ad as th,Ae as Ca,B as Zf,Ba as F0,Bb as Cg,Bc as fb,Bd as rh,Be as Pa,C as pr,Ca as H0,Cb as Pg,Cc as gb,Cd as oh,Ce as Sa,D as qf,Da as _0,Db as Sg,Dc as ua,Dd as nh,De as Ta,E as Xf,Ea as hr,Eb as Tg,Ec as bb,Ed as ah,Ee as qh,F as fr,Fa as $0,Fb as Rg,Fc as ma,Fd as ya,Fe as Xh,G as Jf,Ga as B0,Gb as Lg,Gc as hb,Gd as ih,Ge as Jh,H as Qf,Ha as W0,Hb as Mg,Hc as vb,Hd as sh,He as Qh,I as e0,Ia as U0,Ib as Eg,Ic as xb,Id as lh,Ie as ev,J as t0,Ja as Kn,Jb as ra,Jc as yb,Jd as ch,Je as tv,K as r0,Ka as G0,Kb as Ig,Kc as wb,Kd as dh,Ke as rv,L as gr,La as K0,Lb as Dg,Lc as pa,Ld as uh,Le as ov,M as o0,Ma as jn,Mb as Ag,Mc as fa,Md as mh,Me as nv,N as br,Na as j0,Nb as xr,Nc as Nb,Nd as ph,Ne as av,O as n0,Oa as Y0,Ob as Og,Oc as kb,Od as yt,Oe as iv,P as a0,Pa as Z0,Pb as Vg,Pc as Cb,Pd as fh,Pe as sv,Q as i0,Qa as q0,Qb as zg,Qc as Pb,Qd as gh,Qe as lv,R as s0,Ra as X0,Rb as Fg,Rc as Sb,Rd as bh,Re as cv,S as l0,Sa as J0,Sb as Hg,Sc as ga,Sd as hh,Se as dv,T as c0,Ta as Q0,Tb as oa,Tc as Tb,Td as vh,Te as uv,U as d0,Ua as eg,Ub as _g,Uc as ba,Ud as wa,Ue as mv,V as Hn,Va as tg,Vb as $g,Vc as ha,Vd as xh,Ve as zt,W as _n,Wa as rg,Wb as Bg,Wc as Rb,Wd as yh,We as pv,X as $n,Xa as xt,Xb as Wg,Xc as Lb,Xd as Na,Xe as fv,Y as Bn,Ya as vr,Yb as Ug,Yc as Mb,Yd as wh,Ye as gv,Z as Wn,Za as Yn,Zb as Gg,Zc as va,Zd as Nh,Ze as bv,_ as u0,_a as Zn,_b as na,_c as xa,_d as kh,_e as Ra,a as Vf,aa as p0,ab as ng,ac as aa,ad as Ib,ae as Ph,af as vv,b as In,ba as f0,bb as ag,bc as ia,bd as Db,be as Sh,bf as xv,c as zf,ca as g0,cb as ig,cc as jg,cd as Ab,ce as Th,cf as yv,d as bt,da as b0,db as qn,dc as sa,dd as Ob,de as Rh,df as wv,e as mr,ea as h0,eb as Xn,ec as Yg,ed as yr,ee as Lh,ef as Nv,f as Ff,fa as v0,fb as sg,fc as Zg,fd as Vb,fe as Mh,ff as kv,g as ht,ga as x0,gb as lg,gc as qg,gd as zb,ge as Eh,gf as Cv,h as vt,ha as y0,hb as cg,hc as Xg,hd as Fb,he as Ih,i as fo,ia as w0,ib as Jn,ic as Jg,id as Hb,ie as Dh,j as Dn,ja as N0,jb as Qn,jc as Qg,jd as _b,je as Ah,k as Hf,ka as k0,kb as ea,kc as eb,kd as $b,ke as Oh,l as _f,la as C0,lb as dg,lc as la,ld as Bb,le as Vh,m as $f,ma as P0,mb as ug,mc as tb,md as Wb,me as zh,n as Bf,na as S0,nb as mg,nc as rb,nd as Ub,ne as Fh,o as An,oa as T0,ob as pg,oc as ob,od as Gb,oe as Hh,p as Wf,pa as R0,pb as fg,pc as nb,pd as Kb,pe as _h,q as Uf,qa as L0,qb as go,qc as ab,qd as jb,qe as $h,r as On,ra as M0,rb as gg,rc as ib,rd as Yb,re as Bh,s as Vn,sa as Un,sb as bg,sc as sb,sd as Zb,se as Wh,t as zn,ta as E0,tb as hg,tc as lb,td as wr,te as Uh,u as Fn,ua as I0,ub as vg,uc as cb,ud as Nr,ue as Gh,v as Gf,va as Gn,vb as ta,vc as db,vd as qb,ve as Kh,w as Vt,wa as D0,wb as xg,wc as ca,wd as Xb,we as jh,x as Kf,xa as A0,xb as yg,xc as ub,xd as Jb,xe as Yh,y as be,ya as O0,yb as wg,yc as mb,yd as Qb,ye as Zh,z as jf,za as V0,zb as Ng,zc as pb,zd as eh,ze as ka}from"./chunk-6VPQEKGX.mjs";import{a as ee}from"./chunk-NWME2ANF.mjs";import{a as yn,b as W,c as wn,d as Nn,e as Le,f as kn,g as Cn,h as Pn,i as Sn,j as Tn,k as mo,l as Ot,m as Rn,n as Ln,o as Mn,p as En,q as gt,r as ye,s as we,t as i,v as po,w as ur}from"./chunk-W3YBFHMA.mjs";import*as se from"@radix-ui/react-accordion";import{ChevronDown as Bs}from"lucide-react";import*as Cr from"react";import{jsx as kr,jsxs as Ks}from"react/jsx-runtime";var Mv=se.Root,Ws=Cr.forwardRef(({className:e,...t},r)=>kr(se.Item,{ref:r,className:i("border-b border-b-slate-200 py-3 last:border-none",e),...t}));Ws.displayName="AccordionItem";var Us=Cr.forwardRef(({className:e,children:t,variant:r="chevron",...o},n)=>{let a=r==="chevron"?Bs:yt;return kr(se.Header,{className:"flex",children:Ks(se.Trigger,{ref:n,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,kr(a,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});Us.displayName=se.Trigger.displayName;var Gs=Cr.forwardRef(({className:e,children:t,...r},o)=>kr(se.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}));Gs.displayName=se.Content.displayName;import{useMemo as Pr}from"react";import{jsx as Ne,jsxs as Ea}from"react/jsx-runtime";var Me={positive:"#00C951",negative:"#FB2C36",neutral:"#e5e5e5",positiveIcon:"#166534",negativeIcon:"#991b1b",neutralIcon:"#262626"},he=15,wt=30;function Nt(e,t,r,o){let n=(o-90)*Math.PI/180;return{x:e+r*Math.cos(n),y:t+r*Math.sin(n)}}function La(e,t,r,o,n){let a=Nt(e,t,r,o),d=Nt(e,t,r,n),m=n-o>180?1:0;return`M ${a.x} ${a.y} A ${r} ${r} 0 ${m} 1 ${d.x} ${d.y}`}function Ma(e,t,r,o,n,a){let d=Nt(e,t,r,n),l=Nt(e,t,r,a),m=Nt(e,t,o,n),c=Nt(e,t,o,a),u=a-n>180?1:0;return[`M ${d.x} ${d.y}`,`A ${r} ${r} 0 ${u} 1 ${l.x} ${l.y}`,`L ${c.x} ${c.y}`,`A ${o} ${o} 0 ${u} 0 ${m.x} ${m.y}`,"Z"].join(" ")}function Vv({positiveValue:e,negativeValue:t,size:r=40,positiveIcon:o,negativeIcon:n,neutralIcon:a,className:d}){let l=Pr(()=>e>t?"positive":t>e?"negative":"neutral",[e,t]),{positiveArc:m,negativeArc:c,showOnlyPositive:s,showOnlyNegative:u}=Pr(()=>{let I=e+t,y=360-he*2;if(I===0){let L=y/2;return{positiveArc:{start:he/2,end:he/2+L},negativeArc:{start:180+he/2,end:180+he/2+L},showOnlyPositive:!1,showOnlyNegative:!1}}if(e===0)return{positiveArc:{start:0,end:0},negativeArc:{start:0,end:360},showOnlyPositive:!1,showOnlyNegative:!0};if(t===0)return{positiveArc:{start:0,end:360},negativeArc:{start:0,end:0},showOnlyPositive:!0,showOnlyNegative:!1};let O=e/I,R=O*y,T=(1-O)*y;return e>0&&R<wt&&(R=wt,T=y-wt),t>0&&T<wt&&(T=wt,R=y-wt),{positiveArc:{start:he/2,end:he/2+R},negativeArc:{start:he/2+R+he,end:he/2+R+he+T},showOnlyPositive:!1,showOnlyNegative:!1}},[e,t]),p=r/2,f=3,g=(r-f)/2,b=g-f/2,w=r*.28,P=Pr(()=>{switch(l){case"positive":return o;case"negative":return n;default:return a}},[l,o,n,a]),k=Pr(()=>{switch(l){case"positive":return Me.positiveIcon;case"negative":return Me.negativeIcon;default:return Me.neutralIcon}},[l]),x=Me.positive,S=Me.negative;return Ea("div",{className:i("relative shrink-0",d),style:{width:r,height:r},children:[Ea("svg",{width:r,height:r,viewBox:`0 0 ${r} ${r}`,children:[s&&Ne("circle",{cx:p,cy:p,r:(b+w)/2,fill:"none",stroke:Me.positive,strokeWidth:b-w,opacity:.1}),u&&Ne("circle",{cx:p,cy:p,r:(b+w)/2,fill:"none",stroke:Me.negative,strokeWidth:b-w,opacity:.1}),e>0&&!s&&Ne("path",{d:Ma(p,p,b,w,m.start,m.end),fill:Me.positive,opacity:.1}),t>0&&!u&&Ne("path",{d:Ma(p,p,b,w,c.start,c.end),fill:Me.negative,opacity:.1}),s&&Ne("circle",{cx:p,cy:p,r:g,fill:"none",stroke:x,strokeWidth:f}),u&&Ne("circle",{cx:p,cy:p,r:g,fill:"none",stroke:S,strokeWidth:f}),!s&&!u&&Ne("path",{d:La(p,p,g,m.start,m.end),stroke:x,strokeWidth:f,fill:"none",strokeLinecap:"round"}),!s&&!u&&Ne("path",{d:La(p,p,g,c.start,c.end),stroke:S,strokeWidth:f,fill:"none",strokeLinecap:"round"})]}),P&&Ne("div",{className:"absolute inset-0 flex items-center justify-center",style:{color:k},children:Ne(P,{className:"size-3.5"})})]})}import{cva as js}from"class-variance-authority";import*as Sr from"react";import{jsx as bo}from"react/jsx-runtime";var Ys=js("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"}}),Zs=Sr.forwardRef(({className:e,variant:t,...r},o)=>bo("div",{ref:o,role:"alert",className:i(Ys({variant:t}),e),...r}));Zs.displayName="Alert";var qs=Sr.forwardRef(({className:e,...t},r)=>bo("h5",{ref:r,className:i("text-md mb-2 font-medium leading-none tracking-tight",e),...t}));qs.displayName="AlertTitle";var Xs=Sr.forwardRef(({className:e,...t},r)=>bo("div",{ref:r,className:i("text-sm [&_p]:leading-relaxed",e),...t}));Xs.displayName="AlertDescription";import{sha256 as Js}from"js-sha256";import{useState as Qs}from"react";import{jsx as ho}from"react/jsx-runtime";function el(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/${Js(e.email)}?d=${t}`:t}function Uv({user:e={},className:t}){if(!e)return ho("div",{className:i("h-10 w-10 animate-pulse rounded-full border border-neutral-300 bg-neutral-100",t)});let[r,o]=Qs(el(e));return ho("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 Gv({id:e,className:t}){return ho("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 tl}from"class-variance-authority";import{jsx as ol}from"react/jsx-runtime";var rl=tl("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 Ia({className:e,variant:t,...r}){return ol("span",{className:i(rl({variant:t}),e),...r})}import{cva as Gl}from"class-variance-authority";import{forwardRef as Kl}from"react";import*as ke from"@radix-ui/react-tooltip";import{HelpCircle as _l}from"lucide-react";import $l from"next/link";import{useEffect as Bl,useRef as Wl,useState as wo}from"react";import Ul from"react-markdown";import{useCallback as il,useEffect as sl,useState as ll}from"react";import{useEffect as nl,useState as al}from"react";function Tr(e){let[t,r]=al(),o=([n])=>{r(n)};return nl(()=>{let n=e==null?void 0:e.current;if(!n)return;let a=new ResizeObserver(o);return a.observe(n),()=>a.disconnect()},[e]),t}function Fe(e,{direction:t="vertical"}={}){let[r,o]=ll(1),n=il(()=>{if(!e.current)return;let d=t==="vertical"?e.current.scrollTop:e.current.scrollLeft,l=t==="vertical"?e.current.scrollHeight:e.current.scrollWidth,m=t==="vertical"?e.current.clientHeight:e.current.clientWidth;o(l===m?1:Math.min(d/(l-m),1))},[t]),a=Tr(e);return sl(n,[a]),{scrollProgress:r,updateScrollProgress:n}}import{EditorContent as Fl}from"@tiptap/react";import xl from"@tiptap/extension-file-handler";import yl from"@tiptap/extension-image";import wl from"@tiptap/extension-link";import Nl from"@tiptap/extension-mention";import{Placeholder as kl}from"@tiptap/extensions";import{Markdown as Cl}from"@tiptap/markdown";import{useEditor as Pl}from"@tiptap/react";import Sl from"@tiptap/starter-kit";import{createContext as Tl,forwardRef as Rl,useContext as Ll,useImperativeHandle as Ml,useMemo as El,useState as Il}from"react";import{computePosition as cl,flip as dl,shift as ul}from"@floating-ui/dom";import{posToDOMRect as ml,ReactRenderer as pl}from"@tiptap/react";import{forwardRef as fl,useEffect as gl,useImperativeHandle as bl,useState as hl}from"react";import{jsx as vo}from"react/jsx-runtime";var Da=(e,t)=>{cl({getBoundingClientRect:()=>ml(e.view,e.state.selection.from,e.state.selection.to)},t,{placement:"bottom-start",strategy:"absolute",middleware:[ul(),dl()]}).then(({x:o,y:n,strategy:a})=>{t.style.width="max-content",t.style.position=a,t.style.left=`${o}px`,t.style.top=`${n}px`})},Oa=e=>({items:({query:t})=>e.filter(r=>r.toLowerCase().startsWith(t.toLowerCase())).slice(0,5),render:()=>{let t;return{onStart:r=>{t=new pl(vl,{props:r,editor:r.editor}),r.clientRect&&(t.element.style.position="absolute",document.body.appendChild(t.element),Da(r.editor,t.element))},onUpdate(r){t.updateProps(r),r.clientRect&&Da(r.editor,t.element)},onKeyDown(r){var o;return r.event.key==="Escape"?(t.destroy(),!0):(o=t.ref)==null?void 0:o.onKeyDown(r)},onExit(){t.element.remove(),t.destroy()}}}}),Aa=i("flex cursor-pointer select-none items-center gap-2 whitespace-nowrap rounded-md px-2 py-1 font-mono text-sm text-neutral-950","data-[selected=true]:bg-neutral-100"),vl=fl(({items:e,command:t},r)=>{let[o,n]=hl(0),a=()=>{n((o+e.length-1)%e.length)},d=()=>{n((o+1)%e.length)},l=()=>{t({id:e[o]})};return gl(()=>n(0),[e]),bl(r,()=>({onKeyDown:({event:m})=>m.key==="ArrowUp"?(a(),!0):m.key==="ArrowDown"?(d(),!0):m.key==="Enter"?(l(),!0):!1})),vo("div",{className:"border-border-subtle flex flex-col rounded-lg border bg-white p-1 shadow-sm",children:e.length?e.map((m,c)=>vo("button",{type:"button",onClick:()=>t({id:m}),"data-selected":o===c,onPointerEnter:()=>n(c),className:Aa,children:m},c)):vo("div",{className:i(Aa,"text-content-subtle font-sans"),children:"No results"})})});import{jsx as Al}from"react/jsx-runtime";var xo={default:"prose-p:my-2 prose-ul:my-2 prose-ol:my-2",condensed:"prose-p:my-0 prose-ul:my-2 prose-ol:my-2",relaxed:""},Dl=["images","variables","links","headings","bold","italic","strike"],Va=Tl(null),N1=Rl(({children:e,features:t=Dl,markdown:r=!1,style:o="default",placeholder:n="Start typing...",uploadImage:a,editable:d,autoFocus:l,variables:m,initialValue:c,onChange:s,editorProps:u,editorClassName:p},f)=>{let[g,b]=Il(!1),w=El(()=>a?async(k,x,S)=>{b(!0);let I=await(a==null?void 0:a(k));if(!I){b(!1);return}x.chain().insertContentAt(S,{type:"image",attrs:{src:I}}).focus().run(),b(!1)}:null,[a]),P=Pl({editable:d??!0,autofocus:l?"end":!1,extensions:[...r?[Cl]:[],Sl.configure({heading:t.includes("headings")?{levels:[1,2]}:!1,bold:t.includes("bold")?void 0:!1,italic:t.includes("italic")?void 0:!1,strike:t.includes("strike")?void 0:!1,link:!1}),...t.includes("links")?[wl.extend({inclusive:!1})]:[],kl.configure({placeholder:n,emptyEditorClass:"before:content-[attr(data-placeholder)] before:float-left before:text-content-muted before:h-0 before:pointer-events-none"}),...t.includes("images")&&w?[yl.configure({inline:!1,HTMLAttributes:{class:"rounded-lg max-w-full h-auto"}}),xl.configure({allowedMimeTypes:["image/png","image/jpeg","image/gif","image/webp"],onDrop:(k,x,S)=>{x.forEach(I=>w(I,k,S))},onPaste:(k,x,S)=>{if(S)return!1;x.forEach(I=>w(I,k,k.state.selection.anchor))}})]:[],...t.includes("variables")&&m?[Nl.extend({renderHTML({node:k}){return["span",{class:"px-1 py-0.5 bg-blue-100 text-blue-700 rounded font-semibold","data-type":"mention","data-id":k.attrs.id},`{{${k.attrs.id}}}`]},renderText({node:k}){return`{{${k.attrs.id}}}`}}).configure({suggestion:Oa(m)})]:[]],editorProps:{attributes:{...u==null?void 0:u.attributes,class:i("max-w-none focus:outline-none","prose prose-sm prose-neutral",xo[o],"[&_.ProseMirror-selectednode]:outline [&_.ProseMirror-selectednode]:outline-2 [&_.ProseMirror-selectednode]:outline-blue-500 [&_.ProseMirror-selectednode]:outline-offset-2",p)},...u},content:c,contentType:r?"markdown":void 0,onUpdate:({editor:k})=>s==null?void 0:s(k),immediatelyRender:!1});return Ml(f,()=>({setContent:k=>{P==null||P.commands.setContent(k)}})),Al(Va.Provider,{value:{features:t,markdown:r,editable:d,variables:m,editor:P,isUploading:g,handleImageUpload:w},children:e})});function Ft(){let e=Ll(Va);if(!e)throw new Error("useRichTextContext must be used within a RichTextProvider");return e}import{useEditorState as Fa}from"@tiptap/react";import{forwardRef as Ol,useRef as Vl}from"react";import{Fragment as za,jsx as le,jsxs as Rr}from"react/jsx-runtime";function E1({toolsStart:e,toolsEnd:t,className:r}){let{editor:o,features:n,handleImageUpload:a,isUploading:d}=Ft(),l=Fa({editor:o,selector:({editor:c})=>({isBold:Boolean(c==null?void 0:c.isActive("bold")),isItalic:Boolean(c==null?void 0:c.isActive("italic")),isStrike:Boolean(c==null?void 0:c.isActive("strike")),isHeading1:Boolean(c==null?void 0:c.isActive("heading",{level:1})),isHeading2:Boolean(c==null?void 0:c.isActive("heading",{level:2})),isSelection:(c==null?void 0:c.state.selection.from)!==(c==null?void 0:c.state.selection.to)})}),m=Vl(null);return Rr("div",{className:i("flex gap-1",d&&"pointer-events-none opacity-50",r),children:[e,(n==null?void 0:n.includes("bold"))&&le(He,{icon:ka,label:"Bold",isActive:l==null?void 0:l.isBold,onClick:()=>o==null?void 0:o.chain().focus().toggleBold().run()}),(n==null?void 0:n.includes("italic"))&&le(He,{icon:Ca,label:"Italic",isActive:l==null?void 0:l.isItalic,onClick:()=>o==null?void 0:o.chain().focus().toggleItalic().run()}),(n==null?void 0:n.includes("strike"))&&le(He,{icon:Pa,label:"Strikethrough",isActive:l==null?void 0:l.isStrike,onClick:()=>o==null?void 0:o.chain().focus().toggleStrike().run()}),(n==null?void 0:n.includes("headings"))&&Rr(za,{children:[le(He,{icon:pa,label:"Heading 1",isActive:l==null?void 0:l.isHeading1,onClick:()=>o==null?void 0:o.chain().focus().toggleHeading({level:1}).run()}),le(He,{icon:fa,label:"Heading 2",isActive:l==null?void 0:l.isHeading2,onClick:()=>o==null?void 0:o.chain().focus().toggleHeading({level:2}).run()})]}),(n==null?void 0:n.includes("links"))&&le(zl,{}),(n==null?void 0:n.includes("variables"))&&le(He,{icon:Gn,label:"Variable",isActive:!1,onClick:()=>{var c,s;if((s=(c=o==null?void 0:o.state.selection.$from.nodeBefore)==null?void 0:c.text)!=null&&s.endsWith("@")){o==null||o.commands.focus();return}o==null||o.chain().focus().insertContent("@").run()}}),(n==null?void 0:n.includes("images"))&&a&&o&&Rr(za,{children:[le("input",{ref:m,type:"file",className:"hidden",onChange:c=>{var u;let s=(u=c.target.files)==null?void 0:u[0];!s||(a(s,o,o.state.selection.anchor),c.target.value="")}}),le(He,{icon:ba,label:"Image",isActive:!1,onClick:()=>{var c;return(c=m.current)==null?void 0:c.click()}})]}),t]})}function zl(){let{editor:e}=Ft(),t=Fa({editor:e,selector:({editor:r})=>({isSelection:(r==null?void 0:r.state.selection.from)!==(r==null?void 0:r.state.selection.to)})});return le(He,{icon:ga,label:"Link",onClick:()=>{if(!e)return;let r=e.getAttributes("link").href,o=window.prompt("Link URL",r);if(!(o!=null&&o.trim())){e.chain().focus().extendMarkRange("link").unsetLink().run();return}e.chain().focus().extendMarkRange("link").setLink({href:o}).run()},disabled:!(t!=null&&t.isSelection)})}var He=Ol(({icon:e,label:t,isActive:r,onClick:o,disabled:n},a)=>Rr("button",{ref:a,type:"button",onClick:o,disabled:n,className:i("flex size-8 items-center justify-center rounded-md transition-colors duration-150 disabled:opacity-50",r?"bg-neutral-200":"hover:bg-neutral-50 active:bg-neutral-100"),title:t,children:[le(e,{className:"size-4 shrink-0 text-neutral-700"}),t&&le("span",{className:"sr-only",children:t})]}));import{jsx as yo,jsxs as Hl}from"react/jsx-runtime";function F1({className:e,...t}){let{editor:r,isUploading:o}=Ft();return Hl("div",{className:i("relative",o&&"pointer-events-none opacity-50",e),children:[yo(Fl,{editor:r,...t}),o&&yo("div",{className:"absolute inset-0 flex items-center justify-center",children:yo(be,{className:"size-4"})})]})}import{jsx as G,jsxs as No}from"react/jsx-runtime";function Q1({children:e}){return G(ke.Provider,{delayDuration:150,children:e})}var Ha=({className:e,children:t})=>G(Ul,{className:i("prose prose-sm prose-neutral max-w-xs text-pretty px-4 py-2 text-center leading-snug transition-all","prose-a:cursor-alias prose-a:underline prose-a:decoration-dotted prose-a:underline-offset-2","prose-code:inline-block prose-code:leading-none",xo.condensed,e),components:{a:({node:r,...o})=>G("a",{...o,target:"_blank",rel:"noopener noreferrer",onClick:n=>n.stopPropagation()}),code:({node:r,...o})=>G("code",{...o,className:"rounded-md bg-neutral-100 px-1 py-0.5"})},children:t});function q({children:e,content:t,contentClassName:r,disabled:o,side:n="top",disableHoverableContent:a,delayDuration:d=0,...l}){let[m,c]=wo(!1);return No(ke.Root,{open:o?!1:m,onOpenChange:c,delayDuration:d,disableHoverableContent:a,children:[G(ke.Trigger,{asChild:!0,onClick:()=>{c(!0)},onBlur:()=>{c(!1)},children:e}),G(ke.Portal,{children:G(ke.Content,{sideOffset:8,side:n,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,...l,children:typeof t=="string"?G(Ha,{className:r,children:t}):typeof t=="function"?t({setOpen:c}):t})})]})}function ex({title:e,cta:t,href:r,target:o,onClick:n}){return No("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[G(Ha,{className:"p-0",children:e}),t&&(r?G($l,{href:r,...o?{target:o}:{},className:i(ce({variant:"primary"}),"flex h-8 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:t}):n?G(te,{onClick:n,text:t,variant:"primary",className:"h-8"}):null)]})}function tx(e){return G(q,{...e,children:G(_l,{className:"h-4 w-4 text-neutral-500"})})}function rx({children:e,content:t,...r}){return G(q,{content:t,...r,children:G("div",{className:"flex cursor-pointer items-center",children:G(Ia,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:e})})})}function ox({children:e,tooltipProps:t,...r}){return G(q,{...t,children:G("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 kt({children:e,tooltipProps:t}){return t?G(q,{...t,children:G("div",{children:e})}):e}function nx({children:e,maxHeight:t="240px",className:r}){let o=Wl(null),{scrollProgress:n,updateScrollProgress:a}=Fe(o,{direction:"vertical"}),[d,l]=wo(!1),[m,c]=wo(!1);return Bl(()=>{let s=o.current;if(!s)return;let{scrollHeight:u,clientHeight:p}=s,f=u>p;l(f&&n>0),c(f&&n<1)},[n]),No("div",{className:"relative",children:[d&&G("div",{className:"pointer-events-none absolute left-0 right-0 top-0 z-10 h-6 rounded-t-xl bg-gradient-to-b from-white to-transparent"}),G("div",{ref:o,onScroll:a,className:i("flex flex-col gap-2 overflow-y-auto px-3 py-2",r),style:{maxHeight:t},children:e}),m&&G("div",{className:"pointer-events-none absolute bottom-0 left-0 right-0 z-10 h-6 rounded-b-xl bg-gradient-to-t from-white to-transparent"})]})}import{jsx as Ct,jsxs as _a}from"react/jsx-runtime";var ce=Gl("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-neutral-900/5",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=Kl(({text:e,variant:t="primary",className:r,textWrapperClassName:o,shortcutClassName:n,loading:a,icon:d,shortcut:l,disabledTooltip:m,right:c,...s},u)=>m?Ct(q,{content:m,children:_a("div",{className:i("flex h-10 w-full cursor-not-allowed items-center justify-center gap-x-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm text-neutral-400 transition-all focus:outline-none",{"border-transparent bg-transparent":t==null?void 0:t.endsWith("outline")},r),children:[d,e&&Ct("div",{className:i("min-w-0 truncate",l&&"flex-1 text-left",o),children:e}),l&&Ct("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")},n),children:l})]})}):_a("button",{ref:u,type:s.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",s.disabled||a?"cursor-not-allowed border-neutral-200 bg-neutral-100 text-neutral-400 outline-none":ce({variant:t}),r),disabled:s.disabled||a,...s,children:[a?Ct(be,{}):d||null,e&&Ct("div",{className:i("min-w-0 truncate",l&&"flex-1 text-left",o),children:e}),l&&Ct("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-400 text-white":t==="danger","bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":t==="danger-outline"},n),children:l}),c]}));te.displayName="Button";import{cva as jl}from"class-variance-authority";import{createContext as Yl}from"react";import{jsx as $a}from"react/jsx-runtime";var Zl=jl("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"}}}),Ht=Yl({variant:"loose",loading:!1});function Ba({variant:e="loose",loading:t=!1,className:r,children:o}){return $a("ul",{className:i(Zl({variant:e,loading:t}),r),"data-variant":e,children:$a(Ht.Provider,{value:{variant:e,loading:t},children:o})})}import{cva as ql}from"class-variance-authority";import{createContext as Xl,useContext as Jl,useEffect as Ql,useRef as ec,useState as tc}from"react";import{jsx as Wa,jsxs as nc}from"react/jsx-runtime";var rc=ql("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"}}}),oc="w-full py-2.5 px-4",ko=Xl({hovered:!1});function Ua({outerClassName:e,innerClassName:t,children:r,onClick:o,onAuxClick:n,hoverStateEnabled:a=!0,banner:d}){let{variant:l}=Jl(Ht),m=ec(null),[c,s]=tc(!1);Ql(()=>{if(!c||!m.current)return;let p=setInterval(()=>{var f;((f=m.current)==null?void 0:f.matches(":hover"))===!1&&s(!1)},1e3);return()=>clearInterval(p)},[c]);let u=p=>!(document.getElementById("modal-backdrop")||we(p));return nc("li",{ref:m,className:i(rc({variant:l}),e),onPointerEnter:()=>s(!0),onPointerLeave:()=>s(!1),"data-hover-state-enabled":a,children:[d,Wa("div",{className:i(oc,t),onClick:o?p=>{u(p)&&o(p)}:void 0,onAuxClick:n?p=>{u(p)&&n(p)}:void 0,children:Wa(ko.Provider,{value:{hovered:c},children:r})})]})}var Rx=Object.assign(Ba,{Card:Object.assign(Ua,{Context:ko}),Context:Ht});import{motion as Uc}from"motion/react";import{forwardRef as Gc,useRef as Kc}from"react";var Ex=(e,t)=>e?{onClick:r=>{we(r)||(r.metaKey||r.ctrlKey?window.open(e,"_blank"):t.push(e))},onAuxClick:r=>{we(r)||window.open(e,"_blank")},role:"link",tabIndex:0,onKeyDown:r=>r.target===r.currentTarget&&r.key==="Enter"&&t.push(e)}:{};import{useEffect as ac,useState as ic}from"react";function Ga(e){if(typeof window>"u")return null;let t=window.localStorage.getItem(e);return t?JSON.parse(t):null}function Co(e,t){let[r,o]=ic(Ga(e)??t);return ac(()=>{let a=Ga(e);a&&o(a)},[e]),[r,a=>{o(a),window.localStorage.setItem(e,JSON.stringify(a))}]}function sc(e){return e&&typeof e=="object"&&Array.isArray(e.all)&&Array.isArray(e.defaultVisible)}function Vx(e,t){if(!sc(t)){let o=t,n=m=>{let c=o[m];return Object.fromEntries(c.all.map(s=>[s,c.defaultVisible.includes(s)]))},a=Object.fromEntries(Object.keys(o).map(m=>[m,n(m)])),[d,l]=Co(e,a);return{columnVisibility:d,setColumnVisibility:(m,c)=>{let s=o[m].all,u=d[m]||{},p=Object.fromEntries(s.map(f=>[f,f in c?c[f]:u[f]??!1]));l({...d,[m]:p})}}}else{let o=t,n=Object.fromEntries(o.all.map(l=>[l,o.defaultVisible.includes(l)])),[a,d]=Co(e,n);return{columnVisibility:a,setColumnVisibility:l=>{let m=o.all,c=a||{},s=Object.fromEntries(m.map(u=>[u,u in l?l[u]:c[u]??!1]));d(s)}}}}import Po from"js-cookie";import{useEffect as lc,useState as cc}from"react";function _x(e,t,r){let[o,n]=cc(()=>{let d=Po.get(e);return d?JSON.parse(d):t});return lc(()=>{let d=()=>{let l=Po.get(e);l&&n(JSON.parse(l))};return window.addEventListener("storage",d),()=>{window.removeEventListener("storage",d)}},[e]),[o,d=>{n(d),Po.set(e,JSON.stringify(d),r)}]}import{useCallback as dc,useEffect as uc,useRef as mc,useState as pc}from"react";var Pt=(e=3e3)=>{let t=mc(null),[r,o]=pc(!1),n=()=>{t.current&&(clearTimeout(t.current),t.current=null)},a=dc(async(d,{onSuccess:l,throwOnError:m}={})=>{n();try{typeof d=="string"?await navigator.clipboard.writeText(d):d instanceof ClipboardItem&&await navigator.clipboard.write([d]),o(!0),l==null||l(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>o(!1),e))}catch(c){if(console.error("Failed to copy: ",c),m)throw c}},[e]);return uc(()=>()=>n(),[]),[r,a]};import{useEffect as fc,useState as gc}from"react";function Gx(){let[e,t]=gc(null);return fc(()=>{let r=document.querySelector("[data-mdx-container]");if(!r)return;let o=r.offsetTop-1,n=new IntersectionObserver(l=>{var u,p,f;let m=l[0];if(!m)return;let c=(((u=m.rootBounds)==null?void 0:u.height)||0)*.3+o;for(let g=1;g<l.length;g++){let b=l[g];if(!b)break;(b.boundingClientRect.top<m.boundingClientRect.top||m.boundingClientRect.bottom<o)&&(m=b)}let s=m.target;for(;s&&s.getBoundingClientRect().bottom<o;)s=(p=a.get(s))==null?void 0:p.next;for(;s&&s.getBoundingClientRect().top>c;)s=(f=a.get(s))==null?void 0:f.prev;s&&t(s.getAttribute("href"))},{threshold:1,rootMargin:`-${o}px 0px 0px 0px`}),a=new Map;return(r==null?void 0:r.querySelectorAll("[data-mdx-heading]")).forEach(l=>n.observe(l)),()=>{n.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useEffect as bc,useState as hc}from"react";function Zx(){let[e,t]=hc(null);return bc(()=>{let r=window.location.hostname;Nn.has(r)?t("app"):Cn.has(r)?t("partners"):kn.has(r)&&t("admin")},[]),{subdomain:e}}import{useCallback as vc}from"react";function Qx(e){return{handleKeyDown:vc(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 xc,useState as yc}from"react";function o2(e,t={}){let{root:r,defaultValue:o}=t,[n,a]=yc(o??!1);return xc(()=>{let d=()=>{let m=e.current;if(!m)return;let c=r==null?void 0:r.current,s=m.getBoundingClientRect(),u=c?c.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};a(s.top<u.bottom&&s.bottom>u.top&&s.left<u.right&&s.right>u.left)};((r==null?void 0:r.current)||window).addEventListener("scroll",d),window.addEventListener("resize",d);let l=null;return e.current&&(l=new IntersectionObserver(d),l.observe(e.current)),d(),()=>{((r==null?void 0:r.current)||window).removeEventListener("scroll",d),window.removeEventListener("resize",d),l==null||l.disconnect()}},[e,r]),n}import{useEffect as wc,useState as Nc}from"react";function i2(){let[e,t]=Nc(!1);return wc(()=>{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 kc,useState as Cc}from"react";function d2(e,{threshold:t=0,root:r=null,rootMargin:o="0%",freezeOnceVisible:n=!1}={}){let[a,d]=Cc(),l=(a==null?void 0:a.isIntersecting)&&n,m=([c])=>{d(c)};return kc(()=>{let c=e==null?void 0:e.current;if(!!!window.IntersectionObserver||l||!c)return;let u={threshold:t,root:r,rootMargin:o},p=new IntersectionObserver(m,u);return p.observe(c),()=>p.disconnect()},[e,JSON.stringify(t),r,o,l]),a}import{createContext as Pc,useCallback as Sc,useContext as Tc,useEffect as Ka,useId as Rc,useState as Lc}from"react";import{jsx as Mc}from"react/jsx-runtime";var ja=Pc({listeners:[],setListeners:()=>{}});function b2({children:e}){let[t,r]=Lc([]);return Mc(ja.Provider,{value:{listeners:t,setListeners:r},children:e})}function _e(e,t,r={}){let o=Rc(),{listeners:n,setListeners:a}=Tc(ja),d=Sc(l=>{if(r.enabled===!1)return;let m=l.target,c=document.getElementById("modal-backdrop"),s=document.querySelector("[data-sheet-overlay]");if(m.tagName==="INPUT"||m.tagName==="TEXTAREA"||m.isContentEditable||!!c!=!!r.modal||!!s!=!!r.sheet)return;let u=[...l.metaKey?["meta"]:[],...l.ctrlKey?["ctrl"]:[],...l.altKey?["alt"]:[],l.key].join("+");if(Array.isArray(e)?!e.includes(u):u!==e)return;let p=n.filter(g=>g.enabled!==!1&&!!c==!!g.modal&&!!s==!!g.sheet&&(Array.isArray(g.key)?g.key.includes(u):g.key===u));!p.length||Ln(p,(g,b)=>(b.priority??0)-(g.priority??0))[0].id!==o||(l.preventDefault(),t(l))},[e,n,o,t,r.enabled,r.modal,r.sheet]);Ka(()=>(document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)),[d]),Ka(()=>(a(l=>[...l.filter(m=>m.id!==o),{id:o,key:e,...r}]),()=>a(l=>l.filter(m=>m.id!==o))),[JSON.stringify(e),r.enabled,r.priority])}import{toast as Ec}from"sonner";import Ic from"swr";function w2(e,t){let{data:r,isLoading:o,mutate:n}=Ic(e,ye);return{data:r,isLoading:o,update:async(a,d)=>Ec.promise(n(a(r),{optimisticData:d,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(t==null?void 0:t.loading)||"Updating...",success:(t==null?void 0:t.success)||"Successfully updated",error:(t==null?void 0:t.error)||"Failed to update"})}}import{useEffect as Xa,useMemo as Fc}from"react";import{useEffect as Ya,useState as Dc}from"react";function Za({pageSize:e,page:t,onPageChange:r}){let[o,n]=Dc({pageIndex:t,pageSize:e});return Ya(()=>{n(a=>({...a,pageIndex:t}))},[t]),Ya(()=>{r==null||r(o.pageIndex)},[o]),{pagination:o,setPagination:n}}import{usePathname as Ac,useRouter as Oc,useSearchParams as Vc}from"next/navigation";import{useCallback as zc}from"react";function qa(){let e=Ac(),t=Oc(),r=Vc(),o=Object.fromEntries(r),n=(d,l)=>{let m=new URLSearchParams(r);if((l==null?void 0:l.include)&&Array.isArray(l.include)){let s=new URLSearchParams;r.forEach((u,p)=>{var f;(f=l.include)!=null&&f.includes(p)&&s.set(p,u)}),m=s}(l==null?void 0:l.exclude)&&Array.isArray(l.exclude)&&l.exclude.forEach(s=>m.delete(s)),d&&Object.entries(d).forEach(([s,u])=>m.set(s,u));let c=m.toString();return c.length>0?`?${c}`:""},a=zc(({set:d,del:l,replace:m,scroll:c=!0,getNewPath:s,arrayDelimiter:u=","})=>{let p=new URLSearchParams(r);d&&Object.entries(d).forEach(([b,w])=>p.set(b,Array.isArray(w)?w.join(u):w)),l&&(Array.isArray(l)?l.forEach(b=>p.delete(b)):p.delete(l));let f=p.toString(),g=`${e}${f.length>0?`?${f}`:""}`;if(s)return g;m?t.replace(g,{scroll:!1}):t.push(g,{scroll:c})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:o,queryParams:a,getQueryString:n}}function D2(e=Sn){let{searchParams:t,queryParams:r}=qa(),o=Fc(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),{pagination:n,setPagination:a}=Za({pageSize:e,page:o,onPageChange:d=>{r(d===1?{del:"page",scroll:!1}:{set:{page:d.toString()},scroll:!1})}});return Xa(()=>{let d=parseInt(t.get("page")||"1")||1;a(l=>({...l,pageIndex:d}))},[t.get("page")]),Xa(()=>{r(n.pageIndex===1?{del:"page",scroll:!1}:{set:{page:n.pageIndex.toString()},scroll:!1})},[n]),{pagination:n,setPagination:a}}import{useEffect as Hc}from"react";function V2(){Hc(()=>{let e=new URL(window.location.href);e.searchParams.has("_gl")&&setTimeout(()=>{e.searchParams.delete("_gl"),window.history.replaceState({},"",e.toString())},2e3)},[])}import{useCallback as _c,useEffect as Ja,useState as $c}from"react";function Qa(e,{container:t}={}){let[r,o]=$c(!1),n=_c(()=>{o((t!=null&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return Ja(()=>{let a=(t==null?void 0:t.current)??window;return a.addEventListener("scroll",n),()=>a.removeEventListener("scroll",n)},[n]),Ja(()=>{n()},[n]),r}import{useEffect as Bc}from"react";import{toast as ti}from"sonner";import{jsx as Lr,jsxs as ei}from"react/jsx-runtime";function Wc({id:e,message:t,undo:r}){let o=()=>{r(),ti.dismiss(e)},n=a=>{a.key==="z"&&(a.ctrlKey||a.metaKey)&&o()};return Bc(()=>(document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)),[]),ei("div",{className:"flex w-full items-center justify-between space-x-2",children:[ei("div",{className:"flex items-center space-x-2",children:[Lr(zn,{}),Lr("p",{className:"font-medium",children:t})]}),Lr("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 U2(){return({id:t,message:r,undo:o,duration:n})=>ti(Lr(Wc,{id:t,message:r,undo:o}),{id:t,...n&&{duration:n}})}import{jsx as ri}from"react/jsx-runtime";var de=Gc(({width:e=!1,height:t=!1,className:r,transition:o,children:n,...a},d)=>{var c,s;let l=Kc(null),m=Tr(l);return ri(Uc.div,{ref:d,className:i("overflow-hidden",r),animate:{width:e?((c=m==null?void 0:m.contentRect)==null?void 0:c.width)??"auto":"auto",height:t?((s=m==null?void 0:m.contentRect)==null?void 0:s.height)??"auto":"auto"},transition:o??{type:"spring",duration:.3},...a,children:ri("div",{ref:l,className:i(t&&"h-max",e&&"w-max"),children:n})})});de.displayName="AnimatedSizeContainer";import{jsx as Ee,jsxs as oi}from"react/jsx-runtime";function ny({options:e,value:t,onChange:r,className:o,gridCols:n="2",name:a,disabled:d=!1,animated:l=!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"}[n],c=Ee("div",{className:i("grid gap-3",m),children:e.map(({key:s,label:u,description:p,icon:f})=>{let g=t===s;return oi("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",d&&"cursor-not-allowed opacity-50",o),children:[Ee("input",{type:"radio",name:a,value:s,className:"hidden",checked:g,disabled:d,onChange:b=>{b.target.checked&&r&&r(s)}}),f&&Ee("div",{className:"flex-shrink-0 pt-0.5",children:f}),oi("div",{className:"flex grow flex-col p-3 pr-0",children:[Ee("span",{className:"pr-1 text-sm font-semibold text-neutral-900",children:u}),Ee("span",{className:"text-xs text-neutral-600",children:p})]}),Ee(Xn,{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")})]},s)})});return l?Ee("div",{className:"-m-1",children:Ee(de,{height:!0,transition:{ease:"easeInOut",duration:.2},children:Ee("div",{className:"p-1",children:c})})}):c}import jc from"embla-carousel-autoplay";import Yc from"embla-carousel-react";import{ArrowLeft as Zc,ArrowRight as qc}from"lucide-react";import{createContext as Xc,forwardRef as $t,useCallback as _t,useContext as Jc,useEffect as So,useState as To}from"react";import{jsx as Ie,jsxs as ii}from"react/jsx-runtime";var Ro=2e3,ni=Xc(null);function Ce(){let e=Jc(ni);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function ai(){let{api:e}=Ce(),[t,r]=To(0),o=_t(n=>r((n==null?void 0:n.selectedScrollSnap())??0),[]);return So(()=>{!e||(o(e),e.on("reInit",o),e.on("select",o))},[e,o]),t}var Qc=$t(({orientation:e="horizontal",opts:t,setApi:r,autoplay:o,plugins:n,className:a,children:d,...l},m)=>{let[c,s]=Yc({...t,axis:e==="horizontal"?"x":"y"},[...o?[jc(typeof o=="object"?o:{delay:Ro})]:[],...n||[]]),[u,p]=To(!1),[f,g]=To(!1),b=_t(x=>{!x||(p(x.canScrollPrev()),g(x.canScrollNext()))},[]),w=_t(()=>{s==null||s.scrollPrev()},[s]),P=_t(()=>{s==null||s.scrollNext()},[s]),k=_t(x=>{x.key==="ArrowLeft"?(x.preventDefault(),w()):x.key==="ArrowRight"&&(x.preventDefault(),P())},[w,P]);return So(()=>{!s||!r||r(s)},[s,r]),So(()=>{if(!!s)return b(s),s.on("reInit",b),s.on("select",b),()=>{s==null||s.off("select",b)}},[s,b]),Ie(ni.Provider,{value:{carouselRef:c,api:s,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:w,scrollNext:P,canScrollPrev:u,canScrollNext:f},children:Ie("div",{ref:m,onKeyDownCapture:k,className:i("relative",a),role:"region","aria-roledescription":"carousel",...l,children:d})})});Qc.displayName="Carousel";var ed=$t(({className:e,...t},r)=>{let{carouselRef:o,orientation:n}=Ce();return Ie("div",{ref:o,className:"overflow-hidden",children:Ie("div",{ref:r,className:i("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});ed.displayName="CarouselContent";var td=$t(({className:e,...t},r)=>{let{orientation:o}=Ce();return Ie("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})});td.displayName="CarouselItem";var rd=$t(({className:e,...t},r)=>{let{orientation:o,scrollPrev:n,canScrollPrev:a}=Ce();return ii("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",ce({variant:"secondary",className:"p-2"}),e),disabled:!a,onClick:n,...t,children:[Ie(Zc,{className:"h-4 w-4"}),Ie("span",{className:"sr-only",children:"Previous slide"})]})});rd.displayName="CarouselPrevious";var od=$t(({className:e,...t},r)=>{let{orientation:o,scrollNext:n,canScrollNext:a}=Ce();return ii("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",ce({variant:"secondary",className:"p-2"}),e),disabled:!a,onClick:n,...t,children:[Ie(qc,{className:"h-4 w-4"}),Ie("span",{className:"sr-only",children:"Next slide"})]})});od.displayName="CarouselNext";import{cva as nd}from"class-variance-authority";import{ChevronLeft as ad,ChevronRight as id}from"lucide-react";import{motion as sd}from"motion/react";import*as $e from"react";import{jsx as Qe,jsxs as Bt}from"react/jsx-runtime";var ld=nd("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 "}}}),Ny=({variant:e="simple",className:t})=>{var g;let{scrollNext:r,scrollPrev:o,canScrollNext:n,canScrollPrev:a,api:d}=Ce(),l=(g=d==null?void 0:d.plugins())==null?void 0:g.autoplay,[m,c]=$e.useState(0),[s,u]=$e.useState(!1),p=$e.useCallback(b=>{c((b==null?void 0:b.selectedScrollSnap())??0)},[]),f=$e.useCallback(b=>()=>{l&&l.isPlaying()&&l.stop(),b()},[l]);return $e.useEffect(()=>{!d||(p(d),u((l==null?void 0:l.isPlaying())??!1),d.on("reInit",p),d.on("select",p),d.on("autoplay:play",()=>u(!0)),d.on("autoplay:stop",()=>u(!1)))},[d,l,p]),Bt("div",{className:i(ld({variant:e}),t),children:[e!=="simple"&&Bt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!a,onClick:f(o),children:[Qe(ad,{className:"h-4 w-4"}),Qe("span",{className:"sr-only",children:"Previous slide"})]}),d!=null&&Qe("div",{className:"flex items-center gap-1",children:d.slideNodes().map((b,w)=>Bt("button",{onClick:f(()=>d.scrollTo(w)),className:"rounded-full p-0.5 hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[Qe("div",{className:i("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full transition-all",w===m?"bg-black":"bg-black/20",s&&w===m&&"w-6 bg-black/20"),children:s&&w===m&&Qe(sd.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:((l==null?void 0:l.options.delay)??Ro)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),Bt("span",{className:"sr-only",children:["Slide ",w+1]})]},w))}),e!=="simple"&&Bt("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!n,onClick:f(r),children:[Qe(id,{className:"h-4 w-4"}),Qe("span",{className:"sr-only",children:"Next slide"})]})]})};import cd from"embla-carousel-react";import{forwardRef as dd,useCallback as ud,useEffect as md}from"react";import{jsx as Mr}from"react/jsx-runtime";var Ey=({className:e,...t})=>{let{api:r}=Ce(),[o,n]=cd({dragFree:!0}),a=ud(d=>{!d||!n||n==null||n.scrollTo(d.selectedScrollSnap())},[n]);return md(()=>{if(!(!r||!n))return a(r),r.on("reInit",a),r.on("select",a),()=>{r==null||r.off("reInit",a),r==null||r.off("select",a)}},[r,n,a]),Mr("div",{className:"overflow-hidden",ref:o,children:Mr("div",{className:i("mx-4 flex gap-4",e),...t})})},Iy=dd(({index:e,className:t,...r},o)=>{let{api:n}=Ce(),a=ai();return Mr("div",{ref:o,children:Mr("button",{type:"button",onClick:()=>{var l;if(!n)return;let d=(l=n.plugins())==null?void 0:l.autoplay;d&&d.isPlaying()&&d.stop(),n.scrollTo(e)},className:typeof t=="function"?t({active:e===a}):t,...r})})});import*as Wt from"@radix-ui/react-checkbox";import{forwardRef as pd}from"react";import{jsx as Lo,jsxs as fd}from"react/jsx-runtime";var St=pd(({className:e,...t},r)=>Lo(Wt.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:fd(Wt.Indicator,{className:"group/indicator flex items-center justify-center text-white",children:[Lo(vr,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),Lo(Nr,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})}));St.displayName=Wt.Root.displayName;import{Command as et,useCommandState as hd}from"cmdk";import{ChevronDown as vd}from"lucide-react";import{forwardRef as xd,isValidElement as yd,useCallback as wd,useEffect as Dr,useState as Ut}from"react";import*as Be from"@radix-ui/react-popover";import{Drawer as Tt}from"vaul";import{jsx as De,jsxs as Er}from"react/jsx-runtime";function oe({children:e,content:t,align:r="center",side:o="bottom",openPopover:n,setOpenPopover:a,mobileOnly:d,popoverContentClassName:l,onOpenAutoFocus:m,collisionBoundary:c,sticky:s,onEscapeKeyDown:u,onWheel:p,sideOffset:f=8}){let{isMobile:g}=ee();return d||g?Er(Tt.Root,{open:n,onOpenChange:a,children:[De(Tt.Trigger,{className:"sm:hidden",asChild:!0,children:e}),Er(Tt.Portal,{children:[De(Tt.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),Er(Tt.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:b=>{b.target instanceof Element&&b.target.closest("[data-sonner-toast]")&&b.preventDefault()},children:[De("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:De("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),De("div",{className:"bg-bg-default flex w-full items-center justify-center overflow-hidden pb-4 align-middle shadow-xl",children:t})]}),De(Tt.Overlay,{})]})]}):Er(Be.Root,{open:n,onOpenChange:a,children:[De(Be.Trigger,{className:"sm:inline-flex",asChild:!0,children:e}),De(Be.Portal,{children:De(Be.Content,{sideOffset:f,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",l),sticky:s,collisionBoundary:c,onOpenAutoFocus:m,onEscapeKeyDown:u,onWheel:p,children:t})})]})}import{useRef as gd}from"react";import{jsx as si,jsxs as bd}from"react/jsx-runtime";function Ir({children:e,className:t}){let r=gd(null),{scrollProgress:o,updateScrollProgress:n}=Fe(r);return bd("div",{className:"relative",children:[si("div",{className:i("scrollbar-hide h-full w-screen overflow-y-scroll [clip-path:inset(0)] sm:w-auto",t),ref:r,onScroll:n,children:e}),si("div",{className:"pointer-events-none absolute bottom-0 left-0 z-10 hidden h-16 w-full rounded-b-lg bg-gradient-to-t from-white to-transparent sm:block",style:{opacity:1-Math.pow(o,2)}})]})}import{Fragment as Mo,jsx as F,jsxs as We}from"react/jsx-runtime";function Nd(e,t){return e===!0}function d4({multiple:e,selected:t,setSelected:r,onSelect:o,maxSelected:n,options:a,trigger:d,icon:l,placeholder:m="Select...",searchPlaceholder:c="Search...",emptyState:s,createLabel:u,createIcon:p=yt,onCreate:f,buttonProps:g,labelProps:b,iconProps:w,popoverProps:P,shortcutHint:k,caret:x,side:S,open:I,onOpenChange:y,onSearchChange:O,shouldFilter:R=!0,inputRight:T,inputClassName:L,optionRight:h,optionClassName:v,matchTriggerWidth:C,hideSearch:M=!1,children:A}){let E=Nd(e,r),U=Array.isArray(t)?t:t?[t]:[],{isMobile:cr}=ee(),[zs,Fs]=Ut(!1),io=I??zs,dr=y??Fs,[ge,so]=Ut(""),[bn,lo]=Ut(!1),[co,Hs]=Ut(void 0),[_s,hn]=Ut(!1),$s=_=>{var xe,ft;let Je=E?U.some(({value:uo})=>uo===_.value):U.length&&((xe=U[0])==null?void 0:xe.value)===_.value;if(!(!Je&&n&&U.length>=n))if(o==null||o(_),E){if(!r)return;r(Je?U.filter(({value:uo})=>uo!==_.value):[...U,_])}else r==null||r(U.length&&((ft=U[0])==null?void 0:ft.value)===_.value?null:_),dr(!1)},vn=wd((_,Je)=>Je===""?[..._.filter(xe=>xe.first&&!U.some(ft=>ft.value===xe.value)),...U,..._.filter(xe=>!xe.first&&!U.some(ft=>ft.value===xe.value))]:_,[U]);Dr(()=>{bn&&(Hs(a&&vn(a,ge)),lo(!1))},[bn,a,vn,ge]),Dr(()=>{lo(!0)},[JSON.stringify(a==null?void 0:a.map(_=>_.value))]),Dr(()=>{io||(so(""),lo(!0))},[io]),Dr(()=>O==null?void 0:O(ge),[ge]);let xn=We(et.Item,{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",v),onSelect:async()=>{hn(!0),await(f==null?void 0:f(ge))&&(so(""),dr(!1)),hn(!1)},children:[_s?F(be,{className:"size-4 shrink-0"}):F(p,{className:"size-4 shrink-0"}),F("div",{className:"grow truncate",children:(u==null?void 0:u(ge))??`Create ${ge?`"${ge}"`:"new option..."}`})]});return F(oe,{openPopover:io,setOpenPopover:dr,align:"start",side:S,onWheel:_=>{_.stopPropagation()},popoverContentClassName:i(C&&"sm:w-[var(--radix-popover-trigger-width)]",P==null?void 0:P.contentClassName),content:F(de,{width:!cr&&!C,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:We(et,{loop:!0,shouldFilter:R,children:[!M&&We("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[F(et.Input,{placeholder:c,value:ge,onValueChange:so,className:i("grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",L),onKeyDown:_=>{(_.key==="Escape"||_.key==="Backspace"&&!ge)&&(_.preventDefault(),_.stopPropagation(),dr(!1))}}),T&&F("div",{className:"mr-2",children:T}),k&&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:k})]}),F(Ir,{className:i("max-h-[min(50vh,250px)]",f&&!e&&"max-h-[calc(min(50vh,250px)-3.5rem)]"),children:F(et.List,{className:i("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:co!==void 0?We(Mo,{children:[co.map(_=>{let Je=U.some(({value:xe})=>xe===_.value);return F(kd,{option:_,multiple:E,selected:Je,onSelect:()=>$s(_),disabled:Boolean(!Je&&n&&U.length>=n),right:h==null?void 0:h(_),className:v},`${_.label}, ${_.value}`)}),f&&e&&ge.length>0&&xn,R?F(Pd,{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):co.length===0?F("div",{className:"flex min-h-12 items-center justify-center text-sm text-neutral-500",children:s||"No matches"}):null]}):F(et.Loading,{children:F("div",{className:"flex h-12 items-center justify-center",children:F(be,{})})})})}),f&&!e&&F("div",{className:"rounded-b-lg border-t border-neutral-200 bg-white p-1",children:xn})]})}),children:d??F(te,{variant:"secondary",...g,className:i(g==null?void 0:g.className,"flex gap-2"),textWrapperClassName:i(g==null?void 0:g.textWrapperClassName,"w-full flex items-center justify-start"),text:We(Mo,{children:[F("div",{className:i("min-w-0 grow truncate text-left",b==null?void 0:b.className),children:A||U.map(_=>_.label).join(", ")||m}),x&&(x===!0?F(vd,{className:"ml-1 size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"}):x)]}),icon:l?li(l)?l:F(l,{className:i("size-4 shrink-0",w==null?void 0:w.className)}):void 0})})}function kd({option:e,onSelect:t,multiple:r,selected:o,disabled:n,right:a,className:d}){return We(Mo,{children:[F(Cd,{disabledTooltip:e.disabledTooltip,children:We(et.Item,{className:i("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-neutral-100",Boolean(n||e.disabledTooltip)&&"cursor-not-allowed opacity-50",d),disabled:n||!!e.disabledTooltip,onSelect:t,value:e.label+(e==null?void 0:e.value),children:[r&&F("div",{className:"shrink-0 text-neutral-600",children:o?F(Yn,{className:"size-4 text-neutral-600"}):F(Zn,{className:"size-4 text-neutral-400"})}),We("div",{className:"flex min-w-0 grow items-center gap-2",children:[e.icon&&F("span",{className:"shrink-0 text-neutral-600",children:li(e.icon)?e.icon:F(e.icon,{className:"h-4 w-4"})}),F("span",{className:"grow truncate",children:e.label})]}),a,!r&&o&&F(vr,{className:"size-4 shrink-0 text-neutral-600"})]})}),e.separatorAfter&&F(et.Separator,{className:"-mx-1 my-1 h-px bg-neutral-200"})]})}var Cd=({children:e,disabledTooltip:t})=>t?F(q,{content:t,children:F("div",{children:e})}):e,li=e=>yd(e),Pd=xd((e,t)=>hd(o=>o.filtered.count===0)?F("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null);import{addYears as Ar,format as Sd,isSameMonth as Td}from"date-fns";import{ChevronLeft as ci,ChevronRight as di,ChevronsLeft as Rd,ChevronsRight as Ld}from"lucide-react";import{forwardRef as Md,useRef as Ed}from"react";import{DayPicker as Id,useDayPicker as Dd,useDayRender as Ad,useNavigation as Od}from"react-day-picker";import{Fragment as Vd,jsx as ne,jsxs as Or}from"react/jsx-runtime";var Gt=Md(({onClick:e,icon:t,disabled:r,...o},n)=>ne("button",{ref:n,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:ne(t,{className:"h-full w-full shrink-0"})}));Gt.displayName="NavigationButton";function ui({mode:e="single",weekStartsOn:t=0,numberOfMonths:r=1,showYearNavigation:o=!1,disableNavigation:n,locale:a,className:d,classNames:l,...m}){return ne(Id,{mode:e,weekStartsOn:t,numberOfMonths:r,locale:a,showOutsideDays:r===1,className:d,classNames:{months:"flex space-y-0",month:"space-y-4 p-3 w-full",nav:"gap-1 flex items-center rounded-full w-full h-full justify-between p-4",table:"w-full border-separate border-spacing-y-1",head_cell:"w-9 font-medium text-xs text-center text-neutral-400 pb-2",row:"w-full",cell:"relative p-0 text-center focus-within:relative text-neutral-900",day:i("relative size-10 rounded-md text-sm text-neutral-900","hover:bg-neutral-100 active:bg-neutral-200 outline outline-offset-2 outline-0 focus-visible:outline-2 outline-blue-500"),day_today:"font-semibold",day_selected:"rounded aria-selected:bg-blue-500 aria-selected:text-white",day_disabled:"!text-neutral-300 line-through disabled:hover:bg-transparent",day_outside:"text-neutral-400",day_range_middle:"!rounded-none aria-selected:!bg-blue-100 aria-selected:!text-blue-900",day_range_start:"rounded-r-none !rounded-l",day_range_end:"rounded-l-none !rounded-r",day_hidden:"invisible",...l},components:{IconLeft:()=>ne(ci,{className:"h-4 w-4"}),IconRight:()=>ne(di,{className:"h-4 w-4"}),Caption:({...c})=>{let{goToMonth:s,nextMonth:u,previousMonth:p,currentMonth:f,displayMonths:g}=Od(),{numberOfMonths:b,fromDate:w,toDate:P}=Dd(),k=g.findIndex(T=>Td(c.displayMonth,T)),x=k===0,S=k===g.length-1,I=b>1&&(x||!S),y=b>1&&(S||!x),O=()=>{let T=Ar(f,-1);p&&(!w||T.getTime()>=w.getTime())&&s(T)},R=()=>{let T=Ar(f,1);u&&(!P||T.getTime()<=P.getTime())&&s(T)};return Or("div",{className:"flex items-center justify-between",children:[Or("div",{className:"flex items-center gap-1",children:[o&&!y&&ne(Gt,{disabled:n||!p||w&&Ar(f,-1).getTime()<w.getTime(),"aria-label":"Go to previous year",onClick:O,icon:Rd}),!y&&ne(Gt,{disabled:n||!p,"aria-label":"Go to previous month",onClick:()=>p&&s(p),icon:ci})]}),ne("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:Sd(c.displayMonth,"LLLL yyy",{locale:a})}),Or("div",{className:"flex items-center gap-1",children:[!I&&ne(Gt,{disabled:n||!u,"aria-label":"Go to next month",onClick:()=>u&&s(u),icon:di}),o&&!I&&ne(Gt,{disabled:n||!u||P&&Ar(f,1).getTime()>P.getTime(),"aria-label":"Go to next year",onClick:R,icon:Ld})]})]})},Day:({date:c,displayMonth:s})=>{let u=Ed(null),{activeModifiers:p,buttonProps:f,divProps:g,isButton:b,isHidden:w}=Ad(c,s,u),{selected:P,today:k,disabled:x,range_middle:S}=p;if(w)return ne(Vd,{});if(!b)return ne("div",{...g,className:i("flex items-center justify-center",g.className)});let{children:I,...y}=f;return Or("button",{ref:u,...y,type:"button",children:[I,k&&ne("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":!P,"!bg-white":P,"!bg-blue-400":P&&S,"text-neutral-400":x})})]})}},...m})}import{endOfDay as pi,isSameDay as fi,startOfDay as gi}from"date-fns";import{enUS as jd}from"date-fns/locale";import{useEffect as Vo,useMemo as bi,useRef as Yd,useState as zr}from"react";import{Command as Eo}from"cmdk";import{Lock as zd}from"lucide-react";import{jsx as tt,jsxs as Fd}from"react/jsx-runtime";var Io=({presets:e,onSelect:t,currentValue:r,currentPresetId:o})=>{let n=c=>"dateRange"in c,a=c=>"date"in c,d=(c,s)=>c.getDate()===s.getDate()&&c.getMonth()===s.getMonth()&&c.getFullYear()===s.getFullYear(),l=(c,s)=>{let u=c.from,p=s.from,f=!1;u&&p&&d(u,p)&&(f=!0);let g=c.to,b=s.to,w=!1;return g&&b&&d(g,b)&&(w=!0),f&&w},m=c=>{if(o)return o===c.id;if(n(c)){let s=r;return s&&l(s,c.dateRange)}else if(a(c)){let s=r;return s&&d(s,c.date)}return!1};return tt(Eo,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:tt(Eo.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:e.map((c,s)=>Fd(Eo.Item,{disabled:c.requiresUpgrade,onSelect:()=>t(c),title:c.label,value:c.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(c)&&"font-semibold text-neutral-800"),children:[tt("span",{children:c.label}),c.requiresUpgrade?tt(zd,{className:"h-3.5 w-3.5","aria-hidden":"true"}):c.shortcut?tt("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:c.shortcut.toUpperCase()}):null,c.requiresUpgrade&&c.tooltipContent&&tt(q,{side:"bottom",content:c.tooltipContent,children:tt("div",{className:"absolute inset-0 cursor-not-allowed"})})]},s))})})};Io.displayName="DatePicker.Presets";import{format as Ue}from"date-fns";import{createContext as Hd}from"react";var Do=Hd({isOpen:!1,setIsOpen:()=>{}}),_d=()=>{let e=typeof window<"u"?window.navigator.language:"en-US",t=new Intl.DateTimeFormat(e,{hour:"numeric"}).format();return Number.isInteger(Number(t))},Ao=(e,t,r=!1)=>{let o=!_d(),n;return r?n=o?Ue(e,"d MMM, yyyy h:mm a",{locale:t}):Ue(e,"d MMM, yyyy HH:mm",{locale:t}):n=Ue(e,"d MMM, yyyy",{locale:t}),n},mi=(e,t)=>{let{toYear:r,fromYear:o,fromMonth:n,toMonth:a,fromDay:d,toDay:l}=t;if(e&&e.length>0){let m=o,c=r;e.forEach(s=>{var u,p,f,g,b,w;if("date"in s){let P=s.date.getFullYear();if(o&&P<o)throw new Error(`Preset ${s.label} is before fromYear ${m}.`);if(r&&P>r)throw new Error(`Preset ${s.label} is after toYear ${c}.`);if(n&&s.date.getMonth()<n.getMonth())throw new Error(`Preset ${s.label} is before fromMonth ${n}.`);if(a&&s.date.getMonth()>a.getMonth())throw new Error(`Preset ${s.label} is after toMonth ${a}.`);if(d&&s.date.getDate()<d.getDate())throw new Error(`Preset ${s.label} is before fromDay ${d}.`);if(l&&s.date.getDate()>l.getDate())throw new Error(`Preset ${s.label} is after toDay ${Ue(l,"MMM dd, yyyy")}.`)}if("dateRange"in s){let P=(u=s.dateRange.from)==null?void 0:u.getFullYear(),k=(p=s.dateRange.to)==null?void 0:p.getFullYear();if(P&&o&&P<o)throw new Error(`Preset ${s.label}'s 'from' is before fromYear ${m}.`);if(k&&r&&k>r)throw new Error(`Preset ${s.label}'s 'to' is after toYear ${c}.`);if(n){let x=(f=s.dateRange.from)==null?void 0:f.getMonth();if(x&&x<n.getMonth())throw new Error(`Preset ${s.label}'s 'from' is before fromMonth ${Ue(n,"MMM, yyyy")}.`)}if(a){let x=(g=s.dateRange.to)==null?void 0:g.getMonth();if(x&&x>a.getMonth())throw new Error(`Preset ${s.label}'s 'to' is after toMonth ${Ue(a,"MMM, yyyy")}.`)}if(d){let x=(b=s.dateRange.from)==null?void 0:b.getDate();if(x&&x<d.getDate())throw new Error(`Preset ${s.dateRange.from}'s 'from' is before fromDay ${Ue(d,"MMM dd, yyyy")}.`)}if(l){let x=(w=s.dateRange.to)==null?void 0:w.getDate();if(x&&x>l.getDate())throw new Error(`Preset ${s.label}'s 'to' is after toDay ${Ue(l,"MMM dd, yyyy")}.`)}}})}};import{cva as $d}from"class-variance-authority";import{Calendar as Bd,ChevronDown as Wd}from"lucide-react";import{forwardRef as Ud}from"react";import{jsx as Vr,jsxs as Kd}from"react/jsx-runtime";var Gd=$d(["group peer flex 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","cursor-pointer disabled:cursor-not-allowed","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"}}}),Oo=Ud(({className:e,children:t,placeholder:r,hasError:o,disabled:n,...a},d)=>Kd("button",{ref:d,className:i(Gd({hasError:o}),e),disabled:n,...a,children:[Vr(Bd,{className:"h-4 w-4 shrink-0"}),Vr("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left",children:t||(r?Vr("span",{className:"text-neutral-400",children:r}):null)}),Vr(Wd,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]}));Oo.displayName="DatePicker.Trigger";import{jsx as ae,jsxs as hi}from"react/jsx-runtime";var Zd=({value:e,defaultValue:t,presetId:r,onChange:o,presets:n,disabled:a,disableNavigation:d,disabledDays:l,showYearNavigation:m=!1,locale:c=jd,placeholder:s="Select date range",hasError:u,align:p="center",className:f,...g})=>{let{isDesktop:b}=ee(),[w,P]=zr(!1),[k,x]=zr(n&&r?n==null?void 0:n.find(({id:M})=>M===r):void 0),[S,I]=zr((k==null?void 0:k.dateRange)??e??t??void 0),[y,O]=zr(S==null?void 0:S.to),R=bi(()=>S,[w]);Vo(()=>{I(e)},[e]),Vo(()=>{let M=n==null?void 0:n.find(({id:A})=>A===r);x(M),I((M==null?void 0:M.dateRange)??e??t)},[n,r]),Vo(()=>{w?S&&O(S.to):O(S==null?void 0:S.to)},[w]);let T=(M,A)=>{let E=(S==null?void 0:S.from)&&(S==null?void 0:S.to)?{from:A}:M;(E==null?void 0:E.from)&&(E==null?void 0:E.to)&&fi(E.from,E.to)&&(E.from=gi(E.from),E.to=pi(E.to)),I(E),x(void 0),(E==null?void 0:E.from)&&(E==null?void 0:E.to)&&(o==null||o(E),P(!1))},L=M=>{let A=M.dateRange;(A==null?void 0:A.from)&&(A==null?void 0:A.to)&&fi(A.from,A.to)&&(A={from:gi(A.from),to:pi(A.to)}),I(A),x(M),o==null||o(A,M),P(!1)},h=()=>{I(R),P(!1)},v=M=>{M||h(),P(M)},C=bi(()=>S?`${S.from?Ao(S.from,c):""} - ${S.to?Ao(S.to,c):""}`:null,[S,c]);return _e((n==null?void 0:n.filter(M=>M.shortcut).map(M=>M.shortcut))??[],M=>{let A=n==null?void 0:n.find(E=>E.shortcut===M.key);A&&L(A)}),ae(Do.Provider,{value:{isOpen:w,setIsOpen:P},children:ae(oe,{align:p,openPopover:w,setOpenPopover:v,popoverContentClassName:"rounded-xl",content:ae("div",{className:"flex w-full",children:hi("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[n&&n.length>0&&ae(qd,{children:ae("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:ae("div",{className:"sm:py-3",children:ae(Io,{currentPresetId:r,currentValue:S,presets:n,onSelect:L})})})}),ae("div",{className:"scrollbar-hide overflow-x-scroll",children:ae(ui,{mode:"range",selected:S,onSelect:T,month:y,onMonthChange:O,numberOfMonths:b?2:1,disabled:l,disableNavigation:d,showYearNavigation:m,locale:c,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...g})})]})}),children:ae(Oo,{placeholder:s,disabled:a,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:(k==null?void 0:k.label)??C})})})};function Z4({presets:e,...t}){return e&&mi(e,t),ae(Zd,{presets:e,...t})}function qd({children:e}){let t=Yd(null),{scrollProgress:r,updateScrollProgress:o}=Fe(t);return hi("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 Xd}from"react";import{jsx as Fr,jsxs as Jd}from"react/jsx-runtime";function ow({dotSize:e=2,gapSize:t=10,patternOffset:r=[0,0],className:o}){let n=Xd();return Jd("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Fr("defs",{children:Fr("pattern",{id:`dots-${n}`,x:r[0]-1,y:r[1]-1,width:e+t,height:e+t,patternUnits:"userSpaceOnUse",children:Fr("rect",{x:1,y:1,width:e,height:e,fill:"currentColor"})})}),Fr("rect",{fill:`url(#dots-${n})`,width:"100%",height:"100%"})]})}import Qd from"next/link";import{useEffect as eu,useState as vi}from"react";import tu from"swr";import{jsx as zo,jsxs as xi}from"react/jsx-runtime";function yi({className:e}){let{data:t}=tu("https://status.dub.co/api/v1/summary",ye),[r,o]=vi("bg-neutral-200"),[n,a]=vi("Loading status...");return eu(()=>{if(!t)return;let{ongoing_incidents:d}=t;if(d.length>0){let{current_worst_impact:l,name:m}=d[0],c=l==="degraded_performance"?"bg-yellow-500":"bg-red-500";a(m),o(c)}else a("All systems operational"),o("bg-green-500")},[t]),xi(Qd,{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:[xi("div",{className:"relative size-2",children:[zo("div",{className:i("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",r,n==="Loading status..."&&"animate-none")}),zo("div",{className:i("absolute inset-0 z-10 m-auto size-2 rounded-full",r)})]}),zo("p",{className:"text-xs font-medium leading-none text-neutral-600",children:n})]})}import{jsx as Hr,jsxs as wi}from"react/jsx-runtime";function uw({icon:e,title:t,description:r,learnMore:o,children:n}){return wi("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[Hr("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:Hr(e,{className:"size-6 text-neutral-800"})}),Hr("p",{className:"text-center text-base font-medium text-neutral-950",children:t}),r&&wi("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[r," ",o&&Hr("a",{href:o,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more \u2197"})]}),n]})}import{cva as ru}from"class-variance-authority";import{useState as Ni}from"react";import{toast as ki}from"sonner";import{Fragment as nu,jsx as Pe,jsxs as Ho}from"react/jsx-runtime";var Ci=["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:Ci,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:[...Ci,"application/zip"],errorMessage:"File type not supported (document or zip files only)"}},ou=ru("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 Nw({id:e,readFile:t,onChange:r,variant:o,className:n,iconClassName:a,previewClassName:d,icon:l=ta,customPreview:m,accept:c="any",imageSrc:s,loading:u=!1,clickToUpload:p=!0,showHoverOverlay:f=!0,content:g,maxFileSizeMB:b=5,targetResolution:w,accessibilityLabel:P="File upload",disabled:k=!1}){let[x,S]=Ni(!1),[I,y]=Ni(null),O=async R=>{let T="dataTransfer"in R?R.dataTransfer.files&&R.dataTransfer.files[0]:R.target.files&&R.target.files[0];if(!T)return;if(y(T.name),b>0&&T.size/1024/1024>b){ki.error(`File size too big (max ${b} MB)`);return}let L=Fo[c].types;if(L.length&&!L.includes(T.type)){ki.error(Fo[c].errorMessage??"File type not supported");return}let h=T;if(w&&T.type.startsWith("image/"))try{let v=await En(T,w),C=await fetch(v).then(M=>M.blob());h=new File([C],T.name,{type:T.type})}catch(v){console.error("Error resizing image:",v)}if(t){let v=new FileReader;v.onload=C=>{var M;return r==null?void 0:r({src:(M=C.target)==null?void 0:M.result,file:h})},v.readAsDataURL(h);return}r==null||r({file:h})};return Ho("label",{className:i(ou({variant:o}),k?"cursor-not-allowed":i(p&&"cursor-pointer"),n),children:[u&&Pe("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:Pe(Vt,{})}),Pe("div",{className:"absolute inset-0 z-[5]",onDragOver:R=>{R.preventDefault(),R.stopPropagation(),S(!0)},onDragEnter:R=>{R.preventDefault(),R.stopPropagation(),S(!0)},onDragLeave:R=>{R.preventDefault(),R.stopPropagation(),S(!1)},onDrop:async R=>{R.preventDefault(),R.stopPropagation(),O(R),S(!1)}}),Ho("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",k&&"bg-neutral-50",x&&!k&&"cursor-copy border-black bg-neutral-50 opacity-100",s?i("opacity-0",f&&!k&&"group-hover:opacity-100"):i(!k&&"group-hover:bg-neutral-50")),children:[Pe(l,{className:i("size-7 transition-all duration-75",k?"text-neutral-400":i("text-neutral-500 group-hover:scale-110 group-active:scale-95",x?"scale-110":"scale-100"),a)}),g!==null&&Pe("div",{className:i("mt-2 text-center text-sm text-neutral-500",k&&"text-neutral-400"),children:g??Pe(nu,{children:Ho("p",{children:["Drag and drop ",p&&"or click"," to upload."]})})}),Pe("span",{className:"sr-only",children:P})]}),s&&(m??Pe("img",{src:s,alt:"Preview",className:i("h-full w-full rounded-[inherit] object-cover",d)})),p&&Pe("div",{className:"sr-only mt-1 flex shadow-sm",children:Pe("input",{id:e,type:"file",accept:Fo[c].types.join(","),onChange:O,disabled:k},I)})]})}import{Command as Kt}from"cmdk";import{X as au}from"lucide-react";import{AnimatePresence as iu,motion as Si}from"motion/react";import su from"next/link";import{isValidElement as lu,useCallback as Pi,useState as $r}from"react";function _r(e){if("operator"in e&&e.operator&&Array.isArray(e.values))return e;if("value"in e&&!("values"in e))return{key:e.key,operator:"IS",values:[e.value]};if(Array.isArray(e.values)&&(!("operator"in e)||!e.operator)){let t=e.values;return{key:e.key,operator:t.length>1?"IS_ONE_OF":"IS",values:t}}return{key:e.key,operator:"IS",values:[]}}import{Fragment as uu,jsx as D,jsxs as Ae}from"react/jsx-runtime";function cu(e){switch(e){case"IS":case"IS_ONE_OF":return"is";case"IS_NOT":case"IS_NOT_ONE_OF":return"is not";default:return"is"}}function Ti({filters:e,activeFilters:t,onRemove:r,onRemoveFilter:o,onRemoveAll:n,onSelect:a,onToggleOperator:d,isAdvancedFilter:l=!1,className:m}){_e("Escape",n,{priority:1});let c=(t==null?void 0:t.map(_r))??[];return D(de,{height:!0,className:"w-full",transition:{type:"tween",duration:.3},children:Ae("div",{className:i("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",m),children:[D("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:D(iu,{children:c.map(({key:s,values:u,operator:p})=>{if(s==="loader")return D(Si.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-${(u==null?void 0:u[0])??0}`);let f=e.find(k=>k.key===s);if(!f)return console.error("Filter.List received an activeFilter without a corresponding filter"),null;let g=u.length===1,b=u.slice(0,3),w=g?(()=>{var S,I;let k=u[0],x=(S=f.options)==null?void 0:S.find(y=>typeof y.value=="string"&&typeof k=="string"?y.value.toLowerCase()===k.toLowerCase():y.value===k);return(x==null?void 0:x.label)??((I=f.getOptionLabel)==null?void 0:I.call(f,k,{key:f.key,option:x}))??String(k)})():`${u.length} ${f.labelPlural??Mn(f.label,u.length)}`;return D(du,{filterKey:s,filter:f,values:u,operator:p,OptionDisplay:({className:k})=>{var I,y,O;let x,S;if(g){let R=u[0],T=(I=f.options)==null?void 0:I.find(h=>typeof h.value=="string"&&typeof R=="string"?h.value.toLowerCase()===R.toLowerCase():h.value===R);S=(T==null?void 0:T.permalink)??((y=f.getOptionPermalink)==null?void 0:y.call(f,R))??null;let L=(T==null?void 0:T.icon)??((O=f.getOptionIcon)==null?void 0:O.call(f,R,{key:f.key,option:T}))??f.icon;x=D("span",{className:"shrink-0 text-neutral-600",children:jt(L)?L:D(L,{className:"h-4 w-4"})})}else f.hideMultipleIcons?x=D("span",{className:"shrink-0 text-neutral-600",children:jt(f.icon)?f.icon:D(f.icon,{className:"h-4 w-4"})}):x=D("div",{className:"flex shrink-0 -space-x-1",children:b.map((R,T)=>{var v,C;let L=(v=f.options)==null?void 0:v.find(M=>typeof M.value=="string"&&typeof R=="string"?M.value.toLowerCase()===R.toLowerCase():M.value===R),h=(L==null?void 0:L.icon)??((C=f.getOptionIcon)==null?void 0:C.call(f,R,{key:f.key,option:L}))??f.icon;return D("span",{className:"inline-flex text-neutral-600",style:{zIndex:b.length-T},children:jt(h)?h:D(h,{className:"h-4 w-4"})},T)})});return Ae("div",{className:i("flex items-center gap-2.5 px-3 py-2",k),children:[x,S?D(su,{href:S,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:gt(w,30)}):gt(w,30)]})},onRemove:r,onRemoveFilter:o,onSelect:a,onToggleOperator:d,isAdvancedFilter:l},s)})})}),c.length!==0&&Ae("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:n,children:["Clear Filters",D("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"})]})]})})}function du({filterKey:e,filter:t,values:r,operator:o,OptionDisplay:n,onRemove:a,onRemoveFilter:d,onSelect:l,onToggleOperator:m,isAdvancedFilter:c=!1}){var S,I;let[s,u]=$r(!1),[p,f]=$r(!1),[g,b]=$r(""),[w,P]=$r(new Set),k=Pi(()=>{P(new Set(r)),f(!0)},[r]),x=Pi(y=>{r.includes(y)?a(e,y):l==null||l(e,y),!c&&!t.multiple&&f(!1)},[e,r,l,a,c,t.multiple]);return Ae(Si.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:[Ae("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[D("span",{className:"shrink-0 text-neutral-600",children:jt(t.icon)?t.icon:D(t.icon,{className:"h-4 w-4"})}),t.label]}),(c||t.multiple)&&!t.singleSelect&&!t.hideOperator?D(oe,{openPopover:s,setOpenPopover:u,content:Ae("div",{className:"w-32 p-1",children:[D("button",{type:"button",className:i("flex w-full items-center rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-neutral-100",!o.includes("NOT")&&"bg-neutral-50"),onClick:()=>{o.includes("NOT")&&(m==null||m(e)),u(!1)},children:"is"}),D("button",{type:"button",className:i("flex w-full items-center rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-neutral-100",o.includes("NOT")&&"bg-neutral-50"),onClick:()=>{o.includes("NOT")||m==null||m(e),u(!1)},children:"is not"})]}),align:"center",children:D("button",{type:"button",className:"px-3 py-2 text-neutral-500 transition-colors hover:bg-neutral-50 hover:text-neutral-700",children:cu(o)})}):D("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),D(oe,{openPopover:p,setOpenPopover:y=>{f(y),y||(b(""),P(new Set))},content:D("div",{children:D(de,{width:!0,height:!0,className:"rounded-[inherit]",children:Ae(Kt,{loop:!0,shouldFilter:!1,children:[D("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:D(Kt.Input,{placeholder:`${t.label}...`,value:g,onValueChange:b,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",autoCapitalize:"none"})}),D("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",children:D(Kt.List,{className:"flex w-full min-w-[180px] flex-col gap-1 p-1",children:(()=>{var L;let y=((L=t.options)==null?void 0:L.filter(h=>{var C;return g?(h.label??((C=t.getOptionLabel)==null?void 0:C.call(t,h.value,{key:t.key,option:h}))??String(h.value)).toLowerCase().includes(g.toLowerCase()):!0}))??[],O=y.filter(h=>w.has(h.value)),R=y.filter(h=>!w.has(h.value)),T=h=>{var A,E;let v=r.includes(h.value),C=h.icon??((A=t.getOptionIcon)==null?void 0:A.call(t,h.value,{key:t.key,option:h}))??t.icon,M=h.label??((E=t.getOptionLabel)==null?void 0:E.call(t,h.value,{key:t.key,option:h}))??String(h.value);return Ae(Kt.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"),onSelect:()=>{x(h.value)},onPointerDown:U=>{U.preventDefault()},value:M+h.value,children:[(c||t.multiple)&&!t.singleSelect&&D("div",{className:i("flex h-4 w-4 items-center justify-center rounded border",v?"border-neutral-900 bg-neutral-900":"border-neutral-300"),children:v&&D(xt,{className:"h-3 w-3 text-white"})}),D("span",{className:"shrink-0 text-neutral-600",children:jt(C)?C:D(C,{className:"h-4 w-4"})}),D("span",{className:"flex-1",children:gt(M,48)}),D("div",{className:"ml-1 flex shrink-0 justify-end text-neutral-500",children:(c||t.multiple)&&!t.singleSelect?h.right:v?D(xt,{className:"h-4 w-4"}):h.right})]},h.value)};return Ae(uu,{children:[O.map(T),(c||t.multiple)&&!t.singleSelect&&O.length>0&&R.length>0&&D(Kt.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"}),R.map(T)]})})()})})]})})}),align:"start",children:D("button",{type:"button",onClick:k,disabled:((S=t.options)==null?void 0:S.length)===0,className:i("flex items-center",((I=t.options)==null?void 0:I.length)&&"transition-colors hover:bg-neutral-50"),children:t.options?n({className:"cursor-pointer"}):D("div",{className:"flex items-center gap-2.5 px-3 py-2",children:D("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})})})}),D("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:()=>{d?d(e):r.forEach(y=>{a(e,y)})},children:D(au,{className:"h-3.5 w-3.5"})})]})}var jt=e=>lu(e);import{Command as Oe,useCommandState as mu}from"cmdk";import{ChevronDown as pu,ListFilter as fu}from"lucide-react";import{Fragment as gu,forwardRef as bu,isValidElement as Ri,useCallback as Br,useEffect as Wr,useImperativeHandle as hu,useRef as $o,useState as _o}from"react";import{Fragment as ku,jsx as $,jsxs as Se}from"react/jsx-runtime";function Li({filters:e,onSelect:t,onRemove:r,onOpenFilter:o,onSearchChange:n,onSelectedFilterChange:a,activeFilters:d,askAI:l,isAdvancedFilter:m=!1,children:c,emptyState:s,className:u}){var L,h;let{isMobile:p}=ee(),f=$o(null),g=$o(void 0),[b,w]=_o(!1);_e("f",()=>w(!0),{enabled:!b});let[P,k]=_o(""),[x,S]=_o(null),I=Br(()=>{k(""),S(null)},[]);Wr(()=>{b||I()},[b]);let y=x?e.find(({key:v})=>v===x):null,O=Br(v=>{f.current&&(g.current={width:f.current.clientWidth,height:f.current.clientHeight}),k(""),S(v),o==null||o(v)},[o]),R=Br(v=>{if(!y||!d)return!1;let C=d.find(A=>A.key===x);return C?_r(C).values.includes(v):!1},[y,d,x]),T=Br(v=>{y&&((y==null?void 0:y.singleSelect)||!m&&!(y!=null&&y.multiple)?(R(v)?r(y.key,v):t(y.key,v),w(!1)):R(v)?r(y.key,v):t(y.key,v))},[y,R,t,r,m]);return Wr(()=>{n==null||n(P)},[P]),Wr(()=>{a==null||a(x)},[x]),Wr(()=>{(y==null?void 0:y.options)&&f.current&&(g.current={width:f.current.clientWidth,height:f.current.clientHeight})},[y==null?void 0:y.options]),$(oe,{openPopover:b,setOpenPopover:w,onEscapeKeyDown:v=>{x&&(v.preventDefault(),I())},content:$(de,{width:!p,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:Se(Oe,{loop:!0,shouldFilter:!y||y.shouldFilter!==!1,children:[Se("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[$(xu,{placeholder:`${(y==null?void 0:y.label)||"Filter"}...`,value:P,onValueChange:k,onKeyDown:v=>{(v.key==="Escape"||v.key==="Backspace"&&!P)&&(v.preventDefault(),v.stopPropagation(),x?I():w(!1))},onEmptySubmit:v=>{v.preventDefault(),v.stopPropagation(),l?(t("ai",y?`${y.label} ${P}`:P),w(!1)):T(P)}}),!y&&$("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"})]}),$(yu,{ref:f,children:Se(Oe.List,{className:i("flex w-full flex-col gap-1 p-1",y?"min-w-[100px]":"min-w-[180px]"),children:[y?((h=(L=y.options)==null?void 0:L.filter(v=>!P||!v.hideDuringSearch))==null?void 0:h.map(v=>{let C=(y==null?void 0:y.singleSelect)||!m&&!(y!=null&&y.multiple),M=R(v.value);return $(Bo,{filter:y,option:v,showCheckbox:!C&&(m||(y==null?void 0:y.multiple)),isChecked:M,right:C&&M?$(xt,{className:"h-4 w-4"}):v.right,onSelect:()=>T(v.value)},v.value)}))??$(Oe.Loading,{children:$("div",{className:"-m-1 flex items-center justify-center",style:g.current,children:$(be,{})})}):e.filter(v=>!v.hideInFilterDropdown).map(v=>Se(gu,{children:[$(Bo,{filter:v,onSelect:()=>O(v.key)}),v.separatorAfter&&$(Oe.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},v.key)),(!y||y.options)&&$(wu,{search:P,selectedFilter:y,onSelect:()=>T(P),askAI:l,children:s?vu(s)?(s==null?void 0:s[x??"default"])??"No matching options":s:"No matching options"})]})},x)]})}),children:Se("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",u),children:[$(fu,{className:"size-4 shrink-0"}),$("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:c??"Filter"}),d!=null&&d.length?$("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:d.length}):$(pu,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})})}function vu(e){return typeof e=="object"&&e!==null&&!Ri(e)}var xu=e=>{let{onEmptySubmit:t,...r}=e,o=mu(n=>n.filtered.count===0);return $(Oe.Input,{...r,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:n=>{var a;(a=e.onKeyDown)==null||a.call(e,n),n.key==="Enter"&&o&&(t==null||t(n))},autoCapitalize:"none"})},yu=bu(({children:e},t)=>{let r=$o(null);hu(t,()=>r.current);let{scrollProgress:o,updateScrollProgress:n}=Fe(r);return Se(ku,{children:[$("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:r,onScroll:n,children:e}),$("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(o,2)}})]})});function Bo({filter:e,option:t,right:r,showCheckbox:o,isChecked:n,onSelect:a}){var m,c;let d=t?t.icon??((m=e.getOptionIcon)==null?void 0:m.call(e,t.value,{key:e.key,option:t}))??e.icon:e.icon,l=t?t.label??((c=e.getOptionLabel)==null?void 0:c.call(e,t.value,{key:e.key,option:t})):e.label;return Se(Oe.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"),onSelect:a,value:l+(t==null?void 0:t.value),children:[o&&$("div",{className:i("flex h-4 w-4 items-center justify-center rounded border",n?"border-neutral-900 bg-neutral-900":"border-neutral-300"),children:n&&$(xt,{className:"h-3 w-3 text-white"})}),$("span",{className:"shrink-0 text-neutral-600",children:Nu(d)?d:$(d,{className:"h-4 w-4"})}),$("span",{className:"flex-1",children:gt(l,48)}),$("div",{className:"ml-1 flex shrink-0 justify-end text-neutral-500",children:r})]})}var wu=({search:e,selectedFilter:t,onSelect:r,askAI:o,children:n})=>t&&t.options&&t.options.length===0&&t.shouldFilter!==!1?e?$(Bo,{filter:t,option:{value:e,label:e},onSelect:r}):$(Oe.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:"Start typing to search..."}):!t&&o&&e?Se(Oe.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[$(An,{className:"h-4 w-4"}),Se("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",Se("span",{className:"text-black",children:['"',e,'"']})]})]}):$(Oe.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:n}),Nu=e=>Ri(e);var iN={Select:Li,List:Ti};import{useMemo as Cu,useState as Mi}from"react";import{jsx as rt,jsxs as Ur}from"react/jsx-runtime";function pN({title:e,description:t,inputAttrs:r,helpText:o,buttonText:n="Save Changes",disabledTooltip:a,handleSubmit:d}){let[l,m]=Mi(r.defaultValue),[c,s]=Mi(!1),u=Cu(()=>c||!l||l===r.defaultValue,[c,l,r.defaultValue]);return Ur("form",{onSubmit:async p=>{p.preventDefault(),s(!0),await d({[r.name]:l}),s(!1)},className:"rounded-xl border border-neutral-200 bg-white",children:[Ur("div",{className:"relative flex flex-col space-y-6 p-6",children:[Ur("div",{className:"flex flex-col space-y-1",children:[rt("h2",{className:"text-base font-semibold",children:e}),rt("p",{className:"text-sm text-neutral-500",children:t})]}),typeof r.defaultValue=="string"?rt("input",{...r,type:r.type||"text",required:!0,disabled:!!a,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":a})}):rt("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),Ur("div",{className:"flex flex-col items-start justify-between gap-4 rounded-b-xl border-t border-neutral-200 bg-neutral-50 px-5 py-4 sm:flex-row sm:items-center sm:justify-between sm:space-y-0 sm:py-3",children:[typeof o=="string"?rt("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,rt("div",{className:"w-fit shrink-0",children:rt(te,{text:n,loading:c,disabled:u,disabledTooltip:a})})]})]})}import{useId as Pu}from"react";import{jsx as Gr,jsxs as Su}from"react/jsx-runtime";function ot({cellSize:e=12,strokeWidth:t=1,patternOffset:r=[0,0],className:o}){let n=Pu();return Su("svg",{className:i("pointer-events-none absolute inset-0 text-black/10",o),width:"100%",height:"100%",children:[Gr("defs",{children:Gr("pattern",{id:`grid-${n}`,x:r[0]-1,y:r[1]-1,width:e,height:e,patternUnits:"userSpaceOnUse",children:Gr("path",{d:`M ${e} 0 L 0 0 0 ${e}`,fill:"transparent",stroke:"currentColor",strokeWidth:t})})}),Gr("rect",{fill:`url(#grid-${n})`,width:"100%",height:"100%"})]})}import{AlertCircle as Tu}from"lucide-react";import Ru,{useCallback as Lu,useState as Mu}from"react";import{jsx as nt,jsxs as Wo}from"react/jsx-runtime";var Eu=Ru.forwardRef(({className:e,type:t,...r},o)=>{let[n,a]=Mu(!1),d=Lu(()=>a(!n),[n,a]);return Wo("div",{children:[Wo("div",{className:"relative flex",children:[nt("input",{type:n?"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}),Wo("div",{className:"group",children:[r.error&&nt("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:nt(Tu,{className:i("size-5 text-white",t==="password"&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),t==="password"&&nt("button",{className:i("absolute inset-y-0 right-0 flex items-center px-3",r.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>d(),"aria-label":n?"Hide password":"Show Password",children:n?nt(aa,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):nt(ia,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),r.error&&nt("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:r.error})]})});Eu.displayName="Input";import*as Uo from"@radix-ui/react-label";import{cva as Iu}from"class-variance-authority";import*as Ei from"react";import{jsx as Ou}from"react/jsx-runtime";var Du=Iu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Au=Ei.forwardRef(({className:e,...t},r)=>Ou(Uo.Root,{ref:r,className:i(Du(),e),...t}));Au.displayName=Uo.Root.displayName;import{cva as Vu}from"class-variance-authority";import{isValidElement as zu}from"react";import{jsx as Go,jsxs as Ii}from"react/jsx-runtime";var Ko=Vu(["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 transition-colors","disabled:opacity-50 disabled:cursor-default"],{variants:{variant:{default:"text-content-default hover:bg-bg-subtle",danger:"text-content-error hover:bg-red-50 dark:hover:bg-red-950/20"},disabled:{true:"opacity-50 cursor-default text-content-disabled hover:bg-bg-default"}}});function AN({as:e,variant:t="default",children:r,icon:o,shortcut:n,className:a,disabledTooltip:d,...l}){return Go(kt,{tooltipProps:{content:d},children:Ii(e||"button",{...e==="button"?{type:"button"}:{},className:i(Ko({variant:t,disabled:!!d}),a),disabled:d?!0:l.disabled,...l,children:[Ii("div",{className:"flex grow items-center gap-2",children:[o&&(Fu(o)?o:Go(o,{className:"size-4"})),r]}),n&&Go("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:n})]})})}var Fu=e=>zu(e);import{curveNatural as Di}from"@visx/curve";import{LinearGradient as Ai}from"@visx/gradient";import{Group as Hu}from"@visx/group";import{ParentSize as _u}from"@visx/responsive";import{scaleLinear as $u,scaleUtc as Bu}from"@visx/scale";import{Area as Wu,AreaClosed as Uu}from"@visx/shape";import{motion as Oi}from"motion/react";import{useId as Gu,useMemo as Vi}from"react";import{jsx as Te,jsxs as jo}from"react/jsx-runtime";var Ku={top:8,right:2,bottom:2,left:2};function UN(e){return Te(_u,{className:"relative",children:({width:t,height:r})=>t>0&&r>0&&Te(ju,{...{width:t,height:r,...e}})})}function ju({width:e,height:t,data:r,curve:o=!0,color:n,padding:a}){let d={...Ku,...a},l=Gu(),m=Vi(()=>r.map(({date:u})=>({date:u,value:0})),[r]),{yScale:c,xScale:s}=Vi(()=>{let u=r.map(({value:w})=>w),p=Math.max(...u),f=r.map(({date:w})=>w.getTime()),g=new Date(Math.min(...f)),b=new Date(Math.max(...f));return{yScale:$u({domain:[-2,Math.max(p,2)],range:[t-d.top-d.bottom,0],nice:!0,clamp:!0}),xScale:Bu({domain:[g,b],range:[0,e-d.left-d.right],nice:!0})}},[r,t,e]);return jo("svg",{width:e,height:t,children:[jo("defs",{children:[Te(Ai,{id:`${l}-color-gradient`,from:n||"#7D3AEC",to:n||"#DA2778",x1:0,x2:e-d.left-d.right,gradientUnits:"userSpaceOnUse"}),Te(Ai,{id:`${l}-mask-gradient`,from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),Te("mask",{id:`${l}-mask`,maskContentUnits:"objectBoundingBox",children:Te("rect",{width:"1",height:"1",fill:`url(#${l}-mask-gradient)`})})]}),jo(Hu,{left:d.left,top:d.top,children:[Te(Wu,{data:r,x:({date:u})=>s(u),y:({value:u})=>c(u)??0,curve:o?Di:void 0,children:({path:u})=>Te(Oi.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},strokeWidth:1.5,stroke:`url(#${l}-color-gradient)`})}),Te(Uu,{data:r,x:({date:u})=>s(u),y:({value:u})=>c(u)??0,yScale:c,curve:o?Di:void 0,children:({path:u})=>Te(Oi.path,{initial:{d:u(m)||"",opacity:0},animate:{d:u(r)||"",opacity:1},fill:`url(#${l}-color-gradient)`,mask:`url(#${l}-mask)`})})]})]},r.length)}import*as ue from"@radix-ui/react-dialog";import*as Yo from"@radix-ui/react-visually-hidden";import{useRouter as Yu}from"next/navigation";import{Drawer as at}from"vaul";import{jsx as ie,jsxs as Rt}from"react/jsx-runtime";function qN({children:e,className:t,showModal:r,setShowModal:o,onClose:n,desktopOnly:a,preventDefaultClose:d,drawerRootProps:l}){let m=Yu(),c=({dragged:u}={})=>{d&&!u||(n&&n(),o?o(!1):m.back())},{isMobile:s}=ee();return s&&!a?ie(at.Root,{open:o?r:!0,onOpenChange:u=>{u||c({dragged:!0})},...l,children:Rt(at.Portal,{children:[ie(at.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),ie(at.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:Rt("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[Rt(Yo.Root,{children:[ie(at.Title,{children:"Modal"}),ie(at.Description,{children:"This is a modal"})]}),ie(Zu,{}),e]})}),ie(at.Overlay,{})]})}):ie(ue.Root,{open:o?r:!0,onOpenChange:u=>{u||c()},children:Rt(ue.Portal,{children:[ie(ue.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),Rt(ue.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:[Rt(Yo.Root,{children:[ie(ue.Title,{children:"Modal"}),ie(ue.Description,{children:"This is a modal"})]}),e]})]})})}function Zu(){return ie("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:ie("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}import{X as qu}from"lucide-react";import Xu,{useCallback as Zo,useEffect as zi,useImperativeHandle as Ju,useRef as Fi,useState as qo}from"react";import{jsx as Yt,jsxs as _i}from"react/jsx-runtime";function Hi(e){let t=[],r="",o=!1;for(let a=0;a<e.length;a++){let d=e[a];if(d==='"'){o=!o;continue}if(!o&&(d===","||d===`
|
|
3
|
+
`||d==="\r")){d==="\r"&&e[a+1]===`
|
|
4
|
+
`&&a++;let l=r.trim();l&&t.push(l),r="";continue}r+=d}let n=r.trim();return n&&t.push(n),t}var Qu=Xu.forwardRef(function({values:t,onChange:r,placeholder:o,id:n,className:a,inputClassName:d,disabled:l,normalize:m=p=>p.trim(),maxValues:c,autoFocus:s},u){let[p,f]=qo(""),[g,b]=qo(null),w=Fi(null),P=Fi(null),[k,x]=qo(!1),S=Zo(h=>{let v=h.map(m).filter(Boolean);if(v.length===0)return t;let C=[...t];for(let M of v){if(c!=null&&C.length>=c)break;C.push(M)}return C},[t,m,c]),I=Zo(h=>{let v=new Set;return h.filter(C=>v.has(C)?!1:(v.add(C),!0))},[]),y=Zo(()=>{let h=Hi(p);if(h.length===0)return f(""),t;let v=S(h);return r(v),f(""),v},[p,t,S,r]);Ju(u,()=>({commitPendingInput(){return y()}}),[y]),zi(()=>{g&&!t.includes(g)&&b(null)},[t,g]),zi(()=>{let h=w.current;if(!h)return;let v=()=>{let M=Array.from(h.children);if(M.length<=1){x(!1);return}let A=M.map(U=>U.offsetTop),E=Math.min(...A);x(A.some(U=>U-E>2))};v();let C=new ResizeObserver(v);return C.observe(h),()=>C.disconnect()},[t,p]);let O=h=>{let v=h.currentTarget,C=g?t.indexOf(g):-1;if(h.key===","||h.key==="Enter"){h.preventDefault(),y();return}if(h.key==="ArrowLeft"&&t.length>0){if(C>0){h.preventDefault(),b(t[C-1]);return}if(C===-1&&v.selectionStart===0&&v.selectionEnd===0){h.preventDefault(),b(t[t.length-1]);return}}if(h.key==="ArrowRight"&&C!==-1){if(h.preventDefault(),C<t.length-1){b(t[C+1]);return}b(null);return}if((h.key==="Backspace"||h.key==="Delete")&&!p&&t.length>0){if(h.preventDefault(),g){let M=t.filter(A=>A!==g);r(M),b(null);return}b(t[t.length-1])}h.key==="Tab"&&g&&(h.preventDefault(),b(null))},R=h=>{let v=h.clipboardData.getData("text");if(!/[,\n\r]/.test(v))return;let M=Hi(v);if(M.length===0)return;h.preventDefault();let A=S(M);r(A),f("")},T=()=>{b(null);let h=y(),v=I(h);v.length!==h.length&&r(v)},L=h=>{b(v=>v===h?null:v),r(t.filter(v=>v!==h))};return _i("div",{ref:w,className:i("relative flex w-full flex-wrap items-center gap-1 rounded-md border border-neutral-300 bg-white px-1.5 shadow-sm focus-within:border-neutral-500 focus-within:ring-1 focus-within:ring-neutral-500",k?"py-[4px]":"h-[38px] py-[3px]",l&&"cursor-not-allowed bg-neutral-50 opacity-60",a),children:[t.map((h,v)=>_i("span",{onClick:()=>b(h),className:i("inline-flex items-center gap-1 rounded-md py-0.5 pl-1.5 pr-1 text-sm leading-6",g===h?"bg-neutral-300 text-neutral-900":"bg-neutral-100 text-neutral-900"),children:[Yt("span",{children:h}),Yt("button",{type:"button",onClick:C=>{C.stopPropagation(),L(h)},disabled:l,className:i("rounded-md p-0.5 outline-none transition hover:bg-neutral-200 focus:ring-1 focus:ring-neutral-400",g===h?"text-neutral-600 hover:text-neutral-800":"text-neutral-500 hover:text-neutral-700"),"aria-label":`Remove ${h}`,children:Yt(qu,{className:"size-3",strokeWidth:2.5,"aria-hidden":!0})})]},`${h}-${v}`)),Yt("div",{className:"min-w-[8rem] flex-[1_1_8rem]",children:Yt("input",{ref:P,id:n,value:p,onChange:h=>{b(null),f(h.target.value)},onKeyDown:O,onBlur:T,onPaste:R,disabled:l,className:i("h-7 w-full border-0 bg-transparent px-1.5 text-sm leading-6 text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0",g&&"text-transparent caret-transparent placeholder:text-transparent",d),placeholder:o,type:"text",autoComplete:"off",autoFocus:s})})]})});Qu.displayName="MultiValueInput";import{useCallback as it,useEffect as em,useLayoutEffect as tm,useRef as rm,useState as $i}from"react";import{jsx as Lt,jsxs as Bi}from"react/jsx-runtime";function s3({value:e,onChange:t,min:r,max:o,step:n=1,disabled:a,className:d,id:l,formatValue:m,decrementAriaLabel:c="Decrease",incrementAriaLabel:s="Increase",...u}){let[p,f]=$i(String(e)),[g,b]=$i(!1),w=rm(null),P=typeof r=="number"?e>r:!0,k=typeof o=="number"?e<o:!0;tm(()=>{g&&w.current&&!a&&(w.current.focus(),w.current.select())},[g,a]),em(()=>{!g&&p!==String(e)&&f(String(e))},[e,g,p]);let x=it(L=>{let h=L;return typeof r=="number"&&(h=Math.max(r,h)),typeof o=="number"&&(h=Math.min(o,h)),h},[r,o]),S=it(()=>{if(a||!P)return;let L=x(e-n);t(L),f(String(L))},[a,P,x,t,n,e]),I=it(()=>{if(a||!k)return;let L=x(e+n);t(L),f(String(L))},[a,k,x,t,n,e]),y=it(L=>{let h=L.target.value;if(f(h),h===""||h==="-")return;let v=Number(h);if(!isNaN(v)){let C=x(v);t(C)}},[x,t]),O=it(()=>{b(!1);let L=Number(p);if(isNaN(L)||p===""||p==="-"){f(String(e));return}let h=x(L);t(h),f(String(h))},[p,e,x,t]),R=it(()=>{b(!0)},[]),T=it(L=>{a||(L.key==="ArrowLeft"||L.key==="ArrowDown"?(L.preventDefault(),S()):L.key==="ArrowRight"||L.key==="ArrowUp"?(L.preventDefault(),I()):L.key==="Enter"?(L.preventDefault(),O(),L.currentTarget.blur()):L.key==="Escape"&&(L.preventDefault(),f(String(e)),L.currentTarget.blur()))},[a,S,I,O,e]);return Bi("div",{id:l,role:"group","aria-disabled":a,className:i("flex h-10 w-full select-none items-stretch overflow-hidden rounded-lg border border-neutral-200 bg-white",a&&"opacity-60",d),...u,children:[Lt("button",{type:"button","aria-label":c,onClick:S,disabled:a||!P,className:i("flex h-full w-24 items-center justify-center border-r border-neutral-200 text-neutral-700 transition-colors",!(a||!P)&&"hover:bg-neutral-50"),children:Lt(Nr,{className:"block size-4"})}),Bi("div",{className:"relative flex min-w-0 flex-1 items-center justify-center",children:[Lt("input",{ref:w,type:"text",inputMode:"numeric",role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,value:g?p:String(e),onChange:y,onBlur:O,onFocus:R,onKeyDown:T,disabled:a,className:i("w-full border-0 bg-transparent px-3 text-center text-sm text-neutral-900 outline-none transition-colors focus:ring-0",a&&"cursor-not-allowed",!a&&"cursor-text focus:bg-neutral-50",!g&&m&&"pointer-events-none opacity-0")}),!g&&m&&Lt("div",{role:"spinbutton","aria-valuenow":e,"aria-valuemin":r,"aria-valuemax":o,tabIndex:0,onKeyDown:L=>{L.key==="Enter"||L.key===" "?(L.preventDefault(),a||(b(!0),f(String(e)))):T(L)},onClick:()=>{a||(b(!0),f(String(e)))},className:i("absolute inset-0 flex items-center justify-center px-3 text-sm text-neutral-900 outline-none focus:ring-0",!a&&"cursor-text hover:bg-neutral-50"),children:m(e)})]}),Lt("button",{type:"button","aria-label":s,onClick:I,disabled:a||!k,className:i("flex h-full w-24 items-center justify-center border-l border-neutral-200 text-neutral-700 transition-colors",!(a||!k)&&"hover:bg-neutral-50"),children:Lt(yt,{className:"block size-4"})})]})}import{Fragment as Ui,jsx as Mt,jsxs as Et}from"react/jsx-runtime";var Wi=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 d3({pagination:e,setPagination:t,totalCount:r,unit:o=l=>`item${l?"s":""}`,className:n,children:a,showTotalCount:d=!0}){return Et("div",{className:i("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",n),children:[Et("div",{className:"flex items-center gap-2",children:[Mt("div",{children:r===void 0?Mt("div",{className:"h-5 w-24 animate-pulse rounded-lg bg-neutral-200"}):Et(Ui,{children:[Mt("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",r>0&&Et(Ui,{children:[Et("span",{className:"font-medium",children:[((e.pageIndex-1)*e.pageSize+1).toLocaleString(),"-",Math.min((e.pageIndex-1)*e.pageSize+e.pageSize,r).toLocaleString()]})," ",d&&"of "]}),d&&Mt("span",{className:"font-medium",children:r.toLocaleString()})," ",typeof o=="function"?o(r!==1):o]})}),a]}),Et("div",{className:"flex items-center gap-2",children:[Mt("button",{type:"button",className:Wi,onClick:()=>t({...e,pageIndex:e.pageIndex-1}),disabled:e.pageIndex===1,children:"Previous"}),Mt("button",{type:"button",className:Wi,onClick:()=>t({...e,pageIndex:e.pageIndex+1}),disabled:!r||(e.pageIndex-1)*e.pageSize+e.pageSize>=r,children:"Next"})]})]})}import{jsx as Gi,jsxs as om}from"react/jsx-runtime";function p3({progress:e,strokeWidth:t=16,className:r}){let o=Math.min(Math.max(e,0),1),n=(100-t)/2,a=n*Math.PI*2,d=o*a;return om("svg",{width:"100",height:"100",viewBox:"0 0 100 100",className:i("size-3 shrink-0 text-green-600 [--track-color:#e5e5e5]",r),children:[Gi("circle",{cx:"50",cy:"50",r:n,strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round",className:"stroke-[var(--track-color)]"}),o>0&&Gi("circle",{cx:"50",cy:"50",r:n,stroke:"currentColor",strokeWidth:`${t}px`,fill:"none",strokeLinecap:"round",strokeDasharray:`${d} ${a-d}`,style:{transformOrigin:"50px 50px",transform:"rotate(-90deg)"}})]})}import{jsx as Yr,jsxs as nm}from"react/jsx-runtime";var Kr={left:"right",right:"left",top:"bottom",bottom:"top"},Zt="rgba(0, 0, 0, 1)",jr="rgba(0, 0, 0, 0)";function b3({strength:e=32,steps:t=4,side:r="top",className:o,style:n,...a}){let d=100/t,l=.5,m=Math.pow(e/l,1/(t-1)),c=s=>`blur(${l*m**(t-s-1)}px)`;return Yr("div",{className:i("pointer-events-none absolute inset-0",o),style:{transformOrigin:r,...n},...a,children:nm("div",{className:"relative z-0 size-full",style:{background:`linear-gradient(
|
|
5
|
+
to ${Kr[r]},
|
|
6
|
+
rgb(from transparent r g b / alpha) 0%,
|
|
7
|
+
rgb(from transparent r g b / 0%) 100%
|
|
8
|
+
)`},children:[Yr("div",{className:"z-1 absolute inset-0",style:{mask:`linear-gradient(
|
|
9
|
+
to ${Kr[r]},
|
|
10
|
+
${Zt} 0%,
|
|
11
|
+
${jr} ${d}%
|
|
12
|
+
)`,backdropFilter:c(0),WebkitBackdropFilter:c(0)}}),t>1&&Yr("div",{className:"absolute inset-0 z-[2]",style:{mask:`linear-gradient(
|
|
13
|
+
to ${Kr[r]},
|
|
14
|
+
${Zt} 0%,
|
|
15
|
+
${Zt} ${d}%,
|
|
16
|
+
${jr} ${d*2}%
|
|
17
|
+
)`,backdropFilter:c(1),WebkitBackdropFilter:c(1)}}),t>2&&[...Array(t-2)].map((s,u)=>Yr("div",{className:"absolute inset-0",style:{zIndex:u+2,mask:`linear-gradient(
|
|
18
|
+
to ${Kr[r]},
|
|
19
|
+
${jr} ${u*d}%,
|
|
20
|
+
${Zt} ${(u+1)*d}%,
|
|
21
|
+
${Zt} ${(u+2)*d}%,
|
|
22
|
+
${jr} ${(u+3)*d}%
|
|
23
|
+
)`,backdropFilter:c(u+2),WebkitBackdropFilter:c(u+2)}},u))]})})}import*as Ge from"@radix-ui/react-radio-group";import{Circle as am}from"lucide-react";import*as Xo from"react";import{jsx as Zr}from"react/jsx-runtime";var im=Xo.forwardRef(({className:e,...t},r)=>Zr(Ge.Root,{className:i("grid gap-2",e),...t,ref:r}));im.displayName=Ge.Root.displayName;var sm=Xo.forwardRef(({className:e,...t},r)=>Zr(Ge.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:Zr(Ge.Indicator,{className:"flex items-center justify-center",children:Zr(am,{className:"h-2.5 w-2.5 fill-current text-current"})})}));sm.displayName=Ge.Item.displayName;import{Drawer as Ke}from"vaul";import{jsx as st,jsxs as mm}from"react/jsx-runtime";function lm({children:e,contentProps:t,nested:r=!1,...o}){let n=r?Ke.NestedRoot:Ke.Root;return st(n,{direction:"right",handleOnly:!0,...o,children:mm(Ke.Portal,{children:[st(Ke.Overlay,{className:"fixed inset-0 z-40 bg-black/20","data-sheet-overlay":!0}),st(Ke.Content,{...t,onPointerDownOutside:a=>{var d;a.target instanceof Element&&a.target.closest("[data-sonner-toast]")&&a.preventDefault(),(d=t==null?void 0:t.onPointerDownOutside)==null||d.call(t,a)},className:i("@container/sheet fixed bottom-2 right-2 top-2 z-40 flex outline-none","w-[min(var(--sheet-width),calc(100%-2*var(--sheet-margin)))] [--sheet-margin:8px] [--sheet-width:540px]",t==null?void 0:t.className),style:{"--initial-transform":"calc(100% + 8px)",userSelect:"auto",...t==null?void 0:t.style},children:st("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-xl bg-white",children:e})})]})})}function cm({className:e,...t}){return st(Ke.Title,{className:i("text-lg font-semibold text-neutral-900",e),...t})}function dm(e){return st(Ke.Description,{...e})}function um(e){return st(Ke.Close,{...e})}var C3=Object.assign(lm,{Title:cm,Description:dm,Close:um});import{useEffect as pm,useRef as fm,useState as gm}from"react";import{jsx as Ki}from"react/jsx-runtime";var bm=`
|
|
3
24
|
attribute vec2 position;
|
|
4
25
|
|
|
5
26
|
void main()
|
|
6
27
|
{
|
|
7
28
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
8
29
|
}
|
|
9
|
-
`,
|
|
30
|
+
`,hm=`
|
|
10
31
|
precision mediump float;
|
|
11
32
|
|
|
12
33
|
uniform vec2 resolution;
|
|
@@ -40,14 +61,14 @@ void main(void) {
|
|
|
40
61
|
|
|
41
62
|
gl_FragColor = fragColor;
|
|
42
63
|
}
|
|
43
|
-
`,Im=60,Om=1e3/Im;function n3({dotSize:e=1,cellSize:t=3,speed:r=5,color:o=[0,0,0],className:a}){let n=Mm(null),[c,d]=Em(!1);return Lm(()=>{let m=n.current;if(!m||!m.parentElement)return;let s=m.parentElement,l=window.devicePixelRatio||1;m.width=s.clientWidth*l,m.height=s.clientHeight*l;let u=m.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(u===null){console.error("Failed to initialize WebGL");return}let p=u.createProgram();if(!p){console.error("Failed to create shader program");return}for(let S=0;S<2;++S){let Y=S===0?Dm:Am,P=u.createShader(S===0?u.VERTEX_SHADER:u.FRAGMENT_SHADER);if(!P){console.error("Failed to create shader");return}u.shaderSource(P,Y),u.compileShader(P),u.getShaderParameter(P,u.COMPILE_STATUS)||console.error(u.getShaderInfoLog(P)),u.attachShader(p,P),u.linkProgram(p)}u.getProgramParameter(p,u.LINK_STATUS)||console.error(u.getProgramInfoLog(p));let f=u.getAttribLocation(p,"position"),b=u.getUniformLocation(p,"time"),g=u.getUniformLocation(p,"resolution"),h=u.getUniformLocation(p,"dotSize"),N=u.getUniformLocation(p,"cellSize"),x=u.getUniformLocation(p,"speed"),y=u.getUniformLocation(p,"color");u.useProgram(p);let C=[1,1,-1,1,1,-1,-1,-1],w=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,w),u.bufferData(u.ARRAY_BUFFER,new Float32Array(C),u.STATIC_DRAW),u.enableVertexAttribArray(f),u.vertexAttribPointer(f,2,u.FLOAT,!1,0,0),u.uniform1f(h,e*window.devicePixelRatio),u.uniform1f(N,t*window.devicePixelRatio),u.uniform1f(x,r),u.uniform3f(y,o[0],o[1],o[2]);let T,B=0;function R(S){if(S-B<Om){T=requestAnimationFrame(R);return}B=S,u&&m&&p&&(u.clear(u.COLOR_BUFFER_BIT|u.DEPTH_BUFFER_BIT),u.uniform1f(b,S/1e3),u.uniform2f(g,m.width,m.height),u.drawArrays(u.TRIANGLE_STRIP,0,4)),T=requestAnimationFrame(R)}return T=requestAnimationFrame(R),m.addEventListener("webglcontextlost",S=>{S.preventDefault(),d(!0),cancelAnimationFrame(T)}),()=>{cancelAnimationFrame(T),m.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),vi("div",{className:i("absolute inset-0",a,c&&"opacity-0"),children:vi("canvas",{ref:n,width:"100%",height:"100%",className:"size-full"})})}import*as _e from"@radix-ui/react-slider";import{jsx as tt,jsxs as Dr}from"react/jsx-runtime";function l3({value:e,onChange:t,min:r,max:o,step:a=1,marks:n,className:c,hint:d,disabled:m}){let s=n||[r,r+(o-r)/3,r+2*(o-r)/3,o];return tt("div",{className:i("relative z-0 [--thumb-radius:13px] [--track-height:16px]",c),children:Dr("div",{className:"w-full",children:[Dr(_e.Root,{className:"relative flex h-8 w-full items-center",value:[e],min:r,max:o,step:a,onValueChange:([l])=>t(l),disabled:m,"aria-label":"Slider",children:[Dr(_e.Track,{className:"relative h-[var(--track-height)] w-full overflow-visible rounded-full bg-neutral-200",children:[tt("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),Dr("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[tt(_e.Range,{className:"absolute h-[var(--track-height)] bg-black"}),s.map(l=>{let u=(l-r)/(o-r)*100;return tt("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${u}%`}},l)})]})]}),tt(_e.Thumb,{className:"z-20 flex size-[calc(var(--thumb-radius)*2)] items-center justify-center rounded-full border-0 bg-white shadow-[0_2px_2px_rgba(0,0,0,0.10),0_3px_3px_rgba(0,0,0,0.09)]",children:tt("span",{className:"block size-[calc(var(--thumb-radius)*1.23)] rounded-full bg-[#171717]"})})]}),d&&tt("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:d})]})})}import{useEffect as zm,useId as Vm,useRef as Hm}from"react";import{jsx as Ar,jsxs as xi}from"react/jsx-runtime";function u3({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 d=Vm(),m=Hm(null);return zm(()=>{m.current&&c&&setTimeout(()=>{var s;(s=m.current)==null||s.focus()},10)},[c]),xi("div",{className:a,children:[r&&Ar("div",{className:"flex items-center gap-2",children:Ar("label",{htmlFor:`${d}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),xi("div",{className:"mt-2 flex w-full items-center justify-between rounded-md border border-neutral-300 bg-white shadow-sm transition-all focus-within:border-neutral-800 focus-within:outline-none focus-within:ring-1 focus-within:ring-neutral-500",children:[Ar("input",{ref:m,id:`${d}-datetime`,type:"text",placeholder:o,defaultValue:e?Pt(e):"",onBlur:s=>{if(s.target.value.length>0){let l=jr(s.target.value);l&&(t(l),s.target.value=Pt(l))}},onKeyDown:s=>{if(s.key==="Enter"&&m.current){s.preventDefault();let l=jr(m.current.value);l&&(t(l),m.current.value=Pt(l))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Ar("input",{type:"datetime-local",id:`${d}-datetime-local`,required:n,value:e?la(e):"",onChange:s=>{let l=new Date(s.target.value);t(l),m.current&&(m.current.value=Pt(l))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as _m}from"class-variance-authority";import{jsx as yi,jsxs as Wm}from"react/jsx-runtime";var Fm=_m("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"},size:{sm:"px-1.5 py-0.5",md:"px-2 py-1"}},defaultVariants:{variant:"neutral"}}),Bm={neutral:Ia,new:Da,success:Ma,pending:Aa,warning:qr,error:qr};function x3({className:e,variant:t,size:r,icon:o,tooltip:a,onClick:n,children:c,...d}){let m=o!==null?o??Bm[t??"neutral"]:null;return yi(ft,{tooltipProps:{content:a},children:Wm("span",{className:i(Fm({variant:t,size:r}),a&&"cursor-help",n&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:n,...d,children:[m&&yi(m,{className:"h-3 w-3 shrink-0"}),c]})})}import*as Or from"@radix-ui/react-switch";import{useMemo as Um}from"react";import{jsx as Ir}from"react/jsx-runtime";function T3({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:a,thumbIcon:n,checked:c=!0,loading:d=!1,disabled:m=!1,disabledTooltip:s}){let l=Um(()=>s?!0:m||d,[s,m,d]),u=Ir(Or.Root,{checked:d?!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:Ir(Or.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 s?Ir(Z,{content:s,children:Ir("div",{className:"inline-block leading-none",children:u})}):u}import{Command as Ao}from"cmdk";import{useState as $m}from"react";import{jsx as rt,jsxs as Gm}from"react/jsx-runtime";function z3({table:e}){let[t,r]=$m(!1);return rt(xe,{openPopover:t,setOpenPopover:r,content:rt(xr,{className:"max-h-[50vh]",children:rt(Ao,{tabIndex:0,loop:!0,children:rt(Ao.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 Gm(Ao.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:[rt("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:rt(ee,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:rt(Ua,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Io,getCoreRowModel as Ym,useReactTable as Zm}from"@tanstack/react-table";import{AnimatePresence as qm,motion as Xm}from"motion/react";import{memo as Jm,useEffect as Ht,useMemo as Ci,useRef as Qm,useState as ki}from"react";import{useEffect as Km,useState as jm}from"react";import{jsx as zr,jsxs as Ni}from"react/jsx-runtime";function wi({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[a,n]=jm(0);return Km(()=>{o!==0&&n(o)},[o]),De("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),zr("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,children:Ni("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[zr("div",{className:"flex w-6 items-center justify-center",children:zr(ht,{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"})}),Ni("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"]}),zr("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 Pi,jsx as O,jsxs as le}from"react/jsx-runtime";var Oo=(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"]),eu=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 iw(e){let{data:t,rowCount:r,columns:o,defaultColumn:a,columnPinning:n,pagination:c,onPaginationChange:d,getRowId:m,enableColumnResizing:s=!1,columnResizeMode:l="onChange"}=e,u=!!e.onRowSelectionChange||!!e.selectionControls,[p,f]=ki(e.columnVisibility??{}),[b,g]=ki(e.selectedRows??{}),h=Qm(null);Ht(()=>{if(!m||!t)return;let y=Object.entries(b);if(y.length>0){let C=y.filter(([w])=>t.find(T=>(m==null?void 0:m(T))===w));C.length!==y.length&&g(Object.fromEntries(C))}},[t,b,m]),Ht(()=>{e.selectedRows&&!Yr(e.selectedRows,b)&&g(e.selectedRows??{})},[e.selectedRows]),Ht(()=>{var y;(y=e.onRowSelectionChange)==null||y.call(e,x.getSelectedRowModel().rows)},[b]),Ht(()=>{e.columnVisibility&&!Yr(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),Ht(()=>{var y;(y=e.onColumnVisibilityChange)==null||y.call(e,p)},[p]);let N=Ci(()=>[...u?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:y})=>O("div",{className:"flex size-full items-center justify-center",children:O(ht,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:y.getIsAllRowsSelected()?!0:y.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>y.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:y,table:C})=>O("div",{className:"flex size-full items-center justify-center",children:O(ht,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:y.getIsSelected(),onClick:w=>{let T=m==null?void 0:m(y.original),B=C.getRowModel().rows,R=h.current!==null?B.findIndex(S=>(m==null?void 0:m(S.original))===h.current):-1;if(w.shiftKey&&h.current!==null&&R!==-1){let S=y.index,Y=Math.min(R,S),P=Math.max(R,S),M=B.slice(Y,P+1).map(L=>m==null?void 0:m(L.original));C.setRowSelection(L=>{let E=T!==void 0&&((L==null?void 0:L[T])??!1);return{...L,...Object.fromEntries(M.map(z=>[z,!E]))}}),h.current=T??null}else y.toggleSelected(),h.current=T??null},title:"Select"})})}]:[],...o],[u,o]),x=Zm({data:t,rowCount:r,columns:N,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:s,...a},getCoreRowModel:Ym(),onPaginationChange:d,onColumnVisibilityChange:y=>f(y),onRowSelectionChange:g,state:{pagination:c,columnVisibility:p,columnPinning:{left:[],right:[],...n},rowSelection:b},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:s,columnResizeMode:l});return{...e,columnVisibility:p,table:x,enableColumnResizing:s}}var tu=Jm(function({row:t,onRowClick:r,onRowAuxClick:o,rowProps:a,cellRight:n,tdClassName:c,table:d}){let{className:m,...s}=a||{};return O("tr",{className:i("group/row",r&&"cursor-pointer select-none",d.getRowModel().rows.length>8&&t.index===d.getRowModel().rows.length-1&&"[&_td]:border-b-0",m),onClick:r?l=>{Ge(l)||r(t,l)}:void 0,onAuxClick:o?l=>{Ge(l)||o(t,l)}:void 0,"data-selected":t.getIsSelected(),...s,children:t.getVisibleCells().map(l=>O("td",{className:i(Oo(l.column.id,!!r),"text-content-default group",zo(l.column,t.index===d.getRowModel().rows.length-1),typeof c=="function"?c(l.column.id,t):c),style:{width:l.column.getSize(),...Vo(l.column)},children:le("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[O("div",{className:"min-w-0 shrink grow truncate",children:Io(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 sw({data:e,loading:t,error:r,emptyState:o,cellRight:a,sortBy:n,sortOrder:c,onSortChange:d,sortableColumns:m=[],className:s,containerClassName:l,scrollWrapperClassName:u,emptyWrapperClassName:p,thClassName:f,tdClassName:b,table:g,pagination:h,resourceName:N,onRowClick:x,onRowAuxClick:y,onRowSelectionChange:C,selectionControls:w,rowProps:T,rowCount:B,children:R,enableColumnResizing:S=!1}){let Y=!!C||!!w,P=Ci(()=>S?g.getVisibleLeafColumns().reduce((M,L)=>M+L.getSize(),0):"100%",[S,g.getVisibleLeafColumns()]);return le("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",l),children:[!r&&!!(e!=null&&e.length)||t?le(Pi,{children:[Y&&O(wi,{table:g,controls:w,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),le("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",u),children:[le("table",{className:i(["group/table w-full border-separate border-spacing-0 transition-[border-spacing,margin-top]","[&_tr>*:first-child]:border-l-transparent","[&_tr>*:last-child]:border-r-transparent","[&_tr>*:last-child]:border-r-transparent","[&_th]:relative [&_th]:select-none",S&&"[&_th]:group/resize"],s),style:{width:"100%",tableLayout:S?"fixed":"auto",minWidth:P},children:[O("thead",{className:"relative",children:g.getHeaderGroups().map(M=>O("tr",{children:M.headers.map(L=>{let E=m.includes(L.column.id),z=E?"button":"div";return le("th",{colSpan:L.colSpan,className:i(Oo(L.id),"text-content-emphasis select-none font-medium",zo(L.column,!g.getRowModel().rows.length),typeof f=="function"?f(L.column.id):f,S&&"relative"),style:{width:L.getSize(),...Vo(L.column)},children:[O("div",{className:"flex items-center justify-between gap-6 !pr-0",children:le(z,{className:i("flex items-center gap-2",L.column.id==="select"&&"size-full"),...E&&{type:"button",disabled:!E,"aria-label":"Sort by column",onClick:()=>d==null?void 0:d({sortBy:L.column.id,sortOrder:n!==L.column.id||c==="asc"?"desc":"asc"})},children:[L.isPlaceholder?null:(()=>{var Xt;let k=Io(L.column.columnDef.header,L.getContext()),Wr=(Xt=L.column.columnDef.meta)==null?void 0:Xt.headerTooltip;return O(ru,{tooltip:Wr,children:k})})(),E&&n===L.column.id&&O(ga,{className:"h-3 w-3 shrink-0",order:c||"desc"})]})}),S&&L.column.getCanResize()&&!["select","menu"].includes(L.column.id)&&O("div",{onMouseDown:L.getResizeHandler(),onTouchStart:L.getResizeHandler(),onClick:k=>k.stopPropagation(),className:eu})]},L.id)})},M.id))}),O("tbody",{children:g.getRowModel().rows.map(M=>{let L=typeof T=="function"?T(M):T,{className:E,...z}=L||{};return S?O(tu,{row:M,onRowClick:x,onRowAuxClick:y,rowProps:L,cellRight:a,tdClassName:b,table:g},`${M.id}-${g.getVisibleLeafColumns().map(k=>k.id).join(",")}`):O("tr",{className:i("group/row",x&&"cursor-pointer select-none",g.getRowModel().rows.length>8&&M.index===g.getRowModel().rows.length-1&&"[&_td]:border-b-0",E),onClick:x?k=>{Ge(k)||x(M,k)}:void 0,onAuxClick:y?k=>{Ge(k)||y(M,k)}:void 0,"data-selected":M.getIsSelected(),...z,children:M.getVisibleCells().map(k=>O("td",{className:i(Oo(k.column.id,!!x),"text-content-default group",zo(k.column,M.index===g.getRowModel().rows.length-1),typeof b=="function"?b(k.column.id,M):b),style:{minWidth:k.column.columnDef.minSize,maxWidth:k.column.columnDef.maxSize,width:k.column.columnDef.size||"auto",...Vo(k.column)},children:le("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[O("div",{className:"min-w-0 shrink grow truncate",children:Io(k.column.columnDef.cell,k.getContext())}),a==null?void 0:a(k)]})},k.id))},M.id)})})]}),R]})]}):O("div",{className:i("text-content-subtle flex h-96 w-full items-center justify-center text-sm",p),children:r||o||`No ${(N==null?void 0:N(!0))||"items"} found.`}),h&&!r&&!!(e!=null&&e.length)&&!!B&&le("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:[le("div",{children:[O("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",le("span",{className:"font-medium",children:[((h.pageIndex-1)*h.pageSize+1).toLocaleString(),"-",Math.min((h.pageIndex-1)*h.pageSize+h.pageSize,g.getRowCount()).toLocaleString()]})," ","of"," ",O("span",{className:"font-medium",children:g.getRowCount().toLocaleString()})," ",(N==null?void 0:N(g.getRowCount()!==1))||"items"]}),le("div",{className:"flex items-center gap-2",children:[O(ee,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>g.previousPage(),disabled:h.pageIndex===1}),O(ee,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>g.nextPage(),disabled:h.pageIndex===g.getPageCount()})]})]}),O(qm,{children:t&&O(Xm.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full",children:O("div",{className:"flex h-[75vh] w-full items-center justify-center",children:O(ue,{})})})})]})}var zo=(e,t)=>{let r=e.getIsPinned();return i(r&&"bg-bg-default py-0",r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},Vo=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"}};function ru({children:e,tooltip:t}){return t?O(Z,{content:t,children:O("span",{className:"cursor-help underline decoration-dotted underline-offset-2",children:e})}):O(Pi,{children:e})}import{formatDuration as ou,intervalToDuration as au}from"date-fns";import{useEffect as nu,useMemo as iu,useState as su}from"react";import{toast as Si}from"sonner";import{jsx as ot,jsxs as Ti}from"react/jsx-runtime";var Ri=24*60*60*1e3,lu=30*Ri;function cu(){if(typeof Intl<"u")try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"Local"}catch{}return"Local"}function gw({timestamp:e,rows:t,interactive:r=!0,...o}){return!e||new Date(e).toString()==="Invalid Date"?o.children:ot(Z,{content:ot(du,{timestamp:e,rows:t,interactive:r}),disableHoverableContent:!r,...o})}function du({timestamp:e,rows:t=["local","utc"],interactive:r}){if(!e)throw new Error("Falsy timestamp not permitted in TimestampTooltipContent");let o=new Date(e),a={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0},n=new Date().getTime()-o.getTime(),c=au({start:o,end:new Date}),d=ou(c,{delimiter:", ",format:["years","months","days",...n<lu?["hours",...n<Ri?["minutes","seconds"]:[]]:[]]})+" ago",m=iu(()=>t.map(p=>({local:{label:cu(),shortLabel:new Date().toLocaleTimeString("en-US",{timeZoneName:"short"}).split(" ")[2],successMessageLabel:"local timestamp",value:o.toLocaleString("en-US",a)},utc:{label:"UTC",shortLabel:"UTC",successMessageLabel:"UTC timestamp",value:new Date(o.getTime()).toLocaleString("en-US",{...a,timeZone:"UTC"})},unix:{label:"UNIX Timestamp",successMessageLabel:"UNIX timestamp",value:(o.getTime()/1e3).toString(),valueMono:!0}})[p]),[t,o]),s=m.every(({shortLabel:p})=>p),[l,u]=su(0);return nu(()=>{let p=setInterval(()=>u(f=>f+1),1e3);return()=>clearInterval(p)},[]),Ti("div",{className:"flex max-w-[360px] flex-col gap-2 px-2.5 py-2 text-left text-xs",children:[n>0&&ot("span",{className:"text-content-subtle cursor-default",children:d}),ot("table",{children:m.map((p,f)=>Ti("tr",{className:i(r&&"before:bg-bg-emphasis relative select-none before:absolute before:-inset-x-1 before:inset-y-0 before:rounded before:opacity-0 before:content-[''] hover:cursor-copy hover:before:opacity-60 active:before:opacity-100"),onClick:r?async()=>{try{await navigator.clipboard.writeText(p.value),Si.success(`Copied ${p.successMessageLabel} to clipboard`)}catch(b){Si.error(`Failed to copy ${p.successMessageLabel} to clipboard`),console.error(`Failed to copy ${p.successMessageLabel} to clipboard`,b)}}:void 0,children:[ot("td",{className:"relative py-0.5",children:ot("span",{className:i("text-content-subtle truncate",s&&"bg-bg-inverted/10 rounded px-1 font-mono"),title:s?p.label:void 0,children:s?p.shortLabel:p.label})}),ot("td",{className:i("text-content-default relative whitespace-nowrap py-0.5 pl-3",s&&"pl-2",p.valueMono&&"font-mono"),children:p.value})]},f))})]})}import{LayoutGroup as mu,motion as Li}from"motion/react";import uu from"next/link";import{useId as pu}from"react";import{jsx as Vr,jsxs as fu}from"react/jsx-runtime";function Nw({options:e,selected:t,selectAction:r,layout:o=!0,className:a,optionClassName:n,indicatorClassName:c,style:d}){let m=pu();return Vr(mu,{id:m,children:Vr(Li.div,{layout:o,className:i("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",a),style:d,children:e.map(s=>{let l=s.value===t,u=s.href?uu:"button";return fu(u,{...s.href?{href:s.href}:{type:"button"},"data-selected":l,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!l&&"hover:text-content-subtle z-[11] transition-colors",n),onClick:()=>r==null?void 0:r(s.value),children:[typeof s.label=="string"?Vr("p",{children:s.label}):s.label,s.badge,l&&Vr(Li.div,{layoutId:m,className:i("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",c),transition:{duration:.25}})]},s.value)})})})}import{useEffect as gu,useId as bu,useRef as hu,useState as vu}from"react";import{jsx as ge,jsxs as Ho}from"react/jsx-runtime";var xu=[{key:"utm_source",icon:Ga,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:rn,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:Wa,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:Qa,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:en,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 Lw({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:a,className:n}){let{isMobile:c}=Q(),d=bu(),[m,s]=vu(!1),l=hu(null);return gu(()=>{l.current&&!c&&o&&setTimeout(()=>{var u;return(u=l.current)==null?void 0:u.focus()},10)},[]),ge("div",{className:i("grid gap-y-3",n),children:xu.map(({key:u,icon:p,label:f,placeholder:b,description:g},h)=>ge("div",{className:"group relative",children:Ho("div",{className:"relative z-10 flex",children:[ge(Z,{content:Ho("div",{className:"p-3 text-center text-xs",children:[ge("p",{className:"text-neutral-600",children:g}),ge("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:Ho("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:()=>s(N=>!N),children:[ge(p,{className:"size-4 shrink-0"}),ge("label",{htmlFor:`${d}-${u}`,className:"select-none text-sm",children:m?ge("span",{className:"font-mono text-xs",children:u}):f})]})}),ge("div",{className:"min-w-0 grow",children:ge(ft,{tooltipProps:a?{content:a,disableHoverableContent:!0}:void 0,children:ge("input",{type:"text",id:`${d}-${u}`,ref:h===0?l:void 0,placeholder:b,disabled:r||Boolean(a),className:"size-full rounded-r-md border border-neutral-300 placeholder-neutral-400 focus:border-neutral-500 focus:ring-neutral-500 disabled:cursor-not-allowed sm:text-sm",value:e[u]||"",onChange:N=>t(u,N.target.value)})})})]})},u))})}import{jsx as _o,jsxs as yu}from"react/jsx-runtime";function Ew(){return yu("div",{style:Hr.backgroundMain,children:[_o("div",{style:Hr.backgroundMainBefore}),_o("div",{style:Hr.backgroundMainAfter}),_o("div",{style:Hr.backgroundContent})]})}var Hr={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%),
|
|
64
|
+
`,vm=60,xm=1e3/vm;function R3({dotSize:e=1,cellSize:t=3,speed:r=5,color:o=[0,0,0],className:n}){let a=fm(null),[d,l]=gm(!1);return pm(()=>{let m=a.current;if(!m||!m.parentElement)return;let c=m.parentElement,s=window.devicePixelRatio||1;m.width=c.clientWidth*s,m.height=c.clientHeight*s;let u=m.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(u===null){console.error("Failed to initialize WebGL");return}let p=u.createProgram();if(!p){console.error("Failed to create shader program");return}for(let T=0;T<2;++T){let L=T===0?bm:hm,h=u.createShader(T===0?u.VERTEX_SHADER:u.FRAGMENT_SHADER);if(!h){console.error("Failed to create shader");return}u.shaderSource(h,L),u.compileShader(h),u.getShaderParameter(h,u.COMPILE_STATUS)||console.error(u.getShaderInfoLog(h)),u.attachShader(p,h),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"),b=u.getUniformLocation(p,"resolution"),w=u.getUniformLocation(p,"dotSize"),P=u.getUniformLocation(p,"cellSize"),k=u.getUniformLocation(p,"speed"),x=u.getUniformLocation(p,"color");u.useProgram(p);let S=[1,1,-1,1,1,-1,-1,-1],I=u.createBuffer();u.bindBuffer(u.ARRAY_BUFFER,I),u.bufferData(u.ARRAY_BUFFER,new Float32Array(S),u.STATIC_DRAW),u.enableVertexAttribArray(f),u.vertexAttribPointer(f,2,u.FLOAT,!1,0,0),u.uniform1f(w,e*window.devicePixelRatio),u.uniform1f(P,t*window.devicePixelRatio),u.uniform1f(k,r),u.uniform3f(x,o[0],o[1],o[2]);let y,O=0;function R(T){if(T-O<xm){y=requestAnimationFrame(R);return}O=T,u&&m&&p&&(u.clear(u.COLOR_BUFFER_BIT|u.DEPTH_BUFFER_BIT),u.uniform1f(g,T/1e3),u.uniform2f(b,m.width,m.height),u.drawArrays(u.TRIANGLE_STRIP,0,4)),y=requestAnimationFrame(R)}return y=requestAnimationFrame(R),m.addEventListener("webglcontextlost",T=>{T.preventDefault(),l(!0),cancelAnimationFrame(y)}),()=>{cancelAnimationFrame(y),m.removeEventListener("webglcontextlost",()=>{})}},[e,t,r]),Ki("div",{className:i("absolute inset-0",n,d&&"opacity-0"),children:Ki("canvas",{ref:a,width:"100%",height:"100%",className:"size-full"})})}import*as je from"@radix-ui/react-slider";import{jsx as lt,jsxs as qr}from"react/jsx-runtime";function E3({value:e,onChange:t,min:r,max:o,step:n=1,marks:a,className:d,hint:l,disabled:m}){let c=a||[r,r+(o-r)/3,r+2*(o-r)/3,o];return lt("div",{className:i("relative z-0 [--thumb-radius:13px] [--track-height:16px]",d),children:qr("div",{className:"w-full",children:[qr(je.Root,{className:"relative flex h-8 w-full items-center",value:[e],min:r,max:o,step:n,onValueChange:([s])=>t(s),disabled:m,"aria-label":"Slider",children:[qr(je.Track,{className:"relative h-[var(--track-height)] w-full overflow-visible rounded-full bg-neutral-200",children:[lt("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),qr("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[lt(je.Range,{className:"absolute h-[var(--track-height)] bg-black"}),c.map(s=>{let u=(s-r)/(o-r)*100;return lt("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-white",style:{left:`${u}%`}},s)})]})]}),lt(je.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:lt("span",{className:"block size-[calc(var(--thumb-radius)*1.23)] rounded-full bg-[#171717]"})})]}),l&<("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:l})]})})}import{useEffect as ym,useId as wm,useRef as Nm}from"react";import{jsx as Xr,jsxs as ji}from"react/jsx-runtime";function O3({value:e,onChange:t,label:r,placeholder:o='E.g. "tomorrow at 5pm" or "in 2 hours"',className:n,required:a,autoFocus:d=!1}){let l=wm(),m=Nm(null);return ym(()=>{m.current&&d&&setTimeout(()=>{var c;(c=m.current)==null||c.focus()},10)},[d]),ji("div",{className:n,children:[r&&Xr("div",{className:"flex items-center gap-2",children:Xr("label",{htmlFor:`${l}-datetime`,className:"block text-sm font-medium text-neutral-700",children:r})}),ji("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:[Xr("input",{ref:m,id:`${l}-datetime`,type:"text",placeholder:o,defaultValue:e?Ot(e):"",onBlur:c=>{if(c.target.value.length>0){let s=mo(c.target.value);s&&(t(s),c.target.value=Ot(s))}},onKeyDown:c=>{if(c.key==="Enter"&&m.current){c.preventDefault();let s=mo(m.current.value);s&&(t(s),m.current.value=Ot(s))}},className:"flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),Xr("input",{type:"datetime-local",id:`${l}-datetime-local`,required:a,value:e?Rn(e):"",onChange:c=>{let s=new Date(c.target.value);t(s),m.current&&(m.current.value=Ot(s))},className:"w-[40px] border-none bg-transparent text-neutral-500 focus:outline-none focus:ring-0 sm:text-sm"})]})]})}import{cva as km}from"class-variance-authority";import{jsx as Yi,jsxs as Sm}from"react/jsx-runtime";var Cm=km("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"},size:{sm:"px-1.5 py-0.5",md:"px-2 py-1"}},defaultVariants:{variant:"neutral"}}),Pm={neutral:ea,new:Jn,success:qn,pending:Qn,warning:go,error:go};function B3({className:e,variant:t,size:r,icon:o,tooltip:n,onClick:a,children:d,...l}){let m=o!==null?o??Pm[t??"neutral"]:null;return Yi(kt,{tooltipProps:{content:n},children:Sm("span",{className:i(Cm({variant:t,size:r}),n&&"cursor-help",a&&"cursor-pointer select-none transition-[filter] duration-150 hover:brightness-75 hover:saturate-[1.25]",e),onClick:a,...l,children:[m&&Yi(m,{className:"h-3 w-3 shrink-0"}),d]})})}import*as Qr from"@radix-ui/react-switch";import{useMemo as Tm}from"react";import{jsx as Jr}from"react/jsx-runtime";function q3({fn:e,id:t,trackDimensions:r,thumbDimensions:o,thumbTranslate:n,thumbIcon:a,checked:d=!0,loading:l=!1,disabled:m=!1,disabledTooltip:c}){let s=Tm(()=>c?!0:m||l,[c,m,l]),u=Jr(Qr.Root,{checked:l?!1:d,name:"switch",id:t,...e&&{onCheckedChange:e},disabled:s,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:Jr(Qr.Thumb,{className:i(`radix-state-checked:${n}`,"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,n),children:a})});return c?Jr(q,{content:c,children:Jr("div",{className:"inline-block leading-none",children:u})}):u}import{Command as Jo}from"cmdk";import{useState as Rm}from"react";import{jsx as ct,jsxs as Lm}from"react/jsx-runtime";function a5({table:e}){let[t,r]=Rm(!1);return ct(oe,{openPopover:t,setOpenPopover:r,content:ct(Ir,{className:"max-h-[50vh]",children:ct(Jo,{tabIndex:0,loop:!0,children:ct(Jo.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 n;return Lm(Jo.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:[ct("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}),(n=o.columnDef.header)==null?void 0:n.toString()]},o.id)})})})}),align:"end",children:ct(te,{type:"button",className:"h-8 whitespace-nowrap px-2",variant:"outline",icon:ct(ca,{className:"h-4 w-4 shrink-0"})})})}import{flexRender as Qo,getCoreRowModel as Im,useReactTable as Dm}from"@tanstack/react-table";import{AnimatePresence as Am,motion as Om}from"motion/react";import{memo as Vm,useEffect as qt,useMemo as Ji,useRef as zm,useState as Xi}from"react";import{useEffect as Mm,useState as Em}from"react";import{jsx as eo,jsxs as Zi}from"react/jsx-runtime";function qi({table:e,controls:t,className:r}){let o=e.getSelectedRowModel().rows.length,[n,a]=Em(0);return Mm(()=>{o!==0&&a(o)},[o]),_e("Escape",()=>e.resetRowSelection(),{enabled:o>0,priority:2,modal:!1}),eo("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,children:Zi("div",{className:"flex h-11 items-center gap-2.5 px-2 py-2.5",children:[eo("div",{className:"flex w-6 items-center justify-center",children:eo(St,{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"})}),Zi("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:[n," selected"]}),eo("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 Qi,jsx as H,jsxs as me}from"react/jsx-runtime";var en=(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"]),Fm=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 L5(e){let{data:t,rowCount:r,columns:o,defaultColumn:n,columnPinning:a,pagination:d,onPaginationChange:l,getRowId:m,enableColumnResizing:c=!1,columnResizeMode:s="onChange"}=e,u=!!e.onRowSelectionChange||!!e.selectionControls,[p,f]=Xi(e.columnVisibility??{}),[g,b]=Xi(e.selectedRows??{}),w=zm(null);qt(()=>{if(!m||!t)return;let x=Object.entries(g);if(x.length>0){let S=x.filter(([I])=>t.find(y=>(m==null?void 0:m(y))===I));S.length!==x.length&&b(Object.fromEntries(S))}},[t,g,m]),qt(()=>{e.selectedRows&&!po(e.selectedRows,g)&&b(e.selectedRows??{})},[e.selectedRows]),qt(()=>{var x;(x=e.onRowSelectionChange)==null||x.call(e,k.getSelectedRowModel().rows)},[g]),qt(()=>{e.columnVisibility&&!po(e.columnVisibility,p)&&f(e.columnVisibility??{})},[e.columnVisibility]),qt(()=>{var x;(x=e.onColumnVisibilityChange)==null||x.call(e,p)},[p]);let P=Ji(()=>[...u?[{id:"select",enableHiding:!1,minSize:30,size:30,maxSize:30,header:({table:x})=>H("div",{className:"flex size-full items-center justify-center",children:H(St,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsAllRowsSelected()?!0:x.getIsSomeRowsSelected()?"indeterminate":!1,onCheckedChange:()=>x.toggleAllRowsSelected(),title:"Select all"})}),cell:({row:x,table:S})=>H("div",{className:"flex size-full items-center justify-center",children:H(St,{className:"border-border-default size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:x.getIsSelected(),onClick:I=>{let y=m==null?void 0:m(x.original),O=S.getRowModel().rows,R=w.current!==null?O.findIndex(T=>(m==null?void 0:m(T.original))===w.current):-1;if(I.shiftKey&&w.current!==null&&R!==-1){let T=x.index,L=Math.min(R,T),h=Math.max(R,T),v=O.slice(L,h+1).map(C=>m==null?void 0:m(C.original));S.setRowSelection(C=>{let M=y!==void 0&&((C==null?void 0:C[y])??!1);return{...C,...Object.fromEntries(v.map(A=>[A,!M]))}}),w.current=y??null}else x.toggleSelected(),w.current=y??null},title:"Select"})})}]:[],...o],[u,o]),k=Dm({data:t,rowCount:r,columns:P,defaultColumn:{minSize:120,size:0,maxSize:300,enableResizing:c,...n},getCoreRowModel:Im(),onPaginationChange:l,onColumnVisibilityChange:x=>f(x),onRowSelectionChange:b,state:{pagination:d,columnVisibility:p,columnPinning:{left:[],right:[],...a},rowSelection:g},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:m,enableColumnResizing:c,columnResizeMode:s});return{...e,columnVisibility:p,table:k,enableColumnResizing:c}}var Hm=Vm(function({row:t,onRowClick:r,onRowAuxClick:o,rowProps:n,cellRight:a,tdClassName:d,table:l}){let{className:m,...c}=n||{};return H("tr",{className:i("group/row",r&&"cursor-pointer select-none",l.getRowModel().rows.length>8&&t.index===l.getRowModel().rows.length-1&&"[&_td]:border-b-0",m),onClick:r?s=>{we(s)||r(t,s)}:void 0,onAuxClick:o?s=>{we(s)||o(t,s)}:void 0,"data-selected":t.getIsSelected(),...c,children:t.getVisibleCells().map(s=>H("td",{className:i(en(s.column.id,!!r),"text-content-default group",tn(s.column,t.index===l.getRowModel().rows.length-1),typeof d=="function"?d(s.column.id,t):d),style:{width:s.column.getSize(),...rn(s.column)},children:me("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Qo(s.column.columnDef.cell,s.getContext())}),a==null?void 0:a(s)]})},s.id))},t.id)},(e,t)=>{let r=e.row,o=t.row;return r.original===o.original&&r.getIsSelected()===o.getIsSelected()});function M5({data:e,loading:t,error:r,emptyState:o,cellRight:n,sortBy:a,sortOrder:d,onSortChange:l,sortableColumns:m=[],className:c,containerClassName:s,scrollWrapperClassName:u,emptyWrapperClassName:p,thClassName:f,tdClassName:g,table:b,pagination:w,resourceName:P,onRowClick:k,onRowAuxClick:x,onRowSelectionChange:S,selectionControls:I,rowProps:y,rowCount:O,children:R,enableColumnResizing:T=!1}){let L=!!S||!!I,h=Ji(()=>T?b.getVisibleLeafColumns().reduce((v,C)=>v+C.getSize(),0):"100%",[T,b.getVisibleLeafColumns()]);return me("div",{className:i("border-border-subtle bg-bg-default relative z-0 rounded-xl border",s),children:[!r&&!!(e!=null&&e.length)||t?me(Qi,{children:[L&&H(qi,{table:b,controls:I,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),me("div",{className:i("relative min-h-[400px] overflow-x-auto rounded-[inherit]",u),children:[me("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",T&&"[&_th]:group/resize"],c),style:{width:"100%",tableLayout:T?"fixed":"auto",minWidth:h},children:[H("thead",{className:"relative",children:b.getHeaderGroups().map(v=>H("tr",{children:v.headers.map(C=>{let M=m.includes(C.column.id),A=M?"button":"div";return me("th",{colSpan:C.colSpan,className:i(en(C.id),"text-content-emphasis select-none font-medium",tn(C.column,!b.getRowModel().rows.length),typeof f=="function"?f(C.column.id):f,T&&"relative"),style:{width:C.getSize(),...rn(C.column)},children:[H("div",{className:"flex items-center justify-between gap-6 !pr-0",children:me(A,{className:i("flex items-center gap-2",C.column.id==="select"&&"size-full"),...M&&{type:"button",disabled:!M,"aria-label":"Sort by column",onClick:()=>l==null?void 0:l({sortBy:C.column.id,sortOrder:a!==C.column.id||d==="asc"?"desc":"asc"})},children:[C.isPlaceholder?null:(()=>{var cr;let E=Qo(C.column.columnDef.header,C.getContext()),U=(cr=C.column.columnDef.meta)==null?void 0:cr.headerTooltip;return H(_m,{tooltip:U,children:E})})(),M&&a===C.column.id&&H(Vn,{className:"h-3 w-3 shrink-0",order:d||"desc"})]})}),T&&C.column.getCanResize()&&!["select","menu"].includes(C.column.id)&&H("div",{onMouseDown:C.getResizeHandler(),onTouchStart:C.getResizeHandler(),onClick:E=>E.stopPropagation(),className:Fm})]},C.id)})},v.id))}),H("tbody",{children:b.getRowModel().rows.map(v=>{let C=typeof y=="function"?y(v):y,{className:M,...A}=C||{};return T?H(Hm,{row:v,onRowClick:k,onRowAuxClick:x,rowProps:C,cellRight:n,tdClassName:g,table:b},`${v.id}-${b.getVisibleLeafColumns().map(E=>E.id).join(",")}`):H("tr",{className:i("group/row",k&&"cursor-pointer select-none",b.getRowModel().rows.length>8&&v.index===b.getRowModel().rows.length-1&&"[&_td]:border-b-0",M),onClick:k?E=>{we(E)||k(v,E)}:void 0,onAuxClick:x?E=>{we(E)||x(v,E)}:void 0,"data-selected":v.getIsSelected(),...A,children:v.getVisibleCells().map(E=>H("td",{className:i(en(E.column.id,!!k),"text-content-default group",tn(E.column,v.index===b.getRowModel().rows.length-1),typeof g=="function"?g(E.column.id,v):g),style:{minWidth:E.column.columnDef.minSize,maxWidth:E.column.columnDef.maxSize,width:E.column.columnDef.size||"auto",...rn(E.column)},children:me("div",{className:"flex w-full items-center justify-between overflow-hidden truncate",children:[H("div",{className:"min-w-0 shrink grow truncate",children:Qo(E.column.columnDef.cell,E.getContext())}),n==null?void 0:n(E)]})},E.id))},v.id)})})]}),R]})]}):H("div",{className:i("text-content-subtle flex h-96 w-full items-center justify-center text-sm",p),children:r||o||`No ${(P==null?void 0:P(!0))||"items"} found.`}),w&&!r&&!!(e!=null&&e.length)&&!!O&&me("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:[me("div",{children:[H("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",me("span",{className:"font-medium",children:[((w.pageIndex-1)*w.pageSize+1).toLocaleString(),"-",Math.min((w.pageIndex-1)*w.pageSize+w.pageSize,b.getRowCount()).toLocaleString()]})," ","of"," ",H("span",{className:"font-medium",children:b.getRowCount().toLocaleString()})," ",(P==null?void 0:P(b.getRowCount()!==1))||"items"]}),me("div",{className:"flex items-center gap-2",children:[H(te,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>b.previousPage(),disabled:w.pageIndex===1}),H(te,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>b.nextPage(),disabled:w.pageIndex===b.getPageCount()})]})]}),H(Am,{children:t&&H(Om.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(be,{})})})})]})}var tn=(e,t)=>{let r=e.getIsPinned();return i(r&&"bg-bg-default py-0",r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},rn=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"}};function _m({children:e,tooltip:t}){return t?H(q,{content:t,children:H("span",{className:"cursor-help underline decoration-dotted underline-offset-2",children:e})}):H(Qi,{children:e})}import{formatDuration as $m,intervalToDuration as Bm}from"date-fns";import{useEffect as Wm,useMemo as Um,useState as Gm}from"react";import{toast as es}from"sonner";import{jsx as Ye,jsxs as ts}from"react/jsx-runtime";var rs=24*60*60*1e3,Km=30*rs;function jm(){if(typeof Intl<"u")try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"Local"}catch{}return"Local"}function F5({timestamp:e,rows:t,interactive:r=!0,...o}){return!e||new Date(e).toString()==="Invalid Date"?o.children:Ye(q,{content:Ye(Ym,{timestamp:e,rows:t,interactive:r}),disableHoverableContent:!r,...o})}function Ym({timestamp:e,rows:t=["local","utc"],interactive:r}){if(!e)throw new Error("Falsy timestamp not permitted in TimestampTooltipContent");let o=new Date(e),n={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0},a=new Date().getTime()-o.getTime(),d=Bm({start:o,end:new Date}),l=$m(d,{delimiter:", ",format:["years","months","days",...a<Km?["hours",...a<rs?["minutes","seconds"]:[]]:[]]})+" ago",m=Um(()=>t.map(p=>({local:{label:jm(),shortLabel:new Date().toLocaleTimeString("en-US",{timeZoneName:"short"}).split(" ")[2],successMessageLabel:"local timestamp",value:o.toLocaleString("en-US",n)},utc:{label:"UTC",shortLabel:"UTC",successMessageLabel:"UTC timestamp",value:new Date(o.getTime()).toLocaleString("en-US",{...n,timeZone:"UTC"})},unix:{label:"UNIX Timestamp",successMessageLabel:"UNIX timestamp",value:(o.getTime()/1e3).toString(),valueMono:!0}})[p]),[t,o]),c=m.every(({shortLabel:p})=>p),[s,u]=Gm(0);return Wm(()=>{let p=setInterval(()=>u(f=>f+1),1e3);return()=>clearInterval(p)},[]),ts("div",{className:"flex max-w-[360px] flex-col gap-2 px-2.5 py-2 text-left text-xs",children:[a>0&&Ye("span",{className:"text-content-subtle cursor-default",children:l}),Ye("table",{children:Ye("tbody",{children:m.map((p,f)=>ts("tr",{className:i(r&&"before:bg-bg-emphasis relative select-none before:absolute before:-inset-x-1 before:inset-y-0 before:rounded before:opacity-0 before:content-[''] hover:cursor-copy hover:before:opacity-60 active:before:opacity-100"),onClick:r?async()=>{try{await navigator.clipboard.writeText(p.value),es.success(`Copied ${p.successMessageLabel} to clipboard`)}catch(g){es.error(`Failed to copy ${p.successMessageLabel} to clipboard`),console.error(`Failed to copy ${p.successMessageLabel} to clipboard`,g)}}:void 0,children:[Ye("td",{className:"relative py-0.5",children:Ye("span",{className:i("text-content-subtle truncate",c&&"bg-bg-inverted/10 rounded px-1 font-mono"),title:c?p.label:void 0,children:c?p.shortLabel:p.label})}),Ye("td",{className:i("text-content-default relative whitespace-nowrap py-0.5 pl-3",c&&"pl-2",p.valueMono&&"font-mono"),children:p.value})]},f))})})]})}import{LayoutGroup as Zm,motion as os}from"motion/react";import qm from"next/link";import{useId as Xm}from"react";import{jsx as to,jsxs as Jm}from"react/jsx-runtime";function U5({options:e,selected:t,selectAction:r,layout:o=!0,className:n,optionClassName:a,indicatorClassName:d,style:l}){let m=Xm();return to(Zm,{id:m,children:to(os.div,{layout:o,className:i("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",n),style:l,children:e.map(c=>{let s=c.value===t,u=c.href?qm:"button";return Jm(u,{...c.href?{href:c.href}:{type:"button"},"data-selected":s,className:i("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!s&&"hover:text-content-subtle z-[11] transition-colors",a),onClick:()=>r==null?void 0:r(c.value),children:[typeof c.label=="string"?to("p",{children:c.label}):c.label,c.badge,s&&to(os.div,{layoutId:m,className:i("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",d),transition:{duration:.25}})]},c.value)})})})}import{useEffect as Qm,useId as ep,useRef as tp,useState as rp}from"react";import{jsx as ve,jsxs as on}from"react/jsx-runtime";var op=[{key:"utm_source",icon:ua,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:Na,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:la,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:xa,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:ya,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:da,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function J5({values:e,onChange:t,disabled:r,autoFocus:o,disabledTooltip:n,className:a}){let{isMobile:d}=ee(),l=ep(),[m,c]=rp(!1),s=tp(null);return Qm(()=>{s.current&&!d&&o&&setTimeout(()=>{var u;return(u=s.current)==null?void 0:u.focus()},10)},[]),ve("div",{className:i("grid gap-y-3",a),children:op.map(({key:u,icon:p,label:f,placeholder:g,description:b},w)=>ve("div",{className:"group relative",children:on("div",{className:"relative z-10 flex",children:[ve(q,{content:on("div",{className:"p-3 text-center text-xs",children:[ve("p",{className:"text-neutral-600",children:b}),ve("span",{className:"font-mono text-neutral-400",children:u})]}),sideOffset:4,disableHoverableContent:!0,children:on("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:()=>c(P=>!P),children:[ve(p,{className:"size-4 shrink-0"}),ve("label",{htmlFor:`${l}-${u}`,className:"select-none text-sm",children:m?ve("span",{className:"font-mono text-xs",children:u}):f})]})}),ve("div",{className:"min-w-0 grow",children:ve(kt,{tooltipProps:n?{content:n,disableHoverableContent:!0}:void 0,children:ve("input",{type:"text",id:`${l}-${u}`,ref:w===0?s:void 0,placeholder:g,disabled:r||Boolean(n),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:P=>t(u,P.target.value)})})})]})},u))})}import{jsx as nn,jsxs as np}from"react/jsx-runtime";function ek(){return np("div",{style:ro.backgroundMain,children:[nn("div",{style:ro.backgroundMainBefore}),nn("div",{style:ro.backgroundMainAfter}),nn("div",{style:ro.backgroundContent})]})}var ro={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
65
|
radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
|
|
45
66
|
radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
|
|
46
67
|
radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
|
|
47
68
|
radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
|
|
48
69
|
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 dp}from"lucide-react";import mp from"next/image";import Be from"next/link";import{useParams as up}from"next/navigation";import{useState as pp}from"react";import{jsx as Mi}from"react/jsx-runtime";function _t({className:e}){return Mi("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:Mi("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 _r=[{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:mt,href:"/links"},{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:ut,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:dt,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:sn,href:"/integrations"}],Fo=[{icon:wa,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:ya,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:va,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:Na,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:xa,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],Ei=[{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:Tt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:Fo}],Ft=[{icon:lr,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:nr,title:"Docs",description:"Platform documentation",href:"/docs/introduction"},{icon:Tt,title:"About",description:"Company, values, and team",href:"/about"},{icon:Pa,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:Ba,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:Sa,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:_t,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:Ha,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],Di=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],Ai=[{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"}],Hw=[{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 Nu}from"react/jsx-runtime";function Fr({className:e,children:t}){return Nu("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Fe from"@radix-ui/react-popover";import{BoxSelect as Qu,Home as ep,LayoutGrid as tp,Type as rp}from"lucide-react";import{useParams as op}from"next/navigation";import{useCallback as ap,useContext as np,useState as ip}from"react";import{toast as sp}from"sonner";import*as de from"@radix-ui/react-navigation-menu";import{LayoutGroup as Vu}from"motion/react";import Gt from"next/link";import{useParams as Hu,usePathname as _u}from"next/navigation";import{createContext as Fu,useId as Bu}from"react";import Wu from"swr";import{Link as _i}from"@radix-ui/react-navigation-menu";import Fi from"next/image";import Bi from"next/link";import{Link2 as wu}from"lucide-react";import{jsx as q,jsxs as J}from"react/jsx-runtime";var Ii={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},at={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 Oi({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:[q("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"}),q("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),q("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:[q(wu,{className:"size-3 rotate-90"}),"d.to/try"]}),q("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),q("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:[q("div",{className:"size-2 rounded-sm border border-black/20 bg-current opacity-70",style:{color:Ii[t].color}}),q("div",{className:"text-content-subtle text-xs font-medium leading-none",children:Qt(t)})]}),J("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",Ii[t].value]})]},t))})]}),q("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:[q("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:at.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:[q(za,{className:"text-content-default size-3.5"}),at.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:[q("img",{src:`https://flag.vercel.app/m/${at.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),at.country]})]})]}),q("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:at.name}),q("div",{className:"text-content-subtle mt-px text-xs",children:at.email})]}),q("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(at.details).map(([t,r])=>J("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[q("span",{className:"text-content-muted truncate font-medium",children:t}),q("span",{className:"text-content-default",children:r})]},t))})]})})]})]})}import{useId as ku}from"react";import{jsx as v,jsxs as ce}from"react/jsx-runtime";function zi(e){let t=ku();return ce("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:[ce("defs",{children:[v("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),v("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),v("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),v("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),v("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),v("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),v("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),v("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"}),v("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:v("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),ce("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[v("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"}),v("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"})]}),v("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"}),ce("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[v("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),v("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),v("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:v("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),v("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"}),v("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"}),v("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:v("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"})}),v("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:v("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),v("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),v("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),v("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),v("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),v("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"}),v("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:v("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),ce("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[v("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"}),v("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"})]}),v("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"}),ce("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[v("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),v("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),v("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:v("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),v("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"}),v("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"}),v("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:v("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"})}),v("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:v("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),v("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"}),v("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"}),v("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),v("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),v("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"}),v("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:v("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),ce("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[v("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"}),v("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"})]}),v("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"}),ce("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[v("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),v("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),v("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:v("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),v("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"}),v("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"}),v("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:v("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"})}),v("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:v("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),ce("defs",{children:[v("clipPath",{id:`${t}-b`,children:v("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),v("clipPath",{id:`${t}-c`,children:v("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),v("clipPath",{id:`${t}-d`,children:v("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),v("clipPath",{id:`${t}-f`,children:v("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),v("clipPath",{id:`${t}-g`,children:v("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),v("clipPath",{id:`${t}-h`,children:v("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),v("clipPath",{id:`${t}-j`,children:v("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),v("clipPath",{id:`${t}-k`,children:v("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),v("clipPath",{id:`${t}-l`,children:v("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),ce("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[v("stop",{stopColor:"#030712",stopOpacity:"0"}),v("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),ce("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[v("stop",{stopColor:"#030712",stopOpacity:"0"}),v("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),ce("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[v("stop",{stopColor:"#030712",stopOpacity:"0"}),v("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as Pu,jsx as Le,jsxs as Bt}from"react/jsx-runtime";var Cu=[{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 Vi({className:e}){return Le("div",{className:i("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:Le("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:Cu.map((t,r)=>Le("div",{className:"h-[60px] w-[180px] p-[3px]",children:Le("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Bt(Pu,{children:[Le("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:[Le("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"}),Le("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),Le("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:[Le("span",{className:"text-content-muted text-[6px] font-medium",children:Qt(o)}),Bt("span",{className:"text-content-default text-[9px] font-medium",children:["$",ta(t[o])]})]},o))})]})]})})},r))})})}import{Link as Su}from"@radix-ui/react-navigation-menu";import Tu from"next/link";import{jsx as Wt,jsxs as Hi}from"react/jsx-runtime";var nt="text-xs uppercase text-neutral-500 dark:text-white/60",Ru="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",ke=({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 Wt(Su,{asChild:!0,children:Wt(Tu,{className:i(Ru,a),...c,children:Hi("div",{className:"flex items-center justify-between gap-3",children:[e,Hi("div",{className:"flex-1",children:[Wt("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&Wt("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),n&&Wt(ua,{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 V,jsxs as $t}from"react/jsx-runtime";var Lu=[{icon:V("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:V(mt,{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:V(zi,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:V("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:V(dt,{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:V(Oi,{className:"absolute bottom-0 left-0 size-full"})},{icon:V("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:V(ut,{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:V(Vi,{})}],Mu=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:V("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:V(Fi,{src:"https://assets.dub.co/misc/integrations-grid.png",alt:"",fill:!0})})},{title:"Dub API",description:"Unlock further capabilities",href:"/docs/api-reference/introduction",graphic:V("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:V(Fi,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function Wi({domain:e}){return $t("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[V("div",{className:"grid grid-cols-3 gap-4",children:Lu.map(({title:t,description:r,icon:o,href:a,color:n,graphicsContainerClassName:c,graphic:d})=>V(_i,{asChild:!0,children:$t(Bi,{href:F(a,e,ke({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:[V(Xe,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),$t("div",{className:"relative p-5 pb-0",children:[o,V("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),V("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),V("div",{className:"relative mt-10 h-40 grow",children:V("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",c),children:V("div",{className:"relative size-full",children:d})})}),V("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))}),V("div",{className:"grid grow grid-cols-2 gap-4",children:Mu.map(({title:t,description:r,href:o,graphic:a})=>V(_i,{asChild:!0,children:$t(Bi,{href:F(o,e,ke({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:[V(Xe,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),V("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:a}),V("div",{className:"relative flex items-center justify-between px-5 py-4",children:$t("div",{children:[V("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),V("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as Eu}from"@radix-ui/react-navigation-menu";import Du from"next/link";import{jsx as K,jsxs as it}from"react/jsx-runtime";var Au=[{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 Ui({domain:e}){return it("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[it("div",{className:"flex h-full flex-col p-4",children:[K("p",{className:i(nt,"mb-4 ml-2"),children:"Explore"}),K("div",{className:"grid grow grid-cols-2 gap-4",children:Au.map(({icon:t,title:r,description:o,href:a})=>K(Eu,{asChild:!0,children:it(Du,{href:F(a,e,ke({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:[it("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[K("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:K(Xe,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),K("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),K(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),it("div",{className:"relative",children:[K("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),K("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),it("div",{className:"px-6 py-4",children:[K("p",{className:i(nt,"mb-2"),children:"Company"}),K("div",{className:"flex flex-col gap-0.5",children:Ft.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>K(Ut,{className:"-mx-2",href:F(a,e,ke({domain:e,utm_content:r})),icon:K("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:K(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]}),it("div",{className:"px-6 py-4",children:[K("p",{className:i(nt,"mb-2"),children:"Updates"}),K("div",{className:"flex flex-col gap-0.5",children:Ft.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:a})=>K(Ut,{className:"-mx-2",href:F(a,e,ke({domain:e,utm_content:r})),icon:K("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2.5 dark:border-white/20 dark:bg-white/10",children:K(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},a))})]})]})}import{Link as Iu}from"@radix-ui/react-navigation-menu";import Ou from"next/link";import{jsx as te,jsxs as wt}from"react/jsx-runtime";var zu=[{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:Tt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function $i({domain:e}){return wt("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[wt("div",{className:"flex h-full flex-col p-4",children:[te("p",{className:i(nt,"mb-4 ml-2"),children:"Use case"}),te("div",{className:"grid grow grid-cols-3 gap-4",children:zu.map(({icon:t,title:r,description:o,href:a})=>te(Iu,{asChild:!0,children:wt(Ou,{href:F(a,e,ke({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:[wt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[te("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:te(Xe,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),te("div",{className:i("absolute -inset-[10%] opacity-10 blur-[50px] dark:brightness-150","bg-[conic-gradient(#F35066_0deg,#F35066_117deg,#9071F9_180deg,#5182FC_240deg,#F35066_360deg)]")})]}),te(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),wt("div",{className:"relative",children:[te("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),te("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),wt("div",{className:"px-6 py-4",children:[te("p",{className:i(nt,"mb-2"),children:"SDKs"}),te("div",{className:"flex flex-col gap-0.5",children:Fo.map(({icon:t,iconClassName:r,title:o,href:a})=>te(Ut,{className:"-mx-2",href:F(a,e,ke({domain:e,utm_content:o})),icon:te("div",{className:"shrink-0 rounded-[10px] border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:te(t,{className:i("size-5 text-neutral-600 transition-colors dark:text-white/60",r)})}),title:o,showArrow:!0},a))})]})]})}import{Fragment as Gu,jsx as U,jsxs as kt}from"react/jsx-runtime";var Bo=Fu({theme:"light"}),Wo=[{name:"Product",content:Wi,childItems:_r,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:$i,childItems:Ei,segments:["/solutions","/sdks"]},{name:"Resources",content:Ui,childItems:Ft,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"]}],Gi=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 j5({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Hu();t&&(o=t);let a=Bu(),n=Mn(40),c=_u(),{data:d,isLoading:m}=Wu(o.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return U(Bo.Provider,{value:{theme:e},children:U(Vu,{id:a,children:kt("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[U("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")}),U(Fr,{className:i("relative",r),children:kt("div",{className:"flex h-14 items-center justify-between",children:[U("div",{className:"grow basis-0",children:U(Gt,{className:"block w-fit py-2 pr-2",href:F("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:U(Br,{})})}),kt(de.Root,{delayDuration:0,className:"relative hidden lg:block",children:[U(de.List,{className:"group relative z-0 flex",children:Wo.map(({name:s,href:l,segments:u,content:p})=>{let f=u.some(b=>c==null?void 0:c.startsWith(b));return kt(de.Item,{children:[U($u,{trigger:!!p,children:l!==void 0?U(Gt,{id:`nav-${l}`,href:F(l,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:s}),className:Gi,"data-active":f,children:s}):kt("button",{className:Gi,"data-active":f,children:[s,U(Uu,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&U(de.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:U(p,{domain:o})})]},s)})}),U("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:U(de.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]")})})]}),U("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:d&&Object.keys(d).length>0?U(Gt,{href:Ce,className:i(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Dashboard"}):m?null:kt(Gu,{children:[U(Gt,{href:"https://app.dub.co/login",className:i(ie({variant:"secondary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white/10 dark:bg-black dark:text-white dark:hover:bg-neutral-900"),children:"Log in"}),U(Gt,{href:"https://app.dub.co/register",className:i(ie({variant:"primary"}),"flex h-8 items-center rounded-lg border px-4 text-sm","dark:border-white dark:bg-white dark:text-black dark:hover:bg-neutral-50 dark:hover:ring-white/10"),children:"Sign up"})]})})]})})]})})})}function Uu(e){return U("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:U("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 $u({trigger:e,children:t}){return e?U(de.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Ku,Menu as ju,X as Yu}from"lucide-react";import Ct from"next/link";import{useParams as Go}from"next/navigation";import{useEffect as Zu,useState as ji}from"react";import qu from"swr";import{Fragment as Ju,jsx as D,jsxs as Me}from"react/jsx-runtime";var Uo={"Dub Links":D("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:D(mt,{className:"size-3 text-orange-900"})}),"Dub Partners":D("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:D(ut,{className:"size-3 text-violet-900"})}),"Dub Analytics":D("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:D(dt,{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 l6({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=Go();t&&(r=t);let[o,a]=ji(!1);Zu(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:n,isLoading:c}=qu(r.endsWith("dub.co")&&"/api/auth/session",be,{dedupingInterval:6e4});return Me("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($o,{href:Ce,className:"max-[280px]:hidden",children:"Dashboard"}):c?null:Me("div",{className:"flex gap-2 max-[280px]:hidden",children:[D($o,{variant:"secondary",href:`${Ce}/login`,children:"Log in"}),D($o,{href:`${Ce}/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(Yu,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):D(ju,{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:Me("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[Wo.map(({name:d,href:m,childItems:s},l)=>D(Xu,{name:d,href:m,childItems:s,setOpen:a},l)),n&&Object.keys(n).length>0?D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:Ce,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):Me(Ju,{children:[D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:`${Ce}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),D("li",{className:"py-3 min-[281px]:hidden",children:D(Ct,{href:`${Ce}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Xu=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:a="dub.co"}=Go(),[n,c]=ji(!1);return r?D("li",{className:"py-3",children:Me(fe,{height:!0,children:[Me("button",{className:"flex w-full justify-between",onClick:()=>c(!n),children:[D("p",{className:"font-semibold",children:e}),D(Ku,{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((d,m)=>"items"in d?Me("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:d.label}),d.items.map((s,l)=>D(Ki,{item:s,setOpen:o,size:"small"},l))]},m):D(Ki,{item:d,setOpen:o},m))})]})}):t?D("li",{className:"py-3",children:D(Ct,{href:F(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},Ki=({item:{title:e,description:t,href:r,icon:o},setOpen:a,size:n="normal"})=>{let{domain:c="dub.co"}=Go(),d=Uo==null?void 0:Uo[e];return Me(Ct,{href:F(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:d??D(o,{className:i("size-5 text-neutral-700 grayscale",n==="small"&&"size-4")})}),Me("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 $o({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]",ie({variant:e}),t)})}import{jsx as Yi}from"react/jsx-runtime";function Zi({className:e}){return Yi("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:Yi("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 X,jsxs as qi}from"react/jsx-runtime";var lp=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
70
|
+
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 Yp}from"lucide-react";import Zp from"next/image";import qe from"next/link";import{useParams as qp}from"next/navigation";import{useState as Xp}from"react";import{jsx as ns}from"react/jsx-runtime";function Xt({className:e}){return ns("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:ns("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 oo=[{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:ht,href:"/links"},{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:vt,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:bt,href:"/analytics"},{id:"api",title:"Dub API",description:"Programmatic link creation at scale",icon:mr,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:Ta,href:"/integrations"}],an=[{icon:Wn,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:$n,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:Hn,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:Bn,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:_n,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],as=[{icon:xr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:wr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:zt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{label:"SDKs",items:an}],Jt=[{icon:yr,title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:hr,title:"Docs",description:"Platform documentation",href:"/docs"},{icon:zt,title:"About",description:"Company, values, and team",href:"/about"},{icon:Kn,title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:sa,title:"Blog",description:"Insights and stories",href:"/blog"},{icon:jn,title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:Xt,title:"Brand Guidelines",description:"Logos, wordmark, etc.",href:"/brand"},{icon:na,title:"Contact",description:"Reach out to support or sales",href:"/contact"}],is=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],ss=[{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"}],sk=[{name:"X (Twitter)",icon:gr,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:fr,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:pr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:br,href:"https://www.youtube.com/@dubdotco"}];import{jsx as ap}from"react/jsx-runtime";function no({className:e,children:t}){return ap("div",{className:i("mx-auto w-full max-w-screen-xl px-3 lg:px-10",e),children:t})}import*as Ze from"@radix-ui/react-popover";import{BoxSelect as zp,Home as Fp,LayoutGrid as Hp,Type as _p}from"lucide-react";import{useParams as $p}from"next/navigation";import{useCallback as Bp,useContext as Wp,useState as Up}from"react";import{toast as Gp}from"sonner";import*as fe from"@radix-ui/react-navigation-menu";import{LayoutGroup as wp}from"motion/react";import or from"next/link";import{useParams as Np,usePathname as kp}from"next/navigation";import{createContext as Cp,useId as Pp}from"react";import Sp from"swr";import{Link as ps}from"@radix-ui/react-navigation-menu";import fs from"next/image";import gs from"next/link";import{Link2 as ip}from"lucide-react";import{jsx as X,jsxs as Q}from"react/jsx-runtime";var ls={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},dt={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 cs({className:e}){return Q("div",{className:i("pointer-events-none relative size-full",e),children:[Q("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:[X("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"}),X("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),X("circle",{cx:"259.333",cy:"72",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"})]}),Q("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[Q("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[Q("div",{className:"p-1.5",children:[Q("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:[X(ip,{className:"size-3 rotate-90"}),"d.to/try"]}),X("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),X("div",{className:"border-border-default flex flex-col gap-2 border-t p-3",children:["clicks","leads","sales"].map(t=>Q("div",{className:"flex items-center justify-between gap-2",children:[Q("div",{className:"flex items-center gap-2",children:[X("div",{className:"size-2 rounded-sm border border-black/20 bg-current opacity-70",style:{color:ls[t].color}}),X("div",{className:"text-content-subtle text-xs font-medium leading-none",children:ur(t)})]}),Q("span",{className:"text-content-emphasis text-xs leading-none",children:[t==="sales"?"$":"",ls[t].value]})]},t))})]}),X("div",{className:"relative",children:Q("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[Q("div",{className:"px-3 py-2.5",children:[Q("div",{className:"flex justify-between gap-2",children:[X("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:dt.avatarIndex*100+"%"}}),Q("div",{className:"flex flex-col items-end gap-1",children:[Q("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:[X(ra,{className:"text-content-default size-3.5"}),dt.origin]}),Q("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:[X("img",{src:`https://flag.vercel.app/m/${dt.country}.svg`,className:"relative h-2.5 w-3 rounded-sm"}),dt.country]})]})]}),X("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:dt.name}),X("div",{className:"text-content-subtle mt-px text-xs",children:dt.email})]}),X("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(dt.details).map(([t,r])=>Q("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[X("span",{className:"text-content-muted truncate font-medium",children:t}),X("span",{className:"text-content-default",children:r})]},t))})]})})]})]})}import{useId as sp}from"react";import{jsx as N,jsxs as pe}from"react/jsx-runtime";function ds(e){let t=sp();return pe("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:[pe("defs",{children:[N("path",{id:`${t}-m`,className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),N("path",{id:`${t}-n`,className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),N("path",{id:`${t}-o`,className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),N("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),N("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),N("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:`url(#${t}-a)`,rx:"12.44"}),N("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),N("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"}),N("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:N("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),pe("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-b)`,children:[N("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"}),N("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"})]}),N("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"}),pe("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-c)`,children:[N("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),N("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),N("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:N("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),N("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"}),N("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"}),N("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-d)`,children:N("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"})}),N("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:N("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),N("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),N("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),N("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:`url(#${t}-e)`,rx:"12.44"}),N("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),N("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"}),N("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:N("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),pe("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-f)`,children:[N("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"}),N("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"})]}),N("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"}),pe("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-g)`,children:[N("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),N("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),N("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:N("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),N("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"}),N("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"}),N("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-h)`,children:N("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"})}),N("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:N("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),N("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"}),N("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"}),N("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:`url(#${t}-i)`,rx:"12.44"}),N("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),N("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"}),N("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:N("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),pe("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-j)`,children:[N("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"}),N("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"})]}),N("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"}),pe("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-k)`,children:[N("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),N("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),N("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:N("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),N("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"}),N("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"}),N("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:`url(#${t}-l)`,children:N("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"})}),N("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:N("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),pe("defs",{children:[N("clipPath",{id:`${t}-b`,children:N("use",{xlinkHref:`#${t}-m`,transform:"translate(80.34 16.83)"})}),N("clipPath",{id:`${t}-c`,children:N("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 34.02)"})}),N("clipPath",{id:`${t}-d`,children:N("use",{xlinkHref:`#${t}-o`,transform:"translate(204.68 24.15)"})}),N("clipPath",{id:`${t}-f`,children:N("use",{xlinkHref:`#${t}-m`,transform:"translate(122.34 76.83)"})}),N("clipPath",{id:`${t}-g`,children:N("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 94.02)"})}),N("clipPath",{id:`${t}-h`,children:N("use",{xlinkHref:`#${t}-o`,transform:"translate(210.68 84.15)"})}),N("clipPath",{id:`${t}-j`,children:N("use",{xlinkHref:`#${t}-m`,transform:"translate(98.34 136.83)"})}),N("clipPath",{id:`${t}-k`,children:N("use",{xlinkHref:`#${t}-n`,transform:"translate(52.3 154.02)"})}),N("clipPath",{id:`${t}-l`,children:N("use",{xlinkHref:`#${t}-o`,transform:"translate(207.68 144.15)"})}),pe("linearGradient",{id:`${t}-a`,x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[N("stop",{stopColor:"#030712",stopOpacity:"0"}),N("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),pe("linearGradient",{id:`${t}-e`,x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[N("stop",{stopColor:"#030712",stopOpacity:"0"}),N("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),pe("linearGradient",{id:`${t}-i`,x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[N("stop",{stopColor:"#030712",stopOpacity:"0"}),N("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})}import{Fragment as cp,jsx as Ve,jsxs as Qt}from"react/jsx-runtime";var lp=[{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 us({className:e}){return Ve("div",{className:i("pointer-events-none relative size-full dark:opacity-80",e),"aria-hidden":!0,children:Ve("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:lp.map((t,r)=>Ve("div",{className:"h-[60px] w-[180px] p-[3px]",children:Ve("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:t&&Qt(cp,{children:[Ve("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),Qt("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[Qt("div",{className:"flex items-center gap-1.5",children:[Ve("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"}),Ve("span",{className:"text-content-default text-[9px] font-medium",children:t.name})]}),Ve("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((o,n)=>Qt("div",{className:i("flex flex-col",n===0?"pr-4":"pl-4"),children:[Ve("span",{className:"text-content-muted text-[6px] font-medium",children:ur(o)}),Qt("span",{className:"text-content-default text-[9px] font-medium",children:["$",wn(t[o])]})]},o))})]})]})})},r))})})}import{Link as dp}from"@radix-ui/react-navigation-menu";import up from"next/link";import{jsx as er,jsxs as ms}from"react/jsx-runtime";var ut="text-xs uppercase text-neutral-500 dark:text-white/60",mp="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",Re=({domain:e,...t})=>({utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:e,...t});function tr({icon:e,title:t,description:r,descriptionLines:o=1,className:n,showArrow:a,...d}){return er(dp,{asChild:!0,children:er(up,{className:i(mp,n),...d,children:ms("div",{className:"flex items-center justify-between gap-3",children:[e,ms("div",{className:"flex-1",children:[er("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:t}),r&&er("p",{className:i("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][o-1]),children:r})]}),a&&er(Dn,{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 B,jsxs as rr}from"react/jsx-runtime";var pp=[{icon:B("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:B(ht,{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:B(ds,{className:"absolute left-0 top-0 h-auto w-full"})},{icon:B("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:B(bt,{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:B(cs,{className:"absolute bottom-0 left-0 size-full"})},{icon:B("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:B(vt,{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:B(us,{})}],fp=[{title:"Dub Integrations",description:"Enhance your short links",href:"/integrations",graphic:B("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:B(fs,{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:B("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:B(fs,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}];function bs({domain:e}){return rr("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[B("div",{className:"grid grid-cols-3 gap-4",children:pp.map(({title:t,description:r,icon:o,href:n,color:a,graphicsContainerClassName:d,graphic:l})=>B(ps,{asChild:!0,children:rr(gs,{href:W(n,e,Re({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:[B(ot,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),rr("div",{className:"relative p-5 pb-0",children:[o,B("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:t}),B("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:r})]}),B("div",{className:"relative mt-10 h-40 grow",children:B("div",{className:i("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",d),children:B("div",{className:"relative size-full",children:l})})}),B("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":a}})]})},t))}),B("div",{className:"grid grow grid-cols-2 gap-4",children:fp.map(({title:t,description:r,href:o,graphic:n})=>B(ps,{asChild:!0,children:rr(gs,{href:W(o,e,Re({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:[B(ot,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-39,-49]}),B("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:n}),B("div",{className:"relative flex items-center justify-between px-5 py-4",children:rr("div",{children:[B("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:t}),B("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:r})]})})]})},t))})]})}import{Link as gp}from"@radix-ui/react-navigation-menu";import bp from"next/link";import{jsx as Y,jsxs as mt}from"react/jsx-runtime";var hp=[{icon:yr,title:"Help Center",description:"Answers to your questions",thumbnail:"https://assets.dub.co/misc/help-thumbnail.jpg",href:"/help"},{icon:hr,title:"Docs",description:"Platform documentation",thumbnail:"https://assets.dub.co/misc/docs-thumbnail.jpg",href:"/docs"}];function hs({domain:e}){return mt("div",{className:"grid w-[1020px] grid-cols-[0.9fr,0.55fr,0.55fr] divide-x divide-neutral-200 dark:divide-white/20",children:[mt("div",{className:"flex h-full flex-col p-4",children:[Y("p",{className:i(ut,"mb-4 ml-2"),children:"Explore"}),Y("div",{className:"grid grow grid-cols-2 gap-4",children:hp.map(({icon:t,title:r,description:o,href:n})=>Y(gp,{asChild:!0,children:mt(bp,{href:W(n,e,Re({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:[mt("div",{className:"absolute inset-0 opacity-0 transition-opacity duration-150 group-hover:opacity-100",children:[Y("div",{className:"absolute -inset-[25%] -skew-y-12 [mask-image:linear-gradient(225deg,black,transparent_50%)]",children:Y(ot,{cellSize:46,patternOffset:[0,-14],className:"translate-y-2 text-[#ad1f3288] transition-transform duration-150 ease-out group-hover:translate-y-0"})}),Y("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)]")})]}),Y(t,{className:"relative size-5 text-neutral-700 dark:text-white/60"}),mt("div",{className:"relative",children:[Y("span",{className:"text-sm font-medium text-neutral-900 dark:text-white",children:r}),Y("p",{className:"mt-2 text-xs text-neutral-500 dark:text-white/60",children:o})]})]},r)},r))})]}),mt("div",{className:"px-6 py-4",children:[Y("p",{className:i(ut,"mb-2"),children:"Company"}),Y("div",{className:"flex flex-col gap-0.5",children:Jt.filter(({title:t})=>["About","Careers","Brand Guidelines","Contact"].includes(t)).map(({icon:t,title:r,description:o,href:n})=>Y(tr,{className:"-mx-2",href:W(n,e,Re({domain:e,utm_content:r})),icon:Y("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:Y(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},n))})]}),mt("div",{className:"px-6 py-4",children:[Y("p",{className:i(ut,"mb-2"),children:"Updates"}),Y("div",{className:"flex flex-col gap-0.5",children:Jt.filter(({title:t})=>["Blog","Changelog"].includes(t)).map(({icon:t,title:r,description:o,href:n})=>Y(tr,{className:"-mx-2",href:W(n,e,Re({domain:e,utm_content:r})),icon:Y("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:Y(t,{className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:r,description:o},n))})]})]})}import{Link as vp}from"@radix-ui/react-navigation-menu";import xp from"next/link";import{jsx as re,jsxs as It}from"react/jsx-runtime";var yp=[{icon:xr,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:wr,title:"Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{icon:zt,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"}];function vs({domain:e}){return It("div",{className:"grid w-[1020px] grid-cols-[minmax(0,1fr),0.4fr] divide-x divide-neutral-200 dark:divide-white/20",children:[It("div",{className:"flex h-full flex-col p-4",children:[re("p",{className:i(ut,"mb-4 ml-2"),children:"Use case"}),re("div",{className:"grid grow grid-cols-3 gap-4",children:yp.map(({icon:t,title:r,description:o,href:n})=>re(vp,{asChild:!0,children:It(xp,{href:W(n,e,Re({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:[It("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(ot,{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"}),It("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))})]}),It("div",{className:"px-6 py-4",children:[re("p",{className:i(ut,"mb-2"),children:"SDKs"}),re("div",{className:"flex flex-col gap-0.5",children:an.map(({icon:t,iconClassName:r,title:o,href:n})=>re(tr,{className:"-mx-2",href:W(n,e,Re({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},n))})]})]})}import{Fragment as Lp,jsx as K,jsxs as Dt}from"react/jsx-runtime";var sn=Cp({theme:"light"}),ln=[{name:"Product",content:bs,childItems:oo,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:vs,childItems:as,segments:["/solutions","/sdks"]},{name:"Resources",content:hs,childItems:Jt,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"]}],xs=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 b6({theme:e="light",staticDomain:t,maxWidthWrapperClassName:r}){let{domain:o="dub.co"}=Np();t&&(o=t);let n=Pp(),a=Qa(40),d=kp(),{data:l,isLoading:m}=Sp(o.endsWith("dub.co")&&"/api/auth/session",ye,{dedupingInterval:6e4});return K(sn.Provider,{value:{theme:e},children:K(wp,{id:n,children:Dt("div",{className:i("sticky inset-x-0 top-0 z-30 w-full transition-all",e==="dark"&&"dark"),children:[K("div",{className:i("absolute inset-0 block border-b border-transparent transition-all",a&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),K(no,{className:i("relative",r),children:Dt("div",{className:"flex h-14 items-center justify-between",children:[K("div",{className:"grow basis-0",children:K(or,{className:"block w-fit py-2 pr-2",href:W("/home",o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:"Logo"}),children:K(ao,{})})}),Dt(fe.Root,{delayDuration:0,className:"relative hidden lg:block",children:[K(fe.List,{className:"group relative z-0 flex",children:ln.map(({name:c,href:s,segments:u,content:p})=>{let f=u.some(g=>d==null?void 0:d.startsWith(g));return Dt(fe.Item,{children:[K(Rp,{trigger:!!p,children:s!==void 0?K(or,{id:`nav-${s}`,href:W(s,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:c}),className:xs,"data-active":f,children:c}):Dt("button",{className:xs,"data-active":f,children:[c,K(Tp,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),p&&K(fe.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:K(p,{domain:o})})]},c)})}),K("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:K(fe.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]")})})]}),K("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:l&&Object.keys(l).length>0?K(or,{href:Le,className:i(ce({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:Dt(Lp,{children:[K(or,{href:"https://app.dub.co/login",className:i(ce({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"}),K(or,{href:"https://app.dub.co/register",className:i(ce({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 Tp(e){return K("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:K("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 Rp({trigger:e,children:t}){return e?K(fe.Trigger,{asChild:!0,children:t}):t}import{ChevronDown as Mp,Menu as Ep,X as Ip}from"lucide-react";import At from"next/link";import{useParams as un}from"next/navigation";import{useEffect as Dp,useState as ws}from"react";import Ap from"swr";import{Fragment as Vp,jsx as V,jsxs as ze}from"react/jsx-runtime";var cn={"Dub Links":V("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:V(ht,{className:"size-3 text-orange-900"})}),"Dub Partners":V("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:V(vt,{className:"size-3 text-violet-900"})}),"Dub Analytics":V("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:V(bt,{className:"size-3 text-green-900"})}),"Dub API":V("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:V(mr,{className:"size-3 text-neutral-900"})})};function E6({theme:e="light",staticDomain:t}){let{domain:r="dub.co"}=un();t&&(r=t);let[o,n]=ws(!1);Dp(()=>{o?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[o]);let{data:a,isLoading:d}=Ap(r.endsWith("dub.co")&&"/api/auth/session",ye,{dedupingInterval:6e4});return ze("div",{className:i("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden",e==="dark"&&"dark"),children:[a&&Object.keys(a).length>0?V(dn,{href:Le,className:"max-[280px]:hidden",children:"Dashboard"}):d?null:ze("div",{className:"flex gap-2 max-[280px]:hidden",children:[V(dn,{variant:"secondary",href:`${Le}/login`,children:"Log in"}),V(dn,{href:`${Le}/register`,children:"Sign Up"})]}),V("button",{onClick:()=>n(!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?V(Ip,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):V(Ep,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),V("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:ze("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[ln.map(({name:l,href:m,childItems:c},s)=>V(Op,{name:l,href:m,childItems:c,setOpen:n},s)),a&&Object.keys(a).length>0?V("li",{className:"py-3 min-[281px]:hidden",children:V(At,{href:Le,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):ze(Vp,{children:[V("li",{className:"py-3 min-[281px]:hidden",children:V(At,{href:`${Le}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),V("li",{className:"py-3 min-[281px]:hidden",children:V(At,{href:`${Le}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var Op=({name:e,href:t,childItems:r,setOpen:o})=>{let{domain:n="dub.co"}=un(),[a,d]=ws(!1);return r?V("li",{className:"py-3",children:ze(de,{height:!0,children:[ze("button",{className:"flex w-full justify-between",onClick:()=>d(!a),children:[V("p",{className:"font-semibold",children:e}),V(Mp,{className:i("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",a&&"rotate-180")})]}),a&&V("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:r.map((l,m)=>"items"in l?ze("div",{className:"grid grid-cols-1 gap-3",children:[V("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:l.label}),l.items.map((c,s)=>V(ys,{item:c,setOpen:o,size:"small"},s))]},m):V(ys,{item:l,setOpen:o},m))})]})}):t?V("li",{className:"py-3",children:V(At,{href:W(t,n,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:n,utm_content:e}),onClick:()=>o(!1),className:"flex w-full font-semibold capitalize",children:e})}):null},ys=({item:{title:e,description:t,href:r,icon:o},setOpen:n,size:a="normal"})=>{let{domain:d="dub.co"}=un(),l=cn==null?void 0:cn[e];return ze(At,{href:W(r,d,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:d,utm_content:e}),onClick:()=>n(!1),className:"flex w-full items-center gap-3",children:[V("div",{className:i("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100",a==="small"&&"size-8"),children:l??V(o,{className:i("size-5 text-neutral-700 grayscale",a==="small"&&"size-4")})}),ze("div",{children:[V("div",{className:"flex items-center gap-2",children:V("h2",{className:"text-sm font-medium text-neutral-900",children:e})}),t&&V("p",{className:"text-sm text-neutral-500",children:t})]})]})};function dn({variant:e,className:t,...r}){return V(At,{...r,className:i("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",ce({variant:e}),t)})}import{jsx as Ns}from"react/jsx-runtime";function ks({className:e}){return Ns("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:Ns("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 J,jsxs as Cs}from"react/jsx-runtime";var Kp=`<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
50
71
|
<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
|
-
</svg>`,
|
|
72
|
+
</svg>`,jp=`<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
52
73
|
<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 Br({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=op(),{theme:a}=np(Bo),[n,c]=ip(!1),d=ap(l=>{l.preventDefault(),c(!0)},[]),[,m]=bt();function s(l){sp.promise(m(l),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return qi(Fe.Root,{open:n,onOpenChange:c,children:[X(Fe.Anchor,{asChild:!0,children:X("div",{onContextMenu:d,className:"max-w-fit",children:e==="full"?X(Zi,{className:r}):X(_t,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),X(Fe.Portal,{children:X(Fe.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:qi("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:[X(Kt,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>s(lp),icon:X(_t,{className:"h-4 w-4"})}),X(Kt,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>s(cp),icon:X(rp,{strokeWidth:2,className:"h-4 w-4"})}),X(Kt,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:X(Qu,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?X(Kt,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:X(ep,{strokeWidth:2,className:"h-4 w-4"})}):X(Kt,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:X(tp,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function Kt({className:e,...t}){return X(ee,{className:i("h-9 justify-start px-3 font-medium hover:text-neutral-700 dark:text-white/70 dark:hover:bg-white/[0.15] dark:hover:text-white",e),...t})}import{jsx as A,jsxs as $}from"react/jsx-runtime";var fp=[{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"}],jt={product:[..._r.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:Di.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`,product:"links"})).concat(["Rewardful","PartnerStack","FirstPromoter","Tolt"].map(e=>({name:e,href:e==="Rewardful"?"/blog/dub-vs-rewardful":`/help/article/migrating-from-${e.toLowerCase()}`,product:"partners"})))},Yt="text-sm font-medium text-neutral-900",Zt="flex flex-col mt-2.5 gap-3.5",st="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function _6({staticDomain:e,className:t}){let{domain:r="dub.co"}=up();e&&(r=e);let[o,a]=pp(!1);return A(Fr,{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:[A("div",{className:"grow",children:$(Be,{href:F("/",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"]}),A(Br,{className:"h-8 text-neutral-800"})]})}),A("div",{className:"flex items-center gap-3",children:fp.map(({name:n,icon:c,href:d})=>$("a",{href:d,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[A("span",{className:"sr-only",children:n}),A(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:[A("h3",{className:Yt,children:"Product"}),A("ul",{role:"list",className:Zt,children:jt.product.map(n=>A("li",{children:$(Be,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:st,children:[n.id&&A(Zr,{product:n.id}),n.name]})},n.name))})]}),$("div",{children:[A("h3",{className:Yt,children:"Solutions"}),A("ul",{role:"list",className:Zt,children:jt.solutions.map(n=>A("li",{children:A(Be,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:st,children:n.name})},n.name))})]})]}),$("div",{className:"mt-10 md:mt-0",children:[A("h3",{className:Yt,children:"Resources"}),A("ul",{role:"list",className:Zt,children:jt.resources.map(n=>A("li",{children:$(Be,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),target:n.target,className:i(st,"gap-1"),children:[n.name,n.target&&A(tn,{className:"size-3.5"})]})},n.name))})]})]}),$("div",{className:"md:grid md:grid-cols-2",children:[A("div",{className:"grid gap-8",children:$("div",{children:[A("h3",{className:Yt,children:"Company"}),$("ul",{role:"list",className:Zt,children:[jt.company.map(n=>A("li",{children:A(Be,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(st,"gap-1"),children:n.name})},n.name)),A("li",{className:"-mt-1",children:A(xe,{content:A("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:Ai.map(n=>A(Be,{href:F(`/legal/${n.slug}`,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:i(Ro({variant:"default"}),st,"justify-start font-normal"),children:n.name},n.name))}),openPopover:o,setOpenPopover:a,children:$("button",{className:st,children:["Legal",A(dp,{className:"size-3.5"})]})})})]})]})}),$("div",{className:"mt-10 md:mt-0",children:[A("h3",{className:Yt,children:"Compare"}),A("ul",{role:"list",className:Zt,children:jt.compare.map(n=>A("li",{children:$(Be,{href:F(n.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:n.name}),className:st,children:[A(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:[A(Jn,{}),A(Be,{href:F("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:A(mp,{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 gp from"next/image";import{memo as bp,useEffect as hp,useState as Xi}from"react";import{jsx as vp}from"react/jsx-runtime";var Ji=bp(e=>{let[t,r]=Xi(!0),[o,a]=Xi(e.src);hp(()=>a(e.src),[e.src]);let n=c=>{r(!1);let d=c.target;d.naturalWidth<=16&&d.naturalHeight<=16&&a(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return vp(gp,{...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{AnimatePresence as xp,motion as yp}from"motion/react";import{useEffect as Np,useState as wp}from"react";import{jsx as Qi}from"react/jsx-runtime";var es=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[a,n]=wp(!1);Np(()=>{n(!0)},[]);let c=r?yp.div:"div";return Qi(xp,{children:a?Qi(c,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as kp}from"class-variance-authority";import{toast as Cp}from"sonner";import{jsx as Ko,jsxs as Sp}from"react/jsx-runtime";var Pp=kp("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 r9({variant:e="default",value:t,className:r,icon:o,successMessage:a}){let[n,c]=bt(),d=o||ma;return Sp("button",{onClick:m=>{m.stopPropagation(),Cp.promise(c(t),{success:a||"Copied to clipboard!"})},className:i(Pp({variant:e}),r),type:"button",children:[Ko("span",{className:"sr-only",children:"Copy"}),n?Ko(ha,{className:"h-3.5 w-3.5"}):Ko(d,{className:"h-3.5 w-3.5"})]})}import{toast as Tp}from"sonner";import{jsx as Rp}from"react/jsx-runtime";function s9({value:e,children:t,className:r,successMessage:o}){let[a,n]=bt();return Rp("button",{onClick:c=>{c.stopPropagation(),Tp.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 Lp,jsxs as Mp}from"react/jsx-runtime";function c9({icon:e,text:t}){return Mp("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,Lp("p",{className:"truncate text-sm",children:t})]})}import{jsx as Ep}from"react/jsx-runtime";var m9=({children:e})=>Ep("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as jo}from"react/jsx-runtime";function b9({apexDomain:e,className:t,imageProps:r}){return e?jo(Ji,{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}):jo("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:jo(Ka,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as ts}from"lucide-react";import{useSearchParams as Dp}from"next/navigation";import{useEffect as Ap,useMemo as Ip,useRef as Op}from"react";import zp from"swr";import{useDebounce as Vp}from"use-debounce";import{Fragment as rs,jsx as j,jsxs as We}from"react/jsx-runtime";function S9({defaultUrl:e}){let t=Dp(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=Vp(ea(r),500),a=Ip(()=>sa(o||""),[o]),{data:n,isValidating:c}=zp(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,be,{revalidateOnFocus:!1}),{title:d,description:m,image:s}=n||{},l=Op(null);Ap(()=>{!e&&l.current&&l.current.select()},[e]);let{isMobile:u}=Q();return We(rs,{children:[!e&&We("div",{className:"relative flex items-center",children:[j(ts,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("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"})]}),We("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[c&&j("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:j(St,{})}),s?j("img",{src:s,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):We("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[j(fa,{className:"h-8 w-8 text-neutral-400"}),j("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),We("div",{className:"grid gap-1 bg-white p-3 text-left",children:[a?j("p",{className:"text-sm text-[#536471]",children:a}):j("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),d?j("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:d}):j("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?j("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):We("div",{className:"grid gap-2",children:[j("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),j("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function T9({defaultUrl:e}){return We(rs,{children:[We("div",{className:"relative flex items-center",children:[j(ts,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),j("input",{name:"url",id:"url",type:"url",disabled:!0,className:"block w-full rounded-md border-neutral-200 pl-10 text-sm text-neutral-900 placeholder-neutral-400 shadow-lg focus:border-neutral-500 focus:outline-none focus:ring-neutral-500",placeholder:"Enter your URL",defaultValue:e||"https://github.com/dubinc/dub"})]}),j("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:j("div",{className:"absolute flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:j(St,{})})})]})}var L9={hidden:{scale:.8,opacity:0},show:{scale:1,opacity:1,transition:{type:"spring"}}},M9={hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:{duration:.4,type:"spring"}}},E9={initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2,type:"easeInOut"}};import os from"js-cookie";import{AnimatePresence as Hp}from"motion/react";import{createContext as _p,useState as Fp}from"react";import{jsx as Yo}from"react/jsx-runtime";var Bp=_p({hidePopup:()=>{}});function H9({children:e,hiddenCookieId:t}){let[r,o]=Fp(os.get(t)==="1"),a=()=>{o(!0),os.set(t,"1")};return Yo(es,{children:Yo(Bp.Provider,{value:{hidePopup:a},children:Yo(Hp,{children:!r&&e})})})}import{motion as Wp}from"motion/react";import{jsx as as}from"react/jsx-runtime";function W9({value:e=0,max:t=100,className:r}){return as("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:as(Wp.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 is}from"class-variance-authority";import{LayoutGroup as Up,motion as $p}from"motion/react";import Gp from"next/link";import{useId as Kp}from"react";import{jsx as qt,jsxs as ns}from"react/jsx-runtime";var jp=is("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"}}),Yp=is("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function Q9({variant:e,options:t,selected:r,onSelect:o,className:a}){let n=Kp();return qt("div",{className:i("flex text-sm",a),children:qt(Up,{id:n,children:t.map(({id:c,label:d,href:m,target:s})=>{let l=c===r;return ns(m?Gp:"div",{className:"relative",href:m??"#",target:s??void 0,children:[ns("button",{type:"button",...o&&!m&&{onClick:()=>o(c)},className:i(jp({variant:e}),s==="_blank"&&"group flex items-center gap-1.5"),"data-selected":l,"aria-selected":l,children:[d,s==="_blank"&&qt(ka,{className:"size-2.5"})]}),l&&qt($p.div,{layoutId:"indicator",transition:{duration:.1},className:Yp({variant:e}),children:qt("div",{className:"h-0.5 rounded-t-full bg-current"})})]},c)})})})}import{jsx as Zo,jsxs as ss}from"react/jsx-runtime";var Zp=[{icon:ln,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:Va,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:Ja,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:nn,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:Xa,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function rk(){return ss("div",{className:"p-3",children:[Zo("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),Zo("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:Zp.map(({text:e,icon:t,href:r})=>ss("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[Zo(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as ls,jsxs as qp}from"react/jsx-runtime";function nk({className:e}){return qp("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:[ls("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"}),ls("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{co as AUTOPLAY_DEFAULT_DELAY,zh as Accordion,bs as AccordionContent,fs as AccordionItem,gs as AccordionTrigger,rk as AdvancedLinkFeaturesTooltip,Cf as Africa,ys as Alert,ws as AlertDescription,Ns as AlertTitle,Mf as Amazon,zf as AndroidLogo,fe as AnimatedSizeContainer,nf as Anthropic,Vf as Apple,Hf as AppleLogo,_f as ArrowBoldUp,Ff as ArrowRight,Bf as ArrowTrendUp,Wf as ArrowTurnLeft,Uf as ArrowTurnRight2,ka as ArrowUpRight,Xp as ArrowUpRight2,$f as ArrowsOppositeDirectionX,Gf as ArrowsOppositeDirectionY,Pf as Asia,Ca as AtSign,$o as AuthButton,$h as Avatar,Ew as Background,cn as Badge,Kf as BadgeCheck,jf as BadgeCheck2Fill,tv as BadgeTooltip,Yf as Bell,sf as Bing,Zf as Blog,Ji as BlurImage,qf as Bolt,Xf as BoltFill,Qf as Book2,nr as Book2Fill,e0 as Book2Small,Jf as BookOpen,t0 as Books2,r0 as BoxArchive,o0 as BracketsCurly,Pa as BriefcaseFill,a0 as Brush,n0 as BulletList,Sa as BulletListFill,ee as Button,rv as ButtonTooltip,Di as COMPARE_PAGES,i0 as Calculator,Un as Calendar,d0 as Calendar6,l0 as CalendarDays,s0 as CalendarIcon,c0 as CalendarRefresh,hf as CardAmex,vf as CardDiscover,Tv as CardList,xf as CardMastercard,e2 as CardSelector,yf as CardVisa,m0 as Cards,u0 as CaretUpFill,kc as Carousel,Cc as CarouselContent,Pc as CarouselItem,v2 as CarouselNavBar,Tc as CarouselNext,Sc as CarouselPrevious,R2 as CarouselThumbnail,T2 as CarouselThumbnails,p0 as ChartActivity2,f0 as ChartArea2,g0 as ChartLine,Ef as ChatGPT,Ta as Check,ir as Check2,ht as Checkbox,Ra as CheckboxCheckedFill,La as CheckboxUnchecked,b0 as ChevronLeft,h0 as ChevronRight,v0 as ChevronUp,x0 as CircleArrowRight,Ma as CircleCheck,Ea as CircleCheckFill,y0 as CircleDollar,N0 as CircleDollarOut,w0 as CircleDotted,Da as CircleHalfDottedCheck,Aa as CircleHalfDottedClock,Ia as CircleInfo,k0 as CirclePercentage,C0 as CirclePlay,P0 as CirclePlayFill,S0 as CircleQuestion,T0 as CircleUser,qr as CircleWarning,R0 as CircleXmark,L0 as Circles,M0 as Circles3,es as ClientOnly,E0 as Cloud,Oa as CloudUpload,D0 as Code,A0 as ColorPalette2,_n as Combobox,nk as CompositeLogo,I0 as ConnectedDots,z0 as ConnectedDots4,O0 as ConnectedDotsFill,V0 as Connections3,ma as Copy,r9 as CopyButton,s9 as CopyText,H0 as CreditCard,_0 as Crosshairs3,F0 as Crown,Jp as CrownSmall,B0 as Cube,W0 as CubeSettings,U0 as CubeSettingsFill,$0 as CurrencyDollar,za as CursorRays,G0 as DatabaseKey,go as DatePickerContext,$y as DateRangePicker,K0 as Desktop,j0 as DiamondTurnRight,sr as DiamondTurnRightFill,Y0 as Directions,Z0 as Discount,q0 as Dots,Jy as DotsPattern,X0 as Download,dt as DubAnalyticsIcon,er as DubApiIcon,Qp as DubCraftedShield,mt as DubLinksIcon,ut as DubPartnersIcon,Zr as DubProductIcon,Jn as DubStatusBadge,J0 as Duplicate,ft as DynamicTooltipWrapper,Va as Earth,Q0 as EarthPosition,z3 as EditColumnsButton,i4 as EmptyState,eg as Envelope,tg as EnvelopeAlert,rg as EnvelopeArrowRight,og as EnvelopeBan,ag as EnvelopeCheck,Ha as EnvelopeFill,ng as EnvelopeOpen,Sf as Europe,ua as ExpandingArrow,_a as Eye,Fa as EyeSlash,_r as FEATURES_LIST,L9 as FRAMER_MOTION_LIST_ITEM_VARIANTS,ig as FaceSmile,lf as Facebook,Ba as FeatherFill,Df as Figma,sg as FileContent,h4 as FileUpload,lg as FileZip2,$4 as Filter,dg as Filter2,cg as FilterBars,mg as Flag,pg as Flag2,Wa as Flag6,ug as FlagWavy,fg as Flask,gg as FlaskSmall,bg as Folder,Ng as Folder5,hg as FolderBookmark,vg as FolderLock,xg as FolderPlus,yg as FolderShield,_6 as Footer,X4 as Form,wg as GamingConsole,kg as Gauge6,Ua as Gear,Cg as Gear2,Pg as Gear3,Sg as Gem,$a as Gift,Tg as GiftFill,Af as GitHubEnhanced,tr as Github,Rg as Globe,Ka as Globe2,Ga as GlobePointer,Lg as GlobeSearch,va as Go,cf as Google,If as GoogleEnhanced,Mg as GreekTemple,Xe as Grid,Eg as GridIcon,Dg as GridLayoutRows,Ag as GridPlus,Ig as GripDotsVertical,ja as Heading1,Ya as Heading2,Og as Headset,zg as Heart,Vg as HeartFill,Hg as HexadecagonStar,_g as History,Za as Hyperlink,ef as IOSAppStore,c9 as IconMenu,Fg as Icosahedron,qa as ImageIcon,Xa as Incognito,Bg as InfinityIcon,ev as InfoTooltip,m9 as InlineSnippet,em as Input,Wg as InputField,Ug as InputPassword,Ja as InputPasswordPointer,Qa as InputSearch,df as Instagram,$g as InvoiceDollar,Gg as Key,Cn as KeyboardShortcutContext,ux as KeyboardShortcutProvider,Ai as LEGAL_PAGES,om as Label,Kg as LayoutSidebar,jg as License,Yg as LifeRing,lr as LifeRingFill,Zg as LinesY,Xg as Link4,qg as LinkBroken,b9 as LinkLogo,S9 as LinkPreview,T9 as LinkPreviewPlaceholder,rr as LinkedIn,St as LoadingCircle,af as LoadingDots,ue as LoadingSpinner,Jg as LocationPin,Qg as Lock,eb as LockFill,tf as LockSmall,_t as Logo,pa as Magic,tb as Magnifier,rb as MapPosition,rf as MarkdownIcon,ob as MarketingTarget,of as MatrixLines,Fr as MaxWidthWrapper,ab as MediaPause,nb as MediaPlay,ib as Megaphone,sb as Menu3,vN as MenuItem,lb as MessageSmile,cr as MicrophoneFill,RN as MiniAreaChart,dr as Minus,cb as MobilePhone,IN as Modal,db as MoneyBill,mb as MoneyBill2,ub as MoneyBills2,pb as Msg,fb as Msgs,gb as MsgsDotted,j5 as Nav,Bo as NavContext,l6 as NavMobile,Br as NavWordmark,Tf as NorthAmerica,bb as Note,Cb as NucleoPhoto,BN as NumberStepper,Rf as Oceania,hb as OfficeBuilding,mf as OpenAI,Mh as PLAN_FEATURE_ICONS,eo as PROSE_STYLES,en as Page2,$N as PaginationControls,vb as Paintbrush,xb as Palette2,yb as PaperPlane,Nf as Paypal,wb as Pen2,Nb as PenWriting,kb as PercentageArrowDown,fa as Photo,xa as Php,Pb as Plug2,pt as Plus,Sb as Plus2,xe as Popover,H9 as Popup,Bp as PopupContext,Tb as Post,uf as ProductHunt,W9 as ProgressBar,jN as ProgressCircle,Rb as Pyramid,ya as Python,Lb as QRCode,Ft as RESOURCES,wm as RadioGroup,km as RadioGroupItem,Mb as Receipt2,pf as Reddit,tn as ReferredVia,Eb as Refresh2,V1 as RichTextArea,pn as RichTextContext,N1 as RichTextProvider,M1 as RichTextToolbar,Ke as RichTextToolbarButton,Db as Robot,Na as Ruby,Fo as SDKS,Hw as SOCIAL_LINKS,Ei as SOLUTIONS,M9 as STAGGER_CHILD_VARIANTS,rn as SatelliteDish,Ab as ScanText,Ib as Scribble,xr as ScrollContainer,ov as ScrollableTooltipContent,t3 as Sheet,Ob as ShieldAlert,zb as ShieldCheck,Vb as ShieldKeyhole,Hb as ShieldSlash,_b as ShieldUser,n3 as ShimmerDots,Fb as Shuffle,Bb as Sitemap,ff as Slack,l3 as Slider,Wb as Sliders,u3 as SmartDateTimePicker,ga as SortOrder,Lf as SouthAmerica,Ub as Sparkle3,Of as Spotify,$b as SquareChart,Gb as SquareLayoutGrid5,Kb as SquareLayoutGrid6,jb as SquareUserSparkle2,Yb as SquareXmark,Zb as Star,qb as StarFill,Xb as Stars2,x3 as StatusBadge,wf as StripeIcon,kf as StripeLink,ba as Success,T3 as Switch,E9 as TAB_ITEM_ANIMATION_SETTINGS,sh as TV,Q9 as TabSelect,sw as Table,Jb as TableIcon,Qb as TableRows2,eh as Tablet,th as Tag,rh as Tags,on as TextBold,an as TextItalic,ha as Tick,gf as TikTok,nn as Timer2,gw as TimestampTooltip,sn as Toggle2Fill,Nw as ToggleGroup,oh as Toggles,Gh as TokenAvatar,Z as Tooltip,Q1 as TooltipContent,J1 as TooltipProvider,ah as Trash,nh as TriangleWarning,ih as Trophy,or as Twitter,wa as Typescript,Lw as UTMBuilder,xu as UTM_PARAMETERS,lh as UiCard,bf as Unsplash,ch as User,dh as UserCheck,mh as UserCrown,uh as UserDelete,ph as UserFocus,fh as UserMinus,gh as UserPlus,bh as UserSearch,hh as UserXmark,vh as Users,yh as Users2,Nh as Users6,Tt as UsersFill,xh as UsersSettings,wh as Versions2,ln as Views,kh as Watch,Ch as Webhook,Ph as Window,Sh as WindowSearch,Th as WindowSettings,Zi as Wordmark,Rh as Workflow,Lh as Xmark,ar as YouTube,Ts as badgeVariants,ie as buttonVariants,Ps as getUserAvatarUrl,Ro as menuItemVariants,Wo as navItems,Fm as statusBadgeVariants,ve as useCarousel,zn as useCarouselActiveIndex,Dv as useColumnVisibility,zv as useCookies,bt as useCopyToClipboard,Bv as useCurrentAnchor,Gv as useCurrentSubdomain,Zv as useEnterSubmit,Qv as useInViewport,rx as useInputFocused,ix as useIntersectionObserver,De as useKeyboardShortcut,no as useLocalStorage,Q as useMediaQuery,hx as useOptimisticUpdate,Lx as usePagination,Dx as useRemoveGAParams,fr as useResizeObserver,Rt as useRichTextContext,Tn as useRouterStuff,Mn as useScroll,Ee as useScrollProgress,iw as useTable,Sn as useTablePagination,Fx as useToastWithUndo};
|
|
74
|
+
</svg>`;function ao({variant:e="full",isInApp:t,className:r}){let{domain:o="dub.co"}=$p(),{theme:n}=Wp(sn),[a,d]=Up(!1),l=Bp(s=>{s.preventDefault(),d(!0)},[]),[,m]=Pt();function c(s){Gp.promise(m(s),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return Cs(Ze.Root,{open:a,onOpenChange:d,children:[J(Ze.Anchor,{asChild:!0,children:J("div",{onContextMenu:l,className:"max-w-fit",children:e==="full"?J(ks,{className:r}):J(Xt,{className:i("h-8 w-8 transition-all duration-75 active:scale-95",r)})})}),J(Ze.Portal,{children:J(Ze.Content,{sideOffset:14,align:"start",className:i("z-50 -mt-1.5",!t&&"-translate-x-8",n==="dark"&&"dark"),onClick:s=>{s.stopPropagation(),d(!1)},children:Cs("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:[J(nr,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>c(Kp),icon:J(Xt,{className:"h-4 w-4"})}),J(nr,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>c(jp),icon:J(_p,{strokeWidth:2,className:"h-4 w-4"})}),J(nr,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:J(zp,{strokeWidth:2,className:"h-4 w-4"})}),t||o!="dub.co"?J(nr,{text:"Home Page",variant:"outline",onClick:()=>window.open(`https://dub.co${t?"/home":""}`,"_blank"),icon:J(Fp,{strokeWidth:2,className:"h-4 w-4"})}):J(nr,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:J(Hp,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function nr({className:e,...t}){return J(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 z,jsxs as j}from"react/jsx-runtime";var Jp=[{name:"Twitter",icon:gr,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:fr,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:pr,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:br,href:"https://www.youtube.com/@dubdotco"}],ar={product:[...oo.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"},{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:is.map(({name:e,slug:t})=>({name:e,href:`/compare/${t}`,product:"links"})).concat(["Rewardful","PartnerStack","FirstPromoter","Tolt"].map(e=>({name:e,href:e==="Rewardful"?"/blog/dub-vs-rewardful":`/help/article/migrating-from-${e.toLowerCase()}`,product:"partners"})))},ir="text-sm font-medium text-neutral-900",sr="flex flex-col mt-2.5 gap-3.5",pt="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function l9({staticDomain:e,className:t}){let{domain:r="dub.co"}=qp();e&&(r=e);let[o,n]=Xp(!1);return z(no,{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:j("footer",{children:[j("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[j("div",{className:"flex flex-col gap-6",children:[z("div",{className:"grow",children:j(qe,{href:W("/",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"Logo"}),className:"block max-w-fit",children:[j("span",{className:"sr-only",children:[process.env.NEXT_PUBLIC_APP_NAME," Logo"]}),z(ao,{className:"h-8 text-neutral-800"})]})}),z("div",{className:"flex items-center gap-3",children:Jp.map(({name:a,icon:d,href:l})=>j("a",{href:l,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[z("span",{className:"sr-only",children:a}),z(d,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},a))})]}),j("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[j("div",{className:"md:grid md:grid-cols-2",children:[j("div",{className:"grid gap-8",children:[j("div",{children:[z("h3",{className:ir,children:"Product"}),z("ul",{role:"list",className:sr,children:ar.product.map(a=>z("li",{children:j(qe,{href:W(a.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:a.name}),className:pt,children:[a.id&&z(fo,{product:a.id}),a.name]})},a.name))})]}),j("div",{children:[z("h3",{className:ir,children:"Solutions"}),z("ul",{role:"list",className:sr,children:ar.solutions.map(a=>z("li",{children:z(qe,{href:W(a.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:a.name}),className:pt,children:a.name})},a.name))})]})]}),j("div",{className:"mt-10 md:mt-0",children:[z("h3",{className:ir,children:"Resources"}),z("ul",{role:"list",className:sr,children:ar.resources.map(a=>z("li",{children:j(qe,{href:W(a.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:a.name}),target:a.target,className:i(pt,"gap-1"),children:[a.name,a.target&&z(wa,{className:"size-3.5"})]})},a.name))})]})]}),j("div",{className:"md:grid md:grid-cols-2",children:[z("div",{className:"grid gap-8",children:j("div",{children:[z("h3",{className:ir,children:"Company"}),j("ul",{role:"list",className:sr,children:[ar.company.map(a=>z("li",{children:z(qe,{href:W(a.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:a.name}),className:i(pt,"gap-1"),children:a.name})},a.name)),z("li",{className:"-mt-1",children:z(oe,{content:z("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:ss.map(a=>z(qe,{href:W(`/legal/${a.slug}`,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:a.name}),className:i(Ko({variant:"default"}),pt,"justify-start font-normal"),children:a.name},a.name))}),openPopover:o,setOpenPopover:n,children:j("button",{className:pt,children:["Legal",z(Yp,{className:"size-3.5"})]})})})]})]})}),j("div",{className:"mt-10 md:mt-0",children:[z("h3",{className:ir,children:"Compare"}),z("ul",{role:"list",className:sr,children:ar.compare.map(a=>z("li",{children:j(qe,{href:W(a.href,r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:a.name}),className:pt,children:[z(fo,{product:a.product}),a.name]})},a.name))})]})]})]})]}),j("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[z(yi,{}),z(qe,{href:W("/blog/soc2",r,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:r,utm_content:"SOC2"}),className:"flex sm:justify-center",children:z(Zp,{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"})}),j("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xA9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}import Qp from"next/image";import{memo as ef,useEffect as tf,useState as Ps}from"react";import{jsx as rf}from"react/jsx-runtime";var Ss=ef(e=>{let[t,r]=Ps(!0),[o,n]=Ps(e.src);tf(()=>n(e.src),[e.src]);let a=d=>{r(!1);let l=d.target;l.naturalWidth<=16&&l.naturalHeight<=16&&n(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)};return rf(Qp,{...e,src:o,alt:e.alt,className:i(t?"blur-[2px]":"blur-0",e.className),onLoad:a,onError:()=>{n(`https://avatar.vercel.sh/${encodeURIComponent(e.alt)}`)},unoptimized:!0})});import{AnimatePresence as of,motion as nf}from"motion/react";import{useEffect as af,useState as sf}from"react";import{jsx as Ts}from"react/jsx-runtime";var Rs=({children:e,fallback:t,fadeInDuration:r=.5,className:o})=>{let[n,a]=sf(!1);af(()=>{a(!0)},[]);let d=r?nf.div:"div";return Ts(of,{children:n?Ts(d,{...r?{initial:{opacity:0},animate:{opacity:1},transition:{duration:r}}:{},className:o,children:e}):t||null})};import{cva as lf}from"class-variance-authority";import{toast as cf}from"sonner";import{jsx as mn,jsxs as uf}from"react/jsx-runtime";var df=lf("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 P9({variant:e="default",value:t,className:r,icon:o,successMessage:n}){let[a,d]=Pt(),l=o||In;return uf("button",{onClick:m=>{m.stopPropagation(),cf.promise(d(t),{success:n||"Copied to clipboard!"})},className:i(df({variant:e}),r),type:"button",children:[mn("span",{className:"sr-only",children:"Copy"}),a?mn(Fn,{className:"h-3.5 w-3.5"}):mn(l,{className:"h-3.5 w-3.5"})]})}import{toast as mf}from"sonner";import{jsx as pf}from"react/jsx-runtime";function M9({value:e,children:t,className:r,successMessage:o}){let[n,a]=Pt();return pf("button",{onClick:d=>{d.stopPropagation(),mf.promise(a(e),{success:o||"Copied to clipboard!"})},type:"button",className:i("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",n&&"cursor-default",r),children:t})}import{jsx as ff,jsxs as gf}from"react/jsx-runtime";function I9({icon:e,text:t}){return gf("div",{className:"flex items-center justify-start space-x-2 truncate",children:[e,ff("p",{className:"truncate text-sm",children:t})]})}import{jsx as bf}from"react/jsx-runtime";var A9=({children:e})=>bf("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:e});import{jsx as pn}from"react/jsx-runtime";function H9({apexDomain:e,className:t,imageProps:r}){return e?pn(Ss,{src:`${Pn}${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}):pn("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:pn(ma,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}import{Link2 as Ls}from"lucide-react";import{useSearchParams as hf}from"next/navigation";import{useEffect as vf,useMemo as xf,useRef as yf}from"react";import wf from"swr";import{useDebounce as Nf}from"use-debounce";import{Fragment as Ms,jsx as Z,jsxs as Xe}from"react/jsx-runtime";function Z9({defaultUrl:e}){let t=hf(),r=e||(t==null?void 0:t.get("url"))||"https://github.com/dubinc/dub",[o]=Nf(yn(r),500),n=xf(()=>Tn(o||""),[o]),{data:a,isValidating:d}=wf(o&&`/api/links/metatags?url=${encodeURIComponent(o)}`,ye,{revalidateOnFocus:!1}),{title:l,description:m,image:c}=a||{},s=yf(null);vf(()=>{!e&&s.current&&s.current.select()},[e]);let{isMobile:u}=ee();return Xe(Ms,{children:[!e&&Xe("div",{className:"relative flex items-center",children:[Z(Ls,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),Z("input",{ref:s,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"})]}),Xe("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:[d&&Z("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:Z(Vt,{})}),c?Z("img",{src:c,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):Xe("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[Z(On,{className:"h-8 w-8 text-neutral-400"}),Z("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),Xe("div",{className:"grid gap-1 bg-white p-3 text-left",children:[n?Z("p",{className:"text-sm text-[#536471]",children:n}):Z("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),l?Z("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:l}):Z("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),m?Z("p",{className:"line-clamp-2 text-sm text-[#536471]",children:m}):Xe("div",{className:"grid gap-2",children:[Z("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),Z("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function q9({defaultUrl:e}){return Xe(Ms,{children:[Xe("div",{className:"relative flex items-center",children:[Z(Ls,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),Z("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"})]}),Z("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:Z("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:Z(Vt,{})})})]})}var J9={hidden:{scale:.8,opacity:0},show:{scale:1,opacity:1,transition:{type:"spring"}}},Q9={hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:{duration:.4,type:"spring"}}},eC={initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2,type:"easeInOut"}};import Es from"js-cookie";import{AnimatePresence as kf}from"motion/react";import{createContext as Cf,useState as Pf}from"react";import{jsx as fn}from"react/jsx-runtime";var Sf=Cf({hidePopup:()=>{}});function sC({children:e,hiddenCookieId:t}){let[r,o]=Pf(Es.get(t)==="1"),n=()=>{o(!0),Es.set(t,"1")};return fn(Rs,{children:fn(Sf.Provider,{value:{hidePopup:n},children:fn(kf,{children:!r&&e})})})}import{motion as Tf}from"motion/react";import{jsx as Is}from"react/jsx-runtime";function uC({value:e=0,max:t=100,className:r}){return Is("div",{className:i("h-3 w-full overflow-hidden rounded-full bg-neutral-200",r),children:Is(Tf.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 As}from"class-variance-authority";import{LayoutGroup as Rf,motion as Lf}from"motion/react";import Mf from"next/link";import{useId as Ef}from"react";import{jsx as lr,jsxs as Ds}from"react/jsx-runtime";var If=As("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"}}),Df=As("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function NC({variant:e,options:t,selected:r,onSelect:o,className:n}){let a=Ef();return lr("div",{className:i("flex text-sm",n),children:lr(Rf,{id:a,children:t.map(({id:d,label:l,href:m,target:c})=>{let s=d===r;return Ds(m?Mf:"div",{className:"relative",href:m??"#",target:c??void 0,children:[Ds("button",{type:"button",...o&&!m&&{onClick:()=>o(d)},className:i(If({variant:e}),c==="_blank"&&"group flex items-center gap-1.5"),"data-selected":s,"aria-selected":s,children:[l,c==="_blank"&&lr(Un,{className:"size-2.5"})]}),s&&lr(Lf.div,{layoutId:"indicator",transition:{duration:.1},className:Df({variant:e}),children:lr("div",{className:"h-0.5 rounded-t-full bg-current"})})]},d)})})})}import{jsx as gn,jsxs as Os}from"react/jsx-runtime";var Af=[{icon:Ra,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:oa,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:va,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:Sa,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:ha,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function PC(){return Os("div",{className:"p-3",children:[gn("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),gn("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:Af.map(({text:e,icon:t,href:r})=>Os("a",{href:r,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[gn(t,{className:"size-3.5 shrink-0"}),e]},e))})]})}import{jsx as Vs,jsxs as Of}from"react/jsx-runtime";function RC({className:e}){return Of("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:[Vs("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"}),Vs("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{Ro as AUTOPLAY_DEFAULT_DELAY,Mv as Accordion,Gs as AccordionContent,Ws as AccordionItem,Us as AccordionTrigger,Vv as ActivityRing,PC as AdvancedLinkFeaturesTooltip,u0 as Africa,Zs as Alert,Xs as AlertDescription,qs as AlertTitle,h0 as Amazon,k0 as AndroidLogo,de as AnimatedSizeContainer,jf as Anthropic,C0 as Apple,P0 as AppleLogo,S0 as ArrowBoldUp,T0 as ArrowRight,R0 as ArrowTrendUp,L0 as ArrowTurnLeft,M0 as ArrowTurnRight2,Un as ArrowUpRight,Vf as ArrowUpRight2,E0 as ArrowsOppositeDirectionX,I0 as ArrowsOppositeDirectionY,m0 as Asia,Gn as AtSign,dn as AuthButton,Uv as Avatar,ek as Background,Ia as Badge,D0 as BadgeCheck,A0 as BadgeCheck2Fill,rx as BadgeTooltip,O0 as Bell,Yf as Bing,V0 as Blog,Ss as BlurImage,z0 as Bolt,F0 as BoltFill,_0 as Book2,hr as Book2Fill,$0 as Book2Small,H0 as BookOpen,B0 as Books2,W0 as BoxArchive,U0 as BracketsCurly,Kn as BriefcaseFill,G0 as Brush,K0 as BulletList,jn as BulletListFill,te as Button,ox as ButtonTooltip,is as COMPARE_PAGES,j0 as Calculator,ui as Calendar,X0 as Calendar6,Z0 as CalendarDays,Y0 as CalendarIcon,q0 as CalendarRefresh,n0 as CardAmex,a0 as CardDiscover,Rx as CardList,i0 as CardMastercard,ny as CardSelector,s0 as CardVisa,J0 as Cards,Q0 as CaretUpFill,Qc as Carousel,ed as CarouselContent,td as CarouselItem,Ny as CarouselNavBar,od as CarouselNext,rd as CarouselPrevious,Iy as CarouselThumbnail,Ey as CarouselThumbnails,eg as ChartActivity2,tg as ChartArea2,rg as ChartLine,v0 as ChatGPT,xt as Check,vr as Check2,St as Checkbox,Yn as CheckboxCheckedFill,Zn as CheckboxUnchecked,og as ChevronLeft,ng as ChevronRight,ag as ChevronUp,ig as CircleArrowRight,qn as CircleCheck,Xn as CircleCheckFill,sg as CircleDollar,lg as CircleDollarOut,cg as CircleDotted,Jn as CircleHalfDottedCheck,Qn as CircleHalfDottedClock,ea as CircleInfo,dg as CirclePercentage,ug as CirclePlay,mg as CirclePlayFill,pg as CircleQuestion,fg as CircleUser,go as CircleWarning,gg as CircleXmark,bg as Circles,hg as Circles3,Rs as ClientOnly,vg as Cloud,ta as CloudUpload,xg as Code,yg as ColorPalette2,d4 as Combobox,RC as CompositeLogo,wg as ConnectedDots,kg as ConnectedDots4,Ng as ConnectedDotsFill,Cg as Connections3,In as Copy,P9 as CopyButton,M9 as CopyText,Pg as CreditCard,Sg as Crosshairs3,Tg as Crown,zf as CrownSmall,Rg as Cube,Lg as CubeSettings,Mg as CubeSettingsFill,Eg as CurrencyDollar,ra as CursorRays,Ig as DatabaseKey,Do as DatePickerContext,Z4 as DateRangePicker,Dg as Desktop,Ag as DiamondTurnRight,xr as DiamondTurnRightFill,Og as Directions,Vg as Discount,zg as Dots,ow as DotsPattern,Fg as Download,bt as DubAnalyticsIcon,mr as DubApiIcon,Ff as DubCraftedShield,ht as DubLinksIcon,vt as DubPartnersIcon,fo as DubProductIcon,yi as DubStatusBadge,Hg as Duplicate,kt as DynamicTooltipWrapper,oa as Earth,_g as EarthPosition,a5 as EditColumnsButton,uw as EmptyState,$g as Envelope,Bg as EnvelopeAlert,Wg as EnvelopeArrowRight,Ug as EnvelopeBan,Gg as EnvelopeCheck,na as EnvelopeFill,Kg as EnvelopeOpen,p0 as Europe,Dn as ExpandingArrow,aa as Eye,ia as EyeSlash,oo as FEATURES_LIST,J9 as FRAMER_MOTION_LIST_ITEM_VARIANTS,jg as FaceSmile,Zf as Facebook,sa as FeatherFill,x0 as Figma,Yg as FileContent,Hf as FilePen,_f as FileSend,Nw as FileUpload,Zg as FileZip2,iN as Filter,Xg as Filter2,qg as FilterBars,Jg as Flag,eb as Flag2,la as Flag6,Qg as FlagWavy,tb as Flask,rb as FlaskSmall,ob as Folder,lb as Folder5,nb as FolderBookmark,ab as FolderLock,ib as FolderPlus,sb as FolderShield,l9 as Footer,pN as Form,cb as GamingConsole,db as Gauge6,ca as Gear,ub as Gear2,mb as Gear3,pb as Gem,da as Gift,fb as GiftFill,y0 as GitHubEnhanced,pr as Github,gb as Globe,ma as Globe2,ua as GlobePointer,bb as GlobeSearch,Hn as Go,qf as Google,w0 as GoogleEnhanced,hb as GreekTemple,ot as Grid,vb as GridIcon,xb as GridLayoutRows,yb as GridPlus,wb as GripDotsVertical,pa as Heading1,fa as Heading2,Nb as Headset,kb as Heart,Cb as HeartFill,Pb as HexadecagonStar,Sb as History,ga as Hyperlink,$f as IOSAppStore,I9 as IconMenu,Tb as Icosahedron,ba as ImageIcon,ha as Incognito,Rb as InfinityIcon,tx as InfoTooltip,A9 as InlineSnippet,Eu as Input,Lb as InputField,Mb as InputPassword,va as InputPasswordPointer,xa as InputSearch,Xf as Instagram,Eb as InvoiceDollar,Ib as Key,ja as KeyboardShortcutContext,b2 as KeyboardShortcutProvider,ss as LEGAL_PAGES,Au as Label,Db as LayoutSidebar,Ab as License,Ob as LifeRing,yr as LifeRingFill,Vb as LinesY,Fb as Link4,zb as LinkBroken,H9 as LinkLogo,Z9 as LinkPreview,q9 as LinkPreviewPlaceholder,fr as LinkedIn,Vt as LoadingCircle,Kf as LoadingDots,be as LoadingSpinner,Hb as LocationPin,_b as Lock,$b as LockFill,Bf as LockSmall,Xt as Logo,An as Magic,Bb as Magnifier,Wb as MapPosition,Wf as MarkdownIcon,Ub as MarketingTarget,Uf as MatrixLines,no as MaxWidthWrapper,Gb as MediaPause,Kb as MediaPlay,jb as Megaphone,Yb as Menu3,AN as MenuItem,Zb as MessageSmile,wr as MicrophoneFill,UN as MiniAreaChart,Nr as Minus,qb as MobilePhone,qN as Modal,Xb as MoneyBill,Jb as MoneyBill2,Qb as MoneyBills2,eh as Msg,th as Msgs,rh as MsgsDotted,oh as MsgsFill,Qu as MultiValueInput,b6 as Nav,sn as NavContext,E6 as NavMobile,ao as NavWordmark,f0 as NorthAmerica,nh as Note,mh as NucleoPhoto,s3 as NumberStepper,g0 as Oceania,ah as OfficeBuilding,Jf as OpenAI,Cv as PLAN_FEATURE_ICONS,xo as PROSE_STYLES,ya as Page2,d3 as PaginationControls,ih as Paintbrush,sh as Palette2,lh as PaperPlane,l0 as Paypal,dh as Pen2,ch as PenWriting,uh as PercentageArrowDown,On as Photo,_n as Php,ph as Plug2,yt as Plus,fh as Plus2,oe as Popover,sC as Popup,Sf as PopupContext,gh as Post,Qf as ProductHunt,uC as ProgressBar,p3 as ProgressCircle,b3 as ProgressiveBlur,bh as Pyramid,$n as Python,hh as QRCode,Jt as RESOURCES,im as RadioGroup,sm as RadioGroupItem,vh as Receipt2,e0 as Reddit,wa as ReferredVia,xh as Refresh2,F1 as RichTextArea,Va as RichTextContext,N1 as RichTextProvider,E1 as RichTextToolbar,He as RichTextToolbarButton,yh as Robot,Bn as Ruby,an as SDKS,sk as SOCIAL_LINKS,as as SOLUTIONS,Q9 as STAGGER_CHILD_VARIANTS,Na as SatelliteDish,wh as ScanText,Nh as Scribble,Ir as ScrollContainer,nx as ScrollableTooltipContent,C3 as Sheet,kh as ShieldAlert,Ch as ShieldCheck,Ph as ShieldKeyhole,Sh as ShieldSlash,Th as ShieldUser,R3 as ShimmerDots,Rh as Shop,Lh as Shuffle,Mh as Sitemap,t0 as Slack,E3 as Slider,Eh as Sliders,O3 as SmartDateTimePicker,Ih as SortAlphaAscending,Dh as SortAlphaDescending,Vn as SortOrder,b0 as SouthAmerica,Ah as Sparkle3,N0 as Spotify,Oh as SquareChart,Vh as SquareCheck,zh as SquareLayoutGrid5,Fh as SquareLayoutGrid6,Hh as SquareUserSparkle2,_h as SquareXmark,$h as Star,Bh as StarFill,Wh as Stars2,B3 as StatusBadge,c0 as StripeIcon,d0 as StripeLink,zn as Success,Uh as Suitcase,q3 as Switch,eC as TAB_ITEM_ANIMATION_SETTINGS,ev as TV,NC as TabSelect,M5 as Table,Gh as TableIcon,Kh as TableRows2,jh as Tablet,Yh as Tag,Zh as Tags,ka as TextBold,Ca as TextItalic,Pa as TextStrike,Fn as Tick,r0 as TikTok,Sa as Timer2,F5 as TimestampTooltip,Ta as Toggle2Fill,U5 as ToggleGroup,qh as Toggles,Gv as TokenAvatar,q as Tooltip,ex as TooltipContent,Q1 as TooltipProvider,Xh as Trash,Jh as TriangleWarning,Qh as Trophy,gr as Twitter,Wn as Typescript,J5 as UTMBuilder,op as UTM_PARAMETERS,tv as UiCard,o0 as Unsplash,rv as User,ov as UserArrowRight,nv as UserCheck,Gf as UserClock,av as UserCrown,iv as UserDelete,sv as UserFocus,lv as UserMinus,cv as UserPlus,dv as UserSearch,uv as UserXmark,mv as Users,fv as Users2,gv as Users6,zt as UsersFill,pv as UsersSettings,bv as Versions2,Ra as Views,hv as Watch,vv as Webhook,xv as Window,yv as WindowSearch,wv as WindowSettings,ks as Wordmark,Nv as Workflow,kv as Xmark,br as YouTube,rl as badgeVariants,ce as buttonVariants,el as getUserAvatarUrl,Ko as menuItemVariants,ln as navItems,Cm as statusBadgeVariants,Ce as useCarousel,ai as useCarouselActiveIndex,Ex as useClickHandlers,Vx as useColumnVisibility,_x as useCookies,Pt as useCopyToClipboard,Gx as useCurrentAnchor,Zx as useCurrentSubdomain,Qx as useEnterSubmit,o2 as useInViewport,i2 as useInputFocused,d2 as useIntersectionObserver,_e as useKeyboardShortcut,Co as useLocalStorage,ee as useMediaQuery,w2 as useOptimisticUpdate,D2 as usePagination,V2 as useRemoveGAParams,Tr as useResizeObserver,Ft as useRichTextContext,qa as useRouterStuff,Qa as useScroll,Fe as useScrollProgress,L5 as useTable,Za as useTablePagination,U2 as useToastWithUndo};
|