1import{r as l,j as e,b as C}from"./index-BbEav4m3.js";import{S as L}from"./SiteHeader-CL_CGV28.js";import{F as M}from"./Footer-CQ1j1eAJ.js";import{u as _}from"./useFeatureLimit-CzT_ny1l.js";import{P}from"./PaywallCard-5TIxl50E.js";import"./Combination-C6ixADB-.js";import"./index-CES-V0je.js";import"./index-B5G9dUzx.js";import"./shield-JShP__0-.js";import"./select-C8wqKyfO.js";import"./emailHygiene-CRnU0EH2.js";import"./EcosystemLinks-CHqfbzm-.js";import"./lock-CWnnxRwd.js";import"./loader-circle-ymDA-dQW.js";function A(){const[a,b]=l.useState(0),[t,o]=l.useState("");l.useEffect(()=>{const m=new Date,x=new Date(2e3,0,6),p=29.53058867,n=(m-x)/(1e3*60*60*24)%p/p;b(n),n<.125?o("New Moon ð"):n<.25?o("Waxing Crescent ð"):n<.375?o("First Quarter ð"):n<.5?o("Waxing Gibbous ð"):n<.625?o("Full Moon ð"):n<.75?o("Waning Gibbous ð"):n<.875?o("Last Quarter ð"):o("Waning Crescent ð")},[]);const d=()=>{const m=-100+a*200;return e.jsxs("svg",{viewBox:"0 0 200 200",className:"w-40 h-40",children:[e.jsx("circle",{cx:"100",cy:"100",r:"95",fill:"#f4c430",stroke:"rgba(212,175,55,0.3)",strokeWidth:"2"}),e.jsx("ellipse",{cx:100+m*.5,cy:"100",rx:95*Math.abs(Math.cos(a*Math.PI*2)),ry:"95",fill:"#0d0020",opacity:"0.8"}),e.jsx("circle",{cx:"70",cy:"80",r:"6",fill:"rgba(0,0,0,0.15)"}),e.jsx("circle",{cx:"120",cy:"110",r:"8",fill:"rgba(0,0,0,0.1)"}),e.jsx("circle",{cx:"100",cy:"140",r:"5",fill:"rgba(0,0,0,0.12)"})]})};return e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 text-center",children:[e.jsx("h3",{className:"font-heading text-xl text-primary mb-6",children:"Lunar Cycle"}),e.jsxs("div",{className:"flex flex-col items-center gap-6",children:[e.jsxs("div",{className:"relative",children:[d(),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"absolute top-2 left-2 w-2 h-2 bg-primary rounded-full opacity-60"})})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-2xl mb-2",children:t}),e.jsxs("p",{className:"text-xs text-muted-foreground uppercase tracking-widest mb-3",children:[Math.round(a*100),"% Illuminated"]}),e.jsx("div",{className:"w-48 h-2 bg-muted rounded-full overflow-hidden border border-border",children:e.jsx("div",{className:"h-full bg-gradient-to-r from-primary to-accent transition-all",style:{width:`${a*100}%`}})})]}),e.jsxs("p",{className:"text-xs text-foreground/70 max-w-xs leading-relaxed mt-2",children:[a<.25&&"Growing energy â a time for new beginnings and intentions",a>=.25&&a<.5&&"Building momentum â a powerful time for manifestation",a>=.5&&a<.75&&"Peak energy â the full moon brings clarity and completion",a>=.75&&"Release and reflection â a time to let go and prepare for renewal"]})]})]})}const y=[{name:"Aries",symbol:"â",dates:"Mar 21 â Apr 19"},{name:"Taurus",symbol:"â",dates:"Apr 20 â May 20"},{name:"Gemini",symbol:"â",dates:"May 21 â Jun 20"},{name:"Cancer",symbol:"â",dates:"Jun 21 â Jul 22"},{name:"Leo",symbol:"â",dates:"Jul 23 â Aug 22"},{name:"Virgo",symbol:"â",dates:"Aug 23 â Sep 22"},{name:"Libra",symbol:"â",dates:"Sep 23 â Oct 22"},{name:"Scorpio",symbol:"â",dates:"Oct 23 â Nov 21"},{name:"Sagittarius",symbol:"â",dates:"Nov 22 â Dec 21"},{name:"Capricorn",symbol:"â",dates:"Dec 22 â Jan 19"},{name:"Aquarius",symbol:"â",dates:"Jan 20 â Feb 18"},{name:"Pisces",symbol:"â",dates:"Feb 19 â Mar 20"}],j={monthly:"Monthly",weekly:"Weekly",daily:"Daily"};function Q(){const[a,b]=l.useState([]),[t,o]=l.useState(null),[d,m]=l.useState("weekly"),[x,p]=l.useState(!0),[f,n]=l.useState(()=>new Set),[c,h]=l.useState(!1),{remaining:u,consume:N,startCheckout:v,checkingOut:w}=_("horoscopeView");l.useEffect(()=>{C.entities.Horoscope.filter({is_published:!0}).then(b).finally(()=>p(!1))},[]),l.useEffect(()=>{u>0&&c&&h(!1)},[u,c]);const k=async s=>{if(f.has(s)){o(s),h(!1);return}if(!await N()){h(!0);return}n(S=>new Set([...S,s])),o(s),h(!1)},r=t?a.find(s=>s.zodiac_sign===t&&s.period_type===d):null,i=y.find(s=>s.name===t);return e.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[e.jsx(L,{}),e.jsxs("div",{className:"max-w-6xl mx-auto px-4 py-12",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("h1",{className:"font-heading text-4xl md:text-5xl text-primary mb-3",children:"Your Horoscope"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Select your sign and discover what the stars have in store"}),e.jsx("div",{className:"flex justify-center gap-2 mt-6",children:Object.entries(j).map(([s,g])=>e.jsx("button",{onClick:()=>m(s),className:`px-5 py-1.5 rounded-full text-sm font-medium transition-colors border ${d===s?"bg-primary text-primary-foreground border-primary":"border-border text-muted-foreground hover:text-foreground hover:border-foreground
1/30"}`,children:g},s))})]}),e.jsx("div",{className:"mb-12",children:e.jsx(A,{})}),e.jsx("div",{className:"grid grid-cols-4 sm:grid-cols-6 md:grid-cols-12 gap-2 mb-10",children:y.map(s=>e.jsxs("button",{onClick:()=>k(s.name),className:`flex flex-col items-center py-3 px-1 rounded-xl border transition-all ${t===s.name?"border-primary bg-primary/10 text-primary":"border-border bg-card hover:border-primary/50 text-muted-foreground hover:text-foreground"}`,children:[e.jsx("span",{className:"text-2xl mb-1",children:s.symbol}),e.jsx("span",{className:"text-[10px] leading-tight text-center",children:s.name})]},s.name))}),u>0&&!t&&e.jsxs("p",{className:"text-center text-xs text-muted-foreground mb-8",children:[u," free horoscope view",u===1?"":"s"," left â choose a sign to begin"]}),!t&&e.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[e.jsx("p",{className:"text-5xl mb-4",children:"ð®"}),e.jsxs("p",{children:["Select your zodiac sign above to read your ",j[d].toLowerCase()," horoscope"]})]}),t&&c&&e.jsxs("div",{className:"max-w-md mx-auto",children:[e.jsx(P,{onPay:v,loading:w,noun:"horoscopes"}),e.jsx("p",{className:"text-xs text-muted-foreground text-center mt-3",children:"You can still re-open a sign you've already read â just tap it again."})]}),t&&!c&&x&&e.jsx("div",{className:"text-center py-16 text-muted-foreground",children:"Loadingâ¦"}),t&&!c&&!x&&!r&&e.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[e.jsx("p",{className:"text-4xl mb-4",children:i==null?void 0:i.symbol}),e.jsxs("p",{children:["No ",d," horoscope available for ",t," yet. Check back soon!"]})]}),t&&!c&&!x&&r&&e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-8 text-center relative overflow-hidden",children:[r.cover_image&&e.jsx("img",{src:r.cover_image,alt:t,className:"absolute inset-0 w-full h-full object-cover opacity-10"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("p",{className:"text-5xl mb-2",children:i==null?void 0:i.symbol}),e.jsx("h2",{className:"font-heading text-3xl text-primary mb-1",children:t}),e.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:i==null?void 0:i.dates}),r.period_label&&e.jsx("p",{className:"text-sm text-muted-foreground",children:r.period_label})]})]}),r.content&&e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-6",children:[e.jsx("h3",{className:"font-heading text-lg text-primary mb-3",children:"Overview"}),e.jsx("p",{className:"text-foreground/80 leading-relaxed text-sm",children:r.content})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[r.love&&e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-5",children:[e.jsx("h4",{className:"font-heading text-primary mb-2",children:"ð Love"}),e.jsx("p",{className:"text-sm text-foreground/75 leading-relaxed",children:r.love})]}),r.career&&e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-5",children:[e.jsx("h4",{className:"font-heading text-primary mb-2",children:"ð¼ Career"}),e.jsx("p",{className:"text-sm text-foreground/75 leading-relaxed",children:r.career})]}),r.health&&e.jsxs("div",{className:"bg-card border border-border rounded-2xl p-5",children:[e.jsx("h4",{className:"font-heading text-primary mb-2",children:"ð¿ Health"}),e.jsx("p",{className:"text-sm text-foreground/75 leading-relaxed",children:r.health})]})]}),(r.lucky_number||r.lucky_colour||r.affirmation)&&e.jsxs("div",{className:"bg-card border border-primary/20 rounded-2xl p-6 grid sm:grid-cols-3 gap-4 text-center",children:[r.lucky_number&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-widest mb-1",children:"Lucky Number"}),e.jsx("p",{className:"font-heading text-2xl text-primary",children:r.lucky_number})]}),r.lucky_colour&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-widest mb-1",children:"Lucky Colour"}),e.jsx("p",{className:"font-heading text-2xl text-primary",children:r.lucky_colour})]}),r.affirmation&&e.jsxs("div",{className:"sm:col-span-1",children:[e.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-widest mb-1",children:"Affirmation"}
1),e.jsxs("p",{className:"text-sm italic text-foreground/80",children:['"',r.affirmation,'"']})]})]})]})]}),e.jsx(M,{})]})}export{Q 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.