1import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,r as n}from"./framework-DjWA_DlG.js";import{t as r}from"./createLucideIcon-CXrwvYUc.js";import{t as i}from"./bot-Cm9qc0Ga.js";import{t as a}from"./check-DlNwsw38.js";import{t as o}from"./chevron-down-DxuyuooN.js";import{i as s,n as c,r as l,s as u,t as d}from"./dropdown-menu-DUypL2ZI.js";import{t as f}from"./clock-CAi9OICU.js";import{t as p}from"./copy-Co_cEH_v.js";import{t as m}from"./file-text-CdKUlWwI.js";import{t as h}from"./message-square-B6j92OC7.js";import{t as g}from"./search-CfcoCEWr.js";import{n as _}from"./dist-manhm6Cl.js";import v from"./CiBadge-PbzwyixA.js";import y,{t as b}from"./NpmReleaseBadge-D4dDyRlM.js";var x=r(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),S=r(`square-code`,[[`path`,{d:`m10 9-3 3 3 3`,key:`1oro0q`}],[`path`,{d:`m14 15 3-3-3-3`,key:`bz13h7`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]),C=r(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),w=r(`zap`,[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`,key:`1v7up4`}]]),T=e(n(),1),E=t();function D(e){return`Fetch and read this Authdog docs Markdown URL (raw text/markdown, not the HTML site): ${e} 2 3Summarize the document and answer questions from it. Prefer the Markdown contents over guessing.`}async function O(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.top=`0`,t.style.left=`0`,t.style.opacity=`0`,document.body.appendChild(t),t.focus(),t.select();try{if(!document.execCommand(`copy`))throw Error(`execCommand copy failed`)}finally{document.body.removeChild(t)}}var k=[{name:`ChatGPT`,icon:x,group:`LLM`,build:e=>`https://chatgpt.com/?q=${encodeURIComponent(D(e))}`},{name:`Claude`,icon:i,group:`LLM`,build:e=>`https://claude.ai/new?q=${encodeURIComponent(D(e))}`},{name:`T3 Chat`,icon:h,group:`LLM`,build:e=>`https://t3.chat/new?q=${encodeURIComponent(D(e))}`},{name:`Grok`,icon:w,group:`LLM`,build:e=>`https://grok.com/?q=${encodeURIComponent(D(e))}`},{name:`Perplexity`,icon:g,group:`LLM`,build:e=>`https://www.perplexity.ai/search?q=${encodeURIComponent(D(e))}`},{name:`Cursor`,icon:S,group:`IDE`,build:e=>`cursor://anysphere.cursor-deeplink/prompt?text=${encodeURIComponent(D(e))}`},{name:`v0`,icon:C,group:`Builder`,build:e=>`https://v0.dev/chat?q=${encodeURIComponent(D(e))}`}],A=[`LLM`,`IDE`,`Builder`];function j({markdown:e,lastUpdated:t,markdownHref:n,npmPackage:r,ciWorkflow:i}){let[h,g]=(0,T.useState)(!1);async function x(){try{await O(e),g(!0),window.setTimeout(()=>g(!1),1800),_.success(`Copied page as Markdown`)}catch{_.error(`Couldnât copy. Allow clipboard access and try again`)}}function S(){if(!n)return``;try{return new URL(n,window.location.origin).toString()}catch{return n}}function C(e){let t=S();t&&window.open(e.build(t),`_blank`,`noopener,noreferrer`)}let w=k[0];return(0,E.jsxs)(`div`,{className:`mb-8 border-b border-gray-200 pb-5 text-sm text-gray-500 dark:border-gray-800 dark:text-gray-400`,children:[(0,E.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,E.jsxs)(`span`,{className:`mr-1 inline-flex items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500`,children:[(0,E.jsx)(f,{className:`h-3.5 w-3.5`}),`Last updated `,t]}),r?(0,E.jsx)(y,{packageName:r}):null,i?(0,E.jsx)(v,{workflow:i}):null]}),(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:x,"aria-label":h?`Copied`:`Copy as Markdown`,className:`inline-flex items-center gap-1.5 rounded-lg border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 shadow-sm transition-colors hover:bg-gray-50 hover:text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-gray-100`,children:[(0,E.jsxs)(`span`,{className:`relative h-4 w-4`,children:[(0,E.jsx)(p,{className:`absolute inset-0 h-4 w-4 transition-all duration-200 ${h?`-translate-y-1 opacity-0`:`translate-y-0 opacity-100`}`}),(0,E.jsx)(a,{className:`absolute inset-0 h-4 w-4 text-emerald-500 transition-all duration-200 ${h?`translate-y-0 opacity-100`:`translate-y-1 opacity-0`}`})]}),(0,E.jsx)(`span`,{className:`relative block h-5 overflow-hidden`,children:(0,E.jsxs)(`span`,{className:`flex flex-col transition-transform duration-200 ease-out ${h?`-translate-y-5`:`translate-y-0`}`,children:[(0,E.jsx)(`span`,{className:`flex h-5 items-center`,children:`Copy as Markdown`}),(0,E.jsx)(`span`,{className:`flex h-5 items-center text-emerald-600 dark:text-emerald-400`,children:`Copied`})]})})]}),n?(0,E.jsxs)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 rounded-lg border border-gray-200 bg-white px-3 py-1.5 font-medium text-gray-700 shadow-sm transition-colors hover:bg-gray-50 hover:text-gray-900 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-gray-100`,children:[(0,E.jsx)(m,{className:`h-4 w-4`}),`View as Markdown`]}):null,n?(0,E.jsxs)(`div`,{className:`inline-flex items-stretch overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-900`,children:[(0,E.jsxs)(`button`,{type:`button`,onClick:()=>C(w),className:`inline-flex items-center gap-1.5 px-3 py-1.5 font-medium text-gray-700 transition-colors hover:bg-gray-50 hover:text-gray-900 dark:text-gray-300 dark:hover:bg-gray-800 dark:hover:text-gray-100`,children:[(0,E.jsx)(w.icon,{className:`h-4 w-4`}),`Open in `,w.name]}),(0,E.jsxs)(d,{children:[(0,E.jsx)(u,{"aria-label":`Open in other assistants`,className:`inline-flex items-center border-l border-gray-200 px-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-900 focus:outline-none dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-100`,children:(0,E.jsx)(o,{className:`h-4 w-4`})}),(0,E.jsx)(c,{align:`end`,className:`w-56 rounded-xl border-gray-200 bg-white p-1.5
3shadow-lg dark:border-gray-700 dark:bg-gray-900`,children:A.map(e=>{let t=k.filter(t=>t.group===e);return t.length===0?null:(0,E.jsxs)(`div`,{children:[(0,E.jsx)(s,{className:`px-2 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wider text-gray-400 dark:text-gray-500`,children:e}),t.map(e=>(0,E.jsxs)(l,{onSelect:()=>C(e),className:`group flex cursor-pointer items-center gap-2.5 rounded-lg px-2 py-2 text-sm text-gray-700 focus:bg-gray-100 focus:text-gray-900 dark:text-gray-200 dark:focus:bg-gray-800 dark:focus:text-white`,children:[(0,E.jsx)(e.icon,{className:`h-4 w-4 text-gray-500 dark:text-gray-400`}),(0,E.jsxs)(`span`,{className:`flex-1 font-medium`,children:[`Open in `,e.name]}),(0,E.jsx)(b,{className:`h-3.5 w-3.5 text-gray-300 transition-colors group-focus:text-gray-500 dark:text-gray-600 dark:group-focus:text-gray-300`})]},e.name))]},e)})})]})]}):null]})]})}export{j as DocsToolbar};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.