1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43123],{3915:(e,t,r)=>{r.d(t,{a:()=>s});var n=r(38848);function l(){return window.matchMedia("(min-width: 1024px)").matches?"desktop":window.matchMedia("(min-width: 640px)").matches?"tablet":"mobile"}function a(){return{width:window.innerWidth,height:window.innerHeight}}function s(){let[e,t]=(0,n.useState)(l()),[r,s]=(0,n.useState)(a());return(0,n.useEffect)(()=>{let e=()=>{t(l()),s(a())};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),{device:e,width:null==r?void 0:r.width,height:null==r?void 0:r.height,isMobile:"mobile"===e,isTablet:"tablet"===e,isDesktop:"desktop"===e}}},43123:(e,t,r)=>{r.r(t),r.d(t,{AUTOPLAY_DEFAULT_DELAY:()=>rd,Accordion:()=>eI,AccordionContent:()=>eF,AccordionItem:()=>eT,AccordionTrigger:()=>e_,ActivityRing:()=>eH,AdvancedLinkFeaturesTooltip:()=>ae,Africa:()=>n.ja,Alert:()=>eG,AlertDescription:()=>eq,AlertTitle:()=>eK,Amazon:()=>n.pa,AndroidLogo:()=>n.wa,AnimatedSizeContainer:()=>ro,Anthropic:()=>n.A,Apple:()=>n.xa,AppleLogo:()=>n.ya,ArrowBoldUp:()=>n.za,ArrowRight:()=>n.Aa,ArrowTrendUp:()=>n.Ba,ArrowTurnLeft:()=>n.Ca,ArrowTurnRight2:()=>n.Da,ArrowUpRight:()=>n.Ea,ArrowUpRight2:()=>n.a,ArrowsOppositeDirectionX:()=>n.Fa,ArrowsOppositeDirectionY:()=>n.Ga,Asia:()=>n.ka,AtSign:()=>n.Ha,AuthButton:()=>lz,Avatar:()=>eX,Background:()=>n4,Badge:()=>eQ,BadgeCheck:()=>n.Ia,BadgeCheck2:()=>n.Ja,BadgeTooltip:()=>t6,Beehiiv:()=>n.B,Bell:()=>n.Ka,Bing:()=>n.C,Blog:()=>n.La,BlurImage:()=>lW,Bolt:()=>n.Ma,Book2:()=>n.Oa,Book2Small:()=>n.Pa,BookOpen:()=>n.Na,Books2:()=>n.Qa,BoxArchive:()=>n.Ra,BracketsCurly:()=>n.Sa,Briefcase:()=>n.Ta,Brush:()=>n.Ua,BulletList:()=>n.Va,Button:()=>rt,ButtonTooltip:()=>t9,COMPARE_PAGES:()=>le,Calculator:()=>n.Wa,Calendar:()=>rE,Calendar6:()=>n._a,CalendarDays:()=>n.Ya,CalendarIcon:()=>n.Xa,CalendarRefresh:()=>n.Za,CardAmex:()=>n.Y,CardDiscover:()=>n.Z,CardList:()=>rs,CardMastercard:()=>n._,CardSelector:()=>rc,CardVisa:()=>n.$,Cards:()=>n.$a,CaretUp:()=>n.ab,Carousel:()=>rp,CarouselContent:()=>rx,CarouselItem:()=>rf,CarouselNavBar:()=>rw,CarouselNext:()=>rv,CarouselPrevious:()=>rg,CarouselThumbnail:()=>ry,CarouselThumbnails:()=>rj,ChartActivity2:()=>n.bb,ChartArea2:()=>n.cb,ChartLine:()=>n.db,ChatGPT:()=>n.qa,ChatGPTIcon:()=>n.D,ChatTask:()=>n.eb,Check:()=>n.fb,Check2:()=>n.gb,Checkbox:()=>rN,CheckboxIcon:()=>n.hb,ChevronLeft:()=>n.ib,ChevronRight:()=>n.jb,ChevronUp:()=>n.kb,CircleArrowRight:()=>n.lb,CircleCheck:()=>n.mb,CircleDashed:()=>n.nb,CircleDollar:()=>n.ob,CircleDollar3:()=>n.qb,CircleDollarOut:()=>n.pb,CircleDotted:()=>n.rb,CircleHalfDottedCheck:()=>n.sb,CircleHalfDottedClock:()=>n.tb,CircleInfo:()=>n.ub,CirclePercentage:()=>n.vb,CirclePlay:()=>n.wb,CircleQuestion:()=>n.xb,CircleUser:()=>n.yb,CircleWarning:()=>n.zb,CircleXmark:()=>n.Ab,Circles:()=>n.Bb,Circles3:()=>n.Cb,Claude:()=>n.E,ClientOnly:()=>lG,Cloud:()=>n.Db,CloudUpload:()=>n.Eb,Cloudflare:()=>n.F,Code:()=>n.Fb,ColorPalette2:()=>n.Gb,Combobox:()=>rC,CompositeLogo:()=>at,ConnectedDots:()=>n.Hb,ConnectedDots4:()=>n.Ib,Connections3:()=>n.Jb,Copy:()=>n.b,CopyButton:()=>lq,CopyText:()=>lZ,CreditCard:()=>n.Kb,Crosshairs3:()=>n.Lb,Crown:()=>n.Mb,CrownSmall:()=>n.c,Cube:()=>n.Nb,CubeSettings:()=>n.Ob,CurrencyDollar:()=>n.Pb,Cursor:()=>n.G,CursorRays:()=>n.Qb,DEFAULT_RICH_TEXT_FEATURES:()=>tW,DUB_DASHBOARD_MAIN_SCROLL_ID:()=>tm,DatabaseKey:()=>n.Rb,DatePicker:()=>rT,DatePickerContext:()=>rD,DateRangePicker:()=>rO,Desktop:()=>n.Sb,DiamondTurnRight:()=>n.Tb,Directions:()=>n.Ub,DiscountCode:()=>n.Vb,Dots:()=>n.Wb,DotsPattern:()=>rV,Download:()=>n.Xb,DubAnalyticsIcon:()=>n.d,DubApiIcon:()=>n.e,DubCraftedShield:()=>n.f,DubLinksIcon:()=>n.g,DubPartnersIcon:()=>n.h,DubProductIcon:()=>n.i,DubStatusBadge:()=>rU,Duplicate:()=>n.Yb,DynamicTooltipWrapper:()=>t8,Earth:()=>n.Zb,EarthPosition:()=>n._b,EditColumnsButton:()=>n_,EmptyState:()=>rH,Envelope:()=>n.$b,EnvelopeAlert:()=>n.ac,EnvelopeArrowRight:()=>n.bc,EnvelopeBan:()=>n.cc,EnvelopeCheck:()=>n.dc,EnvelopeOpen:()=>n.ec,Europe:()=>n.la,ExpandingArrow:()=>n.j,Eye:()=>n.fc,EyeSlash:()=>n.gc,FEATURES_LIST:()=>
1n6,FRAMER_MOTION_LIST_ITEM_VARIANTS:()=>l0,FaceSmile:()=>n.hc,Facebook:()=>n.H,Feather:()=>n.ic,Figma:()=>n.ra,FileContent:()=>n.jc,FilePen:()=>n.k,FileSend:()=>n.l,FileUpload:()=>rZ,FileZip2:()=>n.kc,Filter:()=>ns,Filter2:()=>n.mc,FilterBars:()=>n.lc,FilterOptionRow:()=>nt,Flag:()=>n.nc,Flag2:()=>n.pc,Flag6:()=>n.qc,FlagWavy:()=>n.oc,Flask:()=>n.rc,FlaskSmall:()=>n.sc,Folder:()=>n.tc,Folder5:()=>n.yc,FolderBookmark:()=>n.uc,FolderLock:()=>n.vc,FolderPlus:()=>n.wc,FolderShield:()=>n.xc,Footer:()=>lH,Form:()=>ni,GamingConsole:()=>n.zc,Gauge6:()=>n.Ac,Gear:()=>n.Bc,Gear2:()=>n.Cc,Gear3:()=>n.Dc,Gem:()=>n.Ec,Gift:()=>n.Fc,GitHubEnhanced:()=>n.sa,Github:()=>n.I,Globe:()=>n.Gc,Globe2:()=>n.Jc,GlobePointer:()=>n.Hc,GlobeSearch:()=>n.Ic,Go:()=>n.ea,Google:()=>n.J,GoogleEnhanced:()=>n.ta,GreekTemple:()=>n.Kc,Grid:()=>no,GridIcon:()=>n.Lc,GridLayoutRows:()=>n.Mc,GridPlus:()=>n.Nc,GripDotsVertical:()=>n.Oc,Grok:()=>n.K,Heading1:()=>n.Pc,Heading2:()=>n.Qc,Headset:()=>n.Rc,Heart:()=>n.Sc,HexadecagonStar:()=>n.Tc,History:()=>n.Uc,Hyperlink:()=>n.Vc,IOSAppStore:()=>n.m,IconMenu:()=>lY,Icosahedron:()=>n.Wc,ImageIcon:()=>n.Xc,Incognito:()=>n.Yc,InfinityIcon:()=>n.Zc,InfoTooltip:()=>t5,InlineSnippet:()=>lX,Input:()=>e1,InputField:()=>n._c,InputPassword:()=>n.$c,InputPasswordPointer:()=>n.ad,InputSearch:()=>n.bd,Instagram:()=>n.L,InvoiceDollar:()=>n.cd,Key:()=>n.dd,KeyboardShortcutContext:()=>ta,KeyboardShortcutProvider:()=>ts,LEGAL_PAGES:()=>lt,Label:()=>nd,Layers3:()=>n.ed,LayoutSidebar:()=>n.fd,License:()=>n.gd,LifeRing:()=>n.hd,LinesY:()=>n.id,Link4:()=>n.kd,LinkBroken:()=>n.jd,LinkLogo:()=>lJ,LinkPreview:()=>lQ,LinkPreviewPlaceholder:()=>l$,LinkedIn:()=>n.M,LoadingCircle:()=>n.x,LoadingDots:()=>n.y,LoadingSpinner:()=>n.z,LocationPin:()=>n.ld,Lock:()=>n.md,LockSmall:()=>n.n,Logo:()=>n5,Magic:()=>n.o,Magnifier:()=>n.nd,MapPosition:()=>n.od,MarkdownIcon:()=>n.p,MarketingTarget:()=>n.pd,MatrixLines:()=>n.q,MaxWidthWrapper:()=>ln,MediaPause:()=>n.qd,MediaPlay:()=>n.rd,Megaphone:()=>n.sd,Menu3:()=>n.td,MenuItem:()=>nm,MessageSmile:()=>n.ud,Microphone:()=>n.vd,MiniAreaChart:()=>nx,Minus:()=>n.wd,MobilePhone:()=>n.xd,Modal:()=>tC,MoneyBill:()=>n.yd,MoneyBill2:()=>n.zd,MoneyBills2:()=>n.Ad,Msg:()=>n.Bd,Msgs:()=>n.Cd,MsgsDotted:()=>n.Dd,MultiValueInput:()=>nv,Nav:()=>lA,NavContext:()=>lj,NavMobile:()=>lE,NavWordmark:()=>lT,Nodes4:()=>n.Ed,NorthAmerica:()=>n.ma,Note:()=>n.Fd,NucleoPhoto:()=>n.Pd,NumberStepper:()=>nb,NumberedList:()=>n.Gd,Oceania:()=>n.na,OfficeBuilding:()=>n.Hd,OpenAI:()=>n.N,PLAN_FEATURE_ICONS:()=>n.lf,PROSE_STYLES:()=>tU,Page2:()=>n.Id,PaginationControls:()=>nj,Paintbrush:()=>n.Jd,Palette2:()=>n.Kd,PaperPlane:()=>n.Ld,Paypal:()=>n.aa,Pen2:()=>n.Nd,PenWriting:()=>n.Md,PercentageArrowDown:()=>n.Od,Photo:()=>n.r,Php:()=>n.fa,Plug2:()=>n.Qd,Plus:()=>n.Rd,Plus2:()=>n.Sd,Popover:()=>tj,Popup:()=>l3,PopupContext:()=>l4,Post:()=>n.Td,ProductHunt:()=>n.O,ProgressBar:()=>l5,ProgressCircle:()=>ny,ProgressiveBlur:()=>nS,Pyramid:()=>n.Ud,Python:()=>n.ga,QRCode:()=>n.Vd,Quote:()=>n.Wd,RESOURCES:()=>n7,RadioGroup:()=>nA,RadioGroupItem:()=>nP,Receipt2:()=>n.Xd,Reddit:()=>n.P,ReferredVia:()=>n.Yd,Refresh2:()=>n.Zd,RichTextArea:()=>t0,RichTextContext:()=>tq,RichTextLinkModal:()=>tP,RichTextProvider:()=>tZ,RichTextToolbar:()=>tJ,RichTextToolbarButton:()=>t$,Robot:()=>n._d,Rocket:()=>n.$d,Ruby:()=>n.ha,SDKS:()=>n9,SOCIAL_LINKS:()=>lr,SOLUTIONS:()=>n8,STAGGER_CHILD_VARIANTS:()=>l1,SatelliteDish:()=>n.ae,ScanText:()=>n.be,Scribble:()=>n.ce,ScrollContainer:()=>rk,ScrollableTooltipContent:()=>t7,Sheet:()=>nM,ShieldAlert:()=>n.de,ShieldCheck:()=>n.ee,ShieldKeyhole:()=>n.fe,ShieldSlash:()=>n.ge,ShieldUser:()=>n.he,ShimmerDots:()=>nR,Shop:()=>n.ie,Shuffle:()=>n.je,Sitemap:()=>n.ke,Slack:()=>n.Q,SlackColorful:()=>n.R,Slider:()=>nE,Sliders:()=>n.le,SmartDateTimePicker:()=>nD,SortAlphaAscending:()=>n.me,SortAlphaDescending:()=>n.ne,SortOrder:()=>n.s,SouthAmerica:()=>n.oa,Sparkle3:()=>n.oe,Spotify:()=>n.ua,SquareChart:()=>n.pe,SquareCheck:()=>n.qe,SquareLayoutGrid5:()=>n.re,SquareLayoutGrid6:()=>n.se,SquareUserSparkle2:()=>n.te,SquareXmark:()=>n.ue,Stablecoin:()=>n.ba,StackY3:()=>n.ve,Star:()=>n.we,Stars2:()=>n.xe,StatusBadge:()=>nI,StripeIcon:()=>n.ca,StripeLink:()=>n.da,Success:()=>n.t,Suitcase:()=>n.ye,Switch:()=>
1nT,TAB_ITEM_ANIMATION_SETTINGS:()=>l2,TV:()=>n.Ne,TabSelect:()=>l8,Table:()=>nW,TableIcon:()=>n.ze,TableRows2:()=>n.Ae,Tablet:()=>n.Be,Tag:()=>n.Ce,Tags:()=>n.De,TextBold:()=>n.Ee,TextItalic:()=>n.Fe,TextStrike:()=>n.Ge,Tick:()=>n.u,TikTok:()=>n.S,Timer2:()=>n.He,TimestampTooltip:()=>nZ,Toggle2:()=>n.Ie,ToggleGroup:()=>nX,Toggles:()=>n.Je,Tooltip:()=>t4,TooltipContent:()=>t3,TooltipProvider:()=>t1,Trash:()=>n.Ke,TriangleWarning:()=>n.Le,Trophy:()=>n.Me,TruncatedList:()=>nJ,Twitter:()=>n.T,Typescript:()=>n.ia,UTMBuilder:()=>n2,UTM_PARAMETERS:()=>n$,UiCard:()=>n.Oe,Unsplash:()=>n.U,User:()=>n.Pe,UserArrowLeft:()=>n.Qe,UserArrowRight:()=>n.Re,UserCheck:()=>n.Se,UserClock:()=>n.v,UserCrown:()=>n.Te,UserDelete:()=>n.Ue,UserFocus:()=>n.Ve,UserMinus:()=>n.We,UserPlus:()=>n.Xe,UserSearch:()=>n.Ye,UserXmark:()=>n.Ze,Users:()=>n._e,Users2:()=>n.af,Users6:()=>n.bf,UsersSettings:()=>n.$e,Vercel:()=>n.V,Veriff:()=>n.W,VerifiedBadge:()=>n.w,Versions2:()=>n.cf,Views:()=>n.df,Watch:()=>n.ef,Webhook:()=>n.ff,Window:()=>n.gf,WindowSearch:()=>n.hf,WindowSettings:()=>n.if,Wordmark:()=>lI,Workflow:()=>n.jf,Xmark:()=>n.kf,YouTube:()=>n.X,badgeVariants:()=>eJ,buttonVariants:()=>re,consumePendingDashboardScrollTop:()=>tp,encodeRangeToken:()=>rQ,menuItemVariants:()=>nu,navItems:()=>ly,normalizeActiveFilter:()=>rX,normalizeLinkHref:()=>tA,parseRangeToken:()=>rJ,useCarousel:()=>rm,useCarouselActiveIndex:()=>rh,useClickHandlers:()=>e2,useColumnVisibility:()=>e5,useCookies:()=>e6,useCopyToClipboard:()=>e9,useCurrentAnchor:()=>e8,useCurrentProduct:()=>e7,useCurrentSubdomain:()=>te,useEnterSubmit:()=>tt,useInViewport:()=>tr,useInputFocused:()=>tn,useIntersectionObserver:()=>tl,useKeyboardShortcut:()=>ti,useLatestCallback:()=>tc,useLocalStorage:()=>e3,useMediaQuery:()=>l.a,useOptimisticUpdate:()=>td,usePagination:()=>tf,useRemoveGAParams:()=>tg,useResizeObserver:()=>e$,useRichTextContext:()=>tY,useRichTextLength:()=>tX,useRouterStuff:()=>tx,useScroll:()=>tv,useScrollProgress:()=>e0,useTable:()=>nU,useTablePagination:()=>tu,useToastWithUndo:()=>tw,withFillVariant:()=>n.va});var n=r(1616),l=r(3915),a=r(53976),s=r(46324),i=r(65016),o=r(38848),c=r(38476),d=r(17966),u=r(86645),m=r(56178),h=r(16820),p=r(141),x=r(62094),f=r(79386),g=r(30598),v=r(87245),b=r(6026),w=r(1183),j=r(38540),y=r(29638),N=r(20290),k=r(4033),C=r(10521),S=r(69781),A=r(91505),P=r(54625),M=r(88869),R=r(75673),E=r(78172),D=r(91046),L=r(98513),z=r(57215),I=r(79268),T=r(8760),_=r(12359),F=r(494),O=r(14763),B=r(59075),V=r(23660),U=r(55225),H=r(96898),W=r(10575),G=r(58737),K=r(56539),q=r(69310),Z=r(9046),Y=r(59908),X=r(99405),J=r(8867),Q=r(85986),$=r(57564),ee=r(22491),et=r(74800),er=r(61643),en=r(43393),el=r(31946),ea=r(53136),es=r(27839),ei=r(45413),eo=r(41241),ec=r(75669),ed=r(37999),eu=r(78669),em=r(664),eh=r(79470),ep=r(92039),ex=r(27911),ef=r(99778),eg=r(85446),ev=r(31052),eb=r(59249),ew=r(92237),ej=r(39245),ey=r(99759),eN=r(80482),ek=r(23438),eC=r(60092),eS=r(50882),eA=r(1265),eP=r(87846),eM=r(38251),eR=r(43642),eE=r(25697),eD=r(11519),eL=r(24369),ez=r(78465),eI=s.bL,eT=o.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,c.jsx)(s.q7,{ref:t,className:(0,a.v)("border-b border-b-slate-200 py-3 last:border-none",r),...n})});eT.displayName="AccordionItem";var e_=o.forwardRef((e,t)=>{let{className:r,children:l,variant:o="chevron",...d}=e,u="chevron"===o?i.A:n.Rd;return(0,c.jsx)(s.Y9,{className:"flex",children:(0,c.jsxs)(s.l9,{ref:t,className:(0,a.v)("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg",{"[&[data-state=open]>svg]:rotate-180":"chevron"===o,"[&[data-state=open]>svg]:rotate-45":"plus"===o},r),...d,children:[l,(0,c.jsx)(u,{className:"h-5 w-5 flex-none transition-transform duration-300"})]})})});e_.displayName=s.l9.displayName;var eF=o.forwardRef((e,t)=>{let{className:r,children:n,...l}=e;return(0,c.jsx)(s.UC,{ref:t,className:(0,a.v)("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-neutral-500 transition-all sm:text-base",r),...l,children:n})});eF.displayName=s.UC.displayName;var eO={positive:"#00C951",negative:"#FB2C36",positiveIcon:"#166534",negativeIcon:"#991b1b",neutralIcon:"#262626"};function eB(e,t,r,n){let l=(n-90)*Math.PI/180;return{x:e+r*Math.cos(l),y:t+r*Math.sin(l)}}function eV(e,t,r,n,l){let a=eB(e,t,r,n),s=eB(e,t,r,l);return"M ".concat(a.x," ").concat(a.y," A ").concat(r," ").concat(r," 0 ").concat(+(l-n>180)," 1 ").concat(s.x," ").concat(s.y)}function eU(e,t,r,n,l,a){let s=eB(e,t,r,l),i=eB(e,t,r,a),o=eB(e,t,n,l),c=eB(e,t,n,a),d=+(a-l>180);return["M ".concat(s.x," ").concat(s.y),"A ".concat(r," ").concat(r," 0 ").concat(d," 1 ").concat(i.x," ").concat(i.y),"L ".concat(c.x," ").concat(c.y),"A ".concat(n," ").concat(n," 0 ").concat(d," 0 ").concat(o.x," ").concat(o.y),"Z"].join(" ")}function eH(e){let{positiveValue:t,negativeValue:r,size:n=40,positiveIcon:l,negativeIcon:s,neutralIcon:i,className:d}=e,u=(0,o.useMemo)(()=>t>r?"positive":r>t?"negative":"neutral",[t,r]),{positiveArc:m,negativeArc:h,showOnlyPositive:p,showOnlyNegative:x}=(0,o.useMemo)(()=>{let e=t+r;if(0===e)return{positiveArc:{start:7.5,end:172.5},negativeArc:{start:187.5,end:352.5},showOnlyPositive:!1,showOnlyNegative:!1};if(0===t)return{positiveArc:{start:0,end:0},negativeArc:{start:0,end:360},showOnlyPositive:!1,showOnlyNegative:!0};if(0===r)return{positiveArc:{start:0,end:360},negativeArc:{start:0,end:0},showOnlyPositive:!0,showOnlyNegative:!1};let n=t/e,l=330*n,a=(1-n)*330;return t>0&&l<30&&(l=30,a=300),r>0&&a<30&&(a=30,l=300),{positiveArc:{start:7.5,end:7.5+l},negativeArc:{start:7.5+l+15,end:7.5+l+15+a},showOnlyPositive:!1,showOnlyNegative:!1}},[t,r]),f=n/2,g=(n-3)/2,v=g-1.5,b=.28*n,w=(0,o.useMemo)(()=>{switch(u){case"positive":return l;case"negative":return s;default:return i}},[u,l,s,i]),j=(0,o.useMemo)(()=>{switch(u){case"positive":return eO.positiveIcon;case"negative":return eO.negativeIcon;default:return eO.neutralIcon}},[u]),y=eO.positive,N=eO.negative;return(0,c.jsxs)("div",{className:(0,a.v)("relative shrink-0",d),style:{width:n,height:n},children:[(0,c.jsxs)("svg",{width:n,height:n,viewBox:"0 0 ".concat(n," ").concat(n),children:[p&&(0,c.jsx)("circle",{cx:f,cy:f,r:(v+b)/2,fill:"none",stroke:eO.positive,strokeWidth:v-b,opacity:.1}),x&&(0,c.jsx)("circle",{cx:f,cy:f,r:(v+b)/2,fill:"none",stroke:eO.negative,strokeWidth:v-b,opacity:.1}),t>0&&!p&&(0,c.jsx)("path",{d:eU(f,f,v,b,m.start,m.end),fill:eO.positive,opacity:.1}),r>0&&!x&&(0,c.jsx)("path",{d:eU(f,f,v,b,h.start,h.end),fill:eO.negative,opacity:.1}),p&&(0,c.jsx)("circle",{cx:f,cy:f,r:g,fill:"none",stroke:y,strokeWidth:3}),x&&(0,c.jsx)("circle",{cx:f,cy:f,r:g,fill:"none",stroke:N,strokeWidth:3}),!p&&!x&&(0,c.jsx)("path",{d:eV(f,f,g,m.start,m.end),stroke:y,strokeWidth:3,fill:"none",strokeLinecap:"round"}
1),!p&&!x&&(0,c.jsx)("path",{d:eV(f,f,g,h.start,h.end),stroke:N,strokeWidth:3,fill:"none",strokeLinecap:"round"})]}),w&&(0,c.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",style:{color:j},children:(0,c.jsx)(w,{className:"size-3.5"})})]})}var eW=(0,d.F)("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"}}),eG=o.forwardRef((e,t)=>{let{className:r,variant:n,...l}=e;return(0,c.jsx)("div",{ref:t,role:"alert",className:(0,a.v)(eW({variant:n}),r),...l})});eG.displayName="Alert";var eK=o.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,c.jsx)("h5",{ref:t,className:(0,a.v)("text-md mb-2 font-medium leading-none tracking-tight",r),...n})});eK.displayName="AlertTitle";var eq=o.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,c.jsx)("div",{ref:t,className:(0,a.v)("text-sm [&_p]:leading-relaxed",r),...n})});eq.displayName="AlertDescription";var eZ={backgroundImage:"linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.2) 100%)",boxShadow:"inset 6px -5px 11px rgba(0,0,0,0.13), inset -18px -12px 19px rgba(255,255,255,0.4)"},eY={backgroundImage:"linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(0,0,0,0.2) 100%)",boxShadow:"inset 10px -12px 19px rgba(0,0,0,0.4), inset -18px -12px 19px rgba(255,255,255,0.4), inset 2px -1px 11px rgba(0,0,0,0.1)"};function eX(e){let{imageUrl:t,identifier:r,className:n}=e;if(t)return(0,c.jsx)("img",{src:t,alt:r,className:(0,a.v)("shrink-0 rounded-full",n)});let l=(0,a.x)(r);return(0,c.jsx)("div",{className:(0,a.v)("relative shrink-0 overflow-hidden rounded-full",n),style:{background:l.bg},role:"img","aria-label":r,children:(0,c.jsxs)("div",{className:"absolute left-0 top-0 h-full w-full",children:[(0,c.jsx)("div",{className:"absolute left-[30%] top-[22%] aspect-square w-[40%] rounded-full",style:{background:l.fg,...eZ}}),(0,c.jsx)("div",{className:"absolute left-[10%] top-[70%] h-[40%] w-[80%] rounded-t-full",style:{background:l.fg,...eY}})]})})}var eJ=(0,d.F)("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-200 bg-green-100 text-green-900",red:"border-red-100 bg-red-100 text-red-800",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-200 bg-amber-100 text-amber-800",rainbow:"bg-gradient-to-r from-violet-600 to-pink-600 text-white border-transparent",blueGradient:"bg-gradient-to-r from-blue-100 via-blue-100/50 to-blue-100 border border-blue-200 text-blue-900",amberGradient:"bg-gradient-to-r from-amber-100 via-amber-100/50 to-amber-100 border border-amber-200 text-amber-800",violetGradient:"bg-gradient-to-r from-violet-100 via-violet-100/50 to-violet-100 border border-violet-200 text-violet-900",neutralGradient:"bg-gradient-to-r from-neutral-100 via-neutral-100/50 to-neutral-100 border border-neutral-200 text-neutral-800"}},defaultVariants:{variant:"neutral"}});function eQ(e){let{className:t,variant:r,...n}=e;return(0,c.jsx)("span",{className:(0,a.v)(eJ({variant:r}),t),...n})}function e$(e){let[t,r]=(0,o.useState)(),n=e=>{let[t]=e;r(t)};return(0,o.useEffect)(()=>{let t=null==e?void 0:e.current;if(!t)return;let r=new ResizeObserver(n);return r.observe(t),()=>r.disconnect()},[e]),t}function e0(e){let{direction:t="vertical"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[r,n]=(0,o.useState)(1),l=(0,o.useCallback)(()=>{if(!e.current)return;let r="vertical"===t?e.current.scrollTop:e.current.scrollLeft,l="vertical"===t?e.current.scrollHeight:e.current.scrollWidth,a="vertical"===t?e.current.clientHeight:e.current.clientWidth;n(l===a?1:Math.min(r/(l-a),1))},[t]),a=e$(e);return(0,o.useEffect)(l,[a]),{scrollProgress:r,updateScrollProgress:l}}var e1=o.forwardRef((e,t)=>
1{let{className:r,type:l,...s}=e,[i,d]=(0,o.useState)(!1),u=(0,o.useCallback)(()=>d(!i),[i,d]);return(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"relative flex",children:[(0,c.jsx)("input",{type:i?"text":l,className:(0,a.v)("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",s.error&&"border-red-500 focus:border-red-500 focus:ring-red-500",r),ref:t,...s}),(0,c.jsxs)("div",{className:"group",children:[s.error&&(0,c.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex flex-none items-center px-2.5",children:(0,c.jsx)(C.A,{className:(0,a.v)("size-5 text-white","password"===l&&"transition-opacity group-hover:opacity-0"),fill:"#ef4444"})}),"password"===l&&(0,c.jsx)("button",{className:(0,a.v)("absolute inset-y-0 right-0 flex items-center px-3",s.error&&"opacity-0 transition-opacity group-hover:opacity-100"),type:"button",onClick:()=>u(),"aria-label":i?"Hide password":"Show Password",children:i?(0,c.jsx)(n.fc,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0}):(0,c.jsx)(n.gc,{className:"size-4 flex-none text-neutral-500 transition hover:text-neutral-700","aria-hidden":!0})})]})]}),s.error&&(0,c.jsx)("span",{className:"mt-2 block text-sm text-red-500",role:"alert","aria-live":"assertive",children:s.error})]})});e1.displayName="Input";var e2=(e,t)=>e?{onClick:r=>{(0,a.r)(r)||(r.metaKey||r.ctrlKey?window.open(e,"_blank"):t.push(e))},onAuxClick:t=>{(0,a.r)(t)||window.open(e,"_blank")},role:"link",tabIndex:0,onKeyDown:r=>r.target===r.currentTarget&&"Enter"===r.key&&t.push(e)}:{};function e4(e){try{let t=window.localStorage.getItem(e);if(t)return JSON.parse(t)}catch(e){}return null}function e3(e,t){var r;let[n,l]=(0,o.useState)(null!=(r=e4(e))?r:t);return(0,o.useEffect)(()=>{let t=e4(e);t&&l(t)},[e]),[n,t=>{l(t);try{window.localStorage.setItem(e,JSON.stringify(t))}catch(e){}}]}function e5(e,t){if(t&&"object"==typeof t&&Array.isArray(t.all)&&Array.isArray(t.defaultVisible)){let[r,n]=e3(e,Object.fromEntries(t.all.map(e=>[e,t.defaultVisible.includes(e)])));return{columnVisibility:r,setColumnVisibility:e=>{let l=t.all,a=r||{};n(Object.fromEntries(l.map(t=>{var r;return[t,t in e?e[t]:null!=(r=a[t])&&r]})))}}}{let[r,n]=e3(e,Object.fromEntries(Object.keys(t).map(e=>{let r;return[e,Object.fromEntries((r=t[e]).all.map(e=>[e,r.defaultVisible.includes(e)]))]})));return{columnVisibility:r,setColumnVisibility:(e,l)=>{let a=t[e].all,s=r[e]||{},i=Object.fromEntries(a.map(e=>{var t;return[e,e in l?l[e]:null!=(t=s[e])&&t]}));n({...r,[e]:i})}}}}function e6(e,t,r){let[n,l]=(0,o.useState)(()=>{let r=M.A.get(e);return r?JSON.parse(r):t});return(0,o.useEffect)(()=>{let t=()=>{let t=M.A.get(e);t&&l(JSON.parse(t))};return window.addEventListener("storage",t),()=>{window.removeEventListener("storage",t)}},[e]),[n,t=>{l(t),M.A.set(e,JSON.stringify(t),r)}]}var e9=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:3e3,t=(0,o.useRef)(null),[r,n]=(0,o.useState)(!1),l=()=>{t.current&&(clearTimeout(t.current),t.current=null)},a=(0,o.useCallback)(async function(r){let{onSuccess:a,throwOnError:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l();try{"string"==typeof r?await navigator.clipboard.writeText(r):r instanceof ClipboardItem&&await navigator.clipboard.write([r]),n(!0),null==a||a(),Number.isFinite(e)&&e>=0&&(t.current=setTimeout(()=>n(!1),e))}catch(e){if(console.error("Failed to copy: ",e),s)throw e}},[e]);return(0,o.useEffect)(()=>()=>l(),[]),[r,a]};function e8(){let[e,t]=(0,o.useState)(null);return(0,o.useEffect)(()=>{let e=document.querySelector("[data-mdx-container]");if(!e)return;let r=e.offsetTop-1,n=new IntersectionObserver(e=>{var n,a,s;let i=e[0];if(!i)return;let o=.3*((null==(n=i.rootBounds)?void 0:n.height)||0)+r;for(let t=1;t<e.length;t++){let n=e[t];if(!n)break;(n.boundingClientRect.top<i.boundingClientRect.top||i.boundingClientRect.bottom<r)&&(i=n)}let c=i.target;for(;c&&c.getBoundingClientRect().bottom<r;)c=null==(a=l.get(c))?void 0:a.next;for(;c&&c.getBoundingClientRect().top>o;)c=null==(s=l.get(c))?void 0:s.prev;c&&t(c.getAttribute("href"))},{threshold:1,rootMargin:"-".concat(r,"px 0px 0px 0px")}),l=new Map;return(null==e?void 0:e.querySelectorAll("[data-mdx-heading]")).forEac
1h(e=>n.observe(e)),()=>{n.disconnect()}},[]),null==e?void 0:e.replace("#","")}function e7(){let e=(0,R.usePathname)();return{product:(0,o.useMemo)(()=>"links"===e.split("/")[2]?"links":"program",[e])}}function te(){let[e,t]=(0,o.useState)(null);return(0,o.useEffect)(()=>{let e=window.location.hostname;a.f.has(e)?t("partners"):a.e.has(e)?t("admin"):t("app")},[]),{subdomain:e}}function tt(e){return{handleKeyDown:(0,o.useCallback)(t=>{if("Enter"===t.key&&t.metaKey){if(t.preventDefault(),null!=e&&e.current)return void e.current.requestSubmit();let r=t.target.form;null==r||r.requestSubmit()}},[])}}function tr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{root:r,defaultValue:n}=t,[l,a]=(0,o.useState)(null!=n&&n);return(0,o.useEffect)(()=>{let t=()=>{let t=e.current;if(!t)return;let n=null==r?void 0:r.current,l=t.getBoundingClientRect(),s=n?n.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};a(l.top<s.bottom&&l.bottom>s.top&&l.left<s.right&&l.right>s.left)};((null==r?void 0:r.current)||window).addEventListener("scroll",t),window.addEventListener("resize",t);let n=null;return e.current&&(n=new IntersectionObserver(t)).observe(e.current),t(),()=>{((null==r?void 0:r.current)||window).removeEventListener("scroll",t),window.removeEventListener("resize",t),null==n||n.disconnect()}},[e,r]),l}function tn(){let[e,t]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=()=>{let e=document.activeElement;t((null==e?void 0:e.tagName)!=null&&["INPUT","TEXTAREA"].includes(e.tagName))};return window.addEventListener("focusin",e),window.addEventListener("focusout",e),()=>{window.removeEventListener("focusin",e),window.removeEventListener("focusout",e)}},[]),e}function tl(e){let{threshold:t=0,root:r=null,rootMargin:n="0%",freezeOnceVisible:l=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[a,s]=(0,o.useState)(),i=(null==a?void 0:a.isIntersecting)&&l,c=e=>{let[t]=e;s(t)};return(0,o.useEffect)(()=>{let l=null==e?void 0:e.current;if(!window.IntersectionObserver||i||!l)return;let a=new IntersectionObserver(c,{threshold:t,root:r,rootMargin:n});return a.observe(l),()=>a.disconnect()},[e,JSON.stringify(t),r,n,i]),a}var ta=(0,o.createContext)({listeners:[],setListeners:()=>{}});function ts(e){let{children:t}=e,[r,n]=(0,o.useState)([]);return(0,c.jsx)(ta.Provider,{value:{listeners:r,setListeners:n},children:t})}function ti(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=(0,o.useId)(),{listeners:l,setListeners:s}=(0,o.useContext)(ta),i=(0,o.useCallback)(s=>{if(!1===r.enabled||s.defaultPrevented)return;let i=s.target,o=document.getElementById("modal-backdrop"),c=document.querySelector("[data-sheet-overlay]");if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||i.isContentEditable||!!o!=!!r.modal||!!c!=!!r.sheet)return;let d=[...s.metaKey?["meta"]:[],...s.ctrlKey?["ctrl"]:[],...s.altKey?["alt"]:[],s.key].join("+");if(Array.isArray(e)?!e.includes(d):d!==e)return;let u=l.filter(e=>!1!==e.enabled&&!!o==!!e.modal&&!!c==!!e.sheet&&(Array.isArray(e.key)?e.key.includes(d):e.key===d));u.length&&(0,a.p)(u,(e,t)=>{var r,n;return(null!=(r=t.priority)?r:0)-(null!=(n=e.priority)?n:0)})[0].id===n&&(s.preventDefault(),t(s))},[e,l,n,t,r.enabled,r.modal,r.sheet]);(0,o.useEffect)(()=>(document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)),[i]),(0,o.useEffect)(()=>(s(t=>[...t.filter(e=>e.id!==n),{id:n,key:e,...r}]),()=>s(e=>e.filter(e=>e.id!==n))),[JSON.stringify(e),r.enabled,r.priority])}var to=o.useLayoutEffect;function tc(e){let t=(0,o.useRef)(e);return to(()=>{t.current=e}),(0,o.useCallback)(function(){for(var e,r=arguments.length,n=Array(r),l=0;l<r;l++)n[l]=arguments[l];return null==(e=t.current)?void 0:e.call(t,...n)},[])}function td(e,t){let{data:r,isLoading:n,mutate:l}=(0,D.Ay)(e,a.t);return{data:r,isLoading:n,update:async(e,n)=>E.o.promise(l(e(r),{optimisticData:n,rollbackOnError:!0,populateCache:!0,revalidate:!0}),{loading:(null==t?void 0:t.loading)||"Updating...",success:(null==t?void 0:t.success)||"Successfully updated",error:(null==t?void 0:t.error)||"Failed to update"})}}function tu(e){let{pageSize:t,page:r,onPageChange:n}=e,[l,a]=(0,o.useState)({pageIndex:r,pageSize:t});return(0,o.useEffect)(()=>{a(e=>({...e,pageIndex:r}))},[r]),(0,o.useEffect)(()=>{null==n||n(l.pageIndex)},[l]),{pagination:l,setPagination:a}}var tm="dub-dashboard-main-scroll",th=null;function tp(){let e=th;return th=null,e}function tx(){let e=(0,R.usePathname)(),t=(0,R.useRouter)(),r=(0,R.useSearchParams)(),n=Object.fromEntries(r),l=(0,o.useCallback)(n=>
1{let{set:l,del:a,replace:s,scroll:i=!1,getNewPath:o,arrayDelimiter:c=","}=n,d=new URLSearchParams(r);l&&Object.entries(l).forEach(e=>{let[t,r]=e;return d.set(t,Array.isArray(r)?r.join(c):r)}),a&&(Array.isArray(a)?a.forEach(e=>d.delete(e)):d.delete(a));let u=d.toString(),m="".concat(e).concat(u.length>0?"?".concat(u):"");if(o)return m;if(!1===i&&"u">typeof document){let e=document.getElementById(tm);e&&(th=e.scrollTop)}s?t.replace(m,{scroll:!1}):t.push(m,{scroll:i})},[r,e,t]);return{pathname:e,router:t,searchParams:r,searchParamsObj:n,queryParams:l,getQueryString:(e,t)=>{let n=new URLSearchParams(r);if((null==t?void 0:t.include)&&Array.isArray(t.include)){let e=new URLSearchParams;r.forEach((r,n)=>{var l;null!=(l=t.include)&&l.includes(n)&&e.set(n,r)}),n=e}(null==t?void 0:t.exclude)&&Array.isArray(t.exclude)&&t.exclude.forEach(e=>n.delete(e)),e&&Object.entries(e).forEach(e=>{let[t,r]=e;return n.set(t,r)});let l=n.toString();return l.length>0?"?".concat(l):""}}}function tf(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.i,{searchParams:t,queryParams:r}=tx(),{pagination:n,setPagination:l}=tu({pageSize:e,page:(0,o.useMemo)(()=>parseInt(t.get("page")||"1")||1,[t.get("page")]),onPageChange:e=>{r(1===e?{del:"page"}:{set:{page:e.toString()}})}});return(0,o.useEffect)(()=>{let e=parseInt(t.get("page")||"1")||1;l(t=>({...t,pageIndex:e}))},[t.get("page")]),(0,o.useEffect)(()=>{r(1===n.pageIndex?{del:"page"}:{set:{page:n.pageIndex.toString()}})},[n]),{pagination:n,setPagination:l}}function tg(){(0,o.useEffect)(()=>{let e=new URL(window.location.href);e.searchParams.has("_gl")&&setTimeout(()=>{e.searchParams.delete("_gl"),window.history.replaceState({},"",e.toString())},2e3)},[])}function tv(e){let{container:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},[r,n]=(0,o.useState)(!1),l=(0,o.useCallback)(()=>{n((null!=t&&t.current?t.current.scrollTop:window.scrollY)>e)},[e]);return(0,o.useEffect)(()=>{var e;let r=null!=(e=null==t?void 0:t.current)?e:window;return r.addEventListener("scroll",l),()=>r.removeEventListener("scroll",l)},[l]),(0,o.useEffect)(()=>
1{l()},[l]),r}function tb(e){let{id:t,message:r,undo:l}=e,a=()=>{l(),E.o.dismiss(t)},s=e=>{"z"===e.key&&(e.ctrlKey||e.metaKey)&&a()};return(0,o.useEffect)(()=>(document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)),[]),(0,c.jsxs)("div",{className:"flex w-full items-center justify-between space-x-2",children:[(0,c.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,c.jsx)(n.t,{}),(0,c.jsx)("p",{className:"font-medium",children:r})]}),(0,c.jsx)("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:a,children:"Undo"})]})}function tw(){return e=>{let{id:t,message:r,undo:n,duration:l}=e;return(0,E.o)((0,c.jsx)(tb,{id:t,message:r,undo:n}),{id:t,...l&&{duration:l}})}}function tj(e){let{children:t,content:r,align:n="center",side:s="bottom",openPopover:i,setOpenPopover:o,mobileOnly:d,forceDropdown:u,popoverContentClassName:m,onOpenAutoFocus:h,onCloseAutoFocus:p,collisionBoundary:x,sticky:f,onEscapeKeyDown:g,onWheel:v,sideOffset:b=8,collisionPadding:w,anchor:j,virtualAnchorRef:y}=e,{isMobile:N}=(0,l.a)();return!u&&(d||N)?(0,c.jsxs)(P._s.Root,{open:i,onOpenChange:o,children:[(0,c.jsx)(P._s.Trigger,{className:"sm:hidden",asChild:!0,children:t}),(0,c.jsxs)(P._s.Portal,{children:[(0,c.jsx)(P._s.Overlay,{className:"bg-bg-subtle fixed inset-0 z-50 bg-opacity-10 backdrop-blur"}),(0,c.jsxs)(P._s.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:g,onPointerDownOutside:e=>{e.target instanceof Element&&e.target.closest("[data-sonner-toast]")&&e.preventDefault()},children:[(0,c.jsx)("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:(0,c.jsx)("div",{className:"bg-border-default my-3 h-1 w-12 rounded-full"})}),(0,c.jsx)("div",{className:"bg-bg-default flex w-full items-center justify-center overflow-hidden pb-4 align-middle shadow-xl",children:r})]}),(0,c.jsx)(P._s.Overlay,{})]})]}):(0,c.jsxs)(S.bL,{open:i,onOpenChange:o,children:[j&&"u">typeof document&&(0,A.createPortal)((0,c.jsx)(S.Mz,{asChild:!0,children:j}),document.body),y&&(0,c.jsx)(S.Mz,{virtualRef:y}),(0,c.jsx)(S.l9,{className:"sm:inline-flex",asChild:!0,children:t}),(0,c.jsx)(S.ZL,{children:(0,c.jsx)(S.UC,{sideOffset:b,align:n,side:s,className:(0,a.v)("animate-slide-up-fade border-border-subtle bg-bg-default z-50 items-center rounded-lg border drop-shadow-lg sm:block",m),sticky:f,collisionBoundary:x,collisionPadding:w,onOpenAutoFocus:h,onCloseAutoFocus:p,onEscapeKeyDown:g,onWheel:v,children:r})})]})}function ty(e){var t,r,n;let{node:l,editor:s,updateAttributes:i,extension:d,selected:u}=e,[m,h]=(0,o.useState)(!1),[p,f]=(0,o.useState)(null!=(r=l.attrs.alt)?r:""),g=(0,o.useRef)(null),v=d.options.HTMLAttributes,b=!!(null==(t=l.attrs.alt)?void 0:t.trim()),w=s.isEditable;(0,o.useEffect)(()=>{var e;f(null!=(e=l.attrs.alt)?e:"")},[l.attrs.alt]),(0,o.useEffect)(()=>{w||h(!1)},[w]);let j=(0,o.useCallback)(e=>{s.isEditable&&i({alt:e.trim()||null})},[s,i]);return(0,c.jsx)(x.VR,{as:"div",className:"mx-auto block w-fit max-w-full leading-none [&.ProseMirror-selectednode]:outline-none",children:(0,c.jsxs)("div",{className:(0,a.v)("group relative w-fit max-w-full rounded-lg",u&&"ring-2 ring-blue-500 ring-offset-2"),children:[(0,c.jsx)("img",{src:l.attrs.src,alt:l.attrs.alt||"",title:null!=(n=l.attrs.title)?n:void 0,draggable:!0,"data-drag-handle":!0,...l.attrs.href?{"data-linked-image":""}:{},className:(0,a.v)(null==v?void 0:v.class,"block")}),w&&(0,c.jsx)("div",{className:(0,a.v)("absolute bottom-2 right-2 z-10 transition-opacity duration-150",b||m?"opacity-100":"pointer-events-none opacity-0 group-hover:pointer-events-auto group-hover:opacity-100"),contentEditable:!1,children:(0,c.jsx)(tj,{openPopover:m,setOpenPopover:h,align:"end",side:"bottom",sideOffset:6,forceDropdown:!0,onOpenAutoFocus:e=>{var t;e.preventDefault(),null==(t=g.current)||t.focus()},content:(0,c.jsxs)("div",{className:"w-72 p-3",children:[(0,c.jsx)("p",{className:"text-content-subtle mb-1 text-xs leading-relaxed",children:"Add alt text to de
1scribe this image. This makes your email more accessible and could increase your delivery rates."}),(0,c.jsx)(e1,{ref:g,type:"text",value:p,placeholder:"Alt text",onChange:e=>f(e.target.value),onBlur:()=>j(p),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),j(p),h(!1))},className:"max-w-none"})]}),children:(0,c.jsx)(rt,{type:"button",variant:"secondary",text:"Alt",className:"h-7 w-auto px-2.5 text-xs",onMouseDown:e=>{e.preventDefault(),e.stopPropagation()}})})})]})})}var tN=g.Ay.extend({addOptions(){var e;return{...null==(e=this.parent)?void 0:e.call(this),imageAltControls:!1}},addNodeView(){let{imageAltControls:e}=this.options;return e?(0,x.gu)(ty):null},addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),href:{default:null,parseHTML:e=>{let t=e.closest("a"),r=null==t?void 0:t.getAttribute("href");return(0,a.a)(r)?r:null},renderHTML:()=>({})}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])',getAttrs:e=>{if(!(e instanceof HTMLElement))return!1;let t=e.closest("a"),r=null==t?void 0:t.getAttribute("href");return{src:e.getAttribute("src"),alt:e.getAttribute("alt"),title:e.getAttribute("title"),width:e.getAttribute("width"),height:e.getAttribute("height"),href:(0,a.a)(r)?r:null}}}]},renderHTML(e){let{HTMLAttributes:t,node:r}=e,n=(0,a.a)(r.attrs.href)?r.attrs.href:null;return["img",{...this.options.HTMLAttributes,...t,...n?{"data-linked-image":""}:{}}]},addProseMirrorPlugins(){var e,t;return[...null!=(t=null==(e=this.parent)?void 0:e.call(this))?t:[],new k.k_({key:new k.hs("campaignEditorImageLinkClick"),props:{handleDOMEvents:{mousedown:(e,t)=>{if(!e.editable||!(t instanceof MouseEvent)||!t.metaKey&&!t.ctrlKey)return!1;let r=t.target;if(!(r instanceof Element))return!1;let n=r.closest("img[data-linked-image]");if(!n||!e.dom.contains(n))return!1;let l=e.posAtDOM(n,0),s=e.state.doc.nodeAt(l),i=null==s?void 0:s.attrs.href;return!!(0,a.a)(i)&&(t.preventDefault(),window.open(i,"_blank","noopener,noreferrer"),!0)}}}})]}});function tk(){let{editor:e,linkModalState:t}=tY(),[r,n]=(0,o.useState)(null);return(0,o.useEffect)(()=>{if(!e)return;let t=e.view.dom,r=e=>{var r;let l=e.target instanceof Element?e.target.closest("a[href]"):null;l&&t.contains(l)&&n({href:null!=(r=l.getAttribute("href"))?r:"",rect:l.getBoundingClientRect()})},l=e=>{let t=e.target instanceof Element?e.target.closest("a[href]"):null,r=e.relatedTarget instanceof Element?e.relatedTarget.closest("a[href]"):null;t&&t!==r&&n(null)},a=()=>n(null);return t.addEventListener("mouseover",r),t.addEventListener("mouseout",l),window.addEventListener("scroll",a,!0),()=>{t.removeEventListener("mouseover",r),t.removeEventListener("mouseout",l),window.removeEventListener("scroll",a,!0)}},[e]),!r||t?null:(0,A.createPortal)((0,c.jsx)("div",{className:"pointer-events-none fixed z-[99] -translate-x-1/2 -translate-y-full",style:{left:r.rect.left+r.rect.width/2,top:r.rect.top-8},children:(0,c.jsx)("div",{className:"animate-slide-up-fade border-border-default bg-bg-default text-content-default max-w-[200px] break-all rounded-xl border px-2.5 py-1.5 text-xs shadow-sm",children:r.href})}),document.body)}function tC(e){let{children:t,className:r,showModal:n,setShowModal:s,onClose:i,desktopOnly:o,preventDefaultClose:d,drawerRootProps:u}=e,m=(0,R.useRouter)(),h=function(){let{dragged:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d&&!e||(i&&i(),s?s(!1):m.back())},{isMobile:p}=(0,l.a)();return p&&!o?(0,c.jsx)(P._s.Root,{open:!s||n,onOpenChange:e=>{e||h({dragged:!0})},...u,children:(0,c.jsxs)(P._s.Portal,{children:[(0,c.jsx)(P._s.Overlay,{className:"fixed inset-0 z-50 bg-neutral-100 bg-opacity-10 backdrop-blur"}),(0,c.jsx)(P._s.Content,{onPointerDownOutside:e=>{e.target instanceof Element&&e.target.closest("[data-sonner-toast]")&&e.preventDefault()},className:(0,a.v)("fixed bottom-0 left-0 right-0 z-50 flex flex-col","rounded-t-[10px] border-t border-neutral-200 bg-white",r,"max-w-none"),children:(0,c.jsxs)("div",{className:"scrollbar-hide flex-1 overflow-y-auto rounded-t-[10px] bg-inherit",children:[(0,c.jsxs)(z.bL,{children:[(0,c.jsx)(P._s.Title,{children:"Modal"}),(0,c.jsx)(P._s.Description,{children:"This is a modal"})]}),(0,c.jsx)(tS,{}),t]})}),(0,c.jsx)(P._s.Overlay,{})]})}):(0,c.jsx)(L.bL,{open:!s||n,onOpenChange:e=>{e||h()},children:(0,c.jsxs)(L.ZL,{children:[(0,c.jsx)(L.hJ,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-neutral-100 bg-opacity-50 backdrop-blur-md"}),(0,c.jsxs)(L.UC,{onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),onPointerDownOutside:e=>{e.target instanceof Element&&e.target.closest("[data-sonner-toast]")&&e.preventDefault()},className:(0,a.v)("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",r),children:[(0,c.jsxs)(z.bL,{children:[(0,c.jsx)(L.hE,{children:"Modal"}),(0,c.jsx)(L.VY,{children:"This is a modal"})]}),t]})]})})}function tS(){return(0,c.jsx)("div",{className:"sticky top-0 z-20 flex items-center justify-center rounded-t-[10px] bg-inherit",children:(0,c.jsx)("div",{className:"my-3 h-1 w-12 rounded-full bg-neutral-300"})})}function tA(e){let t=e.trim();return!t||(0,a.a)(t)||/^(https?:\/\/|mailto:)/i.test(t)?t:"https://".concat(t)}function tP(){let{linkModalState:e}=tY();return e?(0,c.jsx)(tM,{state:e}):null}function tM(e){let{state:t}=e,{editor:r,setLinkModalState:n}=tY(),{isMobile:s}=(0,l.a)(),[i,d]=(0,o.useState)(t.text),[u,m]=(0,o.useState)(t.href),h=!!t.href,p=()=>{n(null),setTimeout(()=>
1null==r?void 0:r.commands.focus(),0)};return(0,c.jsxs)(tC,{showModal:!0,setShowModal:()=>p(),children:[(0,c.jsx)("div",{className:"border-b border-neutral-200 px-6 py-4",children:(0,c.jsx)("h3",{className:"text-lg font-medium",children:h?"Edit link":"Add link"})}),(0,c.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),e.stopPropagation(),!r)return;let l=tA(u);if(!(0,a.a)(l))return void E.o.error("Enter a full URL starting with http://, https://, or mailto: (e.g. https://dub.co).");let s=i.trim(),o=r.chain().focus().setTextSelection({from:t.from,to:t.to});s&&s===t.text.trim()?o.setLink({href:l}):o.insertContent([{type:"text",text:s||l,marks:[{type:"link",attrs:{href:l}}]}]),o.run(),n(null)},className:"bg-neutral-50 sm:rounded-b-2xl",autoComplete:"off",children:[(0,c.jsxs)("div",{className:"flex flex-col gap-6 px-6 py-6",children:[(0,c.jsxs)("label",{children:[(0,c.jsx)("span",{className:"block text-sm font-medium text-neutral-700",children:"Text"}),(0,c.jsx)("input",{type:"text",value:i,autoFocus:!s,onChange:e=>d(e.target.value),className:"mt-2 block w-full rounded-md border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm"})]}),(0,c.jsxs)("label",{children:[(0,c.jsx)("span",{className:"block text-sm font-medium text-neutral-700",children:"Link"}),(0,c.jsx)("input",{type:"text",value:u,placeholder:"https://dub.co",onChange:e=>m(e.target.value),onBlur:()=>m(e=>tA(e)),className:"mt-2 block w-full rounded-md border-neutral-300 text-neutral-900 placeholder-neutral-400 focus:border-neutral-500 focus:outline-none focus:ring-neutral-500 sm:text-sm"})]})]}),(0,c.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-neutral-200 px-6 py-4",children:[h?(0,c.jsx)(rt,{variant:"outline",text:"Delete link",onClick:()=>{r&&(r.chain().focus().setTextSelection({from:t.from,to:t.to}).unsetLink().run(),n(null))},className:"h-9 w-fit px-4"}):(0,c.jsx)("div",{}),(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)(rt,{variant:"secondary",text:"Cancel",onClick:p,className:"h-9 w-fit px-4"}),(0,c.jsx)(rt,{variant:"primary",text:"Save",disabled:!u.trim(),className:"h-9 w-fit px-4"})]})]})]})]})}var tR="data-table-controls";function tE(){var e,t;let{editor:r,editable:l}=tY(),[a,s]=(0,o.useState)(null),[i,d]=(0,o.useState)(null),[,u]=(0,o.useState)(0);if((0,o.useEffect)(()=>{if(!r||!1===l)return;let e=()=>u(e=>e+1),t=r.view.dom,n=e=>{let r=document.elementFromPoint(e.clientX,e.clientY);r instanceof Element&&r.closest("[".concat(tR,"]"))||i||s(function(e,t,r){let n=r.getBoundingClientRect();for(let s of r.querySelectorAll("table")){var l,a;if(!(s instanceof HTMLTableElement))continue;let r=s.getBoundingClientRect(),i=t_(r,n);if(!i||!(e>=i.left-10&&e<=i.right+10&&t>=i.top-10&&t<=i.bottom+10))continue;let o=Math.abs(t-r.bottom),c=Math.abs(e-r.right),d=Math.abs(e-r.left),u=Math.abs(t-r.top),m=e>=i.left&&e<=i.right,h=t>=i.top&&t<=i.bottom,p=r.bottom>=n.top&&r.bottom<=n.bottom,x=r.right>=n.left&&r.right<=n.right,f=r.left>=n.left&&r.left<=n.right,g=r.top>=n.top&&r.top<=n.bottom;if(p&&m&&o<=10&&o<=c)return{kind:"add-row",table:s};if(x&&h&&c<=10&&c<=o)return{kind:"add-col",table:s};if(f&&h&&d<=10&&d<c){let e=null!=(l=[...s.rows].find(e=>{let r=e.getBoundingClientRect();return t>=r.top&&t<=r.bottom}))?l:null,r=null==e?void 0:e.cells[0];if(e&&r)return{kind:"row",table:s,row:e,cell:r}}if(g&&m&&u<=10&&u<o){let t=s.rows[0],r=t&&null!=(a=[...t.cells].find(t=>{let r=t.getBoundingClientRect();return e>=r.left&&e<=r.right}))?a:null;if(r)return{kind:"col",table:s,cell:r}}}return null}(e.clientX,e.clientY,t))};return document.addEventListener("mousemove",n),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),r.on("update",e),()=>{document.removeEventListener("mousemove",n),window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e),r.off("update",e)}},[r,l,i]),(0,o.useEffect)(()=>{if(!i)return;let e=e=>{e.target instanceof Element&&e.target.closest("[".concat(tR,"]"))||d(null)},t=e=>{"Escape"===e.key&&d(null)};return document.addEventListener("pointerdown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("pointerdown",e),document.removeEventListener("keydown",t)}},[i]),!r||!1===l||!(null!=a&&a.table.isConnected))return null;let m=a.table.getBoundingClientRect(),h=t_(m,r.view.dom.getBoundingClientRect()),p=(e,t)=>{r.chain().focus().setTextSelection(e).run(),t(),d(null),s(null)},x=null==(e=a.table.rows[a.table.rows.length-1])?void 0:e.cells[0],f=null==(t=a.table.rows[0])?void 0:t.cells[a.table.rows[0].cells.length-1],g=h&&{x:h.left+h.width/2,y:m.bottom},v=h&&{x:m.right,y:h.top+h.height/2},b=null;if(i&&"row"===a.kind){let e=a.row.getBoundingClientRect();b={top:e.top+e.height/2,left:m.left-16}}else if(i&&"col"===a.kind){let e=tF(a.table,a.cell.cellIndex);e&&(b={top:m.top-16,left:e.left+e.width/2})}return(0,A.createPortal)((0,c.jsxs)("div",{className:"pointer-events-none fixed inset-0 z-[99]",children:["add-row"===a.kind&&x&&g&&(0,c.jsx)(tz,{label:"Add row",style:{to
1p:g.y,left:g.x,transform:"translate(-50%, -50%)"},onClick:()=>p(tT(r,x),()=>r.chain().focus().addRowAfter().run()),children:(0,c.jsx)(n.Rd,{className:"size-3.5"})}),"add-col"===a.kind&&f&&v&&(0,c.jsx)(tz,{label:"Add column",style:{top:v.y,left:v.x,transform:"translate(-50%, -50%)"},onClick:()=>p(tT(r,f),()=>r.chain().focus().addColumnAfter().run()),children:(0,c.jsx)(n.Rd,{className:"size-3.5"})}),"row"===a.kind&&(0,c.jsx)(tD,{editor:r,zone:a,menu:i,setMenu:d}),"col"===a.kind&&(0,c.jsx)(tL,{editor:r,zone:a,menu:i,setMenu:d}),i&&b&&(0,c.jsx)("div",{"data-table-controls":"",className:"pointer-events-auto absolute min-w-36 rounded-lg border border-neutral-200 bg-white p-1 shadow-md",style:{top:b.top,left:b.left,transform:"row"===i.kind?"translate(-100%, -50%)":"translate(-50%, -100%)"},children:"row"===i.kind?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(tI,{onClick:()=>p(i.cellPos,()=>r.chain().focus().addRowBefore().run()),children:"Insert row above"}),(0,c.jsx)(tI,{onClick:()=>p(i.cellPos,()=>r.chain().focus().addRowAfter().run()),children:"Insert row below"}),(0,c.jsx)(tI,{danger:!0,onClick:()=>p(i.cellPos,()=>r.chain().focus().deleteRow().run()),children:"Delete row"}),(0,c.jsx)("div",{className:"my-1 h-px bg-neutral-200"}),(0,c.jsx)(tI,{danger:!0,onClick:()=>p(i.cellPos,()=>r.chain().focus().deleteTable().run()),children:"Delete table"})]}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(tI,{onClick:()=>p(i.cellPos,()=>r.chain().focus().addColumnBefore().run()),children:"Insert column left"}),(0,c.jsx)(tI,{onClick:()=>p(i.cellPos,()=>r.chain().focus().addColumnAfter().run()),children:"Insert column right"}),(0,c.jsx)(tI,{danger:!0,onClick:()=>p(i.cellPos,()=>r.chain().focus().deleteColumn().run()),children:"Delete column"}),(0,c.jsx)("div",{className:"my-1 h-px bg-neutral-200"}),(0,c.jsx)(tI,{danger:!0,onClick:()=>p(i.cellPos,()=>r.chain().focus().deleteTable().run()),children:"Delete table"})]})})]}),document.body)}function tD(e){let{editor:t,zone:r,menu:l,setMenu:a}=e,s=r.table.getBoundingClientRect(),i=r.row.getBoundingClientRect();
1return(0,c.jsx)(tz,{label:"Row options",style:{top:i.top+i.height/2,left:s.left,transform:"translate(-50%, -50%)"},active:(null==l?void 0:l.kind)==="row",onClick:()=>{let e=tT(t,r.cell);a((null==l?void 0:l.kind)==="row"?null:{kind:"row",cellPos:e})},children:(0,c.jsx)(n.Oc,{className:"size-3.5"})})}function tL(e){let{editor:t,zone:r,menu:l,setMenu:a}=e,s=r.table.getBoundingClientRect(),i=tF(r.table,r.cell.cellIndex);return i?(0,c.jsx)(tz,{label:"Column options",style:{top:s.top,left:i.left+i.width/2,transform:"translate(-50%, -50%)"},active:(null==l?void 0:l.kind)==="col",onClick:()=>{let e=tT(t,r.cell);a((null==l?void 0:l.kind)==="col"?null:{kind:"col",cellPos:e})},children:(0,c.jsx)(n.Oc,{className:"size-3.5 rotate-90"})}):null}function tz(e){let{label:t,style:r,active:n,onClick:l,children:s}=e;return(0,c.jsxs)("button",{type:"button",title:t,style:r,"data-table-controls":"",onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:l,className:(0,a.v)("pointer-events-auto absolute flex size-5 items-center justify-center rounded-md border bg-white text-neutral-500 shadow-sm","hover:bg-neutral-50 hover:text-neutral-800",n?"border-neutral-300 bg-neutral-50 text-neutral-800":"border-neutral-200"),children:[s,(0,c.jsx)("span",{className:"sr-only",children:t})]})}function tI(e){let{children:t,onClick:r,danger:n}=e;return(0,c.jsx)("button",{type:"button",onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:r,className:(0,a.v)("flex h-8 w-full items-center rounded-md px-2 text-left text-xs font-medium",n?"text-red-600 hover:bg-red-50":"text-neutral-700 hover:bg-neutral-50"),children:t})}function tT(e,t){return e.view.posAtDOM(t,0)}function t_(e,t){let r=Math.max(e.left,t.left),n=Math.min(e.right,t.right),l=Math.max(e.top,t.top),a=Math.min(e.bottom,t.bottom);return r>=n||l>=a?null:new DOMRect(r,l,n-r,a-l)}function tF(e,t){let r=[...e.rows].map(e=>e.cells[t]).filter(Boolean);if(!r.length)return null;let n=r[0].getBoundingClientRect(),l=r[r.length-1].getBoundingClientRect();return new DOMRect(n.left,n.top,n.width,l.bottom-n.top)}var tO=(e,t)=>{(0,I.rD)({getBoundingClientRect:()=>(0,T.MG)(e.view,e.state.selection.from,e.state.selection.to)},t,{placement:"bottom-start",strategy:"absolute",middleware:[(0,I.BN)(),(0,I.UU)()]}).then(e=>{let{x:r,y:n,strategy:l}=e;t.style.width="max-content",t.style.position=l,t.style.left="".concat(r,"px"),t.style.top="".concat(n,"px")})},tB=(0,a.v)("flex cursor-pointer select-none items-center gap-2 whitespace-nowrap rounded-md px-2 py-1 text-sm text-neutral-950","data-[selected=true]:bg-neutral-100"),tV=(0,o.forwardRef)((e,t)=>{let{items:r,command:n,variableInfo:l}=e,[s,i]=(0,o.useState)(0),[d,u]=(0,o.useState)(null),[m,h]=(0,o.useState)(""),p=(0,o.useRef)(null),x=e=>{if("PartnerName"!==e)return void n({id:e,fallback:null});u(e),h("")},f=()=>{d&&n({id:d,fallback:m.trim()||null})},g=()=>{u(null),h("")};if((0,o.useEffect)(()=>i(0),[r]),(0,o.useImperativeHandle)(t,()=>({onKeyDown:e=>{let{event:t}=e;return d?"Enter"===t.key?(t.preventDefault(),f(),!0):"Escape"===t.key&&(g(),!0):"ArrowUp"===t.key?(i((s+r.length-1)%r.length),!0):"ArrowDown"===t.key?(i((s+1)%r.length),!0):"Enter"===t.key&&r.length>0&&s>=0&&s<r.length&&(x(r[s]),!0)}})),d)return(0,c.jsxs)("div",{className:"border-border-subtle flex w-64 flex-col gap-2 rounded-lg border bg-white p-2 shadow-sm",children:[(0,c.jsx)("span",{className:"w-fit rounded bg-blue-100 px-1 py-0.5 font-mono text-xs font-semibold text-blue-700",children:d}),(0,c.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,c.jsx)(e1,{ref:e=>{p.current=e,null==e||e.focus()},value:m,onChange:e=>h(e.target.value),onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),f()):"Escape"===e.key&&g()},placeholder:"Fallback (optional)",className:"h-8 rounded-lg"}),(0,c.jsxs)("p",{className:"text-content-subtle text-xs",children:["Used only if ",d," is missing."]})]}),(0,c.jsxs)("div",{className:"flex justify-end gap-1",children:[(0,c.jsx)(rt,{text:"Back",variant:"secondary",className:"h-7 w-fit rounded-lg px-3 py-2 text-sm",onClick:g}),(0,c.jsx)(rt,{text:"Confirm",variant:"primary",className:"h-7 w-fit roun
1ded-lg px-3 py-2 text-sm",onClick:f})]})]});let v=r.some(e=>{var t,r;return(null==(t=null==l?void 0:l[e])?void 0:t.description)||(null==(r=null==l?void 0:l[e])?void 0:r.example)});return(0,c.jsx)("div",{className:(0,a.v)("border-border-subtle flex flex-col rounded-lg border bg-white p-1 shadow-sm",v&&"w-96"),children:r.length?r.map((e,t)=>{let r=null==l?void 0:l[e],n=null!=r&&r.hideExample||null==r?void 0:r.example;return(0,c.jsx)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>x(e),"data-selected":s===t,onPointerEnter:()=>i(t),className:(0,a.v)(tB,r?"items-start whitespace-normal py-1":"font-mono"),children:r?(0,c.jsxs)("div",{className:"flex min-w-0 flex-col text-left",children:[(0,c.jsx)("span",{className:"font-mono text-sm leading-5",children:e}),r.description||n?(0,c.jsxs)("span",{className:"text-xs font-normal leading-4",children:[r.description?(0,c.jsx)("span",{className:"text-content-subtle",children:r.description}):null,r.description&&n?(0,c.jsx)("span",{className:"text-content-muted",children:" \xb7 "}):null,n?(0,c.jsx)("span",{className:"text-content-default",children:n}):null]}):null]}):e},t)}):(0,c.jsx)("div",{className:(0,a.v)(tB,"text-content-subtle font-sans"),children:"No results"})})}),tU={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",chat:"prose-p:my-0 prose-ul:my-2 prose-ol:my-2 [&_p+p]:mt-2",relaxed:""},tH=["images","variables","links","headings","bold","italic","strike"],tW=([...tH],tH),tG=new Set(["image/png","image/jpeg","image/gif","image/webp"]),tK=new WeakMap,tq=(0,o.createContext)(null),tZ=(0,o.forwardRef)((e,t)=>{var r;let{children:n,features:l=tW,markdown:s=!1,style:i="default",placeholder:d="Start typing...",uploadImage:u,imageAccept:m,editable:h,autoFocus:p,variables:k,variableInfo:C,initialValue:S,onChange:A,editorProps:P,editorClassName:M}=e,[R,E]=(0,o.useState)(!1),[D,L]=(0,o.useState)(null),z=(0,o.useRef)(null),I=(0,o.useRef)(d);I.current=d;let T=(0,o.useCallback)(e=>{var t;let r=z.current;if(!r)return;let n=r.chain();void 0!==e&&n.setTextSelection(e),n.run(),r.isActive("link")&&r.chain().extendMarkRange("link").run();let{from:l,to:a}=r.state.selection;L({from:l,to:a,text:r.state.doc.textBetween(l,a," "),href:null!=(t=r.getAttributes("link").href)?t:""})},[]),_=(0,o.useMemo)(()=>u?async(e,t,r)=>{E(!0);let n=await (null==u?void 0:u(e));if(!n)return void E(!1);t.chain().insertContentAt(r,{type:"image",attrs:{src:n}}).focus().run(),E(!1)}:null,[u]),F=(0,x.hG)({editable:null==h||h,autofocus:!!p&&"end",extensions:[...s?[y.oz]:[],N.A.configure({heading:!!l.includes("headings")&&{levels:[1,2]},bold:!!l.includes("bold")&&void 0,italic:!!l.includes("italic")&&void 0,strike:!!l.includes("strike")&&void 0,link:!1}),...l.includes("tables")?[w.R0.configure({table:{resizable:!1,HTMLAttributes:{class:"w-full border-separate border-spacing-0"}}})]:[],...l.includes("links")?[v.Ay.extend({inclusive:!1}).configure({openOnClick:!1})]:[],j.Or.configure({placeholder:()=>I.current,emptyEditorClass:"before:content-[attr(data-placeholder)] before:float-left before:text-content-muted before:h-0 before:pointer-events-none"}),...l.includes("images")&&_?[...l.includes("imageControls")?[(r={inline:!1,imageAltControls:!0,HTMLAttributes:{class:"rounded-lg max-w-full h-auto"}},tN.configure(r))]:[g.Ay.configure({inline:!1,HTMLAttributes:{class:"rounded-lg max-w-full h-auto"}})],f.Ay.configure({allowedMimeTypes:[...tG],onDrop:(e,t,r)=>{t.forEach(t=>_(t,e,r))}})]:[],...l.includes("variables")&&k?[b.A.extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),fallback:{default:null,parseHTML:e=>e.getAttribute("data-fallback"),renderHTML:e=>e.fallback?{"data-fallback":e.fallback}:{}}}},renderHTML(e){let{node:t}=e,r=t.attrs.fallback?"{{".concat(t.attrs.id," | ").concat(t.attrs.fallback,"}}"):"{{".concat(t.attrs.id,"}}");return["span",{class:"px-1 py-0.5 bg-blue-100 text-blue-700 rounded font-semibold","data-type":"mention","data-id":t.attrs.id,...t.attrs.fallback?{"data-fallback":t.attrs.fallback}:{}},r]},renderText(e){let{node:t}=e;return t.attrs.fallback?"{{".concat(t.attrs.id," | ").concat(t.attrs.fallback,"}}"):"{{".concat(t.attrs.id,"}}")}}).configure({suggestion:((e,t)=>({items:t=>{let{query:r}=t,n=r.trim().toLowerCase();return n?e.filter(e=>e.toLowerCase().includes(n)).sort((e,t)=>
1{let r=e.toLowerCase(),l=t.toLowerCase(),a=+!r.startsWith(n),s=+!l.startsWith(n);return a!==s?a-s:e.localeCompare(t)}).slice(0,10):e.slice(0,10)},render:()=>{let e;return{onStart:r=>{e=new x.NV(tV,{props:{...r,variableInfo:t},editor:r.editor}),r.clientRect&&(e.element.style.position="absolute",document.body.appendChild(e.element),tO(r.editor,e.element))},onUpdate(r){e.updateProps({...r,variableInfo:t}),r.clientRect&&tO(r.editor,e.element)},onKeyDown(t){var r;return null!=(r=e.ref)&&!!r.onKeyDown(t)||"Escape"===t.event.key&&(e.destroy(),!0)},onExit(){e.element.remove(),e.destroy()}}}}))(k,C)})]:[]],editorProps:{...P,attributes:{...null==P?void 0:P.attributes,class:(0,a.v)("max-w-none focus:outline-none","prose prose-sm prose-neutral","[&_li>p]:my-0 marker:prose-ul:text-neutral-500",l.includes("tables")&&"[&_table]:my-3 [&_table]:overflow-hidden [&_table]:rounded-xl [&_table]:border [&_table]:border-neutral-200 [&_th]:border-b [&_th]:border-r [&_td]:border-b [&_td]:border-r [&_th]:border-neutral-200 [&_td]:border-neutral-200 [&_th]:bg-neutral-50 [&_th]:px-4 [&_td]:px-4 [&_th]:py-3 [&_td]:py-3 [&_th]:align-top [&_td]:align-top [&_th]:text-left [&_th]:font-semibold [&_th]:text-neutral-900 [&_td]:text-neutral-600 [&_th:last-child]:border-r-0 [&_td:last-child]:border-r-0 [&_tr:last-child>*]:border-b-0 [&_th>p]:my-0 [&_td>p]:my-0",tU[i],"[&_.ProseMirror-selectednode]:outline [&_.ProseMirror-selectednode]:outline-2 [&_.ProseMirror-selectednode]:outline-blue-500 [&_.ProseMirror-selectednode]:outline-offset-2","[&_.ProseMirror-selectednode:has(img)]:outline-none",M)},handleDOMEvents:{...null==P?void 0:P.handleDOMEvents,paste:(e,t)=>{var r,n;if(null!=(n=null==(r=null==P?void 0:P.handleDOMEvents)?void 0:r.paste)&&n.call(r,e,t))return!0;let a=t.clipboardData;if(!e.editable||!l.includes("images")||!_||!a)return!1;let s=function(e){let t=Array.from(e.files).filter(e=>tG.has(e.type));if(t.length>0)return t;for(let r of Array.from(e.items)){if("file"!==r.kind||!tG.has(r.type))continue;let e=r.getAsFile();e&&t.push(e)}return t}(a);return s.length>0&&tK.set(t,s),!1}},handlePaste:(e,t,r)=>{var n,a,s,i,o;if(null!=(n=null==P?void 0:P.handlePaste)&&n.call(P,e,t,r))return!0;let c=z.current,d=tK.get(t);if(!e.editable||!l.includes("images")||!_||!c||!(null!=d&&d.length))return!1;let u=null!=(o=null==(a=t.clipboardData)?void 0:a.getData("text/html"))?o:"";return(null==(i=u.trim()?new DOMParser().parseFromString(u,"text/html").body.textContent:null==(s=t.clipboardData)?void 0:s.getData("text/plain"))||!i.replace(/\u00a0/g," ").trim())&&(d.forEach(e=>_(e,c,c.state.selection.anchor)),!0)},handleClick:(e,t,r)=>{var n;return!!(null!=(n=null==P?void 0:P.handleClick)&&n.call(P,e,t,r))||!!(e.editable&&l.includes("links")&&r.target instanceof Element&&r.target.closest("a[href]"))&&(T(t),!0)}},content:S,contentType:s?"markdown":void 0,onUpdate:e=>{let{editor:t}=e;return null==A?void 0:A(t)},immediatelyRender:!1});return z.current=F,(0,o.useEffect)(()=>{null==F||F.setEditable(null==h||h)},[F,h]),(0,o.useEffect)(()=>{!F||F.isDestroyed||F.view.dispatch(F.state.tr)},[F,d]),(0,o.useImperativeHandle)(t,()=>({setContent:e=>{null==F||F.commands.setContent(e)}})),(0,c.jsxs)(tq.Provider,{value:{features:l,markdown:s,editable:h,variables:k,imageAccept:m,editor:F,isUploading:R,handleImageUpload:_,linkModalState:D,setLinkModalState:L,openLinkModal:T},children:[n,l.includes("links")&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(tP,{}),(0,c.jsx)(tk,{})]}),l.includes("tables")&&(null==h||h)&&(0,c.jsx)(tE,{})]})});function tY(){let e=(0,o.useContext)(tq);if(!e)throw Error("useRichTextContext must be used within a RichTextProvider");return e}function tX(){var e;let{editor:t}=tY();return null!=(e=(0,x.er)({editor:t,selector:e=>{var t;let{editor:r}=e;return null!=(t=null==r?void 0:r.getText({blockSeparator:""}).length)?t:0}}))?e:0}function tJ(e){let{toolsStart:t,toolsEnd:r,className:l}=e,{editor:s,features:i,handleImageUpload:d,isUploading:u,imageAccept:m}=tY(),h=(0,x.er)({editor:s,selector:e=>{let{editor:t}=e;return{isBold:!!(null==t?void 0:t.isActive("bold")),isItalic:!!(null==t?void 0:t.isActive("italic")),isStrike:!!(null==t?void 0:t.isActive("strike")),isHeading1:!!(null==t?void 0:t.isActive("heading",{level:1})),isHeading2:!!(null==t?void 0:t.isActive("heading",{level:2})),isBulletList:!!(null==t?void 0:t.isActive("bulletList")),isOrderedList:!!(null==t?void 0:t.isActive("orderedList")),isBlockquote:!!(null==t?void 0:t.isActive("blockquote")),isCode:!!(null==t?void 0:t.isActive("code")),isSelection:(null==t?void 0:t.state.selection.from)!==(null==t?void 0:t.state.selection.to)}}}),p=(0,o.useRef)(null);return(0,c.jsxs)("div",{className:(0,a.v)("flex gap-1",u&&"pointer-events-none opacity-50",l),children:[t,(null==i?void 0:i.includes("bold"))&&(0,c.jsx)(t$,{icon:n.Ee,label:"Bold",isActive:null==h?void 0:h.isBold,onClick:()=>null==s?void 0:s.chain().focus().toggleBold().run()}),(null==i?void 0:i.includes("italic"))&&(0,c.jsx)(t$,{icon:n.Fe,label:"Italic",isActive:null==h?void 0:h.isItalic,onClick:()=>null==s?void 0:s.chain().focus().toggleItalic().run()}),(null==i?void 0:i.includes("strike"))&&(0,c.jsx)(t$,{icon:n.Ge,label:"Str
1ikethrough",isActive:null==h?void 0:h.isStrike,onClick:()=>null==s?void 0:s.chain().focus().toggleStrike().run()}),(null==i?void 0:i.includes("headings"))&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(t$,{icon:n.Pc,label:"Heading 1",isActive:null==h?void 0:h.isHeading1,onClick:()=>null==s?void 0:s.chain().focus().toggleHeading({level:1}).run()}),(0,c.jsx)(t$,{icon:n.Qc,label:"Heading 2",isActive:null==h?void 0:h.isHeading2,onClick:()=>null==s?void 0:s.chain().focus().toggleHeading({level:2}).run()})]}),(null==i?void 0:i.includes("lists"))&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(t$,{icon:n.Va,label:"Bullet list",isActive:null==h?void 0:h.isBulletList,onClick:()=>null==s?void 0:s.chain().focus().toggleBulletList().run()}),(0,c.jsx)(t$,{icon:n.Gd,label:"Numbered list",isActive:null==h?void 0:h.isOrderedList,onClick:()=>null==s?void 0:s.chain().focus().toggleOrderedList().run()})]}),(null==i?void 0:i.includes("tables"))&&(0,c.jsx)(t$,{icon:n.ze,label:"Table",isActive:!1,onClick:()=>null==s?void 0:s.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}),(null==i?void 0:i.includes("quote"))&&(0,c.jsx)(t$,{icon:n.Wd,label:"Quote",isActive:null==h?void 0:h.isBlockquote,onClick:()=>null==s?void 0:s.chain().focus().toggleBlockquote().run()}),(null==i?void 0:i.includes("code"))&&(0,c.jsx)(t$,{icon:n.Fb,label:"Inline code",isActive:null==h?void 0:h.isCode,onClick:()=>null==s?void 0:s.chain().focus().toggleCode().run()}),(null==i?void 0:i.includes("links"))&&(0,c.jsx)(tQ,{}),(null==i?void 0:i.includes("variables"))&&(0,c.jsx)(t$,{icon:n.Ha,label:"Variable",isActive:!1,onClick:()=>{var e,t;if(null!=(t=null==(e=null==s?void 0:s.state.selection.$from.nodeBefore)?void 0:e.text)&&t.endsWith("@")){null==s||s.commands.focus();return}null==s||s.chain().focus().insertContent("@").run()}}),(null==i?void 0:i.includes("images"))&&d&&s&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("input",{ref:p,type:"file",accept:m,className:"hidden",onChange:e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&(d(r,s,s.state.selection.anchor),e.target.value="")}}),(0,c.jsx)(t$,{icon:n.Xc,label:"Image",isActive:!1,onClick:()=>{var e;return null==(e=p.current)?void 0:e.click()}})]}),r]})}function tQ(){let{editor:e,features:t,openLinkModal:r}=tY(),l=null==t?void 0:t.includes("imageControls"),s=(0,x.er)({editor:e,selector:e=>{let{editor:t}=e;return{isImageSelected:!!(null==t?void 0:t.isActive("image")),isLinkActive:!!((null==t?void 0:t.isActive("link"))||l&&(null==t?void 0:t.isActive("image"))&&t.getAttributes("image").href)}}}),i=!!(e&&(!(null!=s&&s.isImageSelected)||l&&(null==s?void 0:s.isImageSelected)));return(0,c.jsx)(t$,{icon:n.Vc,label:"Link",isActive:null==s?void 0:s.isLinkActive,onClick:()=>{if(e){if(e.isActive("image")&&l){var t;let r=null!=(t=e.getAttributes("image").href)?t:"",n=window.prompt("Link URL",r),l=e.state.selection.from;if(null===n)return;if(!n.trim())return void e.chain().focus().updateAttributes("image",{href:null}).setNodeSelection(l).run();if(!(0,a.a)(n.trim())){E.o.error("Enter a full URL starting with http://, https://, or mailto: (e.g. https://dub.co)."),e.chain().focus().setNodeSelection(l).run();return}return void e.chain().focus().updateAttributes("image",{href:n.trim()}).setNodeSelection(l).run()}r()}},disabled:!i})}var t$=(0,o.forwardRef)((e,t)=>{let{icon:r,label:n,isActive:l,onClick:s,disabled:i}=e;return(0,c.jsxs)("button",{ref:t,type:"button",onClick:s,disabled:i,className:(0,a.v)("flex size-8 items-center justify-center rounded-md transition-colors duration-150 disabled:opacity-50",l?"bg-neutral-200":"hover:bg-neutral-50 active:bg-neutral-100"),title:n,children:[(0,c.jsx)(r,{className:"size-4 shrink-0 text-neutral-700"}),n&&(0,c.jsx)("span",{className:"sr-only",children:n})]})});function t0(e){let{className:t,...r}=e,{editor:l,isUploading:s}=tY();return(0,c.jsxs)("div",{className:(0,a.v)("relative",s&&"pointer-events-none opacity-50",t),children:[(0,c.jsx)(x.$Z,{editor:l,...r}),s&&(0,c.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,c.jsx)(n.z,{className:"size-4"})})]})}function t1(e){let{children:t}=e;return(0,c.jsx)(u.Kq,{delayDuration:150,children:t})}var t2=e=>{let{className:t,children:r}=e;return(0,c.jsx)(p.o,{className:(0,a.v)("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",tU.condensed,t),components:{a:e=>{var t;let{node:r,...n}=e;return null!=(t=n.href)&&t.startsWith("/")?(0,c.jsx)(h,{href:n.href,onClick:e=>e.stopPropagation(),children:n.children}):(0,c.jsx)("a",{...n,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation()})},code:e=>{let{node:t,...r}=e;return(0,c.jsx)("code",{...r,className:"rounded-md bg-neutral-100 px-1 py-0.5"})}},children:r})};function t4(e){let{children:t,content:r,contentClassName:n,disabled:l,side:a="top",disableHoverableContent:s,delayDuration:i=0,...d}=e,[m,h]=(0,o.useState)(!1);return(0,c.jsxs)(u.bL,{open:!l&&m,onOpenChange:h,delayDuration:i,disableHoverableContent:s,children:[(0,c.jsx)(u.l9,{asChild:!0,onClick:()=>{h(!0)},onBlur:()=>{h(!1)},children:t}),(0,c.jsx)(u.ZL,{children:(0,c.jsx)(u.UC,{sideOffset:8,side:a,className:"animate-slide-up-fade border-border-default bg-bg-default pointer-events-auto z-[99] items-center overflow-hidden rounded-xl border shadow-sm",collisionPadding:0,...d,children:"string"==typeof r?(0,c.jsx)(t2,{className:n,children:r}):"function"==typeof r?r({setOpen:h}):r})})]})}function t3(e){let{title:t,cta:r,href:n,target:l,onClick:s}=e;return(0,c.jsxs)("div",{className:"flex max-w-xs flex-col items-center space-y-3 p-4 text-center",children:[(0,c.jsx)(t2,{className:"p-0",children:t}),r&&(n?(0,c.jsx)(h,{href:n,...l?{target:l,rel:"noopener noreferrer"}:{},className:(0,a.v)(re({variant:"primary"}),"flex h-8 w-full items-center justify-center whitespace-nowrap rounded-lg border px-4 text-sm"),children:r}):s?(0,c.jsx)(rt,{onClick:s,text:r,variant:"primary",className:"h-8"}):null)]})}function t5(e){return(0,c.jsx)(t4,{...e,children:(0,c.jsx)(m.A,{className:"h-4 w-4 text-neutral-500"})})}function t6(e){let{children:t,content:r,...n}=e;return(0,c.jsx)(t4,{content:r,...n,children:(0,c.jsx)("div",{className:"flex cursor-pointer items-center",children:(0,c.jsx)(eQ,{variant:"gray",className:"border-neutral-300 transition-all hover:bg-neutral-200",children:t})})})}function t9(e){let{children:t,tooltipProps:r,...n}=e;return(0,c.jsx)(t4,{...r,children:(0,c.jsx)("button",{type:"button",...n,className:(0,a.v)("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",n.className),children:t})})}function t8(e){let{children:t,tooltipProps:r}=e;return r?(0,c.jsx)(t4,{...r,children:(0,o.isValidElement)(t)?t:(0,c.jsx)("span",{children:t})}):t}function t7(e){let{children:t,maxHeight:r="240px",className:n}=e,l=(0,o.useRef)(null),{scrollProgress:s,updateScrollProgress:i}=e0(l,{direction:"vertical"}),[d,u]=(0,o.useState)(!1),[m,h]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=l.current;if(!e)return;let{scrollHeight:t,clientHeight:r}=e,n=t>r;u(n&&s>0),h(n&&s<1)},[s]),(0,c.jsxs)("div",{className:"relative",children:[d&&(0,c.jsx)("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"}),(0,c.jsx)("div",{ref:l,onScroll:i,className:(0,a.v)("flex flex-col gap-2 overflow-y-auto px-3 py-2",n),style:{maxHeight:r},children:t}),m&&(0,c.jsx)("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"})]})}var re=(0,d.F)("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:(0,a.v)("border-border-subtle bg-bg-default 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"}}),rt=(0,o.forwardRef)((e,t)=>{let{text:r,variant:l="primary",className:s,textWrapperClassName:i,shortcutClassName:o,loading:d,icon:u,shortcut:m,disabledTooltip:h,right:p,...x}=e;return h?(0,c.jsx)(t4,{content:h,children:(0,c.jsxs)("div",{className:(0,a.v)("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":null==l?void 0:l.endsWith("outline")},s),children:[u,r&&(0,c.jsx)("div",{className:(0,a.v)("min-w-0 truncate",m&&"flex-1 text-left",i),children:r}),m&&(0,c.jsx)("kbd",{className:(0,a.v)("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":null==l?void 0:l.endsWith("outline")},o),children:m})]})}):(0,c.jsxs)("button",{ref:t,type:x.onClick?"button":"submit",className:(0,a.v)("group flex h-10 w-full items-center justify-center gap-2 whitespace-nowrap rounded-lg border px-3 text-sm",x.disabled||d?"border-border-subtle bg-bg-subtle text-content-subtle cursor-not-allowed outline-none":re({variant:l}),s),disabled:x.disabled||d,...x,children:[d?(0,c.jsx)(n.z,{}):u||null,r&&(0,c.jsx)("div",{className:(0,a.v)("min-w-0 truncate",m&&"flex-1 text-left",i),children:r}),m&&(0,c.jsx)("kbd",{className:(0,a.v)("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":"primary"===l,"bg-neutral-200 text-neutral-400 group-hover:bg-neutral-100 group-hover:text-neutral-500":"secondary"===l,"bg-neutral-100 text-neutral-500 group-hover:bg-neutral-200":"outline"===l,"bg-red-400 text-white":"danger"===l,"bg-red-100 text-red-600 group-hover:bg-red-500 group-hover:text-white":"danger-outline"===l},o),children:m}),p]})});rt.displayName="Button";var rr=(0,d.F)("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"}}}),rn=(0,o.createContext)({variant:"loose",loading:!1}),rl=(0,d.F)("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"}}}),ra=(0,o.createContext)({hovered:!1}),rs=Object.assign(function(e){let{variant:t="loose",loading:r=!1,className:n,children:l}=e;return(0,c.jsx)("ul",{className:(0,a.v)(rr({variant:t,loading:r}),n),"data-variant":t,children:(0,c.jsx)(rn.Provider,{value:{variant:t,loading:r},children:l})})},{Card:Object.assign(function(e){let{outerClassName:t,innerClassName:r,children:n,onClick:l,onAuxCl
1ick:s,hoverStateEnabled:i=!0,banner:d}=e,{variant:u}=(0,o.useContext)(rn),m=(0,o.useRef)(null),[h,p]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(!h||!m.current)return;let e=setInterval(()=>{var e;(null==(e=m.current)?void 0:e.matches(":hover"))===!1&&p(!1)},1e3);return()=>clearInterval(e)},[h]);let x=e=>!(document.getElementById("modal-backdrop")||(0,a.r)(e));return(0,c.jsxs)("li",{ref:m,className:(0,a.v)(rl({variant:u}),t),onPointerEnter:()=>p(!0),onPointerLeave:()=>p(!1),"data-hover-state-enabled":i,children:[d,(0,c.jsx)("div",{className:(0,a.v)("w-full py-2.5 px-4",r),onClick:l?e=>{x(e)&&l(e)}:void 0,onAuxClick:s?e=>{x(e)&&s(e)}:void 0,children:(0,c.jsx)(ra.Provider,{value:{hovered:h},children:n})})]})},{Context:ra}),Context:rn}),ri={type:"spring",duration:.3},ro=(0,o.forwardRef)((e,t)=>{var r,n;let{width:l=!1,height:s=!1,className:i,transition:d,children:u,...m}=e,h=(0,o.useRef)(null),p=e$(h),x=(0,o.useRef)(!1),f=null==(r=null==p?void 0:p.contentRect)?void 0:r.width,g=null==(n=null==p?void 0:p.contentRect)?void 0:n.height,v=(!l||null!=f)&&(!s||null!=g)&&!x.current;return p&&(x.current=!0),(0,c.jsx)(_.P.div,{ref:t,className:(0,a.v)("overflow-hidden",i),animate:{width:l&&null!=f?f:"auto",height:s&&null!=g?g:"auto"},transition:null!=d?d:v?{duration:0}:ri,...m,children:(0,c.jsx)("div",{ref:h,className:(0,a.v)(s&&"h-max",l&&"w-max"),children:u})})});function rc(e){let{options:t,value:r,onChange:l,className:s,gridCols:i="2",name:o,disabled:d=!1,animated:u=!0}=e,m=(0,c.jsx)("div",{className:(0,a.v)("grid gap-3",{1:"grid-cols-1",2:"grid-cols-1 lg:grid-cols-2",3:"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}[i]),children:t.map(e=>{let{key:t,label:i,description:u,icon:m}=e,h=r===t;return(0,c.jsxs)("label",{className:(0,a.v)("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",h&&"border-black bg-neutral-50 text-neutral-900 ring-1 ring-black",d&&"cursor-not-allowed opacity-50",s),children:[(0,c.jsx)("input",{type:"radio",name:o,value:t,className:"hidden",checked:h,disabled:d,onChange:e=>{e.target.checked&&l&&l(t)}}),m&&(0,c.jsx)("div",{className:"flex-shrink-0 pt-0.5",children:m}),(0,c.jsxs)("div",{className:"flex grow flex-col p-3 pr-0",children:[(0,c.jsx)("span",{className:"pr-1 text-sm font-semibold text-neutral-900",children:i}),(0,c.jsx)("span",{className:"text-xs text-neutral-600",children:u})]}),(0,c.jsx)(n.mb,{variant:"fill",className:(0,a.v)("mr-1.5 mt-1.5 flex size-4 scale-75 items-center justify-center rounded-full opacity-0 transition-[transform,opacity] duration-150",h&&"scale-100 opacity-100")})]},t)})});return u?(0,c.jsx)("div",{className:"-m-1",children:(0,c.jsx)(ro,{height:!0,transition:{ease:"easeInOut",duration:.2},children:(0,c.jsx)("div",{className:"p-1",children:m})})}):m}ro.displayName="AnimatedSizeContainer";var rd=2e3,ru=(0,o.createContext)(null);function rm(){let e=(0,o.useContext)(ru);if(!e)throw Error("useCarousel must be used within a <Carousel />");return e}function rh(){let{api:e}=rm(),[t,r]=(0,o.useState)(0),n=(0,o.useCallback)(e=>{var t;return r(null!=(t=null==e?void 0:e.selectedScrollSnap())?t:0)},[]);return(0,o.useEffect)(()=>{e&&(n(e),e.on("reInit",n),e.on("select",n))},[e,n]),t}var rp=(0,o.forwardRef)((e,t)=>{let{orientation:r="horizontal",opts:n,setApi:l,autoplay:s,plugins:i,className:d,children:u,...m}=e,[h,p]=(0,O.A)({...n,axis:"horizontal"===r?"x":"y"},[...s?[(0,F.A)("object"==typeof s?s:{delay:rd})]:[],...i||[]]),[x,f]=(0,o.useState)(!1),[g,v]=(0,o.useState)(!1),b=(0,o.useCallback)(e=>{e&&(f(e.canScrollPrev()),v(e.canScrollNext()))},[]),w=(0,o.useCallback)(()=>{null==p||p.scrollPrev()},[p]),j=(0,o.useCallback)(()=>{null==p||p.scrollNext()},[p]),y=(0,o.useCallback)(e=>{"ArrowLeft"===e.key?(e.preventDefault(),w()):"ArrowRight"===e.key&&(e.preventDefault(),j())},[w,j]);return(0,o.useEffect)(()=>{p&&l&&l(p)},[p,l]),(0,o.useEffect)(()=>{if(p)return b(p),p.on("reInit",b),p.on("select",b),()=>{null==p||p.off("select",b)}},[p,b]),(0,c.jsx)(ru.Provider,{value:{carouselRef:h,api:p,opts:n,autoplay:s,orientation:r||((null==n?void 0:n.axis)==="y"?"vertical":"horizontal"),scrollPrev:w,scrollNext:j,canScrollPrev:x,canScrollNext:g},children:(0,c.jsx)("div",{ref:t,onKeyDownCapture:y,className:(0,a.v)("relative",d),role:"region","aria-roledescription":"carousel",...m,children:u})})});
1rp.displayName="Carousel";var rx=(0,o.forwardRef)((e,t)=>{let{className:r,...n}=e,{carouselRef:l,orientation:s}=rm();return(0,c.jsx)("div",{ref:l,className:"overflow-hidden",children:(0,c.jsx)("div",{ref:t,className:(0,a.v)("flex","horizontal"===s?"-ml-4":"-mt-4 flex-col",r),...n})})});rx.displayName="CarouselContent";var rf=(0,o.forwardRef)((e,t)=>{let{className:r,...n}=e,{orientation:l}=rm();return(0,c.jsx)("div",{ref:t,role:"group","aria-roledescription":"slide",className:(0,a.v)("min-w-0 shrink-0 grow-0 basis-full","horizontal"===l?"pl-4":"pt-4",r),...n})});rf.displayName="CarouselItem";var rg=(0,o.forwardRef)((e,t)=>{let{className:r,...n}=e,{orientation:l,scrollPrev:s,canScrollPrev:i}=rm();return(0,c.jsxs)("button",{ref:t,className:(0,a.v)("absolute","horizontal"===l?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",re({variant:"secondary",className:"p-2"}),r),disabled:!i,onClick:s,...n,children:[(0,c.jsx)(B.A,{className:"h-4 w-4"}),(0,c.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});rg.displayName="CarouselPrevious";var rv=(0,o.forwardRef)((e,t)=>{let{className:r,...n}=e,{orientation:l,scrollNext:s,canScrollNext:i}=rm();return(0,c.jsxs)("button",{ref:t,className:(0,a.v)("absolute","horizontal"===l?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",re({variant:"secondary",className:"p-2"}),r),disabled:!i,onClick:s,...n,children:[(0,c.jsx)(V.A,{className:"h-4 w-4"}),(0,c.jsx)("span",{className:"sr-only",children:"Next slide"})]})});rv.displayName="CarouselNext";var rb=(0,d.F)("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 "}}}),rw=e=>{var t,r;let{variant:n="simple",className:l,count:s}=e,{scrollNext:i,scrollPrev:d,canScrollNext:u,canScrollPrev:m,api:h,autoplay:p}=rm(),x=null==(t=null==h?void 0:h.plugins())?void 0:t.autoplay,f=!!p,[g,v]=o.useState(0),[b,w]=o.useState(!1),j=o.useCallback(e=>{var t;v(null!=(t=null==e?void 0:e.selectedScrollSnap())?t:0)},[]),y=o.useCallback(e=>()=>{x&&x.isPlaying()&&x.stop(),e()},[x]);o.useEffect(()=>{var e;h&&(j(h),w(null!=(e=null==x?void 0:x.isPlaying())&&e),h.on("reInit",j),h.on("select",j),h.on("autoplay:play",()=>w(!0)),h.on("autoplay:stop",()=>w(!1)))},[h,x,j]);let N=null!=(r=null!=s?s:null==h?void 0:h.slideNodes().length)?r:0;return(0,c.jsxs)("div",{className:(0,a.v)(rb({variant:n}),l),children:["simple"!==n&&(0,c.jsxs)("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!m,onClick:y(d),children:[(0,c.jsx)(U.A,{className:"h-4 w-4"}),(0,c.jsx)("span",{className:"sr-only",children:"Previous slide"})]}),N>0&&(0,c.jsx)("div",{className:"flex min-h-2.5 items-center gap-1 sm:min-h-[18px]",children:Array.from({length:N}).map((e,t)=>{var r;return(0,c.jsxs)("button",{onClick:h?y(()=>h.scrollTo(t)):void 0,className:"flex items-center justify-center rounded-full p-0.5 leading-none hover:bg-neutral-100 active:bg-neutral-200 sm:p-1.5",children:[(0,c.jsx)("div",{className:(0,a.v)("relative isolate h-1.5 w-1.5 overflow-hidden rounded-full",t===g?"bg-black":"bg-black/20",f&&t===g&&"w-6 bg-black/20"),children:b&&t===g&&(0,c.jsx)(_.P.div,{initial:{x:"-100%"},animate:{x:0},transition:{type:"tween",duration:(null!=(r=null==x?void 0:x.options.delay)?r:rd)/1e3},className:"animate-fill-width h-full w-full rounded-full bg-black"})}),(0,c.jsxs)("span",{className:"sr-only",children:["Slide ",t+1]})]},t)})}),"simple"!==n&&(0,c.jsxs)("button",{className:"cursor-pointer rounded-full p-2 hover:bg-neutral-50 active:bg-neutral-100",disabled:!u,onClick:y(i),children:[(0,c.jsx)(H.A,{className:"h-4 w-4"}),(0,c.jsx)("span",{className:"sr-only",children:"Next slide"})]})]})},rj=e=>{let{className:t,...r}=e,{api:n}=rm(),[l,s]=(0,O.A)({dragFree:!0}),i=(0,o.useCallback)(e=>{e&&s&&null!=s&&s.scrollTo(e.selectedScrollSnap())},[s]);return(0,o.useEffect)(()=>{if(!(!n||!s))return i(n),n.on("reInit",i),n.on("select",i),()=>{null==n||n.off("reInit",i),null==n||n.off("select",i)}},[n,s,i]),(0,c.jsx)("div",{className:"overflow-hidden",ref:l,children:(0,c.jsx)("div",{className:(0,a.v)("mx-4 flex gap-4",t),...r})})},ry=(0,o.forwardRef)((e,t)=>{let{index:r,className:n,...l}=e,{api:a}=rm(),s=rh();return(0,c.jsx)("div",{ref:t,children:(0,c.jsx)("button",{type:"button",onClick:()=>{var e;if(!a)return;let t=null==(e=a.plugins())?void 0:e.autoplay;t&&t.isPlaying()&&t.stop(),a.scrollTo(r)},className:"function"==typeof n?n({active:r===s}):n,...l})})}),rN=(0,o.forwardRef)((e,t)=>{let{className:r,...l}=e;return(0,c.jsx)(W.bL,{ref:t,className:(0,a.v)("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",r),...l,children:(0,c.jsxs)(W.C1,{className:"group/indicator flex items-center justify-center text-white",children:[(0,c.jsx)(n.gb,{className:"size-3 group-data-[state=indeterminate]/indicator:hidden"}),(0,c.jsx)(n.wd,{className:"size-3 group-data-[state=checked]/indicator:hidden"})]})})});function rk(e){let{children:t,className:r}=e,n=(0,o.useRef)(null),{scrollProgress:l,updateScrollProgress:s}=e0(n);return(0,c.jsxs)("div",{className:"relative",children:[(0,c.jsx)("div",{className:(0,a.v)("scrollbar-hide h-full w-screen overflow-y-scroll [clip-path:inset(0)] sm:w-auto",r),ref:n,onScroll:s,children:t}),(0,c.jsx)("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(l,2)}})]})}function rC(e){var t;let{multiple:r,selected:s,setSelected:d,onSelect:u,maxSelected:m,options:h,trigger:p,icon:x,placeholder:f="Select...",searchPlaceholder:g="Search...",emptyState:v,createLabel:b,createIcon:w=n.Rd,onCreate:j,buttonProps:y,labelProps:N,iconProps:k,popoverProps:C,shortcutHint:S,caret:A,side:P,open:M,onOpenChange:R,onSearchChange:E,shouldFilter:D=!0,inputRight:L,inputClassName:z,optionRight:I,optionClassName:T,optionDescription:_,matchTriggerWidth:F,hideSearch:O=!1,forceDropdown:B=!1,children:V}=e,U=!0===r,H=Array.isArray(s)?s:s?[s]:[],{isMobile:W}=(0,l.a)(),[K,q]=(0,o.useState)(!1),Z=null!=M?M:K,Y=null!=R?R:q,[X,J]=(0,o.useState)(""),[Q,$]=(0,o.useState)(!1),[ee,et]=(0,o.useState)(void 0),[er,en]=(0,o.useState)(!1),el=(0,o.useCallback)((e,t)=>""===t?[...e.filter(e=>e.first&&!H.some(t=>t.value===e.value)),...H,...e.filter(e=>!e.first&&!H.some(t=>t.value===e.value))]:e,[H]);(0,o.useEffect)(()=>{Q&&(et(h&&el(h,X)),$(!1))},[Q,h,el,X]),(0,o.useEffect)(()=>{$(!0)},[JSON.stringify(null==h?void 0:h.map(e=>e.value))]),(0,o.useEffect)(()=>{Z||(J(""),$(!0))},[Z]),(0,o.useEffect)(()=>null==E?void 0:E(X),[X]);let ea=(0,c.jsxs)(G.uB.Item,{className:(0,a.v)("text-content-default flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","data-[selected=true]:bg-bg-subtle",T),onSelect:async()=>{en(!0),await (null==j?void 0:j(X))&&(J(""),Y(!1)),en(!1)},children:[er?(0,c.jsx)(n.z,{className:"size-4 shrink-0"}):(0,c.jsx)(w,{className:"size-4 shrink-0"}),(0,c.jsx)("div",{className:"grow truncate",children:null!=(t=null==b?void 0:b(X))?t:"Create ".concat(X?'"'.concat(X,'"'):"new option...")})]});return(0,c.jsx)(tj,{openPopover:Z,setOpenPopover:Y,align:"start",side:P,collisionPadding:8,forceDropdown:B,onWheel:e=>{e.stopPropagation()},popoverContentClassName:(0,a.v)(F&&"sm:w-[var(--radix-popover-trigger-width)]",null==C?void 0:C.contentClassName),content:(0,c.jsx)(ro,{width:!W&&!F,height:!0,style:{transform:"translateZ(0)"},transition:{ease:"easeInOut",duration:.1},className:"pointer-events-auto",children:(0,c.jsxs)(G.uB,{loop:!0,shouldFilter:D,children:[!O&&(0,c.jsxs)("div",{className:"border-border-subtle flex items-center overflow-hidden rounded-t-lg border-b",children:[(0,c.jsx)(G.uB.Input,{placeholder:g,value:X,onValueChange:J,className:(0,a.v)("text-content-emphasis placeholder:text-content-muted grow border-0 bg-transparent py-3 pl-4 pr-2 outline-none focus:ring-0 sm:text-sm",z),onKeyDown:e=>{"Escape"!==e.key&&("Backspace"!==e.key||X)||(e.preventDefault(),e.stopPropagation(),Y(!1))}}),L&&(0,c.jsx)("div",{className:"mr-2",children:L}),S&&(0,c.jsx)("kbd",{className:"border-border-subtle bg-bg-subtle text-content-subtle mr-2 hidden shrink-0 rounded border px-2 py-0.5 text-xs font-light md:block",children:S})]}),(0,c.jsx)(rk,{className:(0,a.v)("max-h-[min(50vh,250px)]",j&&!r&&"max-h-[calc(min(50vh,250px)-3.5rem)]"),children:(0,c.jsx)(G.uB.List,{className:(0,a.v)("flex w-full min-w-[100px] flex-col gap-1 p-1"),children:void 0!==ee?(0,c.jsxs)(c.Fragment,{children:[ee.map(e=>{let t=H.some(t=>{let{value:r}=t;return r===e.value});return(0,c.jsx)(rS,{option:e,multiple:U,selected:t,onSelect:()=>(e=>{var t,r;let n=U?H.some(t=>{let{value:r}=t;return r===e.value}):H.length&&(null==(t=H[0])?void 0:t.value)===e.value;if(!(!n&&m&&H.length>=m))if(null==u||u(e),U){if(!d)return;d(n?H.filter(t=>{let{value:r}=t;return r!==e.value}):[...H,e])}else null==d||d(H.length&&(null==(r=H[0])?void 0:r.value)===e.value?null:e),Y(!1)})(e),disabled:!!(!t&&m&&H.length>=m),right:null==I?void 0:I(e),description:null==_?void 0:_(e),className:T},"".concat(e.label,", ").concat(e.value))}),j&&r&&X.length>0&&ea,D?(0,c.jsx)(rM,{className:"text-content-subtle flex min-h-12 items-center justify-center text-sm",children:v||"No matches"}):0===ee.length?(0,c.jsx)("div",{className:"text-content-subtle flex min-h-12 items-center justify-center text-sm",children:v||"No matches"}):null]}):(0,c.jsx)(G.uB.Loading,{children:(0,c.jsx)("div",{className:"flex h-12 items-center justify-center",children:(0,c.jsx)(n.z,{})})})})}),j&&!r&&(0,c.jsx)("div",{className:"border-border-subtle bg-bg-default rounded-b-lg border-t p-1",children:ea})]})}),children:null!=p?p:(0,c.jsx)(rt,{variant:"secondary",...y,className:(0,a.v)(null==y?void 0:y.className,"flex gap-2"),textWrapperClassName:(0,a.v)(null==y?void 0:y.textWrapperClassName,"w-full flex items-center justify-start"),text:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:(0,a.v)("min-w-0 grow truncate text-left",null==N?void 0:N.className),children:V||H.map(e=>e.label).join(", ")||f}),A&&(!0===A?(0,c.jsx)(i.A,{className:"text-content-muted ml-1 size-4 shrink-0 transition-transform duration-75 group-data-[state=open]:rotate-180"}):A)]}),icon:x?rP(x)?x:(0,c.jsx)(x,{className:(0,a.v)("size-4 shrink-0",null==k?void 0:k.className)}):void 0})})}function rS(e){let{option:t,onSelect:r,multiple:l,selected:s,disabled:i,right:o,description:d,className:u}=e,m=!!d;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(rA,{disabledTooltip:t.disabledTooltip,children:(0,c.jsxs)(G.uB.Item,{className:(0,a.v)("flex cursor-pointer items-center gap-3 rounded-md px-3 py-2 text-left text-sm",m?"whitespace-normal py-2.5":"whitespace-nowrap","data-[selected=true]:bg-bg-subtle",!!(i||t.disabledTooltip)&&"cursor-not-allowed opacity-50",u),disabled:i||!!t.disabledTooltip,onSelect:r,value:t.label+(null==t?void 0:t.value),children:[l&&(0,c.jsx)("div",{className:"text-content-default shrink-0",children:s?(0,c.jsx)(n.hb,{variant:"fill",className:"text-content-default size-4"}):(0,c.jsx)(n.hb,{className:"text-content-muted size-4"})}),(0,c.jsxs)("div",{className:(0,a.v)("flex min-w-0 grow items-center gap-2",m&&"flex-col items-start gap-0.5"),children:[t.icon&&(0,c.jsx)("span",{className:"text-content-default shrink-0",children:rP(t.icon)?t.icon:(0,c.jsx)(t.icon,{className:"h-4 w-4"})}),(0,c.jsx)("span",{className:(0,a.v)("grow",m?"text-content-emphasis":"text-content-default truncate"),children:t.label}),m&&(0,c.jsx)("span",{className:"text-content-subtle text-sm",children:d})]}),o,!l&&s&&(0,c.jsx)(n.gb,{className:"text-content-default size-4 shrink-0"})]})}),t.separatorAfter&&(0,c.jsx)(G.uB.Separator,{className:"bg-border-subtle -mx-1 my-1 h-px"})]})}
1rN.displayName=W.bL.displayName;var rA=e=>{let{children:t,disabledTooltip:r}=e;return r?(0,c.jsx)(t4,{content:r,children:(0,c.jsx)("div",{children:t})}):t},rP=e=>(0,o.isValidElement)(e),rM=(0,o.forwardRef)((e,t)=>(0,G.wo)(e=>0===e.filtered.count)?(0,c.jsx)("div",{ref:t,"cmdk-empty":"",role:"presentation",...e}):null),rR=(0,o.forwardRef)((e,t)=>{let{onClick:r,icon:n,disabled:l,...s}=e;return(0,c.jsx)("button",{ref:t,type:"button",disabled:l,className:(0,a.v)("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:r,...s,children:(0,c.jsx)(n,{className:"h-full w-full shrink-0"})})});function rE(e){let{mode:t="single",weekStartsOn:r=0,numberOfMonths:n=1,showYearNavigation:l=!1,disableNavigation:s,locale:i,className:d,classNames:u,...m}=e;return(0,c.jsx)(J.hv,{mode:t,weekStartsOn:r,numberOfMonths:n,locale:i,showOutsideDays:1===n,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:(0,a.v)("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 opacity-50",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",...u},components:{IconLeft:()=>(0,c.jsx)(U.A,{className:"h-4 w-4"}),IconRight:()=>(0,c.jsx)(H.A,{className:"h-4 w-4"}),Caption:e=>{let{...t}=e,{goToMonth:r,nextMonth:n,previousMonth:a,currentMonth:o,displayMonths:d}=(0,J.cq)(),{numberOfMonths:u,fromDate:m,toDate:h}=(0,J.wj)(),p=d.findIndex(e=>(0,K.t)(t.displayMonth,e)),x=0===p,f=p===d.length-1,g=u>1&&(x||!f),v=u>1&&(f||!x);return(0,c.jsxs)("div",{className:"flex items-center justify-between",children:[(0,c.jsxs)("div",{className:"flex items-center gap-1",children:[l&&!v&&(0,c.jsx)(rR,{disabled:s||!a||m&&(0,q.e)(o,-1).getTime()<m.getTime(),"aria-label":"Go to previous year",onClick:()=>{let e=(0,q.e)(o,-1);a&&(!m||e.getTime()>=m.getTime())&&r(e)},icon:Y.A}),!v&&(0,c.jsx)(rR,{disabled:s||!a,"aria-label":"Go to previous month",onClick:()=>a&&r(a),icon:U.A})]}),(0,c.jsx)("div",{role:"presentation","aria-live":"polite",className:"text-sm font-medium capitalize tabular-nums text-neutral-900",children:(0,Z.GP)(t.displayMonth,"LLLL yyy",{locale:i})}),(0,c.jsxs)("div",{className:"flex items-center gap-1",children:[!g&&(0,c.jsx)(rR,{disabled:s||!n,"aria-label":"Go to next month",onClick:()=>n&&r(n),icon:H.A}),l&&!g&&(0,c.jsx)(rR,{disabled:s||!n||h&&(0,q.e)(o,1).getTime()>h.getTime(),"aria-label":"Go to next year",onClick:()=>{let e=(0,q.e)(o,1);n&&(!h||e.getTime()<=h.getTime())&&r(e)},icon:X.A})]})]})},Day:e=>{let{date:t,displayMonth:r}=e,n=(0,o.useRef)(null),{activeModifiers:l,buttonProps:s,divProps:i,isButton:d,isHidden:u}=(0,J.W5)(t,r,n),{selected:m,today:h,disabled:p,range_middle:x}=l;if(u)return(0,c.jsx)(c.Fragment,{});if(!d)return(0,c.jsx)("div",{...i,className:(0,a.v)("flex items-center justify-center",i.className)});let{children:f,...g}=s;return(0,c.jsxs)("button",{ref:n,...g,type:"button",children:[f,h&&(0,c.jsx)("span",{className:(0,a.v)("absolute inset-x-1/2 bottom-1.5 h-0.5 w-4 -translate-x-1/2 rounded-[2px]",{"bg-blue-500":!m,"!bg-white":m,"!bg-blue-400":m&&x,"text-neutral-400":p})})]})}},...m})}rR.displayName="NavigationButton";var rD=(0,o.createContext)({isOpen:!1,setIsOpen:()=>{}}),rL=function(e,t){let r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=(r=window.navigator.language,!Number.isInteger(Number(new Intl.DateTimeFormat(r,{hour:"numeric"}).format())));return n?l?(0,Z.GP)(e,"d MMM, yyyy h:mm a",{locale:t}):(0,Z.GP)(e,"d MMM, yyyy HH:mm",{locale:t}):(0,Z.GP)(e,"d MMM, yyyy",{locale:t})},rz=(0,d.F)(["group peer flex appearance-none items-center gap-x-2 truncate rounded-lg 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"}}}),rI=(0,o.forwardRef)((e,t)=>{let{className:r,children:n,placeholder:l,hasError:s,disabled:o,...d}=e;return(0,c.jsxs)("button",{ref:t,className:(0,a.v)(rz({hasError:s}),r),disabled:o,...d,children:[(0,c.jsx)($.A,{className:"h-4 w-4 shrink-0"}),(0,c.jsx)("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left",children:n||(l?(0,c.jsx)("span",{className:"text-neutral-400",children:l}):null)}),(0,c.jsx)(i.A,{className:"h-4 w-4 flex-shrink-0 text-neutral-400 transition-transform duration-75 group-data-[state=open]:rotate-180"})]})});function rT(e){var t;let{value:r,defaultValue:n,onChange:l,trigger:a,renderContent:s,disabled:i,disabledDays:d,locale:u=Q.c,placeholder:m="Select date",hasError:h,invalid:p,align:x="center",className:f,...g}=e,[v,b]=(0,o.useState)(!1),[w,j]=(0,o.useState)(null!=(t=null!=r?r:n)?t:void 0);(0,o.useEffect)(()=>{j(null!=r?r:void 0)},[r]);let y=w?rL(w,u):null,N=(0,c.jsx)(rE,{mode:"single",fixedWeeks:!0,showYearNavigation:!0,selected:w,onSelect:e=>{j(e),null==l||l(e),b(!1)},locale:u,disabled:d,...g,defaultMonth:w});return(0,c.jsx)(rD.Provider,{value:{isOpen:v,setIsOpen:b},children:(0,c.jsx)(tj,{align:x,openPopover:v,setOpenPopover:b,popoverContentClassName:"rounded-xl",content:s?s({calendar:N}):(0,c.jsx)("div",{className:"flex w-full",children:N}),children:a?a({displayValue:y,placeholder:m,open:v,disabled:i,invalid:p}):(0,c.jsx)(rI,{placeholder:m,disabled:i,className:f,hasError:h,"aria-required":g.required||g["aria-required"],"aria-invalid":g["aria-invalid"],"aria-label":g["aria-label"],"aria-labelledby":g["aria-labelledby"],children:y})})})}rI.displayName="DatePicker.Trigger";var r_=e=>{let{presets:t,onSelect:r,currentValue:n,currentPresetId:l}=e,s=(e,t)=>e.getDate()===t.getDate()&&e.getMonth()===t.getMonth()&&e.getFullYear()===t.getFullYear();return(0,c.jsx)(G.uB,{className:"w-full rounded ring-neutral-200 ring-offset-2 focus:outline-none",tabIndex:0,autoFocus:!0,loop:!0,children:(0,c.jsx)(G.uB.List,{className:"[&>*]:flex [&>*]:w-full [&>*]:items-start [&>*]:gap-x-2 [&>*]:gap-y-0.5 [&>*]:sm:flex-col",children:t.map((e,t)=>(0,c.jsxs)(G.uB.Item,{disabled:e.requiresUpgrade,onSelect:()=>r(e),title:e.label,value:e.id,className:(0,a.v)("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",(e=>l?l===e.id:"dateRange"in e?n&&((e,t)=>{let r=e.from,n=t.from,l=!1;r&&n&&s(r,n)&&(l=!0);let a=e.to,i=t.to,o=!1;return a&&i&&s(a,i)&&(o=!0),l&&o})(n,e.dateRange):"date"in e&&n&&s(n,e.date))(e)&&"font-semibold text-neutral-800"),children:[(0,c.jsx)("span",{children:e.label}),e.requiresUpgrade?(0,c.jsx)(en.A,{className:"h-3.5 w-3.5","aria-hidden":"true"}):e.shortcut?(0,c.jsx)("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:e.shortcut.toUpperCase()}):null,e.requiresUpgrade&&e.tooltipContent&&(0,c.jsx)(t4,{side:"bottom",content:e.tooltipContent,children:(0,c.jsx)("div",{className:"absolute inset-0 cursor-not-allowed"})})]},t))})})};r_.displayName="DatePicker.Presets";var rF=e=>{var t,r,n,a,s;let{value:i,defaultValue:d,presetId:u,onChange:m,presets:h,disabled:p,disableNavigation:x,disabledDays:f,showYearNavigation:g=!1,locale:v=Q.c,placeholder:b="Select date range",hasError:w,align:j="center",className:y,...N}=e,{isDesktop:k}=(0,l.a)(),[C,S]=(0,o.useState)(!1),[A,P]=(0,o.useState)(h&&u?null==h?void 0:h.find(e=>{let{id:t}=e;return t===u}):void 0),[M,R]=(0,o.useState)(null!=(n=null!=(r=null!=(t=null==A?void 0:A.dateRange)?t:i)?r:d)?n:void 0),[E,D]=(0,o.useState)(null==M?void 0:M.to),L=(0,o.useMemo)(()=>M,[C]);(0,o.useEffect)(()=>{R(i)},[i]),(0,o.useEffect)(()=>{var e,t;let r=null==h?void 0:h.find(e=>{let{id:t}=e;return t===u});P(r),R(null!=(t=null!=(e=null==r?void 0:r.dateRange)?e:i)?t:d)},[h,u]),(0,o.useEffect)(()=>{C?M&&D(M.to):D(null==M?void 0:M.to)},[C]);let z=e=>{let t=e.dateRange;(null==t?void 0:t.from)&&(null==t?void 0:t.to)&&(0,ee.r)(t.from,t.to)&&(t={from:(0,et.o)(t.from),to:(0,er.D)(t.to)}),R(t),P(e),null==m||m(t,e),S(!1)},I=(0,o.useMemo)(()=>M?"".concat(M.from?rL(M.from,v):""," - ").concat(M.to?rL(M.to,v):""):null,[M,v]);return ti(null!=(a=null==h?void 0:h.filter(e=>e.shortcut).map(e=>e.shortcut))?a:[],e=>{let t=null==h?void 0:h.find(t=>t.shortcut===e.key);t&&z(t)}),(0,c.jsx)(rD.Provider,{value:{isOpen:C,setIsOpen:S},children:(0,c.jsx)(tj,{align:j,openPopover:C,setOpenPopover:e=>{e||(R(L),S(!1)),S(e)},popoverContentClassName:"rounded-xl",content:(0,c.jsx)("div",{className:"flex w-full",children:(0,c.jsxs)("div",{className:"scrollbar-hide relative flex w-full flex-col overflow-x-scroll sm:flex-row-reverse sm:items-start",children:[h&&h.length>0&&(0,c.jsx)(rB,{children:(0,c.jsx)("div",{className:"absolute px-3 sm:inset-0 sm:left-0",children:(0,c.jsx)("div",{className:"sm:py-3",children:(0,c.jsx)(r_,{currentPresetId:u,currentValue:M,presets:h,onSelect:z})})})}),(0,c.jsx)("div",{className:"scrollbar-hide overflow-x-scroll",children:(0,c.jsx)(rE,{mode:"range",selected:M,onSelect:(e,t)=>
1{let r=(null==M?void 0:M.from)&&(null==M?void 0:M.to)?{from:t}:e;(null==r?void 0:r.from)&&(null==r?void 0:r.to)&&(0,ee.r)(r.from,r.to)&&(r.from=(0,et.o)(r.from),r.to=(0,er.D)(r.to)),R(r),P(void 0),(null==r?void 0:r.from)&&(null==r?void 0:r.to)&&(null==m||m(r),S(!1))},month:E,onMonthChange:D,numberOfMonths:k?2:1,disabled:f,disableNavigation:x,showYearNavigation:g,locale:v,className:"scrollbar-hide overflow-x-scroll",classNames:{months:"flex flex-row divide-x divide-neutral-200 overflow-x-scroll scrollbar-hide"},...N})})]})}),children:(0,c.jsx)(rI,{placeholder:b,disabled:p,className:y,hasError:w,"aria-required":N.required||N["aria-required"],"aria-invalid":N["aria-invalid"],"aria-label":N["aria-label"],"aria-labelledby":N["aria-labelledby"],children:null!=(s=null==A?void 0:A.label)?s:I})})})};function rO(e){let{presets:t,...r}=e;return t&&((e,t)=>{let{toYear:r,fromYear:n,fromMonth:l,toMonth:a,fromDay:s,toDay:i}=t;e&&e.length>0&&e.forEach(e=>{var t,o,c,d,u,m;if("date"in e){let t=e.date.getFullYear();if(n&&t<n)throw Error("Preset ".concat(e.label," is before fromYear ").
1concat(n,"."));if(r&&t>r)throw Error("Preset ".concat(e.label," is after toYear ").concat(r,"."));if(l&&e.date.getMonth()<l.getMonth())throw Error("Preset ".concat(e.label," is before fromMonth ").concat(l,"."));if(a&&e.date.getMonth()>a.getMonth())throw Error("Preset ".concat(e.label," is after toMonth ").concat(a,"."));if(s&&e.date.getDate()<s.getDate())throw Error("Preset ".concat(e.label," is before fromDay ").concat(s,"."));if(i&&e.date.getDate()>i.getDate())throw Error("Preset ".concat(e.label," is after toDay ").concat((0,Z.GP)(i,"MMM dd, yyyy"),"."))}if("dateRange"in e){let h=null==(t=e.dateRange.from)?void 0:t.getFullYear(),p=null==(o=e.dateRange.to)?void 0:o.getFullYear();if(h&&n&&h<n)throw Error("Preset ".concat(e.label,"'s 'from' is before fromYear ").concat(n,"."));if(p&&r&&p>r)throw Error("Preset ".concat(e.label,"'s 'to' is after toYear ").concat(r,"."));if(l){let t=null==(c=e.dateRange.from)?void 0:c.getMonth();if(t&&t<l.getMonth())throw Error("Preset ".concat(e.label,"'s 'from' is before fromMonth ").concat((0,Z.GP)(l,"MMM, yyyy"),"."))}if(a){let t=null==(d=e.dateRange.to)?void 0:d.getMonth();if(t&&t>a.getMonth())throw Error("Preset ".concat(e.label,"'s 'to' is after toMonth ").concat((0,Z.GP)(a,"MMM, yyyy"),"."))}if(s){let t=null==(u=e.dateRange.from)?void 0:u.getDate();if(t&&t<s.getDate())throw Error("Preset ".concat(e.dateRange.from,"'s 'from' is before fromDay ").concat((0,Z.GP)(s,"MMM dd, yyyy"),"."))}if(i){let t=null==(m=e.dateRange.to)?void 0:m.getDate();if(t&&t>i.getDate())throw Error("Preset ".concat(e.label,"'s 'to' is after toDay ").concat((0,Z.GP)(i,"MMM dd, yyyy"),"."))}}})})(t,r),(0,c.jsx)(rF,{presets:t,...r})}function rB(e){let{children:t}=e,r=(0,o.useRef)(null),{scrollProgress:n,updateScrollProgress:l}=e0(r);return(0,c.jsxs)("div",{className:"relative sm:h-full",children:[(0,c.jsx)("div",{ref:r,onScroll:l,className:(0,a.v)("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:t}),(0,c.jsx)("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(n,2)}})]})}function rV(e){let{dotSize:t=2,gapSize:r=10,patternOffset:n=[0,0],className:l}=e,s=(0,o.useId)();return(0,c.jsxs)("svg",{className:(0,a.v)("pointer-events-none absolute inset-0 text-black/10",l),width:"100%",height:"100%",children:[(0,c.jsx)("defs",{children:(0,c.jsx)("pattern",{id:"dots-".concat(s),x:n[0]-1,y:n[1]-1,width:t+r,height:t+r,patternUnits:"userSpaceOnUse",children:(0,c.jsx)("rect",{x:1,y:1,width:t,height:t,fill:"currentColor"})})}),(0,c.jsx)("rect",{fill:"url(#dots-".concat(s,")"),width:"100%",height:"100%"})]})}function rU(e){let{className:t}=e,{data:r}=(0,D.Ay)("https://status.dub.co/api/v1/summary",a.t),[n,l]=(0,o.useState)("bg-neutral-200"),[s,i]=(0,o.useState)("Loading status...");return(0,o.useEffect)(()=>{if(!r)return;let{ongoing_incidents:e}=r;if(e.length>0){let{current_worst_impact:t,name:r}=e[0];i(r),l("degraded_performance"===t?"bg-yellow-500":"bg-red-500")}else i("All systems operational"),l("bg-green-500")},[r]),(0,c.jsxs)(h,{href:"https://status.dub.co",target:"_blank",className:(0,a.v)("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",t),children:[(0,c.jsxs)("div",{className:"relative size-2",children:[(0,c.jsx)("div",{className:(0,a.v)("absolute inset-0 m-auto size-2 animate-ping items-center justify-center rounded-full group-hover:animate-none",n,"Loading status..."===s&&"animate-none")}),(0,c.jsx)("div",{className:(0,a.v)("absolute inset-0 z-10 m-auto size-2 rounded-full",n)})]}),(0,c.jsx)("p",{className:"text-xs font-medium leading-none text-neutral-600",children:s})]})}function rH(e){let{icon:t,title:r,description:n,learnMore:l,children:a}=e;return(0,c.jsxs)("div",{className:"flex flex-col items-center justify-center gap-y-4",children:[(0,c.jsx)("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-neutral-200 bg-neutral-50",children:(0,c.jsx)(t,{className:"size-6 text-neutral-800"})}),(0,c.jsx)("p",{className:"text-center text-base font-medium text-neutral-950",children:r}),n&&(0,c.jsxs)("p",{className:"max-w-sm text-balance text-center text-sm text-neutral-500",children:[n," ",l&&(0,c.jsx)("a",{href:l,target:"_blank",className:"underline underline-offset-2 hover:text-neutral-800",children:"Learn more â"})]}),a]})}var rW=["application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","text/csv"],rG={png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",webp:"image/webp",avif:"image/avif",svg:"image/svg+xml"},rK={any:{types:[]},images:{types:["image/png","image/jpeg","image/webp","image/avif"],errorMessage:"File type not supported (.png, .jpg, .webp, or .avif only)"},csv:{types:["text/csv"],errorMessage:"File type not supported (.csv only)"},documents:{types:rW,errorMessage:"File type not supported (document files only)"}
1,programResourceImages:{types:["image/svg+xml","image/png","image/jpeg","image/webp","image/avif"],errorMessage:"File type not supported (.svg, .png, .jpg, .webp, or .avif only)"},programResourceFiles:{types:["image/svg+xml","image/png","image/jpeg","image/webp","image/avif",...rW,"application/zip"],errorMessage:"File type not supported (.svg, .png, .jpg, .webp, .avif, document, or zip files only)"}},rq=(0,d.F)("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 rZ(e){let{id:t,readFile:r,onChange:l,variant:s,className:i,iconClassName:d,previewClassName:u,icon:m=n.Eb,customPreview:h,accept:p="any",acceptedFileTypes:x,imageSrc:f,loading:g=!1,clickToUpload:v=!0,showHoverOverlay:b=!0,content:w,maxFileSizeMB:j=5,targetResolution:y,accessibilityLabel:N="File upload",disabled:k=!1,"data-testid":C}=e,[S,A]=(0,o.useState)(!1),[P,M]=(0,o.useState)(null),[R,D]=(0,o.useState)(!1);(0,o.useEffect)(()=>{D(!1)},[f]);let L=null!=x?x:rK[p].types,z=async e=>{var t,n;let s="dataTransfer"in e?e.dataTransfer.files&&e.dataTransfer.files[0]:e.target.files&&e.target.files[0];if(!s)return;if(M(s.name),j>0&&s.size/1024/1024>j)return void E.o.error("File size too big (max ".concat(j," MB)"));let i=null==(t=s.name.split(".").pop())?void 0:t.toLowerCase(),o=s.type||(i?rG[i]:"")||"";if(L.length&&!L.includes(o))return void E.o.error(x?"File type not supported":null!=(n=rK[p].errorMessage)?n:"File type not supported");let c=!s.type&&o?new File([s],s.name,{type:o}):s;if(y&&o.startsWith("image/"))try{let e=await (0,a.n)(c,y),t=await fetch(e).then(e=>e.blob());c=new File([t],c.name,{type:t.type||"image/jpeg"})}catch(e){console.error("Error resizing image:",e)}if(r){let e=new FileReader;e.onload=e=>{var t;return null==l?void 0:l({src:null==(t=e.target)?void 0:t.result,file:c})},e.readAsDataURL(c);return}null==l||l({file:c})};return(0,c.jsxs)("label",{className:(0,a.v)(rq({variant:s}),k?"cursor-not-allowed":(0,a.v)(v&&"cursor-pointer"),i),children:[g&&(0,c.jsx)("div",{className:"absolute inset-0 z-[5] flex items-center justify-center rounded-[inherit] bg-white",children:(0,c.jsx)(n.x,{})}),(0,c.jsx)("div",{className:"absolute inset-0 z-[5]",onDragOver:e=>{e.preventDefault(),e.stopPropagation(),A(!0)},onDragEnter:e=>{e.preventDefault(),e.stopPropagation(),A(!0)},onDragLeave:e=>{e.preventDefault(),e.stopPropagation(),A(!1)},onDrop:async e=>{e.preventDefault(),e.stopPropagation(),z(e),A(!1)}}),(0,c.jsxs)("div",{className:(0,a.v)("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",S&&!k&&"cursor-copy border-black bg-neutral-50 opacity-100",f&&!R?(0,a.v)("opacity-0",b&&!k&&"group-hover:opacity-100"):(0,a.v)(!k&&"group-hover:bg-neutral-50")),children:[(0,c.jsx)(m,{className:(0,a.v)("size-7 transition-all duration-75",k?"text-neutral-400":(0,a.v)("text-neutral-500 group-hover:scale-110 group-active:scale-95",S?"scale-110":"scale-100"),d)}),null!==w&&(0,c.jsx)("div",{className:(0,a.v)("mt-2 text-center text-sm text-neutral-500",k&&"text-neutral-400"),children:null!=w?w:(0,c.jsx)(c.Fragment,{children:(0,c.jsxs)("p",{children:["Drag and drop ",v&&"or click"," to upload."]})})}),(0,c.jsx)("span",{className:"sr-only",children:N})]}),f&&!R&&(null!=h?h:(0,c.jsx)("img",{src:f,alt:"Preview",referrerPolicy:"no-referrer",onError:()=>D(!0),className:(0,a.v)("h-full w-full rounded-[inherit] object-cover",u)})),v&&(0,c.jsx)("div",{className:"sr-only mt-1 flex shadow-sm",children:(0,c.jsx)("input",{id:t,type:"file",accept:L.join(","),onChange:z,disabled:k,"data-testid":C},P)})]})}var rY=(0,o.forwardRef)((e,t)=>{let{children:r}=e,n=(0,o.useRef)(null),{scrollProgress:l,updateScrollProgress:a}=e0(n),s=(0,o.useCallback)(e=>{n.current=e,"function"==typeof t?t(e):t&&(t.current=e)},[t]);return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",ref:s,onScroll:a,children:r}),(0,c.jsx)("div",{className:"pointer-events-none absolute bottom-0 left-0 hidden h-16 w-full bg-gradient-to-t from-white sm:block",style:{opacity:1-Math.pow(l,2)}})]})});function rX(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:[]}}function rJ(e){if(null==e||"|"===e)return{};let[t,r]=e.split("|"),n=""===t?void 0:Number(t),l=""===r?void 0:Number(r);return{...Number.isFinite(n)?{min:n}:{}
1,...Number.isFinite(l)?{max:l}:{}}}function rQ(e,t){let r=null!=e&&Number.isFinite(e)?String(Math.trunc(e)):"",n=null!=t&&Number.isFinite(t)?String(Math.trunc(t)):"";return r||n?"".concat(r,"|").concat(n):"|"}function r$(e,t){return null==e&&null==t?{}:null!=e&&null!=t&&e>t?{min:t,max:e}:{...null!=e?{min:e}:{},...null!=t?{max:t}:{}}}function r0(e,t){return null==e?"":1===t?String(Math.trunc(e)):String(Number((e/t).toFixed(2)))}function r1(e){let{label:t,onBack:r,onClear:n}=e;return(0,c.jsxs)("div",{className:"flex items-center justify-between px-2 pt-2",children:[(0,c.jsxs)("div",{className:"flex items-center gap-1",children:[(0,c.jsx)("button",{type:"button",className:(0,a.v)("flex size-6 shrink-0 items-center justify-center rounded-md p-2 text-neutral-500","transition-[transform,color,background-color] duration-150 ease-out motion-reduce:transition-none","hover:bg-neutral-900/5","active:scale-[0.97] motion-reduce:active:scale-100"),onClick:()=>r(),"aria-label":"Back",children:(0,c.jsx)(U.A,{className:"size-3 shrink-0"})}),(0,c.jsx)("span",{className:"text-sm font-medium text-neutral-900",children:t})]}),n&&(0,c.jsx)("button",{type:"button",className:"text-content-emphasis hover:border-border-subtle flex h-7 items-center justify-center rounded-lg border border-transparent px-2.5 py-2 text-sm font-medium transition-colors",onClick:n,"aria-label":"Clear",children:"Clear"})]})}function r2(e){let{bound:t,value:r,unboundedLabel:n,parseInput:l,displayScale:s,step:i,onCommit:d,inputRef:u,onEmptyMinBackspace:m,onFocusNextField:h,onFocusPreviousField:p,onEscapeCloseFilter:x}=e,[f,g]=(0,o.useState)(()=>r0(r,s)),v=(0,o.useCallback)(e=>{u&&("function"==typeof u?u(e):u.current=e)},[u]);(0,o.useEffect)(()=>{g(r0(r,s))},[r,s]);let b=(0,o.useCallback)(()=>{let e=f.trim();if(""===e)return void d(void 0);let t=l(e);if(!Number.isFinite(t))return void g(r0(r,s));d(t)},[f,d,l,r,s]),w="string"==typeof i?Number.parseFloat(i):i,j=Number.isFinite(w)&&w>0?w:1;return(0,c.jsx)("div",{className:(0,a.v)("border-subtle flex h-10 min-w-0 flex-1 items-stretch overflow-hidden rounded-lg border bg-white","transition-[border-color,box-shadow] duration-150 ease-out motion-reduce:transition-none","focus-within:border-neutral-500 focus-within:ring-4 focus-within:ring-neutral-200"),children:(0,c.jsx)("input",{ref:v,type:"text",inputMode:1===s?"numeric":"decimal",autoComplete:"off","aria-label":"min"===t?"Minimum value":"Maximum value",placeholder:n,id:"filter-range-input-".concat(t),className:"min-w-0 flex-1 border-0 bg-transparent px-3 py-1 text-sm text-neutral-900 outline-none placeholder:text-neutral-400 focus:ring-0",value:f,onChange:e=>{g(function(e,t){if(""===e)return"";if(1===t)return e.replace(/\D/g,"");let r=e.replace(/[^0-9.]/g,""),n=r.indexOf(".");return -1!==n&&(r=r.slice(0,n+1)+r.slice(n+1).replace(/\./g,"")),r}(e.target.value,s))},onKeyDown:e=>{if(e.stopPropagation(),"Backspace"===e.key&&m&&""===f){e.preventDefault(),m();return}if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();let t=f.trim(),r=""===t?0:1===s?Number.parseInt(t,10):Number.parseFloat(t);if(!Number.isFinite(r))return;let n=Math.max(0,r+("ArrowUp"===e.key?j:-j));g(String(1===s?Math.round(n):Number(n.toFixed(2))));return}let r=e.currentTarget,n=r.selectionStart,l=r.selectionEnd;if(null!==n&&null!==l&&n===l){if("min"===t&&"ArrowRight"===e.key&&h&&n===f.length){e.preventDefault(),h();return}if("max"===t&&("ArrowLeft"===e.key||"Backspace"===e.key)&&p&&0===n){e.preventDefault(),p();return}}if("Escape"===e.key&&x){e.preventDefault(),x();return}"Enter"===e.key&&(e.preventDefault(),b())},onBlur:()=>{b()}})})}function r4(e){var t,r,n;let{filter:l,activeToken:a,onApply:s,onNavigateBack:i,onCloseFilter:d}=e,{min:u,max:m}=rJ(a),h=null!=u&&null!=m,p=null!=(t=l.parseRangeInput)?t:e=>{let t=Number.parseInt(e.replace(/[^\d-]/g,""),10);return Number.isFinite(t)?t:NaN},x=null!=(r=l.rangeDisplayScale)?r:1,f=null!=(n=l.rangeNumberStep)?n:1===x?1:.01,g=(0,o.useCallback)((e,t)=>{let{min:r,max:n}=r$(e,t);s(rQ(r,n))},[s]),v=(0,o.useCallback)(e=>{let{min:t,max:r}=r$(e,m);g(t,r)},[m,g]),b=(0,o.useCallback)(e=>{let{min:t,max:r}=r$(u,e);g(t,r)},[u,g]),w=(0,o.useRef)(null),j=(0,o.useRef)(null),y=(0,o.useCallback)(()=>{let e=w.current;if(!e)return;e.focus();let t=e.value.length;queueMicrotask(()=>{e.setSelectionRange(t,t)})},[]),N=(0,o.useCallback)(()=>{let e=j.current;e&&(e.focus(),queueMicrotask(()=>{e.setSelectionRange(0,0)}
1))},[]);return(0,o.useEffect)(()=>{let e=requestAnimationFrame(()=>{var e;null==(e=w.current)||e.focus()});return()=>cancelAnimationFrame(e)},[]),(0,c.jsx)("div",{className:"flex w-full min-w-[282px] max-w-[282px] flex-col gap-3 p-2",onKeyDownCapture:e=>{"Backspace"!==e.key&&"Delete"!==e.key||e.target.closest("input, textarea, [contenteditable=true]")||(e.preventDefault(),i())},children:(0,c.jsxs)("div",{className:"flex items-end gap-2",children:[(0,c.jsx)("div",{className:"min-w-0 flex-1",children:(0,c.jsx)(r2,{bound:"min",value:u,unboundedLabel:"No min",parseInput:p,displayScale:x,step:f,onCommit:v,inputRef:w,onEmptyMinBackspace:i,onFocusNextField:N,onEscapeCloseFilter:h?d:void 0})}),(0,c.jsx)("span",{className:"shrink-0 pb-2.5 text-xs text-neutral-500",children:"to"}),(0,c.jsx)("div",{className:"min-w-0 flex-1",children:(0,c.jsx)(r2,{bound:"max",value:m,unboundedLabel:"No max",parseInput:p,displayScale:x,step:f,onCommit:b,inputRef:j,onFocusPreviousField:y,onEscapeCloseFilter:h?d:void 0})})]})})}function r3(e){let{filter:t,activeToken:r,onApply:n,onBack:l,onClear:a,onCloseOuter:s,scrollRef:i}=e;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(r1,{label:t.label,onBack:l,onClear:a}),(0,c.jsx)(rY,{ref:i,children:(0,c.jsx)(r4,{filter:t,activeToken:r,onApply:n,onNavigateBack:l,onCloseFilter:s})})]})}function r5(e){var t,r,l,s,i,d,u,m;let h,p,x,f,{filterKey:g,filter:v,values:b,operator:w,OptionDisplay:j,onRemove:y,onRemoveFilter:N,onSelect:k,onToggleOperator:C,isAdvancedFilter:S=!1}=e,[A,P]=(0,o.useState)(!1),[M,R]=(0,o.useState)(!1),[E,D]=(0,o.useState)(""),[L,z]=(0,o.useState)(new Set),[I,T]=(0,o.useState)(!1),F=(0,o.useCallback)(()=>{z(new Set(b)),R(!0)},[b]),O=(0,o.useCallback)(e=>{b.includes(e)?y(g,e):null==k||k(g,e),!v.singleSelect&&(S||v.multiple)||R(!1)},[g,b,k,y,S,v.multiple]);if("range"===v.type){let e=String(null!=(s=b[0])?s:"|"),r=null!=(i=v.formatRangeBound)?i:e=>String(Math.trunc(e)),{min:n,max:l}=rJ(e),o=null!=n&&null!=l,u=null!=n||null!=l,m=null!=(d=null==(t=v.formatRangePillLabel)?void 0:t.call(v,e))?d:null!=n&&null!=l?"".concat(r(n)," â ").concat(r(l)):null!=n?"".concat(r(n)," â No max"):null!=l?"No min â ".concat(r(l)):e;return(0,c.jsxs)(_.P.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},className:"flex min-h-9 items-stretch divide-x divide-neutral-200 overflow-hidden rounded-md border border-neutral-200 bg-white text-sm text-black",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[(0,c.jsx)("span",{className:"shrink-0 text-neutral-500",children:r6(v.icon)?v.icon:(0,c.jsx)(v.icon,{className:"size-4"})}),(0,c.jsx)("span",{className:"text-sm font-medium text-neutral-900",children:v.label})]}),(0,c.jsx)("div",{className:"flex items-center px-3 py-2 text-sm text-neutral-500",children:"is"}),(0,c.jsx)(tj,{openPopover:I,setOpenPopover:T,align:"start",onEscapeKeyDown:e=>{o&&(e.preventDefault(),T(!1))},content:(0,c.jsx)(ro,{width:!0,height:!0,className:"rounded-[inherit]",children:(0,c.jsx)(r3,{filter:v,activeToken:e,onBack:()=>T(!1),onClear:u?()=>N?N(g):y(g,e):void 0,onCloseOuter:o?()=>T(!1):void 0,onApply:t=>{"|"===t?N?N(g):y(g,e):null==k||k(g,t)}},g)}),children:(0,c.jsx)("button",{type:"button",className:(0,a.v)("flex min-w-0 flex-1 items-center px-3 py-2 text-left text-sm font-medium tracking-tight text-neutral-900","transition-[background-color,transform] duration-150 ease-out motion-reduce:transition-none","hover:bg-neutral-50 active:scale-[0.99] motion-reduce:active:scale-100 [@media(hover:none)]:hover:bg-transparent"),children:(0,c.jsx)("span",{className:"truncate",children:m})})}),(0,c.jsx)("button",{type:"button",className:(0,a.v)("h-full rounded-r-md p-2 text-neutral-500 ring-inset ring-neutral-500","transition-[color,background-color,transform] duration-150 ease-out motion-reduce:transition-none","hover:bg-neutral-100 hover:text-neutral-800 [@media(hover:none)]:hover:bg-transparent","active:scale-[0.97] motion-reduce:active:scale-100","focus:outline-none focus-visible:ring-1"),onClick:()=>{N?N(g):b.forEach(e=>y(g,e))},children:(0,c.jsx)(el.A,{className:"h-3.5 w-3.5"})})]})}return(0,c.jsxs)(_.P.div,{initial:{opacity:0,y:4}
1,animate:{opacity:1,y:0},className:"flex items-center divide-x rounded-lg border border-neutral-200 bg-white text-sm text-black",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2.5 px-3 py-2",children:[(0,c.jsx)("span",{className:"shrink-0 text-neutral-600",children:r6(v.icon)?v.icon:(0,c.jsx)(v.icon,{className:"h-4 w-4"})}),v.label]}),(S||v.multiple)&&!v.singleSelect&&!v.hideOperator?(0,c.jsx)(tj,{openPopover:A,setOpenPopover:P,content:(0,c.jsxs)("div",{className:"w-32 p-1",children:[(0,c.jsx)("button",{type:"button",className:(0,a.v)("flex w-full items-center rounded-md px-3 py-2 text-left text-sm","transition-[background-color,transform] duration-100 ease-out motion-reduce:transition-none","hover:bg-neutral-100 [@media(hover:none)]:hover:bg-transparent","active:scale-[0.99] motion-reduce:active:scale-100",!w.includes("NOT")&&"bg-neutral-50"),onClick:()=>{w.includes("NOT")&&(null==C||C(g)),P(!1)},children:"is"}),(0,c.jsx)("button",{type:"button",className:(0,a.v)("flex w-full items-center rounded-md px-3 py-2 text-left text-sm","transition-[background-color,transform] duration-100 ease-out motion-reduce:transition-none","hover:bg-neutral-100 [@media(hover:none)]:hover:bg-transparent","active:scale-[0.99] motion-reduce:active:scale-100",w.includes("NOT")&&"bg-neutral-50"),onClick:()=>{w.includes("NOT")||null==C||C(g),P(!1)},children:"is not"})]}),align:"center",children:(0,c.jsx)("button",{type:"button",className:(0,a.v)("px-3 py-2 text-neutral-500","transition-[color,background-color,transform] duration-150 ease-out motion-reduce:transition-none","hover:bg-neutral-50 hover:text-neutral-700 [@media(hover:none)]:hover:bg-transparent","active:scale-[0.98] motion-reduce:active:scale-100"),children:function(e){switch(e){case"IS":case"IS_ONE_OF":default:return"is";case"IS_NOT":case"IS_NOT_ONE_OF":return"is not"}}(w)})}):(0,c.jsx)("div",{className:"px-3 py-2 text-neutral-500",children:"is"}),(0,c.jsx)(tj,{openPopover:M,setOpenPopover:e=>{R(e),e||(D(""),z(new Set))},content:(0,c.jsx)("div",{children:(0,c.jsx)(ro,{width:!0,height:!0,className:"rounded-[inherit]",children:(0,c.jsxs)(G.uB,{loop:!0,shouldFilter:!1,children:[(0,c.jsx)("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:(0,c.jsx)(G.uB.Input,{placeholder:"".concat(v.label,"..."),value:E,onValueChange:D,className:"grow border-0 py-3 pl-4 pr-2 outline-none placeholder:text-neutral-400 focus:ring-0 sm:text-sm",autoCapitalize:"none"})}),(0,c.jsx)("div",{className:"scrollbar-hide max-h-[50vh] w-screen overflow-y-scroll sm:w-auto",children:(0,c.jsx)(G.uB.List,{className:"flex w-full min-w-[180px] flex-col gap-1 p-1",children:(p=(h=null!=(m=null==(u=v.options)?void 0:u.filter(e=>{var t,r,n;return!E||(null!=(n=null!=(r=e.label)?r:null==(t=v.getOptionLabel)?void 0:t.call(v,e.value,{key:v.key,option:e}))?n:String(e.value)).toLowerCase().includes(E.toLowerCase())}))?m:[]).filter(e=>L.has(e.value)),x=h.filter(e=>!L.has(e.value)),f=e=>{var t,r,l,s,i,o;let d=b.includes(e.value),u=null!=(s=null!=(l=e.icon)?l:null==(t=v.getOptionIcon)?void 0:t.call(v,e.value,{key:v.key,option:e}))?s:v.icon,m=null!=(o=null!=(i=e.label)?i:null==(r=v.getOptionLabel)?void 0:r.call(v,e.value,{key:v.key,option:e}))?o:String(e.value);return(0,c.jsxs)(G.uB.Item,{className:(0,a.v)("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","transition-[background-color] duration-100 ease-out motion-reduce:transition-none","active:scale-[0.99] motion-reduce:active:scale-100","data-[selected=true]:bg-neutral-100"),onSelect:()=>{O(e.value)},onPointerDown:e=>{e.preventDefault()},value:m+e.value,children:[(S||v.multiple)&&!v.singleSelect&&(0,c.jsx)("div",{className:(0,a.v)("flex h-4 w-4 items-center justify-center rounded border",d?"border-neutral-900 bg-neutral-900":"border-neutral-300"),children:d&&(0,c.jsx)(n.fb,{className:"h-3 w-3 text-white"})}),(0,c.jsx)("span",{className:"shrink-0 text-neutral-600",children:r6(u)?u:(0,c.jsx)(u,{className:"h-4 w-4"})}),(0,c.jsx)("span",{className:"flex-1",children:(0,a.o)(m,48)}),(0,c.jsx)("div",{className:"ml-1 flex shrink-0 justify-end text-neutral-500",children:(S||v.multiple)&&!v.singleSelect?e.right:d?(0,c.jsx)(n.fb,{className:"h-4 w-4"}):e.right})]},e.value)},(0,c.jsxs)(c.Fragment,{children:[p.map(f),(S||v.multiple)&&!v.singleSelect&&p.length>0&&x.length>0&&(0,c.jsx)(G.uB.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"}),x.map(f)]}))})})]})})}),align:"start",children:(0,c.jsx)("button",{type:"button",onClick:F,disabled:(null==(r=v.options)?void 0:r.length)===0,className:(0,a.v)("flex items-center",(null==(l=v.options)?void 0:l.length)&&"transition-[background-color,transform] duration-150 ease-out hover:bg-neutral-50 active:scale-[0.99] motion-reduce:transition-none motion-reduce:active:scale-100 [@media(hover:none)]:hover:bg-transparent"),children:v.options?j({className:"cursor-pointer"}):(0,c.jsx)("div",{className:"flex items-center gap-2.5 px-3 py-2",children:(0,c.jsx)("div",{className:"h-5 w-12 animate-pulse rounded-md bg-neutral-200"})})})}),(0,c.jsx)("button",{type:"button",className:(0,a.v)("h-full rounded-r-lg p-2 text-neutral-500 ring-inset ring-neutral-500","transition-[color,background-color,transform] duration-150 ease-out motion-reduce:transition-none","hover:bg-neutral-100 hover:text-neutral-800 [@media(hover:none)]:hover:bg-transparent","active:scale-[0.97] motion-reduce:active:scale-100","focus:outline-none focus-visible:ring-1"),onClick:()=>
1{N?N(g):b.forEach(e=>{y(g,e)})},children:(0,c.jsx)(el.A,{className:"h-3.5 w-3.5"})})]})}rY.displayName="FilterScroll";var r6=e=>(0,o.isValidElement)(e),r9=e=>{let{onEmptySubmit:t,...r}=e,n=(0,G.wo)(e=>0===e.filtered.count);return(0,c.jsx)(G.uB.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:r=>{var l;null==(l=e.onKeyDown)||l.call(e,r),"Enter"===r.key&&n&&(null==t||t(r))},autoCapitalize:"none"})};function r8(e){var t,r,l,s,i;let{filter:o,option:d,right:u,showCheckbox:m,isChecked:h,onSelect:p}=e,x=d&&null!=(s=null!=(l=d.icon)?l:null==(t=o.getOptionIcon)?void 0:t.call(o,d.value,{key:o.key,option:d}))?s:o.icon,f=d?null!=(i=d.label)?i:null==(r=o.getOptionLabel)?void 0:r.call(o,d.value,{key:o.key,option:d}):o.label;return(0,c.jsxs)(G.uB.Item,{className:(0,a.v)("flex cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-3 py-2 text-left text-sm","transition-colors duration-100 ease-out motion-reduce:transition-none","active:scale-[0.99] motion-reduce:active:scale-100","data-[selected=true]:bg-neutral-100"),value:f+(null==d?void 0:d.value),onSelect:p,onMouseDown:e=>{e.preventDefault()},children:[m&&(0,c.jsx)("div",{className:(0,a.v)("flex h-4 w-4 items-center justify-center rounded border",h?"border-neutral-900 bg-neutral-900":"border-neutral-300"),children:h&&(0,c.jsx)(n.fb,{className:"h-3 w-3 text-white"})}),(0,c.jsx)("span",{className:"shrink-0 text-neutral-600",children:ne(x)?x:(0,c.jsx)(x,{className:"h-4 w-4"})}),(0,c.jsx)("span",{className:"flex-1",children:(0,a.o)(f,48)}),(0,c.jsx)("div",{className:"ml-1 flex shrink-0 justify-end text-neutral-500",children:u})]})}var r7=e=>{let{search:t,selectedFilter:r,onSelect:l,askAI:a,children:s}=e;return r&&r.options&&0===r.options.length&&!1!==r.shouldFilter?t?(0,c.jsx)(r8,{filter:r,option:{value:t,label:t},onSelect:l}):(0,c.jsx)(G.uB.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:"Start typing to search..."}):!r&&a&&t?(0,c.jsxs)(G.uB.Empty,{className:"flex min-w-[180px] items-center space-x-2 rounded-md bg-neutral-100 px-3 py-2",children:[(0,c.jsx)(n.o,{className:"h-4 w-4"}),(0,c.jsxs)("p",{className:"text-center text-sm text-neutral-600",children:["Ask AI ",(0,c.jsxs)("span",{className:"text-black",children:['"',t,'"']})]})]}):(0,c.jsx)(G.uB.Empty,{className:"p-2 text-center text-sm text-neutral-400",children:s})},ne=e=>(0,o.isValidElement)(e);function nt(e){var t,r,l,s,i,d;let{filter:u,option:m,checked:h,onToggle:p,className:x}=e,f=null!=(l=m.icon)?l:null==(t=u.getOptionIcon)?void 0:t.call(u,m.value,{key:u.key,option:m}),g=null!=(i=null!=(s=m.label)?s:null==(r=u.getOptionLabel)?void 0:r.call(u,m.value,{key:u.key,option:m}))?i:String(m.value);return(0,c.jsxs)("button",{type:"button",disabled:m.disabled,onClick:p,className:(0,a.v)("flex w-full cursor-pointer items-center gap-3 whitespace-nowrap rounded-md px-2 py-2 text-left text-xs font-medium text-neutral-600","transition-all duration-75","hover:bg-neutral-100 active:bg-neutral-200","disabled:cursor-not-allowed disabled:opacity-60",x),children:[(0,c.jsx)("div",{className:(0,a.v)("flex h-4 w-4 shrink-0 items-center justify-center rounded border",h?"border-neutral-900 bg-neutral-900":"border-neutral-300"),children:h&&(0,c.jsx)(n.fb,{className:"h-3 w-3 text-white"})}),f&&(0,c.jsx)("span",{className:"shrink-0 text-neutral-500 [&_svg]:size-4",children:(d=f,(0,o.isValidElement)(d)?d:(0,c.jsx)(d,{className:"size-4"}))}),g?(0,c.jsx)("span",{className:"min-w-0 flex-1",children:(0,a.o)(g,48)}):(0,c.jsx)("div",{className:"h-4 w-20 animate-pulse rounded-lg bg-neutral-200"}),null!=m.right&&(0,c.jsx)("span",{className:"shrink-0 text-xs font-medium tabular-nums text-neutral-400",children:m.right})]})}var nr=[{showIcon:!0,labelWidth:"w-32",showRight:!1},{showIcon:!1,labelWidth:"w-24",showRight:!0},{showIcon:!0,labelWidth:"w-20",showRight:!1},{showIcon:!1,labelWidth:"w-28",showRight:!1},{showIcon:!1,labelWidth:"w-16",showRight:!0}];function nn(e){let{count:t=5}=e;return(0,c.jsx)("div",{className:"flex flex-col gap-1","aria-busy":"true","aria-label":"Loading options",children:nr.slice(0,t).map((e,t)=>(0,c.jsx)(nl,{...e},t))})}function nl(e){let{showIcon:t,labelWidth:r,showRight:n}=e;return(0,c.jsxs)("div",{className:"flex w-full items-center gap-3 rounded-md px-2 py-2","aria-hidden":!0,
1children:[(0,c.jsx)("div",{className:"h-4 w-4 shrink-0 animate-pulse rounded border border-neutral-200 bg-neutral-200"}),t&&(0,c.jsx)("div",{className:"size-4 shrink-0 animate-pulse rounded bg-neutral-200"}),(0,c.jsx)("div",{className:"min-w-0 flex-1",children:(0,c.jsx)("div",{className:(0,a.v)("h-3 animate-pulse rounded bg-neutral-200",r)})}),n&&(0,c.jsx)("div",{className:"h-3 w-6 shrink-0 animate-pulse rounded bg-neutral-200"})]})}function na(e,t){return"string"==typeof e&&"string"==typeof t?e.toLowerCase()===t.toLowerCase():e===t}var ns={Select:function(e){var t,r,s,d,u;let{filters:m,onSelect:h,onRemove:p,onRemoveFilter:x,onOpenFilter:f,onSearchChange:g,onSelectedFilterChange:v,activeFilters:b,askAI:w,isAdvancedFilter:j=!1,children:y,emptyState:N,className:k}=e,{isMobile:C}=(0,l.a)(),S=(0,o.useRef)(null),A=(0,o.useRef)(void 0),[P,M]=(0,o.useState)(!1);ti("f",()=>M(!0),{enabled:!P});let[R,E]=(0,o.useState)(""),[D,L]=(0,o.useState)(null),z=(0,o.useCallback)(()=>{E(""),L(null)},[]),I=(0,o.useCallback)(()=>{D?z():M(!1)},[D,z]);(0,o.useEffect)(()=>{P||z()},[P]);let T=D?m.find(e=>{let{key:t}=e;return t===D}):null,_=(0,o.useMemo)(()=>{if(!T||"range"!==T.type||!b)return;let e=b.find(e=>e.key===T.key);if(e)return rX(e).values[0]},[b,T]),F=(0,o.useMemo)(()=>{if(!T||"range"!==T.type)return!1;let{min:e,max:t}=rJ(_);return null!=e||null!=t},[T,_]),O=(0,o.useCallback)(e=>{S.current&&(A.current={width:S.current.clientWidth,height:S.current.clientHeight}),E(""),L(e),null==f||f(e)},[f]),B=(0,o.useCallback)(e=>{if(!T||!b)return!1;let t=b.find(e=>e.key===D);return!!t&&rX(t).values.includes(e)},[T,b,D]),V=(0,o.useCallback)(e=>{T&&((null==T?void 0:T.singleSelect)||!j&&!(null!=T&&T.multiple)?(B(e)?p(T.key,e):h(T.key,e),M(!1)):B(e)?p(T.key,e):h(T.key,e))},[T,B,h,p,j]);return(0,o.useEffect)(()=>{null==g||g(R)},[R]),(0,o.useEffect)(()=>{null==v||v(D)},[D]),(0,o.useEffect)(()=>{(null==T?void 0:T.options)&&S.current&&(A.current={width:S.current.clientWidth,height:S.current.clientHeight})},[null==T?void 0:T.options]),(0,c.jsx)(tj,{openPopover:P,setOpenPopover:M,onEscapeKeyDown:e=>{if((null==T?void 0:T.type)==="range"){let{min:t,max:r}=rJ(_);if(null!=t&&null!=r){e.preventDefault(),M(!1);return}}if(D){e.preventDefault(),e.stopPropagation(),I();return}e.preventDefault(),M(!1)},content:(0,c.jsx)(ro,{width:!C,height:!0,className:"rounded-[inherit]",style:{transform:"translateZ(0)"},children:(null==T?void 0:T.type)==="range"?(0,c.jsx)(r3,{filter:T,activeToken:_,scrollRef:S,onBack:()=>z(),onClear:F&&D?()=>x?x(D):p(D,null!=_?_:"|"):void 0,onCloseOuter:()=>M(!1),onApply:e=>{"|"===e?x?x(T.key):p(T.key,null!=_?_:"|"):h(T.key,e)}},D):(0,c.jsxs)(G.uB,{loop:!0,shouldFilter:!T||!1!==T.shouldFilter,children:[(0,c.jsxs)("div",{className:"flex items-center overflow-hidden rounded-t-lg border-b border-neutral-200",children:[(0,c.jsx)(r9,{placeholder:"".concat((null==T?void 0:T.label)||"Filter","..."),value:R,onValueChange:E,onKeyDown:e=>{"Escape"!==e.key&&("Backspace"!==e.key&&"Delete"!==e.key||R)||(e.preventDefault(),e.stopPropagation(),I())},onEmptySubmit:e=>{e.preventDefault(),e.stopPropagation(),w?(h("ai",T?"".concat(T.label," ").concat(R):R),M(!1)):V(R)}}),!T&&(0,c.jsx)("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"})]}),(0,c.jsx)(rY,{ref:S,children:(0,c.jsxs)(G.uB.List,{className:(0,a.v)("flex w-full flex-col gap-1 p-1",T?"min-w-[100px]":"min-w-[180px]"),children:[T?null!=(s=null==(r=null==(t=T.options)?void 0:t.filter(e=>!R||!e.hideDuringSearch))?void 0:r.map(e=>{let t=(null==T?void 0:T.singleSelect)||!j&&!(null!=T&&T.multiple),r=B(e.value);return(0,c.jsx)(r8,{filter:T,option:e,showCheckbox:!t&&(j||(null==T?void 0:T.multiple)),isChecked:r,right:t&&r?(0,c.jsx)(n.fb,{className:"h-4 w-4"}):e.right,onSelect:()=>V(e.value)},e.value)}))?s:(0,c.jsx)(G.uB.Loading,{children:(0,c.jsx)("div",{className:"-m-1 flex items-center justify-center",style:A.current,children:(0,c.jsx)(n.z,{})})}):m.filter(e=>!e.hideInFilterDropdown).map(e=>(0,c.jsxs)(o.Fragment,{children:[(0,c.jsx)(r8,{filter:e,onSelect:()=>O(e.key)}),e.separatorAfter&&(0,c.jsx)(G.uB.Separator,{className:"-mx-1 my-1 border-b border-neutral-200"})]},e.key)),(!T||T.options)&&(0,c.jsx)(r7,{search:R,selectedFilter:T,onSelect:()=>V(R),askAI:w,children:N?"object"!=typeof(u=N)||null===u||(0,o.isValidElement)(u)?N:null!=(d=null==N?void 0:N[null!=D?D:"default"])?d:"No matching options":"No matching options"})]})},D)]})}),children:(0,c.jsxs)("button",{type:"button",className:(0,a.v)("group flex h-10 cursor-pointer appearance-none items-center gap-x-2 truncate rounded-lg border px-3 text-sm outline-none","transition-[color,border-color,box-shadow] duration-150 ease-out motion-reduce:transition-none","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","active:scale-[0.98] motion-reduce:active:scale-100",k),children:[(0,c.jsx)(es.A,{className:"size-4 shrink-0"}),(0,c.jsx)("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-left text-neutral-900",children:null!=y?y:"Filter"}),null!=b&&b.length?(0,c.jsx)("div",{className:"flex size-4 shrink-0 items-center justify-center rounded-full bg-black text-[0.625rem] text-white",children:b.length}):(0,c.jsx)(i.A,{className:"size-4 shrink-0 text-neutral-400 transition-transform duration-100 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none"})]})})},List:function(e){var t;let{filters:r,activeFilters:n,onRemove:l,onRemoveFilter:s,onRemoveAll:i,onSelect:o,onToggleOperator:d,isAdvancedFilter:u=!1,className:m}=e;ti("Escape",i,{priority:1});let p=null!=(t=null==n?void 0:n.map(rX))?t:[];return(0,c.jsx)(ro,{height:!0,className:"w-full",transition:{type:"tween",duration:.2,ease:[.23,1,.32,1]},children:(0,c.jsxs)("div",{className:(0,a.v)("flex w-full flex-wrap items-start gap-4 sm:flex-nowrap",m),children:[(0,c.jsx)("div",{className:"flex grow flex-wrap gap-x-4 gap-y-2",children:(0,c.jsx)(ea.N,{children:p.map(e=>{var t,n,i,m,p,x;let f,g,{key:v,values:b,operator:w}=e;if("loader"===v)return(0,c.jsx)(_.P.div,{initial:{opacity:0,y:4}
1,animate:{opacity:1,y:0},className:"h-9 w-48 animate-pulse rounded-md border border-neutral-200 bg-white"},"loader-".concat(null!=(t=null==b?void 0:b[0])?t:0));let j=r.find(e=>e.key===v);if(!j)return console.error("Filter.List received an activeFilter without a corresponding filter"),null;let y=1===b.length,N=b.slice(0,3),k=y?(f=b[0],null!=(x=null!=(p=null==(g=null==(i=j.options)?void 0:i.find(e=>"string"==typeof e.value&&"string"==typeof f?e.value.toLowerCase()===f.toLowerCase():e.value===f))?void 0:g.label)?p:null==(m=j.getOptionLabel)?void 0:m.call(j,f,{key:j.key,option:g}))?x:String(f)):"".concat(b.length," ").concat(null!=(n=j.labelPlural)?n:(0,a.q)(j.label,b.length));return(0,c.jsx)(r5,{filterKey:v,filter:j,values:b,operator:w,OptionDisplay:e=>{var t,r,n,l,s,i,o;let d,u,{className:m}=e;if(y){let e=b[0],a=null==(t=j.options)?void 0:t.find(t=>"string"==typeof t.value&&"string"==typeof e?t.value.toLowerCase()===e.toLowerCase():t.value===e);u=null!=(s=null!=(l=null==a?void 0:a.permalink)?l:null==(r=j.getOptionPermalink)?void 0:r.call(j,e))?s:null;let m=null!=(o=null!=(i=null==a?void 0:a.icon)?i:null==(n=j.getOptionIcon)?void 0:n.call(j,e,{key:j.key,option:a}))?o:j.icon;d=(0,c.jsx)("span",{className:"shrink-0 text-neutral-600",children:r6(m)?m:(0,c.jsx)(m,{className:"h-4 w-4"})})}else d=j.hideMultipleIcons?(0,c.jsx)("span",{className:"shrink-0 text-neutral-600",children:r6(j.icon)?j.icon:(0,c.jsx)(j.icon,{className:"h-4 w-4"})}):(0,c.jsx)("div",{className:"flex shrink-0 -space-x-1",children:N.map((e,t)=>{var r,n,l,a;let s=null==(r=j.options)?void 0:r.find(t=>"string"==typeof t.value&&"string"==typeof e?t.value.toLowerCase()===e.toLowerCase():t.value===e),i=null!=(a=null!=(l=null==s?void 0:s.icon)?l:null==(n=j.getOptionIcon)?void 0:n.call(j,e,{key:j.key,option:s}))?a:j.icon;return(0,c.jsx)("span",{className:"inline-flex text-neutral-600",style:{zIndex:N.length-t},children:r6(i)?i:(0,c.jsx)(i,{className:"h-4 w-4"})},t)})});return(0,c.jsxs)("div",{className:(0,a.v)("flex items-center gap-2.5 px-3 py-2",m),children:[d,u?(0,c.jsx)(h,{href:u,target:"_blank",className:"cursor-alias decoration-dotted underline-offset-2 hover:underline",children:(0,a.o)(k,30)}):(0,a.o)(k,30)]})},onRemove:l,onRemoveFilter:s,onSelect:o,onToggleOperator:d,isAdvancedFilter:u},v)})})}),0!==p.length&&(0,c.jsxs)("button",{type:"button",className:(0,a.v)("group mt-px flex h-[38px] 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-[color,border-color,background-color,transform] duration-150 ease-out motion-reduce:transition-none","hover:border-neutral-200 hover:bg-white hover:text-black [@media(hover:none)]:hover:border-transparent [@media(hover:none)]:hover:bg-transparent","active:scale-[0.98] motion-reduce:active:scale-100","focus:outline-none"),onClick:i,children:["Clear Filters",(0,c.jsx)("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"})]})]})})},Sidebar:function(e){let{filters:t,activeFilters:r,onSelect:n,onRemove:l,className:s,optionClassName:i,defaultOpen:d}=e,u=(0,o.useMemo)(()=>t.filter(e=>!e.hideInFilterDropdown&&"range"!==e.type),[t]),m=(0,o.useMemo)(()=>null!=d?d:u.map(e=>{let{key:t}=e;return t}),[d,u]),h=(0,o.useCallback)((e,t)=>{let n=null==r?void 0:r.find(t=>t.key===e);return!!n&&rX(n).values.some(e=>na(e,t))},[r]),p=(0,o.useCallback)((e,t)=>{var r;let a=e.key,s=null==(r=e.options)?void 0:r.find(e=>na(e.value,t));if(!(null!=s&&s.disabled)){if(h(a,t))return void l(a,t);n(a,t)}},[h,l,n]);return(0,c.jsx)(eI,{type:"multiple",defaultValue:m,className:(0,a.v)("flex flex-col gap-1",s),children:u.map(e=>(0,c.jsxs)(eT,{value:e.key,className:"border-none py-0",children:[(0,c.jsx)(e_,{className:(0,a.v)("roun
1ded-md px-2 py-2 text-sm font-semibold text-neutral-600 sm:text-sm","hover:bg-bg-subtle hover:no-underline","[&>svg]:size-4 [&>svg]:text-neutral-400"),children:e.label}),(0,c.jsx)(eF,{className:"pb-2 pt-0",children:null===e.options?(0,c.jsx)(nn,{}):0===e.options.length?(0,c.jsx)("p",{className:"px-2 py-2 text-sm text-neutral-400",children:"No options"}):(0,c.jsx)("div",{className:"flex flex-col gap-1",children:e.options.map(t=>(0,c.jsx)(nt,{filter:e,option:t,checked:h(e.key,t.value),onToggle:()=>p(e,t.value),className:i},String(t.value)))})})]},e.key))})}};function ni(e){let{title:t,description:r,inputAttrs:n,helpText:l,buttonText:s="Save Changes",disabledTooltip:i,handleSubmit:d}=e,[u,m]=(0,o.useState)(n.defaultValue),[h,p]=(0,o.useState)(!1),x=(0,o.useMemo)(()=>h||!u||u===n.defaultValue,[h,u,n.defaultValue]);return(0,c.jsxs)("form",{onSubmit:async e=>{e.preventDefault(),p(!0),await d({[n.name]:u}),p(!1)},className:"rounded-xl border border-neutral-200 bg-white",children:[(0,c.jsxs)("div",{className:"relative flex flex-col space-y-6 p-6",children:[(0,c.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,c.jsx)("h2",{className:"text-base font-semibold",children:t}),(0,c.jsx)("p",{className:"text-sm text-neutral-500",children:r})]}),"string"==typeof n.defaultValue?(0,c.jsx)("input",{...n,type:n.type||"text",required:!0,disabled:!!i,onChange:e=>m(e.target.value),className:(0,a.v)("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":i})}):(0,c.jsx)("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-neutral-200"})]}),(0,c.jsxs)("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:["string"==typeof l?(0,c.jsx)("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:l||""}}):l,(0,c.jsx)("div",{className:"w-fit shrink-0",children:(0,c.jsx)(rt,{text:s,loading:h,disabled:x,disabledTooltip:i})})]})]})}function no(e){let{cellSize:t=12,strokeWidth:r=1,patternOffset:n=[0,0],className:l}=e,s=(0,o.useId)();return(0,c.jsxs)("svg",{className:(0,a.v)("pointer-events-none absolute inset-0 text-black/10",l),width:"100%",height:"100%",children:[(0,c.jsx)("defs",{children:(0,c.jsx)("pattern",{id:"grid-".concat(s),x:n[0]-1,y:n[1]-1,width:t,height:t,patternUnits:"userSpaceOnUse",children:(0,c.jsx)("path",{d:"M ".concat(t," 0 L 0 0 0 ").concat(t),fill:"transparent",stroke:"currentColor",strokeWidth:r})})}),(0,c.jsx)("rect",{fill:"url(#grid-".concat(s,")"),width:"100%",height:"100%"})]})}var nc=(0,d.F)("text-sm font-medium leading-none text-content-emphasis peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),nd=o.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,c.jsx)(ei.b,{ref:t,className:(0,a.v)(nc(),r),...n})});nd.displayName=ei.b.displayName;var nu=(0,d.F)(["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-not-allowed"],{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-not-allowed text-content-disabled hover:bg-bg-default"}}});function nm(e){let{as:t,variant:r="default",children:l,icon:s,shortcut:i,className:o,loading:d,disabledTooltip:u,...m}=e,h=!!u||d;return(0,c.jsx)(t8,{tooltipProps:u?{content:u}:void 0,children:(0,c.jsx)("div",{children:(0,c.jsxs)(t||"button",{...m,..."button"===t?{type:"button"}:{},className:(0,a.v)(nu({variant:r,disabled:h}),o),disabled:!!h||m.disabled,children:[(0,c.jsxs)("div",{className:"flex grow items-center gap-2",children:[d?(0,c.jsx)(n.z,{className:"size-4"}):s&&(nh(s)?s:(0,c.jsx)(s,{className:"size-4"})),l]}),i&&(0,c.jsx)("kbd",{className:(0,a.v)("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:i})]})})})}var nh=e=>(0,o.isValidElement)(e),np={top:8,right:2,bottom:2,left:2};function nx(e){return(0,c.jsx)(eu.A,{className:"relative",children:t=>{let{width:r,height:n}=t;return r>0&&n>0&&(0,c.jsx)(nf,{width:r,height:n,...e})}})}function nf(e){let{width:t,height:r,data:n,curve:l=!0,color:a,padding:s}=e,i={...np,...s},d=(0,o.useId)(),u=(0,o.useMemo)(()=>n.map(e=>{let{date:t}=e;return{date:t,value:0}}),[n]),{yScale:m,xScale:h}=(0,o.useMemo)(()=>{let e=Math.max(...n.map(e=>{let{value:t}=e;return t})),l=n.map(e=>{let{date:t}=e;return t.getTime()}),a=new Date(Math.min(...l)),s=new Date(Math.max(...l));return{yScale:(0,em.A)({domain:[-2,Math.max(e,2)],range:[r-i.top-i.bottom,0],nice:!0,clamp:!0}),xScale:(0,eh.A)({domain:[a,s],range:[0,t-i.left-i.right],nice:!0})}},[n,r,t]);return(0,c.jsxs)("svg",{width:t,height:r,children:[(0,c.jsxs)("defs",{children:[(0,c.jsx)(ec.A,{id:"".concat(d,"-color-gradient"),from:a||"#7D3AEC",to:a||"#DA2778",x1:0,x2:t-i.left-i.right,gradientUnits:"userSpaceOnUse"}),(0,c.jsx)(ec.A,{id:"".concat(d,"-mask-gradient"),from:"white",to:"white",fromOpacity:.3,toOpacity:0,x1:0,x2:0,y1:0,y2:1}),(0,c.jsx)("mask",{id:"".concat(d,"-mask"),maskContentUnits:"objectBoundingBox",children:(0,c.jsx)("rect",{width:"1",height:"1",fill:"url(#".concat(d,"-mask-gradient)")})})]}),(0,c.jsxs)(ed.A,{left:i.left,top:i.top,children:[(0,c.jsx)(ep.A,{data:n,x:e=>{let{date:t}=e;return h(t)},y:e=>{var t;let{value:r}=e;return null!=(t=m(r))?t:0},curve:l?eo.A:void 0,children:e=>{let{path:t}=e;return(0,c.jsx)(_.P.path,{initial:{d:t(u)||"",opacity:0}
1,animate:{d:t(n)||"",opacity:1},strokeWidth:1.5,stroke:"url(#".concat(d,"-color-gradient)")})}}),(0,c.jsx)(ex.A,{data:n,x:e=>{let{date:t}=e;return h(t)},y:e=>{var t;let{value:r}=e;return null!=(t=m(r))?t:0},yScale:m,curve:l?eo.A:void 0,children:e=>{let{path:t}=e;return(0,c.jsx)(_.P.path,{initial:{d:t(u)||"",opacity:0},animate:{d:t(n)||"",opacity:1},fill:"url(#".concat(d,"-color-gradient)"),mask:"url(#".concat(d,"-mask)")})}})]})]},n.length)}function ng(e){let t=[],r="",n=!1;for(let l=0;l<e.length;l++){let a=e[l];if('"'===a){n=!n;continue}if(!n&&(","===a||"\n"===a||"\r"===a)){"\r"===a&&"\n"===e[l+1]&&l++;let n=r.trim();n&&t.push(n),r="";continue}r+=a}let l=r.trim();return l&&t.push(l),t}var nv=o.forwardRef(function(e,t){let{values:r,onChange:n,placeholder:l,id:s,className:i,inputClassName:d,disabled:u,normalize:m=e=>e.trim(),maxValues:h,autoFocus:p}=e,[x,f]=(0,o.useState)(""),[g,v]=(0,o.useState)(null),b=(0,o.useRef)(null),w=(0,o.useRef)(null),[j,y]=(0,o.useState)(!1),N=(0,o.useCallback)(e=>{let t=e.map(m).filter(Boolean);if(0===t.length)return r;let n=[...r];for(let e of t){if(null!=h&&n.length>=h)break;n.push(e)}return n},[r,m,h]),k=(0,o.useCallback)(e=>{let t=new Set;return e.filter(e=>!t.has(e)&&(t.add(e),!0))},[]),C=(0,o.useCallback)(()=>{let e=ng(x);if(0===e.length)return f(""),r;let t=N(e);return n(t),f(""),t},[x,r,N,n]);return(0,o.useImperativeHandle)(t,()=>({commitPendingInput:()=>C()}),[C]),(0,o.useEffect)(()=>{g&&!r.includes(g)&&v(null)},[r,g]),(0,o.useEffect)(()=>{let e=b.current;if(!e)return;let t=()=>{let t=Array.from(e.children);if(t.length<=1)return void y(!1);let r=t.map(e=>e.offsetTop),n=Math.min(...r);y(r.some(e=>e-n>2))};t();let r=new ResizeObserver(t);return r.observe(e),()=>r.disconnect()},[r,x]),(0,c.jsxs)("div",{ref:b,className:(0,a.v)("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",j?"py-[4px]":"h-[38px] py-[3px]",u&&"cursor-not-allowed bg-neutral-50 opacity-60",i),children:[r.map((e,t)=>(0,c.jsxs)("span",{onClick:()=>v(e),className:(0,a.v)("inline-flex items-center gap-1 rounded-md py-0.5 pl-1.5 pr-1 text-sm leading-6",g===e?"bg-neutral-300 text-neutral-900":"bg-neutral-100 text-neutral-900"),children:[(0,c.jsx)("span",{children:e}),(0,c.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),v(t=>t===e?null:t),n(r.filter(t=>t!==e))}
1,disabled:u,className:(0,a.v)("rounded-md p-0.5 outline-none transition hover:bg-neutral-200 focus:ring-1 focus:ring-neutral-400",g===e?"text-neutral-600 hover:text-neutral-800":"text-neutral-500 hover:text-neutral-700"),"aria-label":"Remove ".concat(e),children:(0,c.jsx)(el.A,{className:"size-3",strokeWidth:2.5,"aria-hidden":!0})})]},"".concat(e,"-").concat(t))),(0,c.jsx)("div",{className:"min-w-[8rem] flex-[1_1_8rem]",children:(0,c.jsx)("input",{ref:w,id:s,value:x,onChange:e=>{v(null),f(e.target.value)},onKeyDown:e=>{let t=e.currentTarget,l=g?r.indexOf(g):-1;if(","===e.key||"Enter"===e.key){e.preventDefault(),C();return}if("ArrowLeft"===e.key&&r.length>0){if(l>0){e.preventDefault(),v(r[l-1]);return}if(-1===l&&0===t.selectionStart&&0===t.selectionEnd){e.preventDefault(),v(r[r.length-1]);return}}if("ArrowRight"===e.key&&-1!==l)return(e.preventDefault(),l<r.length-1)?void v(r[l+1]):void v(null);if(("Backspace"===e.key||"Delete"===e.key)&&!x&&r.length>0){if(e.preventDefault(),g){n(r.filter(e=>e!==g)),v(null);return}v(r[r.length-1])}"Tab"===e.key&&g&&(e.preventDefault(),v(null))},onBlur:()=>
1{v(null);let e=C(),t=k(e);t.length!==e.length&&n(t)},onPaste:e=>{let t=e.clipboardData.getData("text");if(!/[,\n\r]/.test(t))return;let r=ng(t);0!==r.length&&(e.preventDefault(),n(N(r)),f(""))},disabled:u,className:(0,a.v)("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:l,type:"text",autoComplete:"off",autoFocus:p})})]})});function nb(e){let{value:t,onChange:r,min:l,max:s,step:i=1,disabled:d,className:u,id:m,formatValue:h,decrementAriaLabel:p="Decrease",incrementAriaLabel:x="Increase",...f}=e,[g,v]=(0,o.useState)(String(t)),[b,w]=(0,o.useState)(!1),j=(0,o.useRef)(null),y="number"!=typeof l||t>l,N="number"!=typeof s||t<s;(0,o.useLayoutEffect)(()=>{b&&j.current&&!d&&(j.current.focus(),j.current.select())},[b,d]),(0,o.useEffect)(()=>{b||g===String(t)||v(String(t))},[t,b,g]);let k=(0,o.useCallback)(e=>{let t=e;return"number"==typeof l&&(t=Math.max(l,t)),"number"==typeof s&&(t=Math.min(s,t)),t},[l,s]),C=(0,o.useCallback)(()=>{if(d||!y)return;let e=k(t-i);r(e),v(String(e))},[d,y,k,r,i,t]),S=(0,o.useCallback)(()=>{if(d||!N)return;let e=k(t+i);r(e),v(String(e))},[d,N,k,r,i,t]),A=(0,o.useCallback)(e=>{let t=e.target.value;if(v(t),""===t||"-"===t)return;let n=Number(t);isNaN(n)||r(k(n))},[k,r]),P=(0,o.useCallback)(()=>{w(!1);let e=Number(g);if(isNaN(e)||""===g||"-"===g)return void v(String(t));let n=k(e);r(n),v(String(n))},[g,t,k,r]),M=(0,o.useCallback)(()=>{w(!0)},[]),R=(0,o.useCallback)(e=>{d||("ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),C()):"ArrowRight"===e.key||"ArrowUp"===e.key?(e.preventDefault(),S()):"Enter"===e.key?(e.preventDefault(),P(),e.currentTarget.blur()):"Escape"===e.key&&(e.preventDefault(),v(String(t)),e.currentTarget.blur()))},[d,C,S,P,t]);return(0,c.jsxs)("div",{id:m,role:"group","aria-disabled":d,className:(0,a.v)("flex h-10 w-full select-none items-stretch overflow-hidden rounded-lg border border-neutral-200 bg-white p-1",d&&"opacity-60",u),...f,children:[(0,c.jsx)("button",{type:"button","aria-label":p,onClick:C,disabled:d||!y,className:(0,a.v)("flex h-full w-16 items-center justify-center rounded-lg text-neutral-700 transition-colors",!(d||!y)&&"hover:bg-neutral-100 active:bg-neutral-200"),children:(0,c.jsx)(n.wd,{className:"block size-4"})}),(0,c.jsxs)("div",{className:"relative flex min-w-0 flex-1 items-center justify-center",children:[(0,c.jsx)("input",{ref:j,type:"text",inputMode:"numeric",role:"spinbutton","aria-valuenow":t,"aria-valuemin":l,"aria-valuemax":s,value:b?g:String(t),onChange:A,onBlur:P,onFocus:M,onKeyDown:R,disabled:d,className:(0,a.v)("w-full border-0 bg-transparent px-3 text-center text-sm text-neutral-900 outline-none transition-colors focus:ring-0",d&&"cursor-not-allowed",!d&&"cursor-text focus:bg-neutral-50",!b&&h&&"pointer-events-none opacity-0")}),!b&&h&&(0,c.jsx)("div",{role:"spinbutton","aria-valuenow":t,"aria-valuemin":l,"aria-valuemax":s,tabIndex:0,onKeyDown:e=>{"Enter"===e.key||" "===e.key?(e.preventDefault(),d||(w(!0),v(String(t)))):R(e)},onClick:()=>{d||(w(!0),v(String(t)))},className:(0,a.v)("absolute inset-0 flex items-center justify-center px-3 text-sm text-neutral-900 outline-none focus:ring-0",!d&&"cursor-text hover:bg-neutral-50"),children:h(t)})]}),(0,c.jsx)("button",{type:"button","aria-label":x,onClick:S,disabled:d||!N,className:(0,a.v)("flex h-full w-16 items-center justify-center rounded-lg text-neutral-700 transition-colors",!(d||!N)&&"hover:bg-neutral-100 active:bg-neutral-200"),children:(0,c.jsx)(n.Rd,{className:"block size-4"})})]})}nv.displayName="MultiValueInput";var nw=(0,a.v)("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 nj(e){let{pagination:t,setPagination:r,totalCount:n,unit:l=e=>"item".concat(e?"s":""),className:s,children:i,showTotalCount:o=!0}=e;return(0,c.jsxs)("div",{className:(0,a.v)("flex items-center justify-between gap-2 text-sm leading-6 text-neutral-600",
1s),children:[(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)("div",{children:void 0===n?(0,c.jsx)("div",{className:"h-5 w-24 animate-pulse rounded-lg bg-neutral-200"}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",n>0&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("span",{className:"font-medium",children:[((t.pageIndex-1)*t.pageSize+1).toLocaleString(),"-",Math.min((t.pageIndex-1)*t.pageSize+t.pageSize,n).toLocaleString()]})," ",o&&"of "]}),o&&(0,c.jsx)("span",{className:"font-medium",children:n.toLocaleString()})," ","function"==typeof l?l(1!==n):l]})}),i]}),(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)("button",{type:"button",className:nw,onClick:()=>r({...t,pageIndex:t.pageIndex-1}),disabled:1===t.pageIndex,children:"Previous"}),(0,c.jsx)("button",{type:"button",className:nw,onClick:()=>r({...t,pageIndex:t.pageIndex+1}),disabled:!n||(t.pageIndex-1)*t.pageSize+t.pageSize>=n,children:"Next"})]})]})}function ny(e){let{progress:t,strokeWidth:r=16,className:n}=e,l=Math.min(Math.max(t,0),1),s=(100-r)/2,i=s*Math.PI*2,o=l*i;return(0,c.jsxs)("svg",{width:"100",height:"100",viewBox:"0 0 100 100",className:(0,a.v)("size-3 shrink-0 text-green-600 [--track-color:#e5e5e5]",n),children:[(0,c.jsx)("circle",{cx:"50",cy:"50",r:s,strokeWidth:"".concat(r,"px"),fill:"none",strokeLinecap:"round",className:"stroke-[var(--track-color)]"}),l>0&&(0,c.jsx)("circle",{cx:"50",cy:"50",r:s,stroke:"currentColor",strokeWidth:"".concat(r,"px"),fill:"none",strokeLinecap:"round",strokeDasharray:"".concat(o," ").concat(i-o),style:{transformOrigin:"50px 50px",transform:"rotate(-90deg)"}})]})}var nN={left:"right",right:"left",top:"bottom",bottom:"top"},nk="rgba(0, 0, 0, 1)",nC="rgba(0, 0, 0, 0)";function nS(e){let{strength:t=32,steps:r=4,side:n="top",className:l,style:s,...i}=e,o=100/r,d=Math.pow(t/.5,1/(r-1)),u=e=>"blur(".concat(.5*d**(r-e-1),"px)");return(0,c.jsx)("div",{className:(0,a.v)("pointer-events-none absolute inset-0",l),style:{transformOrigin:n,...s},...i,children:(0,c.jsxs)("div",{className:"relative z-0 size-full",style:{background:"linear-gradient(\n to ".concat(nN[n],",\n rgb(from transparent r g b / alpha) 0%,\n rgb(from transparent r g b / 0%) 100%\n )")},children:[(0,c.jsx)("div",{className:"z-1 absolute inset-0",style:{mask:"linear-gradient(\n to ".concat(nN[n],",\n ").concat(nk," 0%,\n ").concat(nC," ").concat(o,"%\n )"),backdropFilter:u(0),WebkitBackdropFilter:u(0)}}),r>1&&(0,c.jsx)("div",{className:"absolute inset-0 z-[2]",style:{mask:"linear-gradient(\n to ".concat(nN[n],",\n ").concat(nk," 0%,\n ").concat(nk," ").concat(o,"%,\n ").concat(nC," ").concat(2*o,"%\n )"),backdropFilter:u(1),WebkitBackdropFilter:u(1)}}),r>2&&[...Array(r-2)].map((e,t)=>(0,c.jsx)("div",{className:"absolute inset-0",style:{zIndex:t+2,mask:"linear-gradient(\n to ".concat(nN[n],",\n ").concat(nC," ").concat(t*o,"%,\n ").concat(nk," ").concat((t+1)*o,"%,\n ").concat(nk," ").concat((t+2)*o,"%,\n ").concat(nC," ").concat((t+3)*o,"%\n )"),backdropFilter:u(t+2),WebkitBackdropFilter:u(t+2)}},t))]})})}var nA=o.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,c.jsx)(ef.bL,{className:(0,a.v)("grid gap-2",r),...n,ref:t})});nA.displayName=ef.bL.displayName;var nP=o.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,c.jsx)(ef.q7,{ref:t,className:(0,a.v)("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",r),...n,children:(0,c.jsx)(ef.C1,{className:"flex items-center justify-center",children:(0,c.jsx)(eg.A,{className:"h-2.5 w-2.5 fill-current text-current"})})})});nP.displayName=ef.q7.displayName;var nM=Object.assign(function(e){let{children:t,contentProps:r,nested:n=!1,...l}=e,s=n?P._s.NestedRoot:P._s.Root;return(0,c.jsx)(s,{direction:"right",handleOnly:!0,...l,children:(0,c.jsxs)(P._s.Portal,{children:[(0,c.jsx)(P._s.Overlay,{className:"fixed inset-0 z-40 bg-black/20","data-sheet-overlay":!0}),(0,c.jsx)(P._s.Content,{...r,onPointerDownOutside:e=>{var t;e.target instanceof Element&&e.target.closest("[data-sonner-toast]")&&e.preventDefault(),null==(t=null==r?void 0:r.onPointerDownOutside)||t.call(r,e)},className:(0,a.v)("@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]",null==r?void 0:r.className),style:{"--initial-transform":"calc(100% + 8px)",userSelect:"auto",...null==r?void 0:r.style},children:(0,c.jsx)("div",{className:"scrollbar-hide flex size-full grow flex-col overflow-y-auto rounded-xl bg-white",children:t})})]})})},{Title:function(e){let{className:t,...r}=e;return(0,c.jsx)(P._s.Title,{className:(0,a.v)("text-lg font-semibold text-neutral-900",t),...r})},Description:function(e){return(0,c.jsx)(P._s.Description,{...e})},Close:function(e){return(0,c.jsx)(P._s.Close,{...e})}});function nR(e){let{dotSize:t=1,cellSize:r=3,speed:n=5,color:l=[0,0,0],className:s}=e,i=(0,o.useRef)(null),[d,u]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=i.current;if(!e||!e.parentElement)return;let a=e.parentElement,s=window.devicePixelRatio||1;e.width=a.clientWidth*s,e.height=a.clientHeight*s;let o=e.getContext("webgl",{powerPreference:"low-power",depth:!1,stencil:!1});if(null===o)return void console.error("Failed to initialize WebGL");let c=o.createProgram();if(!c)return void console.error("Failed to create shader program");for(let e=0;e<2;++e){let t=0===e?"\nattribute vec2 position;\n\nvoid main() \n{\n gl_Position = vec4(position, 0.0, 1.0);\n}\n":"\nprecision mediump float;\n\nuniform vec2 resolution;\nuniform float time;\nuniform float dotSize;\nuniform float cellSize;\nuniform float speed;\nuniform vec3 color;\n\n// Gold noise: https://stackoverflow.com/a/28095165\nfloat PHI = 1.61803398874989484820459; \nfloat random(in vec2 xy){\n return fract(tan(distance(xy*PHI, xy))*xy.x);\n}\n\nvoid main(void) {\n vec2 uv = gl_FragCoord.xy;\n\n vec2 cellUv = vec2(int(uv.x / cellSize), int(uv.y / cellSize));\n float id = random(cellUv + 1.0);\n\n float fadeEffect = (sin(time * speed + id * 20.0) + 1.0) * 0.5;\n \n vec2 dotUv = fract(uv / cellSize);\n float dot = step(max(dotUv.x, dotUv.y), dotSize / cellSize);\n\n float opacity = dot * fadeEffect;\n\n vec4 fragColor = vec4(color, opacity);\n fragColor.rgb *= fragColor.a;\n\n gl_FragColor = fragColor;\n}\n",r=o.createShader(0===e?o.VERTEX_SHADER:o.FRAGMENT_SHADER);if(!r)return void console.error("Failed to create shader");o.shaderSource(r,t),o.compileShader(r),o.getShaderParameter(r,o.COMPILE_STATUS)||console.error(o.getShaderInfoLog(r)),o.attachShader(c,r),o.linkProgram(c)}o.getProgramParameter(c,o.LINK_STATUS)||console.error(o.getProgramInfoLog(c));let d=o.getAttribLocation(c,"position"),m=o.getUniformLocation(c,"time"),h=o.getUniformLocation(c,"resolution"),p=o.getUniformLocation(c,"dotSize"),x=o.getUniformLocation(c,"cellSize"),f=o.getUniformLocation(c,"speed"),g=o.getUniformLocation(c,"color");o.useProgram(c);let v=o.createBuffer();o.bindBuffer(o.ARRAY_BUFFER,v),o.bufferData(o.ARRAY_BUFFER,new Float32Array([1,1,-1,1,1,-1,-1,-1]),o.STATIC_DRAW),o.enableVertexAttribArray(d),o.vertexAttribPointer(d,2,o.FLOAT,!1,0,0),o.uniform1f(p,t*window.devicePixelRatio),o.uniform1f(x,r*window.devicePixelRatio),o.uniform1f(f,n),o.uniform3f(g,l[0],l[1],l[2]);let b,w=0;return b=requestAnimationFrame(function t(r){if(r-w<16.666666666666668){b=requestAnimationFrame(t);return}w=r,o&&e&&c&&(o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.uniform1f(m,r/1e3),o.uniform2f(h,e.width,e.height),o.drawArrays(o.TRIANGLE_STRIP,0,4)),b=requestAnimationFrame(t)}),e.addEventListener("webglcontextlost",e=>{e.preventDefault(),u(!0),cancelAnimationFrame(b)}),()=>{cancelAnimationFrame(b),e.removeEventListener("webglcontextlost",()=>{})}},[t,r,n]),(0,c.jsx)("div",{className:(0,a.v)("absolute inset-0",s,d&&"opacity-0"),children:(0,c.jsx)("canvas",{ref:i,width:"100%",height:"100%",className:"size-full"})})}function nE(e){let{value:t,onChange:r,min:n,max:l,step:s=1,marks:i,className:o,hint:d,disabled:u}=e,m=i||[n,n+(l-n)/3,n+2*(l-n)/3,l];return(0,c.jsx)("div",{className:(0,a.v)("relative z-0 [--thumb-radius:13px] [--track-height:16px]",o),children:(0,c.jsxs)("div",{className:"w-full",children:[(0,c.jsxs)(ev.bL,{className:"relative flex h-8 w-full items-center",value:[t],min:n,max:l,step:s,onValueChange:e=>{let[t]=e;return r(t)},disabled:u,"aria-label":"Slider",children:[(0,c.jsxs)(ev.CC,{className:"relative h-[var(--track-height)] w-full overflow-visible rounded-full bg-neutral-200",children:[(0,c.jsx)("div",{className:"absolute left-0 top-0 h-full w-[var(--thumb-radius)] rounded-l-full bg-black"}),(0,c.jsxs)("div",{className:"pointer-events-none absolute inset-x-[var(--thumb-radius)] inset-y-0",children:[(0,c.jsx)(ev.Q6,{className:"absolute h-[var(--track-height)] bg-black"}),m.map(e=>{let t=(e-n)/(l-n)*100;return(0,c.jsx)("span",{className:"absolute top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 roun
1ded-full bg-white",style:{left:"".concat(t,"%")}},e)})]})]}),(0,c.jsx)(ev.zi,{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:(0,c.jsx)("span",{className:"block size-[calc(var(--thumb-radius)*1.23)] rounded-full bg-[#171717]"})})]}),d&&(0,c.jsx)("div",{className:"mt-2 min-h-[1rem] text-xs text-neutral-500",children:d})]})})}function nD(e){let{value:t,onChange:r,label:l,placeholder:s='E.g. "tomorrow at 5pm" or "in 2 hours"',className:i,required:d,autoFocus:u=!1}=e,m=(0,o.useId)(),h=(0,o.useRef)(null),p=(0,o.useRef)(null);return(0,o.useEffect)(()=>{h.current&&u&&setTimeout(()=>{var e;null==(e=h.current)||e.focus()},10)},[u]),(0,c.jsxs)("div",{className:"flex flex-col gap-2",children:[l&&(0,c.jsx)("div",{className:"flex items-center gap-2",children:(0,c.jsx)("label",{htmlFor:"".concat(m,"-datetime"),className:"block text-sm font-medium text-neutral-700",children:l})}),(0,c.jsxs)("div",{className:(0,a.v)("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",i),children:[(0,c.jsx)("input",{ref:h,id:"".concat(m,"-datetime"),type:"text",placeholder:s,defaultValue:t?(0,a.m)(t):"",onBlur:e=>{if(e.target.value.length>0){let t=(0,a.l)(e.target.value);t&&(r(t),e.target.value=(0,a.m)(t))}},onKeyDown:e=>{if("Enter"===e.key&&h.current){e.preventDefault();let t=(0,a.l)(h.current.value);t&&(r(t),h.current.value=(0,a.m)(t))}},className:"min-w-0 flex-1 border-none bg-transparent text-neutral-900 placeholder-neutral-400 focus:outline-none focus:ring-0 sm:text-sm"}),(0,c.jsxs)("div",{className:"relative shrink-0 self-stretch",children:[(0,c.jsx)("button",{type:"button",onClick:()=>{let e=p.current;if(e){e.focus();try{e.showPicker()}catch(e){}}},"aria-label":"Open date picker",className:"flex h-full items-center px-3 text-neutral-500 transition-colors hover:text-neutral-700 focus:outline-none",children:(0,c.jsx)(n.Xa,{className:"size-4 flex-none","aria-hidden":!0})}),(0,c.jsx)("input",{ref:p,type:"datetime-local",id:"".concat(m,"-datetime-local"),required:d,tabIndex:-1,"aria-label":"Date and time",value:t?(0,a.k)(t):"",onChange:e=>{let t=new Date(e.target.value);r(t),h.current&&(h.current.value=(0,a.m)(t))},className:"pointer-events-none absolute inset-0 size-full opacity-0"})]})]})]})}var nL=(0,d.F)("flex gap-1.5 items-center max-w-fit max-h-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-bg-info text-content-info",success:"bg-bg-success text-content-success",pending:"bg-bg-attention text-content-attention",warning:"bg-bg-warning text-content-warning",error:"bg-bg-error text-content-error"},size:{sm:"px-1.5 py-0.5",md:"px-2 py-1"}},defaultVariants:{variant:"neutral"}}),nz={neutral:n.ub,new:n.sb,success:n.mb,pending:n.tb,warning:n.zb,error:n.zb};function nI(e){let{className:t,variant:r,size:n,icon:l,tooltip:s,children:i,...o}=e,d=null!==l?null!=l?l:nz[null!=r?r:"neutral"]:null;return(0,c.jsx)(t8,{tooltipProps:s?{content:s}:void 0,children:(0,c.jsxs)("span",{className:(0,a.v)(nL({variant:r,size:n}),s&&"cursor-help",t),...o,children:[d&&(0,c.jsx)(d,{className:"h-3 w-3 shrink-0"}),i]})})}function nT(e){let{fn:t,id:r,trackDimensions:n,thumbDimensions:l,thumbTranslate:s,thumbIcon:i,checked:d=!0,loading:u=!1,disabled:m=!1,disabledTooltip:h}=e,p=(0,o.useMemo)(()=>!!h||m||u,[h,m,u]),x=(0,c.jsx)(eb.bL,{checked:!u&&d,name:"switch",id:r,...t&&{onCheckedChange:t},disabled:p,className:(0,a.v)("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",n),children:(0,c.jsx)(eb.zi,{className:(0,a.v)("radix-state-checked:".concat(s),"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",l,s),children:i})});return h?(0,c.jsx)(t4,{content:h,children:(0,c.jsx)("div",{className:"inline-block leading-none",children:x})}):x}function n_(e){let{table:t}=e,[r,l]=(0,o.useState)(!1);return(0,c.jsx)(tj,{openPopover:r,setOpenPopover:l,content:(0,c.jsx)(rk,{className:"max-h-[50vh]",children:(0,c.jsx)(G.uB,{tabIndex:0,loop:!0,children:(0,c.jsx)(G.uB.List,{className:"flex w-screen flex-col gap-1 p-1 text-sm focus-visible:outline-none sm:w-auto
1sm:min-w-[130px]",children:t.getAllColumns().filter(e=>e.getCanHide()).map(e=>{var t;return(0,c.jsxs)(G.uB.Item,{className:(0,a.v)("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:()=>e.toggleVisibility(),children:[(0,c.jsx)("input",{checked:e.getIsVisible(),type:"checkbox",className:"h-3 w-3 rounded-full border-neutral-300 text-black focus:outline-none focus:ring-0",disabled:!0}),null==(t=e.columnDef.header)?void 0:t.toString()]},e.id)})})})}),align:"end",children:(0,c.jsx)(rt,{type:"button",className:"size-8 shrink-0 whitespace-nowrap rounded-lg p-0",variant:"outline",icon:(0,c.jsx)(n.Bc,{className:"h-4 w-4 shrink-0"})})})}function nF(e){let{table:t,controls:r,className:n}=e,l=t.getSelectedRowModel().rows.length,[s,i]=(0,o.useState)(0);return(0,o.useEffect)(()=>{0!==l&&i(l)},[l]),ti("Escape",()=>t.resetRowSelection(),{enabled:l>0,priority:2,modal:!1}),(0,c.jsx)("div",{className:(0,a.v)("border-border-subtle w-full border-b bg-white","transition-opacity duration-100",l>0?"pointer-events-auto opacity-100":"pointer-events-none opacity-0",n),inert:0===l,children:(0,c.jsxs)("div",{className:"flex h-11 items-center py-2.5 pr-2",children:[(0,c.jsx)("div",{className:"relative flex h-full w-12 shrink-0 items-center justify-center",children:(0,c.jsx)("button",{type:"button",className:"absolute inset-0 flex items-center justify-center",onClick:e=>{e.stopPropagation(),t.toggleAllRowsSelected()},title:"Select all",children:(0,c.jsx)(rN,{className:"border-border-default pointer-events-none size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:!!t.getIsAllRowsSelected()||!!t.getIsSomeRowsSelected()&&"indeterminate"})})}),(0,c.jsxs)("div",{className:"flex min-w-0 items-center gap-2.5 pl-1",children:[(0,c.jsxs)("span",{className:(0,a.v)("text-content-emphasis mr-2 text-sm font-medium tabular-nums transition-transform duration-150",l>0?"translate-x-0":"-translate-x-1"),children:[s," selected"]}),(0,c.jsx)("div",{className:(0,a.v)("flex items-center gap-2 transition-transform duration-150",l>0?"translate-x-0":"-translate-x-1"),children:null==r?void 0:r(t)})]})]})})}var nO=new Set(["select","menu"]),nB=(e,t,r)=>(0,a.v)(["py-2.5 text-left text-sm leading-6 whitespace-nowrap border-border-subtle relative","border-l border-b","select"===e&&"w-12 min-w-12 max-w-12 px-0 py-0","menu"===e&&"bg-bg-default border-l-transparent py-0 px-1",!["select","menu"].includes(e)&&(r?"pl-1 pr-4":"px-4"),t&&"group-hover/row:bg-bg-muted transition-colors duration-75","group-data-[selected=true]/row:bg-blue-50"]),nV=(0,a.v)(["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 nU(e){var t,r;let{data:n,rowCount:l,columns:s,defaultColumn:i,columnPinning:d,pagination:u,onPaginationChange:m,getRowId:h,enableColumnResizing:p=!1,columnResizeMode:x="onChange"}=e,f=!!e.onRowSelectionChange||!!e.selectionControls,[g,v]=(0,o.useState)(null!=(t=e.columnVisibility)?t:{}),[b,w]=(0,o.useState)(null!=(r=e.selectedRows)?r:{}),j=(0,o.useRef)(null);(0,o.useEffect)(()=>{if(!h||!n)return;let e=Object.entries(b);if(e.length>0){let t=e.filter(e=>{let[t]=e;return n.find(e=>(null==h?void 0:h(e))===t)});t.length!==e.length&&w(Object.fromEntries(t))}},[n,b,h]),(0,o.useEffect)(()=>{var t;e.selectedRows&&!(0,a.s)(e.selectedRows,b)&&w(null!=(t=e.selectedRows)?t:{})},[e.selectedRows]),(0,o.useEffect)(()=>{var t;null==(t=e.onRowSelectionChange)||t.call(e,k.getSelectedRowModel().rows)},[b]),(0,o.useEffect)(()=>{var t;e.columnVisibility&&!(0,a.s)(e.columnVisibility,g)&&v(null!=(t=e.columnVisibility)?t:{})},[e.columnVisibility]),(0,o.useEffect)(()=>{var t;null==(t=e.onColumnVisibilityChange)||t.call(e,g)},[g]);let y=(0,o.useMemo)(()=>s.map(e=>(null==e?void 0:e.id)==="menu"?{...e,minSize:40,size:40,maxSize:40}:e),[s]),N=(0,o.useMemo)(()=>
1[...f?[{id:"select",enableHiding:!1,minSize:48,size:48,maxSize:48,header:e=>{let{table:t}=e;return(0,c.jsx)("button",{type:"button",className:"flex size-full items-center justify-center",onClick:e=>{e.stopPropagation(),t.toggleAllRowsSelected()},title:"Select all",children:(0,c.jsx)(rN,{className:"border-border-default pointer-events-none size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:!!t.getIsAllRowsSelected()||!!t.getIsSomeRowsSelected()&&"indeterminate"})})},cell:e=>{let{row:t,table:r}=e;return(0,c.jsx)("button",{type:"button",className:"flex size-full items-center justify-center",onClick:e=>{e.stopPropagation();let n=null==h?void 0:h(t.original),l=r.getRowModel().rows,a=null!==j.current?l.findIndex(e=>(null==h?void 0:h(e.original))===j.current):-1;if(e.shiftKey&&null!==j.current&&-1!==a){let e=void 0!==n?l.findIndex(e=>(null==h?void 0:h(e.original))===n):-1;if(-1===e){t.toggleSelected(),j.current=null!=n?n:null;return}let s=Math.min(a,e),i=Math.max(a,e),o=l.slice(s,i+1).map(e=>null==h?void 0:h(e.original)).filter(e=>void 0!==e);r.setRowSelection(e=>{var t;let r=o.filter(e=>void 0!==e),l=void 0!==n&&null!=(t=null==e?void 0:e[n])&&t;return{...e,...Object.fromEntries(r.map(e=>[e,!l]))}}),j.current=null!=n?n:null}else t.toggleSelected(),j.current=null!=n?n:null},title:"Select",children:(0,c.jsx)(rN,{className:"border-border-default pointer-events-none size-4 rounded data-[state=checked]:bg-black data-[state=indeterminate]:bg-black",checked:t.getIsSelected()})})}}]:[],...y],[f,y]),k=(0,ew.N4)({data:n,rowCount:l,columns:N,defaultColumn:{minSize:120*!!p,size:120*!!p,maxSize:p?300:void 0,enableResizing:p,...i},getCoreRowModel:(0,ej.HT)(),onPaginationChange:m,onColumnVisibilityChange:e=>v(e),onRowSelectionChange:w,state:{pagination:u,columnVisibility:g,columnPinning:{left:[],right:[],...d},rowSelection:b},manualPagination:!0,autoResetPageIndex:!1,manualSorting:!0,getRowId:h,enableColumnResizing:p,columnResizeMode:x});return{...e,columnVisibility:g,table:k,enableColumnResizing:p}}var nH=(0,o.memo)(function(e){let{row:t,onRowClick:r,onRowAuxClick:n,rowProps:l,cellRight:s,tdClassName:i,table:o}=e,{className:d,...u}=l||{};return(0,c.jsx)("tr",{className:(0,a.v)("group/row",r&&"cursor-pointer select-none",o.getRowModel().rows.length>8&&t.index===o.getRowModel().rows.length-1&&"[&_td]:border-b-0",d),onClick:r?e=>{(0,a.r)(e)||r(t,e)}:void 0,onAuxClick:n?e=>{(0,a.r)(e)||n(t,e)}:void 0,"data-selected":t.getIsSelected(),...u,children:t.getVisibleCells().map((e,n,l)=>{var d,u;let m=["select","menu"].includes(e.column.id),h="select"===e.column.id,p=(null==(d=l[n-1])?void 0:d.column.id)==="select",x=!!(null!=(u=e.column.columnDef.meta)&&u.disableTruncate);return(0,c.jsx)("td",{className:(0,a.v)(nB(e.column.id,!!r,p),"text-content-default group",nG(e.column,t.index===o.getRowModel().rows.length-1),"function"==typeof i?i(e.column.id,t):i),style:{width:e.column.getSize(),...nK(e.column)},children:h?(0,c.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ew.Kv)(e.column.columnDef.cell,e.getContext())}):(0,c.jsxs)("div",{className:(0,a.v)("flex items-center",m?"justify-center":"w-full justify-between",!m&&(x?"overflow-visible":"overflow-hidden truncate")),children:[(0,c.jsx)("div",{className:(0,a.v)(x?"whitespace-nowrap":"truncate",m?"shrink-0":"min-w-0 shrink grow",x&&!m&&"min-w-max shrink-0"),children:(0,ew.Kv)(e.column.columnDef.cell,e.getContext())}),!m&&(null==s?void 0:s(e))]})},e.id)})},t.id)},(e,t)=>{let r=e.row,n=t.row;return r.original===n.original&&r.getIsSelected()===n.getIsSelected()});function nW(e){let{data:t,loading:r,error:l,emptyState:s,cellRight:i,sortBy:o,sortOrder:d,onSortChange:u,sortableColumns:m=[],className:p,containerClassName:x,scrollWrapperClassName:f,scrollWrapperRef:g,onScroll:v,emptyWrapperClassName:b,thClassName:w,tdClassName:j,table:y,pagination:N,paginationAllRowsHref:k,resourceName:C,onRowClick:S,onRowAuxClick:A,onRowSelectionChange:P,selectionControls:M,rowProps:R,rowCount:E,children:D,enableColumnResizing:L=!1}=e,z=y.getVisibleLeafColumns(),I=new Set;for(let e=1;e<z.length;e++)"select"===z[e-1].id&&I.add(z[e].id);let T=new Map(z.map(e=>[e.id,e.getSize()])),F=(e,t)=>{var r;return null!=(r=T.get(e))?r:t},O=k?h:"span";return(0,c.jsxs)("div",{className:(0,a.v)("border-border-subtle bg-bg-default relative z-0 rounded-xl border",x),children:[!l&&null!=t&&t.length||r?(0,c.jsxs)(c.Fragment,{children:[(!!P||!!M)&&(0,c.jsx)(nF,{table:y,controls:M,className:"absolute left-0 top-0 z-10 rounded-t-[inherit]"}),(0,c.jsxs)("div",{ref:g,onScroll:v,className:(0,a.v)("relative min-h-[400px] overflow-x-auto rounded-[inherit]",f),children:[(0,c.jsxs)("table",{className:(0,a.v)(["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",L&&"[&_th]:group/resize"],p),style:{width:"100%",tableLayout:L?"fixed":"auto",minWidth:L?y.getVisibleLeafColumns().reduce((e,t)=>
1e+t.getSize(),0):"100%"},children:[(0,c.jsx)("thead",{className:"relative",children:y.getHeaderGroups().map(e=>(0,c.jsx)("tr",{children:e.headers.map(e=>{var t;let r,l,s=m.includes(e.column.id),i=s?"button":"div",h=I.has(e.column.id);return(0,c.jsxs)("th",{colSpan:e.colSpan,className:(0,a.v)(nB(e.column.id,!1,h),"text-content-emphasis select-none font-medium",nG(e.column,!y.getRowModel().rows.length),"function"==typeof w?w(e.column.id):w,L&&"relative"),style:{width:nO.has(e.column.id)?F(e.column.id,e.getSize()):L?e.getSize():void 0,...nK(e.column)},children:[(0,c.jsx)("div",{className:(0,a.v)("select"===e.column.id?"absolute inset-0 flex items-center justify-center":"flex items-center justify-between gap-6 !pr-0"),children:(0,c.jsxs)(i,{className:(0,a.v)("select"===e.column.id?"flex size-full items-center justify-center":"flex items-center gap-2",s&&"group/sort"),...s&&{type:"button",disabled:!s,"aria-label":"Sort by column",onClick:()=>null==u?void 0:u({sortBy:e.column.id,sortOrder:o!==e.column.id||"asc"===d?"desc":"asc"})},children:[e.isPlaceholder?null:(r=(0,ew.Kv)(e.column.columnDef.header,e.getContext()),l=null==(t=e.column.columnDef.meta)?void 0:t.headerTooltip,(0,c.jsx)(nq,{tooltip:l,children:r})),s&&(0,c.jsx)(n.s,{className:(0,a.v)("h-3 w-3 shrink-0",o===e.column.id?"text-neutral-950":"text-neutral-300 group-hover/sort:text-neutral-400"),order:o===e.column.id?d||"desc":null})]})}),L&&e.column.getCanResize()&&!["select","menu"].includes(e.column.id)&&(0,c.jsx)("div",{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),onClick:e=>e.stopPropagation(),className:nV})]},e.id)})},e.id))}),(0,c.jsx)("tbody",{children:y.getRowModel().rows.map(e=>{let t="function"==typeof R?R(e):R,{className:r,...n}=t||{};return L?(0,c.jsx)(nH,{row:e,onRowClick:S,onRowAuxClick:A,rowProps:t,cellRight:i,tdClassName:j,table:y},"".concat(e.id,"-").concat(y.getVisibleLeafColumns().map(e=>e.id).join(","))):(0,c.jsx)("tr",{className:(0,a.v)("group/row",S&&"cursor-pointer select-none",y.getRowModel().rows.length>8&&e.index===y.getRowModel().rows.length-1&&"[&_td]:border-b-0",r),onClick:S?t=>{(0,a.r)(t)||S(e,t)}:void 0,onAuxClick:A?t=>{(0,a.r)(t)||A(e,t)}:void 0,"data-selected":e.getIsSelected(),...n,children:e.getVisibleCells().map(t=>{var r;let n=["select","menu"].includes(t.column.id),l="select"===t.column.id,s=I.has(t.column.id),o=!!(null!=(r=t.column.columnDef.meta)&&r.disableTruncate);return(0,c.jsx)("td",{className:(0,a.v)(nB(t.column.id,!!S,s),"text-content-default group",nG(t.column,e.index===y.getRowModel().rows.length-1),"function"==typeof j?j(t.column.id,e):j),style:{minWidth:t.column.columnDef.minSize,maxWidth:t.column.columnDef.maxSize,width:nO.has(t.column.id)?F(t.column.id,t.column.getSize()):L?t.column.columnDef.size:"auto",...nK(t.column)},children:l?(0,c.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ew.Kv)(t.column.columnDef.cell,t.getContext())}):(0,c.jsxs)("div",{className:(0,a.v)("flex items-center",n?"justify-center":"w-full justify-between",!n&&(o?"overflow-visible":"overflow-hidden truncate")),children:[(0,c.jsx)("div",{className:(0,a.v)(o?"whitespace-nowrap":"truncate",n?"shrink-0":"min-w-0 shrink grow",o&&!n&&"min-w-max shrink-0"),children:(0,ew.Kv)(t.column.columnDef.cell,t.getContext())}),!n&&(null==i?void 0:i(t))]})},t.id)})},e.id)})})]}),D]})]}):(0,c.jsx)("div",{className:(0,a.v)("text-content-subtle flex h-96 w-full items-center justify-center text-sm",b),children:l||s||"No ".concat((null==C?void 0:C(!0))||"items"," found.")}),N&&!l&&!!(null!=t&&t.length)&&!!E&&(0,c.jsxs)("div",{className:"border-border-subtle bg-bg-default text-content-default sticky bottom-0 z-10 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:[(0,c.jsxs)("div",{children:[(0,c.jsx)("span",{className:"hidden sm:inline-block",children:"Viewing"})," ",(0,c.jsxs)("span",{className:"font-medium",children:[((N.pageIndex-1)*N.pageSize+1).toLocaleString(),"-",Math.min((N.pageIndex-1)*N.pageSize+N.pageSize,y.getRowCount()).toLocaleStr
1ing()]})," ","of"," ",(0,c.jsxs)(O,{href:null!=k?k:"#",className:"font-medium",children:[y.getRowCount().toLocaleString()," ",(null==C?void 0:C(1!==y.getRowCount()))||"items"]})]}),(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)(rt,{variant:"secondary",text:"Previous",className:"h-7 px-2",onClick:()=>y.previousPage(),disabled:1===N.pageIndex}),(0,c.jsx)(rt,{variant:"secondary",text:"Next",className:"h-7 px-2",onClick:()=>y.nextPage(),disabled:N.pageIndex===y.getPageCount()})]})]}),(0,c.jsx)(ea.N,{children:r&&(0,c.jsx)(_.P.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-bg-default/50 absolute inset-0 h-full rounded-xl",children:(0,c.jsx)("div",{className:"flex h-[min(75%,75vh)] w-full items-center justify-center",children:(0,c.jsx)(n.z,{})})})})]})}var nG=(e,t)=>{let r=e.getIsPinned();return(0,a.v)(r&&"bg-bg-default py-0",r&&!t&&"animate-table-pinned-shadow [animation-timeline:scroll(inline)]")},nK=e=>{let t=e.getIsPinned();return{left:"left"===t?"".concat(e.getStart("left"),"px"):void 0,right:"right"===t?"".concat(e.getAfter("right"),"px"):void 0,position:t?"sticky":"relative"}};function nq(e){let{children:t,tooltip:r}=e;return r?(0,c.jsx)(t4,{content:r,delayDuration:400,children:(0,c.jsx)("span",{className:"cursor-help underline decoration-dotted underline-offset-2",children:t})}):(0,c.jsx)(c.Fragment,{children:t})}function nZ(e){let{timestamp:t,rows:r,interactive:n=!0,prefix:l,...a}=e;return t&&"Invalid Date"!==new Date(t).toString()?(0,c.jsx)(t4,{content:(0,c.jsx)(nY,{timestamp:t,rows:r,interactive:n,prefix:l}),disableHoverableContent:!n,...a}):a.children}function nY(e){let{timestamp:t,rows:r=["local","utc"],interactive:n,prefix:l}=e;if(!t)throw Error("Falsy timestamp not permitted in TimestampTooltipContent");let s=new Date(t),i={year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0},d=new Date().getTime()-s.getTime(),u=(0,ey.F)({start:s,end:new Date}),m=(0,eN.a)(u,{delimiter:", ",format:["years","months","days",...d<2592e6?["hours",...d<864e5?["minutes","seconds"]:[]]:[]]})+" ago",h=(0,o.useMemo)(()=>r.map(e=>({local:{label:function(){if("u">typeof Intl)try{return Intl.DateTimeFormat().resolvedOptions().timeZone||"Local"}catch(e){}return"Local"}(),shortLabel:new Date().toLocaleTimeString("en-US",{timeZoneName:"short"}).split(" ")[2],successMessageLabel:"local timestamp",value:s.toLocaleString("en-US",i)},utc:{label:"UTC",shortLabel:"UTC",successMessageLabel:"UTC timestamp",value:new Date(s.getTime()).toLocaleString("en-US",{...i,timeZone:"UTC"})},unix:{label:"UNIX Timestamp",successMessageLabel:"UNIX timestamp",value:(s.getTime()/1e3).toString(),valueMono:!0}})[e]),[r,s]),p=h.every(e=>
1{let{shortLabel:t}=e;return t}),[x,f]=(0,o.useState)(0);return(0,o.useEffect)(()=>{let e=setInterval(()=>f(e=>e+1),1e3);return()=>clearInterval(e)},[]),(0,c.jsxs)("div",{className:"flex max-w-[360px] flex-col gap-2 px-2.5 py-2 text-left text-xs",children:[d>0&&(0,c.jsxs)("span",{className:"text-content-subtle cursor-default",children:[l?"".concat(l," "):"",m]}),(0,c.jsx)("table",{children:(0,c.jsx)("tbody",{children:h.map((e,t)=>(0,c.jsxs)("tr",{className:(0,a.v)(n&&"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:n?async()=>{try{await navigator.clipboard.writeText(e.value),E.o.success("Copied ".concat(e.successMessageLabel," to clipboard"))}catch(t){E.o.error("Failed to copy ".concat(e.successMessageLabel," to clipboard")),console.error("Failed to copy ".concat(e.successMessageLabel," to clipboard"),t)}}:void 0,children:[(0,c.jsx)("td",{className:"relative py-0.5",children:(0,c.jsx)("span",{className:(0,a.v)("text-content-subtle truncate",p&&"bg-bg-inverted/10 rounded px-1 font-mono"),title:p?e.label:void 0,children:p?e.shortLabel:e.label})}),(0,c.jsx)("td",{className:(0,a.v)("text-content-default relative whitespace-nowrap py-0.5 pl-3",p&&"pl-2",e.valueMono&&"font-mono"),children:e.value})]},t))})})]})}function nX(e){let{options:t,selected:r,selectAction:n,layout:l=!0,className:s,optionClassName:i,indicatorClassName:d,style:u}=e,m=(0,o.useId)();return(0,c.jsx)(ek.o,{id:m,children:(0,c.jsx)(_.P.div,{layout:l,className:(0,a.v)("border-border-subtle bg-bg-default relative z-0 inline-flex items-center gap-1 rounded-xl border p-1",s),style:u,children:t.map(e=>{let t=e.value===r,l=e.href?h:"button";return(0,c.jsxs)(l,{...e.href?{href:e.href}:{type:"button"},"data-selected":t,className:(0,a.v)("text-content-emphasis relative z-10 flex items-center gap-2 px-3 py-1 text-sm font-medium capitalize",!t&&"hover:text-content-subtle z-[11] transition-colors",i),onClick:()=>null==n?void 0:n(e.value),children:["string"==typeof e.label?(0,c.jsx)("p",{children:e.label}):e.label,e.badge,t&&(0,c.jsx)(_.P.div,{layoutId:m,className:(0,a.v)("border-border-subtle bg-bg-muted absolute left-0 top-0 -z-[1] h-full w-full rounded-lg border",d),transition:{duration:.25}})]},e.value)})})})}var nJ=(0,o.memo)(e=>{let{as:t,overflowIndicator:r,className:n,itemProps:l={},children:s,...i}=e,d=t||"div",u="ul"===d?"li":"div",[m,h]=(0,o.useState)(0),p=(0,o.useRef)(null),x=(0,o.useCallback)(()=>{if(!p.current)return;let e=p.current,t=Array.from(e.children),r=t.slice(0,-1),n=t[t.length-1];if(r.forEach(e=>e.hidden=!1),n.hidden=!0,0===r.length)return void h(0);e.offsetWidth;let l=e.getBoundingClientRect().right;if(r[r.length-1].getBoundingClientRect().right<=l+.5)return void h(r.length);n.hidden=!1;let a=r.length;for(;a>0&&(e.offsetWidth,!(n.getBoundingClientRect().right<=e.getBoundingClientRect().right+.5));)r[a-1].hidden=!0,a--;h(a)},[]);(0,o.useLayoutEffect)(()=>{if(!p.current)return void console.error("Failed to get container element for TruncatedList");let e=new ResizeObserver(()=>x());return e.observe(p.current),x(),()=>e.disconnect()},[x,s]);let f=o.Children.toArray(s);return(0,c.jsxs)(d,{ref:p,className:(0,a.v)("overflow-hidden",n),...i,children:[f.map((e,t)=>(0,c.jsx)(u,{...l,children:e},t)),(0,c.jsx)(u,{className:"shrink-0","data-overflow-indicator":"",children:r({visible:m,total:f.length,hidden:f.length-m})})]})},(e,t)=>JSON.stringify(e,nQ())===JSON.stringify(t,nQ())),nQ=()=>{let e=new WeakSet;return(t,r)=>{if(!t.startsWith("_")){if("object"==typeof r&&null!==r){if(e.has(r))return;e.add(r)}return r}}},n$=[{key:"utm_source",icon:n.Hc,label:"Source",placeholder:"google",description:"Where the traffic is coming from"},{key:"utm_medium",icon:n.ae,label:"Medium",placeholder:"cpc",description:"How the traffic is coming"},{key:"utm_campaign",icon:n.qc,label:"Campaign",placeholder:"summer sale",description:"The name of the campaign"},{key:"utm_term",icon:n.bd,label:"Term",placeholder:"running shoes",description:"The term of the campaign"},{key:"utm_content",icon:n.Id,label:"Content",placeholder:"logo link",description:"The content of the campaign"},{key:"ref",icon:n.Fc,label:"Referral",placeholder:"yoursite.com",description:"The referral of the campaign"}];function n0(e,t){let r=e.slice(0,t),n=r.lastIndexOf("{{");
1if(-1===n)return null;let l=r.slice(n+2);return l.includes("}")?null:{start:n,query:l}}function n1(e){let t,{id:r,inputRef:n,placeholder:l,disabled:s,disabledTooltip:i,value:d,onChange:u,suggestions:m}=e,h=(0,o.useRef)(null),p=(0,o.useRef)(null),[x,f]=(0,o.useState)(!1),[g,v]=(0,o.useState)(""),[b,w]=(0,o.useState)(0),[j,y]=(0,o.useState)({}),N=m&&x?(t=g.toLowerCase())?m.filter(e=>{let r=e.value.toLowerCase();return r.includes(t)||r.slice(2).startsWith(t)}):m:[],k=()=>{let e=h.current;if(!e)return;let t=e.getBoundingClientRect();y({position:"fixed",top:t.bottom+4,left:t.left,width:t.width,zIndex:50})},C=(e,t)=>{if(!(null!=m&&m.length))return void f(!1);let r=n0(e,t);v(r?r.query:e),w(0),k(),f(!0)},S=e=>{var t;let r=h.current,n=null!=(t=null==r?void 0:r.selectionStart)?t:d.length,l=n0(d,n),a=l?d.slice(0,l.start)+e.value+d.slice(n):e.value,s=l?l.start+e.value.length:e.value.length;u(a),f(!1),requestAnimationFrame(()=>{let e=h.current;e&&(e.focus(),e.setSelectionRange(s,s))})};return(0,o.useEffect)(()=>()=>{p.current&&clearTimeout(p.current)},[]),(0,o.useEffect)(()=>{w(0)},[g]),(0,o.useEffect)(()=>{if(!x)return;let e=()=>k();return window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}},[x]),(0,c.jsxs)("div",{className:"relative min-w-0 grow",children:[(0,c.jsx)(t8,{tooltipProps:i?{content:i,disableHoverableContent:!0}:void 0,children:(0,c.jsx)("input",{type:"text",id:r,ref:e=>{h.current=e,n&&("function"==typeof n?n(e):n.current=e)},placeholder:l,disabled:s||!!i,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:d,onChange:e=>{var t;let r=e.target.value;u(r),C(r,null!=(t=e.target.selectionStart)?t:r.length)},onSelect:e=>{var t;let r=e.currentTarget;C(r.value,null!=(t=r.selectionStart)?t:r.value.length)},onKeyDown:e=>{if(!(!x||0===N.length)){if("ArrowDown"===e.key){e.preventDefault(),w(e=>(e+1)%N.length);return}if("ArrowUp"===e.key){e.preventDefault(),w(e=>(e-1+N.length)%N.length);return}if("Enter"===e.key){e.preventDefault(),S(N[b]);return}"Escape"===e.key&&(e.preventDefault(),f(!1))}},onBlur:()=>{p.current=setTimeout(()=>f(!1),150)},onFocus:e=>{var t;p.current&&(clearTimeout(p.current),p.current=null),C(e.currentTarget.value,null!=(t=e.currentTarget.selectionStart)?t:e.currentTarget.value.length)}})}),x&&N.length>0&&(0,A.createPortal)((0,c.jsx)("div",{style:j,className:"border-border-subtle flex flex-col rounded-lg border bg-white p-1 shadow-sm",children:N.map((e,t)=>(0,c.jsxs)("button",{type:"button",onMouseDown:e=>e.preventDefault(),onClick:()=>S(e),onPointerEnter:()=>w(t),"data-selected":b===t,className:(0,a.v)("flex cursor-pointer select-none flex-col items-start gap-0.5 rounded-md px-2 py-1.5 text-left","data-[selected=true]:bg-neutral-100"),children:[(0,c.jsx)("span",{className:"font-mono text-sm text-neutral-950",children:e.value}),e.description&&(0,c.jsx)("span",{className:"text-content-subtle text-xs",children:e.description})]},e.value))}),document.body)]})}function n2(e){let{values:t,onChange:r,disabled:n,autoFocus:s,disabledTooltip:i,className:d,suggestions:u}=e,{isMobile:m}=(0,l.a)(),h=(0,o.useId)(),[p,x]=(0,o.useState)(!1),f=(0,o.useRef)(null);return(0,o.useEffect)(()=>{f.current&&!m&&s&&setTimeout(()=>{var e;return null==(e=f.current)?void 0:e.focus()},10)},[]),(0,c.jsx)("div",{className:(0,a.v)("grid gap-y-3",d),children:n$.map((e,l)=>{let{key:s,icon:o,label:d,placeholder:m,description:g}=e;return(0,c.jsx)("div",{className:"group relative",children:(0,c.jsxs)("div",{className:"relative z-10 flex",children:[(0,c.jsx)(t4,{content:(0,c.jsxs)("div",{className:"p-3 text-center text-xs",children:[(0,c.jsx)("p",{className:"text-neutral-600",children:g}),(0,c.jsx)("span",{className:"font-mono text-neutral-400",children:s})]}),sideOffset:4,disableHoverableContent:!0,children:(0,c.jsxs)("div",{className:(0,a.v)("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",p?"sm:min-w-36":"sm:min-w-28"),onClick:()=>x(e=>!e),children:[(0,c.jsx)(o,{className:"size-4 shrink-0"}),(0,c.jsx)("label",{htmlFor:"".concat(h,"-").concat(s),className:"select-none text-sm",children:p?(0,c.jsx)("span",{className:"font-mono text-xs",children:s}):d})]})}),(0,c.jsx)(n1,{id:"".concat(h,"-").concat(s),inputRef:0===l?f:void 0,placeholder:m,disabled:n,disabledTooltip:i,value:t[s]||"",onChange:e=>r(s,e),suggestions:u})]})},s)})})}function n4(){return(0,c.jsxs)("div",{style:n3.backgroundMain,children:[(0,c.jsx)("div",{style:n3.backgroundMainBefore}),(0,c.jsx)("div",{style:n3.backgroundMainAfter}),(0,c.jsx)("div",{style:n3.backgroundContent})]})}var n3={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%), \n radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),\n radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),\n radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),\n radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),\n radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),\n radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)",position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",to
1p:"80px",opacity:.15}};function n5(e){let{className:t}=e;return(0,c.jsx)("svg",{width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:(0,a.v)("h-10 w-10 text-black dark:text-white",t),children:(0,c.jsx)("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 n6=[{id:"partners",title:"Dub Partners",description:"Grow your revenue with partnerships",icon:n.h,href:"/partners"},{id:"analytics",title:"Dub Analytics",description:"Powerful real-time analytics",icon:n.d,href:"/analytics"},{id:"links",title:"Dub Links",description:"Short links with superpowers",icon:n.g,href:"/links"},{id:"api",title:"Dub API",description:"Programmatic link creation at scale",icon:n.e,href:"/docs/api-reference/introduction"},{title:"Dub Integrations",description:"Connect Dub with your favorite tools",icon:(0,n.va)(n.Ie),href:"/integrations"}],n9=[{icon:n.ia,iconClassName:"py-0.5 group-hover:text-[#3178C6]",title:"Typescript",href:"/sdks/typescript"},{icon:n.ga,iconClassName:"py-0.5 [&_.snake]:transition-colors group-hover:[&_.snake1]:text-[#3776ab] group-hover:[&_.snake2]:text-[#ffd343]",title:"Python",href:"/sdks/python"},{icon:n.ea,iconClassName:"group-hover:text-[#00ACD7]",title:"Go",href:"/sdks/go"},{icon:n.ha,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"Ruby",href:"/sdks/ruby"},{icon:n.fa,iconClassName:"py-[3px] grayscale brightness-150 transition-[filter] group-hover:grayscale-0 group-hover:brightness-100",title:"PHP",href:"/sdks/php"}],n8=[{icon:(0,n.va)(n._e),title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{icon:(0,n.va)(n.Tb),title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:(0,n.va)(n.vd),title:"For Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"},{label:"SDKs",items:n9}],n7=[{icon:(0,n.va)(n.Oa),title:"Docs",description:"Developer documentation",href:"/docs"},{icon:(0,n.va)(n.hd),title:"Help Center",description:"Answers to your questions",href:"/help"},{icon:(0,n.va)(n._e),title:"About",description:"Company, values, and team",href:"/about"},{icon:(0,n.va)(n.Ta),title:"Careers",description:"Join our global, remote team",href:"/careers"},{icon:(0,n.va)(n.ic),title:"Blog",description:"Insights and stories",href:"/blog"},{icon:(0,n.va)(n.Va),title:"Changelog",description:"Releases and updates",href:"/changelog"},{icon:n5,title:"Dub Brand",description:"Logos, wordmark, etc.",href:"/brand"},{icon:(0,n.va)(n.$b),title:"Contact",description:"Reach out to support or sales",href:"/contact"},{icon:(0,n.va)(n.ie),title:"Program Marketplace",description:"Browse our available partner programs",href:"/marketplace"}],le=[{name:"Bitly",slug:"bitly"},{name:"Rebrandly",slug:"rebrandly"},{name:"Short.io",slug:"short"},{name:"Bl.ink",slug:"blink"}],lt=[{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"}],lr=[{name:"X (Twitter)",icon:n.T,href:"https://x.com/dubdotco"},{name:"LinkedIn",icon:n.M,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:n.I,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:n.X,href:"https://www.youtube.com/@dubdotco"}];function ln(e){let{className:t,children:r}=e;return(0,c.jsx)("div",{className:(0,a.v)("mx-auto w-full max-w-screen-xl px-3 lg:px-10",t),children:r})}var ll={clicks:{color:"#3B82F6",value:"12.5K"},leads:{color:"#A855F7",value:"8.2K"},sales:{color:"#14B8A6",value:"$12K"}},la={name:"Danielle Wilson",email:"[email protected]",avatarIndex:8,origin:"dub.sh",country:"US",details:{"Lifetime value":"$12.5k",Account:"Pro",Subscription:"2y 10m"}},ls=[{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}],li="text-xs uppercase text-neutral-500 dark:text-white/60",lo={utm_source:"Custom Domain",utm_medium:"Navbar"};
1function lc(e){let{icon:t,title:r,description:l,descriptionLines:s=1,className:i,showArrow:o,...d}=e;return(0,c.jsx)(eR.N_,{asChild:!0,children:(0,c.jsx)(h,{className:(0,a.v)("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",i),...d,children:(0,c.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[t,(0,c.jsxs)("div",{className:"flex-1",children:[(0,c.jsx)("p",{className:"text-sm font-medium text-neutral-700 dark:text-white",children:r}),l&&(0,c.jsx)("p",{className:(0,a.v)("text-xs text-neutral-500 dark:text-white/60",["line-clamp-1","line-clamp-2"][s-1]),children:l})]}),o&&(0,c.jsx)(n.j,{className:"invisible -ml-6 h-4 w-4 text-neutral-700 group-aria-selected:visible sm:group-hover:visible dark:text-white/80"})]})})})}var ld=[{icon:(0,c.jsx)("div",{className:"flex size-4 items-center justify-center rounded bg-violet-400",children:(0,c.jsx)(n.h,{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:(0,c.jsx)(function(e){let{className:t}=e;return(0,c.jsx)("div",{className:(0,a.v)("pointer-events-none relative size-full dark:opacity-80",t),"aria-hidden":!0,children:(0,c.jsx)("div",{className:"absolute left-0 top-0 grid grid-cols-[repeat(2,180px)]",children:ls.map((e,t)=>(0,c.jsx)("div",{className:"h-[60px] w-[180px] p-[3px]",children:(0,c.jsx)("div",{className:"border-border-subtle bg-bg-default flex size-full select-none overflow-hidden rounded border",children:e&&(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:"bg-bg-emphasis aspect-square h-full",style:{backgroundImage:"url(https://assets.dub.co/partners/partner-images.jpg)",backgroundSize:"1400%",backgroundPositionX:(14-t%14)*100+"%"}},t),(0,c.jsxs)("div",{className:"border-border-subtle flex h-full flex-col justify-between border-l px-2 py-1.5",children:[(0,c.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,c.jsx)("img",{alt:"US Flag",src:"https://flag.vercel.app/m/".concat(e.country,".svg"),className:"h-2.5 w-3 rounded-sm border-[0.5px] border-black/15"}),(0,c.jsx)("span",{className:"text-content-default text-[9px] font-medium",children:e.name})]}),(0,c.jsx)("div",{className:"divide-border-subtle flex divide-x",children:["revenue","payouts"].map((t,r)=>(0,c.jsxs)("div",{className:(0,a.v)("flex flex-col",0===r?"pr-4":"pl-4"),children:[(0,c.jsx)("span",{className:"text-content-muted text-[6px] font-medium",children:(0,a.u)(t)}),(0,c.jsxs)("span",{className:"text-content-default text-[9px] font-medium",children:["$",(0,a.d)(e[t])]})]},t))})]})]})})},t))})})},{})},{icon:(0,c.jsx)("div",{className:"flex size-4 items-center justify-center rounded bg-green-400",children:(0,c.jsx)(n.d,{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:(0,c.jsx)(function(e){let{className:t}=e;return(0,c.jsxs)("div",{className:(0,a.v)("pointer-events-none relative size-full",t),children:[(0,c.jsxs)("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:[(0,c.jsx)("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"}),(0,c.jsx)("circle",{cx:"259.333",cy:"72",r:"3",fill:"#00BBA7"}),(0,c.jsx)("circle",{cx:"259.333",cy:"72",r:"4",stroke:"#3EC5B8",strokeOpacity:"0.3",strokeWidth:"2"})]}),(0,c.jsxs)("div",{className:"absolute bottom-0 left-5 flex items-start gap-2",children:[(0,c.jsxs)("div",{className:"border-border-default bg-bg-default w-[172px] rounded-lg border p-0",children:[(0,c.jsxs)("div",{className:"p-1.5",children:[(0,c.jsxs)("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:[(0,c.jsx)(eE.A,{className:"size-3 rotate-90"}),"d.to/try"]}),(0,c.jsx)("div",{className:"text-content-default mt-1 px-1.5 pb-0.5 text-[0.8125rem] font-medium sm:mt-2",children:"Apr 2025"})]}),(0,c.jsx)("div",{className:"border-border-default flex flex-col gap-2 border-t p-3",children:["clicks","leads","sales"].map(e=>(0,c.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,c.jsxs)("div",{className:"flex items-center gap-2",children:[(0,c.jsx)("div",{className:"size-2 roun
1ded-sm border border-black/20 bg-current opacity-70",style:{color:ll[e].color}}),(0,c.jsx)("div",{className:"text-content-subtle text-xs font-medium leading-none",children:(0,a.u)(e)})]}),(0,c.jsxs)("span",{className:"text-content-emphasis text-xs leading-none",children:["sales"===e?"$":"",ll[e].value]})]},e))})]}),(0,c.jsx)("div",{className:"relative",children:(0,c.jsxs)("div",{className:"border-border-default bg-bg-default absolute left-0 top-0 rounded-lg border py-0.5",children:[(0,c.jsxs)("div",{className:"px-3 py-2.5",children:[(0,c.jsxs)("div",{className:"flex justify-between gap-2",children:[(0,c.jsx)("div",{className:"bg-bg-emphasis size-11 rounded-full",style:{backgroundImage:"url(https://assets.dub.co/home/people.png)",backgroundSize:"3600%",backgroundPositionX:100*la.avatarIndex+"%"}}),(0,c.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,c.jsxs)("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:[(0,c.jsx)(n.Qb,{className:"text-content-default size-3.5"}),la.origin]}),(0,c.jsxs)("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:[(0,c.jsx)("img",{src:"https://flag.vercel.app/m/".concat(la.country,".svg"),className:"relative h-2.5 w-3 rounded-sm"}),la.country]})]})]}),(0,c.jsx)("div",{className:"text-content-emphasis mt-4 text-[0.8125rem] font-medium",children:la.name}),(0,c.jsx)("div",{className:"text-content-subtle mt-px text-xs",children:la.email})]}),(0,c.jsx)("div",{className:"border-border-default flex flex-col gap-2.5 border-t px-3 pb-2.5 pt-3",children:Object.entries(la.details).map(e=>{let[t,r]=e;return(0,c.jsxs)("div",{className:"relative flex items-center justify-between gap-2 text-xs leading-none",children:[(0,c.jsx)("span",{className:"text-content-muted truncate font-medium",children:t}),(0,c.jsx)("span",{className:"text-content-default",children:r})]},t)})})]})})]})]})},{className:"absolute bottom-0 left-0 size-full"})},{icon:(0,c.jsx)("div",{className:"flex size-4 items-center justify-center rounded bg-orange-400",children:(0,c.jsx)(n.g,{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:(0,c.jsx)(function(e){let t=(0,o.useId)();return(0,c.jsxs)("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:(0,a.v)("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:[(0,c.jsxs)("defs",{children:[(0,c.jsx)("path",{id:"".concat(t,"-m"),className:"fill-[var(--bg)]",d:"M0 0h10.24v10.24H0z"}),(0,c.jsx)("path",{id:"".concat(t,"-n"),className:"fill-[var(--bg)]",d:"M0 0h8.05v8.05H0z"}),(0,c.jsx)("path",{id:"".concat(t,"-o"),className:"fill-[var(--bg)]",d:"M0 0h11.71v11.71H0z"})]}),(0,c.jsx)("rect",{width:"292",height:"52",x:"4",y:"4",rx:"8.78",className:"fill-[var(--bg)]"}),(0,c.jsx)("rect",{width:"292",height:"52",x:"4",y:"4",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),(0,c.jsx)("rect",{width:"24.88",height:"24.88",x:"17.17",y:"17.56",fill:"url(#".concat(t,"-a)"),rx:"12.44"}),(0,c.jsx)("rect",{width:"25.61",height:"25.61",x:"16.8",y:"17.2",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),(0,c.jsx)("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"}),(0,c.jsx)("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:(0,c.jsx)("tspan",{x:"50.83",y:"25.49",children:"d.to"})}),(0,c.jsxs)("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:"url(#".concat(t,"-b)"),children:[(0,c.jsx)("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"}),(0,c.jsx)("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"})]}),(0,c.jsx)("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"}),(0,c.jsxs)("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:"url(#".concat(t,"-c)"),children:[(0,c.jsx)("path",{d:"M59.11 38.38h-4.7a.9.9 0 0 1-.89-.89V35.7"}),(0,c.jsx)("path",{d:"m57.21 36.48 1.9 1.9-1.9 1.9"})]}),(0,c.jsx)("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:(0,c.jsx)("tspan",{x:"63.27",y:"41.59",children:"dub.co"})}),(0,c.jsx)("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
1-.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"}),(0,c.jsx)("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"}),(0,c.jsx)("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:"url(#".concat(t,"-d)"),children:(0,c.jsx)("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"})}),(0,c.jsx)("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:(0,c.jsx)("tspan",{x:"220.78",y:"33.19",children:"151.8K clicks"})}),(0,c.jsx)("rect",{width:"292",height:"52",x:"4",y:"64",rx:"8.78",className:"fill-[var(--bg)]"}),(0,c.jsx)("rect",{width:"292",height:"52",x:"4",y:"64",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"8.78"}),(0,c.jsx)("rect",{width:"24.88",height:"24.88",x:"17.17",y:"77.56",fill:"url(#".concat(t,"-e)"),rx:"12.44"}),(0,c.jsx)("rect",{width:"25.61",height:"25.61",x:"16.8",y:"77.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),(0,c.jsx)("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"}),(0,c.jsx)("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:(0,c.jsx)("tspan",{x:"50.83",y:"85.49",children:"d.to/register"})}),(0,c.jsxs)("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:"url(#".concat(t,"-f)"),children:[(0,c.jsx)("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"}),(0,c.jsx)("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"})]}),(0,c.jsx)("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"}),(0,c.jsxs)("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:"url(#".concat(t,"-g)"),children:[(0,c.jsx)("path",{d:"M59.11 98.38h-4.7a.9.9 0 0 1-.89-.89V95.7"}),(0,c.jsx)("path",{d:"m57.21 96.48 1.9 1.9-1.9 1.9"})]}),(0,c.jsx)("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:(0,c.jsx)("tspan",{x:"63.27",y:"101.59",children:"app.dub.co/register"})}),(0,c.jsx)("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
1-.06 2.86-.06Z"}),(0,c.jsx)("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"}),(0,c.jsx)("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:"url(#".concat(t,"-h)"),children:(0,c.jsx)("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"})}),(0,c.jsx)("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:(0,c.jsx)("tspan",{x:"226.78",y:"93.19",children:"100K clicks"})}),(0,c.jsx)("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"}),(0,c.jsx)("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"}),(0,c.jsx)("rect",{width:"24.88",height:"24.88",x:"17.17",y:"137.56",fill:"url(#".concat(t,"-i)"),rx:"12.44"}),(0,c.jsx)("rect",{width:"25.61",height:"25.61",x:"16.8",y:"137.19",className:"stroke-[var(--border)]",strokeWidth:"0.73",rx:"12.8"}),(0,c.jsx)("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"}),(0,c.jsx)("text",{xmlSpace:"preserve",className:"fill-[var(--fg)]",fontSize:"10.24",fontWeight:"600",style:{whiteSpace:"pre"},children:(0,c.jsx)("tspan",{x:"50.83",y:"145.49",children:"d.to/try"})}),(0,c.jsxs)("g",{className:"stroke-[var(--fg)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:"url(#".concat(t,"-j)"),children:[(0,c.jsx)("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"}),(0,c.jsx)("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"})]}),(0,c.jsx)("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"}),(0,c.jsxs)("g",{stroke:"#A1A1A1",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:"url(#".concat(t,"-k)"),children:[(0,c.jsx)("path",{d:"M59.11 158.38h-4.7a.9.9 0 0 1-.89-.89v-1.79"}),(0,c.jsx)("path",{d:"m57.21 156.48 1.9 1.9-1.9 1.9"})]}),(0,c.jsx)("text",{xmlSpace:"preserve",fill:"#737373",fontSize:"10.24",fontWeight:"500",style:{whiteSpace:"pre"},children:(0,c.jsx)("tspan",{x:"63.27",y:"161.59",children:"app.dub.co/register"})}),(0,c.jsx)("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
1-.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"}),(0,c.jsx)("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"}),(0,c.jsx)("g",{className:"stroke-[var(--muted)]",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.1",clipPath:"url(#".concat(t,"-l)"),children:(0,c.jsx)("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"})}),(0,c.jsx)("text",{xmlSpace:"preserve",className:"fill-[var(--muted)]",fontSize:"8.78",fontWeight:"500",style:{whiteSpace:"pre"},children:(0,c.jsx)("tspan",{x:"223.78",y:"153.19",children:"65.8K clicks"})}),(0,c.jsxs)("defs",{children:[(0,c.jsx)("clipPath",{id:"".concat(t,"-b"),children:(0,c.jsx)("use",{xlinkHref:"#".concat(t,"-m"),transform:"translate(80.34 16.83)"})}),(0,c.jsx)("clipPath",{id:"".concat(t,"-c"),children:(0,c.jsx)("use",{xlinkHref:"#".concat(t,"-n"),transform:"translate(52.3 34.02)"})}),(0,c.jsx)("clipPath",{id:"".concat(t,"-d"),children:(0,c.jsx)("use",{xlinkHref:"#".concat(t,"-o"),transform:"translate(204.68 24.15)"})}),(0,c.jsx)("clipPath",{id:"".concat(t,"-f"),children:(0,c.jsx)("use",{xlinkHref:"#".concat(t,"-m"),transform:"translate(122.34 76.83)"})}),(0,c.jsx)("clipPath",{id:"".concat(t,"-g"),children:(0,c.jsx)("use",{xlinkHref:"#".concat(t,"-n"),transform:"translate(52.3 94.02)"})}),(0,c.jsx)("clipPath",{id:"".concat(t,"-h"),children:(0,c.jsx)("use",{xlinkHref:"#".concat(t,"-o"),transform:"translate(210.68 84.15)"})}),(0,c.jsx)("clipPath",{id:"".concat(t,"-j"),children:(0,c.jsx)("use",{xlinkHref:"#".concat(t,"-m"),transform:"translate(98.34 136.83)"})}),(0,c.jsx)("clipPath",{id:"".concat(t,"-k"),children:(0,c.jsx)("use",{xlinkHref:"#".concat(t,"-n"),transform:"translate(52.3 154.02)"})}),(0,c.jsx)("clipPath",{id:"".concat(t,"-l"),children:(0,c.jsx)("use",{xlinkHref:"#".concat(t,"-o"),transform:"translate(207.68 144.15)"})}),(0,c.jsxs)("linearGradient",{id:"".concat(t,"-a"),x1:"29.61",x2:"29.61",y1:"17.56",y2:"42.44",gradientUnits:"userSpaceOnUse",children:[(0,c.jsx)("stop",{stopColor:"#030712",stopOpacity:"0"}),(0,c.jsx)("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),(0,c.jsxs)("linearGradient",{id:"".concat(t,"-e"),x1:"29.61",x2:"29.61",y1:"77.56",y2:"102.44",gradientUnits:"userSpaceOnUse",children:[(0,c.jsx)("stop",{stopColor:"#030712",stopOpacity:"0"}),(0,c.jsx)("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]}),(0,c.jsxs)("linearGradient",{id:"".concat(t,"-i"),x1:"29.61",x2:"29.61",y1:"137.56",y2:"162.44",gradientUnits:"userSpaceOnUse",children:[(0,c.jsx)("stop",{stopColor:"#030712",stopOpacity:"0"}),(0,c.jsx)("stop",{offset:"1",stopColor:"#030712",stopOpacity:"0.05"})]})]})]})},{className:"absolute left-0 top-0 h-auto w-full"})}],lu=[{title:"Dub Integrations",description:"Connect Dub with your favorite tools",href:"/integrations",graphic:(0,c.jsx)("div",{className:"absolute -right-6 top-1/2 h-[180px] w-[240px] -translate-y-1/2 [mask-image:linear-gradient(90deg,black_50%,transparent_95%)] dark:opacity-80",children:(0,c.jsx)(eC.default,{src:"https://assets.dub.co/cms/integrations-grid2.png",alt:"",fill:!0})})},{title:"Dub API & MCP",description:"Connect your agent to Dub",href:"/docs/api-reference/introduction",graphic:(0,c.jsx)("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:(0,c.jsx)(eC.default,{src:"https://assets.dub.co/misc/api-thumbnail.png",alt:"",fill:!0})})}],lm=[{left:405,top:22,size:24,rotate:0,logo:"beehiiv"},{left:461,top:1,size:38,rotate:0,logo:"wisprflow"},{left:307.28,top:24.83,size:33,rotate:-6.57,logo:"granola"},{left:342,top:55,size:30,rotate:0,logo:"superhuman"},{left:410.5,top:64.5,size:31,rotate:0,logo:"polymarket"},{left:573.5,top:39.5,size:39,rotate:0,logo:"viktor"},{left:448,top:31,size:34,rotate:0,logo:"framer"},{left:526.5,top:26.5,size:33,rotate:0,logo:"flora"},{left:93.5,top:19.5,size:41,rotate:0,logo:"dub"},{left:162.5,top:11.5,size:29,rotate:0,logo:"superpower"},{left:2.05,top:28.03,size:38,rotate:-6.57,logo:"chatbase"},{left:36.5,top:58.5,size:35,rotate:0,logo:"copper"},{left:106,top:69,size:34,rotate:0,logo:"anything"},{left:268.5,top:43.5,size:43,rotate:0,logo:"tradezella"},{left:146,top:38,size:32,rotate:0,logo:"buffer"},{left:225.5,top:34.5,size:29,rotate:0,logo:"coderabbit"}],lh=lm.map(e=>{let{size:t}=e;return t}),lp=Math.min(...lh),lx=Math.max(...lh);function lf(){let e=(0,eD.I)();
1return(0,c.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute right-6 top-1/2 h-[104px] w-[614px] -translate-y-1/2",children:lm.map((t,r)=>{let n,l,a,{left:s,top:i,size:o,rotate:d,logo:u}=t,m=(o-lp)/(lx-lp),{x:h,y:p,duration:x,delay:f}={x:[0,l=6*Math.sin(12.9898*r)*(n=.6+.8*m),-(.6*l),0],y:[0,a=4.5*Math.cos(78.233*r)*n,-a,0],duration:9+r%5,delay:-(1.5+.7*r)};return(0,c.jsx)(_.P.div,{className:"absolute",style:{left:s,top:i,width:o,height:o},animate:e?void 0:{x:h,y:p},transition:{duration:x,delay:f,repeat:1/0,ease:"easeInOut"},children:(0,c.jsxs)("div",{className:"relative size-full overflow-hidden rounded-full border border-neutral-50 bg-neutral-200 dark:border-white/10 dark:bg-white/10",style:{boxShadow:"0 ".concat(1+m,"px ").concat(4+4*m,"px rgba(0,0,0,").concat((.02+.05*m).toFixed(3),")"),...d?{transform:"rotate(".concat(d,"deg)")}:{}},children:[(0,c.jsx)("img",{src:"https://assets.dub.co/companies/icons/".concat(u,".svg"),alt:"".concat(u," logo"),decoding:"async",className:"size-full object-cover"}),(0,c.jsx)("div",{className:"pointer-events-none absolute inset-0 rounded-full border-[0.5px] border-white/30"})]})},r)})})}function lg(e){let{domain:t}=e;return(0,c.jsx)(eR.N_,{asChild:!0,children:(0,c.jsxs)(h,{href:(0,a.c)("/marketplace",t,{...lo,utm_campaign:t,utm_content:"Program Marketplace"}),className:(0,a.v)("group relative isolate flex items-center overflow-hidden bg-neutral-50 px-6 py-3 transition-colors duration-75","hover:bg-neutral-100 dark:border-white/[0.15] dark:bg-white/[0.03] dark:hover:bg-white/[0.06]"),children:[(0,c.jsx)(no,{cellSize:60,patternOffset:[-12,-32],className:"text-neutral-200/60 [mask-image:linear-gradient(90deg,transparent_20%,black)] dark:text-white/10"}),(0,c.jsx)(lf,{}),(0,c.jsxs)("div",{className:"relative flex flex-col justify-center",children:[(0,c.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,c.jsx)("span",{className:"text-sm font-semibold text-neutral-900 dark:text-white",children:"Program Marketplace"}),(0,c.jsx)("span",{className:"flex h-4 items-center rounded-md bg-blue-100 px-1 text-xs font-semibold text-blue-600 dark:bg-blue-500/20 dark:text-blue-300",children:"NEW"})]}),(0,c.jsxs)("p",{className:"text-xs font-medium text-neutral-500 dark:text-white/60",children:["Browse our top affiliate programs"," ",(0,c.jsx)("span",{className:"inline-block transition-transform duration-150 group-hover:translate-x-0.5",children:"â"})]})]})]})})}var lv=[{heading:"Help and Support",titles:["Docs","Help Center","Contact"]},{heading:"Company",titles:["About","Careers","Dub Brand"]},{heading:"Updates",titles:["Blog","Changelog"]}],lb=[{icon:n._e,title:"Affiliate Management",description:"Manage affiliates and automate payouts",href:"/partners"},{icon:n.Tb,title:"Marketing Attribution",description:"Easily track and measure marketing impact",href:"/analytics"},{icon:n.vd,title:"For Content Creators",description:"Intelligent audience insights and link tracking",href:"/solutions/creators"}],lw=[{icon:n.Hd,title:"Enterprise",description:"Partner programs built for enterprise scale",href:"/enterprise"},{icon:n.$d,title:"Startups",description:"Discounted access for early-stage startups",href:"/startups"}],lj=(0,o.createContext)({theme:"light"}),ly=[{name:"Product",content:function(e){let{domain:t}=e;return(0,c.jsxs)("div",{className:"grid w-[1020px] grid-cols-1 gap-4 p-4",children:[(0,c.jsx)("div",{className:"grid grid-cols-3 gap-4",children:ld.map(e=>{let{title:r,description:n,icon:l,href:s,color:i,graphicsContainerClassName:o,graphic:d}=e;return(0,c.jsx)(eR.N_,{asChild:!0,children:(0,c.jsxs)(h,{href:(0,a.c)(s,t,{...lo,utm_campaign:t,utm_content:r}),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:[(0,c.jsx)(no,{className:"[mask-image:linear-gradient(transparent,black,transparent)] dark:text-white/5",cellSize:60,patternOffset:[-51,-23]}),(0,c.jsxs)("div",{className:"relative p-5 pb-0",children:[l,(0,c.jsx)("span",{className:"mt-3 block text-sm font-medium text-neutral-900 dark:text-white",children:r}),(0,c.jsx)("p",{className:"mt-2 max-w-56 text-sm text-neutral-500 dark:text-white/60",children:n})]}),(0,c.jsx)("div",{className:"relative mt-10 h-40 grow",children:(0,c.jsx)("div",{className:(0,a.v)("absolute left-0 top-0 size-full grow overflow-hidden [mask-image:linear-gradient(black_50%,transparent)]",o),children:(0,c.jsx)("div",{className:"relative size-full",children:d})})}),(0,c.jsx)("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":i}})]})},r)})}),(0,c.jsx)("div",{className:"grid grow grid-cols-2 gap-4",children:lu.map(e=>
1{let{title:r,description:n,href:l,graphic:s}=e;return(0,c.jsx)(eR.N_,{asChild:!0,children:(0,c.jsxs)(h,{href:(0,a.c)(l,t,{...lo,utm_campaign:t,utm_content:r}),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:[(0,c.jsx)(no,{className:"[mask-image:linear-gradient(90deg,transparent,black)] dark:text-white/5",cellSize:60,patternOffset:[-32,-49]}),(0,c.jsx)("div",{className:"pointer-events-none absolute inset-0 overflow-hidden","aria-hidden":!0,children:s}),(0,c.jsx)("div",{className:"relative flex items-center justify-between px-5 py-4",children:(0,c.jsxs)("div",{children:[(0,c.jsx)("span",{className:"text-sm font-medium leading-none text-neutral-900 dark:text-white",children:r}),(0,c.jsx)("p",{className:"mt-1 text-sm text-neutral-500 dark:text-white/60",children:n})]})})]})},r)})})]})},childItems:n6,segments:["/links","/analytics","/partners","/integrations","/compare","/features"]},{name:"Solutions",content:function(e){let{domain:t}=e;return(0,c.jsxs)("div",{className:"grid w-[1020px] grid-cols-[minmax(0,3fr)_minmax(0,3fr)_minmax(0,2fr)] divide-x divide-neutral-200 dark:divide-white/20",children:[(0,c.jsxs)("div",{className:"px-6 py-4",children:[(0,c.jsx)("p",{className:(0,a.v)(li,"mb-2"),children:"Use case"}),(0,c.jsx)("div",{className:"flex flex-col gap-0.5",children:lb.map(e=>{let{icon:r,title:n,description:l,href:s}=e;return(0,c.jsx)(lc,{className:"-mx-2",href:(0,a.c)(s,t,{...lo,utm_campaign:t,utm_content:n}),icon:(0,c.jsx)("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:(0,c.jsx)(r,{variant:"fill",className:"size-4 text-neutral-600 dar
1k:text-white/60"})}),title:n,description:l},s)})})]}),(0,c.jsxs)("div",{className:"px-6 py-4",children:[(0,c.jsx)("p",{className:(0,a.v)(li,"mb-2"),children:"Stage"}),(0,c.jsx)("div",{className:"flex flex-col gap-0.5",children:lw.map(e=>{let{icon:r,title:n,description:l,href:s}=e;return(0,c.jsx)(lc,{className:"-mx-2",href:(0,a.c)(s,t,{...lo,utm_campaign:t,utm_content:n}),icon:(0,c.jsx)("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:(0,c.jsx)(r,{variant:"fill",className:"size-4 text-neutral-600 dark:text-white/60"})}),title:n,description:l},s)})})]}),(0,c.jsxs)("div",{className:"px-6 py-4",children:[(0,c.jsx)("p",{className:(0,a.v)(li,"mb-2"),children:"SDKs"}),(0,c.jsx)("div",{className:"flex flex-col gap-0.5",children:n9.map(e=>{let{icon:r,iconClassName:n,title:l,href:s}=e;return(0,c.jsx)(lc,{className:"-mx-2 gap-1.5 py-1",href:(0,a.c)(s,t,{...lo,utm_campaign:t,utm_content:l}),icon:(0,c.jsx)("div",{className:"shrink-0 rounded-lg border border-neutral-200 bg-white/50 p-1 dark:border-white/20 dark:bg-white/10",children:(0,c.jsx)(r,{className:(0,a.v)("size-4 text-neutral-600 transition-colors dark:text-white/60",n)})}),title:l},s)})})]})]})},childItems:n8,segments:["/solutions","/enterprise","/startups","/sdks"]},{name:"Resources",content:function(e){let{domain:t}=e;return(0,c.jsxs)("div",{className:"w-[1020px] bg-neutral-50 dark:bg-white/[0.03]",children:[(0,c.jsxs)("div",{className:"relative",children:[(0,c.jsx)("div",{className:"grid grid-cols-3 divide-x divide-neutral-200 rounded-b-[20px] bg-white dark:divide-white/20 dark:bg-black",children:lv.map(e=>{let{heading:r,titles:n}=e;return(0,c.jsxs)("div",{className:"px-6 py-4",children:[(0,c.jsx)("p",{className:(0,a.v)(li,"mb-2"),children:r}),(0,c.jsx)("div",{className:"flex flex-col gap-0.5",children:n7.filter(e=>{let{title:t}=e;return n.includes(t)}).map(e=>{let{icon:r,title:n,description:l,href:s}=e;return(0,c.jsx)(lc,{className:"-mx-2",href:(0,a.c)(s,t,{...lo,utm_campaign:t,utm_content:n}),icon:(0,c.jsx)("div",{className:"shrink-0 rounded-md border border-neutral-200 bg-white/50 p-2 dark:border-white/20 dark:bg-white/10",children:(0,c.jsx)(r,{variant:"fill",className:"size-4 text-neutral-600 transition-colors dark:text-white/60"})}),title:n,description:l},s)})})]},r)})}),(0,c.jsx)("div",{className:"pointer-events-none absolute -inset-x-px bottom-0 h-5 overflow-hidden",children:(0,c.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-10 rounded-b-[21px] border border-neutral-200 dark:border-white/20"})})]}),(0,c.jsx)(lg,{domain:t})]})},childItems:n7,segments:["/help","/docs","/about","/careers","/brand","/blog","/changelog","/contact","/marketplace"]},{name:"Customers",href:"/customers",segments:["/customers"]},{name:"Pricing",href:"/pricing",segments:["/pricing"]},{name:"Enterprise",href:"/enterprise",segments:["/enterprise"],mobileOnly:!0},{name:"Startups",href:"/startups",segments:["/startups"],mobileOnly:!0}],lN=(0,a.v)("relative group/item flex items-center rounded-md px-3 h-8 text-sm rounded-lg font-medium text-neutral-700 hover:text-neutral-900 transition-[color]","dark:text-white/90 dark:hover:text-white","data-[active=true]:bg-neutral-900/5 dark:data-[active=true]:bg-white/10","group-data-[pill=true]/nav:data-[active=true]:bg-transparent");function lk(e,t){let r=e.getBoundingClientRect(),n=t.getBoundingClientRect();return{left:n.left-r.left,width:n.width,opacity:1}}var lC={type:"spring",stiffness:400,damping:30,opacity:{duration:0}},lS=async e=>{let t=await fetch(e);if(401===t.status)return null;if(!t.ok)throw Error("Failed to fetch session");return t.json()};function lA(e){let{theme:t="light",staticDomain:r,maxWidthWrapperClassName:n,navItems:l=ly,logo:s}=e,{domain:i="dub.co"}=(0,R.useParams)();r&&(i=r);let d=(0,o.useRef)(null),[u,m]=(0,o.useState)({left:0,width:0,opacity:0}),p=tv(40),x=(0,R.usePathname)(),{data:f,isLoading:g}=(0,D.Ay)(i.endsWith("dub.co")&&"/api/auth/session",lS,{dedupingInterval:6e4}),v=e=>{let t=d.current;t&&m(lk(t,e))},b=()=>{m(e=>({...e,opacity:0}))};return(0,c.jsx)(lj.Provider,{value:{theme:t},children:(0,c.jsxs)("div",{className:(0,a.v)("sticky inset-x-0 top-0 z-30 w-full transition-all","dark"===t&&"dark"),children:[(0,c.jsx)("div",{className:(0,a.v)("absolute inset-0 block border-b border-transparent transition-all",p&&"border-neutral-100 bg-white/75 backdrop-blur-lg dark:border-white/10 dark:bg-black/75")}),(0,c.jsx)(ln,{className:(0,a.v)("relative",n),children:(0,c.jsxs)("div",{className:"flex h-14 items-center justify-between",children:[(0,c.jsx)("div",{className:"grow basis-0",children:null!=s?s:(0,c.jsx)(h,{className:"block w-fit py-2 pr-2",href:(0,a.c)("/home",i,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:i,utm_content:"Logo"}),children:(0,c.jsx)(lT,{})})}
1),(0,c.jsxs)(eR.bL,{delayDuration:0,className:"hidden lg:block",onValueChange:e=>{var t;e||null!=(t=d.current)&&t.matches(":hover")||b()},children:[(0,c.jsxs)(eR.B8,{ref:d,"data-pill":u.opacity>0?"true":void 0,className:"group/nav relative flex",onMouseLeave:()=>{let e=d.current,t=null==e?void 0:e.querySelector("[data-state=open]");e&&t?m(lk(e,t)):b()},children:[(0,c.jsx)(_.P.div,{className:"pointer-events-none absolute top-0 h-8 rounded-lg bg-neutral-900/5 dark:bg-white/10",animate:u,transition:lC}),l.filter(e=>{let{mobileOnly:t}=e;return!t}).map(e=>{let{name:t,href:r,segments:n,content:l}=e,s=(null!=n?n:[]).some(e=>null==x?void 0:x.startsWith(e));return(0,c.jsxs)(eR.q7,{value:t,children:[(0,c.jsx)(lM,{trigger:!!l,children:void 0!==r?(0,c.jsx)(h,{id:"nav-".concat(r),href:(0,a.c)(r,i,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:i,utm_content:t}),className:lN,"data-active":s,onMouseEnter:e=>v(e.currentTarget),children:t}):(0,c.jsxs)("button",{className:lN,"data-active":s,onMouseEnter:e=>v(e.currentTarget),children:[t,(0,c.jsx)(lP,{className:"ml-1.5 size-2.5 text-neutral-700"})]})}),l&&(0,c.jsx)(eR.UC,{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:(0,c.jsx)(l,{domain:i})})]},t)})]}),(0,c.jsx)("div",{className:"absolute left-1/2 top-full mt-3 -translate-x-1/2",children:(0,c.jsx)(eR.LM,{className:(0,a.v)("relative flex origin-top 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-[calc(var(--radix-navigation-menu-viewport-height)_+_2px)] w-[calc(var(--radix-navigation-menu-viewport-width)_+_2px)] transition-[width,height]")})})]}),(0,c.jsx)("div",{className:"hidden grow basis-0 justify-end gap-2 lg:flex",children:f&&Object.keys(f).length>0?(0,c.jsx)(h,{href:a.g,className:(0,a.v)(re({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"}):g?null:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(h,{href:"https://app.dub.co/login",className:(0,a.v)(re({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"}),(0,c.jsx)(h,{href:"https://app.dub.co/register",className:(0,a.v)(re({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 lP(e){return(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"9",height:"9",fill:"none",viewBox:"0 0 9 9",...e,children:(0,c.jsx)("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 lM(e){let{trigger:t,children:r}=e;return t?(0,c.jsx)(eR.l9,{asChild:!0,children:r}):r}var lR={"Dub Links":(0,c.jsx)("div",{className:"flex size-5 items-center justify-center rounded bg-orange-400",children:(0,c.jsx)(n.g,{className:"size-3 text-orange-900"})}),"Dub Partners":(0,c.jsx)("div",{className:"flex size-5 items-center justify-center rounded bg-violet-400",children:(0,c.jsx)(n.h,{className:"size-3 text-violet-900"})}),"Dub Analytics":(0,c.jsx)("div",{className:"flex size-5 items-center justify-center rounded bg-green-400",children:(0,c.jsx)(n.d,{className:"size-3 text-green-900"})}),"Dub API":(0,c.jsx)("div",{className:"flex size-5 items-center justify-center rounded bg-neutral-400",children:(0,c.jsx)(n.e,{className:"size-3 text-neutral-900"})})};function lE(e){let{theme:t="light",staticDomain:r,navItems:n=ly}=e,{domain:l="dub.co"}=(0,R.useParams)();r&&(l=r);let[s,i]=(0,o.useState)(!1);(0,o.useEffect)(()=>{s?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[s]);let{data:d,isLoading:u}=(0,D.Ay)(l.endsWith("dub.co")&&"/api/auth/session",a.t,{dedupingInterval:6e4});return(0,c.jsxs)("div",{className:(0,a.v)("fixed right-0 top-0 z-40 flex items-center gap-4 p-2.5 lg:hidden","dark"===t&&"dark"),children:[d&&Object.keys(d).length>0?(0,c.jsx)(lz,{href:a.g,className:"max-[280px]:hidden",children:"Dashboard"}):u?null:(0,c.jsxs)("div",{className:"flex gap-2 max-[280px]:hidden",children:[(0,c.jsx)(lz,{variant:"secondary",href:"".concat(a.g,"/login"),
1children:"Log in"}),(0,c.jsx)(lz,{href:"".concat(a.g,"/register"),children:"Sign Up"})]}),(0,c.jsx)("button",{onClick:()=>i(!s),className:(0,a.v)("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",s&&"hover:bg-neutral-100 active:bg-neutral-200"),children:s?(0,c.jsx)(el.A,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"}):(0,c.jsx)(eL.A,{className:"h-5 w-5 text-neutral-600 dark:text-white/70"})}),s&&(0,c.jsx)(h,{href:(0,a.c)("/home",l,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:l,utm_content:"Logo"}),onClick:()=>i(!1),className:"fixed left-3 top-0 z-30 flex h-14 items-center pr-2",children:(0,c.jsx)(lT,{})}),(0,c.jsx)("nav",{className:(0,a.v)("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",s&&"block"),children:(0,c.jsxs)("ul",{className:"grid divide-y divide-neutral-200 dark:divide-white/[0.15]",children:[n.map((e,t)=>{let{name:r,href:n,childItems:l}=e;return(0,c.jsx)(lD,{name:r,href:n,childItems:l,setOpen:i},t)}),d&&Object.keys(d).length>0?(0,c.jsx)("li",{className:"py-3 min-[281px]:hidden",children:(0,c.jsx)(h,{href:a.g,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("li",{className:"py-3 min-[281px]:hidden",children:(0,c.jsx)(h,{href:"".concat(a.g,"/login"),className:"flex w-full font-semibold capitalize",children:"Log in"})}),(0,c.jsx)("li",{className:"py-3 min-[281px]:hidden",children:(0,c.jsx)(h,{href:"".concat(a.g,"/register"),className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}var lD=e=>{let{name:t,href:r,childItems:n,setOpen:l}=e,{domain:s="dub.co"}=(0,R.useParams)(),[d,u]=(0,o.useState)(!1);return n?(0,c.jsx)("li",{className:"py-3",children:(0,c.jsxs)(ro,{height:!0,children:[(0,c.jsxs)("button",{className:"flex w-full justify-between",onClick:()=>u(!d),children:[(0,c.jsx)("p",{className:"font-semibold",children:t}),(0,c.jsx)(i.A,{className:(0,a.v)("h-5 w-5 text-neutral-500 transition-all dark:text-white/50",d&&"rotate-180")})]}),d&&(0,c.jsx)("div",{className:"grid grid-cols-1 gap-4 overflow-hidden py-4",children:n.map((e,t)=>"items"in e?(0,c.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,c.jsx)("span",{className:"text-xs font-medium uppercase text-neutral-500 dark:text-white/50",children:e.label}),e.items.map((e,t)=>(0,c.jsx)(lL,{item:e,setOpen:l,size:"small"},t))]},t):(0,c.jsx)(lL,{item:e,setOpen:l},t))})]})}):r?(0,c.jsx)("li",{className:"py-3",children:(0,c.jsx)(h,{href:(0,a.c)(r,s,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:s,utm_content:t}),onClick:()=>l(!1),className:"flex w-full font-semibold capitalize",children:t})}):null},lL=e=>{let{item:{title:t,description:r,href:n,icon:l},setOpen:s,size:i="normal"}=e,{domain:o="dub.co"}=(0,R.useParams)(),d=null==lR?void 0:lR[t];return(0,c.jsxs)(h,{href:(0,a.c)(n,o,{utm_source:"Custom Domain",utm_medium:"Navbar",utm_campaign:o,utm_content:t}),onClick:()=>s(!1),className:"flex w-full items-center gap-3",children:[(0,c.jsx)("div",{className:(0,a.v)("flex size-10 items-center justify-center rounded-lg border border-neutral-200 bg-gradient-to-t from-neutral-100","small"===i&&"size-8"),children:null!=d?d:(0,c.jsx)(l,{className:(0,a.v)("size-5 text-neutral-700 grayscale","small"===i&&"size-4")})}),(0,c.jsxs)("div",{children:[(0,c.jsx)("div",{className:"flex items-center gap-2",children:(0,c.jsx)("h2",{className:"text-sm font-medium text-neutral-900",children:t})}),r&&(0,c.jsx)("p",{className:"text-sm text-neutral-500",children:r})]})]})};function lz(e){let{variant:t,className:r,...n}=e;return(0,c.jsx)(h,{...n,className:(0,a.v)("flex h-8 w-fit items-center whitespace-nowrap rounded-lg border px-3 text-[0.8125rem]",re({variant:t}),r)})}function lI(e){let{className:t}=e;return(0,c.jsx)("svg",{width:"46",height:"24",viewBox:"0 0 46 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:(0,a.v)("h-6 w-auto text-black dark:text-white",t),children:(0,c.jsx)("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"})})}function lT(e){let{variant:t="full",isInApp:r,className:n}=e,{domain:l="dub.co"}=(0,R.useParams)(),{theme:s}=(0,o.useContext)(lj),[i,d]=(0,o.useState)(!1),u=(0,o.useCallback)(e=>{e.preventDefault(),d(!0)},[]),[,m]=e9();function h(e){E.o.promise(m(e),{success:"Copied to clipboard!",error:"Failed to copy to clipboard"})}return(0,c.jsxs)(S.bL,{open:i,onOpenChange:d,children:[(0,c.jsx)(S.Mz,{asChild:!0,children:(0,c.jsx)("div",{onContextMenu:u,className:"max-w-fit",children:"full"===t?(0,c.jsx)(lI,{className:n}):(0,c.jsx)(n5,{className:(0,a.v)("h-8 w-8 transition-all duration-75 active:scale-95",n)})})}),(0,c.jsx)(S.ZL,{children:(0,c.jsx)(S.UC,{sideOffset:14,align:"start",className:(0,a.v)("z-50 -mt-1.5",!r&&"-translate-x-8","dar
1k"===s&&"dark"),onClick:e=>{e.stopPropagation(),d(!1)},children:(0,c.jsxs)("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:[(0,c.jsx)(l_,{text:"Copy Logo as SVG",variant:"outline",onClick:()=>h('<svg width="65" height="64" viewBox="0 0 65 64" fill="none" xmlns="http://www.w3.org/2000/svg">\n<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"/>\n</svg>'),icon:(0,c.jsx)(n5,{className:"h-4 w-4"})}),(0,c.jsx)(l_,{text:"Copy Wordmark as SVG",variant:"outline",onClick:()=>h('<svg width="46" height="24" viewBox="0 0 46 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n<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"/>\n</svg>'),icon:(0,c.jsx)(eS.A,{strokeWidth:2,className:"h-4 w-4"})}),(0,c.jsx)(l_,{text:"Brand Guidelines",variant:"outline",onClick:()=>window.open("https://dub.co/brand","_blank"),icon:(0,c.jsx)(eA.A,{strokeWidth:2,className:"h-4 w-4"})}),r||"dub.co"!=l?(0,c.jsx)(l_,{text:"Home Page",variant:"outline",onClick:()=>window.open("https://dub.co".concat(r?"/home":""),"_blank"),icon:(0,c.jsx)(eP.A,{strokeWidth:2,className:"h-4 w-4"})}):(0,c.jsx)(l_,{text:"Dashboard",variant:"outline",onClick:()=>window.open("https://app.dub.co","_blank"),icon:(0,c.jsx)(eM.A,{strokeWidth:2,className:"h-4 w-4"})})]})})})]})}function l_(e){let{className:t,...r}=e;return(0,c.jsx)(rt,{className:(0,a.v)("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",t),...r})}var lF=[{name:"Twitter",icon:n.T,href:"https://twitter.com/dubdotco"},{name:"LinkedIn",icon:n.M,href:"https://www.linkedin.com/company/dubinc"},{name:"GitHub",icon:n.I,href:"https://github.com/dubinc/dub"},{name:"YouTube",icon:n.X,href:"https://www.youtube.com/@dubdotco"}],lO={product:n6.filter(e=>{let{title:t}=e;return"Dub Integrations"!==t}).map(e=>{let{id:t,title:r,href:n}=e;return{id:t,name:r,href:n}}),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:"Enterprise",href:"/enterprise"},{name:"Startups",href:"/startups"},{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:[...["Rewardful","PartnerStack","FirstPromoter","Tolt"].map(e=>({name:e,href:"/blog/dub-vs-".concat(e.toLowerCase()),product:"partners"})),...le.map(e=>{let{name:t,slug:r}=e;return{name:t,href:"/compare/".concat(r),product:"links"}}
1)]},lB="text-sm font-medium text-neutral-900",lV="flex flex-col mt-2.5 gap-3.5",lU="flex items-center gap-2 text-sm text-neutral-500 hover:text-neutral-700 transition-colors duration-75";function lH(e){let{staticDomain:t,className:r}=e,{domain:l="dub.co"}=(0,R.useParams)();t&&(l=t);let[s,d]=(0,o.useState)(!1),[u,m]=(0,o.useState)(!1);return(0,c.jsx)(ln,{className:(0,a.v)("relative z-10 overflow-hidden border border-b-0 border-neutral-200 bg-white/50 py-16 backdrop-blur-lg md:rounded-t-2xl",r),children:(0,c.jsxs)("footer",{children:[(0,c.jsxs)("div",{className:"xl:grid xl:grid-cols-3 xl:gap-8",children:[(0,c.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,c.jsx)("div",{className:"grow",children:(0,c.jsxs)(h,{href:(0,a.c)("/",l,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:l,utm_content:"Logo"}),className:"block max-w-fit",children:[(0,c.jsx)("span",{className:"sr-only",children:"Dub Logo"}),(0,c.jsx)(lT,{className:"h-8 text-neutral-800"})]})}),(0,c.jsx)("div",{className:"flex items-center gap-3",children:lF.map(e=>{let{name:t,icon:r,href:n}=e;return(0,c.jsxs)("a",{href:n,target:"_blank",rel:"noreferrer",className:"group rounded-full p-1",children:[(0,c.jsx)("span",{className:"sr-only",children:t}),(0,c.jsx)(r,{className:"size-4 text-neutral-900 transition-colors duration-75 group-hover:text-neutral-600"})]},t)})})]}),(0,c.jsxs)("div",{className:"mt-16 grid grid-cols-2 gap-4 xl:col-span-2 xl:mt-0",children:[(0,c.jsxs)("div",{className:"md:grid md:grid-cols-2",children:[(0,c.jsxs)("div",{className:"grid gap-8",children:[(0,c.jsxs)("div",{children:[(0,c.jsx)("h3",{className:lB,children:"Product"}),(0,c.jsx)("ul",{role:"list",className:lV,children:lO.product.map(e=>(0,c.jsx)("li",{children:(0,c.jsxs)(h,{href:(0,a.c)(e.href,l,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:l,utm_content:e.name}),className:lU,children:[e.id&&(0,c.jsx)(n.i,{product:e.id}),e.name]})},e.name))})]}),(0,c.jsxs)("div",{children:[(0,c.jsx)("h3",{className:lB,children:"Solutions"}),(0,c.jsx)("ul",{role:"list",className:lV,children:lO.solutions.map(e=>(0,c.jsx)("li",{children:(0,c.jsx)(h,{href:(0,a.c)(e.href,l,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:l,utm_content:e.name}),className:lU,children:e.name})},e.name))})]})]}),(0,c.jsxs)("div",{className:"mt-10 md:mt-0",children:[(0,c.jsx)("h3",{className:lB,children:"Resources"}),(0,c.jsxs)("ul",{role:"list",className:lV,children:[lO.resources.map(e=>(0,c.jsx)("li",{children:(0,c.jsxs)(h,{href:(0,a.c)(e.href,l,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:l,utm_content:e.name}),target:e.target,className:(0,a.v)(lU,"gap-1"),children:[e.name,e.target&&(0,c.jsx)(n.Yd,{className:"size-3.5"})]})},e.name)),(0,c.jsx)("li",{className:"-mt-1",children:(0,c.jsx)(tj,{content:(0,c.jsx)("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:a.y.map(e=>(0,c.jsx)(h,{href:(0,a.c)("/tools/".concat(e.slug),l,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:l,utm_content:e.name}),className:(0,a.v)(nu({variant:"default"}),lU,"justify-start font-normal"),children:e.name},e.name))}),openPopover:s,setOpenPopover:d,children:(0,c.jsxs)("button",{className:lU,children:["Tools",(0,c.jsx)(i.A,{className:"size-3.5"})]})})})]})]})]}),(0,c.jsxs)("div",{className:"md:grid md:grid-cols-2",children:[(0,c.jsx)("div",{className:"grid gap-8",children:(0,c.jsxs)("div",{children:[(0,c.jsx)("h3",{className:lB,children:"Company"}),(0,c.jsxs)("ul",{role:"list",className:lV,children:[lO.company.map(e=>(0,c.jsx)("li",{children:(0,c.jsx)(h,{href:(0,a.c)(e.href,l,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:l,utm_content:e.name}),className:(0,a.v)(lU,"gap-1"),children:e.name})},e.name)),(0,c.jsx)("li",{className:"-mt-1",children:(0,c.jsx)(tj,{content:(0,c.jsx)("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:lt.map(e=>(0,c.jsx)(h,{href:(0,a.c)("/legal/".concat(e.slug),l,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:l,utm_content:e.name}),className:(0,a.v)(nu({variant:"default"}),lU,"justify-start font-normal"),children:e.name},e.name))}),openPopover:u,setOpenPopover:m,children:(0,c.jsxs)("button",{className:lU,children:["Legal",(0,c.jsx)(i.A,{className:"size-3.5"})]})})})]})]})}),(0,c.jsxs)("div",{className:"mt-10 md:mt-0",children:[(0,c.jsx)("h3",{className:lB,children:"Compare"}),(0,c.jsx)("ul",{role:"list",className:lV,children:lO.compare.map(e=>(0,c.jsx)("li",{children:(0,c.jsxs)(h,{href:(0,a.c)(e.href,l,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:l,utm_content:e.name}),className:lU,children:[(0,c.jsx)(n.i,{product:e.product}),e.name]})},e.name))})]})]})]})]}),(0,c.jsxs)("div",{className:"mt-12 grid grid-cols-1 items-center gap-8 sm:grid-cols-3",children:[(0,c.jsx)(rU,{}),(0,c.jsx)(h,{href:(0,a.c)("/blog/soc2",l,{utm_source:"Custom Domain",utm_medium:"Footer",utm_campaign:l,utm_content:"SOC2"}),className:"flex sm:justify-center",children:(0,c.jsx)(eC.default,{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"})}),(0,c.jsxs)("p",{className:"text-xs text-neutral-500 sm:text-right",children:["\xa9 ",new Date().getFullYear()," Dub Technologies, Inc."]})]})]})})}var lW=(0,o.memo)(e=>{let[t,r]=(0,o.useState)(!0),[n,l]=(0,o.useState)(e.src);return(0,o.useEffect)(()=>l(e.src),[e.src]),(0,c.jsx)(eC.default,{...e,src:n,alt:e.alt,className:(0,a.v)(t?"blur-[2px]":"blur-0",e.className),onLoad:t=>{r(!1);let n=t.target;
1n.naturalWidth<=16&&n.naturalHeight<=16&&l("https://avatar.vercel.sh/".concat(encodeURIComponent(e.alt)))},onError:()=>{l("https://avatar.vercel.sh/".concat(encodeURIComponent(e.alt)))},unoptimized:!0})}),lG=e=>{let{children:t,fallback:r,fadeInDuration:n=.5,className:l}=e,[a,s]=(0,o.useState)(!1);(0,o.useEffect)(()=>{s(!0)},[]);let i=n?_.P.div:"div";return(0,c.jsx)(ea.N,{children:a?(0,c.jsx)(i,{...n?{initial:{opacity:0},animate:{opacity:1},transition:{duration:n}}:{},className:l,children:t}):r||null})},lK=(0,d.F)("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 lq(e){let{variant:t="default",value:r,className:l,icon:s,successMessage:i}=e,[o,d]=e9(),u=s||n.b;return(0,c.jsxs)("button",{onClick:e=>{e.stopPropagation(),E.o.promise(d(r),{success:i||"Copied to clipboard!"})},className:(0,a.v)(lK({variant:t}),l),type:"button",children:[(0,c.jsx)("span",{className:"sr-only",children:"Copy"}),o?(0,c.jsx)(n.u,{className:"h-3.5 w-3.5"}):(0,c.jsx)(u,{className:"h-3.5 w-3.5"})]})}var lZ=(0,o.forwardRef)((e,t)=>{let{value:r,children:n,className:l,successMessage:s,onClick:i,...o}=e,[d,u]=e9();return(0,c.jsx)("button",{ref:t,type:"button",...o,onClick:e=>{null==i||i(e),e.stopPropagation(),E.o.promise(u(r),{success:s||"Copied to clipboard!"})},className:(0,a.v)("cursor-copy text-sm text-neutral-700 decoration-dotted underline-offset-2 hover:underline",d&&"cursor-default",l),children:n})});function lY(e){let{icon:t,text:r}=e;return(0,c.jsxs)("div",{className:"flex items-center justify-start space-x-2 truncate",children:[t,(0,c.jsx)("p",{className:"truncate text-sm",children:r})]})}lZ.displayName="CopyText";var lX=e=>{let{children:t}=e;return(0,c.jsx)("span",{className:"inline-block rounded-md bg-blue-100 px-1 py-0.5 font-mono text-blue-900",children:t})};function lJ(e){let{apexDomain:t,className:r,imageProps:l}=e;return t?(0,c.jsx)(lW,{src:"".concat(a.h).concat(t),alt:t,className:(0,a.v)("h-8 w-8 rounded-full sm:h-10 sm:w-10",r),width:20,height:20,draggable:!1,...l}):(0,c.jsx)("div",{className:(0,a.v)("flex h-8 w-8 items-center justify-center rounded-full bg-neutral-100 px-0 sm:h-10 sm:w-10",r),children:(0,c.jsx)(n.Jc,{className:"h-4 w-4 text-neutral-600 sm:h-5 sm:w-5"})})}function lQ(e){let{defaultUrl:t}=e,r=(0,R.useSearchParams)(),s=t||(null==r?void 0:r.get("url"))||"https://github.com/dubinc/dub",[i]=(0,ez.d7)((0,a.b)(s),500),d=(0,o.useMemo)(()=>(0,a.j)(i||""),[i]),{data:u,isValidating:m}=(0,D.Ay)(i&&"/api/links/metatags?url=".concat(encodeURIComponent(i)),a.t,{revalidateOnFocus:!1}),{title:h,description:p,image:x}=u||{},f=(0,o.useRef)(null);(0,o.useEffect)(()=>{!t&&f.current&&f.current.select()},[t]);let{isMobile:g}=(0,l.a)();return(0,c.jsxs)(c.Fragment,{children:[!t&&(0,c.jsxs)("div",{className:"relative flex items-center",children:[(0,c.jsx)(eE.A,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),(0,c.jsx)("input",{ref:f,name:"url",id:"url",type:"url",autoFocus:!g,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:s,"aria-invalid":"true"})]}),(0,c.jsxs)("div",{className:"relative w-full overflow-hidden rounded-lg border border-neutral-200 bg-neutral-50 shadow-sm",children:[m&&(0,c.jsx)("div",{className:"absolute inset-x-0 flex h-[250px] flex-col items-center justify-center space-y-4 border-b border-neutral-300 bg-neutral-50",children:(0,c.jsx)(n.z,{})}),x?(0,c.jsx)("img",{src:x,alt:"Preview",className:"h-[250px] w-full border-b border-neutral-300 object-cover"}):(0,c.jsxs)("div",{className:"flex h-[250px] w-full flex-col items-center justify-center space-y-4 border-b border-neutral-300",children:[(0,c.jsx)(n.r,{className:"h-8 w-8 text-neutral-400"}),(0,c.jsx)("p",{className:"text-sm text-neutral-400",children:"Enter a link to generate a preview."})]}),(0,c.jsxs)("div",{className:"grid gap-1 bg-white p-3 text-left",children:[d?(0,c.jsx)("p",{className:"text-sm text-[#536471]",children:d}):(0,c.jsx)("div",{className:"mb-1 h-4 w-24 rounded-md bg-neutral-100"}),h?(0,c.jsx)("h3",{className:"truncate text-sm font-medium text-[#0f1419]",children:h}):(0,c.jsx)("div",{className:"mb-1 h-4 w-full rounded-md bg-neutral-100"}),p?(0,c.jsx)("p",{className:"line-clamp-2 text-sm text-[#536471]",children:p}):(0,c.jsxs)("div",{className:"grid gap-2",children:[(0,c.jsx)("div",{className:"h-4 w-full rounded-md bg-neutral-100"}),(0,c.jsx)("div",{className:"h-4 w-48 rounded-md bg-neutral-100"})]})]})]})]})}function l$(e){let{defaultUrl:t}=e;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsxs)("div",{className:"relative flex items-center",children:[(0,c.jsx)(eE.A,{className:"absolute inset-y-0 left-0 my-2 ml-3 w-5 text-neutral-400"}),(0,c.jsx)("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:t||"https://github.com/dubinc/dub"})]}),(0,c.jsx)("div",{className:"relative overflow-hidden rounded-md border border-neutral-300 bg-neutral-50",children:(0,c.jsx)("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:(0,c.jsx)(n.z,{})})})]})}var l0={hidden:{scale:.8,opacity:0}
1,show:{scale:1,opacity:1,transition:{type:"spring"}}},l1={hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:{duration:.4,type:"spring"}}},l2={initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2,type:"easeInOut"}},l4=(0,o.createContext)({hidePopup:()=>{}});function l3(e){let{children:t,hiddenCookieId:r}=e,[n,l]=(0,o.useState)("1"===M.A.get(r));return(0,c.jsx)(lG,{children:(0,c.jsx)(l4.Provider,{value:{hidePopup:()=>{l(!0),M.A.set(r,"1")}},children:(0,c.jsx)(ea.N,{children:!n&&t})})})}function l5(e){let{value:t=0,max:r=100,className:n}=e;return(0,c.jsx)("div",{className:(0,a.v)("h-3 w-full overflow-hidden rounded-full bg-neutral-200",n),children:(0,c.jsx)(_.P.div,{initial:{width:0},animate:{width:t&&r?t/r*100+"%":"0%"},transition:{duration:.5,type:"spring",delay:.2},className:"".concat(t&&r&&t>r?"bg-red-500":"bg-blue-500"," h-full")})})}var l6=(0,d.F)("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"}}),l9=(0,d.F)("absolute bottom-0 w-full px-1.5",{variants:{variant:{default:"text-bg-inverted",accent:"text-blue-600"}},defaultVariants:{variant:"default"}});function l8(e){let{variant:t,options:r,selected:l,onSelect:s,className:i}=e,d=(0,o.useId)();return(0,c.jsx)("div",{className:(0,a.v)("flex text-sm",i),children:(0,c.jsx)(ek.o,{id:d,children:r.map(e=>{let{id:r,label:i,href:o,target:d}=e,u=r===l;return(0,c.jsxs)(o?h:"div",{className:"relative",href:null!=o?o:"#",target:null!=d?d:void 0,children:[(0,c.jsxs)("button",{type:"button",...s&&!o&&{onClick:()=>s(r)},className:(0,a.v)(l6({variant:t}),"_blank"===d&&"group flex items-center gap-1.5"),"data-selected":u,"aria-selected":u,children:[i,"_blank"===d&&(0,c.jsx)(n.Ea,{className:"size-2.5"})]}),u&&(0,c.jsx)(_.P.div,{layoutId:"indicator",transition:{duration:.1},className:l9({variant:t}),children:(0,c.jsx)("div",{className:"h-0.5 rounded-t-full bg-current"})})]},r)})})})}var l7=[{icon:n.df,text:"Custom link previews",href:"https://dub.co/help/article/custom-link-previews"},{icon:n.Zb,text:"Geo/device targeting",href:"https://dub.co/help/article/geo-targeting"},{icon:n.ad,text:"Password protection",href:"https://dub.co/help/article/password-protected-links"},{icon:n.He,text:"Link expiration",href:"https://dub.co/help/article/link-expiration"},{icon:n.Yc,text:"Link cloaking",href:"https://dub.co/help/article/link-cloaking"}];function ae(){return(0,c.jsxs)("div",{className:"p-3",children:[(0,c.jsx)("span",{className:"block text-sm font-semibold text-neutral-600",children:"Advanced link features"}),(0,c.jsx)("div",{className:"mt-2 flex flex-col gap-2.5 text-xs text-neutral-600",children:l7.map(e=>{let{text:t,icon:r,href:n}=e;return(0,c.jsxs)("a",{href:n,target:"_blank",className:"flex items-center gap-2.5 underline decoration-dotted underline-offset-2",children:[(0,c.jsx)(r,{className:"size-3.5 shrink-0"}),t]},t)})})]})}function at(e){let{className:t}=e;return(0,c.jsxs)("svg",{width:"177",height:"64",viewBox:"0 0 177 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:(0,a.v)("h-6 w-auto text-black dark:text-white",t),children:[(0,c.jsx)("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"}),(0,c.jsx)("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"})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.