@inploi/plugin-kin 2.7.8 → 3.0.0
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/cdn/index.js +1 -1
- package/dist/{highlighted-body-B3W2YXNL-b7756d4d.cjs → highlighted-body-B3W2YXNL-4579406d.cjs} +1 -1
- package/dist/{highlighted-body-B3W2YXNL-5d5b7e38.js → highlighted-body-B3W2YXNL-aa326909.js} +1 -1
- package/dist/{index-5f9ad179.cjs → index-45f58435.cjs} +3 -3
- package/dist/{index-df57afe9.js → index-d554999b.js} +3 -3
- package/dist/{mermaid-3ZIDBTTL-0e42fab3.js → mermaid-3ZIDBTTL-6ffe15f4.js} +1 -1
- package/dist/{mermaid-3ZIDBTTL-c404b476.cjs → mermaid-3ZIDBTTL-85bdf74f.cjs} +1 -1
- package/dist/plugin-kin.cjs +1 -1
- package/dist/plugin-kin.js +1 -1
- package/package.json +4 -4
package/cdn/index.js
CHANGED
|
@@ -120,7 +120,7 @@ Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error
|
|
|
120
120
|
`);return s+c+u})}return n},R6=/^[ \t]*<[\w!/?-]/,O6=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,D6=e=>typeof e!="string"||e.length===0||!R6.test(e)?e:e.replace(O6,"$1"),Q0,K0,vi={...tr,protocols:{...tr.protocols,href:[...(K0=(Q0=tr.protocols)==null?void 0:Q0.href)!=null?K0:[],"tel"]}},Ns={raw:wa,sanitize:[Cl,vi],harden:[Yf,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},P6={gfm:[o3,{}]},X0=Object.values(Ns),M6=Object.values(P6),B6={block:" ▋",circle:" ●"},F6={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},et=Ir(F6),Z0=pe(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,...a})=>{let s=typeof e=="string"&&n?D6(e):e;return m(a0.Provider,{value:i,children:m(j0,{...a,children:s})})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Z0.displayName="Block";var H6=["github-light","github-dark"],J0=pe(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:r=!1,components:i,rehypePlugins:a=X0,remarkPlugins:s=M6,className:o,shikiTheme:u=H6,mermaid:c,controls:h=!0,isAnimating:d=!1,animated:f,BlockComponent:p=Z0,parseMarkdownIntoBlocksFn:g=N6,caret:T,plugins:C,remend:w,linkSafety:A={enabled:!0},allowedTags:y,...R})=>{let M=Yh(),[v,Y]=Mf(),D=Ne(()=>y?Object.keys(y):[],[y]),$=Ne(()=>{if(typeof e!="string")return"";let J=t==="streaming"&&n?p_(e,w):e;return D.length>0&&(J=L6(J,D)),J},[e,t,n,w,D]),S=Ne(()=>g($),[$,g]),[U,I]=fe(S);Ee(()=>{t==="streaming"?Y(()=>{I(S)}):I(S)},[S,t]);let G=t==="streaming"?U:S,se=Ne(()=>G.map((J,x)=>`${M}-${x}`),[G.length,M]),X=Ne(()=>f?f===!0?ks():ks(f):null,[f]),ue=Ne(()=>{var J,x;return{shikiTheme:(x=(J=C?.code)==null?void 0:J.getThemes())!=null?x:u,controls:h,isAnimating:d,mode:t,mermaid:c,linkSafety:A}},[u,h,d,t,c,A,C?.code]),Q=Ne(()=>({...l6,...i}),[i]),j=Ne(()=>{let J=[];return C!=null&&C.cjk&&(J=[...J,...C.cjk.remarkPluginsBefore]),J=[...J,...s],C!=null&&C.cjk&&(J=[...J,...C.cjk.remarkPluginsAfter]),C!=null&&C.math&&(J=[...J,C.math.remarkPlugin]),J},[s,C?.math,C?.cjk]),ie=Ne(()=>{var J;let x=a;if(y&&Object.keys(y).length>0&&a===X0){let Ie={...vi,tagNames:[...(J=vi.tagNames)!=null?J:[],...Object.keys(y)],attributes:{...vi.attributes,...y}};x=[Ns.raw,[Cl,Ie],Ns.harden]}return C!=null&&C.math&&(x=[...x,C.math.rehypePlugin]),X&&d&&(x=[...x,X.rehypePlugin]),x},[a,C?.math,X,d,y]),E=Ne(()=>{if(!d||G.length===0)return!1;let J=G.at(-1);return U0(J)||h6(J)},[d,G]),ke=Ne(()=>T&&d&&!E?{"--streamdown-caret":`"${B6[T]}"`}:void 0,[T,d,E]);return t==="static"?m(ws.Provider,{value:C??null,children:m(et.Provider,{value:ue,children:m("div",{className:Z("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),children:m(j0,{components:Q,rehypePlugins:ie,remarkPlugins:j,...R,children:$})})})}):m(ws.Provider,{value:C??null,children:m(et.Provider,{value:ue,children:m("div",{className:Z("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",T&&!E?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:ke,children:[G.length===0&&T&&d&&m("span",{}),G.map((J,x)=>{let Ie=x===G.length-1,me=d&&Ie&&U0(J);return m(p,{components:Q,content:J,index:x,isIncomplete:me,rehypePlugins:ie,remarkPlugins:j,shouldNormalizeHtmlIndentation:r,shouldParseIncompleteMarkdown:n,...R},se[x])})]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation);J0.displayName="Streamdown";var U6=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let u=Ce(null),c=Ce(null),[h,d]=fe(s),[f,p]=fe({x:0,y:0}),[g,T]=fe(!1),[C,w]=fe({x:0,y:0}),[A,y]=fe({x:0,y:0}),R=$e(I=>{d(G=>Math.max(n,Math.min(r,G+I)))},[n,r]),M=$e(()=>{R(i)},[R,i]),v=$e(()=>{R(-i)},[R,i]),Y=$e(()=>{d(s),p({x:0,y:0})},[s]),D=$e(I=>{I.preventDefault();let G=I.deltaY>0?-i:i;R(G)},[R,i]),$=$e(I=>{if(I.button!==0||I.isPrimary===!1)return;T(!0),w({x:I.clientX,y:I.clientY}),y(f);let G=I.currentTarget;G instanceof HTMLElement&&G.setPointerCapture(I.pointerId)},[f]),S=$e(I=>{if(!g)return;I.preventDefault();let G=I.clientX-C.x,se=I.clientY-C.y;p({x:A.x+G,y:A.y+se})},[g,C,A]),U=$e(I=>{T(!1);let G=I.currentTarget;G instanceof HTMLElement&&G.releasePointerCapture(I.pointerId)},[]);return Ee(()=>{let I=u.current;if(I)return I.addEventListener("wheel",D,{passive:!1}),()=>{I.removeEventListener("wheel",D)}},[D]),Ee(()=>{let I=c.current;if(I&&g)return document.body.style.userSelect="none",I.addEventListener("pointermove",S,{passive:!1}),I.addEventListener("pointerup",U),I.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",I.removeEventListener("pointermove",S),I.removeEventListener("pointerup",U),I.removeEventListener("pointercancel",U)}},[g,S,U]),m("div",{className:Z("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:u,style:{cursor:g?"grabbing":"grab"},children:[a?m("div",{className:Z("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:M,title:"Zoom in",type:"button",children:m(Uy,{size:16})}),m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:v,title:"Zoom out",type:"button",children:m(zy,{size:16})}),m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:Y,title:"Reset zoom and pan",type:"button",children:m(Hy,{size:16})})]}):null,m("div",{className:Z("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:$,ref:c,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},eh=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=fe(null),[o,u]=fe(!1),[c,h]=fe(""),[d,f]=fe(""),[p,g]=fe(0),{mermaid:T}=qe(et),C=As(),w=T?.errorComponent,{shouldRender:A,containerRef:y}=Ty({immediate:r});if(Ee(()=>{if(A){if(!C){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),u(!0);let M=C.getMermaid(n),v=e.split("").reduce(($,S)=>($<<5)-$+S.charCodeAt(0)|0,0),Y=`mermaid-${Math.abs(v)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:D}=await M.render(Y,e);h(D),f(D)}catch(M){if(!(d||c)){let v=M instanceof Error?M.message:"Failed to render Mermaid chart";s(v)}}finally{u(!1)}})()}},[e,n,p,A,C]),!(A||c||d))return m("div",{className:Z("my-4 min-h-[200px]",t),ref:y});if(o&&!c&&!d)return m("div",{className:Z("my-4 flex justify-center p-4",t),ref:y,children:m("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[m("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),m("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!d)return w?m("div",{ref:y,children:m(w,{chart:e,error:a,retry:()=>g(v=>v+1)})}):m("div",{className:Z("rounded-md bg-red-50 p-4",t),ref:y,children:[m("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),m("details",{className:"mt-2",children:[m("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),m("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let R=c||d;return m("div",{className:Z("size-full",t),"data-streamdown":"mermaid",ref:y,children:m(U6,{className:Z(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:m("div",{"aria-label":"Mermaid chart",className:Z("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:R},role:"img"})})})};function z6({href:e,children:t}){return m("a",{href:e,target:"_blank",rel:"noopener noreferrer",class:"fr hover:text-a-9 focus-visible:rounded-kin-xs text-inherit underline underline-offset-2 transition-all hover:underline-offset-4",children:t})}const $6={a:z6};function Ls({content:e,isStreaming:t=!1}){return e?m(J0,{className:"kin-markdown text-n-12 text-sm leading-relaxed",isAnimating:t,mode:t?"streaming":"static",components:$6,children:e}):null}const Y6=.25,j6=.4,V6=10,q6=5,th=240,nh=()=>({pointerId:null,startX:0,startY:0,startTime:0,targetHeight:0,currentTranslateY:0,threshold:0,phase:"idle"});function Si(e){e.style.removeProperty("transform"),e.style.removeProperty("will-change"),e.style.removeProperty("transition")}function W6(e,t,n){if(!(e instanceof Element)||e.closest("button,input,textarea,select,a"))return!1;if(n!=="mouse"){let r=e;for(;r&&r!==t;){const i=window.getComputedStyle(r);if((/(auto|scroll)/.test(i.overflowY)||/(auto|scroll)/.test(i.overflow))&&r.scrollHeight>r.clientHeight&&r.scrollTop>0)return!1;r=r.parentElement}}return!0}function rh({enabled:e,onClose:t,dragVar:n}){const r=Ce(null),i=Ce(nh()),a=Ce(null),[s,o]=fe(!1),u=()=>{a.current&&(clearTimeout(a.current),a.current=null)},c=A=>{if(!n)return;const y=r.current?.closest("[data-kin-root]");y&&(A===null?y.style.removeProperty(n):y.style.setProperty(n,String(Math.min(1,A))))},h=()=>{const A=i.current.phase;i.current=nh();const y=r.current;y&&(y.style.removeProperty("user-select"),A==="dragging"&&y.toggleAttribute("data-dragging",!1))},d=A=>{if(A===null)return;const y=r.current;y?.hasPointerCapture(A)&&y.releasePointerCapture(A)},f=()=>{const A=r.current;A&&(c(0),A.style.removeProperty("transition"),A.style.transform="translate3d(0, 0, 0)",setTimeout(()=>{a.current||Si(A),c(null)},th))},p=()=>{if(!e||a.current)return;const A=r.current;if(!A){t();return}o(!0),c(1),A.style.willChange="transform",A.style.removeProperty("transition"),A.style.transform=`translate3d(0, ${A.getBoundingClientRect().height+32}px, 0)`,a.current=setTimeout(()=>{a.current=null,t(),Si(A),o(!1),c(null)},th)},g=A=>{if(!e||a.current||i.current.phase!=="idle"||A.pointerType==="mouse"&&A.button!==0)return;const y=r.current;!y||!W6(A.target,y,A.pointerType)||(i.current={pointerId:A.pointerId,startX:A.clientX,startY:A.clientY,startTime:performance.now(),targetHeight:y.getBoundingClientRect().height,currentTranslateY:0,threshold:A.pointerType==="touch"||A.pointerType==="pen"?V6:q6,phase:"pending"})},T=A=>{const y=i.current;if(y.phase!=="pending"&&y.phase!=="dragging"||y.pointerId!==A.pointerId||a.current)return;const R=r.current;if(!R)return;const M=A.clientX-y.startX,v=A.clientY-y.startY;if(y.phase==="pending"){if(Math.abs(M)<y.threshold&&Math.abs(v)<y.threshold)return;if(Math.abs(v)<=Math.abs(M)||v<=0){h();return}y.phase="dragging",R.toggleAttribute("data-dragging",!0),R.setPointerCapture(A.pointerId),R.style.willChange="transform",R.style.transition="none",R.style.userSelect="none",window.getSelection()?.removeAllRanges()}y.phase==="dragging"&&(y.currentTranslateY=Math.max(0,v),R.style.transform=`translate3d(0, ${y.currentTranslateY}px, 0)`,y.targetHeight>0&&c(y.currentTranslateY/y.targetHeight),A.preventDefault())},C=A=>{const y=i.current;if(y.pointerId!==A.pointerId)return;d(y.pointerId);const R=y.phase==="dragging";h(),R&&f()},w=A=>{const y=i.current;if(y.pointerId!==A.pointerId)return;if(d(y.pointerId),y.phase!=="dragging"){h();return}const R=y.currentTranslateY,M=Math.max(1,performance.now()-y.startTime),v=R/M,Y=R>=y.targetHeight*Y6||v>j6;h(),Y?p():f()};return Ee(()=>{if(e)return;u(),o(!1),h(),c(null);const A=r.current;A&&Si(A)},[e]),Ee(()=>()=>{u(),c(null);const A=r.current;A&&(A.toggleAttribute("data-dragging",!1),Si(A))},[]),{shellRef:r,isClosing:s,closeWithSlideOut:p,dragHandlers:{onPointerDown:g,onPointerMove:T,onPointerUp:w,onPointerCancel:C}}}function G6({onClose:e,ariaLabel:t,children:n}){const r=F.embedded.value,{shellRef:i,isClosing:a,closeWithSlideOut:s,dragHandlers:o}=rh({enabled:!0,onClose:e,dragVar:"--kin-overlay-drag"}),[u,c]=fe(!1);return Ee(()=>{requestAnimationFrame(()=>c(!0))},[]),Ee(()=>{const h=d=>{d.key==="Escape"&&(d.stopPropagation(),s())};return document.addEventListener("keydown",h,{capture:!0}),()=>document.removeEventListener("keydown",h,{capture:!0})},[s]),m(he,{children:[m("div",{class:mh({visible:u&&!a}),style:u&&!a?{opacity:"calc(1 - var(--kin-overlay-drag, 0))"}:void 0,"aria-hidden":"true",onClick:s}),m("div",{ref:i,class:ph({layout:r?"embedded":"open",class:`animate-kin-drawer-in ${r?"absolute inset-0 [--kin-inset:0px]":"[--kin-inset:2rem]"}`}),role:"dialog","aria-modal":"true","aria-label":t,...o,children:[m("div",{"aria-hidden":"true",class:"bg-n-5/50 absolute left-1/2 top-2 h-1 w-12 -translate-x-1/2 rounded-full"}),n(s)]})]})}function Rs({text:e,icon:t=Zi}){return m("div",{class:"text-n-9 flex items-center gap-1.5 text-xs",children:[m(t,{class:"size-3 shrink-0 animate-pulse"}),m("span",{class:"animate-kin-shimmer bg-[linear-gradient(90deg,oklch(var(--n-9))_40%,oklch(var(--n-11))_50%,oklch(var(--n-9))_60%)] bg-[length:200%_100%] bg-clip-text text-transparent",children:e})]})}const Q6={location:Ef,type:Tf,salary:_f};function K6({details:e}){return e.length===0?null:m("div",{class:"text-n-10 flex flex-wrap gap-x-2.5 gap-y-1 text-xs",children:e.map(t=>{const n=Q6[t.key];return m("span",{class:"flex items-center gap-1",children:[n&&m(n,{class:"size-3 shrink-0"}),t.value]},t.key)})})}function ih({job:e}){return m("div",{class:"flex min-w-0 flex-1 flex-col gap-1 py-1 pl-2",children:[m("p",{class:"text-n-12 text-sm font-semibold leading-tight",children:e.title}),m(K6,{details:e.details})]})}function X6({jobs:e}){const[t,n]=fe(null),r=i=>{n(a=>a===i?null:i)};return m("div",{class:"grid gap-2 py-1.5",children:e.map(i=>m(J6,{job:i,open:t===i.id,onToggle:()=>r(i.id)},i.id))})}function Z6(){F.overlay.value=null}function ah(e,t){t&&t.status!=="error"||(F.setJobDetail(e,{status:"loading",error:void 0}),F.requestJobDetail.value?.(e))}function J6({job:e,open:t,onToggle:n}){const r=F.jobDetails.value[e.id],i=r?.status==="streaming"?r.liveSummary:r?.summary,a=()=>{t||ah(e.id,r),n()},s=()=>{ah(e.id,r),F.overlay.value=m(e5,{job:e})};return m("div",{class:"corner-smooth rounded-kin-xl outline-n-3 bg-n-2 flex flex-col overflow-clip outline outline-1",children:[m("button",{type:"button",class:"hover:bg-n-3/50 active:bg-n-3/75 flex flex-1 items-center py-1 pl-1 pr-2 text-left transition-colors duration-200",onClick:a,"aria-expanded":t,children:[m(ih,{job:e}),m(Po,{class:Hi("text-n-9 ease-kin-fluid duration-kin size-3.5 shrink-0 transition-transform",t&&"rotate-180"),strokeWidth:2})]}),m("div",{class:Hi("duration-kin ease-kin-fluid grid transition-all",t?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),children:m("div",{class:"overflow-hidden",children:m("div",{class:"border-n-3 flex flex-col gap-2 border-t px-3 py-3",children:!r||r.status==="loading"?m(Rs,{text:"Loading job details…"}):r.status==="error"?m("p",{class:"text-n-9 text-xs",children:r.error}):m(he,{children:[i&&m(he,{children:[m("div",{class:"kin-markdown text-n-11 text-xs leading-relaxed",children:m(Ls,{content:i,isStreaming:r.status==="streaming"})}),m("p",{class:"text-n-9 text-[11px] italic",children:"AI-generated summary (may contain inaccuracies)"})]}),!i&&r.status==="streaming"&&m(Rs,{text:"Generating summary…"}),r.description&&m("div",{class:"flex gap-2",children:[m("button",{type:"button",class:xt({variant:"neutral",size:"sm",class:"flex-1"}),onClick:s,children:"Full description"}),e.applyUrl&&m("a",{href:e.applyUrl,target:"_blank",rel:"noopener noreferrer",class:xt({variant:"accent",size:"sm",class:"flex-1"}),onClick:o=>o.stopPropagation(),children:"Apply now"})]})]})})})})]})}function e5({job:e}){const t=F.jobDetails.value[e.id];return m(G6,{onClose:Z6,ariaLabel:`Job details: ${e.title}`,children:n=>m(he,{children:[m("header",{class:"from-a-2/50 relative flex select-none items-start justify-between bg-gradient-to-b to-transparent p-3 pb-1",children:[m(ih,{job:e}),m("button",{type:"button",class:xt({variant:"neutral",size:"iconSm"}),onClick:n,"aria-label":"Close",children:m(No,{strokeWidth:2})})]}),m("div",{class:oh({class:"pl-5 pr-5 text-sm sm:px-5"}),children:t?.description?m("div",{dangerouslySetInnerHTML:{__html:t.description}}):m("p",{class:"text-n-9 text-sm",children:"No description available."})}),e.applyUrl&&m("div",{class:"flex p-4 pt-2",children:m("a",{href:e.applyUrl,target:"_blank",rel:"noopener noreferrer",class:xt({variant:"accent",size:"md",class:"flex-1"}),onClick:r=>r.stopPropagation(),children:"Apply now"})})]})})}const t5={thinking:{text:"Thinking…",icon:Zi},responding:{text:"Writing response…",icon:Do},processing_results:{text:"Processing results…",icon:Zi},processing_cv:{text:"Scanning your CV…",icon:Oo},searchJobs:{text:"Searching jobs…",icon:Ro},matchJobs:{text:"Matching jobs…",icon:Ro},searchKnowledge:{text:"Searching company info…",icon:mf},getProfileSummary:{text:"Reviewing your profile…",icon:Oo},updatePreferences:{text:"Updating your preferences…",icon:gf},remember:{text:"Saving details…",icon:bf},suggestQuickReplies:{text:"Preparing reply options…",icon:Do}},sh=kt({base:"animate-kin-message-in flex max-w-[95%] flex-col",variants:{side:{user:"self-end",assistant:"self-start w-full gap-2.5 p-1"}}}),oh=kt({base:"[&::-webkit-scrollbar-thumb]:bg-n-4 [&::-webkit-scrollbar-thumb]:rounded-kin-xs flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-none scroll-smooth break-words py-4 [mask-image:linear-gradient(to_bottom,transparent_0,_black_1.5rem,_black_calc(100%-1.5rem),transparent_100%),linear-gradient(black,black)] [mask-size:calc(100%-6px)_100%,6px_100%] [mask-position:0_0,100%_0] [mask-repeat:no-repeat,no-repeat] sm:overscroll-auto [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5"});function n5(){const e=Ce(null);return m("div",{ref:e,class:oh({class:"pl-safe-l pr-safe-r sm:px-4 [&>:first-child]:mt-auto"}),role:"log","aria-label":"Chat messages","aria-live":"polite","aria-relevant":"additions",children:[m(i5,{}),m(a5,{}),m(s5,{}),m(r5,{containerRef:e})]})}function r5({containerRef:e}){const[t,n]=fe(!0),r=Ce(!1),i=F.messages.value.length,a=F.messages.value.at(-1)?.role==="user",s=F.liveAssistantMessage.value?.content,o=F.assistantStatus.value,u=F.quickReplies.value.length,c=()=>{const h=e.current;h&&(r.current=!0,h.scrollTop=h.scrollHeight,n(!0))};return Ee(()=>{const h=e.current;if(!h)return;c();const d=()=>{const f=h.scrollHeight-h.scrollTop-h.clientHeight<80;r.current?r.current=!f:n(f)};return h.addEventListener("scroll",d,{passive:!0}),()=>h.removeEventListener("scroll",d)},[]),Ee(()=>{(t||a)&&c()},[i,s,o,u,a]),t?null:m("button",{type:"button",class:xt({variant:"neutral",size:"iconSm",class:"animate-kin-fade-in absolute bottom-3 left-1/2 -translate-x-1/2"}),"aria-label":"Scroll to latest message",onClick:c,children:m(Po,{strokeWidth:2})})}function i5(){const e=F.messages.value.length,t=!!(F.liveAssistantMessage.value||F.isStreaming.value||F.assistantStatus.value);return e||t?null:m("div",{class:"animate-kin-fade-in my-auto px-6 py-6 text-center",style:{animationDelay:"150ms"},children:[m("div",{class:"text-n-9 mx-auto mb-4 size-12 opacity-50","aria-hidden":"true",children:m(cf,{class:"h-full w-full"})}),m("p",{class:"text-n-12 mb-2 text-base",children:"Hi there, you're speaking with Kin AI Agent."}),m("p",{class:"text-n-9 text-sm",children:"How can I help you today?"})]})}function a5(){return m(he,{children:F.messages.value.filter(e=>e.role==="assistant"?!!e.content.trim()||!!e.blocks?.length:e.role==="user"?!!e.content.trim()||!!e.attachment:!0).map((e,t)=>m(o5,{message:e,animationIndex:t},e.id))})}function uh({statusMeta:e,timestamp:t}){return m("div",{class:"text-n-9 border-n-4 inline-flex items-center gap-1.5 self-start border-t pt-1.5 text-xs first:border-t-0 first:pt-0","aria-hidden":"true",children:e?m(Rs,{...e}):m("span",{children:["Kin • AI Agent • ",t?l5(t):"typing..."]})})}function s5(){const e=F.liveAssistantMessage.value,t=F.isStreaming.value,n=F.assistantStatus.value,r=n?t5[n]:void 0;return!e&&!t&&!r?null:m("article",{class:sh({side:"assistant"}),"aria-label":"Message from Kin AI Agent",children:[e?.content&&m(Ls,{content:e.content,isStreaming:t}),m(uh,{statusMeta:r,timestamp:t?void 0:e?.timestamp})]})}function o5({message:e,animationIndex:t}){const{role:n,content:r,timestamp:i,attachment:a,blocks:s}=e,o=n==="user",u=Math.min((t+1)*.05,.35);return n==="system"?m("div",{class:"flex justify-center px-4 py-2",role:"status","aria-label":"System notification",children:m("span",{class:"border-n-6/40 bg-n-3 text-n-9 corner-smooth rounded-kin-lg border px-3 py-1.5 text-xs",children:r})}):m("article",{class:sh({side:o?"user":"assistant"}),style:{animationDelay:`${u}s`},"aria-label":`Message from ${o?"You":"Kin AI Agent"}`,children:[o&&m("div",{class:"bg-n-3 text-n-12 corner-smooth rounded-kin-lg relative px-3.5 py-2 text-sm",children:[a&&m("div",{class:"text-n-10 flex items-center gap-1.5",children:[m(Lo,{class:"text-n-9 size-3.5 shrink-0"}),m("span",{class:"max-w-full truncate",children:a.name})]}),m("p",{children:r}),m("svg",{class:"text-n-3 absolute -bottom-1.5 right-1.5 w-4","aria-hidden":"true",viewBox:"0 0 16 8",children:m("path",{d:"M15 0S16 3 16 7C16 8 15 7 15 7 11 3 9 2 0 2Z",fill:"currentColor"})})]}),!o&&r&&m(Ls,{content:r}),!o&&s?.map((c,h)=>m(u5,{block:c},h)),!o&&m(uh,{timestamp:i})]})}function u5({block:e}){switch(e.kind){case"job_cards":return m(X6,{jobs:e.jobs});default:return null}}function l5(e){const n=new Date().getTime()-e.getTime();return n<6e4?"Just now":n<36e5?`${Math.floor(n/6e4)}m ago`:e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function lh({content:e,children:t}){const[n,r]=fe(!1),i=Ce(null),a=Ce(null),s=t.props,o=to(t,{ref:i,onMouseEnter:Ii(s.onMouseEnter,()=>r(!0)),onMouseLeave:Ii(s.onMouseLeave,()=>r(!1)),onFocus:Ii(s.onFocus,()=>r(!0)),onBlur:Ii(s.onBlur,()=>r(!1))});Ee(()=>{if(!n)return;const c=h=>{i.current&&!h.composedPath().includes(i.current)&&r(!1)};return document.addEventListener("pointerdown",c),()=>document.removeEventListener("pointerdown",c)},[n]),$h(()=>{const c=i.current,h=a.current;if(!n||!c||!h)return;const d=c.getBoundingClientRect(),f=h.offsetWidth,p=h.offsetHeight,g=d.top>p+8,T=Math.max(4,Math.min(d.left+(d.width-f)/2,innerWidth-f-4)),C=d.left+d.width/2-T;h.setAttribute("data-side",g?"top":"bottom"),h.style.left=`${T}px`,h.style.top=`${g?d.top-p-6:d.bottom+6}px`,h.style.setProperty("--ax",`${C-12}px`),h.style.setProperty("--origin",`${C}px ${g?"100%":"0%"}`),requestAnimationFrame(()=>h.setAttribute("data-open",""))},[n,e]);const u=n?i.current?.closest("[data-kin-root]"):null;return m(he,{children:[o,u&&jo(m("span",{ref:a,"data-side":"top",role:"tooltip",class:"bg-n-12 text-n-1 corner-smooth ease-out-back rounded-kin-sm duration-kin group pointer-events-none fixed z-[999999] origin-[--origin] scale-90 whitespace-nowrap px-2.5 py-1.5 text-xs opacity-0 transition-[opacity,transform] data-[open]:scale-100 data-[open]:opacity-100 data-[open]:delay-300",children:[e,m("svg",{viewBox:"0 0 32 32","aria-hidden":"true",class:"fill-n-12 absolute left-[--ax] w-6 group-data-[side=bottom]:-top-6 group-data-[side=top]:-bottom-6 group-data-[side=top]:rotate-180",children:m("path",{d:"M3 32C9 32 10 31 15 26Q16 25 17 26C22 31 23 32 29 32"})})]}),u)]})}function Ii(e,t){return typeof e=="function"?(...n)=>{e(...n),t()}:t}const c5=kt({base:"relative animate-none flex min-h-0 w-full flex-1 flex-col overflow-hidden",variants:{embedded:{false:"sm:animate-kin-panel-in [will-change:transform,opacity]"}}}),ch=kt({base:"transition-all duration-kin ease-kin-fluid col-span-full row-span-full",variants:{show:{false:"scale-50 opacity-0 blur-sm",true:"scale-100 opacity-100 blur-0"}}});function d5({embedded:e=!1,onClose:t,onClearData:n,onSkipToInput:r}){const[i,a]=fe(!1),s=Ce(),o=()=>{clearTimeout(s.current),a(!1)};Ee(()=>()=>clearTimeout(s.current),[]);const u=c=>{if(c.key==="Escape"){if(c.preventDefault(),i){o();return}e||t()}};return m("div",{class:c5({embedded:e}),"aria-labelledby":"kin-panel-title",onKeyDown:u,onClick:()=>i&&o(),children:[m("button",{type:"button",class:"fr bg-n-2 text-n-12 rounded-kin-sm absolute -top-full left-1/2 z-50 -translate-x-1/2 px-3 py-1.5 text-sm font-medium no-underline focus:top-2",onClick:r,children:"Skip to chat input"}),m("header",{class:"from-a-2/50 relative flex select-none items-center justify-between bg-gradient-to-b to-transparent p-3",children:[m("h2",{id:"kin-panel-title",class:"text-n-12 m-0 pl-2 text-base font-semibold sm:text-sm sm:font-medium",children:"Kin Assistant"}),!e&&m("div",{"aria-hidden":"true",class:"bg-n-5/50 absolute left-1/2 top-2 h-1 w-12 -translate-x-1/2 rounded-full"}),m("div",{class:"flex items-center gap-1.5",children:[m(lh,{content:i?"Click again to confirm":"Clear my data",children:m("button",{class:xt({variant:i?"accent":"ghost",size:"iconSm",class:"grid place-items-center"}),"aria-label":i?"Confirm clear data":"Clear my data",type:"button",onMouseDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),i?(n(),o()):a(!0)},onMouseLeave:()=>{i&&(s.current=setTimeout(o,2e3))},onMouseEnter:()=>clearTimeout(s.current),children:[m(hf,{class:ch({show:!i})}),m(ff,{class:ch({show:i})})]})}),!e&&m("button",{class:xt({variant:"neutral",size:"iconSm"}),"aria-label":"Close chat",type:"button",onClick:t,children:m(No,{strokeWidth:2})})]})]}),m(n5,{})]})}const h5={"application/pdf":{maxSize:1e7},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{maxSize:1e7},"application/msword":{maxSize:1e7},"text/plain":{maxSize:1e6},"image/jpeg":{maxSize:1e7},"image/png":{maxSize:1e7},"image/webp":{maxSize:1e7}},f5=".pdf,.docx,.doc,.txt,.jpg,.jpeg,.png,.webp";function p5(e){const t=h5[e.type];return t?e.size>t.maxSize?{valid:!1,error:`File is too large. Maximum size is ${Math.round(t.maxSize/1e6)}MB.`}:e.size===0?{valid:!1,error:"The file appears to be empty."}:{valid:!0}:{valid:!1,error:"Unsupported file format. Please upload a PDF, Word document, text file, or image."}}function m5(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{typeof r.result=="string"?t(r.result):n(new Error("Failed to read file"))},r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function g5({url:e,onMessage:t,onOpen:n,onClose:r,onError:i}){let a=null,s=[];const o=()=>a?.readyState===WebSocket.OPEN,u=f=>{o()&&a.send(JSON.stringify(f))},c=f=>u({type:"user_message",content:f}),h=()=>{if(o()){for(const f of s)c(f);s.length=0}};return(()=>{a=new WebSocket(e),a.onopen=()=>{n(),h()},a.onmessage=f=>{try{const p=JSON.parse(f.data);t(p)}catch{}},a.onclose=()=>{s=[],r(),a=null},a.onerror=f=>{i(f)}})(),{sendMessage:f=>{a&&(o()?c(f):a.readyState===WebSocket.CONNECTING&&s.push(f))},uploadFile:async(f,p)=>{if(!o())return{success:!1,error:"Not connected"};const g=p5(f);if(!g.valid)return{success:!1,error:g.error};try{const T=await m5(f);return o()?(u({type:"file_upload",fileType:p,fileName:f.name,mimeType:f.type,data:T}),{success:!0}):{success:!1,error:"Connection lost while reading file. Please try again."}}catch(T){return{success:!1,error:T instanceof Error?T.message:"Failed to read file"}}},requestJobDetail:f=>{u({type:"job_detail",jobId:f})},clearData:()=>{u({type:"clear_data"})},disconnect:()=>{a&&(a.close(),a=null)},isConnected:()=>a?.readyState===WebSocket.OPEN}}const dh=2e3,hh="absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-kin-sm bg-red-600 px-3 py-2 text-xs text-white animate-kin-error-in",b5=kt({base:"w-full pt-1 px-2 pb-safe-b focus-within:pb-2 transition-all duration-kin ease-kin-fluid group-data-[placement=embedded]:pb-2",variants:{panelOpen:{true:"bg-gradient-to-b from-transparent to-n-2",false:"px-5 sm:px-14 group-data-[placement=left]:sm:pl-2 group-data-[placement=left]:sm:pr-24 group-data-[placement=right]:sm:pl-24 group-data-[placement=right]:sm:pr-2"}}}),E5=kt({base:"border outline relative flex p-0.5 gap-1 flex-col corner-smooth rounded-kin-3xl bg-highest transition-all duration-kin ease-kin-fluid",variants:{panelOpen:{true:"outline-1 outline-transparent border-n-4 focus-within:outline-[3px] focus-within:outline-a-4/50 focus-within:border-a-6/50 shadow-md shadow-n-4/30",false:"outline-2 outline-a-9 border-transparent shadow-xl shadow-a-9/10"},unread:{true:"after:absolute after:-inset-0.5 after:outline-offset-2 after:outline after:outline-a-9/20 after:outline-2 after:rounded-kin-3xl after:corner-smooth after:pointer-events-none after:animate-kin-pulse after:content-['']"}}});function _5({panelOpen:e,suggestions:t,onSubmit:n,onEscape:r,onFocus:i,onBlur:a,onUploadFile:s,inputRef:o}){const[u,c]=fe(""),h=Ce(null),d=F.isStreaming.value,f=F.connectionState.value,p=F.uploadState.value,g=F.uploadError.value,T=F.uploadFileName.value,C=f==="connected",w=f==="connecting",A=f==="disconnected",y=f==="idle",R=p==="uploading"||p==="processing",M=u.length>dh,v=u.trim(),Y=v.length>0,D=t.length>0,$=T?`Uploading ${T}...`:"Uploading file...",S=Y&&!d&&!R&&!M&&(C||w),U=C&&!d&&!R,I=D?"Or type a message...":R?$:w?"Connecting...":A?"Disconnected – Tap to retry":d?"Waiting for response...":!e&&F.hasUnreadMessages.value?"You have a new reply":!e&&F.messages.value.length>0?"Continue conversation...":"Ask me anything...",G=R?$:d?"Waiting for response":y?"Click to connect":w?"Connecting...":Y?C?"Send message":"Cannot send message":"Enter a message to send",se=R?$:U?"Attach file (CV, document, or image)":"Cannot upload file",X=j=>{j.preventDefault(),S&&(n(v),c(""),o.current&&(o.current.style.height="auto"))},ue=j=>{j.key==="Enter"&&!j.shiftKey?(j.preventDefault(),X(j)):j.key==="Escape"&&(j.preventDefault(),j.stopPropagation(),r())},Q=j=>{const ie=j.target,E=ie.files?.[0];E&&s(E,"cv"),ie.value=""};return m("div",{class:b5({panelOpen:e}),role:"search","aria-label":"Chat with Kin AI",children:m("form",{onSubmit:X,class:E5({panelOpen:e,unread:!e&&F.hasUnreadMessages.value}),autoComplete:"off",children:[D&&m("div",{class:"bg-n-3/75 corner-smooth shadow-n-4/50 rounded-b-kin-sm rounded-t-kin-2xl flex flex-wrap gap-1.5 p-2 shadow-inner","aria-label":"Suggested prompts",children:t.map((j,ie)=>m("button",{type:"button",class:"fr bg-highest animate-kin-pop-in text-n-11 corner-smooth outline-n-4/50 hover:outline-n-7/50 hover:text-n-12 rounded-kin-xl ease-kin-click inline-flex items-center whitespace-nowrap px-3 py-1.5 text-sm outline outline-1 transition-all hover:outline-2 active:scale-95",style:{animationDelay:`${.05+ie*.05}s`},onPointerDown:E=>E.preventDefault(),onClick:()=>n(j.value),children:j.label},j.id))}),m("div",{class:"flex items-end gap-1 p-1 pl-3",children:[m("label",{for:"kin-input",class:"sr-only",children:"Ask Kin a question"}),m("textarea",{id:"kin-input",ref:o,rows:1,enterkeyhint:"send",class:"text-n-12 placeholder:text-n-9 -my-[0.125em] max-h-[6.5em] min-w-0 flex-1 resize-none self-center overflow-y-auto overscroll-none border-none bg-transparent px-0 py-[0.25em] text-base outline-none [mask-image:linear-gradient(to_bottom,transparent_0,_black_0.5em,_black_calc(100%-0.5em),transparent_100%)] disabled:cursor-not-allowed sm:text-sm",placeholder:I,value:u,onInput:j=>{const ie=j.target;c(ie.value),ie.style.height="auto",ie.style.height=`${ie.scrollHeight}px`},onFocus:i,onBlur:j=>a(j.relatedTarget),onKeyDown:ue,"aria-describedby":"kin-input-status",autoComplete:"off",disabled:R}),m("input",{ref:h,type:"file",class:"sr-only",accept:f5,onChange:Q,"aria-hidden":"true",tabIndex:-1}),m(lh,{content:se,children:m("button",{type:"button",class:xt({variant:"ghost"}),disabled:!U,"aria-label":se,onPointerDown:j=>j.preventDefault(),onClick:()=>h.current?.click(),children:R?m(pf,{class:"animate-kin-spin"}):m(Lo,{})})}),m("button",{type:"submit",class:xt({variant:"accent"}),disabled:!S,"aria-label":G,onPointerDown:j=>j.preventDefault(),children:m(df,{strokeWidth:2})})]}),m("div",{id:"kin-input-status",class:"sr-only",role:"status","aria-live":"polite",children:[w&&"Connecting to Kin...",A&&"Connection lost. Click input to retry.",d&&"Kin is responding...",R&&$]}),g&&p==="error"&&m("div",{class:`${hh} max-w-[calc(100%-32px)] truncate`,role:"alert",children:g}),M&&m("div",{class:hh,role:"alert",children:["Message too long (",u.length.toLocaleString(),"/",dh.toLocaleString()," characters)"]})]})})}const T5="(hover: none) and (pointer: coarse)",k5='a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function fh(){let e=document.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}const ph=kt({base:"pointer-events-auto sm:w-[480px] rounded-t-kin-4xl flex w-full flex-col transition-all outline outline-1 outline-transparent duration-kin sm:rounded-kin-4xl corner-smooth ease-kin-fluid group-data-[placement=left]:sm:left-4 group-data-[placement=right]:sm:right-4 group-data-[placement=center]:sm:justify-self-center",variants:{layout:{embedded:"h-full rounded-none bg-n-1 outline-none sm:w-full sm:rounded-none self-stretch",closed:"bottom-0 sm:bottom-4 self-end absolute",open:"bottom-0 absolute self-end sm:bottom-4 sm:min-h-[50vh] h-[calc(var(--kin-vv-h,100dvh)_-_var(--kin-inset,1.5rem))] sm:h-auto top-[calc(var(--kin-vv-top,0px)_+_var(--kin-inset,1.5rem))] sm:top-auto bg-n-1 overflow-hidden sm:max-h-[calc(min(90vh,var(--kin-vv-h,90svh))_-_var(--kin-inset,1.5rem))] outline-n-6/50 shadow-2xl shadow-n-6/30 [touch-action:manipulation]"}}}),mh=kt({base:"absolute inset-0 bg-black/20 transition-opacity duration-kin ease-kin-fluid",variants:{visible:{false:"pointer-events-none opacity-0",true:"pointer-events-auto opacity-100"}}});function x5({starterPrompts:e,onSendMessage:t,onOpen:n,onClose:r,onConnect:i,onClearData:a,onUploadFile:s,placement:o="center"}){const u=o==="embedded";F.embedded.value=u;const c=F.isOpen.value,h=u?"embedded":c?"open":"closed",d=h!=="closed",[f,p]=fe(!1),g=Ce(null),T=Ce(null),C=Ce(null),w=F.messages.value.length>0,A=F.quickReplies.value,y=!d&&!w&&f&&e.length>0,R=d&&A.length>0,M=y?e.map((Q,j)=>({id:`sp-${j}`,label:Q.label,value:Q.message})):R?A.map((Q,j)=>({id:`qr-${j}`,label:Q,value:Q})):[];Ee(()=>{if(h!=="open"||u)return;const Q=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",()=>{document.documentElement.style.overflow=Q}},[h,u]),Ee(()=>{if(d){const Q=fh();T.current=Q instanceof HTMLElement&&!g.current?.contains(Q)?Q:null,requestAnimationFrame(()=>C.current?.focus())}else p(!1)},[d]),Ee(()=>{u&&!c&&n()},[u,n,c]),Ee(()=>{if(h!=="open")return;const Q=window.matchMedia(T5);if(!Q.matches)return;const j=g.current,ie=window.visualViewport;if(!j||!ie)return;const E=()=>{j.style.setProperty("--kin-vv-h",`${ie.height}px`),j.style.setProperty("--kin-vv-top",`${ie.offsetTop}px`)};E(),ie.addEventListener("resize",E),ie.addEventListener("scroll",E);let ke=0;const J=te=>{ke=te.touches[0]?.clientY??0},x=te=>{const it=ke-(te.touches[0]?.clientY??ke),Ke=te.composedPath(),ge=Ke.indexOf(j);if(ge<0)return;const lt=Ve=>Ve instanceof Element&&(it>0?Ve.scrollTop+Ve.clientHeight<Ve.scrollHeight-1:Ve.scrollTop>0);te.cancelable&&!Ke.slice(0,ge).some(lt)&&te.preventDefault()};document.addEventListener("touchstart",J,{passive:!0}),document.addEventListener("touchmove",x,{passive:!1});const Ie=()=>{ie.removeEventListener("resize",E),ie.removeEventListener("scroll",E),j.style.removeProperty("--kin-vv-h"),j.style.removeProperty("--kin-vv-top"),document.removeEventListener("touchstart",J),document.removeEventListener("touchmove",x)},me=te=>{te.matches||Ie()};return Q.addEventListener("change",me),()=>{Ie(),Q.removeEventListener("change",me)}},[h]),Ee(()=>{if(h!=="open")return;const Q=j=>{if(j.key!=="Tab")return;const ie=g.current;if(!ie)return;const E=ie.querySelectorAll(k5),ke=E[0],J=E[E.length-1];if(!ke||!J)return;const x=fh();j.shiftKey&&x===ke?(j.preventDefault(),J.focus()):!j.shiftKey&&x===J&&(j.preventDefault(),ke.focus())};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[h]);const v=()=>{h==="closed"&&n()},Y=()=>{C.current?.blur(),r(),T.current&&requestAnimationFrame(()=>T.current?.focus())},{shellRef:D,isClosing:$,closeWithSlideOut:S,dragHandlers:U}=rh({enabled:h==="open"&&!u,onClose:Y,dragVar:"--kin-shell-drag"}),I=Q=>{const j=Q.trim();if(!j)return;const ie=F.isStreaming.value,E=F.uploadState.value==="uploading"||F.uploadState.value==="processing",ke=F.connectionState.value;!ie&&!E&&(ke==="connected"||ke==="connecting")&&(F.addMessage({role:"user",content:j}),v(),i(),t(j))},G=()=>{p(!0),i(),!d&&w&&v()},se=Q=>{Q instanceof Node&&g.current?.contains(Q)||p(!1)},X=()=>{d?S():C.current?.blur()},ue=(Q,j)=>{v(),s(Q,j)};return m("div",{ref:g,class:Hi("font-kin text-kin text-n-12 group pointer-events-none",u?"relative h-full":"fixed inset-0 z-[2147483647]"),"data-placement":o,"data-kin-root":!0,role:"region","aria-label":"Kin AI Chat",children:[!u&&m("div",{class:mh({visible:h==="open"&&!$}),style:h==="open"&&!$?{opacity:"calc(1 - var(--kin-shell-drag, 0))"}:void 0,"aria-hidden":"true",onClick:S}),m("div",{ref:D,class:ph({layout:h,class:"group-has-[[data-dragging]]:!transition-none"}),style:F.overlay.value!==null?{transformOrigin:"top",transform:"translate3d(0, calc(-8px + 8px * var(--kin-overlay-drag, 0)), 0) scale(calc(0.96 + 0.04 * var(--kin-overlay-drag, 0)))"}:void 0,role:d&&!u?"dialog":void 0,"aria-modal":d&&!u,...U,children:[m("div",{class:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:d?"Chat panel opened":""}),d&&m(d5,{embedded:u,onClose:S,onClearData:a,onSkipToInput:()=>C.current?.focus()}),m(_5,{panelOpen:d,suggestions:M,onSubmit:I,onEscape:X,onFocus:G,onBlur:se,onUploadFile:ue,inputRef:C})]}),F.overlay.value]})}const y5=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*{box-sizing:border-box;font:inherit;border:0 solid;-webkit-tap-highlight-color:transparent}button{all:unset;cursor:pointer;touch-action:manipulation}ul,ol,li,p{margin:0;padding:0}ul,ol{list-style:none}svg{display:block}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-bottom-1\\.5{bottom:-6px}.-top-full{top:-100%}.bottom-0{bottom:0}.bottom-3{bottom:12px}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.left-\\[--ax\\]{left:var(--ax)}.right-1\\.5{right:6px}.top-2{top:8px}.top-\\[calc\\(var\\(--kin-vv-top\\,0px\\)_\\+_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{top:calc(var(--kin-vv-top,0px) + var(--kin-inset,24px))}.z-50{z-index:50}.z-\\[2147483647\\]{z-index:2147483647}.z-\\[999999\\]{z-index:999999}.col-span-full{grid-column:1 / -1}.row-span-full{grid-row:1 / -1}.m-0{margin:0}.-my-\\[0\\.125em\\]{margin-top:-.125em;margin-bottom:-.125em}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-2{margin-bottom:8px}.mb-4{margin-bottom:16px}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.size-10{width:40px;height:40px}.size-12{width:48px;height:48px}.size-3{width:12px;height:12px}.size-3\\.5{width:14px;height:14px}.size-8{width:32px;height:32px}.h-1{height:4px}.h-\\[calc\\(var\\(--kin-vv-h\\,100dvh\\)_-_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{height:calc(var(--kin-vv-h,100dvh) - var(--kin-inset,24px))}.h-full{height:100%}.max-h-\\[6\\.5em\\]{max-height:6.5em}.min-h-0{min-height:0px}.w-12{width:48px}.w-4{width:16px}.w-6{width:24px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\\[95\\%\\]{max-width:95%}.max-w-\\[calc\\(100\\%-32px\\)\\]{max-width:calc(100% - 32px)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-\\[--origin\\]{transform-origin:var(--origin)}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-50{--tw-scale-x: .5;--tw-scale-y: .5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes kin-drawer-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}.animate-kin-drawer-in{animation:kin-drawer-in .24s var(--kin-fluid-ease) backwards}@keyframes kin-error-in{0%{opacity:0;transform:translate(-50%) translateY(4px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.animate-kin-error-in{animation:kin-error-in .24s ease}@keyframes kin-fade{0%{opacity:0}to{opacity:1}}.animate-kin-fade-in{animation:kin-fade .4s ease both}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-kin-message-in{animation:kin-slide-up .24s var(--kin-fluid-ease) both}@keyframes kin-pop{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}.animate-kin-pop-in{animation:kin-pop .24s cubic-bezier(.34,1.56,.64,1) backwards}@keyframes kin-shimmer{0%{background-position:200% 50%}to{background-position:-200% 50%}}.animate-kin-shimmer{animation:kin-shimmer 2.5s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-kin-spin{animation:spin 1s linear infinite}.animate-none{animation:none}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-4{gap:16px}.gap-x-2\\.5{-moz-column-gap:10px;column-gap:10px}.gap-y-1{row-gap:4px}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-y-auto{overflow-y:auto}.overscroll-none{overscroll-behavior:none}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:4px}.rounded-full{border-radius:9999px}.rounded-kin-2xl{border-radius:var(--kin-r-2xl)}.rounded-kin-3xl{border-radius:var(--kin-r-3xl)}.rounded-kin-lg{border-radius:var(--kin-r-lg)}.rounded-kin-md{border-radius:var(--kin-r-md)}.rounded-kin-sm{border-radius:var(--kin-r-sm)}.rounded-kin-xl{border-radius:var(--kin-r-xl)}.rounded-none{border-radius:0}.rounded-b-kin-sm{border-bottom-right-radius:var(--kin-r-sm);border-bottom-left-radius:var(--kin-r-sm)}.rounded-t-kin-2xl{border-top-left-radius:var(--kin-r-2xl);border-top-right-radius:var(--kin-r-2xl)}.rounded-t-kin-4xl{border-top-left-radius:var(--kin-r-4xl);border-top-right-radius:var(--kin-r-4xl)}.border{border-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-n-3{--tw-border-opacity: 1;border-color:oklch(var(--n-3) / var(--tw-border-opacity, 1))}.border-n-4{--tw-border-opacity: 1;border-color:oklch(var(--n-4) / var(--tw-border-opacity, 1))}.border-n-6\\/40{border-color:oklch(var(--n-6) / .4)}.border-transparent{border-color:transparent}.bg-a-9{--tw-bg-opacity: 1;background-color:oklch(var(--a-9) / var(--tw-bg-opacity, 1))}.bg-black\\/20{background-color:#0003}.bg-highest{--tw-bg-opacity: 1;background-color:oklch(var(--highest) / var(--tw-bg-opacity, 1))}.bg-n-1{--tw-bg-opacity: 1;background-color:oklch(var(--n-1) / var(--tw-bg-opacity, 1))}.bg-n-12{--tw-bg-opacity: 1;background-color:oklch(var(--n-12) / var(--tw-bg-opacity, 1))}.bg-n-2{--tw-bg-opacity: 1;background-color:oklch(var(--n-2) / var(--tw-bg-opacity, 1))}.bg-n-3{--tw-bg-opacity: 1;background-color:oklch(var(--n-3) / var(--tw-bg-opacity, 1))}.bg-n-3\\/75{background-color:oklch(var(--n-3) / .75)}.bg-n-5\\/50{background-color:oklch(var(--n-5) / .5)}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-\\[linear-gradient\\(90deg\\,oklch\\(var\\(--n-9\\)\\)_40\\%\\,oklch\\(var\\(--n-11\\)\\)_50\\%\\,oklch\\(var\\(--n-9\\)\\)_60\\%\\)\\]{background-image:linear-gradient(90deg,oklch(var(--n-9)) 40%,oklch(var(--n-11)) 50%,oklch(var(--n-9)) 60%)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-a-2\\/50{--tw-gradient-from: oklch(var(--a-2) / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-n-2{--tw-gradient-to: oklch(var(--n-2) / 1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-\\[length\\:200\\%_100\\%\\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-n-12{fill:oklch(var(--n-12) / 1)}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-3\\.5{padding-left:14px;padding-right:14px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-6{padding-left:24px;padding-right:24px}.py-1{padding-top:4px;padding-bottom:4px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2{padding-top:8px;padding-bottom:8px}.py-3{padding-top:12px;padding-bottom:12px}.py-4{padding-top:16px;padding-bottom:16px}.py-6{padding-top:24px;padding-bottom:24px}.py-\\[0\\.25em\\]{padding-top:.25em;padding-bottom:.25em}.pb-1{padding-bottom:4px}.pb-safe-b{padding-bottom:max(8px,calc(env(safe-area-inset-bottom,0px) + 8px))}.pl-1{padding-left:4px}.pl-2{padding-left:8px}.pl-3{padding-left:12px}.pl-5{padding-left:20px}.pl-safe-l{padding-left:max(16px,env(safe-area-inset-left,16px))}.pr-2{padding-right:8px}.pr-5{padding-right:20px}.pr-safe-r{padding-right:max(16px,env(safe-area-inset-right,16px))}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-2{padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.font-kin{font-family:var(--kin-font-family)}.text-\\[11px\\]{font-size:11px}.text-base{font-size:16px;line-height:24px}.text-kin{font-size:max(14px,16px);line-height:1.5}.text-sm{font-size:14px;line-height:20px}.text-xs{font-size:12px;line-height:16px}.font-medium{font-weight:500}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.text-inherit{color:inherit}.text-n-1{--tw-text-opacity: 1;color:oklch(var(--n-1) / var(--tw-text-opacity, 1))}.text-n-10{--tw-text-opacity: 1;color:oklch(var(--n-10) / var(--tw-text-opacity, 1))}.text-n-11{--tw-text-opacity: 1;color:oklch(var(--n-11) / var(--tw-text-opacity, 1))}.text-n-12{--tw-text-opacity: 1;color:oklch(var(--n-12) / var(--tw-text-opacity, 1))}.text-n-3{--tw-text-opacity: 1;color:oklch(var(--n-3) / var(--tw-text-opacity, 1))}.text-n-9{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-a-9\\/10{--tw-shadow-color: oklch(var(--a-9) / .1);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-4\\/30{--tw-shadow-color: oklch(var(--n-4) / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-4\\/50{--tw-shadow-color: oklch(var(--n-4) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-6\\/30{--tw-shadow-color: oklch(var(--n-6) / .3);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-1{outline-width:1px}.outline-2{outline-width:2px}.outline-a-9{outline-color:oklch(var(--a-9) / 1)}.outline-n-3{outline-color:oklch(var(--n-3) / 1)}.outline-n-4\\/50{outline-color:oklch(var(--n-4) / .5)}.outline-n-6\\/50{outline-color:oklch(var(--n-6) / .5)}.outline-transparent{outline-color:transparent}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-0{--tw-blur: blur(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-sm{--tw-blur: blur(4px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-kin{transition-duration:.24s}.ease-kin-click{transition-timing-function:cubic-bezier(.5,.1,.9,.1)}.ease-kin-fluid{transition-timing-function:var(--kin-fluid-ease)}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.fr:focus-visible{outline:2px solid oklch(var(--a-9) / .5);outline-offset:2px}.corner-smooth{corner-shape:superellipse(1.25)}.\\[--kin-inset\\:0px\\]{--kin-inset: 0px}.\\[--kin-inset\\:2rem\\]{--kin-inset: 32px}.\\[mask-image\\:linear-gradient\\(to_bottom\\,transparent_0\\,_black_0\\.5em\\,_black_calc\\(100\\%-0\\.5em\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,black .5em,black calc(100% - .5em),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,black .5em,black calc(100% - .5em),transparent 100%)}.\\[mask-image\\:linear-gradient\\(to_bottom\\,transparent_0\\,_black_1\\.5rem\\,_black_calc\\(100\\%-1\\.5rem\\)\\,transparent_100\\%\\)\\,linear-gradient\\(black\\,black\\)\\]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,black 24px,black calc(100% - 24px),transparent 100%),linear-gradient(black,black);mask-image:linear-gradient(to bottom,transparent 0,black 24px,black calc(100% - 24px),transparent 100%),linear-gradient(black,black)}.\\[mask-position\\:0_0\\,100\\%_0\\]{-webkit-mask-position:0 0,100% 0;mask-position:0 0,100% 0}.\\[mask-repeat\\:no-repeat\\,no-repeat\\]{-webkit-mask-repeat:no-repeat,no-repeat;mask-repeat:no-repeat,no-repeat}.\\[mask-size\\:calc\\(100\\%-6px\\)_100\\%\\,6px_100\\%\\]{-webkit-mask-size:calc(100% - 6px) 100%,6px 100%;mask-size:calc(100% - 6px) 100%,6px 100%}.\\[touch-action\\:manipulation\\]{touch-action:manipulation}.\\[will-change\\:transform\\,opacity\\]{will-change:transform,opacity}:host{font-size:16px;--a-1: 99.4% .003 22.8;--a-2: 98.4% .007 31;--a-3: 95.4% .022 30.9;--a-4: 92.6% .047 31.8;--a-5: 89.2% .063 31.5;--a-6: 85.2% .077 32;--a-7: 80.3% .094 32.2;--a-8: 74.1% .118 32.1;--a-9: 62.7% .194 33.3;--a-10: 60.4% .195 33.3;--a-11: 56.7% .198 32.8;--a-12: 34.6% .08 30.5;--n-1: 99.1% 0 0;--n-2: 98.1% 0 0;--n-3: 95.3% 0 0;--n-4: 93% 0 0;--n-5: 90.8% 0 0;--n-6: 88.4% 0 0;--n-7: 85.1% 0 0;--n-8: 79.1% 0 0;--n-9: 64.3% 0 0;--n-10: 60.9% 0 0;--n-11: 50.3% 0 0;--n-12: 24.3% 0 0;--kin-vv-h:calc(100dvh - 16px);--kin-vv-top: 16px;--kin-fluid-ease: cubic-bezier(.88, .77, .12, .98);--kin-font-family: inherit}.kin-markdown p{margin:0 0 1em}.kin-markdown p:last-child{margin-bottom:0}.kin-markdown :is(strong,b){font-weight:600}.kin-markdown :is(em,i){font-style:italic}.kin-markdown code{background:rgba(255,255,255,.1);padding:.15em .4em;border-radius:var(--kin-r-xs);font-family:SF Mono,Monaco,Consolas,monospace;font-size:.875em}.kin-markdown pre{background:rgba(0,0,0,.4);padding:14px 16px;border-radius:var(--kin-r-sm);overflow-x:auto;margin:1em 0;border:1px solid oklch(var(--n-6) / .4)}.kin-markdown pre code{background:none;padding:0;font-size:.85em;line-height:1.5}.kin-markdown :is(ul,ol){margin:.75em 0;padding-left:1.5em}.kin-markdown ul{list-style-type:disc}.kin-markdown ol{list-style-type:decimal}.kin-markdown li{margin:.35em 0}.kin-markdown li::marker{color:oklch(var(--n-9))}.kin-markdown :is(ul,ol) :is(ul,ol){margin:.25em 0}.kin-markdown blockquote{border-left:3px solid oklch(var(--a-9));margin:1em 0;padding:.5em 0 .5em 1em;color:oklch(var(--n-11));font-style:italic}.kin-markdown :is(h1,h2,h3,h4){font-weight:600;margin:1.25em 0 .5em;line-height:1.3}.kin-markdown :is(h1,h2,h3):first-child{margin-top:0}.kin-markdown h1{font-size:1.4em}.kin-markdown h2{font-size:1.25em}.kin-markdown h3{font-size:1.1em}.kin-markdown table{width:100%;border-collapse:collapse;margin:1em 0;font-size:.9em}.kin-markdown :is(th,td){padding:.5em .75em;border:1px solid oklch(var(--n-6) / .4);text-align:left}.kin-markdown th{background:oklch(var(--n-4));font-weight:600}.kin-markdown hr{border:none;border-top:1px solid oklch(var(--n-6) / .4);margin:1.5em 0}.kin-markdown hr+p{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:.75em;color:oklch(var(--n-9));margin:-1em 0 0;line-height:1.6}.kin-markdown input[type=checkbox]{margin-right:.5em;accent-color:oklch(var(--a-9))}.kin-markdown .streamdown-caret{display:inline-block;width:2px;height:1em;background:oklch(var(--a-9));margin-left:2px;animation:kin-caret 1s ease-in-out infinite;vertical-align:text-bottom}@keyframes kin-caret{0%,to{opacity:1}50%{opacity:0}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}[data-dragging],[data-dragging] *{touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:grabbing}.placeholder\\:text-n-9::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.placeholder\\:text-n-9::placeholder{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:-inset-0\\.5:after{content:var(--tw-content);inset:-2px}@keyframes kin-fade-out{0%{content:var(--tw-content);opacity:1}to{content:var(--tw-content);opacity:0}}.after\\:animate-kin-pulse:after{content:var(--tw-content);animation:kin-fade-out 2.5s var(--kin-fluid-ease) infinite alternate-reverse}.after\\:rounded-kin-3xl:after{content:var(--tw-content);border-radius:var(--kin-r-3xl)}.after\\:outline:after{content:var(--tw-content);outline-style:solid}.after\\:outline-2:after{content:var(--tw-content);outline-width:2px}.after\\:outline-offset-2:after{content:var(--tw-content);outline-offset:2px}.after\\:outline-a-9\\/20:after{content:var(--tw-content);outline-color:oklch(var(--a-9) / .2)}.after\\:content-\\[\\'\\'\\]:after{--tw-content: "";content:var(--tw-content)}.after\\:corner-smooth:after{content:var(--tw-content);corner-shape:superellipse(1.25)}.first\\:border-t-0:first-child{border-top-width:0px}.first\\:pt-0:first-child{padding-top:0}.focus-within\\:border-a-6\\/50:focus-within{border-color:oklch(var(--a-6) / .5)}.focus-within\\:pb-2:focus-within{padding-bottom:8px}.focus-within\\:outline-\\[3px\\]:focus-within{outline-width:3px}.focus-within\\:outline-a-4\\/50:focus-within{outline-color:oklch(var(--a-4) / .5)}.hover\\:bg-a-10:hover{--tw-bg-opacity: 1;background-color:oklch(var(--a-10) / var(--tw-bg-opacity, 1))}.hover\\:bg-n-3:hover{--tw-bg-opacity: 1;background-color:oklch(var(--n-3) / var(--tw-bg-opacity, 1))}.hover\\:bg-n-3\\/50:hover{background-color:oklch(var(--n-3) / .5)}.hover\\:bg-n-4:hover{--tw-bg-opacity: 1;background-color:oklch(var(--n-4) / var(--tw-bg-opacity, 1))}.hover\\:text-a-9:hover{--tw-text-opacity: 1;color:oklch(var(--a-9) / var(--tw-text-opacity, 1))}.hover\\:text-n-11:hover{--tw-text-opacity: 1;color:oklch(var(--n-11) / var(--tw-text-opacity, 1))}.hover\\:text-n-12:hover{--tw-text-opacity: 1;color:oklch(var(--n-12) / var(--tw-text-opacity, 1))}.hover\\:underline-offset-4:hover{text-underline-offset:4px}.hover\\:outline-2:hover{outline-width:2px}.hover\\:outline-n-7\\/50:hover{outline-color:oklch(var(--n-7) / .5)}.focus\\:top-2:focus{top:8px}.focus-visible\\:rounded-kin-xs:focus-visible{border-radius:var(--kin-r-xs)}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:bg-n-3\\/75:active{background-color:oklch(var(--n-3) / .75)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:text-n-6:disabled{--tw-text-opacity: 1;color:oklch(var(--n-6) / var(--tw-text-opacity, 1))}.disabled\\:opacity-50:disabled{opacity:.5}.group:has([data-dragging]) .group-has-\\[\\[data-dragging\\]\\]\\:\\!transition-none{transition-property:none!important}.data-\\[open\\]\\:scale-100[data-open]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[open\\]\\:opacity-100[data-open]{opacity:1}.data-\\[open\\]\\:delay-300[data-open]{transition-delay:.3s}.group[data-side=bottom] .group-data-\\[side\\=bottom\\]\\:-top-6{top:-24px}.group[data-side=top] .group-data-\\[side\\=top\\]\\:-bottom-6{bottom:-24px}.group[data-side=top] .group-data-\\[side\\=top\\]\\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-placement=embedded] .group-data-\\[placement\\=embedded\\]\\:pb-2{padding-bottom:8px}@media (min-width: 640px){.sm\\:bottom-4{bottom:16px}.sm\\:top-auto{top:auto}.sm\\:size-7{width:28px;height:28px}.sm\\:size-8{width:32px;height:32px}.sm\\:h-auto{height:auto}.sm\\:max-h-\\[calc\\(min\\(90vh\\,var\\(--kin-vv-h\\,90svh\\)\\)_-_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{max-height:calc(min(90vh,var(--kin-vv-h,90svh)) - var(--kin-inset,24px))}.sm\\:min-h-\\[50vh\\]{min-height:50vh}.sm\\:w-\\[480px\\]{width:480px}.sm\\:w-full{width:100%}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.sm\\:animate-kin-panel-in{animation:kin-slide-up .35s var(--kin-fluid-ease) both}.sm\\:overscroll-auto{overscroll-behavior:auto}.sm\\:rounded-kin-4xl{border-radius:var(--kin-r-4xl)}.sm\\:rounded-kin-xl{border-radius:var(--kin-r-xl)}.sm\\:rounded-none{border-radius:0}.sm\\:px-14{padding-left:56px;padding-right:56px}.sm\\:px-4{padding-left:16px;padding-right:16px}.sm\\:px-5{padding-left:20px;padding-right:20px}.sm\\:text-sm{font-size:14px;line-height:20px}.sm\\:font-medium{font-weight:500}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:left-4{left:16px}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:right-4{right:16px}.group[data-placement=center] .group-data-\\[placement\\=center\\]\\:sm\\:justify-self-center{justify-self:center}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:pl-2{padding-left:8px}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:pr-24{padding-right:96px}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:pl-24{padding-left:96px}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:pr-2{padding-right:8px}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-kin-xs::-webkit-scrollbar-thumb{border-radius:var(--kin-r-xs)}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-n-4::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:oklch(var(--n-4) / var(--tw-bg-opacity, 1))}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-transparent::-webkit-scrollbar-track{background-color:transparent}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:w-1\\.5::-webkit-scrollbar{width:6px}.\\[\\&\\>\\:first-child\\]\\:mt-auto>:first-child{margin-top:auto}.\\[\\&_svg\\]\\:size-3\\.5 svg{width:14px;height:14px}.\\[\\&_svg\\]\\:size-4 svg{width:16px;height:16px}
|
|
121
121
|
`,gh=["gray","mauve","slate","sage","olive","sand","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","bronze","gold"],bh={gray:[[.178,0,null],[.213,0,null],[.254,0,null],[.283,0,null],[.313,0,null],[.349,0,null],[.402,0,null],[.488,0,null],[.538,0,null],[.584,0,null],[.77,0,null],[.949,0,null]],mauve:[[.18,.004,307.8],[.215,.004,307.8],[.255,.006,306.5],[.284,.008,307.8],[.314,.009,306.9],[.35,.01,304],[.402,.012,304.4],[.492,.016,300.7],[.54,.017,294],[.586,.017,295.4],[.77,.014,296.6],[.949,.003,286.3]],slate:[[.179,.004,286],[.213,.004,264.4],[.253,.006,261.2],[.283,.007,259.5],[.311,.008,259.7],[.346,.01,256.5],[.398,.012,253.8],[.49,.016,247.6],[.537,.015,261.1],[.583,.014,263.3],[.768,.01,261.3],[.949,.003,264.6]],sage:[[.179,.004,167.4],[.211,.004,160.2],[.251,.004,164.2],[.281,.005,164.9],[.311,.005,167.4],[.347,.006,167.4],[.399,.008,167.4],[.488,.009,169.8],[.533,.018,170.8],[.579,.016,170.5],[.766,.01,167.5],[.947,.002,167.7]],olive:[[.18,.004,128.3],[.212,.004,128.3],[.252,.005,129],[.281,.006,131.4],[.31,.007,131.4],[.346,.008,134.4],[.399,.01,136],[.488,.012,140.8],[.535,.018,139.6],[.581,.016,140.1],[.766,.013,139.5],[.947,.003,144.8]],sand:[[.178,.002,106.6],[.213,.002,106.6],[.253,.003,106.6],[.283,.004,99],[.312,.004,100.7],[.349,.006,102.2],[.401,.007,96.1],[.49,.01,91.7],[.535,.011,94.1],[.581,.011,94],[.767,.009,97.4],[.948,.003,106.4]],tomato:[[.187,.012,19.6],[.208,.017,32],[.254,.054,26.9],[.291,.087,28.2],[.331,.097,28.7],[.38,.099,30],[.447,.107,31.5],[.538,.13,32.9],[.627,.194,33.3],[.665,.179,34.1],[.784,.164,36],[.899,.047,31.1]],red:[[.188,.013,19.4],[.205,.022,14.7],[.25,.064,13.1],[.289,.096,14.3],[.332,.107,15.5],[.383,.111,16.9],[.451,.121,18.9],[.544,.147,21.4],[.625,.193,23],[.665,.177,23.1],[.784,.162,22.3],[.902,.053,6.14]],ruby:[[.189,.014,2.9],[.208,.016,5.29],[.254,.06,6.54],[.292,.089,5.5],[.333,.1,6.4],[.382,.105,7.59],[.448,.117,9.02],[.544,.145,11.1],[.628,.195,13.2],[.664,.179,13.7],[.786,.161,17],[.905,.053,355.8]],crimson:[[.189,.014,354.2],[.207,.022,352.9],[.256,.059,353.9],[.293,.094,354.1],[.333,.104,354.7],[.382,.109,355.5],[.45,.12,356.7],[.542,.148,358.3],[.634,.213,1.3],[.664,.197,1.95],[.787,.167,6.72],[.909,.054,346.7]],pink:[[.191,.017,334.9],[.207,.031,338.2],[.261,.061,337.5],[.299,.098,340.1],[.338,.104,340.6],[.389,.107,341.6],[.459,.119,342.6],[.545,.145,344.1],[.617,.208,346.1],[.65,.197,346.2],[.789,.19,350.7],[.905,.059,343.2]],plum:[[.19,.017,327],[.21,.031,327.7],[.266,.062,326.7],[.307,.088,325.3],[.343,.095,324.6],[.389,.097,324.2],[.456,.106,323.4],[.545,.128,322.2],[.579,.188,322.1],[.616,.182,322.1],[.786,.154,322.1],[.906,.055,325.8]],purple:[[.192,.022,316],[.213,.031,314.3],[.266,.062,312],[.308,.083,310.7],[.344,.091,310.1],[.388,.097,309.7],[.45,.108,308.7],[.541,.133,307.1],[.555,.183,305.9],[.596,.177,306.3],[.785,.156,307.9],[.911,.049,310.9]],violet:[[.191,.026,290.5],[.211,.032,299.5],[.271,.066,293.9],[.312,.093,291.7],[.348,.099,291.4],[.39,.102,291.8],[.445,.111,291.6],[.516,.131,290.2],[.542,.179,288.1],[.588,.17,289.7],[.778,.137,293.6],[.912,.045,292.6]],iris:[[.193,.022,284.2],[.209,.029,286.5],[.273,.069,278.6],[.319,.102,276.1],[.358,.109,277.4],[.399,.112,279.6],[.448,.12,280.8],[.507,.138,281.1],[.54,.184,278.3],[.587,.172,281.2],[.776,.131,286.6],[.914,.042,287]],indigo:[[.191,.025,276.7],[.209,.03,276],[.272,.069,267.8],[.319,.093,267],[.362,.105,267.5],[.404,.111,268.3],[.45,.12,268.8],[.503,.137,268.4],[.544,.191,267.1],[.59,.176,269.2],[.777,.123,273.3],[.911,.043,270]],blue:[[.193,.026,256.8],[.213,.03,258.8],[.274,.067,254],[.317,.1,248.3],[.365,.108,249.7],[.416,.112,251.7],[.475,.121,252.8],[.541,.14,253.2],[.649,.193,251.8],[.689,.17,251.5],[.768,.135,248.8],[.907,.051,238.3]],cyan:[[.191,.017,219.9],[.214,.018,225.4],[.272,.044,222.5],[.315,.063,222.1],[.362,.07,221.5],[.414,.075,221.7],[.478,.083,221.4],[.558,.098,220.7],[.661,.122,221.5],[.698,.12,219.1],[.786,.115,213.4],[.909,.057,211.7]],teal:[[.189,.012,184.5],[.217,.017,189.3],[.274,.038,186.3],[.317,.055,187],[.363,.06,186.5],[.414,.065,185.4],[.473,.074,184.5],[.539,.087,183.5],[.649,.113,182],[.687,.123,180.3],[.789,.147,175.7],[.905,.072,175.3]],jade:[[.188,.014,166.3],[.216,.018,166.1],[.272,.042,166.8],[.316,.057,168],[.362,.064,168.5],[.411,.068,169.7],[.468,.075,170.6],[.537,.088,171.8],[.642,.115,170.8],[.678,.125,169.9],[.785,.156,167.1],[.903,.078,167]],green:[[.189,.013,163.3],[.213,.016,162.2],[.271,.039,162.7],[.318,.057,161.5],[.365,.066,161.1],[.413,.073,160.7],[.467,.083,159.9],[.527,.096,159.2],[.64,.133,157.8],[.676,.141,157.6],[.78,.166,157.2],[.905,.083,158.3]],grass:[[.188,.014,155.8],[.211,.014,151.5],[.267,.03,150.7],[.319,.052,150.4],[.367,.062,149.9],[.416,.072,149.3],[.468,.084,148.9],[.524,.097,148.2],[.652,.147,147.4],[.69,.145,147.6],[.78,.142,148.5],[.911,.078,144.9]],brown:[[.178,.005,81.5],[.213,.007,51.6],[.254,.013,53.5],[.288,.018,55.4],[.325,.024,55.9],[.37,.032,57.7],[.429,.041,59.8],[.509,.053,62.2],[.633,.078,60.8],[.674,.075,61.5],[.798,.063,62.5],[.918,.036,75.7]],bronze:[[.181,.005,41.6],[.215,.005,41.5],[.255,.008,42.7],[.291,.01,45.5],[.329,.013,43.3],[.374,.016,44.3],[.43,.02,44.8],[.499,.024,45.2],[.627,.046,44.3],[.669,.045,44.3],[.792,.043,44.5],[.915,.017,50.3]],gold:[[.182,.002,106.6],[.216,.006,92.5],[.255,.008,88.3],[.291,.01,86.8],[.329,.011,83.7],[.374,.014,82.4],[.429,.016,80.9],[.498,.02,79.5],[.621,.049,78.1],[.662,.047,77.2],[.794,.041,77.2],[.915,.014,77.4]],sky:[[.19,.024,257.1],[.216,.029,258.5],[.271,.054,251.9],[.322,.07,247.8],[.372,.079,245.8],[.427,.087,243.6],[.488,.098,240.7],[.557,.114,237.2],[.861,.103,217.8],[.908,.073,214.9],[.793,.099,231.7],[.934,.053,214.4]],mint:[[.188,.012,192.3],[.21,.017,196.6],[.269,.039,192.5],[.313,.058,191.6],[.359,.063,188.9],[.41,.067,186.3],[.471,.073,183.4],[.54,.085,179.6],[.87,.1,178],[.916,.08,179.4],[.795,.118,176.4],[.93,.057,168.5]],lime:[[.18,.014,120.3],[.208,.019,129],[.266,.034,132.2],[.317,.047,131.8],[.363,.058,131.6],[.412,.069,131.4],[.464,.08,131.2],[.524,.095,130.9],[.888,.175,126.1],[.942,.175,123.7],[.868,.156,124.8],[.946,.082,122.6]],yellow:[[.181,.013,86],[.209,.017,92.1],[.259,.047,90.3],[.293,.069,94.2],[.333,.079,94.6],[.384,.077,93.3],[.452,.081,91.5],[.535,.095,89.9],[.927,.209,102.1],[.971,.182,109.4],[.9,.166,101.6],[.941,.075,101]],amber:[[.184,.013,77.3],[.212,.018,78.7],[.258,.044,74.6],[.296,.071,76.2],[.337,.081,76.4],[.387,.078,75.1],[.453,.082,74.5],[.536,.096,73.6],[.856,.178,81.4],[.902,.206,97],[.871,.175,85.1],[.935,.072,86]],orange:[[.186,.012,53.7],[.209,.019,67.4],[.257,.045,59.5],[.293,.08,58.6],[.335,.087,58.1],[.386,.087,55.2],[.453,.095,53.1],[.541,.116,49.7],[.689,.191,44.8],[.741,.199,46.3],[.799,.163,50.8],[.925,.052,66.2]]},Eh={gray:[[.991,0,null],[.981,0,null],[.953,0,null],[.93,0,null],[.908,0,null],[.884,0,null],[.851,0,null],[.791,0,null],[.643,0,null],[.609,0,null],[.503,0,null],[.243,0,null]],mauve:[[.992,.002,321.1],[.983,.003,311.2],[.956,.006,314.2],[.932,.008,310],[.909,.01,306.6],[.886,.012,304],[.854,.014,300.6],[.794,.019,293.5],[.646,.019,292.6],[.611,.018,293.1],[.505,.016,296.1],[.245,.013,298]],slate:[[.991,.001,286.4],[.982,.003,286.3],[.956,.004,281.9],[.931,.006,283],[.91,.008,283.6],[.888,.009,281.8],[.853,.012,280.8],[.794,.016,278.1],[.646,.016,277.8],[.61,.016,273.2],[.503,.014,263.4],[.241,.01,249.5]],sage:[[.992,.003,160.4],[.981,.003,171.2],[.955,.003,170.4],[.931,.003,170.4],[.909,.004,167.7],[.885,.004,167.7],[.851,.004,169.9],[.792,.005,169.5],[.639,.01,172.4],[.605,.01,172.8],[.501,.008,175.9],[.24,.012,166.8]],olive:[[.993,.002,149.1],[.983,.003,144.8],[.956,.004,141.1],[.932,.004,142.1],[.909,.005,139.3],[.886,.006,141.1],[.852,.006,141.1],[.792,.007,140.6],[.64,.011,136.5],[.605,.012,136.5],[.5,.011,139.9],[.242,.011,138.2]],sand:[[.994,.001,106.4],[.982,.001,106.4],[.956,.002,97.6],[.932,.003,100.6],[.91,.004,95.9],[.886,.005,98.3],[.853,.006,96.6],[.792,.008,96.5],[.641,.01,106.7],[.606,.01,106.7],[.498,.008,106.7],[.243,.008,96.3]],tomato:[[.994,.003,22.8],[.984,.007,31],[.954,.022,30.9],[.926,.047,31.8],[.892,.063,31.5],[.852,.077,32],[.803,.094,32.2],[.741,.118,32.1],[.627,.194,33.3],[.604,.195,33.3],[.567,.198,32.8],[.346,.08,30.5]],red:[[.994,.003,22.8],[.983,.008,16],[.956,.021,16.2],[.928,.047,16.7],[.896,.062,17.3],[.857,.075,17.9],[.807,.089,18.4],[.745,.113,19.1],[.625,.193,23],[.6,.195,23.9],[.557,.198,25.1],[.339,.109,16.7]],ruby:[[.994,.003,356.3],[.983,.008,8.41],[.954,.022,8.56],[.928,.042,8.46],[.896,.055,8.16],[.858,.066,7.84],[.81,.08,7.49],[.749,.101,6.86],[.628,.195,13.2],[.601,.196,13.4],[.549,.199,13.9],[.341,.11,10]],crimson:[[.994,.003,356.3],[.982,.008,357.2],[.954,.026,356.3],[.925,.041,356.3],[.893,.054,355.8],[.855,.065,355.6],[.808,.078,354.8],[.75,.099,354.1],[.634,.213,1.3],[.608,.211,2.36],[.552,.207,4.49],[.341,.113,356.8]],pink:[[.994,.004,336.3],[.983,.009,340],[.954,.027,340.6],[.925,.042,340.7],[.893,.054,340.9],[.855,.067,340.9],[.809,.083,341.2],[.752,.107,341.6],[.617,.208,346.1],[.596,.207,346.5],[.557,.206,347.3],[.35,.129,345.5]],plum:[[.993,.005,316.9],[.983,.009,326],[.957,.027,325.5],[.929,.044,324.9],[.898,.057,324.4],[.86,.072,323.9],[.809,.091,323.1],[.742,.12,321.9],[.579,.188,322.1],[.553,.181,322.1],[.521,.173,322],[.338,.125,321.4]],purple:[[.993,.004,325.4],[.982,.009,313.1],[.959,.024,313.3],[.933,.039,312.1],[.901,.054,311.6],[.86,.071,311],[.804,.093,309.9],[.733,.123,308],[.555,.183,305.9],[.524,.176,305.7],[.516,.174,305.7],[.322,.11,303.8]],violet:[[.992,.003,308],[.983,.009,295],[.963,.019,296.6],[.934,.039,295.4],[.904,.057,294.1],[.864,.072,293.9],[.806,.09,293.5],[.729,.119,292.4],[.542,.179,288.1],[.511,.177,287.6],[.508,.159,288.6],[.313,.098,286.8]],iris:[[.994,.003,286.4],[.981,.009,284.1],[.961,.018,283.8],[.935,.035,283.4],[.904,.053,283.8],[.865,.07,283.1],[.808,.088,282.9],[.729,.118,281.5],[.54,.184,278.3],[.509,.186,277.5],[.51,.173,279.7],[.315,.099,277.4]],indigo:[[.994,.001,286.4],[.983,.008,271.4],[.961,.017,268.5],[.935,.034,268.5],[.903,.051,270],[.863,.071,271.5],[.807,.087,271.4],[.73,.113,270.5],[.544,.191,267.1],[.511,.195,266.5],[.51,.173,267.1],[.313,.086,268.6]],blue:[[.993,.003,247.6],[.982,.01,243.3],[.96,.02,236.7],[.937,.037,239],[.906,.053,242.8],[.864,.069,243.2],[.809,.088,243.3],[.735,.121,243],[.649,.193,251.8],[.621,.184,251.9],[.558,.189,253],[.324,.097,259]],cyan:[[.992,.004,219.2],[.98,.009,202.9],[.958,.026,203.6],[.932,.041,204.7],[.9,.054,206.5],[.859,.066,207.7],[.805,.082,209.6],[.727,.11,211.7],[.661,.122,221.5],[.627,.114,221.3],[.54,.127,223.7],[.332,.053,218.6]],teal:[[.994,.005,177.5],[.981,.009,179],[.961,.027,180.3],[.935,.042,180.2],[.9,.054,180.5],[.856,.064,181.4],[.797,.076,182.2],[.721,.097,183.5],[.649,.113,182],[.619,.11,181.2],[.53,.124,179],[.327,.05,185]],jade:[[.995,.004,172.6],[.982,.009,160.3],[.96,.022,161.9],[.934,.034,163.5],[.902,.046,164.8],[.859,.059,166.9],[.8,.077,169.5],[.721,.103,173.4],[.642,.115,170.8],[.613,.11,170.6],[.529,.127,167.2],[.326,.041,169.8]],green:[[.994,.004,159.1],[.982,.009,155.3],[.959,.023,156.4],[.933,.036,156.6],[.9,.05,157.2],[.857,.065,157.9],[.798,.084,159],[.714,.112,160.6],[.64,.133,157.8],[.611,.126,158.3],[.529,.133,158.3],[.322,.047,164.6]],grass:[[.994,.005,146.4],[.982,.009,145.9],[.961,.023,145.3],[.934,.037,146.2],[.901,.053,146.4],[.858,.071,146.8],[.798,.095,147.5],[.716,.13,148.3],[.652,.147,147.4],[.614,.142,147.3],[.527,.13,147.2],[.327,.053,148.6]],brown:[[.994,.002,63.2],[.983,.006,65.7],[.954,.013,67.8],[.926,.02,66.9],[.897,.029,65.8],[.862,.039,65.5],[.815,.053,64.2],[.747,.072,62.4],[.633,.078,60.8],[.597,.072,59.3],[.512,.058,55.5],[.332,.018,47]],bronze:[[.992,.001,15.9],[.981,.007,43],[.953,.01,44.3],[.925,.014,43.6],[.895,.018,42.6],[.86,.023,43.4],[.811,.03,41.9],[.742,.039,41.2],[.627,.046,44.3],[.588,.045,42.4],[.51,.044,38.4],[.329,.029,35.2]],gold:[[.994,.001,106.4],[.981,.009,97.3],[.953,.012,94.7],[.926,.015,93.2],[.896,.019,90.7],[.86,.025,88.4],[.81,.032,83.4],[.739,.042,78.2],[.621,.049,78.1],[.588,.047,77.4],[.504,.039,78.1],[.332,.019,81.7]],sky:[[.993,.005,211.9],[.98,.01,217.7],[.961,.024,219.6],[.936,.036,220.4],[.903,.047,221.4],[.861,.058,222.9],[.806,.072,225.7],[.729,.096,228],[.861,.103,217.8],[.838,.104,219.6],[.526,.108,232.5],[.351,.057,241.6]],mint:[[.993,.005,183.7],[.982,.01,178.7],[.96,.03,179.6],[.933,.047,179],[.899,.061,178.7],[.856,.072,178.7],[.798,.085,178.2],[.722,.107,177.7],[.87,.1,178],[.841,.1,177.8],[.512,.095,176],[.35,.051,181.4]],lime:[[.992,.004,120.7],[.982,.01,116.7],[.959,.043,119.1],[.932,.069,120.4],[.897,.087,121.8],[.853,.099,123.4],[.795,.111,125.3],[.724,.135,128.1],[.888,.175,126.1],[.859,.188,126.7],[.544,.111,128.6],[.354,.057,121.2]],yellow:[[.993,.005,106.5],[.988,.025,102.9],[.974,.084,104.4],[.953,.117,101.7],[.925,.141,98.2],[.881,.134,95.4],[.836,.12,92.8],[.766,.137,89.8],[.927,.209,102.1],[.897,.185,97.5],[.574,.136,81.7],[.358,.046,86.6]],amber:[[.994,.003,84.6],[.986,.024,100.3],[.969,.069,100.4],[.945,.104,98.2],[.918,.133,98.4],[.881,.124,93.2],[.827,.122,86.2],[.758,.14,76.7],[.856,.178,81.4],[.831,.168,80.9],[.569,.144,67.3],[.352,.049,53.7]],orange:[[.992,.003,40.7],[.979,.015,70.8],[.958,.037,78.1],[.92,.081,74.2],[.89,.107,70.8],[.857,.11,64.4],[.805,.113,59.9],[.745,.132,54.8],[.689,.191,44.8],[.662,.194,43.5],[.592,.186,47],[.35,.069,40.8]]},Os=e=>(e/=255,e<=.04045?e/12.92:((e+.055)/1.055)**2.4),w5=(e,t,n)=>{const r=.4122214708*e+.5363325363*t+.0514459929*n,i=.2119034982*e+.6806995451*t+.1073969566*n,a=.0883024619*e+.2817188376*t+.6299787005*n,s=Math.cbrt(r),o=Math.cbrt(i),u=Math.cbrt(a),c=.2104542553*s+.793617785*o-.0040720468*u,h=1.9779984951*s-2.428592205*o+.4505937099*u,d=.0259040371*s+.7827717662*o-.808675766*u;return[c,h,d]},_h=([e,t,n])=>{const r=Math.sqrt(t*t+n*n),i=Math.atan2(n,t)*180/Math.PI;return[e,r,(i+360)%360]},Ni=([e,t,n])=>{const r=(n??0)*Math.PI/180;return[e,t*Math.cos(r),t*Math.sin(r)]},A5=e=>{const t=e.replace("#",""),n=parseInt(t.length===3?t.replace(/./g,s=>s+s):t,16),r=Os(n>>16&255),i=Os(n>>8&255),a=Os(n&255);return _h(w5(r,i,a))},_r=(e,t)=>{const[n,r,i]=Ni(e),[a,s,o]=Ni(t);return Math.hypot(n-a,r-s,i-o)},C5=(e,t,n)=>{const r=Ni(e),i=Ni(t),a=[r[0]+(i[0]-r[0])*n,r[1]+(i[1]-r[1])*n,r[2]+(i[2]-r[2])*n];return _h(a)},v5=([e,t,n])=>`oklch(${(e*100).toFixed(1)}% ${+t.toFixed(3)} ${+(n??0).toFixed(2)})`,Th=["1","2","3","4","5","6","7","8","9","10","11","12"],Ds=["gray","mauve","slate","sage","olive","sand"];function Li(e,t){return Object.fromEntries(t.map(n=>[n,e[n]]))}const S5=Li(Eh,gh),I5=Li(bh,gh),N5=Li(Eh,Ds),L5=Li(bh,Ds),kh=({prefix:e,appearance:t,color:n,isNeutral:r=!1})=>{if(!/^#?[0-9A-Fa-f]{6}$/.test(n))throw new Error("Color must be a valid 6-digit hex");const i=t==="light"?S5:I5,a=t==="light"?N5:L5,s=A5(n),o=r?xh(s,a):xh(s,i);if(!r){o[8]=s,o[9]=R5(s,[o]);const u=Math.max(o[8][1],o[7][1]);o[10][1]=Math.min(u,o[10][1]),o[11][1]=Math.min(u,o[11][1])}return Object.fromEntries(Th.map((u,c)=>[`${e}${u}`,v5(o[c])]))};function R5(e,t){const[n,r,i]=e,a=n>.4?n-.03/(n+.1):n+.03/(n+.1),s=n>.4&&i!==null?r*.93:r,o=[a,s,i];let u=o,c=1/0;for(const h of t)for(const d of h){const f=_r(o,d);f<c&&(c=f,u=d)}return[a,u[1],u[2]]}function xh(e,t){const n=[];for(const[y,R]of Object.entries(t))for(const M of R)n.push({scale:y,color:M,distance:_r(e,M)});n.sort((y,R)=>y.distance-R.distance);const r=n.filter((y,R,M)=>R===M.findIndex(v=>v.scale===y.scale)),i=new Set(Ds);if(!r.every(y=>i.has(y.scale))&&i.has(r[0].scale))for(;r.length>1&&i.has(r[1].scale);)r.splice(1,1);const[s,o]=[r[0],r[1]],u=o.distance,c=s.distance,h=_r(s.color,o.color),d=(c**2+h**2-u**2)/(2*c*h),f=(u**2+h**2-c**2)/(2*u*h),p=Math.max(0,d/Math.sqrt(1-d**2)/(f/Math.sqrt(1-f**2)))*.5,g=t[s.scale],T=t[o.scale],C=Th.map((y,R)=>C5(g[R],T[R],p)),w=C.slice().sort((y,R)=>_r(e,y)-_r(e,R))[0],A=e[1]/(w[1]||1e-6);for(const y of C)y[1]=Math.min(e[1]*1.5,y[1]*A),y[2]=e[2];return C}const O5=e=>e.slice(6,-1),yh=e=>Object.entries(e).map(([t,n])=>`--${t}: ${O5(n)};`);function D5(e){const t=kh({prefix:"a-",appearance:e.mode,color:e.accentColor}),n=kh({prefix:"n-",appearance:e.mode,color:e.neutralColor??"#555555",isNeutral:!0}),r=`--highest: ${e.mode==="light"?"100% 0 0":"10% 0 0"};`;return[...yh(t),...yh(n),r].join(`
|
|
122
122
|
`)}const P5={sm:.25,md:.5,lg:1},M5={"kin-r-xs":4,"kin-r-sm":8,"kin-r-md":10,"kin-r-lg":12,"kin-r-xl":16,"kin-r-2xl":20,"kin-r-3xl":24,"kin-r-4xl":32},B5=e=>`${Number(e.toFixed(3))}px`;function F5(e){return Object.entries(M5).map(([t,n])=>`--${t}: ${B5(n*P5[e])};`).join(`
|
|
123
|
-
`)}const Ps=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ri=e=>{if(typeof e!="string")return null;const t=e.trim();return t.length>0?t:null},H5=e=>{const t=Ri(e);return t&&(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")&&!t.startsWith("//"))?t:null},U5=e=>{if(!Ps(e))return null;if(e.kind==="job_cards"&&Array.isArray(e.jobs)){const t=e.jobs.flatMap(n=>{const r=z5(n);return r?[r]:[]});return t.length>0?{kind:"job_cards",jobs:t}:null}return null},wh=e=>{if(!Array.isArray(e))return null;const t=e.flatMap(n=>{const r=U5(n);return r?[r]:[]});return t.length>0?t:null},z5=e=>{if(!Ps(e))return null;const t=e.id;if(typeof t!="string"&&typeof t!="number")return null;const n=Ri(e.title);if(!n)return null;const r=Array.isArray(e.details)?e.details.flatMap(s=>{if(!Ps(s))return[];const o=Ri(s.key),u=Ri(s.value);return o&&u?[{key:o,value:u}]:[]}):[],i={id:String(t),title:n,details:r},a=H5(e.applyUrl);return a&&(i.applyUrl=a),i},Ah={accentColor:"#FF4D00",neutralColor:"#555555",mode:"light",rounded:"lg"},$5={production:"wss://agents.inploi.com",sandbox:"wss://agents.staging.inploi.com"},Y5=/^\[System: CV uploaded and processed - "(.+?)"/;function j5(e){if(e.role!=="assistant"&&e.role!=="user")return[];const t=typeof e.content=="string"?e.content:"";if(e.role==="user"){const r=Y5.exec(t)?.[1];if(r)return[{role:"user",content:"",attachment:{name:r}}];if(t.startsWith("[System:"))return[]}const n=wh(e.blocks)??void 0;return[{role:e.role,content:t,...n&&{blocks:n}}]}const V5=({serviceUrl:e,theme:t=Ah,starterPrompts:n=[],placement:r="center",container:i})=>Yt(({logger:a,publishableKey:s,env:o})=>{const u=e??$5[o??"production"];if(!s)throw new Error("Kin plugin requires a publishableKey. Pass it to initialiseSdk().");let c=!1,h=null,d={...Ah,...t},f=null,p=!1,g=null,T=null,C=!1;const w=r==="embedded",A=()=>{if(i)if(typeof i=="string"){const I=document.querySelector(i);if(I instanceof HTMLElement)return T=I,C=!1,I}else return T=i,C=!1,i;const S=document.getElementById("inploi-kin-root");if(S)return T=S,C=!1,S;const U=document.createElement("div");return U.id="inploi-kin-root",
|
|
123
|
+
`)}const Ps=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Ri=e=>{if(typeof e!="string")return null;const t=e.trim();return t.length>0?t:null},H5=e=>{const t=Ri(e);return t&&(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")&&!t.startsWith("//"))?t:null},U5=e=>{if(!Ps(e))return null;if(e.kind==="job_cards"&&Array.isArray(e.jobs)){const t=e.jobs.flatMap(n=>{const r=z5(n);return r?[r]:[]});return t.length>0?{kind:"job_cards",jobs:t}:null}return null},wh=e=>{if(!Array.isArray(e))return null;const t=e.flatMap(n=>{const r=U5(n);return r?[r]:[]});return t.length>0?t:null},z5=e=>{if(!Ps(e))return null;const t=e.id;if(typeof t!="string"&&typeof t!="number")return null;const n=Ri(e.title);if(!n)return null;const r=Array.isArray(e.details)?e.details.flatMap(s=>{if(!Ps(s))return[];const o=Ri(s.key),u=Ri(s.value);return o&&u?[{key:o,value:u}]:[]}):[],i={id:String(t),title:n,details:r},a=H5(e.applyUrl);return a&&(i.applyUrl=a),i},Ah={accentColor:"#FF4D00",neutralColor:"#555555",mode:"light",rounded:"lg"},$5={production:"wss://agents.inploi.com",sandbox:"wss://agents.staging.inploi.com"},Y5=/^\[System: CV uploaded and processed - "(.+?)"/;function j5(e){if(e.role!=="assistant"&&e.role!=="user")return[];const t=typeof e.content=="string"?e.content:"";if(e.role==="user"){const r=Y5.exec(t)?.[1];if(r)return[{role:"user",content:"",attachment:{name:r}}];if(t.startsWith("[System:"))return[]}const n=wh(e.blocks)??void 0;return[{role:e.role,content:t,...n&&{blocks:n}}]}const V5=({serviceUrl:e,theme:t=Ah,starterPrompts:n=[],placement:r="center",container:i})=>Yt(({logger:a,publishableKey:s,env:o})=>{const u=e??$5[o??"production"];if(!s)throw new Error("Kin plugin requires a publishableKey. Pass it to initialiseSdk().");let c=!1,h=null,d={...Ah,...t},f=null,p=!1,g=null,T=null,C=!1;const w=r==="embedded",A=()=>{if(i)if(typeof i=="string"){const I=document.querySelector(i);if(I instanceof HTMLElement)return T=I,C=!1,I}else return T=i,C=!1,i;const S=document.getElementById("inploi-kin-root");if(S)return T=S,C=!1,S;const U=document.createElement("div");return U.id="inploi-kin-root",document.body.appendChild(U),T=U,C=!0,U},y=S=>{const U=D5(S),I=F5(S.rounded??"lg");return`${y5}
|
|
124
124
|
|
|
125
125
|
/* Theme overrides */
|
|
126
126
|
:host {
|
package/dist/{highlighted-body-B3W2YXNL-b7756d4d.cjs → highlighted-body-B3W2YXNL-4579406d.cjs}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-45f58435.cjs");require("@inploi/sdk");var c=({code:g,language:l,raw:r,className:u,...s})=>{let{shikiTheme:t}=e.q(e.R),a=e.Ks(),[h,i]=e.h(r);return e.p(()=>{if(!a){i(r);return}let o=a.highlight({code:g,language:l,themes:t},n=>{i(n)});o&&i(o)},[g,l,t,a,r]),e.o(e.Qe,{className:u,language:l,result:h,...s})};exports.HighlightedCodeBlockBody=c;
|
package/dist/{highlighted-body-B3W2YXNL-5d5b7e38.js → highlighted-body-B3W2YXNL-aa326909.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { q as u, R as c, K as d, h as n, p, o as f, Q as k } from "./index-
|
|
1
|
+
import { q as u, R as c, K as d, h as n, p, o as f, Q as k } from "./index-d554999b.js";
|
|
2
2
|
import "@inploi/sdk";
|
|
3
3
|
var N = ({ code: o, language: e, raw: a, className: s, ...h }) => {
|
|
4
4
|
let { shikiTheme: r } = u(c), l = d(), [t, g] = n(a);
|
|
@@ -106,21 +106,21 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
106
106
|
${e}</tr>
|
|
107
107
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
108
108
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${dt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=$u(e);if(i===null)return r;e=i;let a='<a href="'+e+'"';return t&&(a+=' title="'+dt(t)+'"'),a+=">"+r+"</a>",a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=$u(e);if(i===null)return dt(n);e=i;let a=`<img src="${e}" alt="${dt(n)}"`;return t&&(a+=` title="${dt(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:dt(e.text)}},Is=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},pt=class La{constructor(t){be(this,"options");be(this,"renderer");be(this,"textRenderer");this.options=t||un,this.options.renderer=this.options.renderer||new oi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Is}static parse(t,n){return new La(n).parse(t)}static parseInline(t,n){return new La(n).parseInline(t)}parse(t){var r,i;let n="";for(let a=0;a<t.length;a++){let s=t[a];if((i=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&i[s.type]){let u=s,l=this.options.extensions.renderers[u.type].call({parser:this},u);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=l||"";continue}}let o=s;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let u='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){var i,a;let r="";for(let s=0;s<t.length;s++){let o=t[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[o.type]){let l=this.options.extensions.renderers[o.type].call({parser:this},o);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=l||"";continue}}let u=o;switch(u.type){case"escape":{r+=n.text(u);break}case"html":{r+=n.html(u);break}case"link":{r+=n.link(u);break}case"image":{r+=n.image(u);break}case"checkbox":{r+=n.checkbox(u);break}case"strong":{r+=n.strong(u);break}case"em":{r+=n.em(u);break}case"codespan":{r+=n.codespan(u);break}case"br":{r+=n.br(u);break}case"del":{r+=n.del(u);break}case"text":{r+=n.text(u);break}default:{let l='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}},Dr,$n=(Dr=class{constructor(e){be(this,"options");be(this,"block");this.options=e||un}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?ut.lex:ut.lexInline}provideParser(){return this.block?pt.parse:pt.parseInline}},be(Dr,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),be(Dr,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Dr),Sy=class{constructor(...e){be(this,"defaults",ks());be(this,"options",this.setOptions);be(this,"parse",this.parseMarkdown(!0));be(this,"parseInline",this.parseMarkdown(!1));be(this,"Parser",pt);be(this,"Renderer",oi);be(this,"TextRenderer",Is);be(this,"Lexer",ut);be(this,"Tokenizer",si);be(this,"Hooks",$n);this.use(...e)}walkTokens(e,t){var r,i;let n=[];for(let a of e)switch(n=n.concat(t.call(this,a)),a.type){case"table":{let s=a;for(let o of s.header)n=n.concat(this.walkTokens(o.tokens,t));for(let o of s.rows)for(let u of o)n=n.concat(this.walkTokens(u.tokens,t));break}case"list":{let s=a;n=n.concat(this.walkTokens(s.items,t));break}default:{let s=a;(i=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(o=>{let u=s[o].flat(1/0);n=n.concat(this.walkTokens(u,t))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r={...n};if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...s){let o=i.renderer.apply(this,s);return o===!1&&(o=a.apply(this,s)),o}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),r.extensions=t),n.renderer){let i=this.defaults.renderer||new oi(this.defaults);for(let a in n.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,o=n.renderer[s],u=i[s];i[s]=(...l)=>{let h=o.apply(i,l);return h===!1&&(h=u.apply(i,l)),h||""}}r.renderer=i}if(n.tokenizer){let i=this.defaults.tokenizer||new si(this.defaults);for(let a in n.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,o=n.tokenizer[s],u=i[s];i[s]=(...l)=>{let h=o.apply(i,l);return h===!1&&(h=u.apply(i,l)),h}}r.tokenizer=i}if(n.hooks){let i=this.defaults.hooks||new $n;for(let a in n.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,o=n.hooks[s],u=i[s];$n.passThroughHooks.has(a)?i[s]=l=>{if(this.defaults.async&&$n.passThroughHooksRespectAsync.has(a))return(async()=>{let d=await o.call(i,l);return u.call(i,d)})();let h=o.call(i,l);return u.call(i,h)}:i[s]=(...l)=>{if(this.defaults.async)return(async()=>{let d=await o.apply(i,l);return d===!1&&(d=await u.apply(i,l)),d})();let h=o.apply(i,l);return h===!1&&(h=u.apply(i,l)),h}}r.hooks=i}if(n.walkTokens){let i=this.defaults.walkTokens,a=n.walkTokens;r.walkTokens=function(s){let o=[];return o.push(a.call(this,s)),i&&(o=o.concat(i.call(this,s))),o}}this.defaults={...this.defaults,...r}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ut.lex(e,t??this.defaults)}parser(e,t){return pt.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let s=i.hooks?await i.hooks.preprocess(t):t,o=await(i.hooks?await i.hooks.provideLexer():e?ut.lex:ut.lexInline)(s,i),u=i.hooks?await i.hooks.processAllTokens(o):o;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let l=await(i.hooks?await i.hooks.provideParser():e?pt.parse:pt.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(l):l})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let s=(i.hooks?i.hooks.provideLexer():e?ut.lex:ut.lexInline)(t,i);i.hooks&&(s=i.hooks.processAllTokens(s)),i.walkTokens&&this.walkTokens(s,i.walkTokens);let o=(i.hooks?i.hooks.provideParser():e?pt.parse:pt.parseInline)(s,i);return i.hooks&&(o=i.hooks.postprocess(o)),o}catch(s){return a(s)}}}onError(e,t){return n=>{if(n.message+=`
|
|
109
|
-
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+dt(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},nn=new Sy;function Ce(e,t){return nn.parse(e,t)}Ce.options=Ce.setOptions=function(e){return nn.setOptions(e),Ce.defaults=nn.defaults,_0(Ce.defaults),Ce};Ce.getDefaults=ks;Ce.defaults=un;Ce.use=function(...e){return nn.use(...e),Ce.defaults=nn.defaults,_0(Ce.defaults),Ce};Ce.walkTokens=function(e,t){return nn.walkTokens(e,t)};Ce.parseInline=nn.parseInline;Ce.Parser=pt;Ce.parser=pt.parse;Ce.Renderer=oi;Ce.TextRenderer=Is;Ce.Lexer=ut;Ce.lexer=ut.lex;Ce.Tokenizer=si;Ce.Hooks=$n;Ce.parse=Ce;var Iy=300,Ny="300px",Ly=500;function Ry(e={}){let{immediate:t=!1,debounceDelay:n=Iy,rootMargin:r=Ny,idleTimeout:i=Ly}=e,[a,s]=he(!1),o=ve(null),u=ve(null),l=ve(null),h=Ne(()=>p=>{let g=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),d=Ne(()=>typeof window<"u"&&window.requestIdleCallback?(p,g)=>window.requestIdleCallback(p,g):h,[h]),f=Ne(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return ke(()=>{if(t){s(!0);return}let p=o.current;if(!p)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(f(l.current),l.current=null);let g=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(f(l.current),l.current=null)},E=y=>{l.current=d(R=>{R.timeRemaining()>0||R.didTimeout?(s(!0),y.disconnect()):l.current=d(()=>{s(!0),y.disconnect()},{timeout:i/2})},{timeout:i})},A=y=>{g(),u.current=window.setTimeout(()=>{var R,M;let S=y.takeRecords();(S.length===0||(M=(R=S.at(-1))==null?void 0:R.isIntersecting)!=null&&M)&&E(y)},n)},w=(y,R)=>{y.isIntersecting?A(R):g()},C=new IntersectionObserver(y=>{for(let R of y)w(R,C)},{rootMargin:r,threshold:0});return C.observe(p),()=>{u.current&&clearTimeout(u.current),l.current&&f(l.current),C.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:o}}var L0=/\s/,Oy=/^\s+$/,Dy=new Set(["code","pre","svg","math","annotation"]),Py=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",My=e=>e.some(t=>Py(t)&&Dy.has(t.tagName)),By=e=>{let t=[],n="",r=!1;for(let i of e){let a=L0.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},Fy=e=>{let t=[],n="";for(let r of e)L0.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},Hy=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),Uy=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(My(t))return fn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let o=(n.sep==="char"?Fy(s):By(s)).map(u=>Oy.test(u)?{type:"text",value:u}:Hy(u,n.animation,n.duration,n.easing));return i.children.splice(a,1,...o),a+o.length};function Ra(e){var t,n,r,i;let a={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Ga(s,"text",(o,u)=>Uy(o,u,a))}}}Ra();var R0=ci(!1),zy=()=>Qe(R0),Z=(...e)=>sT(b_(e)),En=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},$y=Z("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Yy=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},O0=Ee(({children:e,result:t,language:n,className:r,...i})=>{let a=Ne(()=>{let s={};return t.bg&&(s["--sdm-bg"]=t.bg),t.fg&&(s["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(s,Yy(t.rootStyle)),s},[t.bg,t.fg,t.rootStyle]);return m("div",{className:Z(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...i,children:m("pre",{className:Z(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:a,children:m("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((s,o)=>m("span",{className:$y,children:s.map((u,l)=>{let h={},d=!!u.bgColor;if(u.color&&(h["--sdm-c"]=u.color),u.bgColor&&(h["--sdm-tbg"]=u.bgColor),u.htmlStyle)for(let[f,p]of Object.entries(u.htmlStyle))f==="color"?h["--sdm-c"]=p:f==="background-color"?(h["--sdm-tbg"]=p,d=!0):h[f]=p;return m("span",{className:Z("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",d&&"bg-[var(--sdm-tbg)]",d&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:h,...u.htmlAttrs,children:u.content},l)})},o))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),jy=({className:e,language:t,style:n,isIncomplete:r,...i})=>m("div",{className:Z("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i}),D0=ci({code:""}),P0=()=>Qe(D0),Vy=({language:e})=>m("div",{className:"flex h-8 items-center text-muted-foreground text-xs","data-language":e,"data-streamdown":"code-block-header",children:m("span",{className:"ml-1 font-mono lowercase",children:e})}),qy=/\n+$/,Wy=ec(()=>Promise.resolve().then(()=>require("./highlighted-body-B3W2YXNL-
|
|
109
|
+
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+dt(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},nn=new Sy;function Ce(e,t){return nn.parse(e,t)}Ce.options=Ce.setOptions=function(e){return nn.setOptions(e),Ce.defaults=nn.defaults,_0(Ce.defaults),Ce};Ce.getDefaults=ks;Ce.defaults=un;Ce.use=function(...e){return nn.use(...e),Ce.defaults=nn.defaults,_0(Ce.defaults),Ce};Ce.walkTokens=function(e,t){return nn.walkTokens(e,t)};Ce.parseInline=nn.parseInline;Ce.Parser=pt;Ce.parser=pt.parse;Ce.Renderer=oi;Ce.TextRenderer=Is;Ce.Lexer=ut;Ce.lexer=ut.lex;Ce.Tokenizer=si;Ce.Hooks=$n;Ce.parse=Ce;var Iy=300,Ny="300px",Ly=500;function Ry(e={}){let{immediate:t=!1,debounceDelay:n=Iy,rootMargin:r=Ny,idleTimeout:i=Ly}=e,[a,s]=he(!1),o=ve(null),u=ve(null),l=ve(null),h=Ne(()=>p=>{let g=Date.now();return window.setTimeout(()=>{p({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-g))})},1)},[]),d=Ne(()=>typeof window<"u"&&window.requestIdleCallback?(p,g)=>window.requestIdleCallback(p,g):h,[h]),f=Ne(()=>typeof window<"u"&&window.cancelIdleCallback?p=>window.cancelIdleCallback(p):p=>{clearTimeout(p)},[]);return ke(()=>{if(t){s(!0);return}let p=o.current;if(!p)return;u.current&&(clearTimeout(u.current),u.current=null),l.current&&(f(l.current),l.current=null);let g=()=>{u.current&&(clearTimeout(u.current),u.current=null),l.current&&(f(l.current),l.current=null)},E=y=>{l.current=d(R=>{R.timeRemaining()>0||R.didTimeout?(s(!0),y.disconnect()):l.current=d(()=>{s(!0),y.disconnect()},{timeout:i/2})},{timeout:i})},A=y=>{g(),u.current=window.setTimeout(()=>{var R,M;let S=y.takeRecords();(S.length===0||(M=(R=S.at(-1))==null?void 0:R.isIntersecting)!=null&&M)&&E(y)},n)},w=(y,R)=>{y.isIntersecting?A(R):g()},C=new IntersectionObserver(y=>{for(let R of y)w(R,C)},{rootMargin:r,threshold:0});return C.observe(p),()=>{u.current&&clearTimeout(u.current),l.current&&f(l.current),C.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:o}}var L0=/\s/,Oy=/^\s+$/,Dy=new Set(["code","pre","svg","math","annotation"]),Py=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",My=e=>e.some(t=>Py(t)&&Dy.has(t.tagName)),By=e=>{let t=[],n="",r=!1;for(let i of e){let a=L0.test(i);a!==r&&n&&(t.push(n),n=""),n+=i,r=a}return n&&t.push(n),t},Fy=e=>{let t=[],n="";for(let r of e)L0.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},Hy=(e,t,n,r)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),Uy=(e,t,n)=>{let r=t.at(-1);if(!(r&&"children"in r))return;if(My(t))return fn;let i=r,a=i.children.indexOf(e);if(a===-1)return;let s=e.value;if(!s.trim())return;let o=(n.sep==="char"?Fy(s):By(s)).map(u=>Oy.test(u)?{type:"text",value:u}:Hy(u,n.animation,n.duration,n.easing));return i.children.splice(a,1,...o),a+o.length};function Ra(e){var t,n,r,i;let a={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(r=e==null?void 0:e.easing)!=null?r:"ease",sep:(i=e==null?void 0:e.sep)!=null?i:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>s=>{Ga(s,"text",(o,u)=>Uy(o,u,a))}}}Ra();var R0=ci(!1),zy=()=>Qe(R0),Z=(...e)=>sT(b_(e)),En=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,i=URL.createObjectURL(r),a=document.createElement("a");a.href=i,a.download=e,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},$y=Z("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),Yy=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),a=n.slice(r+1).trim();i&&a&&(t[i]=a)}}return t},O0=Ee(({children:e,result:t,language:n,className:r,...i})=>{let a=Ne(()=>{let s={};return t.bg&&(s["--sdm-bg"]=t.bg),t.fg&&(s["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(s,Yy(t.rootStyle)),s},[t.bg,t.fg,t.rootStyle]);return m("div",{className:Z(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...i,children:m("pre",{className:Z(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:a,children:m("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((s,o)=>m("span",{className:$y,children:s.map((u,l)=>{let h={},d=!!u.bgColor;if(u.color&&(h["--sdm-c"]=u.color),u.bgColor&&(h["--sdm-tbg"]=u.bgColor),u.htmlStyle)for(let[f,p]of Object.entries(u.htmlStyle))f==="color"?h["--sdm-c"]=p:f==="background-color"?(h["--sdm-tbg"]=p,d=!0):h[f]=p;return m("span",{className:Z("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",d&&"bg-[var(--sdm-tbg)]",d&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:h,...u.htmlAttrs,children:u.content},l)})},o))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),jy=({className:e,language:t,style:n,isIncomplete:r,...i})=>m("div",{className:Z("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i}),D0=ci({code:""}),P0=()=>Qe(D0),Vy=({language:e})=>m("div",{className:"flex h-8 items-center text-muted-foreground text-xs","data-language":e,"data-streamdown":"code-block-header",children:m("span",{className:"ml-1 font-mono lowercase",children:e})}),qy=/\n+$/,Wy=ec(()=>Promise.resolve().then(()=>require("./highlighted-body-B3W2YXNL-4579406d.cjs")).then(e=>({default:e.HighlightedCodeBlockBody}))),Gy=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,...a})=>{let s=Ne(()=>e.replace(qy,""),[e]),o=Ne(()=>({bg:"transparent",fg:"inherit",tokens:s.split(`
|
|
110
110
|
`).map(u=>[{content:u,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[s]);return m(D0.Provider,{value:{code:e},children:m(jy,{isIncomplete:i,language:t,children:[m(Vy,{language:t}),r?m("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:m("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur","data-streamdown":"code-block-actions",children:r})}):null,m(qn,{fallback:m(O0,{className:n,language:t,result:o,...a}),children:m(Wy,{className:n,code:s,language:t,raw:o,...a})})]})})},Ns=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Ls=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),Ni=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),Qy=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[m("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),m("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),Ky=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),Xy=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),M0=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Vu=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Zy=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Jy=e=>m("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:m("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),qu=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...s})=>{let[o,u]=he(!1),l=ve(0),{code:h}=P0(),{isAnimating:d}=Qe(tt),f=a??h,p=async()=>{var E;if(typeof window>"u"||!((E=navigator==null?void 0:navigator.clipboard)!=null&&E.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(f),u(!0),e==null||e(),l.current=window.setTimeout(()=>u(!1),n))}catch(A){t==null||t(A)}};ke(()=>()=>{window.clearTimeout(l.current)},[]);let g=o?Ns:Ls;return m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:d,onClick:p,title:"Copy Code",type:"button",...s,children:r??m(g,{size:14})})},Wu={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},e6=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...s})=>{let{code:o}=P0(),{isAnimating:u}=Qe(tt),l=a??o,h=`file.${n&&n in Wu?Wu[n]:"txt"}`,d="text/plain",f=()=>{try{En(h,l,d),e==null||e()}catch(p){t==null||t(p)}};return m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:u,onClick:f,title:"Download file",type:"button",...s,children:r??m(Ni,{size:14})})},t6=()=>m("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[m("div",{className:"h-[46px] w-full bg-muted/80"}),m("div",{className:"flex w-full items-center justify-center p-4",children:m(Qy,{className:"size-4 animate-spin"})})]}),n6=/\.[^/.]+$/,r6=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...s})=>{let o=ve(null),[u,l]=he(!1),[h,d]=he(!1),f=s.width!=null||s.height!=null,p=(u||f)&&!h,g=h&&!f;ke(()=>{let C=o.current;if(C!=null&&C.complete){let y=C.naturalWidth>0;l(y),d(!y)}},[]);let E=Ye(C=>{l(!0),d(!1),i==null||i(C)},[i]),A=Ye(C=>{l(!1),d(!0),a==null||a(C)},[a]),w=async()=>{if(n)try{let C=await(await fetch(n)).blob(),y=new URL(n,window.location.origin).pathname.split("/").pop()||"",R=y.split(".").pop(),M=y.includes(".")&&R!==void 0&&R.length<=4,S="";if(M)S=y;else{let $=C.type,O="png";$.includes("jpeg")||$.includes("jpg")?O="jpg":$.includes("png")?O="png":$.includes("svg")?O="svg":$.includes("gif")?O="gif":$.includes("webp")&&(O="webp"),S=`${(r||y||"image").replace(n6,"")}.${O}`}En(S,C,C.type)}catch{window.open(n,"_blank")}};return n?m("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[m("img",{alt:r,className:Z("max-w-full rounded-lg",g&&"hidden",t),"data-streamdown":"image",onError:A,onLoad:E,ref:o,src:n,...s}),g&&m("span",{className:"text-muted-foreground text-xs italic","data-streamdown":"image-fallback",children:"Image not available"}),m("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),p&&m("button",{className:Z("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:w,title:"Download image",type:"button",children:m(Ni,{size:14})})]}):null},nr=0,i6=()=>{nr+=1,nr===1&&(document.body.style.overflow="hidden")},a6=()=>{nr=Math.max(0,nr-1),nr===0&&(document.body.style.overflow="")},s6=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let[i,a]=he(!1),s=Ye(async()=>{try{await navigator.clipboard.writeText(e),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[e]),o=Ye(()=>{r(),n()},[r,n]);return ke(()=>{if(t){i6();let u=l=>{l.key==="Escape"&&n()};return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u),a6()}}},[t,n]),t?m("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:u=>{u.key==="Escape"&&n()},role:"button",tabIndex:0,children:m("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:u=>u.stopPropagation(),onKeyDown:u=>u.stopPropagation(),role:"presentation",children:[m("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:m(M0,{size:16})}),m("div",{className:"flex flex-col gap-2",children:[m("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[m(Vu,{size:20}),m("span",{children:"Open external link?"})]}),m("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),m("div",{className:Z("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),m("div",{className:"flex gap-2",children:[m("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:s,type:"button",children:i?m(fe,{children:[m(Ns,{size:14}),m("span",{children:"Copied"})]}):m(fe,{children:[m(Ls,{size:14}),m("span",{children:"Copy link"})]})}),m("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:o,type:"button",children:[m(Vu,{size:14}),m("span",{children:"Open link"})]})]})]})}):null},Oa=ci(null),B0=()=>Qe(Oa),o6=()=>{var e;let t=B0();return(e=t==null?void 0:t.code)!=null?e:null},Rs=()=>{var e;let t=B0();return(e=t==null?void 0:t.mermaid)!=null?e:null},u6=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let u=document.createElement("canvas"),l=o.width*r,h=o.height*r;u.width=l,u.height=h;let d=u.getContext("2d");if(!d){a(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,l,h),u.toBlob(f=>{if(!f){a(new Error("Failed to create PNG blob"));return}i(f)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},l6=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let[s,o]=he(!1),u=ve(null),{isAnimating:l}=Qe(tt),h=Rs(),d=async f=>{try{if(f==="mmd"){En("diagram.mmd",e,"text/plain"),o(!1),r==null||r(f);return}if(!h){a==null||a(new Error("Mermaid plugin not available"));return}let p=h.getMermaid(i),g=e.split("").reduce((w,C)=>(w<<5)-w+C.charCodeAt(0)|0,0),E=`mermaid-${Math.abs(g)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:A}=await p.render(E,e);if(!A){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}if(f==="svg"){En("diagram.svg",A,"image/svg+xml"),o(!1),r==null||r(f);return}if(f==="png"){let w=await u6(A);En("diagram.png",w,"image/png"),r==null||r(f),o(!1);return}}catch(p){a==null||a(p)}};return ke(()=>{let f=p=>{let g=p.composedPath();u.current&&!g.includes(u.current)&&o(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),m("div",{className:"relative",ref:u,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:l,onClick:()=>o(!s),title:"Download diagram",type:"button",children:t??m(Ni,{size:14})}),s?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},rr=0,c6=()=>{rr+=1,rr===1&&(document.body.style.overflow="hidden")},d6=()=>{rr=Math.max(0,rr-1),rr===0&&(document.body.style.overflow="")},h6=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let[s,o]=he(!1),{isAnimating:u,controls:l}=Qe(tt),h=(()=>{if(typeof l=="boolean")return l;let f=l.mermaid;return f===!1?!1:f===!0||f===void 0?!0:f.panZoom!==!1})(),d=()=>{o(!s)};return ke(()=>{if(s){c6();let f=p=>{p.key==="Escape"&&o(!1)};return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f),d6()}}},[s]),ke(()=>{s?n==null||n():r&&r()},[s,n,r]),m(fe,{children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:u,onClick:d,title:"View fullscreen",type:"button",...a,children:m(Ky,{size:14})}),s?tc(m("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:d,onKeyDown:f=>{f.key==="Escape"&&d()},role:"button",tabIndex:0,children:[m("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:d,title:"Exit fullscreen",type:"button",children:m(M0,{size:20})}),m("div",{className:"flex size-full items-center justify-center p-4",onClick:f=>f.stopPropagation(),onKeyDown:f=>f.stopPropagation(),role:"presentation",children:m(fh,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:h})})]}),document.body):null]})},F0=e=>{var t,n;let r=[],i=[],a=e.querySelectorAll("thead th");for(let o of a)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let s=e.querySelectorAll("tbody tr");for(let o of s){let u=[],l=o.querySelectorAll("td");for(let h of l)u.push(((n=h.textContent)==null?void 0:n.trim())||"");i.push(u)}return{headers:r,rows:i}},H0=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1,l=!1;for(let h of o){if(h==='"'){u=!0,l=!0;break}(h===","||h===`
|
|
111
111
|
`)&&(u=!0)}return u?l?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(","),s+=1);for(let o of n)a[s]=o.map(r).join(","),s+=1;return a.join(`
|
|
112
112
|
`)},f6=e=>{let{headers:t,rows:n}=e,r=o=>{let u=!1;for(let h of o)if(h===" "||h===`
|
|
113
113
|
`||h==="\r"){u=!0;break}if(!u)return o;let l=[];for(let h of o)h===" "?l.push("\\t"):h===`
|
|
114
114
|
`?l.push("\\n"):h==="\r"?l.push("\\r"):l.push(h);return l.join("")},i=t.length>0?n.length+1:n.length,a=new Array(i),s=0;t.length>0&&(a[s]=t.map(r).join(" "),s+=1);for(let o of n)a[s]=o.map(r).join(" "),s+=1;return a.join(`
|
|
115
115
|
`)},na=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},Da=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,a=t.map(o=>na(o));r[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(t.length);for(let o=0;o<t.length;o+=1)s[o]="---";r[i]=`| ${s.join(" | ")} |`,i+=1;for(let o of n)if(o.length<t.length){let u=new Array(t.length);for(let l=0;l<t.length;l+=1)u[l]=l<o.length?na(o[l]):"";r[i]=`| ${u.join(" | ")} |`,i+=1}else{let u=o.map(l=>na(l));r[i]=`| ${u.join(" | ")} |`,i+=1}return r.join(`
|
|
116
|
-
`)},p6=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=he(!1),[o,u]=he(!1),l=ve(null),h=ve(0),{isAnimating:d}=Qe(tt),f=async g=>{var E,A;if(typeof window>"u"||!((E=navigator==null?void 0:navigator.clipboard)!=null&&E.write)){r==null||r(new Error("Clipboard API not available"));return}try{let w=(A=l.current)==null?void 0:A.closest('[data-streamdown="table-wrapper"]'),C=w==null?void 0:w.querySelector("table");if(!C){r==null||r(new Error("Table not found"));return}let y=F0(C),R=({csv:H0,tsv:f6,md:Da}[g]||Da)(y),M=new ClipboardItem({"text/plain":new Blob([R],{type:"text/plain"}),"text/html":new Blob([C.outerHTML],{type:"text/html"})});await navigator.clipboard.write([M]),u(!0),s(!1),n==null||n(g),h.current=window.setTimeout(()=>u(!1),i)}catch(w){r==null||r(w)}};ke(()=>{let g=E=>{let A=E.composedPath();l.current&&!A.includes(l.current)&&s(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g),window.clearTimeout(h.current)}},[]);let p=o?Ns:Ls;return m("div",{className:"relative",ref:l,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??m(p,{size:14})}),a?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("md"),title:"Copy table as Markdown",type:"button",children:"Markdown"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},m6=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=he(!1),s=ve(null),{isAnimating:o}=Qe(tt),u=l=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d==null?void 0:d.querySelector("table");if(!f){r==null||r(new Error("Table not found"));return}let p=F0(f),g=l==="csv"?H0(p):Da(p);En(`table.${l==="csv"?"csv":"md"}`,g,l==="csv"?"text/csv":"text/markdown"),a(!1),n==null||n(l)}catch(d){r==null||r(d)}};return ke(()=>{let l=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[]),m("div",{className:"relative",ref:s,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:e??m(Ni,{size:14})}),i?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},g6=({children:e,className:t,showControls:n,...r})=>m("div",{className:"my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2","data-streamdown":"table-wrapper",children:[n?m("div",{className:"flex items-center justify-end gap-1",children:[m(p6,{}),m(m6,{})]}):null,m("div",{className:"border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background",children:m("table",{className:Z("w-full divide-y divide-border",t),"data-streamdown":"table",...r,children:e})})]}),b6=ec(()=>Promise.resolve().then(()=>require("./mermaid-3ZIDBTTL-c404b476.cjs")).then(e=>({default:e.Mermaid}))),E6=/language-([^\s]+)/;function Li(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(a==null?void 0:a.line)&&(i==null?void 0:i.column)===(a==null?void 0:a.column)}function Ie(e,t){return e.className===t.className&&Li(e.node,t.node)}var Pa=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Nr=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Os=Ee(({children:e,className:t,node:n,...r})=>m("ol",{className:Z("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>Ie(e,t));Os.displayName="MarkdownOl";var U0=Ee(({children:e,className:t,node:n,...r})=>m("li",{className:Z("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Li(e.node,t.node));U0.displayName="MarkdownLi";var z0=Ee(({children:e,className:t,node:n,...r})=>m("ul",{className:Z("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>Ie(e,t));z0.displayName="MarkdownUl";var $0=Ee(({className:e,node:t,...n})=>m("hr",{className:Z("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>Ie(e,t));$0.displayName="MarkdownHr";var Y0=Ee(({children:e,className:t,node:n,...r})=>m("span",{className:Z("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>Ie(e,t));Y0.displayName="MarkdownStrong";var _6=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=Qe(tt),[s,o]=he(!1),u=n==="streamdown:incomplete-link",l=Ye(async p=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[a,n,u]),h=Ye(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=Ye(()=>{o(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?m(fe,{children:[m("button",{className:Z("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:l,type:"button",children:e}),a.renderModal?a.renderModal(f):m(s6,{...f})]}):m("a",{className:Z("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},j0=Ee(_6,(e,t)=>Ie(e,t)&&e.href===t.href);j0.displayName="MarkdownA";var V0=Ee(({children:e,className:t,node:n,...r})=>m("h1",{className:Z("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>Ie(e,t));V0.displayName="MarkdownH1";var q0=Ee(({children:e,className:t,node:n,...r})=>m("h2",{className:Z("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>Ie(e,t));q0.displayName="MarkdownH2";var W0=Ee(({children:e,className:t,node:n,...r})=>m("h3",{className:Z("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>Ie(e,t));W0.displayName="MarkdownH3";var G0=Ee(({children:e,className:t,node:n,...r})=>m("h4",{className:Z("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>Ie(e,t));G0.displayName="MarkdownH4";var Q0=Ee(({children:e,className:t,node:n,...r})=>m("h5",{className:Z("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>Ie(e,t));Q0.displayName="MarkdownH5";var K0=Ee(({children:e,className:t,node:n,...r})=>m("h6",{className:Z("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>Ie(e,t));K0.displayName="MarkdownH6";var X0=Ee(({children:e,className:t,node:n,...r})=>{let{controls:i}=Qe(tt),a=Pa(i,"table");return m(g6,{className:t,showControls:a,...r,children:e})},(e,t)=>Ie(e,t));X0.displayName="MarkdownTable";var Z0=Ee(({children:e,className:t,node:n,...r})=>m("thead",{className:Z("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>Ie(e,t));Z0.displayName="MarkdownThead";var J0=Ee(({children:e,className:t,node:n,...r})=>m("tbody",{className:Z("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>Ie(e,t));J0.displayName="MarkdownTbody";var eh=Ee(({children:e,className:t,node:n,...r})=>m("tr",{className:Z("border-border",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>Ie(e,t));eh.displayName="MarkdownTr";var th=Ee(({children:e,className:t,node:n,...r})=>m("th",{className:Z("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>Ie(e,t));th.displayName="MarkdownTh";var nh=Ee(({children:e,className:t,node:n,...r})=>m("td",{className:Z("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>Ie(e,t));nh.displayName="MarkdownTd";var rh=Ee(({children:e,className:t,node:n,...r})=>m("blockquote",{className:Z("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>Ie(e,t));rh.displayName="MarkdownBlockquote";var ih=Ee(({children:e,className:t,node:n,...r})=>m("sup",{className:Z("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>Ie(e,t));ih.displayName="MarkdownSup";var ah=Ee(({children:e,className:t,node:n,...r})=>m("sub",{className:Z("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>Ie(e,t));ah.displayName="MarkdownSub";var sh=Ee(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var o,u;if(!Pt(s))return!1;let l=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of l)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(Pt(f))if(((o=f.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let g of p){if(typeof g=="string"&&g.trim()!==""){h=!0;break}if(Pt(g)&&((u=g.props)==null?void 0:u["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!Pt(s))return s;if(s.type===Os){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(u=>!i(u));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?m("section",{className:t,...r,children:a}):null}return m("section",{className:t,...r,children:e})},(e,t)=>Ie(e,t));sh.displayName="MarkdownSection";var T6=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:o}=Qe(tt),u=Rs(),l=zy();if(a)return m("code",{className:Z("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let h=t==null?void 0:t.match(E6),d=(i=h==null?void 0:h.at(1))!=null?i:"",f="";if(Pt(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?f=n.props.children:typeof n=="string"&&(f=n),d==="mermaid"&&u){let g=Pa(o,"mermaid"),E=Nr(o,"download"),A=Nr(o,"copy"),w=Nr(o,"fullscreen"),C=Nr(o,"panZoom"),y=g&&(E||A||w);return m(qn,{fallback:m(t6,{}),children:m("div",{className:Z("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[m("div",{className:"flex h-8 items-center text-muted-foreground text-xs",children:m("span",{className:"ml-1 font-mono lowercase",children:"mermaid"})}),y?m("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:m("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur","data-streamdown":"mermaid-block-actions",children:[E?m(l6,{chart:f,config:s==null?void 0:s.config}):null,A?m(qu,{code:f}):null,w?m(h6,{chart:f,config:s==null?void 0:s.config}):null]})}):null,m("div",{className:"rounded-md border border-border bg-background",children:m(b6,{chart:f,config:s==null?void 0:s.config,showControls:C})})]})})}let p=Pa(o,"code");return m(Gy,{className:t,code:f,isIncomplete:l,language:d,children:p?m(fe,{children:[m(e6,{code:f,language:d}),m(qu,{})]}):null})},oh=Ee(T6,(e,t)=>e.className===t.className&&Li(e.node,t.node));oh.displayName="MarkdownCode";var uh=Ee(r6,(e,t)=>e.className===t.className&&Li(e.node,t.node));uh.displayName="MarkdownImg";var lh=Ee(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&Pt(r[0])){let i=r[0].props.node,a=i==null?void 0:i.tagName;if(a==="img")return m(fe,{children:e});if(a==="code"&&"data-block"in r[0].props)return m(fe,{children:e})}return m("p",{...n,children:e})},(e,t)=>Ie(e,t));lh.displayName="MarkdownParagraph";var k6={ol:Os,li:U0,ul:z0,hr:$0,strong:Y0,a:j0,h1:V0,h2:q0,h3:W0,h4:G0,h5:Q0,h6:K0,table:X0,thead:Z0,tbody:J0,tr:eh,th,td:nh,blockquote:rh,code:oh,img:uh,pre:({children:e})=>Pt(e)?Mf(e,{"data-block":"true"}):e,sup:ih,sub:ah,p:lh,section:sh},x6=/^[ \t]{0,3}(`{3,}|~{3,})/,y6=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Gu=e=>{let t=e.split(`
|
|
116
|
+
`)},p6=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let[a,s]=he(!1),[o,u]=he(!1),l=ve(null),h=ve(0),{isAnimating:d}=Qe(tt),f=async g=>{var E,A;if(typeof window>"u"||!((E=navigator==null?void 0:navigator.clipboard)!=null&&E.write)){r==null||r(new Error("Clipboard API not available"));return}try{let w=(A=l.current)==null?void 0:A.closest('[data-streamdown="table-wrapper"]'),C=w==null?void 0:w.querySelector("table");if(!C){r==null||r(new Error("Table not found"));return}let y=F0(C),R=({csv:H0,tsv:f6,md:Da}[g]||Da)(y),M=new ClipboardItem({"text/plain":new Blob([R],{type:"text/plain"}),"text/html":new Blob([C.outerHTML],{type:"text/html"})});await navigator.clipboard.write([M]),u(!0),s(!1),n==null||n(g),h.current=window.setTimeout(()=>u(!1),i)}catch(w){r==null||r(w)}};ke(()=>{let g=E=>{let A=E.composedPath();l.current&&!A.includes(l.current)&&s(!1)};return document.addEventListener("mousedown",g),()=>{document.removeEventListener("mousedown",g),window.clearTimeout(h.current)}},[]);let p=o?Ns:Ls;return m("div",{className:"relative",ref:l,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>s(!a),title:"Copy table",type:"button",children:e??m(p,{size:14})}),a?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("md"),title:"Copy table as Markdown",type:"button",children:"Markdown"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>f("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},m6=({children:e,className:t,onDownload:n,onError:r})=>{let[i,a]=he(!1),s=ve(null),{isAnimating:o}=Qe(tt),u=l=>{var h;try{let d=(h=s.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),f=d==null?void 0:d.querySelector("table");if(!f){r==null||r(new Error("Table not found"));return}let p=F0(f),g=l==="csv"?H0(p):Da(p);En(`table.${l==="csv"?"csv":"md"}`,g,l==="csv"?"text/csv":"text/markdown"),a(!1),n==null||n(l)}catch(d){r==null||r(d)}};return ke(()=>{let l=h=>{let d=h.composedPath();s.current&&!d.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",l),()=>{document.removeEventListener("mousedown",l)}},[]),m("div",{className:"relative",ref:s,children:[m("button",{className:Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:e??m(Ni,{size:14})}),i?m("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),m("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>u("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},g6=({children:e,className:t,showControls:n,...r})=>m("div",{className:"my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2","data-streamdown":"table-wrapper",children:[n?m("div",{className:"flex items-center justify-end gap-1",children:[m(p6,{}),m(m6,{})]}):null,m("div",{className:"border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background",children:m("table",{className:Z("w-full divide-y divide-border",t),"data-streamdown":"table",...r,children:e})})]}),b6=ec(()=>Promise.resolve().then(()=>require("./mermaid-3ZIDBTTL-85bdf74f.cjs")).then(e=>({default:e.Mermaid}))),E6=/language-([^\s]+)/;function Li(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return(n==null?void 0:n.line)===(r==null?void 0:r.line)&&(n==null?void 0:n.column)===(r==null?void 0:r.column)&&(i==null?void 0:i.line)===(a==null?void 0:a.line)&&(i==null?void 0:i.column)===(a==null?void 0:a.column)}function Ie(e,t){return e.className===t.className&&Li(e.node,t.node)}var Pa=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Nr=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Os=Ee(({children:e,className:t,node:n,...r})=>m("ol",{className:Z("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e}),(e,t)=>Ie(e,t));Os.displayName="MarkdownOl";var U0=Ee(({children:e,className:t,node:n,...r})=>m("li",{className:Z("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e}),(e,t)=>e.className===t.className&&Li(e.node,t.node));U0.displayName="MarkdownLi";var z0=Ee(({children:e,className:t,node:n,...r})=>m("ul",{className:Z("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e}),(e,t)=>Ie(e,t));z0.displayName="MarkdownUl";var $0=Ee(({className:e,node:t,...n})=>m("hr",{className:Z("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>Ie(e,t));$0.displayName="MarkdownHr";var Y0=Ee(({children:e,className:t,node:n,...r})=>m("span",{className:Z("font-semibold",t),"data-streamdown":"strong",...r,children:e}),(e,t)=>Ie(e,t));Y0.displayName="MarkdownStrong";var _6=({children:e,className:t,href:n,node:r,...i})=>{let{linkSafety:a}=Qe(tt),[s,o]=he(!1),u=n==="streamdown:incomplete-link",l=Ye(async p=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(p.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}o(!0)}},[a,n,u]),h=Ye(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),d=Ye(()=>{o(!1)},[]),f={url:n??"",isOpen:s,onClose:d,onConfirm:h};return a!=null&&a.enabled&&n?m(fe,{children:[m("button",{className:Z("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:l,type:"button",children:e}),a.renderModal?a.renderModal(f):m(s6,{...f})]}):m("a",{className:Z("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},j0=Ee(_6,(e,t)=>Ie(e,t)&&e.href===t.href);j0.displayName="MarkdownA";var V0=Ee(({children:e,className:t,node:n,...r})=>m("h1",{className:Z("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e}),(e,t)=>Ie(e,t));V0.displayName="MarkdownH1";var q0=Ee(({children:e,className:t,node:n,...r})=>m("h2",{className:Z("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e}),(e,t)=>Ie(e,t));q0.displayName="MarkdownH2";var W0=Ee(({children:e,className:t,node:n,...r})=>m("h3",{className:Z("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e}),(e,t)=>Ie(e,t));W0.displayName="MarkdownH3";var G0=Ee(({children:e,className:t,node:n,...r})=>m("h4",{className:Z("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e}),(e,t)=>Ie(e,t));G0.displayName="MarkdownH4";var Q0=Ee(({children:e,className:t,node:n,...r})=>m("h5",{className:Z("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e}),(e,t)=>Ie(e,t));Q0.displayName="MarkdownH5";var K0=Ee(({children:e,className:t,node:n,...r})=>m("h6",{className:Z("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e}),(e,t)=>Ie(e,t));K0.displayName="MarkdownH6";var X0=Ee(({children:e,className:t,node:n,...r})=>{let{controls:i}=Qe(tt),a=Pa(i,"table");return m(g6,{className:t,showControls:a,...r,children:e})},(e,t)=>Ie(e,t));X0.displayName="MarkdownTable";var Z0=Ee(({children:e,className:t,node:n,...r})=>m("thead",{className:Z("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e}),(e,t)=>Ie(e,t));Z0.displayName="MarkdownThead";var J0=Ee(({children:e,className:t,node:n,...r})=>m("tbody",{className:Z("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e}),(e,t)=>Ie(e,t));J0.displayName="MarkdownTbody";var eh=Ee(({children:e,className:t,node:n,...r})=>m("tr",{className:Z("border-border",t),"data-streamdown":"table-row",...r,children:e}),(e,t)=>Ie(e,t));eh.displayName="MarkdownTr";var th=Ee(({children:e,className:t,node:n,...r})=>m("th",{className:Z("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e}),(e,t)=>Ie(e,t));th.displayName="MarkdownTh";var nh=Ee(({children:e,className:t,node:n,...r})=>m("td",{className:Z("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e}),(e,t)=>Ie(e,t));nh.displayName="MarkdownTd";var rh=Ee(({children:e,className:t,node:n,...r})=>m("blockquote",{className:Z("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e}),(e,t)=>Ie(e,t));rh.displayName="MarkdownBlockquote";var ih=Ee(({children:e,className:t,node:n,...r})=>m("sup",{className:Z("text-sm",t),"data-streamdown":"superscript",...r,children:e}),(e,t)=>Ie(e,t));ih.displayName="MarkdownSup";var ah=Ee(({children:e,className:t,node:n,...r})=>m("sub",{className:Z("text-sm",t),"data-streamdown":"subscript",...r,children:e}),(e,t)=>Ie(e,t));ah.displayName="MarkdownSub";var sh=Ee(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=s=>{var o,u;if(!Pt(s))return!1;let l=Array.isArray(s.props.children)?s.props.children:[s.props.children],h=!1,d=!1;for(let f of l)if(f){if(typeof f=="string")f.trim()!==""&&(h=!0);else if(Pt(f))if(((o=f.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let p=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let g of p){if(typeof g=="string"&&g.trim()!==""){h=!0;break}if(Pt(g)&&((u=g.props)==null?void 0:u["data-footnote-backref"])===void 0){h=!0;break}}}}return d&&!h},a=Array.isArray(e)?e.map(s=>{if(!Pt(s))return s;if(s.type===Os){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(u=>!i(u));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):e;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?m("section",{className:t,...r,children:a}):null}return m("section",{className:t,...r,children:e})},(e,t)=>Ie(e,t));sh.displayName="MarkdownSection";var T6=({node:e,className:t,children:n,...r})=>{var i;let a=!("data-block"in r),{mermaid:s,controls:o}=Qe(tt),u=Rs(),l=zy();if(a)return m("code",{className:Z("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let h=t==null?void 0:t.match(E6),d=(i=h==null?void 0:h.at(1))!=null?i:"",f="";if(Pt(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?f=n.props.children:typeof n=="string"&&(f=n),d==="mermaid"&&u){let g=Pa(o,"mermaid"),E=Nr(o,"download"),A=Nr(o,"copy"),w=Nr(o,"fullscreen"),C=Nr(o,"panZoom"),y=g&&(E||A||w);return m(qn,{fallback:m(t6,{}),children:m("div",{className:Z("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[m("div",{className:"flex h-8 items-center text-muted-foreground text-xs",children:m("span",{className:"ml-1 font-mono lowercase",children:"mermaid"})}),y?m("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:m("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur","data-streamdown":"mermaid-block-actions",children:[E?m(l6,{chart:f,config:s==null?void 0:s.config}):null,A?m(qu,{code:f}):null,w?m(h6,{chart:f,config:s==null?void 0:s.config}):null]})}):null,m("div",{className:"rounded-md border border-border bg-background",children:m(b6,{chart:f,config:s==null?void 0:s.config,showControls:C})})]})})}let p=Pa(o,"code");return m(Gy,{className:t,code:f,isIncomplete:l,language:d,children:p?m(fe,{children:[m(e6,{code:f,language:d}),m(qu,{})]}):null})},oh=Ee(T6,(e,t)=>e.className===t.className&&Li(e.node,t.node));oh.displayName="MarkdownCode";var uh=Ee(r6,(e,t)=>e.className===t.className&&Li(e.node,t.node));uh.displayName="MarkdownImg";var lh=Ee(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&Pt(r[0])){let i=r[0].props.node,a=i==null?void 0:i.tagName;if(a==="img")return m(fe,{children:e});if(a==="code"&&"data-block"in r[0].props)return m(fe,{children:e})}return m("p",{...n,children:e})},(e,t)=>Ie(e,t));lh.displayName="MarkdownParagraph";var k6={ol:Os,li:U0,ul:z0,hr:$0,strong:Y0,a:j0,h1:V0,h2:q0,h3:W0,h4:G0,h5:Q0,h6:K0,table:X0,thead:Z0,tbody:J0,tr:eh,th,td:nh,blockquote:rh,code:oh,img:uh,pre:({children:e})=>Pt(e)?Mf(e,{"data-block":"true"}):e,sup:ih,sub:ah,p:lh,section:sh},x6=/^[ \t]{0,3}(`{3,}|~{3,})/,y6=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Gu=e=>{let t=e.split(`
|
|
117
117
|
`),n=null,r=0;for(let i of t){let a=x6.exec(i);if(n===null){if(a){let s=a[1];n=s[0],r=s.length}}else if(a){let s=a[1],o=s[0],u=s.length;o===n&&u>=r&&(n=null,r=0)}}return n!==null},w6=e=>{let t=e.split(`
|
|
118
118
|
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&y6.test(r))return!0}return!1},A6=()=>e=>{Ft(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Qu=[],Ku={allowDangerousHtml:!0},Lr=new WeakMap,C6=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let h="default";return this.keyCache.set(e,h),h}let a=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[g,E]=p;if(typeof g=="function"){let A=Lr.get(g);A||(A=g.name,Lr.set(g,A)),d+=A}else d+=String(g);d+=":",d+=JSON.stringify(E)}else if(typeof p=="function"){let g=Lr.get(p);g||(g=p.name,Lr.set(p,g)),d+=g}else d+=String(p)}return d},s=a(n),o=a(r),u=i?JSON.stringify(i):"",l=`${o}::${s}::${u}`;return this.keyCache.set(e,l),l}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Xu=new C6,ch=e=>{let t=v6(e),n=e.children||"";return D6(t.runSync(t.parse(n),n),e)},v6=e=>{let t=Xu.get(e);if(t)return t;let n=I6(e);return Xu.set(e,n),n},S6=e=>e.some(t=>Array.isArray(t)?t[0]===_a:t===_a),I6=e=>{let t=e.rehypePlugins||Qu,n=e.remarkPlugins||Qu,r=S6(t)?n:[...n,A6],i=e.remarkRehypeOptions?{...Ku,...e.remarkRehypeOptions}:Ku;return Mx().use(Mk).use(r).use(Ex,i).use(t)},N6=e=>e,L6=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},R6=(e,t)=>{var n;for(let r in Gi)if(Object.hasOwn(Gi,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],a=Gi[r];(a===null||a.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},O6=(e,t,n,r,i,a)=>{let s=!1;return r?s=!r.includes(e.tagName):i&&(s=i.includes(e.tagName)),!s&&a&&typeof t=="number"&&(s=!a(e,t,n)),s},D6=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:s,urlTransform:o}=t;if(n||r||i||a||o){let u=o||N6;Ft(e,(l,h,d)=>{if(l.type==="raw"&&d&&typeof h=="number")return L6(d,h,a,l.value),h;if(l.type==="element"&&(R6(l,u),O6(l,h,d,r,i,n)&&d&&typeof h=="number"))return s&&l.children?d.children.splice(h,1,...l.children):d.children.splice(h,1),h})}return jT(e,{Fragment:fe,components:t.components,ignoreInvalidStyle:!0,jsx:m,jsxs:m,passKeys:!0,passNode:!0})},P6=/\[\^[\w-]{1,200}\](?!:)/,M6=/\[\^[\w-]{1,200}\]:/,B6=/<(\w+)[\s>]/,F6=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Zu=new Map,Ju=new Map,H6=e=>{let t=e.toLowerCase(),n=Zu.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Zu.set(t,r),r},U6=e=>{let t=e.toLowerCase(),n=Ju.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return Ju.set(t,r),r},el=(e,t)=>{if(F6.has(t.toLowerCase()))return 0;let n=e.match(H6(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},tl=(e,t)=>{let n=e.match(U6(t));return n?n.length:0},z6=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},$6=e=>{let t=P6.test(e),n=M6.test(e);if(t||n)return[e];let r=ut.lex(e,{gfm:!0}),i=[],a=[],s=!1;for(let o of r){let u=o.raw,l=i.length;if(a.length>0){i[l-1]+=u;let h=a.at(-1),d=el(u,h),f=tl(u,h);for(let p=0;p<d;p+=1)a.push(h);for(let p=0;p<f;p+=1)a.length>0&&a.at(-1)===h&&a.pop();continue}if(o.type==="html"&&o.block){let h=u.match(B6);if(h){let d=h[1],f=el(u,d),p=tl(u,d);f>p&&a.push(d)}}if(l>0&&!s){let h=i[l-1];if(z6(h)%2===1){i[l-1]=h+u;continue}}i.push(u),o.type!=="space"&&(s=o.type==="code")}return i},Y6=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(a,s,o,u)=>{let l=o.replace(/\n\n/g,`
|
|
119
119
|
<!---->
|
|
120
120
|
`);return s+l+u})}return n},j6=/^[ \t]*<[\w!/?-]/,V6=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,q6=e=>typeof e!="string"||e.length===0||!j6.test(e)?e:e.replace(V6,"$1"),nl,rl,$r={...Jn,protocols:{...Jn.protocols,href:[...(rl=(nl=Jn.protocols)==null?void 0:nl.href)!=null?rl:[],"tel"]}},Ma={raw:_a,sanitize:[id,$r],harden:[Vf,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},W6={gfm:[l3,{}]},il=Object.values(Ma),G6=Object.values(W6),Q6={block:" ▋",circle:" ●"},K6={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},tt=ci(K6),dh=Ee(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,...a})=>{let s=typeof e=="string"&&n?q6(e):e;return m(R0.Provider,{value:i,children:m(ch,{...a,children:s})})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var a,s;return((a=e.components)==null?void 0:a[i])!==((s=t.components)==null?void 0:s[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});dh.displayName="Block";var X6=["github-light","github-dark"],hh=Ee(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:r=!1,components:i,rehypePlugins:a=il,remarkPlugins:s=G6,className:o,shikiTheme:u=X6,mermaid:l,controls:h=!0,isAnimating:d=!1,animated:f,BlockComponent:p=dh,parseMarkdownIntoBlocksFn:g=$6,caret:E,plugins:A,remend:w,linkSafety:C={enabled:!0},allowedTags:y,...R})=>{let M=jh(),[S,$]=Ff(),O=Ne(()=>y?Object.keys(y):[],[y]),Y=Ne(()=>{if(typeof e!="string")return"";let J=t==="streaming"&&n?g_(e,w):e;return O.length>0&&(J=Y6(J,O)),J},[e,t,n,w,O]),v=Ne(()=>g(Y),[Y,g]),[U,I]=he(v);ke(()=>{t==="streaming"?$(()=>{I(v)}):I(v)},[v,t]);let G=t==="streaming"?U:v,ae=Ne(()=>G.map((J,x)=>`${M}-${x}`),[G.length,M]),K=Ne(()=>f?f===!0?Ra():Ra(f):null,[f]),ue=Ne(()=>{var J,x;return{shikiTheme:(x=(J=A==null?void 0:A.code)==null?void 0:J.getThemes())!=null?x:u,controls:h,isAnimating:d,mode:t,mermaid:l,linkSafety:C}},[u,h,d,t,l,C,A==null?void 0:A.code]),V=Ne(()=>({...k6,...i}),[i]),j=Ne(()=>{let J=[];return A!=null&&A.cjk&&(J=[...J,...A.cjk.remarkPluginsBefore]),J=[...J,...s],A!=null&&A.cjk&&(J=[...J,...A.cjk.remarkPluginsAfter]),A!=null&&A.math&&(J=[...J,A.math.remarkPlugin]),J},[s,A==null?void 0:A.math,A==null?void 0:A.cjk]),te=Ne(()=>{var J;let x=a;if(y&&Object.keys(y).length>0&&a===il){let Se={...$r,tagNames:[...(J=$r.tagNames)!=null?J:[],...Object.keys(y)],attributes:{...$r.attributes,...y}};x=[Ma.raw,[id,Se],Ma.harden]}return A!=null&&A.math&&(x=[...x,A.math.rehypePlugin]),K&&d&&(x=[...x,K.rehypePlugin]),x},[a,A==null?void 0:A.math,K,d,y]),_=Ne(()=>{if(!d||G.length===0)return!1;let J=G.at(-1);return Gu(J)||w6(J)},[d,G]),pe=Ne(()=>E&&d&&!_?{"--streamdown-caret":`"${Q6[E]}"`}:void 0,[E,d,_]);return t==="static"?m(Oa.Provider,{value:A??null,children:m(tt.Provider,{value:ue,children:m("div",{className:Z("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",o),children:m(ch,{components:V,rehypePlugins:te,remarkPlugins:j,...R,children:Y})})})}):m(Oa.Provider,{value:A??null,children:m(tt.Provider,{value:ue,children:m("div",{className:Z("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",E&&!_?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,o),style:pe,children:[G.length===0&&E&&d&&m("span",{}),G.map((J,x)=>{let Se=x===G.length-1,me=d&&Se&&Gu(J);return m(p,{components:V,content:J,index:x,isIncomplete:me,rehypePlugins:te,remarkPlugins:j,shouldNormalizeHtmlIndentation:r,shouldParseIncompleteMarkdown:n,...R},ae[x])})]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation);hh.displayName="Streamdown";var Z6=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let u=ve(null),l=ve(null),[h,d]=he(s),[f,p]=he({x:0,y:0}),[g,E]=he(!1),[A,w]=he({x:0,y:0}),[C,y]=he({x:0,y:0}),R=Ye(I=>{d(G=>Math.max(n,Math.min(r,G+I)))},[n,r]),M=Ye(()=>{R(i)},[R,i]),S=Ye(()=>{R(-i)},[R,i]),$=Ye(()=>{d(s),p({x:0,y:0})},[s]),O=Ye(I=>{I.preventDefault();let G=I.deltaY>0?-i:i;R(G)},[R,i]),Y=Ye(I=>{if(I.button!==0||I.isPrimary===!1)return;E(!0),w({x:I.clientX,y:I.clientY}),y(f);let G=I.currentTarget;G instanceof HTMLElement&&G.setPointerCapture(I.pointerId)},[f]),v=Ye(I=>{if(!g)return;I.preventDefault();let G=I.clientX-A.x,ae=I.clientY-A.y;p({x:C.x+G,y:C.y+ae})},[g,A,C]),U=Ye(I=>{E(!1);let G=I.currentTarget;G instanceof HTMLElement&&G.releasePointerCapture(I.pointerId)},[]);return ke(()=>{let I=u.current;if(I)return I.addEventListener("wheel",O,{passive:!1}),()=>{I.removeEventListener("wheel",O)}},[O]),ke(()=>{let I=l.current;if(I&&g)return document.body.style.userSelect="none",I.addEventListener("pointermove",v,{passive:!1}),I.addEventListener("pointerup",U),I.addEventListener("pointercancel",U),()=>{document.body.style.userSelect="",I.removeEventListener("pointermove",v),I.removeEventListener("pointerup",U),I.removeEventListener("pointercancel",U)}},[g,v,U]),m("div",{className:Z("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:u,style:{cursor:g?"grabbing":"grab"},children:[a?m("div",{className:Z("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h>=r,onClick:M,title:"Zoom in",type:"button",children:m(Zy,{size:16})}),m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:h<=n,onClick:S,title:"Zoom out",type:"button",children:m(Jy,{size:16})}),m("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:$,title:"Reset zoom and pan",type:"button",children:m(Xy,{size:16})})]}):null,m("div",{className:Z("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:Y,ref:l,role:"application",style:{transform:`translate(${f.x}px, ${f.y}px) scale(${h})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},fh=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let[a,s]=he(null),[o,u]=he(!1),[l,h]=he(""),[d,f]=he(""),[p,g]=he(0),{mermaid:E}=Qe(tt),A=Rs(),w=E==null?void 0:E.errorComponent,{shouldRender:C,containerRef:y}=Ry({immediate:r});if(ke(()=>{if(C){if(!A){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),u(!0);let M=A.getMermaid(n),S=e.split("").reduce((Y,v)=>(Y<<5)-Y+v.charCodeAt(0)|0,0),$=`mermaid-${Math.abs(S)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:O}=await M.render($,e);h(O),f(O)}catch(M){if(!(d||l)){let S=M instanceof Error?M.message:"Failed to render Mermaid chart";s(S)}}finally{u(!1)}})()}},[e,n,p,C,A]),!(C||l||d))return m("div",{className:Z("my-4 min-h-[200px]",t),ref:y});if(o&&!l&&!d)return m("div",{className:Z("my-4 flex justify-center p-4",t),ref:y,children:m("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[m("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),m("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!l&&!d)return w?m("div",{ref:y,children:m(w,{chart:e,error:a,retry:()=>g(S=>S+1)})}):m("div",{className:Z("rounded-md bg-red-50 p-4",t),ref:y,children:[m("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),m("details",{className:"mt-2",children:[m("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),m("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]});let R=l||d;return m("div",{className:Z("size-full",t),"data-streamdown":"mermaid",ref:y,children:m(Z6,{className:Z(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:m("div",{"aria-label":"Mermaid chart",className:Z("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:R},role:"img"})})})};function J6({href:e,children:t}){return m("a",{href:e,target:"_blank",rel:"noopener noreferrer",class:"fr hover:text-a-9 focus-visible:rounded-kin-xs text-inherit underline underline-offset-2 transition-all hover:underline-offset-4",children:t})}const e5={a:J6};function Ds({content:e,isStreaming:t=!1}){return e?m(hh,{className:"kin-markdown text-n-12 text-sm leading-relaxed",isAnimating:t,mode:t?"streaming":"static",components:e5,children:e}):null}const t5=.25,n5=.4,r5=10,i5=5,al=240,sl=()=>({pointerId:null,startX:0,startY:0,startTime:0,targetHeight:0,currentTranslateY:0,threshold:0,phase:"idle"});function Rr(e){e.style.removeProperty("transform"),e.style.removeProperty("will-change"),e.style.removeProperty("transition")}function a5(e,t,n){if(!(e instanceof Element)||e.closest("button,input,textarea,select,a"))return!1;if(n!=="mouse"){let r=e;for(;r&&r!==t;){const i=window.getComputedStyle(r);if((/(auto|scroll)/.test(i.overflowY)||/(auto|scroll)/.test(i.overflow))&&r.scrollHeight>r.clientHeight&&r.scrollTop>0)return!1;r=r.parentElement}}return!0}function ph({enabled:e,onClose:t,dragVar:n}){const r=ve(null),i=ve(sl()),a=ve(null),[s,o]=he(!1),u=()=>{a.current&&(clearTimeout(a.current),a.current=null)},l=C=>{var R;if(!n)return;const y=(R=r.current)==null?void 0:R.closest("[data-kin-root]");y&&(C===null?y.style.removeProperty(n):y.style.setProperty(n,String(Math.min(1,C))))},h=()=>{const C=i.current.phase;i.current=sl();const y=r.current;y&&(y.style.removeProperty("user-select"),C==="dragging"&&y.toggleAttribute("data-dragging",!1))},d=C=>{if(C===null)return;const y=r.current;y!=null&&y.hasPointerCapture(C)&&y.releasePointerCapture(C)},f=()=>{const C=r.current;C&&(l(0),C.style.removeProperty("transition"),C.style.transform="translate3d(0, 0, 0)",setTimeout(()=>{a.current||Rr(C),l(null)},al))},p=()=>{if(!e||a.current)return;const C=r.current;if(!C){t();return}o(!0),l(1),C.style.willChange="transform",C.style.removeProperty("transition"),C.style.transform=`translate3d(0, ${C.getBoundingClientRect().height+32}px, 0)`,a.current=setTimeout(()=>{a.current=null,t(),Rr(C),o(!1),l(null)},al)},g=C=>{if(!e||a.current||i.current.phase!=="idle"||C.pointerType==="mouse"&&C.button!==0)return;const y=r.current;!y||!a5(C.target,y,C.pointerType)||(i.current={pointerId:C.pointerId,startX:C.clientX,startY:C.clientY,startTime:performance.now(),targetHeight:y.getBoundingClientRect().height,currentTranslateY:0,threshold:C.pointerType==="touch"||C.pointerType==="pen"?r5:i5,phase:"pending"})},E=C=>{var $;const y=i.current;if(y.phase!=="pending"&&y.phase!=="dragging"||y.pointerId!==C.pointerId||a.current)return;const R=r.current;if(!R)return;const M=C.clientX-y.startX,S=C.clientY-y.startY;if(y.phase==="pending"){if(Math.abs(M)<y.threshold&&Math.abs(S)<y.threshold)return;if(Math.abs(S)<=Math.abs(M)||S<=0){h();return}y.phase="dragging",R.toggleAttribute("data-dragging",!0),R.setPointerCapture(C.pointerId),R.style.willChange="transform",R.style.transition="none",R.style.userSelect="none",($=window.getSelection())==null||$.removeAllRanges()}y.phase==="dragging"&&(y.currentTranslateY=Math.max(0,S),R.style.transform=`translate3d(0, ${y.currentTranslateY}px, 0)`,y.targetHeight>0&&l(y.currentTranslateY/y.targetHeight),C.preventDefault())},A=C=>{const y=i.current;if(y.pointerId!==C.pointerId)return;d(y.pointerId);const R=y.phase==="dragging";h(),R&&f()},w=C=>{const y=i.current;if(y.pointerId!==C.pointerId)return;if(d(y.pointerId),y.phase!=="dragging"){h();return}const R=y.currentTranslateY,M=Math.max(1,performance.now()-y.startTime),S=R/M,$=R>=y.targetHeight*t5||S>n5;h(),$?p():f()};return ke(()=>{if(e)return;u(),o(!1),h(),l(null);const C=r.current;C&&Rr(C)},[e]),ke(()=>()=>{u(),l(null);const C=r.current;C&&(C.toggleAttribute("data-dragging",!1),Rr(C))},[]),{shellRef:r,isClosing:s,closeWithSlideOut:p,dragHandlers:{onPointerDown:g,onPointerMove:E,onPointerUp:w,onPointerCancel:A}}}function s5({onClose:e,ariaLabel:t,children:n}){const r=F.embedded.value,{shellRef:i,isClosing:a,closeWithSlideOut:s,dragHandlers:o}=ph({enabled:!0,onClose:e,dragVar:"--kin-overlay-drag"}),[u,l]=he(!1);return ke(()=>{requestAnimationFrame(()=>l(!0))},[]),ke(()=>{const h=d=>{d.key==="Escape"&&(d.stopPropagation(),s())};return document.addEventListener("keydown",h,{capture:!0}),()=>document.removeEventListener("keydown",h,{capture:!0})},[s]),m(fe,{children:[m("div",{class:kh({visible:u&&!a}),style:u&&!a?{opacity:"calc(1 - var(--kin-overlay-drag, 0))"}:void 0,"aria-hidden":"true",onClick:s}),m("div",{ref:i,class:Th({layout:r?"embedded":"open",class:`animate-kin-drawer-in ${r?"absolute inset-0 [--kin-inset:0px]":"[--kin-inset:2rem]"}`}),role:"dialog","aria-modal":"true","aria-label":t,...o,children:[m("div",{"aria-hidden":"true",class:"bg-n-5/50 absolute left-1/2 top-2 h-1 w-12 -translate-x-1/2 rounded-full"}),n(s)]})]})}function Ba({text:e,icon:t=la}){return m("div",{class:"text-n-9 flex items-center gap-1.5 text-xs",children:[m(t,{class:"size-3 shrink-0 animate-pulse"}),m("span",{class:"animate-kin-shimmer bg-[linear-gradient(90deg,oklch(var(--n-9))_40%,oklch(var(--n-11))_50%,oklch(var(--n-9))_60%)] bg-[length:200%_100%] bg-clip-text text-transparent",children:e})]})}const o5={location:Tf,type:xf,salary:kf};function u5({details:e}){return e.length===0?null:m("div",{class:"text-n-10 flex flex-wrap gap-x-2.5 gap-y-1 text-xs",children:e.map(t=>{const n=o5[t.key];return m("span",{class:"flex items-center gap-1",children:[n&&m(n,{class:"size-3 shrink-0"}),t.value]},t.key)})})}function mh({job:e}){return m("div",{class:"flex min-w-0 flex-1 flex-col gap-1 py-1 pl-2",children:[m("p",{class:"text-n-12 text-sm font-semibold leading-tight",children:e.title}),m(u5,{details:e.details})]})}function l5({jobs:e}){const[t,n]=he(null),r=i=>{n(a=>a===i?null:i)};return m("div",{class:"grid gap-2 py-1.5",children:e.map(i=>m(d5,{job:i,open:t===i.id,onToggle:()=>r(i.id)},i.id))})}function c5(){F.overlay.value=null}function ol(e,t){var n,r;t&&t.status!=="error"||(F.setJobDetail(e,{status:"loading",error:void 0}),(r=(n=F.requestJobDetail).value)==null||r.call(n,e))}function d5({job:e,open:t,onToggle:n}){const r=F.jobDetails.value[e.id],i=(r==null?void 0:r.status)==="streaming"?r.liveSummary:r==null?void 0:r.summary,a=()=>{t||ol(e.id,r),n()},s=()=>{ol(e.id,r),F.overlay.value=m(h5,{job:e})};return m("div",{class:"corner-smooth rounded-kin-xl outline-n-3 bg-n-2 flex flex-col overflow-clip outline outline-1",children:[m("button",{type:"button",class:"hover:bg-n-3/50 active:bg-n-3/75 flex flex-1 items-center py-1 pl-1 pr-2 text-left transition-colors duration-200",onClick:a,"aria-expanded":t,children:[m(mh,{job:e}),m(Kl,{class:sa("text-n-9 ease-kin-fluid duration-kin size-3.5 shrink-0 transition-transform",t&&"rotate-180"),strokeWidth:2})]}),m("div",{class:sa("duration-kin ease-kin-fluid grid transition-all",t?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"),children:m("div",{class:"overflow-hidden",children:m("div",{class:"border-n-3 flex flex-col gap-2 border-t px-3 py-3",children:!r||r.status==="loading"?m(Ba,{text:"Loading job details…"}):r.status==="error"?m("p",{class:"text-n-9 text-xs",children:r.error}):m(fe,{children:[i&&m(fe,{children:[m("div",{class:"kin-markdown text-n-11 text-xs leading-relaxed",children:m(Ds,{content:i,isStreaming:r.status==="streaming"})}),m("p",{class:"text-n-9 text-[11px] italic",children:"AI-generated summary (may contain inaccuracies)"})]}),!i&&r.status==="streaming"&&m(Ba,{text:"Generating summary…"}),r.description&&m("div",{class:"flex gap-2",children:[m("button",{type:"button",class:Ct({variant:"neutral",size:"sm",class:"flex-1"}),onClick:s,children:"Full description"}),e.applyUrl&&m("a",{href:e.applyUrl,target:"_blank",rel:"noopener noreferrer",class:Ct({variant:"accent",size:"sm",class:"flex-1"}),onClick:o=>o.stopPropagation(),children:"Apply now"})]})]})})})})]})}function h5({job:e}){const t=F.jobDetails.value[e.id];return m(s5,{onClose:c5,ariaLabel:`Job details: ${e.title}`,children:n=>m(fe,{children:[m("header",{class:"from-a-2/50 relative flex select-none items-start justify-between bg-gradient-to-b to-transparent p-3 pb-1",children:[m(mh,{job:e}),m("button",{type:"button",class:Ct({variant:"neutral",size:"iconSm"}),onClick:n,"aria-label":"Close",children:m(Gl,{strokeWidth:2})})]}),m("div",{class:bh({class:"pl-5 pr-5 text-sm sm:px-5"}),children:t!=null&&t.description?m("div",{dangerouslySetInnerHTML:{__html:t.description}}):m("p",{class:"text-n-9 text-sm",children:"No description available."})}),e.applyUrl&&m("div",{class:"flex p-4 pt-2",children:m("a",{href:e.applyUrl,target:"_blank",rel:"noopener noreferrer",class:Ct({variant:"accent",size:"md",class:"flex-1"}),onClick:r=>r.stopPropagation(),children:"Apply now"})})]})})}const f5={thinking:{text:"Thinking…",icon:la},responding:{text:"Writing response…",icon:to},processing_results:{text:"Processing results…",icon:la},processing_cv:{text:"Scanning your CV…",icon:eo},searchJobs:{text:"Searching jobs…",icon:Js},matchJobs:{text:"Matching jobs…",icon:Js},searchKnowledge:{text:"Searching company info…",icon:bf},getProfileSummary:{text:"Reviewing your profile…",icon:eo},updatePreferences:{text:"Updating your preferences…",icon:Ef},remember:{text:"Saving details…",icon:_f},suggestQuickReplies:{text:"Preparing reply options…",icon:to}},gh=vt({base:"animate-kin-message-in flex max-w-[95%] flex-col",variants:{side:{user:"self-end",assistant:"self-start w-full gap-2.5 p-1"}}}),bh=vt({base:"[&::-webkit-scrollbar-thumb]:bg-n-4 [&::-webkit-scrollbar-thumb]:rounded-kin-xs flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-none scroll-smooth break-words py-4 [mask-image:linear-gradient(to_bottom,transparent_0,_black_1.5rem,_black_calc(100%-1.5rem),transparent_100%),linear-gradient(black,black)] [mask-size:calc(100%-6px)_100%,6px_100%] [mask-position:0_0,100%_0] [mask-repeat:no-repeat,no-repeat] sm:overscroll-auto [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5"});function p5(){const e=ve(null);return m("div",{ref:e,class:bh({class:"pl-safe-l pr-safe-r sm:px-4 [&>:first-child]:mt-auto"}),role:"log","aria-label":"Chat messages","aria-live":"polite","aria-relevant":"additions",children:[m(g5,{}),m(b5,{}),m(E5,{}),m(m5,{containerRef:e})]})}function m5({containerRef:e}){var h,d;const[t,n]=he(!0),r=ve(!1),i=F.messages.value.length,a=((h=F.messages.value.at(-1))==null?void 0:h.role)==="user",s=(d=F.liveAssistantMessage.value)==null?void 0:d.content,o=F.assistantStatus.value,u=F.quickReplies.value.length,l=()=>{const f=e.current;f&&(r.current=!0,f.scrollTop=f.scrollHeight,n(!0))};return ke(()=>{const f=e.current;if(!f)return;l();const p=()=>{const g=f.scrollHeight-f.scrollTop-f.clientHeight<80;r.current?r.current=!g:n(g)};return f.addEventListener("scroll",p,{passive:!0}),()=>f.removeEventListener("scroll",p)},[]),ke(()=>{(t||a)&&l()},[i,s,o,u,a]),t?null:m("button",{type:"button",class:Ct({variant:"neutral",size:"iconSm",class:"animate-kin-fade-in absolute bottom-3 left-1/2 -translate-x-1/2"}),"aria-label":"Scroll to latest message",onClick:l,children:m(Kl,{strokeWidth:2})})}function g5(){const e=F.messages.value.length,t=!!(F.liveAssistantMessage.value||F.isStreaming.value||F.assistantStatus.value);return e||t?null:m("div",{class:"animate-kin-fade-in my-auto px-6 py-6 text-center",style:{animationDelay:"150ms"},children:[m("div",{class:"text-n-9 mx-auto mb-4 size-12 opacity-50","aria-hidden":"true",children:m(hf,{class:"h-full w-full"})}),m("p",{class:"text-n-12 mb-2 text-base",children:"Hi there, you're speaking with Kin AI Agent."}),m("p",{class:"text-n-9 text-sm",children:"How can I help you today?"})]})}function b5(){return m(fe,{children:F.messages.value.filter(e=>{var t;return e.role==="assistant"?!!e.content.trim()||!!((t=e.blocks)!=null&&t.length):e.role==="user"?!!e.content.trim()||!!e.attachment:!0}).map((e,t)=>m(_5,{message:e,animationIndex:t},e.id))})}function Eh({statusMeta:e,timestamp:t}){return m("div",{class:"text-n-9 border-n-4 inline-flex items-center gap-1.5 self-start border-t pt-1.5 text-xs first:border-t-0 first:pt-0","aria-hidden":"true",children:e?m(Ba,{...e}):m("span",{children:["Kin • AI Agent • ",t?k5(t):"typing..."]})})}function E5(){const e=F.liveAssistantMessage.value,t=F.isStreaming.value,n=F.assistantStatus.value,r=n?f5[n]:void 0;return!e&&!t&&!r?null:m("article",{class:gh({side:"assistant"}),"aria-label":"Message from Kin AI Agent",children:[(e==null?void 0:e.content)&&m(Ds,{content:e.content,isStreaming:t}),m(Eh,{statusMeta:r,timestamp:t||e==null?void 0:e.timestamp})]})}function _5({message:e,animationIndex:t}){const{role:n,content:r,timestamp:i,attachment:a,blocks:s}=e,o=n==="user",u=Math.min((t+1)*.05,.35);return n==="system"?m("div",{class:"flex justify-center px-4 py-2",role:"status","aria-label":"System notification",children:m("span",{class:"border-n-6/40 bg-n-3 text-n-9 corner-smooth rounded-kin-lg border px-3 py-1.5 text-xs",children:r})}):m("article",{class:gh({side:o?"user":"assistant"}),style:{animationDelay:`${u}s`},"aria-label":`Message from ${o?"You":"Kin AI Agent"}`,children:[o&&m("div",{class:"bg-n-3 text-n-12 corner-smooth rounded-kin-lg relative px-3.5 py-2 text-sm",children:[a&&m("div",{class:"text-n-10 flex items-center gap-1.5",children:[m(Ql,{class:"text-n-9 size-3.5 shrink-0"}),m("span",{class:"max-w-full truncate",children:a.name})]}),m("p",{children:r}),m("svg",{class:"text-n-3 absolute -bottom-1.5 right-1.5 w-4","aria-hidden":"true",viewBox:"0 0 16 8",children:m("path",{d:"M15 0S16 3 16 7C16 8 15 7 15 7 11 3 9 2 0 2Z",fill:"currentColor"})})]}),!o&&r&&m(Ds,{content:r}),!o&&(s==null?void 0:s.map((l,h)=>m(T5,{block:l},h))),!o&&m(Eh,{timestamp:i})]})}function T5({block:e}){switch(e.kind){case"job_cards":return m(l5,{jobs:e.jobs});default:return null}}function k5(e){const n=new Date().getTime()-e.getTime();return n<6e4?"Just now":n<36e5?`${Math.floor(n/6e4)}m ago`:e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function _h({content:e,children:t}){var l;const[n,r]=he(!1),i=ve(null),a=ve(null),s=t.props,o=Sl(t,{ref:i,onMouseEnter:Or(s.onMouseEnter,()=>r(!0)),onMouseLeave:Or(s.onMouseLeave,()=>r(!1)),onFocus:Or(s.onFocus,()=>r(!0)),onBlur:Or(s.onBlur,()=>r(!1))});ke(()=>{if(!n)return;const h=d=>{i.current&&!d.composedPath().includes(i.current)&&r(!1)};return document.addEventListener("pointerdown",h),()=>document.removeEventListener("pointerdown",h)},[n]),Yh(()=>{const h=i.current,d=a.current;if(!n||!h||!d)return;const f=h.getBoundingClientRect(),p=d.offsetWidth,g=d.offsetHeight,E=f.top>g+8,A=Math.max(4,Math.min(f.left+(f.width-p)/2,innerWidth-p-4)),w=f.left+f.width/2-A;d.setAttribute("data-side",E?"top":"bottom"),d.style.left=`${A}px`,d.style.top=`${E?f.top-g-6:f.bottom+6}px`,d.style.setProperty("--ax",`${w-12}px`),d.style.setProperty("--origin",`${w}px ${E?"100%":"0%"}`),requestAnimationFrame(()=>d.setAttribute("data-open",""))},[n,e]);const u=n?(l=i.current)==null?void 0:l.closest("[data-kin-root]"):null;return m(fe,{children:[o,u&&tc(m("span",{ref:a,"data-side":"top",role:"tooltip",class:"bg-n-12 text-n-1 corner-smooth ease-out-back rounded-kin-sm duration-kin group pointer-events-none fixed z-[999999] origin-[--origin] scale-90 whitespace-nowrap px-2.5 py-1.5 text-xs opacity-0 transition-[opacity,transform] data-[open]:scale-100 data-[open]:opacity-100 data-[open]:delay-300",children:[e,m("svg",{viewBox:"0 0 32 32","aria-hidden":"true",class:"fill-n-12 absolute left-[--ax] w-6 group-data-[side=bottom]:-top-6 group-data-[side=top]:-bottom-6 group-data-[side=top]:rotate-180",children:m("path",{d:"M3 32C9 32 10 31 15 26Q16 25 17 26C22 31 23 32 29 32"})})]}),u)]})}function Or(e,t){return typeof e=="function"?(...n)=>{e(...n),t()}:t}const x5=vt({base:"relative animate-none flex min-h-0 w-full flex-1 flex-col overflow-hidden",variants:{embedded:{false:"sm:animate-kin-panel-in [will-change:transform,opacity]"}}}),ul=vt({base:"transition-all duration-kin ease-kin-fluid col-span-full row-span-full",variants:{show:{false:"scale-50 opacity-0 blur-sm",true:"scale-100 opacity-100 blur-0"}}});function y5({embedded:e=!1,onClose:t,onClearData:n,onSkipToInput:r}){const[i,a]=he(!1),s=ve(),o=()=>{clearTimeout(s.current),a(!1)};ke(()=>()=>clearTimeout(s.current),[]);const u=l=>{if(l.key==="Escape"){if(l.preventDefault(),i){o();return}e||t()}};return m("div",{class:x5({embedded:e}),"aria-labelledby":"kin-panel-title",onKeyDown:u,onClick:()=>i&&o(),children:[m("button",{type:"button",class:"fr bg-n-2 text-n-12 rounded-kin-sm absolute -top-full left-1/2 z-50 -translate-x-1/2 px-3 py-1.5 text-sm font-medium no-underline focus:top-2",onClick:r,children:"Skip to chat input"}),m("header",{class:"from-a-2/50 relative flex select-none items-center justify-between bg-gradient-to-b to-transparent p-3",children:[m("h2",{id:"kin-panel-title",class:"text-n-12 m-0 pl-2 text-base font-semibold sm:text-sm sm:font-medium",children:"Kin Assistant"}),!e&&m("div",{"aria-hidden":"true",class:"bg-n-5/50 absolute left-1/2 top-2 h-1 w-12 -translate-x-1/2 rounded-full"}),m("div",{class:"flex items-center gap-1.5",children:[m(_h,{content:i?"Click again to confirm":"Clear my data",children:m("button",{class:Ct({variant:i?"accent":"ghost",size:"iconSm",class:"grid place-items-center"}),"aria-label":i?"Confirm clear data":"Clear my data",type:"button",onMouseDown:l=>l.preventDefault(),onClick:l=>{l.stopPropagation(),i?(n(),o()):a(!0)},onMouseLeave:()=>{i&&(s.current=setTimeout(o,2e3))},onMouseEnter:()=>clearTimeout(s.current),children:[m(pf,{class:ul({show:!i})}),m(mf,{class:ul({show:i})})]})}),!e&&m("button",{class:Ct({variant:"neutral",size:"iconSm"}),"aria-label":"Close chat",type:"button",onClick:t,children:m(Gl,{strokeWidth:2})})]})]}),m(p5,{})]})}const w5={"application/pdf":{maxSize:1e7},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{maxSize:1e7},"application/msword":{maxSize:1e7},"text/plain":{maxSize:1e6},"image/jpeg":{maxSize:1e7},"image/png":{maxSize:1e7},"image/webp":{maxSize:1e7}},A5=".pdf,.docx,.doc,.txt,.jpg,.jpeg,.png,.webp";function C5(e){const t=w5[e.type];return t?e.size>t.maxSize?{valid:!1,error:`File is too large. Maximum size is ${Math.round(t.maxSize/1e6)}MB.`}:e.size===0?{valid:!1,error:"The file appears to be empty."}:{valid:!0}:{valid:!1,error:"Unsupported file format. Please upload a PDF, Word document, text file, or image."}}function v5(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{typeof r.result=="string"?t(r.result):n(new Error("Failed to read file"))},r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function S5({url:e,onMessage:t,onOpen:n,onClose:r,onError:i}){let a=null,s=[];const o=()=>(a==null?void 0:a.readyState)===WebSocket.OPEN,u=f=>{o()&&a.send(JSON.stringify(f))},l=f=>u({type:"user_message",content:f}),h=()=>{if(o()){for(const f of s)l(f);s.length=0}};return(()=>{a=new WebSocket(e),a.onopen=()=>{n(),h()},a.onmessage=f=>{try{const p=JSON.parse(f.data);t(p)}catch(p){console.error("Failed to parse message:",p)}},a.onclose=()=>{s=[],r(),a=null},a.onerror=f=>{i(f)}})(),{sendMessage:f=>{a&&(o()?l(f):a.readyState===WebSocket.CONNECTING&&s.push(f))},uploadFile:async(f,p)=>{if(!o())return{success:!1,error:"Not connected"};const g=C5(f);if(!g.valid)return{success:!1,error:g.error};try{const E=await v5(f);return o()?(u({type:"file_upload",fileType:p,fileName:f.name,mimeType:f.type,data:E}),{success:!0}):{success:!1,error:"Connection lost while reading file. Please try again."}}catch(E){return{success:!1,error:E instanceof Error?E.message:"Failed to read file"}}},requestJobDetail:f=>{u({type:"job_detail",jobId:f})},clearData:()=>{u({type:"clear_data"})},disconnect:()=>{a&&(a.close(),a=null)},isConnected:()=>(a==null?void 0:a.readyState)===WebSocket.OPEN}}const ll=2e3,cl="absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-kin-sm bg-red-600 px-3 py-2 text-xs text-white animate-kin-error-in",I5=vt({base:"w-full pt-1 px-2 pb-safe-b focus-within:pb-2 transition-all duration-kin ease-kin-fluid group-data-[placement=embedded]:pb-2",variants:{panelOpen:{true:"bg-gradient-to-b from-transparent to-n-2",false:"px-5 sm:px-14 group-data-[placement=left]:sm:pl-2 group-data-[placement=left]:sm:pr-24 group-data-[placement=right]:sm:pl-24 group-data-[placement=right]:sm:pr-2"}}}),N5=vt({base:"border outline relative flex p-0.5 gap-1 flex-col corner-smooth rounded-kin-3xl bg-highest transition-all duration-kin ease-kin-fluid",variants:{panelOpen:{true:"outline-1 outline-transparent border-n-4 focus-within:outline-[3px] focus-within:outline-a-4/50 focus-within:border-a-6/50 shadow-md shadow-n-4/30",false:"outline-2 outline-a-9 border-transparent shadow-xl shadow-a-9/10"},unread:{true:"after:absolute after:-inset-0.5 after:outline-offset-2 after:outline after:outline-a-9/20 after:outline-2 after:rounded-kin-3xl after:corner-smooth after:pointer-events-none after:animate-kin-pulse after:content-['']"}}});function L5({panelOpen:e,suggestions:t,onSubmit:n,onEscape:r,onFocus:i,onBlur:a,onUploadFile:s,inputRef:o}){const[u,l]=he(""),h=ve(null),d=F.isStreaming.value,f=F.connectionState.value,p=F.uploadState.value,g=F.uploadError.value,E=F.uploadFileName.value,A=f==="connected",w=f==="connecting",C=f==="disconnected",y=f==="idle",R=p==="uploading"||p==="processing",M=u.length>ll,S=u.trim(),$=S.length>0,O=t.length>0,Y=E?`Uploading ${E}...`:"Uploading file...",v=$&&!d&&!R&&!M&&(A||w),U=A&&!d&&!R,I=O?"Or type a message...":R?Y:w?"Connecting...":C?"Disconnected – Tap to retry":d?"Waiting for response...":!e&&F.hasUnreadMessages.value?"You have a new reply":!e&&F.messages.value.length>0?"Continue conversation...":"Ask me anything...",G=R?Y:d?"Waiting for response":y?"Click to connect":w?"Connecting...":$?A?"Send message":"Cannot send message":"Enter a message to send",ae=R?Y:U?"Attach file (CV, document, or image)":"Cannot upload file",K=j=>{j.preventDefault(),v&&(n(S),l(""),o.current&&(o.current.style.height="auto"))},ue=j=>{j.key==="Enter"&&!j.shiftKey?(j.preventDefault(),K(j)):j.key==="Escape"&&(j.preventDefault(),j.stopPropagation(),r())},V=j=>{var pe;const te=j.target,_=(pe=te.files)==null?void 0:pe[0];_&&s(_,"cv"),te.value=""};return m("div",{class:I5({panelOpen:e}),role:"search","aria-label":"Chat with Kin AI",children:m("form",{onSubmit:K,class:N5({panelOpen:e,unread:!e&&F.hasUnreadMessages.value}),autoComplete:"off",children:[O&&m("div",{class:"bg-n-3/75 corner-smooth shadow-n-4/50 rounded-b-kin-sm rounded-t-kin-2xl flex flex-wrap gap-1.5 p-2 shadow-inner","aria-label":"Suggested prompts",children:t.map((j,te)=>m("button",{type:"button",class:"fr bg-highest animate-kin-pop-in text-n-11 corner-smooth outline-n-4/50 hover:outline-n-7/50 hover:text-n-12 rounded-kin-xl ease-kin-click inline-flex items-center whitespace-nowrap px-3 py-1.5 text-sm outline outline-1 transition-all hover:outline-2 active:scale-95",style:{animationDelay:`${.05+te*.05}s`},onPointerDown:_=>_.preventDefault(),onClick:()=>n(j.value),children:j.label},j.id))}),m("div",{class:"flex items-end gap-1 p-1 pl-3",children:[m("label",{for:"kin-input",class:"sr-only",children:"Ask Kin a question"}),m("textarea",{id:"kin-input",ref:o,rows:1,enterkeyhint:"send",class:"text-n-12 placeholder:text-n-9 -my-[0.125em] max-h-[6.5em] min-w-0 flex-1 resize-none self-center overflow-y-auto overscroll-none border-none bg-transparent px-0 py-[0.25em] text-base outline-none [mask-image:linear-gradient(to_bottom,transparent_0,_black_0.5em,_black_calc(100%-0.5em),transparent_100%)] disabled:cursor-not-allowed sm:text-sm",placeholder:I,value:u,onInput:j=>{const te=j.target;l(te.value),te.style.height="auto",te.style.height=`${te.scrollHeight}px`},onFocus:i,onBlur:j=>a(j.relatedTarget),onKeyDown:ue,"aria-describedby":"kin-input-status",autoComplete:"off",disabled:R}),m("input",{ref:h,type:"file",class:"sr-only",accept:A5,onChange:V,"aria-hidden":"true",tabIndex:-1}),m(_h,{content:ae,children:m("button",{type:"button",class:Ct({variant:"ghost"}),disabled:!U,"aria-label":ae,onPointerDown:j=>j.preventDefault(),onClick:()=>{var j;return(j=h.current)==null?void 0:j.click()},children:R?m(gf,{class:"animate-kin-spin"}):m(Ql,{})})}),m("button",{type:"submit",class:Ct({variant:"accent"}),disabled:!v,"aria-label":G,onPointerDown:j=>j.preventDefault(),children:m(ff,{strokeWidth:2})})]}),m("div",{id:"kin-input-status",class:"sr-only",role:"status","aria-live":"polite",children:[w&&"Connecting to Kin...",C&&"Connection lost. Click input to retry.",d&&"Kin is responding...",R&&Y]}),g&&p==="error"&&m("div",{class:`${cl} max-w-[calc(100%-32px)] truncate`,role:"alert",children:g}),M&&m("div",{class:cl,role:"alert",children:["Message too long (",u.length.toLocaleString(),"/",ll.toLocaleString()," characters)"]})]})})}const R5="(hover: none) and (pointer: coarse)",O5='a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';function dl(){var t;let e=document.activeElement;for(;(t=e==null?void 0:e.shadowRoot)!=null&&t.activeElement;)e=e.shadowRoot.activeElement;return e}const Th=vt({base:"pointer-events-auto sm:w-[480px] rounded-t-kin-4xl flex w-full flex-col transition-all outline outline-1 outline-transparent duration-kin sm:rounded-kin-4xl corner-smooth ease-kin-fluid group-data-[placement=left]:sm:left-4 group-data-[placement=right]:sm:right-4 group-data-[placement=center]:sm:justify-self-center",variants:{layout:{embedded:"h-full rounded-none bg-n-1 outline-none sm:w-full sm:rounded-none self-stretch",closed:"bottom-0 sm:bottom-4 self-end absolute",open:"bottom-0 absolute self-end sm:bottom-4 sm:min-h-[50vh] h-[calc(var(--kin-vv-h,100dvh)_-_var(--kin-inset,1.5rem))] sm:h-auto top-[calc(var(--kin-vv-top,0px)_+_var(--kin-inset,1.5rem))] sm:top-auto bg-n-1 overflow-hidden sm:max-h-[calc(min(90vh,var(--kin-vv-h,90svh))_-_var(--kin-inset,1.5rem))] outline-n-6/50 shadow-2xl shadow-n-6/30 [touch-action:manipulation]"}}}),kh=vt({base:"absolute inset-0 bg-black/20 transition-opacity duration-kin ease-kin-fluid",variants:{visible:{false:"pointer-events-none opacity-0",true:"pointer-events-auto opacity-100"}}});function D5({starterPrompts:e,onSendMessage:t,onOpen:n,onClose:r,onConnect:i,onClearData:a,onUploadFile:s,placement:o="center"}){const u=o==="embedded";F.embedded.value=u;const l=F.isOpen.value,h=u?"embedded":l?"open":"closed",d=h!=="closed",[f,p]=he(!1),g=ve(null),E=ve(null),A=ve(null),w=F.messages.value.length>0,C=F.quickReplies.value,y=!d&&!w&&f&&e.length>0,R=d&&C.length>0,M=y?e.map((V,j)=>({id:`sp-${j}`,label:V.label,value:V.message})):R?C.map((V,j)=>({id:`qr-${j}`,label:V,value:V})):[];ke(()=>{if(h!=="open"||u)return;const V=document.documentElement.style.overflow;return document.documentElement.style.overflow="hidden",()=>{document.documentElement.style.overflow=V}},[h,u]),ke(()=>{var V;if(d){const j=dl();E.current=j instanceof HTMLElement&&!((V=g.current)!=null&&V.contains(j))?j:null,requestAnimationFrame(()=>{var te;return(te=A.current)==null?void 0:te.focus()})}else p(!1)},[d]),ke(()=>{u&&!l&&n()},[u,n,l]),ke(()=>{if(h!=="open")return;const V=window.matchMedia(R5);if(!V.matches)return;const j=g.current,te=window.visualViewport;if(!j||!te)return;const _=()=>{j.style.setProperty("--kin-vv-h",`${te.height}px`),j.style.setProperty("--kin-vv-top",`${te.offsetTop}px`)};_(),te.addEventListener("resize",_),te.addEventListener("scroll",_);let pe=0;const J=ne=>{var $e;pe=(($e=ne.touches[0])==null?void 0:$e.clientY)??0},x=ne=>{var nt;const $e=pe-(((nt=ne.touches[0])==null?void 0:nt.clientY)??pe),qe=ne.composedPath(),ge=qe.indexOf(j);if(ge<0)return;const st=rt=>rt instanceof Element&&($e>0?rt.scrollTop+rt.clientHeight<rt.scrollHeight-1:rt.scrollTop>0);ne.cancelable&&!qe.slice(0,ge).some(st)&&ne.preventDefault()};document.addEventListener("touchstart",J,{passive:!0}),document.addEventListener("touchmove",x,{passive:!1});const Se=()=>{te.removeEventListener("resize",_),te.removeEventListener("scroll",_),j.style.removeProperty("--kin-vv-h"),j.style.removeProperty("--kin-vv-top"),document.removeEventListener("touchstart",J),document.removeEventListener("touchmove",x)},me=ne=>{ne.matches||Se()};return V.addEventListener("change",me),()=>{Se(),V.removeEventListener("change",me)}},[h]),ke(()=>{if(h!=="open")return;const V=j=>{if(j.key!=="Tab")return;const te=g.current;if(!te)return;const _=te.querySelectorAll(O5),pe=_[0],J=_[_.length-1];if(!pe||!J)return;const x=dl();j.shiftKey&&x===pe?(j.preventDefault(),J.focus()):!j.shiftKey&&x===J&&(j.preventDefault(),pe.focus())};return document.addEventListener("keydown",V),()=>document.removeEventListener("keydown",V)},[h]);const S=()=>{h==="closed"&&n()},$=()=>{var V;(V=A.current)==null||V.blur(),r(),E.current&&requestAnimationFrame(()=>{var j;return(j=E.current)==null?void 0:j.focus()})},{shellRef:O,isClosing:Y,closeWithSlideOut:v,dragHandlers:U}=ph({enabled:h==="open"&&!u,onClose:$,dragVar:"--kin-shell-drag"}),I=V=>{const j=V.trim();if(!j)return;const te=F.isStreaming.value,_=F.uploadState.value==="uploading"||F.uploadState.value==="processing",pe=F.connectionState.value;!te&&!_&&(pe==="connected"||pe==="connecting")&&(F.addMessage({role:"user",content:j}),S(),i(),t(j))},G=()=>{p(!0),i(),!d&&w&&S()},ae=V=>{var j;V instanceof Node&&((j=g.current)!=null&&j.contains(V))||p(!1)},K=()=>{var V;d?v():(V=A.current)==null||V.blur()},ue=(V,j)=>{S(),s(V,j)};return m("div",{ref:g,class:sa("font-kin text-kin text-n-12 group pointer-events-none",u?"relative h-full":"fixed inset-0 z-[2147483647]"),"data-placement":o,"data-kin-root":!0,role:"region","aria-label":"Kin AI Chat",children:[!u&&m("div",{class:kh({visible:h==="open"&&!Y}),style:h==="open"&&!Y?{opacity:"calc(1 - var(--kin-shell-drag, 0))"}:void 0,"aria-hidden":"true",onClick:v}),m("div",{ref:O,class:Th({layout:h,class:"group-has-[[data-dragging]]:!transition-none"}),style:F.overlay.value!==null?{transformOrigin:"top",transform:"translate3d(0, calc(-8px + 8px * var(--kin-overlay-drag, 0)), 0) scale(calc(0.96 + 0.04 * var(--kin-overlay-drag, 0)))"}:void 0,role:d&&!u?"dialog":void 0,"aria-modal":d&&!u,...U,children:[m("div",{class:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:d?"Chat panel opened":""}),d&&m(y5,{embedded:u,onClose:v,onClearData:a,onSkipToInput:()=>{var V;return(V=A.current)==null?void 0:V.focus()}}),m(L5,{panelOpen:d,suggestions:M,onSubmit:I,onEscape:K,onFocus:G,onBlur:ae,onUploadFile:ue,inputRef:A})]}),F.overlay.value]})}const P5=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*{box-sizing:border-box;font:inherit;border:0 solid;-webkit-tap-highlight-color:transparent}button{all:unset;cursor:pointer;touch-action:manipulation}ul,ol,li,p{margin:0;padding:0}ul,ol{list-style:none}svg{display:block}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-bottom-1\\.5{bottom:-6px}.-top-full{top:-100%}.bottom-0{bottom:0}.bottom-3{bottom:12px}.bottom-full{bottom:100%}.left-1\\/2{left:50%}.left-\\[--ax\\]{left:var(--ax)}.right-1\\.5{right:6px}.top-2{top:8px}.top-\\[calc\\(var\\(--kin-vv-top\\,0px\\)_\\+_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{top:calc(var(--kin-vv-top,0px) + var(--kin-inset,24px))}.z-50{z-index:50}.z-\\[2147483647\\]{z-index:2147483647}.z-\\[999999\\]{z-index:999999}.col-span-full{grid-column:1 / -1}.row-span-full{grid-row:1 / -1}.m-0{margin:0}.-my-\\[0\\.125em\\]{margin-top:-.125em;margin-bottom:-.125em}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-2{margin-bottom:8px}.mb-4{margin-bottom:16px}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.size-10{width:40px;height:40px}.size-12{width:48px;height:48px}.size-3{width:12px;height:12px}.size-3\\.5{width:14px;height:14px}.size-8{width:32px;height:32px}.h-1{height:4px}.h-\\[calc\\(var\\(--kin-vv-h\\,100dvh\\)_-_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{height:calc(var(--kin-vv-h,100dvh) - var(--kin-inset,24px))}.h-full{height:100%}.max-h-\\[6\\.5em\\]{max-height:6.5em}.min-h-0{min-height:0px}.w-12{width:48px}.w-4{width:16px}.w-6{width:24px}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-\\[95\\%\\]{max-width:95%}.max-w-\\[calc\\(100\\%-32px\\)\\]{max-width:calc(100% - 32px)}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-\\[--origin\\]{transform-origin:var(--origin)}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-50{--tw-scale-x: .5;--tw-scale-y: .5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes kin-drawer-in{0%{transform:translateY(100%)}to{transform:translateY(0)}}.animate-kin-drawer-in{animation:kin-drawer-in .24s var(--kin-fluid-ease) backwards}@keyframes kin-error-in{0%{opacity:0;transform:translate(-50%) translateY(4px)}to{opacity:1;transform:translate(-50%) translateY(0)}}.animate-kin-error-in{animation:kin-error-in .24s ease}@keyframes kin-fade{0%{opacity:0}to{opacity:1}}.animate-kin-fade-in{animation:kin-fade .4s ease both}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.animate-kin-message-in{animation:kin-slide-up .24s var(--kin-fluid-ease) both}@keyframes kin-pop{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}.animate-kin-pop-in{animation:kin-pop .24s cubic-bezier(.34,1.56,.64,1) backwards}@keyframes kin-shimmer{0%{background-position:200% 50%}to{background-position:-200% 50%}}.animate-kin-shimmer{animation:kin-shimmer 2.5s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-kin-spin{animation:spin 1s linear infinite}.animate-none{animation:none}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-1\\.5{gap:6px}.gap-2{gap:8px}.gap-2\\.5{gap:10px}.gap-4{gap:16px}.gap-x-2\\.5{-moz-column-gap:10px;column-gap:10px}.gap-y-1{row-gap:4px}.self-start{align-self:flex-start}.self-end{align-self:flex-end}.self-center{align-self:center}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-clip{overflow:clip}.overflow-y-auto{overflow-y:auto}.overscroll-none{overscroll-behavior:none}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:4px}.rounded-full{border-radius:9999px}.rounded-kin-2xl{border-radius:var(--kin-r-2xl)}.rounded-kin-3xl{border-radius:var(--kin-r-3xl)}.rounded-kin-lg{border-radius:var(--kin-r-lg)}.rounded-kin-md{border-radius:var(--kin-r-md)}.rounded-kin-sm{border-radius:var(--kin-r-sm)}.rounded-kin-xl{border-radius:var(--kin-r-xl)}.rounded-none{border-radius:0}.rounded-b-kin-sm{border-bottom-right-radius:var(--kin-r-sm);border-bottom-left-radius:var(--kin-r-sm)}.rounded-t-kin-2xl{border-top-left-radius:var(--kin-r-2xl);border-top-right-radius:var(--kin-r-2xl)}.rounded-t-kin-4xl{border-top-left-radius:var(--kin-r-4xl);border-top-right-radius:var(--kin-r-4xl)}.border{border-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-n-3{--tw-border-opacity: 1;border-color:oklch(var(--n-3) / var(--tw-border-opacity, 1))}.border-n-4{--tw-border-opacity: 1;border-color:oklch(var(--n-4) / var(--tw-border-opacity, 1))}.border-n-6\\/40{border-color:oklch(var(--n-6) / .4)}.border-transparent{border-color:transparent}.bg-a-9{--tw-bg-opacity: 1;background-color:oklch(var(--a-9) / var(--tw-bg-opacity, 1))}.bg-black\\/20{background-color:#0003}.bg-highest{--tw-bg-opacity: 1;background-color:oklch(var(--highest) / var(--tw-bg-opacity, 1))}.bg-n-1{--tw-bg-opacity: 1;background-color:oklch(var(--n-1) / var(--tw-bg-opacity, 1))}.bg-n-12{--tw-bg-opacity: 1;background-color:oklch(var(--n-12) / var(--tw-bg-opacity, 1))}.bg-n-2{--tw-bg-opacity: 1;background-color:oklch(var(--n-2) / var(--tw-bg-opacity, 1))}.bg-n-3{--tw-bg-opacity: 1;background-color:oklch(var(--n-3) / var(--tw-bg-opacity, 1))}.bg-n-3\\/75{background-color:oklch(var(--n-3) / .75)}.bg-n-5\\/50{background-color:oklch(var(--n-5) / .5)}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-\\[linear-gradient\\(90deg\\,oklch\\(var\\(--n-9\\)\\)_40\\%\\,oklch\\(var\\(--n-11\\)\\)_50\\%\\,oklch\\(var\\(--n-9\\)\\)_60\\%\\)\\]{background-image:linear-gradient(90deg,oklch(var(--n-9)) 40%,oklch(var(--n-11)) 50%,oklch(var(--n-9)) 60%)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.from-a-2\\/50{--tw-gradient-from: oklch(var(--a-2) / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-n-2{--tw-gradient-to: oklch(var(--n-2) / 1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-\\[length\\:200\\%_100\\%\\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.fill-n-12{fill:oklch(var(--n-12) / 1)}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:8px;padding-right:8px}.px-2\\.5{padding-left:10px;padding-right:10px}.px-3{padding-left:12px;padding-right:12px}.px-3\\.5{padding-left:14px;padding-right:14px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-6{padding-left:24px;padding-right:24px}.py-1{padding-top:4px;padding-bottom:4px}.py-1\\.5{padding-top:6px;padding-bottom:6px}.py-2{padding-top:8px;padding-bottom:8px}.py-3{padding-top:12px;padding-bottom:12px}.py-4{padding-top:16px;padding-bottom:16px}.py-6{padding-top:24px;padding-bottom:24px}.py-\\[0\\.25em\\]{padding-top:.25em;padding-bottom:.25em}.pb-1{padding-bottom:4px}.pb-safe-b{padding-bottom:max(8px,calc(env(safe-area-inset-bottom,0px) + 8px))}.pl-1{padding-left:4px}.pl-2{padding-left:8px}.pl-3{padding-left:12px}.pl-5{padding-left:20px}.pl-safe-l{padding-left:max(16px,env(safe-area-inset-left,16px))}.pr-2{padding-right:8px}.pr-5{padding-right:20px}.pr-safe-r{padding-right:max(16px,env(safe-area-inset-right,16px))}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-2{padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.font-kin{font-family:var(--kin-font-family)}.text-\\[11px\\]{font-size:11px}.text-base{font-size:16px;line-height:24px}.text-kin{font-size:max(14px,16px);line-height:1.5}.text-sm{font-size:14px;line-height:20px}.text-xs{font-size:12px;line-height:16px}.font-medium{font-weight:500}.font-semibold{font-weight:600}.italic{font-style:italic}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.text-inherit{color:inherit}.text-n-1{--tw-text-opacity: 1;color:oklch(var(--n-1) / var(--tw-text-opacity, 1))}.text-n-10{--tw-text-opacity: 1;color:oklch(var(--n-10) / var(--tw-text-opacity, 1))}.text-n-11{--tw-text-opacity: 1;color:oklch(var(--n-11) / var(--tw-text-opacity, 1))}.text-n-12{--tw-text-opacity: 1;color:oklch(var(--n-12) / var(--tw-text-opacity, 1))}.text-n-3{--tw-text-opacity: 1;color:oklch(var(--n-3) / var(--tw-text-opacity, 1))}.text-n-9{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.text-transparent{color:transparent}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.no-underline{text-decoration-line:none}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / .05);--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-a-9\\/10{--tw-shadow-color: oklch(var(--a-9) / .1);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-4\\/30{--tw-shadow-color: oklch(var(--n-4) / .3);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-4\\/50{--tw-shadow-color: oklch(var(--n-4) / .5);--tw-shadow: var(--tw-shadow-colored)}.shadow-n-6\\/30{--tw-shadow-color: oklch(var(--n-6) / .3);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-1{outline-width:1px}.outline-2{outline-width:2px}.outline-a-9{outline-color:oklch(var(--a-9) / 1)}.outline-n-3{outline-color:oklch(var(--n-3) / 1)}.outline-n-4\\/50{outline-color:oklch(var(--n-4) / .5)}.outline-n-6\\/50{outline-color:oklch(var(--n-6) / .5)}.outline-transparent{outline-color:transparent}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-0{--tw-blur: blur(0);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-sm{--tw-blur: blur(4px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-kin{transition-duration:.24s}.ease-kin-click{transition-timing-function:cubic-bezier(.5,.1,.9,.1)}.ease-kin-fluid{transition-timing-function:var(--kin-fluid-ease)}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.fr:focus-visible{outline:2px solid oklch(var(--a-9) / .5);outline-offset:2px}.corner-smooth{corner-shape:superellipse(1.25)}.\\[--kin-inset\\:0px\\]{--kin-inset: 0px}.\\[--kin-inset\\:2rem\\]{--kin-inset: 32px}.\\[mask-image\\:linear-gradient\\(to_bottom\\,transparent_0\\,_black_0\\.5em\\,_black_calc\\(100\\%-0\\.5em\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,black .5em,black calc(100% - .5em),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,black .5em,black calc(100% - .5em),transparent 100%)}.\\[mask-image\\:linear-gradient\\(to_bottom\\,transparent_0\\,_black_1\\.5rem\\,_black_calc\\(100\\%-1\\.5rem\\)\\,transparent_100\\%\\)\\,linear-gradient\\(black\\,black\\)\\]{-webkit-mask-image:linear-gradient(to bottom,transparent 0,black 24px,black calc(100% - 24px),transparent 100%),linear-gradient(black,black);mask-image:linear-gradient(to bottom,transparent 0,black 24px,black calc(100% - 24px),transparent 100%),linear-gradient(black,black)}.\\[mask-position\\:0_0\\,100\\%_0\\]{-webkit-mask-position:0 0,100% 0;mask-position:0 0,100% 0}.\\[mask-repeat\\:no-repeat\\,no-repeat\\]{-webkit-mask-repeat:no-repeat,no-repeat;mask-repeat:no-repeat,no-repeat}.\\[mask-size\\:calc\\(100\\%-6px\\)_100\\%\\,6px_100\\%\\]{-webkit-mask-size:calc(100% - 6px) 100%,6px 100%;mask-size:calc(100% - 6px) 100%,6px 100%}.\\[touch-action\\:manipulation\\]{touch-action:manipulation}.\\[will-change\\:transform\\,opacity\\]{will-change:transform,opacity}:host{font-size:16px;--a-1: 99.4% .003 22.8;--a-2: 98.4% .007 31;--a-3: 95.4% .022 30.9;--a-4: 92.6% .047 31.8;--a-5: 89.2% .063 31.5;--a-6: 85.2% .077 32;--a-7: 80.3% .094 32.2;--a-8: 74.1% .118 32.1;--a-9: 62.7% .194 33.3;--a-10: 60.4% .195 33.3;--a-11: 56.7% .198 32.8;--a-12: 34.6% .08 30.5;--n-1: 99.1% 0 0;--n-2: 98.1% 0 0;--n-3: 95.3% 0 0;--n-4: 93% 0 0;--n-5: 90.8% 0 0;--n-6: 88.4% 0 0;--n-7: 85.1% 0 0;--n-8: 79.1% 0 0;--n-9: 64.3% 0 0;--n-10: 60.9% 0 0;--n-11: 50.3% 0 0;--n-12: 24.3% 0 0;--kin-vv-h:calc(100dvh - 16px);--kin-vv-top: 16px;--kin-fluid-ease: cubic-bezier(.88, .77, .12, .98);--kin-font-family: inherit}.kin-markdown p{margin:0 0 1em}.kin-markdown p:last-child{margin-bottom:0}.kin-markdown :is(strong,b){font-weight:600}.kin-markdown :is(em,i){font-style:italic}.kin-markdown code{background:rgba(255,255,255,.1);padding:.15em .4em;border-radius:var(--kin-r-xs);font-family:SF Mono,Monaco,Consolas,monospace;font-size:.875em}.kin-markdown pre{background:rgba(0,0,0,.4);padding:14px 16px;border-radius:var(--kin-r-sm);overflow-x:auto;margin:1em 0;border:1px solid oklch(var(--n-6) / .4)}.kin-markdown pre code{background:none;padding:0;font-size:.85em;line-height:1.5}.kin-markdown :is(ul,ol){margin:.75em 0;padding-left:1.5em}.kin-markdown ul{list-style-type:disc}.kin-markdown ol{list-style-type:decimal}.kin-markdown li{margin:.35em 0}.kin-markdown li::marker{color:oklch(var(--n-9))}.kin-markdown :is(ul,ol) :is(ul,ol){margin:.25em 0}.kin-markdown blockquote{border-left:3px solid oklch(var(--a-9));margin:1em 0;padding:.5em 0 .5em 1em;color:oklch(var(--n-11));font-style:italic}.kin-markdown :is(h1,h2,h3,h4){font-weight:600;margin:1.25em 0 .5em;line-height:1.3}.kin-markdown :is(h1,h2,h3):first-child{margin-top:0}.kin-markdown h1{font-size:1.4em}.kin-markdown h2{font-size:1.25em}.kin-markdown h3{font-size:1.1em}.kin-markdown table{width:100%;border-collapse:collapse;margin:1em 0;font-size:.9em}.kin-markdown :is(th,td){padding:.5em .75em;border:1px solid oklch(var(--n-6) / .4);text-align:left}.kin-markdown th{background:oklch(var(--n-4));font-weight:600}.kin-markdown hr{border:none;border-top:1px solid oklch(var(--n-6) / .4);margin:1.5em 0}.kin-markdown hr+p{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:.75em;color:oklch(var(--n-9));margin:-1em 0 0;line-height:1.6}.kin-markdown input[type=checkbox]{margin-right:.5em;accent-color:oklch(var(--a-9))}.kin-markdown .streamdown-caret{display:inline-block;width:2px;height:1em;background:oklch(var(--a-9));margin-left:2px;animation:kin-caret 1s ease-in-out infinite;vertical-align:text-bottom}@keyframes kin-caret{0%,to{opacity:1}50%{opacity:0}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}[data-dragging],[data-dragging] *{touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:grabbing}.placeholder\\:text-n-9::-moz-placeholder{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.placeholder\\:text-n-9::placeholder{--tw-text-opacity: 1;color:oklch(var(--n-9) / var(--tw-text-opacity, 1))}.after\\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:-inset-0\\.5:after{content:var(--tw-content);top:-2px;right:-2px;bottom:-2px;left:-2px}@keyframes kin-fade-out{0%{content:var(--tw-content);opacity:1}to{content:var(--tw-content);opacity:0}}.after\\:animate-kin-pulse:after{content:var(--tw-content);animation:kin-fade-out 2.5s var(--kin-fluid-ease) infinite alternate-reverse}.after\\:rounded-kin-3xl:after{content:var(--tw-content);border-radius:var(--kin-r-3xl)}.after\\:outline:after{content:var(--tw-content);outline-style:solid}.after\\:outline-2:after{content:var(--tw-content);outline-width:2px}.after\\:outline-offset-2:after{content:var(--tw-content);outline-offset:2px}.after\\:outline-a-9\\/20:after{content:var(--tw-content);outline-color:oklch(var(--a-9) / .2)}.after\\:content-\\[\\'\\'\\]:after{--tw-content: "";content:var(--tw-content)}.after\\:corner-smooth:after{content:var(--tw-content);corner-shape:superellipse(1.25)}.first\\:border-t-0:first-child{border-top-width:0px}.first\\:pt-0:first-child{padding-top:0}.focus-within\\:border-a-6\\/50:focus-within{border-color:oklch(var(--a-6) / .5)}.focus-within\\:pb-2:focus-within{padding-bottom:8px}.focus-within\\:outline-\\[3px\\]:focus-within{outline-width:3px}.focus-within\\:outline-a-4\\/50:focus-within{outline-color:oklch(var(--a-4) / .5)}.hover\\:bg-a-10:hover{--tw-bg-opacity: 1;background-color:oklch(var(--a-10) / var(--tw-bg-opacity, 1))}.hover\\:bg-n-3:hover{--tw-bg-opacity: 1;background-color:oklch(var(--n-3) / var(--tw-bg-opacity, 1))}.hover\\:bg-n-3\\/50:hover{background-color:oklch(var(--n-3) / .5)}.hover\\:bg-n-4:hover{--tw-bg-opacity: 1;background-color:oklch(var(--n-4) / var(--tw-bg-opacity, 1))}.hover\\:text-a-9:hover{--tw-text-opacity: 1;color:oklch(var(--a-9) / var(--tw-text-opacity, 1))}.hover\\:text-n-11:hover{--tw-text-opacity: 1;color:oklch(var(--n-11) / var(--tw-text-opacity, 1))}.hover\\:text-n-12:hover{--tw-text-opacity: 1;color:oklch(var(--n-12) / var(--tw-text-opacity, 1))}.hover\\:underline-offset-4:hover{text-underline-offset:4px}.hover\\:outline-2:hover{outline-width:2px}.hover\\:outline-n-7\\/50:hover{outline-color:oklch(var(--n-7) / .5)}.focus\\:top-2:focus{top:8px}.focus-visible\\:rounded-kin-xs:focus-visible{border-radius:var(--kin-r-xs)}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.active\\:bg-n-3\\/75:active{background-color:oklch(var(--n-3) / .75)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:text-n-6:disabled{--tw-text-opacity: 1;color:oklch(var(--n-6) / var(--tw-text-opacity, 1))}.disabled\\:opacity-50:disabled{opacity:.5}.group:has([data-dragging]) .group-has-\\[\\[data-dragging\\]\\]\\:\\!transition-none{transition-property:none!important}.data-\\[open\\]\\:scale-100[data-open]{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\\[open\\]\\:opacity-100[data-open]{opacity:1}.data-\\[open\\]\\:delay-300[data-open]{transition-delay:.3s}.group[data-side=bottom] .group-data-\\[side\\=bottom\\]\\:-top-6{top:-24px}.group[data-side=top] .group-data-\\[side\\=top\\]\\:-bottom-6{bottom:-24px}.group[data-side=top] .group-data-\\[side\\=top\\]\\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-placement=embedded] .group-data-\\[placement\\=embedded\\]\\:pb-2{padding-bottom:8px}@media (min-width: 640px){.sm\\:bottom-4{bottom:16px}.sm\\:top-auto{top:auto}.sm\\:size-7{width:28px;height:28px}.sm\\:size-8{width:32px;height:32px}.sm\\:h-auto{height:auto}.sm\\:max-h-\\[calc\\(min\\(90vh\\,var\\(--kin-vv-h\\,90svh\\)\\)_-_var\\(--kin-inset\\,1\\.5rem\\)\\)\\]{max-height:calc(min(90vh,var(--kin-vv-h,90svh)) - var(--kin-inset,24px))}.sm\\:min-h-\\[50vh\\]{min-height:50vh}.sm\\:w-\\[480px\\]{width:480px}.sm\\:w-full{width:100%}@keyframes kin-slide-up{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.sm\\:animate-kin-panel-in{animation:kin-slide-up .35s var(--kin-fluid-ease) both}.sm\\:overscroll-auto{overscroll-behavior:auto}.sm\\:rounded-kin-4xl{border-radius:var(--kin-r-4xl)}.sm\\:rounded-kin-xl{border-radius:var(--kin-r-xl)}.sm\\:rounded-none{border-radius:0}.sm\\:px-14{padding-left:56px;padding-right:56px}.sm\\:px-4{padding-left:16px;padding-right:16px}.sm\\:px-5{padding-left:20px;padding-right:20px}.sm\\:text-sm{font-size:14px;line-height:20px}.sm\\:font-medium{font-weight:500}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:left-4{left:16px}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:right-4{right:16px}.group[data-placement=center] .group-data-\\[placement\\=center\\]\\:sm\\:justify-self-center{justify-self:center}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:pl-2{padding-left:8px}.group[data-placement=left] .group-data-\\[placement\\=left\\]\\:sm\\:pr-24{padding-right:96px}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:pl-24{padding-left:96px}.group[data-placement=right] .group-data-\\[placement\\=right\\]\\:sm\\:pr-2{padding-right:8px}}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:rounded-kin-xs::-webkit-scrollbar-thumb{border-radius:var(--kin-r-xs)}.\\[\\&\\:\\:-webkit-scrollbar-thumb\\]\\:bg-n-4::-webkit-scrollbar-thumb{--tw-bg-opacity: 1;background-color:oklch(var(--n-4) / var(--tw-bg-opacity, 1))}.\\[\\&\\:\\:-webkit-scrollbar-track\\]\\:bg-transparent::-webkit-scrollbar-track{background-color:transparent}.\\[\\&\\:\\:-webkit-scrollbar\\]\\:w-1\\.5::-webkit-scrollbar{width:6px}.\\[\\&\\>\\:first-child\\]\\:mt-auto>:first-child{margin-top:auto}.\\[\\&_svg\\]\\:size-3\\.5 svg{width:14px;height:14px}.\\[\\&_svg\\]\\:size-4 svg{width:16px;height:16px}
|
|
121
121
|
`,xh=["gray","mauve","slate","sage","olive","sand","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","brown","orange","sky","mint","lime","yellow","amber","bronze","gold"],yh={gray:[[.178,0,null],[.213,0,null],[.254,0,null],[.283,0,null],[.313,0,null],[.349,0,null],[.402,0,null],[.488,0,null],[.538,0,null],[.584,0,null],[.77,0,null],[.949,0,null]],mauve:[[.18,.004,307.8],[.215,.004,307.8],[.255,.006,306.5],[.284,.008,307.8],[.314,.009,306.9],[.35,.01,304],[.402,.012,304.4],[.492,.016,300.7],[.54,.017,294],[.586,.017,295.4],[.77,.014,296.6],[.949,.003,286.3]],slate:[[.179,.004,286],[.213,.004,264.4],[.253,.006,261.2],[.283,.007,259.5],[.311,.008,259.7],[.346,.01,256.5],[.398,.012,253.8],[.49,.016,247.6],[.537,.015,261.1],[.583,.014,263.3],[.768,.01,261.3],[.949,.003,264.6]],sage:[[.179,.004,167.4],[.211,.004,160.2],[.251,.004,164.2],[.281,.005,164.9],[.311,.005,167.4],[.347,.006,167.4],[.399,.008,167.4],[.488,.009,169.8],[.533,.018,170.8],[.579,.016,170.5],[.766,.01,167.5],[.947,.002,167.7]],olive:[[.18,.004,128.3],[.212,.004,128.3],[.252,.005,129],[.281,.006,131.4],[.31,.007,131.4],[.346,.008,134.4],[.399,.01,136],[.488,.012,140.8],[.535,.018,139.6],[.581,.016,140.1],[.766,.013,139.5],[.947,.003,144.8]],sand:[[.178,.002,106.6],[.213,.002,106.6],[.253,.003,106.6],[.283,.004,99],[.312,.004,100.7],[.349,.006,102.2],[.401,.007,96.1],[.49,.01,91.7],[.535,.011,94.1],[.581,.011,94],[.767,.009,97.4],[.948,.003,106.4]],tomato:[[.187,.012,19.6],[.208,.017,32],[.254,.054,26.9],[.291,.087,28.2],[.331,.097,28.7],[.38,.099,30],[.447,.107,31.5],[.538,.13,32.9],[.627,.194,33.3],[.665,.179,34.1],[.784,.164,36],[.899,.047,31.1]],red:[[.188,.013,19.4],[.205,.022,14.7],[.25,.064,13.1],[.289,.096,14.3],[.332,.107,15.5],[.383,.111,16.9],[.451,.121,18.9],[.544,.147,21.4],[.625,.193,23],[.665,.177,23.1],[.784,.162,22.3],[.902,.053,6.14]],ruby:[[.189,.014,2.9],[.208,.016,5.29],[.254,.06,6.54],[.292,.089,5.5],[.333,.1,6.4],[.382,.105,7.59],[.448,.117,9.02],[.544,.145,11.1],[.628,.195,13.2],[.664,.179,13.7],[.786,.161,17],[.905,.053,355.8]],crimson:[[.189,.014,354.2],[.207,.022,352.9],[.256,.059,353.9],[.293,.094,354.1],[.333,.104,354.7],[.382,.109,355.5],[.45,.12,356.7],[.542,.148,358.3],[.634,.213,1.3],[.664,.197,1.95],[.787,.167,6.72],[.909,.054,346.7]],pink:[[.191,.017,334.9],[.207,.031,338.2],[.261,.061,337.5],[.299,.098,340.1],[.338,.104,340.6],[.389,.107,341.6],[.459,.119,342.6],[.545,.145,344.1],[.617,.208,346.1],[.65,.197,346.2],[.789,.19,350.7],[.905,.059,343.2]],plum:[[.19,.017,327],[.21,.031,327.7],[.266,.062,326.7],[.307,.088,325.3],[.343,.095,324.6],[.389,.097,324.2],[.456,.106,323.4],[.545,.128,322.2],[.579,.188,322.1],[.616,.182,322.1],[.786,.154,322.1],[.906,.055,325.8]],purple:[[.192,.022,316],[.213,.031,314.3],[.266,.062,312],[.308,.083,310.7],[.344,.091,310.1],[.388,.097,309.7],[.45,.108,308.7],[.541,.133,307.1],[.555,.183,305.9],[.596,.177,306.3],[.785,.156,307.9],[.911,.049,310.9]],violet:[[.191,.026,290.5],[.211,.032,299.5],[.271,.066,293.9],[.312,.093,291.7],[.348,.099,291.4],[.39,.102,291.8],[.445,.111,291.6],[.516,.131,290.2],[.542,.179,288.1],[.588,.17,289.7],[.778,.137,293.6],[.912,.045,292.6]],iris:[[.193,.022,284.2],[.209,.029,286.5],[.273,.069,278.6],[.319,.102,276.1],[.358,.109,277.4],[.399,.112,279.6],[.448,.12,280.8],[.507,.138,281.1],[.54,.184,278.3],[.587,.172,281.2],[.776,.131,286.6],[.914,.042,287]],indigo:[[.191,.025,276.7],[.209,.03,276],[.272,.069,267.8],[.319,.093,267],[.362,.105,267.5],[.404,.111,268.3],[.45,.12,268.8],[.503,.137,268.4],[.544,.191,267.1],[.59,.176,269.2],[.777,.123,273.3],[.911,.043,270]],blue:[[.193,.026,256.8],[.213,.03,258.8],[.274,.067,254],[.317,.1,248.3],[.365,.108,249.7],[.416,.112,251.7],[.475,.121,252.8],[.541,.14,253.2],[.649,.193,251.8],[.689,.17,251.5],[.768,.135,248.8],[.907,.051,238.3]],cyan:[[.191,.017,219.9],[.214,.018,225.4],[.272,.044,222.5],[.315,.063,222.1],[.362,.07,221.5],[.414,.075,221.7],[.478,.083,221.4],[.558,.098,220.7],[.661,.122,221.5],[.698,.12,219.1],[.786,.115,213.4],[.909,.057,211.7]],teal:[[.189,.012,184.5],[.217,.017,189.3],[.274,.038,186.3],[.317,.055,187],[.363,.06,186.5],[.414,.065,185.4],[.473,.074,184.5],[.539,.087,183.5],[.649,.113,182],[.687,.123,180.3],[.789,.147,175.7],[.905,.072,175.3]],jade:[[.188,.014,166.3],[.216,.018,166.1],[.272,.042,166.8],[.316,.057,168],[.362,.064,168.5],[.411,.068,169.7],[.468,.075,170.6],[.537,.088,171.8],[.642,.115,170.8],[.678,.125,169.9],[.785,.156,167.1],[.903,.078,167]],green:[[.189,.013,163.3],[.213,.016,162.2],[.271,.039,162.7],[.318,.057,161.5],[.365,.066,161.1],[.413,.073,160.7],[.467,.083,159.9],[.527,.096,159.2],[.64,.133,157.8],[.676,.141,157.6],[.78,.166,157.2],[.905,.083,158.3]],grass:[[.188,.014,155.8],[.211,.014,151.5],[.267,.03,150.7],[.319,.052,150.4],[.367,.062,149.9],[.416,.072,149.3],[.468,.084,148.9],[.524,.097,148.2],[.652,.147,147.4],[.69,.145,147.6],[.78,.142,148.5],[.911,.078,144.9]],brown:[[.178,.005,81.5],[.213,.007,51.6],[.254,.013,53.5],[.288,.018,55.4],[.325,.024,55.9],[.37,.032,57.7],[.429,.041,59.8],[.509,.053,62.2],[.633,.078,60.8],[.674,.075,61.5],[.798,.063,62.5],[.918,.036,75.7]],bronze:[[.181,.005,41.6],[.215,.005,41.5],[.255,.008,42.7],[.291,.01,45.5],[.329,.013,43.3],[.374,.016,44.3],[.43,.02,44.8],[.499,.024,45.2],[.627,.046,44.3],[.669,.045,44.3],[.792,.043,44.5],[.915,.017,50.3]],gold:[[.182,.002,106.6],[.216,.006,92.5],[.255,.008,88.3],[.291,.01,86.8],[.329,.011,83.7],[.374,.014,82.4],[.429,.016,80.9],[.498,.02,79.5],[.621,.049,78.1],[.662,.047,77.2],[.794,.041,77.2],[.915,.014,77.4]],sky:[[.19,.024,257.1],[.216,.029,258.5],[.271,.054,251.9],[.322,.07,247.8],[.372,.079,245.8],[.427,.087,243.6],[.488,.098,240.7],[.557,.114,237.2],[.861,.103,217.8],[.908,.073,214.9],[.793,.099,231.7],[.934,.053,214.4]],mint:[[.188,.012,192.3],[.21,.017,196.6],[.269,.039,192.5],[.313,.058,191.6],[.359,.063,188.9],[.41,.067,186.3],[.471,.073,183.4],[.54,.085,179.6],[.87,.1,178],[.916,.08,179.4],[.795,.118,176.4],[.93,.057,168.5]],lime:[[.18,.014,120.3],[.208,.019,129],[.266,.034,132.2],[.317,.047,131.8],[.363,.058,131.6],[.412,.069,131.4],[.464,.08,131.2],[.524,.095,130.9],[.888,.175,126.1],[.942,.175,123.7],[.868,.156,124.8],[.946,.082,122.6]],yellow:[[.181,.013,86],[.209,.017,92.1],[.259,.047,90.3],[.293,.069,94.2],[.333,.079,94.6],[.384,.077,93.3],[.452,.081,91.5],[.535,.095,89.9],[.927,.209,102.1],[.971,.182,109.4],[.9,.166,101.6],[.941,.075,101]],amber:[[.184,.013,77.3],[.212,.018,78.7],[.258,.044,74.6],[.296,.071,76.2],[.337,.081,76.4],[.387,.078,75.1],[.453,.082,74.5],[.536,.096,73.6],[.856,.178,81.4],[.902,.206,97],[.871,.175,85.1],[.935,.072,86]],orange:[[.186,.012,53.7],[.209,.019,67.4],[.257,.045,59.5],[.293,.08,58.6],[.335,.087,58.1],[.386,.087,55.2],[.453,.095,53.1],[.541,.116,49.7],[.689,.191,44.8],[.741,.199,46.3],[.799,.163,50.8],[.925,.052,66.2]]},wh={gray:[[.991,0,null],[.981,0,null],[.953,0,null],[.93,0,null],[.908,0,null],[.884,0,null],[.851,0,null],[.791,0,null],[.643,0,null],[.609,0,null],[.503,0,null],[.243,0,null]],mauve:[[.992,.002,321.1],[.983,.003,311.2],[.956,.006,314.2],[.932,.008,310],[.909,.01,306.6],[.886,.012,304],[.854,.014,300.6],[.794,.019,293.5],[.646,.019,292.6],[.611,.018,293.1],[.505,.016,296.1],[.245,.013,298]],slate:[[.991,.001,286.4],[.982,.003,286.3],[.956,.004,281.9],[.931,.006,283],[.91,.008,283.6],[.888,.009,281.8],[.853,.012,280.8],[.794,.016,278.1],[.646,.016,277.8],[.61,.016,273.2],[.503,.014,263.4],[.241,.01,249.5]],sage:[[.992,.003,160.4],[.981,.003,171.2],[.955,.003,170.4],[.931,.003,170.4],[.909,.004,167.7],[.885,.004,167.7],[.851,.004,169.9],[.792,.005,169.5],[.639,.01,172.4],[.605,.01,172.8],[.501,.008,175.9],[.24,.012,166.8]],olive:[[.993,.002,149.1],[.983,.003,144.8],[.956,.004,141.1],[.932,.004,142.1],[.909,.005,139.3],[.886,.006,141.1],[.852,.006,141.1],[.792,.007,140.6],[.64,.011,136.5],[.605,.012,136.5],[.5,.011,139.9],[.242,.011,138.2]],sand:[[.994,.001,106.4],[.982,.001,106.4],[.956,.002,97.6],[.932,.003,100.6],[.91,.004,95.9],[.886,.005,98.3],[.853,.006,96.6],[.792,.008,96.5],[.641,.01,106.7],[.606,.01,106.7],[.498,.008,106.7],[.243,.008,96.3]],tomato:[[.994,.003,22.8],[.984,.007,31],[.954,.022,30.9],[.926,.047,31.8],[.892,.063,31.5],[.852,.077,32],[.803,.094,32.2],[.741,.118,32.1],[.627,.194,33.3],[.604,.195,33.3],[.567,.198,32.8],[.346,.08,30.5]],red:[[.994,.003,22.8],[.983,.008,16],[.956,.021,16.2],[.928,.047,16.7],[.896,.062,17.3],[.857,.075,17.9],[.807,.089,18.4],[.745,.113,19.1],[.625,.193,23],[.6,.195,23.9],[.557,.198,25.1],[.339,.109,16.7]],ruby:[[.994,.003,356.3],[.983,.008,8.41],[.954,.022,8.56],[.928,.042,8.46],[.896,.055,8.16],[.858,.066,7.84],[.81,.08,7.49],[.749,.101,6.86],[.628,.195,13.2],[.601,.196,13.4],[.549,.199,13.9],[.341,.11,10]],crimson:[[.994,.003,356.3],[.982,.008,357.2],[.954,.026,356.3],[.925,.041,356.3],[.893,.054,355.8],[.855,.065,355.6],[.808,.078,354.8],[.75,.099,354.1],[.634,.213,1.3],[.608,.211,2.36],[.552,.207,4.49],[.341,.113,356.8]],pink:[[.994,.004,336.3],[.983,.009,340],[.954,.027,340.6],[.925,.042,340.7],[.893,.054,340.9],[.855,.067,340.9],[.809,.083,341.2],[.752,.107,341.6],[.617,.208,346.1],[.596,.207,346.5],[.557,.206,347.3],[.35,.129,345.5]],plum:[[.993,.005,316.9],[.983,.009,326],[.957,.027,325.5],[.929,.044,324.9],[.898,.057,324.4],[.86,.072,323.9],[.809,.091,323.1],[.742,.12,321.9],[.579,.188,322.1],[.553,.181,322.1],[.521,.173,322],[.338,.125,321.4]],purple:[[.993,.004,325.4],[.982,.009,313.1],[.959,.024,313.3],[.933,.039,312.1],[.901,.054,311.6],[.86,.071,311],[.804,.093,309.9],[.733,.123,308],[.555,.183,305.9],[.524,.176,305.7],[.516,.174,305.7],[.322,.11,303.8]],violet:[[.992,.003,308],[.983,.009,295],[.963,.019,296.6],[.934,.039,295.4],[.904,.057,294.1],[.864,.072,293.9],[.806,.09,293.5],[.729,.119,292.4],[.542,.179,288.1],[.511,.177,287.6],[.508,.159,288.6],[.313,.098,286.8]],iris:[[.994,.003,286.4],[.981,.009,284.1],[.961,.018,283.8],[.935,.035,283.4],[.904,.053,283.8],[.865,.07,283.1],[.808,.088,282.9],[.729,.118,281.5],[.54,.184,278.3],[.509,.186,277.5],[.51,.173,279.7],[.315,.099,277.4]],indigo:[[.994,.001,286.4],[.983,.008,271.4],[.961,.017,268.5],[.935,.034,268.5],[.903,.051,270],[.863,.071,271.5],[.807,.087,271.4],[.73,.113,270.5],[.544,.191,267.1],[.511,.195,266.5],[.51,.173,267.1],[.313,.086,268.6]],blue:[[.993,.003,247.6],[.982,.01,243.3],[.96,.02,236.7],[.937,.037,239],[.906,.053,242.8],[.864,.069,243.2],[.809,.088,243.3],[.735,.121,243],[.649,.193,251.8],[.621,.184,251.9],[.558,.189,253],[.324,.097,259]],cyan:[[.992,.004,219.2],[.98,.009,202.9],[.958,.026,203.6],[.932,.041,204.7],[.9,.054,206.5],[.859,.066,207.7],[.805,.082,209.6],[.727,.11,211.7],[.661,.122,221.5],[.627,.114,221.3],[.54,.127,223.7],[.332,.053,218.6]],teal:[[.994,.005,177.5],[.981,.009,179],[.961,.027,180.3],[.935,.042,180.2],[.9,.054,180.5],[.856,.064,181.4],[.797,.076,182.2],[.721,.097,183.5],[.649,.113,182],[.619,.11,181.2],[.53,.124,179],[.327,.05,185]],jade:[[.995,.004,172.6],[.982,.009,160.3],[.96,.022,161.9],[.934,.034,163.5],[.902,.046,164.8],[.859,.059,166.9],[.8,.077,169.5],[.721,.103,173.4],[.642,.115,170.8],[.613,.11,170.6],[.529,.127,167.2],[.326,.041,169.8]],green:[[.994,.004,159.1],[.982,.009,155.3],[.959,.023,156.4],[.933,.036,156.6],[.9,.05,157.2],[.857,.065,157.9],[.798,.084,159],[.714,.112,160.6],[.64,.133,157.8],[.611,.126,158.3],[.529,.133,158.3],[.322,.047,164.6]],grass:[[.994,.005,146.4],[.982,.009,145.9],[.961,.023,145.3],[.934,.037,146.2],[.901,.053,146.4],[.858,.071,146.8],[.798,.095,147.5],[.716,.13,148.3],[.652,.147,147.4],[.614,.142,147.3],[.527,.13,147.2],[.327,.053,148.6]],brown:[[.994,.002,63.2],[.983,.006,65.7],[.954,.013,67.8],[.926,.02,66.9],[.897,.029,65.8],[.862,.039,65.5],[.815,.053,64.2],[.747,.072,62.4],[.633,.078,60.8],[.597,.072,59.3],[.512,.058,55.5],[.332,.018,47]],bronze:[[.992,.001,15.9],[.981,.007,43],[.953,.01,44.3],[.925,.014,43.6],[.895,.018,42.6],[.86,.023,43.4],[.811,.03,41.9],[.742,.039,41.2],[.627,.046,44.3],[.588,.045,42.4],[.51,.044,38.4],[.329,.029,35.2]],gold:[[.994,.001,106.4],[.981,.009,97.3],[.953,.012,94.7],[.926,.015,93.2],[.896,.019,90.7],[.86,.025,88.4],[.81,.032,83.4],[.739,.042,78.2],[.621,.049,78.1],[.588,.047,77.4],[.504,.039,78.1],[.332,.019,81.7]],sky:[[.993,.005,211.9],[.98,.01,217.7],[.961,.024,219.6],[.936,.036,220.4],[.903,.047,221.4],[.861,.058,222.9],[.806,.072,225.7],[.729,.096,228],[.861,.103,217.8],[.838,.104,219.6],[.526,.108,232.5],[.351,.057,241.6]],mint:[[.993,.005,183.7],[.982,.01,178.7],[.96,.03,179.6],[.933,.047,179],[.899,.061,178.7],[.856,.072,178.7],[.798,.085,178.2],[.722,.107,177.7],[.87,.1,178],[.841,.1,177.8],[.512,.095,176],[.35,.051,181.4]],lime:[[.992,.004,120.7],[.982,.01,116.7],[.959,.043,119.1],[.932,.069,120.4],[.897,.087,121.8],[.853,.099,123.4],[.795,.111,125.3],[.724,.135,128.1],[.888,.175,126.1],[.859,.188,126.7],[.544,.111,128.6],[.354,.057,121.2]],yellow:[[.993,.005,106.5],[.988,.025,102.9],[.974,.084,104.4],[.953,.117,101.7],[.925,.141,98.2],[.881,.134,95.4],[.836,.12,92.8],[.766,.137,89.8],[.927,.209,102.1],[.897,.185,97.5],[.574,.136,81.7],[.358,.046,86.6]],amber:[[.994,.003,84.6],[.986,.024,100.3],[.969,.069,100.4],[.945,.104,98.2],[.918,.133,98.4],[.881,.124,93.2],[.827,.122,86.2],[.758,.14,76.7],[.856,.178,81.4],[.831,.168,80.9],[.569,.144,67.3],[.352,.049,53.7]],orange:[[.992,.003,40.7],[.979,.015,70.8],[.958,.037,78.1],[.92,.081,74.2],[.89,.107,70.8],[.857,.11,64.4],[.805,.113,59.9],[.745,.132,54.8],[.689,.191,44.8],[.662,.194,43.5],[.592,.186,47],[.35,.069,40.8]]},ra=e=>(e/=255,e<=.04045?e/12.92:((e+.055)/1.055)**2.4),M5=(e,t,n)=>{const r=.4122214708*e+.5363325363*t+.0514459929*n,i=.2119034982*e+.6806995451*t+.1073969566*n,a=.0883024619*e+.2817188376*t+.6299787005*n,s=Math.cbrt(r),o=Math.cbrt(i),u=Math.cbrt(a),l=.2104542553*s+.793617785*o-.0040720468*u,h=1.9779984951*s-2.428592205*o+.4505937099*u,d=.0259040371*s+.7827717662*o-.808675766*u;return[l,h,d]},Ah=([e,t,n])=>{const r=Math.sqrt(t*t+n*n),i=Math.atan2(n,t)*180/Math.PI;return[e,r,(i+360)%360]},ui=([e,t,n])=>{const r=(n??0)*Math.PI/180;return[e,t*Math.cos(r),t*Math.sin(r)]},B5=e=>{const t=e.replace("#",""),n=parseInt(t.length===3?t.replace(/./g,s=>s+s):t,16),r=ra(n>>16&255),i=ra(n>>8&255),a=ra(n&255);return Ah(M5(r,i,a))},Yn=(e,t)=>{const[n,r,i]=ui(e),[a,s,o]=ui(t);return Math.hypot(n-a,r-s,i-o)},F5=(e,t,n)=>{const r=ui(e),i=ui(t),a=[r[0]+(i[0]-r[0])*n,r[1]+(i[1]-r[1])*n,r[2]+(i[2]-r[2])*n];return Ah(a)},H5=([e,t,n])=>`oklch(${(e*100).toFixed(1)}% ${+t.toFixed(3)} ${+(n??0).toFixed(2)})`,Ch=["1","2","3","4","5","6","7","8","9","10","11","12"],Ps=["gray","mauve","slate","sage","olive","sand"];function Ri(e,t){return Object.fromEntries(t.map(n=>[n,e[n]]))}const U5=Ri(wh,xh),z5=Ri(yh,xh),$5=Ri(wh,Ps),Y5=Ri(yh,Ps),hl=({prefix:e,appearance:t,color:n,isNeutral:r=!1})=>{if(!/^#?[0-9A-Fa-f]{6}$/.test(n))throw new Error("Color must be a valid 6-digit hex");const i=t==="light"?U5:z5,a=t==="light"?$5:Y5,s=B5(n),o=r?fl(s,a):fl(s,i);if(!r){o[8]=s,o[9]=j5(s,[o]);const u=Math.max(o[8][1],o[7][1]);o[10][1]=Math.min(u,o[10][1]),o[11][1]=Math.min(u,o[11][1])}return Object.fromEntries(Ch.map((u,l)=>[`${e}${u}`,H5(o[l])]))};function j5(e,t){const[n,r,i]=e,a=n>.4?n-.03/(n+.1):n+.03/(n+.1),s=n>.4&&i!==null?r*.93:r,o=[a,s,i];let u=o,l=1/0;for(const h of t)for(const d of h){const f=Yn(o,d);f<l&&(l=f,u=d)}return[a,u[1],u[2]]}function fl(e,t){const n=[];for(const[y,R]of Object.entries(t))for(const M of R)n.push({scale:y,color:M,distance:Yn(e,M)});n.sort((y,R)=>y.distance-R.distance);const r=n.filter((y,R,M)=>R===M.findIndex(S=>S.scale===y.scale)),i=new Set(Ps);if(!r.every(y=>i.has(y.scale))&&i.has(r[0].scale))for(;r.length>1&&i.has(r[1].scale);)r.splice(1,1);const[s,o]=[r[0],r[1]],u=o.distance,l=s.distance,h=Yn(s.color,o.color),d=(l**2+h**2-u**2)/(2*l*h),f=(u**2+h**2-l**2)/(2*u*h),p=Math.max(0,d/Math.sqrt(1-d**2)/(f/Math.sqrt(1-f**2)))*.5,g=t[s.scale],E=t[o.scale],A=Ch.map((y,R)=>F5(g[R],E[R],p)),w=A.slice().sort((y,R)=>Yn(e,y)-Yn(e,R))[0],C=e[1]/(w[1]||1e-6);for(const y of A)y[1]=Math.min(e[1]*1.5,y[1]*C),y[2]=e[2];return A}const V5=e=>e.slice(6,-1),pl=e=>Object.entries(e).map(([t,n])=>`--${t}: ${V5(n)};`);function q5(e){const t=hl({prefix:"a-",appearance:e.mode,color:e.accentColor}),n=hl({prefix:"n-",appearance:e.mode,color:e.neutralColor??"#555555",isNeutral:!0}),r=`--highest: ${e.mode==="light"?"100% 0 0":"10% 0 0"};`;return[...pl(t),...pl(n),r].join(`
|
|
122
122
|
`)}const W5={sm:.25,md:.5,lg:1},G5={"kin-r-xs":4,"kin-r-sm":8,"kin-r-md":10,"kin-r-lg":12,"kin-r-xl":16,"kin-r-2xl":20,"kin-r-3xl":24,"kin-r-4xl":32},Q5=e=>`${Number(e.toFixed(3))}px`;function K5(e){return Object.entries(G5).map(([t,n])=>`--${t}: ${Q5(n*W5[e])};`).join(`
|
|
123
|
-
`)}const Fa=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Yr=e=>{if(typeof e!="string")return null;const t=e.trim();return t.length>0?t:null},X5=e=>{const t=Yr(e);return t&&(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")&&!t.startsWith("//"))?t:null},Z5=e=>{if(!Fa(e))return null;if(e.kind==="job_cards"&&Array.isArray(e.jobs)){const t=e.jobs.flatMap(n=>{const r=J5(n);return r?[r]:[]});return t.length>0?{kind:"job_cards",jobs:t}:null}return null},vh=e=>{if(!Array.isArray(e))return null;const t=e.flatMap(n=>{const r=Z5(n);return r?[r]:[]});return t.length>0?t:null},J5=e=>{if(!Fa(e))return null;const t=e.id;if(typeof t!="string"&&typeof t!="number")return null;const n=Yr(e.title);if(!n)return null;const r=Array.isArray(e.details)?e.details.flatMap(s=>{if(!Fa(s))return[];const o=Yr(s.key),u=Yr(s.value);return o&&u?[{key:o,value:u}]:[]}):[],i={id:String(t),title:n,details:r},a=X5(e.applyUrl);return a&&(i.applyUrl=a),i},ml={accentColor:"#FF4D00",neutralColor:"#555555",mode:"light",rounded:"lg"},e4={production:"wss://agents.inploi.com",sandbox:"wss://agents.staging.inploi.com"},t4=/^\[System: CV uploaded and processed - "(.+?)"/;function n4(e){var r;if(e.role!=="assistant"&&e.role!=="user")return[];const t=typeof e.content=="string"?e.content:"";if(e.role==="user"){const i=(r=t4.exec(t))==null?void 0:r[1];if(i)return[{role:"user",content:"",attachment:{name:i}}];if(t.startsWith("[System:"))return[]}const n=vh(e.blocks)??void 0;return[{role:e.role,content:t,...n&&{blocks:n}}]}const r4=({serviceUrl:e,theme:t=ml,starterPrompts:n=[],placement:r="center",container:i})=>Pr.createPlugin(({logger:a,publishableKey:s,env:o})=>{const u=e??e4[o??"production"];if(!s)throw new Error("Kin plugin requires a publishableKey. Pass it to initialiseSdk().");let l=!1,h=null,d={...ml,...t},f=null,p=!1,g=null,E=null,A=!1;const w=r==="embedded",C=()=>{if(i)if(typeof i=="string"){const I=document.querySelector(i);if(I instanceof HTMLElement)return E=I,A=!1,I}else return E=i,A=!1,i;const v=document.getElementById("inploi-kin-root");if(v)return E=v,A=!1,v;const U=document.createElement("div");return U.id="inploi-kin-root",
|
|
123
|
+
`)}const Fa=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Yr=e=>{if(typeof e!="string")return null;const t=e.trim();return t.length>0?t:null},X5=e=>{const t=Yr(e);return t&&(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")&&!t.startsWith("//"))?t:null},Z5=e=>{if(!Fa(e))return null;if(e.kind==="job_cards"&&Array.isArray(e.jobs)){const t=e.jobs.flatMap(n=>{const r=J5(n);return r?[r]:[]});return t.length>0?{kind:"job_cards",jobs:t}:null}return null},vh=e=>{if(!Array.isArray(e))return null;const t=e.flatMap(n=>{const r=Z5(n);return r?[r]:[]});return t.length>0?t:null},J5=e=>{if(!Fa(e))return null;const t=e.id;if(typeof t!="string"&&typeof t!="number")return null;const n=Yr(e.title);if(!n)return null;const r=Array.isArray(e.details)?e.details.flatMap(s=>{if(!Fa(s))return[];const o=Yr(s.key),u=Yr(s.value);return o&&u?[{key:o,value:u}]:[]}):[],i={id:String(t),title:n,details:r},a=X5(e.applyUrl);return a&&(i.applyUrl=a),i},ml={accentColor:"#FF4D00",neutralColor:"#555555",mode:"light",rounded:"lg"},e4={production:"wss://agents.inploi.com",sandbox:"wss://agents.staging.inploi.com"},t4=/^\[System: CV uploaded and processed - "(.+?)"/;function n4(e){var r;if(e.role!=="assistant"&&e.role!=="user")return[];const t=typeof e.content=="string"?e.content:"";if(e.role==="user"){const i=(r=t4.exec(t))==null?void 0:r[1];if(i)return[{role:"user",content:"",attachment:{name:i}}];if(t.startsWith("[System:"))return[]}const n=vh(e.blocks)??void 0;return[{role:e.role,content:t,...n&&{blocks:n}}]}const r4=({serviceUrl:e,theme:t=ml,starterPrompts:n=[],placement:r="center",container:i})=>Pr.createPlugin(({logger:a,publishableKey:s,env:o})=>{const u=e??e4[o??"production"];if(!s)throw new Error("Kin plugin requires a publishableKey. Pass it to initialiseSdk().");let l=!1,h=null,d={...ml,...t},f=null,p=!1,g=null,E=null,A=!1;const w=r==="embedded",C=()=>{if(i)if(typeof i=="string"){const I=document.querySelector(i);if(I instanceof HTMLElement)return E=I,A=!1,I}else return E=i,A=!1,i;const v=document.getElementById("inploi-kin-root");if(v)return E=v,A=!1,v;const U=document.createElement("div");return U.id="inploi-kin-root",document.body.appendChild(U),E=U,A=!0,U},y=v=>{const U=q5(v),I=K5(v.rounded??"lg");return`${P5}
|
|
124
124
|
|
|
125
125
|
/* Theme overrides */
|
|
126
126
|
:host {
|
|
@@ -21618,7 +21618,7 @@ var R0 = li(!1), zy = () => et(R0), Z = (...e) => sT(b_(e)), En = (e, t, n) => {
|
|
|
21618
21618
|
f === "color" ? h["--sdm-c"] = p : f === "background-color" ? (h["--sdm-tbg"] = p, d = !0) : h[f] = p;
|
|
21619
21619
|
return m("span", { className: Z("text-[var(--sdm-c,inherit)]", "dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]", d && "bg-[var(--sdm-tbg)]", d && "dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"), style: h, ...u.htmlAttrs, children: u.content }, l);
|
|
21620
21620
|
}) }, o)) }) }) });
|
|
21621
|
-
}, (e, t) => e.result === t.result && e.language === t.language && e.className === t.className), Vy = ({ className: e, language: t, style: n, isIncomplete: r, ...i }) => m("div", { className: Z("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": r || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...n }, ...i }), O0 = li({ code: "" }), D0 = () => et(O0), qy = ({ language: e }) => m("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: m("span", { className: "ml-1 font-mono lowercase", children: e }) }), Wy = /\n+$/, Gy = ec(() => import("./highlighted-body-B3W2YXNL-
|
|
21621
|
+
}, (e, t) => e.result === t.result && e.language === t.language && e.className === t.className), Vy = ({ className: e, language: t, style: n, isIncomplete: r, ...i }) => m("div", { className: Z("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2", e), "data-incomplete": r || void 0, "data-language": t, "data-streamdown": "code-block", style: { contentVisibility: "auto", containIntrinsicSize: "auto 200px", ...n }, ...i }), O0 = li({ code: "" }), D0 = () => et(O0), qy = ({ language: e }) => m("div", { className: "flex h-8 items-center text-muted-foreground text-xs", "data-language": e, "data-streamdown": "code-block-header", children: m("span", { className: "ml-1 font-mono lowercase", children: e }) }), Wy = /\n+$/, Gy = ec(() => import("./highlighted-body-B3W2YXNL-aa326909.js").then((e) => ({ default: e.HighlightedCodeBlockBody }))), Qy = ({ code: e, language: t, className: n, children: r, isIncomplete: i = !1, ...a }) => {
|
|
21622
21622
|
let s = Ne(() => e.replace(Wy, ""), [e]), o = Ne(() => ({ bg: "transparent", fg: "inherit", tokens: s.split(`
|
|
21623
21623
|
`).map((u) => [{ content: u, color: "inherit", bgColor: "transparent", htmlStyle: {}, offset: 0 }]) }), [s]);
|
|
21624
21624
|
return m(O0.Provider, { value: { code: e }, children: m(Vy, { isIncomplete: i, language: t, children: [m(qy, { language: t }), r ? m("div", { className: "pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end", children: m("div", { className: "pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur", "data-streamdown": "code-block-actions", children: r }) }) : null, m(qn, { fallback: m(jy, { className: n, language: t, result: o, ...a }), children: m(Gy, { className: n, code: s, language: t, raw: o, ...a }) })] }) });
|
|
@@ -21942,7 +21942,7 @@ var R0 = li(!1), zy = () => et(R0), Z = (...e) => sT(b_(e)), En = (e, t, n) => {
|
|
|
21942
21942
|
document.removeEventListener("mousedown", l);
|
|
21943
21943
|
};
|
|
21944
21944
|
}, []), m("div", { className: "relative", ref: s, children: [m("button", { className: Z("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50", t), disabled: o, onClick: () => a(!i), title: "Download table", type: "button", children: e ?? m(Ii, { size: 14 }) }), i ? m("div", { className: "absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg", children: [m("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => u("csv"), title: "Download table as CSV", type: "button", children: "CSV" }), m("button", { className: "w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40", onClick: () => u("markdown"), title: "Download table as Markdown", type: "button", children: "Markdown" })] }) : null] });
|
|
21945
|
-
}, g6 = ({ children: e, className: t, showControls: n, ...r }) => m("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [n ? m("div", { className: "flex items-center justify-end gap-1", children: [m(p6, {}), m(m6, {})] }) : null, m("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: m("table", { className: Z("w-full divide-y divide-border", t), "data-streamdown": "table", ...r, children: e }) })] }), b6 = ec(() => import("./mermaid-3ZIDBTTL-
|
|
21945
|
+
}, g6 = ({ children: e, className: t, showControls: n, ...r }) => m("div", { className: "my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2", "data-streamdown": "table-wrapper", children: [n ? m("div", { className: "flex items-center justify-end gap-1", children: [m(p6, {}), m(m6, {})] }) : null, m("div", { className: "border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background", children: m("table", { className: Z("w-full divide-y divide-border", t), "data-streamdown": "table", ...r, children: e }) })] }), b6 = ec(() => import("./mermaid-3ZIDBTTL-6ffe15f4.js").then((e) => ({ default: e.Mermaid }))), E6 = /language-([^\s]+)/;
|
|
21946
21946
|
function Ni(e, t) {
|
|
21947
21947
|
if (!(e != null && e.position || t != null && t.position))
|
|
21948
21948
|
return !0;
|
|
@@ -27874,7 +27874,7 @@ const u4 = ({
|
|
|
27874
27874
|
if (v)
|
|
27875
27875
|
return E = v, A = !1, v;
|
|
27876
27876
|
const U = document.createElement("div");
|
|
27877
|
-
return U.id = "inploi-kin-root",
|
|
27877
|
+
return U.id = "inploi-kin-root", document.body.appendChild(U), E = U, A = !0, U;
|
|
27878
27878
|
}, y = (v) => {
|
|
27879
27879
|
const U = W5(v), I = X5(v.rounded ?? "lg");
|
|
27880
27880
|
return `${M5}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-45f58435.cjs");require("@inploi/sdk");exports.Mermaid=e.Nt;
|
package/dist/plugin-kin.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-45f58435.cjs");require("@inploi/sdk");exports.kinPlugin=e.kinPlugin;
|
package/dist/plugin-kin.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inploi/plugin-kin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Kin - A unified Talent Agent interface for hiring. One system, many roles.",
|
|
6
6
|
"main": "dist/plugin-kin.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@inploi/sdk": ">=1.
|
|
23
|
+
"@inploi/sdk": ">=1.18.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@preact/preset-vite": "2.5.0",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"vite": "^4.4.5",
|
|
36
36
|
"vite-plugin-dts": "^3.7.0",
|
|
37
37
|
"vite-tsconfig-paths": "^4.2.1",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
38
|
+
"@inploi/sdk": "1.18.0",
|
|
39
|
+
"tsconfig": "0.1.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"streamdown": "^2.3.0",
|