1import{j as r}from"./vendor-react-NDqzZ9RJ.js";import{b as S,D as N,w as D,x as y,y as F,c as m}from"./index-CoM1tmaP.js";import{T}from"./TarotCardArt-6bJFsfX1.js";import{a as p,g as z}from"./tarot-CsO9odGI.js";import{E as w}from"./vendor-pdf-DcnCMWs_.js";function L({card:a,position:o,onClose:t}){const{t:s}=S(),n=!!a,e=a?p(a.id):null;return r.jsx(N,{open:n,onOpenChange:i=>!i&&t(),children:r.jsx(D,{className:"bg-bg-surface border-primary/30 max-w-md max-h-[85vh] overflow-y-auto",children:a&&e&&r.jsxs(r.Fragment,{children:[r.jsxs(y,{children:[r.jsxs(F,{className:"font-display gold-text flex items-center gap-2",children:[r.jsx("span",{children:e.symbol})," ",e.name,r.jsx("span",{className:m("text-[10px] px-2 py-0.5 rounded font-bold",a.reversed?"bg-destructive/20 text-destructive":"bg-primary/20 text-primary-glow"),children:a.reversed?s("tarotDetail.reversed"):s("tarotDetail.upright")})]}),o&&r.jsx("p",{className:"text-xs text-gold-soft uppercase font-bold",children:o})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsx(T,{flipped:!0,card:a,className:"w-24 h-36 shrink-0"}),r.jsxs("div",{className:"flex-1 space-y-1",children:[e.theme&&r.jsxs("p",{className:"text-xs",children:[r.jsx("span",{className:"font-semibold text-gold-soft",children:s("tarotDetail.mainTheme")})," ",e.theme]}),e.arcana&&r.jsx("p",{className:"text-[11px] text-text-hint",children:e.arcana==="major"?s("tarotDetail.majorArcana"):`${s("tarotDetail.minorArcana")}${e.suit?" · "+e.suit:""}`}),r.jsxs("p",{className:"text-xs",children:[r.jsx("span",{className:"font-semibold",children:s("tarotDetail.activeDir",{dir:a.reversed?s("tarotDetail.reversedWord"):s("tarotDetail.uprightWord")})})," ",a.reversed?e.reversedMessage??e.reversed:e.mainMessage??e.upright]})]})]}),r.jsxs("div",{className:"grid gap-2 mt-2",children:[r.jsxs("div",{className:m("p-3 rounded-xl border",a.reversed?"border-border/30 bg-bg-elevated/50":"border-primary/40 bg-primary/10"),children:[r.jsx("p",{className:"text-xs font-bold text-primary-glow mb-1",children:s("tarotDetail.uprightMeaning")}),r.jsx("p",{className:"text-sm text-foreground/90",children:e.upright}),e.mainMessage&&r.jsx("p",{className:"text-[11px] text-muted-foreground mt-1 italic",children:e.mainMessage})]}),r.jsxs("div",{className:m("p-3 rounded-xl border",a.reversed?"border-destructive/40 bg-destructive/10":"border-border/30 bg-bg-elevated/50"),children:[r.jsx("p",{className:"text-xs font-bold text-destructive mb-1",children:s("tarotDetail.reversedMeaning")}),r.jsx("p",{className:"text-sm text-foreground/90",children:e.reversed}),e.reversedMessage&&r.jsx("p",{className:"text-[11px] text-muted-foreground mt-1 italic",children:e.reversedMessage})]})]})]})})})}function $(a){const o=JSON.stringify(a);return btoa(unescape(encodeURIComponent(o))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function P(a){try{const o=a.replace(/-/g,"+").replace(/_/g,"/"),t=o+"=".repeat((4-o.length%4)%4),s=decodeURIComponent(escape(atob(t)));return JSON.parse(s)}catch{return null}}function M(a){const o=$(a);return`${window.location.origin}/tarot-paylas#${o}`}function W(a,o="tarot-falim.pdf"){const t=new w({unit:"pt",format:"a4"}),s=t.internal.pageSize.getWidth(),n=48;let e=n;const i=z(a.s??"three_card"),h=a.d?new Date(a.d).toLocaleString("tr-TR"):new Date().toLocaleString("tr-TR");t.setFont("times","bold"),t.setFontSize(22),t.text("Tarot Falı",s/2,e,{align:"center"}),e+=24,t.setFont("times","italic"),t.setFontSize(12),t.text(`${i.emoji} ${i.name}${a.t?" · "+a.t:""}`,s/2,e,{align:"center"}),e+=16,t.setFont("helvetica","normal"),t.setFontSize(10),t.text(h,s/2,e,{al
1ign:"center"}),e+=22,t.setFont("helvetica","bold"),t.setFontSize(12),t.text("Soru",n,e),e+=14,t.setFont("helvetica","normal");const g=t.splitTextToSize(a.q||"â",s-n*2);t.text(g,n,e),e+=g.length*14+8,t.setFont("helvetica","bold"),t.setFontSize(12),t.text("Kartlar",n,e),e+=14,t.setFontSize(10),a.c.forEach((l,d)=>{const c=p(l.id),b=i.positions[d]??`Kart ${d+1}`,f=l.r?"TERS":"DÃZ",v=l.r?c.reversed:c.upright,j=`${d+1}. [${b}] ${c.name} (${f}) â ${v}`,x=t.splitTextToSize(j,s-n*2);e+x.length*12>t.internal.pageSize.getHeight()-n&&(t.addPage(),e=n),t.setFont("helvetica","normal"),t.text(x,n,e),e+=x.length*12+4}),e+=8,e+40>t.internal.pageSize.getHeight()-n&&(t.addPage(),e=n),t.setFont("helvetica","bold"),t.setFontSize(12),t.text("Yorum",n,e),e+=14,t.setFont("helvetica","normal"),t.setFontSize(10);const u=t.splitTextToSize(a.r||"â",s-n*2);for(const l of u)e>t.internal.pageSize.getHeight()-n&&(t.addPage(),e=n),t.text(l,n,e),e+=12;t.save(o)}async function A(a){const o=M(a);try{await navigator.clipboard.writeText(o)}catch{}return o}export{L as T,P as a,A as c,W as d};
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.