@dub/ui 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/badge.mjs +1 -1
- package/dist/button.mjs +1 -1
- package/dist/chunk-25TQRROD.mjs +2 -0
- package/dist/chunk-26BDOBFZ.mjs +2 -0
- package/dist/chunk-26FZHNMW.mjs +2 -0
- package/dist/chunk-27M6RHR7.mjs +2 -0
- package/dist/chunk-2CU5OSFX.mjs +2 -0
- package/dist/chunk-2H5SOI5P.mjs +2 -0
- package/dist/chunk-2KPUEE3P.mjs +2 -0
- package/dist/chunk-2LKC4BZ6.mjs +2 -0
- package/dist/chunk-2MRBFMLK.mjs +2 -0
- package/dist/chunk-2PBP26HJ.mjs +2 -0
- package/dist/chunk-2PVAYDHX.mjs +2 -0
- package/dist/chunk-2QGWBJQD.mjs +2 -0
- package/dist/chunk-2QNAO2LP.mjs +2 -0
- package/dist/chunk-2RD5O6AV.mjs +2 -0
- package/dist/chunk-3C77NZHU.mjs +2 -0
- package/dist/chunk-3EGCNQWQ.mjs +2 -0
- package/dist/chunk-3MECCKW2.mjs +2 -0
- package/dist/chunk-3N4GHDZQ.mjs +2 -0
- package/dist/chunk-3OHYOZ4A.mjs +2 -0
- package/dist/chunk-3T6QBHUV.mjs +2 -0
- package/dist/chunk-3VGKQPEF.mjs +2 -0
- package/dist/chunk-3WEYP7KX.mjs +2 -0
- package/dist/chunk-3XCKCOAF.mjs +2 -0
- package/dist/chunk-42KDGK6G.mjs +2 -0
- package/dist/chunk-4B3XUNTJ.mjs +2 -0
- package/dist/chunk-4DLER7FD.mjs +2 -0
- package/dist/chunk-4EXVL56D.mjs +2 -0
- package/dist/chunk-4HN32ES3.mjs +2 -0
- package/dist/chunk-4KUQDRHP.mjs +2 -0
- package/dist/chunk-4LU3CD4L.mjs +8 -0
- package/dist/chunk-4NWVNNRS.mjs +2 -0
- package/dist/chunk-4O2NWM55.mjs +2 -0
- package/dist/chunk-4PTTXOLM.mjs +2 -0
- package/dist/chunk-52H6SM7X.mjs +2 -0
- package/dist/chunk-54PO2SMB.mjs +8 -0
- package/dist/chunk-57EU7GWH.mjs +3 -0
- package/dist/chunk-57N6WOTG.mjs +2 -0
- package/dist/chunk-5AKM6LBC.mjs +2 -0
- package/dist/chunk-5CPG64JY.mjs +2 -0
- package/dist/chunk-5DDUCIHB.mjs +2 -0
- package/dist/chunk-5FEHBMYD.mjs +2 -0
- package/dist/chunk-5JWJNTXR.mjs +2 -0
- package/dist/chunk-5M72MNOA.mjs +2 -0
- package/dist/chunk-5NZXTEJA.mjs +2 -0
- package/dist/chunk-65GCHDSN.mjs +2 -0
- package/dist/chunk-66B2ETES.mjs +2 -0
- package/dist/chunk-6CLTGKHK.mjs +2 -0
- package/dist/chunk-6DM6EG5A.mjs +2 -0
- package/dist/chunk-6MN7FNIX.mjs +3 -0
- package/dist/chunk-6NKXSV5X.mjs +2 -0
- package/dist/chunk-6OQCKFIJ.mjs +2 -0
- package/dist/chunk-6PIQQTS4.mjs +2 -0
- package/dist/chunk-6UYKLLOL.mjs +2 -0
- package/dist/chunk-6WGHJNAK.mjs +2 -0
- package/dist/chunk-73TLWVOE.mjs +2 -0
- package/dist/chunk-744YI2OX.mjs +2 -0
- package/dist/chunk-7EQ2TTCW.mjs +2 -0
- package/dist/chunk-7EQQD5QT.mjs +2 -0
- package/dist/chunk-7FWAKFFE.mjs +2 -0
- package/dist/chunk-7IMWCYXR.mjs +2 -0
- package/dist/chunk-7KRCXV6W.mjs +2 -0
- package/dist/chunk-7NUHSEGX.mjs +2 -0
- package/dist/chunk-7T2MLXYJ.mjs +2 -0
- package/dist/chunk-A2H6R365.mjs +2 -0
- package/dist/chunk-A4XPZHKV.mjs +2 -0
- package/dist/chunk-A72CMXYD.mjs +2 -0
- package/dist/chunk-ACD6OGNH.mjs +2 -0
- package/dist/chunk-AF7F5C6H.mjs +2 -0
- package/dist/chunk-ASVRS3KS.mjs +2 -0
- package/dist/chunk-AXYFH3PB.mjs +2 -0
- package/dist/chunk-B6PPJ7NI.mjs +2 -0
- package/dist/chunk-BGBPPLA3.mjs +2 -0
- package/dist/chunk-BJ5XTNWO.mjs +2 -0
- package/dist/chunk-BJGX2JNY.mjs +2 -0
- package/dist/chunk-BUSEDGRW.mjs +2 -0
- package/dist/chunk-BWQFLPOC.mjs +2 -0
- package/dist/chunk-BXDBM7ZH.mjs +2 -0
- package/dist/chunk-BXEN5FVJ.mjs +2 -0
- package/dist/chunk-C75BICDH.mjs +2 -0
- package/dist/chunk-CE72XU6G.mjs +2 -0
- package/dist/chunk-CFJ4HNNC.mjs +2 -0
- package/dist/chunk-CHPEPYGM.mjs +2 -0
- package/dist/chunk-CI3YMXQO.mjs +2 -0
- package/dist/chunk-CWADV2NH.mjs +2 -0
- package/dist/chunk-CX2LPJPA.mjs +2 -0
- package/dist/chunk-CXR25E7J.mjs +2 -0
- package/dist/chunk-D5WN7VHG.mjs +2 -0
- package/dist/chunk-D6ANDJSD.mjs +2 -0
- package/dist/chunk-DBJXOG34.mjs +2 -0
- package/dist/chunk-DBYQUPXG.mjs +2 -0
- package/dist/chunk-DGRSN4AA.mjs +2 -0
- package/dist/chunk-DHRSPSLC.mjs +2 -0
- package/dist/chunk-DII2UZPV.mjs +2 -0
- package/dist/chunk-DJSKENIA.mjs +2 -0
- package/dist/chunk-DSOWA2VR.mjs +2 -0
- package/dist/chunk-DTX2DPST.mjs +2 -0
- package/dist/chunk-E27BO5TC.mjs +2 -0
- package/dist/chunk-ECXETUYM.mjs +2 -0
- package/dist/chunk-EFQ7YQU7.mjs +2 -0
- package/dist/chunk-EGVPD7A6.mjs +2 -0
- package/dist/chunk-EGZXOYL7.mjs +2 -0
- package/dist/chunk-EI745FJJ.mjs +2 -0
- package/dist/chunk-ENCXAH5N.mjs +2 -0
- package/dist/chunk-ERDCMHO2.mjs +2 -0
- package/dist/chunk-F5XPMJKU.mjs +2 -0
- package/dist/chunk-FAF2MIFM.mjs +2 -0
- package/dist/chunk-FD4YAL3J.mjs +2 -0
- package/dist/chunk-FHEJYB6L.mjs +2 -0
- package/dist/chunk-FM2SCSHM.mjs +2 -0
- package/dist/chunk-FUCOVR6U.mjs +2 -0
- package/dist/chunk-FV32PDOT.mjs +2 -0
- package/dist/chunk-G2UECQFJ.mjs +2 -0
- package/dist/chunk-GTCWOFGN.mjs +2 -0
- package/dist/chunk-GZPWM3PM.mjs +2 -0
- package/dist/chunk-H2OLMA7G.mjs +2 -0
- package/dist/chunk-H5EP2RCU.mjs +2 -0
- package/dist/chunk-H5W3TGXZ.mjs +3 -0
- package/dist/chunk-H7JAKDNU.mjs +2 -0
- package/dist/chunk-H7TVHDB4.mjs +2 -0
- package/dist/chunk-HA34WMXW.mjs +2 -0
- package/dist/chunk-HBYPR5YP.mjs +2 -0
- package/dist/chunk-HDK66VPY.mjs +2 -0
- package/dist/chunk-HFSWTYQD.mjs +2 -0
- package/dist/chunk-HG6G4EUU.mjs +2 -0
- package/dist/chunk-HHCZZFTW.mjs +2 -0
- package/dist/chunk-HHTJRDJG.mjs +2 -0
- package/dist/chunk-HIM2TYFB.mjs +2 -0
- package/dist/chunk-HKSFRFZS.mjs +2 -0
- package/dist/chunk-HLHF7XA3.mjs +2 -0
- package/dist/chunk-HNP54YNR.mjs +2 -0
- package/dist/chunk-HTC4535O.mjs +3 -0
- package/dist/chunk-HYNSJQ3A.mjs +2 -0
- package/dist/chunk-I7Y63VXM.mjs +2 -0
- package/dist/chunk-IJPIE4TH.mjs +2 -0
- package/dist/chunk-IKLEO7JT.mjs +2 -0
- package/dist/chunk-IMJAI5DR.mjs +2 -0
- package/dist/chunk-IQM42VGC.mjs +2 -0
- package/dist/chunk-ISPL5RAC.mjs +2 -0
- package/dist/chunk-IXINNXNB.mjs +2 -0
- package/dist/chunk-IYAAFS2V.mjs +2 -0
- package/dist/chunk-J6UHWFPS.mjs +8 -0
- package/dist/chunk-JA7LHARI.mjs +2 -0
- package/dist/chunk-JADZU7BM.mjs +2 -0
- package/dist/chunk-JMGUY7KW.mjs +2 -0
- package/dist/chunk-JOUVCV2U.mjs +2 -0
- package/dist/chunk-JOVHSEN3.mjs +2 -0
- package/dist/chunk-JU4NGH7S.mjs +2 -0
- package/dist/chunk-JUU25PSW.mjs +2 -0
- package/dist/chunk-JWQRG3QM.mjs +2 -0
- package/dist/chunk-KCIESBTZ.mjs +2 -0
- package/dist/chunk-KFNXHCXJ.mjs +2 -0
- package/dist/chunk-KGJTRIXK.mjs +2 -0
- package/dist/chunk-KIFHIKLO.mjs +2 -0
- package/dist/chunk-KK4DGMKL.mjs +2 -0
- package/dist/chunk-KPHWN5DJ.mjs +2 -0
- package/dist/chunk-KWSQFEDS.mjs +2 -0
- package/dist/chunk-L37ZPPW3.mjs +2 -0
- package/dist/chunk-L3KQQ7Z2.mjs +2 -0
- package/dist/chunk-L4ZNPF4D.mjs +2 -0
- package/dist/chunk-LHJEUGPY.mjs +2 -0
- package/dist/chunk-LKUBJ7JH.mjs +2 -0
- package/dist/chunk-LMWQ3JAT.mjs +2 -0
- package/dist/chunk-LT4FBUXA.mjs +2 -0
- package/dist/chunk-MHN4NBNW.mjs +2 -0
- package/dist/chunk-MSDMME2Q.mjs +2 -0
- package/dist/chunk-MT6JJPUG.mjs +2 -0
- package/dist/chunk-MUQF4SPV.mjs +2 -0
- package/dist/chunk-NKSOS4EH.mjs +2 -0
- package/dist/chunk-NLJ676YQ.mjs +2 -0
- package/dist/chunk-NS5WZEFV.mjs +2 -0
- package/dist/chunk-NTDMCMGE.mjs +2 -0
- package/dist/chunk-NTFYMRV4.mjs +2 -0
- package/dist/chunk-NVEBANLA.mjs +2 -0
- package/dist/chunk-O26DKAEX.mjs +2 -0
- package/dist/chunk-O4M7P6Z2.mjs +2 -0
- package/dist/chunk-ODDJHZHG.mjs +2 -0
- package/dist/chunk-ODRZJYWI.mjs +2 -0
- package/dist/chunk-ONDWERKB.mjs +2 -0
- package/dist/chunk-OU4PAK5V.mjs +2 -0
- package/dist/chunk-P6LMZ6G3.mjs +2 -0
- package/dist/chunk-PETXA7X5.mjs +2 -0
- package/dist/chunk-PFAHPFZD.mjs +2 -0
- package/dist/chunk-PIAZFOEX.mjs +2 -0
- package/dist/chunk-PL4TVADS.mjs +2 -0
- package/dist/chunk-PMWDM5PP.mjs +2 -0
- package/dist/chunk-PR36L2MZ.mjs +2 -0
- package/dist/chunk-PRK222JP.mjs +2 -0
- package/dist/chunk-PTYW5NS5.mjs +2 -0
- package/dist/chunk-PWDIGDVI.mjs +2 -0
- package/dist/chunk-PXJA6J4M.mjs +2 -0
- package/dist/chunk-Q5U45FCX.mjs +2 -0
- package/dist/chunk-Q7ILRRJZ.mjs +2 -0
- package/dist/chunk-QCG4QEAP.mjs +2 -0
- package/dist/chunk-QKKX2O6M.mjs +2 -0
- package/dist/chunk-QQ2ZUUN5.mjs +2 -0
- package/dist/chunk-QV2NLAT4.mjs +2 -0
- package/dist/chunk-QVFQZXCR.mjs +2 -0
- package/dist/chunk-QVOWLTPX.mjs +2 -0
- package/dist/chunk-QYVU424G.mjs +2 -0
- package/dist/chunk-RG3NNES2.mjs +2 -0
- package/dist/chunk-RGOFAGB3.mjs +2 -0
- package/dist/chunk-RHFRIU54.mjs +2 -0
- package/dist/chunk-RIMQMOFM.mjs +2 -0
- package/dist/chunk-RPEV6RXI.mjs +2 -0
- package/dist/chunk-RQFG27NI.mjs +2 -0
- package/dist/chunk-RUQNC245.mjs +2 -0
- package/dist/chunk-RV7HE7F5.mjs +2 -0
- package/dist/chunk-RW2X5DRH.mjs +2 -0
- package/dist/chunk-S3P6FTC7.mjs +2 -0
- package/dist/chunk-SAEH3S5U.mjs +2 -0
- package/dist/chunk-SNROIEQM.mjs +2 -0
- package/dist/chunk-SSGA2FCO.mjs +8 -0
- package/dist/chunk-SWAHO372.mjs +2 -0
- package/dist/chunk-SXUXAWVF.mjs +2 -0
- package/dist/chunk-SZDFK27V.mjs +2 -0
- package/dist/chunk-SZI43Y3O.mjs +2 -0
- package/dist/chunk-T7DHTMKW.mjs +2 -0
- package/dist/chunk-TUFVUSWO.mjs +2 -0
- package/dist/chunk-UG3UM7BR.mjs +2 -0
- package/dist/chunk-UJNI5UNH.mjs +2 -0
- package/dist/chunk-UK2O3P6I.mjs +2 -0
- package/dist/chunk-ULW6P5YD.mjs +2 -0
- package/dist/chunk-UMV4ZJDU.mjs +2 -0
- package/dist/chunk-UR27HWWU.mjs +2 -0
- package/dist/chunk-UXCPVLZA.mjs +2 -0
- package/dist/chunk-UYPLEMIH.mjs +2 -0
- package/dist/chunk-VDXG6S7G.mjs +2 -0
- package/dist/chunk-VKMSACXH.mjs +2 -0
- package/dist/chunk-VM3ZCZMT.mjs +2 -0
- package/dist/chunk-W5YDWGPP.mjs +2 -0
- package/dist/chunk-WCAGNYYV.mjs +2 -0
- package/dist/chunk-WDXJ5U7S.mjs +2 -0
- package/dist/chunk-WDZVVUGD.mjs +2 -0
- package/dist/chunk-WENFY2WU.mjs +2 -0
- package/dist/chunk-WGSOTPH7.mjs +2 -0
- package/dist/chunk-WZVWNTKQ.mjs +2 -0
- package/dist/chunk-X4MBMKUI.mjs +2 -0
- package/dist/chunk-X5HO4CIT.mjs +2 -0
- package/dist/chunk-XJWJZGIN.mjs +2 -0
- package/dist/chunk-XKENCWTV.mjs +2 -0
- package/dist/chunk-XMPX6V4D.mjs +2 -0
- package/dist/chunk-XMVVDXQZ.mjs +2 -0
- package/dist/chunk-XSBNYYQG.mjs +2 -0
- package/dist/chunk-XZ3C3LOH.mjs +2 -0
- package/dist/chunk-Y4MIFYJ6.mjs +2 -0
- package/dist/chunk-Y7YZO7HP.mjs +2 -0
- package/dist/chunk-YA6XOX2G.mjs +2 -0
- package/dist/chunk-YBJ3RXXH.mjs +2 -0
- package/dist/chunk-YBXO3OEX.mjs +2 -0
- package/dist/chunk-YN64OD34.mjs +2 -0
- package/dist/chunk-YNHLYGAQ.mjs +2 -0
- package/dist/chunk-YNOI7GUG.mjs +2 -0
- package/dist/chunk-YWO22LVG.mjs +2 -0
- package/dist/chunk-Z53LLI44.mjs +2 -0
- package/dist/chunk-ZASLOIES.mjs +2 -0
- package/dist/chunk-ZBWZVMWM.mjs +2 -0
- package/dist/chunk-ZCGA7N3G.mjs +2 -0
- package/dist/chunk-ZKMWTPHM.mjs +2 -0
- package/dist/chunk-ZO7STMYX.mjs +2 -0
- package/dist/chunk-ZS3VRBLX.mjs +2 -0
- package/dist/chunk-ZXG5KVZL.mjs +2 -0
- package/dist/chunk-ZYZKWFIQ.mjs +2 -0
- package/dist/form.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.mjs +1 -1
- package/dist/modal.mjs +1 -1
- package/dist/nav-mobile.mjs +1 -1
- package/dist/nav.mjs +1 -1
- package/dist/popover.mjs +1 -1
- package/dist/switch.mjs +1 -1
- package/dist/tab-select.mjs +1 -1
- package/dist/tooltip.d.ts +3 -2
- package/dist/tooltip.mjs +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as p}from"./chunk-26FZHNMW.mjs";import{f as m,g as d}from"./chunk-6UYKLLOL.mjs";import*as a from"@radix-ui/react-tooltip";import{HelpCircle as g}from"lucide-react";import f from"next/link";import{Drawer as n}from"vaul";import{jsx as t,jsxs as o}from"react/jsx-runtime";function c({children:r,content:e,side:i="top",fullWidth:l}){let{isMobile:s}=p();return s?o(n.Root,{children:[t(n.Trigger,{className:`${l?"w-full":"inline-flex"} md:hidden`,onClick:x=>{x.stopPropagation()},children:r}),t(n.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),o(n.Portal,{children:[o(n.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),t("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white align-middle shadow-xl",children:typeof e=="string"?t("span",{className:"block text-center text-sm text-gray-700",children:e}):e})]}),t(n.Overlay,{})]})]}):t(a.Provider,{delayDuration:100,children:o(a.Root,{children:[t(a.Trigger,{className:"md:inline-flex",asChild:!0,children:r}),t(a.Content,{sideOffset:8,side:i,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-md border border-gray-200 bg-white shadow-md md:block",children:typeof e=="string"?t("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:e}):e})]})})}function w({title:r,cta:e,href:i,target:l,onClick:s}){return o("div",{className:"flex flex-col items-center space-y-3 p-4 text-center md:max-w-xs",children:[t("p",{className:"text-sm text-gray-700",children:r}),e&&(i?t(f,{href:i,...l?{target:l}:{},className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",children:e}):s?t("button",{type:"button",className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",onClick:s,children:e}):null)]})}function N({title:r,cta:e,href:i}){return o("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[r," ",t("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:e})]})}function T({content:r}){return t(c,{content:r,children:t(g,{className:"h-4 w-4 text-gray-500"})})}function k({value:r,unit:e="total clicks",children:i,lastClicked:l}){return(!r||r<1e3)&&!l?i:t(c,{content:o("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[o("p",{className:"text-sm font-semibold text-gray-700",children:[m(r||0,{full:!0})," ",e]}),l&&o("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",d(l,{withAgo:!0})]})]}),children:i})}export{c as a,w as b,N as c,T as d,k as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{useEffect as y,useState as I}from"react";function b(){let[e,n]=I(null);return y(()=>{let t=document.querySelector("[data-mdx-container]");if(!t)return;let r=t.offsetTop-1,c=new IntersectionObserver(a=>{var l,d,h;let i=a[0];if(!i)return;let u=(((l=i.rootBounds)==null?void 0:l.height)||0)*.3+r;for(let m=1;m<a.length;m++){let p=a[m];if(!p)break;(p.boundingClientRect.top<i.boundingClientRect.top||i.boundingClientRect.bottom<r)&&(i=p)}let s=i.target;for(;s&&s.getBoundingClientRect().bottom<r;)s=(d=o.get(s))==null?void 0:d.next;for(;s&&s.getBoundingClientRect().top>u;)s=(h=o.get(s))==null?void 0:h.prev;s&&n(s.getAttribute("href"))},{threshold:1,rootMargin:`-${r}px 0px 0px 0px`}),o=new Map;return(t==null?void 0:t.querySelectorAll("[data-mdx-heading]")).forEach(a=>c.observe(a)),()=>{c.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useEffect as P,useState as T}from"react";function g(e,{threshold:n=0,root:t=null,rootMargin:r="0%",freezeOnceVisible:c=!1}){let[o,f]=T(),a=(o==null?void 0:o.isIntersecting)&&c,i=([u])=>{f(u)};return P(()=>{let u=e==null?void 0:e.current;if(!!!window.IntersectionObserver||a||!u)return;let l={threshold:n,root:t,rootMargin:r},d=new IntersectionObserver(i,l);return d.observe(u),()=>d.disconnect()},[e,JSON.stringify(n),t,r,a]),o}import{useEffect as A,useState as C}from"react";function w(e,n){let[t,r]=C(n);return A(()=>{let o=window.localStorage.getItem(e);o&&r(JSON.parse(o))},[e]),[t,o=>{r(o),window.localStorage.setItem(e,JSON.stringify(o))}]}import{useEffect as L,useState as S}from"react";function v(){let[e,n]=S(null),[t,r]=S(null);return L(()=>{let c=()=>{window.matchMedia("(max-width: 640px)").matches?n("mobile"):window.matchMedia("(min-width: 641px) and (max-width: 1024px)").matches?n("tablet"):n("desktop"),r({width:window.innerWidth,height:window.innerHeight})};return c(),window.addEventListener("resize",c),()=>{window.removeEventListener("resize",c)}},[]),{device:e,width:t==null?void 0:t.width,height:t==null?void 0:t.height,isMobile:e==="mobile",isTablet:e==="tablet",isDesktop:e==="desktop"}}import{usePathname as M,useRouter as R,useSearchParams as j}from"next/navigation";function x(){let e=M(),n=R(),t=j(),r=Object.fromEntries(t);return{pathname:e,router:n,searchParams:t,searchParamsObj:r,editQueryParam:({set:o,del:f,replace:a})=>{let i=new URLSearchParams(t);o&&Object.entries(o).forEach(([l,d])=>i.set(l,d)),f&&(Array.isArray(f)?f.forEach(l=>i.delete(l)):i.delete(f));let u=i.toString(),s=`${e}${u.length>0?`?${u}`:""}`;a?n.replace(s):n.push(s)}}}import{useCallback as k,useEffect as E,useState as V}from"react";function O(e){let[n,t]=V(!1),r=k(()=>{t(window.scrollY>e)},[e]);return E(()=>(window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)),[r]),E(()=>{r()},[r]),n}export{b as a,g as b,w as c,v as d,x as e,O as f};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as d}from"./chunk-XJWJZGIN.mjs";import{a as l}from"./chunk-SZIOUGU7.mjs";import{d as a}from"./chunk-I747HOW7.mjs";import{jsx as t,jsxs as b}from"react/jsx-runtime";function g({text:n,variant:r="primary",loading:o,icon:i,disabledTooltip:s,...e}){return s?t(d,{content:s,fullWidth:!0,children:t("div",{className:"flex h-10 w-full cursor-not-allowed items-center justify-center rounded-md border border-gray-200 bg-gray-100 px-4 text-sm text-gray-400 transition-all focus:outline-none",children:t("p",{children:n})})}):b("button",{type:e.onClick?"button":"submit",className:a("flex h-10 w-full items-center justify-center space-x-2 rounded-md border px-4 text-sm transition-all focus:outline-none",e.disabled||o?"cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400":{"border-black bg-black text-white hover:bg-white hover:text-black":r==="primary","border-gray-200 bg-white text-gray-500 hover:border-black hover:text-black":r==="secondary","border-blue-500 bg-blue-500 text-white hover:bg-white hover:text-blue-500":r==="success","border-red-500 bg-red-500 text-white hover:bg-white hover:text-red-500":r==="danger"},e.className),disabled:e.disabled||o,...e,children:[o?t(l,{}):i||null,t("p",{children:n})]})}export{g as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as t}from"./chunk-L4ZNPF4D.mjs";import{cva as o}from"class-variance-authority";import{jsx as n}from"react/jsx-runtime";var i=o("max-w-fit rounded-full border px-2 py-px text-xs font-medium capitalize",{variants:{variant:{default:"border-gray-400 text-gray-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",black:"border-black bg-black text-white",gray:"border-gray-200 bg-gray-200 text-gray-800",neutral:"border-gray-400 text-gray-500"}},defaultVariants:{variant:"neutral"}});function l({className:e,variant:a,...r}){return n("span",{className:t(i({variant:a}),e),...r})}export{i as a,l as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as u}from"./chunk-4NWVNNRS.mjs";import{a as p}from"./chunk-CS6Q63Y7.mjs";import{a as t,d as n,e as d}from"./chunk-I747HOW7.mjs";import{ChevronDown as N,Menu as v,X as w}from"lucide-react";import o from"next/link";import{useParams as x}from"next/navigation";import{useEffect as k,useState as b}from"react";import L from"swr";import{Fragment as h,jsx as e,jsxs as s}from"react/jsx-runtime";function E(){let{domain:r="dub.co"}=x(),[a,c]=b(!1),[m,y]=b(!1);k(()=>{a?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[a]);let{data:f,isLoading:z}=L(r==="dub.co"&&"/api/auth/session",d,{dedupingInterval:6e4});return s(h,{children:[e("button",{onClick:()=>c(!a),className:n("fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 lg:hidden",a&&"hover:bg-gray-100 active:bg-gray-200"),children:a?e(w,{className:"h-5 w-5 text-gray-600"}):e(v,{className:"h-5 w-5 text-gray-600"})}),e("nav",{className:n("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden",a&&"block"),children:s("ul",{className:"grid divide-y divide-gray-200",children:[s("li",{className:"py-3",children:[s("button",{className:"flex w-full justify-between",onClick:()=>y(!m),children:[e("p",{className:"font-semibold",children:"Features"}),e(N,{className:n("h-5 w-5 text-gray-500 transition-all",m&&"rotate-180")})]}),m&&e("div",{className:"grid gap-4 overflow-hidden py-4",children:p.map(({slug:l,icon:i,shortTitle:g})=>s(o,{href:r==="dub.co"?`/${l}`:`https://dub.co/${l}`,onClick:()=>c(!1),className:"flex w-full space-x-2",children:[e(i,{className:"h-5 w-5 text-gray-500"}),e("span",{className:"text-sm",children:g})]},l))})]}),u.map(({name:l,slug:i})=>e("li",{className:"py-3",children:e(o,{href:r==="dub.co"?`/${i}`:`https://dub.co/${i}`,onClick:()=>c(!1),className:"flex w-full font-semibold capitalize",children:l})},i)),f&&Object.keys(f).length>0?e("li",{className:"py-3",children:e(o,{href:t,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):s(h,{children:[e("li",{className:"py-3",children:e(o,{href:`${t}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),e("li",{className:"py-3",children:e(o,{href:`${t}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}export{E as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as De,b as Pe}from"./chunk-AUBFB4SI.mjs";var ce=De((Ir,le)=>{var O=1e3,T=O*60,L=T*60,M=L*24,Fe=M*7,Ke=M*365.25;le.exports=function(e,r){r=r||{};var t=typeof e;if(t==="string"&&e.length>0)return Ye(e);if(t==="number"&&isFinite(e))return r.long?We(e):Ze(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Ye(e){if(e=String(e),!(e.length>100)){var r=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!!r){var t=parseFloat(r[1]),o=(r[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return t*Ke;case"weeks":case"week":case"w":return t*Fe;case"days":case"day":case"d":return t*M;case"hours":case"hour":case"hrs":case"hr":case"h":return t*L;case"minutes":case"minute":case"mins":case"min":case"m":return t*T;case"seconds":case"second":case"secs":case"sec":case"s":return t*O;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Ze(e){var r=Math.abs(e);return r>=M?Math.round(e/M)+"d":r>=L?Math.round(e/L)+"h":r>=T?Math.round(e/T)+"m":r>=O?Math.round(e/O)+"s":e+"ms"}function We(e){var r=Math.abs(e);return r>=M?B(e,r,M,"day"):r>=L?B(e,r,L,"hour"):r>=T?B(e,r,T,"minute"):r>=O?B(e,r,O,"second"):e+" ms"}function B(e,r,t,o){var a=r>=t*1.5;return Math.round(e/t)+" "+o+(a?"s":"")}});var _e=process.env.NEXT_PUBLIC_VERCEL_ENV==="production"?"https://app.dub.co":process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"?"https://preview.dub.co":"http://localhost:8888",Ge=process.env.NEXT_PUBLIC_VERCEL_ENV==="production"?"https://app.dub.co":process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"?"https://preview.dub.co":process.env.NGROK_URL;var $e=process.env.NEXT_PUBLIC_VERCEL_ENV==="production"?"https://api.dub.co":process.env.NEXT_PUBLIC_VERCEL_ENV==="preview"?"https://api.dub.sh":"http://api.localhost:8888";var Be=["tools","pricing","help","features","customers","blog","(blog-post)","login","register","auth"],je=[{name:"Metatags API",slug:"metatags"},{name:"Link Inspector",slug:"inspector"}];function se(e){var r,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(r=0;r<e.length;r++)e[r]&&(t=se(e[r]))&&(o&&(o+=" "),o+=t);else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function ie(){for(var e,r,t=0,o="";t<arguments.length;)(e=arguments[t++])&&(r=se(e))&&(o&&(o+=" "),o+=r);return o}var Ue=Pe(ce(),1);import ue from"crypto";var He=128,k,R;function Je(e){!k||k.length<e?(k=Buffer.allocUnsafe(e*He),ue.getRandomValues(k),R=0):R+e>k.length&&(ue.getRandomValues(k),R=0),R+=e}function Xe(e){return Je(e-=0),k.subarray(R-e,R)}function qe(e,r,t){let o=(2<<31-Math.clz32(e.length-1|1))-1,a=Math.ceil(1.6*o*r/e.length);return(i=r)=>{let n="";for(;;){let s=t(a),l=a;for(;l--;)if(n+=e[s[l]&o]||"",n.length===i)return n}}}function de(e,r=21){return qe(e,r,Xe)}function pe(){for(var e=0,r,t,o="";e<arguments.length;)(r=arguments[e++])&&(t=fe(r))&&(o&&(o+=" "),o+=t);return o}function fe(e){if(typeof e=="string")return e;for(var r,t="",o=0;o<e.length;o++)e[o]&&(r=fe(e[o]))&&(t&&(t+=" "),t+=r);return t}var W="-";function he(e){var r=er(e),t=e.conflictingClassGroups,o=e.conflictingClassGroupModifiers,a=o===void 0?{}:o;function i(s){var l=s.split(W);return l[0]===""&&l.length!==1&&l.shift(),be(l,r)||Qe(s)}function n(s,l){var u=t[s]||[];return l&&a[s]?[].concat(u,a[s]):u}return{getClassGroupId:i,getConflictingClassGroupIds:n}}function be(e,r){var n;if(e.length===0)return r.classGroupId;var t=e[0],o=r.nextPart.get(t),a=o?be(e.slice(1),o):void 0;if(a)return a;if(r.validators.length!==0){var i=e.join(W);return(n=r.validators.find(function(s){var l=s.validator;return l(i)}))==null?void 0:n.classGroupId}}var me=/^\[(.+)\]$/;function Qe(e){if(me.test(e)){var r=me.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}}function er(e){var r=e.theme,t=e.prefix,o={nextPart:new Map,validators:[]},a=tr(Object.entries(e.classGroups),t);return a.forEach(function(i){var n=i[0],s=i[1];Z(s,o,n,r)}),o}function Z(e,r,t,o){e.forEach(function(a){if(typeof a=="string"){var i=a===""?r:ge(r,a);i.classGroupId=t;return}if(typeof a=="function"){if(rr(a)){Z(a(o),r,t,o);return}r.validators.push({validator:a,classGroupId:t});return}Object.entries(a).forEach(function(n){var s=n[0],l=n[1];Z(l,ge(r,s),t,o)})})}function ge(e,r){var t=e;return r.split(W).forEach(function(o){t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t}function rr(e){return e.isThemeGetter}function tr(e,r){return r?e.map(function(t){var o=t[0],a=t[1],i=a.map(function(n){return typeof n=="string"?r+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(function(s){var l=s[0],u=s[1];return[r+l,u]})):n});return[o,i]}):e}function ve(e){if(e<1)return{get:function(){},set:function(){}};var r=0,t=new Map,o=new Map;function a(i,n){t.set(i,n),r++,r>e&&(r=0,o=t,t=new Map)}return{get:function(n){var s=t.get(n);if(s!==void 0)return s;if((s=o.get(n))!==void 0)return a(n,s),s},set:function(n,s){t.has(n)?t.set(n,s):a(n,s)}}}var H="!";function ye(e){var r=e.separator||":",t=r.length===1,o=r[0],a=r.length;return function(n){for(var s=[],l=0,u=0,f,d=0;d<n.length;d++){var m=n[d];if(l===0){if(m===o&&(t||n.slice(d,d+a)===r)){s.push(n.slice(u,d)),u=d+a;continue}if(m==="/"){f=d;continue}}m==="["?l++:m==="]"&&l--}var h=s.length===0?n:n.substring(u),y=h.startsWith(H),g=y?h.substring(1):h,w=f&&f>u?f-u:void 0;return{modifiers:s,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:w}}}function we(e){if(e.length<=1)return e;var r=[],t=[];return e.forEach(function(o){var a=o[0]==="[";a?(r.push.apply(r,t.sort().concat([o])),t=[]):t.push(o)}),r.push.apply(r,t.sort()),r}function xe(e){return{cache:ve(e.cacheSize),splitModifiers:ye(e),...he(e)}}var or=/\s+/;function Ae(e,r){var t=r.splitModifiers,o=r.getClassGroupId,a=r.getConflictingClassGroupIds,i=new Set;return e.trim().split(or).map(function(n){var s=t(n),l=s.modifiers,u=s.hasImportantModifier,f=s.baseClassName,d=s.maybePostfixModifierPosition,m=o(d?f.substring(0,d):f),h=Boolean(d);if(!m){if(!d)return{isTailwindClass:!1,originalClassName:n};if(m=o(f),!m)return{isTailwindClass:!1,originalClassName:n};h=!1}var y=we(l).join(":"),g=u?y+H:y;return{isTailwindClass:!0,modifierId:g,classGroupId:m,originalClassName:n,hasPostfixModifier:h}}).reverse().filter(function(n){if(!n.isTailwindClass)return!0;var s=n.modifierId,l=n.classGroupId,u=n.hasPostfixModifier,f=s+l;return i.has(f)?!1:(i.add(f),a(l,u).forEach(function(d){return i.add(s+d)}),!0)}).reverse().map(function(n){return n.originalClassName}).join(" ")}function Se(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var o,a,i,n=s;function s(u){var f=r[0],d=r.slice(1),m=d.reduce(function(h,y){return y(h)},f());return o=xe(m),a=o.cache.get,i=o.cache.set,n=l,l(u)}function l(u){var f=a(u);if(f)return f;var d=Ae(u,o);return i(u,d),d}return function(){return n(pe.apply(null,arguments))}}function c(e){var r=function(o){return o[e]||[]};return r.isThemeGetter=!0,r}var Ce=/^\[(?:([a-z-]+):)?(.+)\]$/i,ar=/^\d+\/\d+$/,nr=new Set(["px","full","screen"]),sr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ir=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|^0$/,lr=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function v(e){return C(e)||nr.has(e)||ar.test(e)||A(e)}function A(e){return I(e,"length",cr)}function Me(e){return I(e,"size",Le)}function ke(e){return I(e,"position",Le)}function Ie(e){return I(e,"url",ur)}function P(e){return I(e,"number",C)}function C(e){return!Number.isNaN(Number(e))}function Oe(e){return e.endsWith("%")&&C(e.slice(0,-1))}function z(e){return Ee(e)||I(e,"number",Ee)}function p(e){return Ce.test(e)}function U(){return!0}function S(e){return sr.test(e)}function Te(e){return I(e,"",dr)}function I(e,r,t){var o=Ce.exec(e);return o?o[1]?o[1]===r:t(o[2]):!1}function cr(e){return ir.test(e)}function Le(){return!1}function ur(e){return e.startsWith("url(")}function Ee(e){return Number.isInteger(Number(e))}function dr(e){return lr.test(e)}function Re(){var e=c("colors"),r=c("spacing"),t=c("blur"),o=c("brightness"),a=c("borderColor"),i=c("borderRadius"),n=c("borderSpacing"),s=c("borderWidth"),l=c("contrast"),u=c("grayscale"),f=c("hueRotate"),d=c("invert"),m=c("gap"),h=c("gradientColorStops"),y=c("gradientColorStopPositions"),g=c("inset"),w=c("margin"),E=c("opacity"),x=c("padding"),X=c("saturate"),j=c("scale"),q=c("sepia"),Q=c("skew"),ee=c("space"),re=c("translate"),V=function(){return["auto","contain","none"]},F=function(){return["auto","hidden","clip","visible","scroll"]},K=function(){return["auto",r]},te=function(){return["",v]},_=function(){return["auto",C,p]},oe=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},G=function(){return["solid","dashed","dotted","double","none"]},ae=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},Y=function(){return["start","end","center","between","around","evenly","stretch"]},N=function(){return["","0",p]},ne=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},D=function(){return[C,P]},$=function(){return[C,p]};return{cacheSize:500,theme:{colors:[U],spacing:[v],blur:["none","",S,A],brightness:D(),borderColor:[e],borderRadius:["none","","full",S,A],borderSpacing:[r],borderWidth:te(),contrast:D(),grayscale:N(),hueRotate:$(),invert:N(),gap:[r],gradientColorStops:[e],gradientColorStopPositions:[Oe,A],inset:K(),margin:K(),opacity:D(),padding:[r],saturate:D(),scale:D(),sepia:N(),skew:$(),space:[r],translate:[r]},classGroups:{aspect:[{aspect:["auto","square","video",p]}],container:["container"],columns:[{columns:[S]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(oe(),[p])}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",z]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",p]}],grow:[{grow:N()}],shrink:[{shrink:N()}],order:[{order:["first","last","none",z]}],"grid-cols":[{"grid-cols":[U]}],"col-start-end":[{col:["auto",{span:[z]},p]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[U]}],"row-start-end":[{row:["auto",{span:[z]},p]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",p]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",p]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal"].concat(Y())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(Y(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(Y(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ee]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",r]}],"min-w":[{"min-w":["min","max","fit",v]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[S]},S,A]}],h:[{h:[r,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",v]}],"max-h":[{"max-h":[r,"min","max","fit"]}],"font-size":[{text:["base",S,A]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",P]}],"font-family":[{font:[U]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",A]}],"line-clamp":[{"line-clamp":["none",C,P]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",v]}],"list-image":[{"list-image":["none",p]}],"list-style-type":[{list:["none","disc","decimal",p]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(G(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",v]}],"underline-offset":[{"underline-offset":["auto",v]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:[r]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",A]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",p]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(oe(),[ke])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Me]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ie]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[].concat(G(),["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:G()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:[""].concat(G())}],"outline-offset":[{"outline-offset":[v]}],"outline-w":[{outline:[v]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[v]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",S,Te]}],"shadow-color":[{shadow:[U]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":ae()}],"bg-blend":[{"bg-blend":ae()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",S,p]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[X]}],sepia:[{sepia:[q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[X]}],"backdrop-sepia":[{"backdrop-sepia":[q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",p]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",p]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",p]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[z,p]}],"translate-x":[{"translate-x":[re]}],"translate-y":[{"translate-y":[re]}],"skew-x":[{"skew-x":[Q]}],"skew-y":[{"skew-y":[Q]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",p]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",p]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":[r]}],"scroll-mx":[{"scroll-mx":[r]}],"scroll-my":[{"scroll-my":[r]}],"scroll-ms":[{"scroll-ms":[r]}],"scroll-me":[{"scroll-me":[r]}],"scroll-mt":[{"scroll-mt":[r]}],"scroll-mr":[{"scroll-mr":[r]}],"scroll-mb":[{"scroll-mb":[r]}],"scroll-ml":[{"scroll-ml":[r]}],"scroll-p":[{"scroll-p":[r]}],"scroll-px":[{"scroll-px":[r]}],"scroll-py":[{"scroll-py":[r]}],"scroll-ps":[{"scroll-ps":[r]}],"scroll-pe":[{"scroll-pe":[r]}],"scroll-pt":[{"scroll-pt":[r]}],"scroll-pr":[{"scroll-pr":[r]}],"scroll-pb":[{"scroll-pb":[r]}],"scroll-pl":[{"scroll-pl":[r]}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",p]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[v,P]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var J=Se(Re);import{useEffect as Tt,useState as Lt}from"react";import{useEffect as zt,useState as Ut}from"react";import{useEffect as Dt,useState as Pt}from"react";import{useEffect as pr,useState as ze}from"react";import{useCallback as Bt,useEffect as jt,useState as Vt}from"react";function Gt(){let[e,r]=ze(null),[t,o]=ze(null);return pr(()=>{let a=()=>{window.matchMedia("(max-width: 640px)").matches?r("mobile"):window.matchMedia("(min-width: 641px) and (max-width: 1024px)").matches?r("tablet"):r("desktop"),o({width:window.innerWidth,height:window.innerHeight})};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[]),{device:e,width:t==null?void 0:t.width,height:t==null?void 0:t.height,isMobile:e==="mobile",isTablet:e==="tablet",isDesktop:e==="desktop"}}function Ft(...e){return J(ie(e))}var Kt=de("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",7);async function Yt(e,r){let t=await fetch(e,r);if(!t.ok){let o=await t.text(),a=new Error(o);throw a.status=t.status,a}return t.json()}function Zt(e,r={digits:1}){if(!e)return"0";if(r.full)return Intl.NumberFormat("en-US").format(e);let t=[{value:1,symbol:""},{value:1e3,symbol:"K"},{value:1e6,symbol:"M"},{value:1e9,symbol:"G"},{value:1e12,symbol:"T"},{value:1e15,symbol:"P"},{value:1e18,symbol:"E"}],o=/\.0+$|(\.[0-9]*[1-9])0+$/;var a=t.slice().reverse().find(function(i){return e>=i.value});return a?(e/a.value).toFixed(r.digits).replace(o,"$1")+a.symbol:"0"}var Wt=(e,{withAgo:r}={})=>{if(!e)return"Never";let t=Date.now()-new Date(e).getTime();return t<1e3?"Just now":t>828e5?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:new Date(e).getFullYear()!==new Date().getFullYear()?"numeric":void 0}):`${(0,Ue.default)(t)}${r?" ago":""}`};var Ht=new RegExp(/^([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/),Jt=new RegExp(/^[0-9A-Za-z\u0080-\uFFFF\/\-]*$/u),Xt=new RegExp(/^[a-zA-Z0-9\-]+$/);var Ne=e=>{try{return new URL(e),!0}catch{return!1}},qt=e=>{if(Ne(e))return e;try{if(e.includes(".")&&!e.includes(" "))return new URL(`https://${e}`).toString()}catch{return null}},Qt=e=>{if(Ne(e))return new URL(e).hostname.replace(/^www\./,"");try{if(e.includes(".")&&!e.includes(" "))return new URL(`https://${e}`).hostname.replace(/^www\./,"")}catch{return null}};var eo={cron:process.env.DUB_SLACK_HOOK_CRON,links:process.env.DUB_SLACK_HOOK_LINKS};export{_e as a,Be as b,je as c,Gt as d,Ft as e,Yt as f,Zt as g,Wt as h,qt as i,Qt as j};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{e}from"./chunk-MT6JJPUG.mjs";import{jsx as n}from"react/jsx-runtime";function l({user:a={},className:i}){return a?n("img",{alt:`Avatar for ${(a==null?void 0:a.name)||(a==null?void 0:a.email)}`,referrerPolicy:"no-referrer",src:(a==null?void 0:a.image)||`https://api.dicebear.com/7.x/micah/svg?seed=${a==null?void 0:a.email}`,className:e("h-10 w-10 rounded-full border border-gray-300",i),draggable:!1}):n("div",{className:e("h-10 w-10 animate-pulse rounded-full border border-gray-300 bg-gray-100",i)})}function d({id:a}){return n("img",{src:`https://api.dicebear.com/7.x/shapes/svg?seed=${a}`,alt:"avatar",className:"h-10 w-10 rounded-full",draggable:!1})}export{l as a,d as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as t}from"./chunk-I747HOW7.mjs";import{cva as o}from"class-variance-authority";import{jsx as b}from"react/jsx-runtime";var i=o("max-w-fit rounded-full border px-2 py-px text-xs font-medium capitalize",{variants:{variant:{default:"border-gray-400 text-gray-500",violet:"border-violet-600 bg-violet-600 text-white",blue:"border-blue-500 bg-blue-500 text-white",black:"border-black bg-black text-white",gray:"border-gray-200 bg-gray-200 text-black",neutral:"border-gray-400 text-gray-500"}},defaultVariants:{variant:"neutral"}});function d({className:e,variant:a,...r}){return b("span",{className:t(i({variant:a}),e),...r})}export{i as a,d as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as m}from"./chunk-5AKM6LBC.mjs";import{d as n}from"./chunk-6UYKLLOL.mjs";import*as o from"@radix-ui/react-dialog";import{useRouter as D}from"next/navigation";import{Drawer as a}from"vaul";import{jsx as t,jsxs as i}from"react/jsx-runtime";function x({children:l,className:d,dialogOnly:f,showModal:s,setShowModal:r,onClose:c,preventDefaultClose:u}){let p=D(),g=({dragged:e}={})=>{u&&!e||(c&&c(),r?r(!1):p.back())},{isMobile:b}=m();return b&&!f?i(a.Root,{open:r?s:!0,onOpenChange:e=>{e||g({dragged:!0})},children:[t(a.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),i(a.Portal,{children:[i(a.Content,{className:n("fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",d),children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),l]}),t(a.Overlay,{})]})]}):t(o.Root,{open:r?s:!0,onOpenChange:e=>{e||g()},children:i(o.Portal,{children:[t(o.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-gray-100 bg-opacity-50 backdrop-blur-md"}),t(o.Content,{onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),className:n("animate-scale-in fixed inset-0 z-40 m-auto max-h-fit w-full max-w-md overflow-hidden border border-gray-200 bg-white p-0 shadow-xl md:rounded-2xl",d),children:l})]})})}export{x as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a}from"./chunk-PWDIGDVI.mjs";import{d as i}from"./chunk-I747HOW7.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as x}from"./chunk-CS6Q63Y7.mjs";import{a as h}from"./chunk-HBYPR5YP.mjs";import{a as b}from"./chunk-JUU25PSW.mjs";import{a as c,b as g,e as d,f as v}from"./chunk-MT6JJPUG.mjs";import{useCallback as L,useEffect as N,useState as M}from"react";function u(t){let[p,n]=M(!1),r=L(()=>{n(window.scrollY>t)},[t]);return N(()=>(window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)),[r]),N(()=>{r()},[r]),p}import*as a from"@radix-ui/react-navigation-menu";import l from"@vercel/analytics";import{ChevronDown as P}from"lucide-react";import s from"next/link";import{useParams as C,useSelectedLayoutSegment as S}from"next/navigation";import R from"swr";import{Fragment as $,jsx as e,jsxs as i}from"react/jsx-runtime";var I=[{name:"Customers",slug:"customers"},{name:"Changelog",slug:"changelog"},{name:"Help",slug:"help"},{name:"Pricing",slug:"pricing"}];function K(){let{domain:t="dub.co"}=C(),p=u(80),n=S(),r=n==="help",{data:f,isLoading:k}=R(t==="dub.co"&&"/api/auth/session",v,{dedupingInterval:6e4});return e("div",{className:d("sticky inset-x-0 top-0 z-30 w-full transition-all",{"border-b border-gray-200 bg-white/75 backdrop-blur-lg":p,"border-b border-gray-200 bg-white":n&&!g.includes(n)}),children:e(h,{...r&&{className:"max-w-screen-lg"},children:i("div",{className:"flex h-14 items-center justify-between",children:[i("div",{className:"flex items-center space-x-4",children:[e(s,{href:t==="dub.co"?"/":"https://dub.co",...t!=="dub.co"&&{onClick:()=>{l.track("Referred from custom domain",{domain:t,medium:"logo"})}},children:e(b,{})}),r?i("div",{className:"flex items-center",children:[e("div",{className:"mr-3 h-5 border-l-2 border-gray-400"}),e(s,{href:"/help",className:"font-display text-lg font-bold text-gray-700",children:"Help Center"})]}):i(a.Root,{delayDuration:0,className:"relative hidden lg:block",children:[i(a.List,{className:"flex flex-row space-x-2 p-4",children:[i(a.Item,{children:[i(a.Trigger,{className:"group flex items-center space-x-2 rounded-md px-3 py-2 text-sm font-medium hover:bg-gray-100 focus:outline-none",children:[e("p",{className:d("text-sm font-medium text-gray-500 transition-colors ease-out group-hover:text-black",{"text-black":n==="features"}),children:"Features"}),e(P,{className:"h-4 w-4 transition-all group-data-[state=open]:rotate-180"})]}),e(a.Content,{children:e("div",{className:"grid w-[32rem] grid-cols-2 gap-1 p-3",children:x.map(({slug:m,icon:o,title:y,shortTitle:w})=>i(s,{href:t==="dub.co"?`/${m}`:`https://dub.co/${m}`,...t!=="dub.co"&&{onClick:()=>{l.track("Referred from custom domain",{domain:t,medium:`navbar item (/${m})`})}},className:"rounded-lg p-3 transition-colors hover:bg-gray-100 active:bg-gray-200",children:[i("div",{className:"flex items-center space-x-2",children:[e(o,{className:"h-4 w-4 text-gray-700"}),e("p",{className:"text-sm font-medium text-gray-700",children:w})]}),e("p",{className:"mt-1 line-clamp-1 text-sm text-gray-500",children:y})]},m))})})]}),I.map(({name:m,slug:o})=>e(a.Item,{asChild:!0,children:e(s,{id:`nav-${o}`,href:t==="dub.co"?`/${o}`:`https://dub.co/${o}`,...t!=="dub.co"&&{onClick:()=>{l.track("Referred from custom domain",{domain:t,medium:`navbar item (${o})`})}},className:d("rounded-md px-3 py-2 text-sm font-medium text-gray-500 transition-colors ease-out hover:text-black",{"text-black":n===o}),children:m},o)},o))]}),e(a.Viewport,{className:"data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content absolute left-0 top-full flex w-[var(--radix-navigation-menu-viewport-width)] origin-[top_center] justify-start rounded-lg border border-gray-200 bg-white shadow-lg"})]})]}),e("div",{className:"hidden lg:block",children:f&&Object.keys(f).length>0?e(s,{href:c,className:"animate-fade-in rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black",children:"Dashboard"}):k?null:i($,{children:[e(s,{href:`${c}/login`,...t!=="dub.co"&&{onClick:()=>{l.track("Referred from custom domain",{domain:t,medium:"navbar item (login)"})}},className:"animate-fade-in rounded-full px-4 py-1.5 text-sm font-medium text-gray-500 transition-colors ease-out hover:text-black",children:"Log in"}),e(s,{href:`${c}/register`,...t!=="dub.co"&&{onClick:()=>{l.track("Referred from custom domain",{domain:t,medium:"navbar item (signup)"})}},className:"animate-fade-in rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black",children:"Sign Up"})]})})]})})})}export{I as a,K as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d}from"./chunk-IQM42VGC.mjs";import*as o from"@radix-ui/react-popover";import{Drawer as i}from"vaul";import{jsx as e,jsxs as r}from"react/jsx-runtime";function g({children:t,content:a,align:s="center",openPopover:n,setOpenPopover:l,mobileOnly:m}){let{isMobile:p}=d();return m||p?r(i.Root,{open:n,onOpenChange:l,children:[e("div",{className:"sm:hidden",children:t}),e(i.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),r(i.Portal,{children:[r(i.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[e("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:e("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),e("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white pb-8 align-middle shadow-xl",children:a})]}),e(i.Overlay,{})]})]}):r(o.Root,{open:n,onOpenChange:l,children:[e(o.Trigger,{className:"sm:inline-flex",asChild:!0,children:t}),e(o.Portal,{children:e(o.Content,{sideOffset:8,align:s,className:"animate-slide-up-fade z-50 items-center rounded-md border border-gray-200 bg-white drop-shadow-lg sm:block",children:a})})]})}export{g as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a}from"./chunk-DHRSPSLC.mjs";import{d as i}from"./chunk-I747HOW7.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as r}from"./chunk-L4ZNPF4D.mjs";import*as e from"@radix-ui/react-accordion";import{ChevronDown as m}from"lucide-react";import*as c from"react";import{jsx as n,jsxs as p}from"react/jsx-runtime";var v=e.Root,d=c.forwardRef(({className:o,...t},i)=>n(e.Item,{ref:i,className:r("border-b border-b-slate-200 py-3 last:border-none",o),...t}));d.displayName="AccordionItem";var s=c.forwardRef(({className:o,children:t,...i},a)=>n(e.Header,{className:"flex",children:p(e.Trigger,{ref:a,className:r("flex flex-1 items-center justify-between font-medium transition-all sm:text-lg [&[data-state=open]>svg]:rotate-180",o),...i,children:[t,n(m,{className:"h-5 w-5 transition-transform duration-300"})]})}));s.displayName=e.Trigger.displayName;var f=c.forwardRef(({className:o,children:t,...i},a)=>n(e.Content,{ref:a,className:r("data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-gray-500 transition-all sm:text-base",o),...i,children:t}));f.displayName=e.Content.displayName;export{v as a,d as b,s as c,f as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as i}from"./chunk-6UYKLLOL.mjs";import{jsx as e,jsxs as o}from"react/jsx-runtime";function t({className:l}){return o("svg",{width:"191",height:"191",viewBox:"0 0 191 191",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i("h-10 w-10 text-black",l),children:[e("g",{clipPath:"url(#clip0_1301_107)",children:e("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M122 -14H144 9.17859 129.788 5.96937 122 3.72462V-14ZM122 3.72462C113.586 1.29941 104.695 0 95.5 0C42.7568 0 0 42.7568 0 95.5C0 148.243 42.7568 191 95.5 191C148.243 191 191 148.243 191 95.5C191 60.462 172.131 29.8311 144 13.2146V100V148H122V140.897C114.258 146.018 104.977 149 95 149C67.938 149 46 127.062 46 100C46 72.938 67.938 51 95 51C104.977 51 114.258 53.982 122 59.1034V3.72462Z",fill:"currentColor",shapeRendering:"geometricPrecision"})}),e("defs",{children:e("clipPath",{id:"clip0_1301_107",children:e("rect",{width:"191",height:"191",rx:"95.5",fill:"white"})})})]})}export{t as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as i}from"./chunk-H5EP2RCU.mjs";import{d}from"./chunk-I747HOW7.mjs";import{useMemo as x,useState as u}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function T({title:m,description:g,inputData:t,helpText:f,buttonText:c="Save Changes",disabledTooltip:s,handleSubmit:p}){let[r,y]=u(t.defaultValue),[l,n]=u(!1),b=x(()=>l||!r||r===t.defaultValue,[l,r,t.defaultValue]);return a("form",{onSubmit:async o=>{o.preventDefault(),n(!0),await p({[t.name]:r}),n(!1)},className:"rounded-lg border border-gray-200 bg-white",children:[a("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[a("div",{className:"flex flex-col space-y-3",children:[e("h2",{className:"text-xl font-medium",children:m}),e("p",{className:"text-sm text-gray-500",children:g})]}),typeof t.defaultValue=="string"?e("input",{...t,type:"text",required:!0,disabled:!!s,onChange:o=>y(o.target.value),className:d("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-300 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",{"cursor-not-allowed bg-gray-100 text-gray-400":s})}):e("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-gray-200"})]}),a("div",{className:"flex items-center justify-between rounded-b-lg border-t border-gray-200 bg-gray-50 p-3 sm:px-10",children:[e("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-gray-700 text-gray-500 transition-colors",dangerouslySetInnerHTML:{__html:f||""}}),e("div",{children:e(i,{text:c,loading:l,disabled:b,disabledTooltip:s})})]})]})}export{T as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a}from"./chunk-RIMQMOFM.mjs";import{f as i}from"./chunk-A2H6R365.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{e as l}from"./chunk-MT6JJPUG.mjs";import{jsx as t,jsxs as e}from"react/jsx-runtime";function o({className:a}){return e("div",{className:"group relative flex items-center",children:[t("svg",{className:l("absolute h-4 w-4 transition-all group-hover:translate-x-1 group-hover:opacity-0",a),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16",width:"16",height:"16",children:t("path",{fillRule:"evenodd",d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"})}),t("svg",{className:`${a||"h-4 w-4"} absolute opacity-0 transition-all group-hover:translate-x-1 group-hover:opacity-100`,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16",width:"16",height:"16",children:t("path",{fillRule:"evenodd",d:"M8.22 2.97a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06l2.97-2.97H3.75a.75.75 0 010-1.5h7.44L8.22 4.03a.75.75 0 010-1.06z"})})]})}export{o as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a}from"./chunk-HLHF7XA3.mjs";import{d as i}from"./chunk-I747HOW7.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as i}from"./chunk-ACD6OGNH.mjs";import{d}from"./chunk-I747HOW7.mjs";import{useMemo as x,useState as u}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function T({title:m,description:g,inputData:t,helpText:f,buttonText:c="Save Changes",disabledTooltip:s,handleSubmit:p}){let[r,y]=u(t.defaultValue),[l,n]=u(!1),b=x(()=>l||!r||r===t.defaultValue,[l,r,t.defaultValue]);return a("form",{onSubmit:async o=>{o.preventDefault(),n(!0),await p({[t.name]:r}),n(!1)},className:"rounded-lg border border-gray-200 bg-white",children:[a("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[a("div",{className:"flex flex-col space-y-3",children:[e("h2",{className:"text-xl font-medium",children:m}),e("p",{className:"text-sm text-gray-500",children:g})]}),typeof t.defaultValue=="string"?e("input",{...t,type:"text",required:!0,disabled:!!s,onChange:o=>y(o.target.value),className:d("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-300 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",{"cursor-not-allowed bg-gray-100 text-gray-400":s})}):e("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-gray-200"})]}),a("div",{className:"flex items-center justify-between rounded-b-lg border-t border-gray-200 bg-gray-50 p-3 sm:px-10",children:[e("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-gray-700 text-gray-500 transition-colors",dangerouslySetInnerHTML:{__html:f||""}}),e("div",{children:e(i,{text:c,loading:l,disabled:b,disabledTooltip:s})})]})]})}export{T as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a}from"./chunk-5DDUCIHB.mjs";import{d as i}from"./chunk-L4ZNPF4D.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a}from"./chunk-YNHLYGAQ.mjs";import{d as i}from"./chunk-I747HOW7.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as i}from"./chunk-ZASLOIES.mjs";import{d}from"./chunk-6UYKLLOL.mjs";import{useMemo as x,useState as u}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function T({title:m,description:g,inputData:t,helpText:f,buttonText:c="Save Changes",disabledTooltip:s,handleSubmit:p}){let[r,y]=u(t.defaultValue),[l,n]=u(!1),b=x(()=>l||!r||r===t.defaultValue,[l,r,t.defaultValue]);return a("form",{onSubmit:async o=>{o.preventDefault(),n(!0),await p({[t.name]:r}),n(!1)},className:"rounded-lg border border-gray-200 bg-white",children:[a("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[a("div",{className:"flex flex-col space-y-3",children:[e("h2",{className:"text-xl font-medium",children:m}),e("p",{className:"text-sm text-gray-500",children:g})]}),typeof t.defaultValue=="string"?e("input",{...t,type:"text",required:!0,disabled:!!s,onChange:o=>y(o.target.value),className:d("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-300 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",{"cursor-not-allowed bg-gray-100 text-gray-400":s})}):e("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-gray-200"})]}),a("div",{className:"flex items-center justify-between rounded-b-lg border-t border-gray-200 bg-gray-50 p-3 sm:px-10",children:[e("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-gray-700 text-gray-500 transition-colors",dangerouslySetInnerHTML:{__html:f||""}}),e("div",{children:e(i,{text:c,loading:l,disabled:b,disabledTooltip:s})})]})]})}export{T as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as r}from"./chunk-EHYVEIOL.mjs";import{a}from"./chunk-Z5P2KHPP.mjs";import{d as e}from"./chunk-6UYKLLOL.mjs";import{useState as p}from"react";import{toast as u}from"sonner";import{jsx as t,jsxs as c}from"react/jsx-runtime";function f({value:s,className:i}){let[l,o]=p(!1);return c("button",{onClick:n=>{n.stopPropagation(),o(!0),navigator.clipboard.writeText(s).then(()=>{u.success("Copied to clipboard!")}),setTimeout(()=>o(!1),3e3)},className:e("group rounded-full bg-gray-100 p-1.5 transition-all duration-75 hover:scale-105 hover:bg-blue-100 active:scale-95",i),children:[t("span",{className:"sr-only",children:"Copy"}),l?t(r,{className:"text-gray-700 transition-all group-hover:text-blue-800"}):t(a,{className:"text-gray-700 transition-all group-hover:text-blue-800"})]})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a}from"./chunk-2CU5OSFX.mjs";import{e as i}from"./chunk-MT6JJPUG.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as f}from"./chunk-CS6Q63Y7.mjs";import{a as h}from"./chunk-RAUB4W7B.mjs";import{f as b}from"./chunk-KWSQFEDS.mjs";import{a as v}from"./chunk-UM4A5EU5.mjs";import{a as l,b as g,d as c,e as p}from"./chunk-I747HOW7.mjs";import*as i from"@radix-ui/react-navigation-menu";import s from"@vercel/analytics";import{ChevronDown as w}from"lucide-react";import r from"next/link";import{useParams as M,useSelectedLayoutSegment as P}from"next/navigation";import L from"swr";import{Fragment as R,jsx as e,jsxs as a}from"react/jsx-runtime";var C=[{name:"Customers",slug:"customers"},{name:"Changelog",slug:"changelog"},{name:"Help",slug:"help"},{name:"Pricing",slug:"pricing"}];function H(){let{domain:t="dub.co"}=M(),x=b(80),m=P(),d=m==="help",{data:u,isLoading:N}=L(t==="dub.co"&&"/api/auth/session",p,{dedupingInterval:6e4});return e("div",{className:c("sticky inset-x-0 top-0 z-30 w-full transition-all",{"border-b border-gray-200 bg-white/75 backdrop-blur-lg":x,"border-b border-gray-200 bg-white":m&&!g.includes(m)}),children:e(h,{...d&&{className:"max-w-screen-lg"},children:a("div",{className:"flex h-14 items-center justify-between",children:[a("div",{className:"flex items-center space-x-4",children:[e(r,{href:t==="dub.co"?"/":"https://dub.co",...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:"logo"})}},children:e(v,{})}),d?a("div",{className:"flex items-center",children:[e("div",{className:"mr-3 h-5 border-l-2 border-gray-400"}),e(r,{href:"/help",className:"font-display text-lg font-bold text-gray-700",children:"Help Center"})]}):a(i.Root,{delayDuration:0,className:"relative hidden lg:block",children:[a(i.List,{className:"flex flex-row space-x-2 p-4",children:[a(i.Item,{children:[a(i.Trigger,{className:"group flex items-center space-x-2 rounded-md px-3 py-2 text-sm font-medium hover:bg-gray-100 focus:outline-none",children:[e("p",{className:c("text-sm font-medium text-gray-500 transition-colors ease-out group-hover:text-black",{"text-black":m==="features"}),children:"Features"}),e(w,{className:"h-4 w-4 transition-all group-data-[state=open]:rotate-180"})]}),e(i.Content,{children:e("div",{className:"grid w-[32rem] grid-cols-2 gap-1 p-3",children:f.map(({slug:n,icon:o,title:k,shortTitle:y})=>a(r,{href:t==="dub.co"?`/${n}`:`https://dub.co/${n}`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:`navbar item (/${n})`})}},className:"rounded-lg p-3 transition-colors hover:bg-gray-100 active:bg-gray-200",children:[a("div",{className:"flex items-center space-x-2",children:[e(o,{className:"h-4 w-4 text-gray-700"}),e("p",{className:"text-sm font-medium text-gray-700",children:y})]}),e("p",{className:"mt-1 line-clamp-1 text-sm text-gray-500",children:k})]},n))})})]}),C.map(({name:n,slug:o})=>e(i.Item,{asChild:!0,children:e(r,{id:`nav-${o}`,href:t==="dub.co"?`/${o}`:`https://dub.co/${o}`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:`navbar item (${o})`})}},className:c("rounded-md px-3 py-2 text-sm font-medium text-gray-500 transition-colors ease-out hover:text-black",{"text-black":m===o}),children:n},o)},o))]}),e(i.Viewport,{className:"data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content absolute left-0 top-full flex w-[var(--radix-navigation-menu-viewport-width)] origin-[top_center] justify-start rounded-lg border border-gray-200 bg-white shadow-lg"})]})]}),e("div",{className:"hidden lg:block",children:u&&Object.keys(u).length>0?e(r,{href:l,className:"animate-fade-in rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black",children:"Dashboard"}):N?null:a(R,{children:[e(r,{href:`${l}/login`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:"navbar item (login)"})}},className:"animate-fade-in rounded-full px-4 py-1.5 text-sm font-medium text-gray-500 transition-colors ease-out hover:text-black",children:"Log in"}),e(r,{href:`${l}/register`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:"navbar item (signup)"})}},className:"animate-fade-in rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black",children:"Sign Up"})]})})]})})})}export{C as a,H as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as u}from"./chunk-RHFRIU54.mjs";import{a as p}from"./chunk-CS6Q63Y7.mjs";import{a as t,d as n,e as d}from"./chunk-6UYKLLOL.mjs";import{ChevronDown as N,Menu as v,X as w}from"lucide-react";import o from"next/link";import{useParams as x}from"next/navigation";import{useEffect as k,useState as b}from"react";import L from"swr";import{Fragment as h,jsx as e,jsxs as s}from"react/jsx-runtime";function E(){let{domain:r="dub.co"}=x(),[a,c]=b(!1),[m,y]=b(!1);k(()=>{a?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[a]);let{data:f,isLoading:z}=L(r==="dub.co"&&"/api/auth/session",d,{dedupingInterval:6e4});return s(h,{children:[e("button",{onClick:()=>c(!a),className:n("fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 lg:hidden",a&&"hover:bg-gray-100 active:bg-gray-200"),children:a?e(w,{className:"h-5 w-5 text-gray-600"}):e(v,{className:"h-5 w-5 text-gray-600"})}),e("nav",{className:n("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden",a&&"block"),children:s("ul",{className:"grid divide-y divide-gray-200",children:[s("li",{className:"py-3",children:[s("button",{className:"flex w-full justify-between",onClick:()=>y(!m),children:[e("p",{className:"font-semibold",children:"Features"}),e(N,{className:n("h-5 w-5 text-gray-500 transition-all",m&&"rotate-180")})]}),m&&e("div",{className:"grid gap-4 overflow-hidden py-4",children:p.map(({slug:l,icon:i,shortTitle:g})=>s(o,{href:r==="dub.co"?`/${l}`:`https://dub.co/${l}`,onClick:()=>c(!1),className:"flex w-full space-x-2",children:[e(i,{className:"h-5 w-5 text-gray-500"}),e("span",{className:"text-sm",children:g})]},l))})]}),u.map(({name:l,slug:i})=>e("li",{className:"py-3",children:e(o,{href:r==="dub.co"?`/${i}`:`https://dub.co/${i}`,onClick:()=>c(!1),className:"flex w-full font-semibold capitalize",children:l})},i)),f&&Object.keys(f).length>0?e("li",{className:"py-3",children:e(o,{href:t,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):s(h,{children:[e("li",{className:"py-3",children:e(o,{href:`${t}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),e("li",{className:"py-3",children:e(o,{href:`${t}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}export{E as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as i}from"./chunk-S3P6FTC7.mjs";import{e as d}from"./chunk-MT6JJPUG.mjs";import{useMemo as x,useState as u}from"react";import{jsx as e,jsxs as a}from"react/jsx-runtime";function T({title:m,description:g,inputData:t,helpText:f,buttonText:c="Save Changes",disabledTooltip:s,handleSubmit:p}){let[r,y]=u(t.defaultValue),[l,n]=u(!1),b=x(()=>l||!r||r===t.defaultValue,[l,r,t.defaultValue]);return a("form",{onSubmit:async o=>{o.preventDefault(),n(!0),await p({[t.name]:r}),n(!1)},className:"rounded-lg border border-gray-200 bg-white",children:[a("div",{className:"relative flex flex-col space-y-6 p-5 sm:p-10",children:[a("div",{className:"flex flex-col space-y-3",children:[e("h2",{className:"text-xl font-medium",children:m}),e("p",{className:"text-sm text-gray-500",children:g})]}),typeof t.defaultValue=="string"?e("input",{...t,type:"text",required:!0,disabled:!!s,onChange:o=>y(o.target.value),className:d("w-full max-w-md rounded-md border border-gray-300 text-gray-900 placeholder-gray-300 focus:border-gray-500 focus:outline-none focus:ring-gray-500 sm:text-sm",{"cursor-not-allowed bg-gray-100 text-gray-400":s})}):e("div",{className:"h-[2.35rem] w-full max-w-md animate-pulse rounded-md bg-gray-200"})]}),a("div",{className:"flex items-center justify-between rounded-b-lg border-t border-gray-200 bg-gray-50 p-3 sm:px-10",children:[e("p",{className:"prose-sm prose-a:underline prose-a:underline-offset-4 hover:prose-a:text-gray-700 text-gray-500 transition-colors",dangerouslySetInnerHTML:{__html:f||""}}),e("div",{children:e(i,{text:c,loading:l,disabled:b,disabledTooltip:s})})]})]})}export{T as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as p}from"./chunk-QV2NLAT4.mjs";import{f as m,g as d}from"./chunk-I747HOW7.mjs";import*as i from"@radix-ui/react-tooltip";import{HelpCircle as f}from"lucide-react";import u from"next/link";import{Drawer as n}from"vaul";import{jsx as t,jsxs as l}from"react/jsx-runtime";function c({children:r,content:e,side:o="top",fullWidth:a,withPortal:s}){let{isMobile:x}=p();return x?l(n.Root,{children:[t(n.Trigger,{className:`${a?"w-full":"inline-flex"} md:hidden`,onClick:g=>{g.stopPropagation()},children:r}),t(n.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),l(n.Portal,{children:[l(n.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),t("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white align-middle shadow-xl",children:typeof e=="string"?t("span",{className:"block text-center text-sm text-gray-700",children:e}):e})]}),t(n.Overlay,{})]})]}):t(i.Provider,{delayDuration:100,children:l(i.Root,{children:[t(i.Trigger,{className:"md:inline-flex",asChild:!0,children:r}),t(s?i.Portal:"div",{children:t(i.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-md border border-gray-200 bg-white shadow-md md:block",children:typeof e=="string"?t("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:e}):e})})]})})}function T({title:r,cta:e,href:o,target:a,onClick:s}){return l("div",{className:"flex flex-col items-center space-y-3 p-4 text-center md:max-w-xs",children:[t("p",{className:"text-sm text-gray-700",children:r}),e&&(o?t(u,{href:o,...a?{target:a}:{},className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",children:e}):s?t("button",{type:"button",className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",onClick:s,children:e}):null)]})}function P({title:r,cta:e,href:o}){return l("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[r," ",t("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:e})]})}function k({content:r}){return t(c,{content:r,children:t(f,{className:"h-4 w-4 text-gray-500"})})}function C({value:r,unit:e="total clicks",children:o,lastClicked:a}){return(!r||r<1e3)&&!a?o:t(c,{content:l("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[l("p",{className:"text-sm font-semibold text-gray-700",children:[m(r||0,{full:!0})," ",e]}),a&&l("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",d(a,{withAgo:!0})]})]}),children:o})}export{c as a,T as b,P as c,k as d,C as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d}from"./chunk-ZYZKWFIQ.mjs";import*as o from"@radix-ui/react-popover";import{Drawer as i}from"vaul";import{jsx as e,jsxs as r}from"react/jsx-runtime";function g({children:t,content:a,align:s="center",openPopover:n,setOpenPopover:l,mobileOnly:m}){let{isMobile:p}=d();return m||p?r(i.Root,{open:n,onOpenChange:l,children:[e("div",{className:"sm:hidden",children:t}),e(i.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),r(i.Portal,{children:[r(i.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[e("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:e("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),e("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white pb-8 align-middle shadow-xl",children:a})]}),e(i.Overlay,{})]})]}):r(o.Root,{open:n,onOpenChange:l,children:[e(o.Trigger,{className:"sm:inline-flex",asChild:!0,children:t}),e(o.Portal,{children:e(o.Content,{sideOffset:8,align:s,className:"animate-slide-up-fade z-50 items-center rounded-md border border-gray-200 bg-white drop-shadow-lg sm:block",children:a})})]})}export{g as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as p}from"./chunk-X5HO4CIT.mjs";import{f as m,g as d}from"./chunk-6UYKLLOL.mjs";import*as a from"@radix-ui/react-tooltip";import{HelpCircle as g}from"lucide-react";import f from"next/link";import{Drawer as n}from"vaul";import{jsx as t,jsxs as o}from"react/jsx-runtime";function c({children:r,content:e,side:i="top",fullWidth:l}){let{isMobile:s}=p();return s?o(n.Root,{children:[t(n.Trigger,{className:`${l?"w-full":"inline-flex"} md:hidden`,onClick:x=>{x.stopPropagation()},children:r}),t(n.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),o(n.Portal,{children:[o(n.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),t("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white align-middle shadow-xl",children:typeof e=="string"?t("span",{className:"block text-center text-sm text-gray-700",children:e}):e})]}),t(n.Overlay,{})]})]}):t(a.Provider,{delayDuration:100,children:o(a.Root,{children:[t(a.Trigger,{className:"md:inline-flex",asChild:!0,children:r}),t(a.Content,{sideOffset:8,side:i,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-md border border-gray-200 bg-white shadow-md md:block",children:typeof e=="string"?t("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:e}):e})]})})}function w({title:r,cta:e,href:i,target:l,onClick:s}){return o("div",{className:"flex flex-col items-center space-y-3 p-4 text-center md:max-w-xs",children:[t("p",{className:"text-sm text-gray-700",children:r}),e&&(i?t(f,{href:i,...l?{target:l}:{},className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",children:e}):s?t("button",{type:"button",className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",onClick:s,children:e}):null)]})}function N({title:r,cta:e,href:i}){return o("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[r," ",t("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:e})]})}function T({content:r}){return t(c,{content:r,children:t(g,{className:"h-4 w-4 text-gray-500"})})}function k({value:r,unit:e="total clicks",children:i,lastClicked:l}){return(!r||r<1e3)&&!l?i:t(c,{content:o("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[o("p",{className:"text-sm font-semibold text-gray-700",children:[m(r||0,{full:!0})," ",e]}),l&&o("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",d(l,{withAgo:!0})]})]}),children:i})}export{c as a,w as b,N as c,T as d,k as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as p}from"./chunk-NHHVF35L.mjs";import{f as m,g as d}from"./chunk-I747HOW7.mjs";import*as a from"@radix-ui/react-tooltip";import{HelpCircle as g}from"lucide-react";import f from"next/link";import{Drawer as n}from"vaul";import{jsx as t,jsxs as o}from"react/jsx-runtime";function c({children:r,content:e,side:i="top",fullWidth:l}){let{isMobile:s}=p();return s?o(n.Root,{children:[t(n.Trigger,{className:`${l?"w-full":"inline-flex"} md:hidden`,onClick:x=>{x.stopPropagation()},children:r}),t(n.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),o(n.Portal,{children:[o(n.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),t("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white align-middle shadow-xl",children:typeof e=="string"?t("span",{className:"block text-center text-sm text-gray-700",children:e}):e})]}),t(n.Overlay,{})]})]}):t(a.Provider,{delayDuration:100,children:o(a.Root,{children:[t(a.Trigger,{className:"md:inline-flex",asChild:!0,children:r}),t(a.Content,{sideOffset:8,side:i,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-md border border-gray-200 bg-white shadow-md md:block",children:typeof e=="string"?t("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:e}):e})]})})}function w({title:r,cta:e,href:i,target:l,onClick:s}){return o("div",{className:"flex flex-col items-center space-y-3 p-4 text-center md:max-w-xs",children:[t("p",{className:"text-sm text-gray-700",children:r}),e&&(i?t(f,{href:i,...l?{target:l}:{},className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",children:e}):s?t("button",{type:"button",className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",onClick:s,children:e}):null)]})}function N({title:r,cta:e,href:i}){return o("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[r," ",t("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:e})]})}function T({content:r}){return t(c,{content:r,children:t(g,{className:"h-4 w-4 text-gray-500"})})}function k({value:r,unit:e="total clicks",children:i,lastClicked:l}){return(!r||r<1e3)&&!l?i:t(c,{content:o("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[o("p",{className:"text-sm font-semibold text-gray-700",children:[m(r||0,{full:!0})," ",e]}),l&&o("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",d(l,{withAgo:!0})]})]}),children:i})}export{c as a,w as b,N as c,T as d,k as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as d}from"./chunk-ERDCMHO2.mjs";import{a as l}from"./chunk-25TQRROD.mjs";import{d as a}from"./chunk-6UYKLLOL.mjs";import{jsx as t,jsxs as b}from"react/jsx-runtime";function g({text:n,variant:r="primary",loading:o,icon:i,disabledTooltip:s,...e}){return s?t(d,{content:s,fullWidth:!0,children:t("div",{className:"flex h-10 w-full cursor-not-allowed items-center justify-center rounded-md border border-gray-200 bg-gray-100 px-4 text-sm text-gray-400 transition-all focus:outline-none",children:t("p",{children:n})})}):b("button",{type:e.onClick?"button":"submit",className:a("flex h-10 w-full items-center justify-center space-x-2 rounded-md border px-4 text-sm transition-all focus:outline-none",e.disabled||o?"cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400":{"border-black bg-black text-white hover:bg-white hover:text-black":r==="primary","border-gray-200 bg-white text-gray-500 hover:border-black hover:text-black":r==="secondary","border-blue-500 bg-blue-500 text-white hover:bg-white hover:text-blue-500":r==="success","border-red-500 bg-red-500 text-white hover:bg-white hover:text-red-500":r==="danger"},e.className),disabled:e.disabled||o,...e,children:[o?t(l,{}):i||null,t("p",{children:n})]})}export{g as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as m}from"./chunk-RGOFAGB3.mjs";import{d as n}from"./chunk-6UYKLLOL.mjs";import*as o from"@radix-ui/react-dialog";import{useRouter as D}from"next/navigation";import{Drawer as a}from"vaul";import{jsx as t,jsxs as i}from"react/jsx-runtime";function x({children:l,className:d,dialogOnly:f,showModal:s,setShowModal:r,onClose:c,preventDefaultClose:u}){let p=D(),g=({dragged:e}={})=>{u&&!e||(c&&c(),r?r(!1):p.back())},{isMobile:b}=m();return b&&!f?i(a.Root,{open:r?s:!0,onOpenChange:e=>{e||g({dragged:!0})},children:[t(a.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),i(a.Portal,{children:[i(a.Content,{className:n("fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",d),children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),l]}),t(a.Overlay,{})]})]}):t(o.Root,{open:r?s:!0,onOpenChange:e=>{e||g()},children:i(o.Portal,{children:[t(o.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-gray-100 bg-opacity-50 backdrop-blur-md"}),t(o.Content,{onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),className:n("animate-scale-in fixed inset-0 z-40 m-auto max-h-fit w-full max-w-md overflow-hidden border border-gray-200 bg-white p-0 shadow-xl md:rounded-2xl",d),children:l})]})})}export{x as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d}from"./chunk-2QNAO2LP.mjs";import*as o from"@radix-ui/react-popover";import{Drawer as i}from"vaul";import{jsx as e,jsxs as r}from"react/jsx-runtime";function g({children:t,content:a,align:s="center",openPopover:n,setOpenPopover:l,mobileOnly:m}){let{isMobile:p}=d();return m||p?r(i.Root,{open:n,onOpenChange:l,children:[e("div",{className:"sm:hidden",children:t}),e(i.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),r(i.Portal,{children:[r(i.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[e("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:e("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),e("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white pb-8 align-middle shadow-xl",children:a})]}),e(i.Overlay,{})]})]}):r(o.Root,{open:n,onOpenChange:l,children:[e(o.Trigger,{className:"sm:inline-flex",asChild:!0,children:t}),e(o.Portal,{children:e(o.Content,{sideOffset:8,align:s,className:"animate-slide-up-fade z-50 items-center rounded-md border border-gray-200 bg-white drop-shadow-lg sm:block",children:a})})]})}export{g as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{useEffect as y,useState as I}from"react";function b(){let[e,n]=I(null);return y(()=>{let t=document.querySelector("[data-mdx-container]");if(!t)return;let r=t.offsetTop-1,a=new IntersectionObserver(c=>{var f,l,m;let u=c[0];if(!u)return;let i=(((f=u.rootBounds)==null?void 0:f.height)||0)*.3+r;for(let p=1;p<c.length;p++){let h=c[p];if(!h)break;(h.boundingClientRect.top<u.boundingClientRect.top||u.boundingClientRect.bottom<r)&&(u=h)}let s=u.target;for(;s&&s.getBoundingClientRect().bottom<r;)s=(l=o.get(s))==null?void 0:l.next;for(;s&&s.getBoundingClientRect().top>i;)s=(m=o.get(s))==null?void 0:m.prev;s&&n(s.getAttribute("href"))},{threshold:1,rootMargin:`-${r}px 0px 0px 0px`}),o=new Map;return(t==null?void 0:t.querySelectorAll("[data-mdx-heading]")).forEach(c=>a.observe(c)),()=>{a.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useEffect as P,useState as T}from"react";function g(e,{threshold:n=0,root:t=null,rootMargin:r="0%",freezeOnceVisible:a=!1}){let[o,d]=T(),c=(o==null?void 0:o.isIntersecting)&&a,u=([i])=>{d(i)};return P(()=>{let i=e==null?void 0:e.current;if(!!!window.IntersectionObserver||c||!i)return;let f={threshold:n,root:t,rootMargin:r},l=new IntersectionObserver(u,f);return l.observe(i),()=>l.disconnect()},[e,JSON.stringify(n),t,r,c]),o}import{useEffect as A,useState as C}from"react";function w(e,n){let[t,r]=C(n);return A(()=>{let o=window.localStorage.getItem(e);o&&r(JSON.parse(o))},[e]),[t,o=>{r(o),window.localStorage.setItem(e,JSON.stringify(o))}]}import{useEffect as L,useState as S}from"react";function v(){let[e,n]=S(null),[t,r]=S(null);return L(()=>{let a=()=>{window.matchMedia("(max-width: 640px)").matches?n("mobile"):window.matchMedia("(min-width: 641px) and (max-width: 1024px)").matches?n("tablet"):n("desktop"),r({width:window.innerWidth,height:window.innerHeight})};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[]),{device:e,width:t==null?void 0:t.width,height:t==null?void 0:t.height,isMobile:e==="mobile",isTablet:e==="tablet",isDesktop:e==="desktop"}}import{usePathname as M,useRouter as R,useSearchParams as j}from"next/navigation";function x(){let e=M(),n=R(),t=j(),r=Object.fromEntries(t);return{pathname:e,router:n,searchParams:t,searchParamsObj:r,queryParams:({set:o,del:d,replace:c,getNewPath:u})=>{let i=new URLSearchParams(t);o&&Object.entries(o).forEach(([l,m])=>i.set(l,m)),d&&(Array.isArray(d)?d.forEach(l=>i.delete(l)):i.delete(d));let s=i.toString(),f=`${e}${s.length>0?`?${s}`:""}`;if(u)return f;c?n.replace(f):n.push(f)}}}import{useCallback as k,useEffect as E,useState as q}from"react";function O(e){let[n,t]=q(!1),r=k(()=>{t(window.scrollY>e)},[e]);return E(()=>(window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)),[r]),E(()=>{r()},[r]),n}export{b as a,g as b,w as c,v as d,x as e,O as f};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{b as a}from"./chunk-BJGX2JNY.mjs";import{d as i}from"./chunk-I747HOW7.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as m}from"./chunk-QV2NLAT4.mjs";import{d as n}from"./chunk-I747HOW7.mjs";import*as o from"@radix-ui/react-dialog";import{useRouter as D}from"next/navigation";import{Drawer as a}from"vaul";import{jsx as t,jsxs as i}from"react/jsx-runtime";function x({children:l,className:d,dialogOnly:f,showModal:s,setShowModal:r,onClose:c,preventDefaultClose:u}){let p=D(),g=({dragged:e}={})=>{u&&!e||(c&&c(),r?r(!1):p.back())},{isMobile:b}=m();return b&&!f?i(a.Root,{open:r?s:!0,onOpenChange:e=>{e||g({dragged:!0})},children:[t(a.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),i(a.Portal,{children:[i(a.Content,{className:n("fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",d),children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),l]}),t(a.Overlay,{})]})]}):t(o.Root,{open:r?s:!0,onOpenChange:e=>{e||g()},children:i(o.Portal,{children:[t(o.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-gray-100 bg-opacity-50 backdrop-blur-md"}),t(o.Content,{onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),className:n("animate-scale-in fixed inset-0 z-40 m-auto max-h-fit w-full max-w-md overflow-hidden border border-gray-200 bg-white p-0 shadow-xl md:rounded-2xl",d),children:l})]})})}export{x as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as m}from"./chunk-AF7F5C6H.mjs";import{d as n}from"./chunk-L4ZNPF4D.mjs";import*as o from"@radix-ui/react-dialog";import{useRouter as D}from"next/navigation";import{Drawer as a}from"vaul";import{jsx as t,jsxs as i}from"react/jsx-runtime";function x({children:l,className:d,dialogOnly:f,showModal:s,setShowModal:r,onClose:c,preventDefaultClose:u}){let p=D(),g=({dragged:e}={})=>{u&&!e||(c&&c(),r?r(!1):p.back())},{isMobile:b}=m();return b&&!f?i(a.Root,{open:r?s:!0,onOpenChange:e=>{e||g({dragged:!0})},children:[t(a.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),i(a.Portal,{children:[i(a.Content,{className:n("fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",d),children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),l]}),t(a.Overlay,{})]})]}):t(o.Root,{open:r?s:!0,onOpenChange:e=>{e||g()},children:i(o.Portal,{children:[t(o.Overlay,{id:"modal-backdrop",className:"animate-fade-in fixed inset-0 z-40 bg-gray-100 bg-opacity-50 backdrop-blur-md"}),t(o.Content,{onOpenAutoFocus:e=>e.preventDefault(),onCloseAutoFocus:e=>e.preventDefault(),className:n("animate-scale-in fixed inset-0 z-40 m-auto max-h-fit w-full max-w-md overflow-hidden border border-gray-200 bg-white p-0 shadow-xl md:rounded-2xl",d),children:l})]})})}export{x as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a}from"./chunk-Q7ILRRJZ.mjs";import{d as i}from"./chunk-I747HOW7.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{useEffect as y,useState as I}from"react";function b(){let[e,n]=I(null);return y(()=>{let t=document.querySelector("[data-mdx-container]");if(!t)return;let r=t.offsetTop-1,u=new IntersectionObserver(a=>{var l,d,h;let i=a[0];if(!i)return;let c=(((l=i.rootBounds)==null?void 0:l.height)||0)*.3+r;for(let m=1;m<a.length;m++){let p=a[m];if(!p)break;(p.boundingClientRect.top<i.boundingClientRect.top||i.boundingClientRect.bottom<r)&&(i=p)}let o=i.target;for(;o&&o.getBoundingClientRect().bottom<r;)o=(d=s.get(o))==null?void 0:d.next;for(;o&&o.getBoundingClientRect().top>c;)o=(h=s.get(o))==null?void 0:h.prev;o&&n(o.getAttribute("href"))},{threshold:1,rootMargin:`-${r}px 0px 0px 0px`}),s=new Map;return(t==null?void 0:t.querySelectorAll("[data-mdx-heading]")).forEach(a=>u.observe(a)),()=>{u.disconnect()}},[]),e==null?void 0:e.replace("#","")}import{useEffect as P,useState as L}from"react";function g(e,{threshold:n=0,root:t=null,rootMargin:r="0%",freezeOnceVisible:u=!1}){let[s,f]=L(),a=(s==null?void 0:s.isIntersecting)&&u,i=([c])=>{f(c)};return P(()=>{let c=e==null?void 0:e.current;if(!!!window.IntersectionObserver||a||!c)return;let l={threshold:n,root:t,rootMargin:r},d=new IntersectionObserver(i,l);return d.observe(c),()=>d.disconnect()},[e,JSON.stringify(n),t,r,a]),s}import{useEffect as T,useState as C}from"react";function w(e,n){let[t,r]=C(n);return T(()=>{let s=window.localStorage.getItem(e);s&&r(JSON.parse(s))},[e]),[t,s=>{r(s),window.localStorage.setItem(e,JSON.stringify(s))}]}import{useEffect as k,useState as S}from"react";function v(){let[e,n]=S(null),[t,r]=S(null);return k(()=>{let u=()=>{window.matchMedia("(max-width: 640px)").matches?n("mobile"):window.matchMedia("(min-width: 641px) and (max-width: 1024px)").matches?n("tablet"):n("desktop"),r({width:window.innerWidth,height:window.innerHeight})};return u(),window.addEventListener("resize",u),()=>{window.removeEventListener("resize",u)}},[]),{device:e,width:t==null?void 0:t.width,height:t==null?void 0:t.height,isMobile:e==="mobile",isTablet:e==="tablet",isDesktop:e==="desktop"}}import{usePathname as M,useRouter as R,useSearchParams as $}from"next/navigation";function x(){let e=M(),n=R(),t=$(),r=Object.fromEntries(t);return{pathname:e,router:n,searchParams:t,searchParamsObj:r,setQueryParam:({key:f,value:a,replace:i})=>{let c=new URLSearchParams(t);c.set(f,a);let o=c.toString(),l=`${e}${o.length>0?`?${o}`:""}`;i?n.replace(l):n.push(l)},deleteQueryParam:({key:f,replace:a})=>{let i=new URLSearchParams(t);i.delete(f);let c=i.toString(),o=`${e}${c.length>0?`?${c}`:""}`;a?n.replace(o):n.push(o)}}}import{useCallback as A,useEffect as E,useState as Q}from"react";function O(e){let[n,t]=Q(!1),r=A(()=>{t(window.scrollY>e)},[e]);return E(()=>(window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)),[r]),E(()=>{r()},[r]),n}export{b as a,g as b,w as c,v as d,x as e,O as f};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as f}from"./chunk-CS6Q63Y7.mjs";import{a as h}from"./chunk-RPEV6RXI.mjs";import{f as b}from"./chunk-26FZHNMW.mjs";import{a as v}from"./chunk-BXDBM7ZH.mjs";import{a as l,b as g,d as c,e as p}from"./chunk-6UYKLLOL.mjs";import*as i from"@radix-ui/react-navigation-menu";import s from"@vercel/analytics";import{ChevronDown as w}from"lucide-react";import r from"next/link";import{useParams as M,useSelectedLayoutSegment as P}from"next/navigation";import L from"swr";import{Fragment as R,jsx as e,jsxs as a}from"react/jsx-runtime";var C=[{name:"Customers",slug:"customers"},{name:"Changelog",slug:"changelog"},{name:"Help",slug:"help"},{name:"Pricing",slug:"pricing"}];function H(){let{domain:t="dub.co"}=M(),x=b(80),m=P(),d=m==="help",{data:u,isLoading:N}=L(t==="dub.co"&&"/api/auth/session",p,{dedupingInterval:6e4});return e("div",{className:c("sticky inset-x-0 top-0 z-30 w-full transition-all",{"border-b border-gray-200 bg-white/75 backdrop-blur-lg":x,"border-b border-gray-200 bg-white":m&&!g.includes(m)}),children:e(h,{...d&&{className:"max-w-screen-lg"},children:a("div",{className:"flex h-14 items-center justify-between",children:[a("div",{className:"flex items-center space-x-4",children:[e(r,{href:t==="dub.co"?"/":"https://dub.co",...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:"logo"})}},children:e(v,{})}),d?a("div",{className:"flex items-center",children:[e("div",{className:"mr-3 h-5 border-l-2 border-gray-400"}),e(r,{href:"/help",className:"font-display text-lg font-bold text-gray-700",children:"Help Center"})]}):a(i.Root,{delayDuration:0,className:"relative hidden lg:block",children:[a(i.List,{className:"flex flex-row space-x-2 p-4",children:[a(i.Item,{children:[a(i.Trigger,{className:"group flex items-center space-x-2 rounded-md px-3 py-2 text-sm font-medium hover:bg-gray-100 focus:outline-none",children:[e("p",{className:c("text-sm font-medium text-gray-500 transition-colors ease-out group-hover:text-black",{"text-black":m==="features"}),children:"Features"}),e(w,{className:"h-4 w-4 transition-all group-data-[state=open]:rotate-180"})]}),e(i.Content,{children:e("div",{className:"grid w-[32rem] grid-cols-2 gap-1 p-3",children:f.map(({slug:n,icon:o,title:k,shortTitle:y})=>a(r,{href:t==="dub.co"?`/${n}`:`https://dub.co/${n}`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:`navbar item (/${n})`})}},className:"rounded-lg p-3 transition-colors hover:bg-gray-100 active:bg-gray-200",children:[a("div",{className:"flex items-center space-x-2",children:[e(o,{className:"h-4 w-4 text-gray-700"}),e("p",{className:"text-sm font-medium text-gray-700",children:y})]}),e("p",{className:"mt-1 line-clamp-1 text-sm text-gray-500",children:k})]},n))})})]}),C.map(({name:n,slug:o})=>e(i.Item,{asChild:!0,children:e(r,{id:`nav-${o}`,href:t==="dub.co"?`/${o}`:`https://dub.co/${o}`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:`navbar item (${o})`})}},className:c("rounded-md px-3 py-2 text-sm font-medium text-gray-500 transition-colors ease-out hover:text-black",{"text-black":m===o}),children:n},o)},o))]}),e(i.Viewport,{className:"data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content absolute left-0 top-full flex w-[var(--radix-navigation-menu-viewport-width)] origin-[top_center] justify-start rounded-lg border border-gray-200 bg-white shadow-lg"})]})]}),e("div",{className:"hidden lg:block",children:u&&Object.keys(u).length>0?e(r,{href:l,className:"animate-fade-in rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black",children:"Dashboard"}):N?null:a(R,{children:[e(r,{href:`${l}/login`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:"navbar item (login)"})}},className:"animate-fade-in rounded-full px-4 py-1.5 text-sm font-medium text-gray-500 transition-colors ease-out hover:text-black",children:"Log in"}),e(r,{href:`${l}/register`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:"navbar item (signup)"})}},className:"animate-fade-in rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black",children:"Sign Up"})]})})]})})})}export{C as a,H as b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as m,h as d,i as p}from"./chunk-A2H6R365.mjs";import*as a from"@radix-ui/react-tooltip";import{HelpCircle as g}from"lucide-react";import f from"next/link";import{Drawer as n}from"vaul";import{jsx as t,jsxs as o}from"react/jsx-runtime";function c({children:r,content:e,side:i="top",fullWidth:l}){let{isMobile:s}=m();return s?o(n.Root,{children:[t(n.Trigger,{className:`${l?"w-full":"inline-flex"} md:hidden`,onClick:x=>{x.stopPropagation()},children:r}),t(n.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),o(n.Portal,{children:[o(n.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),t("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white align-middle shadow-xl",children:typeof e=="string"?t("span",{className:"block text-center text-sm text-gray-700",children:e}):e})]}),t(n.Overlay,{})]})]}):t(a.Provider,{delayDuration:100,children:o(a.Root,{children:[t(a.Trigger,{className:"md:inline-flex",asChild:!0,children:r}),t(a.Content,{sideOffset:8,side:i,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-md border border-gray-200 bg-white shadow-md md:block",children:typeof e=="string"?t("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:e}):e})]})})}function h({title:r,cta:e,href:i,target:l,onClick:s}){return o("div",{className:"flex flex-col items-center space-y-3 p-4 text-center md:max-w-xs",children:[t("p",{className:"text-sm text-gray-700",children:r}),e&&(i?t(f,{href:i,...l?{target:l}:{},className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",children:e}):s?t("button",{type:"button",className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",onClick:s,children:e}):null)]})}function w({title:r,cta:e,href:i}){return o("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[r," ",t("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:e})]})}function N({content:r}){return t(c,{content:r,children:t(g,{className:"h-4 w-4 text-gray-500"})})}function T({value:r,unit:e="total clicks",children:i,lastClicked:l}){return(!r||r<1e3)&&!l?i:t(c,{content:o("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[o("p",{className:"text-sm font-semibold text-gray-700",children:[d(r||0,{full:!0})," ",e]}),l&&o("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",p(l,{withAgo:!0})]})]}),children:i})}export{c as a,h as b,w as c,N as d,T as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a}from"./chunk-WCAGNYYV.mjs";import{d as i}from"./chunk-I747HOW7.mjs";import*as t from"@radix-ui/react-switch";import{jsx as e}from"react/jsx-runtime";function f({fn:s,trackDimensions:c,thumbDimensions:l,thumbTranslate:r,checked:d=!0,disabled:o=!1,disabledTooltip:n}){return n?e(a,{content:n,children:e("div",{className:"radix-state-checked:bg-gray-300 relative inline-flex h-4 w-8 flex-shrink-0 cursor-not-allowed rounded-full border-2 border-transparent bg-gray-200",children:e("div",{className:"h-3 w-3 transform rounded-full bg-white shadow-lg"})})}):e(t.Root,{checked:d,name:"switch",onCheckedChange:u=>s(u),disabled:o,className:i(o?"cursor-not-allowed bg-gray-300":"radix-state-checked:bg-blue-500 radix-state-unchecked:bg-gray-200 cursor-pointer focus:outline-none focus-visible:ring focus-visible:ring-blue-500 focus-visible:ring-opacity-75","relative inline-flex h-4 w-8 flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out",c),children:e(t.Thumb,{className:i(`radix-state-checked:${r}`,"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,r)})})}export{f as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as u}from"./chunk-5NZXTEJA.mjs";import{a as p}from"./chunk-CS6Q63Y7.mjs";import{a as t,d as n,e as d}from"./chunk-I747HOW7.mjs";import{ChevronDown as N,Menu as v,X as w}from"lucide-react";import o from"next/link";import{useParams as x}from"next/navigation";import{useEffect as k,useState as b}from"react";import L from"swr";import{Fragment as h,jsx as e,jsxs as s}from"react/jsx-runtime";function E(){let{domain:r="dub.co"}=x(),[a,c]=b(!1),[m,y]=b(!1);k(()=>{a?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[a]);let{data:f,isLoading:z}=L(r==="dub.co"&&"/api/auth/session",d,{dedupingInterval:6e4});return s(h,{children:[e("button",{onClick:()=>c(!a),className:n("fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 lg:hidden",a&&"hover:bg-gray-100 active:bg-gray-200"),children:a?e(w,{className:"h-5 w-5 text-gray-600"}):e(v,{className:"h-5 w-5 text-gray-600"})}),e("nav",{className:n("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden",a&&"block"),children:s("ul",{className:"grid divide-y divide-gray-200",children:[s("li",{className:"py-3",children:[s("button",{className:"flex w-full justify-between",onClick:()=>y(!m),children:[e("p",{className:"font-semibold",children:"Features"}),e(N,{className:n("h-5 w-5 text-gray-500 transition-all",m&&"rotate-180")})]}),m&&e("div",{className:"grid gap-4 overflow-hidden py-4",children:p.map(({slug:l,icon:i,shortTitle:g})=>s(o,{href:r==="dub.co"?`/${l}`:`https://dub.co/${l}`,onClick:()=>c(!1),className:"flex w-full space-x-2",children:[e(i,{className:"h-5 w-5 text-gray-500"}),e("span",{className:"text-sm",children:g})]},l))})]}),u.map(({name:l,slug:i})=>e("li",{className:"py-3",children:e(o,{href:r==="dub.co"?`/${i}`:`https://dub.co/${i}`,onClick:()=>c(!1),className:"flex w-full font-semibold capitalize",children:l})},i)),f&&Object.keys(f).length>0?e("li",{className:"py-3",children:e(o,{href:t,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):s(h,{children:[e("li",{className:"py-3",children:e(o,{href:`${t}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),e("li",{className:"py-3",children:e(o,{href:`${t}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}export{E as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as p}from"./chunk-QV2NLAT4.mjs";import{f as m,g as d}from"./chunk-I747HOW7.mjs";import*as i from"@radix-ui/react-tooltip";import{HelpCircle as f}from"lucide-react";import u from"next/link";import{Drawer as n}from"vaul";import{jsx as t,jsxs as l}from"react/jsx-runtime";function c({children:r,content:e,side:o="top",fullWidth:a,disablePortal:s}){let{isMobile:x}=p();return x?l(n.Root,{children:[t(n.Trigger,{className:`${a?"w-full":"inline-flex"} md:hidden`,onClick:g=>{g.stopPropagation()},children:r}),t(n.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),l(n.Portal,{children:[l(n.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),t("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white align-middle shadow-xl",children:typeof e=="string"?t("span",{className:"block text-center text-sm text-gray-700",children:e}):e})]}),t(n.Overlay,{})]})]}):t(i.Provider,{delayDuration:100,children:l(i.Root,{children:[t(i.Trigger,{className:"md:inline-flex",asChild:!0,children:r}),t(i.Portal,{children:t(i.Content,{sideOffset:8,side:o,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-md border border-gray-200 bg-white shadow-md md:block",children:typeof e=="string"?t("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:e}):e})})]})})}function N({title:r,cta:e,href:o,target:a,onClick:s}){return l("div",{className:"flex flex-col items-center space-y-3 p-4 text-center md:max-w-xs",children:[t("p",{className:"text-sm text-gray-700",children:r}),e&&(o?t(u,{href:o,...a?{target:a}:{},className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",children:e}):s?t("button",{type:"button",className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",onClick:s,children:e}):null)]})}function T({title:r,cta:e,href:o}){return l("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[r," ",t("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:e})]})}function P({content:r}){return t(c,{content:r,children:t(f,{className:"h-4 w-4 text-gray-500"})})}function k({value:r,unit:e="total clicks",children:o,lastClicked:a}){return(!r||r<1e3)&&!a?o:t(c,{content:l("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[l("p",{className:"text-sm font-semibold text-gray-700",children:[m(r||0,{full:!0})," ",e]}),a&&l("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",d(a,{withAgo:!0})]})]}),children:o})}export{c as a,N as b,T as c,P as d,k as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as d}from"./chunk-YNHLYGAQ.mjs";import{a as l}from"./chunk-SZIOUGU7.mjs";import{d as a}from"./chunk-I747HOW7.mjs";import{jsx as t,jsxs as b}from"react/jsx-runtime";function g({text:n,variant:r="primary",loading:o,icon:i,disabledTooltip:s,...e}){return s?t(d,{content:s,fullWidth:!0,children:t("div",{className:"flex h-10 w-full cursor-not-allowed items-center justify-center rounded-md border border-gray-200 bg-gray-100 px-4 text-sm text-gray-400 transition-all focus:outline-none",children:t("p",{children:n})})}):b("button",{type:e.onClick?"button":"submit",className:a("flex h-10 w-full items-center justify-center space-x-2 rounded-md border px-4 text-sm transition-all focus:outline-none",e.disabled||o?"cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400":{"border-black bg-black text-white hover:bg-white hover:text-black":r==="primary","border-gray-200 bg-white text-gray-500 hover:border-black hover:text-black":r==="secondary","border-blue-500 bg-blue-500 text-white hover:bg-white hover:text-blue-500":r==="success","border-red-500 bg-red-500 text-white hover:bg-white hover:text-red-500":r==="danger"},e.className),disabled:e.disabled||o,...e,children:[o?t(l,{}):i||null,t("p",{children:n})]})}export{g as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as d}from"./chunk-DSOWA2VR.mjs";import{a as l}from"./chunk-KFNXHCXJ.mjs";import{e as a}from"./chunk-MT6JJPUG.mjs";import{jsx as t,jsxs as b}from"react/jsx-runtime";function g({text:n,variant:r="primary",loading:o,icon:i,disabledTooltip:s,...e}){return s?t(d,{content:s,fullWidth:!0,children:t("div",{className:"flex h-10 w-full cursor-not-allowed items-center justify-center rounded-md border border-gray-200 bg-gray-100 px-4 text-sm text-gray-400 transition-all focus:outline-none",children:t("p",{children:n})})}):b("button",{type:e.onClick?"button":"submit",className:a("flex h-10 w-full items-center justify-center space-x-2 rounded-md border px-4 text-sm transition-all focus:outline-none",e.disabled||o?"cursor-not-allowed border-gray-200 bg-gray-100 text-gray-400":{"border-black bg-black text-white hover:bg-white hover:text-black":r==="primary","border-gray-200 bg-white text-gray-500 hover:border-black hover:text-black":r==="secondary","border-blue-500 bg-blue-500 text-white hover:bg-white hover:text-blue-500":r==="success","border-red-500 bg-red-500 text-white hover:bg-white hover:text-red-500":r==="danger"},e.className),disabled:e.disabled||o,...e,children:[o?t(l,{}):i||null,t("p",{children:n})]})}export{g as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as p}from"./chunk-FV32PDOT.mjs";import{f as m,g as d}from"./chunk-I747HOW7.mjs";import*as a from"@radix-ui/react-tooltip";import{HelpCircle as g}from"lucide-react";import f from"next/link";import{Drawer as n}from"vaul";import{jsx as t,jsxs as o}from"react/jsx-runtime";function c({children:r,content:e,side:i="top",fullWidth:l}){let{isMobile:s}=p();return s?o(n.Root,{children:[t(n.Trigger,{className:`${l?"w-full":"inline-flex"} md:hidden`,onClick:x=>{x.stopPropagation()},children:r}),t(n.Overlay,{className:"fixed inset-0 z-40 bg-gray-100 bg-opacity-10 backdrop-blur"}),o(n.Portal,{children:[o(n.Content,{className:"fixed bottom-0 left-0 right-0 z-50 mt-24 rounded-t-[10px] border-t border-gray-200 bg-white",children:[t("div",{className:"sticky top-0 z-20 flex w-full items-center justify-center rounded-t-[10px] bg-inherit",children:t("div",{className:"my-3 h-1 w-12 rounded-full bg-gray-300"})}),t("div",{className:"flex min-h-[150px] w-full items-center justify-center overflow-hidden bg-white align-middle shadow-xl",children:typeof e=="string"?t("span",{className:"block text-center text-sm text-gray-700",children:e}):e})]}),t(n.Overlay,{})]})]}):t(a.Provider,{delayDuration:100,children:o(a.Root,{children:[t(a.Trigger,{className:"md:inline-flex",asChild:!0,children:r}),t(a.Content,{sideOffset:8,side:i,className:"animate-slide-up-fade z-[99] items-center overflow-hidden rounded-md border border-gray-200 bg-white shadow-md md:block",children:typeof e=="string"?t("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:e}):e})]})})}function w({title:r,cta:e,href:i,target:l,onClick:s}){return o("div",{className:"flex flex-col items-center space-y-3 p-4 text-center md:max-w-xs",children:[t("p",{className:"text-sm text-gray-700",children:r}),e&&(i?t(f,{href:i,...l?{target:l}:{},className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",children:e}):s?t("button",{type:"button",className:"mt-4 w-full rounded-md border border-black bg-black px-3 py-1.5 text-center text-sm text-white transition-all hover:bg-white hover:text-black",onClick:s,children:e}):null)]})}function N({title:r,cta:e,href:i}){return o("div",{className:"max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[r," ",t("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"inline-flex text-gray-500 underline underline-offset-4 hover:text-gray-800",children:e})]})}function T({content:r}){return t(c,{content:r,children:t(g,{className:"h-4 w-4 text-gray-500"})})}function k({value:r,unit:e="total clicks",children:i,lastClicked:l}){return(!r||r<1e3)&&!l?i:t(c,{content:o("div",{className:"block max-w-xs px-4 py-2 text-center text-sm text-gray-700",children:[o("p",{className:"text-sm font-semibold text-gray-700",children:[m(r||0,{full:!0})," ",e]}),l&&o("p",{className:"mt-1 text-xs text-gray-500",suppressHydrationWarning:!0,children:["Last clicked ",d(l,{withAgo:!0})]})]}),children:i})}export{c as a,w as b,N as c,T as d,k as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{d as l}from"./chunk-6UYKLLOL.mjs";import{jsx as t,jsxs as e}from"react/jsx-runtime";function o({className:a}){return e("div",{className:"group relative flex items-center",children:[t("svg",{className:l("absolute h-4 w-4 transition-all group-hover:translate-x-1 group-hover:opacity-0",a),xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16",width:"16",height:"16",children:t("path",{fillRule:"evenodd",d:"M6.22 3.22a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 010-1.06z"})}),t("svg",{className:`${a||"h-4 w-4"} absolute opacity-0 transition-all group-hover:translate-x-1 group-hover:opacity-100`,xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16",width:"16",height:"16",children:t("path",{fillRule:"evenodd",d:"M8.22 2.97a.75.75 0 011.06 0l4.25 4.25a.75.75 0 010 1.06l-4.25 4.25a.75.75 0 01-1.06-1.06l2.97-2.97H3.75a.75.75 0 010-1.5h7.44L8.22 4.03a.75.75 0 010-1.06z"})})]})}export{o as a};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{b as e}from"./chunk-A2H6R365.mjs";import{useSelectedLayoutSegment as r}from"next/navigation";import{jsx as n,jsxs as i}from"react/jsx-runtime";function p(){let a;try{a=r()}catch{}return!a||e.includes(a)?i("div",{style:t.backgroundMain,children:[n("div",{style:t.backgroundMainBefore}),n("div",{style:t.backgroundMainAfter}),n("div",{style:t.backgroundContent})]}):null}var t={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://d2vwwcvoksz7ty.cloudfront.net/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%),
|
|
3
|
+
radial-gradient(at 97% 21%, hsla(125, 98%, 72%, 1) 0px, transparent 50%),
|
|
4
|
+
radial-gradient(at 52% 99%, hsla(354, 98%, 61%, 1) 0px, transparent 50%),
|
|
5
|
+
radial-gradient(at 10% 29%, hsla(256, 96%, 67%, 1) 0px, transparent 50%),
|
|
6
|
+
radial-gradient(at 97% 96%, hsla(38, 60%, 74%, 1) 0px, transparent 50%),
|
|
7
|
+
radial-gradient(at 33% 50%, hsla(222, 67%, 73%, 1) 0px, transparent 50%),
|
|
8
|
+
radial-gradient(at 79% 53%, hsla(343, 68%, 79%, 1) 0px, transparent 50%)`,position:"absolute",height:"100%",filter:"blur(100px) saturate(150%)",top:"80px",opacity:.15}};export{p as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as u}from"./chunk-Z53LLI44.mjs";import{a as p}from"./chunk-CS6Q63Y7.mjs";import{a as t,d as n,e as d}from"./chunk-6UYKLLOL.mjs";import{ChevronDown as N,Menu as v,X as w}from"lucide-react";import o from"next/link";import{useParams as x}from"next/navigation";import{useEffect as k,useState as b}from"react";import L from"swr";import{Fragment as h,jsx as e,jsxs as s}from"react/jsx-runtime";function E(){let{domain:r="dub.co"}=x(),[a,c]=b(!1),[m,y]=b(!1);k(()=>{a?document.body.style.overflow="hidden":document.body.style.overflow="auto"},[a]);let{data:f,isLoading:z}=L(r==="dub.co"&&"/api/auth/session",d,{dedupingInterval:6e4});return s(h,{children:[e("button",{onClick:()=>c(!a),className:n("fixed right-3 top-3 z-40 rounded-full p-2 transition-colors duration-200 hover:bg-gray-200 focus:outline-none active:bg-gray-300 lg:hidden",a&&"hover:bg-gray-100 active:bg-gray-200"),children:a?e(w,{className:"h-5 w-5 text-gray-600"}):e(v,{className:"h-5 w-5 text-gray-600"})}),e("nav",{className:n("fixed inset-0 z-20 hidden w-full bg-white px-5 py-16 lg:hidden",a&&"block"),children:s("ul",{className:"grid divide-y divide-gray-200",children:[s("li",{className:"py-3",children:[s("button",{className:"flex w-full justify-between",onClick:()=>y(!m),children:[e("p",{className:"font-semibold",children:"Features"}),e(N,{className:n("h-5 w-5 text-gray-500 transition-all",m&&"rotate-180")})]}),m&&e("div",{className:"grid gap-4 overflow-hidden py-4",children:p.map(({slug:l,icon:i,shortTitle:g})=>s(o,{href:r==="dub.co"?`/${l}`:`https://dub.co/${l}`,onClick:()=>c(!1),className:"flex w-full space-x-2",children:[e(i,{className:"h-5 w-5 text-gray-500"}),e("span",{className:"text-sm",children:g})]},l))})]}),u.map(({name:l,slug:i})=>e("li",{className:"py-3",children:e(o,{href:r==="dub.co"?`/${i}`:`https://dub.co/${i}`,onClick:()=>c(!1),className:"flex w-full font-semibold capitalize",children:l})},i)),f&&Object.keys(f).length>0?e("li",{className:"py-3",children:e(o,{href:t,className:"flex w-full font-semibold capitalize",children:"Dashboard"})}):s(h,{children:[e("li",{className:"py-3",children:e(o,{href:`${t}/login`,className:"flex w-full font-semibold capitalize",children:"Log in"})}),e("li",{className:"py-3",children:e(o,{href:`${t}/register`,className:"flex w-full font-semibold capitalize",children:"Sign Up"})})]})]})})]})}export{E as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import{a as f}from"./chunk-CS6Q63Y7.mjs";import{a as h}from"./chunk-RAUB4W7B.mjs";import{f as b}from"./chunk-LMWQ3JAT.mjs";import{a as v}from"./chunk-UM4A5EU5.mjs";import{a as l,b as g,d as c,e as p}from"./chunk-I747HOW7.mjs";import*as i from"@radix-ui/react-navigation-menu";import s from"@vercel/analytics";import{ChevronDown as w}from"lucide-react";import r from"next/link";import{useParams as M,useSelectedLayoutSegment as P}from"next/navigation";import L from"swr";import{Fragment as R,jsx as e,jsxs as a}from"react/jsx-runtime";var C=[{name:"Customers",slug:"customers"},{name:"Changelog",slug:"changelog"},{name:"Help",slug:"help"},{name:"Pricing",slug:"pricing"}];function H(){let{domain:t="dub.co"}=M(),x=b(80),m=P(),d=m==="help",{data:u,isLoading:N}=L(t==="dub.co"&&"/api/auth/session",p,{dedupingInterval:6e4});return e("div",{className:c("sticky inset-x-0 top-0 z-30 w-full transition-all",{"border-b border-gray-200 bg-white/75 backdrop-blur-lg":x,"border-b border-gray-200 bg-white":m&&!g.includes(m)}),children:e(h,{...d&&{className:"max-w-screen-lg"},children:a("div",{className:"flex h-14 items-center justify-between",children:[a("div",{className:"flex items-center space-x-4",children:[e(r,{href:t==="dub.co"?"/":"https://dub.co",...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:"logo"})}},children:e(v,{})}),d?a("div",{className:"flex items-center",children:[e("div",{className:"mr-3 h-5 border-l-2 border-gray-400"}),e(r,{href:"/help",className:"font-display text-lg font-bold text-gray-700",children:"Help Center"})]}):a(i.Root,{delayDuration:0,className:"relative hidden lg:block",children:[a(i.List,{className:"flex flex-row space-x-2 p-4",children:[a(i.Item,{children:[a(i.Trigger,{className:"group flex items-center space-x-2 rounded-md px-3 py-2 text-sm font-medium hover:bg-gray-100 focus:outline-none",children:[e("p",{className:c("text-sm font-medium text-gray-500 transition-colors ease-out group-hover:text-black",{"text-black":m==="features"}),children:"Features"}),e(w,{className:"h-4 w-4 transition-all group-data-[state=open]:rotate-180"})]}),e(i.Content,{children:e("div",{className:"grid w-[32rem] grid-cols-2 gap-1 p-3",children:f.map(({slug:n,icon:o,title:k,shortTitle:y})=>a(r,{href:t==="dub.co"?`/${n}`:`https://dub.co/${n}`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:`navbar item (/${n})`})}},className:"rounded-lg p-3 transition-colors hover:bg-gray-100 active:bg-gray-200",children:[a("div",{className:"flex items-center space-x-2",children:[e(o,{className:"h-4 w-4 text-gray-700"}),e("p",{className:"text-sm font-medium text-gray-700",children:y})]}),e("p",{className:"mt-1 line-clamp-1 text-sm text-gray-500",children:k})]},n))})})]}),C.map(({name:n,slug:o})=>e(i.Item,{asChild:!0,children:e(r,{id:`nav-${o}`,href:t==="dub.co"?`/${o}`:`https://dub.co/${o}`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:`navbar item (${o})`})}},className:c("rounded-md px-3 py-2 text-sm font-medium text-gray-500 transition-colors ease-out hover:text-black",{"text-black":m===o}),children:n},o)},o))]}),e(i.Viewport,{className:"data-[state=closed]:animate-scale-out-content data-[state=open]:animate-scale-in-content absolute left-0 top-full flex w-[var(--radix-navigation-menu-viewport-width)] origin-[top_center] justify-start rounded-lg border border-gray-200 bg-white shadow-lg"})]})]}),e("div",{className:"hidden lg:block",children:u&&Object.keys(u).length>0?e(r,{href:l,className:"animate-fade-in rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black",children:"Dashboard"}):N?null:a(R,{children:[e(r,{href:`${l}/login`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:"navbar item (login)"})}},className:"animate-fade-in rounded-full px-4 py-1.5 text-sm font-medium text-gray-500 transition-colors ease-out hover:text-black",children:"Log in"}),e(r,{href:`${l}/register`,...t!=="dub.co"&&{onClick:()=>{s.track("Referred from custom domain",{domain:t,medium:"navbar item (signup)"})}},className:"animate-fade-in rounded-full border border-black bg-black px-4 py-1.5 text-sm text-white transition-all hover:bg-white hover:text-black",children:"Sign Up"})]})})]})})})}export{C as a,H as b};
|