PageSourceSearch

https://destinycards.ai/_nuxt/DDG84o5r.js

js destinycards.ai collected 2026-10-05 15:01:54 UTC 172,104 bytes, 93 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./CoTf9NO2.js","./BvK9Eb9g.js","./entry.BFClq7Y0.css"])))=>i.map(i=>d[i]);
2import{i as Is,h as A,j as z,k as vn,l as Os,e as ut,m as Ps,n as Ds,q as Bt,s as L,v as St,x as et,y as Sr,o as y,z as I,w as q,b as P,A as u,P as $e,B as M,C as De,D as Z,E as Cr,c as O,G as Y,H as Ve,I as Ms,J as Bs,K as at,L as Es,M as Ls,N as qr,O as Ar,Q as te,R as ie,S as zs,T as er,U as Ns,V as $r,W as Fs,X as Tr,Y as Us,Z as Hs,$ as Vs,a0 as Ks,a1 as Ws,a2 as kt,a3 as Ee,a4 as Gs,a5 as js,a6 as bn,a7 as ln,a8 as wn,a9 as xn,aa as kn,ab as Ne,ac as Ys,ad as Ze,ae as Qs,af as Vt,ag as Zs,ah as Xs,ai as _n,aj as me,ak as Rr,a as _,al as it,am as xt,t as V,an as G,ao as Ct,F as ye,r as we,ap as Ir,aq as Re,ar as Js,as as ea,at as Sn,d as le,au as j,av as Et,aw as Or,ax as ta,ay as na,az as ra,aA as sa,aB as aa,aC as He,aD as oa,aE as Pr,aF as ia,aG as la,aH as ua,aI as Dr,aJ as un,aK as ca,aL as da,aM as pa,aN as fa,aO as ha,aP as ga,aQ as ma,aR as ya,aS as tr}from"./BvK9Eb9g.js";import{B as yt}from"./BmTgv6Ua.js";const va=["INPUT","TEXTAREA"];function ba(e,t,n,s={}){if(!t||s.enableIgnoredElement&&va.includes(t.nodeName))return null;const{arrowKeyOptions:r="both",attributeName:o="[data-reka-collection-item]",itemsArray:a=[],loop:i=!0,dir:l="ltr",preventScroll:d=!0,focus:c=!1}=s,[p,f,h,m,k,g]=[e.key==="ArrowRight",e.key==="ArrowLeft",e.key==="ArrowUp",e.key==="ArrowDown",e.key==="Home",e.key==="End"],x=h||m,b=p||f;if(!k&&!g&&(!x&&!b||r==="vertical"&&b||r==="horizontal"&&x))return null;const C=n?Array.from(n.querySelectorAll(o)):a;if(!C.length)return null;d&&e.preventDefault();let T=null;return b||x?T=Mr(C,t,{goForward:x?m:l==="ltr"?p:f,loop:i}):k?T=C.at(0)||null:g&&(T=C.at(-1)||null),c&&T?.focus(),T}function Mr(e,t,n,s=e.length){if(--s===0)return null;const r=e.indexOf(t),o=n.goForward?r+1:r-1;if(!n.loop&&(o<0||o>=e.length))return null;const a=(o+e.length)%e.length,i=e[a];return i?i.hasAttribute("disabled")&&i.getAttribute("disabled")!=="false"?Mr(e,i,n,s):i:null}function Cn(e){const t=Is({dir:A("ltr")});return z(()=>e?.value||t.dir?.value||"ltr")}let sn=0;function wa(){vn(e=>{if(!Os)return;const t=document.querySelectorAll("[data-reka-focus-guard]");document.body.insertAdjacentElement("afterbegin",t[0]??nr()),document.body.insertAdjacentElement("beforeend",t[1]??nr()),sn++,e(()=>{sn===1&&document.querySelectorAll("[data-reka-focus-guard]").forEach(n=>n.remove()),sn--})})}function nr(){const e=document.createElement("span");return e.setAttribute("data-reka-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function xa(e){const t=A(),n=z(()=>t.value?.width??0),s=z(()=>t.value?.height??0);return ut(()=>{const r=Ps(e);if(r){t.value={width:r.offsetWidth,height:r.offsetHeight};const o=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let l,d;if("borderBoxSize"in i){const c=i.borderBoxSize,p=Array.isArray(c)?c[0]:c;l=p.inlineSize,d=p.blockSize}else l=r.offsetWidth,d=r.offsetHeight;t.value={width:l,height:d}});return o.observe(r,{box:"border-box"}),()=>o.unobserve(r)}else t.value=void 0}),{width:n,height:s}}function ka(e){const t=Ds("",1e3);return{search:t,handleTypeaheadSearch:(r,o)=>{t.value=t.value+r;{const a=Bt(),i=o.map(f=>({...f,textValue:f.value?.textValue??f.ref.textContent?.trim()??""})),l=i.find(f=>f.ref===a),d=i.map(f=>f.textValue),c=Sa(d,t.value,l?.textValue),p=i.find(f=>f.textValue===c);return p&&p.ref.focus(),p?.ref}},resetTypeahead:()=>{t.value=""}}}function _a(e,t){return e.map((n,s)=>e[(t+s)%e.length])}function Sa(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=_a(e,Math.max(o,0));r.length===1&&(a=a.filter(d=>d!==n));const l=a.find(d=>d.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}const Ca="rovingFocusGroup.onEntryFocus",qa={bubbles:!1,cancelable:!0};function Aa(e,t=!1){const n=Bt();for(const s of e)if(s===n||(s.focus({preventScroll:t}),Bt()!==n))return}const[od,$a]=De("RovingFocusGroup");var Ta=L({__name:"RovingFocusGroup",props:{orientation:{type:String,required:!1,default:void 0},dir:{type:String,required:!1},loop:{type:Boolean,required:!1,default:!1},currentTabStopId:{type:[String,null],required:!1},defaultCurrentTabStopId:{type:String,required:!1},preventScrollOnEntryFocus:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["entryFocus","update:currentTabStopId"],setup(e,{expose:t,emit:n}){const s=e,r=n,{loop:o,orientation:a,dir:i}=St(s),l=Cn(i),d=et(s,"currentTabStopId",r,{defaultValue:s.defaultCurrentTabStopId,passive:s.currentTabStopId===void 0}),c=A(!1),p=A(!1),f=A(0),{getItems:h,CollectionSlot:m}=Sr({isProvider:!0});function k(x){const b=!p.value;if(x.currentTarget&&x.target===x.currentTarget&&b&&!c.value){const C=new CustomEvent(Ca,qa);if(x.currentTarget.dispatchEvent(C),r("entryFocus",C),!C.defaultPrevented){const T=h().map(w=>w.ref).filter(w=>w.dataset.disabled!==""),B=T.find(w=>w.getAttribute("data-active")===""),$=T.find(w=>w.getAttribute("data-highlighted")===""),R=T.find(w=>
2w.id===d.value),N=[B,$,R,...T].filter(Boolean);Aa(N,s.preventScrollOnEntryFocus)}}p.value=!1}function g(){setTimeout(()=>{p.value=!1},1)}return t({getItems:h}),$a({loop:o,dir:l,orientation:a,currentTabStopId:d,onItemFocus:x=>{d.value=x},onItemShiftTab:()=>{c.value=!0},onFocusableItemAdd:()=>{f.value++},onFocusableItemRemove:()=>{f.value--}}),(x,b)=>(y(),I(u(m),null,{default:q(()=>[P(u($e),{tabindex:c.value||f.value===0?-1:0,"data-orientation":u(a),as:x.as,"as-child":x.asChild,dir:u(l),style:{outline:"none"},onMousedown:b[0]||(b[0]=C=>p.value=!0),onMouseup:g,onFocus:k,onBlur:b[1]||(b[1]=C=>c.value=!1)},{default:q(()=>[M(x.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),Ra=Ta;const[Br,Ia]=De("PopperRoot");var Oa=L({inheritAttrs:!1,__name:"PopperRoot",setup(e){const t=A();return Ia({anchor:t,onAnchorChange:n=>t.value=n}),(n,s)=>M(n.$slots,"default")}}),Er=Oa,Pa=L({__name:"PopperAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,{forwardRef:n,currentElement:s}=Z(),r=Br();return Cr(()=>{r.onAnchorChange(t.reference??s.value)}),(o,a)=>(y(),I(u($e),{ref:u(n),as:o.as,"as-child":o.asChild},{default:q(()=>[M(o.$slots,"default")]),_:3},8,["as","as-child"]))}}),Da=Pa;const Ma={key:0,d:"M0 0L6 6L12 0"},Ba={key:1,d:"M0 0L4.58579 4.58579C5.36683 5.36683 6.63316 5.36684 7.41421 4.58579L12 0"};var Ea=L({__name:"Arrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Z(),(n,s)=>(y(),I(u($e),Y(t,{width:n.width,height:n.height,viewBox:n.asChild?void 0:"0 0 12 6",preserveAspectRatio:n.asChild?void 0:"none"}),{default:q(()=>[M(n.$slots,"default",{},()=>[n.rounded?(y(),O("path",Ba)):(y(),O("path",Ma))])]),_:3},16,["width","height","viewBox","preserveAspectRatio"]))}}),La=Ea;function za(e){return e!==null}function Na(e){return{name:"transformOrigin",options:e,fn(t){const{placement:n,rects:s,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[d,c]=cn(n),p={start:"0%",center:"50%",end:"100%"}[c],f=(r.arrow?.x??0)+i/2,h=(r.arrow?.y??0)+l/2;let m="",k="";return d==="bottom"?(m=a?p:`${f}px`,k=`${-l}px`):d==="top"?(m=a?p:`${f}px`,k=`${s.floating.height+l}px`):d==="right"?(m=`${-l}px`,k=a?p:`${h}px`):d==="left"&&(m=`${s.floating.width+l}px`,k=a?p:`${h}px`),{data:{x:m,y:k}}}}}function cn(e){const[t,n="center"]=e.split("-");return[t,n]}const Fa=["top","right","bottom","left"],Ke=Math.min,be=Math.max,Lt=Math.round,Pt=Math.floor,Oe=e=>({x:e,y:e}),Ua={left:"right",right:"left",bottom:"top",top:"bottom"},Ha={start:"end",end:"start"};function dn(e,t,n){return be(e,Ke(t,n))}function Le(e,t){return typeof e=="function"?e(t):e}function ze(e){return e.split("-")[0]}function dt(e){return e.split("-")[1]}function qn(e){return e==="x"?"y":"x"}function An(e){return e==="y"?"height":"width"}const Va=new Set(["top","bottom"]);function Ie(e){return Va.has(ze(e))?"y":"x"}function $n(e){return qn(Ie(e))}function Ka(e,t,n){n===void 0&&(n=!1);const s=dt(e),r=$n(e),o=An(r);let a=r==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=zt(a)),[a,zt(a)]}function Wa(e){const t=zt(e);return[pn(e),t,pn(t)]}function pn(e){return e.replace(/start|end/g,t=>Ha[t])}const rr=["left","right"],sr=["right","left"],Ga=["top","bottom"],ja=["bottom","top"];function Ya(e,t,n){switch(e){case"top":case"bottom":return n?t?sr:rr:t?rr:sr;case"left":case"right":return t?Ga:ja;default:return[]}}function Qa(e,t,n,s){const r=dt(e);let o=Ya(ze(e),n==="start",s);return r&&(o=o.map(a=>a+"-"+r),t&&(o=o.concat(o.map(pn)))),o}function zt(e){return e.replace(/left|right|bottom|top/g,t=>Ua[t])}function Za(e){return{top:0,right:0,bottom:0,left:0,...e}}function Lr(e){return typeof e!="number"?Za(e):{top:e,right:e,bottom:e,left:e}}function Nt(e){const{x:t,y:n,width:s,height:r}=e;return{width:s,height:r,top:n,left:t,right:t+s,bottom:n+r,x:t,y:n}}function ar(e,t,n){let{reference:s,floating:r}=e;const o=Ie(t),a=$n(t),i=An(a),l=ze(t),d=o==="y",c=s.x+s.width/2-r.width/2,p=s.y+s.height/2-r.height/2,f=s[i]/2-r[i]/2;let h;switch(l){case"top":h={x:c,y:s.y-r.height};break;case"bottom":h={x:c,y:s.y+s.height};break;case"right":h={x:s.x+s.width,y:p};break;case"left":h={x:s.x-r.width,y:p};break;default:h={x:s.x,y:s.y}}switch(dt(t)){case"start":h[a]-=f*(n&&d?-1:1);break;case"end":h[a]+=f*(n&&d?-1:1);break}return h}async function Xa(e,t){var n;t===void 0&&(t={});const{x:s,y:r,platform:o,rects:a,elements:i,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:f=!1,padding:h=0}=Le(t,e),m=Lr(h),g=i[f?p==="floating"?"reference":"floating":p],x=Nt(await o.getClippingRect
vendor: 9,785 bytes, line 2
2({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:d,rootBoundary:c,strategy:l})),b=p==="floating"?{x:s,y:r,width:a.floating.width,height:a.floating.height}:a.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),T=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},B=Nt(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:b,offsetParent:C,strategy:l}):b);return{top:(x.top-B.top+m.top)/T.y,bottom:(B.bottom-x.bottom+m.bottom)/T.y,left:(x.left-B.left+m.left)/T.x,right:(B.right-x.right+m.right)/T.x}}const Ja=async(e,t,n)=>{const{placement:s="bottom",strategy:r="absolute",middleware:o=[],platform:a}=n,i=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:c,y:p}=ar(d,s,l),f=s,h={},m=0;for(let g=0;g<i.length;g++){var k;const{name:x,fn:b}=i[g],{x:C,y:T,data:B,reset:$}=await b({x:c,y:p,initialPlacement:s,placement:f,strategy:r,middlewareData:h,rects:d,platform:{...a,detectOverflow:(k=a.detectOverflow)!=null?k:Xa},elements:{reference:e,floating:t}});c=C??c,p=T??p,h={...h,[x]:{...h[x],...B}},$&&m<=50&&(m++,typeof $=="object"&&($.placement&&(f=$.placement),$.rects&&(d=$.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):$.rects),{x:c,y:p}=ar(d,f,l)),g=-1)}return{x:c,y:p,placement:f,strategy:r,middlewareData:h}},eo=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:r,rects:o,platform:a,elements:i,middlewareData:l}=t,{element:d,padding:c=0}=Le(e,t)||{};if(d==null)return{};const p=Lr(c),f={x:n,y:s},h=$n(r),m=An(h),k=await a.getDimensions(d),g=h==="y",x=g?"top":"left",b=g?"bottom":"right",C=g?"clientHeight":"clientWidth",T=o.reference[m]+o.reference[h]-f[h]-o.floating[m],B=f[h]-o.reference[h],$=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let R=$?$[C]:0;(!R||!await(a.isElement==null?void 0:a.isElement($)))&&(R=i.floating[C]||o.floating[m]);const N=T/2-B/2,w=R/2-k[m]/2-1,E=Ke(p[x],w),U=Ke(p[b],w),K=E,ue=R-k[m]-U,Q=R/2-k[m]/2+N,ce=dn(K,Q,ue),de=!l.arrow&&dt(r)!=null&&Q!==ce&&o.reference[m]/2-(Q<K?E:U)-k[m]/2<0,se=de?Q<K?Q-K:Q-ue:0;return{[h]:f[h]+se,data:{[h]:ce,centerOffset:Q-ce-se,...de&&{alignmentOffset:se}},reset:de}}}),to=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:r,middlewareData:o,rects:a,initialPlacement:i,platform:l,elements:d}=t,{mainAxis:c=!0,crossAxis:p=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:k=!0,...g}=Le(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=ze(r),b=Ie(i),C=ze(i)===i,T=await(l.isRTL==null?void 0:l.isRTL(d.floating)),B=f||(C||!k?[zt(i)]:Wa(i)),$=m!=="none";!f&&$&&B.push(...Qa(i,k,m,T));const R=[i,...B],N=await l.detectOverflow(t,g),w=[];let E=((s=o.flip)==null?void 0:s.overflows)||[];if(c&&w.push(N[x]),p){const Q=Ka(r,a,T);w.push(N[Q[0]],N[Q[1]])}if(E=[...E,{placement:r,overflows:w}],!w.every(Q=>Q<=0)){var U,K;const Q=(((U=o.flip)==null?void 0:U.index)||0)+1,ce=R[Q];if(ce&&(!(p==="alignment"?b!==Ie(ce):!1)||E.every(X=>Ie(X.placement)===b?X.overflows[0]>0:!0)))return{data:{index:Q,overflows:E},reset:{placement:ce}};let de=(K=E.filter(se=>se.overflows[0]<=0).sort((se,X)=>se.overflows[1]-X.overflows[1])[0])==null?void 0:K.placement;if(!de)switch(h){case"bestFit":{var ue;const se=(ue=E.filter(X=>{if($){const ve=Ie(X.placement);return ve===b||ve==="y"}return!0}).map(X=>[X.placement,X.overflows.filter(ve=>ve>0).reduce((ve,Zt)=>ve+Zt,0)]).sort((X,ve)=>X[1]-ve[1])[0])==null?void 0:ue[0];se&&(de=se);break}case"initialPlacement":de=i;break}if(r!==de)return{reset:{placement:de}}}return{}}}};function or(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ir(e){return Fa.some(t=>e[t]>=0)}const no=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:r="referenceHidden",...o}=Le(e,t);switch(r){case"referenceHidden":{const a=await s.detectOverflow(t,{...o,elementContext:"reference"}),i=or(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ir(i)}}}case"escaped":{const a=await s.detectOverflow(t,{...o,altBoundary:!0}),i=or(a,n.floating);return{data:{escapedOffsets:i,escaped:ir(i)}}}default:return{}}}}},zr=new Set(["left","top"]);async function ro(e,t){const{placement:n,platform:s,elements:r}=e,o=await(s.isRTL==null?void 0:s.isRTL(r.floating)),a=ze(n),i=dt(n),l=Ie(n)==="y",d=zr.has(a)?-1:1,c=o&&l?-1:1,p=Le(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof m=="number"&&(h=i==="end"?m*-1:m),l?{x:h*c,y:f*d}:{x:f*d,y:h*c}}const so=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:r,y:o,placement:a,middlewareData:i}=t,l=await ro(t,e);return a===((n=i.offset)==null?void 0:n.placement)&&(s=i.arrow)!=null&&s.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:a}}}}},ao=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:r,platform:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:l={fn:x=>{let{x:b,y:C}=x;return{x:b,y:C}}},...d}=Le(e,t),c={x:n,y:s},p=await o.detectOverflow(t,d),f=Ie(ze(r)),h=qn(f);let m=c[h],k=c[f];if(a){const x=h==="y"?"top":"left",b=h==="y"?"bottom":"right",C=m+p[x],T=m-p[b];m=dn(C,m,T)}if(i){const x=f==="y"?"top":"left",b=f==="y"?"bottom":"right",C=k+p[x],T=k-p[b];k=dn(C,k,T)}const g=l.fn({...t,[h]:m,[f]:k});return{...g,data:{x:g.x-n,y:g.y-s,enabled:{[h]:a,[f]:i}}}}}},oo=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:r,rects:o,middlewareData:a}=t,{offset:i=0,mainAxis:l=!0,crossAxis:d=!0}=Le(e,t),c={x:n,y:s},p=Ie(r),f=qn(p);let h=c[f],m=c[p];const k=Le(i,t),g=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(l){const C=f==="y"?"height":"width",T=o.reference[f]-o.floating[C]+g.mainAxis,B=o.reference[f]+o.reference[C]-g.mainAxis;h<T?h=T:h>B&&(h=B)}if(d){var x,b;const C=f==="y"?"width":"height",T=zr.has(ze(r)),B=o.reference[p]-o.floating[C]+(T&&((x=a.offset)==null?void 0:x[p])||0)+(T?0:g.crossAxis),$=o.reference[p]+o.reference[C]+(T?0:((b=a.offset)==null?void 0:b[p])||0)-(T?g.crossAxis:0);m<B?m=B:m>$&&(m=$)}return{[f]:h,[p]:m}}}},io=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:r,rects:o,platform:a,elements:i}=t,{apply:l=()=>{},...d}=Le(e,t),c=await a.detectOverflow(t,d),p=ze(r),f=dt(r),h=Ie(r)==="y",{width:m,height:k}=o.floating;let g,x;p==="top"||p==="bottom"?(g=p,x=f===(await(a.isRTL==null?void 0:a.isRTL(i.floating))?"start":"end")?"left":"right"):(x=p,g=f==="end"?"top":"bottom");const b=k-c.top-c.bottom,C=m-c.left-c.right,T=Ke(k-c[g],b),B=Ke(m-c[x],C),$=!t.middlewareData.shift;let R=T,N=B;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=C),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(R=b),$&&!f){const E=be(c.left,0),U=be(c.right,0),K=be(c.top,0),ue=be(c.bottom,0);h?N=m-2*(E!==0||U!==0?E+U:be(c.left,c.right)):R=k-2*(K!==0||ue!==0?K+ue:be(c.top,c.bottom))}await l({...t,availableWidth:N,availableHeight:R});const w=await a.getDimensions(i.floating);return m!==w.width||k!==w.height?{reset:{rects:!0}}:{}}}};function Kt(){return typeof window<"u"}function tt(e){return Tn(e)?(e.nodeName||"").toLowerCase():"#document"}function xe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Me(e){var t;return(t=(Tn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Tn(e){return Kt()?e instanceof Node||e instanceof xe(e).Node:!1}function qe(e){return Kt()?e instanceof Element||e instanceof xe(e).Element:!1}function Pe(e){return Kt()?e instanceof HTMLElement||e instanceof xe(e).HTMLElement:!1}function lr(e){return!Kt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xe(e).ShadowRoot}const lo=new Set(["inline","contents"]);function qt(e){const{overflow:t,overflowX:n,overflowY:s,display:r}=Ae(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!lo.has(r)}const uo=new Set(["table","td","th"]);function co(e){return uo.has(tt(e))}const po=[":popover-open",":modal"];function Wt(e){return po.some(t=>{try{return e.matches(t)}catch{return!1}})}const fo=["transform","translate","scale","rotate","perspective"],ho=["transform","translate","scale","rotate","perspective","filter"],go=["paint","layout","strict","content"];function Rn(e){const t=In(),n=qe(e)?Ae(e):e;return fo.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ho.some(s=>(n.willChange||"").includes(s))||go.some(s=>(n.contain||"").includes(s))}function mo(e){let t=We(e);for(;Pe(t)&&!ct(t);){if(Rn(t))return t;if(Wt(t))return null;t=We(t)}return null}function In(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const yo=new Set(["html","body","#document"]);function ct(e){return yo.has(tt(e))}function Ae(e){return xe(e).getComputedStyle(e)}function Gt(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function We(e){if(tt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lr(e)&&e.host||Me(e);return lr(t)?t.host:t}function Nr(e){const t=We(e);return ct(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pe(t)&&qt(t)?t:Nr(t)}function _t(e,t,n){var s;
vendor: 4,304 bytes, line 2
2t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Nr(e),o=r===((s=e.ownerDocument)==null?void 0:s.body),a=xe(r);if(o){const i=fn(a);return t.concat(a,a.visualViewport||[],qt(r)?r:[],i&&n?_t(i):[])}return t.concat(r,_t(r,[],n))}function fn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fr(e){const t=Ae(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const r=Pe(e),o=r?e.offsetWidth:n,a=r?e.offsetHeight:s,i=Lt(n)!==o||Lt(s)!==a;return i&&(n=o,s=a),{width:n,height:s,$:i}}function On(e){return qe(e)?e:e.contextElement}function lt(e){const t=On(e);if(!Pe(t))return Oe(1);const n=t.getBoundingClientRect(),{width:s,height:r,$:o}=Fr(t);let a=(o?Lt(n.width):n.width)/s,i=(o?Lt(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!i||!Number.isFinite(i))&&(i=1),{x:a,y:i}}const vo=Oe(0);function Ur(e){const t=xe(e);return!In()||!t.visualViewport?vo:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bo(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xe(e)?!1:t}function Xe(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=On(e);let a=Oe(1);t&&(s?qe(s)&&(a=lt(s)):a=lt(e));const i=bo(o,n,s)?Ur(o):Oe(0);let l=(r.left+i.x)/a.x,d=(r.top+i.y)/a.y,c=r.width/a.x,p=r.height/a.y;if(o){const f=xe(o),h=s&&qe(s)?xe(s):s;let m=f,k=fn(m);for(;k&&s&&h!==m;){const g=lt(k),x=k.getBoundingClientRect(),b=Ae(k),C=x.left+(k.clientLeft+parseFloat(b.paddingLeft))*g.x,T=x.top+(k.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,d*=g.y,c*=g.x,p*=g.y,l+=C,d+=T,m=xe(k),k=fn(m)}}return Nt({width:c,height:p,x:l,y:d})}function jt(e,t){const n=Gt(e).scrollLeft;return t?t.left+n:Xe(Me(e)).left+n}function Hr(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-jt(e,n),r=n.top+t.scrollTop;return{x:s,y:r}}function wo(e){let{elements:t,rect:n,offsetParent:s,strategy:r}=e;const o=r==="fixed",a=Me(s),i=t?Wt(t.floating):!1;if(s===a||i&&o)return n;let l={scrollLeft:0,scrollTop:0},d=Oe(1);const c=Oe(0),p=Pe(s);if((p||!p&&!o)&&((tt(s)!=="body"||qt(a))&&(l=Gt(s)),Pe(s))){const h=Xe(s);d=lt(s),c.x=h.x+s.clientLeft,c.y=h.y+s.clientTop}const f=a&&!p&&!o?Hr(a,l):Oe(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+c.x+f.x,y:n.y*d.y-l.scrollTop*d.y+c.y+f.y}}function xo(e){return Array.from(e.getClientRects())}function ko(e){const t=Me(e),n=Gt(e),s=e.ownerDocument.body,r=be(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=be(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let a=-n.scrollLeft+jt(e);const i=-n.scrollTop;return Ae(s).direction==="rtl"&&(a+=be(t.clientWidth,s.clientWidth)-r),{width:r,height:o,x:a,y:i}}const ur=25;function _o(e,t){const n=xe(e),s=Me(e),r=n.visualViewport;let o=s.clientWidth,a=s.clientHeight,i=0,l=0;if(r){o=r.width,a=r.height;const c=In();(!c||c&&t==="fixed")&&(i=r.offsetLeft,l=r.offsetTop)}const d=jt(s);if(d<=0){const c=s.ownerDocument,p=c.body,f=getComputedStyle(p),h=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(s.clientWidth-p.clientWidth-h);m<=ur&&(o-=m)}else d<=ur&&(o+=d);return{width:o,height:a,x:i,y:l}}const So=new Set(["absolute","fixed"]);function Co(e,t){const n=Xe(e,!0,t==="fixed"),s=n.top+e.clientTop,r=n.left+e.clientLeft,o=Pe(e)?lt(e):Oe(1),a=e.clientWidth*o.x,i=e.clientHeight*o.y,l=r*o.x,d=s*o.y;return{width:a,height:i,x:l,y:d}}function cr(e,t,n){let s;if(t==="viewport")s=_o(e,n);else if(t==="document")s=ko(Me(e));else if(qe(t))s=Co(t,n);else{const r=Ur(e);s={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Nt(s)}function Vr(e,t){const n=We(e);return n===t||!qe(n)||ct(n)?!1:Ae(n).position==="fixed"||Vr(n,t)}function qo(e,t){const n=t.get(e);if(n)return n;let s=_t(e,[],!1).filter(i=>qe(i)&&tt(i)!=="body"),r=null;const o=Ae(e).position==="fixed";let a=o?We(e):e;for(;qe(a)&&!ct(a);){const i=Ae(a),l=Rn(a);!l&&i.position==="fixed"&&(r=null),(o?!l&&!r:!l&&i.position==="static"&&!!r&&So.has(r.position)||qt(a)&&!l&&Vr(e,a))?s=s.filter(c=>c!==a):r=i,a=We(a)}return t.set(e,s),s}function Ao(e){let{element:t,boundary:n,rootBoundary:s,strategy:r}=e;const a=[...n==="clippingAncestors"?Wt(t)?[]:qo(t,this._c):[].concat(n),s],i=a[0],l=a.reduce((d,c)=>{const p=cr(t,c,r);return d.top=be(p.top,d.top),d.right=Ke(p.right,d.right),d.bottom=Ke(p.bottom,d.bottom),d.left
2=be(p.left,d.left),d},cr(t,i,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function $o(e){const{width:t,height:n}=Fr(e);return{width:t,height:n}}function To(e,t,n){const s=Pe(t),r=Me(t),o=n==="fixed",a=Xe(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const l=Oe(0);function d(){l.x=jt(r)}if(s||!s&&!o)if((tt(t)!=="body"||qt(r))&&(i=Gt(t)),s){const h=Xe(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else r&&d();o&&!s&&r&&d();const c=r&&!s&&!o?Hr(r,i):Oe(0),p=a.left+i.scrollLeft-l.x-c.x,f=a.top+i.scrollTop-l.y-c.y;return{x:p,y:f,width:a.width,height:a.height}}function an(e){return Ae(e).position==="static"}function dr(e,t){if(!Pe(e)||Ae(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Me(e)===n&&(n=n.ownerDocument.body),n}function Kr(e,t){const n=xe(e);if(Wt(e))return n;if(!Pe(e)){let r=We(e);for(;r&&!ct(r);){if(qe(r)&&!an(r))return r;r=We(r)}return n}let s=dr(e,t);for(;s&&co(s)&&an(s);)s=dr(s,t);return s&&ct(s)&&an(s)&&!Rn(s)?n:s||mo(e)||n}const Ro=async function(e){const t=this.getOffsetParent||Kr,n=this.getDimensions,s=await n(e.floating);return{reference:To(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Io(e){return Ae(e).direction==="rtl"}const Oo={convertOffsetParentRelativeRectToViewportRelativeRect:wo,getDocumentElement:Me,getClippingRect:Ao,getOffsetParent:Kr,getElementRects:Ro,getClientRects:xo,getDimensions:$o,getScale:lt,isElement:qe,isRTL:Io};function Wr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Po(e,t){let n=null,s;const r=Me(e);function o(){var i;clearTimeout(s),(i=n)==null||i.disconnect(),n=null}function a(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),o();const d=e.getBoundingClientRect(),{left:c,top:p,width:f,height:h}=d;if(i||t(),!f||!h)return;const m=Pt(p),k=Pt(r.clientWidth-(c+f)),g=Pt(r.clientHeight-(p+h)),x=Pt(c),C={rootMargin:-m+"px "+-k+"px "+-g+"px "+-x+"px",threshold:be(0,Ke(1,l))||1};let T=!0;function B($){const R=$[0].intersectionRatio;if(R!==l){if(!T)return a();R?a(!1,R):s=setTimeout(()=>{a(!1,1e-7)},1e3)}R===1&&!Wr(d,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(B,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(B,C)}n.observe(e)}return a(!0),o}function Do(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,d=On(e),c=r||o?[...d?_t(d):[],..._t(t)]:[];c.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=d&&i?Po(d,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(x=>{let[b]=x;b&&b.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var C;(C=h)==null||C.observe(t)})),n()}),d&&!l&&h.observe(d),h.observe(t));let m,k=l?Xe(e):null;l&&g();function g(){const x=Xe(e);k&&!Wr(k,x)&&n(),k=x,m=requestAnimationFrame(g)}return n(),()=>{var x;c.forEach(b=>{r&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),p?.(),(x=h)==null||x.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const Mo=so,Bo=ao,pr=to,Eo=io,Lo=no,zo=eo,No=oo,Fo=(e,t,n)=>{const s=new Map,r={platform:Oo,...n},o={...r.platform,_c:s};return Ja(e,t,{...r,platform:o})};function Uo(e){return e!=null&&typeof e=="object"&&"$el"in e}function hn(e){if(Uo(e)){const t=e.$el;return Tn(t)&&tt(t)==="#comment"?null:t}return e}function ot(e){return typeof e=="function"?e():u(e)}function Ho(e){return{name:"arrow",options:e,fn(t){const n=hn(ot(e.element));return n==null?{}:zo({element:n,padding:e.padding}).fn(t)}}}function Gr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fr(e,t){const n=Gr(e);return Math.round(t*n)/n}function Vo(e,t,n){n===void 0&&(n={});const s=n.whileElementsMounted,r=z(()=>{var R;return(R=ot(n.open))!=null?R:!0}),o=z(()=>ot(n.middleware)),a=z(()=>{var R;return(R=ot(n.placement))!=null?R:"bottom"}),i=z(()=>{var R;return(R=ot(n.strategy))!=null?R:"absolute"}),l=z(()=>{var R;return(R=ot(n.transform))!=null?R:!0}),d=z(()=>hn(e.value)),c=z(()=>hn(t.value)),p=A(0),f=A(0),h=A(i.value),m=A(a.value),k=Es({}),g=A(!1),x=z(()=>{const R={position:h.value,left:"0",top:"0"};if(!c.value)return R;const N=fr(c.value,p.value),w=fr(c.value,f.value);return l.value?{...R,transform:"translate("+N+"px, "+w+"px)",...Gr(c.value)>=1.5&&{willChange:"transform"}}:{position:h.value,left:N+"px",top:w+"px"}});let b;function C(){if(d.value==null||c.value==null)return;const R=r.value;Fo(d.value,c.value,{middleware:o.value,placement:a.value,strategy:i.value}).then(N=>{p.value=N.x,f.value=N.y,h.value=N.strategy,m.value=N.placement,k.value=N.middlewareData,g.value=R!==!1}
2)}function T(){typeof b=="function"&&(b(),b=void 0)}function B(){if(T(),s===void 0){C();return}if(d.value!=null&&c.value!=null){b=s(d.value,c.value,C);return}}function $(){r.value||(g.value=!1)}return Ve([o,a,i,r],C,{flush:"sync"}),Ve([d,c],B,{flush:"sync"}),Ve(r,$,{flush:"sync"}),Ms()&&Bs(T),{x:at(p),y:at(f),strategy:at(h),placement:at(m),middlewareData:at(k),isPositioned:at(g),floatingStyles:x,update:C}}const jr={side:"bottom",sideOffset:0,sideFlip:!0,align:"center",alignOffset:0,alignFlip:!0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,positionStrategy:"fixed",updatePositionStrategy:"optimized",prioritizePosition:!1},[Ko,Wo]=De("PopperContent");var Go=L({inheritAttrs:!1,__name:"PopperContent",props:Ar({side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...jr}),emits:["placed"],setup(e,{emit:t}){const n=e,s=t,r=Br(),{forwardRef:o,currentElement:a}=Z(),i=A(),l=A(),{width:d,height:c}=xa(l),p=z(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),f=z(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),h=z(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),m=z(()=>({padding:f.value,boundary:h.value.filter(za),altBoundary:h.value.length>0})),k=z(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),g=Ls(()=>[Mo({mainAxis:n.sideOffset+c.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&pr({...m.value,...k.value}),n.avoidCollisions&&Bo({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?No():void 0,...m.value}),!n.prioritizePosition&&n.avoidCollisions&&pr({...m.value,...k.value}),Eo({...m.value,apply:({elements:K,rects:ue,availableWidth:Q,availableHeight:ce})=>{const{width:de,height:se}=ue.reference,X=K.floating.style;X.setProperty("--reka-popper-available-width",`${Q}px`),X.setProperty("--reka-popper-available-height",`${ce}px`),X.setProperty("--reka-popper-anchor-width",`${de}px`),X.setProperty("--reka-popper-anchor-height",`${se}px`)}}),l.value&&Ho({element:l.value,padding:n.arrowPadding}),Na({arrowWidth:d.value,arrowHeight:c.value}),n.hideWhenDetached&&Lo({strategy:"referenceHidden",...m.value})]),x=z(()=>n.reference??r.anchor.value),{floatingStyles:b,placement:C,isPositioned:T,middlewareData:B}=Vo(x,i,{strategy:n.positionStrategy,placement:p,whileElementsMounted:(...K)=>Do(...K,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy==="always"}),middleware:g}),$=z(()=>cn(C.value)[0]),R=z(()=>cn(C.value)[1]);Cr(()=>{T.value&&s("placed")});const N=z(()=>B.value.arrow?.centerOffset!==0),w=A("");vn(()=>{a.value&&(w.value=window.getComputedStyle(a.value).zIndex)});const E=z(()=>B.value.arrow?.x??0),U=z(()=>B.value.arrow?.y??0);return Wo({placedSide:$,onArrowChange:K=>l.value=K,arrowX:E,arrowY:U,shouldHideArrow:N}),(K,ue)=>(y(),O("div",{ref_key:"floatingRef",ref:i,"data-reka-popper-content-wrapper":"",style:qr({...u(b),transform:u(T)?u(b).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:w.value,"--reka-popper-transform-origin":[u(B).transformOrigin?.x,u(B).transformOrigin?.y].join(" "),...u(B).hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}})},[P(u($e),Y({ref:u(o)},K.$attrs,{"as-child":n.asChild,as:K.as,"data-side":$.value,"data-align":R.value,style:{animation:u(T)?void 0:"none"}}),{default:q(()=>[M(K.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4))}}),jo=Go;
2const Yo={top:"bottom",right:"left",bottom:"top",left:"right"};var Qo=L({inheritAttrs:!1,__name:"PopperArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const{forwardRef:t}=Z(),n=Ko(),s=z(()=>Yo[n.placedSide.value]);return(r,o)=>(y(),O("span",{ref:a=>{u(n).onArrowChange(a)},style:qr({position:"absolute",left:u(n).arrowX?.value?`${u(n).arrowX?.value}px`:void 0,top:u(n).arrowY?.value?`${u(n).arrowY?.value}px`:void 0,[s.value]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[u(n).placedSide.value],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[u(n).placedSide.value],visibility:u(n).shouldHideArrow.value?"hidden":void 0})},[P(La,Y(r.$attrs,{ref:u(t),style:{display:"block"},as:r.as,"as-child":r.asChild,rounded:r.rounded,width:r.width,height:r.height}),{default:q(()=>[M(r.$slots,"default")]),_:3},16,["as","as-child","rounded","width","height"])],4))}}),Zo=Qo,Xo=L({__name:"MenuAnchor",props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,s)=>(y(),I(u(Da),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),Yr=Xo,Jo=L({__name:"MenuArrow",props:{width:{type:Number,required:!1},height:{type:Number,required:!1},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,s)=>(y(),I(u(Zo),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),ei=Jo;function ti(){const e=A(!1);return ut(()=>{er("keydown",()=>{e.value=!0},{capture:!0,passive:!0}),er(["pointerdown","pointermove"],()=>{e.value=!1},{capture:!0,passive:!0})}),e}const ni=zs(ti),[nt,Qr]=De(["MenuRoot","MenuSub"],"MenuContext"),[At,ri]=De("MenuRoot");var si=L({__name:"MenuRoot",props:{open:{type:Boolean,required:!1,default:!1},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,s=t,{modal:r,dir:o}=St(n),a=Cn(o),i=et(n,"open",s),l=A(),d=ni();return Qr({open:i,onOpenChange:c=>{i.value=c},content:l,onContentChange:c=>{l.value=c}}),ri({onClose:()=>{i.value=!1},isUsingKeyboardRef:d,dir:a,modal:r}),(c,p)=>(y(),I(u(Er),null,{default:q(()=>[M(c.$slots,"default")]),_:3}))}}),ai=si;const[Pn,oi]=De("MenuContent");var ii=L({__name:"MenuContentImpl",props:Ar({loop:{type:Boolean,required:!1},disableOutsidePointerEvents:{type:Boolean,required:!1},disableOutsideScroll:{type:Boolean,required:!1},trapFocus:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...jr}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(e,{emit:t}){const n=e,s=t,r=nt(),o=At(),{trapFocus:a,disableOutsidePointerEvents:i,loop:l}=St(n);wa(),Ns(i.value);const d=A(""),c=A(0),p=A(0),f=A(null),h=A("right"),m=A(0),k=A(null),g=A(),{forwardRef:x,currentElement:b}=Z(),{handleTypeaheadSearch:C}=ka();Ve(b,w=>{r.onContentChange(w)}),$r(()=>{window.clearTimeout(c.value)});function T(w){return h.value===f.value?.side&&Hs(w,f.value?.area)}async function B(w){s("openAutoFocus",w),!w.defaultPrevented&&(w.preventDefault(),b.value?.focus({preventScroll:!0}))}function $(w){if(w.defaultPrevented)return;const U=w.target.closest("[data-reka-menu-content]")===w.currentTarget,K=w.ctrlKey||w.altKey||w.metaKey,ue=w.key.length===1,Q=ba(w,Bt(),b.value,{loop:l.value,arrowKeyOptions:"vertical",dir:o?.dir.value,focus:!0,attributeName:"[data-reka-collection-item]:not([data-disabled])"});if(Q)return Q?.focus();if(w.code==="Space")return;const ce=g.value?.getItems()??[];if(U&&(w.key==="Tab"&&w.preventDefault(),!K&&ue&&C(w.key,ce)),w.target!==b.value||!Vs.includes(w.key))return;w.preventDefault();const de=[...ce.map(se=>se.ref)];Ks.includes(w.key)&&de.reverse(),Ws(de)}function R(w){w?.currentTarget?.contains?.(w.target)||(window.clearTimeout(c.value),d.value="")}function N(w){if(!kt(w))return;const E=w.target,U=m.value!==w.clientX;if(w?.currentTarget?.contains(E)&&U){const K=w.clientX>m.value?"right":"left";h.value=K,m.value=w.clientX}}return oi({onItemEnter:w=>!!T(w),onItemLeave:w=>{T(w)||(b.value?.focus(),k.value=null)},onTriggerLeave:w=>!!T(w),searchRef:d,pointerGraceTimerRef:p,onPointerGraceIntentChange:w=>{f.value=w}}),(w,E)=>(y(),I(u(Us),{"as-child":"",trapped:u(a),onMountAutoFocus:B,onUnmountAutoFocus:E[7]||(E[7]=U=>s("closeAutoFocus",U))},{default:q(()=>[P(u(Fs),{"as-child":"","disable-outside-pointer-events":u(i),onEscapeKeyDown:E[2]||(E[2]=U=>s("escapeKeyDown",U)),onPointerDownOutside:E[3]||(E[3]=U=>s("pointerDownOutside",U)),onFocusOutside:E[4]||(E[4]=U=>s("focusOutside",U)),onInteractOutside:E[5]||(E[5]=U=>s("interactOutside",U)),onDismiss:E[6]||(E[6]=U=>s("dismiss"))},{default:q(()=>
2[P(u(Ra),{ref_key:"rovingFocusGroupRef",ref:g,"current-tab-stop-id":k.value,"onUpdate:currentTabStopId":E[0]||(E[0]=U=>k.value=U),"as-child":"",orientation:"vertical",dir:u(o).dir.value,loop:u(l),onEntryFocus:E[1]||(E[1]=U=>{s("entryFocus",U),u(o).isUsingKeyboardRef.value||U.preventDefault()})},{default:q(()=>[P(u(jo),{ref:u(x),role:"menu",as:w.as,"as-child":w.asChild,"aria-orientation":"vertical","data-reka-menu-content":"","data-state":u(Tr)(u(r).open.value),dir:u(o).dir.value,side:w.side,"side-offset":w.sideOffset,align:w.align,"align-offset":w.alignOffset,"avoid-collisions":w.avoidCollisions,"collision-boundary":w.collisionBoundary,"collision-padding":w.collisionPadding,"arrow-padding":w.arrowPadding,"prioritize-position":w.prioritizePosition,"position-strategy":w.positionStrategy,"update-position-strategy":w.updatePositionStrategy,sticky:w.sticky,"hide-when-detached":w.hideWhenDetached,reference:w.reference,onKeydown:$,onBlur:R,onPointermove:N},{default:q(()=>[M(w.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","position-strategy","update-position-strategy","sticky","hide-when-detached","reference"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),Dn=ii,li=L({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=Pn(),{forwardRef:s}=Z(),{CollectionItem:r}=Sr(),o=A(!1);async function a(l){l.defaultPrevented||kt(l)&&(t.disabled?n.onItemLeave(l):n.onItemEnter(l)||l.currentTarget?.focus({preventScroll:!0}))}async function i(l){await Ee(),!l.defaultPrevented&&kt(l)&&n.onItemLeave(l)}return(l,d)=>(y(),I(u(r),{value:{textValue:l.textValue}},{default:q(()=>[P(u($e),Y({ref:u(s),role:"menuitem",tabindex:"-1"},l.$attrs,{as:l.as,"as-child":l.asChild,"aria-disabled":l.disabled||void 0,"data-disabled":l.disabled?"":void 0,"data-highlighted":o.value?"":void 0,onPointermove:a,onPointerleave:i,onFocus:d[0]||(d[0]=async c=>{await Ee(),!(c.defaultPrevented||l.disabled)&&(o.value=!0)}),onBlur:d[1]||(d[1]=async c=>{await Ee(),!c.defaultPrevented&&(o.value=!1)})}),{default:q(()=>[M(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),Zr=li,ui=L({__name:"MenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,s=t,{forwardRef:r,currentElement:o}=Z(),a=At(),i=Pn(),l=A(!1);async function d(){const c=o.value;if(!n.disabled&&c){const p=new CustomEvent(js,{bubbles:!0,cancelable:!0});s("select",p),await Ee(),p.defaultPrevented?l.value=!1:a.onClose()}}return(c,p)=>(y(),I(Zr,Y(n,{ref:u(r),onClick:d,onPointerdown:p[0]||(p[0]=()=>{l.value=!0}),onPointerup:p[1]||(p[1]=async f=>{await Ee(),!f.defaultPrevented&&(l.value||f.currentTarget?.click())}),onKeydown:p[2]||(p[2]=async f=>{const h=u(i).searchRef.value!=="";c.disabled||h&&f.key===" "||u(Gs).includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})}),{default:q(()=>[M(c.$slots,"default")]),_:3},16))}}),Mn=ui;const[ci,Xr]=De(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext");var di=L({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(e){const t=ci({modelValue:A(!1)});return(n,s)=>(y(),I(u(wn),{present:n.forceMount||u(ln)(u(t).modelValue.value)||u(t).modelValue.value===!0},{default:q(()=>[P(u($e),{as:n.as,"as-child":n.asChild,"data-state":u(bn)(u(t).modelValue.value)},{default:q(()=>[M(n.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),pi=di,fi=L({__name:"MenuCheckboxItem",props:{modelValue:{type:[Boolean,String],required:!1,default:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select","update:modelValue"],setup(e,{emit:t}){const n=e,s=t,r=xn(n,["modelValue"]),o=kn(r),a=et(n,"modelValue",s);return Xr({modelValue:a}),(i,l)=>(y(),I(Mn,Y({role:"menuitemcheckbox"},u(o),{"aria-checked":u(ln)(u(a))?"mixed":u(a),"data-state":u(bn)(u(a)),onSelect:l[0]||(l[0]=async d=>{s("select",d),u(ln)(u(a))?a.value=!0:a.value=!u(a)})}),{default:q(()=>[M(i.$slots,"default",{modelValue:u(a)})]),_:3},16,["aria-checked","data-state"]))}}),hi=fi,gi=L({__name:"MenuRootContentModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const n=e,s=t,r=Ne(n,s),o=nt(),{forwardRef:a,currentElement:i}=Z();return Ys(i),(l,d)=>(y(),I(Dn,Y(u(r),{ref:u(a),"trap-focus":u(o).open.value,"disable-outside-pointer-events":u(o).open.value,"disable-outside-scroll":!0,onDismiss:d[0]||(d[0]=c=>u(o).onOpenChange(!1)),onFocusOutside:d[1]||(d[1]=Ze(c=>s("focusOutside",c),["prevent"]))}),{default:q(()=>[M(l.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),mi=gi,yi=L({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=Ne(e,t),o=nt();return(a,i)=>(y(),I(Dn,Y(u(r),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:i[0]||(i[0]=l=>u(o).onOpenChange(!1))}),{default:q(()=>[M(a.$slots,"default")]),_:3},16))}}),vi=yi,bi=L({__name:"MenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=Ne(e,t),o=nt(),a=At();return(i,l)=>(y(),I(u(wn),{present:i.forceMount||u(o).open.value},{default:q(()=>[u(a).modal.value?(y(),I(mi,te(Y({key:0},{...i.$attrs,...u(r)})),{default:q(()=>[M(i.$slots,"default")]),_:3},16)):(y(),I(vi,te(Y({key:1},{...i.$attrs,...u(r)})),{default:q(()=>[M(i.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),wi=bi,xi=L({__name:"MenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,s)=>(y(),I(u($e),Y({role:"group"},t),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),Jr=xi,ki=L({__name:"MenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"div"}},setup(e){const t=e;return(n,s)=>(y(),I(u($e),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),_i=ki,Si=L({__name:"MenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,s)=>(y(),I(u(Qs),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),Ci=Si;const[qi,Ai]=De("MenuRadioGroup");var $i=L({__name:"MenuRadioGroup",props:{modelValue:{type:String,required:!1,default:""},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,r=xn(n,["modelValue"]),o=kn(r),a=et(n,"modelValue",s);return Ai({modelValue:a,onValueChange:i=>{a.value=i}}),(i,l)=>(y(),I(Jr,te(ie(u(o))),{default:q(()=>[M(i.$slots,"default",{modelValue:u(a)})]),_:3},16))}}),Ti=$i,Ri=L({__name:"MenuRadioItem",props:{value:{type:String,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,s=t,r=xn(n,["value"]),o=kn(r),{value:a}=St(n),i=qi(),l=z(()=>i.modelValue.value===a?.value);return Xr({modelValue:l}),(d,c)=>(y(),I(Mn,Y({role:"menuitemradio"},u(o),{"aria-checked":l.value,"data-state":u(bn)(l.value),onSelect:c[0]||(c[0]=async p=>{s("select",p),u(i).onValueChange(u(a))})}),{default:q(()=>[M(d.$slots,"default")]),_:3},16,["aria-checked","data-state"]))}}),Ii=Ri,Oi=L({__name:"MenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return(n,s)=>(y(),I(u($e),Y(t,{role:"separator","aria-orientation":"horizontal"}),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),Pi=Oi;
2const[es,Di]=De("MenuSub");var Mi=L({__name:"MenuSub",props:{open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=et(n,"open",t,{defaultValue:!1,passive:n.open===void 0}),o=nt(),a=A(),i=A();return vn(l=>{o?.open.value===!1&&(r.value=!1),l(()=>r.value=!1)}),Qr({open:r,onOpenChange:l=>{r.value=l},content:i,onContentChange:l=>{i.value=l}}),Di({triggerId:"",contentId:"",trigger:a,onTriggerChange:l=>{a.value=l}}),(l,d)=>(y(),I(u(Er),null,{default:q(()=>[M(l.$slots,"default")]),_:3}))}}),Bi=Mi,Ei=L({__name:"MenuSubContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1,default:!0},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=Ne(e,t),o=nt(),a=At(),i=es(),{forwardRef:l,currentElement:d}=Z();return i.contentId||=Vt(void 0,"reka-menu-sub-content"),(c,p)=>(y(),I(u(wn),{present:c.forceMount||u(o).open.value},{default:q(()=>[P(Dn,Y(u(r),{id:u(i).contentId,ref:u(l),"aria-labelledby":u(i).triggerId,align:"start",side:u(a).dir.value==="rtl"?"left":"right","disable-outside-pointer-events":!1,"disable-outside-scroll":!1,"trap-focus":!1,onOpenAutoFocus:p[0]||(p[0]=Ze(f=>{u(a).isUsingKeyboardRef.value&&u(d)?.focus()},["prevent"])),onCloseAutoFocus:p[1]||(p[1]=Ze(()=>{},["prevent"])),onFocusOutside:p[2]||(p[2]=f=>{f.defaultPrevented||f.target!==u(i).trigger.value&&u(o).onOpenChange(!1)}),onEscapeKeyDown:p[3]||(p[3]=f=>{u(a).onClose(),f.preventDefault()}),onKeydown:p[4]||(p[4]=f=>{const h=f.currentTarget?.contains(f.target),m=u(Zs)[u(a).dir.value].includes(f.key);h&&m&&(u(o).onOpenChange(!1),u(i).trigger.value?.focus(),f.preventDefault())})}),{default:q(()=>[M(c.$slots,"default")]),_:3},16,["id","aria-labelledby","side"])]),_:3},8,["present"]))}}),Li=Ei,zi=L({__name:"MenuSubTrigger",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e,n=nt(),s=At(),r=es(),o=Pn(),a=A(null);r.triggerId||=Vt(void 0,"reka-menu-sub-trigger");function i(){a.value&&window.clearTimeout(a.value),a.value=null}$r(()=>{i()});function l(p){!kt(p)||o.onItemEnter(p)||!t.disabled&&!n.open.value&&!a.value&&(o.onPointerGraceIntentChange(null),a.value=window.setTimeout(()=>{n.onOpenChange(!0),i()},100))}async function d(p){if(!kt(p))return;i();const f=n.content.value?.getBoundingClientRect();if(f?.width){const h=n.content.value?.dataset.side,m=h==="right",k=m?-5:5,g=f[m?"left":"right"],x=f[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:p.clientX+k,y:p.clientY},{x:g,y:f.top},{x,y:f.top},{x,y:f.bottom},{x:g,y:f.bottom}],side:h}),window.clearTimeout(o.pointerGraceTimerRef.value),o.pointerGraceTimerRef.value=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(p))return;o.onPointerGraceIntentChange(null)}}async function c(p){const f=o.searchRef.value!=="";t.disabled||f&&p.key===" "||Xs[s.dir.value].includes(p.key)&&(n.onOpenChange(!0),await Ee(),n.content.value?.focus(),p.preventDefault())}return(p,f)=>(y(),I(Yr,{"as-child":""},{default:q(()=>[P(Zr,Y(t,{id:u(r).triggerId,ref:h=>{u(r)?.onTriggerChange(h?.$el)},"aria-haspopup":"menu","aria-expanded":u(n).open.value,"aria-controls":u(r).contentId,"data-state":u(Tr)(u(n).open.value),onClick:f[0]||(f[0]=async h=>
2{t.disabled||h.defaultPrevented||(h.currentTarget.focus(),u(n).open.value||u(n).onOpenChange(!0))}),onPointermove:l,onPointerleave:d,onKeydown:c}),{default:q(()=>[M(p.$slots,"default")]),_:3},16,["id","aria-expanded","aria-controls","data-state"])]),_:3}))}}),Ni=zi,Fi=L({__name:"DropdownMenuArrow",props:{width:{type:Number,required:!1,default:10},height:{type:Number,required:!1,default:5},rounded:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"svg"}},setup(e){const t=e;return Z(),(n,s)=>(y(),I(u(ei),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),ts=Fi,Ui=L({__name:"DropdownMenuCheckboxItem",props:{modelValue:{type:[Boolean,String],required:!1},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select","update:modelValue"],setup(e,{emit:t}){const n=e,r=_n(t);return Z(),(o,a)=>(y(),I(u(hi),te(ie({...n,...u(r)})),{default:q(()=>[M(o.$slots,"default")]),_:3},16))}}),Hi=Ui;const[ns,Vi]=De("DropdownMenuRoot");var Ki=L({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0},dir:{type:String,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,s=t;Z();const r=et(n,"open",s,{defaultValue:n.defaultOpen,passive:n.open===void 0}),o=A(),{modal:a,dir:i}=St(n),l=Cn(i);return Vi({open:r,onOpenChange:d=>{r.value=d},onOpenToggle:()=>{r.value=!r.value},triggerId:"",triggerElement:o,contentId:"",modal:a,dir:l}),(d,c)=>(y(),I(u(ai),{open:u(r),"onUpdate:open":c[0]||(c[0]=p=>me(r)?r.value=p:null),dir:u(l),modal:u(a)},{default:q(()=>[M(d.$slots,"default",{open:u(r)})]),_:3},8,["open","dir","modal"]))}}),rs=Ki,Wi=L({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const r=Ne(e,t);Z();const o=ns(),a=A(!1);function i(l){l.defaultPrevented||(a.value||setTimeout(()=>{o.triggerElement.value?.focus()},0),a.value=!1,l.preventDefault())}return o.contentId||=Vt(void 0,"reka-dropdown-menu-content"),(l,d)=>(y(),I(u(wi),Y(u(r),{id:u(o).contentId,"aria-labelledby":u(o)?.triggerId,style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"},onCloseAutoFocus:i,onInteractOutside:d[0]||(d[0]=c=>{if(c.defaultPrevented)return;const p=c.detail.originalEvent,f=p.button===0&&p.ctrlKey===!0,h=p.button===2||f;(!u(o).modal.value||h)&&(a.value=!0),u(o).triggerElement.value?.contains(c.target)&&c.preventDefault()})}),{default:q(()=>[M(l.$slots,"default")]),_:3},16,["id","aria-labelledby"]))}}),Gi=Wi,ji=L({__name:"DropdownMenuGroup",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return Z(),(n,s)=>(y(),I(u(Jr),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),Yi=ji,Qi=L({__name:"DropdownMenuItem",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const n=e,r=_n(t);return Z(),(o,a)=>(y(),I(u(Mn),te(ie({...n,...u(r)})),{default:q(()=>[M(o.$slots,"default")]),_:3},16))}}),Zi=Qi,Xi=L({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return Z(),(n,s)=>(y(),I(u(pi),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),Ji=Xi,el=L({__name:"DropdownMenuLabel",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return Z(),(n,s)=>(y(),I(u(_i),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),tl=el,nl=L({__name:"DropdownMenuPortal",props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=e;return(n,s)=>(y(),I(u(Ci),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),rl=nl,sl=L({__name:"DropdownMenuRadioGroup",props:{modelValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=_n(t);return Z(),(o,a)=>(y(),I(u(Ti),te(ie({...n,...u(r)})),{default:q(()=>[M(o.$slots,"default")]),_:3},16))}}),al=sl,ol=L({__name:"DropdownMenuRadioItem",props:{value:{type:String,required:!0},disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["select"],setup(e,{emit:t}){const r=Ne(e,t);return Z(),(o,a)=>(y(),I(u(Ii),te(ie(u(r))),{default:q(()=>[M(o.$slots,"default")]),_:3},16))}}),il=ol,ll=L({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return Z(),(n,s)=>(y(),I(u(Pi),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),ul=ll,cl=L({__name:"DropdownMenuSub",props:{defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1,default:void 0}},emits:["update:open"],setup(e,{emit:t}){const n=e,r=et(n,"open",t,{passive:n.open===void 0,defaultValue:n.defaultOpen??!1});return Z(),(o,a)=>(y(),I(u(Bi),{open:u(r),"onUpdate:open":a[0]||(a[0]=i=>me(r)?r.value=i:null)},{default:q(()=>[M(o.$slots,"default",{open:u(r)})]),_:3},8,["open"]))}}),dl=cl,pl=L({__name:"DropdownMenuSubContent",props:{forceMount:{type:Boolean,required:!1},loop:{type:Boolean,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const r=Ne(e,t);return Z(),(o,a)=>(y(),I(u(Li),Y(u(r),{style:{"--reka-dropdown-menu-content-transform-origin":"var(--reka-popper-transform-origin)","--reka-dropdown-menu-content-available-width":"var(--reka-popper-available-width)","--reka-dropdown-menu-content-available-height":"var(--reka-popper-available-height)","--reka-dropdown-menu-trigger-width":"var(--reka-popper-anchor-width)","--reka-dropdown-menu-trigger-height":"var(--reka-popper-anchor-height)"}}),{default:q(()=>[M(o.$slots,"default")]),_:3},16))}}),fl=pl,hl=L({__name:"DropdownMenuSubTrigger",props:{disabled:{type:Boolean,required:!1},textValue:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){const t=e;return Z(),(n,s)=>(y(),I(u(Ni),te(ie(t)),{default:q(()=>[M(n.$slots,"default")]),_:3},16))}}),gl=hl,ml=L({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"button"}},setup(e){const t=e,n=ns(),{forwardRef:s,currentElement:r}=Z();return ut(()=>{n.triggerElement=r}),n.triggerId||=Vt(void 0,"reka-dropdown-menu-trigger"),(o,a)=>(y(),I(u(Yr),{"as-child":""},{default:q(()=>[P(u($e),{id:u(n).triggerId,ref:u(s),type:o.as==="button"?"button":void 0,"as-child":t.asChild,as:o.as,"aria-haspopup":"menu","aria-expanded":u(n).open.value,"aria-controls":u(n).open.value?u(n).c
2ontentId:void 0,"data-disabled":o.disabled?"":void 0,disabled:o.disabled,"data-state":u(n).open.value?"open":"closed",onClick:a[0]||(a[0]=async i=>{!o.disabled&&i.button===0&&i.ctrlKey===!1&&(u(n)?.onOpenToggle(),await Ee(),u(n).open.value&&i.preventDefault())}),onKeydown:a[1]||(a[1]=Rr(i=>{o.disabled||(["Enter"," "].includes(i.key)&&u(n).onOpenToggle(),i.key==="ArrowDown"&&u(n).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())},["enter","space","arrow-down"]))},{default:q(()=>[M(o.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),ss=ml;function yl(){const e=A([]),t=A(!1);let n=null;function s(a){const i=[a.name];return a.adminName1&&i.push(a.adminName1),a.countryName&&i.push(a.countryName),i.join(", ")}function r(a){if(n&&clearTimeout(n),!a||a.length<2){e.value=[];return}t.value=!0,n=setTimeout(async()=>{try{const i=new URLSearchParams({name_startsWith:a,featureClass:"P",style:"full",maxRows:"6",username:"century.boy"}),l=await $fetch(`https://secure.geonames.org/searchJSON?${i}`);e.value=(l.geonames||[]).map(d=>({name:d.name,adminName1:d.adminName1||"",countryName:d.countryName||"",label:s({name:d.name,adminName1:d.adminName1||"",countryName:d.countryName||"",label:""})}))}catch{e.value=[]}finally{t.value=!1}},300)}function o(){e.value=[],n&&clearTimeout(n)}return{cities:e,loading:t,searchCities:r,formatCity:s,clear:o}}const vl={"0121":["Capricorn","Aquarius"],"0218":["Aquarius","Pisces"],"0219":["Aquarius","Pisces"],"0220":["Aquarius","Pisces"],"0320":["Pisces","Aries"],"0321":["Pisces","Aries"],"0420":["Aries","Taurus"],"0421":["Aries","Taurus"],"0520":["Taurus","Gemini"],"0521":["Taurus","Gemini"],"0621":["Gemini","Cancer"],"0622":["Gemini","Cancer"],"0723":["Cancer","Leo"],"0822":["Leo","Virgo"],"0823":["Leo","Virgo"],"0922":["Virgo","Libra"],"0923":["Virgo","Libra"],1023:["Libra","Scorpio"],1024:["Libra","Scorpio"],1122:["Scorpio","Sagittarius"],1123:["Scorpio","Sagittarius"],1221:["Sagittarius","Capricorn"],1222:["Sagittarius","Capricorn"]},bl=["0101","0109","0110","0111","0119","0120","0121","0129","0130","0131","0208","0209","0210","0218","0219","0220","0228","0229","0301","0309","0310","0311","0320","0321","0322","0330","0331","0401","0409","0410","0411","0419","0420","0421","0429","0430","0501","0509","0510","0511","0520","0521","0522","0530","0531","0601","0609","0610","0611","0620","0621","0622","0701","0702","0703","0711","0712","0713","0722","0723","0724","0802","0803","0804","0812","0813","0814","0822","0823","0824","0901","0902","0903","0911","0912","0913","0922","0923","0924","1002","1003","1004","1012","1013","1014","1022","1023","1024","1101","1102","1103","1111","1112","1113","1121","1122","1123","1201","1202","1203","1211","1212","1213","1221","1222","1223","1231"];function hr(e){const t=e.split("-");return t[1]+t[2]}function wl(e){return bl.includes(e)}function xl(e){return wl(e)}function gr(e){return vl[e]||null}const kl={class:"text-center w-full"},_l={class:"cn-modal-title"},Sl={key:0,class:"flex flex-col items-center gap-4"},Cl={key:0,class:"text-red-500 text-sm"},ql={key:1,class:"flex flex-col gap-4"},Al={class:"text-center"},$l={class:"text-muted mb-1"},Tl={class:"flex flex-col gap-3"},Rl={class:"flex flex-col gap-3 relative"},Il={key:0,class:"city-dropdown"},Ol=["onMousedown"],Pl={key:0,class:"text-red-500 text-sm"},Dl={class:"text-center"},Ml=["disabled"],Bl=L({__name:"OnboardingModal",props:{open:{type:Boolean},greeting:{},existingProfile:{},allowDismiss:{type:Boolean}},emits:["update:open","profile-saved"],setup(e,{emit:t}){const n=e,s=t,r=z({get:()=>n.open,set:$=>s("update:open",$)}),o=A("birthDate"),a=A(""),i=A(""),l=A(""),d=A(""),c=A(!1),p=A(""),f=A(!1),h=A(null),{cities:m,searchCities:k,clear:g}=yl();Ve(()=>n.open,$=>{if($){if(p.value="",c.value=!1,n.existingProfile){if(o.value="cuspInfo",n.existingProfile.birthDate){const R=new Date(n.existingProfile.birthDate);a.value=R.toISOString().split("T")[0];const N=hr(a.value);h.value=gr(N)}}else o.value="birthDate",a.value="";i.value="",l.value="",d.value="",g()}});function x(){d.value="",f.value=!0,k(l.value)}function b($){l.value=$.label,d.value=$.label,f.value=!1,g()}async function C(){if(!a.value)return;p.value="";const $=hr(a.value);if(xl($)){h.value=gr($),o.value="cuspInfo";return}c.value=!0;try{const R=await $fetch("/api/profile/card",{method:"POST",body:{birthDate:a.value}});s("profile-saved",R.profile),r.value=!1}catch(R){p.value=R.data?.message||"Failed to save profile. Please try again."}finally{c.value=!1}}async function T(){if(!(!i.value||!d.value)){p.value="",c.value=!0;try{const $=await $fetch("/api/profile/card",{method:"POST",body:{birthDate:a.value,birthTime:i.value,birthCity:d.value}});s("profile-saved",$.profile),r.value=!1}catch($){p.value=$.data?.message||"Failed to calculate cards. Please try again."}finally{c.value=!1}}}async function B(){p.value="",c.value=!0;try{const $=await $fetch("/api/profile/card",{method:"POST",body:{birthDate:a.value}});s("profile-saved",$.profile),r.value=!1}catch($){p.value=$.data?.message||"Failed to save profile. Please try again."}finally{c.value=!1}}return($,R)=>{const N=Ct,w=Ir;return y(),I(w,{open:u(r),"onUpdate:open":R[4]||(R[4]=E=>me(r)?r.value=E:null),dismissible:!!e.existingProfile||e.allowDismiss,close:!!e.existingProfile||e.allowDismiss,ui:{width:"max-w-lg"}},{header:q(()=>[_("div",kl,[_("h2",_l,V(e.greeting),1)])]),body:q(()=>[u(o)==="birthDate"?(y(),O("div",Sl,[R[5]||(R[5]=_("p",{class:"text-muted text-center"},"Set your birth date to begin exploring your destiny cards.",-1)),it
2(_("input",{"onUpdate:modelValue":R[0]||(R[0]=E=>me(a)?a.value=E:null),type:"date",class:"cn-input w-full max-w-xs"},null,512),[[xt,u(a)]]),u(p)?(y(),O("p",Cl,V(u(p)),1)):G("",!0),P(N,{label:"Continue",color:"primary",loading:u(c),disabled:!u(a),onClick:C},null,8,["loading","disabled"])])):G("",!0),u(o)==="cuspInfo"?(y(),O("div",ql,[_("div",Al,[_("p",$l," Your birth date falls on a cusp"+V(u(h)?` (${u(h)[0]}/${u(h)[1]})`:"")+". ",1),R[6]||(R[6]=_("p",{class:"text-muted text-sm"}," Providing your birth time and city allows us to calculate your exact sun sign, planetary ruling card, and decanate ruling card. ",-1))]),_("div",Tl,[R[7]||(R[7]=_("label",{class:"text-sm font-medium"},"Birth Time",-1)),it(_("input",{"onUpdate:modelValue":R[1]||(R[1]=E=>me(i)?i.value=E:null),type:"time",class:"cn-input"},null,512),[[xt,u(i)]])]),_("div",Rl,[R[8]||(R[8]=_("label",{class:"text-sm font-medium"},"Birth City",-1)),it(_("input",{"onUpdate:modelValue":R[2]||(R[2]=E=>me(l)?l.value=E:null),type:"text",placeholder:"Start typing a city name...",autocomplete:"off",class:"cn-input",onInput:x,onFocus:R[3]||(R[3]=E=>f.value=!0)},null,544),[[xt,u(l)]]),u(f)&&u(m).length>0?(y(),O("div",Il,[(y(!0),O(ye,null,we(u(m),(E,U)=>(y(),O("div",{key:U,class:"city-dropdown-item",onMousedown:Ze(K=>b(E),["prevent"])},V(E.label),41,Ol))),128))])):G("",!0)]),u(p)?(y(),O("p",Pl,V(u(p)),1)):G("",!0),P(N,{label:"Calculate",color:"primary",loading:u(c),disabled:!u(i)||!u(d),onClick:T},null,8,["loading","disabled"]),_("div",Dl,[_("button",{class:"text-sm text-destiny-500 hover:text-destiny-600 underline",disabled:u(c),onClick:B}," I don't know my exact details ",8,Ml)])])):G("",!0)]),_:1},8,["open","dismissible","close"])}}}),El=Object.assign(Bl,{__name:"OnboardingModal"}),Ll=[{key:"relationships",label:"Relationships",icon:"i-lucide-heart",questions:[{text:"When will I meet someone new?",analysisHint:"You MUST call get_find_love_report before answering — it returns the curated love-timing cards (power ratings, descriptions, and timing windows) across the current and next personal year. Lead with the strongest hits, name each timing window, and weave the descriptions. If no_matches, frame as: the possibility remains, it's just not indicated in the searched window."},{text:"Will my boyfriend/girlfriend come back?",analysisHint:"This is a reunion question. The MANDATORY step: take the partner's birth card and planetary ruling card (already listed in Previously Discussed People if saved; otherwise establish them via get_relationship_connections first — and if they aren't saved or named, ask for their name and birth date first; NEVER invent them), convert them to shorthand, and call find_cards_in_spread searching those cards in the USER's Venus, Mars, Long Range, and Mercury positions, this year and next — do NOT pass other_person_name (that parameter switches WHOSE spread is searched; you are searching the USER's spread for the partner's cards). A hit means the partner's energy is present in the user's year — a strong signal. A connections reading alone does NOT answer this question. If the partner's cards don't show up in the searched window, frame it gently: the possibility remains, it's just not indicated in the cards in this timeframe."},{text:"Are my partner and I a good match?",analysisHint:"Use the get_relationship_connections tool (this is the existing love-cards/compatibility flow). Present the dominant connection first, then secondary, per the existing relationship-importance weighting rules. If no partner is saved or named, ask for their name, birth date, sex, and relationship type — never guess or invent them."},{text:"How will my relationship be in the coming year?",analysisHint:"The MANDATORY step: take the partner's birth card and planetary ruling card (listed in Previously Discussed People if saved; otherwise establish them via get_relationship_connections first — and if they aren't saved or named, ask for their name and birth date first; NEVER invent them), convert them to shorthand, and call find_cards_in_spread searching those cards in the USER's seven period positions (Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune — Venus and Mars hits matter most), this year and next — do NOT pass other_person_name (you are searching the USER's own spread for the partner's cards). If exactly one intimate partner is saved, proceed directly and name them — do NOT ask the user to confirm who they mean. A connections reading alone does NOT answer this question — lead with the find_cards results; get_relationship_connections is optional depth only."},{text:"Is my partner being faithful to me?",analysisHint:"You MUST run three find_cards_in_spread searches of the USER's own spreads before answering — they need no partner data: (1) AS in Venus; (2) AH and 2H in Neptune; (3) 3H in Long Range, Venus, and Mars. Issue all three together; these are uncertainty-in-love signals — only interpret these exact pairings, this year and next. Open your answer by stating what each of the three searches found (hit or no hit) before any relationship context. A connections reading alone does NOT answer this question (optionally add get_relationship_connections for partner context afterward). Marriageability is referenced in Robert's sheet but is not yet a computable concept — speak about it from book context only."},{text:"Will my relationship last?",analysisHint:"Do NOT call get_relationship_connections for this question — it is answered ONLY by searching the USER's own spread with find_cards_in_spread (no partner data needed; a connections/compatibility reading is the WRONG tool here). Run two groups, issued together: (1) 5H and 9H in Long Range, Venus, Mars, and Saturn; (2) every nine and five (5H, 5C, 5D, 5S, 9H, 9C, 9D, 9S) in Venus. If none appear, frame as: no strong ending-signal in the searched window — the possibility remains but isn't indicated. If the user is already married and the search comes up empty, lean into stable continuity rather than absence-of-news."}]},{key:"career",label:"Career & Work",icon:"i-lucide-briefcase",questions:[{text:"Will I be more successful in my career this year?",analysisHint:"You MUST call get_find_success_report before answering — it returns the curated career/business-success cards (power ratings, descriptions, timing windows) across the current and next personal year. Lead with the strongest hits, name the timing windows, and weave the descriptions. You may also use find_cards_in_spread for specific 8s/10s lookups."},{text:"Do you see me changing careers?",analysisHint:"Search for 9S and 5S (also 9D and 5D) in Long Range, Mars, Jupiter, Environment, Displacement, and Result. Use find_cards_in_spread for both this year and next. Strong hits in Long Range or Result = career change is a defining theme; period hits = the timing window. Note which period(s) the cards land in."},{text:"Will I get that new job I am applying for?",analysisHint:"Look for AD, AS, 9S, and 9D in Mars, Venus, Long Range, Result, Environment, and Jupiter. Use find_cards_in_spread across this year and next. These 
2cards anywhere are useful, but their meaning is strongest in the listed positions. Draw on the book interpretations for each card-in-position when explaining."},{text:"Should I start a new business?",analysisHint:"You MUST call get_find_success_report before answering — business-ownership and expansion cards (e.g. King of Diamonds, Ten of Spades) surface here with timing windows. Lead with the strongest hits and weave the descriptions. You may also use find_cards_in_spread for Aces in Venus/Mars/Jupiter/Result/Environment/Long Range."}]},{key:"money",label:"Money & Success",icon:"i-lucide-coins",questions:[{text:"What does my financial year ahead look like?",analysisHint:"You MUST call get_find_money_report before answering — it returns the curated money-timing cards (power ratings, descriptions, timing windows) across the current and next personal year. Lead with the strongest hits, name each timing window, and weave the descriptions. If no_matches, frame as: the possibility remains, it's just not indicated in the searched window."},{text:"Will my partner be successful and make more money?",analysisHint:"You MUST call get_find_money_report with other_person_name set to the partner (call get_relationship_connections first if they are not already established). Also check whether the partner's cards appear in the user's Jupiter period in the future (financial good fortune through partnership) via find_cards_in_spread. CRITICAL: if no partner is already saved or named in this conversation, FIRST ask who they mean — NEVER invent or assume a name or birth date; the tool calls happen only once the partner is known."},{text:"When will I sell my house?",analysisHint:"Look for any 5s or 9s (5H, 5C, 5D, 5S, 9H, 9C, 9D, 9S) in Venus and Uranus, and as the Result card. Use find_cards_in_spread across this year and next. If nothing surfaces, frame as: no strong sale signal in the searched window — the possibility remains."},{text:"Will I move to a new home?",analysisHint:"Two distinct card-position groups (one find_cards_in_spread call per group, issued together): (1) all 5s and 9s (5H, 5C, 5D, 5S, 9H, 9C, 9D, 9S) in Venus, Uranus, and Result; (2) 4S, 4H, and 4C in Long Range, Environment, Result, Venus, and Mars — 4C in Venus and 4S in Mars are strong move signals. Search this year and next; only interpret these exact pairings."},{text:"Will my income improve this year?",analysisHint:"You MUST call get_find_money_report before answering — it returns the curated money-timing cards across the current and next personal year. Lead with the strongest hits, name the timing windows, and weave the descriptions. When nothing strong surfaces, frame absence as probability, not verdict."}]},{key:"health",label:"Health & Lifestyle",icon:"i-lucide-heart-pulse",questions:[{text:"Do you see me moving in the next year or two?",analysisHint:'Same playbook as "Will I move to a new home?" — two distinct card-position groups (one find_cards_in_spread call per group, issued together): (1) all 5s and 9s (5H, 5C, 5D, 5S, 9H, 9C, 9D, 9S) in Venus, Uranus, and Result; (2) 4S, 4H, and 4C in Long Range, Environment, Result, Venus, and Mars — 4C in Venus and 4S in Mars are strong move signals. Search this year and next; only interpret these exact pairings.'},{text:"Do you see a lot of travel?",analysisHint:"Look for Fives (5H, 5C, 5D, 5S) in Long Range and the seven period positions (Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune) using find_cards_in_spread, this year and next. A 5 in Long Range usually means a lot of travel or changes throughout the year. Mention the period date ranges for any hits."},{text:"How does my health look in the year ahead?",analysisHint:"Two distinct card-position groups (one find_cards_in_spread call per group, issued together): (1) any 7 or 9 (7H, 7C, 7D, 7S, 9H, 9C, 9D, 9S) in Saturn and Pluto; (2) AS, 3S, 5S, 7S, and 9S in all 13 positions (Long Range, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, Result, Environment, Displacement, Moon) — AS and 5S are health-issue signals. Search this year and next; only interpret these exact pairings."},{text:"When will my health improve?",analysisHint:"Two card-position groups (one find_cards_in_spread call per group, issued together): (1) 4S, 8S, and 10S (recovery-of-health signals — 8S is the strongest of the three) 
2in all 13 positions (Long Range, Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune, Pluto, Result, Environment, Displacement, Moon); (2) KS (King of Spades) in Saturn — a protective influence that guards against a major health issue. Search this year and next. Mention which period(s) carry these cards and their date ranges so the user knows when to expect the improvement window."},{text:"What should I watch out for health-wise this year?",analysisHint:'You MUST run both find_cards_in_spread searches before answering — never scan the spread text manually: (1) cards ["AS","7S","9S"] in the seven period positions (Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune); (2) ranks ["3","5","7","9","J","K"] (the ranks parameter expands each to all four suits) in Saturn and Pluto. Issue both calls together, this year and next; only interpret these exact pairings.'},{text:"How can my cards guide my well-being?"},{text:"What's the best times to travel this year?",analysisHint:'Same playbook as "Do you see a lot of travel?" — look for Fives (5H, 5C, 5D, 5S) in Long Range and the seven period positions (Mercury, Venus, Mars, Jupiter, Saturn, Uranus, Neptune) using find_cards_in_spread, this year and next. A 5 in Long Range = travel-heavy year overall. Mention which periods carry the travel cards and their date ranges.'}]}],zl={class:"suggested-questions-accordion"},Nl={class:"suggestions-list"},Fl=["onClick"],Ul={class:"flex-1 text-left"},Hl={key:0,class:"suggestions-sublist"},Vl=["onClick"],Kl=L({__name:"SuggestedQuestionsAccordion",emits:["select"],setup(e){const t=A(null);function n(s){t.value=t.value===s?null:s}return(s,r)=>{const o=Re;return y(),O("div",zl,[r[0]||(r[0]=_("div",{class:"suggestions-heading"},"Suggested Questions",-1)),_("div",Nl,[(y(!0),O(ye,null,we("SUGGESTED_CATEGORIES"in s?s.SUGGESTED_CATEGORIES:u(Ll),a=>(y(),O(ye,{key:a.key},[_("button",{class:"suggestions-category",onClick:i=>n(a.key)},[P(o,{name:a.icon,class:"text-sm shrink-0"},null,8,["name"]),_("span",Ul,V(a.label),1),P(o,{name:u(t)===a.key?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"text-xs shrink-0"},null,8,["name"])],8,Fl),u(t)===a.key?(y(),O("div",Hl,[(y(!0),O(ye,null,we(a.questions,i=>(y(),O("button",{key:i.text,class:"suggestion-item",onClick:l=>s.$emit("select",i)},V(i.text),9,Vl))),128))])):G("",!0)],64))),128))])])}}}),as=Object.assign(Kl,{__name:"SuggestedQuestionsAccordion"}),_e={Root:rs,Trigger:ss,Portal:rl,Content:Gi,Arrow:ts,Item:Zi,Group:Yi,Separator:ul,CheckboxItem:Hi,ItemIndicator:Ji,Label:tl,RadioGroup:al,RadioItem:il,Sub:dl,SubContent:fl,SubTrigger:gl},Dt={meta:"",ctrl:"",alt:"",win:"⊞",command:"⌘",shift:"⇧",control:"⌃",option:"⌥",enter:"↵",delete:"⌦",backspace:"⌫",escape:"Esc",tab:"⇥",capslock:"⇪",arrowup:"↑",arrowright:"→",arrowdown:"↓",arrowleft:"←",pageup:"⇞",pagedown:"⇟",home:"↖",end:"↘"},Wl=()=>{const e=z(()=>navigator&&navigator.userAgent&&navigator.userAgent.match(/Macintosh;/)),t=ea({meta:" ",alt:" ",ctrl:" "});ut(()=>{t.meta=e.value?Dt.command:"Ctrl",t.ctrl=e.value?Dt.control:"Ctrl",t.alt=e.value?Dt.option:"Alt"});function n(s){if(s)return["meta","alt","ctrl"].includes(s)?t[s]:Dt[s]||s}return{macOS:e,getKbdKey:n}},Gl=Js(Wl),jl={base:"inline-flex items-center justify-center px-1 rounded-sm font-medium font-sans uppercase",variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},variant:{solid:"",outline:"",soft:"",subtle:""},size:{sm:"h-4 min-w-[16px] text-[10px]",md:"h-5 min-w-[20px] text-[11px]",lg:"h-6 min-w-[24px] text-[12px]"}},compoundVariants:[{color:"primary",variant:"solid",class:"text-inverted bg-primary"},{color:"secondary",variant:"solid",class:"text-inverted bg-secondary"},{color:"success",variant:"solid",class:"text-inverted bg-success"},{color:"info",variant:"solid",class:"text-inverted bg-info"},{color:"warning",variant:"solid",class:"text-inverted bg-warning"},{color:"error",variant:"solid",class:"text-inverted bg-error"},{color:"primary",variant:"outline",class:"ring ring-inset ring-primary/50 text-primary"},{color:"secondary",variant:"outline",class:"ring ring-inset ring-secondary/50 text-secondary"},{color:"success",variant:"outline",class:"ring ring-inset ring-success/50 text-success"},{color:"info",variant:"outline",class:"ring ring-inset ring-info/50 text-info"},{color:"warning",variant:"outline",class:"ring ring-inset ring-warning/50 text-warning"},{color:"error",variant:"outline",class:"ring ring-inset ring-error/50 text-error"},{color:"primary",variant:"soft",class:"text-primary bg-primary/10"},{color:"secondary",variant:"soft",class:"text-secondary bg-secondary/10"},{color:"success",variant:"soft",class:"text-success bg-success/10"},{color:"info",variant:"soft",class:"text-info bg-info/10"},{color:"warning",variant:"soft",class:"text-warning bg-warning/10"},{color:"error",variant:"soft",class:"text-error bg-error/10"},{color:"primary",variant:"subtle",class:"text-primary ring ring-inset ring-primary/25 bg-primary/10"},{color:"secondary",variant:"subtle",class:"text-secondary ring ring-inset ring-secondary/25 bg-secondary/10"},{color:"success",variant:"subtle",class:"text-success ring ring-inset ring-success/25 bg-success/10"},{color:"info",variant:"subtle",class:"text-info ring ring-inset ring-info/25 bg-info/10"},{color:"warning",variant:"subtle",class:"text-warning ring ring-inset ring-warning/25 bg-warning/10"},{color:"error",variant:"subtle",class:"text-error ring ring-inset ring-error/25 bg-error/10"},{color:"neutral",variant:"solid",class:"text-inverted bg-inverted"},{color:"neutral",variant:"outline",class:"ring ring-inset ring-accented text-default bg-default"},{color:"neutral",variant:"soft",class:"text-default bg-elevated"},{color:"neutral",variant:"subtle",class:"ring ring-inset ring-accented text-default bg-elevated"}],defaultVariants:{variant:"outline",color:"neutral",size:"md"}},Yl={__name:"UKbd",props:{as:{type:null,required:!1,default:"kbd"},value:{type:null,required:!1},color:{type:null,required:!1},variant:{type:null,required:!1},size:{type:null,required:!1},class:{type:null,required:!1}},setup(e){const t=e,{getKbdKey:n}=Gl(),s=Sn(),r=z(()=>Et({extend:Et(jl),...s.ui?.kbd||{}}));return(o,a)=>(y(),I(u($e),{as:e.as,class:j(r.value({class:t.class,color:t.color,variant:t.variant,size:t.size}))},{default:q(()=>[M(o.$slots,"default",{},()=>[le(V(u(n)(e.value)),1)])]),_:3},8,["as","class"]))}},os={__name:"UDropdownMenuContent",props:{items:{type:null,required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0},sub:{type:Boolean,required:!1},labelKey:{type:null,required:!0},descriptionKey:{type:null,required:!0},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0},class:{type:null,required:!1},ui:{type:null,required:!0},uiOverride:{type:null,required:!1},loop:{type:Boolean,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(e,{emit:t}){const n=e,s=t,r=Or(),{dir:o}=ta(),a=Sn(),i=na(un(()=>n.portal)),l=Ne(ra(n,"sub","items","portal","labelKey","descriptionKey","checkedIcon","loadingIcon","externalIcon","class","ui","uiOverride"),s),d=()=>Dr(r,["default"]),[c,p]=sa(),f=z(()=>o.value==="rtl"?a.ui.icons.chevronLeft:a.ui.icons.chevronRight),h=z(()=>n.items?.length?ca(n.items)?n.items:[n.items]:[]);return(m,k)=>(y(),O(ye,null,[P(u(c),null,{default:q(({item:g,active:x,index:b})=>[M(m.$slots,g.slot||"item",{item:g,index:b,ui:e.ui},()=>[M(m.$slots,g.slot?`${g.slot}-leading`:"item-leading",{item:g,active:x,index:b,ui:e.ui},()=>[g.loading?(y(),I(Re,{key:0,name:e.loadingIcon||u(a).ui.icons.loading,"data-slot":"itemLeadingIcon",class:j(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,g.ui?.itemLeadingIcon],c
2olor:g?.color,loading:!0}))},null,8,["name","class"])):g.icon?(y(),I(Re,{key:1,name:g.icon,"data-slot":"itemLeadingIcon",class:j(e.ui.itemLeadingIcon({class:[e.uiOverride?.itemLeadingIcon,g.ui?.itemLeadingIcon],color:g?.color,active:x}))},null,8,["name","class"])):g.avatar?(y(),I(aa,Y({key:2,size:g.ui?.itemLeadingAvatarSize||e.uiOverride?.itemLeadingAvatarSize||e.ui.itemLeadingAvatarSize()},g.avatar,{"data-slot":"itemLeadingAvatar",class:e.ui.itemLeadingAvatar({class:[e.uiOverride?.itemLeadingAvatar,g.ui?.itemLeadingAvatar],active:x})}),null,16,["size","class"])):G("",!0)]),u(He)(g,n.labelKey)||r[g.slot?`${g.slot}-label`:"item-label"]||u(He)(g,n.descriptionKey)||r[g.slot?`${g.slot}-description`:"item-description"]?(y(),O("span",{key:0,"data-slot":"itemWrapper",class:j(e.ui.itemWrapper({class:[e.uiOverride?.itemWrapper,g.ui?.itemWrapper]}))},[_("span",{"data-slot":"itemLabel",class:j(e.ui.itemLabel({class:[e.uiOverride?.itemLabel,g.ui?.itemLabel],active:x}))},[M(m.$slots,g.slot?`${g.slot}-label`:"item-label",{item:g,active:x,index:b},()=>[le(V(u(He)(g,n.labelKey)),1)]),g.target==="_blank"&&e.externalIcon!==!1?(y(),I(Re,{key:0,name:typeof e.externalIcon=="string"?e.externalIcon:u(a).ui.icons.external,"data-slot":"itemLabelExternalIcon",class:j(e.ui.itemLabelExternalIcon({class:[e.uiOverride?.itemLabelExternalIcon,g.ui?.itemLabelExternalIcon],color:g?.color,active:x}))},null,8,["name","class"])):G("",!0)],2),u(He)(g,n.descriptionKey)||r[g.slot?`${g.slot}-description`:"item-description"]?(y(),O("span",{key:0,"data-slot":"itemDescription",class:j(e.ui.itemDescription({class:[e.uiOverride?.itemDescription,g.ui?.itemDescription]}))},[M(m.$slots,g.slot?`${g.slot}-description`:"item-description",{item:g,active:x,index:b},()=>[le(V(u(He)(g,n.descriptionKey)),1)])],2)):G("",!0)],2)):G("",!0),_("span",{"data-slot":"itemTrailing",class:j(e.ui.itemTrailing({class:[e.uiOverride?.itemTrailing,g.ui?.itemTrailing]}))},[M(m.$slots,g.slot?`${g.slot}-trailing`:"item-trailing",{item:g,active:x,index:b,ui:e.ui},()=>[g.children?.length?(y(),I(Re,{key:0,name:f.value,"data-slot":"itemTrailingIcon",class:j(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,g.ui?.itemTrailingIcon],color:g?.color,active:x}))},null,8,["name","class"])):g.kbds?.length?(y(),O("span",{key:1,"data-slot":"itemTrailingKbds",class:j(e.ui.itemTrailingKbds({class:[e.uiOverride?.itemTrailingKbds,g.ui?.itemTrailingKbds]}))},[(y(!0),O(ye,null,we(g.kbds,(C,T)=>(y(),I(Yl,Y({key:T,size:g.ui?.itemTrailingKbdsSize||e.uiOverride?.itemTrailingKbdsSize||e.ui.itemTrailingKbdsSize()},{ref_for:!0},typeof C=="string"?{value:C}:C),null,16,["size"]))),128))],2)):G("",!0)]),P(u(_e).ItemIndicator,{"as-child":""},{default:q(()=>[P(Re,{name:e.checkedIcon||u(a).ui.icons.check,"data-slot":"itemTrailingIcon",class:j(e.ui.itemTrailingIcon({class:[e.uiOverride?.itemTrailingIcon,g.ui?.itemTrailingIcon],color:g?.color}))},null,8,["name","class"])]),_:2},1024)],2)])]),_:3}),P(u(_e).Portal,te(ie(u(i))),{default:q(()=>[(y(),I(oa(e.sub?u(_e).SubContent:u(_e).Content),Y({"data-slot":"content",class:e.ui.c
2ontent({class:[e.uiOverride?.content,n.class]})},u(l)),{default:q(()=>[M(m.$slots,"content-top",{sub:e.sub??!1}),_("div",{role:"presentation","data-slot":"viewport",class:j(e.ui.viewport({class:e.uiOverride?.viewport}))},[(y(!0),O(ye,null,we(h.value,(g,x)=>(y(),I(u(_e).Group,{key:`group-${x}`,"data-slot":"group",class:j(e.ui.group({class:e.uiOverride?.group}))},{default:q(()=>[(y(!0),O(ye,null,we(g,(b,C)=>(y(),O(ye,{key:`group-${x}-${C}`},[b.type==="label"?(y(),I(u(_e).Label,{key:0,"data-slot":"label",class:j(e.ui.label({class:[e.uiOverride?.label,b.ui?.label,b.class]}))},{default:q(()=>[P(u(p),{item:b,index:C},null,8,["item","index"])]),_:2},1032,["class"])):b.type==="separator"?(y(),I(u(_e).Separator,{key:1,"data-slot":"separator",class:j(e.ui.separator({class:[e.uiOverride?.separator,b.ui?.separator,b.class]}))},null,8,["class"])):b?.children?.length?(y(),I(u(_e).Sub,{key:2,open:b.open,"default-open":b.defaultOpen},{default:q(()=>[P(u(_e).SubTrigger,{as:"button",type:"button",disabled:b.disabled,"text-value":u(He)(b,n.labelKey),"data-slot":"item",class:j(e.ui.item({class:[e.uiOverride?.item,b.ui?.item,b.class],color:b?.color}))},{default:q(()=>[P(u(p),{item:b,index:C},null,8,["item","index"])]),_:2}
2,1032,["disabled","text-value","class"]),P(os,Y({sub:"",class:b.ui?.content,ui:e.ui,"ui-override":e.uiOverride,portal:e.portal,items:b.children,align:"start","align-offset":-4,"side-offset":3,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon},{ref_for:!0},b.content),Pr({_:2},[we(d(),(T,B)=>({name:B,fn:q($=>[M(m.$slots,B,Y({ref_for:!0},$))])}))]),1040,["class","ui","ui-override","portal","items","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:2},1032,["open","default-open"])):b.type==="checkbox"?(y(),I(u(_e).CheckboxItem,{key:3,"model-value":b.checked,disabled:b.disabled,"text-value":u(He)(b,n.labelKey),"data-slot":"item",class:j(e.ui.item({class:[e.uiOverride?.item,b.ui?.item,b.class],color:b?.color})),"onUpdate:modelValue":b.onUpdateChecked,onSelect:b.onSelect},{default:q(()=>[P(u(p),{item:b,index:C},null,8,["item","index"])]),_:2},1032,["model-value","disabled","text-value","class","onUpdate:modelValue","onSelect"])):(y(),I(ia,Y({key:4,ref_for:!0},u(la)(b),{custom:""}),{default:q(({active:T,...B})=>[P(u(_e).Item,{"as-child":"",disabled:b.disabled,"text-value":u(He)(b,n.labelKey),onSelect:b.onSelect},{default:q(()=>[P(ua,Y({ref_for:!0},B,{"data-slot":"item",class:e.ui.item({class:[e.uiOverride?.item,b.ui?.item,b.class],color:b?.color,active:T})}),{default:q(()=>[P(u(p),{item:b,active:T,index:C},null,8,["item","active","index"])]),_:2},1040,["class"])]),_:2},1032,["disabled","text-value","onSelect"])]),_:2},1040))],64))),128))]),_:2},1032,["class"]))),128))],2),M(m.$slots,"default"),M(m.$slots,"content-bottom",{sub:e.sub??!1})]),_:3},16,["class"]))]),_:3},16)],64))}},Ql={slots:{content:"min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-dropdown-menu-content-transform-origin) flex flex-col",viewport:"relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1",arrow:"fill-default",group:"p-1 isolate",label:"w-full flex items-center font-semibold text-highlighted",separator:"-mx-1 my-1 h-px bg-border",item:"group relative w-full flex items-start select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75",itemLeadingIcon:"shrink-0",itemLeadingAvatar:"shrink-0",itemLeadingAvatarSize:"",itemTrailing:"ms-auto inline-flex gap-1.5 items-center",itemTrailingIcon:"shrink-0",itemTrailingKbds:"hidden lg:inline-flex items-center shrink-0",itemTrailingKbdsSize:"",itemWrapper:"flex-1 flex flex-col text-start min-w-0",itemLabel:"truncate",itemDescription:"truncate text-muted",itemLabelExternalIcon:"inline-block size-3 align-top text-dimmed"},variants:{color:{primary:"",secondary:"",success:"",info:"",warning:"",error:"",neutral:""},active:{true:{item:"text-highlighted before:bg-elevated",itemLeadingIcon:"text-default"},false:{item:["text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50","transition-colors before:transition-colors"],itemLeadingIcon:["text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default","transition-colors"]}},loading:{true:{itemLeadingIcon:"animate-spin"}},size:{xs:{label:"p-1 text-xs gap-1",item:"p-1 text-xs gap-1",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},sm:{label:"p-1.5 text-xs gap-1.5",item:"p-1.5 text-xs gap-1.5",itemLeadingIcon:"size-4",itemLeadingAvatarSize:"3xs",itemTrailingIcon:"size-4",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"sm"},md:{label:"p-1.5 text-sm gap-1.5",item:"p-1.5 text-sm gap-1.5",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-0.5",itemTrailingKbdsSize:"md"},lg:{label:"p-2 text-sm gap-2",item:"p-2 text-sm gap-2",itemLeadingIcon:"size-5",itemLeadingAvatarSize:"2xs",itemTrailingIcon:"size-5",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"md"},xl:{label:"p-2 text-base gap-2",item:"p-2 text-base gap-2",itemLeadingIcon:"size-6",itemLeadingAvatarSize:"xs",itemTrailingIcon:"size-6",itemTrailingKbds:"gap-1",itemTrailingKbdsSize:"lg"}}},compoundVariants:[{color:"primary",active:!1,class:{item:"text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10",itemLeadingIcon:"text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary"}}
2,{color:"secondary",active:!1,class:{item:"text-secondary data-highlighted:text-secondary data-highlighted:before:bg-secondary/10 data-[state=open]:before:bg-secondary/10",itemLeadingIcon:"text-secondary/75 group-data-highlighted:text-secondary group-data-[state=open]:text-secondary"}},{color:"success",active:!1,class:{item:"text-success data-highlighted:text-success data-highlighted:before:bg-success/10 data-[state=open]:before:bg-success/10",itemLeadingIcon:"text-success/75 group-data-highlighted:text-success group-data-[state=open]:text-success"}},{color:"info",active:!1,class:{item:"text-info data-highlighted:text-info data-highlighted:before:bg-info/10 data-[state=open]:before:bg-info/10",itemLeadingIcon:"text-info/75 group-data-highlighted:text-info group-data-[state=open]:text-info"}},{color:"warning",active:!1,class:{item:"text-warning data-highlighted:text-warning data-highlighted:before:bg-warning/10 data-[state=open]:before:bg-warning/10",itemLeadingIcon:"text-warning/75 group-data-highlighted:text-warning group-data-[state=open]:text-warning"}},{color:"error",active:!1,class:{item:"text-error data-highlighted:text-error data-highlighted:before:bg-error/10 data-[state=open]:before:bg-error/10",itemLeadingIcon:"text-error/75 group-data-highlighted:text-error group-data-[state=open]:text-error"}},{color:"primary",active:!0,class:{item:"text-primary before:bg-primary/10",itemLeadingIcon:"text-primary"}},{color:"secondary",active:!0,class:{item:"text-secondary before:bg-secondary/10",itemLeadingIcon:"text-secondary"}},{color:"success",active:!0,class:{item:"text-success before:bg-success/10",itemLeadingIcon:"text-success"}},{color:"info",active:!0,class:{item:"text-info before:bg-info/10",itemLeadingIcon:"text-info"}},{color:"warning",active:!0,class:{item:"text-warning before:bg-warning/10",itemLeadingIcon:"text-warning"}},{color:"error",active:!0,class:{item:"text-error before:bg-error/10",itemLeadingIcon:"text-error"}}],defaultVariants:{size:"md"}},is={__name:"UDropdownMenu",props:{size:{type:null,required:!1},items:{type:null,required:!1},checkedIcon:{type:null,required:!1},loadingIcon:{type:null,required:!1},externalIcon:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},content:{type:Object,required:!1},arrow:{type:[Boolean,Object],required:!1},portal:{type:[Boolean,String],required:!1,skipCheck:!0,default:!0},labelKey:{type:null,required:!1,default:"label"},descriptionKey:{type:null,required:!1,default:"description"},disabled:{type:Boolean,required:!1},class:{type:null,required:!1},ui:{type:null,required:!1},defaultOpen:{type:Boolean,required:!1},open:{type:Boolean,required:!1},modal:{type:Boolean,required:!1,default:!0}},emits:["update:open"],setup(e,{emit:t}){const n=e,s=t,r=Or(),o=Sn(),a=Ne(da(n,"defaultOpen","open","modal"),s),i=un(()=>pa(n.content,{side:"bottom",sideOffset:8,collisionPadding:8})),l=un(()=>n.arrow),d=()=>Dr(r,["default"]),c=z(()=>Et({extend:Et(Ql),...o.ui?.dropdownMenu||{}})({size:n.size}));return(p,f)=>(y(),I(u(rs),te(ie(u(a))),{default:q(({open:h})=>[r.default?(y(),I(u(ss),{key:0,"as-child":"",class:j(n.class),disabled:e.disabled},{default:q(()=>[M(p.$slots,"default",{open:h})]),_:2},1032,["class","disabled"])):G("",!0),P(os,Y({class:c.value.content({class:[!r.default&&n.class,n.ui?.content]}),ui:c.value,"ui-override":n.ui},i.value,{items:e.items,portal:e.portal,"label-key":e.labelKey,"description-key":e.descriptionKey,"checked-icon":e.checkedIcon,"loading-icon":e.loadingIcon,"external-icon":e.externalIcon}),Pr({default:q(()=>[e.arrow?(y(),I(u(ts),Y({key:0},l.value,{"data-slot":"arrow",class:c.value.arrow({class:n.ui?.arrow})}),null,16,["class"])):G("",!0)]),_:2},[we(d(),(m,k)=>({name:k,fn:q(g=>[M(p.$slots,k,te(ie(g)))])}))]),1040,["class","ui","ui-override","items","portal","label-key","description-key","checked-icon","loading-icon","external-icon"])]),_:3},16))}},Zl={class:"conversation-sidebar"},Xl={class:"p-3"},Jl={class:"px-3 pb-2"},eu={class:"flex-1 overflow-y-auto px-2 pb-2"},tu=["onClick"],nu=["title"],ru={key:0,class:"text-center text-muted text-sm py-4"},su=L({__name:"ConversationSidebar",props:{conversations:{},activeId:{}},emits:["new-chat","select","delete","export","ask","feedback"],setup(e,{emit:t}){const n=t;function s(r){return[{label:"Export PDF",icon:"i-lucide-download",onSelect:()=>n("export",r)},{type:"separator"},{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>n("delete",r)}]}return(r,o)=>{const a=Ct,i=as,l=Re,d=is;return y(),O("div",Zl,[_("div",Xl,[P(a,{icon:"i-lucide-plus",label:"New Chat",color:"primary",block:"",onClick:o[0]||(o[0]=c=>r.$emit("new-chat"))})]),_("div",Jl,[P(i,{onSelect:o[1]||(o[1]=c=>r.$emit("ask",c))})]),_("div",eu,[(y(!0),O(ye,null,we(e.conversations,c=>(y(),O("div",{key:c.id,class:j(["conversation-item group",c.id===e.activeId?"conversation-item-active":""]),onClick:p=>r.$emit("select",c.id)},[P(l,{name:"i-lucide-message-square",class:j(["shrink-0",c.id===e.activeId?"text-destiny-500":"text-gray-400"])},null,8,["class"]),_("span",{class:"flex-1 truncate text-sm",title:c.title||"Untitled"},V(c.title||"Untitled"),9,nu),P(d,{items:s(c.id),content:{align:"start",side:"bottom"}},{default:q(()=>[P(a,{icon:"i-lucide-ellipsis-vertical",variant:"ghost",size:"xs",color:"neutral",class:"opacity-0 group-hover:opacity-100 shrink-0",onClick:o[2]||(o[2]=Ze(()=>{},["stop"]))})]),_:1},8,["items"])],10,tu))),128)),e.conversations.length===0?(y(),O("div",ru," No conversations yet ")):G("",!0)]),_("button",{type:"button",class:"feedback-launch",onClick:o[3]||(o[3]=c=>r.$emit("feedback"))},[P(l,{name:"i-lucide-message-square-plus"}),o[4]||(o[4]=_("span",null,"Send feedback",-1))])])}}}),au=Object.assign(su,{__name:"ConversationSidebar"}),ou={class:"conversation-starters"},iu=["onClick"],lu={class:"starter-icon-wrap"},uu={class:"font-medium text-sm"},cu={class:"text-xs text-muted"},du=L({__name:"ConversationStarters",props:{comparisonProfiles:{}},emits:["select"],setup(e){const t=e,n=[{icon:"i-lucide-sparkles",label:"Tell me about my cards",de
2scription:"Learn about your birth card and planetary ruling card",message:"Tell me about my cards"},{icon:"i-lucide-calendar",label:"My future outlook",description:"Discover what your yearly spread reveals",message:"What does my year ahead look like?"}],s=z(()=>{const r=[...n],o=t.comparisonProfiles||[];if(o.length>0){const a=o[0];r.push({icon:"i-lucide-heart",label:`My connection with ${a.name}`,description:`Explore your relationship with ${a.name}`,message:`Tell me about my relationship with ${a.name}`})}else r.push({icon:"i-lucide-heart",label:"Relationship connection",description:"Explore your connection with someone special",message:"Tell me about my relationship connections"});return r});return(r,o)=>{const a=Re;return y(),O("div",ou,[(y(!0),O(ye,null,we(u(s),i=>(y(),O("div",{key:i.message,class:"starter-card",onClick:l=>r.$emit("select",i.message)},[_("div",lu,[P(a,{name:i.icon},null,8,["name"])]),_("div",uu,V(i.label),1),_("div",cu,V(i.description),1)],8,iu))),128))])}}}),pu=Object.assign(du,{__name:"ConversationStarters"}),fu={class:"suggested-actions"},hu=L({__name:"SuggestedActions",props:{actions:{}},emits:["select"],setup(e){return(t,n)=>{const s=Ct;return y(),O("div",fu,[(y(!0),O(ye,null,we(e.actions,(r,o)=>(y(),I(s,{key:o,label:r,variant:"outline",color:"primary",size:"sm",onClick:a=>t.$emit("select",r)},null,8,["label","onClick"]))),128))])}}}),gu=Object.assign(hu,{__name:"SuggestedActions"}),mu={key:0,class:"feedback-sent"},yu={key:1,class:"flex flex-col gap-4"},vu=["disabled"],bu={class:"feedback-check"},wu=["disabled"],xu={key:0,class:"feedback-check-note"},ku={key:0,class:"text-sm",style:{color:"#f0808a"}},_u={class:"flex items-center gap-3"},Su={class:"text-xs ml-auto",style:{color:"var(--cn-faint)"}},mr=4e3,Cu=L({__name:"FeedbackModal",props:{open:{type:Boolean},conversationId:{},hasExchange:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const n=e,s=t,r=z({get:()=>n.open,set:f=>s("update:open",f)}),o=A(""),a=A(!0),i=A(!1),l=A(!1),d=A(""),c=A();Ve(()=>n.open,f=>{f&&(o.value="",d.value="",l.value=!1,i.value=!1,a.value=!0,Ee(()=>c.value?.focus()))});async function p(){if(!(!o.value.trim()||i.value)){i.value=!0,d.value="";try{await $fetch("/api/feedback",{method:"POST",body:{message:o.value,includeContext:a.value&&n.hasExchange,conversationId:n.conversationId}}),l.value=!0,setTimeout(()=>{r.value=!1},1400)}catch(f){d.value=f?.data?.message||"Could not send your feedback. Please try again."}finally{i.value=!1}}}return(f,h)=>{const m=Re,k=Ct,g=Ir;return y(),I(g,{open:u(r),"onUpdate:open":h[2]||(h[2]=x=>me(r)?r.value=x:null)},{header:q(()=>[...h[3]||(h[3]=[_("div",{class:"w-full"},[_("h2",{class:"cn-modal-title"},"Send feedback"),_("p",{class:"text-sm mt-1",style:{color:"var(--cn-muted)"}}," Tell us what you noticed — a wrong card, an odd answer, or anything confusing. ")],-1)])]),body:q(()=>[u(l)?(y(),O("div",mu,[P(m,{name:"i-lucide-check-circle",class:"feedback-sent-icon"}),h[4]||(h[4]=_("p",null,"Thank you — your feedback was sent.",-1))])):(y(),O("div",yu,[it(_("textarea",{ref_key:"messageEl",ref:c,"onUpdate:modelValue":h[0]||(h[0]=x=>me(o)?o.value=x:null),class:"cn-input feedback-textarea",rows:"5",maxlength:mr,placeholder:"What did you see?",disabled:u(i)},null,8,vu),[[xt,u(o)]]),_("label",bu,[it(_("input",{"onUpdate:modelValue":h[1]||(h[1]=x=>me(a)?a.value=x:null),type:"checkbox",disabled:u(i)||!e.hasExchange},null,8,wu),[[fa,u(a)]]),_("span",null,[h[5]||(h[5]=le(" Include my last question and answer ",-1)),e.hasExchange?G("",!0):(y(),O("span",xu,"— nothing to include yet"))])]),u(d)?(y(),O("p",ku,V(u(d)),1)):G("",!0),_("div",_u,[P(k,{label:"Send feedback",color:"primary",loading:u(i),disabled:!u(o).trim(),onClick:p},null,8,["loading","disabled"]),_("span",Su,V(mr-u(o).length),1)])]))]),_:1},8,["open"])}}}),qu=Object.assign(Cu,{__name:"FeedbackModal"}),ls=["Joker","Ace of Hearts","2 of Hearts","3 of Hearts","4 of Hearts","5 of Hearts","6 of Hearts","7 of Hearts","8 of Hearts","9 of Hearts","10 of Hearts","Jack of Hearts","Queen of Hearts","King of Hearts","Ace of Clubs","2 of Clubs","3 of Clubs","4 of Clubs","5 of Clubs","6 of Clubs","7 of Clubs","8 of Clubs","9 of Clubs","10 of Clubs","Jack of Clubs","Queen of Clubs","King of Clubs","Ace of Diamonds","2 of Diamonds","3 of Diamonds","4 of Diamonds","5 of Diamonds","6 of Diamonds","7 of Diamonds","8 of Diamonds","9 of Diamonds","10 of Diamonds","Jack of Diamonds","Queen of Diamonds","King of Diamonds","Ace of Spades","2 of Spades","3 of Spades","4 of Spades","5 of Spades","6 of Spades","7 of Spades","8 of Spades","9 of Spades","10 of Spades","Jack of Spades","Queen of Spades","King of Spades"];function on(e){return ls[e]||`Card ${e}`}function Bn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var rt=Bn();function us(e){rt=e}var Qe={exec:()=>null};function H(e,t=""){let n=typeof e=="string"?e:e.source,s={replace:(r,o)=>
vendor: 4,368 bytes, line 2
2{let a=typeof o=="string"?o:o.source;return a=a.replace(fe.caret,"$1"),n=n.replace(r,a),s},getRegex:()=>new RegExp(n,t)};return s}var Au=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),fe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},$u=/^(?:[ \t]*(?:\n|$))+/,Tu=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ru=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$t=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Iu=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,En=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,cs=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ds=H(cs).replace(/bull/g,En).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ou=H(cs).replace(/bull/g,En).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ln=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Pu=/^[^\n]+/,zn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Du=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",zn).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Mu=H(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,En).getRegex(),Yt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Nn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Bu=H("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>
vendor: 16,384 bytes, lines 2-27
2)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",Nn).replace("tag",Yt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ps=H(Ln).replace("hr",$t).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yt).getRegex(),Eu=H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ps).getRegex(),Fn={blockquote:Eu,code:Tu,def:Du,fences:Ru,heading:Iu,hr:$t,html:Bu,lheading:ds,list:Mu,newline:$u,paragraph:ps,table:Qe,text:Pu},yr=H("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$t).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yt).getRegex(),Lu={...Fn,lheading:Ou,table:yr,paragraph:H(Ln).replace("hr",$t).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",yr).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Yt).getRegex()},zu={...Fn,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Nn).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Qe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(Ln).replace("hr",$t).replace("heading",` *#{1,6} *[^
3]`).replace("lheading",ds).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Nu=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Fu=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,fs=/^( {2,}|\\)\n(?!\s*$)/,Uu=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qt=/[\p{P}\p{S}]/u,Un=/[\s\p{P}\p{S}]/u,hs=/[^\s\p{P}\p{S}]/u,Hu=H(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Un).getRegex(),gs=/(?!~)[\p{P}\p{S}]/u,Vu=/(?!~)[\s\p{P}\p{S}]/u,Ku=/(?:[^\s\p{P}\p{S}]|~)/u,ms=/(?![*_])[\p{P}\p{S}]/u,Wu=/(?![*_])[\s\p{P}\p{S}]/u,Gu=/(?:[^\s\p{P}\p{S}]|[*_])/u,ju=H(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Au?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ys=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Yu=H(ys,"u").replace(/punct/g,Qt).getRegex(),Qu=H(ys,"u").replace(/punct/g,gs).getRegex(),vs="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Zu=H(vs,"gu").replace(/notPunctSpace/g,hs).replace(/punctSpace/g,Un).replace(/punct/g,Qt).getRegex(),Xu=H(vs,"gu").replace(/notPunctSpace/g,Ku).replace(/punctSpace/g,Vu).replace(/punct/g,gs).getRegex(),Ju=H("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,hs).replace(/punctSpace/g,Un).replace(/punct/g,Qt).getRegex(),ec=H(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ms).getRegex(),tc="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",nc=H(tc,"gu").replace(/notPunctSpace/g,Gu).replace(/punctSpace/g,Wu).replace(/punct/g,ms).getRegex(),rc=H(/\\(punct)/,"gu").replace(/punct/g,Qt).getRegex(),sc=H(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ac=H(Nn).replace("(?:-->|$)","-->").getRegex(),oc=H("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",ac).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ft=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ic=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ft).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bs=H(/^!?\[(label)\]\[(ref)\]/).replace("label",Ft).replace("ref",zn).getRegex(),ws=H(/^!?\[(ref)\](?:\[\])?/).replace("ref",zn).getRegex(),lc=H("reflink|nolink(?!\\()","g").replace("reflink",bs).replace("nolink",ws).getRegex(),vr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Hn={_backpedal:Qe,anyPunctuation:rc,autolink:sc,blockSkip:ju,br:fs,code:Fu,del:Qe,delLDelim:Qe,delRDelim:Qe,emStrongLDelim:Yu,emStrongRDelimAst:Zu,emStrongRDelimUnd:Ju,escape:Nu,link:ic,nolink:ws,punctuation:Hu,reflink:bs,reflinkSearch:lc,tag:oc,text:Uu,url:Qe},uc={...Hn,link:H(/^!?\[(label)\]\((.*?)\)/).replace("label",Ft).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ft).getRegex()},gn={...Hn,emStrongRDelimAst:Xu,emStrongLDelim:Qu,delLDelim:ec,delRDelim:nc,url:H(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",vr).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:H(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",vr).getRegex()},cc={...gn,br:H(fs).replace("{2,}","*").getRegex(),text:H(gn.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Mt={normal:Fn,gfm:Lu,pedantic:zu},vt={normal:Hn,gfm:gn,breaks:cc,pedantic:uc},dc={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},br=e=>dc[e];function Te(e,t){if(t){if(fe.escapeTest.test(e))return e.replace(fe.escapeReplace,br)}else if(fe.escapeTestNoEncode.test(e))return e.replace(fe.escapeReplaceNoEncode,br);return e}function wr(e){try{e=encodeURI(e).replace(fe.percentDecode,"%")}catch{return null}return e}function xr(e,t){let n=e.replace(fe.findPipe,(o,a,i)=>{let l=!1,d=a;for(;--d>=0&&i[d]==="\\";)l=!l;return l?"|":" |"}),s=n.split(fe.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(fe.slashPipe,"|");return s}function bt(e,t,n){let s=e.length;if(s===0)return"";let r=0;for(;r<s&&e.charAt(s-r-1)===t;)r++;return e.slice(0,s-r)}function pc(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let s=0;s<e.length;s++)if(e[s]==="\\")s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return n>0?-2:-1}function fc(e,t=0){let n=t,s="";for(let r of e)if(r==="	"){let o=4-n%4;s+=" ".repeat(o),n+=o}else s+=r,n++;return s}function kr(e,t,n,s,r){let o=t.href,a=t.title||null,i=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:a,text:i,tokens:s.inlineTokens(i)};return s.state.inLink=!1,l}function hc(e,t,n){let s=e.match(n.other.indentCodeCompensation);if(s===null)return t;let r=s[1];return t.split(`
4`).map(o=>{let a=o.match(n.other.beginningSpace);if(a===null)return o;let[i]=a;return i.length>=r.length?o.slice(r.length):o}).join(`
5`)}var Ut=class{options;rules;lexer;constructor(e){this.options=e||rt}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:bt(n,`
6`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],s=hc(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let s=bt(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:bt(t[0],`
7`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=bt(t[0],`
8`).split(`
9`),s="",r="",o=[];for(;n.length>0;){let a=!1,i=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))i.push(n[l]),a=!0;else if(!a)i.push(n[l]);else break;n=n.slice(l);let d=i.join(`
10`),c=d.replace(this.rules.other.blockquoteSetextReplace,`
11    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
12${d}`:d,r=r?`${r}
13${c}`:c;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,o,!0),this.lexer.state.top=p,n.length===0)break;let f=o.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let h=f,m=h.raw+`
14`+n.join(`
15`),k=this.blockquote(m);o[o.length-1]=k,s=s.substring(0,s.length-h.raw.length)+k.raw,r=r.substring(0,r.length-h.text.length)+k.text;break}else if(f?.type==="list"){let h=f,m=h.raw+`
16`+n.join(`
17`),k=this.list(m);o[o.length-1]=k,s=s.substring(0,s.length-f.raw.length)+k.raw,r=r.substring(0,r.length-h.raw.length)+k.raw,n=m.substring(o.at(-1).raw.length).split(`
18`);continue}}return{type:"blockquote",raw:s,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let o=this.rules.other.listItemRegex(n),a=!1;for(;e;){let l=!1,d="",c="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;d=t[0],e=e.substring(d.length);let p=fc(t[2].split(`
19`,1)[0],t[1].length),f=e.split(`
20`,1)[0],h=!p.trim(),m=0;if(this.options.pedantic?(m=2,c=p.trimStart()):h?m=t[1].length+1:(m=p.search(this.rules.other.nonSpaceChar),m=m>4?1:m,c=p.slice(m),m+=t[1].length),h&&this.rules.other.blankLine.test(f)&&(d+=f+`
21`,e=e.substring(f.length+1),l=!0),!l){let k=this.rules.other.nextBulletRegex(m),g=this.rules.other.hrRegex(m),x=this.rules.other.fencesBeginRegex(m),b=this.rules.other.headingBeginRegex(m),C=this.rules.other.htmlBeginRegex(m),T=this.rules.other.blockquoteBeginRegex(m);for(;e;){let B=e.split(`
22`,1)[0],$;if(f=B,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting,"  "),$=f):$=f.replace(this.rules.other.tabCharGlobal,"    "),x.test(f)||b.test(f)||C.test(f)||T.test(f)||k.test(f)||g.test(f))break;if($.search(this.rules.other.nonSpaceChar)>=m||!f.trim())c+=`
23`+$.slice(m);else{if(h||p.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||x.test(p)||b.test(p)||g.test(p))break;c+=`
24`+f}h=!f.trim(),d+=B+`
25`,e=e.substring(B.length+1),p=$.slice(m)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(a=!0)),r.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),r.raw+=d}let i=r.items.at(-1);if(i)i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let l of r.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(l.raw);if(d){let c={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};l.checked=c.checked,r.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=c.raw+l.tokens[0].raw,l.tokens[0].text=c.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(c)):l.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):l.tokens.unshift(c)}}if(!r.loose){let d=l.tokens.filter(p=>p.type==="space"),c=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw));r.loose=c}}if(r.loose)for(let l of r.items){l.loose=!0;for(let d of l.tokens)d.type==="text"&&(d.type="paragraph")}return r}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=xr(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
26`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a<n.length;a++)o.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:o.align[a]});for(let a of r)o.rows.push(xr(a,o.header.length).map((i,l)=>({text:i,tokens:this.lexer.inline(i),header:!1,align:o.align[l]})));return o}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
27`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(
vendor: 4,244 bytes, line 27
27this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=bt(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=pc(t[2],"()");if(o===-2)return;if(o>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),kr(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return kr(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,o,a,i=r,l=0,d=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+r);(s=d.exec(t))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o)continue;if(a=[...o].length,s[3]||s[4]){i+=a;continue}else if((s[5]||s[6])&&r%3&&!((r+a)%3)){l+=a;continue}if(i-=a,i>0)continue;a=Math.min(a,a+i+l);let c=[...s[0]][0].length,p=e.slice(0,r+s.index+c+a);if(Math.min(r,a)%2){let h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,o,a,i=r,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+r);(s=l.exec(t))!=null;){if(o=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!o||(a=[...o].length,a!==r))continue;if(s[3]||s[4]){i+=a;continue}if(i-=a,i>0)continue;a=Math.min(a,a+i);let d=[...s[0]][0].length,c=e.slice(0,r+s.index+d+a),p=c.slice(r,-r);return{type:"del",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,s;if(t[2]==="@")n=t[0],s="mailto:"+n;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(r!==t[0]);n=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Se=class mn{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||rt,this.options.tokenizer=this.options.tokenizer||new Ut,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:fe,block:Mt.normal,inline:vt.normal};this.options.pedantic?(n.block=Mt.pedantic,n.inline=vt.pedantic):this.options.gfm&&(n.block=Mt.gfm,this.options.breaks?n.inline=vt.breaks:n.inl
vendor: 13,022 bytes, lines 27-59
27ine=vt.gfm),this.tokenizer.rules=n}static get rules(){return{block:Mt,inline:vt}}static lex(t,n){return new mn(n).lex(t)}static lexInline(t,n){return new mn(n).inlineTokens(t)}lex(t){t=t.replace(fe.carriageReturn,`
28`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],s=!1){for(this.options.pedantic&&(t=t.replace(fe.tabCharGlobal,"    ").replace(fe.spaceLine,""));t;){let r;if(this.options.extensions?.block?.some(a=>(r=a.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))continue;if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length);let a=n.at(-1);r.raw.length===1&&a!==void 0?a.raw+=`
29`:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
30`)?"":`
31`)+r.raw,a.text+=`
32`+r.text,this.inlineQueue.at(-1).src=a.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
33`)?"":`
34`)+r.raw,a.text+=`
35`+r.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},n.push(r));continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}let o=t;if(this.options.extensions?.startBlock){let a=1/0,i=t.slice(1),l;this.options.extensions.startBlock.forEach(d=>{l=d.call({lexer:this},i),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(o=t.substring(0,a+1))}if(this.state.top&&(r=this.tokenizer.paragraph(o))){let a=n.at(-1);s&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
36`)?"":`
37`)+r.raw,a.text+=`
38`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(r),s=o.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
39`)?"":`
40`)+r.raw,a.text+=`
41`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(r);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let s=t,r=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)l.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)o=r[2]?r[2].length:0,s=s.slice(0,r.index+o)+"["+"a".repeat(r[0].length-o-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let a=!1,i="";for(;t;){a||(i=""),a=!1;let l;if(this.options.extensions?.inline?.some(c=>(l=c.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let c=n.at(-1);l.type==="text"&&c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):n.push(l);continue}if(l=this.tokenizer.emStrong(t,s,i)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.del(t,s,i)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),n.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),n.push(l);continue}let d=t;if(this.options.extensions?.startInline){let c=1/0,p=t.slice(1),f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},p),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(d=t.substring(0,c+1))}if(l=this.tokenizer.inlineText(d)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(i=l.raw.slice(-1)),a=!0;let c=n.at(-1);c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):n.push(l);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}},Ht=class{options;parser;constructor(e){this.options=e||rt}space(e){return""}code({text:e,lang:t,escaped:n}){let s=(t||"").match(fe.notSpaceStart)?.[0],r=e.replace(fe.endingNewline,"")+`
42`;return s?'<pre><code class="language-'+Te(s)+'">'+(n?r:Te(r,!0))+`</code></pre>
43`:"<pre><code>"+(n?r:Te(r,!0))+`</code></pre>
44`}blockquote({tokens:e}){return`<blockquote>
45${this.parser.parse(e)}</blockquote>
46`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
47`}hr(e){return`<hr>
48`}list(e){let t=e.ordered,n=e.start,s="";for(let a=0;a<e.items.length;a++){let i=e.items[a];s+=this.listitem(i)}let r=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+r+o+`>
49`+s+"</"+r+`>
50`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
51`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
52`}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s="";for(let r=0;r<e.rows.length;r++){let o=e.rows[r];n="";for(let a=0;a<o.length;a++)n+=this.tablecell(o[a]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
53<thead>
54`+t+`</thead>
55`+s+`</table>
56`}tablerow({text:e}){return`<tr>
57${e}</tr>
58`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
59`}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>${Te(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 s=this.parser.parseInline(n),r=wr(e);if(r===null)return s;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+Te(t)+'"'),o+=">"+s+"</a>",o}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=wr(e);if(r===null)return Te(n);e=r;let o=`<img src="${e}" alt="${Te(n)}"`;return t&&(o+=` title="${Te(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Te(e.text)}},Vn=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}},Ce=class yn{options;renderer;textRenderer;constructor(t){this.options=t||rt,this.options.renderer=this.options.renderer||new Ht,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Vn}static parse(t,n){return new yn(n).parse(t)}static parseInline(t,n){return new yn(n).parseInline(t)}parse(t){let n="";for(let s=0;s<t.length;s++){let r=t[s];if(this.options.extensions?.renderers?.[r.type]){let a=r,i=this.options.extensions.renderers[a.type].call({parser:this},a);if(i!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=i||"";continue}}let o=r;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 a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,n=this.renderer){let s="";for(let r=0;r<t.length;r++){let o=t[r];if(this.options.extensions?.renderers?.[o.type]){let i=this.options.extensions.renderers[o.type].call({parser:this},o);if(i!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){s+=i||"";continue}}let a=o;switch(a.type){case"escape":{s+=n.text(a);break}case"html":{s+=n.html(a);break}case"link":{s+=n.link(a);break}case"image":{s+=n.image(a);break}case"checkbox":{s+=n.checkbox(a);break}case"strong":{s+=n.strong(a);break}case"em":{s+=n.em(a);break}case"codespan":{s+=n.codespan(a);break}case"br":{s+=n.br(a);break}case"del":{s+=n.del(a);break}case"text":{s+=n.text(a);break}default:{let i='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return s}},wt=class{options;block;constructor(e){this.options=e||rt}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Se.lex:Se.lexInline}provideParser(){return this.block?Ce.parse:Ce.parseInline}},gc=class{defaults=Bn();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ce;Renderer=Ht;TextRenderer=Vn;Lexer=Se;Tokenizer=Ut;Hooks=wt;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let s of e)switch(n=n.concat(t.call(this,s)),s.type){case"table":{let r=s;for(let o of r.header)n=n.concat(this.walkTokens(o.tokens,t));for(let o of r.rows)for(let a of o)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{let r=s;n=n.concat(this.walkTokens(r.items,t));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{let a=r[o].flat(1/0);n=n.concat(this.walkTokens(a,t))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let o=t.renderers[r.name];o?t.renderers[r.name]=function(...a){let i=r.renderer.apply(this,a);return i===!1&&(i=o.apply(this,a)),i}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){let r=this.defaults.renderer||new Ht(this.defaults);for(let o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let a=o,i=n.renderer[a],l=r[a];r[a]=(...d)=>{let c=i.apply(r,d);return c===!1&&(c=l.apply(r,d)),c||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new Ut(this.defaults);for(let o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,i=n.tokenizer[a],l=r[a];r[a]=(...d)=>{let c=i.apply(r,d);return c===!1&&(c=l.apply(r,d)),c}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new wt;for(let o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let a=o,i=n.hooks[a],l=r[a];wt.passThroughHooks.has(o)?r[a]=d=>
59{if(this.defaults.async&&wt.passThroughHooksRespectAsync.has(o))return(async()=>{let p=await i.call(r,d);return l.call(r,p)})();let c=i.call(r,d);return l.call(r,c)}:r[a]=(...d)=>{if(this.defaults.async)return(async()=>{let p=await i.apply(r,d);return p===!1&&(p=await l.apply(r,d)),p})();let c=i.apply(r,d);return c===!1&&(c=l.apply(r,d)),c}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(a){let i=[];return i.push(o.call(this,a)),r&&(i=i.concat(r.call(this,a))),i}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Se.lex(e,t??this.defaults)}parser(e,t){return Ce.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let s={...n},r={...this.defaults,...s},o=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return o(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 o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=e),r.async)return(async()=>{let a=r.hooks?await r.hooks.preprocess(t):t,i=await(r.hooks?await r.hooks.provideLexer():e?Se.lex:Se.lexInline)(a,r),l=r.hooks?await r.hooks.processAllTokens(i):i;r.walkTokens&&await Promise.all(this.walkTokens(l,r.walkTokens));let d=await(r.hooks?await r.hooks.provideParser():e?Ce.parse:Ce.parseInline)(l,r);return r.hooks?await r.hooks.postprocess(d):d})().catch(o);try{r.hooks&&(t=r.hooks.preprocess(t));let a=(r.hooks?r.hooks.provideLexer():e?Se.lex:Se.lexInline)(t,r);r.hooks&&(a=r.hooks.processAllTokens(a)),r.walkTokens&&this.walkTokens(a,r.walkTokens);let i=(r.hooks?r.hooks.provideParser():e?Ce.parse:Ce.parseInline)(a,r);return r.hooks&&(i=r.hooks.postprocess(i)),i}catch(a){return o(a)}}}onError(e,t){return n=>{if(n.message+=`
60Please report this to https://github.com/markedjs/marked.`,e){let s="<p>An error occurred:</p><pre>"+Te(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},Je=new gc;function W(e,t){return Je.parse(e,t)}W.options=W.setOptions=function(e){return Je.setOptions(e),W.defaults=Je.defaults,us(W.defaults),W};W.getDefaults=Bn;W.defaults=rt;W.use=function(...e){return Je.use(...e),W.defaults=Je.defaults,us(W.defaults),W};W.walkTokens=function(e,t){return Je.walkTokens(e,t)};W.parseInline=Je.parseInline;W.Parser=Ce;W.parser=Ce.parse;W.Renderer=Ht;W.TextRenderer=Vn;W.Lexer=Se;W.lexer=Se.lex;W.Tokenizer=Ut;W.Hooks=wt;W.parse=W;W.options;W.setOptions;W.use;W.walkTokens;W.parseInline;Ce.parse;Se.lex;const xs={};ls.forEach((e,t)=>{xs[e.toLowerCase()]=t});function mc(e){return xs[e.toLowerCase()]??null}const yc={class:"max-w-full overflow-x-hidden"},vc={class:"flex h-[calc(100dvh-80px)] md:h-[calc(100dvh-130px)]"},bc={class:"flex flex-col flex-1 min-w-0"},wc={key:0,class:"card-info-bar"},xc={class:"card-info-details"},kc={class:"text-muted truncate"},_c={class:"hidden sm:inline"},Sc={key:0,class:"hidden sm:inline"},Cc={key:1,class:"hidden sm:inline"},qc={key:2,class:"hidden lg:inline"},Ac={key:3,class:"hidden lg:inline"},$c={key:4,class:"hidden lg:inline"},Tc=["href","title"],Rc={key:1,class:"card-info-bar"},Ic={class:"card-info-details"},Oc={class:"text-muted truncate"},Pc=["href"],Dc={key:2,class:"chat-container flex-1 min-h-0"},Mc={key:0,class:"flex-1 flex flex-col items-center justify-center py-8 gap-6"},Bc={class:"text-center"},Ec={class:"inline-flex items-center justify-center w-14 h-14 rounded-2xl mb-3",style:{background:"rgba(224,196,132,0.1)",border:"1px solid var(--cn-gold-line)",color:"var(--cn-gold-bright)"}},Lc=["innerHTML"],zc={key:1,class:"whitespace-pre-wrap"},Nc={class:"chat-timestamp"},Fc={key:0,class:"chat-token-usage"},Uc={key:1,class:"chat-typing-row"},Hc={class:"chat-avatar chat-avatar-bot"},Vc={key:0,class:"token-warning"},Kc=["href"],Wc={key:1,class:"chat-input-area"},Gc={class:"chat-input-wrapper"},jc=["disabled","onKeydown"],Yc={key:2,class:"chat-input-area"},Qc={class:"flex items-center gap-3 w-full py-2 px-4 flex-wrap"},Zc=["href"],Xc={class:"p-3"},Jc={class:"px-3 pb-2"},ed={class:"flex-1 overflow-y-auto px-2 pb-2"},td=["onClick"],nd=["title"],_r=250,rd=3,id=L({__name:"index",setup(e){W.setOptions({breaks:!0,gfm:!0});function t(S){let v=W.parse(S);return v=n(v),v}function n(S){const v=new Set,ee=/\b((?:Ace|[2-9]|10|Jack|Queen|King) of (?:Hearts|Clubs|Diamonds|Spades))\b/g;return S.split(/(?=<h[23][\s>])/g).map(J=>{const ne=[...J.matchAll(ee)];if(ne.length===0)return J;const Be=[];for(const re of ne){const ke=mc(re[1]);ke!==null&&!v.has(ke)&&(Be.push({name:re[1],num:ke}),v.add(ke))}if(Be.length===0)return J;const oe=`<div class="card-float-group">${Be.map(re=>`<img src="/cards/${re.num}.svg" alt="${re.name}" />`).join("")}</div>`,he=J.indexOf("<p>");return he!==-1?J.slice(0,he+3)+oe+J.slice(he+3):oe+J}).join("")}const s=ha(),r=A(),o=A(null),a=A(!0),i=A([]),l=A(!1),d=A(""),c=z(()=>_r-d.value.length),p=A(!1),f=A(!1),h=A(!1),m=A(!1),k=A([]),g=A(null),x=ga("mobileDrawerOpen",()=>!1),b=A(!1),C=A(""),T=A(void 0);Ve(h,S=>{!S&&!o.value&&C.value&&(d.value=C.value,C.value="",T.value=void 0)});const B=A(!0),$=A([]),R=A([]),N=A(void 0),w=A(null),E=["jason"],U=z(()=>E.includes(s.user?.username||"")),K=z(()=>E.includes(s.user?.username||"")),ue=z(()=>!K.value&&w.value===0),Q=z(()=>!K.value&&w.value!==null&&w.value>0&&w.value<=rd),ce=A(!1),de=z(()=>Q.value&&!ce.value);Ve(w,(S,v)=>{S!==null&&v!==null&&S>v&&(ce.value=!1)});async function se(){if(!K.value)try{const S=await $fetch("/api/profile/tokens");w.value=S.balance??0}catch{w.value===null&&(w.value=0)}}function X(){document.visibilityState==="visible"&&se()}ut(()=>{document.addEventListener("visibilitychange",X),window.addEventListener("focus",X),window.addEventListener("pageshow",X)}),ma(()=>{document.removeEventListener("visibilitychange",X),window.removeEventListener("focus",X),window.removeEventListener("pageshow",X)});const ve=z(()=>{const S=new Date().getHours(),v=s.user?.firstName||"";return S>=5&&S<12?`Good morning, ${v}!`:S>=12&&S<17?`Good afternoon, ${v}!`:S>=17&&S<21?`Good evening, ${v}!`:`Working late, ${v}?`});function Zt(S){return new Date(S).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function Fe(){Ee(()=>{r.value&&(r.value.scrollTop=r.value.scrollHeight)})}async function ks(){a.value=!0;try{const S=await $fetch("/api/profile/card");o.value=S.profile}catch{o.value=null}finally{a.value=!1}}async function Ge(){try{const S=await $fetch("/api/chat/conversations");k.value=S.conversations}catch{k.value=[]}}async function Kn(){try{const S=await $fetch("/api/profile/comparisons");R.value=S.profiles||[]}catch{R.value=[]}}async function _s(){if(!g.value){i.value=[],$.value=[];return}l.value=!0;try{const S=await $fetch("/api/chat/history",{params:{conversationId:g.value}});i.value=S.messages;const v=[...S.messages].reverse().find(ee=>ee.role==="assistant");v?.suggestedActions&&Array.isArray(v.suggestedActions)?$.value=v.suggestedActions:$.value=[],Fe()}catch{i.value=[],$.value=[]}finally{l.value=!1}}function Tt(S){g.value=S,_s()}function Xt(){g.value=null,i.value=[],$.value=[],d.value=""}async function Wn(S){try{await $fetch(`/api/chat/conversation/${S}`,{method:"DELETE"}
60),k.value=k.value.filter(v=>v.id!==S),g.value===S&&Xt()}catch(v){console.error("Failed to delete conversation:",v)}}function Gn(S){o.value=S,h.value=!1,m.value=!1,se(),C.value?(d.value=C.value,N.value=T.value,C.value="",T.value=void 0,pt(),Ge()):Ge().then(()=>{k.value.length>0&&Tt(k.value[0].id)})}function Jt(S){typeof S=="string"?(d.value=S,N.value=void 0):(d.value=S.text,N.value=S.analysisHint),pt()}function Ss(S){d.value=S,pt()}function Cs(S){const v=S.toLowerCase();return/\btokens?\s+of\b/.test(v)?!1:/\btokens?\b/.test(v)||/\bcredits?\s+(left|remaining|balance)\b/.test(v)||/\bout of (questions|credits)\b/.test(v)||/\bhow many (questions|readings)\b[^?]*\b(left|have|remaining)\b/.test(v)||/\b(buy|purchase|get)\s+more\s+(questions|credits)\b/.test(v)}function jn(){const S=w.value??0;return[S===0?"You need tokens to use this app — each question uses **1 token**, and you currently have none.":`You currently have **${S} token${S!==1?"s":""}** remaining. Each question uses 1 token.`,"","You can purchase more at any time:","",`<a href="${yt}" target="_blank" rel="noopener" style="display:inline-block;padding:10px 20px;background:linear-gradient(180deg,#f2d79a,#d9b673);color:#1a1330;border-radius:8px;text-decoration:none;font-weight:600;margin:4px 0;">Buy more tokens</a>`,"","After purchasing, your token balance will be updated automatically. This message did not use any tokens."].join(`
61`)}async function pt(){const S=d.value.trim();if(!S||p.value)return;if($.value=[],ue.value){N.value=void 0,i.value.push({id:Date.now(),role:"user",content:S,createdAt:new Date().toISOString()}),d.value="",i.value.push({id:Date.now()+1,role:"assistant",content:jn(),createdAt:new Date().toISOString()}),Fe();return}if(!o.value){C.value=S,T.value=N.value,N.value=void 0,d.value="",h.value=!0;return}if(!K.value&&Cs(S)){i.value.push({id:Date.now(),role:"user",content:S,createdAt:new Date().toISOString()}),d.value="",i.value.push({id:Date.now()+1,role:"assistant",content:jn(),createdAt:new Date().toISOString()}),Fe();return}const v=Date.now();i.value.push({id:v,role:"user",content:S,createdAt:new Date().toISOString()}),d.value="",p.value=!0,f.value=!1,Fe();let ee=-1;try{const ae=N.value;N.value=void 0;const J=await fetch("/api/chat/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:S,conversationId:g.value||void 0,localDate:(()=>{const oe=new Date;return`${oe.getFullYear()}-${String(oe.getMonth()+1).padStart(2,"0")}-${String(oe.getDate()).padStart(2,"0")}`})(),...ae?{analysisHint:ae}:{}})});if(!J.ok||!J.body)throw new Error(`Request failed (${J.status})`);const ne=J.body.getReader(),Be=new TextDecoder;let Ue="";for(;;){const{done:oe,value:he}=await ne.read();if(oe)break;Ue+=Be.decode(he,{stream:!0});const re=Ue.split(`
62
63`);Ue=re.pop()||"";for(const ke of re){const D=ke.trim();if(!D.startsWith("data: "))continue;let F;try{F=JSON.parse(D.slice(6))}catch{continue}if(F.type==="start")F.isNewConversation&&F.conversationId&&(g.value=F.conversationId,Ge());else if(F.type==="token")f.value||(f.value=!0,i.value.push({id:Date.now()+1,role:"assistant",content:"",createdAt:new Date().toISOString()}),ee=i.value.length-1),ee>=0&&(i.value[ee].content+=F.content),Fe();else if(F.type==="done"){if(ee>=0?i.value[ee]={id:F.messageId,role:"assistant",content:F.answer,cardContext:F.cardContext,tokenUsage:F.tokenUsage||null,createdAt:new Date().toISOString()}:i.value.push({id:F.messageId,role:"assistant",content:F.answer,cardContext:F.cardContext,tokenUsage:F.tokenUsage||null,createdAt:new Date().toISOString()}),F.conversationTitle&&g.value){const je=k.value.find(ft=>ft.id===g.value);je?je.title=F.conversationTitle:await Ge()}F.suggestedActions&&Array.isArray(F.suggestedActions)&&F.suggestedActions.length>0&&($.value=F.suggestedActions),F.remainingTokens!==null&&F.remainingTokens!==void 0&&(w.value=F.remainingTokens),F.answer&&/connection|relationship|compatib/i.test(F.answer)&&Kn(),Fe()}else if(F.type==="error")throw F.conversationId&&!g.value&&(g.value=F.conversationId),new Error(F.error||"Stream error")}}}catch(ae){if(console.error("[chat] Stream error:",ae.message),!await qs()){const ne=ae.message&&ae.message!=="Proxy 
63Error"?`Sorry, something went wrong: ${ae.message}`:"Sorry, I was unable to process your question. Please try again.";ee>=0?i.value[ee].content=ne:i.value.push({id:Date.now(),role:"assistant",content:ne,createdAt:new Date().toISOString()}),Fe()}}p.value=!1,f.value=!1}async function qs(){for(const S of[0,5e3]){S>0&&await new Promise(v=>setTimeout(v,S));try{if(g.value||(await Ge(),k.value.length>0&&(g.value=k.value[0].id)),!g.value)continue;const ee=(await $fetch("/api/chat/history",{params:{conversationId:g.value}})).messages||[],ae=ee[ee.length-1];if(ae?.role==="assistant")return console.log("[chat] Recovered saved response after timeout"),i.value=ee,Array.isArray(ae.suggestedActions)&&ae.suggestedActions.length>0&&($.value=ae.suggestedActions),await Ge(),Fe(),!0}catch{}}return!1}function As(S){return[{label:"Export PDF",icon:"i-lucide-download",onSelect:()=>Yn(S)},{type:"separator"},{label:"Delete",icon:"i-lucide-trash-2",color:"error",onSelect:()=>Wn(S)}]}async function Yn(S){const ee=k.value.find(re=>re.id===S)?.title||"Untitled Conversation";let ae;try{ae=(await $fetch("/api/chat/history",{params:{conversationId:S}})).messages||[]}catch{alert("Failed to load conversation history.");return}if(ae.length===0){alert("This conversation has no messages to export.");return}const J=s.user?.firstName||s.user?.username||"User",ne=new Date().toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"}),Be=ae.map(re=>{const ke=new Date(re.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),D=re.role==="user",F=D?"background: linear-gradient(135deg, #6366f1, #4f46e5); color: white;":"background: #f9fafb; color: #1f2937; border: 1px solid #e5e7eb;",je=D?"align-self: flex-end;":"align-self: flex-start;",ft=D?J:"Destiny Cards AI",st=D?"#6366f1":"#7c3aed",pe=D?Qn(re.content).replace(/\n/g,"<br>"):W.parse(re.content);return`
64      <div style="display: flex; flex-direction: column; ${je} max-width: 85%; margin-bottom: 16px;">
65        <div style="font-size: 11px; font-weight: 600; color: ${st}; margin-bottom: 4px; ${D?"text-align: right;":""}">${ft}</div>
66        <div style="padding: 12px 16px; border-radius: 16px; ${F} font-size: 13px; line-height: 1.6; ${D?"border-bottom-right-radius: 4px;":"border-bottom-left-radius: 4px;"}">
67          ${pe}
68        </div>
69        <div style="font-size: 10px; color: #9ca3af; margin-top: 4px; ${D?"text-align: right;":""}">${ke}</div>
70      </div>`}).join(""),Ue=`
71    <div id="pdf-export" style="font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; padding: 40px 30px 60px 30px; max-width: 800px; margin: 0 auto;">
72      <div style="text-align: center; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 2px solid #6366f1;">
73        <div style="font-size: 24px; font-weight: 700; color: #6366f1; letter-spacing: -0.5px;">Destiny Cards AI</div>
74        <div style="font-size: 16px; color: #374151; margin-top: 8px; font-weight: 500;">${Qn(ee)}</div>
75        <div style="font-size: 12px; color: #9ca3af; margin-top: 4px;">${J} &middot; ${ne}</div>
76      </div>
77      <div style="display: flex; flex-direction: column;">
78        ${Be}
79      </div>
80    </div>`,oe=document.createElement("div");oe.style.position="absolute",oe.style.left="-9999px",oe.style.top="0",oe.style.width="800px",oe.innerHTML=Ue,document.body.appendChild(oe);const he=oe.firstElementChild;try{let re=function(ge){const Ye=ge.createElement("style");Ye.textContent=`
81        #pdf-export, #pdf-export * { box-sizing: border-box; }
82        #pdf-export p { margin: 0 0 0.8em 0; }
83        #pdf-export p:last-child { margin-bottom: 0; }
84        #pdf-export h1, #pdf-export h2, #pdf-export h3,
85        #pdf-export h4, #pdf-export h5, #pdf-export h6 {
86          margin: 1em 0 0.5em 0;
87        }
88        #pdf-export ul, #pdf-export ol { margin: 0.5em 0; padding-left: 1.5em; }
89        #pdf-export li { margin-bottom: 0.25em; }
90        #pdf-export hr { margin: 1em 0; border: none; border-top: 1px solid #e5e7eb; }
91        #pdf-export blockquote { margin: 0.5em 0; padding-left: 1em; border-left: 3px solid #6366f1; }
92        #pdf-export strong { font-weight: 700; }
93      `,ge.head.appendChild(Ye);const ht=ge.querySelectorAll("*"),Jn=["color","background-color","border-color","border-top-color","border-bottom-color","border-left-color","border-right-color","outline-color","text-decoration-color"];ht.forEach(gt=>{const Rt=ge.defaultView.getComputedStyle(gt);
93Jn.forEach(It=>{const Ot=Rt.getPropertyValue(It);Ot&&Ot.includes("oklch")&&gt.style.setProperty(It,"transparent")});const mt=Rt.getPropertyValue("box-shadow");mt&&mt.includes("oklch")&&gt.style.setProperty("box-shadow","none")})};const{default:ke}=await tr(async()=>{const{default:ge}=await import("./DXEQVQnt.js");return{default:ge}},[],import.meta.url),{jsPDF:D}=await tr(async()=>{const{jsPDF:ge}=await import("./CoTf9NO2.js").then(Ye=>Ye.j);return{jsPDF:ge}},__vite__mapDeps([0,1,2]),import.meta.url),F=2,je=15,ft=25,st=15,pe=new D({unit:"mm",format:"a4",orientation:"portrait"}),en=pe.internal.pageSize.getWidth(),tn=pe.internal.pageSize.getHeight(),nn=en-st*2,$s=tn-je-ft,Ts=he.scrollWidth/nn,rn=Math.floor($s*Ts),Zn=he.scrollHeight,Xn=Math.ceil(Zn/rn),Rs=`${ee.replace(/[^a-zA-Z0-9 ]/g,"").trim()}.pdf`;for(let ge=0;ge<Xn;ge++){ge>0&&pe.addPage();const Ye=ge*rn,ht=Math.min(rn,Zn-Ye),gt=(await ke(he,{scale:F,useCORS:!0,letterRendering:!0,x:0,y:Ye,width:he.scrollWidth,height:ht,windowWidth:he.scrollWidth,windowHeight:ht,onclone:Ot=>{re(Ot)}})).toDataURL("image/jpeg",.98),Rt=ht/he.scrollWidth*nn;pe.addImage(gt,"JPEG",st,je,nn,Rt),pe.setFontSize(9),pe.setTextColor(99,102,241),pe.text("Destiny Cards AI",st,10),pe.setFontSize(8),pe.setTextColor(156,163,175);const mt="© Robert Lee Camp - 7Thunders Publishing Inc.",It=pe.getStringUnitWidth(mt)*8/pe.internal.scaleFactor;pe.text(mt,(en-It)/2,tn-10),pe.text(`Page ${ge+1} of ${Xn}`,en-st,tn-10,{align:"right"})}pe.save(Rs)}finally{document.body.removeChild(oe)}}function Qn(S){const v=document.createElement("div");return v.textContent=S,v.innerHTML}return ut(async()=>{const S=se();
93await ks(),o.value&&(await Promise.all([Ge(),Kn(),S]),k.value.length>0&&Tt(k.value[0].id))}),(S,v)=>{const ee=El,ae=au,J=Ct,ne=Re,Be=pu,Ue=gu,oe=qu,he=as,re=is,ke=ya;return y(),O("div",yc,[P(ee,{open:u(h),"onUpdate:open":v[0]||(v[0]=D=>me(h)?h.value=D:null),greeting:u(ve),"allow-dismiss":"",onProfileSaved:Gn},null,8,["open","greeting"]),P(ee,{open:u(m),"onUpdate:open":v[1]||(v[1]=D=>me(m)?m.value=D:null),greeting:u(ve),"existing-profile":u(o),onProfileSaved:Gn},null,8,["open","greeting","existing-profile"]),_("div",vc,[u(o)&&u(B)?(y(),I(ae,{key:0,class:"hidden md:flex md:flex-col",conversations:u(k),"active-id":u(g),onNewChat:Xt,onSelect:Tt,onDelete:Wn,onExport:Yn,onAsk:Jt,onFeedback:v[2]||(v[2]=D=>b.value=!0)},null,8,["conversations","active-id"])):G("",!0),_("div",bc,[u(o)?(y(),O("div",wc,[P(J,{icon:"i-lucide-messages-square",variant:"ghost",size:"xs",color:"neutral",class:"md:hidden",title:"Conversations",onClick:v[3]||(v[3]=D=>x.value=!0)}),P(J,{icon:u(B)?"i-lucide-panel-left-close":"i-lucide-panel-left-open",variant:"ghost",size:"xs",color:"neutral",class:"hidden md:inline-flex",title:u(B)?"Hide sidebar":"Show sidebar",onClick:v[4]||(v[4]=D=>B.value=!u(B))},null,8,["icon","title"]),_("div",xc,[_("span",kc,V(u(ve)),1),v[26]||(v[26]=_("span",{class:"mx-1 text-gray-300 dark:text-gray-600 hidden sm:inline"},"|",-1)),_("span",_c,[v[16]||(v[16]=_("strong",null,"Birth Card:",-1)),le(" "+V(("cardName"in S?S.cardName:u(on))(u(o).birthCard)),1)]),u(o).planetaryRulingCard?(y(),O("span",Sc,[v[17]||(v[17]=_("strong",null,"PRC:",-1)),le(" "+V(("cardName"in S?S.cardName:u(on))(u(o).planetaryRulingCard)),1)])):(y(),O("span",Cc,[v[18]||(v[18]=_("strong",null,"PRC:",-1)),v[19]||(v[19]=le()),v[20]||(v[20]=_("span",{class:"text-muted"},"Unknown",-1)),_("button",{class:"text-destiny-500 hover:text-destiny-600 underline text-xs ml-1",onClick:v[5]||(v[5]=D=>m.value=!0)},"Add info")])),u(o).decanateCard?(y(),O("span",qc,[v[21]||(v[21]=_("strong",null,"DRC:",-1)),le(" "+V(("cardName"in S?S.cardName:u(on))(u(o).decanateCard)),1)])):(y(),O("span",Ac,[v[22]||(v[22]=_("strong",null,"DRC:",-1)),v[23]||(v[23]=le()),v[24]||(v[24]=_("span",{class:"text-muted"},"Unknown",-1)),_("button",{class:"text-destiny-500 hover:text-destiny-600 underline text-xs ml-1",onClick:v[6]||(v[6]=D=>m.value=!0)},"Add info")])),u(o).sunSign?(y(),O("span",$c,[v[25]||(v[25]=_("strong",null,"Sign:",-1)),le(" "+V(u(o).sunSign),1)])):G("",!0)]),!u(K)&&u(w)!==null?(y(),O("a",{key:0,href:"BUY_TOKENS_URL"in S?S.BUY_TOKENS_URL:u(yt),target:"_blank",rel:"noopener",class:j(["card-info-tokens",{"card-info-tokens-low":u(Q)}]),title:u(Q)?"Running low — buy more tokens":"Buy more tokens"},[v[27]||(v[27]=_("strong",null,"Tokens:",-1)),v[28]||(v[28]=le()),_("span",null,V(u(w)),1)],10,Tc)):G("",!0)])):u(a)?G("",!0):(y(),O("div",Rc,[_("div",Ic,[_("span",Oc,V(u(ve)),1),v[30]||(v[30]=_("span",{class:"mx-1 text-gray-300 dark:text-gray-600 hidden sm:inline"},"|",-1)),_("button",{type:"button",class:"setup-cards-link",onClick:v[7]||(v[7]=D=>h.value=!0)},[P(ne,{name:"i-lucide-sparkles"}),v[29]||(v[29]=le(" Enter your birth date to reveal your cards ",-1))])]),!u(K)&&u(w)!==null?(y(),O("a",{key:0,href:"BUY_TOKENS_URL"in S?S.BUY_TOKENS_URL:u(yt),target:"_blank",rel:"noopener",class:"card-info-tokens"},[v[31]||(v[31]=_("strong",null,"Tokens:",-1)),v[32]||(v[32]=le()),_("span",null,V(u(w)),1)],8,Pc)):G("",!0)])),u(o)||!u(a)?(y(),O("div",Dc,[_("div",{ref_key:"messagesContainer",ref:r,class:"chat-messages"},[u(i).length===0&&!u(l)&&!u(p)?(y(),O("div",Mc,[_("div",Bc,[_("div",Ec,[P(ne,{name:"i-lucide-sparkles",class:"text-2xl"})]),v[33]||(v[33]=_("h2",{class:"text-xl font-semibold",style:{"font-family":"var(--cn-serif)",color:"var(--cn-ink)"}},"What would you like to explore?",-1)),v[34]||(v[34]=_("p",{class:"text-sm mt-1",style:{color:"var(--cn-muted)"}},"Choose a topic or type your own question below",-1))]),P(Be,{"comparison-profiles":u(R),onSelect:Jt},null,8,["comparison-profiles"])])):G("",!0),(y(!0),O(ye,null,we(u(i),(D,F)=>(y(),O("div",{key:D.id,class:j(["chat-bubble-row",D.role==="user"?"chat-bubble-row-outgoing":"chat-bubble-row-incoming"])},[_("div",{class:j(["chat-avatar",D.role==="user"?"chat-avatar-user":"chat-avatar-bot"])},[P(ne,{name:D.role==="user"?"i-lucide-user":"i-lucide-sparkles"},null,8,["name"])],2),_("div",{class:j(["chat-bubble",D.role==="user"?"chat-bubble-outgoing":"chat-bubble-incoming"])},[D.role==="assistant"?(y(),O("div",{key:0,class:"chat-markdown",innerHTML:t(D.content)},null,8,Lc)):(y(),O("div",zc,V(D.content),1)),_("div",Nc,[le(V(Zt(D.createdAt))+" ",1),u(U)&&D.role==="assistant"&&D.tokenUsage?(y(),O("span",Fc," · "+V(D.tokenUsage.totalTokens)+" tokens ("+V(D.tokenUsage.promptTokens)+"in / "+V(D.tokenUsage.completionTokens)+"out) · $"+V(D.tokenUsage.estimatedCost?.toFixed(4)||"0.0000"),1)):G("",!0)]),D.role==="assistant"&&F===u(i).length-1&&u($).length>0&&!u(p)?(y(),I(Ue,{key:2,actions:u($),class:"mt-2",onSelect:Ss},null,8,["actions"])):G("",!0)],2)],2))),128)),u(p)&&!u(f)?(y(),O("div",Uc,[_("div",Hc,[P(ne,{name:"i-lucide-sparkles"})]),v[35]||(v[35]=_("div",{class:"chat-typing-indicator"},[_("span"),_("span"),_("span")],-1))])):G("",!0)],512),u(de)?(y(),O("div",Vc,[P(ne,{name:"i-lucide-alert-triangle",class:"token-warning-icon"}),_("span",null,[v[36]||(v[36]=le(" Only ",-1)),_("strong",null,V(u(w)),1),le(" "+V(u(w)===1?"question":"questions")+" left. ",1)]),_("a",{href:"BUY_TOKENS_URL"in S?S.BUY_TOKENS_URL:u(yt),target:"_blank",rel:"noopener",class:"token-warning-buy"},[P(ne,{name:"i-lucide-shopping-cart"}),v[37]||(v[37]=le(" Buy more ",-1))],8,Kc),_("button",{type:"button",class:"token-warning-close","aria-label":"Dismiss",onClick:v[8]||(v[8]=D=>ce.value=!0)},"×")])):G("",!0),u(ue)?(y(),O("div",Yc,[_("div",Qc,[P(ne,{name:"i-lucide-coins",class:"text-xl shrink-0",style:{color:"var(--cn-gold-bright)"}}),v[39]||(v[39]=_("span",{class:"text-sm",style:{color:"var(--cn-ink-2)"}},"You need tokens to use this app — each question uses one.",-1)),_("a",{href:"BUY_TOKENS_URL"in S?S.BUY_TOKENS_URL:u(yt),target:"_blank",rel:"noopener",class:"ml-auto inline-flex items-center gap-1.5 px-4 py-2 rounded-lg text-sm font-semibold transition-transform hover:-translate-y-0.5",style:{background:"linear-gradient(180deg, var(--cn-gold-bright), var(--cn-gold))",color:"#1a1330"}},[P(ne,{name:"i-lucide-shopping-cart"}),v[38]||(v[38]=le(" Buy Tokens ",-1))],8,Zc)])])):(y(),O("div",Wc,[_("div",Gc,[it(_("textarea",{"onUpdate:modelValue":v[9]||(v[9]=D=>me(d)?d.value=D:null),placeholder:"Ask about your destiny cards...",rows:"1",maxlength:_r,disabled:u(p),onKeydown:Rr(Ze(pt,["exact","prevent"]),["enter"])},null,40,jc),[[xt,u(d)]]),_("span",{class:j(["char-counter",{"char-counter-warn":u(c)<=30,"char-counter-danger":u(c)<=10}])},V(u(c)),3)]),P(J,{icon:"i-lucide-send",color:"primary",loading:u(p),disabled:!u(d).trim(),onClick:pt},null,8,["loading","disabled"])]))])):G("",!0)])]),P(oe,{open:u(b),"onUpdate:open":v[10]||(v[10]=D=>me(b)?b.value=D:null),"conversation-id":u(g),"has-exchange":u(i).length>0},null,8,["open","conversation-id","has-exchange"]),P(ke,{open:u(x),"onUpdate:open":v[15]||(v[15]=D=>me(x)?x.value=D:null),side:"left",title:"Conversations"},{body:q(()=>[_("div",Xc,[P(J,{icon:"i-lucide-plus",label:"New Chat",color:"primary",block:"",onClick:v[11]||(v[11]=D=>{Xt(),x.value=!1})})]),_("div",Jc,[P(he,{onSelect:v[12]||(v[12]=D=>{Jt(D),x.value=!1})})]),_("div",ed,[(y(!0),O(ye,null,we(u(k),D=>(y(),O("div",{key:D.id,class:j(["conversation-item group",D.id===u(g)?"conversation-item-active":""]),onClick:F=>{Tt(D.id),x.value=!1}},[P(ne,{name:"i-lucide-message-square",class:"shrink-0 text-gray-400"}),_("span",{class:"flex-1 truncate text-sm",title:D.title||"Untitled"},V(D.title||"Untitled"),9,nd),P(re,{items:As(D.id),content:{align:"start",side:"bottom"}},{default:q(()=>[P(J,{icon:"i-lucide-ellipsis-vertical",variant:"ghost",size:"xs",color:"neutral",class:"shrink-0 opacity-50",onClick:v[13]||(v[13]=Ze(()=>{},["stop"]))})]),_:1},8,["items"])],10,td))),128))]),_("button",{type:"button",class:"feedback-launch",onClick:v[14]||(v[14]=D=>{x.value=!1,b.value=!0})},[P(ne,{name:"i-lucide-message-square-plus"}),v[40]||(v[40]=_("span",null,"Send feedback",-1))])]),_:1},8,["open"])])}}});
93export{id as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.